diff --git a/dist/layui.js b/dist/layui.js index 424ed0ee9..d392a1f35 100644 --- a/dist/layui.js +++ b/dist/layui.js @@ -1,2 +1,2 @@ -/** v2.8.18-rc.3 | MIT Licensed */;!function(d){"use strict";var t,h=d.document,m={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.8.18-rc.3"},e=d.LAYUI_GLOBAL||{},v=(t=h.currentScript?h.currentScript.src:function(){for(var t,e=h.scripts,o=e.length-1,n=o;01e3*m.timeout/4?g(s+" is not a valid module","error"):void(m.status[s]?y():setTimeout(n,4))}())}function y(){e.push(layui[s]),11e3*m.timeout/4?g(s+" is not a valid module","error"):void("string"==typeof m.modules[s]&&m.status[s]?y():setTimeout(f,4))}():((r=h.createElement("script"))["async"]=!0,r.charset="utf-8",r.src=i+((u=!0===m.version?m.v||(new Date).getTime():m.version||"")?"?v="+u:""),l.appendChild(r),!r.attachEvent||r.attachEvent.toString&&r.attachEvent.toString().indexOf("[native code")<0||b?r.addEventListener("load",function(t){p(t,i)},!1):r.attachEvent("onreadystatechange",function(t){p(t,i)}),m.modules[s]=i)),a},n.prototype.disuse=function(t){var o=this;return t=o.isArray(t)?t:[t],o.each(t,function(t,e){m.status[e],delete o[e],delete N[e],delete o.modules[e],delete m.status[e],delete m.modules[e]}),o},n.prototype.getStyle=function(t,e){t=t.currentStyle||d.getComputedStyle(t,null);return t[t.getPropertyValue?"getPropertyValue":"getAttribute"](e)},n.prototype.link=function(o,n,t){var r=this,e=h.getElementsByTagName("head")[0],i=h.createElement("link"),a="layuicss-"+((t="string"==typeof n?n:t)||o).replace(/\.|\//g,""),u="creating",l=0;return i.href=o+(m.debug?"?v="+(new Date).getTime():""),i.rel="stylesheet",i.id=a,i.media="all",h.getElementById(a)||e.appendChild(i),"function"==typeof n&&function s(t){var e=h.getElementById(a);return++l>1e3*m.timeout/100?g(o+" timeout"):void(1989===parseInt(r.getStyle(e,"width"))?(t===u&&e.removeAttribute("lay-status"),e.getAttribute("lay-status")===u?setTimeout(s,100):n()):(e.setAttribute("lay-status",u),setTimeout(function(){s(u)},100)))}(),r},n.prototype.addcss=function(t,e,o){return layui.link(m.dir+"css/"+t,e,o)},m.callback={},n.prototype.factory=function(t){if(layui[t])return"function"==typeof m.callback[t]?m.callback[t]:null},n.prototype.img=function(t,e,o){var n=new Image;if(n.src=t,n.complete)return e(n);n.onload=function(){n.onload=null,"function"==typeof e&&e(n)},n.onerror=function(t){n.onerror=null,"function"==typeof o&&o(t)}},n.prototype.config=function(t){for(var e in t=t||{})m[e]=t[e];return this},n.prototype.modules=function(){var t,e={};for(t in N)e[t]=N[t];return e}(),n.prototype.extend=function(t){for(var e in t=t||{})this[e]||this.modules[e]?g(e+" Module already exists","error"):this.modules[e]=t[e];return this},n.prototype.router=n.prototype.hash=function(t){var o={path:[],search:{},hash:((t=t||location.hash).match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(t)&&(t=t.replace(/^#\//,""),o.href="/"+t,t=t.replace(/([^#])(#.*$)/,"$1").split("/")||[],this.each(t,function(t,e){/^\w+=/.test(e)?(e=e.split("="),o.search[e[0]]=e[1]):o.path.push(e)})),o},n.prototype.url=function(t){var r,e,o=this;return{pathname:(t?((t.match(/\.[^.]+?\/.+/)||[])[0]||"").replace(/^[^\/]+/,"").replace(/\?.+/,""):location.pathname).replace(/^\//,"").split("/"),search:(r={},e=(t?((t.match(/\?.+/)||[])[0]||"").replace(/\#.+/,""):location.search).replace(/^\?+/,"").split("&"),o.each(e,function(t,e){var o=e.indexOf("="),n=o<0?e.substr(0,e.length):0!==o&&e.substr(0,o);n&&(r[n]=0(s.innerHeight||h.documentElement.clientHeight)},d.getStyleRules=function(t,n){if(t)return t=(t=t.sheet||t.styleSheet||{}).cssRules||t.rules,"function"==typeof n&&layui.each(t,function(t,e){if(n(e,t))return!0}),t},d.style=function(t){t=t||{};var e=d.elem("style"),n=t.text||"",i=t.target;if(n)return"styleSheet"in e?(e.setAttribute("type","text/css"),e.styleSheet.cssText=n):e.innerHTML=n,e.id="LAY-STYLE-"+(t.id||(n=d.style.index||0,d.style.index++,"DF-"+n)),i&&((t=d(i).find("#"+e.id))[0]&&t.remove(),d(i).append(e)),e},d.position=function(t,e,n){var i,r,o,c,u,a,f,l;e&&(n=n||{},t!==h&&t!==d("body")[0]||(n.clickType="right"),i="right"===n.clickType?{left:(i=n.e||s.event||{}).clientX,top:i.clientY,right:i.clientX,bottom:i.clientY}:t.getBoundingClientRect(),f=e.offsetWidth,l=e.offsetHeight,r=function(t){return h.body[t=t?"scrollLeft":"scrollTop"]|h.documentElement[t]},o=function(t){return h.documentElement[t?"clientWidth":"clientHeight"]},c="margin"in n?n.margin:5,u=i.left,a=i.bottom,"center"===n.align?u-=(f-t.offsetWidth)/2:"right"===n.align&&(u=u-f+t.offsetWidth),(u=u+f+c>o("width")?o("width")-f-c:u)o()&&(i.top>l+c&&i.top<=o()?a=i.top-l-2*c:n.allowBottomOut||(a=o()-l-2*c)<0&&(a=0)),(f=n.position)&&(e.style.position=f),e.style.left=u+("fixed"===f?0:r(1))+"px",e.style.top=a+("fixed"===f?0:r())+"px",d.hasScrollbar()||(l=e.getBoundingClientRect(),!n.SYSTEM_RELOAD&&l.bottom+c>o()&&(n.SYSTEM_RELOAD=!0,setTimeout(function(){d.position(t,e,n)},50))))},d.options=function(t,e){if(e="object"==typeof e?e:{attr:e},t===h)return{};var t=d(t),n=e.attr||"lay-options",t=t.attr(n);try{return new Function("return "+(t||"{}"))()}catch(i){return layui.hint().error(e.errorText||[n+'="'+t+'"',"\n parseerror: "+i].join("\n"),"error"),{}}},d.isTopElem=function(n){var t=[h,d("body")[0]],i=!1;return d.each(t,function(t,e){if(e===n)return i=!0}),i},d.clipboard={writeText:function(t){var e=String(t.text);try{navigator.clipboard.writeText(e).then(t.done)["catch"](t.error)}catch(i){var n=h.createElement("textarea");n.value=e,n.style.position="fixed",n.style.opacity="0",n.style.top="0px",n.style.left="0px",h.body.appendChild(n),n.select();try{h.execCommand("copy"),"function"==typeof t.done&&t.done()}catch(r){"function"==typeof t.error&&t.error(r)}finally{n.remove?n.remove():h.body.removeChild(n)}}}},r.addStr=function(n,t){return n=n.replace(/\s+/," "),t=t.replace(/\s+/," ").split(" "),d.each(t,function(t,e){new RegExp("\\b"+e+"\\b").test(n)||(n=n+" "+e)}),n.replace(/^\s|\s$/,"")},r.removeStr=function(n,t){return n=n.replace(/\s+/," "),t=t.replace(/\s+/," ").split(" "),d.each(t,function(t,e){e=new RegExp("\\b"+e+"\\b");e.test(n)&&(n=n.replace(e,""))}),n.replace(/\s+/," ").replace(/^\s|\s$/,"")},r.fn.find=function(n){var i=[],r="object"==typeof n;return this.each(function(t,e){e=r&&e.contains(n)?n:e.querySelectorAll(n||null);d.each(e,function(t,e){i.push(e)})}),d(i)},r.fn.each=function(t){return d.each.call(this,this,t)},r.fn.addClass=function(n,i){return this.each(function(t,e){e.className=r[i?"removeStr":"addStr"](e.className,n)})},r.fn.removeClass=function(t){return this.addClass(t,!0)},r.fn.hasClass=function(n){var i=!1;return this.each(function(t,e){new RegExp("\\b"+n+"\\b").test(e.className)&&(i=!0)}),i},r.fn.css=function(e,i){var t=this,r=function(t){return isNaN(t)?t:t+"px"};return"string"!=typeof e||i!==undefined?t.each(function(t,n){"object"==typeof e?d.each(e,function(t,e){n.style[t]=r(e)}):n.style[e]=r(i)}):0]|&(?=#[a-zA-Z0-9]+)/g.test(e+="")?e.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,"""):e}},i=function(e){return new RegExp(e,"g")},u=function(e,r){var n="Laytpl Error: ";return"object"==typeof console&&console.error(n+e+"\n"+(r||"")),n+e},n=function(e,r){var n=this,e=(n.config=n.config||{},n.template=e,function(e){for(var r in e)n.config[r]=e[r]});e(c),e(r)},r=(n.prototype.tagExp=function(e,r,n){var c=this.config;return i((r||"")+c.open+["#([\\s\\S])+?","([^{#}])*?"][e||0]+c.close+(n||""))},n.prototype.parse=function(e,r){var n=this,c=n.config,t=e,o=i("^"+c.open+"#",""),p=i(c.close+"$","");if("string"!=typeof e)return e;e='"use strict";var view = "'+(e=e.replace(/\s+|\r|\t|\n/g," ").replace(i(c.open+"#"),c.open+"# ").replace(i(c.close+"}"),"} "+c.close).replace(/\\/g,"\\\\").replace(i(c.open+"!(.+?)!"+c.close),function(e){return e=e.replace(i("^"+c.open+"!"),"").replace(i("!"+c.close),"").replace(i(c.open+"|"+c.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(n.tagExp(),function(e){return'";'+(e=e.replace(o,"").replace(p,"")).replace(/\\(.)/g,"$1")+';view+="'}).replace(n.tagExp(1),function(e){var r='"+laytpl.escape(';return e.replace(/\s/g,"")===c.open+c.close?"":(e=e.replace(i(c.open+"|"+c.close),""),/^=/.test(e)?e=e.replace(/^=/,""):/^-/.test(e)&&(e=e.replace(/^-/,""),r='"+('),r+e.replace(/\\(.)/g,"$1")+')+"')}))+'";return view;';try{return n.cache=e=new Function("d, laytpl",e),e(r,l)}catch(a){return delete n.cache,u(a,t)}},n.prototype.render=function(e,r){e=e||{};var n=this,e=n.cache?n.cache(e,l):n.parse(n.template,e);return"function"==typeof r&&r(e),e},function(e,r){return new n(e,r)});r.config=function(e){for(var r in e=e||{})c[r]=e[r]},r.v="2.0.0",e("laytpl",r)});layui.define(function(e){"use strict";var r=document,u="getElementById",c="getElementsByTagName",a="layui-disabled",t=function(e){var a=this;a.config=e||{},a.config.index=++o.index,a.render(!0)},o=(t.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return e.elem.length===undefined?2:3},t.prototype.view=function(){var e,i,t,n=this.config,r=n.groups="groups"in n?Number(n.groups)||0:5,u=(n.layout="object"==typeof n.layout?n.layout:["prev","page","next"],n.count=Number(n.count)||0,n.curr=Number(n.curr)||1,n.limits="object"==typeof n.limits?n.limits:[10,20,30,40,50],n.limit=Number(n.limit)||10,n.pages=Math.ceil(n.count/n.limit)||1,n.curr>n.pages?n.curr=n.pages:n.curr<1&&(n.curr=1),r<0?r=1:r>n.pages&&(r=n.pages),n.prev="prev"in n?n.prev:"上一页",n.next="next"in n?n.next:"下一页",n.pages>r?Math.ceil((n.curr+(1'+n.prev+"":"",page:function(){var e=[];if(n.count<1)return"";1'+(n.first||1)+"");var a=Math.floor((r-1)/2),t=1n.pages?n.pages:a:r;for(i-t…');t<=i;t++)t===n.curr?e.push('"+t+""):e.push(''+t+"");return n.pages>r&&n.pages>i&&!1!==n.last&&(i+1…'),0!==r)&&e.push(''+(n.last||n.pages)+""),e.join("")}(),next:n.next?''+n.next+"":"",count:'\u5171 '+n.count+" \u6761",limit:(i=['"),refresh:['','',""].join(""),skip:[''+(e="object"==typeof n.skipText?n.skipText:["到第","页","确定"])[0],'',e[1]+'",""].join("")};return['
',(t=[],layui.each(n.layout,function(e,a){l[a]&&t.push(l[a])}),t.join("")),"
"].join("")},t.prototype.jump=function(e,a){if(e){var t=this,i=t.config,n=e.children,r=e[c]("button")[0],u=e[c]("input")[0],e=e[c]("select")[0],l=function(){var e=Number(u.value.replace(/\s|\D/g,""));e&&(i.curr=e,t.render())};if(a)return l();for(var s=0,p=n.length;si.pages||(i.curr=e,t.render())});e&&o.on(e,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),r&&o.on(r,"click",function(){l()})}},t.prototype.skip=function(t){var i,e;t&&(i=this,e=t[c]("input")[0])&&o.on(e,"keyup",function(e){var a=this.value,e=e.keyCode;/^(37|38|39|40)$/.test(e)||(/\D/.test(a)&&(this.value=a.replace(/\D/,"")),13===e&&i.jump(t,!0))})},t.prototype.render=function(e){var a=this,t=a.config,i=a.type(),n=a.view(),i=(2===i?t.elem&&(t.elem.innerHTML=n):3===i?t.elem.html(n):r[u](t.elem)&&(r[u](t.elem).innerHTML=n),t.jump&&t.jump(t,e),r[u]("layui-laypage-"+t.index));a.jump(i),t.hash&&!e&&(location.hash="!"+t.hash+"="+t.curr),a.skip(i)},{render:function(e){return new t(e).index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(a,e,t){return a.attachEvent?a.attachEvent("on"+e,function(e){e.target=e.srcElement,t.call(a,e)}):a.addEventListener(e,t,!1),this}});e("laypage",o)});!function(i,v){"use strict";var n=i.layui&&layui.define,l={getPath:i.lay&&lay.getPath?lay.getPath:"",link:function(e,t,a){D.path&&i.lay&&lay.layui&&lay.layui.link(D.path+e,t,a)}},e=i.LAYUI_GLOBAL||{},d="layui-laydate-id",D={v:"5.5.0",config:{weekStart:0},index:i.laydate&&i.laydate.v?1e5:0,path:e.laydate_dir||l.getPath,set:function(e){var t=this;return t.config=lay.extend({},t.config,e),t},ready:function(e){var t="laydate",a=(n?"modules/":"")+"laydate.css?v="+D.v;return n?layui["layui.all"]?"function"==typeof e&&e():layui.addcss(a,e,t):l.link(a,e,t),this}},s=function(){var t=this,e=t.config.id;return(s.that[e]=t).inst={hint:function(e){t.hint.call(t,e)},reload:function(e){t.reload.call(t,e)},config:t.config}},a="laydate",x="layui-this",k="laydate-disabled",h=[100,2e5],T="layui-laydate-static",w="layui-laydate-list",o="laydate-selected",r="layui-laydate-hint",y="laydate-day-prev",m="laydate-day-next",C=".laydate-btns-confirm",M="laydate-time-text",L="laydate-btns-time",E="layui-laydate-preview",S="layui-laydate-shade",I=function(e){var t,a=this,n=(a.index=++D.index,a.config=lay.extend({},a.config,D.config,e),lay(e.elem||a.config.elem));return 1\u8bf7\u91cd\u65b0\u9009\u62e9",invalidDate:"\u4e0d\u5728\u6709\u6548\u65e5\u671f\u6216\u65f6\u95f4\u8303\u56f4\u5185",formatError:["\u65e5\u671f\u683c\u5f0f\u4e0d\u5408\u6cd5
\u5fc5\u987b\u9075\u5faa\u4e0b\u8ff0\u683c\u5f0f\uff1a
","
\u5df2\u4e3a\u4f60\u91cd\u7f6e"],preview:"\u5f53\u524d\u9009\u4e2d\u7684\u7ed3\u679c"},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\uff1a
","
It has been reset"],preview:"The selected result"}};return e[this.config.lang]||e.cn},I.prototype.reload=function(e){this.config=lay.extend({},this.config,e),this.init()},I.prototype.init=function(){var r=this,o=r.config,e="static"===o.position,t={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]&&("array"!==layui.type(o.theme)&&(o.theme=[o.theme]),o.fullPanel&&("datetime"!==o.type||o.range)&&delete o.fullPanel,r.rangeStr=o.range?"string"==typeof o.range?o.range:"-":"",r.rangeLinked=!(!o.range||!o.rangeLinked||"date"!==o.type&&"datetime"!==o.type),r.autoCalendarModel=function(){var e=r.rangeLinked;return r.rangeLinked=o.range&&("date"===o.type||"datetime"===o.type)&&(!r.startDate||!r.endDate||r.startDate&&r.endDate&&r.startDate.year===r.endDate.year&&r.startDate.month===r.endDate.month),lay(r.elem)[r.rangeLinked?"addClass":"removeClass"]("layui-laydate-linkage"),r.rangeLinked!=e},r.autoCalendarModel.auto=r.rangeLinked&&"auto"===o.rangeLinked,"array"===layui.type(o.range)&&(r.rangeElem=[lay(o.range[0]),lay(o.range[1])]),t[o.type]||(i.console&&console.error&&console.error("laydate type error:'"+o.type+"' is not supported"),o.type="date"),o.format===t.date&&(o.format=t[o.type]||t.date),r.format=s.formatArr(o.format),o.weekStart&&!/^[0-6]$/.test(o.weekStart)&&(t=r.lang(),o.weekStart=t.weeks.indexOf(o.weekStart),-1===o.weekStart)&&(o.weekStart=0),r.EXP_IF="",r.EXP_SPLIT="",lay.each(r.format,function(e,t){e=new RegExp(c).test(t)?"\\d{"+(new RegExp(c).test(r.format[0===e?e+1:e-1]||"")?/^yyyy|y$/.test(t)?4:t.length:/^yyyy$/.test(t)?"1,4":/^y$/.test(t)?"1,308":"1,2")+"}":"\\"+t;r.EXP_IF=r.EXP_IF+e,r.EXP_SPLIT=r.EXP_SPLIT+"("+e+")"}),r.EXP_IF_ONE=new RegExp("^"+r.EXP_IF+"$"),r.EXP_IF=new RegExp("^"+(o.range?r.EXP_IF+"\\s\\"+r.rangeStr+"\\s"+r.EXP_IF:r.EXP_IF)+"$"),r.EXP_SPLIT=new RegExp("^"+r.EXP_SPLIT+"$",""),r.isInput(o.elem[0])||"focus"===o.trigger&&(o.trigger="click"),o.elem.attr("lay-key",r.index),o.eventElem.attr("lay-key",r.index),o.elem.attr(d,o.id),o.mark=lay.extend({},o.calendar&&"cn"===o.lang?{"0-1-1":"\u5143\u65e6","0-2-14":"\u60c5\u4eba","0-3-8":"\u5987\u5973","0-3-12":"\u690d\u6811","0-4-1":"\u611a\u4eba","0-5-1":"\u52b3\u52a8","0-5-4":"\u9752\u5e74","0-6-1":"\u513f\u7ae5","0-9-10":"\u6559\u5e08","0-10-1":"\u56fd\u5e86","0-12-25":"\u5723\u8bde"}:{},o.mark),lay.each(["min","max"],function(e,t){var a=[],n=[];if("number"==typeof o[t])var i=o[t],l=new Date,l=r.newDate({year:l.getFullYear(),month:l.getMonth(),date:l.getDate(),hours:e?23:0,minutes:e?59:0,seconds:e?59:0}).getTime(),e=new Date(i?i<864e5?l+864e5*i:i:l),a=[e.getFullYear(),e.getMonth()+1,e.getDate()],n=[e.getHours(),e.getMinutes(),e.getSeconds()];else if("string"==typeof o[t])a=(o[t].match(/\d+-\d+-\d+/)||[""])[0].split("-"),n=(o[t].match(/\d+:\d+:\d+/)||[""])[0].split(":");else if("object"==typeof o[t])return o[t];o[t]={year:0|a[0]||(new Date).getFullYear(),month:a[1]?(0|a[1])-1:(new Date).getMonth(),date:0|a[2]||(new Date).getDate(),hours:0|n[0],minutes:0|n[1],seconds:0|n[2]}}),r.elemID="layui-laydate"+o.elem.attr("lay-key"),(o.show||e)&&r.render(),e||r.events(),o.value)&&o.isInitValue&&("date"===layui.type(o.value)?r.setValue(r.parse(0,r.systemDate(o.value))):r.setValue(o.value))},I.prototype.render=function(){var a,n,i,l,r=this,o=r.config,d=r.lang(),s="static"===o.position,y=r.elem=lay.elem("div",{id:r.elemID,"class":["layui-laydate",o.range?" layui-laydate-range":"",r.rangeLinked?" layui-laydate-linkage":"",s?" "+T:"",o.fullPanel?" laydate-theme-fullpanel":"",(a="",lay.each(o.theme,function(e,t){"default"===t||/^#/.test(t)||(a+=" laydate-theme-"+t)}),a)].join("")}),m=r.elemMain=[],c=r.elemHeader=[],u=r.elemCont=[],h=r.table=[],e=r.footer=lay.elem("div",{"class":"layui-laydate-footer"}),t=r.shortcut=lay.elem("ul",{"class":"layui-laydate-shortcut"}),f=(o.zIndex&&(y.style.zIndex=o.zIndex),lay.each(new Array(2),function(e){if(!o.range&&0'+d.timeTips+""),(o.range||"datetime"!==o.type||o.fullPanel)&&f.push(''),lay.each(o.btns,function(e,t){var a=d.tools[t]||"btn";o.range&&"now"===t||(s&&"clear"===t&&(a="cn"===o.lang?"\u91cd\u7f6e":"Reset"),n.push(''+a+""))}),f.push('"),f.join(""))),o.shortcuts&&(y.appendChild(t),lay(t).html((i=[],lay.each(o.shortcuts,function(e,t){i.push('
  • '+t.text+"
  • ")}),i.join(""))).find("li").on("click",function(e){var t=o.shortcuts[this.dataset.index]||{},t=("function"==typeof t.value?t.value():t.value)||[],n=(layui.isArray(t)||(t=[t]),o.type),t=(lay.each(t,function(e,t){var a=[o.dateTime,r.endDate][e];"time"===n&&"date"!==layui.type(t)?r.EXP_IF.test(t)&&(t=(t.match(r.EXP_SPLIT)||[]).slice(1),lay.extend(a,{hours:0|t[0],minutes:0|t[2],seconds:0|t[4]})):lay.extend(a,r.systemDate("date"===layui.type(t)?t:new Date(t))),"time"!==n&&"datetime"!==n||(r[["startTime","endTime"][e]]={hours:a.hours,minutes:a.minutes,seconds:a.seconds}),0===e?r.startDate=lay.extend({},a):r.endState=!0,"year"===n||"month"===n||"time"===n?r.listYM[e]=[a.year,a.month+1]:e&&r.autoCalendarModel.auto&&r.autoCalendarModel()}),r.checkDate("limit").calendar(null,null,"init"),lay(r.footer).find("."+L).removeClass(k));t&&"date"===t.attr("lay-type")&&t[0].click(),r.done(null,"change"),lay(this).addClass(x),"static"!==o.position&&r.setValue(r.parse()).done().remove()})),lay.each(m,function(e,t){y.appendChild(t)}),o.showBottom&&y.appendChild(e),lay.elem("style")),p=[],g=!0,t=(lay.each(o.theme,function(e,t){g&&/^#/.test(t)?(g=!(l=!0),p.push(["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} li.layui-this,#{{id}} td.layui-this>div{background-color:{{theme}} !important;}",-1!==o.theme.indexOf("circle")?"":"#{{id}} .layui-this{background-color:{{theme}} !important;}","#{{id}} .laydate-day-now{color:{{theme}} !important;}","#{{id}} .laydate-day-now:after{border-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,r.elemID).replace(/{{theme}}/g,t))):!g&&/^#/.test(t)&&p.push(["#{{id}} .laydate-selected>div{background-color:{{theme}} !important;}","#{{id}} .laydate-selected:hover>div{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,r.elemID).replace(/{{theme}}/g,t))}),o.shortcuts&&o.range&&p.push("#{{id}}.layui-laydate-range{width: 628px;}".replace(/{{id}}/g,r.elemID)),p.length&&(p=p.join(""),"styleSheet"in f?(f.setAttribute("type","text/css"),f.styleSheet.cssText=p):f.innerHTML=p,l&&lay(y).addClass("laydate-theme-molv"),y.appendChild(f)),r.remove(I.thisElemDate),D.thisId=o.id,s?o.elem.append(y):(v.body.appendChild(y),r.position()),o.shade?'
    ':"");y.insertAdjacentHTML("beforebegin",t),r.checkDate().calendar(null,0,"init"),r.changeEvent(),I.thisElemDate=r.elemID,r.renderAdditional(),"function"==typeof o.ready&&o.ready(lay.extend({},o.dateTime,{month:o.dateTime.month+1})),r.preview()},I.prototype.remove=function(e){var t=this,a=t.config,n=lay("#"+(e||t.elemID));return n[0]&&(n.hasClass(T)||t.checkDate(function(){n.remove(),delete t.startDate,delete t.endDate,delete t.endState,delete t.startTime,delete t.endTime,delete D.thisId,"function"==typeof a.close&&a.close(t)}),lay("."+S).remove()),t},I.prototype.position=function(){var e=this.config;return lay.position(e.elem[0],this.elem,{position:e.position}),this},I.prototype.hint=function(e){var t=this,a=(t.config,lay.elem("div",{"class":r}));t.elem&&(a.innerHTML=(e="object"==typeof e?e||{}:{content:e}).content||"",lay(t.elem).find("."+r).remove(),t.elem.appendChild(a),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){lay(t.elem).find("."+r).remove()},"ms"in e?e.ms:3e3))},I.prototype.getAsYM=function(e,t,a){return a?t--:t++,t<0&&(t=11,e--),11h[1]&&(e.year=h[1],o=!0),11t)&&(e.date=t,o=!0)},u=function(n,i,l){var r=["startTime","endTime"];i=(i.match(d.EXP_SPLIT)||[]).slice(1),l=l||0,s.range&&(d[r[l]]=d[r[l]]||{}),lay.each(d.format,function(e,t){var a=parseFloat(i[e]);i[e].lengthd.getDateTime(s.max)?(r=s.dateTime=lay.extend({},s.max),i=!0):d.getDateTime(r)d.getDateTime(s.max))&&(d.endDate=lay.extend({},s.max),i=!0),d.startTime={hours:s.dateTime.hours,minutes:s.dateTime.minutes,seconds:s.dateTime.seconds},d.endTime={hours:d.endDate.hours,minutes:d.endDate.minutes,seconds:d.endDate.seconds},"month"===s.type)&&(s.dateTime.date=1,d.endDate.date=1),i&&m&&(d.setValue(d.parse()),d.hint("value "+l.invalidDate+l.formatError[1])),d.startDate=d.startDate||m&&lay.extend({},s.dateTime),d.autoCalendarModel.auto&&d.autoCalendarModel(),d.endState=!s.range||!d.rangeLinked||!(!d.startDate||!d.endDate),e&&e()),d},I.prototype.mark=function(e,a){var n,t=this.config;return lay.each(t.mark,function(e,t){e=e.split("-");e[0]!=a[0]&&0!=e[0]||e[1]!=a[1]&&0!=e[1]||e[2]!=a[2]||(n=t||a[2])}),n&&e.find("div").html(''+n+""),this},I.prototype.holidays=function(n,i){var e=this.config,l=["","work"];return"array"===layui.type(e.holidays)&&lay.each(e.holidays,function(a,e){lay.each(e,function(e,t){t===n.attr("lay-ymd")&&n.find("div").html('"+i[2]+"")})}),this},I.prototype.limit=function(t){t=t||{};var i=this,e=i.config,l={},a=t.index>(t.time?0:41)?i.endDate:e.dateTime;return lay.each({now:lay.extend({},a,t.date||{}),min:e.min,max:e.max},function(e,a){var n;l[e]=i.newDate(lay.extend({year:a.year,month:"year"===t.type?0:a.month,date:"year"===t.type||"month"===t.type?1:a.date},(n={},lay.each(t.time,function(e,t){n[t]=a[t]}),n))).getTime()}),a=l.nowh[1]&&(d.year=h[1],o.hint(y.invalidDate)),o.firstDate||(o.firstDate=lay.extend({},d)),s.setFullYear(d.year,d.month,1),i=(s.getDay()+(7-n.weekStart))%7,l=D.getEndDate(d.month||12,d.year),r=D.getEndDate(d.month+1,d.year),lay.each(c,function(e,t){var a,n=[d.year,d.month];(t=lay(t)).removeAttr("class"),e"+n[2]+""),o.mark(t,n).holidays(t,n).limit({elem:t,date:{year:n[0],month:n[1]-1,date:n[2]},index:e})}),lay(u[0]).attr("lay-ym",d.year+"-"+(d.month+1)),lay(u[1]).attr("lay-ym",d.year+"-"+(d.month+1)),"cn"===n.lang?(lay(u[0]).attr("lay-type","year").html(d.year+" \u5e74"),lay(u[1]).attr("lay-type","month").html(d.month+1+" \u6708")):(lay(u[0]).attr("lay-type","month").html(y.month[d.month]),lay(u[1]).attr("lay-type","year").html(d.year)),m&&(n.range?!e&&"init"===a||(o.listYM=[[(o.startDate||n.dateTime).year,(o.startDate||n.dateTime).month+1],[o.endDate.year,o.endDate.month+1]],o.list(n.type,0).list(n.type,1),"time"===n.type?o.setBtnStatus("\u65f6\u95f4",lay.extend({},o.systemDate(),o.startTime),lay.extend({},o.systemDate(),o.endTime)):o.setBtnStatus(!0)):(o.listYM=[[d.year,d.month+1]],o.list(n.type,0))),n.range&&"init"===a&&(o.rangeLinked?(s=o.getAsYM(d.year,d.month,t?"sub":null),o.calendar(lay.extend({},d,{year:s[0],month:s[1]}),1-t)):o.calendar(null,1-t)),n.range||(c=["hours","minutes","seconds"],o.limit({elem:lay(o.footer).find(".laydate-btns-now"),date:o.systemDate(/^(datetime|time)$/.test(n.type)?new Date:null),index:0,time:c}),o.limit({elem:lay(o.footer).find(C),index:0,time:c})),o.setBtnStatus(),lay(o.shortcut).find("li."+x).removeClass(x),n.range&&!m&&"init"!==a&&o.stampRange(),o},I.prototype.list=function(n,i){var l,r,e,o,d=this,s=d.config,y=d.rangeLinked?s.dateTime:[s.dateTime,d.endDate][i],m=d.lang(),t=s.range&&"date"!==s.type&&"datetime"!==s.type,c=lay.elem("ul",{"class":w+" "+{year:"laydate-year-list",month:"laydate-month-list",time:"laydate-time-list"}[n]}),a=d.elemHeader[i],u=lay(a[2]).find("span"),h=d.elemCont[i||0],f=lay(h).find("."+w)[0],p="cn"===s.lang,g=p?"\u5e74":"",v=d.listYM[i]||{},D=["hours","minutes","seconds"],T=["startTime","endTime"][i];return v[0]<1&&(v[0]=1),"year"===n?(e=l=v[0]-7,l<1&&(e=l=1),lay.each(new Array(15),function(e){var t=lay.elem("li",{"lay-ym":l}),a={year:l,month:0,date:1};l==v[0]&&lay(t).addClass(x),t.innerHTML=l+g,c.appendChild(t),d.limit({elem:lay(t),date:a,index:i,type:n}),l++}),lay(u[p?0:1]).attr("lay-ym",l-8+"-"+v[1]).html(e+g+" - "+(l-1)+g)):"month"===n?(lay.each(new Array(12),function(e){var t=lay.elem("li",{"lay-ym":e}),a={year:v[0],month:e,date:1};e+1==v[1]&&lay(t).addClass(x),t.innerHTML=m.month[e]+(p?"\u6708":""),c.appendChild(t),d.limit({elem:lay(t),date:a,index:i,type:n})}),lay(u[p?0:1]).attr("lay-ym",v[0]+"-"+v[1]).html(v[0]+g)):"time"===n&&(r=function(){lay(c).find("ol").each(function(a,e){lay(e).find("li").each(function(e,t){d.limit({elem:lay(t),date:[{hours:e},{hours:d[T].hours,minutes:e},{hours:d[T].hours,minutes:d[T].minutes,seconds:e}][a],index:i,time:[["hours"],["hours","minutes"],["hours","minutes","seconds"]][a]})})}),s.range||d.limit({elem:lay(d.footer).find(C),date:d[T],inedx:0,time:["hours","minutes","seconds"]})},s.range?d[T]||(d[T]="startTime"===T?y:d.endDate):d[T]=y,lay.each([24,60,60],function(t,e){var a=lay.elem("li"),n=["

    "+m.time[t]+"

      "];lay.each(new Array(e),function(e){n.push(""+lay.digit(e,2)+"")}),a.innerHTML=n.join("")+"
    ",c.appendChild(a)}),r()),f&&h.removeChild(f),h.appendChild(c),"year"===n||"month"===n?(lay(d.elemMain[i]).addClass("laydate-ym-show"),lay(c).find("li").on("click",function(){var e=0|lay(this).attr("lay-ym");lay(this).hasClass(k)||(d.rangeLinked?lay.extend(y,{year:"year"===n?e:v[0],month:"year"===n?v[1]-1:e}):y[n]=e,"year"===s.type||"month"===s.type?(lay(c).find("."+x).removeClass(x),lay(this).addClass(x),"month"===s.type&&"year"===n&&(d.listYM[i][0]=e,t&&((i?d.endDate:y).year=e),d.list("month",i))):(d.checkDate("limit").calendar(y,i,"init"),d.closeList()),d.setBtnStatus(),!s.range&&s.autoConfirm&&("month"===s.type&&"month"===n||"year"===s.type&&"year"===n)&&d.setValue(d.parse()).done().remove(),d.autoCalendarModel.auto&&!d.rangeLinked?d.choose(lay(h).find("td.layui-this"),i):d.endState&&d.done(null,"change"),lay(d.footer).find("."+L).removeClass(k))})):(e=lay.elem("span",{"class":M}),o=function(){lay(c).find("ol").each(function(e){var a=this,t=lay(a).find("li");a.scrollTop=30*(d[T][D[e]]-2),a.scrollTop<=0&&t.each(function(e,t){if(!lay(this).hasClass(k))return a.scrollTop=30*(e-2),!0})})},u=lay(a[2]).find("."+M),o(),e.innerHTML=s.range?[m.startTime,m.endTime][i]:m.timeTips,lay(d.elemMain[i]).addClass("laydate-time-show"),u[0]&&u.remove(),a[2].appendChild(e),lay(c).find("ol").each(function(t){var a=this;lay(a).find("li").on("click",function(){var e=0|this.innerHTML;lay(this).hasClass(k)||(s.range?d[T][D[t]]=e:y[D[t]]=e,lay(a).find("."+x).removeClass(x),lay(this).addClass(x),r(),o(),(d.endDate||"time"===s.type||"datetime"===s.type&&s.fullPanel)&&d.done(null,"change"),d.setBtnStatus())})})),d},I.prototype.listYM=[],I.prototype.closeList=function(){var a=this;a.config;lay.each(a.elemCont,function(e,t){lay(this).find("."+w).remove(),lay(a.elemMain[e]).removeClass("laydate-ym-show laydate-time-show")}),lay(a.elem).find("."+M).remove()},I.prototype.setBtnStatus=function(e,t,a){var n=this,i=n.config,l=n.lang(),r=lay(n.footer).find(C);i.range&&"time"!==i.type&&(t=t||(n.rangeLinked?n.startDate:i.dateTime),a=a||n.endDate,i=!n.endState||n.newDate(t).getTime()>n.newDate(a).getTime(),n.limit({date:t})||n.limit({date:a})?r.addClass(k):r[i?"addClass":"removeClass"](k),e)&&i&&n.hint("string"==typeof e?l.timeout.replace(/\u65e5\u671f/g,e):l.timeout)},I.prototype.parse=function(e,t){var a=this,n=a.config,i=a.rangeLinked?a.startDate:n.dateTime,t=t||("end"==e?lay.extend({},a.endDate,a.endTime):n.range?lay.extend({},i||n.dateTime,a.startTime):n.dateTime),i=D.parse(t,a.format,1);return n.range&&e===undefined?i+" "+a.rangeStr+" "+a.parse("end"):i},I.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},I.prototype.getDateTime=function(e){return this.newDate(e).getTime()},I.prototype.setValue=function(e){var t=this,a=t.config,n=a.elem[0];return"static"!==a.position&&(e=e||"",t.isInput(n)?lay(n).val(e):(a=t.rangeElem)?("array"!==layui.type(e)&&(e=e.split(" "+t.rangeStr+" ")),a[0].val(e[0]||""),a[1].val(e[1]||"")):(0===lay(n).find("*").length&&lay(n).html(e),lay(n).attr("lay-date",e))),t},I.prototype.preview=function(){var e,t=this,a=t.config;a.isPreview&&(e=lay(t.elem).find("."+E),a=!a.range||(t.rangeLinked?t.endState:t.endDate)?t.parse():"",e.html(a),e.html())&&(e.css({color:"#16b777"}),setTimeout(function(){e.css({color:"#777"})},300))},I.prototype.renderAdditional=function(){this.config.fullPanel&&this.list("time",0)},I.prototype.stampRange=function(){var n,i=this,l=i.config,r=i.rangeLinked?i.startDate:l.dateTime,e=lay(i.elem).find("td");l.range&&!i.endState&&lay(i.footer).find(C).addClass(k),r=r&&i.newDate({year:r.year,month:r.month,date:r.date}).getTime(),n=i.endState&&i.endDate&&i.newDate({year:i.endDate.year,month:i.endDate.month,date:i.endDate.date}).getTime(),lay.each(e,function(e,t){var a=lay(t).attr("lay-ymd").split("-"),a=i.newDate({year:a[0],month:a[1]-1,date:a[2]}).getTime();l.rangeLinked&&!i.startDate&&a===i.newDate(i.systemDate()).getTime()&&lay(t).addClass(lay(t).hasClass(y)||lay(t).hasClass(m)?"":"laydate-day-now"),lay(t).removeClass(o+" "+x),a!==r&&a!==n||(i.rangeLinked||!i.rangeLinked&&(e<42?a===r:a===n))&&lay(t).addClass(lay(t).hasClass(y)||lay(t).hasClass(m)?o:x),rn.getDateTime(i.max)&&(n[t]={hours:i.max.hours,minutes:i.max.minutes,seconds:i.max.seconds},lay.extend(l,n[t])))}),a||(n.startDate=lay.extend({},l)),n.endState&&!n.limit({date:n.thisDateTime(1-a)})&&(((r=n.endState&&n.autoCalendarModel.auto?n.autoCalendarModel():r)||n.rangeLinked&&n.endState)&&n.newDate(n.startDate)>n.newDate(n.endDate)&&(e=n.startDate.year===n.endDate.year&&n.startDate.month===n.endDate.month&&n.startDate.date===n.endDate.date,o=n.startDate,n.startDate=lay.extend({},n.endDate,e?{}:n.startTime),i.dateTime=lay.extend({},n.startDate),n.endDate=lay.extend({},o,e?{}:n.endTime),e)&&(o=n.startTime,n.startTime=n.endTime,n.endTime=o),r)&&(i.dateTime=lay.extend({},n.startDate)),n.rangeLinked?(e=lay.extend({},l),!t||a||r||(o=n.getAsYM(l.year,l.month,"sub"),lay.extend(i.dateTime,{year:o[0],month:o[1]})),n.calendar(e,t,r?"init":null)):n.calendar(null,a,r?"init":null),n.endState&&n.done(null,"change")):"static"===i.position?n.calendar().done().done(null,"change"):"date"===i.type?i.autoConfirm?n.setValue(n.parse()).done().remove():n.calendar().done(null,"change"):"datetime"===i.type&&n.calendar().done(null,"change"))},I.prototype.tool=function(t,e){var a=this,n=a.config,i=a.lang(),l=n.dateTime,r="static"===n.position,o={datetime:function(){lay(t).hasClass(k)||(a.list("time",0),n.range&&a.list("time",1),lay(t).attr("lay-type","date").html(a.lang().dateTips))},date:function(){a.closeList(),lay(t).attr("lay-type","datetime").html(a.lang().timeTips)},clear:function(){r&&(lay.extend(l,a.firstDate),a.calendar()),n.range&&(delete n.dateTime,delete a.endDate,delete a.startTime,delete a.endTime),a.setValue(""),a.done(null,"onClear").done(["",{},{}]).remove()},now:function(){var e=new Date;if(lay(t).hasClass(k))return a.hint(i.tools.now+", "+i.invalidDate);lay.extend(l,a.systemDate(),{hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()}),a.setValue(a.parse()),r&&a.calendar(),a.done(null,"onNow").done().remove()},confirm:function(){if(n.range){if(lay(t).hasClass(k))return a.hint("time"===n.type?i.timeout.replace(/\u65e5\u671f/g,"\u65f6\u95f4"):i.timeout)}else if(lay(t).hasClass(k))return a.hint(i.invalidDate);a.setValue(a.parse()),a.done(null,"onConfirm").done().remove()}};o[e]&&o[e]()},I.prototype.change=function(n){var i=this,l=i.config,r=i.thisDateTime(n),o=l.range&&("year"===l.type||"month"===l.type),d=i.elemCont[n||0],s=i.listYM[n],e=function(e){var t=lay(d).find(".laydate-year-list")[0],a=lay(d).find(".laydate-month-list")[0];return t&&(s[0]=e?s[0]-15:s[0]+15,i.list("year",n)),a&&(e?s[0]--:s[0]++,i.list("month",n)),(t||a)&&(lay.extend(r,{year:s[0]}),o&&(r.year=s[0]),l.range||i.done(null,"change"),l.range||i.limit({elem:lay(i.footer).find(C),date:{year:s[0]}})),i.setBtnStatus(),t||a};return{prevYear:function(){e("sub")||(i.rangeLinked?(l.dateTime.year--,i.checkDate("limit").calendar(null,null,"init")):(r.year--,i.checkDate("limit").calendar(null,n),i.autoCalendarModel.auto?i.choose(lay(d).find("td.layui-this"),n):i.done(null,"change")))},prevMonth:function(){i.rangeLinked&&(r=l.dateTime);var e=i.getAsYM(r.year,r.month,"sub");lay.extend(r,{year:e[0],month:e[1]}),i.checkDate("limit").calendar(null,null,"init"),i.rangeLinked||(i.autoCalendarModel.auto?i.choose(lay(d).find("td.layui-this"),n):i.done(null,"change"))},nextMonth:function(){i.rangeLinked&&(r=l.dateTime);var e=i.getAsYM(r.year,r.month);lay.extend(r,{year:e[0],month:e[1]}),i.checkDate("limit").calendar(null,null,"init"),i.rangeLinked||(i.autoCalendarModel.auto?i.choose(lay(d).find("td.layui-this"),n):i.done(null,"change"))},nextYear:function(){e()||(i.rangeLinked?(l.dateTime.year++,i.checkDate("limit").calendar(null,0,"init")):(r.year++,i.checkDate("limit").calendar(null,n),i.autoCalendarModel.auto?i.choose(lay(d).find("td.layui-this"),n):i.done(null,"change")))}}},I.prototype.changeEvent=function(){var i=this;i.config;lay(i.elem).on("click",function(e){lay.stope(e)}).on("mousedown",function(e){lay.stope(e)}),lay.each(i.elemHeader,function(n,e){lay(e[0]).on("click",function(e){i.change(n).prevYear()}),lay(e[1]).on("click",function(e){i.change(n).prevMonth()}),lay(e[2]).find("span").on("click",function(e){var t=lay(this),a=t.attr("lay-ym"),t=t.attr("lay-type");a&&(a=a.split("-"),i.listYM[n]=[0|a[0],0|a[1]],i.list(t,n),lay(i.footer).find("."+L).addClass(k))}),lay(e[3]).on("click",function(e){i.change(n).nextMonth()}),lay(e[4]).on("click",function(e){i.change(n).nextYear()})}),lay.each(i.table,function(e,t){lay(t).find("td").on("click",function(){i.choose(lay(this),e)})}),lay(i.footer).find("span").on("click",function(){var e=lay(this).attr("lay-type");i.tool(this,e)})},I.prototype.isInput=function(e){return/input|textarea/.test(e.tagName.toLocaleLowerCase())||/INPUT|TEXTAREA/.test(e.tagName)},I.prototype.events=function(){var e,t=this,a=t.config;a.elem[0]&&!a.elem[0].eventHandler&&(a.elem.on(a.trigger,e=function(){D.thisId!==a.id&&t.render()}),a.elem[0].eventHandler=!0,a.eventElem.on(a.trigger,e),t.unbind=function(){t.remove(),a.elem.off(a.trigger,e),a.elem.removeAttr("lay-key"),a.elem.removeAttr(d),a.elem[0].eventHandler=!1,a.eventElem.off(a.trigger,e),a.eventElem.removeAttr("lay-key"),delete s.that[a.id]})},s.that={},s.getThis=function(e){var t=s.that[e];return!t&&n&&layui.hint().error(e?a+" instance with ID '"+e+"' not found":"ID argument required"),t},l.run=function(n){n(v).on("mousedown",function(e){var t,a;D.thisId&&(t=s.getThis(D.thisId))&&(a=t.config,e.target===a.elem[0]||e.target===a.eventElem[0]||e.target===n(a.closeStop)[0]||a.elem[0]&&a.elem[0].contains(e.target)||t.remove())}).on("keydown",function(e){var t;D.thisId&&(t=s.getThis(D.thisId))&&"static"!==t.config.position&&13===e.keyCode&&n("#"+t.elemID)[0]&&t.elemID===I.thisElemDate&&(e.preventDefault(),n(t.footer).find(C)[0].click())}),n(i).on("resize",function(){if(D.thisId){var e=s.getThis(D.thisId);if(e)return!(!e.elem||!n(".layui-laydate")[0])&&void e.position()}})},D.render=function(e){e=new I(e);return s.call(e)},D.reload=function(e,t){e=s.getThis(e);if(e)return e.reload(t)},D.getInst=function(e){e=s.getThis(e);if(e)return e.inst},D.hint=function(e,t){e=s.getThis(e);if(e)return e.hint(t)},D.unbind=function(e){e=s.getThis(e);if(e)return e.unbind()},D.close=function(e){e=s.getThis(e||D.thisId);if(e)return e.remove()},D.parse=function(a,n,i){return a=a||{},n=((n="string"==typeof n?s.formatArr(n):n)||[]).concat(),lay.each(n,function(e,t){/yyyy|y/.test(t)?n[e]=lay.digit(a.year,t.length):/MM|M/.test(t)?n[e]=lay.digit(a.month+(i||0),t.length):/dd|d/.test(t)?n[e]=lay.digit(a.date,t.length):/HH|H/.test(t)?n[e]=lay.digit(a.hours,t.length):/mm|m/.test(t)?n[e]=lay.digit(a.minutes,t.length):/ss|s/.test(t)&&(n[e]=lay.digit(a.seconds,t.length))}),n.join("")},D.getEndDate=function(e,t){var a=new Date;return a.setFullYear(t||a.getFullYear(),e||a.getMonth()+1,1),new Date(a.getTime()-864e5).getDate()},n?(D.ready(),layui.define("lay",function(e){D.path=layui.cache.dir,l.run(lay),e(a,D)})):"function"==typeof define&&define.amd?define(function(){return l.run(lay),D}):(D.ready(),l.run(i.lay),i.laydate=D)}(window,window.document);!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e):function(e){if(e.document)return t(e);throw new Error("jQuery requires a window with a document")}:t(e)}("undefined"!=typeof window?window:this,function(T,M){var f=[],g=T.document,c=f.slice,O=f.concat,R=f.push,P=f.indexOf,B={},W=B.toString,m=B.hasOwnProperty,y={},e="1.12.4",C=function(e,t){return new C.fn.init(e,t)},I=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,$=/^-ms-/,z=/-([\da-z])/gi,X=function(e,t){return t.toUpperCase()};function U(e){var t=!!e&&"length"in e&&e.length,n=C.type(e);return"function"!==n&&!C.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+a+")"+a+"*"),ee=new RegExp("="+a+"*([^\\]'\"]*?)"+a+"*\\]","g"),te=new RegExp(G),ne=new RegExp("^"+s+"$"),f={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),TAG:new RegExp("^("+s+"|[*])"),ATTR:new RegExp("^"+J),PSEUDO:new RegExp("^"+G),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+a+"*(even|odd|(([+-]|)(\\d*)n|)"+a+"*(?:([+-]|)"+a+"*(\\d+)|))"+a+"*\\)|)","i"),bool:new RegExp("^(?:"+Y+")$","i"),needsContext:new RegExp("^"+a+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+a+"*((?:-\\d)?\\d*)"+a+"*\\)|)(?=[^-]|$)","i")},re=/^(?:input|select|textarea|button)$/i,ie=/^h\d$/i,c=/^[^{]+\{\s*\[native \w/,oe=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ae=/[+~]/,se=/'|\\/g,d=new RegExp("\\\\([\\da-f]{1,6}"+a+"?|("+a+")|.)","ig"),p=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)},ue=function(){C()};try{D.apply(n=V.call(v.childNodes),v.childNodes),n[v.childNodes.length].nodeType}catch(F){D={apply:n.length?function(e,t){U.apply(e,V.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function H(e,t,n,r){var i,o,a,s,u,l,c,f,d=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!r&&((t?t.ownerDocument||t:v)!==E&&C(t),t=t||E,N)){if(11!==p&&(l=oe.exec(e)))if(i=l[1]){if(9===p){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(d&&(a=d.getElementById(i))&&y(t,a)&&a.id===i)return n.push(a),n}else{if(l[2])return D.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&g.getElementsByClassName&&t.getElementsByClassName)return D.apply(n,t.getElementsByClassName(i)),n}if(g.qsa&&!A[e+" "]&&(!m||!m.test(e))){if(1!==p)d=t,f=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(se,"\\$&"):t.setAttribute("id",s=k),o=(c=w(e)).length,u=ne.test(s)?"#"+s:"[id='"+s+"']";o--;)c[o]=u+" "+_(c[o]);f=c.join(","),d=ae.test(e)&&de(t.parentNode)||t}if(f)try{return D.apply(n,d.querySelectorAll(f)),n}catch(h){}finally{s===k&&t.removeAttribute("id")}}}return P(e.replace(L,"$1"),t,n,r)}function le(){var n=[];function r(e,t){return n.push(e+" ")>b.cacheLength&&delete r[n.shift()],r[e+" "]=t}return r}function q(e){return e[k]=!0,e}function h(e){var t=E.createElement("div");try{return!!e(t)}catch(F){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function ce(e,t){for(var n=e.split("|"),r=n.length;r--;)b.attrHandle[n[r]]=t}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function x(a){return q(function(o){return o=+o,q(function(e,t){for(var n,r=a([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function de(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in g=H.support={},O=H.isXML=function(e){e=e&&(e.ownerDocument||e).documentElement;return!!e&&"HTML"!==e.nodeName},C=H.setDocument=function(e){var e=e?e.ownerDocument||e:v;return e!==E&&9===e.nodeType&&e.documentElement&&(t=(E=e).documentElement,N=!O(E),(e=E.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",ue,!1):e.attachEvent&&e.attachEvent("onunload",ue)),g.attributes=h(function(e){return e.className="i",!e.getAttribute("className")}),g.getElementsByTagName=h(function(e){return e.appendChild(E.createComment("")),!e.getElementsByTagName("*").length}),g.getElementsByClassName=c.test(E.getElementsByClassName),g.getById=h(function(e){return t.appendChild(e).id=k,!E.getElementsByName||!E.getElementsByName(k).length}),g.getById?(b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&N)return(e=t.getElementById(e))?[e]:[]},b.filter.ID=function(e){var t=e.replace(d,p);return function(e){return e.getAttribute("id")===t}}):(delete b.find.ID,b.filter.ID=function(e){var t=e.replace(d,p);return function(e){e="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return e&&e.value===t}}),b.find.TAG=g.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):g.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},b.find.CLASS=g.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&N)return t.getElementsByClassName(e)},r=[],m=[],(g.qsa=c.test(E.querySelectorAll))&&(h(function(e){t.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+a+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+a+"*(?:value|"+Y+")"),e.querySelectorAll("[id~="+k+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||m.push(".#.+[+~]")}),h(function(e){var t=E.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+a+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(g.matchesSelector=c.test(i=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.msMatchesSelector))&&h(function(e){g.disconnectedMatch=i.call(e,"div"),i.call(e,"[s!='']:x"),r.push("!=",G)}),m=m.length&&new RegExp(m.join("|")),r=r.length&&new RegExp(r.join("|")),e=c.test(t.compareDocumentPosition),y=e||c.test(t.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,t=t&&t.parentNode;return e===t||!(!t||1!==t.nodeType||!(n.contains?n.contains(t):e.compareDocumentPosition&&16&e.compareDocumentPosition(t)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},$=e?function(e,t){var n;return e===t?(l=!0,0):(n=!e.compareDocumentPosition-!t.compareDocumentPosition)||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!g.sortDetached&&t.compareDocumentPosition(e)===n?e===E||e.ownerDocument===v&&y(v,e)?-1:t===E||t.ownerDocument===v&&y(v,t)?1:u?j(u,e)-j(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===E?-1:t===E?1:i?-1:o?1:u?j(u,e)-j(u,t):0;if(i===o)return fe(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?fe(a[r],s[r]):a[r]===v?-1:s[r]===v?1:0}),E},H.matches=function(e,t){return H(e,null,null,t)},H.matchesSelector=function(e,t){if((e.ownerDocument||e)!==E&&C(e),t=t.replace(ee,"='$1']"),g.matchesSelector&&N&&!A[t+" "]&&(!r||!r.test(t))&&(!m||!m.test(t)))try{var n=i.call(e,t);if(n||g.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(F){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(d,p),e[3]=(e[3]||e[4]||e[5]||"").replace(d,p),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||H.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&H.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return f.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&te.test(n)&&(t=(t=w(n,!0))&&n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(d,p).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+a+")"+e+"("+a+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(e){e=H.attr(e,t);return null==e?"!="===n:!n||(e+="","="===n?e===r:"!="===n?e!==r:"^="===n?r&&0===e.indexOf(r):"*="===n?r&&-1(?:<\/\1>|)$/,G=/^.[^:#\[\.,]*$/;function K(e,n,r){if(C.isFunction(n))return C.grep(e,function(e,t){return!!n.call(e,t,e)!==r});if(n.nodeType)return C.grep(e,function(e){return e===n!==r});if("string"==typeof n){if(G.test(n))return C.filter(n,e,r);n=C.filter(n,e)}return C.grep(e,function(e){return-1)[^>]*|#([\w-]*))$/,ee=((C.fn.init=function(e,t,n){if(e){if(n=n||Q,"string"!=typeof e)return e.nodeType?(this.context=this[0]=e,this.length=1,this):C.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(C):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),C.makeArray(e,this));if(!(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Z.exec(e))||!r[1]&&t)return(!t||t.jquery?t||n:this.constructor(t)).find(e);if(r[1]){if(t=t instanceof C?t[0]:t,C.merge(this,C.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),J.test(r[1])&&C.isPlainObject(t))for(var r in t)C.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r])}else{if((n=g.getElementById(r[2]))&&n.parentNode){if(n.id!==r[2])return Q.find(e);this.length=1,this[0]=n}this.context=g,this.selector=e}}return this}).prototype=C.fn,Q=C(g),/^(?:parents|prev(?:Until|All))/),te={children:!0,contents:!0,next:!0,prev:!0};function ne(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}C.fn.extend({has:function(e){var t,n=C(e,this),r=n.length;return this.filter(function(){for(t=0;t
    a",y.leadingWhitespace=3===S.firstChild.nodeType,y.tbody=!S.getElementsByTagName("tbody").length,y.htmlSerialize=!!S.getElementsByTagName("link").length,y.html5Clone="<:nav>"!==g.createElement("nav").cloneNode(!0).outerHTML,q.type="checkbox",q.checked=!0,k.appendChild(q),y.appendChecked=q.checked,S.innerHTML="",y.noCloneChecked=!!S.cloneNode(!0).lastChild.defaultValue,k.appendChild(S),(q=g.createElement("input")).setAttribute("type","radio"),q.setAttribute("checked","checked"),q.setAttribute("name","t"),S.appendChild(q),y.checkClone=S.cloneNode(!0).cloneNode(!0).lastChild.checked,y.noCloneEvent=!!S.addEventListener,S[C.expando]=1,y.attributes=!S.getAttribute(C.expando);var x={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:y.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]};function b(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):undefined;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||C.nodeName(r,t)?o.push(r):C.merge(o,b(r,t));return t===undefined||t&&C.nodeName(e,t)?C.merge([e],o):o}function we(e,t){for(var n,r=0;null!=(n=e[r]);r++)C._data(n,"globalEval",!t||C._data(t[r],"globalEval"))}x.optgroup=x.option,x.tbody=x.tfoot=x.colgroup=x.caption=x.thead,x.th=x.td;var Te=/<|&#?\w+;/,Ce=/"!==f[1]||Ce.test(a)?0:u:u.firstChild)&&a.childNodes.length;o--;)C.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(C.merge(h,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=p.lastChild}else h.push(t.createTextNode(a));for(u&&p.removeChild(u),y.appendChecked||C.grep(b(h,"input"),Ee),g=0;a=h[g++];)if(r&&-1]","i"),Pe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Be=/\s*$/g,ze=be(g).appendChild(g.createElement("div"));function Xe(e,t){return C.nodeName(e,"table")&&C.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ue(e){return e.type=(null!==C.find.attr(e,"type"))+"/"+e.type,e}function Ve(e){var t=Ie.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Ye(e,t){if(1===t.nodeType&&C.hasData(e)){var n,r,i,e=C._data(e),o=C._data(t,e),a=e.events;if(a)for(n in delete o.handle,o.events={},a)for(r=0,i=a[n].length;r")},clone:function(e,t,n){var r,i,o,a,s,u=C.contains(e.ownerDocument,e);if(y.html5Clone||C.isXMLDoc(e)||!Re.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(ze.innerHTML=e.outerHTML,ze.removeChild(o=ze.firstChild)),!(y.noCloneEvent&&y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||C.isXMLDoc(e)))for(r=b(o),s=b(e),a=0;null!=(i=s[a]);++a)if(r[a]){f=c=l=p=d=void 0;var l,c,f,d=i,p=r[a];if(1===p.nodeType){if(l=p.nodeName.toLowerCase(),!y.noCloneEvent&&p[C.expando]){for(c in(f=C._data(p)).events)C.removeEvent(p,c,f.handle);p.removeAttribute(C.expando)}"script"===l&&p.text!==d.text?(Ue(p).text=d.text,Ve(p)):"object"===l?(p.parentNode&&(p.outerHTML=d.outerHTML),y.html5Clone&&d.innerHTML&&!C.trim(p.innerHTML)&&(p.innerHTML=d.innerHTML)):"input"===l&&ge.test(d.type)?(p.defaultChecked=p.checked=d.checked,p.value!==d.value&&(p.value=d.value)):"option"===l?p.defaultSelected=p.selected=d.defaultSelected:"input"!==l&&"textarea"!==l||(p.defaultValue=d.defaultValue)}}if(t)if(n)for(s=s||b(e),r=r||b(o),a=0;null!=(i=s[a]);a++)Ye(i,r[a]);else Ye(e,o);return 0<(r=b(o,"script")).length&&we(r,!u&&b(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=C.expando,u=C.cache,l=y.attributes,c=C.event.special;null!=(n=e[a]);a++)if((t||v(n))&&(o=(i=n[s])&&u[i])){if(o.events)for(r in o.events)c[r]?C.event.remove(n,r):C.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=undefined:n.removeAttribute(s),f.push(i))}}}),C.fn.extend({domManip:w,detach:function(e){return Je(this,e,!0)},remove:function(e){return Je(this,e)},text:function(e){return d(this,function(e){return e===undefined?C.text(this):this.empty().append((this[0]&&this[0].ownerDocument||g).createTextNode(e))},null,e,arguments.length)},append:function(){return w(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Xe(this,e).appendChild(e)})},prepend:function(){return w(this,arguments,function(e){var t;1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(t=Xe(this,e)).insertBefore(e,t.firstChild)})},before:function(){return w(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return w(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&C.cleanData(b(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&C.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return C.clone(this,e,t)})},html:function(e){return d(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined)return 1===t.nodeType?t.innerHTML.replace(Oe,""):undefined;if("string"==typeof e&&!Be.test(e)&&(y.htmlSerialize||!Re.test(e))&&(y.leadingWhitespace||!ve.test(e))&&!x[(me.exec(e)||["",""])[1].toLowerCase()]){e=C.htmlPrefilter(e);try{for(;n")).appendTo(t.documentElement))[0].contentWindow||Ge[0].contentDocument).document).write(),t.close(),n=Qe(e,t),Ge.detach()),Ke[e]=n),n}var n,et,tt,nt,rt,it,ot,a,at=/^margin/,st=new RegExp("^("+e+")(?!px)[a-z%]+$","i"),ut=function(e,t,n,r){var i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.apply(e,r||[]),t)e.style[i]=o[i];return r},lt=g.documentElement;function t(){var e,t=g.documentElement;t.appendChild(ot),a.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",n=tt=it=!1,et=rt=!0,T.getComputedStyle&&(e=T.getComputedStyle(a),n="1%"!==(e||{}).top,it="2px"===(e||{}).marginLeft,tt="4px"===(e||{width:"4px"}).width,a.style.marginRight="50%",et="4px"===(e||{marginRight:"4px"}).marginRight,(e=a.appendChild(g.createElement("div"))).style.cssText=a.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",e.style.marginRight=e.style.width="0",a.style.width="1px",rt=!parseFloat((T.getComputedStyle(e)||{}).marginRight),a.removeChild(e)),a.style.display="none",(nt=0===a.getClientRects().length)&&(a.style.display="",a.innerHTML="
    t
    ",a.childNodes[0].style.borderCollapse="separate",(e=a.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",nt=0===e[0].offsetHeight)&&(e[0].style.display="",e[1].style.display="none",nt=0===e[0].offsetHeight),t.removeChild(ot)}ot=g.createElement("div"),(a=g.createElement("div")).style&&(a.style.cssText="float:left;opacity:.5",y.opacity="0.5"===a.style.opacity,y.cssFloat=!!a.style.cssFloat,a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===a.style.backgroundClip,(ot=g.createElement("div")).style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.innerHTML="",ot.appendChild(a),y.boxSizing=""===a.style.boxSizing||""===a.style.MozBoxSizing||""===a.style.WebkitBoxSizing,C.extend(y,{reliableHiddenOffsets:function(){return null==n&&t(),nt},boxSizingReliable:function(){return null==n&&t(),tt},pixelMarginRight:function(){return null==n&&t(),et},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),rt},reliableMarginLeft:function(){return null==n&&t(),it}}));var l,p,ct=/^(top|right|bottom|left)$/;function ft(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}T.getComputedStyle?(l=function(e){var t=e.ownerDocument.defaultView;return(t=t&&t.opener?t:T).getComputedStyle(e)},p=function(e,t,n){var r,i,o=e.style;return""!==(i=(n=n||l(e))?n.getPropertyValue(t)||n[t]:undefined)&&i!==undefined||C.contains(e.ownerDocument,e)||(i=C.style(e,t)),n&&!y.pixelMarginRight()&&st.test(i)&&at.test(t)&&(e=o.width,t=o.minWidth,r=o.maxWidth,o.minWidth=o.maxWidth=o.width=i,i=n.width,o.width=e,o.minWidth=t,o.maxWidth=r),i===undefined?i:i+""}):lt.currentStyle&&(l=function(e){return e.currentStyle},p=function(e,t,n){var r,i,o,a=e.style;return null==(n=(n=n||l(e))?n[t]:undefined)&&a&&a[t]&&(n=a[t]),st.test(n)&&!ct.test(t)&&(r=a.left,(o=(i=e.runtimeStyle)&&i.left)&&(i.left=e.currentStyle.left),a.left="fontSize"===t?"1em":n,n=a.pixelLeft+"px",a.left=r,o)&&(i.left=o),n===undefined?n:n+""||"auto"});var dt=/alpha\([^)]*\)/i,pt=/opacity\s*=\s*([^)]*)/i,ht=/^(none|table(?!-c[ea]).+)/,gt=new RegExp("^("+e+")(.*)$","i"),mt={position:"absolute",visibility:"hidden",display:"block"},yt={letterSpacing:"0",fontWeight:"400"},vt=["Webkit","O","Moz","ms"],xt=g.createElement("div").style;function bt(e){if(e in xt)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=vt.length;n--;)if((e=vt[n]+t)in xt)return e}function wt(e,t){for(var n,r,i,o=[],a=0,s=e.length;a
    a",F=q.getElementsByTagName("a")[0],k.setAttribute("type","checkbox"),q.appendChild(k),(F=q.getElementsByTagName("a")[0]).style.cssText="top:1px",y.getSetAttribute="t"!==q.className,y.style=/top/.test(F.getAttribute("style")),y.hrefNormalized="/a"===F.getAttribute("href"),y.checkOn=!!k.value,y.optSelected=e.selected,y.enctype=!!g.createElement("form").enctype,S.disabled=!0,y.optDisabled=!e.disabled,(k=g.createElement("input")).setAttribute("value",""),y.input=""===k.getAttribute("value"),k.value="t",k.setAttribute("type","radio"),y.radioValue="t"===k.value;var Lt=/\r/g,Ht=/[\x20\t\r\n\f]+/g;C.fn.extend({val:function(t){var n,e,r,i=this[0];return arguments.length?(r=C.isFunction(t),this.each(function(e){1!==this.nodeType||(null==(e=r?t.call(this,e,C(this).val()):t)?e="":"number"==typeof e?e+="":C.isArray(e)&&(e=C.map(e,function(e){return null==e?"":e+""})),(n=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in n&&n.set(this,e,"value")!==undefined)||(this.value=e)})):i?(n=C.valHooks[i.type]||C.valHooks[i.nodeName.toLowerCase()])&&"get"in n&&(e=n.get(i,"value"))!==undefined?e:"string"==typeof(e=i.value)?e.replace(Lt,""):null==e?"":e:void 0}}),C.extend({valHooks:{option:{get:function(e){var t=C.find.attr(e,"value");return null!=t?t:C.trim(C.text(e)).replace(Ht," ")}},select:{get:function(e){for(var t,n=e.options,r=e.selectedIndex,i="select-one"===e.type||r<0,o=i?null:[],a=i?r+1:n.length,s=r<0?a:i?r:0;s").append(C.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this)},C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){C.fn[t]=function(e){return this.on(t,e)}}),C.expr.filters.animated=function(t){return C.grep(C.timers,function(e){return t===e.elem}).length},C.offset={setOffset:function(e,t,n){var r,i,o,a,s=C.css(e,"position"),u=C(e),l={};"static"===s&&(e.style.position="relative"),o=u.offset(),r=C.css(e,"top"),a=C.css(e,"left"),s=("absolute"===s||"fixed"===s)&&-1'+(s?a.title[0]:a.title)+"":"";return a.zIndex=o,t([a.shade?'
    ':"",'
    '+(e&&2!=a.type?"":s)+"'+(n=["layui-icon-tips","layui-icon-success","layui-icon-error","layui-icon-question","layui-icon-lock","layui-icon-face-cry","layui-icon-face-smile"],o="layui-anim layui-anim-rotate layui-anim-loop",0==a.type&&-1!==a.icon?'':3==a.type?(i=["layui-icon-loading","layui-icon-loading-1"],2==a.icon?'
    ':''):"")+((1!=a.type||!e)&&a.content||"")+'
    '+(n=[],l&&(n.push(''),n.push('')),a.closeBtn&&n.push(''),n.join(""))+"
    "+(a.btn?function(){var e="";"string"==typeof a.btn&&(a.btn=[a.btn]);for(var t,i=0,n=a.btn.length;i'+a.btn[i]+"";return'
    '+e+"
    "}():"")+(a.resize?'':"")+""],s,m('
    ')),this},t.pt.creat=function(){var e,t,i,n,a,o=this,s=o.config,l=o.index,r="object"==typeof(f=s.content),c=m("body");if(s.id&&m("."+y[0]).find("#"+s.id)[0])e=m("#"+s.id).closest("."+y[0]),t=e.attr("times"),i=e.data("config"),n=m("#"+y.SHADE+t),"min"===(e.data("maxminStatus")||{})?h.restore(t):i.hideOnClose&&(n.show(),e.show());else{switch(s.removeFocus&&document.activeElement.blur(),"string"==typeof s.area&&(s.area="auto"===s.area?["",""]:[s.area,""]),s.shift&&(s.anim=s.shift),6==h.ie&&(s.fixed=!1),s.type){case 0:s.btn="btn"in s?s.btn:u.btn[0],h.closeAll("dialog");break;case 2:var f=s.content=r?s.content:[s.content||"","auto"];s.content='';break;case 3:delete s.title,delete s.closeBtn,-1===s.icon&&s.icon,h.closeAll("loading");break;case 4:r||(s.content=[s.content,"body"]),s.follow=s.content[1],s.content=s.content[0]+'',delete s.title,s.tips="object"==typeof s.tips?s.tips:[s.tips,!0],s.tipsMore||h.closeAll("tips")}o.vessel(r,function(e,t,i){c.append(e[0]),r?2==s.type||4==s.type?m("body").append(e[1]):f.parents("."+y[0])[0]||(f.data("display",f.css("display")).show().addClass("layui-layer-wrap").wrap(e[1]),m("#"+y[0]+l).find("."+y[5]).before(t)):c.append(e[1]),m("#"+y.MOVE)[0]||c.append(u.moveElem=i),o.layero=m("#"+y[0]+l),o.shadeo=m("#"+y.SHADE+l),s.scrollbar||u.setScrollbar(l)}).auto(l),o.shadeo.css({"background-color":s.shade[1]||"#000",opacity:s.shade[0]||s.shade}),2==s.type&&6==h.ie&&o.layero.find("iframe").attr("src",f[0]),4==s.type?o.tips():(o.offset(),parseInt(u.getStyle(document.getElementById(y.MOVE),"z-index"))||(o.layero.css("visibility","hidden"),h.ready(function(){o.offset(),o.layero.css("visibility","visible")}))),!s.fixed||u.events.resize[o.index]||(u.events.resize[o.index]=function(){o.resize()},d.on("resize",u.events.resize[o.index])),s.time<=0||setTimeout(function(){h.close(o.index)},s.time),o.move().callback(),y.anim[s.anim]&&(a="layer-anim "+y.anim[s.anim],o.layero.addClass(a).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){m(this).removeClass(a)})),o.layero.data("config",s)}},t.pt.resize=function(){var e=this,t=e.config;e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(e.index),4==t.type&&e.tips()},t.pt.auto=function(e){var t=this.config,i=m("#"+y[0]+e),n=(""===t.area[0]&&0t.maxWidth)&&i.width(t.maxWidth),[i.innerWidth(),i.innerHeight()]),a=i.find(y[1]).outerHeight()||0,o=i.find("."+y[6]).outerHeight()||0,e=function(e){(e=i.find(e)).height(n[1]-a-o-2*(0|parseFloat(e.css("padding-top"))))};return 2===t.type?e("iframe"):""===t.area[1]?0t.maxHeight?(n[1]=t.maxHeight,e("."+y[5])):t.fixed&&n[1]>=d.height()&&(n[1]=d.height(),e("."+y[5])):e("."+y[5]),this},t.pt.offset=function(){var e=this,t=e.config,i=e.layero,n=[i.outerWidth(),i.outerHeight()],a="object"==typeof t.offset;e.offsetTop=(d.height()-n[1])/2,e.offsetLeft=(d.width()-n[0])/2,a?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=d.width()-n[0]:"b"===t.offset?e.offsetTop=d.height()-n[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=d.height()-n[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=d.width()-n[0]):"rb"===t.offset?(e.offsetTop=d.height()-n[1],e.offsetLeft=d.width()-n[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?d.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?d.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=d.scrollTop(),e.offsetLeft+=d.scrollLeft()),"min"===i.data("maxminStatus")&&(e.offsetTop=d.height()-(i.find(y[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},t.pt.tips=function(){var e=this.config,t=this.layero,i=[t.outerWidth(),t.outerHeight()],n=m(e.follow),a={width:(n=n[0]?n:m("body")).outerWidth(),height:n.outerHeight(),top:n.offset().top,left:n.offset().left},o=t.find(".layui-layer-TipsG"),n=e.tips[0];e.tips[1]||o.remove(),a.autoLeft=function(){0d.width()&&(o=d.width()-180-(u.minStackArr.edgeIndex=u.minStackArr.edgeIndex||0,u.minStackArr.edgeIndex+=3))<0&&(o=0),t.minStack&&(l.left=o,l.top=d.height()-n,a||u.minStackIndex++,r.attr("minLeft",o)),r.attr("position",s),h.style(e,l,!0),i.hide(),"page"===r.attr("type")&&r.find(y[4]).hide(),u.restScrollbar(e),c.hide())},h.restore=function(e){var t=m("#"+y[0]+e),i=m("#"+y.SHADE+e),n=t.attr("area").split(","),a=t.attr("type"),o=t.data("config")||{};t.removeData("maxminStatus"),h.style(e,{width:n[0],height:n[1],top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===a&&t.find(y[4]).show(),o.scrollbar?u.restScrollbar(e):u.setScrollbar(e),i.show()},h.full=function(t){var i=m("#"+y[0]+t),e=i.data("maxminStatus");"max"!==e&&("min"===e&&h.restore(t),i.data("maxminStatus","max"),u.record(i),y.html.attr("layer-full")||u.setScrollbar(t),setTimeout(function(){var e="fixed"===i.css("position");h.style(t,{top:e?0:d.scrollTop(),left:e?0:d.scrollLeft(),width:"100%",height:"100%"},!0),i.find(".layui-layer-min").hide()},100))},h.title=function(e,t){m("#"+y[0]+(t||h.index)).find(y[1]).html(e)},h.close=function(o,s){var l,e,r=(t=m("."+y[0]).children("#"+o).closest("."+y[0]))[0]?(o=t.attr("times"),t):m("#"+y[0]+o),c=r.attr("type"),t=r.data("config")||{},f=t.id&&t.hideOnClose;r[0]&&(l={slideDown:"layer-anim-slide-down-out",slideLeft:"layer-anim-slide-left-out",slideUp:"layer-anim-slide-up-out",slideRight:"layer-anim-slide-right-out"}[t.anim]||"layer-anim-close",e=function(){var e="layui-layer-wrap";if(f)return r.removeClass("layer-anim "+l),r.hide();if(c===u.type[1]&&"object"===r.attr("conType")){r.children(":not(."+y[5]+")").remove();for(var t=r.find("."+e),i=0;i<2;i++)t.unwrap();t.css("display",t.data("display")).removeClass(e)}else{if(c===u.type[2])try{var n=m("#"+y[4]+o)[0];n.contentWindow.document.write(""),n.contentWindow.close(),r.find("."+y[5])[0].removeChild(n)}catch(a){}r[0].innerHTML="",r.remove()}"function"==typeof u.end[o]&&u.end[o](),delete u.end[o],"function"==typeof s&&s(),u.events.resize[o]&&(d.off("resize",u.events.resize[o]),delete u.events.resize[o])},m("#"+y.SHADE+o)[f?"hide":"remove"](),t.isOutAnim&&r.addClass("layer-anim "+l),6==h.ie&&u.reselect(),u.restScrollbar(o),"string"==typeof r.attr("minLeft")&&(u.minStackIndex--,u.minStackArr.push(r.attr("minLeft"))),h.ie&&h.ie<10||!t.isOutAnim?e():setTimeout(function(){e()},200))},h.closeAll=function(n,a){"function"==typeof n&&(a=n,n=null);var o=m("."+y[0]);m.each(o,function(e){var t=m(this),i=n?t.attr("type")===n:1;i&&h.close(t.attr("times"),e===o.length-1?a:null)}),0===o.length&&"function"==typeof a&&a()},h.closeLast=function(e){h.close(m(".layui-layer-"+(e=e||"page")+":last").attr("times"))},h.cache||{}),g=function(e){return i.skin?" "+i.skin+" "+i.skin+"-"+e:""};h.prompt=function(i,n){var e="",t="";"function"==typeof(i=i||{})&&(n=i),i.area&&(e='style="width: '+(o=i.area)[0]+"; height: "+o[1]+';"',delete i.area),i.placeholder&&(t=' placeholder="'+i.placeholder+'"');var a,o=2==i.formType?'":'",s=i.success;return delete i.success,h.open(m.extend({type:1,btn:["确定","取消"],content:o,skin:"layui-layer-prompt"+g("prompt"),maxWidth:d.width(),success:function(e){(a=e.find(".layui-layer-input")).val(i.value||"").focus(),"function"==typeof s&&s(e)},resize:!1,yes:function(e){var t=a.val();t.length>(i.maxlength||500)?h.tips("最多输入"+(i.maxlength||500)+"个字数",a,{tips:1}):n&&n(t,e,a)}},i))},h.tab=function(n){var a=(n=n||{}).tab||{},o="layui-this",s=n.success;return delete n.success,h.open(m.extend({type:1,skin:"layui-layer-tab"+g("tab"),resize:!1,title:function(){var e=a.length,t=1,i="";if(0'+a[0].title+"";t"+a[t].title+"";return i}(),content:'
      '+function(){var e=a.length,t=1,i="";if(0'+(a[0].content||"no content")+"";t'+(a[t].content||"no content")+"";return i}()+"
    ",success:function(e){var t=e.find(".layui-layer-title").children(),i=e.find(".layui-layer-tabmain").children();t.on("mousedown",function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0;var e=m(this),t=e.index();e.addClass(o).siblings().removeClass(o),i.eq(t).show().siblings().hide(),"function"==typeof n.change&&n.change(t)}),"function"==typeof s&&s(e)}},n))},h.photos=function(n,e,a){var o={};if((n=m.extend(!0,{toolbar:!0,footer:!0},n)).photos){var t=!("string"==typeof n.photos||n.photos instanceof m),i=t?n.photos:{},s=i.data||[],l=i.start||0,r=n.success;if(o.imgIndex=1+(0|l),n.img=n.img||"img",delete n.success,t){if(0===s.length)return h.msg("没有图片")}else{var c=m(n.photos),f=function(){s=[],c.find(n.img).each(function(e){var t=m(this);t.attr("layer-index",e),s.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("lay-src")||t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(f(),0===s.length)return;if(e||c.on("click",n.img,function(){f();var e=m(this).attr("layer-index");h.photos(m.extend(n,{photos:{start:e,data:s,tab:n.tab},full:n.full}),!0)}),!e)return}o.imgprev=function(e){o.imgIndex--,o.imgIndex<1&&(o.imgIndex=s.length),o.tabimg(e)},o.imgnext=function(e,t){o.imgIndex++,o.imgIndex>s.length&&(o.imgIndex=1,t)||o.tabimg(e)},o.keyup=function(e){var t;o.end||(t=e.keyCode,e.preventDefault(),37===t?o.imgprev(!0):39===t?o.imgnext(!0):27===t&&h.close(o.index))},o.tabimg=function(e){if(!(s.length<=1))return i.start=o.imgIndex-1,h.close(o.index),h.photos(n,!0,e)},o.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},o.image={},o.getTransform=function(e){var t=[],i=e.rotate,n=e.scaleX,e=e.scale;return o.isNumber(i)&&0!==i&&t.push("rotate("+i+"deg)"),o.isNumber(n)&&1!==n&&t.push("scaleX("+n+")"),o.isNumber(e)&&t.push("scale("+e+")"),t.length?t.join(" "):"none"},o.event=function(e,i,n){o.main.find(".layui-layer-photos-prev").on("click",function(e){e.preventDefault(),o.imgprev(!0)}),o.main.find(".layui-layer-photos-next").on("click",function(e){e.preventDefault(),o.imgnext(!0)}),m(document).on("keyup",o.keyup),e.off("click").on("click","*[toolbar-event]",function(){var e=m(this);switch(e.attr("toolbar-event")){case"rotate":o.image.rotate=((o.image.rotate||0)+Number(e.attr("data-option")))%360,o.imgElem.css({transform:o.getTransform(o.image)});break;case"scalex":o.image.scaleX=-1===o.image.scaleX?1:-1,o.imgElem.css({transform:o.getTransform(o.image)});break;case"zoom":var t=Number(e.attr("data-option"));o.image.scale=(o.image.scale||1)+t,t<0&&o.image.scale<0-t&&(o.image.scale=0-t),o.imgElem.css({transform:o.getTransform(o.image)});break;case"reset":o.image.scaleX=1,o.image.scale=1,o.image.rotate=0,o.imgElem.css({transform:"none"});break;case"close":h.close(i)}n.offset(),n.auto(i)}),o.main.children("img").on("mousewheel DOMMouseScroll",function(e){var e=e.originalEvent.wheelDelta||-e.originalEvent.detail,t=o.main.find('[toolbar-event="zoom"]');(0'+i+''+(t=['
    '],1','','',"
    "].join("")),n.toolbar&&t.push(['
    ','','','','','','',"
    "].join("")),n.footer&&t.push(['"].join("")),t.push(""),t.join(""))+"",success:function(e,t,i){o.main=e.find(".layer-layer-photos-main"),o.footer=e.find(".layui-layer-photos-footer"),o.imgElem=o.main.children("img"),o.event(e,t,i),n.tab&&n.tab(s[l],e),"function"==typeof r&&r(e)},end:function(){o.end=!0,m(document).off("keyup",o.keyup)}},n))},u=function(){h.close(o.loadi),h.msg("当前图片地址异常
    是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){1").addClass(r));layui.each(i.bars,function(t,e){var n=s('
  • ');n.addClass(e.icon).attr({"lay-type":e.type,style:e.style||(i.bgcolor?"background-color: "+i.bgcolor:"")}).html(e.content),n.on("click",function(){var t=s(this).attr("lay-type");"top"===t&&("body"===i.target?s("html,body"):u).animate({scrollTop:0},i.duration),"function"==typeof i.click&&i.click.call(this,t)}),"object"===layui.type(i.on)&&layui.each(i.on,function(t,e){n.on(t,function(){var t=s(this).attr("lay-type");"function"==typeof e&&e.call(this,t)})}),"top"===e.type&&(n.addClass("layui-fixbar-top"),o=n),l.append(n)}),c.find("."+r).remove(),"object"==typeof i.css&&l.css(i.css),c.append(l),o&&(e=function e(){return u.scrollTop()>=i.margin?t||(o.show(),t=1):t&&(o.hide(),t=0),e}()),u.on("scroll",function(){e&&(clearTimeout(n),n=setTimeout(function(){e()},100))})},countdown:function(i){i=s.extend(!0,{date:new Date,now:new Date},i);var o=arguments,r=(1]|&(?=#[a-zA-Z0-9]+)/g.test(t+="")?t.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,"""):t},unescape:function(t){return t!==undefined&&null!==t||(t=""),(t+="").replace(/\&/g,"&").replace(/\</g,"<").replace(/\>/g,">").replace(/\'/g,"'").replace(/\"/g,'"')},openWin:function(t){var e=(t=t||{}).window||window.open(t.url||"",t.target,t.specs);t.url||(e.document.open("text/html","replace"),e.document.write(t.content||""),e.document.close())},toVisibleArea:function(t){var e,n,i,o,r,a,c,u;(t=s.extend({margin:160,duration:200,type:"y"},t)).scrollElem[0]&&t.thisElem[0]&&(e=t.scrollElem,c=t.thisElem,i=(r="y"===t.type)?"top":"left",o=e[n=r?"scrollTop":"scrollLeft"](),r=e[r?"height":"width"](),a=e.offset()[i],u={},(c=c.offset()[i]-a)>r-t.margin||c."+v,E=function(e){var i=this;i.index=++f.index,i.config=c.extend({},i.config,f.config,e),i.init()};E.prototype.config={trigger:"click",content:"",className:"",style:"",show:!1,isAllowSpread:!0,isSpreadItem:!0,data:[],delay:300,shade:0,accordion:!1},E.prototype.reload=function(e,i){var t=this;t.config=c.extend({},t.config,e),t.init(!0,i)},E.prototype.init=function(e,i){var t,n=this,a=n.config,l=c(a.elem);return 1');return 0No data
  • '),e},u=function(r,e){return layui.each(e,function(e,i){var t,n=i[s.children]&&0",(t="href"in i?''+l+"":l,n?'
    '+t+("parent"===o?'':"group"===o&&d.isAllowSpread?'':"")+"
    ":'
    '+t+"
    "),""].join(""))).data("item",i),n&&(a=c('
    '),t=c("
      "),"parent"===o?(a.append(u(t,i[s.children])),l.append(a)):l.append(u(t,i[s.children]))),r.append(l))}),r},a=['
      ',"
      "].join("");!(e="contextmenu"!==d.trigger&&!lay.isTopElem(d.elem[0])?e:!0)&&d.elem.data(y+"_opened")||(l.elemView=c("."+g+'[lay-id="'+d.id+'"]'),"reloadData"===i&&l.elemView.length?l.elemView.html(d.content||n()):(l.elemView=c(a),l.elemView.append(d.content||n()),d.className&&l.elemView.addClass(d.className),d.style&&l.elemView.attr("style",d.style),f.thisId=d.id,l.remove(),t.append(l.elemView),d.elem.data(y+"_opened",!0),e=d.shade?'
      ':"",l.elemView.before(e),"mouseenter"===d.trigger&&l.elemView.on("mouseenter",function(){clearTimeout(h.timer)}).on("mouseleave",function(){l.delayRemove()})),l.position(),(h.prevElem=l.elemView).data("prevElem",d.elem),l.elemView.find(".layui-menu").on(o,function(e){layui.stope(e)}),l.elemView.find(".layui-menu li").on("click",function(e){var i=c(this),t=i.data("item")||{},n=t[s.children]&&0n.width()&&(t.addClass(x),(i=t[0].getBoundingClientRect()).left<0)&&t.removeClass(x),i.bottom>n.height())&&t.eq(0).css("margin-top",-(i.bottom-n.height()+5))}).on("mouseleave",t,function(e){var i=c(this).children("."+C);i.removeClass(x),i.css("margin-top",0)}),f.close=function(e){e=h.getThis(e);return e?(e.remove(),h.call(e)):this},f.reload=function(e,i,t){e=h.getThis(e);return e?(e.reload(i,t),h.call(e)):this},f.reloadData=function(){var t=c.extend([],arguments),n=(t[2]="reloadData",new RegExp("^("+["data","templet","content"].join("|")+")$"));return layui.each(t[1],function(e,i){n.test(e)||delete t[1][e]}),f.reload.apply(null,t)},f.render=function(e){e=new E(e);return h.call(e)},e(r,f)});layui.define(["jquery","lay"],function(e){"use strict";var g=layui.$,c=layui.lay,m={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var i=this;return i.config=g.extend({},i.config,e),i},on:function(e,i){return layui.onevent.call(this,t,e,i)}},t="slider",v="layui-disabled",x="layui-slider-bar",b="layui-slider-wrap",T="layui-slider-wrap-btn",w="layui-slider-tips",M="layui-slider-input-txt",L="layui-slider-hover",i=function(e){var i=this;i.index=++m.index,i.config=g.extend({},i.config,m.config,e),i.render()};i.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#16baaa"},i.prototype.render=function(){var a=this,n=a.config,e=g(n.elem);if(1n.max&&(n.value=n.max),t=Math.floor((n.value-n.min)/(n.max-n.min)*100)+"%");var l,e=n.disabled?"#c2c2c2":n.theme,i='
      '+(n.tips?'
      ':"")+'
      '+(n.range?'
      ':"")+"
      ",t=g(n.elem),s=t.next(".layui-slider");if(s[0]&&s.remove(),a.elemTemp=g(i),n.range?(a.elemTemp.find("."+b).eq(0).data("value",n.value[0]),a.elemTemp.find("."+b).eq(1).data("value",n.value[1])):a.elemTemp.find("."+b).data("value",n.value),t.html(a.elemTemp),"vertical"===n.type&&a.elemTemp.height(n.height+"px"),n.showstep){for(var o=(n.max-n.min)/n.step,r="",d=1;d<1+o;d++){var u=100*d/o;u<100&&(r+='
      ')}a.elemTemp.append(r)}n.input&&!n.range&&(e=g('
      '),t.css("position","relative"),t.append(e),t.find("."+M).children("input").val(n.value),"vertical"===n.type?e.css({left:0,top:-48}):a.elemTemp.css("margin-right",e.outerWidth()+15)),n.disabled?(a.elemTemp.addClass(v),a.elemTemp.find("."+T).addClass(v)):a.slide(),a.elemTemp.find("."+T).on("mouseover",function(){var e="vertical"===n.type?n.height:a.elemTemp[0].offsetWidth,i=a.elemTemp.find("."+b),t=("vertical"===n.type?e-g(this).parent()[0].offsetTop-i.height():g(this).parent()[0].offsetLeft)/e*100,i=g(this).parent().data("value"),e=n.setTips?n.setTips(i):i;a.elemTemp.find("."+w).html(e),clearTimeout(l),l=setTimeout(function(){"vertical"===n.type?a.elemTemp.find("."+w).css({bottom:t+"%","margin-bottom":"20px",display:"inline-block"}):a.elemTemp.find("."+w).css({left:t+"%",display:"inline-block"})},300)}).on("mouseout",function(){clearTimeout(l),a.elemTemp.find("."+w).css("display","none")})},i.prototype.slide=function(e,i,t){var o=this,r=o.config,d=o.elemTemp,u=function(){return"vertical"===r.type?r.height:d[0].offsetWidth},c=d.find("."+b),m=d.next(".layui-slider-input"),v=m.children("."+M).children("input").val(),p=100/((r.max-r.min)/Math.ceil(r.step)),f=function(e,i,t){e=(e=100<(e=100a[1]&&a.reverse(),o.value=r.range?a:l,r.change&&r.change(o.value),"done"===t&&r.done&&r.done(o.value)},h=function(e){var i=e/u()*100/p,t=Math.round(i)*p;return t=e==u()?Math.ceil(i)*p:t},y=g(['
      u()?u():i)/u()*100/p;f(i,l),s.addClass(L),d.find("."+w).show(),e.preventDefault()},i=function(){s.removeClass(L),d.find("."+w).hide()},t=function(){i&&i(),y.remove(),r.done&&r.done(o.value)},g("#LAY-slider-moving")[0]||g("body").append(y),y.on("mousemove",e),y.on("mouseup",t).on("mouseleave",t)})}),d.on("click",function(e){var i=g("."+T),t=g(this);!i.is(event.target)&&0===i.has(event.target).length&&i.length&&(t=(i=(i=(i="vertical"===r.type?u()-e.clientY+t.offset().top-g(window).scrollTop():e.clientX-t.offset().left-g(window).scrollLeft())<0?0:i)>u()?u():i)/u()*100/p,i=r.range?"vertical"===r.type?Math.abs(i-parseInt(g(c[0]).css("bottom")))>Math.abs(i-parseInt(g(c[1]).css("bottom")))?1:0:Math.abs(i-c[0].offsetLeft)>Math.abs(i-c[1].offsetLeft)?1:0:0,f(t,i,"done"),e.preventDefault())}),m.children(".layui-slider-input-btn").children("i").each(function(i){g(this).on("click",function(){v=m.children("."+M).children("input").val();var e=((v=1==i?v-r.stepr.max?r.max:Number(v)+r.step)-r.min)/(r.max-r.min)*100/p;f(e,0,"done")})});var a=function(){var e=this.value,e=(e=(e=(e=isNaN(e)?0:e)r.max?r.max:e,((this.value=e)-r.min)/(r.max-r.min)*100/p);f(e,0,"done")};m.children("."+M).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),a.call(this))}).on("change",a)},i.prototype.events=function(){this.config},m.render=function(e){e=new i(e);return function(){var t=this,a=t.config;return{setValue:function(e,i){return e=(e=e>a.max?a.max:e)',"",'','',"","","
      "].join("")),r=i.elem=m(i.elem);i.size&&o.addClass("layui-colorpicker-"+i.size),r.addClass("layui-inline").html(e.elemColorBox=o),i.id="id"in i?i.id:r.attr("id")||e.index,e.color=e.elemColorBox.find("."+C)[0].style.background,e.events()},d.prototype.renderPicker=function(){var o,e=this,i=e.config,r=e.elemColorBox[0],t=e.elemPicker=m(['
      ','
      ','
      ','
      ','
      ','
      ',"
      ",'
      ','
      ',"
      ","
      ",'
      ','
      ','
      ',"
      ","
      ",i.predefine?(o=['
      '],layui.each(i.colors,function(e,i){o.push(['
      ','
      ',"
      "].join(""))}),o.push("
      "),o.join("")):"",'
      ','
      ','',"
      ",'
      ','','',"","
      "].join(""));e.elemColorBox.find("."+C)[0];m(a)[0]&&m(a).data("index")==e.index?e.removePicker(d.thisElemInd):(e.removePicker(d.thisElemInd),m("body").append(t)),n.thisId=i.id,d.thisElemInd=e.index,d.thisColor=r.style.background,e.position(),e.pickerEvents()},d.prototype.removePicker=function(e){var i=this.config,e=m("#layui-colorpicker"+(e||this.index));return e[0]&&(e.remove(),delete n.thisId,"function"==typeof i.close)&&i.close(this.color),this},d.prototype.position=function(){var e=this,i=e.config;return t.position(e.bindElem||e.elemColorBox[0],e.elemPicker[0],{position:i.position,align:"center"}),e},d.prototype.val=function(){var e,i=this,o=(i.config,i.elemColorBox.find("."+C)),r=i.elemPicker.find("."+M),t=o[0].style.backgroundColor;t?(e=Y(L(t)),o=o.attr("lay-type"),i.select(e.h,e.s,e.b),"torgb"===o?r.find("input").val(t):"rgba"===o?(o=L(t),3===(t.match(/[0-9]{1,3}/g)||[]).length?(r.find("input").val("rgba("+o.r+", "+o.g+", "+o.b+", 1)"),i.elemPicker.find("."+T).css("left",280)):(r.find("input").val(t),t=280*t.slice(t.lastIndexOf(",")+1,t.length-1),i.elemPicker.find("."+T).css("left",t)),i.elemPicker.find("."+D)[0].style.background="linear-gradient(to right, rgba("+o.r+", "+o.g+", "+o.b+", 0), rgb("+o.r+", "+o.g+", "+o.b+"))"):r.find("input").val("#"+F(e))):(i.select(0,100,100),r.find("input").val(""),i.elemPicker.find("."+D)[0].style.background="",i.elemPicker.find("."+T).css("left",280))},d.prototype.side=function(){var n=this,l=n.config,c=n.elemColorBox.find("."+C),a=c.attr("lay-type"),s=n.elemPicker.find(".layui-colorpicker-side"),e=n.elemPicker.find("."+B),d=n.elemPicker.find("."+I),r=n.elemPicker.find("."+E),f=n.elemPicker.find("."+D),u=n.elemPicker.find("."+T),g=e[0].offsetTop/180*360,p=100-(r[0].offsetTop+3)/180*100,h=(r[0].offsetLeft+3)/260*100,v=Math.round(u[0].offsetLeft/280*100)/100,b=n.elemColorBox.find("."+w),i=n.elemPicker.find(".layui-colorpicker-pre").children("div"),y=function(e,i,o,r){n.select(e,i,o);var t=j({h:e,s:i,b:o}),e=F({h:e,s:i,b:o}),i=n.elemPicker.find("."+M).find("input");b.addClass(x).removeClass(P),c[0].style.background="rgb("+t.r+", "+t.g+", "+t.b+")","torgb"===a?i.val("rgb("+t.r+", "+t.g+", "+t.b+")"):"rgba"===a?(u.css("left",280*r),i.val("rgba("+t.r+", "+t.g+", "+t.b+", "+r+")"),c[0].style.background="rgba("+t.r+", "+t.g+", "+t.b+", "+r+")",f[0].style.background="linear-gradient(to right, rgba("+t.r+", "+t.g+", "+t.b+", 0), rgb("+t.r+", "+t.g+", "+t.b+"))"):i.val("#"+e),l.change&&l.change(n.elemPicker.find("."+M).find("input").val())},o=m(['
      '].join("")),k=function(e){m("#LAY-colorpicker-moving")[0]||m("body").append(o),o.on("mousemove",e),o.on("mouseup",function(){o.remove()}).on("mouseleave",function(){o.remove()})};e.on("mousedown",function(e){var r=this.offsetTop,t=e.clientY;k(function(e){var i=r+(e.clientY-t),o=s[0].offsetHeight,o=(i=o<(i=i<0?0:i)?o:i)/180*360;y(g=o,h,p,v),e.preventDefault()}),e.preventDefault()}),s.on("click",function(e){var i=e.clientY-m(this).offset().top+H.scrollTop(),i=(i=(i=i<0?0:i)>this.offsetHeight?this.offsetHeight:i)/180*360;y(g=i,h,p,v),e.preventDefault()}),r.on("mousedown",function(e){var n=this.offsetTop,l=this.offsetLeft,c=e.clientY,a=e.clientX;layui.stope(e),k(function(e){var i=n+(e.clientY-c),o=l+(e.clientX-a),r=d[0].offsetHeight-3,t=d[0].offsetWidth-3,t=((o=t<(o=o<-3?-3:o)?t:o)+3)/260*100,o=100-((i=r<(i=i<-3?-3:i)?r:i)+3)/180*100;y(g,h=t,p=o,v),e.preventDefault()}),e.preventDefault()}),d.on("mousedown",function(e){var i=e.clientY-m(this).offset().top-3+H.scrollTop(),o=e.clientX-m(this).offset().left-3+H.scrollLeft(),o=((i=i<-3?-3:i)>this.offsetHeight-3&&(i=this.offsetHeight-3),((o=(o=o<-3?-3:o)>this.offsetWidth-3?this.offsetWidth-3:o)+3)/260*100),i=100-(i+3)/180*100;y(g,h=o,p=i,v),layui.stope(e),e.preventDefault(),r.trigger(e,"mousedown")}),u.on("mousedown",function(e){var r=this.offsetLeft,t=e.clientX;k(function(e){var i=r+(e.clientX-t),o=f[0].offsetWidth,o=(o<(i=i<0?0:i)&&(i=o),Math.round(i/280*100)/100);y(g,h,p,v=o),e.preventDefault()}),e.preventDefault()}),f.on("click",function(e){var i=e.clientX-m(this).offset().left,i=((i=i<0?0:i)>this.offsetWidth&&(i=this.offsetWidth),Math.round(i/280*100)/100);y(g,h,p,v=i),e.preventDefault()}),i.each(function(){m(this).on("click",function(){m(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e=this.style.backgroundColor,i=Y(L(e)),o=e.slice(e.lastIndexOf(",")+1,e.length-1);g=i.h,h=i.s,p=i.b,3===(e.match(/[0-9]{1,3}/g)||[]).length&&(o=1),v=o,y(i.h,i.s,i.b,o)})})},d.prototype.select=function(e,i,o,r){this.config;var t=F({h:e,s:100,b:100}),e=(F({h:e,s:i,b:o}),e/360*180),o=180-o/100*180-3,i=i/100*260-3;this.elemPicker.find("."+B).css("top",e),this.elemPicker.find("."+I)[0].style.background="#"+t,this.elemPicker.find("."+E).css({top:o,left:i})},d.prototype.pickerEvents=function(){var c=this,a=c.config,s=c.elemColorBox.find("."+C),d=c.elemPicker.find("."+M+" input"),o={clear:function(e){s[0].style.background="",c.elemColorBox.find("."+w).removeClass(x).addClass(P),c.color="",a.done&&a.done(""),c.removePicker()},confirm:function(e,i){var o,r,t,n,l=d.val();-1>16,g:(65280&t)>>8,b:255&t},r=Y(n),s[0].style.background=o="#"+F(r),c.elemColorBox.find("."+w).removeClass(P).addClass(x)),"change"===i?(c.select(r.h,r.s,r.b,i),a.change&&a.change(o)):(c.color=l,a.done&&a.done(l),c.removePicker())}};c.elemPicker.on("click","*[colorpicker-events]",function(){var e=m(this),i=e.attr("colorpicker-events");o[i]&&o[i].call(this,e)}),d.on("keyup",function(e){var i=m(this);o.confirm.call(this,i,13===e.keyCode?null:"change")})},d.prototype.events=function(){var e=this;e.config;e.elemColorBox.on("click",function(){e.renderPicker(),m(a)[0]&&(e.val(),e.side())})},s.on(i,function(e){var i,o,r;n.thisId&&(i=l.getThis(n.thisId))&&(o=i.config,r=i.elemColorBox.find("."+C),m(e.target).hasClass(c)||m(e.target).parents("."+c)[0]||m(e.target).hasClass(a.replace(/\./g,""))||m(e.target).parents(a)[0]||i.elemPicker&&(i.color?(e=Y(L(i.color)),i.select(e.h,e.s,e.b)):i.elemColorBox.find("."+w).removeClass(x).addClass(P),r[0].style.background=i.color||"","function"==typeof o.cancel&&o.cancel(i.color),i.removePicker()))}),H.on("resize",function(){if(n.thisId){var e=l.getThis(n.thisId);if(e)return!(!e.elemPicker||!m(a)[0])&&void e.position()}}),l.that={},l.getThis=function(e){var i=l.that[e];return i||o.error(e?r+" instance with ID '"+e+"' not found":"ID argument required"),i},n.render=function(e){e=new d(e);return l.call(e)},e(r,n)});layui.define("jquery",function(t){"use strict";var u=layui.$,d=(layui.hint(),layui.device()),c="element",r="layui-this",h="layui-show",o=".layui-tab-title",i=function(){this.config={}},y=(i.prototype.set=function(t){return u.extend(!0,this.config,t),this},i.prototype.on=function(t,i){return layui.onevent.call(this,c,t,i)},i.prototype.tabAdd=function(t,i){var a,e=u(".layui-tab[lay-filter="+t+"]"),l=e.children(o),n=l.children(".layui-tab-bar"),e=e.children(".layui-tab-content"),s=""+(i.title||"unnaming")+"";return n[0]?n.before(s):l.append(s),e.append('
      '+(i.content||"")+"
      "),i.change&&this.tabChange(t,i.id),l.data("LAY_TAB_CHANGE",i.change),C.tabAuto(i.change?"change":null),this},i.prototype.tabDelete=function(t,i){t=u(".layui-tab[lay-filter="+t+"]").children(o).find('>li[lay-id="'+i+'"]');return C.tabDelete(null,t),this},i.prototype.tabChange=function(t,i){t=u(".layui-tab[lay-filter="+t+"]").children(o).find('>li[lay-id="'+i+'"]');return C.tabClick.call(t[0],{liElem:t}),this},i.prototype.tab=function(a){a=a||{},e.on("click",a.headerElem,function(t){var i=u(this).index();C.tabClick.call(this,{index:i,options:a})})},i.prototype.progress=function(t,i){var a="layui-progress",t=u("."+a+"[lay-filter="+t+"]").find("."+a+"-bar"),a=t.find("."+a+"-text");return t.css("width",function(){return/^.+\/.+$/.test(i)?100*new Function("return "+i)()+"%":i}).attr("lay-percent",i),a.text(i),this},".layui-nav"),f="layui-nav-item",p="layui-nav-bar",b="layui-nav-tree",v="layui-nav-child",m="layui-nav-more",g="layui-anim layui-anim-upbit",C={tabClick:function(t){var i=(t=t||{}).options||{},a=t.liElem||u(this),e=i.headerElem?a.parent():a.parents(".layui-tab").eq(0),i=i.bodyElem?u(i.bodyElem):e.children(".layui-tab-content").children(".layui-tab-item"),l=a.find("a"),l="javascript:;"!==l.attr("href")&&"_blank"===l.attr("target"),n="string"==typeof a.attr("lay-unselect"),s=e.attr("lay-filter"),t="index"in t?t.index:a.parent().children("li").index(a);l||n||(a.addClass(r).siblings().removeClass(r),i.eq(t).addClass(h).siblings().removeClass(h)),layui.event.call(this,c,"tab("+s+")",{elem:e,index:t})},tabDelete:function(t,i){var i=i||u(this).parent(),a=i.parent().children("li").index(i),e=i.closest(".layui-tab"),l=e.children(".layui-tab-content").children(".layui-tab-item"),n=e.attr("lay-filter");i.hasClass(r)&&(i.next()[0]&&i.next().is("li")?C.tabClick.call(i.next()[0],{index:a+1}):i.prev()[0]&&i.prev().is("li")&&C.tabClick.call(i.prev()[0],null,a-1)),i.remove(),l.eq(a).remove(),setTimeout(function(){C.tabAuto()},50),layui.event.call(this,c,"tabDelete("+n+")",{elem:e,index:a})},tabAuto:function(l){var n="layui-tab-more",s="layui-tab-bar",o="layui-tab-close",c=this;u(".layui-tab").each(function(){var t,i=u(this),a=i.children(".layui-tab-title"),e=(i.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),e=u('');c===window&&d.ie,i.attr("lay-allowclose")&&a.find("li").each(function(){var t,i=u(this);i.find("."+o)[0]||((t=u('')).on("click",C.tabDelete),i.append(t))}),"string"!=typeof i.attr("lay-unauto")&&(a.prop("scrollWidth")>a.outerWidth()+1||a.find("li").length&&a.height()>(t=a.find("li").eq(0).height())+t/2?("change"===l&&a.data("LAY_TAB_CHANGE")&&a.addClass(n),a.find("."+s)[0]||(a.append(e),i.attr("overflow",""),e.on("click",function(t){var i=a.hasClass(n);a[i?"removeClass":"addClass"](n)}))):(a.find("."+s).remove(),i.removeAttr("overflow")))})},hideTabMore:function(t){var i=u(".layui-tab-title");!0!==t&&"tabmore"===u(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=u(this),i=t.closest(y),a=i.attr("lay-filter"),e=t.parent(),l=t.siblings("."+v),n="string"==typeof e.attr("lay-unselect");if("javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||n||l[0]||(i.find("."+r).removeClass(r),e.addClass(r)),i.hasClass(b)){var n=f+"ed",s=!e.hasClass(n),o=function(){u(this).css({display:""}),i.children("."+p).css({opacity:0})};if(l.is(":animated"))return;l.removeClass(g),l[0]&&(s?(l.slideDown(200,o),e.addClass(n)):(e.removeClass(n),l.show().slideUp(200,o)),"string"!=typeof i.attr("lay-accordion")&&"all"!==i.attr("lay-shrink")||((s=e.siblings("."+n)).removeClass(n),s.children("."+v).show().stop().slideUp(200,o)))}layui.event.call(this,c,"nav("+a+")",t)},collapse:function(){var t=u(this),i=t.find(".layui-colla-icon"),a=t.siblings(".layui-colla-content"),e=t.parents(".layui-collapse").eq(0),l=e.attr("lay-filter"),n="none"===a.css("display");"string"==typeof e.attr("lay-accordion")&&((e=e.children(".layui-colla-item").children("."+h)).siblings(".layui-colla-title").children(".layui-colla-icon").html(""),e.removeClass(h)),a[n?"addClass":"removeClass"](h),i.html(n?"":""),layui.event.call(this,c,"collapse("+l+")",{title:t,content:a,show:n})}},a=(i.prototype.render=i.prototype.init=function(t,i){var a=i?'[lay-filter="'+i+'"]':"",i={tab:function(){C.tabAuto.call({})},nav:function(){var s={},o={},c={},r="layui-nav-title";u(y+a).each(function(t){var i=u(this),a=u(''),e=i.find("."+f);i.find("."+p)[0]||(i.append(a),(i.hasClass(b)?e.find("dd,>."+r):e).on("mouseenter",function(){!function(t,i,a){var e,l=u(this),n=l.find("."+v);i.hasClass(b)?n[0]||(e=l.children("."+r),t.css({top:l.offset().top-i.offset().top,height:(e[0]?e:l).outerHeight(),opacity:1})):(n.addClass(g),n.hasClass("layui-nav-child-c")&&n.css({left:-(n.outerWidth()-l.width())/2}),n[0]?t.css({left:t.position().left+t.width()/2,width:0,opacity:0}):t.css({left:l.position().left+parseFloat(l.css("marginLeft")),top:l.position().top+l.height()-t.height()}),s[a]=setTimeout(function(){t.css({width:n[0]?0:l.width(),opacity:n[0]?0:1})},d.ie&&d.ie<10?0:200),clearTimeout(c[a]),"block"===n.css("display")&&clearTimeout(o[a]),o[a]=setTimeout(function(){n.addClass(h),l.find("."+m).addClass(m+"d")},300))}.call(this,a,i,t)}).on("mouseleave",function(){i.hasClass(b)?a.css({height:0,opacity:0}):(clearTimeout(o[t]),o[t]=setTimeout(function(){i.find("."+v).removeClass(h),i.find("."+m).removeClass(m+"d")},300))}),i.on("mouseleave",function(){clearTimeout(s[t]),c[t]=setTimeout(function(){i.hasClass(b)||a.css({width:0,left:a.position().left+a.width()/2,opacity:0})},200)})),e.find("a").each(function(){var t=u(this);t.parent();t.siblings("."+v)[0]&&!t.children("."+m)[0]&&t.append(''),t.off("click",C.clickThis).on("click",C.clickThis)})})},breadcrumb:function(){u(".layui-breadcrumb"+a).each(function(){var t=u(this),i="lay-separator",a=t.attr(i)||"/",e=t.find("a");e.next("span["+i+"]")[0]||(e.each(function(t){t!==e.length-1&&u(this).after(""+a+"")}),t.css("visibility","visible"))})},progress:function(){var e="layui-progress";u("."+e+a).each(function(){var t=u(this),i=t.find(".layui-progress-bar"),a=i.attr("lay-percent");i.css("width",function(){return/^.+\/.+$/.test(a)?100*new Function("return "+a)()+"%":a}),t.attr("lay-showpercent")&&setTimeout(function(){i.html(''+a+"")},350)})},collapse:function(){u(".layui-collapse"+a).each(function(){u(this).find(".layui-colla-item").each(function(){var t=u(this),i=t.find(".layui-colla-title"),t="none"===t.find(".layui-colla-content").css("display");i.find(".layui-colla-icon").remove(),i.append(''+(t?"":"")+""),i.off("click",C.collapse).on("click",C.collapse)})})}};return i[t]?i[t]():layui.each(i,function(t,i){i()})},new i),e=u(document);u(function(){a.render()}),e.on("click",".layui-tab-title li",C.tabClick),u(window).on("resize",C.tabAuto),t(c,a)});layui.define(["lay","layer"],function(e){"use strict";var x=layui.$,a=layui.lay,i=layui.layer,b=layui.device(),t="upload",r="layui_"+t+"_index",o={config:{},index:layui[t]?layui[t].index+1e4:0,set:function(e){var i=this;return i.config=x.extend({},i.config,e),i},on:function(e,i){return layui.onevent.call(this,t,e,i)}},l=function(){var i=this,e=i.config.id;return{upload:function(e){i.upload.call(i,e)},reload:function(e){i.reload.call(i,e)},config:(l.that[e]=i).config}},u="layui-upload-file",f="layui-upload-form",F="layui-upload-iframe",w="layui-upload-choose",L="UPLOADING",j=function(e){var i=this;i.index=++o.index,i.config=x.extend({},i.config,o.config,e),i.render()};j.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}},j.prototype.reload=function(e){var i=this;i.config=x.extend({},i.config,e),i.render(!0)},j.prototype.render=function(e){var i=this,t=i.config,n=x(t.elem);return 1"].join("")),n=i.elem.next();(n.hasClass(u)||n.hasClass(f))&&n.remove(),b.ie&&b.ie<10&&i.elem.wrap('
      '),e.isFile()?(e.elemFile=i.elem,i.field=i.elem[0].name):i.elem.after(t),b.ie&&b.ie<10&&e.initIE()},j.prototype.initIE=function(){var t,e=this.config,i=x(''),n=x(['
      ',"
      "].join(""));x("#"+F)[0]||x("body").append(i),e.elem.next().hasClass(f)||(this.elemFile.wrap(n),e.elem.next("."+f).append((t=[],layui.each(e.data,function(e,i){i="function"==typeof i?i():i,t.push('')}),t.join(""))))},j.prototype.msg=function(e){return i.msg(e,{icon:2,shift:6})},j.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},j.prototype.preview=function(n){window.FileReader&&layui.each(this.chooseFiles,function(e,i){var t=new FileReader;t.readAsDataURL(i),t.onload=function(){n&&n(e,i,this.result)}})},j.prototype.upload=function(e,i){var t,n,a,o,u=this,f=u.config,c=f.text||{},l=u.elemFile[0],s=function(){return e||u.files||u.chooseFiles||l.files},r=function(){var a=0,o=0,l=s(),r=function(){f.multiple&&a+o===u.fileLength&&"function"==typeof f.allDone&&f.allDone({total:u.fileLength,successful:a,failed:o})},t=function(t){var n=new FormData,i=function(e){t.unified?layui.each(l,function(e,i){delete i[L]}):delete e[L]};if(layui.each(f.data,function(e,i){i="function"==typeof i?i():i,n.append(e,i)}),t.unified)layui.each(l,function(e,i){i[L]||(i[L]=!0,n.append(f.field,i))});else{if(t.file[L])return;n.append(f.field,t.file),t.file[L]=!0}var e={url:f.url,type:"post",data:n,dataType:f.dataType||"json",contentType:!1,processData:!1,headers:f.headers||{},success:function(e){f.unified?a+=u.fileLength:a++,p(t.index,e),r(t.index),i(t.file)},error:function(e){f.unified?o+=u.fileLength:o++,u.msg(c.error||["Upload failed, please try again.","status: "+(e.status||"")+" - "+(e.statusText||"error")].join("
      ")),m(t.index),r(t.index),i(t.file)}};"function"==typeof f.progress&&(e.xhr=function(){var e=x.ajaxSettings.xhr();return e.upload.addEventListener("progress",function(e){var i;e.lengthComputable&&(i=Math.floor(e.loaded/e.total*100),f.progress(i,(f.item||f.elem)[0],e,t.index))}),e}),x.ajax(e)};f.unified?t({unified:!0,index:0}):layui.each(l,function(e,i){t({index:e,file:i})})},d=function(){var n=x("#"+F);u.elemFile.parent().submit(),clearInterval(j.timer),j.timer=setInterval(function(){var e,i=n.contents().find("body");try{e=i.text()}catch(t){u.msg(c["cross-domain"]),clearInterval(j.timer),m()}e&&(clearInterval(j.timer),i.html(""),p(0,e))},30)},p=function(e,i){if(u.elemFile.next("."+w).remove(),l.value="","json"===f.force&&"object"!=typeof i)try{i=JSON.parse(i)}catch(t){return i={},u.msg(c["data-format-error"])}"function"==typeof f.done&&f.done(i,e||0,function(e){u.upload(e)})},m=function(e){f.auto&&(l.value=""),"function"==typeof f.error&&f.error(e||0,function(e){u.upload(e)})},h=f.exts,g=(n=[],layui.each(e||u.chooseFiles,function(e,i){n.push(i.name)}),n),v={preview:function(e){u.preview(e)},upload:function(e,i){var t={};t[e]=i,u.upload(t)},pushFile:function(){return u.files=u.files||{},layui.each(u.chooseFiles,function(e,i){u.files[e]=i}),u.files},resetFile:function(e,i,t){i=new File([i],t);u.files=u.files||{},u.files[e]=i}},y={file:"\u6587\u4ef6",images:"\u56fe\u7247",video:"\u89c6\u9891",audio:"\u97f3\u9891"}[f.accept]||"\u6587\u4ef6",g=0===g.length?l.value.match(/[^\/\\]+\..+/g)||[]:g;if(0!==g.length){switch(f.accept){case"file":layui.each(g,function(e,i){if(h&&!RegExp(".\\.("+h+")$","i").test(escape(i)))return t=!0});break;case"video":layui.each(g,function(e,i){if(!RegExp(".\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(i)))return t=!0});break;case"audio":layui.each(g,function(e,i){if(!RegExp(".\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(i)))return t=!0});break;default:layui.each(g,function(e,i){if(!RegExp(".\\.("+(h||"jpg|png|gif|bmp|jpeg|svg")+")$","i").test(escape(i)))return t=!0})}if(t)return u.msg(c["check-error"]||"\u9009\u62e9\u7684"+y+"\u4e2d\u5305\u542b\u4e0d\u652f\u6301\u7684\u683c\u5f0f"),l.value="";if("choose"!==i&&!f.auto||(f.choose&&f.choose(v),"choose"!==i)){if(u.fileLength=(a=0,y=s(),layui.each(y,function(){a++}),a),f.number&&u.fileLength>f.number)return u.msg("function"==typeof c["limit-number"]?c["limit-number"](f,u.fileLength):"\u540c\u65f6\u6700\u591a\u53ea\u80fd\u4e0a\u4f20: "+f.number+" \u4e2a\u6587\u4ef6
      \u60a8\u5f53\u524d\u5df2\u7ecf\u9009\u62e9\u4e86: "+u.fileLength+" \u4e2a\u6587\u4ef6");if(01024*f.size&&(i=1<=(i=f.size/1024)?i.toFixed(2)+"MB":f.size+"KB",l.value="",o=i)}),o)return u.msg("function"==typeof c["limit-size"]?c["limit-size"](f,o):"\u6587\u4ef6\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 "+o);if(!f.before||!1!==f.before(v))b.ie?(9'+e+"")};a.elem.off("upload.start").on("upload.start",function(){var e=x(this);n.config.item=e,n.elemFile[0].click()}),b.ie&&b.ie<10||a.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(e,i){var t=x(this),i=i.originalEvent.dataTransfer.files||[];t.removeAttr("lay-over"),o(i),a.auto?n.upload():l(i)}),n.elemFile.on("change",function(){var e=this.files||[];0!==e.length&&(o(e),a.auto?n.upload():l(e))}),a.bindAction.off("upload.action").on("upload.action",function(){n.upload()}),a.elem.data(r)||(a.elem.on("click",function(){n.isFile()||x(this).trigger("upload.start")}),a.drag&&a.elem.on("dragover",function(e){e.preventDefault(),x(this).trigger("upload.over")}).on("dragleave",function(e){x(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),x(this).trigger("upload.drop",e)}),a.bindAction.on("click",function(){x(this).trigger("upload.action")}),a.elem.data(r,a.id))},l.that={},l.getThis=function(e){var i=l.that[e];return i||hint.error(e?t+" instance with ID '"+e+"' not found":"ID argument required"),i},o.render=function(e){e=new j(e);return l.call(e)},e(t,o)});layui.define(["lay","layer","util"],function(e){"use strict";var C=layui.$,h=layui.layer,d=layui.util,l=layui.hint(),w=(layui.device(),"form"),o=".layui-form",N="layui-this",T="layui-hide",$="layui-disabled",t=function(){this.config={verify:{required:function(e){if(!/[\S]+/.test(e))return"\u5fc5\u586b\u9879\u4e0d\u80fd\u4e3a\u7a7a"},phone:function(e){if(e&&!/^1\d{10}$/.test(e))return"\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e"},email:function(e){if(e&&!/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e))return"\u90ae\u7bb1\u683c\u5f0f\u4e0d\u6b63\u786e"},url:function(e){if(e&&!/^(#|(http(s?)):\/\/|\/\/)[^\s]+\.[^\s]+$/.test(e))return"\u94fe\u63a5\u683c\u5f0f\u4e0d\u6b63\u786e"},number:function(e){if(e&&isNaN(e))return"\u53ea\u80fd\u586b\u5199\u6570\u5b57"},date:function(e){if(e&&!/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/.test(e))return"\u65e5\u671f\u683c\u5f0f\u4e0d\u6b63\u786e"},identity:function(e){if(e&&!/(^\d{15}$)|(^\d{17}(x|X|\d)$)/.test(e))return"\u8eab\u4efd\u8bc1\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e"}},autocomplete:null}},i=(t.prototype.set=function(e){return C.extend(!0,this.config,e),this},t.prototype.verify=function(e){return C.extend(!0,this.config.verify,e),this},t.prototype.getFormElem=function(e){return C(o+(e?'[lay-filter="'+e+'"]':""))},t.prototype.on=function(e,t){return layui.onevent.call(this,w,e,t)},t.prototype.val=function(e,i){return this.getFormElem(e).each(function(e,t){var a=C(this);layui.each(i,function(e,t){var i,e=a.find('[name="'+e+'"]');e[0]&&("checkbox"===(i=e[0].type)?e[0].checked=t:"radio"===i?e.each(function(){this.checked=this.value==t}):e.val(t))})}),r.render(null,e),this.getValue(e)},t.prototype.getValue=function(e,t){t=t||this.getFormElem(e);var a={},n={},e=t.find("input,select,textarea");return layui.each(e,function(e,t){var i;C(this);t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name&&(/^.*\[\]$/.test(t.name)&&(i=t.name.match(/^(.*)\[\]$/g)[0],a[i]=0|a[i],i=t.name.replace(/^(.*)\[\]$/,"$1["+a[i]+++"]")),/^(checkbox|radio)$/.test(t.type)&&!t.checked||(n[i||t.name]=t.value))}),n},t.prototype.render=function(e,t){var i=this.config,a=C(o+(t?'[lay-filter="'+t+'"]':"")),n={input:function(e){var e=e||a.find("input,textarea"),t=(i.autocomplete&&e.attr("autocomplete",i.autocomplete),function(e,t){var i=e.val(),a=Number(i),n=Number(e.attr("step"))||1,l=Number(e.attr("min")),r=Number(e.attr("max")),s=Number(e.attr("lay-precision")),o="click"!==t&&""===i,c="init"===t;isNaN(a)||("click"===t&&(a=!!C(this).index()?a-n:a+n),t=function(e){return((e.toString().match(/\.(\d+$)/)||[])[1]||"").length},s=0<=s?s:Math.max(t(n),t(i)),o||(c||r<=(a=a<=l?l:a)&&(a=r),s&&(a=a.toFixed(s)),e.val(a)),e[(a'),e=layui.isArray(i.value)?i.value:[i.value],e=C((a=[],layui.each(e,function(e,t){a.push('')}),a.join(""))),n=(t.append(e),i.split&&t.addClass("layui-input-split"),i.className&&t.addClass(i.className),r.next("."+u)),l=(n[0]&&n.remove(),r.parent().hasClass(o)||r.wrap('
      '),r.next("."+c));l[0]?((n=l.find("."+u))[0]&&n.remove(),l.prepend(t),r.css("padding-right",function(){return(r.closest(".layui-input-group")[0]?0:l.outerWidth())+t.outerWidth()})):(t.addClass(c),r.after(t)),"auto"===i.show&&d(t,r.val()),"function"==typeof i.init&&i.init.call(this,r,i),r.on("input propertychange",function(){var e=this.value;"auto"===i.show&&d(t,e)}),r.on("blur",function(){"function"==typeof i.blur&&i.blur.call(this,r,i)}),e.on("click",function(){var e=r.attr("lay-filter");C(this).hasClass($)||("function"==typeof i.click&&i.click.call(this,r,i),layui.event.call(this,w,"input-affix("+e+")",{elem:r[0],affix:s,options:i}))})},f={eye:{value:"eye-invisible",click:function(e,t){var i="LAY_FORM_INPUT_AFFIX_SHOW",a=e.data(i);e.attr("type",a?"password":"text").data(i,!a),n({value:a?"eye-invisible":"eye"})}},clear:{value:"clear",click:function(e){e.val("").focus(),d(C(this).parent(),null)},show:"auto",disabled:e},number:{value:["up","down"],split:!0,className:"layui-input-number",disabled:r.is("[disabled]"),init:function(e){t.call(this,e,"init")},click:function(e){t.call(this,e,"click")},blur:function(e){t.call(this,e,"blur")}}};n()})},select:function(e){var p,c="\u8bf7\u9009\u62e9",m="layui-form-select",g="layui-select-title",x="layui-select-none",b="",e=e||a.find("select"),k=function(e,t){C(e.target).parent().hasClass(g)&&!t||(C("."+m).removeClass(m+"ed "+m+"up"),p&&b&&p.val(b)),p=null},u=function(a,e,t){var s,r,i,n,o,l,c=C(this),u=a.find("."+g),d=u.find("input"),f=a.find("dl"),h=f.children("dd"),y=f.children("dt"),v=this.selectedIndex;e||(r=c.attr("lay-search"),i=function(){var e=a.offset().top+a.outerHeight()+5-F.scrollTop(),t=f.outerHeight();v=c[0].selectedIndex,a.addClass(m+"ed"),h.removeClass(T),y.removeClass(T),s=null,h.removeClass(N),0<=v&&h.eq(v).addClass(N),e+t>F.height()&&t<=e&&a.addClass(m+"up"),o()},n=function(e){a.removeClass(m+"ed "+m+"up"),d.blur(),s=null,e||l(d.val(),function(e){var t=c[0].selectedIndex;e&&(b=C(c[0].options[t]).html(),0===t&&b===d.attr("placeholder")&&(b=""),d.val(b||""))})},o=function(){var e,t,i=f.children("dd."+N);i[0]&&(e=i.position().top,t=f.height(),i=i.height(),t\u65e0\u5339\u914d\u9879

      '):f.find("."+x).remove()},"keyup"),""===t&&(c.val(""),f.find("."+N).removeClass(N),(c[0].options[0]||{}).value||f.children("dd:eq(0)").addClass(N),f.find("."+x).remove()),o()}).on("blur",function(e){var t=c[0].selectedIndex;p=d,b=C(c[0].options[t]).text(),0===t&&b===d.attr("placeholder")&&(b=""),setTimeout(function(){l(d.val(),function(e){b||d.val("")},"blur")},200)}),h.on("click",function(){var e=C(this),t=e.attr("lay-value"),i=c.attr("lay-filter");return e.hasClass($)||(e.hasClass("layui-select-tips")?d.val(""):(d.val(e.text()),e.addClass(N)),e.siblings().removeClass(N),c.val(t).removeClass("layui-form-danger"),layui.event.call(this,w,"select("+i+")",{elem:c[0],value:t,othis:a}),n(!0)),!1}),a.find("dl>dt").on("click",function(e){return!1}),C(document).off("click",k).on("click",k))};e.each(function(e,t){var i=C(this),a=i.next("."+m),n=this.disabled,l=t.value,r=C(t.options[t.selectedIndex]),t=t.options[0];if("string"==typeof i.attr("lay-ignore"))return i.show();var s,o="string"==typeof i.attr("lay-search"),t=t&&!t.value&&t.innerHTML||c,r=C(['
      ','
      ','','
      ','
      ',(t=i.find("*"),s=[],layui.each(t,function(e,t){var i=t.tagName.toLowerCase();0!==e||t.value||"optgroup"===i?s.push("optgroup"===i?"
      "+t.label+"
      ":'
      '+C.trim(t.innerHTML)+"
      "):s.push('
      '+C.trim(t.innerHTML||c)+"
      ")}),0===s.length&&s.push('
      \u6ca1\u6709\u9009\u9879
      '),s.join("")+"
      "),"
      "].join(""));a[0]&&a.remove(),i.after(r),u.call(this,r,n,o)})},checkbox:function(e){var o={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],"switch":["layui-form-switch","layui-form-onswitch","switch"],SUBTRA:"layui-icon-indeterminate"},e=e||a.find("input[type=checkbox]");e.each(function(e,t){var i=C(this),a=i.attr("lay-skin")||"primary",n=d.escape(C.trim(t.title||(t.title=i.attr("lay-text")||""))),l=this.disabled,r=o[a]||o.checkbox,s=i.next("."+r[0]);if(s[0]&&s.remove(),i.next("[lay-checkbox]")[0]&&(n=i.next().html()||""),n="switch"===a?n.split("|"):[n],"string"==typeof i.attr("lay-ignore"))return i.show();l=C(['
      ",(s={checkbox:[n[0]?"
      "+n[0]+"
      ":"primary"===a?"":"
      ",''].join(""),"switch":"
      "+((t.checked?n[0]:n[1])||"")+"
      "})[a]||s.checkbox,"
      "].join(""));i.after(l),function(a,n){var l=C(this);a.on("click",function(){var e=C(this),t=l.attr("lay-filter"),e=e.next("*[lay-checkbox]")[0]?e.next().html():l.attr("title")||"",i=l.attr("lay-skin")||"primary",e="switch"===i?e.split("|"):[e];l[0].disabled||(l[0].indeterminate&&(l[0].indeterminate=!1,a.find("."+o.SUBTRA).removeClass(o.SUBTRA).addClass("layui-icon-ok")),l[0].checked?(l[0].checked=!1,a.removeClass(n[1]),"switch"===i&&a.children("div").html(e[1])):(l[0].checked=!0,a.addClass(n[1]),"switch"===i&&a.children("div").html(e[0])),layui.event.call(l[0],w,n[2]+"("+t+")",{elem:l[0],value:l[0].value,othis:a}))})}.call(this,l,r)})},radio:function(e){var r="layui-form-radio",s=["layui-icon-radio","layui-icon-circle"],e=e||a.find("input[type=radio]");e.each(function(e,t){var i=C(this),a=i.next("."+r),n=this.disabled;if("string"==typeof i.attr("lay-ignore"))return i.show();a[0]&&a.remove();n=C(['
      ','',"
      "+(a=d.escape(t.title||""),a=i.next("[lay-radio]")[0]?i.next().html():a)+"
      ","
      "].join(""));i.after(n),function(a){var n=C(this),l="layui-anim-scaleSpring";a.on("click",function(){var e=n[0].name,t=n.parents(o),i=n.attr("lay-filter"),e=t.find("input[name="+e.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(e,function(){var e=C(this).next("."+r);this.checked=!1,e.removeClass(r+"ed"),e.children(".layui-icon").removeClass(l+" "+s[0]).addClass(s[1])}),n[0].checked=!0,a.addClass(r+"ed"),a.children(".layui-icon").addClass(l+" "+s[0]),layui.event.call(n[0],w,"radio("+i+")",{elem:n[0],value:n[0].value,othis:a}))})}.call(this,n)})}},t=function(){layui.each(n,function(e,t){t()})};return"object"===layui.type(e)?C(e).is(o)?(a=C(e),t()):e.each(function(e,t){var i=C(t);i.closest(o).length&&("SELECT"===t.tagName?n.select(i):"INPUT"===t.tagName&&("checkbox"===(t=t.type)||"radio"===t?n[t](i):n.input(i)))}):e?n[e]?n[e]():l.error('\u4e0d\u652f\u6301\u7684 "'+e+'" \u8868\u5355\u6e32\u67d3'):t(),this},t.prototype.validate=function(e){var u,d=this.config.verify,f="layui-form-danger";return!(e=C(e))[0]||(e.attr("lay-verify")!==undefined||!1!==this.validate(e.find("*[lay-verify]")))&&(layui.each(e,function(e,r){var s=C(this),t=(s.attr("lay-verify")||"").split("|"),o=s.attr("lay-vertype"),c=C.trim(s.val());if(s.removeClass(f),layui.each(t,function(e,t){var i="",a=d[t];if(a){var n="function"==typeof a?i=a(c,r):!a[0].test(c),l="select"===r.tagName.toLowerCase()||/^(checkbox|radio)$/.test(r.type),i=i||a[1];if("required"===t&&(i=s.attr("lay-reqtext")||i),n)return"tips"===o?h.tips(i,"string"!=typeof s.attr("lay-ignore")&&l?s.next():s,{tips:1}):"alert"===o?h.alert(i,{title:"\u63d0\u793a",shadeClose:!0}):/\b(string|number)\b/.test(typeof i)&&h.msg(i,{icon:5,shift:6}),setTimeout(function(){(l?s.next().find("input"):r).focus()},7),s.addClass(f),u=!0}}),u)return u}),!u)},t.prototype.submit=function(e,t){var i={},a=C(this),e="string"==typeof e?e:a.attr("lay-filter"),n=this.getFormElem?this.getFormElem(e):a.parents(o).eq(0),l=n.find("*[lay-verify]");return!!r.validate(l)&&(i=r.getValue(null,n),l={elem:this.getFormElem?window.event&&window.event.target:this,form:(this.getFormElem?n:a.parents("form"))[0],field:i},"function"==typeof t&&t(l),layui.event.call(this,w,"submit("+e+")",l))}),r=new t,t=C(document),F=C(window);C(function(){r.render()}),t.on("reset",o,function(){var e=C(this).attr("lay-filter");setTimeout(function(){r.render(null,e)},50)}),t.on("submit",o,i).on("click","*[lay-submit]",i),e(w,r)});layui.define(["lay","laytpl","laypage","form","util"],function(n){"use strict";var f=layui.$,r=layui.lay,m=layui.laytpl,I=layui.laypage,p=layui.layer,v=layui.form,g=layui.util,b=layui.hint(),x=layui.device(),k={config:{checkName:"LAY_CHECKED",indexName:"LAY_INDEX",numbersName:"LAY_NUM",disabledName:"LAY_DISABLED"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){var t=this;return t.config=f.extend({},t.config,e),t},on:function(e,t){return layui.onevent.call(this,N,e,t)}},w=function(){var a=this,e=a.config,i=e.id||e.index;return{config:e,reload:function(e,t){a.reload.call(a,e,t)},reloadData:function(e,t){k.reloadData(i,e,t)},setColsWidth:function(){a.setColsWidth.call(a)},resize:function(){a.resize.call(a)}}},C=function(e){var t=w.that[e];return t||b.error(e?"The table instance with ID '"+e+"' not found":"ID argument required"),t||null},l=function(e){var t=w.config[e];return t||b.error(e?"The table instance with ID '"+e+"' not found":"ID argument required"),t||null},T=function(e){var t=this.config||{},a=(e=e||{}).item3,i=e.content;"numbers"===a.type&&(i=e.tplData[k.config.numbersName]);("escape"in a?a:t).escape&&(i=g.escape(i));t=e.text&&a.exportTemplet||a.templet||a.toolbar;return t&&(i="function"==typeof t?t.call(a,e.tplData,e.obj):m(f(t).html()||String(i)).render(f.extend({LAY_COL:a},e.tplData))),e.text?f("
      "+i+"
      ").text():i},N="table",t=".layui-table",R="layui-hide",y="layui-hide-v",h="layui-none",L="layui-table-view",o=".layui-table-header",A=".layui-table-body",c=".layui-table-fixed-r",D=".layui-table-pageview",_=".layui-table-sort",E="layui-table-checked",W="layui-table-edit",P="layui-table-hover",z="laytable-cell-group",j="layui-table-col-special",M="layui-table-tool-panel",H="layui-table-expanded",S="LAY_TABLE_MOVE_DICT",e=function(e){return['',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',(e=e||{}).fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':"","{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
      ','
      ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{-item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
      ","
      "].join("")},a=['',"","
      "].join(""),u=[,"{{# if(d.data.toolbar){ }}",'
      ','
      ','
      ',"
      ","{{# } }}",'
      ',"{{# if(d.data.loading){ }}",'
      ','',"
      ","{{# } }}","{{# var left, right; }}",'
      ',e(),"
      ",'
      ',a,"
      ","{{# if(left){ }}",'
      ','
      ',e({fixed:!0}),"
      ",'
      ',a,"
      ","
      ","{{# }; }}","{{# if(right){ }}",'
      ','
      ',e({fixed:"right"}),'
      ',"
      ",'
      ',a,"
      ","
      ","{{# }; }}","
      ","{{# if(d.data.totalRow){ }}",'
      ','','',"
      ","
      ","{{# } }}",'
      ','
      ',"
      "].join(""),d=f(window),F=f(document),i=function(e){this.index=++k.index,this.config=f.extend({},this.config,k.config,e),this.render()},s=(i.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:"\u65e0\u6570\u636e"},cols:[]},i.prototype.render=function(e){var t=this,a=t.config,i=(a.elem=f(a.elem),a.where=a.where||{},a.id="id"in a?a.id:a.elem.attr("id")||t.index);if(w.that[i]=t,(w.config[i]=a).request=f.extend({pageName:"page",limitName:"limit"},a.request),a.response=f.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",totalRowName:"totalRow",countName:"count"},a.response),null!==a.page&&"object"==typeof a.page&&(a.limit=a.page.limit||a.limit,a.limits=a.page.limits||a.limits,t.page=a.page.curr=a.page.curr||1,delete a.page.elem,delete a.page.jump),!a.elem[0])return t;if(a.elem.attr("lay-filter")||a.elem.attr("lay-filter",a.id),"reloadData"===e)return t.pullData(t.page,{type:"reloadData"});a.index=t.index,t.key=a.id||a.index,t.setInit(),a.height&&/^full-\d+$/.test(a.height)?(t.fullHeightGap=a.height.split("-")[1],a.height=d.height()-t.fullHeightGap):a.height&&/^#\w+\S*-\d+$/.test(a.height)&&(i=a.height.split("-"),t.parentHeightGap=i.pop(),t.parentDiv=i.join("-"),a.height=f(t.parentDiv).height()-t.parentHeightGap);var l,e=a.elem,i=e.next("."+L),n=t.elem=f("
      ");n.addClass((l=[L,L+"-"+t.index,"layui-form","layui-border-box"],a.className&&l.push(a.className),l.join(" "))).attr({"lay-filter":"LAY-TABLE-FORM-DF-"+t.index,"lay-id":a.id,style:(l=[],a.width&&l.push("width:"+a.width+"px;"),l.join(""))}).html(m(u,{open:"{{",close:"}}"}).render({data:a,index:t.index})),t.renderStyle(),i[0]&&i.remove(),e.after(n),t.layTool=n.find(".layui-table-tool"),t.layBox=n.find(".layui-table-box"),t.layHeader=n.find(o),t.layMain=n.find(".layui-table-main"),t.layBody=n.find(A),t.layFixed=n.find(".layui-table-fixed"),t.layFixLeft=n.find(".layui-table-fixed-l"),t.layFixRight=n.find(c),t.layTotal=n.find(".layui-table-total"),t.layPage=n.find(".layui-table-page"),t.renderToolbar(),t.renderPagebar(),t.fullSize(),t.pullData(t.page),t.events()},i.prototype.initOpts=function(e){this.config;e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||{checkbox:50,radio:50,space:30,numbers:60}[e.type])},i.prototype.setInit=function(e){var l,a,d=this,r=d.config;if(r.clientWidth=r.width||(l=function(e){var t,a=(e=e||r.elem.parent()).width();try{t="none"===e.css("display")}catch(i){}return!e[0]||a&&!t?a:l(e.parent())})(),"width"===e)return r.clientWidth;r.height=r.maxHeight||r.height,r.css&&-1===r.css.indexOf(L)&&(a=r.css.split("}"),layui.each(a,function(e,t){t&&(a[e]="."+L+"-"+d.index+" "+t)}),r.css=a.join("}"));var c=function(a,e,i,l){var n,o;l?(l.key=[r.index,a,i].join("-"),l.colspan=l.colspan||0,l.rowspan=l.rowspan||0,d.initOpts(l),(n=a+(parseInt(l.rowspan)||1)) td:hover > .layui-table-cell{overflow: auto;}"].concat(x.ie?[".layui-table-edit{height: "+i+";}","td[data-edit]:hover:after{height: "+i+";}"]:[]),function(e,t){t&&o.push(a+" "+t)})),l.css&&o.push(l.css),r.style({target:this.elem[0],text:o.join(""),id:"DF-table-"+n})},i.prototype.renderToolbar=function(){var e=this.config,t=['
      ','
      ','
      '].join(""),a=this.layTool.find(".layui-table-tool-temp"),i=("default"===e.toolbar?a.html(t):"string"==typeof e.toolbar&&(t=f(e.toolbar).html()||"")&&a.html(m(t).render(e)),{filter:{title:"\u7b5b\u9009\u5217",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols"},exports:{title:"\u5bfc\u51fa",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export"},print:{title:"\u6253\u5370",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print"}}),l=[];"object"==typeof e.defaultToolbar&&layui.each(e.defaultToolbar,function(e,t){t="string"==typeof t?i[t]:t;t&&l.push('
      ')}),this.layTool.find(".layui-table-tool-self").html(l.join(""))},i.prototype.renderPagebar=function(){var e,t=this.config,a=this.layPagebar=f('
      ');t.pagebar&&((e=f(t.pagebar).html()||"")&&a.append(m(e).render(t)),this.layPage.append(a))},i.prototype.setParentCol=function(e,t){var a=this.config,i=this.layHeader.find('th[data-key="'+t+'"]'),l=parseInt(i.attr("colspan"))||0;i[0]&&(t=t.split("-"),t=a.cols[t[1]][t[2]],e?l--:l++,i.attr("colspan",l),i[l?"removeClass":"addClass"](R),t.colspan2=l,t.hide=l<1,a=i.data("parentkey"))&&this.setParentCol(e,a)},i.prototype.setColsPatch=function(){var a=this,e=a.config;layui.each(e.cols,function(e,t){layui.each(t,function(e,t){t.hide&&a.setParentCol(t.hide,t.parentKey)})})},i.prototype.setGroupWidth=function(i){var e,l=this;l.config.cols.length<=1||((e=l.layHeader.find((i?"th[data-key="+i.data("parentkey")+"]>":"")+"."+z)).css("width",0),layui.each(e.get().reverse(),function(){var e=f(this),t=e.parent().data("key"),a=0;l.layHeader.eq(0).find("th[data-parentkey="+t+"]").width(function(e,t){f(this).hasClass(R)||0 tr:first-child > th:last-child")).data("field")&&e.prev()[0]?t(e.prev()):e})()).data("key"),n.cssRules(e,function(e){var t=e.style.width||a.outerWidth();e.style.width=parseFloat(t)+l+"px",0'+(e||"Error")+"
      ");a[0]&&(t.layNone.remove(),a.remove()),t.layFixed.addClass(R),t.layMain.find("tbody").html(""),t.layMain.append(t.layNone=e),t.layTotal.addClass(y),t.layPage.find(D).addClass(y),k.cache[t.key]=[],t.syncCheckAll(),t.renderForm(),t.setColsWidth()},i.prototype.page=1,i.prototype.pullData=function(a,t){var e,i,l=this,n=l.config,o=(n.HAS_SET_COLS_PATCH||l.setColsPatch(),n.HAS_SET_COLS_PATCH=!0,n.request),d=n.response,r=function(){"object"==typeof n.initSort&&l.sort({field:n.initSort.field,type:n.initSort.type,reloadType:t.type})},c=function(e,t){l.setColsWidth(),"function"==typeof n.done&&n.done(e,a,e[d.countName],t)};t=t||{},"function"==typeof n.before&&n.before(n),l.startTime=(new Date).getTime(),t.renderData?((e={})[d.dataName]=k.cache[l.key],e[d.countName]=n.url?"object"===layui.type(n.page)?n.page.count:e[d.dataName].length:n.data.length,"object"==typeof n.totalRow&&(e[d.totalRowName]=f.extend({},l.totalRow)),l.renderData({res:e,curr:a,count:e[d.countName],type:t.type,sort:!0}),c(e,"renderData")):n.url?(i={},n.page&&(i[o.pageName]=a,i[o.limitName]=n.limit),o=f.extend(i,n.where),n.contentType&&0==n.contentType.indexOf("application/json")&&(o=JSON.stringify(o)),l.loading(),f.ajax({type:n.method||"get",url:n.url,contentType:n.contentType,data:o,dataType:n.dataType||"json",jsonpCallback:n.jsonpCallback,headers:n.headers||{},complete:function(e,t){"function"==typeof n.complete&&n.complete(e,t)},success:function(e){(e="function"==typeof n.parseData?n.parseData(e)||e:e)[d.statusName]!=d.statusCode?l.errorView(e[d.msgName]||'\u8fd4\u56de\u7684\u6570\u636e\u4e0d\u7b26\u5408\u89c4\u8303\uff0c\u6b63\u786e\u7684\u6210\u529f\u72b6\u6001\u7801\u5e94\u4e3a\uff1a"'+d.statusName+'": '+d.statusCode):(l.totalRow=e[d.totalRowName],l.renderData({res:e,curr:a,count:e[d.countName],type:t.type}),r(),n.time=(new Date).getTime()-l.startTime+" ms"),c(e)},error:function(e,t){l.errorView("\u8bf7\u6c42\u5f02\u5e38\uff0c\u9519\u8bef\u63d0\u793a\uff1a"+t),"function"==typeof n.error&&n.error(e,t)}})):"array"===layui.type(n.data)&&(e={},i=a*n.limit-n.limit,o=n.data.concat(),e[d.dataName]=n.page?o.splice(i,n.limit):o,e[d.countName]=n.data.length,"object"==typeof n.totalRow&&(e[d.totalRowName]=f.extend({},n.totalRow)),l.totalRow=e[d.totalRowName],l.renderData({res:e,curr:a,count:e[d.countName],type:t.type}),r(),c(e))},i.prototype.eachCols=function(e){return k.eachCols(null,e,this.config.cols),this},i.prototype.col=function(e){try{return e=e.split("-"),this.config.cols[e[1]][e[2]]||{}}catch(t){return b.error(t),{}}},i.prototype.getTrHtml=function(a,l,n,e){var s=this,u=s.config,y=e&&e.trs||[],h=e&&e.trs_fixed||[],p=e&&e.trs_fixed_r||[];return n=n||1,layui.each(a,function(e,o){var i=[],d=[],r=[],c=e+u.limit*(n-1)+1;if("object"!=typeof o){a[e]=o={LAY_KEY:o};try{k.cache[s.key][e]=o}catch(t){}}"array"===layui.type(o)&&0===o.length||(o[k.config.numbersName]=c,l||(o[k.config.indexName]=e),s.eachCols(function(e,l){var t,e=l.field||e,a=l.key,n=o[e];n!==undefined&&null!==n||(n=""),l.colGroup||(e=['','
      "+function(){var e,t=f.extend(!0,{LAY_COL:l},o),a=k.config.checkName,i=k.config.disabledName;switch(l.type){case"checkbox":return'';case"radio":return'';case"numbers":return c}return l.toolbar?m(f(l.toolbar).html()||"").render(t):T.call(s,{item3:l,content:n,tplData:t})}(),"
      "].join(""),i.push(e),l.fixed&&"right"!==l.fixed&&d.push(e),"right"===l.fixed&&r.push(e))}),e=['data-index="'+e+'"'],o[k.config.checkName]&&e.push('class="'+E+'"'),e=e.join(" "),y.push(""+i.join("")+""),h.push(""+d.join("")+""),p.push(""+r.join("")+""))}),{trs:y,trs_fixed:h,trs_fixed_r:p}},k.getTrHtml=function(e,t){e=C(e);return e.getTrHtml(t,null,e.page)},i.prototype.renderData=function(e){var a=this,i=a.config,t=e.res,l=e.curr,n=a.count=e.count,o=e.sort,d=t[i.response.dataName]||[],t=t[i.response.totalRowName],r=[],c=[],s=[],u=function(){if(!o&&a.sortKey)return a.sort({field:a.sortKey.field,type:a.sortKey.sort,pull:!0,reloadType:e.type});a.getTrHtml(d,o,l,{trs:r,trs_fixed:c,trs_fixed_r:s}),"fixed"===i.scrollPos&&"reloadData"===e.type||a.layBody.scrollTop(0),"reset"===i.scrollPos&&a.layBody.scrollLeft(0),a.layMain.find("."+h).remove(),a.layMain.find("tbody").html(r.join("")),a.layFixLeft.find("tbody").html(c.join("")),a.layFixRight.find("tbody").html(s.join("")),a.syncCheckAll(),a.renderForm(),a.fullSize(),a.haveInit?a.scrollPatch():setTimeout(function(){a.scrollPatch()},50),a.haveInit=!0,p.close(a.tipsIndex)};return k.cache[a.key]=d,a.layTotal[0==d.length?"addClass":"removeClass"](y),a.layPage[i.page||i.pagebar?"removeClass":"addClass"](R),a.layPage.find(D)[!i.page||0==n||0===d.length&&1==l?"addClass":"removeClass"](y),0===d.length?a.errorView(i.text.none):(a.layFixLeft.removeClass(R),o?u():(u(),a.renderTotal(d,t),a.layTotal&&a.layTotal.removeClass(R),void(i.page&&(i.page=f.extend({elem:"layui-table-page"+i.index,count:n,limit:i.limit,limits:i.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(a.page=e.curr,i.limit=e.limit,a.pullData(e.curr))}},i.page),i.page.count=n,I.render(i.page)))))},k.renderData=function(e){e=C(e);e&&e.pullData(e.page,{renderData:!0,type:"reloadData"})},i.prototype.renderTotal=function(e,o){var d,r=this,c=r.config,s={};c.totalRow&&(layui.each(e,function(e,i){"array"===layui.type(i)&&0===i.length||r.eachCols(function(e,t){var e=t.field||e,a=i[e];t.totalRow&&(s[e]=(s[e]||0)+(parseFloat(a)||0))})}),r.dataTotal=[],d=[],r.eachCols(function(e,t){var a,e=t.field||e,i=o&&o[t.field],l="totalRowDecimals"in t?t.totalRowDecimals:2,l=s[e]?parseFloat(s[e]||0).toFixed(l):"",l=(a=t.totalRowText||"",(n={LAY_COL:t})[e]=l,n=t.totalRow&&T.call(r,{item3:t,content:l,tplData:n})||a,i||n),n=(t.field&&r.dataTotal.push({field:t.field,total:f("
      "+l+"
      ").text()}),['','
      "+("string"==typeof(a=t.totalRow||c.totalRow)?m(a).render(f.extend({TOTAL_NUMS:i||s[e],TOTAL_ROW:o||{},LAY_COL:t},t)):l),"
      "].join(""));d.push(n)}),e=r.layTotal.find(".layui-table-patch"),r.layTotal.find("tbody").html(""+d.join("")+(e.length?e.get(0).outerHTML:"")+""))},i.prototype.getColElem=function(e,t){return e.eq(0).find(".laytable-cell-"+t+":eq(0)")},i.prototype.renderForm=function(e){this.config;var t=this.elem.attr("lay-filter");v.render(e,t)},i.prototype.syncCheckAll=function(){var a,e=this,i=e.config,t=e.layHeader.find('input[name="layTableCheckbox"]'),l=k.checkStatus(e.key);t[0]&&(a=l.isAll,e.eachCols(function(e,t){"checkbox"===t.type&&(t[i.checkName]=a)}),t.prop({checked:l.isAll,indeterminate:!l.isAll&&l.data.length}),v.render(t))},i.prototype.setRowActive=function(e,t,a){this.config;e=this.layBody.find('tr[data-index="'+e+'"]');if(t=t||"layui-table-click",a)return e.removeClass(t);e.addClass(t),e.siblings("tr").removeClass(t)},i.prototype.setRowChecked=function(a){var e=this,i=e.config,l=e.layBody.find("tr"+("all"===a.index?"":'[data-index="'+a.index+'"]')),t=(a=f.extend({type:"checkbox"},a),k.cache[e.key]),n="checked"in a,o=function(e){return"radio"===a.type||(n?a.checked:!e)},t=(layui.each(t,function(e,t){"array"===layui.type(t)||t[i.disabledName]||(Number(a.index)===e||"all"===a.index?(e=t[i.checkName]=o(t[i.checkName]),l[e?"addClass":"removeClass"](E),"radio"===a.type&&l.siblings().removeClass(E)):"radio"===a.type&&delete t[i.checkName])}),l.find('input[lay-type="'+({radio:"layTableRadio",checkbox:"layTableCheckbox"}[a.type]||"checkbox")+'"]:not(:disabled)')),d=t.last(),r=d.closest(c);("radio"===a.type&&r.hasClass(R)?t.first():t).prop("checked",o(d.prop("checked"))),e.syncCheckAll(),e.renderForm(a.type)},i.prototype.sort=function(l){var e,t=this,a={},i=t.config,n=i.elem.attr("lay-filter"),o=k.cache[t.key];"string"==typeof(l=l||{}).field&&(d=l.field,t.layHeader.find("th").each(function(e,t){var a=f(this),i=a.data("field");if(i===l.field)return l.field=a,d=i,!1}));try{var d=d||l.field.data("field"),r=l.field.data("key");if(t.sortKey&&!l.pull&&d===t.sortKey.field&&l.type===t.sortKey.sort)return;var c=t.layHeader.find("th .laytable-cell-"+r).find(_);t.layHeader.find("th").find(_).removeAttr("lay-sort"),c.attr("lay-sort",l.type||null),t.layFixed.find("th")}catch(s){b.error("Table modules: sort field '"+d+"' not matched")}t.sortKey={field:d,sort:l.type},i.autoSort&&("asc"===l.type?e=layui.sort(o,d,null,!0):"desc"===l.type?e=layui.sort(o,d,!0,!0):(e=layui.sort(o,k.config.indexName,null,!0),delete t.sortKey,delete i.initSort)),a[i.response.dataName]=e||o,t.renderData({res:a,curr:t.page,count:t.count,sort:!0,type:l.reloadType}),l.fromEvent&&(i.initSort={field:d,type:l.type},layui.event.call(l.field,N,"sort("+n+")",f.extend({config:i},i.initSort)))},i.prototype.loading=function(e){var t=this;t.config.loading&&(e?(t.layInit&&t.layInit.remove(),delete t.layInit,t.layBox.find(".layui-table-init").remove()):(t.layInit=f(['
      ','',"
      "].join("")),t.layBox.append(t.layInit)))},i.prototype.cssRules=function(t,a){var e=this.elem.children("style")[0];r.getStyleRules(e,function(e){if(e.selectorText===".laytable-cell-"+t)return a(e),!0})},i.prototype.fullSize=function(){var e,a,i=this,t=i.config,l=t.height;i.fullHeightGap?(l=d.height()-i.fullHeightGap)<135&&(l=135):i.parentDiv&&i.parentHeightGap&&(l=f(i.parentDiv).height()-i.parentHeightGap)<135&&(l=135),1
      ')).find("div").css({width:a}),e.find("tr").append(t)):e.find(".layui-table-patch").remove()};n(e.layHeader),n(e.layTotal);n=e.layMain.height()-i;e.layFixed.find(A).css("height",t.height()>=n?n:"auto").scrollTop(e.layMain.scrollTop()),e.layFixRight[k.cache[e.key]&&k.cache[e.key].length&&0');a.html(t),u.height&&a.css("max-height",u.height-(s.layTool.outerHeight()||50)),i.find("."+M)[0]||i.append(a),s.renderForm(),a.on("click",function(e){layui.stope(e)}),e.done&&e.done(a,t)};switch(layui.stope(e),F.trigger("table.tool.panel.remove"),p.close(s.tipsIndex),t){case"LAYTABLE_COLS":n({list:(a=[],s.eachCols(function(e,t){t.field&&"normal"==t.type&&a.push('
    • "+(t.fieldTitle||t.title||t.field)+"
    • ").text())+'" lay-filter="LAY_TABLE_TOOL_COLS">')}),a.join("")),done:function(){v.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var e=f(e.elem),t=this.checked,a=e.data("key"),i=s.col(a),l=i.hide,e=e.data("parentkey");i.key&&(i.hide=!t,s.elem.find('*[data-key="'+a+'"]')[t?"removeClass":"addClass"](R),l!=i.hide&&s.setParentCol(!t,e),s.resize(),layui.event.call(this,N,"colToggled("+c+")",{col:i,config:u}))})}});break;case"LAYTABLE_EXPORT":if(!l.length)return p.tips("\u5f53\u524d\u8868\u683c\u65e0\u6570\u636e",this,{tips:3});x.ie?p.tips("\u5bfc\u51fa\u529f\u80fd\u4e0d\u652f\u6301 IE\uff0c\u8bf7\u7528 Chrome \u7b49\u9ad8\u7ea7\u6d4f\u89c8\u5668\u5bfc\u51fa",this,{tips:3}):n({list:['
    • \u5bfc\u51fa csv \u683c\u5f0f\u6587\u4ef6
    • ','
    • \u5bfc\u51fa xls \u683c\u5f0f\u6587\u4ef6
    • '].join(""),done:function(e,t){t.on("click",function(){var e=f(this).data("type");k.exportFile.call(s,u.id,null,e)})}});break;case"LAYTABLE_PRINT":if(!l.length)return p.tips("\u5f53\u524d\u8868\u683c\u65e0\u6570\u636e",this,{tips:3});var o=window.open("about:blank","_blank"),d=[""].join(""),r=f(s.layHeader.html());r.append(s.layMain.find("table").html()),r.append(s.layTotal.find("table").html()),r.find("th.layui-table-patch").remove(),r.find("thead>tr>th."+j).filter(function(e,t){return!f(t).children("."+z).length}).remove(),r.find("tbody>tr>td."+j).remove(),o.document.write(d+r.prop("outerHTML")),o.document.close(),layui.device("edg").edg?(o.onafterprint=o.close,o.print()):(o.print(),o.close())}layui.event.call(this,N,"toolbar("+c+")",f.extend({event:t,config:u},{}))}),s.layHeader.on("click","*[lay-event]",function(e){var t=f(this),a=t.attr("lay-event"),t=t.closest("th").data("key"),t=s.col(t);layui.event.call(this,N,"colTool("+c+")",f.extend({event:a,config:u,col:t},{}))}),s.layPagebar.on("click","*[lay-event]",function(e){var t=f(this).attr("lay-event");layui.event.call(this,N,"pagebar("+c+")",f.extend({event:t,config:u},{}))}),e.on("mousemove",function(e){var t=f(this),a=t.offset().left,e=e.clientX-a;t.data("unresize")||w.eventMoveElem||(d.allowResize=t.width()-e<=10,o.css("cursor",d.allowResize?"col-resize":""))}).on("mouseleave",function(){f(this);w.eventMoveElem||o.css("cursor","")}).on("mousedown",function(e){var t,a=f(this);d.allowResize&&(t=a.data("key"),e.preventDefault(),d.offset=[e.clientX,e.clientY],s.cssRules(t,function(e){var t=e.style.width||a.outerWidth();d.rule=e,d.ruleWidth=parseFloat(t),d.minWidth=a.data("minwidth")||u.cellMinWidth,d.maxWidth=a.data("maxwidth")||u.cellMaxWidth}),a.data(S,d),w.eventMoveElem=a)}),w.docEvent||F.on("mousemove",function(e){var t,a;w.eventMoveElem&&(t=w.eventMoveElem.data(S)||{},w.eventMoveElem.data("resizing",1),e.preventDefault(),t.rule)&&(e=t.ruleWidth+e.clientX-t.offset[0],a=w.eventMoveElem.closest("."+L).attr("lay-id"),a=C(a))&&((e=et.maxWidth&&(e=t.maxWidth),t.rule.style.width=e+"px",a.setGroupWidth(w.eventMoveElem),p.close(s.tipsIndex))}).on("mouseup",function(e){var t,a,i,l,n;w.eventMoveElem&&(i=(t=w.eventMoveElem).closest("."+L).attr("lay-id"),a=C(i))&&(i=t.data("key"),l=a.col(i),n=a.config.elem.attr("lay-filter"),d={},o.css("cursor",""),a.scrollPatch(),t.removeData(S),delete w.eventMoveElem,a.cssRules(i,function(e){l.width=parseFloat(e.style.width),layui.event.call(t[0],N,"colResized("+n+")",{col:l,config:a.config})}))}),w.docEvent=!0,e.on("click",function(e){var t=f(this),a=t.find(_),i=a.attr("lay-sort");if(!a[0]||1===t.data("resizing"))return t.removeData("resizing");s.sort({field:t,type:"asc"===i?"desc":"desc"===i?null:"asc",fromEvent:!0})}).find(_+" .layui-edge ").on("click",function(e){var t=f(this),a=t.index(),t=t.parents("th").eq(0).data("field");layui.stope(e),0===a?s.sort({field:t,type:"asc",fromEvent:!0}):s.sort({field:t,type:"desc",fromEvent:!0})}),s.commonMember=function(e){var t=f(this).parents("tr").eq(0).data("index"),r=s.layBody.find('tr[data-index="'+t+'"]'),c=(c=k.cache[s.key]||[])[t]||{},a={tr:r,config:u,data:k.clearCacheKey(c),dataCache:c,index:t,del:function(){k.cache[s.key][t]=[],r.remove(),s.scrollPatch()},update:function(e,d){e=e||{},layui.each(e,function(i,l){var n=r.children('td[data-field="'+i+'"]'),o=n.children(y);c[i]=a.data[i]=l,s.eachCols(function(e,t){var a;t.field==i?(o.html(T.call(s,{item3:t,content:l,tplData:f.extend({LAY_COL:t},c)})),n.data("content",l)):d&&(t.templet||t.toolbar)&&(e=r.children('td[data-field="'+(t.field||e)+'"]'),a=c[t.field],e.children(y).html(T.call(s,{item3:t,content:a,tplData:f.extend({LAY_COL:t},c)})),e.data("content",a))})}),s.renderForm()},setRowChecked:function(e){s.setRowChecked(f.extend({index:t},e))}};return f.extend(a,e)}),a=(s.elem.on("click",'input[name="layTableCheckbox"]+',function(e){var t=f(this),a=t.closest("td"),t=t.prev(),i=(s.layBody.find('input[name="layTableCheckbox"]'),t.parents("tr").eq(0).data("index")),l=t[0].checked,n="layTableAllChoose"===t.attr("lay-filter");t[0].disabled||(n?s.setRowChecked({index:"all",checked:l}):(s.setRowChecked({index:i,checked:l}),layui.stope(e)),layui.event.call(t[0],N,"checkbox("+c+")",r.call(t[0],{checked:l,type:n?"all":"one",getCol:function(){return s.col(a.data("key"))}})))}),s.elem.on("click",'input[lay-type="layTableRadio"]+',function(e){var t=f(this),a=t.closest("td"),t=t.prev(),i=t[0].checked,l=t.parents("tr").eq(0).data("index");if(layui.stope(e),t[0].disabled)return!1;s.setRowChecked({type:"radio",index:l}),layui.event.call(t[0],N,"radio("+c+")",r.call(t[0],{checked:i,getCol:function(){return s.col(a.data("key"))}}))}),s.layBody.on("mouseenter","tr",function(){var e=f(this),t=e.index();e.data("off")||s.layBody.find("tr:eq("+t+")").addClass(P)}).on("mouseleave","tr",function(){var e=f(this),t=e.index();e.data("off")||s.layBody.find("tr:eq("+t+")").removeClass(P)}).on("click","tr",function(e){var t=[".layui-form-checkbox",".layui-form-switch",".layui-form-radio","[lay-unrow]"].join(",");f(e.target).is(t)||f(e.target).closest(t)[0]||a.call(this,"row")}).on("dblclick","tr",function(){a.call(this,"rowDouble")}).on("contextmenu","tr",function(e){u.defaultContextmenu||e.preventDefault(),a.call(this,"rowContextmenu")}),function(e){var t=f(this);t.data("off")||layui.event.call(this,N,e+"("+c+")",r.call(t.children("td")[0]))}),n=function(e,t){var a,i,l,n;(e=f(e)).data("off")||(a=e.data("field"),n=e.data("key"),n=s.col(n),i=e.closest("tr").data("index"),i=k.cache[s.key][i],l=e.children(y),(n="function"==typeof n.edit?n.edit(i):n.edit)&&((n=f("textarea"===n?'':''))[0].value=e.data("content")||i[a]||l.text(),e.find("."+W)[0]||e.append(n),n.focus(),t)&&layui.stope(t))},i=(s.layBody.on("change","."+W,function(){var e=f(this),t=e.parent(),a=this.value,i=e.parent().data("field"),e=e.closest("tr").data("index"),e=k.cache[s.key][e],l=r.call(t[0],{value:a,field:i,oldValue:e[i],td:t,reedit:function(){setTimeout(function(){n(l.td);var e={};e[i]=l.oldValue,l.update(e)})},getCol:function(){return s.col(t.data("key"))}}),e={};e[i]=a,l.update(e),layui.event.call(t[0],N,"edit("+c+")",l)}).on("blur","."+W,function(){f(this).remove()}),s.layBody.on(u.editTrigger,"td",function(e){n(this,e)}).on("mouseenter","td",function(){t.call(this)}).on("mouseleave","td",function(){t.call(this,"hide")}),s.layTotal.on("mouseenter","td",function(){t.call(this)}).on("mouseleave","td",function(){t.call(this,"hide")}),"layui-table-grid-down"),t=function(e){var t=f(this),a=t.children(y);t.data("off")||t.parent().hasClass(H)||(e?t.find(".layui-table-grid-down").remove():!(a.prop("scrollWidth")>a.outerWidth()||0'))},l=function(e){var t=f(this),a=t.parent(),i=a.data("key"),l=s.col(i),n=a.parent().data("index"),a=a.children(y),o="layui-table-cell-c",d=f('');"tips"===(l.expandedMode||u.cellExpandedMode)?s.tipsIndex=p.tips(['
      ',a.html(),"
      ",''].join(""),a[0],{tips:[3,""],time:-1,anim:-1,maxWidth:x.ios||x.android?300:s.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){p.close(t)})}}):(s.elem.find("."+o).trigger("click"),s.cssRules(i,function(e){var t=e.style.width,a=l.expandedWidth||u.cellExpandedWidth;atr").each(function(i){n.cols[i]=[],f(this).children().each(function(e){var t=f(this),a=t.attr("lay-data"),a=r.options(this,{attr:a?"lay-data":null,errorText:d+(a||t.attr("lay-options"))}),t=f.extend({title:t.text(),colspan:parseInt(t.attr("colspan"))||1,rowspan:parseInt(t.attr("rowspan"))||1},a);n.cols[i].push(t)})}),e.find("tbody>tr")),t=k.render(n);!a.length||o.data||t.config.url||(l=0,k.eachCols(t.config.id,function(e,i){a.each(function(e){n.data[e]=n.data[e]||{};var t=f(this),a=i.field;n.data[e][a]=t.children("td").eq(l).html()}),l++}),t.reloadData({data:n.data}))}),this},w.that={},w.config={},function(a,i,e,l){var n,o;l.colGroup&&(n=0,a++,l.CHILD_COLS=[],o=e+(parseInt(l.rowspan)||1),layui.each(i[o],function(e,t){t.parentKey?t.parentKey===l.key&&(t.PARENT_COL_INDEX=a,l.CHILD_COLS.push(t),s(a,i,o,t)):t.PARENT_COL_INDEX||1<=n&&n==(l.colspan||1)||(t.PARENT_COL_INDEX=a,l.CHILD_COLS.push(t),n+=parseInt(1td').filter('[data-field="'+e+'"]')}}})).replace(/"/g,'""'),n.push(a='"'+a+'"')))}),d.push(n.join(","))}),c&&layui.each(c.dataTotal,function(e,t){r[t.field]||i.push('"'+(t.total||"")+'"')}),o.join(",")+"\r\n"+d.join("\r\n")+"\r\n"+i.join(","))),u.download=(a.title||n.title||"table_"+(n.index||""))+"."+l,document.body.appendChild(u),u.click(),document.body.removeChild(u)},k.getOptions=l,k.hideCol=function(e,l){var n=C(e);n&&("boolean"===layui.type(l)?n.eachCols(function(e,t){var a=t.key,i=n.col(a),t=t.parentKey;i.hide!=l&&(i=i.hide=l,n.elem.find('*[data-key="'+a+'"]')[i?"addClass":"removeClass"](R),n.setParentCol(i,t))}):(l=layui.isArray(l)?l:[l],layui.each(l,function(e,l){n.eachCols(function(e,t){var a,i;l.field===t.field&&(a=t.key,i=n.col(a),t=t.parentKey,"hide"in l)&&i.hide!=l.hide&&(i=i.hide=!!l.hide,n.elem.find('*[data-key="'+a+'"]')[i?"addClass":"removeClass"](R),n.setParentCol(i,t))})})),f("."+M).remove(),n.resize())},k.reload=function(e,t,a,i){if(l(e))return(e=C(e)).reload(t,a,i),w.call(e)},k.reloadData=function(){var a=f.extend([],arguments),i=(a[3]="reloadData",new RegExp("^("+["elem","id","cols","width","height","maxHeight","toolbar","defaultToolbar","className","css","pagebar"].join("|")+")$"));return layui.each(a[1],function(e,t){i.test(e)&&delete a[1][e]}),k.reload.apply(null,a)},k.render=function(e){e=new i(e);return w.call(e)},k.clearCacheKey=function(e){return delete(e=f.extend({},e))[k.config.checkName],delete e[k.config.indexName],delete e[k.config.numbersName],delete e[k.config.disabledName],e},f(function(){k.init()}),n(N,k)});layui.define(["table"],function(e){"use strict";var E=layui.$,x=layui.form,B=layui.table,y=layui.hint(),j={config:{},on:B.on,eachCols:B.eachCols,index:B.index,set:function(e){var t=this;return t.config=E.extend({},t.config,e),t},resize:B.resize,getOptions:B.getOptions,hideCol:B.hideCol,renderData:B.renderData},i=function(){var a=this,e=a.config,n=e.id||e.index;return{config:e,reload:function(e,t){a.reload.call(a,e,t)},reloadData:function(e,t){j.reloadData(n,e,t)}}},P=function(e){var t=i.that[e];return t||y.error(e?"The treeTable instance with ID '"+e+"' not found":"ID argument required"),t||null},F="layui-hide",L=".layui-table-main",q=".layui-table-fixed-l",R=".layui-table-fixed-r",l="layui-table-checked",h="layui-table-tree",Y="LAY_DATA_INDEX",m="LAY_DATA_INDEX_HISTORY",s="LAY_PARENT_INDEX",b="LAY_CHECKBOX_HALF",H="LAY_EXPAND",z="LAY_HAS_EXPANDED",X="LAY_ASYNC_STATUS",n=["all","parent","children","none"],t=function(e){var t=this;t.index=++j.index,t.config=E.extend(!0,{},t.config,j.config,e),t.init(),t.render()},f=function(n,i,e){var l=B.cache[n];layui.each(e||l,function(e,t){var a=t[Y];-1!==a.indexOf("-")&&(l[a]=t),t[i]&&f(n,i,t[i])})},d=function(l,a,e){var d=P(l),r=("reloadData"!==e&&(d.status={expand:{}}),E.extend(!0,{},d.getOptions(),a)),n=r.tree,o=n.customName.children,i=n.customName.id,c=(delete a.hasNumberCol,delete a.hasChecboxCol,delete a.hasRadioCol,B.eachCols(null,function(e,t){"numbers"===t.type?a.hasNumberCol=!0:"checkbox"===t.type?a.hasChecboxCol=!0:"radio"===t.type&&(a.hasRadioCol=!0)},r.cols),a.parseData),u=a.done;r.url?e&&(!c||c.mod)||(a.parseData=function(){var e=this,t=arguments,a=t[0],t=("function"===layui.type(c)&&(a=c.apply(e,t)||t[0]),e.response.dataName);return n.data.isSimpleData&&!n["async"].enable&&(a[t]=d.flatToTree(a[t])),p(a[t],function(e){e[H]=H in e?e[H]:e[i]!==undefined&&d.status.expand[e[i]]},o),e.autoSort&&e.initSort&&e.initSort.type&&layui.sort(a[t],e.initSort.field,"desc"===e.initSort.type,!0),d.initData(a[t]),a},a.parseData.mod=!0):(a.data=a.data||[],n.data.isSimpleData&&(a.data=d.flatToTree(a.data)),d.initData(a.data)),e&&(!u||u.mod)||(a.done=function(){var e,t=arguments,a=t[3],n=(a||delete d.isExpandAll,this.elem.next()),i=(d.updateStatus(null,{LAY_HAS_EXPANDED:!1}),f(l,o),n.find('[name="layTableCheckbox"][lay-filter="layTableAllChoose"]'));if(i.length&&(e=j.checkStatus(l),i.prop({checked:e.isAll&&e.data.length,indeterminate:!e.isAll&&e.data.length})),!a&&r.autoSort&&r.initSort&&r.initSort.type&&j.sort(l),d.renderTreeTable(n),"function"===layui.type(u))return u.apply(this,t)},a.done.mod=!0)};t.prototype.init=function(){var e=this.config,t=e.tree.data.cascade,t=(-1===n.indexOf(t)&&(e.tree.data.cascade="all"),B.render(E.extend({},e,{data:[],url:"",done:null}))),a=t.config.id;(i.that[a]=this).tableIns=t,d(a,e)},t.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}}},t.prototype.getOptions=function(){return this.tableIns?B.getOptions(this.tableIns.config.id):this.config},t.prototype.flatToTree=function(e){var a,n,i,t,l,d,r,o=this.getOptions(),c=o.tree,u=c.customName,o=o.id;return e=e||B.cache[o],o=e,a=u.id,n=u.pid,i=u.children,t=c.data.rootPid,a=a||"id",n=n||"parentId",i=i||"children",r={},layui.each(o,function(e,t){l=a+t[a],r[l]=E.extend({},t),r[l][i]=[]}),layui.each(r,function(e,t){(d=a+t[n])&&r[d]&&r[d][i].push(t)}),Object.values(r).filter(function(e){return t?e[n]===t:!e[n]})},t.prototype.treeToFlat=function(e,n,i){var l=this,d=l.getOptions().tree.customName,r=d.children,o=d.pid,c=[];return layui.each(e,function(e,t){var e=(i?i+"-":"")+e,a=E.extend({},t);a[o]=t[o]||n,c.push(a),c=c.concat(l.treeToFlat(t[r],t[d.id],e))}),c},t.prototype.getTreeNode=function(e){var t,a,n=this;return e?(a=(t=n.getOptions()).tree,t.id,a.customName,{data:e,dataIndex:e[Y],getParentNode:function(){return n.getNodeByIndex(e[s])}}):y.error("\u627e\u4e0d\u5230\u8282\u70b9\u6570\u636e")},t.prototype.getNodeByIndex=function(t){var a,e,n=this,i=n.getNodeDataByIndex(t);return i?((e=n.getOptions()).tree.customName.parent,a=e.id,(e={data:i,dataIndex:i[Y],getParentNode:function(){return n.getNodeByIndex(i[s])},update:function(e){return j.updateNode(a,t,e)},remove:function(){return j.removeNode(a,t)},expand:function(e){return j.expandNode(a,E.extend({},e,{index:t}))},setChecked:function(e){return j.setRowChecked(a,E.extend({},e,{index:t}))}}).dataIndex=t,e):y.error("\u627e\u4e0d\u5230\u8282\u70b9\u6570\u636e")},t.prototype.getNodeById=function(a){var e=this.getOptions(),n=e.tree.customName.id,i="",e=j.getData(e.id,!0);if(layui.each(e,function(e,t){if(t[n]===a)return i=t[Y],!0}),i)return this.getNodeByIndex(i)},t.prototype.getNodeDataByIndex=function(e,t,a){var n=this.getOptions(),i=n.tree,n=n.id,n=B.cache[n],l=n[e];if("delete"!==a&&l)return E.extend(l,a),t?E.extend({},l):l;for(var d=n,r=String(e).split("-"),o=0,c=i.customName.children;o
      '),N=function(e){y[X]="success",y[s.children]=e,c.initData(y[s.children],y[Y]),U(t,!0,!p&&n,i,l)},C=m.format,"function"===layui.type(C)?C(y,o,N):(I=E.extend({},m.where||o.where),C=m.autoParam,layui.each(C,function(e,t){t=t.split("=");I[t[0].trim()]=y[(t[1]||t[0]).trim()]}),(C=m.contentType||o.contentType)&&0==C.indexOf("application/json")&&(I=JSON.stringify(I)),w=m.method||o.method,D=m.dataType||o.dataType,T=m.jsonpCallback||o.jsonpCallback,k=m.headers||o.headers,_=m.parseData||o.parseData,O=m.response||o.response,E.ajax({type:w||"get",url:b,contentType:C,data:I,dataType:D||"json",jsonpCallback:T,headers:k||{},success:function(e){(e="function"==typeof _?_.call(o,e)||e:e)[O.statusName]!=O.statusCode?(y[X]="error",g.html('')):N(e[O.dataName])},error:function(e,t){y[X]="error","function"==typeof o.error&&o.error(e,t)}})),h;y[z]=!0,v.length&&(!o.initSort||o.url&&!o.autoSort||((m=o.initSort).type?layui.sort(v,m.field,"desc"===m.type,!0):layui.sort(v,B.config.indexName,null,!0)),c.initData(y[s.children],y[Y]),w=B.getTrHtml(r,v,null,null,e),S={trs:E(w.trs.join("")),trs_fixed:E(w.trs_fixed.join("")),trs_fixed_r:E(w.trs_fixed_r.join(""))},A=(e.split("-").length-1||0)+1,layui.each(v,function(e,t){S.trs.eq(e).attr({"data-index":t[Y],"lay-data-index":t[Y],"data-level":A}),S.trs_fixed.eq(e).attr({"data-index":t[Y],"lay-data-index":t[Y],"data-level":A}),S.trs_fixed_r.eq(e).attr({"data-index":t[Y],"lay-data-index":t[Y],"data-level":A})}),d.find(L).find('tbody tr[lay-data-index="'+e+'"]').after(S.trs),d.find(q).find('tbody tr[lay-data-index="'+e+'"]').after(S.trs_fixed),d.find(R).find('tbody tr[lay-data-index="'+e+'"]').after(S.trs_fixed_r),c.renderTreeTable(S.trs,A),n)&&!p&&layui.each(v,function(e,t){U({dataIndex:t[Y],trElem:d.find('tr[lay-data-index="'+t[Y]+'"]').first(),tableViewElem:d,tableId:r,options:o},a,n,i,l)})}else c.isExpandAll=!1,(n&&!p?(layui.each(v,function(e,t){U({dataIndex:t[Y],trElem:d.find('tr[lay-data-index="'+t[Y]+'"]').first(),tableViewElem:d,tableId:r,options:o},a,n,i,l)}),d.find(v.map(function(e,t,a){return'tr[lay-data-index="'+e[Y]+'"]'}).join(","))):(b=c.treeToFlat(v,y[s.id],e),d.find(b.map(function(e,t,a){return'tr[lay-data-index="'+e[Y]+'"]'}).join(",")))).addClass(F);V("resize-"+r,function(){j.resize(r)},0)(),l&&"loading"!==y[X]&&(C=u.callback.onExpand,"function"===layui.type(C))&&C(r,y,x)}return h},g=(j.expandNode=function(e,t){var a,n,i,e=P(e);if(e)return a=(t=t||{}).index,n=t.expandFlag,i=t.inherit,t=t.callbackFlag,e=e.getOptions().elem.next(),U({trElem:e.find('tr[lay-data-index="'+a+'"]').first()},n,i,null,t)},j.expandAll=function(a,e){if("boolean"!==layui.type(e))return y.error("expandAll \u7684\u5c55\u5f00\u72b6\u6001\u53c2\u6570\u53ea\u63a5\u6536true/false");var t=P(a);if(t){t.isExpandAll=e;var n=t.getOptions(),i=n.tree,l=n.elem.next(),d=i.customName.isParent,r=i.customName.id,o=i.view.showFlexIconIfNotParent;if(e){e=j.getData(a,!0);if(i["async"].enable){var c=!0;if(layui.each(e,function(e,t){if(t[d]&&!t[X])return!(c=!1)}),!c)return void layui.each(j.getData(a),function(e,t){j.expandNode(a,{index:t[Y],expandFlag:!0,inherit:!0})})}var u=!0;if(layui.each(e,function(e,t){if(t[d]&&!t[z])return!(u=!1)}),u)t.updateStatus(null,function(e){(e[d]||o)&&(e[H]=!0,e[r]!==undefined)&&(t.status.expand[e[r]]=!0)}),l.find('tbody tr[data-level!="0"]').removeClass(F),l.find(".layui-table-tree-flexIcon").html(i.view.flexIconOpen),i.view.showIcon&&l.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)").html(i.view.iconOpen);else{if(t.updateStatus(null,function(e){(e[d]||o)&&(e[H]=!0,e[z]=!0,e[r]!==undefined)&&(t.status.expand[e[r]]=!0)}),n.initSort&&n.initSort.type&&n.autoSort)return j.sort(a);var s,n=B.getTrHtml(a,e),f={trs:E(n.trs.join("")),trs_fixed:E(n.trs_fixed.join("")),trs_fixed_r:E(n.trs_fixed_r.join(""))};layui.each(e,function(e,t){var a=t[Y].split("-").length-1;s={"data-index":t[Y],"lay-data-index":t[Y],"data-level":a},f.trs.eq(e).attr(s),f.trs_fixed.eq(e).attr(s),f.trs_fixed_r.eq(e).attr(s)}),layui.each(["main","fixed-l","fixed-r"],function(e,t){l.find(".layui-table-"+t+" tbody").html(f[["trs","trs_fixed","trs_fixed_r"][e]])}),t.renderTreeTable(l,0,!1)}}else t.updateStatus(null,function(e){(e[d]||o)&&(e[H]=!1,e[r]!==undefined)&&(t.status.expand[e[r]]=!1)}),l.find('.layui-table-box tbody tr[data-level!="0"]').addClass(F),l.find(".layui-table-tree-flexIcon").html(i.view.flexIconClose),i.view.showIcon&&l.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)").html(i.view.iconClose);j.resize(a)}},t.prototype.renderTreeTable=function(e,t,a){var n=this,i=n.getOptions(),l=i.elem.next(),d=(l.hasClass(h)||l.addClass(h),i.id),r=i.tree||{},o=(r.data,r.view||{}),c=r.customName||{},u=c.isParent,s=(l.attr("lay-filter"),n),f=((t=t||0)||(l.find(".layui-table-body tr:not([data-level])").attr("data-level",t),layui.each(B.cache[d],function(e,t){l.find('.layui-table-main tbody tr[data-level="0"]:eq('+e+")").attr("lay-data-index",t[Y]),l.find('.layui-table-fixed-l tbody tr[data-level="0"]:eq('+e+")").attr("lay-data-index",t[Y]),l.find('.layui-table-fixed-r tbody tr[data-level="0"]:eq('+e+")").attr("lay-data-index",t[Y])})),null),y=c.name,p=o.indent||14;if(layui.each(e.find('td[data-field="'+y+'"]'),function(e,t){var a,n,i=(t=E(t)).closest("tr"),t=t.children(".layui-table-cell");t.hasClass("layui-table-tree-item")||(n=i.attr("lay-data-index"))&&(i=l.find('tr[lay-data-index="'+n+'"]'),(a=s.getNodeDataByIndex(n))[H]&&a[u]&&((f=f||{})[n]=!0),a[b]&&i.find('input[type="checkbox"][name="layTableCheckbox"]').prop("indeterminate",!0),n=t.html(),(t=i.find('td[data-field="'+y+'"]>div.layui-table-cell')).addClass("layui-table-tree-item"),t.html(['
      ',a[H]?o.flexIconOpen:o.flexIconClose,"
      ",o.showIcon?'
      '+(a[c.icon]||o.icon||(a[u]?a[H]?o.iconOpen:o.iconClose:o.iconLeaf)||"")+"
      ":"",n].join("")).find(".layui-table-tree-flexIcon").on("click",function(e){layui.stope(e),U({trElem:i},null,null,null,!0)}))}),!t&&r.view.expandAllDefault&&n.isExpandAll===undefined)return j.expandAll(d,!0);!1!==a&&f?layui.each(f,function(e,t){e=l.find('tr[lay-data-index="'+e+'"]');e.find(".layui-table-tree-flexIcon").html(o.flexIconOpen),U({trElem:e.first()},!0)}):V("renderTreeTable-"+d,function(){i.hasNumberCol&&g(n),x.render(E('.layui-table-tree[lay-id="'+d+'"]'))},0)()},function(a){var e=a.getOptions(),t=e.elem.next(),n=0,i=t.find(".layui-table-main tbody tr"),l=t.find(".layui-table-fixed-l tbody tr"),d=t.find(".layui-table-fixed-r tbody tr");layui.each(a.treeToFlat(B.cache[e.id]),function(e,t){t.LAY_HIDE||(a.getNodeDataByIndex(t[Y]).LAY_NUM=++n,i.eq(e).find(".laytable-cell-numbers").html(n),l.eq(e).find(".laytable-cell-numbers").html(n),d.eq(e).find(".laytable-cell-numbers").html(n))})}),p=(t.prototype.render=function(e){var t=this;t.tableIns=B["reloadData"===e?"reloadData":"reload"](t.tableIns.config.id,E.extend(!0,{},t.config)),t.config=t.tableIns.config},t.prototype.reload=function(e,t,a){var n=this;e=e||{},delete n.haveInit,layui.each(e,function(e,t){"array"===layui.type(t)&&delete n.config[e]}),d(n.getOptions().id,e,a||!0),n.config=E.extend(t,{},n.config,e),n.render(a)},j.reloadData=function(){var e=E.extend(!0,[],arguments);return e[3]="reloadData",j.reload.apply(null,e)},function(e,a,n,i){var l=[];return layui.each(e,function(e,t){"function"===layui.type(a)?a(t):E.extend(t,a),l.push(E.extend({},t)),i||(l=l.concat(p(t[n],a,n,i)))}),l}),o=(t.prototype.updateStatus=function(e,t,a){var n=this.getOptions(),i=n.tree;return e=e||B.cache[n.id],p(e,t,i.customName.children,a)},t.prototype.getTableData=function(){var e=this.getOptions();return B.cache[e.id]},j.updateStatus=function(e,t,a){var e=P(e),n=e.getOptions();return a=a||(n.url?B.cache[n.id]:n.data),e.updateStatus(a,t)},j.sort=function(e){var t=P(e);t&&t.getOptions().autoSort&&(t.initData(),j.renderData(e))},function(n){var t=n.config.id,i=P(t),a=n.data=j.getNodeDataByIndex(t,n.index),l=a[Y],d=(n.dataIndex=l,n.update);n.update=function(){var e=arguments,t=(E.extend(i.getNodeDataByIndex(l),e[0]),d.apply(this,e)),a=n.config.tree.customName.name;return a in e[0]&&n.tr.find('td[data-field="'+a+'"]').children("div.layui-table-cell").removeClass("layui-table-tree-item"),i.renderTreeTable(n.tr,n.tr.attr("data-level"),!1),t},n.del=function(){j.removeNode(t,a)},n.setRowChecked=function(e){j.setRowChecked(t,{index:a,checked:e})}}),u=(j.updateNode=function(e,a,t){var n,i,l,d,r,o=P(e);o&&((d=o.getOptions()).tree,d=(n=d.elem.next()).find('tr[lay-data-index="'+a+'"]'),i=d.attr("data-index"),l=d.attr("data-level"),t)&&(d=o.getNodeDataByIndex(a,!1,t),r=B.getTrHtml(e,[d]),layui.each(["main","fixed-l","fixed-r"],function(e,t){n.find(".layui-table-"+t+' tbody tr[lay-data-index="'+a+'"]').replaceWith(E(r[["trs","trs_fixed","trs_fixed_r"][e]].join("")).attr({"data-index":i,"lay-data-index":a,"data-level":l}))}),o.renderTreeTable(n.find('tr[lay-data-index="'+a+'"]'),l))},j.removeNode=function(e,t){var a,n,i,l,d,r=P(e);r&&(d=(a=r.getOptions()).tree,n=a.elem.next(),i=[],t=r.getNodeDataByIndex("string"===layui.type(t)?t:t[Y],!1,"delete"),l=r.getNodeDataByIndex(t[s]),r.updateCheckStatus(l),l=r.treeToFlat([t],t[d.customName.pid],t[s]),layui.each(l,function(e,t){i.push('tr[lay-data-index="'+t[Y]+'"]')}),n.find(i.join(",")).remove(),d=r.initData(),layui.each(r.treeToFlat(d),function(e,t){t[m]&&t[m]!==t[Y]&&n.find('tr[lay-data-index="'+t[m]+'"]').attr({"data-index":t[Y],"lay-data-index":t[Y]})}),layui.each(B.cache[e],function(e,t){n.find('tr[data-level="0"][lay-data-index="'+t[Y]+'"]').attr("data-index",e)}),a.hasNumberCol&&g(r),j.resize(e))},j.addNodes=function(e,t){var a=P(e);if(a){var n=a.getOptions(),i=n.tree,l=n.elem.next(),d=B.config.checkName,r=(t=t||{}).parentIndex,o=t.index,c=t.data,t=t.focus,u=(r="number"===layui.type(r)?r.toString():r)?a.getNodeDataByIndex(r):null,o="number"===layui.type(o)?o:-1,c=E.extend(!0,[],layui.isArray(c)?c:[c]);layui.each(c,function(e,t){d in t||(t[d]=u[d])}),a.getTableData();if(u){var s=i.customName.isParent,f=i.customName.children;u[s]=!0;var y=(y=u[f])?(p=y.splice(-1===o?y.length:o),u[f]=y.concat(c,p)):u[f]=c,f=(a.updateStatus(y,function(e){(e[s]||i.view.showFlexIconIfNotParent)&&(e[z]=!1)}),a.treeToFlat(y));l.find(f.map(function(e){return'tr[lay-data-index="'+e[Y]+'"]'}).join(",")).remove(),a.initData(),u[z]=!1,u[X]="local",U({trElem:l.find('tr[lay-data-index="'+r+'"]')},!0)}else{var p=B.cache[e].splice(-1===o?B.cache[e].length:o);if(B.cache[e]=B.cache[e].concat(c,p),n.url||(n.page?(y=n.page,n.data.splice.apply(n.data,[y.limit*(y.curr-1),y.limit].concat(B.cache[e]))):n.data=B.cache[e]),a.initData(),l.find(".layui-none").length)return B.renderData(e),c;var x,f=B.getTrHtml(e,c),h={trs:E(f.trs.join("")),trs_fixed:E(f.trs_fixed.join("")),trs_fixed_r:E(f.trs_fixed_r.join(""))},r=(layui.each(c,function(e,t){x={"data-index":t[Y],"lay-data-index":t[Y],"data-level":"0"},h.trs.eq(e).attr(x),h.trs_fixed.eq(e).attr(x),h.trs_fixed_r.eq(e).attr(x)}),parseInt(c[0][Y])-1),y=l.find(L),n=l.find(q),f=l.find(R);-1==r?(y.find('tr[data-level="0"][data-index="0"]').before(h.trs),n.find('tr[data-level="0"][data-index="0"]').before(h.trs_fixed),f.find('tr[data-level="0"][data-index="0"]').before(h.trs_fixed_r)):-1===o?(y.find("tbody").append(h.trs),n.find("tbody").append(h.trs_fixed),f.find("tbody").append(h.trs_fixed_r)):(r=p[0][m],y.find('tr[data-level="0"][data-index="'+r+'"]').before(h.trs),n.find('tr[data-level="0"][data-index="'+r+'"]').before(h.trs_fixed),f.find('tr[data-level="0"][data-index="'+r+'"]').before(h.trs_fixed_r)),layui.each(B.cache[e],function(e,t){l.find('tr[data-level="0"][lay-data-index="'+t[Y]+'"]').attr("data-index",e)}),a.renderTreeTable(l.find(c.map(function(e,t,a){return'tr[lay-data-index="'+e[Y]+'"]'}).join(",")))}return a.updateCheckStatus(u),j.resize(e),t&&l.find(L).find('tr[lay-data-index="'+c[0][Y]+'"]').get(0).scrollIntoViewIfNeeded(),c}},j.checkStatus=function(e,n){var i,t,a,l=P(e);if(l)return l=l.getOptions().tree,i=B.config.checkName,t=j.getData(e,!0).filter(function(e,t,a){return e[i]||n&&e[b]}),a=!0,layui.each("all"===l.data.cascade?B.cache[e]:j.getData(e,!0),function(e,t){if(!t[i])return!(a=!1)}),{data:t,isAll:a}},j.on("sort",function(e){var e=e.config,t=e.elem.next(),e=e.id;t.hasClass(h)&&j.sort(e)}),j.on("row",function(e){e.config.elem.next().hasClass(h)&&o(e)}),j.on("rowDouble",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(h)&&(o(e),(t.tree||{}).view.dblClickExpand)&&U({trElem:e.tr.first()},null,null,null,!0)}),j.on("rowContextmenu",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(h)&&o(e)}),j.on("tool",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(h)&&o(e)}),j.on("edit",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(h)&&(o(e),e.field===t.tree.customName.name)&&((a={})[e.field]=e.value,e.update(a))}),j.on("radio",function(e){var t=e.config,a=t.elem.next(),t=t.id;a.hasClass(h)&&(a=P(t),o(e),u.call(a,e.tr,e.checked))}),t.prototype.setRowCheckedClass=function(e,t){var a=this.getOptions(),n=(e.data("index"),a.elem.next());e[t?"addClass":"removeClass"](l),e.each(function(){var e=E(this).data("index");n.find('.layui-table-fixed-r tbody tr[data-index="'+e+'"]')[t?"addClass":"removeClass"](l)})},t.prototype.updateCheckStatus=function(e,t){var a,n,i,l,d,r,o,c=this,u=c.getOptions();return!!u.hasChecboxCol&&(a=u.tree,n=u.id,i=u.elem.next(),l=B.config.checkName,"all"!==(d=a.data.cascade)&&"parent"!==d||!e||(d=c.updateParentCheckStatus(e,"boolean"===layui.type(t)?t:null),layui.each(d,function(e,t){var a=i.find('tr[lay-data-index="'+t[Y]+'"] input[name="layTableCheckbox"]:not(:disabled)'),n=t[l];c.setRowCheckedClass(a.closest("tr"),n),x.render(a.prop({checked:n,indeterminate:t[b]}))})),o=!(r=!0),e=(e="all"===a.data.cascade?B.cache[n]:j.getData(n,!0)).filter(function(e){return!e[u.disabledName]}),layui.each(e,function(e,t){if((t[l]||t[b])&&(o=!0),t[l]||(r=!1),o&&!r)return!0}),o=o&&!r,x.render(i.find('input[name="layTableCheckbox"][lay-filter="layTableAllChoose"]').prop({checked:r,indeterminate:o})),r)},t.prototype.updateParentCheckStatus=function(a,n){var i,e=this.getOptions(),t=e.tree,e=e.id,l=B.config.checkName,t=t.customName.children,d=[];return!(a[b]=!1)===n?a[t].length?layui.each(a[t],function(e,t){if(!t[l])return n=!1,a[b]=!0}):n=!1:!1===n?layui.each(a[t],function(e,t){if(t[l]||t[b])return a[b]=!0}):(n=!1,i=0,layui.each(a[t],function(e,t){t[l]&&i++}),n=a[t].length?a[t].length===i:a[l],a[b]=!n&&0')),n=(e.tree(a),i.elem=p(i.elem));if(n[0]){if(e.key=i.id||e.index,e.elem=a,e.elemNone=p('
      '+i.text.none+"
      "),n.html(e.elem),0==e.elem.find(".layui-tree-set").length)return e.elem.append(e.elemNone);i.showCheckbox&&e.renderForm("checkbox"),e.elem.find(".layui-tree-set").each(function(){var e=p(this);e.parent(".layui-tree-pack")[0]||e.addClass("layui-tree-setHide"),!e.next()[0]&&e.parents(".layui-tree-pack").eq(1).hasClass("layui-tree-lineExtend")&&e.addClass(F),e.next()[0]||e.parents(".layui-tree-set").eq(0).next()[0]||e.addClass(F)}),e.events()}},l.prototype.renderForm=function(e){i.render(e,"LAY-tree-"+this.index)},l.prototype.tree=function(r,e){var d=this,s=d.config,o=s.customName,e=e||s.data;layui.each(e,function(e,i){var a,n,t=i[o.children]&&0"),c=p(['
      ','
      ','
      ',s.showLine?t?'':'':'',s.showCheckbox?'':"",s.isJump&&i.href?''+(i[o.title]||i.label||s.text.defaultNodeName)+"":''+(i[o.title]||i.label||s.text.defaultNodeName)+"","
      ",s.edit?(a={add:'',update:'',del:''},n=['
      '],!0===s.edit&&(s.edit=["update","del"]),"object"==typeof s.edit?(layui.each(s.edit,function(e,i){n.push(a[i]||"")}),n.join("")+"
      "):void 0):"","
      "].join(""));t&&(c.append(l),d.tree(l,i[o.children])),r.append(c),c.prev("."+m)[0]&&c.prev().children(".layui-tree-pack").addClass("layui-tree-showLine"),t||c.parent(".layui-tree-pack").addClass("layui-tree-lineExtend"),d.spread(c,i),s.showCheckbox&&(i.checked&&d.checkids.push(i[o.id]),d.checkClick(c,i)),s.edit&&d.operate(c,i)})},l.prototype.spread=function(n,t){var l=this,c=l.config,e=n.children("."+x),i=e.children("."+b),a=i.find('input[same="layuiTreeCheck"]'),r=e.find("."+k),e=e.find("."+g),d=c.onlyIconControl?r:i,s="";d.on("click",function(e){var i=n.children("."+w),a=(d.children(".layui-icon")[0]?d:d.find(".layui-tree-icon")).children(".layui-icon");i[0]?n.hasClass(N)?(n.removeClass(N),i.slideUp(200),a.removeClass(v).addClass(C),l.updateFieldValue(t,"spread",!1)):(n.addClass(N),i.slideDown(200),a.addClass(v).removeClass(C),l.updateFieldValue(t,"spread",!0),c.accordion&&((i=n.siblings("."+m)).removeClass(N),i.children("."+w).slideUp(200),i.find(".layui-tree-icon").children(".layui-icon").removeClass(v).addClass(C))):s="normal"}),e.on("click",function(){p(this).hasClass(u)||(s=n.hasClass(N)?c.onlyIconControl?"open":"close":c.onlyIconControl?"close":"open",a[0]&&l.updateFieldValue(t,"checked",a.prop("checked")),c.click&&c.click({elem:n,state:s,data:t}))})},l.prototype.updateFieldValue=function(e,i,a){i in e&&(e[i]=a)},l.prototype.setCheckbox=function(e,i,a){var t,n=this,l=n.config.customName,c=a.prop("checked");a.prop("disabled")||("object"!=typeof i[l.children]&&!e.find("."+w)[0]||e.find("."+w).find('input[same="layuiTreeCheck"]').each(function(e){this.disabled||((e=i[l.children][e])&&n.updateFieldValue(e,"checked",c),n.updateFieldValue(this,"checked",c))}),(t=function(e){var i,a,n;e.parents("."+m)[0]&&(a=(e=e.parent("."+w)).parent(),n=e.prev().find('input[same="layuiTreeCheck"]'),c?n.prop("checked",c):(e.find('input[same="layuiTreeCheck"]').each(function(){this.checked&&(i=!0)}),i||n.prop("checked",!1)),t(a))})(e),n.renderForm("checkbox"))},l.prototype.checkClick=function(a,n){var t=this,l=t.config;a.children("."+x).children("."+b).on("click",'input[same="layuiTreeCheck"]+',function(e){layui.stope(e);var e=p(this).prev(),i=e.prop("checked");e.prop("disabled")||(t.setCheckbox(a,n,e),t.updateFieldValue(n,"checked",i),l.oncheck&&l.oncheck({elem:a,checked:i,data:n}))})},l.prototype.operate=function(r,d){var s=this,o=s.config,u=o.customName,e=r.children("."+x),h=e.children("."+b);e.children(".layui-tree-btnGroup").on("click",".layui-icon",function(e){layui.stope(e);var i,e=p(this).data("type"),n=r.children("."+w),t={data:d,type:e,elem:r};if("add"==e){n[0]||(o.showLine?(h.find("."+k).addClass("layui-tree-icon"),h.find("."+k).children(".layui-icon").addClass(C).removeClass("layui-icon-file")):h.find(".layui-tree-iconArrow").removeClass(f),r.append('
      '));var a,l=o.operate&&o.operate(t),c={};if(c[u.title]=o.text.defaultNodeName,c[u.id]=l,s.tree(r.children("."+w),[c]),o.showLine&&(n[0]?(n.hasClass(L)||n.addClass(L),r.find("."+w).each(function(){p(this).children("."+m).last().addClass(F)}),(n.children("."+m).last().prev().hasClass(F)?n.children("."+m).last().prev():n.children("."+m).last()).removeClass(F),!r.parent("."+w)[0]&&r.next()[0]&&n.children("."+m).last().removeClass(F)):(l=r.siblings("."+m),a=1,c=r.parent("."+w),layui.each(l,function(e,i){p(i).children("."+w)[0]||(a=0)}),(1==a?(l.children("."+w).addClass(T),l.children("."+w).children("."+m).removeClass(F),r.children("."+w).addClass(T),c.removeClass(L),c.children("."+m).last().children("."+w).children("."+m).last()):r.children("."+w).children("."+m)).addClass(F))),!o.showCheckbox)return;h.find('input[same="layuiTreeCheck"]')[0].checked&&(r.children("."+w).children("."+m).last().find('input[same="layuiTreeCheck"]')[0].checked=!0),s.renderForm("checkbox")}else"update"==e?(l=h.children("."+g).html(),h.children("."+g).html(""),h.append(''),h.children(".layui-tree-editInput").val(l).focus(),i=function(e){var i=e.val().trim()||o.text.defaultNodeName;e.remove(),h.children("."+g).html(i),t.data[u.title]=i,o.operate&&o.operate(t)},h.children(".layui-tree-editInput").blur(function(){i(p(this))}),h.children(".layui-tree-editInput").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),i(p(this)))})):y.confirm('\u786e\u8ba4\u5220\u9664\u8be5\u8282\u70b9 "'+(d[u.title]||"")+'" \u5417\uff1f',function(e){var l,a,i;o.operate&&o.operate(t),t.status="remove",y.close(e),r.prev("."+m)[0]||r.next("."+m)[0]||r.parent("."+w)[0]?(r.siblings("."+m).children("."+x)[0]?(o.showCheckbox&&(l=function(e){var i,a,n,t;e.parents("."+m)[0]&&(i=e.siblings("."+m).children("."+x),a=(e=e.parent("."+w).prev()).find('input[same="layuiTreeCheck"]')[0],n=1,(t=0)==a.checked)&&(i.each(function(e,i){i=p(i).find('input[same="layuiTreeCheck"]')[0];0!=i.checked||i.disabled||(n=0),i.disabled||(t=1)}),1==n)&&1==t&&(a.checked=!0,s.renderForm("checkbox"),l(e.parent("."+m)))})(r),o.showLine&&(e=r.siblings("."+m),a=1,i=r.parent("."+w),layui.each(e,function(e,i){p(i).children("."+w)[0]||(a=0)}),1==a?(n[0]||(i.removeClass(L),e.children("."+w).addClass(T),e.children("."+w).children("."+m).removeClass(F)),(r.next()[0]?i.children("."+m).last():r.prev()).children("."+w).children("."+m).last().addClass(F),r.next()[0]||r.parents("."+m)[1]||r.parents("."+m).eq(0).next()[0]||r.prev("."+m).addClass(F)):!r.next()[0]&&r.hasClass(F)&&r.prev().addClass(F))):(e=r.parent("."+w).prev(),o.showLine?(e.find("."+k).removeClass("layui-tree-icon"),e.find("."+k).children(".layui-icon").removeClass(v).addClass("layui-icon-file"),(i=e.parents("."+w).eq(0)).addClass(L),i.children("."+m).each(function(){p(this).children("."+w).children("."+m).last().addClass(F)})):e.find(".layui-tree-iconArrow").addClass(f),r.parents("."+m).eq(0).removeClass(N),r.parent("."+w).remove()),r.remove()):(r.remove(),s.elem.append(s.elemNone))})})},l.prototype.events=function(){var i=this,t=i.config;i.elem.find(".layui-tree-checkedFirst");i.setChecked(i.checkids),i.elem.find(".layui-tree-search").on("keyup",function(){var e=p(this),a=e.val(),e=e.nextAll(),n=[];e.find("."+g).each(function(){var i,e=p(this).parents("."+x);-1!=p(this).html().indexOf(a)&&(n.push(p(this).parent()),(i=function(e){e.addClass("layui-tree-searchShow"),e.parent("."+w)[0]&&i(e.parent("."+w).parent("."+m))})(e.parent("."+m)))}),e.find("."+x).each(function(){var e=p(this).parent("."+m);e.hasClass("layui-tree-searchShow")||e.addClass(f)}),0==e.find(".layui-tree-searchShow").length&&i.elem.append(i.elemNone),t.onsearch&&t.onsearch({elem:n})}),i.elem.find(".layui-tree-search").on("keydown",function(){p(this).nextAll().find("."+x).each(function(){p(this).parent("."+m).removeClass("layui-tree-searchShow "+f)}),p(".layui-tree-emptyText")[0]&&p(".layui-tree-emptyText").remove()})},l.prototype.getChecked=function(){var t=this,e=t.config,l=e.customName,i=[],a=[],c=(t.elem.find(".layui-form-checked").each(function(){i.push(p(this).prev()[0].value)}),function(e,n){layui.each(e,function(e,a){layui.each(i,function(e,i){if(a[l.id]==i)return t.updateFieldValue(a,"checked",!0),delete(i=p.extend({},a))[l.children],n.push(i),a[l.children]&&(i[l.children]=[],c(a[l.children],i[l.children])),!0})})});return c(p.extend({},e.data),a),a},l.prototype.setChecked=function(l){this.config;this.elem.find("."+m).each(function(e,i){var a=p(this).data("id"),n=p(i).children("."+x).find('input[same="layuiTreeCheck"]'),t=n.next();if("number"==typeof l){if(a.toString()==l.toString())return n[0].checked||t.click(),!1}else"object"==typeof l&&layui.each(l,function(e,i){if(i.toString()==a.toString()&&!n[0].checked)return t.click(),!0})})},n.that={},n.config={},t.reload=function(e,i){e=n.that[e];return e.reload(i),n.call(e)},t.getChecked=function(e){return n.that[e].getChecked()},t.setChecked=function(e,i){return n.that[e].setChecked(i)},t.render=function(e){e=new l(e);return n.call(e)},e(a,t)});layui.define(["laytpl","form"],function(e){"use strict";var s=layui.$,n=layui.laytpl,t=layui.form,a="transfer",i={config:{},index:layui[a]?layui[a].index+1e4:0,set:function(e){var t=this;return t.config=s.extend({},t.config,e),t},on:function(e,t){return layui.onevent.call(this,a,e,t)}},l=function(){var t=this,e=t.config,a=e.id||t.index;return l.that[a]=t,{config:l.config[a]=e,reload:function(e){t.reload.call(t,e)},getData:function(){return t.getData.call(t)}}},d="layui-hide",h="layui-btn-disabled",r="layui-none",c="layui-transfer-box",u="layui-transfer-header",o="layui-transfer-search",f="layui-transfer-data",y=function(e){return['
      ','
      ','","
      ","{{# if(d.data.showSearch){ }}",'","{{# } }}",'
        ',"
        "].join("")},p=['
        ',y({index:0,checkAllName:"layTransferLeftCheckAll"}),'
        ','",'","
        ",y({index:1,checkAllName:"layTransferRightCheckAll"}),"
        "].join(""),v=function(e){var t=this;t.index=++i.index,t.config=s.extend({},t.config,i.config,e),t.render()};v.prototype.config={title:["\u5217\u8868\u4e00","\u5217\u8868\u4e8c"],width:200,height:360,data:[],value:[],showSearch:!1,id:"",text:{none:"\u65e0\u6570\u636e",searchNone:"\u65e0\u5339\u914d\u6570\u636e"}},v.prototype.reload=function(e){var t=this;t.config=s.extend({},t.config,e),t.render()},v.prototype.render=function(){var e=this,t=e.config,a=e.elem=s(n(p,{open:"{{",close:"}}"}).render({data:t,index:e.index})),i=t.elem=s(t.elem);i[0]&&(t.data=t.data||[],t.value=t.value||[],t.id="id"in t?t.id:elem.attr("id")||e.index,e.key=t.id,i.html(e.elem),e.layBox=e.elem.find("."+c),e.layHeader=e.elem.find("."+u),e.laySearch=e.elem.find("."+o),e.layData=a.find("."+f),e.layBtn=a.find(".layui-transfer-active .layui-btn"),e.layBox.css({width:t.width,height:t.height}),e.layData.css({height:(i=t.height-e.layHeader.outerHeight(),t.showSearch&&(i-=e.laySearch.outerHeight()),i-2)}),e.renderData(),e.events())},v.prototype.renderData=function(){var e=this,t=e.config,l=[{checkName:"layTransferLeftCheck",views:[]},{checkName:"layTransferRightCheck",views:[]}];e.parseData(function(a){var i=a.selected?1:0,n=["
      • ",'',"
      • "].join("");i?layui.each(t.value,function(e,t){t==a.value&&a.selected&&(l[i].views[e]=n)}):l[i].views.push(n),delete a.selected}),e.layData.eq(0).html(l[0].views.join("")),e.layData.eq(1).html(l[1].views.join("")),e.renderCheckBtn()},v.prototype.renderForm=function(e){t.render(e,"LAY-transfer-"+this.index)},v.prototype.renderCheckBtn=function(r){var c=this,o=c.config;r=r||{},c.layBox.each(function(e){var t=s(this),a=t.find("."+f),t=t.find("."+u).find('input[type="checkbox"]'),i=a.find('input[type="checkbox"]'),n=0,l=!1;i.each(function(){var e=s(this).data("hide");(this.checked||this.disabled||e)&&n++,this.checked&&!e&&(l=!0)}),t.prop("checked",l&&n===i.length),c.layBtn.eq(e)[l?"removeClass":"addClass"](h),r.stopNone||(i=a.children("li:not(."+d+")").length,c.noneView(a,i?"":o.text.none))}),c.renderForm("checkbox")},v.prototype.noneView=function(e,t){var a=s('

        '+(t||"")+"

        ");e.find("."+r)[0]&&e.find("."+r).remove(),t.replace(/\s/g,"")&&e.append(a)},v.prototype.setValue=function(){var e=this.config,t=[];return this.layBox.eq(1).find("."+f+' input[type="checkbox"]').each(function(){s(this).data("hide")||t.push(this.value)}),e.value=t,this},v.prototype.parseData=function(t){var i=this.config,n=[];return layui.each(i.data,function(e,a){a=("function"==typeof i.parseData?i.parseData(a):a)||a,n.push(a=s.extend({},a)),layui.each(i.value,function(e,t){t==a.value&&(a.selected=!0)}),t&&t(a)}),i.data=n,this},v.prototype.getData=function(e){var t=this.config,i=[];return this.setValue(),layui.each(e||t.value,function(e,a){layui.each(t.data,function(e,t){delete t.selected,a==t.value&&i.push(t)})}),i},v.prototype.transfer=function(e,t){var a,i=this,n=i.config,l=i.layBox.eq(e),r=[],t=(t?((a=(t=t).find('input[type="checkbox"]'))[0].checked=!1,l.siblings("."+c).find("."+f).append(t.clone()),t.remove(),r.push(a[0].value),i.setValue()):l.each(function(e){s(this).find("."+f).children("li").each(function(){var e=s(this),t=e.find('input[type="checkbox"]'),a=t.data("hide");t[0].checked&&!a&&(t[0].checked=!1,l.siblings("."+c).find("."+f).append(e.clone()),e.remove(),r.push(t[0].value)),i.setValue()})}),i.renderCheckBtn(),l.siblings("."+c).find("."+o+" input"));""!==t.val()&&t.trigger("keyup"),n.onchange&&n.onchange(i.getData(r),e)},v.prototype.events=function(){var n=this,l=n.config;n.elem.on("click",'input[lay-filter="layTransferCheckbox"]+',function(){var e=s(this).prev(),t=e[0].checked,a=e.parents("."+c).eq(0).find("."+f);e[0].disabled||("all"===e.attr("lay-type")&&a.find('input[type="checkbox"]').each(function(){this.disabled||(this.checked=t)}),setTimeout(function(){n.renderCheckBtn({stopNone:!0})},0))}),n.elem.on("dblclick","."+f+">li",function(e){var t=s(this),a=t.children('input[type="checkbox"]'),i=t.parent().parent();a[0].disabled||n.transfer(i.data("index"),t)}),n.layBtn.on("click",function(){var e=s(this),t=e.data("index");e.hasClass(h)||n.transfer(t)}),n.laySearch.find("input").on("keyup",function(){var i=this.value,e=s(this).parents("."+o).eq(0).siblings("."+f),t=e.children("li"),t=(t.each(function(){var e=s(this),t=e.find('input[type="checkbox"]'),a=t[0].title,a=("cs"!==l.showSearch&&(a=a.toLowerCase(),i=i.toLowerCase()),-1!==a.indexOf(i));e[a?"removeClass":"addClass"](d),t.data("hide",!a)}),n.renderCheckBtn(),t.length===e.children("li."+d).length);n.noneView(e,t?l.text.searchNone:"")})},l.that={},l.config={},i.reload=function(e,t){e=l.that[e];return e.reload(t),l.call(e)},i.getData=function(e){return l.that[e].getData()},i.render=function(e){e=new v(e);return l.call(e)},e(a,i)});layui.define(["jquery","lay"],function(e){"use strict";var a=layui.$,t=layui.lay,o=(layui.hint(),layui.device(),{config:{},set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,i){return layui.onevent.call(this,r,e,i)}}),r="carousel",d="layui-this",s="layui-carousel-left",u="layui-carousel-right",c="layui-carousel-prev",m="layui-carousel-next",l="layui-carousel-arrow",f="layui-carousel-ind",i=function(e){var i=this;i.config=a.extend({},i.config,o.config,e),i.render()};i.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},i.prototype.render=function(){var e=this,i=e.config,n=a(i.elem);if(1*[carousel-item]>*"),i.index<0&&(i.index=0),i.index>=e.elemItem.length&&(i.index=e.elemItem.length-1),i.interval<800&&(i.interval=800),i.full?i.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):i.elem.css({width:i.width,height:i.height}),i.elem.attr("lay-anim",i.anim),e.elemItem.eq(i.index).addClass(d),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},i.prototype.reload=function(e){var i=this;clearInterval(i.timer),i.config=a.extend({},i.config,e),i.render()},i.prototype.prevIndex=function(){var e=this.config.index-1;return e=e<0?this.elemItem.length-1:e},i.prototype.nextIndex=function(){var e=this.config.index+1;return e=e>=this.elemItem.length?0:e},i.prototype.addIndex=function(e){var i=this.config;i.index=i.index+(e=e||1),i.index>=this.elemItem.length&&(i.index=0)},i.prototype.subIndex=function(e){var i=this.config;i.index=i.index-(e=e||1),i.index<0&&(i.index=this.elemItem.length-1)},i.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(clearInterval(e.timer),e.timer=setInterval(function(){e.slide()},i.interval))},i.prototype.arrow=function(){var i=this,e=i.config,n=a(['",'"].join(""));e.elem.attr("lay-arrow",e.arrow),e.elem.find("."+l)[0]&&e.elem.find("."+l).remove(),e.elem.append(n),n.on("click",function(){var e=a(this).attr("lay-type");i.slide(e)})},i.prototype["goto"]=function(e){var i=this,n=i.config;e>n.index?i.slide("add",e-n.index):e
          ',(i=[],layui.each(e.elemItem,function(e){i.push("")}),i.join("")),"
        "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+f)[0]&&n.elem.find("."+f).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-t.height()/2),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){e["goto"](a(this).index())})},i.prototype.slide=function(e,i){var n=this,t=n.elemItem,a=n.config,o=a.index,l=a.elem.attr("lay-filter");n.haveSlide||("sub"===e?(n.subIndex(i),t.eq(a.index).addClass(c),setTimeout(function(){t.eq(o).addClass(u),t.eq(a.index).addClass(u)},50)):(n.addIndex(i),t.eq(a.index).addClass(m),setTimeout(function(){t.eq(o).addClass(s),t.eq(a.index).addClass(s)},50)),setTimeout(function(){t.removeClass(d+" "+c+" "+m+" "+s+" "+u),t.eq(a.index).addClass(d),n.haveSlide=!1},350),n.elemInd.find("li").eq(a.index).addClass(d).siblings().removeClass(d),n.haveSlide=!0,e={index:a.index,prevIndex:o,item:t.eq(a.index)},"function"==typeof a.change&&a.change(e),layui.event.call(this,r,"change("+l+")",e))},i.prototype.events=function(){var e=this,i=e.config;i.elem.data("haveEvents")||(i.elem.on("mouseenter",function(){"always"!==e.config.autoplay&&clearInterval(e.timer)}).on("mouseleave",function(){"always"!==e.config.autoplay&&e.autoplay()}),i.elem.data("haveEvents",!0))},o.render=function(e){return new i(e)},e(r,o)});layui.define(["jquery","lay"],function(e){"use strict";var s=layui.jquery,r=layui.lay,c={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var a=this;return a.config=s.extend({},a.config,e),a},on:function(e,a){return layui.onevent.call(this,l,e,a)}},l="rate",f="layui-icon-rate",h="layui-icon-rate-solid",o="layui-icon-rate-half",u="layui-icon-rate-solid layui-icon-rate-half",v="layui-icon-rate layui-icon-rate-half",a=function(e){var a=this;a.index=++c.index,a.config=s.extend({},a.config,c.config,e),a.render()};a.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},a.prototype.render=function(){var e=this,a=e.config,l=s(a.elem);if(1a.length&&(a.value=a.length),parseInt(a.value)===a.value||a.half||(a.value=Math.ceil(a.value)-a.value<.5?Math.ceil(a.value):Math.floor(a.value)),'
          "),t=1;t<=a.length;t++){var o='
        • ";a.half&&parseInt(a.value)!==a.value&&t==Math.ceil(a.value)?n=n+'
        • ":n+=o}n+="
        "+(a.text?''+a.value+"\u661f":"")+"";var l=a.elem,u=l.next(".layui-rate");u[0]&&u.remove(),e.elemTemp=s(n),a.span=e.elemTemp.next("span"),a.setText&&a.setText(a.value),l.html(e.elemTemp),l.addClass("layui-inline"),a.readonly||e.action()},a.prototype.setvalue=function(e){this.config.value=e,this.render()},a.prototype.action=function(){var i=this.config,n=this.elemTemp,t=n.find("i").width();n.children("li").each(function(e){var a=e+1,l=s(this);l.on("click",function(e){i.value=a,i.half&&e.pageX-s(this).offset().left<=t/2&&(i.value=i.value-.5),i.text&&n.next("span").text(i.value+"\u661f"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),l.on("mousemove",function(e){n.find("i").each(function(){s(this).addClass(f).removeClass(u)}),n.find("i:lt("+a+")").each(function(){s(this).addClass(h).removeClass(v)}),i.half&&e.pageX-s(this).offset().left<=t/2&&l.children("i").addClass(o).removeClass(h)}),l.on("mouseleave",function(){n.find("i").each(function(){s(this).addClass(f).removeClass(u)}),n.find("i:lt("+Math.floor(i.value)+")").each(function(){s(this).addClass(h).removeClass(v)}),i.half&&parseInt(i.value)!==i.value&&n.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(o).removeClass("layui-icon-rate-solid layui-icon-rate")})})},a.prototype.events=function(){},c.render=function(e){e=new a(e);return function(){var a=this;return{setvalue:function(e){a.setvalue.call(a,e)},config:a.config}}.call(e)},e(l,c)});layui.define("jquery",function(l){"use strict";var g=layui.$,e=function(l){};e.prototype.load=function(l){var t,i,o,n,e,r,a,c,m,s,u,f,y,d=this,p=0,h=g((l=l||{}).elem);if(h[0])return e=g(l.scrollElem||document),r=l.mb||50,a=!("isAuto"in l)||l.isAuto,c=l.end||"\u6ca1\u6709\u66f4\u591a\u4e86",m=l.scrollElem&&l.scrollElem!==document,u=g('"),h.find(".layui-flow-more")[0]||h.append(u),f=function(l,e){l=g(l),u.before(l),(e=0==e||null)?u.html(c):u.find("a").html(s),i=e,t=null,o&&o()},(y=function(){t=!0,u.find("a").html(''),"function"==typeof l.done&&l.done(++p,f)})(),u.find("a").on("click",function(){g(this);i||t||y()}),l.isLazyimg&&(o=d.lazyimg({elem:l.elem+" img",scrollElem:l.scrollElem})),a&&e.on("scroll",function(){var e=g(this),o=e.scrollTop();n&&clearTimeout(n),!i&&h.width()&&(n=setTimeout(function(){var l=(m?e:g(window)).height();(m?e.prop("scrollHeight"):document.documentElement.scrollHeight)-o-l<=r&&(t||y())},100))}),d},e.prototype.lazyimg=function(l){var e,c=this,m=0,s=g((l=l||{}).scrollElem||document),u=l.elem||"img",f=l.scrollElem&&l.scrollElem!==document,y=function(e,l){var o,t=s.scrollTop(),l=t+l,i=f?e.offset().top-s.offset().top+t:e.offset().top;t<=i&&i<=l&&e.attr("lay-src")&&(o=e.attr("lay-src"),layui.img(o,function(){var l=c.lazyimg.elem.eq(m);e.attr("src",o).removeAttr("lay-src"),l[0]&&n(l),m++},function(){c.lazyimg.elem.eq(m);e.removeAttr("lay-src")}))},n=function(l,e){var o=(f?e||s:g(window)).height(),t=s.scrollTop(),i=t+o;if(c.lazyimg.elem=g(u),l)y(l,o);else for(var n=0;n"),preview:"Preview"},wordWrap:!0,lang:"text",highlighter:!1,langMarker:!1},W=layui.code?layui.code.index+1e4:0,R=function(e){return String(e).replace(/\s+$/,"").replace(/^\n|\n$/,"")};e("code",function(l,e){var o,i,t,a,n,d,c,s,r,u,y,p,E,f,h,v,m,L,_,M,C,g={config:l=x.extend(!0,{},T,l),reload:function(e){layui.code(this.updateOptions(e))},updateOptions:function(e){return delete(e=e||{}).elem,x.extend(!0,l,e)},reloadCode:function(e){layui.code(this.updateOptions(e),"reloadCode")}},w=x(l.elem);return 1',l.ln?['
        ',D.digit(t+1)+".","
        "].join(""):"",'
        ',e||" ","
        ",""].join("")})}},a=l.code,n=function(e){return"function"==typeof l.codeParse?l.codeParse(e,l):e},"reloadCode"===e?o.children(".layui-code-wrap").html(w(n(a)).html):(d=layui.code.index=++W,o.attr("lay-code-index",d),(M=A.CDDE_DATA_CLASS in o.data())&&o.attr("class",o.data(A.CDDE_DATA_CLASS)||""),M||o.data(A.CDDE_DATA_CLASS,o.attr("class")),c={copy:{className:"file-b",title:["\u590d\u5236\u4ee3\u7801"],event:function(e){var t=D.unescape(n(l.code));lay.clipboard.writeText({text:t,done:function(){N.msg("\u5df2\u590d\u5236",{icon:1})},error:function(){N.msg("\u590d\u5236\u5931\u8d25",{icon:2})}}),"function"==typeof l.onCopy&&l.onCopy(t)}}},function b(){var e=o.parent("."+A.ELEM_PREVIEW),t=e.children("."+A.ELEM_TAB),a=e.children("."+A.ELEM_ITEM+"-preview");return t.remove(),a.remove(),e[0]&&o.unwrap(),b}(),l.preview&&(M="LAY-CODE-DF-"+d,f=l.layout||["code","preview"],s="iframe"===l.preview,E=x('
        '),C=x('
        '),r=x('
        '),_=x('
        '),u=x('
        '),l.id&&E.attr("id",l.id),E.addClass(l.className),C.attr("lay-filter",M),layui.each(f,function(e,t){var a=x('
      • ');0===e&&a.addClass("layui-this"),a.html(l.text[t]),r.append(a)}),x.extend(c,{full:{className:"screen-full",title:["\u6700\u5927\u5316\u663e\u793a","\u8fd8\u539f\u663e\u793a"],event:function(e){var e=e.elem,t=e.closest("."+A.ELEM_PREVIEW),a="layui-icon-"+this.className,i="layui-icon-screen-restore",l=this.title,o=x("html,body"),n="layui-scrollbar-hide";e.hasClass(a)?(t.addClass(A.ELEM_FULL),e.removeClass(a).addClass(i),e.attr("title",l[1]),o.addClass(n)):(t.removeClass(A.ELEM_FULL),e.removeClass(i).addClass(a),e.attr("title",l[0]),o.removeClass(n))}},window:{className:"release",title:["\u5728\u65b0\u7a97\u53e3\u9884\u89c8"],event:function(e){D.openWin({content:n(l.code)})}}}),l.copy&&("array"===layui.type(l.tools)?-1===l.tools.indexOf("copy")&&l.tools.unshift("copy"):l.tools=["copy"]),u.on("click",">i",function(){var e=x(this),t=e.data("type"),e={elem:e,type:t,options:l,rawCode:l.code,finalCode:D.unescape(n(l.code))};c[t]&&"function"==typeof c[t].event&&c[t].event(e),"function"==typeof l.toolsEvent&&l.toolsEvent(e)}),l.addTools&&l.tools&&(l.tools=[].concat(l.tools,l.addTools)),layui.each(l.tools,function(e,t){var a="object"==typeof t,i=a?t:c[t]||{className:t,title:[t]},l=i.className||i.type,o=i.title||[""],a=a?i.type||l:t;a&&(c[a]||((t={})[a]=i,x.extend(c,t)),u.append(''))}),o.addClass(A.ELEM_ITEM).wrap(E),C.append(r),l.tools&&C.append(u),o.before(C),s&&_.html(''),y=function(e){var t=e.children("iframe")[0];s&&t?t.srcdoc=n(l.code):e.html(l.code),setTimeout(function(){"function"==typeof l.done&&l.done({container:e,options:l,render:function(){I.render(e.find(".layui-form")),S.render()}})},3)},"preview"===f[0]?(_.addClass(A.ELEM_SHOW),o.before(_),y(_)):o.addClass(A.ELEM_SHOW).after(_),l.previewStyle=[l.style,l.previewStyle].join(""),_.attr("style",l.previewStyle),S.on("tab("+M+")",function(e){var t=x(this),a=x(e.elem).closest("."+A.ELEM_PREVIEW).find("."+A.ELEM_ITEM),e=a.eq(e.index);a.removeClass(A.ELEM_SHOW),e.addClass(A.ELEM_SHOW),"preview"===t.attr("lay-id")&&y(e),L()})),p=x(''),o.addClass((E=["layui-code-view layui-border-box"],l.wordWrap||E.push("layui-code-nowrap"),E.join(" "))),(C=l.theme||l.skin)&&(o.removeClass("layui-code-theme-dark layui-code-theme-light"),o.addClass("layui-code-theme-"+C)),l.highlighter&&o.addClass([l.highlighter,"language-"+l.lang,"layui-code-hl"].join(" ")),f=w(l.encode?D.escape(n(a)):a),h=f.lines,o.html(p.html(f.html)),l.ln&&o.append('
        '),l.height&&p.css("max-height",l.height),l.codeStyle=[l.style,l.codeStyle].join(""),l.codeStyle&&p.attr("style",function(e,t){return(t||"")+l.codeStyle}),v=[{selector:">.layui-code-wrap>.layui-code-line{}",setValue:function(e,t){e.style["padding-left"]=t+"px"}},{selector:">.layui-code-wrap>.layui-code-line>.layui-code-line-number{}",setValue:function(e,t){e.style.width=t+"px"}},{selector:">.layui-code-ln-side{}",setValue:function(e,t){e.style.width=t+"px"}}],m=lay.style({target:o[0],id:"DF-code-"+d,text:x.map(x.map(v,function(e){return e.selector}),function(e,t){return['.layui-code-view[lay-code-index="'+d+'"]',e].join(" ")}).join("")}),L=function b(){var e,i;return l.ln&&(e=Math.floor(h.length/100),i=p.children("."+A.ELEM_LINE).last().children("."+A.ELEM_LINE_NUM).outerWidth(),o.addClass(A.ELEM_LN_MODE),e)&&A.LINE_RAW_WIDTH
      • ')).html(l.title||l.text.code),o.prepend(_)),M=x('
        '),l.copy&&!l.preview&&((C=x(['','',""].join(""))).on("click",function(){c.copy.event()}),M.append(C)),l.langMarker&&M.append(''+l.lang+""),l.about&&M.append(l.about),o.append(M),l.preview||setTimeout(function(){"function"==typeof l.done&&l.done({})},3),l.elem.length===1+d&&"function"==typeof l.allDone&&l.allDone())),g})}),layui["layui.all"]||layui.addcss("modules/code.css?v=6","skincodecss"); +/** v2.8.18-rc.4 | MIT Licensed */;!function(d){"use strict";var t,h=d.document,m={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.8.18-rc.4"},e=d.LAYUI_GLOBAL||{},v=(t=h.currentScript?h.currentScript.src:function(){for(var t,e=h.scripts,o=e.length-1,n=o;01e3*m.timeout/4?g(s+" is not a valid module","error"):void(m.status[s]?y():setTimeout(n,4))}())}function y(){e.push(layui[s]),11e3*m.timeout/4?g(s+" is not a valid module","error"):void("string"==typeof m.modules[s]&&m.status[s]?y():setTimeout(f,4))}():((r=h.createElement("script"))["async"]=!0,r.charset="utf-8",r.src=i+((u=!0===m.version?m.v||(new Date).getTime():m.version||"")?"?v="+u:""),l.appendChild(r),!r.attachEvent||r.attachEvent.toString&&r.attachEvent.toString().indexOf("[native code")<0||b?r.addEventListener("load",function(t){p(t,i)},!1):r.attachEvent("onreadystatechange",function(t){p(t,i)}),m.modules[s]=i)),a},n.prototype.disuse=function(t){var o=this;return t=o.isArray(t)?t:[t],o.each(t,function(t,e){m.status[e],delete o[e],delete N[e],delete o.modules[e],delete m.status[e],delete m.modules[e]}),o},n.prototype.getStyle=function(t,e){t=t.currentStyle||d.getComputedStyle(t,null);return t[t.getPropertyValue?"getPropertyValue":"getAttribute"](e)},n.prototype.link=function(o,n,t){var r=this,e=h.getElementsByTagName("head")[0],i=h.createElement("link"),a="layuicss-"+((t="string"==typeof n?n:t)||o).replace(/\.|\//g,""),u="creating",l=0;return i.href=o+(m.debug?"?v="+(new Date).getTime():""),i.rel="stylesheet",i.id=a,i.media="all",h.getElementById(a)||e.appendChild(i),"function"==typeof n&&function s(t){var e=h.getElementById(a);return++l>1e3*m.timeout/100?g(o+" timeout"):void(1989===parseInt(r.getStyle(e,"width"))?(t===u&&e.removeAttribute("lay-status"),e.getAttribute("lay-status")===u?setTimeout(s,100):n()):(e.setAttribute("lay-status",u),setTimeout(function(){s(u)},100)))}(),r},n.prototype.addcss=function(t,e,o){return layui.link(m.dir+"css/"+t,e,o)},m.callback={},n.prototype.factory=function(t){if(layui[t])return"function"==typeof m.callback[t]?m.callback[t]:null},n.prototype.img=function(t,e,o){var n=new Image;if(n.src=t,n.complete)return e(n);n.onload=function(){n.onload=null,"function"==typeof e&&e(n)},n.onerror=function(t){n.onerror=null,"function"==typeof o&&o(t)}},n.prototype.config=function(t){for(var e in t=t||{})m[e]=t[e];return this},n.prototype.modules=function(){var t,e={};for(t in N)e[t]=N[t];return e}(),n.prototype.extend=function(t){for(var e in t=t||{})this[e]||this.modules[e]?g(e+" Module already exists","error"):this.modules[e]=t[e];return this},n.prototype.router=n.prototype.hash=function(t){var o={path:[],search:{},hash:((t=t||location.hash).match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(t)&&(t=t.replace(/^#\//,""),o.href="/"+t,t=t.replace(/([^#])(#.*$)/,"$1").split("/")||[],this.each(t,function(t,e){/^\w+=/.test(e)?(e=e.split("="),o.search[e[0]]=e[1]):o.path.push(e)})),o},n.prototype.url=function(t){var r,e,o=this;return{pathname:(t?((t.match(/\.[^.]+?\/.+/)||[])[0]||"").replace(/^[^\/]+/,"").replace(/\?.+/,""):location.pathname).replace(/^\//,"").split("/"),search:(r={},e=(t?((t.match(/\?.+/)||[])[0]||"").replace(/\#.+/,""):location.search).replace(/^\?+/,"").split("&"),o.each(e,function(t,e){var o=e.indexOf("="),n=o<0?e.substr(0,e.length):0!==o&&e.substr(0,o);n&&(r[n]=0(s.innerHeight||h.documentElement.clientHeight)},d.getStyleRules=function(t,n){if(t)return t=(t=t.sheet||t.styleSheet||{}).cssRules||t.rules,"function"==typeof n&&layui.each(t,function(t,e){if(n(e,t))return!0}),t},d.style=function(t){t=t||{};var e=d.elem("style"),n=t.text||"",i=t.target;if(n)return"styleSheet"in e?(e.setAttribute("type","text/css"),e.styleSheet.cssText=n):e.innerHTML=n,e.id="LAY-STYLE-"+(t.id||(n=d.style.index||0,d.style.index++,"DF-"+n)),i&&((t=d(i).find("#"+e.id))[0]&&t.remove(),d(i).append(e)),e},d.position=function(t,e,n){var i,r,o,c,u,a,f,l;e&&(n=n||{},t!==h&&t!==d("body")[0]||(n.clickType="right"),i="right"===n.clickType?{left:(i=n.e||s.event||{}).clientX,top:i.clientY,right:i.clientX,bottom:i.clientY}:t.getBoundingClientRect(),f=e.offsetWidth,l=e.offsetHeight,r=function(t){return h.body[t=t?"scrollLeft":"scrollTop"]|h.documentElement[t]},o=function(t){return h.documentElement[t?"clientWidth":"clientHeight"]},c="margin"in n?n.margin:5,u=i.left,a=i.bottom,"center"===n.align?u-=(f-t.offsetWidth)/2:"right"===n.align&&(u=u-f+t.offsetWidth),(u=u+f+c>o("width")?o("width")-f-c:u)o()&&(i.top>l+c&&i.top<=o()?a=i.top-l-2*c:n.allowBottomOut||(a=o()-l-2*c)<0&&(a=0)),(f=n.position)&&(e.style.position=f),e.style.left=u+("fixed"===f?0:r(1))+"px",e.style.top=a+("fixed"===f?0:r())+"px",d.hasScrollbar()||(l=e.getBoundingClientRect(),!n.SYSTEM_RELOAD&&l.bottom+c>o()&&(n.SYSTEM_RELOAD=!0,setTimeout(function(){d.position(t,e,n)},50))))},d.options=function(t,e){if(e="object"==typeof e?e:{attr:e},t===h)return{};var t=d(t),n=e.attr||"lay-options",t=t.attr(n);try{return new Function("return "+(t||"{}"))()}catch(i){return layui.hint().error(e.errorText||[n+'="'+t+'"',"\n parseerror: "+i].join("\n"),"error"),{}}},d.isTopElem=function(n){var t=[h,d("body")[0]],i=!1;return d.each(t,function(t,e){if(e===n)return i=!0}),i},d.clipboard={writeText:function(t){var e=String(t.text);try{navigator.clipboard.writeText(e).then(t.done)["catch"](t.error)}catch(i){var n=h.createElement("textarea");n.value=e,n.style.position="fixed",n.style.opacity="0",n.style.top="0px",n.style.left="0px",h.body.appendChild(n),n.select();try{h.execCommand("copy"),"function"==typeof t.done&&t.done()}catch(r){"function"==typeof t.error&&t.error(r)}finally{n.remove?n.remove():h.body.removeChild(n)}}}},r.addStr=function(n,t){return n=n.replace(/\s+/," "),t=t.replace(/\s+/," ").split(" "),d.each(t,function(t,e){new RegExp("\\b"+e+"\\b").test(n)||(n=n+" "+e)}),n.replace(/^\s|\s$/,"")},r.removeStr=function(n,t){return n=n.replace(/\s+/," "),t=t.replace(/\s+/," ").split(" "),d.each(t,function(t,e){e=new RegExp("\\b"+e+"\\b");e.test(n)&&(n=n.replace(e,""))}),n.replace(/\s+/," ").replace(/^\s|\s$/,"")},r.fn.find=function(n){var i=[],r="object"==typeof n;return this.each(function(t,e){e=r&&e.contains(n)?n:e.querySelectorAll(n||null);d.each(e,function(t,e){i.push(e)})}),d(i)},r.fn.each=function(t){return d.each.call(this,this,t)},r.fn.addClass=function(n,i){return this.each(function(t,e){e.className=r[i?"removeStr":"addStr"](e.className,n)})},r.fn.removeClass=function(t){return this.addClass(t,!0)},r.fn.hasClass=function(n){var i=!1;return this.each(function(t,e){new RegExp("\\b"+n+"\\b").test(e.className)&&(i=!0)}),i},r.fn.css=function(e,i){var t=this,r=function(t){return isNaN(t)?t:t+"px"};return"string"!=typeof e||i!==undefined?t.each(function(t,n){"object"==typeof e?d.each(e,function(t,e){n.style[t]=r(e)}):n.style[e]=r(i)}):0]|&(?=#[a-zA-Z0-9]+)/g.test(e+="")?e.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,"""):e}},i=function(e){return new RegExp(e,"g")},u=function(e,r){var n="Laytpl Error: ";return"object"==typeof console&&console.error(n+e+"\n"+(r||"")),n+e},n=function(e,r){var n=this,e=(n.config=n.config||{},n.template=e,function(e){for(var r in e)n.config[r]=e[r]});e(c),e(r)},r=(n.prototype.tagExp=function(e,r,n){var c=this.config;return i((r||"")+c.open+["#([\\s\\S])+?","([^{#}])*?"][e||0]+c.close+(n||""))},n.prototype.parse=function(e,r){var n=this,c=n.config,t=e,o=i("^"+c.open+"#",""),p=i(c.close+"$","");if("string"!=typeof e)return e;e='"use strict";var view = "'+(e=e.replace(/\s+|\r|\t|\n/g," ").replace(i(c.open+"#"),c.open+"# ").replace(i(c.close+"}"),"} "+c.close).replace(/\\/g,"\\\\").replace(i(c.open+"!(.+?)!"+c.close),function(e){return e=e.replace(i("^"+c.open+"!"),"").replace(i("!"+c.close),"").replace(i(c.open+"|"+c.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(n.tagExp(),function(e){return'";'+(e=e.replace(o,"").replace(p,"")).replace(/\\(.)/g,"$1")+';view+="'}).replace(n.tagExp(1),function(e){var r='"+laytpl.escape(';return e.replace(/\s/g,"")===c.open+c.close?"":(e=e.replace(i(c.open+"|"+c.close),""),/^=/.test(e)?e=e.replace(/^=/,""):/^-/.test(e)&&(e=e.replace(/^-/,""),r='"+('),r+e.replace(/\\(.)/g,"$1")+')+"')}))+'";return view;';try{return n.cache=e=new Function("d, laytpl",e),e(r,l)}catch(a){return delete n.cache,u(a,t)}},n.prototype.render=function(e,r){e=e||{};var n=this,e=n.cache?n.cache(e,l):n.parse(n.template,e);return"function"==typeof r&&r(e),e},function(e,r){return new n(e,r)});r.config=function(e){for(var r in e=e||{})c[r]=e[r]},r.v="2.0.0",e("laytpl",r)});layui.define(function(e){"use strict";var r=document,u="getElementById",c="getElementsByTagName",a="layui-disabled",t=function(e){var a=this;a.config=e||{},a.config.index=++o.index,a.render(!0)},o=(t.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return e.elem.length===undefined?2:3},t.prototype.view=function(){var e,i,t,n=this.config,r=n.groups="groups"in n?Number(n.groups)||0:5,u=(n.layout="object"==typeof n.layout?n.layout:["prev","page","next"],n.count=Number(n.count)||0,n.curr=Number(n.curr)||1,n.limits="object"==typeof n.limits?n.limits:[10,20,30,40,50],n.limit=Number(n.limit)||10,n.pages=Math.ceil(n.count/n.limit)||1,n.curr>n.pages?n.curr=n.pages:n.curr<1&&(n.curr=1),r<0?r=1:r>n.pages&&(r=n.pages),n.prev="prev"in n?n.prev:"上一页",n.next="next"in n?n.next:"下一页",n.pages>r?Math.ceil((n.curr+(1'+n.prev+"":"",page:function(){var e=[];if(n.count<1)return"";1'+(n.first||1)+"");var a=Math.floor((r-1)/2),t=1n.pages?n.pages:a:r;for(i-t…');t<=i;t++)t===n.curr?e.push('"+t+""):e.push(''+t+"");return n.pages>r&&n.pages>i&&!1!==n.last&&(i+1…'),0!==r)&&e.push(''+(n.last||n.pages)+""),e.join("")}(),next:n.next?''+n.next+"":"",count:'\u5171 '+n.count+" \u6761",limit:(i=['"),refresh:['','',""].join(""),skip:[''+(e="object"==typeof n.skipText?n.skipText:["到第","页","确定"])[0],'',e[1]+'",""].join("")};return['
        ',(t=[],layui.each(n.layout,function(e,a){l[a]&&t.push(l[a])}),t.join("")),"
        "].join("")},t.prototype.jump=function(e,a){if(e){var t=this,i=t.config,n=e.children,r=e[c]("button")[0],u=e[c]("input")[0],e=e[c]("select")[0],l=function(){var e=Number(u.value.replace(/\s|\D/g,""));e&&(i.curr=e,t.render())};if(a)return l();for(var s=0,p=n.length;si.pages||(i.curr=e,t.render())});e&&o.on(e,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),r&&o.on(r,"click",function(){l()})}},t.prototype.skip=function(t){var i,e;t&&(i=this,e=t[c]("input")[0])&&o.on(e,"keyup",function(e){var a=this.value,e=e.keyCode;/^(37|38|39|40)$/.test(e)||(/\D/.test(a)&&(this.value=a.replace(/\D/,"")),13===e&&i.jump(t,!0))})},t.prototype.render=function(e){var a=this,t=a.config,i=a.type(),n=a.view(),i=(2===i?t.elem&&(t.elem.innerHTML=n):3===i?t.elem.html(n):r[u](t.elem)&&(r[u](t.elem).innerHTML=n),t.jump&&t.jump(t,e),r[u]("layui-laypage-"+t.index));a.jump(i),t.hash&&!e&&(location.hash="!"+t.hash+"="+t.curr),a.skip(i)},{render:function(e){return new t(e).index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(a,e,t){return a.attachEvent?a.attachEvent("on"+e,function(e){e.target=e.srcElement,t.call(a,e)}):a.addEventListener(e,t,!1),this}});e("laypage",o)});!function(i,v){"use strict";var n=i.layui&&layui.define,l={getPath:i.lay&&lay.getPath?lay.getPath:"",link:function(e,t,a){D.path&&i.lay&&lay.layui&&lay.layui.link(D.path+e,t,a)}},e=i.LAYUI_GLOBAL||{},d="layui-laydate-id",D={v:"5.5.0",config:{weekStart:0},index:i.laydate&&i.laydate.v?1e5:0,path:e.laydate_dir||l.getPath,set:function(e){var t=this;return t.config=lay.extend({},t.config,e),t},ready:function(e){var t="laydate",a=(n?"modules/":"")+"laydate.css?v="+D.v;return n?layui["layui.all"]?"function"==typeof e&&e():layui.addcss(a,e,t):l.link(a,e,t),this}},s=function(){var t=this,e=t.config.id;return(s.that[e]=t).inst={hint:function(e){t.hint.call(t,e)},reload:function(e){t.reload.call(t,e)},config:t.config}},a="laydate",x="layui-this",k="laydate-disabled",h=[100,2e5],T="layui-laydate-static",w="layui-laydate-list",o="laydate-selected",r="layui-laydate-hint",y="laydate-day-prev",m="laydate-day-next",C=".laydate-btns-confirm",M="laydate-time-text",L="laydate-btns-time",E="layui-laydate-preview",S="layui-laydate-shade",I=function(e){var t,a=this,n=(a.index=++D.index,a.config=lay.extend({},a.config,D.config,e),lay(e.elem||a.config.elem));return 1\u8bf7\u91cd\u65b0\u9009\u62e9",invalidDate:"\u4e0d\u5728\u6709\u6548\u65e5\u671f\u6216\u65f6\u95f4\u8303\u56f4\u5185",formatError:["\u65e5\u671f\u683c\u5f0f\u4e0d\u5408\u6cd5
        \u5fc5\u987b\u9075\u5faa\u4e0b\u8ff0\u683c\u5f0f\uff1a
        ","
        \u5df2\u4e3a\u4f60\u91cd\u7f6e"],preview:"\u5f53\u524d\u9009\u4e2d\u7684\u7ed3\u679c"},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\uff1a
        ","
        It has been reset"],preview:"The selected result"}};return e[this.config.lang]||e.cn},I.prototype.reload=function(e){this.config=lay.extend({},this.config,e),this.init()},I.prototype.init=function(){var r=this,o=r.config,e="static"===o.position,t={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]&&("array"!==layui.type(o.theme)&&(o.theme=[o.theme]),o.fullPanel&&("datetime"!==o.type||o.range)&&delete o.fullPanel,r.rangeStr=o.range?"string"==typeof o.range?o.range:"-":"",r.rangeLinked=!(!o.range||!o.rangeLinked||"date"!==o.type&&"datetime"!==o.type),r.autoCalendarModel=function(){var e=r.rangeLinked;return r.rangeLinked=o.range&&("date"===o.type||"datetime"===o.type)&&(!r.startDate||!r.endDate||r.startDate&&r.endDate&&r.startDate.year===r.endDate.year&&r.startDate.month===r.endDate.month),lay(r.elem)[r.rangeLinked?"addClass":"removeClass"]("layui-laydate-linkage"),r.rangeLinked!=e},r.autoCalendarModel.auto=r.rangeLinked&&"auto"===o.rangeLinked,"array"===layui.type(o.range)&&(r.rangeElem=[lay(o.range[0]),lay(o.range[1])]),t[o.type]||(i.console&&console.error&&console.error("laydate type error:'"+o.type+"' is not supported"),o.type="date"),o.format===t.date&&(o.format=t[o.type]||t.date),r.format=s.formatArr(o.format),o.weekStart&&!/^[0-6]$/.test(o.weekStart)&&(t=r.lang(),o.weekStart=t.weeks.indexOf(o.weekStart),-1===o.weekStart)&&(o.weekStart=0),r.EXP_IF="",r.EXP_SPLIT="",lay.each(r.format,function(e,t){e=new RegExp(c).test(t)?"\\d{"+(new RegExp(c).test(r.format[0===e?e+1:e-1]||"")?/^yyyy|y$/.test(t)?4:t.length:/^yyyy$/.test(t)?"1,4":/^y$/.test(t)?"1,308":"1,2")+"}":"\\"+t;r.EXP_IF=r.EXP_IF+e,r.EXP_SPLIT=r.EXP_SPLIT+"("+e+")"}),r.EXP_IF_ONE=new RegExp("^"+r.EXP_IF+"$"),r.EXP_IF=new RegExp("^"+(o.range?r.EXP_IF+"\\s\\"+r.rangeStr+"\\s"+r.EXP_IF:r.EXP_IF)+"$"),r.EXP_SPLIT=new RegExp("^"+r.EXP_SPLIT+"$",""),r.isInput(o.elem[0])||"focus"===o.trigger&&(o.trigger="click"),o.elem.attr("lay-key",r.index),o.eventElem.attr("lay-key",r.index),o.elem.attr(d,o.id),o.mark=lay.extend({},o.calendar&&"cn"===o.lang?{"0-1-1":"\u5143\u65e6","0-2-14":"\u60c5\u4eba","0-3-8":"\u5987\u5973","0-3-12":"\u690d\u6811","0-4-1":"\u611a\u4eba","0-5-1":"\u52b3\u52a8","0-5-4":"\u9752\u5e74","0-6-1":"\u513f\u7ae5","0-9-10":"\u6559\u5e08","0-10-1":"\u56fd\u5e86","0-12-25":"\u5723\u8bde"}:{},o.mark),lay.each(["min","max"],function(e,t){var a=[],n=[];if("number"==typeof o[t])var i=o[t],l=new Date,l=r.newDate({year:l.getFullYear(),month:l.getMonth(),date:l.getDate(),hours:e?23:0,minutes:e?59:0,seconds:e?59:0}).getTime(),e=new Date(i?i<864e5?l+864e5*i:i:l),a=[e.getFullYear(),e.getMonth()+1,e.getDate()],n=[e.getHours(),e.getMinutes(),e.getSeconds()];else if("string"==typeof o[t])a=(o[t].match(/\d+-\d+-\d+/)||[""])[0].split("-"),n=(o[t].match(/\d+:\d+:\d+/)||[""])[0].split(":");else if("object"==typeof o[t])return o[t];o[t]={year:0|a[0]||(new Date).getFullYear(),month:a[1]?(0|a[1])-1:(new Date).getMonth(),date:0|a[2]||(new Date).getDate(),hours:0|n[0],minutes:0|n[1],seconds:0|n[2]}}),r.elemID="layui-laydate"+o.elem.attr("lay-key"),(o.show||e)&&r.render(),e||r.events(),o.value)&&o.isInitValue&&("date"===layui.type(o.value)?r.setValue(r.parse(0,r.systemDate(o.value))):r.setValue(o.value))},I.prototype.render=function(){var a,n,i,l,r=this,o=r.config,d=r.lang(),s="static"===o.position,y=r.elem=lay.elem("div",{id:r.elemID,"class":["layui-laydate",o.range?" layui-laydate-range":"",r.rangeLinked?" layui-laydate-linkage":"",s?" "+T:"",o.fullPanel?" laydate-theme-fullpanel":"",(a="",lay.each(o.theme,function(e,t){"default"===t||/^#/.test(t)||(a+=" laydate-theme-"+t)}),a)].join("")}),m=r.elemMain=[],c=r.elemHeader=[],u=r.elemCont=[],h=r.table=[],e=r.footer=lay.elem("div",{"class":"layui-laydate-footer"}),t=r.shortcut=lay.elem("ul",{"class":"layui-laydate-shortcut"}),f=(o.zIndex&&(y.style.zIndex=o.zIndex),lay.each(new Array(2),function(e){if(!o.range&&0'+d.timeTips+""),(o.range||"datetime"!==o.type||o.fullPanel)&&f.push(''),lay.each(o.btns,function(e,t){var a=d.tools[t]||"btn";o.range&&"now"===t||(s&&"clear"===t&&(a="cn"===o.lang?"\u91cd\u7f6e":"Reset"),n.push(''+a+""))}),f.push('"),f.join(""))),o.shortcuts&&(y.appendChild(t),lay(t).html((i=[],lay.each(o.shortcuts,function(e,t){i.push('
      • '+t.text+"
      • ")}),i.join(""))).find("li").on("click",function(e){var t=o.shortcuts[this.dataset.index]||{},t=("function"==typeof t.value?t.value():t.value)||[],n=(layui.isArray(t)||(t=[t]),o.type),t=(lay.each(t,function(e,t){var a=[o.dateTime,r.endDate][e];"time"===n&&"date"!==layui.type(t)?r.EXP_IF.test(t)&&(t=(t.match(r.EXP_SPLIT)||[]).slice(1),lay.extend(a,{hours:0|t[0],minutes:0|t[2],seconds:0|t[4]})):lay.extend(a,r.systemDate("date"===layui.type(t)?t:new Date(t))),"time"!==n&&"datetime"!==n||(r[["startTime","endTime"][e]]={hours:a.hours,minutes:a.minutes,seconds:a.seconds}),0===e?r.startDate=lay.extend({},a):r.endState=!0,"year"===n||"month"===n||"time"===n?r.listYM[e]=[a.year,a.month+1]:e&&r.autoCalendarModel.auto&&r.autoCalendarModel()}),r.checkDate("limit").calendar(null,null,"init"),lay(r.footer).find("."+L).removeClass(k));t&&"date"===t.attr("lay-type")&&t[0].click(),r.done(null,"change"),lay(this).addClass(x),"static"!==o.position&&r.setValue(r.parse()).done().remove()})),lay.each(m,function(e,t){y.appendChild(t)}),o.showBottom&&y.appendChild(e),lay.elem("style")),p=[],g=!0,t=(lay.each(o.theme,function(e,t){g&&/^#/.test(t)?(g=!(l=!0),p.push(["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} li.layui-this,#{{id}} td.layui-this>div{background-color:{{theme}} !important;}",-1!==o.theme.indexOf("circle")?"":"#{{id}} .layui-this{background-color:{{theme}} !important;}","#{{id}} .laydate-day-now{color:{{theme}} !important;}","#{{id}} .laydate-day-now:after{border-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,r.elemID).replace(/{{theme}}/g,t))):!g&&/^#/.test(t)&&p.push(["#{{id}} .laydate-selected>div{background-color:{{theme}} !important;}","#{{id}} .laydate-selected:hover>div{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,r.elemID).replace(/{{theme}}/g,t))}),o.shortcuts&&o.range&&p.push("#{{id}}.layui-laydate-range{width: 628px;}".replace(/{{id}}/g,r.elemID)),p.length&&(p=p.join(""),"styleSheet"in f?(f.setAttribute("type","text/css"),f.styleSheet.cssText=p):f.innerHTML=p,l&&lay(y).addClass("laydate-theme-molv"),y.appendChild(f)),r.remove(I.thisElemDate),D.thisId=o.id,s?o.elem.append(y):(v.body.appendChild(y),r.position()),o.shade?'
        ':"");y.insertAdjacentHTML("beforebegin",t),r.checkDate().calendar(null,0,"init"),r.changeEvent(),I.thisElemDate=r.elemID,r.renderAdditional(),"function"==typeof o.ready&&o.ready(lay.extend({},o.dateTime,{month:o.dateTime.month+1})),r.preview()},I.prototype.remove=function(e){var t=this,a=t.config,n=lay("#"+(e||t.elemID));return n[0]&&(n.hasClass(T)||t.checkDate(function(){n.remove(),delete t.startDate,delete t.endDate,delete t.endState,delete t.startTime,delete t.endTime,delete D.thisId,"function"==typeof a.close&&a.close(t)}),lay("."+S).remove()),t},I.prototype.position=function(){var e=this.config;return lay.position(e.elem[0],this.elem,{position:e.position}),this},I.prototype.hint=function(e){var t=this,a=(t.config,lay.elem("div",{"class":r}));t.elem&&(a.innerHTML=(e="object"==typeof e?e||{}:{content:e}).content||"",lay(t.elem).find("."+r).remove(),t.elem.appendChild(a),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){lay(t.elem).find("."+r).remove()},"ms"in e?e.ms:3e3))},I.prototype.getAsYM=function(e,t,a){return a?t--:t++,t<0&&(t=11,e--),11h[1]&&(e.year=h[1],o=!0),11t)&&(e.date=t,o=!0)},u=function(n,i,l){var r=["startTime","endTime"];i=(i.match(d.EXP_SPLIT)||[]).slice(1),l=l||0,s.range&&(d[r[l]]=d[r[l]]||{}),lay.each(d.format,function(e,t){var a=parseFloat(i[e]);i[e].lengthd.getDateTime(s.max)?(r=s.dateTime=lay.extend({},s.max),i=!0):d.getDateTime(r)d.getDateTime(s.max))&&(d.endDate=lay.extend({},s.max),i=!0),d.startTime={hours:s.dateTime.hours,minutes:s.dateTime.minutes,seconds:s.dateTime.seconds},d.endTime={hours:d.endDate.hours,minutes:d.endDate.minutes,seconds:d.endDate.seconds},"month"===s.type)&&(s.dateTime.date=1,d.endDate.date=1),i&&m&&(d.setValue(d.parse()),d.hint("value "+l.invalidDate+l.formatError[1])),d.startDate=d.startDate||m&&lay.extend({},s.dateTime),d.autoCalendarModel.auto&&d.autoCalendarModel(),d.endState=!s.range||!d.rangeLinked||!(!d.startDate||!d.endDate),e&&e()),d},I.prototype.mark=function(e,a){var n,t=this.config;return lay.each(t.mark,function(e,t){e=e.split("-");e[0]!=a[0]&&0!=e[0]||e[1]!=a[1]&&0!=e[1]||e[2]!=a[2]||(n=t||a[2])}),n&&e.find("div").html(''+n+""),this},I.prototype.holidays=function(n,i){var e=this.config,l=["","work"];return"array"===layui.type(e.holidays)&&lay.each(e.holidays,function(a,e){lay.each(e,function(e,t){t===n.attr("lay-ymd")&&n.find("div").html('"+i[2]+"")})}),this},I.prototype.limit=function(t){t=t||{};var i=this,e=i.config,l={},a=t.index>(t.time?0:41)?i.endDate:e.dateTime;return lay.each({now:lay.extend({},a,t.date||{}),min:e.min,max:e.max},function(e,a){var n;l[e]=i.newDate(lay.extend({year:a.year,month:"year"===t.type?0:a.month,date:"year"===t.type||"month"===t.type?1:a.date},(n={},lay.each(t.time,function(e,t){n[t]=a[t]}),n))).getTime()}),a=l.nowh[1]&&(d.year=h[1],o.hint(y.invalidDate)),o.firstDate||(o.firstDate=lay.extend({},d)),s.setFullYear(d.year,d.month,1),i=(s.getDay()+(7-n.weekStart))%7,l=D.getEndDate(d.month||12,d.year),r=D.getEndDate(d.month+1,d.year),lay.each(c,function(e,t){var a,n=[d.year,d.month];(t=lay(t)).removeAttr("class"),e"+n[2]+"
        "),o.mark(t,n).holidays(t,n).limit({elem:t,date:{year:n[0],month:n[1]-1,date:n[2]},index:e})}),lay(u[0]).attr("lay-ym",d.year+"-"+(d.month+1)),lay(u[1]).attr("lay-ym",d.year+"-"+(d.month+1)),"cn"===n.lang?(lay(u[0]).attr("lay-type","year").html(d.year+" \u5e74"),lay(u[1]).attr("lay-type","month").html(d.month+1+" \u6708")):(lay(u[0]).attr("lay-type","month").html(y.month[d.month]),lay(u[1]).attr("lay-type","year").html(d.year)),m&&(n.range?!e&&"init"===a||(o.listYM=[[(o.startDate||n.dateTime).year,(o.startDate||n.dateTime).month+1],[o.endDate.year,o.endDate.month+1]],o.list(n.type,0).list(n.type,1),"time"===n.type?o.setBtnStatus("\u65f6\u95f4",lay.extend({},o.systemDate(),o.startTime),lay.extend({},o.systemDate(),o.endTime)):o.setBtnStatus(!0)):(o.listYM=[[d.year,d.month+1]],o.list(n.type,0))),n.range&&"init"===a&&(o.rangeLinked?(s=o.getAsYM(d.year,d.month,t?"sub":null),o.calendar(lay.extend({},d,{year:s[0],month:s[1]}),1-t)):o.calendar(null,1-t)),n.range||(c=["hours","minutes","seconds"],o.limit({elem:lay(o.footer).find(".laydate-btns-now"),date:o.systemDate(/^(datetime|time)$/.test(n.type)?new Date:null),index:0,time:c}),o.limit({elem:lay(o.footer).find(C),index:0,time:c})),o.setBtnStatus(),lay(o.shortcut).find("li."+x).removeClass(x),n.range&&!m&&"init"!==a&&o.stampRange(),o},I.prototype.list=function(n,i){var l,r,e,o,d=this,s=d.config,y=d.rangeLinked?s.dateTime:[s.dateTime,d.endDate][i],m=d.lang(),t=s.range&&"date"!==s.type&&"datetime"!==s.type,c=lay.elem("ul",{"class":w+" "+{year:"laydate-year-list",month:"laydate-month-list",time:"laydate-time-list"}[n]}),a=d.elemHeader[i],u=lay(a[2]).find("span"),h=d.elemCont[i||0],f=lay(h).find("."+w)[0],p="cn"===s.lang,g=p?"\u5e74":"",v=d.listYM[i]||{},D=["hours","minutes","seconds"],T=["startTime","endTime"][i];return v[0]<1&&(v[0]=1),"year"===n?(e=l=v[0]-7,l<1&&(e=l=1),lay.each(new Array(15),function(e){var t=lay.elem("li",{"lay-ym":l}),a={year:l,month:0,date:1};l==v[0]&&lay(t).addClass(x),t.innerHTML=l+g,c.appendChild(t),d.limit({elem:lay(t),date:a,index:i,type:n}),l++}),lay(u[p?0:1]).attr("lay-ym",l-8+"-"+v[1]).html(e+g+" - "+(l-1)+g)):"month"===n?(lay.each(new Array(12),function(e){var t=lay.elem("li",{"lay-ym":e}),a={year:v[0],month:e,date:1};e+1==v[1]&&lay(t).addClass(x),t.innerHTML=m.month[e]+(p?"\u6708":""),c.appendChild(t),d.limit({elem:lay(t),date:a,index:i,type:n})}),lay(u[p?0:1]).attr("lay-ym",v[0]+"-"+v[1]).html(v[0]+g)):"time"===n&&(r=function(){lay(c).find("ol").each(function(a,e){lay(e).find("li").each(function(e,t){d.limit({elem:lay(t),date:[{hours:e},{hours:d[T].hours,minutes:e},{hours:d[T].hours,minutes:d[T].minutes,seconds:e}][a],index:i,time:[["hours"],["hours","minutes"],["hours","minutes","seconds"]][a]})})}),s.range||d.limit({elem:lay(d.footer).find(C),date:d[T],inedx:0,time:["hours","minutes","seconds"]})},s.range?d[T]||(d[T]="startTime"===T?y:d.endDate):d[T]=y,lay.each([24,60,60],function(t,e){var a=lay.elem("li"),n=["

        "+m.time[t]+"

          "];lay.each(new Array(e),function(e){n.push(""+lay.digit(e,2)+"")}),a.innerHTML=n.join("")+"
        ",c.appendChild(a)}),r()),f&&h.removeChild(f),h.appendChild(c),"year"===n||"month"===n?(lay(d.elemMain[i]).addClass("laydate-ym-show"),lay(c).find("li").on("click",function(){var e=0|lay(this).attr("lay-ym");lay(this).hasClass(k)||(d.rangeLinked?lay.extend(y,{year:"year"===n?e:v[0],month:"year"===n?v[1]-1:e}):y[n]=e,"year"===s.type||"month"===s.type?(lay(c).find("."+x).removeClass(x),lay(this).addClass(x),"month"===s.type&&"year"===n&&(d.listYM[i][0]=e,t&&((i?d.endDate:y).year=e),d.list("month",i))):(d.checkDate("limit").calendar(y,i,"init"),d.closeList()),d.setBtnStatus(),!s.range&&s.autoConfirm&&("month"===s.type&&"month"===n||"year"===s.type&&"year"===n)&&d.setValue(d.parse()).done().remove(),d.autoCalendarModel.auto&&!d.rangeLinked?d.choose(lay(h).find("td.layui-this"),i):d.endState&&d.done(null,"change"),lay(d.footer).find("."+L).removeClass(k))})):(e=lay.elem("span",{"class":M}),o=function(){lay(c).find("ol").each(function(e){var a=this,t=lay(a).find("li");a.scrollTop=30*(d[T][D[e]]-2),a.scrollTop<=0&&t.each(function(e,t){if(!lay(this).hasClass(k))return a.scrollTop=30*(e-2),!0})})},u=lay(a[2]).find("."+M),o(),e.innerHTML=s.range?[m.startTime,m.endTime][i]:m.timeTips,lay(d.elemMain[i]).addClass("laydate-time-show"),u[0]&&u.remove(),a[2].appendChild(e),lay(c).find("ol").each(function(t){var a=this;lay(a).find("li").on("click",function(){var e=0|this.innerHTML;lay(this).hasClass(k)||(s.range?d[T][D[t]]=e:y[D[t]]=e,lay(a).find("."+x).removeClass(x),lay(this).addClass(x),r(),o(),(d.endDate||"time"===s.type||"datetime"===s.type&&s.fullPanel)&&d.done(null,"change"),d.setBtnStatus())})})),d},I.prototype.listYM=[],I.prototype.closeList=function(){var a=this;a.config;lay.each(a.elemCont,function(e,t){lay(this).find("."+w).remove(),lay(a.elemMain[e]).removeClass("laydate-ym-show laydate-time-show")}),lay(a.elem).find("."+M).remove()},I.prototype.setBtnStatus=function(e,t,a){var n=this,i=n.config,l=n.lang(),r=lay(n.footer).find(C);i.range&&"time"!==i.type&&(t=t||(n.rangeLinked?n.startDate:i.dateTime),a=a||n.endDate,i=!n.endState||n.newDate(t).getTime()>n.newDate(a).getTime(),n.limit({date:t})||n.limit({date:a})?r.addClass(k):r[i?"addClass":"removeClass"](k),e)&&i&&n.hint("string"==typeof e?l.timeout.replace(/\u65e5\u671f/g,e):l.timeout)},I.prototype.parse=function(e,t){var a=this,n=a.config,i=a.rangeLinked?a.startDate:n.dateTime,t=t||("end"==e?lay.extend({},a.endDate,a.endTime):n.range?lay.extend({},i||n.dateTime,a.startTime):n.dateTime),i=D.parse(t,a.format,1);return n.range&&e===undefined?i+" "+a.rangeStr+" "+a.parse("end"):i},I.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},I.prototype.getDateTime=function(e){return this.newDate(e).getTime()},I.prototype.setValue=function(e){var t=this,a=t.config,n=a.elem[0];return"static"!==a.position&&(e=e||"",t.isInput(n)?lay(n).val(e):(a=t.rangeElem)?("array"!==layui.type(e)&&(e=e.split(" "+t.rangeStr+" ")),a[0].val(e[0]||""),a[1].val(e[1]||"")):(0===lay(n).find("*").length&&lay(n).html(e),lay(n).attr("lay-date",e))),t},I.prototype.preview=function(){var e,t=this,a=t.config;a.isPreview&&(e=lay(t.elem).find("."+E),a=!a.range||(t.rangeLinked?t.endState:t.endDate)?t.parse():"",e.html(a),e.html())&&(e.css({color:"#16b777"}),setTimeout(function(){e.css({color:"#777"})},300))},I.prototype.renderAdditional=function(){this.config.fullPanel&&this.list("time",0)},I.prototype.stampRange=function(){var n,i=this,l=i.config,r=i.rangeLinked?i.startDate:l.dateTime,e=lay(i.elem).find("td");l.range&&!i.endState&&lay(i.footer).find(C).addClass(k),r=r&&i.newDate({year:r.year,month:r.month,date:r.date}).getTime(),n=i.endState&&i.endDate&&i.newDate({year:i.endDate.year,month:i.endDate.month,date:i.endDate.date}).getTime(),lay.each(e,function(e,t){var a=lay(t).attr("lay-ymd").split("-"),a=i.newDate({year:a[0],month:a[1]-1,date:a[2]}).getTime();l.rangeLinked&&!i.startDate&&a===i.newDate(i.systemDate()).getTime()&&lay(t).addClass(lay(t).hasClass(y)||lay(t).hasClass(m)?"":"laydate-day-now"),lay(t).removeClass(o+" "+x),a!==r&&a!==n||(i.rangeLinked||!i.rangeLinked&&(e<42?a===r:a===n))&&lay(t).addClass(lay(t).hasClass(y)||lay(t).hasClass(m)?o:x),rn.getDateTime(i.max)&&(n[t]={hours:i.max.hours,minutes:i.max.minutes,seconds:i.max.seconds},lay.extend(l,n[t])))}),a||(n.startDate=lay.extend({},l)),n.endState&&!n.limit({date:n.thisDateTime(1-a)})&&(((r=n.endState&&n.autoCalendarModel.auto?n.autoCalendarModel():r)||n.rangeLinked&&n.endState)&&n.newDate(n.startDate)>n.newDate(n.endDate)&&(e=n.startDate.year===n.endDate.year&&n.startDate.month===n.endDate.month&&n.startDate.date===n.endDate.date,o=n.startDate,n.startDate=lay.extend({},n.endDate,e?{}:n.startTime),i.dateTime=lay.extend({},n.startDate),n.endDate=lay.extend({},o,e?{}:n.endTime),e)&&(o=n.startTime,n.startTime=n.endTime,n.endTime=o),r)&&(i.dateTime=lay.extend({},n.startDate)),n.rangeLinked?(e=lay.extend({},l),!t||a||r||(o=n.getAsYM(l.year,l.month,"sub"),lay.extend(i.dateTime,{year:o[0],month:o[1]})),n.calendar(e,t,r?"init":null)):n.calendar(null,a,r?"init":null),n.endState&&n.done(null,"change")):"static"===i.position?n.calendar().done().done(null,"change"):"date"===i.type?i.autoConfirm?n.setValue(n.parse()).done().remove():n.calendar().done(null,"change"):"datetime"===i.type&&n.calendar().done(null,"change"))},I.prototype.tool=function(t,e){var a=this,n=a.config,i=a.lang(),l=n.dateTime,r="static"===n.position,o={datetime:function(){lay(t).hasClass(k)||(a.list("time",0),n.range&&a.list("time",1),lay(t).attr("lay-type","date").html(a.lang().dateTips))},date:function(){a.closeList(),lay(t).attr("lay-type","datetime").html(a.lang().timeTips)},clear:function(){r&&(lay.extend(l,a.firstDate),a.calendar()),n.range&&(delete n.dateTime,delete a.endDate,delete a.startTime,delete a.endTime),a.setValue(""),a.done(null,"onClear").done(["",{},{}]).remove()},now:function(){var e=new Date;if(lay(t).hasClass(k))return a.hint(i.tools.now+", "+i.invalidDate);lay.extend(l,a.systemDate(),{hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()}),a.setValue(a.parse()),r&&a.calendar(),a.done(null,"onNow").done().remove()},confirm:function(){if(n.range){if(lay(t).hasClass(k))return a.hint("time"===n.type?i.timeout.replace(/\u65e5\u671f/g,"\u65f6\u95f4"):i.timeout)}else if(lay(t).hasClass(k))return a.hint(i.invalidDate);a.setValue(a.parse()),a.done(null,"onConfirm").done().remove()}};o[e]&&o[e]()},I.prototype.change=function(n){var i=this,l=i.config,r=i.thisDateTime(n),o=l.range&&("year"===l.type||"month"===l.type),d=i.elemCont[n||0],s=i.listYM[n],e=function(e){var t=lay(d).find(".laydate-year-list")[0],a=lay(d).find(".laydate-month-list")[0];return t&&(s[0]=e?s[0]-15:s[0]+15,i.list("year",n)),a&&(e?s[0]--:s[0]++,i.list("month",n)),(t||a)&&(lay.extend(r,{year:s[0]}),o&&(r.year=s[0]),l.range||i.done(null,"change"),l.range||i.limit({elem:lay(i.footer).find(C),date:{year:s[0]}})),i.setBtnStatus(),t||a};return{prevYear:function(){e("sub")||(i.rangeLinked?(l.dateTime.year--,i.checkDate("limit").calendar(null,null,"init")):(r.year--,i.checkDate("limit").calendar(null,n),i.autoCalendarModel.auto?i.choose(lay(d).find("td.layui-this"),n):i.done(null,"change")))},prevMonth:function(){i.rangeLinked&&(r=l.dateTime);var e=i.getAsYM(r.year,r.month,"sub");lay.extend(r,{year:e[0],month:e[1]}),i.checkDate("limit").calendar(null,null,"init"),i.rangeLinked||(i.autoCalendarModel.auto?i.choose(lay(d).find("td.layui-this"),n):i.done(null,"change"))},nextMonth:function(){i.rangeLinked&&(r=l.dateTime);var e=i.getAsYM(r.year,r.month);lay.extend(r,{year:e[0],month:e[1]}),i.checkDate("limit").calendar(null,null,"init"),i.rangeLinked||(i.autoCalendarModel.auto?i.choose(lay(d).find("td.layui-this"),n):i.done(null,"change"))},nextYear:function(){e()||(i.rangeLinked?(l.dateTime.year++,i.checkDate("limit").calendar(null,0,"init")):(r.year++,i.checkDate("limit").calendar(null,n),i.autoCalendarModel.auto?i.choose(lay(d).find("td.layui-this"),n):i.done(null,"change")))}}},I.prototype.changeEvent=function(){var i=this;i.config;lay(i.elem).on("click",function(e){lay.stope(e)}).on("mousedown",function(e){lay.stope(e)}),lay.each(i.elemHeader,function(n,e){lay(e[0]).on("click",function(e){i.change(n).prevYear()}),lay(e[1]).on("click",function(e){i.change(n).prevMonth()}),lay(e[2]).find("span").on("click",function(e){var t=lay(this),a=t.attr("lay-ym"),t=t.attr("lay-type");a&&(a=a.split("-"),i.listYM[n]=[0|a[0],0|a[1]],i.list(t,n),lay(i.footer).find("."+L).addClass(k))}),lay(e[3]).on("click",function(e){i.change(n).nextMonth()}),lay(e[4]).on("click",function(e){i.change(n).nextYear()})}),lay.each(i.table,function(e,t){lay(t).find("td").on("click",function(){i.choose(lay(this),e)})}),lay(i.footer).find("span").on("click",function(){var e=lay(this).attr("lay-type");i.tool(this,e)})},I.prototype.isInput=function(e){return/input|textarea/.test(e.tagName.toLocaleLowerCase())||/INPUT|TEXTAREA/.test(e.tagName)},I.prototype.events=function(){var e,t=this,a=t.config;a.elem[0]&&!a.elem[0].eventHandler&&(a.elem.on(a.trigger,e=function(){D.thisId!==a.id&&t.render()}),a.elem[0].eventHandler=!0,a.eventElem.on(a.trigger,e),t.unbind=function(){t.remove(),a.elem.off(a.trigger,e),a.elem.removeAttr("lay-key"),a.elem.removeAttr(d),a.elem[0].eventHandler=!1,a.eventElem.off(a.trigger,e),a.eventElem.removeAttr("lay-key"),delete s.that[a.id]})},s.that={},s.getThis=function(e){var t=s.that[e];return!t&&n&&layui.hint().error(e?a+" instance with ID '"+e+"' not found":"ID argument required"),t},l.run=function(n){n(v).on("mousedown",function(e){var t,a;D.thisId&&(t=s.getThis(D.thisId))&&(a=t.config,e.target===a.elem[0]||e.target===a.eventElem[0]||e.target===n(a.closeStop)[0]||a.elem[0]&&a.elem[0].contains(e.target)||t.remove())}).on("keydown",function(e){var t;D.thisId&&(t=s.getThis(D.thisId))&&"static"!==t.config.position&&13===e.keyCode&&n("#"+t.elemID)[0]&&t.elemID===I.thisElemDate&&(e.preventDefault(),n(t.footer).find(C)[0].click())}),n(i).on("resize",function(){if(D.thisId){var e=s.getThis(D.thisId);if(e)return!(!e.elem||!n(".layui-laydate")[0])&&void e.position()}})},D.render=function(e){e=new I(e);return s.call(e)},D.reload=function(e,t){e=s.getThis(e);if(e)return e.reload(t)},D.getInst=function(e){e=s.getThis(e);if(e)return e.inst},D.hint=function(e,t){e=s.getThis(e);if(e)return e.hint(t)},D.unbind=function(e){e=s.getThis(e);if(e)return e.unbind()},D.close=function(e){e=s.getThis(e||D.thisId);if(e)return e.remove()},D.parse=function(a,n,i){return a=a||{},n=((n="string"==typeof n?s.formatArr(n):n)||[]).concat(),lay.each(n,function(e,t){/yyyy|y/.test(t)?n[e]=lay.digit(a.year,t.length):/MM|M/.test(t)?n[e]=lay.digit(a.month+(i||0),t.length):/dd|d/.test(t)?n[e]=lay.digit(a.date,t.length):/HH|H/.test(t)?n[e]=lay.digit(a.hours,t.length):/mm|m/.test(t)?n[e]=lay.digit(a.minutes,t.length):/ss|s/.test(t)&&(n[e]=lay.digit(a.seconds,t.length))}),n.join("")},D.getEndDate=function(e,t){var a=new Date;return a.setFullYear(t||a.getFullYear(),e||a.getMonth()+1,1),new Date(a.getTime()-864e5).getDate()},n?(D.ready(),layui.define("lay",function(e){D.path=layui.cache.dir,l.run(lay),e(a,D)})):"function"==typeof define&&define.amd?define(function(){return l.run(lay),D}):(D.ready(),l.run(i.lay),i.laydate=D)}(window,window.document);!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e):function(e){if(e.document)return t(e);throw new Error("jQuery requires a window with a document")}:t(e)}("undefined"!=typeof window?window:this,function(T,M){var f=[],g=T.document,c=f.slice,O=f.concat,R=f.push,P=f.indexOf,B={},W=B.toString,m=B.hasOwnProperty,y={},e="1.12.4",C=function(e,t){return new C.fn.init(e,t)},I=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,$=/^-ms-/,z=/-([\da-z])/gi,X=function(e,t){return t.toUpperCase()};function U(e){var t=!!e&&"length"in e&&e.length,n=C.type(e);return"function"!==n&&!C.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+a+")"+a+"*"),ee=new RegExp("="+a+"*([^\\]'\"]*?)"+a+"*\\]","g"),te=new RegExp(G),ne=new RegExp("^"+s+"$"),f={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),TAG:new RegExp("^("+s+"|[*])"),ATTR:new RegExp("^"+J),PSEUDO:new RegExp("^"+G),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+a+"*(even|odd|(([+-]|)(\\d*)n|)"+a+"*(?:([+-]|)"+a+"*(\\d+)|))"+a+"*\\)|)","i"),bool:new RegExp("^(?:"+Y+")$","i"),needsContext:new RegExp("^"+a+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+a+"*((?:-\\d)?\\d*)"+a+"*\\)|)(?=[^-]|$)","i")},re=/^(?:input|select|textarea|button)$/i,ie=/^h\d$/i,c=/^[^{]+\{\s*\[native \w/,oe=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ae=/[+~]/,se=/'|\\/g,d=new RegExp("\\\\([\\da-f]{1,6}"+a+"?|("+a+")|.)","ig"),p=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)},ue=function(){C()};try{D.apply(n=V.call(v.childNodes),v.childNodes),n[v.childNodes.length].nodeType}catch(F){D={apply:n.length?function(e,t){U.apply(e,V.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function H(e,t,n,r){var i,o,a,s,u,l,c,f,d=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!r&&((t?t.ownerDocument||t:v)!==E&&C(t),t=t||E,N)){if(11!==p&&(l=oe.exec(e)))if(i=l[1]){if(9===p){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(d&&(a=d.getElementById(i))&&y(t,a)&&a.id===i)return n.push(a),n}else{if(l[2])return D.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&g.getElementsByClassName&&t.getElementsByClassName)return D.apply(n,t.getElementsByClassName(i)),n}if(g.qsa&&!A[e+" "]&&(!m||!m.test(e))){if(1!==p)d=t,f=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(se,"\\$&"):t.setAttribute("id",s=k),o=(c=w(e)).length,u=ne.test(s)?"#"+s:"[id='"+s+"']";o--;)c[o]=u+" "+_(c[o]);f=c.join(","),d=ae.test(e)&&de(t.parentNode)||t}if(f)try{return D.apply(n,d.querySelectorAll(f)),n}catch(h){}finally{s===k&&t.removeAttribute("id")}}}return P(e.replace(L,"$1"),t,n,r)}function le(){var n=[];function r(e,t){return n.push(e+" ")>b.cacheLength&&delete r[n.shift()],r[e+" "]=t}return r}function q(e){return e[k]=!0,e}function h(e){var t=E.createElement("div");try{return!!e(t)}catch(F){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function ce(e,t){for(var n=e.split("|"),r=n.length;r--;)b.attrHandle[n[r]]=t}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function x(a){return q(function(o){return o=+o,q(function(e,t){for(var n,r=a([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function de(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in g=H.support={},O=H.isXML=function(e){e=e&&(e.ownerDocument||e).documentElement;return!!e&&"HTML"!==e.nodeName},C=H.setDocument=function(e){var e=e?e.ownerDocument||e:v;return e!==E&&9===e.nodeType&&e.documentElement&&(t=(E=e).documentElement,N=!O(E),(e=E.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",ue,!1):e.attachEvent&&e.attachEvent("onunload",ue)),g.attributes=h(function(e){return e.className="i",!e.getAttribute("className")}),g.getElementsByTagName=h(function(e){return e.appendChild(E.createComment("")),!e.getElementsByTagName("*").length}),g.getElementsByClassName=c.test(E.getElementsByClassName),g.getById=h(function(e){return t.appendChild(e).id=k,!E.getElementsByName||!E.getElementsByName(k).length}),g.getById?(b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&N)return(e=t.getElementById(e))?[e]:[]},b.filter.ID=function(e){var t=e.replace(d,p);return function(e){return e.getAttribute("id")===t}}):(delete b.find.ID,b.filter.ID=function(e){var t=e.replace(d,p);return function(e){e="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return e&&e.value===t}}),b.find.TAG=g.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):g.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},b.find.CLASS=g.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&N)return t.getElementsByClassName(e)},r=[],m=[],(g.qsa=c.test(E.querySelectorAll))&&(h(function(e){t.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+a+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+a+"*(?:value|"+Y+")"),e.querySelectorAll("[id~="+k+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||m.push(".#.+[+~]")}),h(function(e){var t=E.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+a+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(g.matchesSelector=c.test(i=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.msMatchesSelector))&&h(function(e){g.disconnectedMatch=i.call(e,"div"),i.call(e,"[s!='']:x"),r.push("!=",G)}),m=m.length&&new RegExp(m.join("|")),r=r.length&&new RegExp(r.join("|")),e=c.test(t.compareDocumentPosition),y=e||c.test(t.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,t=t&&t.parentNode;return e===t||!(!t||1!==t.nodeType||!(n.contains?n.contains(t):e.compareDocumentPosition&&16&e.compareDocumentPosition(t)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},$=e?function(e,t){var n;return e===t?(l=!0,0):(n=!e.compareDocumentPosition-!t.compareDocumentPosition)||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!g.sortDetached&&t.compareDocumentPosition(e)===n?e===E||e.ownerDocument===v&&y(v,e)?-1:t===E||t.ownerDocument===v&&y(v,t)?1:u?j(u,e)-j(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===E?-1:t===E?1:i?-1:o?1:u?j(u,e)-j(u,t):0;if(i===o)return fe(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?fe(a[r],s[r]):a[r]===v?-1:s[r]===v?1:0}),E},H.matches=function(e,t){return H(e,null,null,t)},H.matchesSelector=function(e,t){if((e.ownerDocument||e)!==E&&C(e),t=t.replace(ee,"='$1']"),g.matchesSelector&&N&&!A[t+" "]&&(!r||!r.test(t))&&(!m||!m.test(t)))try{var n=i.call(e,t);if(n||g.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(F){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(d,p),e[3]=(e[3]||e[4]||e[5]||"").replace(d,p),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||H.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&H.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return f.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&te.test(n)&&(t=(t=w(n,!0))&&n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(d,p).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+a+")"+e+"("+a+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(e){e=H.attr(e,t);return null==e?"!="===n:!n||(e+="","="===n?e===r:"!="===n?e!==r:"^="===n?r&&0===e.indexOf(r):"*="===n?r&&-1(?:<\/\1>|)$/,G=/^.[^:#\[\.,]*$/;function K(e,n,r){if(C.isFunction(n))return C.grep(e,function(e,t){return!!n.call(e,t,e)!==r});if(n.nodeType)return C.grep(e,function(e){return e===n!==r});if("string"==typeof n){if(G.test(n))return C.filter(n,e,r);n=C.filter(n,e)}return C.grep(e,function(e){return-1)[^>]*|#([\w-]*))$/,ee=((C.fn.init=function(e,t,n){if(e){if(n=n||Q,"string"!=typeof e)return e.nodeType?(this.context=this[0]=e,this.length=1,this):C.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(C):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),C.makeArray(e,this));if(!(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Z.exec(e))||!r[1]&&t)return(!t||t.jquery?t||n:this.constructor(t)).find(e);if(r[1]){if(t=t instanceof C?t[0]:t,C.merge(this,C.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),J.test(r[1])&&C.isPlainObject(t))for(var r in t)C.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r])}else{if((n=g.getElementById(r[2]))&&n.parentNode){if(n.id!==r[2])return Q.find(e);this.length=1,this[0]=n}this.context=g,this.selector=e}}return this}).prototype=C.fn,Q=C(g),/^(?:parents|prev(?:Until|All))/),te={children:!0,contents:!0,next:!0,prev:!0};function ne(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}C.fn.extend({has:function(e){var t,n=C(e,this),r=n.length;return this.filter(function(){for(t=0;t
        a",y.leadingWhitespace=3===S.firstChild.nodeType,y.tbody=!S.getElementsByTagName("tbody").length,y.htmlSerialize=!!S.getElementsByTagName("link").length,y.html5Clone="<:nav>"!==g.createElement("nav").cloneNode(!0).outerHTML,q.type="checkbox",q.checked=!0,k.appendChild(q),y.appendChecked=q.checked,S.innerHTML="",y.noCloneChecked=!!S.cloneNode(!0).lastChild.defaultValue,k.appendChild(S),(q=g.createElement("input")).setAttribute("type","radio"),q.setAttribute("checked","checked"),q.setAttribute("name","t"),S.appendChild(q),y.checkClone=S.cloneNode(!0).cloneNode(!0).lastChild.checked,y.noCloneEvent=!!S.addEventListener,S[C.expando]=1,y.attributes=!S.getAttribute(C.expando);var x={option:[1,""],legend:[1,"
        ","
        "],area:[1,"",""],param:[1,"",""],thead:[1,"","
        "],tr:[2,"","
        "],col:[2,"","
        "],td:[3,"","
        "],_default:y.htmlSerialize?[0,"",""]:[1,"X
        ","
        "]};function b(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):undefined;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||C.nodeName(r,t)?o.push(r):C.merge(o,b(r,t));return t===undefined||t&&C.nodeName(e,t)?C.merge([e],o):o}function we(e,t){for(var n,r=0;null!=(n=e[r]);r++)C._data(n,"globalEval",!t||C._data(t[r],"globalEval"))}x.optgroup=x.option,x.tbody=x.tfoot=x.colgroup=x.caption=x.thead,x.th=x.td;var Te=/<|&#?\w+;/,Ce=/"!==f[1]||Ce.test(a)?0:u:u.firstChild)&&a.childNodes.length;o--;)C.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(C.merge(h,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=p.lastChild}else h.push(t.createTextNode(a));for(u&&p.removeChild(u),y.appendChecked||C.grep(b(h,"input"),Ee),g=0;a=h[g++];)if(r&&-1]","i"),Pe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Be=/\s*$/g,ze=be(g).appendChild(g.createElement("div"));function Xe(e,t){return C.nodeName(e,"table")&&C.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ue(e){return e.type=(null!==C.find.attr(e,"type"))+"/"+e.type,e}function Ve(e){var t=Ie.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Ye(e,t){if(1===t.nodeType&&C.hasData(e)){var n,r,i,e=C._data(e),o=C._data(t,e),a=e.events;if(a)for(n in delete o.handle,o.events={},a)for(r=0,i=a[n].length;r")},clone:function(e,t,n){var r,i,o,a,s,u=C.contains(e.ownerDocument,e);if(y.html5Clone||C.isXMLDoc(e)||!Re.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(ze.innerHTML=e.outerHTML,ze.removeChild(o=ze.firstChild)),!(y.noCloneEvent&&y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||C.isXMLDoc(e)))for(r=b(o),s=b(e),a=0;null!=(i=s[a]);++a)if(r[a]){f=c=l=p=d=void 0;var l,c,f,d=i,p=r[a];if(1===p.nodeType){if(l=p.nodeName.toLowerCase(),!y.noCloneEvent&&p[C.expando]){for(c in(f=C._data(p)).events)C.removeEvent(p,c,f.handle);p.removeAttribute(C.expando)}"script"===l&&p.text!==d.text?(Ue(p).text=d.text,Ve(p)):"object"===l?(p.parentNode&&(p.outerHTML=d.outerHTML),y.html5Clone&&d.innerHTML&&!C.trim(p.innerHTML)&&(p.innerHTML=d.innerHTML)):"input"===l&&ge.test(d.type)?(p.defaultChecked=p.checked=d.checked,p.value!==d.value&&(p.value=d.value)):"option"===l?p.defaultSelected=p.selected=d.defaultSelected:"input"!==l&&"textarea"!==l||(p.defaultValue=d.defaultValue)}}if(t)if(n)for(s=s||b(e),r=r||b(o),a=0;null!=(i=s[a]);a++)Ye(i,r[a]);else Ye(e,o);return 0<(r=b(o,"script")).length&&we(r,!u&&b(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=C.expando,u=C.cache,l=y.attributes,c=C.event.special;null!=(n=e[a]);a++)if((t||v(n))&&(o=(i=n[s])&&u[i])){if(o.events)for(r in o.events)c[r]?C.event.remove(n,r):C.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=undefined:n.removeAttribute(s),f.push(i))}}}),C.fn.extend({domManip:w,detach:function(e){return Je(this,e,!0)},remove:function(e){return Je(this,e)},text:function(e){return d(this,function(e){return e===undefined?C.text(this):this.empty().append((this[0]&&this[0].ownerDocument||g).createTextNode(e))},null,e,arguments.length)},append:function(){return w(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Xe(this,e).appendChild(e)})},prepend:function(){return w(this,arguments,function(e){var t;1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(t=Xe(this,e)).insertBefore(e,t.firstChild)})},before:function(){return w(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return w(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&C.cleanData(b(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&C.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return C.clone(this,e,t)})},html:function(e){return d(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===undefined)return 1===t.nodeType?t.innerHTML.replace(Oe,""):undefined;if("string"==typeof e&&!Be.test(e)&&(y.htmlSerialize||!Re.test(e))&&(y.leadingWhitespace||!ve.test(e))&&!x[(me.exec(e)||["",""])[1].toLowerCase()]){e=C.htmlPrefilter(e);try{for(;n")).appendTo(t.documentElement))[0].contentWindow||Ge[0].contentDocument).document).write(),t.close(),n=Qe(e,t),Ge.detach()),Ke[e]=n),n}var n,et,tt,nt,rt,it,ot,a,at=/^margin/,st=new RegExp("^("+e+")(?!px)[a-z%]+$","i"),ut=function(e,t,n,r){var i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.apply(e,r||[]),t)e.style[i]=o[i];return r},lt=g.documentElement;function t(){var e,t=g.documentElement;t.appendChild(ot),a.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",n=tt=it=!1,et=rt=!0,T.getComputedStyle&&(e=T.getComputedStyle(a),n="1%"!==(e||{}).top,it="2px"===(e||{}).marginLeft,tt="4px"===(e||{width:"4px"}).width,a.style.marginRight="50%",et="4px"===(e||{marginRight:"4px"}).marginRight,(e=a.appendChild(g.createElement("div"))).style.cssText=a.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",e.style.marginRight=e.style.width="0",a.style.width="1px",rt=!parseFloat((T.getComputedStyle(e)||{}).marginRight),a.removeChild(e)),a.style.display="none",(nt=0===a.getClientRects().length)&&(a.style.display="",a.innerHTML="
        t
        ",a.childNodes[0].style.borderCollapse="separate",(e=a.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",nt=0===e[0].offsetHeight)&&(e[0].style.display="",e[1].style.display="none",nt=0===e[0].offsetHeight),t.removeChild(ot)}ot=g.createElement("div"),(a=g.createElement("div")).style&&(a.style.cssText="float:left;opacity:.5",y.opacity="0.5"===a.style.opacity,y.cssFloat=!!a.style.cssFloat,a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===a.style.backgroundClip,(ot=g.createElement("div")).style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.innerHTML="",ot.appendChild(a),y.boxSizing=""===a.style.boxSizing||""===a.style.MozBoxSizing||""===a.style.WebkitBoxSizing,C.extend(y,{reliableHiddenOffsets:function(){return null==n&&t(),nt},boxSizingReliable:function(){return null==n&&t(),tt},pixelMarginRight:function(){return null==n&&t(),et},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),rt},reliableMarginLeft:function(){return null==n&&t(),it}}));var l,p,ct=/^(top|right|bottom|left)$/;function ft(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}T.getComputedStyle?(l=function(e){var t=e.ownerDocument.defaultView;return(t=t&&t.opener?t:T).getComputedStyle(e)},p=function(e,t,n){var r,i,o=e.style;return""!==(i=(n=n||l(e))?n.getPropertyValue(t)||n[t]:undefined)&&i!==undefined||C.contains(e.ownerDocument,e)||(i=C.style(e,t)),n&&!y.pixelMarginRight()&&st.test(i)&&at.test(t)&&(e=o.width,t=o.minWidth,r=o.maxWidth,o.minWidth=o.maxWidth=o.width=i,i=n.width,o.width=e,o.minWidth=t,o.maxWidth=r),i===undefined?i:i+""}):lt.currentStyle&&(l=function(e){return e.currentStyle},p=function(e,t,n){var r,i,o,a=e.style;return null==(n=(n=n||l(e))?n[t]:undefined)&&a&&a[t]&&(n=a[t]),st.test(n)&&!ct.test(t)&&(r=a.left,(o=(i=e.runtimeStyle)&&i.left)&&(i.left=e.currentStyle.left),a.left="fontSize"===t?"1em":n,n=a.pixelLeft+"px",a.left=r,o)&&(i.left=o),n===undefined?n:n+""||"auto"});var dt=/alpha\([^)]*\)/i,pt=/opacity\s*=\s*([^)]*)/i,ht=/^(none|table(?!-c[ea]).+)/,gt=new RegExp("^("+e+")(.*)$","i"),mt={position:"absolute",visibility:"hidden",display:"block"},yt={letterSpacing:"0",fontWeight:"400"},vt=["Webkit","O","Moz","ms"],xt=g.createElement("div").style;function bt(e){if(e in xt)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=vt.length;n--;)if((e=vt[n]+t)in xt)return e}function wt(e,t){for(var n,r,i,o=[],a=0,s=e.length;a
        a",F=q.getElementsByTagName("a")[0],k.setAttribute("type","checkbox"),q.appendChild(k),(F=q.getElementsByTagName("a")[0]).style.cssText="top:1px",y.getSetAttribute="t"!==q.className,y.style=/top/.test(F.getAttribute("style")),y.hrefNormalized="/a"===F.getAttribute("href"),y.checkOn=!!k.value,y.optSelected=e.selected,y.enctype=!!g.createElement("form").enctype,S.disabled=!0,y.optDisabled=!e.disabled,(k=g.createElement("input")).setAttribute("value",""),y.input=""===k.getAttribute("value"),k.value="t",k.setAttribute("type","radio"),y.radioValue="t"===k.value;var Lt=/\r/g,Ht=/[\x20\t\r\n\f]+/g;C.fn.extend({val:function(t){var n,e,r,i=this[0];return arguments.length?(r=C.isFunction(t),this.each(function(e){1!==this.nodeType||(null==(e=r?t.call(this,e,C(this).val()):t)?e="":"number"==typeof e?e+="":C.isArray(e)&&(e=C.map(e,function(e){return null==e?"":e+""})),(n=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in n&&n.set(this,e,"value")!==undefined)||(this.value=e)})):i?(n=C.valHooks[i.type]||C.valHooks[i.nodeName.toLowerCase()])&&"get"in n&&(e=n.get(i,"value"))!==undefined?e:"string"==typeof(e=i.value)?e.replace(Lt,""):null==e?"":e:void 0}}),C.extend({valHooks:{option:{get:function(e){var t=C.find.attr(e,"value");return null!=t?t:C.trim(C.text(e)).replace(Ht," ")}},select:{get:function(e){for(var t,n=e.options,r=e.selectedIndex,i="select-one"===e.type||r<0,o=i?null:[],a=i?r+1:n.length,s=r<0?a:i?r:0;s").append(C.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this)},C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){C.fn[t]=function(e){return this.on(t,e)}}),C.expr.filters.animated=function(t){return C.grep(C.timers,function(e){return t===e.elem}).length},C.offset={setOffset:function(e,t,n){var r,i,o,a,s=C.css(e,"position"),u=C(e),l={};"static"===s&&(e.style.position="relative"),o=u.offset(),r=C.css(e,"top"),a=C.css(e,"left"),s=("absolute"===s||"fixed"===s)&&-1'+(s?a.title[0]:a.title)+"
        ":"";return a.zIndex=o,t([a.shade?'
        ':"",'
        '+(e&&2!=a.type?"":s)+"'+(n=["layui-icon-tips","layui-icon-success","layui-icon-error","layui-icon-question","layui-icon-lock","layui-icon-face-cry","layui-icon-face-smile"],o="layui-anim layui-anim-rotate layui-anim-loop",0==a.type&&-1!==a.icon?'':3==a.type?(i=["layui-icon-loading","layui-icon-loading-1"],2==a.icon?'
        ':''):"")+((1!=a.type||!e)&&a.content||"")+'
        '+(n=[],l&&(n.push(''),n.push('')),a.closeBtn&&n.push(''),n.join(""))+"
        "+(a.btn?function(){var e="";"string"==typeof a.btn&&(a.btn=[a.btn]);for(var t,i=0,n=a.btn.length;i'+a.btn[i]+"";return'
        '+e+"
        "}():"")+(a.resize?'':"")+"
        "],s,m('
        ')),this},t.pt.creat=function(){var e,t,i,n,a,o=this,s=o.config,l=o.index,r="object"==typeof(f=s.content),c=m("body");if(s.id&&m("."+y[0]).find("#"+s.id)[0])e=m("#"+s.id).closest("."+y[0]),t=e.attr("times"),i=e.data("config"),n=m("#"+y.SHADE+t),"min"===(e.data("maxminStatus")||{})?h.restore(t):i.hideOnClose&&(n.show(),e.show());else{switch(s.removeFocus&&document.activeElement.blur(),"string"==typeof s.area&&(s.area="auto"===s.area?["",""]:[s.area,""]),s.shift&&(s.anim=s.shift),6==h.ie&&(s.fixed=!1),s.type){case 0:s.btn="btn"in s?s.btn:u.btn[0],h.closeAll("dialog");break;case 2:var f=s.content=r?s.content:[s.content||"","auto"];s.content='';break;case 3:delete s.title,delete s.closeBtn,-1===s.icon&&s.icon,h.closeAll("loading");break;case 4:r||(s.content=[s.content,"body"]),s.follow=s.content[1],s.content=s.content[0]+'',delete s.title,s.tips="object"==typeof s.tips?s.tips:[s.tips,!0],s.tipsMore||h.closeAll("tips")}o.vessel(r,function(e,t,i){c.append(e[0]),r?2==s.type||4==s.type?m("body").append(e[1]):f.parents("."+y[0])[0]||(f.data("display",f.css("display")).show().addClass("layui-layer-wrap").wrap(e[1]),m("#"+y[0]+l).find("."+y[5]).before(t)):c.append(e[1]),m("#"+y.MOVE)[0]||c.append(u.moveElem=i),o.layero=m("#"+y[0]+l),o.shadeo=m("#"+y.SHADE+l),s.scrollbar||u.setScrollbar(l)}).auto(l),o.shadeo.css({"background-color":s.shade[1]||"#000",opacity:s.shade[0]||s.shade}),2==s.type&&6==h.ie&&o.layero.find("iframe").attr("src",f[0]),4==s.type?o.tips():(o.offset(),parseInt(u.getStyle(document.getElementById(y.MOVE),"z-index"))||(o.layero.css("visibility","hidden"),h.ready(function(){o.offset(),o.layero.css("visibility","visible")}))),!s.fixed||u.events.resize[o.index]||(u.events.resize[o.index]=function(){o.resize()},d.on("resize",u.events.resize[o.index])),s.time<=0||setTimeout(function(){h.close(o.index)},s.time),o.move().callback(),y.anim[s.anim]&&(a="layer-anim "+y.anim[s.anim],o.layero.addClass(a).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){m(this).removeClass(a)})),o.layero.data("config",s)}},t.pt.resize=function(){var e=this,t=e.config;e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(e.index),4==t.type&&e.tips()},t.pt.auto=function(e){var t=this.config,i=m("#"+y[0]+e),n=(""===t.area[0]&&0t.maxWidth)&&i.width(t.maxWidth),[i.innerWidth(),i.innerHeight()]),a=i.find(y[1]).outerHeight()||0,o=i.find("."+y[6]).outerHeight()||0,e=function(e){(e=i.find(e)).height(n[1]-a-o-2*(0|parseFloat(e.css("padding-top"))))};return 2===t.type?e("iframe"):""===t.area[1]?0t.maxHeight?(n[1]=t.maxHeight,e("."+y[5])):t.fixed&&n[1]>=d.height()&&(n[1]=d.height(),e("."+y[5])):e("."+y[5]),this},t.pt.offset=function(){var e=this,t=e.config,i=e.layero,n=[i.outerWidth(),i.outerHeight()],a="object"==typeof t.offset;e.offsetTop=(d.height()-n[1])/2,e.offsetLeft=(d.width()-n[0])/2,a?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=d.width()-n[0]:"b"===t.offset?e.offsetTop=d.height()-n[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=d.height()-n[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=d.width()-n[0]):"rb"===t.offset?(e.offsetTop=d.height()-n[1],e.offsetLeft=d.width()-n[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?d.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?d.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=d.scrollTop(),e.offsetLeft+=d.scrollLeft()),"min"===i.data("maxminStatus")&&(e.offsetTop=d.height()-(i.find(y[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},t.pt.tips=function(){var e=this.config,t=this.layero,i=[t.outerWidth(),t.outerHeight()],n=m(e.follow),a={width:(n=n[0]?n:m("body")).outerWidth(),height:n.outerHeight(),top:n.offset().top,left:n.offset().left},o=t.find(".layui-layer-TipsG"),n=e.tips[0];e.tips[1]||o.remove(),a.autoLeft=function(){0d.width()&&(o=d.width()-180-(u.minStackArr.edgeIndex=u.minStackArr.edgeIndex||0,u.minStackArr.edgeIndex+=3))<0&&(o=0),t.minStack&&(l.left=o,l.top=d.height()-n,a||u.minStackIndex++,r.attr("minLeft",o)),r.attr("position",s),h.style(e,l,!0),i.hide(),"page"===r.attr("type")&&r.find(y[4]).hide(),u.restScrollbar(e),c.hide())},h.restore=function(e){var t=m("#"+y[0]+e),i=m("#"+y.SHADE+e),n=t.attr("area").split(","),a=t.attr("type"),o=t.data("config")||{};t.removeData("maxminStatus"),h.style(e,{width:n[0],height:n[1],top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===a&&t.find(y[4]).show(),o.scrollbar?u.restScrollbar(e):u.setScrollbar(e),i.show()},h.full=function(t){var i=m("#"+y[0]+t),e=i.data("maxminStatus");"max"!==e&&("min"===e&&h.restore(t),i.data("maxminStatus","max"),u.record(i),y.html.attr("layer-full")||u.setScrollbar(t),setTimeout(function(){var e="fixed"===i.css("position");h.style(t,{top:e?0:d.scrollTop(),left:e?0:d.scrollLeft(),width:"100%",height:"100%"},!0),i.find(".layui-layer-min").hide()},100))},h.title=function(e,t){m("#"+y[0]+(t||h.index)).find(y[1]).html(e)},h.close=function(o,s){var l,e,r=(t=m("."+y[0]).children("#"+o).closest("."+y[0]))[0]?(o=t.attr("times"),t):m("#"+y[0]+o),c=r.attr("type"),t=r.data("config")||{},f=t.id&&t.hideOnClose;r[0]&&(l={slideDown:"layer-anim-slide-down-out",slideLeft:"layer-anim-slide-left-out",slideUp:"layer-anim-slide-up-out",slideRight:"layer-anim-slide-right-out"}[t.anim]||"layer-anim-close",e=function(){var e="layui-layer-wrap";if(f)return r.removeClass("layer-anim "+l),r.hide();if(c===u.type[1]&&"object"===r.attr("conType")){r.children(":not(."+y[5]+")").remove();for(var t=r.find("."+e),i=0;i<2;i++)t.unwrap();t.css("display",t.data("display")).removeClass(e)}else{if(c===u.type[2])try{var n=m("#"+y[4]+o)[0];n.contentWindow.document.write(""),n.contentWindow.close(),r.find("."+y[5])[0].removeChild(n)}catch(a){}r[0].innerHTML="",r.remove()}"function"==typeof u.end[o]&&u.end[o](),delete u.end[o],"function"==typeof s&&s(),u.events.resize[o]&&(d.off("resize",u.events.resize[o]),delete u.events.resize[o])},m("#"+y.SHADE+o)[f?"hide":"remove"](),t.isOutAnim&&r.addClass("layer-anim "+l),6==h.ie&&u.reselect(),u.restScrollbar(o),"string"==typeof r.attr("minLeft")&&(u.minStackIndex--,u.minStackArr.push(r.attr("minLeft"))),h.ie&&h.ie<10||!t.isOutAnim?e():setTimeout(function(){e()},200))},h.closeAll=function(n,a){"function"==typeof n&&(a=n,n=null);var o=m("."+y[0]);m.each(o,function(e){var t=m(this),i=n?t.attr("type")===n:1;i&&h.close(t.attr("times"),e===o.length-1?a:null)}),0===o.length&&"function"==typeof a&&a()},h.closeLast=function(e){h.close(m(".layui-layer-"+(e=e||"page")+":last").attr("times"))},h.cache||{}),g=function(e){return i.skin?" "+i.skin+" "+i.skin+"-"+e:""};h.prompt=function(i,n){var e="",t="";"function"==typeof(i=i||{})&&(n=i),i.area&&(e='style="width: '+(o=i.area)[0]+"; height: "+o[1]+';"',delete i.area),i.placeholder&&(t=' placeholder="'+i.placeholder+'"');var a,o=2==i.formType?'":'",s=i.success;return delete i.success,h.open(m.extend({type:1,btn:["确定","取消"],content:o,skin:"layui-layer-prompt"+g("prompt"),maxWidth:d.width(),success:function(e){(a=e.find(".layui-layer-input")).val(i.value||"").focus(),"function"==typeof s&&s(e)},resize:!1,yes:function(e){var t=a.val();t.length>(i.maxlength||500)?h.tips("最多输入"+(i.maxlength||500)+"个字数",a,{tips:1}):n&&n(t,e,a)}},i))},h.tab=function(n){var a=(n=n||{}).tab||{},o="layui-this",s=n.success;return delete n.success,h.open(m.extend({type:1,skin:"layui-layer-tab"+g("tab"),resize:!1,title:function(){var e=a.length,t=1,i="";if(0'+a[0].title+"";t"+a[t].title+"";return i}(),content:'
          '+function(){var e=a.length,t=1,i="";if(0'+(a[0].content||"no content")+"";t'+(a[t].content||"no content")+"";return i}()+"
        ",success:function(e){var t=e.find(".layui-layer-title").children(),i=e.find(".layui-layer-tabmain").children();t.on("mousedown",function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0;var e=m(this),t=e.index();e.addClass(o).siblings().removeClass(o),i.eq(t).show().siblings().hide(),"function"==typeof n.change&&n.change(t)}),"function"==typeof s&&s(e)}},n))},h.photos=function(n,e,a){var o={};if((n=m.extend(!0,{toolbar:!0,footer:!0},n)).photos){var t=!("string"==typeof n.photos||n.photos instanceof m),i=t?n.photos:{},s=i.data||[],l=i.start||0,r=n.success;if(o.imgIndex=1+(0|l),n.img=n.img||"img",delete n.success,t){if(0===s.length)return h.msg("没有图片")}else{var c=m(n.photos),f=function(){s=[],c.find(n.img).each(function(e){var t=m(this);t.attr("layer-index",e),s.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("lay-src")||t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(f(),0===s.length)return;if(e||c.on("click",n.img,function(){f();var e=m(this).attr("layer-index");h.photos(m.extend(n,{photos:{start:e,data:s,tab:n.tab},full:n.full}),!0)}),!e)return}o.imgprev=function(e){o.imgIndex--,o.imgIndex<1&&(o.imgIndex=s.length),o.tabimg(e)},o.imgnext=function(e,t){o.imgIndex++,o.imgIndex>s.length&&(o.imgIndex=1,t)||o.tabimg(e)},o.keyup=function(e){var t;o.end||(t=e.keyCode,e.preventDefault(),37===t?o.imgprev(!0):39===t?o.imgnext(!0):27===t&&h.close(o.index))},o.tabimg=function(e){if(!(s.length<=1))return i.start=o.imgIndex-1,h.close(o.index),h.photos(n,!0,e)},o.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},o.image={},o.getTransform=function(e){var t=[],i=e.rotate,n=e.scaleX,e=e.scale;return o.isNumber(i)&&0!==i&&t.push("rotate("+i+"deg)"),o.isNumber(n)&&1!==n&&t.push("scaleX("+n+")"),o.isNumber(e)&&t.push("scale("+e+")"),t.length?t.join(" "):"none"},o.event=function(e,i,n){o.main.find(".layui-layer-photos-prev").on("click",function(e){e.preventDefault(),o.imgprev(!0)}),o.main.find(".layui-layer-photos-next").on("click",function(e){e.preventDefault(),o.imgnext(!0)}),m(document).on("keyup",o.keyup),e.off("click").on("click","*[toolbar-event]",function(){var e=m(this);switch(e.attr("toolbar-event")){case"rotate":o.image.rotate=((o.image.rotate||0)+Number(e.attr("data-option")))%360,o.imgElem.css({transform:o.getTransform(o.image)});break;case"scalex":o.image.scaleX=-1===o.image.scaleX?1:-1,o.imgElem.css({transform:o.getTransform(o.image)});break;case"zoom":var t=Number(e.attr("data-option"));o.image.scale=(o.image.scale||1)+t,t<0&&o.image.scale<0-t&&(o.image.scale=0-t),o.imgElem.css({transform:o.getTransform(o.image)});break;case"reset":o.image.scaleX=1,o.image.scale=1,o.image.rotate=0,o.imgElem.css({transform:"none"});break;case"close":h.close(i)}n.offset(),n.auto(i)}),o.main.children("img").on("mousewheel DOMMouseScroll",function(e){var e=e.originalEvent.wheelDelta||-e.originalEvent.detail,t=o.main.find('[toolbar-event="zoom"]');(0'+i+''+(t=['
        '],1','','',"
        "].join("")),n.toolbar&&t.push(['
        ','','','','','','',"
        "].join("")),n.footer&&t.push(['"].join("")),t.push(""),t.join(""))+"",success:function(e,t,i){o.main=e.find(".layer-layer-photos-main"),o.footer=e.find(".layui-layer-photos-footer"),o.imgElem=o.main.children("img"),o.event(e,t,i),n.tab&&n.tab(s[l],e),"function"==typeof r&&r(e)},end:function(){o.end=!0,m(document).off("keyup",o.keyup)}},n))},u=function(){h.close(o.loadi),h.msg("当前图片地址异常
        是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){1").addClass(r));layui.each(i.bars,function(t,e){var n=s('
      • ');n.addClass(e.icon).attr({"lay-type":e.type,style:e.style||(i.bgcolor?"background-color: "+i.bgcolor:"")}).html(e.content),n.on("click",function(){var t=s(this).attr("lay-type");"top"===t&&("body"===i.target?s("html,body"):u).animate({scrollTop:0},i.duration),"function"==typeof i.click&&i.click.call(this,t)}),"object"===layui.type(i.on)&&layui.each(i.on,function(t,e){n.on(t,function(){var t=s(this).attr("lay-type");"function"==typeof e&&e.call(this,t)})}),"top"===e.type&&(n.addClass("layui-fixbar-top"),o=n),l.append(n)}),c.find("."+r).remove(),"object"==typeof i.css&&l.css(i.css),c.append(l),o&&(e=function e(){return u.scrollTop()>=i.margin?t||(o.show(),t=1):t&&(o.hide(),t=0),e}()),u.on("scroll",function(){e&&(clearTimeout(n),n=setTimeout(function(){e()},100))})},countdown:function(i){i=s.extend(!0,{date:new Date,now:new Date},i);var o=arguments,r=(1]|&(?=#[a-zA-Z0-9]+)/g.test(t+="")?t.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,"""):t},unescape:function(t){return t!==undefined&&null!==t||(t=""),(t+="").replace(/\&/g,"&").replace(/\</g,"<").replace(/\>/g,">").replace(/\'/g,"'").replace(/\"/g,'"')},openWin:function(t){var e=(t=t||{}).window||window.open(t.url||"",t.target,t.specs);t.url||(e.document.open("text/html","replace"),e.document.write(t.content||""),e.document.close())},toVisibleArea:function(t){var e,n,i,o,r,a,c,u;(t=s.extend({margin:160,duration:200,type:"y"},t)).scrollElem[0]&&t.thisElem[0]&&(e=t.scrollElem,c=t.thisElem,i=(r="y"===t.type)?"top":"left",o=e[n=r?"scrollTop":"scrollLeft"](),r=e[r?"height":"width"](),a=e.offset()[i],u={},(c=c.offset()[i]-a)>r-t.margin||c."+v,E=function(e){var i=this;i.index=++f.index,i.config=c.extend({},i.config,f.config,e),i.init()};E.prototype.config={trigger:"click",content:"",className:"",style:"",show:!1,isAllowSpread:!0,isSpreadItem:!0,data:[],delay:300,shade:0,accordion:!1},E.prototype.reload=function(e,i){var t=this;t.config=c.extend({},t.config,e),t.init(!0,i)},E.prototype.init=function(e,i){var t,n=this,a=n.config,l=c(a.elem);return 1');return 0No data
      • '),e},u=function(r,e){return layui.each(e,function(e,i){var t,n=i[s.children]&&0",(t="href"in i?''+l+"":l,n?'
        '+t+("parent"===o?'':"group"===o&&d.isAllowSpread?'':"")+"
        ":'
        '+t+"
        "),""].join(""))).data("item",i),n&&(a=c('
        '),t=c("
          "),"parent"===o?(a.append(u(t,i[s.children])),l.append(a)):l.append(u(t,i[s.children]))),r.append(l))}),r},a=['
          ',"
          "].join("");!(e="contextmenu"!==d.trigger&&!lay.isTopElem(d.elem[0])?e:!0)&&d.elem.data(y+"_opened")||(l.elemView=c("."+g+'[lay-id="'+d.id+'"]'),"reloadData"===i&&l.elemView.length?l.elemView.html(d.content||n()):(l.elemView=c(a),l.elemView.append(d.content||n()),d.className&&l.elemView.addClass(d.className),d.style&&l.elemView.attr("style",d.style),f.thisId=d.id,l.remove(),t.append(l.elemView),d.elem.data(y+"_opened",!0),e=d.shade?'
          ':"",l.elemView.before(e),"mouseenter"===d.trigger&&l.elemView.on("mouseenter",function(){clearTimeout(h.timer)}).on("mouseleave",function(){l.delayRemove()})),l.position(),(h.prevElem=l.elemView).data("prevElem",d.elem),l.elemView.find(".layui-menu").on(o,function(e){layui.stope(e)}),l.elemView.find(".layui-menu li").on("click",function(e){var i=c(this),t=i.data("item")||{},n=t[s.children]&&0n.width()&&(t.addClass(x),(i=t[0].getBoundingClientRect()).left<0)&&t.removeClass(x),i.bottom>n.height())&&t.eq(0).css("margin-top",-(i.bottom-n.height()+5))}).on("mouseleave",t,function(e){var i=c(this).children("."+C);i.removeClass(x),i.css("margin-top",0)}),f.close=function(e){e=h.getThis(e);return e?(e.remove(),h.call(e)):this},f.reload=function(e,i,t){e=h.getThis(e);return e?(e.reload(i,t),h.call(e)):this},f.reloadData=function(){var t=c.extend([],arguments),n=(t[2]="reloadData",new RegExp("^("+["data","templet","content"].join("|")+")$"));return layui.each(t[1],function(e,i){n.test(e)||delete t[1][e]}),f.reload.apply(null,t)},f.render=function(e){e=new E(e);return h.call(e)},e(r,f)});layui.define(["jquery","lay"],function(e){"use strict";var g=layui.$,c=layui.lay,m={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var i=this;return i.config=g.extend({},i.config,e),i},on:function(e,i){return layui.onevent.call(this,t,e,i)}},t="slider",v="layui-disabled",x="layui-slider-bar",b="layui-slider-wrap",T="layui-slider-wrap-btn",w="layui-slider-tips",M="layui-slider-input-txt",L="layui-slider-hover",i=function(e){var i=this;i.index=++m.index,i.config=g.extend({},i.config,m.config,e),i.render()};i.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#16baaa"},i.prototype.render=function(){var a=this,n=a.config,e=g(n.elem);if(1n.max&&(n.value=n.max),t=Math.floor((n.value-n.min)/(n.max-n.min)*100)+"%");var l,e=n.disabled?"#c2c2c2":n.theme,i='
          '+(n.tips?'
          ':"")+'
          '+(n.range?'
          ':"")+"
          ",t=g(n.elem),s=t.next(".layui-slider");if(s[0]&&s.remove(),a.elemTemp=g(i),n.range?(a.elemTemp.find("."+b).eq(0).data("value",n.value[0]),a.elemTemp.find("."+b).eq(1).data("value",n.value[1])):a.elemTemp.find("."+b).data("value",n.value),t.html(a.elemTemp),"vertical"===n.type&&a.elemTemp.height(n.height+"px"),n.showstep){for(var o=(n.max-n.min)/n.step,r="",d=1;d<1+o;d++){var u=100*d/o;u<100&&(r+='
          ')}a.elemTemp.append(r)}n.input&&!n.range&&(e=g('
          '),t.css("position","relative"),t.append(e),t.find("."+M).children("input").val(n.value),"vertical"===n.type?e.css({left:0,top:-48}):a.elemTemp.css("margin-right",e.outerWidth()+15)),n.disabled?(a.elemTemp.addClass(v),a.elemTemp.find("."+T).addClass(v)):a.slide(),a.elemTemp.find("."+T).on("mouseover",function(){var e="vertical"===n.type?n.height:a.elemTemp[0].offsetWidth,i=a.elemTemp.find("."+b),t=("vertical"===n.type?e-g(this).parent()[0].offsetTop-i.height():g(this).parent()[0].offsetLeft)/e*100,i=g(this).parent().data("value"),e=n.setTips?n.setTips(i):i;a.elemTemp.find("."+w).html(e),clearTimeout(l),l=setTimeout(function(){"vertical"===n.type?a.elemTemp.find("."+w).css({bottom:t+"%","margin-bottom":"20px",display:"inline-block"}):a.elemTemp.find("."+w).css({left:t+"%",display:"inline-block"})},300)}).on("mouseout",function(){clearTimeout(l),a.elemTemp.find("."+w).css("display","none")})},i.prototype.slide=function(e,i,t){var o=this,r=o.config,d=o.elemTemp,u=function(){return"vertical"===r.type?r.height:d[0].offsetWidth},c=d.find("."+b),m=d.next(".layui-slider-input"),v=m.children("."+M).children("input").val(),p=100/((r.max-r.min)/Math.ceil(r.step)),f=function(e,i,t){e=(e=100<(e=100a[1]&&a.reverse(),o.value=r.range?a:l,r.change&&r.change(o.value),"done"===t&&r.done&&r.done(o.value)},h=function(e){var i=e/u()*100/p,t=Math.round(i)*p;return t=e==u()?Math.ceil(i)*p:t},y=g(['
          u()?u():i)/u()*100/p;f(i,l),s.addClass(L),d.find("."+w).show(),e.preventDefault()},i=function(){s.removeClass(L),d.find("."+w).hide()},t=function(){i&&i(),y.remove(),r.done&&r.done(o.value)},g("#LAY-slider-moving")[0]||g("body").append(y),y.on("mousemove",e),y.on("mouseup",t).on("mouseleave",t)})}),d.on("click",function(e){var i=g("."+T),t=g(this);!i.is(event.target)&&0===i.has(event.target).length&&i.length&&(t=(i=(i=(i="vertical"===r.type?u()-e.clientY+t.offset().top-g(window).scrollTop():e.clientX-t.offset().left-g(window).scrollLeft())<0?0:i)>u()?u():i)/u()*100/p,i=r.range?"vertical"===r.type?Math.abs(i-parseInt(g(c[0]).css("bottom")))>Math.abs(i-parseInt(g(c[1]).css("bottom")))?1:0:Math.abs(i-c[0].offsetLeft)>Math.abs(i-c[1].offsetLeft)?1:0:0,f(t,i,"done"),e.preventDefault())}),m.children(".layui-slider-input-btn").children("i").each(function(i){g(this).on("click",function(){v=m.children("."+M).children("input").val();var e=((v=1==i?v-r.stepr.max?r.max:Number(v)+r.step)-r.min)/(r.max-r.min)*100/p;f(e,0,"done")})});var a=function(){var e=this.value,e=(e=(e=(e=isNaN(e)?0:e)r.max?r.max:e,((this.value=e)-r.min)/(r.max-r.min)*100/p);f(e,0,"done")};m.children("."+M).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),a.call(this))}).on("change",a)},i.prototype.events=function(){this.config},m.render=function(e){e=new i(e);return function(){var t=this,a=t.config;return{setValue:function(e,i){return e=(e=e>a.max?a.max:e)',"",'','',"","","
          "].join("")),r=i.elem=m(i.elem);i.size&&o.addClass("layui-colorpicker-"+i.size),r.addClass("layui-inline").html(e.elemColorBox=o),i.id="id"in i?i.id:r.attr("id")||e.index,e.color=e.elemColorBox.find("."+C)[0].style.background,e.events()},d.prototype.renderPicker=function(){var o,e=this,i=e.config,r=e.elemColorBox[0],t=e.elemPicker=m(['
          ','
          ','
          ','
          ','
          ','
          ',"
          ",'
          ','
          ',"
          ","
          ",'
          ','
          ','
          ',"
          ","
          ",i.predefine?(o=['
          '],layui.each(i.colors,function(e,i){o.push(['
          ','
          ',"
          "].join(""))}),o.push("
          "),o.join("")):"",'
          ','
          ','',"
          ",'
          ','','',"","
          "].join(""));e.elemColorBox.find("."+C)[0];m(a)[0]&&m(a).data("index")==e.index?e.removePicker(d.thisElemInd):(e.removePicker(d.thisElemInd),m("body").append(t)),n.thisId=i.id,d.thisElemInd=e.index,d.thisColor=r.style.background,e.position(),e.pickerEvents()},d.prototype.removePicker=function(e){var i=this.config,e=m("#layui-colorpicker"+(e||this.index));return e[0]&&(e.remove(),delete n.thisId,"function"==typeof i.close)&&i.close(this.color),this},d.prototype.position=function(){var e=this,i=e.config;return t.position(e.bindElem||e.elemColorBox[0],e.elemPicker[0],{position:i.position,align:"center"}),e},d.prototype.val=function(){var e,i=this,o=(i.config,i.elemColorBox.find("."+C)),r=i.elemPicker.find("."+M),t=o[0].style.backgroundColor;t?(e=Y(L(t)),o=o.attr("lay-type"),i.select(e.h,e.s,e.b),"torgb"===o?r.find("input").val(t):"rgba"===o?(o=L(t),3===(t.match(/[0-9]{1,3}/g)||[]).length?(r.find("input").val("rgba("+o.r+", "+o.g+", "+o.b+", 1)"),i.elemPicker.find("."+T).css("left",280)):(r.find("input").val(t),t=280*t.slice(t.lastIndexOf(",")+1,t.length-1),i.elemPicker.find("."+T).css("left",t)),i.elemPicker.find("."+D)[0].style.background="linear-gradient(to right, rgba("+o.r+", "+o.g+", "+o.b+", 0), rgb("+o.r+", "+o.g+", "+o.b+"))"):r.find("input").val("#"+F(e))):(i.select(0,100,100),r.find("input").val(""),i.elemPicker.find("."+D)[0].style.background="",i.elemPicker.find("."+T).css("left",280))},d.prototype.side=function(){var n=this,l=n.config,c=n.elemColorBox.find("."+C),a=c.attr("lay-type"),s=n.elemPicker.find(".layui-colorpicker-side"),e=n.elemPicker.find("."+B),d=n.elemPicker.find("."+I),r=n.elemPicker.find("."+E),f=n.elemPicker.find("."+D),u=n.elemPicker.find("."+T),g=e[0].offsetTop/180*360,p=100-(r[0].offsetTop+3)/180*100,h=(r[0].offsetLeft+3)/260*100,v=Math.round(u[0].offsetLeft/280*100)/100,b=n.elemColorBox.find("."+w),i=n.elemPicker.find(".layui-colorpicker-pre").children("div"),y=function(e,i,o,r){n.select(e,i,o);var t=j({h:e,s:i,b:o}),e=F({h:e,s:i,b:o}),i=n.elemPicker.find("."+M).find("input");b.addClass(x).removeClass(P),c[0].style.background="rgb("+t.r+", "+t.g+", "+t.b+")","torgb"===a?i.val("rgb("+t.r+", "+t.g+", "+t.b+")"):"rgba"===a?(u.css("left",280*r),i.val("rgba("+t.r+", "+t.g+", "+t.b+", "+r+")"),c[0].style.background="rgba("+t.r+", "+t.g+", "+t.b+", "+r+")",f[0].style.background="linear-gradient(to right, rgba("+t.r+", "+t.g+", "+t.b+", 0), rgb("+t.r+", "+t.g+", "+t.b+"))"):i.val("#"+e),l.change&&l.change(n.elemPicker.find("."+M).find("input").val())},o=m(['
          '].join("")),k=function(e){m("#LAY-colorpicker-moving")[0]||m("body").append(o),o.on("mousemove",e),o.on("mouseup",function(){o.remove()}).on("mouseleave",function(){o.remove()})};e.on("mousedown",function(e){var r=this.offsetTop,t=e.clientY;k(function(e){var i=r+(e.clientY-t),o=s[0].offsetHeight,o=(i=o<(i=i<0?0:i)?o:i)/180*360;y(g=o,h,p,v),e.preventDefault()}),e.preventDefault()}),s.on("click",function(e){var i=e.clientY-m(this).offset().top+H.scrollTop(),i=(i=(i=i<0?0:i)>this.offsetHeight?this.offsetHeight:i)/180*360;y(g=i,h,p,v),e.preventDefault()}),r.on("mousedown",function(e){var n=this.offsetTop,l=this.offsetLeft,c=e.clientY,a=e.clientX;layui.stope(e),k(function(e){var i=n+(e.clientY-c),o=l+(e.clientX-a),r=d[0].offsetHeight-3,t=d[0].offsetWidth-3,t=((o=t<(o=o<-3?-3:o)?t:o)+3)/260*100,o=100-((i=r<(i=i<-3?-3:i)?r:i)+3)/180*100;y(g,h=t,p=o,v),e.preventDefault()}),e.preventDefault()}),d.on("mousedown",function(e){var i=e.clientY-m(this).offset().top-3+H.scrollTop(),o=e.clientX-m(this).offset().left-3+H.scrollLeft(),o=((i=i<-3?-3:i)>this.offsetHeight-3&&(i=this.offsetHeight-3),((o=(o=o<-3?-3:o)>this.offsetWidth-3?this.offsetWidth-3:o)+3)/260*100),i=100-(i+3)/180*100;y(g,h=o,p=i,v),layui.stope(e),e.preventDefault(),r.trigger(e,"mousedown")}),u.on("mousedown",function(e){var r=this.offsetLeft,t=e.clientX;k(function(e){var i=r+(e.clientX-t),o=f[0].offsetWidth,o=(o<(i=i<0?0:i)&&(i=o),Math.round(i/280*100)/100);y(g,h,p,v=o),e.preventDefault()}),e.preventDefault()}),f.on("click",function(e){var i=e.clientX-m(this).offset().left,i=((i=i<0?0:i)>this.offsetWidth&&(i=this.offsetWidth),Math.round(i/280*100)/100);y(g,h,p,v=i),e.preventDefault()}),i.each(function(){m(this).on("click",function(){m(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e=this.style.backgroundColor,i=Y(L(e)),o=e.slice(e.lastIndexOf(",")+1,e.length-1);g=i.h,h=i.s,p=i.b,3===(e.match(/[0-9]{1,3}/g)||[]).length&&(o=1),v=o,y(i.h,i.s,i.b,o)})})},d.prototype.select=function(e,i,o,r){this.config;var t=F({h:e,s:100,b:100}),e=(F({h:e,s:i,b:o}),e/360*180),o=180-o/100*180-3,i=i/100*260-3;this.elemPicker.find("."+B).css("top",e),this.elemPicker.find("."+I)[0].style.background="#"+t,this.elemPicker.find("."+E).css({top:o,left:i})},d.prototype.pickerEvents=function(){var c=this,a=c.config,s=c.elemColorBox.find("."+C),d=c.elemPicker.find("."+M+" input"),o={clear:function(e){s[0].style.background="",c.elemColorBox.find("."+w).removeClass(x).addClass(P),c.color="",a.done&&a.done(""),c.removePicker()},confirm:function(e,i){var o,r,t,n,l=d.val();-1>16,g:(65280&t)>>8,b:255&t},r=Y(n),s[0].style.background=o="#"+F(r),c.elemColorBox.find("."+w).removeClass(P).addClass(x)),"change"===i?(c.select(r.h,r.s,r.b,i),a.change&&a.change(o)):(c.color=l,a.done&&a.done(l),c.removePicker())}};c.elemPicker.on("click","*[colorpicker-events]",function(){var e=m(this),i=e.attr("colorpicker-events");o[i]&&o[i].call(this,e)}),d.on("keyup",function(e){var i=m(this);o.confirm.call(this,i,13===e.keyCode?null:"change")})},d.prototype.events=function(){var e=this;e.config;e.elemColorBox.on("click",function(){e.renderPicker(),m(a)[0]&&(e.val(),e.side())})},s.on(i,function(e){var i,o,r;n.thisId&&(i=l.getThis(n.thisId))&&(o=i.config,r=i.elemColorBox.find("."+C),m(e.target).hasClass(c)||m(e.target).parents("."+c)[0]||m(e.target).hasClass(a.replace(/\./g,""))||m(e.target).parents(a)[0]||i.elemPicker&&(i.color?(e=Y(L(i.color)),i.select(e.h,e.s,e.b)):i.elemColorBox.find("."+w).removeClass(x).addClass(P),r[0].style.background=i.color||"","function"==typeof o.cancel&&o.cancel(i.color),i.removePicker()))}),H.on("resize",function(){if(n.thisId){var e=l.getThis(n.thisId);if(e)return!(!e.elemPicker||!m(a)[0])&&void e.position()}}),l.that={},l.getThis=function(e){var i=l.that[e];return i||o.error(e?r+" instance with ID '"+e+"' not found":"ID argument required"),i},n.render=function(e){e=new d(e);return l.call(e)},e(r,n)});layui.define("jquery",function(t){"use strict";var u=layui.$,d=(layui.hint(),layui.device()),c="element",r="layui-this",h="layui-show",o=".layui-tab-title",i=function(){this.config={}},y=(i.prototype.set=function(t){return u.extend(!0,this.config,t),this},i.prototype.on=function(t,i){return layui.onevent.call(this,c,t,i)},i.prototype.tabAdd=function(t,i){var a,e=u(".layui-tab[lay-filter="+t+"]"),l=e.children(o),n=l.children(".layui-tab-bar"),e=e.children(".layui-tab-content"),s=""+(i.title||"unnaming")+"";return n[0]?n.before(s):l.append(s),e.append('
          '+(i.content||"")+"
          "),i.change&&this.tabChange(t,i.id),l.data("LAY_TAB_CHANGE",i.change),C.tabAuto(i.change?"change":null),this},i.prototype.tabDelete=function(t,i){t=u(".layui-tab[lay-filter="+t+"]").children(o).find('>li[lay-id="'+i+'"]');return C.tabDelete(null,t),this},i.prototype.tabChange=function(t,i){t=u(".layui-tab[lay-filter="+t+"]").children(o).find('>li[lay-id="'+i+'"]');return C.tabClick.call(t[0],{liElem:t}),this},i.prototype.tab=function(a){a=a||{},e.on("click",a.headerElem,function(t){var i=u(this).index();C.tabClick.call(this,{index:i,options:a})})},i.prototype.progress=function(t,i){var a="layui-progress",t=u("."+a+"[lay-filter="+t+"]").find("."+a+"-bar"),a=t.find("."+a+"-text");return t.css("width",function(){return/^.+\/.+$/.test(i)?100*new Function("return "+i)()+"%":i}).attr("lay-percent",i),a.text(i),this},".layui-nav"),f="layui-nav-item",p="layui-nav-bar",b="layui-nav-tree",v="layui-nav-child",m="layui-nav-more",g="layui-anim layui-anim-upbit",C={tabClick:function(t){var i=(t=t||{}).options||{},a=t.liElem||u(this),e=i.headerElem?a.parent():a.parents(".layui-tab").eq(0),i=i.bodyElem?u(i.bodyElem):e.children(".layui-tab-content").children(".layui-tab-item"),l=a.find("a"),l="javascript:;"!==l.attr("href")&&"_blank"===l.attr("target"),n="string"==typeof a.attr("lay-unselect"),s=e.attr("lay-filter"),t="index"in t?t.index:a.parent().children("li").index(a);l||n||(a.addClass(r).siblings().removeClass(r),i.eq(t).addClass(h).siblings().removeClass(h)),layui.event.call(this,c,"tab("+s+")",{elem:e,index:t})},tabDelete:function(t,i){var i=i||u(this).parent(),a=i.parent().children("li").index(i),e=i.closest(".layui-tab"),l=e.children(".layui-tab-content").children(".layui-tab-item"),n=e.attr("lay-filter");i.hasClass(r)&&(i.next()[0]&&i.next().is("li")?C.tabClick.call(i.next()[0],{index:a+1}):i.prev()[0]&&i.prev().is("li")&&C.tabClick.call(i.prev()[0],null,a-1)),i.remove(),l.eq(a).remove(),setTimeout(function(){C.tabAuto()},50),layui.event.call(this,c,"tabDelete("+n+")",{elem:e,index:a})},tabAuto:function(l){var n="layui-tab-more",s="layui-tab-bar",o="layui-tab-close",c=this;u(".layui-tab").each(function(){var t,i=u(this),a=i.children(".layui-tab-title"),e=(i.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),e=u('');c===window&&d.ie,i.attr("lay-allowclose")&&a.find("li").each(function(){var t,i=u(this);i.find("."+o)[0]||((t=u('')).on("click",C.tabDelete),i.append(t))}),"string"!=typeof i.attr("lay-unauto")&&(a.prop("scrollWidth")>a.outerWidth()+1||a.find("li").length&&a.height()>(t=a.find("li").eq(0).height())+t/2?("change"===l&&a.data("LAY_TAB_CHANGE")&&a.addClass(n),a.find("."+s)[0]||(a.append(e),i.attr("overflow",""),e.on("click",function(t){var i=a.hasClass(n);a[i?"removeClass":"addClass"](n)}))):(a.find("."+s).remove(),i.removeAttr("overflow")))})},hideTabMore:function(t){var i=u(".layui-tab-title");!0!==t&&"tabmore"===u(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=u(this),i=t.closest(y),a=i.attr("lay-filter"),e=t.parent(),l=t.siblings("."+v),n="string"==typeof e.attr("lay-unselect");if("javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||n||l[0]||(i.find("."+r).removeClass(r),e.addClass(r)),i.hasClass(b)){var n=f+"ed",s=!e.hasClass(n),o=function(){u(this).css({display:""}),i.children("."+p).css({opacity:0})};if(l.is(":animated"))return;l.removeClass(g),l[0]&&(s?(l.slideDown(200,o),e.addClass(n)):(e.removeClass(n),l.show().slideUp(200,o)),"string"!=typeof i.attr("lay-accordion")&&"all"!==i.attr("lay-shrink")||((s=e.siblings("."+n)).removeClass(n),s.children("."+v).show().stop().slideUp(200,o)))}layui.event.call(this,c,"nav("+a+")",t)},collapse:function(){var t=u(this),i=t.find(".layui-colla-icon"),a=t.siblings(".layui-colla-content"),e=t.parents(".layui-collapse").eq(0),l=e.attr("lay-filter"),n="none"===a.css("display");"string"==typeof e.attr("lay-accordion")&&((e=e.children(".layui-colla-item").children("."+h)).siblings(".layui-colla-title").children(".layui-colla-icon").html(""),e.removeClass(h)),a[n?"addClass":"removeClass"](h),i.html(n?"":""),layui.event.call(this,c,"collapse("+l+")",{title:t,content:a,show:n})}},a=(i.prototype.render=i.prototype.init=function(t,i){var a=i?'[lay-filter="'+i+'"]':"",i={tab:function(){C.tabAuto.call({})},nav:function(){var s={},o={},c={},r="layui-nav-title";u(y+a).each(function(t){var i=u(this),a=u(''),e=i.find("."+f);i.find("."+p)[0]||(i.append(a),(i.hasClass(b)?e.find("dd,>."+r):e).on("mouseenter",function(){!function(t,i,a){var e,l=u(this),n=l.find("."+v);i.hasClass(b)?n[0]||(e=l.children("."+r),t.css({top:l.offset().top-i.offset().top,height:(e[0]?e:l).outerHeight(),opacity:1})):(n.addClass(g),n.hasClass("layui-nav-child-c")&&n.css({left:-(n.outerWidth()-l.width())/2}),n[0]?t.css({left:t.position().left+t.width()/2,width:0,opacity:0}):t.css({left:l.position().left+parseFloat(l.css("marginLeft")),top:l.position().top+l.height()-t.height()}),s[a]=setTimeout(function(){t.css({width:n[0]?0:l.width(),opacity:n[0]?0:1})},d.ie&&d.ie<10?0:200),clearTimeout(c[a]),"block"===n.css("display")&&clearTimeout(o[a]),o[a]=setTimeout(function(){n.addClass(h),l.find("."+m).addClass(m+"d")},300))}.call(this,a,i,t)}).on("mouseleave",function(){i.hasClass(b)?a.css({height:0,opacity:0}):(clearTimeout(o[t]),o[t]=setTimeout(function(){i.find("."+v).removeClass(h),i.find("."+m).removeClass(m+"d")},300))}),i.on("mouseleave",function(){clearTimeout(s[t]),c[t]=setTimeout(function(){i.hasClass(b)||a.css({width:0,left:a.position().left+a.width()/2,opacity:0})},200)})),e.find("a").each(function(){var t=u(this);t.parent();t.siblings("."+v)[0]&&!t.children("."+m)[0]&&t.append(''),t.off("click",C.clickThis).on("click",C.clickThis)})})},breadcrumb:function(){u(".layui-breadcrumb"+a).each(function(){var t=u(this),i="lay-separator",a=t.attr(i)||"/",e=t.find("a");e.next("span["+i+"]")[0]||(e.each(function(t){t!==e.length-1&&u(this).after(""+a+"")}),t.css("visibility","visible"))})},progress:function(){var e="layui-progress";u("."+e+a).each(function(){var t=u(this),i=t.find(".layui-progress-bar"),a=i.attr("lay-percent");i.css("width",function(){return/^.+\/.+$/.test(a)?100*new Function("return "+a)()+"%":a}),t.attr("lay-showpercent")&&setTimeout(function(){i.html(''+a+"")},350)})},collapse:function(){u(".layui-collapse"+a).each(function(){u(this).find(".layui-colla-item").each(function(){var t=u(this),i=t.find(".layui-colla-title"),t="none"===t.find(".layui-colla-content").css("display");i.find(".layui-colla-icon").remove(),i.append(''+(t?"":"")+""),i.off("click",C.collapse).on("click",C.collapse)})})}};return i[t]?i[t]():layui.each(i,function(t,i){i()})},new i),e=u(document);u(function(){a.render()}),e.on("click",".layui-tab-title li",C.tabClick),u(window).on("resize",C.tabAuto),t(c,a)});layui.define(["lay","layer"],function(e){"use strict";var x=layui.$,a=layui.lay,i=layui.layer,b=layui.device(),t="upload",r="layui_"+t+"_index",o={config:{},index:layui[t]?layui[t].index+1e4:0,set:function(e){var i=this;return i.config=x.extend({},i.config,e),i},on:function(e,i){return layui.onevent.call(this,t,e,i)}},l=function(){var i=this,e=i.config.id;return{upload:function(e){i.upload.call(i,e)},reload:function(e){i.reload.call(i,e)},config:(l.that[e]=i).config}},u="layui-upload-file",f="layui-upload-form",F="layui-upload-iframe",w="layui-upload-choose",L="UPLOADING",j=function(e){var i=this;i.index=++o.index,i.config=x.extend({},i.config,o.config,e),i.render()};j.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}},j.prototype.reload=function(e){var i=this;i.config=x.extend({},i.config,e),i.render(!0)},j.prototype.render=function(e){var i=this,t=i.config,n=x(t.elem);return 1"].join("")),n=i.elem.next();(n.hasClass(u)||n.hasClass(f))&&n.remove(),b.ie&&b.ie<10&&i.elem.wrap('
          '),e.isFile()?(e.elemFile=i.elem,i.field=i.elem[0].name):i.elem.after(t),b.ie&&b.ie<10&&e.initIE()},j.prototype.initIE=function(){var t,e=this.config,i=x(''),n=x(['
          ',"
          "].join(""));x("#"+F)[0]||x("body").append(i),e.elem.next().hasClass(f)||(this.elemFile.wrap(n),e.elem.next("."+f).append((t=[],layui.each(e.data,function(e,i){i="function"==typeof i?i():i,t.push('')}),t.join(""))))},j.prototype.msg=function(e){return i.msg(e,{icon:2,shift:6})},j.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},j.prototype.preview=function(n){window.FileReader&&layui.each(this.chooseFiles,function(e,i){var t=new FileReader;t.readAsDataURL(i),t.onload=function(){n&&n(e,i,this.result)}})},j.prototype.upload=function(e,i){var t,n,a,o,u=this,f=u.config,c=f.text||{},l=u.elemFile[0],s=function(){return e||u.files||u.chooseFiles||l.files},r=function(){var a=0,o=0,l=s(),r=function(){f.multiple&&a+o===u.fileLength&&"function"==typeof f.allDone&&f.allDone({total:u.fileLength,successful:a,failed:o})},t=function(t){var n=new FormData,i=function(e){t.unified?layui.each(l,function(e,i){delete i[L]}):delete e[L]};if(layui.each(f.data,function(e,i){i="function"==typeof i?i():i,n.append(e,i)}),t.unified)layui.each(l,function(e,i){i[L]||(i[L]=!0,n.append(f.field,i))});else{if(t.file[L])return;n.append(f.field,t.file),t.file[L]=!0}var e={url:f.url,type:"post",data:n,dataType:f.dataType||"json",contentType:!1,processData:!1,headers:f.headers||{},success:function(e){f.unified?a+=u.fileLength:a++,p(t.index,e),r(t.index),i(t.file)},error:function(e){f.unified?o+=u.fileLength:o++,u.msg(c.error||["Upload failed, please try again.","status: "+(e.status||"")+" - "+(e.statusText||"error")].join("
          ")),m(t.index),r(t.index),i(t.file)}};"function"==typeof f.progress&&(e.xhr=function(){var e=x.ajaxSettings.xhr();return e.upload.addEventListener("progress",function(e){var i;e.lengthComputable&&(i=Math.floor(e.loaded/e.total*100),f.progress(i,(f.item||f.elem)[0],e,t.index))}),e}),x.ajax(e)};f.unified?t({unified:!0,index:0}):layui.each(l,function(e,i){t({index:e,file:i})})},d=function(){var n=x("#"+F);u.elemFile.parent().submit(),clearInterval(j.timer),j.timer=setInterval(function(){var e,i=n.contents().find("body");try{e=i.text()}catch(t){u.msg(c["cross-domain"]),clearInterval(j.timer),m()}e&&(clearInterval(j.timer),i.html(""),p(0,e))},30)},p=function(e,i){if(u.elemFile.next("."+w).remove(),l.value="","json"===f.force&&"object"!=typeof i)try{i=JSON.parse(i)}catch(t){return i={},u.msg(c["data-format-error"])}"function"==typeof f.done&&f.done(i,e||0,function(e){u.upload(e)})},m=function(e){f.auto&&(l.value=""),"function"==typeof f.error&&f.error(e||0,function(e){u.upload(e)})},h=f.exts,g=(n=[],layui.each(e||u.chooseFiles,function(e,i){n.push(i.name)}),n),v={preview:function(e){u.preview(e)},upload:function(e,i){var t={};t[e]=i,u.upload(t)},pushFile:function(){return u.files=u.files||{},layui.each(u.chooseFiles,function(e,i){u.files[e]=i}),u.files},resetFile:function(e,i,t){i=new File([i],t);u.files=u.files||{},u.files[e]=i}},y={file:"\u6587\u4ef6",images:"\u56fe\u7247",video:"\u89c6\u9891",audio:"\u97f3\u9891"}[f.accept]||"\u6587\u4ef6",g=0===g.length?l.value.match(/[^\/\\]+\..+/g)||[]:g;if(0!==g.length){switch(f.accept){case"file":layui.each(g,function(e,i){if(h&&!RegExp(".\\.("+h+")$","i").test(escape(i)))return t=!0});break;case"video":layui.each(g,function(e,i){if(!RegExp(".\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(i)))return t=!0});break;case"audio":layui.each(g,function(e,i){if(!RegExp(".\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(i)))return t=!0});break;default:layui.each(g,function(e,i){if(!RegExp(".\\.("+(h||"jpg|png|gif|bmp|jpeg|svg")+")$","i").test(escape(i)))return t=!0})}if(t)return u.msg(c["check-error"]||"\u9009\u62e9\u7684"+y+"\u4e2d\u5305\u542b\u4e0d\u652f\u6301\u7684\u683c\u5f0f"),l.value="";if("choose"!==i&&!f.auto||(f.choose&&f.choose(v),"choose"!==i)){if(u.fileLength=(a=0,y=s(),layui.each(y,function(){a++}),a),f.number&&u.fileLength>f.number)return u.msg("function"==typeof c["limit-number"]?c["limit-number"](f,u.fileLength):"\u540c\u65f6\u6700\u591a\u53ea\u80fd\u4e0a\u4f20: "+f.number+" \u4e2a\u6587\u4ef6
          \u60a8\u5f53\u524d\u5df2\u7ecf\u9009\u62e9\u4e86: "+u.fileLength+" \u4e2a\u6587\u4ef6");if(01024*f.size&&(i=1<=(i=f.size/1024)?i.toFixed(2)+"MB":f.size+"KB",l.value="",o=i)}),o)return u.msg("function"==typeof c["limit-size"]?c["limit-size"](f,o):"\u6587\u4ef6\u5927\u5c0f\u4e0d\u80fd\u8d85\u8fc7 "+o);if(!f.before||!1!==f.before(v))b.ie?(9'+e+"")};a.elem.off("upload.start").on("upload.start",function(){var e=x(this);n.config.item=e,n.elemFile[0].click()}),b.ie&&b.ie<10||a.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(e,i){var t=x(this),i=i.originalEvent.dataTransfer.files||[];t.removeAttr("lay-over"),o(i),a.auto?n.upload():l(i)}),n.elemFile.on("change",function(){var e=this.files||[];0!==e.length&&(o(e),a.auto?n.upload():l(e))}),a.bindAction.off("upload.action").on("upload.action",function(){n.upload()}),a.elem.data(r)||(a.elem.on("click",function(){n.isFile()||x(this).trigger("upload.start")}),a.drag&&a.elem.on("dragover",function(e){e.preventDefault(),x(this).trigger("upload.over")}).on("dragleave",function(e){x(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),x(this).trigger("upload.drop",e)}),a.bindAction.on("click",function(){x(this).trigger("upload.action")}),a.elem.data(r,a.id))},l.that={},l.getThis=function(e){var i=l.that[e];return i||hint.error(e?t+" instance with ID '"+e+"' not found":"ID argument required"),i},o.render=function(e){e=new j(e);return l.call(e)},e(t,o)});layui.define(["lay","layer","util"],function(e){"use strict";var C=layui.$,h=layui.layer,d=layui.util,l=layui.hint(),w=(layui.device(),"form"),o=".layui-form",N="layui-this",T="layui-hide",$="layui-disabled",t=function(){this.config={verify:{required:function(e){if(!/[\S]+/.test(e))return"\u5fc5\u586b\u9879\u4e0d\u80fd\u4e3a\u7a7a"},phone:function(e){if(e&&!/^1\d{10}$/.test(e))return"\u624b\u673a\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e"},email:function(e){if(e&&!/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e))return"\u90ae\u7bb1\u683c\u5f0f\u4e0d\u6b63\u786e"},url:function(e){if(e&&!/^(#|(http(s?)):\/\/|\/\/)[^\s]+\.[^\s]+$/.test(e))return"\u94fe\u63a5\u683c\u5f0f\u4e0d\u6b63\u786e"},number:function(e){if(e&&isNaN(e))return"\u53ea\u80fd\u586b\u5199\u6570\u5b57"},date:function(e){if(e&&!/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/.test(e))return"\u65e5\u671f\u683c\u5f0f\u4e0d\u6b63\u786e"},identity:function(e){if(e&&!/(^\d{15}$)|(^\d{17}(x|X|\d)$)/.test(e))return"\u8eab\u4efd\u8bc1\u53f7\u683c\u5f0f\u4e0d\u6b63\u786e"}},autocomplete:null}},i=(t.prototype.set=function(e){return C.extend(!0,this.config,e),this},t.prototype.verify=function(e){return C.extend(!0,this.config.verify,e),this},t.prototype.getFormElem=function(e){return C(o+(e?'[lay-filter="'+e+'"]':""))},t.prototype.on=function(e,t){return layui.onevent.call(this,w,e,t)},t.prototype.val=function(e,i){return this.getFormElem(e).each(function(e,t){var a=C(this);layui.each(i,function(e,t){var i,e=a.find('[name="'+e+'"]');e[0]&&("checkbox"===(i=e[0].type)?e[0].checked=t:"radio"===i?e.each(function(){this.checked=this.value==t}):e.val(t))})}),r.render(null,e),this.getValue(e)},t.prototype.getValue=function(e,t){t=t||this.getFormElem(e);var a={},n={},e=t.find("input,select,textarea");return layui.each(e,function(e,t){var i;C(this);t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name&&(/^.*\[\]$/.test(t.name)&&(i=t.name.match(/^(.*)\[\]$/g)[0],a[i]=0|a[i],i=t.name.replace(/^(.*)\[\]$/,"$1["+a[i]+++"]")),/^(checkbox|radio)$/.test(t.type)&&!t.checked||(n[i||t.name]=t.value))}),n},t.prototype.render=function(e,t){var i=this.config,a=C(o+(t?'[lay-filter="'+t+'"]':"")),n={input:function(e){var e=e||a.find("input,textarea"),t=(i.autocomplete&&e.attr("autocomplete",i.autocomplete),function(e,t){var i=e.val(),a=Number(i),n=Number(e.attr("step"))||1,l=Number(e.attr("min")),r=Number(e.attr("max")),s=Number(e.attr("lay-precision")),o="click"!==t&&""===i,c="init"===t;isNaN(a)||("click"===t&&(a=!!C(this).index()?a-n:a+n),t=function(e){return((e.toString().match(/\.(\d+$)/)||[])[1]||"").length},s=0<=s?s:Math.max(t(n),t(i)),o||(c||r<=(a=a<=l?l:a)&&(a=r),s&&(a=a.toFixed(s)),e.val(a)),e[(a'),e=layui.isArray(i.value)?i.value:[i.value],e=C((a=[],layui.each(e,function(e,t){a.push('')}),a.join(""))),n=(t.append(e),i.split&&t.addClass("layui-input-split"),i.className&&t.addClass(i.className),r.next("."+u)),l=(n[0]&&n.remove(),r.parent().hasClass(o)||r.wrap('
          '),r.next("."+c));l[0]?((n=l.find("."+u))[0]&&n.remove(),l.prepend(t),r.css("padding-right",function(){return(r.closest(".layui-input-group")[0]?0:l.outerWidth())+t.outerWidth()})):(t.addClass(c),r.after(t)),"auto"===i.show&&d(t,r.val()),"function"==typeof i.init&&i.init.call(this,r,i),r.on("input propertychange",function(){var e=this.value;"auto"===i.show&&d(t,e)}),r.on("blur",function(){"function"==typeof i.blur&&i.blur.call(this,r,i)}),e.on("click",function(){var e=r.attr("lay-filter");C(this).hasClass($)||("function"==typeof i.click&&i.click.call(this,r,i),layui.event.call(this,w,"input-affix("+e+")",{elem:r[0],affix:s,options:i}))})},f={eye:{value:"eye-invisible",click:function(e,t){var i="LAY_FORM_INPUT_AFFIX_SHOW",a=e.data(i);e.attr("type",a?"password":"text").data(i,!a),n({value:a?"eye-invisible":"eye"})}},clear:{value:"clear",click:function(e){e.val("").focus(),d(C(this).parent(),null)},show:"auto",disabled:e},number:{value:["up","down"],split:!0,className:"layui-input-number",disabled:r.is("[disabled]"),init:function(e){t.call(this,e,"init")},click:function(e){t.call(this,e,"click")},blur:function(e){t.call(this,e,"blur")}}};n()})},select:function(e){var p,c="\u8bf7\u9009\u62e9",m="layui-form-select",g="layui-select-title",x="layui-select-none",b="",e=e||a.find("select"),k=function(e,t){C(e.target).parent().hasClass(g)&&!t||(C("."+m).removeClass(m+"ed "+m+"up"),p&&b&&p.val(b)),p=null},u=function(a,e,t){var s,r,i,n,o,l,c=C(this),u=a.find("."+g),d=u.find("input"),f=a.find("dl"),h=f.children("dd"),y=f.children("dt"),v=this.selectedIndex;e||(r=c.attr("lay-search"),i=function(){var e=a.offset().top+a.outerHeight()+5-F.scrollTop(),t=f.outerHeight();v=c[0].selectedIndex,a.addClass(m+"ed"),h.removeClass(T),y.removeClass(T),s=null,h.removeClass(N),0<=v&&h.eq(v).addClass(N),e+t>F.height()&&t<=e&&a.addClass(m+"up"),o()},n=function(e){a.removeClass(m+"ed "+m+"up"),d.blur(),s=null,e||l(d.val(),function(e){var t=c[0].selectedIndex;e&&(b=C(c[0].options[t]).html(),0===t&&b===d.attr("placeholder")&&(b=""),d.val(b||""))})},o=function(){var e,t,i=f.children("dd."+N);i[0]&&(e=i.position().top,t=f.height(),i=i.height(),t\u65e0\u5339\u914d\u9879

          '):f.find("."+x).remove()},"keyup"),""===t&&(c.val(""),f.find("."+N).removeClass(N),(c[0].options[0]||{}).value||f.children("dd:eq(0)").addClass(N),f.find("."+x).remove()),o()}).on("blur",function(e){var t=c[0].selectedIndex;p=d,b=C(c[0].options[t]).text(),0===t&&b===d.attr("placeholder")&&(b=""),setTimeout(function(){l(d.val(),function(e){b||d.val("")},"blur")},200)}),h.on("click",function(){var e=C(this),t=e.attr("lay-value"),i=c.attr("lay-filter");return e.hasClass($)||(e.hasClass("layui-select-tips")?d.val(""):(d.val(e.text()),e.addClass(N)),e.siblings().removeClass(N),c.val(t).removeClass("layui-form-danger"),layui.event.call(this,w,"select("+i+")",{elem:c[0],value:t,othis:a}),n(!0)),!1}),a.find("dl>dt").on("click",function(e){return!1}),C(document).off("click",k).on("click",k))};e.each(function(e,t){var i=C(this),a=i.next("."+m),n=this.disabled,l=t.value,r=C(t.options[t.selectedIndex]),t=t.options[0];if("string"==typeof i.attr("lay-ignore"))return i.show();var s,o="string"==typeof i.attr("lay-search"),t=t&&!t.value&&t.innerHTML||c,r=C(['
          ','
          ','','
          ','
          ',(t=i.find("*"),s=[],layui.each(t,function(e,t){var i=t.tagName.toLowerCase();0!==e||t.value||"optgroup"===i?s.push("optgroup"===i?"
          "+t.label+"
          ":'
          '+C.trim(t.innerHTML)+"
          "):s.push('
          '+C.trim(t.innerHTML||c)+"
          ")}),0===s.length&&s.push('
          \u6ca1\u6709\u9009\u9879
          '),s.join("")+"
          "),"
          "].join(""));a[0]&&a.remove(),i.after(r),u.call(this,r,n,o)})},checkbox:function(e){var o={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],"switch":["layui-form-switch","layui-form-onswitch","switch"],SUBTRA:"layui-icon-indeterminate"},e=e||a.find("input[type=checkbox]");e.each(function(e,t){var i=C(this),a=i.attr("lay-skin")||"primary",n=d.escape(C.trim(t.title||(t.title=i.attr("lay-text")||""))),l=this.disabled,r=o[a]||o.checkbox,s=i.next("."+r[0]);if(s[0]&&s.remove(),i.next("[lay-checkbox]")[0]&&(n=i.next().html()||""),n="switch"===a?n.split("|"):[n],"string"==typeof i.attr("lay-ignore"))return i.show();l=C(['
          ",(s={checkbox:[n[0]?"
          "+n[0]+"
          ":"primary"===a?"":"
          ",''].join(""),"switch":"
          "+((t.checked?n[0]:n[1])||"")+"
          "})[a]||s.checkbox,"
          "].join(""));i.after(l),function(a,n){var l=C(this);a.on("click",function(){var e=C(this),t=l.attr("lay-filter"),e=e.next("*[lay-checkbox]")[0]?e.next().html():l.attr("title")||"",i=l.attr("lay-skin")||"primary",e="switch"===i?e.split("|"):[e];l[0].disabled||(l[0].indeterminate&&(l[0].indeterminate=!1,a.find("."+o.SUBTRA).removeClass(o.SUBTRA).addClass("layui-icon-ok")),l[0].checked?(l[0].checked=!1,a.removeClass(n[1]),"switch"===i&&a.children("div").html(e[1])):(l[0].checked=!0,a.addClass(n[1]),"switch"===i&&a.children("div").html(e[0])),layui.event.call(l[0],w,n[2]+"("+t+")",{elem:l[0],value:l[0].value,othis:a}))})}.call(this,l,r)})},radio:function(e){var r="layui-form-radio",s=["layui-icon-radio","layui-icon-circle"],e=e||a.find("input[type=radio]");e.each(function(e,t){var i=C(this),a=i.next("."+r),n=this.disabled;if("string"==typeof i.attr("lay-ignore"))return i.show();a[0]&&a.remove();n=C(['
          ','',"
          "+(a=d.escape(t.title||""),a=i.next("[lay-radio]")[0]?i.next().html():a)+"
          ","
          "].join(""));i.after(n),function(a){var n=C(this),l="layui-anim-scaleSpring";a.on("click",function(){var e=n[0].name,t=n.parents(o),i=n.attr("lay-filter"),e=t.find("input[name="+e.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(e,function(){var e=C(this).next("."+r);this.checked=!1,e.removeClass(r+"ed"),e.children(".layui-icon").removeClass(l+" "+s[0]).addClass(s[1])}),n[0].checked=!0,a.addClass(r+"ed"),a.children(".layui-icon").addClass(l+" "+s[0]),layui.event.call(n[0],w,"radio("+i+")",{elem:n[0],value:n[0].value,othis:a}))})}.call(this,n)})}},t=function(){layui.each(n,function(e,t){t()})};return"object"===layui.type(e)?C(e).is(o)?(a=C(e),t()):e.each(function(e,t){var i=C(t);i.closest(o).length&&("SELECT"===t.tagName?n.select(i):"INPUT"===t.tagName&&("checkbox"===(t=t.type)||"radio"===t?n[t](i):n.input(i)))}):e?n[e]?n[e]():l.error('\u4e0d\u652f\u6301\u7684 "'+e+'" \u8868\u5355\u6e32\u67d3'):t(),this},t.prototype.validate=function(e){var u,d=this.config.verify,f="layui-form-danger";return!(e=C(e))[0]||(e.attr("lay-verify")!==undefined||!1!==this.validate(e.find("*[lay-verify]")))&&(layui.each(e,function(e,r){var s=C(this),t=(s.attr("lay-verify")||"").split("|"),o=s.attr("lay-vertype"),c=C.trim(s.val());if(s.removeClass(f),layui.each(t,function(e,t){var i="",a=d[t];if(a){var n="function"==typeof a?i=a(c,r):!a[0].test(c),l="select"===r.tagName.toLowerCase()||/^(checkbox|radio)$/.test(r.type),i=i||a[1];if("required"===t&&(i=s.attr("lay-reqtext")||i),n)return"tips"===o?h.tips(i,"string"!=typeof s.attr("lay-ignore")&&l?s.next():s,{tips:1}):"alert"===o?h.alert(i,{title:"\u63d0\u793a",shadeClose:!0}):/\b(string|number)\b/.test(typeof i)&&h.msg(i,{icon:5,shift:6}),setTimeout(function(){(l?s.next().find("input"):r).focus()},7),s.addClass(f),u=!0}}),u)return u}),!u)},t.prototype.submit=function(e,t){var i={},a=C(this),e="string"==typeof e?e:a.attr("lay-filter"),n=this.getFormElem?this.getFormElem(e):a.parents(o).eq(0),l=n.find("*[lay-verify]");return!!r.validate(l)&&(i=r.getValue(null,n),l={elem:this.getFormElem?window.event&&window.event.target:this,form:(this.getFormElem?n:a.parents("form"))[0],field:i},"function"==typeof t&&t(l),layui.event.call(this,w,"submit("+e+")",l))}),r=new t,t=C(document),F=C(window);C(function(){r.render()}),t.on("reset",o,function(){var e=C(this).attr("lay-filter");setTimeout(function(){r.render(null,e)},50)}),t.on("submit",o,i).on("click","*[lay-submit]",i),e(w,r)});layui.define(["lay","laytpl","laypage","form","util"],function(n){"use strict";var f=layui.$,r=layui.lay,m=layui.laytpl,I=layui.laypage,p=layui.layer,v=layui.form,g=layui.util,b=layui.hint(),x=layui.device(),k={config:{checkName:"LAY_CHECKED",indexName:"LAY_INDEX",numbersName:"LAY_NUM",disabledName:"LAY_DISABLED"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){var t=this;return t.config=f.extend({},t.config,e),t},on:function(e,t){return layui.onevent.call(this,N,e,t)}},w=function(){var a=this,e=a.config,i=e.id||e.index;return{config:e,reload:function(e,t){a.reload.call(a,e,t)},reloadData:function(e,t){k.reloadData(i,e,t)},setColsWidth:function(){a.setColsWidth.call(a)},resize:function(){a.resize.call(a)}}},C=function(e){var t=w.that[e];return t||b.error(e?"The table instance with ID '"+e+"' not found":"ID argument required"),t||null},l=function(e){var t=w.config[e];return t||b.error(e?"The table instance with ID '"+e+"' not found":"ID argument required"),t||null},T=function(e){var t=this.config||{},a=(e=e||{}).item3,i=e.content;"numbers"===a.type&&(i=e.tplData[k.config.numbersName]);("escape"in a?a:t).escape&&(i=g.escape(i));t=e.text&&a.exportTemplet||a.templet||a.toolbar;return t&&(i="function"==typeof t?t.call(a,e.tplData,e.obj):m(f(t).html()||String(i)).render(f.extend({LAY_COL:a},e.tplData))),e.text?f("
          "+i+"
          ").text():i},N="table",t=".layui-table",R="layui-hide",y="layui-hide-v",h="layui-none",L="layui-table-view",o=".layui-table-header",A=".layui-table-body",c=".layui-table-fixed-r",D=".layui-table-pageview",_=".layui-table-sort",E="layui-table-checked",W="layui-table-edit",P="layui-table-hover",z="laytable-cell-group",j="layui-table-col-special",M="layui-table-tool-panel",H="layui-table-expanded",S="LAY_TABLE_MOVE_DICT",e=function(e){return['',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',(e=e||{}).fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':"","{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
          ','
          ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{-item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
          ","
          "].join("")},a=['',"","
          "].join(""),u=[,"{{# if(d.data.toolbar){ }}",'
          ','
          ','
          ',"
          ","{{# } }}",'
          ',"{{# if(d.data.loading){ }}",'
          ','',"
          ","{{# } }}","{{# var left, right; }}",'
          ',e(),"
          ",'
          ',a,"
          ","{{# if(left){ }}",'
          ','
          ',e({fixed:!0}),"
          ",'
          ',a,"
          ","
          ","{{# }; }}","{{# if(right){ }}",'
          ','
          ',e({fixed:"right"}),'
          ',"
          ",'
          ',a,"
          ","
          ","{{# }; }}","
          ","{{# if(d.data.totalRow){ }}",'
          ','','',"
          ","
          ","{{# } }}",'
          ','
          ',"
          "].join(""),d=f(window),F=f(document),i=function(e){this.index=++k.index,this.config=f.extend({},this.config,k.config,e),this.render()},s=(i.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:"\u65e0\u6570\u636e"},cols:[]},i.prototype.render=function(e){var t=this,a=t.config,i=(a.elem=f(a.elem),a.where=a.where||{},a.id="id"in a?a.id:a.elem.attr("id")||t.index);if(w.that[i]=t,(w.config[i]=a).request=f.extend({pageName:"page",limitName:"limit"},a.request),a.response=f.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",totalRowName:"totalRow",countName:"count"},a.response),null!==a.page&&"object"==typeof a.page&&(a.limit=a.page.limit||a.limit,a.limits=a.page.limits||a.limits,t.page=a.page.curr=a.page.curr||1,delete a.page.elem,delete a.page.jump),!a.elem[0])return t;if(a.elem.attr("lay-filter")||a.elem.attr("lay-filter",a.id),"reloadData"===e)return t.pullData(t.page,{type:"reloadData"});a.index=t.index,t.key=a.id||a.index,t.setInit(),a.height&&/^full-\d+$/.test(a.height)?(t.fullHeightGap=a.height.split("-")[1],a.height=d.height()-t.fullHeightGap):a.height&&/^#\w+\S*-\d+$/.test(a.height)&&(i=a.height.split("-"),t.parentHeightGap=i.pop(),t.parentDiv=i.join("-"),a.height=f(t.parentDiv).height()-t.parentHeightGap);var l,e=a.elem,i=e.next("."+L),n=t.elem=f("
          ");n.addClass((l=[L,L+"-"+t.index,"layui-form","layui-border-box"],a.className&&l.push(a.className),l.join(" "))).attr({"lay-filter":"LAY-TABLE-FORM-DF-"+t.index,"lay-id":a.id,style:(l=[],a.width&&l.push("width:"+a.width+"px;"),l.join(""))}).html(m(u,{open:"{{",close:"}}"}).render({data:a,index:t.index})),t.renderStyle(),i[0]&&i.remove(),e.after(n),t.layTool=n.find(".layui-table-tool"),t.layBox=n.find(".layui-table-box"),t.layHeader=n.find(o),t.layMain=n.find(".layui-table-main"),t.layBody=n.find(A),t.layFixed=n.find(".layui-table-fixed"),t.layFixLeft=n.find(".layui-table-fixed-l"),t.layFixRight=n.find(c),t.layTotal=n.find(".layui-table-total"),t.layPage=n.find(".layui-table-page"),t.renderToolbar(),t.renderPagebar(),t.fullSize(),t.pullData(t.page),t.events()},i.prototype.initOpts=function(e){this.config;e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||{checkbox:50,radio:50,space:30,numbers:60}[e.type])},i.prototype.setInit=function(e){var l,a,d=this,r=d.config;if(r.clientWidth=r.width||(l=function(e){var t,a=(e=e||r.elem.parent()).width();try{t="none"===e.css("display")}catch(i){}return!e[0]||a&&!t?a:l(e.parent())})(),"width"===e)return r.clientWidth;r.height=r.maxHeight||r.height,r.css&&-1===r.css.indexOf(L)&&(a=r.css.split("}"),layui.each(a,function(e,t){t&&(a[e]="."+L+"-"+d.index+" "+t)}),r.css=a.join("}"));var c=function(a,e,i,l){var n,o;l?(l.key=[r.index,a,i].join("-"),l.colspan=l.colspan||0,l.rowspan=l.rowspan||0,d.initOpts(l),(n=a+(parseInt(l.rowspan)||1)) td:hover > .layui-table-cell{overflow: auto;}"].concat(x.ie?[".layui-table-edit{height: "+i+";}","td[data-edit]:hover:after{height: "+i+";}"]:[]),function(e,t){t&&o.push(a+" "+t)})),l.css&&o.push(l.css),r.style({target:this.elem[0],text:o.join(""),id:"DF-table-"+n})},i.prototype.renderToolbar=function(){var e=this.config,t=['
          ','
          ','
          '].join(""),a=this.layTool.find(".layui-table-tool-temp"),i=("default"===e.toolbar?a.html(t):"string"==typeof e.toolbar&&(t=f(e.toolbar).html()||"")&&a.html(m(t).render(e)),{filter:{title:"\u7b5b\u9009\u5217",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols"},exports:{title:"\u5bfc\u51fa",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export"},print:{title:"\u6253\u5370",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print"}}),l=[];"object"==typeof e.defaultToolbar&&layui.each(e.defaultToolbar,function(e,t){t="string"==typeof t?i[t]:t;t&&l.push('
          ')}),this.layTool.find(".layui-table-tool-self").html(l.join(""))},i.prototype.renderPagebar=function(){var e,t=this.config,a=this.layPagebar=f('
          ');t.pagebar&&((e=f(t.pagebar).html()||"")&&a.append(m(e).render(t)),this.layPage.append(a))},i.prototype.setParentCol=function(e,t){var a=this.config,i=this.layHeader.find('th[data-key="'+t+'"]'),l=parseInt(i.attr("colspan"))||0;i[0]&&(t=t.split("-"),t=a.cols[t[1]][t[2]],e?l--:l++,i.attr("colspan",l),i[l?"removeClass":"addClass"](R),t.colspan2=l,t.hide=l<1,a=i.data("parentkey"))&&this.setParentCol(e,a)},i.prototype.setColsPatch=function(){var a=this,e=a.config;layui.each(e.cols,function(e,t){layui.each(t,function(e,t){t.hide&&a.setParentCol(t.hide,t.parentKey)})})},i.prototype.setGroupWidth=function(i){var e,l=this;l.config.cols.length<=1||((e=l.layHeader.find((i?"th[data-key="+i.data("parentkey")+"]>":"")+"."+z)).css("width",0),layui.each(e.get().reverse(),function(){var e=f(this),t=e.parent().data("key"),a=0;l.layHeader.eq(0).find("th[data-parentkey="+t+"]").width(function(e,t){f(this).hasClass(R)||0 tr:first-child > th:last-child")).data("field")&&e.prev()[0]?t(e.prev()):e})()).data("key"),n.cssRules(e,function(e){var t=e.style.width||a.outerWidth();e.style.width=parseFloat(t)+l+"px",0'+(e||"Error")+"
          ");a[0]&&(t.layNone.remove(),a.remove()),t.layFixed.addClass(R),t.layMain.find("tbody").html(""),t.layMain.append(t.layNone=e),t.layTotal.addClass(y),t.layPage.find(D).addClass(y),k.cache[t.key]=[],t.syncCheckAll(),t.renderForm(),t.setColsWidth()},i.prototype.page=1,i.prototype.pullData=function(a,t){var e,i,l=this,n=l.config,o=(n.HAS_SET_COLS_PATCH||l.setColsPatch(),n.HAS_SET_COLS_PATCH=!0,n.request),d=n.response,r=function(){"object"==typeof n.initSort&&l.sort({field:n.initSort.field,type:n.initSort.type,reloadType:t.type})},c=function(e,t){l.setColsWidth(),"function"==typeof n.done&&n.done(e,a,e[d.countName],t)};t=t||{},"function"==typeof n.before&&n.before(n),l.startTime=(new Date).getTime(),t.renderData?((e={})[d.dataName]=k.cache[l.key],e[d.countName]=n.url?"object"===layui.type(n.page)?n.page.count:e[d.dataName].length:n.data.length,"object"==typeof n.totalRow&&(e[d.totalRowName]=f.extend({},l.totalRow)),l.renderData({res:e,curr:a,count:e[d.countName],type:t.type,sort:!0}),c(e,"renderData")):n.url?(i={},n.page&&(i[o.pageName]=a,i[o.limitName]=n.limit),o=f.extend(i,n.where),n.contentType&&0==n.contentType.indexOf("application/json")&&(o=JSON.stringify(o)),l.loading(),f.ajax({type:n.method||"get",url:n.url,contentType:n.contentType,data:o,dataType:n.dataType||"json",jsonpCallback:n.jsonpCallback,headers:n.headers||{},complete:function(e,t){"function"==typeof n.complete&&n.complete(e,t)},success:function(e){(e="function"==typeof n.parseData?n.parseData(e)||e:e)[d.statusName]!=d.statusCode?l.errorView(e[d.msgName]||'\u8fd4\u56de\u7684\u6570\u636e\u4e0d\u7b26\u5408\u89c4\u8303\uff0c\u6b63\u786e\u7684\u6210\u529f\u72b6\u6001\u7801\u5e94\u4e3a\uff1a"'+d.statusName+'": '+d.statusCode):(l.totalRow=e[d.totalRowName],l.renderData({res:e,curr:a,count:e[d.countName],type:t.type}),r(),n.time=(new Date).getTime()-l.startTime+" ms"),c(e)},error:function(e,t){l.errorView("\u8bf7\u6c42\u5f02\u5e38\uff0c\u9519\u8bef\u63d0\u793a\uff1a"+t),"function"==typeof n.error&&n.error(e,t)}})):"array"===layui.type(n.data)&&(e={},i=a*n.limit-n.limit,o=n.data.concat(),e[d.dataName]=n.page?o.splice(i,n.limit):o,e[d.countName]=n.data.length,"object"==typeof n.totalRow&&(e[d.totalRowName]=f.extend({},n.totalRow)),l.totalRow=e[d.totalRowName],l.renderData({res:e,curr:a,count:e[d.countName],type:t.type}),r(),c(e))},i.prototype.eachCols=function(e){return k.eachCols(null,e,this.config.cols),this},i.prototype.col=function(e){try{return e=e.split("-"),this.config.cols[e[1]][e[2]]||{}}catch(t){return b.error(t),{}}},i.prototype.getTrHtml=function(a,l,n,e){var s=this,u=s.config,y=e&&e.trs||[],h=e&&e.trs_fixed||[],p=e&&e.trs_fixed_r||[];return n=n||1,layui.each(a,function(e,o){var i=[],d=[],r=[],c=e+u.limit*(n-1)+1;if("object"!=typeof o){a[e]=o={LAY_KEY:o};try{k.cache[s.key][e]=o}catch(t){}}"array"===layui.type(o)&&0===o.length||(o[k.config.numbersName]=c,l||(o[k.config.indexName]=e),s.eachCols(function(e,l){var t,e=l.field||e,a=l.key,n=o[e];n!==undefined&&null!==n||(n=""),l.colGroup||(e=['','
          "+function(){var e,t=f.extend(!0,{LAY_COL:l},o),a=k.config.checkName,i=k.config.disabledName;switch(l.type){case"checkbox":return'';case"radio":return'';case"numbers":return c}return l.toolbar?m(f(l.toolbar).html()||"").render(t):T.call(s,{item3:l,content:n,tplData:t})}(),"
          "].join(""),i.push(e),l.fixed&&"right"!==l.fixed&&d.push(e),"right"===l.fixed&&r.push(e))}),e=['data-index="'+e+'"'],o[k.config.checkName]&&e.push('class="'+E+'"'),e=e.join(" "),y.push(""+i.join("")+""),h.push(""+d.join("")+""),p.push(""+r.join("")+""))}),{trs:y,trs_fixed:h,trs_fixed_r:p}},k.getTrHtml=function(e,t){e=C(e);return e.getTrHtml(t,null,e.page)},i.prototype.renderData=function(e){var a=this,i=a.config,t=e.res,l=e.curr,n=a.count=e.count,o=e.sort,d=t[i.response.dataName]||[],t=t[i.response.totalRowName],r=[],c=[],s=[],u=function(){if(!o&&a.sortKey)return a.sort({field:a.sortKey.field,type:a.sortKey.sort,pull:!0,reloadType:e.type});a.getTrHtml(d,o,l,{trs:r,trs_fixed:c,trs_fixed_r:s}),"fixed"===i.scrollPos&&"reloadData"===e.type||a.layBody.scrollTop(0),"reset"===i.scrollPos&&a.layBody.scrollLeft(0),a.layMain.find("."+h).remove(),a.layMain.find("tbody").html(r.join("")),a.layFixLeft.find("tbody").html(c.join("")),a.layFixRight.find("tbody").html(s.join("")),a.syncCheckAll(),a.renderForm(),a.fullSize(),a.haveInit?a.scrollPatch():setTimeout(function(){a.scrollPatch()},50),a.haveInit=!0,p.close(a.tipsIndex)};return k.cache[a.key]=d,a.layTotal[0==d.length?"addClass":"removeClass"](y),a.layPage[i.page||i.pagebar?"removeClass":"addClass"](R),a.layPage.find(D)[!i.page||0==n||0===d.length&&1==l?"addClass":"removeClass"](y),0===d.length?a.errorView(i.text.none):(a.layFixLeft.removeClass(R),o?u():(u(),a.renderTotal(d,t),a.layTotal&&a.layTotal.removeClass(R),void(i.page&&(i.page=f.extend({elem:"layui-table-page"+i.index,count:n,limit:i.limit,limits:i.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(a.page=e.curr,i.limit=e.limit,a.pullData(e.curr))}},i.page),i.page.count=n,I.render(i.page)))))},k.renderData=function(e){e=C(e);e&&e.pullData(e.page,{renderData:!0,type:"reloadData"})},i.prototype.renderTotal=function(e,o){var d,r=this,c=r.config,s={};c.totalRow&&(layui.each(e,function(e,i){"array"===layui.type(i)&&0===i.length||r.eachCols(function(e,t){var e=t.field||e,a=i[e];t.totalRow&&(s[e]=(s[e]||0)+(parseFloat(a)||0))})}),r.dataTotal=[],d=[],r.eachCols(function(e,t){var a,e=t.field||e,i=o&&o[t.field],l="totalRowDecimals"in t?t.totalRowDecimals:2,l=s[e]?parseFloat(s[e]||0).toFixed(l):"",l=(a=t.totalRowText||"",(n={LAY_COL:t})[e]=l,n=t.totalRow&&T.call(r,{item3:t,content:l,tplData:n})||a,i||n),n=(t.field&&r.dataTotal.push({field:t.field,total:f("
          "+l+"
          ").text()}),['','
          "+("string"==typeof(a=t.totalRow||c.totalRow)?m(a).render(f.extend({TOTAL_NUMS:i||s[e],TOTAL_ROW:o||{},LAY_COL:t},t)):l),"
          "].join(""));d.push(n)}),e=r.layTotal.find(".layui-table-patch"),r.layTotal.find("tbody").html(""+d.join("")+(e.length?e.get(0).outerHTML:"")+""))},i.prototype.getColElem=function(e,t){return e.eq(0).find(".laytable-cell-"+t+":eq(0)")},i.prototype.renderForm=function(e){this.config;var t=this.elem.attr("lay-filter");v.render(e,t)},i.prototype.syncCheckAll=function(){var a,e=this,i=e.config,t=e.layHeader.find('input[name="layTableCheckbox"]'),l=k.checkStatus(e.key);t[0]&&(a=l.isAll,e.eachCols(function(e,t){"checkbox"===t.type&&(t[i.checkName]=a)}),t.prop({checked:l.isAll,indeterminate:!l.isAll&&l.data.length}),v.render(t))},i.prototype.setRowActive=function(e,t,a){this.config;e=this.layBody.find('tr[data-index="'+e+'"]');if(t=t||"layui-table-click",a)return e.removeClass(t);e.addClass(t),e.siblings("tr").removeClass(t)},i.prototype.setRowChecked=function(a){var e=this,i=e.config,l=e.layBody.find("tr"+("all"===a.index?"":'[data-index="'+a.index+'"]')),t=(a=f.extend({type:"checkbox"},a),k.cache[e.key]),n="checked"in a,o=function(e){return"radio"===a.type||(n?a.checked:!e)},t=(layui.each(t,function(e,t){"array"===layui.type(t)||t[i.disabledName]||(Number(a.index)===e||"all"===a.index?(e=t[i.checkName]=o(t[i.checkName]),l[e?"addClass":"removeClass"](E),"radio"===a.type&&l.siblings().removeClass(E)):"radio"===a.type&&delete t[i.checkName])}),l.find('input[lay-type="'+({radio:"layTableRadio",checkbox:"layTableCheckbox"}[a.type]||"checkbox")+'"]:not(:disabled)')),d=t.last(),r=d.closest(c);("radio"===a.type&&r.hasClass(R)?t.first():t).prop("checked",o(d.prop("checked"))),e.syncCheckAll(),e.renderForm(a.type)},i.prototype.sort=function(l){var e,t=this,a={},i=t.config,n=i.elem.attr("lay-filter"),o=k.cache[t.key];"string"==typeof(l=l||{}).field&&(d=l.field,t.layHeader.find("th").each(function(e,t){var a=f(this),i=a.data("field");if(i===l.field)return l.field=a,d=i,!1}));try{var d=d||l.field.data("field"),r=l.field.data("key");if(t.sortKey&&!l.pull&&d===t.sortKey.field&&l.type===t.sortKey.sort)return;var c=t.layHeader.find("th .laytable-cell-"+r).find(_);t.layHeader.find("th").find(_).removeAttr("lay-sort"),c.attr("lay-sort",l.type||null),t.layFixed.find("th")}catch(s){b.error("Table modules: sort field '"+d+"' not matched")}t.sortKey={field:d,sort:l.type},i.autoSort&&("asc"===l.type?e=layui.sort(o,d,null,!0):"desc"===l.type?e=layui.sort(o,d,!0,!0):(e=layui.sort(o,k.config.indexName,null,!0),delete t.sortKey,delete i.initSort)),a[i.response.dataName]=e||o,t.renderData({res:a,curr:t.page,count:t.count,sort:!0,type:l.reloadType}),l.fromEvent&&(i.initSort={field:d,type:l.type},layui.event.call(l.field,N,"sort("+n+")",f.extend({config:i},i.initSort)))},i.prototype.loading=function(e){var t=this;t.config.loading&&(e?(t.layInit&&t.layInit.remove(),delete t.layInit,t.layBox.find(".layui-table-init").remove()):(t.layInit=f(['
          ','',"
          "].join("")),t.layBox.append(t.layInit)))},i.prototype.cssRules=function(t,a){var e=this.elem.children("style")[0];r.getStyleRules(e,function(e){if(e.selectorText===".laytable-cell-"+t)return a(e),!0})},i.prototype.fullSize=function(){var e,a,i=this,t=i.config,l=t.height;i.fullHeightGap?(l=d.height()-i.fullHeightGap)<135&&(l=135):i.parentDiv&&i.parentHeightGap&&(l=f(i.parentDiv).height()-i.parentHeightGap)<135&&(l=135),1
          ')).find("div").css({width:a}),e.find("tr").append(t)):e.find(".layui-table-patch").remove()};n(e.layHeader),n(e.layTotal);n=e.layMain.height()-i;e.layFixed.find(A).css("height",t.height()>=n?n:"auto").scrollTop(e.layMain.scrollTop()),e.layFixRight[k.cache[e.key]&&k.cache[e.key].length&&0');a.html(t),u.height&&a.css("max-height",u.height-(s.layTool.outerHeight()||50)),i.find("."+M)[0]||i.append(a),s.renderForm(),a.on("click",function(e){layui.stope(e)}),e.done&&e.done(a,t)};switch(layui.stope(e),F.trigger("table.tool.panel.remove"),p.close(s.tipsIndex),t){case"LAYTABLE_COLS":n({list:(a=[],s.eachCols(function(e,t){t.field&&"normal"==t.type&&a.push('
        • "+(t.fieldTitle||t.title||t.field)+"
        • ").text())+'" lay-filter="LAY_TABLE_TOOL_COLS">')}),a.join("")),done:function(){v.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var e=f(e.elem),t=this.checked,a=e.data("key"),i=s.col(a),l=i.hide,e=e.data("parentkey");i.key&&(i.hide=!t,s.elem.find('*[data-key="'+a+'"]')[t?"removeClass":"addClass"](R),l!=i.hide&&s.setParentCol(!t,e),s.resize(),layui.event.call(this,N,"colToggled("+c+")",{col:i,config:u}))})}});break;case"LAYTABLE_EXPORT":if(!l.length)return p.tips("\u5f53\u524d\u8868\u683c\u65e0\u6570\u636e",this,{tips:3});x.ie?p.tips("\u5bfc\u51fa\u529f\u80fd\u4e0d\u652f\u6301 IE\uff0c\u8bf7\u7528 Chrome \u7b49\u9ad8\u7ea7\u6d4f\u89c8\u5668\u5bfc\u51fa",this,{tips:3}):n({list:['
        • \u5bfc\u51fa csv \u683c\u5f0f\u6587\u4ef6
        • ','
        • \u5bfc\u51fa xls \u683c\u5f0f\u6587\u4ef6
        • '].join(""),done:function(e,t){t.on("click",function(){var e=f(this).data("type");k.exportFile.call(s,u.id,null,e)})}});break;case"LAYTABLE_PRINT":if(!l.length)return p.tips("\u5f53\u524d\u8868\u683c\u65e0\u6570\u636e",this,{tips:3});var o=window.open("about:blank","_blank"),d=[""].join(""),r=f(s.layHeader.html());r.append(s.layMain.find("table").html()),r.append(s.layTotal.find("table").html()),r.find("th.layui-table-patch").remove(),r.find("thead>tr>th."+j).filter(function(e,t){return!f(t).children("."+z).length}).remove(),r.find("tbody>tr>td."+j).remove(),o.document.write(d+r.prop("outerHTML")),o.document.close(),layui.device("edg").edg?(o.onafterprint=o.close,o.print()):(o.print(),o.close())}layui.event.call(this,N,"toolbar("+c+")",f.extend({event:t,config:u},{}))}),s.layHeader.on("click","*[lay-event]",function(e){var t=f(this),a=t.attr("lay-event"),t=t.closest("th").data("key"),t=s.col(t);layui.event.call(this,N,"colTool("+c+")",f.extend({event:a,config:u,col:t},{}))}),s.layPagebar.on("click","*[lay-event]",function(e){var t=f(this).attr("lay-event");layui.event.call(this,N,"pagebar("+c+")",f.extend({event:t,config:u},{}))}),e.on("mousemove",function(e){var t=f(this),a=t.offset().left,e=e.clientX-a;t.data("unresize")||w.eventMoveElem||(d.allowResize=t.width()-e<=10,o.css("cursor",d.allowResize?"col-resize":""))}).on("mouseleave",function(){f(this);w.eventMoveElem||o.css("cursor","")}).on("mousedown",function(e){var t,a=f(this);d.allowResize&&(t=a.data("key"),e.preventDefault(),d.offset=[e.clientX,e.clientY],s.cssRules(t,function(e){var t=e.style.width||a.outerWidth();d.rule=e,d.ruleWidth=parseFloat(t),d.minWidth=a.data("minwidth")||u.cellMinWidth,d.maxWidth=a.data("maxwidth")||u.cellMaxWidth}),a.data(S,d),w.eventMoveElem=a)}),w.docEvent||F.on("mousemove",function(e){var t,a;w.eventMoveElem&&(t=w.eventMoveElem.data(S)||{},w.eventMoveElem.data("resizing",1),e.preventDefault(),t.rule)&&(e=t.ruleWidth+e.clientX-t.offset[0],a=w.eventMoveElem.closest("."+L).attr("lay-id"),a=C(a))&&((e=et.maxWidth&&(e=t.maxWidth),t.rule.style.width=e+"px",a.setGroupWidth(w.eventMoveElem),p.close(s.tipsIndex))}).on("mouseup",function(e){var t,a,i,l,n;w.eventMoveElem&&(i=(t=w.eventMoveElem).closest("."+L).attr("lay-id"),a=C(i))&&(i=t.data("key"),l=a.col(i),n=a.config.elem.attr("lay-filter"),d={},o.css("cursor",""),a.scrollPatch(),t.removeData(S),delete w.eventMoveElem,a.cssRules(i,function(e){l.width=parseFloat(e.style.width),layui.event.call(t[0],N,"colResized("+n+")",{col:l,config:a.config})}))}),w.docEvent=!0,e.on("click",function(e){var t=f(this),a=t.find(_),i=a.attr("lay-sort");if(!a[0]||1===t.data("resizing"))return t.removeData("resizing");s.sort({field:t,type:"asc"===i?"desc":"desc"===i?null:"asc",fromEvent:!0})}).find(_+" .layui-edge ").on("click",function(e){var t=f(this),a=t.index(),t=t.parents("th").eq(0).data("field");layui.stope(e),0===a?s.sort({field:t,type:"asc",fromEvent:!0}):s.sort({field:t,type:"desc",fromEvent:!0})}),s.commonMember=function(e){var t=f(this).parents("tr").eq(0).data("index"),r=s.layBody.find('tr[data-index="'+t+'"]'),c=(c=k.cache[s.key]||[])[t]||{},a={tr:r,config:u,data:k.clearCacheKey(c),dataCache:c,index:t,del:function(){k.cache[s.key][t]=[],r.remove(),s.scrollPatch()},update:function(e,d){e=e||{},layui.each(e,function(i,l){var n=r.children('td[data-field="'+i+'"]'),o=n.children(y);c[i]=a.data[i]=l,s.eachCols(function(e,t){var a;t.field==i?(o.html(T.call(s,{item3:t,content:l,tplData:f.extend({LAY_COL:t},c)})),n.data("content",l)):d&&(t.templet||t.toolbar)&&(e=r.children('td[data-field="'+(t.field||e)+'"]'),a=c[t.field],e.children(y).html(T.call(s,{item3:t,content:a,tplData:f.extend({LAY_COL:t},c)})),e.data("content",a))})}),s.renderForm()},setRowChecked:function(e){s.setRowChecked(f.extend({index:t},e))}};return f.extend(a,e)}),a=(s.elem.on("click",'input[name="layTableCheckbox"]+',function(e){var t=f(this),a=t.closest("td"),t=t.prev(),i=(s.layBody.find('input[name="layTableCheckbox"]'),t.parents("tr").eq(0).data("index")),l=t[0].checked,n="layTableAllChoose"===t.attr("lay-filter");t[0].disabled||(n?s.setRowChecked({index:"all",checked:l}):(s.setRowChecked({index:i,checked:l}),layui.stope(e)),layui.event.call(t[0],N,"checkbox("+c+")",r.call(t[0],{checked:l,type:n?"all":"one",getCol:function(){return s.col(a.data("key"))}})))}),s.elem.on("click",'input[lay-type="layTableRadio"]+',function(e){var t=f(this),a=t.closest("td"),t=t.prev(),i=t[0].checked,l=t.parents("tr").eq(0).data("index");if(layui.stope(e),t[0].disabled)return!1;s.setRowChecked({type:"radio",index:l}),layui.event.call(t[0],N,"radio("+c+")",r.call(t[0],{checked:i,getCol:function(){return s.col(a.data("key"))}}))}),s.layBody.on("mouseenter","tr",function(){var e=f(this),t=e.index();e.data("off")||s.layBody.find("tr:eq("+t+")").addClass(P)}).on("mouseleave","tr",function(){var e=f(this),t=e.index();e.data("off")||s.layBody.find("tr:eq("+t+")").removeClass(P)}).on("click","tr",function(e){var t=[".layui-form-checkbox",".layui-form-switch",".layui-form-radio","[lay-unrow]"].join(",");f(e.target).is(t)||f(e.target).closest(t)[0]||a.call(this,"row")}).on("dblclick","tr",function(){a.call(this,"rowDouble")}).on("contextmenu","tr",function(e){u.defaultContextmenu||e.preventDefault(),a.call(this,"rowContextmenu")}),function(e){var t=f(this);t.data("off")||layui.event.call(this,N,e+"("+c+")",r.call(t.children("td")[0]))}),n=function(e,t){var a,i,l,n;(e=f(e)).data("off")||(a=e.data("field"),n=e.data("key"),n=s.col(n),i=e.closest("tr").data("index"),i=k.cache[s.key][i],l=e.children(y),(n="function"==typeof n.edit?n.edit(i):n.edit)&&((n=f("textarea"===n?'':''))[0].value=e.data("content")||i[a]||l.text(),e.find("."+W)[0]||e.append(n),n.focus(),t)&&layui.stope(t))},i=(s.layBody.on("change","."+W,function(){var e=f(this),t=e.parent(),a=this.value,i=e.parent().data("field"),e=e.closest("tr").data("index"),e=k.cache[s.key][e],l=r.call(t[0],{value:a,field:i,oldValue:e[i],td:t,reedit:function(){setTimeout(function(){n(l.td);var e={};e[i]=l.oldValue,l.update(e)})},getCol:function(){return s.col(t.data("key"))}}),e={};e[i]=a,l.update(e),layui.event.call(t[0],N,"edit("+c+")",l)}).on("blur","."+W,function(){f(this).remove()}),s.layBody.on(u.editTrigger,"td",function(e){n(this,e)}).on("mouseenter","td",function(){t.call(this)}).on("mouseleave","td",function(){t.call(this,"hide")}),s.layTotal.on("mouseenter","td",function(){t.call(this)}).on("mouseleave","td",function(){t.call(this,"hide")}),"layui-table-grid-down"),t=function(e){var t=f(this),a=t.children(y);t.data("off")||t.parent().hasClass(H)||(e?t.find(".layui-table-grid-down").remove():!(a.prop("scrollWidth")>a.outerWidth()||0'))},l=function(e){var t=f(this),a=t.parent(),i=a.data("key"),l=s.col(i),n=a.parent().data("index"),a=a.children(y),o="layui-table-cell-c",d=f('');"tips"===(l.expandedMode||u.cellExpandedMode)?s.tipsIndex=p.tips(['
          ',a.html(),"
          ",''].join(""),a[0],{tips:[3,""],time:-1,anim:-1,maxWidth:x.ios||x.android?300:s.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){p.close(t)})}}):(s.elem.find("."+o).trigger("click"),s.cssRules(i,function(e){var t=e.style.width,a=l.expandedWidth||u.cellExpandedWidth;atr").each(function(i){n.cols[i]=[],f(this).children().each(function(e){var t=f(this),a=t.attr("lay-data"),a=r.options(this,{attr:a?"lay-data":null,errorText:d+(a||t.attr("lay-options"))}),t=f.extend({title:t.text(),colspan:parseInt(t.attr("colspan"))||1,rowspan:parseInt(t.attr("rowspan"))||1},a);n.cols[i].push(t)})}),e.find("tbody>tr")),t=k.render(n);!a.length||o.data||t.config.url||(l=0,k.eachCols(t.config.id,function(e,i){a.each(function(e){n.data[e]=n.data[e]||{};var t=f(this),a=i.field;n.data[e][a]=t.children("td").eq(l).html()}),l++}),t.reloadData({data:n.data}))}),this},w.that={},w.config={},function(a,i,e,l){var n,o;l.colGroup&&(n=0,a++,l.CHILD_COLS=[],o=e+(parseInt(l.rowspan)||1),layui.each(i[o],function(e,t){t.parentKey?t.parentKey===l.key&&(t.PARENT_COL_INDEX=a,l.CHILD_COLS.push(t),s(a,i,o,t)):t.PARENT_COL_INDEX||1<=n&&n==(l.colspan||1)||(t.PARENT_COL_INDEX=a,l.CHILD_COLS.push(t),n+=parseInt(1td').filter('[data-field="'+e+'"]')}}})).replace(/"/g,'""'),n.push(a='"'+a+'"')))}),d.push(n.join(","))}),c&&layui.each(c.dataTotal,function(e,t){r[t.field]||i.push('"'+(t.total||"")+'"')}),o.join(",")+"\r\n"+d.join("\r\n")+"\r\n"+i.join(","))),u.download=(a.title||n.title||"table_"+(n.index||""))+"."+l,document.body.appendChild(u),u.click(),document.body.removeChild(u)},k.getOptions=l,k.hideCol=function(e,l){var n=C(e);n&&("boolean"===layui.type(l)?n.eachCols(function(e,t){var a=t.key,i=n.col(a),t=t.parentKey;i.hide!=l&&(i=i.hide=l,n.elem.find('*[data-key="'+a+'"]')[i?"addClass":"removeClass"](R),n.setParentCol(i,t))}):(l=layui.isArray(l)?l:[l],layui.each(l,function(e,l){n.eachCols(function(e,t){var a,i;l.field===t.field&&(a=t.key,i=n.col(a),t=t.parentKey,"hide"in l)&&i.hide!=l.hide&&(i=i.hide=!!l.hide,n.elem.find('*[data-key="'+a+'"]')[i?"addClass":"removeClass"](R),n.setParentCol(i,t))})})),f("."+M).remove(),n.resize())},k.reload=function(e,t,a,i){if(l(e))return(e=C(e)).reload(t,a,i),w.call(e)},k.reloadData=function(){var a=f.extend([],arguments),i=(a[3]="reloadData",new RegExp("^("+["elem","id","cols","width","height","maxHeight","toolbar","defaultToolbar","className","css","pagebar"].join("|")+")$"));return layui.each(a[1],function(e,t){i.test(e)&&delete a[1][e]}),k.reload.apply(null,a)},k.render=function(e){e=new i(e);return w.call(e)},k.clearCacheKey=function(e){return delete(e=f.extend({},e))[k.config.checkName],delete e[k.config.indexName],delete e[k.config.numbersName],delete e[k.config.disabledName],e},f(function(){k.init()}),n(N,k)});layui.define(["table"],function(e){"use strict";var E=layui.$,x=layui.form,B=layui.table,y=layui.hint(),j={config:{},on:B.on,eachCols:B.eachCols,index:B.index,set:function(e){var t=this;return t.config=E.extend({},t.config,e),t},resize:B.resize,getOptions:B.getOptions,hideCol:B.hideCol,renderData:B.renderData},i=function(){var a=this,e=a.config,n=e.id||e.index;return{config:e,reload:function(e,t){a.reload.call(a,e,t)},reloadData:function(e,t){j.reloadData(n,e,t)}}},P=function(e){var t=i.that[e];return t||y.error(e?"The treeTable instance with ID '"+e+"' not found":"ID argument required"),t||null},F="layui-hide",L=".layui-table-main",q=".layui-table-fixed-l",R=".layui-table-fixed-r",l="layui-table-checked",h="layui-table-tree",Y="LAY_DATA_INDEX",m="LAY_DATA_INDEX_HISTORY",s="LAY_PARENT_INDEX",b="LAY_CHECKBOX_HALF",H="LAY_EXPAND",z="LAY_HAS_EXPANDED",X="LAY_ASYNC_STATUS",n=["all","parent","children","none"],t=function(e){var t=this;t.index=++j.index,t.config=E.extend(!0,{},t.config,j.config,e),t.init(),t.render()},f=function(n,i,e){var l=B.cache[n];layui.each(e||l,function(e,t){var a=t[Y];-1!==a.indexOf("-")&&(l[a]=t),t[i]&&f(n,i,t[i])})},d=function(l,a,e){var d=P(l),r=("reloadData"!==e&&(d.status={expand:{}}),E.extend(!0,{},d.getOptions(),a)),n=r.tree,o=n.customName.children,i=n.customName.id,c=(delete a.hasNumberCol,delete a.hasChecboxCol,delete a.hasRadioCol,B.eachCols(null,function(e,t){"numbers"===t.type?a.hasNumberCol=!0:"checkbox"===t.type?a.hasChecboxCol=!0:"radio"===t.type&&(a.hasRadioCol=!0)},r.cols),a.parseData),u=a.done;r.url?e&&(!c||c.mod)||(a.parseData=function(){var e=this,t=arguments,a=t[0],t=("function"===layui.type(c)&&(a=c.apply(e,t)||t[0]),e.response.dataName);return n.data.isSimpleData&&!n["async"].enable&&(a[t]=d.flatToTree(a[t])),p(a[t],function(e){e[H]=H in e?e[H]:e[i]!==undefined&&d.status.expand[e[i]]},o),e.autoSort&&e.initSort&&e.initSort.type&&layui.sort(a[t],e.initSort.field,"desc"===e.initSort.type,!0),d.initData(a[t]),a},a.parseData.mod=!0):(a.data=a.data||[],n.data.isSimpleData&&(a.data=d.flatToTree(a.data)),d.initData(a.data)),e&&(!u||u.mod)||(a.done=function(){var e,t=arguments,a=t[3],n=(a||delete d.isExpandAll,this.elem.next()),i=(d.updateStatus(null,{LAY_HAS_EXPANDED:!1}),f(l,o),n.find('[name="layTableCheckbox"][lay-filter="layTableAllChoose"]'));if(i.length&&(e=j.checkStatus(l),i.prop({checked:e.isAll&&e.data.length,indeterminate:!e.isAll&&e.data.length})),!a&&r.autoSort&&r.initSort&&r.initSort.type&&j.sort(l),d.renderTreeTable(n),"function"===layui.type(u))return u.apply(this,t)},a.done.mod=!0)};t.prototype.init=function(){var e=this.config,t=e.tree.data.cascade,t=(-1===n.indexOf(t)&&(e.tree.data.cascade="all"),B.render(E.extend({},e,{data:[],url:"",done:null}))),a=t.config.id;(i.that[a]=this).tableIns=t,d(a,e)},t.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}}},t.prototype.getOptions=function(){return this.tableIns?B.getOptions(this.tableIns.config.id):this.config},t.prototype.flatToTree=function(e){var a,n,i,t,l,d,r,o=this.getOptions(),c=o.tree,u=c.customName,o=o.id;return e=e||B.cache[o],o=e,a=u.id,n=u.pid,i=u.children,t=c.data.rootPid,a=a||"id",n=n||"parentId",i=i||"children",r={},layui.each(o,function(e,t){l=a+t[a],r[l]=E.extend({},t),r[l][i]=[]}),layui.each(r,function(e,t){(d=a+t[n])&&r[d]&&r[d][i].push(t)}),Object.keys(r).map(function(e){return r[e]}).filter(function(e){return t?e[n]===t:!e[n]})},t.prototype.treeToFlat=function(e,n,i){var l=this,d=l.getOptions().tree.customName,r=d.children,o=d.pid,c=[];return layui.each(e,function(e,t){var e=(i?i+"-":"")+e,a=E.extend({},t);a[o]=t[o]||n,c.push(a),c=c.concat(l.treeToFlat(t[r],t[d.id],e))}),c},t.prototype.getTreeNode=function(e){var t,a,n=this;return e?(a=(t=n.getOptions()).tree,t.id,a.customName,{data:e,dataIndex:e[Y],getParentNode:function(){return n.getNodeByIndex(e[s])}}):y.error("\u627e\u4e0d\u5230\u8282\u70b9\u6570\u636e")},t.prototype.getNodeByIndex=function(t){var a,e,n=this,i=n.getNodeDataByIndex(t);return i?((e=n.getOptions()).tree.customName.parent,a=e.id,(e={data:i,dataIndex:i[Y],getParentNode:function(){return n.getNodeByIndex(i[s])},update:function(e){return j.updateNode(a,t,e)},remove:function(){return j.removeNode(a,t)},expand:function(e){return j.expandNode(a,E.extend({},e,{index:t}))},setChecked:function(e){return j.setRowChecked(a,E.extend({},e,{index:t}))}}).dataIndex=t,e):y.error("\u627e\u4e0d\u5230\u8282\u70b9\u6570\u636e")},t.prototype.getNodeById=function(a){var e=this.getOptions(),n=e.tree.customName.id,i="",e=j.getData(e.id,!0);if(layui.each(e,function(e,t){if(t[n]===a)return i=t[Y],!0}),i)return this.getNodeByIndex(i)},t.prototype.getNodeDataByIndex=function(e,t,a){var n=this.getOptions(),i=n.tree,n=n.id,n=B.cache[n],l=n[e];if("delete"!==a&&l)return E.extend(l,a),t?E.extend({},l):l;for(var d=n,r=String(e).split("-"),o=0,c=i.customName.children;o
          '),N=function(e){y[X]="success",y[s.children]=e,c.initData(y[s.children],y[Y]),U(t,!0,!p&&n,i,l)},C=m.format,"function"===layui.type(C)?C(y,o,N):(I=E.extend({},m.where||o.where),C=m.autoParam,layui.each(C,function(e,t){t=t.split("=");I[t[0].trim()]=y[(t[1]||t[0]).trim()]}),(C=m.contentType||o.contentType)&&0==C.indexOf("application/json")&&(I=JSON.stringify(I)),w=m.method||o.method,D=m.dataType||o.dataType,T=m.jsonpCallback||o.jsonpCallback,k=m.headers||o.headers,_=m.parseData||o.parseData,O=m.response||o.response,E.ajax({type:w||"get",url:b,contentType:C,data:I,dataType:D||"json",jsonpCallback:T,headers:k||{},success:function(e){(e="function"==typeof _?_.call(o,e)||e:e)[O.statusName]!=O.statusCode?(y[X]="error",g.html('')):N(e[O.dataName])},error:function(e,t){y[X]="error","function"==typeof o.error&&o.error(e,t)}})),h;y[z]=!0,v.length&&(!o.initSort||o.url&&!o.autoSort||((m=o.initSort).type?layui.sort(v,m.field,"desc"===m.type,!0):layui.sort(v,B.config.indexName,null,!0)),c.initData(y[s.children],y[Y]),w=B.getTrHtml(r,v,null,null,e),S={trs:E(w.trs.join("")),trs_fixed:E(w.trs_fixed.join("")),trs_fixed_r:E(w.trs_fixed_r.join(""))},A=(e.split("-").length-1||0)+1,layui.each(v,function(e,t){S.trs.eq(e).attr({"data-index":t[Y],"lay-data-index":t[Y],"data-level":A}),S.trs_fixed.eq(e).attr({"data-index":t[Y],"lay-data-index":t[Y],"data-level":A}),S.trs_fixed_r.eq(e).attr({"data-index":t[Y],"lay-data-index":t[Y],"data-level":A})}),d.find(L).find('tbody tr[lay-data-index="'+e+'"]').after(S.trs),d.find(q).find('tbody tr[lay-data-index="'+e+'"]').after(S.trs_fixed),d.find(R).find('tbody tr[lay-data-index="'+e+'"]').after(S.trs_fixed_r),c.renderTreeTable(S.trs,A),n)&&!p&&layui.each(v,function(e,t){U({dataIndex:t[Y],trElem:d.find('tr[lay-data-index="'+t[Y]+'"]').first(),tableViewElem:d,tableId:r,options:o},a,n,i,l)})}else c.isExpandAll=!1,(n&&!p?(layui.each(v,function(e,t){U({dataIndex:t[Y],trElem:d.find('tr[lay-data-index="'+t[Y]+'"]').first(),tableViewElem:d,tableId:r,options:o},a,n,i,l)}),d.find(v.map(function(e,t,a){return'tr[lay-data-index="'+e[Y]+'"]'}).join(","))):(b=c.treeToFlat(v,y[s.id],e),d.find(b.map(function(e,t,a){return'tr[lay-data-index="'+e[Y]+'"]'}).join(",")))).addClass(F);V("resize-"+r,function(){j.resize(r)},0)(),l&&"loading"!==y[X]&&(C=u.callback.onExpand,"function"===layui.type(C))&&C(r,y,x)}return h},g=(j.expandNode=function(e,t){var a,n,i,e=P(e);if(e)return a=(t=t||{}).index,n=t.expandFlag,i=t.inherit,t=t.callbackFlag,e=e.getOptions().elem.next(),U({trElem:e.find('tr[lay-data-index="'+a+'"]').first()},n,i,null,t)},j.expandAll=function(a,e){if("boolean"!==layui.type(e))return y.error("expandAll \u7684\u5c55\u5f00\u72b6\u6001\u53c2\u6570\u53ea\u63a5\u6536true/false");var t=P(a);if(t){t.isExpandAll=e;var n=t.getOptions(),i=n.tree,l=n.elem.next(),d=i.customName.isParent,r=i.customName.id,o=i.view.showFlexIconIfNotParent;if(e){e=j.getData(a,!0);if(i["async"].enable){var c=!0;if(layui.each(e,function(e,t){if(t[d]&&!t[X])return!(c=!1)}),!c)return void layui.each(j.getData(a),function(e,t){j.expandNode(a,{index:t[Y],expandFlag:!0,inherit:!0})})}var u=!0;if(layui.each(e,function(e,t){if(t[d]&&!t[z])return!(u=!1)}),u)t.updateStatus(null,function(e){(e[d]||o)&&(e[H]=!0,e[r]!==undefined)&&(t.status.expand[e[r]]=!0)}),l.find('tbody tr[data-level!="0"]').removeClass(F),l.find(".layui-table-tree-flexIcon").html(i.view.flexIconOpen),i.view.showIcon&&l.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)").html(i.view.iconOpen);else{if(t.updateStatus(null,function(e){(e[d]||o)&&(e[H]=!0,e[z]=!0,e[r]!==undefined)&&(t.status.expand[e[r]]=!0)}),n.initSort&&n.initSort.type&&n.autoSort)return j.sort(a);var s,n=B.getTrHtml(a,e),f={trs:E(n.trs.join("")),trs_fixed:E(n.trs_fixed.join("")),trs_fixed_r:E(n.trs_fixed_r.join(""))};layui.each(e,function(e,t){var a=t[Y].split("-").length-1;s={"data-index":t[Y],"lay-data-index":t[Y],"data-level":a},f.trs.eq(e).attr(s),f.trs_fixed.eq(e).attr(s),f.trs_fixed_r.eq(e).attr(s)}),layui.each(["main","fixed-l","fixed-r"],function(e,t){l.find(".layui-table-"+t+" tbody").html(f[["trs","trs_fixed","trs_fixed_r"][e]])}),t.renderTreeTable(l,0,!1)}}else t.updateStatus(null,function(e){(e[d]||o)&&(e[H]=!1,e[r]!==undefined)&&(t.status.expand[e[r]]=!1)}),l.find('.layui-table-box tbody tr[data-level!="0"]').addClass(F),l.find(".layui-table-tree-flexIcon").html(i.view.flexIconClose),i.view.showIcon&&l.find(".layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)").html(i.view.iconClose);j.resize(a)}},t.prototype.renderTreeTable=function(e,t,a){var n=this,i=n.getOptions(),l=i.elem.next(),d=(l.hasClass(h)||l.addClass(h),i.id),r=i.tree||{},o=(r.data,r.view||{}),c=r.customName||{},u=c.isParent,s=(l.attr("lay-filter"),n),f=((t=t||0)||(l.find(".layui-table-body tr:not([data-level])").attr("data-level",t),layui.each(B.cache[d],function(e,t){l.find('.layui-table-main tbody tr[data-level="0"]:eq('+e+")").attr("lay-data-index",t[Y]),l.find('.layui-table-fixed-l tbody tr[data-level="0"]:eq('+e+")").attr("lay-data-index",t[Y]),l.find('.layui-table-fixed-r tbody tr[data-level="0"]:eq('+e+")").attr("lay-data-index",t[Y])})),null),y=c.name,p=o.indent||14;if(layui.each(e.find('td[data-field="'+y+'"]'),function(e,t){var a,n,i=(t=E(t)).closest("tr"),t=t.children(".layui-table-cell");t.hasClass("layui-table-tree-item")||(n=i.attr("lay-data-index"))&&(i=l.find('tr[lay-data-index="'+n+'"]'),(a=s.getNodeDataByIndex(n))[H]&&a[u]&&((f=f||{})[n]=!0),a[b]&&i.find('input[type="checkbox"][name="layTableCheckbox"]').prop("indeterminate",!0),n=t.html(),(t=i.find('td[data-field="'+y+'"]>div.layui-table-cell')).addClass("layui-table-tree-item"),t.html(['
          ',a[H]?o.flexIconOpen:o.flexIconClose,"
          ",o.showIcon?'
          '+(a[c.icon]||o.icon||(a[u]?a[H]?o.iconOpen:o.iconClose:o.iconLeaf)||"")+"
          ":"",n].join("")).find(".layui-table-tree-flexIcon").on("click",function(e){layui.stope(e),U({trElem:i},null,null,null,!0)}))}),!t&&r.view.expandAllDefault&&n.isExpandAll===undefined)return j.expandAll(d,!0);!1!==a&&f?layui.each(f,function(e,t){e=l.find('tr[lay-data-index="'+e+'"]');e.find(".layui-table-tree-flexIcon").html(o.flexIconOpen),U({trElem:e.first()},!0)}):V("renderTreeTable-"+d,function(){i.hasNumberCol&&g(n),x.render(E('.layui-table-tree[lay-id="'+d+'"]'))},0)()},function(a){var e=a.getOptions(),t=e.elem.next(),n=0,i=t.find(".layui-table-main tbody tr"),l=t.find(".layui-table-fixed-l tbody tr"),d=t.find(".layui-table-fixed-r tbody tr");layui.each(a.treeToFlat(B.cache[e.id]),function(e,t){t.LAY_HIDE||(a.getNodeDataByIndex(t[Y]).LAY_NUM=++n,i.eq(e).find(".laytable-cell-numbers").html(n),l.eq(e).find(".laytable-cell-numbers").html(n),d.eq(e).find(".laytable-cell-numbers").html(n))})}),p=(t.prototype.render=function(e){var t=this;t.tableIns=B["reloadData"===e?"reloadData":"reload"](t.tableIns.config.id,E.extend(!0,{},t.config)),t.config=t.tableIns.config},t.prototype.reload=function(e,t,a){var n=this;e=e||{},delete n.haveInit,layui.each(e,function(e,t){"array"===layui.type(t)&&delete n.config[e]}),d(n.getOptions().id,e,a||!0),n.config=E.extend(t,{},n.config,e),n.render(a)},j.reloadData=function(){var e=E.extend(!0,[],arguments);return e[3]="reloadData",j.reload.apply(null,e)},function(e,a,n,i){var l=[];return layui.each(e,function(e,t){"function"===layui.type(a)?a(t):E.extend(t,a),l.push(E.extend({},t)),i||(l=l.concat(p(t[n],a,n,i)))}),l}),o=(t.prototype.updateStatus=function(e,t,a){var n=this.getOptions(),i=n.tree;return e=e||B.cache[n.id],p(e,t,i.customName.children,a)},t.prototype.getTableData=function(){var e=this.getOptions();return B.cache[e.id]},j.updateStatus=function(e,t,a){var e=P(e),n=e.getOptions();return a=a||(n.url?B.cache[n.id]:n.data),e.updateStatus(a,t)},j.sort=function(e){var t=P(e);t&&t.getOptions().autoSort&&(t.initData(),j.renderData(e))},function(n){var t=n.config.id,i=P(t),a=n.data=j.getNodeDataByIndex(t,n.index),l=a[Y],d=(n.dataIndex=l,n.update);n.update=function(){var e=arguments,t=(E.extend(i.getNodeDataByIndex(l),e[0]),d.apply(this,e)),a=n.config.tree.customName.name;return a in e[0]&&n.tr.find('td[data-field="'+a+'"]').children("div.layui-table-cell").removeClass("layui-table-tree-item"),i.renderTreeTable(n.tr,n.tr.attr("data-level"),!1),t},n.del=function(){j.removeNode(t,a)},n.setRowChecked=function(e){j.setRowChecked(t,{index:a,checked:e})}}),u=(j.updateNode=function(e,a,t){var n,i,l,d,r,o=P(e);o&&((d=o.getOptions()).tree,d=(n=d.elem.next()).find('tr[lay-data-index="'+a+'"]'),i=d.attr("data-index"),l=d.attr("data-level"),t)&&(d=o.getNodeDataByIndex(a,!1,t),r=B.getTrHtml(e,[d]),layui.each(["main","fixed-l","fixed-r"],function(e,t){n.find(".layui-table-"+t+' tbody tr[lay-data-index="'+a+'"]').replaceWith(E(r[["trs","trs_fixed","trs_fixed_r"][e]].join("")).attr({"data-index":i,"lay-data-index":a,"data-level":l}))}),o.renderTreeTable(n.find('tr[lay-data-index="'+a+'"]'),l))},j.removeNode=function(e,t){var a,n,i,l,d,r=P(e);r&&(d=(a=r.getOptions()).tree,n=a.elem.next(),i=[],t=r.getNodeDataByIndex("string"===layui.type(t)?t:t[Y],!1,"delete"),l=r.getNodeDataByIndex(t[s]),r.updateCheckStatus(l),l=r.treeToFlat([t],t[d.customName.pid],t[s]),layui.each(l,function(e,t){i.push('tr[lay-data-index="'+t[Y]+'"]')}),n.find(i.join(",")).remove(),d=r.initData(),layui.each(r.treeToFlat(d),function(e,t){t[m]&&t[m]!==t[Y]&&n.find('tr[lay-data-index="'+t[m]+'"]').attr({"data-index":t[Y],"lay-data-index":t[Y]})}),layui.each(B.cache[e],function(e,t){n.find('tr[data-level="0"][lay-data-index="'+t[Y]+'"]').attr("data-index",e)}),a.hasNumberCol&&g(r),j.resize(e))},j.addNodes=function(e,t){var a=P(e);if(a){var n=a.getOptions(),i=n.tree,l=n.elem.next(),d=B.config.checkName,r=(t=t||{}).parentIndex,o=t.index,c=t.data,t=t.focus,u=(r="number"===layui.type(r)?r.toString():r)?a.getNodeDataByIndex(r):null,o="number"===layui.type(o)?o:-1,c=E.extend(!0,[],layui.isArray(c)?c:[c]);layui.each(c,function(e,t){d in t||!u||(t[d]=u[d])}),a.getTableData();if(u){var s=i.customName.isParent,f=i.customName.children;u[s]=!0;var y=(y=u[f])?(p=y.splice(-1===o?y.length:o),u[f]=y.concat(c,p)):u[f]=c,f=(a.updateStatus(y,function(e){(e[s]||i.view.showFlexIconIfNotParent)&&(e[z]=!1)}),a.treeToFlat(y));l.find(f.map(function(e){return'tr[lay-data-index="'+e[Y]+'"]'}).join(",")).remove(),a.initData(),u[z]=!1,u[X]="local",U({trElem:l.find('tr[lay-data-index="'+r+'"]')},!0)}else{var p=B.cache[e].splice(-1===o?B.cache[e].length:o);if(B.cache[e]=B.cache[e].concat(c,p),n.url||(n.page?(y=n.page,n.data.splice.apply(n.data,[y.limit*(y.curr-1),y.limit].concat(B.cache[e]))):n.data=B.cache[e]),a.initData(),l.find(".layui-none").length)return B.renderData(e),c;var x,f=B.getTrHtml(e,c),h={trs:E(f.trs.join("")),trs_fixed:E(f.trs_fixed.join("")),trs_fixed_r:E(f.trs_fixed_r.join(""))},r=(layui.each(c,function(e,t){x={"data-index":t[Y],"lay-data-index":t[Y],"data-level":"0"},h.trs.eq(e).attr(x),h.trs_fixed.eq(e).attr(x),h.trs_fixed_r.eq(e).attr(x)}),parseInt(c[0][Y])-1),y=l.find(L),n=l.find(q),f=l.find(R);-1==r?(y.find('tr[data-level="0"][data-index="0"]').before(h.trs),n.find('tr[data-level="0"][data-index="0"]').before(h.trs_fixed),f.find('tr[data-level="0"][data-index="0"]').before(h.trs_fixed_r)):-1===o?(y.find("tbody").append(h.trs),n.find("tbody").append(h.trs_fixed),f.find("tbody").append(h.trs_fixed_r)):(r=p[0][m],y.find('tr[data-level="0"][data-index="'+r+'"]').before(h.trs),n.find('tr[data-level="0"][data-index="'+r+'"]').before(h.trs_fixed),f.find('tr[data-level="0"][data-index="'+r+'"]').before(h.trs_fixed_r)),layui.each(B.cache[e],function(e,t){l.find('tr[data-level="0"][lay-data-index="'+t[Y]+'"]').attr("data-index",e)}),a.renderTreeTable(l.find(c.map(function(e,t,a){return'tr[lay-data-index="'+e[Y]+'"]'}).join(",")))}return a.updateCheckStatus(u),j.resize(e),t&&l.find(L).find('tr[lay-data-index="'+c[0][Y]+'"]').get(0).scrollIntoViewIfNeeded(),c}},j.checkStatus=function(e,n){var i,t,a,l=P(e);if(l)return l=l.getOptions().tree,i=B.config.checkName,t=j.getData(e,!0).filter(function(e,t,a){return e[i]||n&&e[b]}),a=!0,layui.each("all"===l.data.cascade?B.cache[e]:j.getData(e,!0),function(e,t){if(!t[i])return!(a=!1)}),{data:t,isAll:a}},j.on("sort",function(e){var e=e.config,t=e.elem.next(),e=e.id;t.hasClass(h)&&j.sort(e)}),j.on("row",function(e){e.config.elem.next().hasClass(h)&&o(e)}),j.on("rowDouble",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(h)&&(o(e),(t.tree||{}).view.dblClickExpand)&&U({trElem:e.tr.first()},null,null,null,!0)}),j.on("rowContextmenu",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(h)&&o(e)}),j.on("tool",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(h)&&o(e)}),j.on("edit",function(e){var t=e.config,a=t.elem.next();t.id;a.hasClass(h)&&(o(e),e.field===t.tree.customName.name)&&((a={})[e.field]=e.value,e.update(a))}),j.on("radio",function(e){var t=e.config,a=t.elem.next(),t=t.id;a.hasClass(h)&&(a=P(t),o(e),u.call(a,e.tr,e.checked))}),t.prototype.setRowCheckedClass=function(e,t){var a=this.getOptions(),n=(e.data("index"),a.elem.next());e[t?"addClass":"removeClass"](l),e.each(function(){var e=E(this).data("index");n.find('.layui-table-fixed-r tbody tr[data-index="'+e+'"]')[t?"addClass":"removeClass"](l)})},t.prototype.updateCheckStatus=function(e,t){var a,n,i,l,d,r,o,c=this,u=c.getOptions();return!!u.hasChecboxCol&&(a=u.tree,n=u.id,i=u.elem.next(),l=B.config.checkName,"all"!==(d=a.data.cascade)&&"parent"!==d||!e||(d=c.updateParentCheckStatus(e,"boolean"===layui.type(t)?t:null),layui.each(d,function(e,t){var a=i.find('tr[lay-data-index="'+t[Y]+'"] input[name="layTableCheckbox"]:not(:disabled)'),n=t[l];c.setRowCheckedClass(a.closest("tr"),n),x.render(a.prop({checked:n,indeterminate:t[b]}))})),o=!(r=!0),e=(e="all"===a.data.cascade?B.cache[n]:j.getData(n,!0)).filter(function(e){return!e[u.disabledName]}),layui.each(e,function(e,t){if((t[l]||t[b])&&(o=!0),t[l]||(r=!1),o&&!r)return!0}),o=o&&!r,x.render(i.find('input[name="layTableCheckbox"][lay-filter="layTableAllChoose"]').prop({checked:r,indeterminate:o})),r)},t.prototype.updateParentCheckStatus=function(a,n){var i,e=this.getOptions(),t=e.tree,e=e.id,l=B.config.checkName,t=t.customName.children,d=[];return!(a[b]=!1)===n?a[t].length?layui.each(a[t],function(e,t){if(!t[l])return n=!1,a[b]=!0}):n=!1:!1===n?layui.each(a[t],function(e,t){if(t[l]||t[b])return a[b]=!0}):(n=!1,i=0,layui.each(a[t],function(e,t){t[l]&&i++}),n=a[t].length?a[t].length===i:a[l],a[b]=!n&&0')),n=(e.tree(a),i.elem=p(i.elem));if(n[0]){if(e.key=i.id||e.index,e.elem=a,e.elemNone=p('
          '+i.text.none+"
          "),n.html(e.elem),0==e.elem.find(".layui-tree-set").length)return e.elem.append(e.elemNone);i.showCheckbox&&e.renderForm("checkbox"),e.elem.find(".layui-tree-set").each(function(){var e=p(this);e.parent(".layui-tree-pack")[0]||e.addClass("layui-tree-setHide"),!e.next()[0]&&e.parents(".layui-tree-pack").eq(1).hasClass("layui-tree-lineExtend")&&e.addClass(F),e.next()[0]||e.parents(".layui-tree-set").eq(0).next()[0]||e.addClass(F)}),e.events()}},l.prototype.renderForm=function(e){i.render(e,"LAY-tree-"+this.index)},l.prototype.tree=function(r,e){var d=this,s=d.config,o=s.customName,e=e||s.data;layui.each(e,function(e,i){var a,n,t=i[o.children]&&0"),c=p(['
          ','
          ','
          ',s.showLine?t?'':'':'',s.showCheckbox?'':"",s.isJump&&i.href?''+(i[o.title]||i.label||s.text.defaultNodeName)+"":''+(i[o.title]||i.label||s.text.defaultNodeName)+"","
          ",s.edit?(a={add:'',update:'',del:''},n=['
          '],!0===s.edit&&(s.edit=["update","del"]),"object"==typeof s.edit?(layui.each(s.edit,function(e,i){n.push(a[i]||"")}),n.join("")+"
          "):void 0):"","
          "].join(""));t&&(c.append(l),d.tree(l,i[o.children])),r.append(c),c.prev("."+m)[0]&&c.prev().children(".layui-tree-pack").addClass("layui-tree-showLine"),t||c.parent(".layui-tree-pack").addClass("layui-tree-lineExtend"),d.spread(c,i),s.showCheckbox&&(i.checked&&d.checkids.push(i[o.id]),d.checkClick(c,i)),s.edit&&d.operate(c,i)})},l.prototype.spread=function(n,t){var l=this,c=l.config,e=n.children("."+x),i=e.children("."+b),a=i.find('input[same="layuiTreeCheck"]'),r=e.find("."+k),e=e.find("."+g),d=c.onlyIconControl?r:i,s="";d.on("click",function(e){var i=n.children("."+w),a=(d.children(".layui-icon")[0]?d:d.find(".layui-tree-icon")).children(".layui-icon");i[0]?n.hasClass(N)?(n.removeClass(N),i.slideUp(200),a.removeClass(v).addClass(C),l.updateFieldValue(t,"spread",!1)):(n.addClass(N),i.slideDown(200),a.addClass(v).removeClass(C),l.updateFieldValue(t,"spread",!0),c.accordion&&((i=n.siblings("."+m)).removeClass(N),i.children("."+w).slideUp(200),i.find(".layui-tree-icon").children(".layui-icon").removeClass(v).addClass(C))):s="normal"}),e.on("click",function(){p(this).hasClass(u)||(s=n.hasClass(N)?c.onlyIconControl?"open":"close":c.onlyIconControl?"close":"open",a[0]&&l.updateFieldValue(t,"checked",a.prop("checked")),c.click&&c.click({elem:n,state:s,data:t}))})},l.prototype.updateFieldValue=function(e,i,a){i in e&&(e[i]=a)},l.prototype.setCheckbox=function(e,i,a){var t,n=this,l=n.config.customName,c=a.prop("checked");a.prop("disabled")||("object"!=typeof i[l.children]&&!e.find("."+w)[0]||e.find("."+w).find('input[same="layuiTreeCheck"]').each(function(e){this.disabled||((e=i[l.children][e])&&n.updateFieldValue(e,"checked",c),n.updateFieldValue(this,"checked",c))}),(t=function(e){var i,a,n;e.parents("."+m)[0]&&(a=(e=e.parent("."+w)).parent(),n=e.prev().find('input[same="layuiTreeCheck"]'),c?n.prop("checked",c):(e.find('input[same="layuiTreeCheck"]').each(function(){this.checked&&(i=!0)}),i||n.prop("checked",!1)),t(a))})(e),n.renderForm("checkbox"))},l.prototype.checkClick=function(a,n){var t=this,l=t.config;a.children("."+x).children("."+b).on("click",'input[same="layuiTreeCheck"]+',function(e){layui.stope(e);var e=p(this).prev(),i=e.prop("checked");e.prop("disabled")||(t.setCheckbox(a,n,e),t.updateFieldValue(n,"checked",i),l.oncheck&&l.oncheck({elem:a,checked:i,data:n}))})},l.prototype.operate=function(r,d){var s=this,o=s.config,u=o.customName,e=r.children("."+x),h=e.children("."+b);e.children(".layui-tree-btnGroup").on("click",".layui-icon",function(e){layui.stope(e);var i,e=p(this).data("type"),n=r.children("."+w),t={data:d,type:e,elem:r};if("add"==e){n[0]||(o.showLine?(h.find("."+k).addClass("layui-tree-icon"),h.find("."+k).children(".layui-icon").addClass(C).removeClass("layui-icon-file")):h.find(".layui-tree-iconArrow").removeClass(f),r.append('
          '));var a,l=o.operate&&o.operate(t),c={};if(c[u.title]=o.text.defaultNodeName,c[u.id]=l,s.tree(r.children("."+w),[c]),o.showLine&&(n[0]?(n.hasClass(L)||n.addClass(L),r.find("."+w).each(function(){p(this).children("."+m).last().addClass(F)}),(n.children("."+m).last().prev().hasClass(F)?n.children("."+m).last().prev():n.children("."+m).last()).removeClass(F),!r.parent("."+w)[0]&&r.next()[0]&&n.children("."+m).last().removeClass(F)):(l=r.siblings("."+m),a=1,c=r.parent("."+w),layui.each(l,function(e,i){p(i).children("."+w)[0]||(a=0)}),(1==a?(l.children("."+w).addClass(T),l.children("."+w).children("."+m).removeClass(F),r.children("."+w).addClass(T),c.removeClass(L),c.children("."+m).last().children("."+w).children("."+m).last()):r.children("."+w).children("."+m)).addClass(F))),!o.showCheckbox)return;h.find('input[same="layuiTreeCheck"]')[0].checked&&(r.children("."+w).children("."+m).last().find('input[same="layuiTreeCheck"]')[0].checked=!0),s.renderForm("checkbox")}else"update"==e?(l=h.children("."+g).html(),h.children("."+g).html(""),h.append(''),h.children(".layui-tree-editInput").val(l).focus(),i=function(e){var i=e.val().trim()||o.text.defaultNodeName;e.remove(),h.children("."+g).html(i),t.data[u.title]=i,o.operate&&o.operate(t)},h.children(".layui-tree-editInput").blur(function(){i(p(this))}),h.children(".layui-tree-editInput").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),i(p(this)))})):y.confirm('\u786e\u8ba4\u5220\u9664\u8be5\u8282\u70b9 "'+(d[u.title]||"")+'" \u5417\uff1f',function(e){var l,a,i;o.operate&&o.operate(t),t.status="remove",y.close(e),r.prev("."+m)[0]||r.next("."+m)[0]||r.parent("."+w)[0]?(r.siblings("."+m).children("."+x)[0]?(o.showCheckbox&&(l=function(e){var i,a,n,t;e.parents("."+m)[0]&&(i=e.siblings("."+m).children("."+x),a=(e=e.parent("."+w).prev()).find('input[same="layuiTreeCheck"]')[0],n=1,(t=0)==a.checked)&&(i.each(function(e,i){i=p(i).find('input[same="layuiTreeCheck"]')[0];0!=i.checked||i.disabled||(n=0),i.disabled||(t=1)}),1==n)&&1==t&&(a.checked=!0,s.renderForm("checkbox"),l(e.parent("."+m)))})(r),o.showLine&&(e=r.siblings("."+m),a=1,i=r.parent("."+w),layui.each(e,function(e,i){p(i).children("."+w)[0]||(a=0)}),1==a?(n[0]||(i.removeClass(L),e.children("."+w).addClass(T),e.children("."+w).children("."+m).removeClass(F)),(r.next()[0]?i.children("."+m).last():r.prev()).children("."+w).children("."+m).last().addClass(F),r.next()[0]||r.parents("."+m)[1]||r.parents("."+m).eq(0).next()[0]||r.prev("."+m).addClass(F)):!r.next()[0]&&r.hasClass(F)&&r.prev().addClass(F))):(e=r.parent("."+w).prev(),o.showLine?(e.find("."+k).removeClass("layui-tree-icon"),e.find("."+k).children(".layui-icon").removeClass(v).addClass("layui-icon-file"),(i=e.parents("."+w).eq(0)).addClass(L),i.children("."+m).each(function(){p(this).children("."+w).children("."+m).last().addClass(F)})):e.find(".layui-tree-iconArrow").addClass(f),r.parents("."+m).eq(0).removeClass(N),r.parent("."+w).remove()),r.remove()):(r.remove(),s.elem.append(s.elemNone))})})},l.prototype.events=function(){var i=this,t=i.config;i.elem.find(".layui-tree-checkedFirst");i.setChecked(i.checkids),i.elem.find(".layui-tree-search").on("keyup",function(){var e=p(this),a=e.val(),e=e.nextAll(),n=[];e.find("."+g).each(function(){var i,e=p(this).parents("."+x);-1!=p(this).html().indexOf(a)&&(n.push(p(this).parent()),(i=function(e){e.addClass("layui-tree-searchShow"),e.parent("."+w)[0]&&i(e.parent("."+w).parent("."+m))})(e.parent("."+m)))}),e.find("."+x).each(function(){var e=p(this).parent("."+m);e.hasClass("layui-tree-searchShow")||e.addClass(f)}),0==e.find(".layui-tree-searchShow").length&&i.elem.append(i.elemNone),t.onsearch&&t.onsearch({elem:n})}),i.elem.find(".layui-tree-search").on("keydown",function(){p(this).nextAll().find("."+x).each(function(){p(this).parent("."+m).removeClass("layui-tree-searchShow "+f)}),p(".layui-tree-emptyText")[0]&&p(".layui-tree-emptyText").remove()})},l.prototype.getChecked=function(){var t=this,e=t.config,l=e.customName,i=[],a=[],c=(t.elem.find(".layui-form-checked").each(function(){i.push(p(this).prev()[0].value)}),function(e,n){layui.each(e,function(e,a){layui.each(i,function(e,i){if(a[l.id]==i)return t.updateFieldValue(a,"checked",!0),delete(i=p.extend({},a))[l.children],n.push(i),a[l.children]&&(i[l.children]=[],c(a[l.children],i[l.children])),!0})})});return c(p.extend({},e.data),a),a},l.prototype.setChecked=function(l){this.config;this.elem.find("."+m).each(function(e,i){var a=p(this).data("id"),n=p(i).children("."+x).find('input[same="layuiTreeCheck"]'),t=n.next();if("number"==typeof l){if(a.toString()==l.toString())return n[0].checked||t.click(),!1}else"object"==typeof l&&layui.each(l,function(e,i){if(i.toString()==a.toString()&&!n[0].checked)return t.click(),!0})})},n.that={},n.config={},t.reload=function(e,i){e=n.that[e];return e.reload(i),n.call(e)},t.getChecked=function(e){return n.that[e].getChecked()},t.setChecked=function(e,i){return n.that[e].setChecked(i)},t.render=function(e){e=new l(e);return n.call(e)},e(a,t)});layui.define(["laytpl","form"],function(e){"use strict";var s=layui.$,n=layui.laytpl,t=layui.form,a="transfer",i={config:{},index:layui[a]?layui[a].index+1e4:0,set:function(e){var t=this;return t.config=s.extend({},t.config,e),t},on:function(e,t){return layui.onevent.call(this,a,e,t)}},l=function(){var t=this,e=t.config,a=e.id||t.index;return l.that[a]=t,{config:l.config[a]=e,reload:function(e){t.reload.call(t,e)},getData:function(){return t.getData.call(t)}}},d="layui-hide",h="layui-btn-disabled",r="layui-none",c="layui-transfer-box",u="layui-transfer-header",o="layui-transfer-search",f="layui-transfer-data",y=function(e){return['
          ','
          ','","
          ","{{# if(d.data.showSearch){ }}",'","{{# } }}",'
            ',"
            "].join("")},p=['
            ',y({index:0,checkAllName:"layTransferLeftCheckAll"}),'
            ','",'","
            ",y({index:1,checkAllName:"layTransferRightCheckAll"}),"
            "].join(""),v=function(e){var t=this;t.index=++i.index,t.config=s.extend({},t.config,i.config,e),t.render()};v.prototype.config={title:["\u5217\u8868\u4e00","\u5217\u8868\u4e8c"],width:200,height:360,data:[],value:[],showSearch:!1,id:"",text:{none:"\u65e0\u6570\u636e",searchNone:"\u65e0\u5339\u914d\u6570\u636e"}},v.prototype.reload=function(e){var t=this;t.config=s.extend({},t.config,e),t.render()},v.prototype.render=function(){var e=this,t=e.config,a=e.elem=s(n(p,{open:"{{",close:"}}"}).render({data:t,index:e.index})),i=t.elem=s(t.elem);i[0]&&(t.data=t.data||[],t.value=t.value||[],t.id="id"in t?t.id:elem.attr("id")||e.index,e.key=t.id,i.html(e.elem),e.layBox=e.elem.find("."+c),e.layHeader=e.elem.find("."+u),e.laySearch=e.elem.find("."+o),e.layData=a.find("."+f),e.layBtn=a.find(".layui-transfer-active .layui-btn"),e.layBox.css({width:t.width,height:t.height}),e.layData.css({height:(i=t.height-e.layHeader.outerHeight(),t.showSearch&&(i-=e.laySearch.outerHeight()),i-2)}),e.renderData(),e.events())},v.prototype.renderData=function(){var e=this,t=e.config,l=[{checkName:"layTransferLeftCheck",views:[]},{checkName:"layTransferRightCheck",views:[]}];e.parseData(function(a){var i=a.selected?1:0,n=["
          • ",'',"
          • "].join("");i?layui.each(t.value,function(e,t){t==a.value&&a.selected&&(l[i].views[e]=n)}):l[i].views.push(n),delete a.selected}),e.layData.eq(0).html(l[0].views.join("")),e.layData.eq(1).html(l[1].views.join("")),e.renderCheckBtn()},v.prototype.renderForm=function(e){t.render(e,"LAY-transfer-"+this.index)},v.prototype.renderCheckBtn=function(r){var c=this,o=c.config;r=r||{},c.layBox.each(function(e){var t=s(this),a=t.find("."+f),t=t.find("."+u).find('input[type="checkbox"]'),i=a.find('input[type="checkbox"]'),n=0,l=!1;i.each(function(){var e=s(this).data("hide");(this.checked||this.disabled||e)&&n++,this.checked&&!e&&(l=!0)}),t.prop("checked",l&&n===i.length),c.layBtn.eq(e)[l?"removeClass":"addClass"](h),r.stopNone||(i=a.children("li:not(."+d+")").length,c.noneView(a,i?"":o.text.none))}),c.renderForm("checkbox")},v.prototype.noneView=function(e,t){var a=s('

            '+(t||"")+"

            ");e.find("."+r)[0]&&e.find("."+r).remove(),t.replace(/\s/g,"")&&e.append(a)},v.prototype.setValue=function(){var e=this.config,t=[];return this.layBox.eq(1).find("."+f+' input[type="checkbox"]').each(function(){s(this).data("hide")||t.push(this.value)}),e.value=t,this},v.prototype.parseData=function(t){var i=this.config,n=[];return layui.each(i.data,function(e,a){a=("function"==typeof i.parseData?i.parseData(a):a)||a,n.push(a=s.extend({},a)),layui.each(i.value,function(e,t){t==a.value&&(a.selected=!0)}),t&&t(a)}),i.data=n,this},v.prototype.getData=function(e){var t=this.config,i=[];return this.setValue(),layui.each(e||t.value,function(e,a){layui.each(t.data,function(e,t){delete t.selected,a==t.value&&i.push(t)})}),i},v.prototype.transfer=function(e,t){var a,i=this,n=i.config,l=i.layBox.eq(e),r=[],t=(t?((a=(t=t).find('input[type="checkbox"]'))[0].checked=!1,l.siblings("."+c).find("."+f).append(t.clone()),t.remove(),r.push(a[0].value),i.setValue()):l.each(function(e){s(this).find("."+f).children("li").each(function(){var e=s(this),t=e.find('input[type="checkbox"]'),a=t.data("hide");t[0].checked&&!a&&(t[0].checked=!1,l.siblings("."+c).find("."+f).append(e.clone()),e.remove(),r.push(t[0].value)),i.setValue()})}),i.renderCheckBtn(),l.siblings("."+c).find("."+o+" input"));""!==t.val()&&t.trigger("keyup"),n.onchange&&n.onchange(i.getData(r),e)},v.prototype.events=function(){var n=this,l=n.config;n.elem.on("click",'input[lay-filter="layTransferCheckbox"]+',function(){var e=s(this).prev(),t=e[0].checked,a=e.parents("."+c).eq(0).find("."+f);e[0].disabled||("all"===e.attr("lay-type")&&a.find('input[type="checkbox"]').each(function(){this.disabled||(this.checked=t)}),setTimeout(function(){n.renderCheckBtn({stopNone:!0})},0))}),n.elem.on("dblclick","."+f+">li",function(e){var t=s(this),a=t.children('input[type="checkbox"]'),i=t.parent().parent();a[0].disabled||n.transfer(i.data("index"),t)}),n.layBtn.on("click",function(){var e=s(this),t=e.data("index");e.hasClass(h)||n.transfer(t)}),n.laySearch.find("input").on("keyup",function(){var i=this.value,e=s(this).parents("."+o).eq(0).siblings("."+f),t=e.children("li"),t=(t.each(function(){var e=s(this),t=e.find('input[type="checkbox"]'),a=t[0].title,a=("cs"!==l.showSearch&&(a=a.toLowerCase(),i=i.toLowerCase()),-1!==a.indexOf(i));e[a?"removeClass":"addClass"](d),t.data("hide",!a)}),n.renderCheckBtn(),t.length===e.children("li."+d).length);n.noneView(e,t?l.text.searchNone:"")})},l.that={},l.config={},i.reload=function(e,t){e=l.that[e];return e.reload(t),l.call(e)},i.getData=function(e){return l.that[e].getData()},i.render=function(e){e=new v(e);return l.call(e)},e(a,i)});layui.define(["jquery","lay"],function(e){"use strict";var a=layui.$,t=layui.lay,o=(layui.hint(),layui.device(),{config:{},set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,i){return layui.onevent.call(this,r,e,i)}}),r="carousel",d="layui-this",s="layui-carousel-left",u="layui-carousel-right",c="layui-carousel-prev",m="layui-carousel-next",l="layui-carousel-arrow",f="layui-carousel-ind",i=function(e){var i=this;i.config=a.extend({},i.config,o.config,e),i.render()};i.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},i.prototype.render=function(){var e=this,i=e.config,n=a(i.elem);if(1*[carousel-item]>*"),i.index<0&&(i.index=0),i.index>=e.elemItem.length&&(i.index=e.elemItem.length-1),i.interval<800&&(i.interval=800),i.full?i.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):i.elem.css({width:i.width,height:i.height}),i.elem.attr("lay-anim",i.anim),e.elemItem.eq(i.index).addClass(d),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},i.prototype.reload=function(e){var i=this;clearInterval(i.timer),i.config=a.extend({},i.config,e),i.render()},i.prototype.prevIndex=function(){var e=this.config.index-1;return e=e<0?this.elemItem.length-1:e},i.prototype.nextIndex=function(){var e=this.config.index+1;return e=e>=this.elemItem.length?0:e},i.prototype.addIndex=function(e){var i=this.config;i.index=i.index+(e=e||1),i.index>=this.elemItem.length&&(i.index=0)},i.prototype.subIndex=function(e){var i=this.config;i.index=i.index-(e=e||1),i.index<0&&(i.index=this.elemItem.length-1)},i.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(clearInterval(e.timer),e.timer=setInterval(function(){e.slide()},i.interval))},i.prototype.arrow=function(){var i=this,e=i.config,n=a(['",'"].join(""));e.elem.attr("lay-arrow",e.arrow),e.elem.find("."+l)[0]&&e.elem.find("."+l).remove(),e.elem.append(n),n.on("click",function(){var e=a(this).attr("lay-type");i.slide(e)})},i.prototype["goto"]=function(e){var i=this,n=i.config;e>n.index?i.slide("add",e-n.index):e
              ',(i=[],layui.each(e.elemItem,function(e){i.push("")}),i.join("")),"
            "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+f)[0]&&n.elem.find("."+f).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-t.height()/2),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){e["goto"](a(this).index())})},i.prototype.slide=function(e,i){var n=this,t=n.elemItem,a=n.config,o=a.index,l=a.elem.attr("lay-filter");n.haveSlide||("sub"===e?(n.subIndex(i),t.eq(a.index).addClass(c),setTimeout(function(){t.eq(o).addClass(u),t.eq(a.index).addClass(u)},50)):(n.addIndex(i),t.eq(a.index).addClass(m),setTimeout(function(){t.eq(o).addClass(s),t.eq(a.index).addClass(s)},50)),setTimeout(function(){t.removeClass(d+" "+c+" "+m+" "+s+" "+u),t.eq(a.index).addClass(d),n.haveSlide=!1},350),n.elemInd.find("li").eq(a.index).addClass(d).siblings().removeClass(d),n.haveSlide=!0,e={index:a.index,prevIndex:o,item:t.eq(a.index)},"function"==typeof a.change&&a.change(e),layui.event.call(this,r,"change("+l+")",e))},i.prototype.events=function(){var e=this,i=e.config;i.elem.data("haveEvents")||(i.elem.on("mouseenter",function(){"always"!==e.config.autoplay&&clearInterval(e.timer)}).on("mouseleave",function(){"always"!==e.config.autoplay&&e.autoplay()}),i.elem.data("haveEvents",!0))},o.render=function(e){return new i(e)},e(r,o)});layui.define(["jquery","lay"],function(e){"use strict";var s=layui.jquery,r=layui.lay,c={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var a=this;return a.config=s.extend({},a.config,e),a},on:function(e,a){return layui.onevent.call(this,l,e,a)}},l="rate",f="layui-icon-rate",h="layui-icon-rate-solid",o="layui-icon-rate-half",u="layui-icon-rate-solid layui-icon-rate-half",v="layui-icon-rate layui-icon-rate-half",a=function(e){var a=this;a.index=++c.index,a.config=s.extend({},a.config,c.config,e),a.render()};a.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},a.prototype.render=function(){var e=this,a=e.config,l=s(a.elem);if(1a.length&&(a.value=a.length),parseInt(a.value)===a.value||a.half||(a.value=Math.ceil(a.value)-a.value<.5?Math.ceil(a.value):Math.floor(a.value)),'
              "),t=1;t<=a.length;t++){var o='
            • ";a.half&&parseInt(a.value)!==a.value&&t==Math.ceil(a.value)?n=n+'
            • ":n+=o}n+="
            "+(a.text?''+a.value+"\u661f":"")+"";var l=a.elem,u=l.next(".layui-rate");u[0]&&u.remove(),e.elemTemp=s(n),a.span=e.elemTemp.next("span"),a.setText&&a.setText(a.value),l.html(e.elemTemp),l.addClass("layui-inline"),a.readonly||e.action()},a.prototype.setvalue=function(e){this.config.value=e,this.render()},a.prototype.action=function(){var i=this.config,n=this.elemTemp,t=n.find("i").width();n.children("li").each(function(e){var a=e+1,l=s(this);l.on("click",function(e){i.value=a,i.half&&e.pageX-s(this).offset().left<=t/2&&(i.value=i.value-.5),i.text&&n.next("span").text(i.value+"\u661f"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),l.on("mousemove",function(e){n.find("i").each(function(){s(this).addClass(f).removeClass(u)}),n.find("i:lt("+a+")").each(function(){s(this).addClass(h).removeClass(v)}),i.half&&e.pageX-s(this).offset().left<=t/2&&l.children("i").addClass(o).removeClass(h)}),l.on("mouseleave",function(){n.find("i").each(function(){s(this).addClass(f).removeClass(u)}),n.find("i:lt("+Math.floor(i.value)+")").each(function(){s(this).addClass(h).removeClass(v)}),i.half&&parseInt(i.value)!==i.value&&n.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(o).removeClass("layui-icon-rate-solid layui-icon-rate")})})},a.prototype.events=function(){},c.render=function(e){e=new a(e);return function(){var a=this;return{setvalue:function(e){a.setvalue.call(a,e)},config:a.config}}.call(e)},e(l,c)});layui.define("jquery",function(l){"use strict";var g=layui.$,e=function(l){};e.prototype.load=function(l){var t,i,o,n,e,r,a,c,m,s,u,f,y,d=this,p=0,h=g((l=l||{}).elem);if(h[0])return e=g(l.scrollElem||document),r=l.mb||50,a=!("isAuto"in l)||l.isAuto,c=l.end||"\u6ca1\u6709\u66f4\u591a\u4e86",m=l.scrollElem&&l.scrollElem!==document,u=g('"),h.find(".layui-flow-more")[0]||h.append(u),f=function(l,e){l=g(l),u.before(l),(e=0==e||null)?u.html(c):u.find("a").html(s),i=e,t=null,o&&o()},(y=function(){t=!0,u.find("a").html(''),"function"==typeof l.done&&l.done(++p,f)})(),u.find("a").on("click",function(){g(this);i||t||y()}),l.isLazyimg&&(o=d.lazyimg({elem:l.elem+" img",scrollElem:l.scrollElem})),a&&e.on("scroll",function(){var e=g(this),o=e.scrollTop();n&&clearTimeout(n),!i&&h.width()&&(n=setTimeout(function(){var l=(m?e:g(window)).height();(m?e.prop("scrollHeight"):document.documentElement.scrollHeight)-o-l<=r&&(t||y())},100))}),d},e.prototype.lazyimg=function(l){var e,c=this,m=0,s=g((l=l||{}).scrollElem||document),u=l.elem||"img",f=l.scrollElem&&l.scrollElem!==document,y=function(e,l){var o,t=s.scrollTop(),l=t+l,i=f?e.offset().top-s.offset().top+t:e.offset().top;t<=i&&i<=l&&e.attr("lay-src")&&(o=e.attr("lay-src"),layui.img(o,function(){var l=c.lazyimg.elem.eq(m);e.attr("src",o).removeAttr("lay-src"),l[0]&&n(l),m++},function(){c.lazyimg.elem.eq(m);e.removeAttr("lay-src")}))},n=function(l,e){var o=(f?e||s:g(window)).height(),t=s.scrollTop(),i=t+o;if(c.lazyimg.elem=g(u),l)y(l,o);else for(var n=0;n"),preview:"Preview"},wordWrap:!0,lang:"text",highlighter:!1,langMarker:!1},W=layui.code?layui.code.index+1e4:0,R=function(e){return String(e).replace(/\s+$/,"").replace(/^\n|\n$/,"")};e("code",function(l,e){var o,i,t,a,n,d,c,s,r,u,y,p,E,f,h,v,m,L,_,M,C,g={config:l=x.extend(!0,{},T,l),reload:function(e){layui.code(this.updateOptions(e))},updateOptions:function(e){return delete(e=e||{}).elem,x.extend(!0,l,e)},reloadCode:function(e){layui.code(this.updateOptions(e),"reloadCode")}},w=x(l.elem);return 1',l.ln?['
            ',D.digit(t+1)+".","
            "].join(""):"",'
            ',e||" ","
            ",""].join("")})}},a=l.code,n=function(e){return"function"==typeof l.codeParse?l.codeParse(e,l):e},"reloadCode"===e?o.children(".layui-code-wrap").html(w(n(a)).html):(d=layui.code.index=++W,o.attr("lay-code-index",d),(M=A.CDDE_DATA_CLASS in o.data())&&o.attr("class",o.data(A.CDDE_DATA_CLASS)||""),M||o.data(A.CDDE_DATA_CLASS,o.attr("class")),c={copy:{className:"file-b",title:["\u590d\u5236\u4ee3\u7801"],event:function(e){var t=D.unescape(n(l.code));lay.clipboard.writeText({text:t,done:function(){N.msg("\u5df2\u590d\u5236",{icon:1})},error:function(){N.msg("\u590d\u5236\u5931\u8d25",{icon:2})}}),"function"==typeof l.onCopy&&l.onCopy(t)}}},function b(){var e=o.parent("."+A.ELEM_PREVIEW),t=e.children("."+A.ELEM_TAB),a=e.children("."+A.ELEM_ITEM+"-preview");return t.remove(),a.remove(),e[0]&&o.unwrap(),b}(),l.preview&&(M="LAY-CODE-DF-"+d,f=l.layout||["code","preview"],s="iframe"===l.preview,E=x('
            '),C=x('
            '),r=x('
            '),_=x('
            '),u=x('
            '),l.id&&E.attr("id",l.id),E.addClass(l.className),C.attr("lay-filter",M),layui.each(f,function(e,t){var a=x('
          • ');0===e&&a.addClass("layui-this"),a.html(l.text[t]),r.append(a)}),x.extend(c,{full:{className:"screen-full",title:["\u6700\u5927\u5316\u663e\u793a","\u8fd8\u539f\u663e\u793a"],event:function(e){var e=e.elem,t=e.closest("."+A.ELEM_PREVIEW),a="layui-icon-"+this.className,i="layui-icon-screen-restore",l=this.title,o=x("html,body"),n="layui-scrollbar-hide";e.hasClass(a)?(t.addClass(A.ELEM_FULL),e.removeClass(a).addClass(i),e.attr("title",l[1]),o.addClass(n)):(t.removeClass(A.ELEM_FULL),e.removeClass(i).addClass(a),e.attr("title",l[0]),o.removeClass(n))}},window:{className:"release",title:["\u5728\u65b0\u7a97\u53e3\u9884\u89c8"],event:function(e){D.openWin({content:n(l.code)})}}}),l.copy&&("array"===layui.type(l.tools)?-1===l.tools.indexOf("copy")&&l.tools.unshift("copy"):l.tools=["copy"]),u.on("click",">i",function(){var e=x(this),t=e.data("type"),e={elem:e,type:t,options:l,rawCode:l.code,finalCode:D.unescape(n(l.code))};c[t]&&"function"==typeof c[t].event&&c[t].event(e),"function"==typeof l.toolsEvent&&l.toolsEvent(e)}),l.addTools&&l.tools&&(l.tools=[].concat(l.tools,l.addTools)),layui.each(l.tools,function(e,t){var a="object"==typeof t,i=a?t:c[t]||{className:t,title:[t]},l=i.className||i.type,o=i.title||[""],a=a?i.type||l:t;a&&(c[a]||((t={})[a]=i,x.extend(c,t)),u.append(''))}),o.addClass(A.ELEM_ITEM).wrap(E),C.append(r),l.tools&&C.append(u),o.before(C),s&&_.html(''),y=function(e){var t=e.children("iframe")[0];s&&t?t.srcdoc=n(l.code):e.html(l.code),setTimeout(function(){"function"==typeof l.done&&l.done({container:e,options:l,render:function(){I.render(e.find(".layui-form")),S.render()}})},3)},"preview"===f[0]?(_.addClass(A.ELEM_SHOW),o.before(_),y(_)):o.addClass(A.ELEM_SHOW).after(_),l.previewStyle=[l.style,l.previewStyle].join(""),_.attr("style",l.previewStyle),S.on("tab("+M+")",function(e){var t=x(this),a=x(e.elem).closest("."+A.ELEM_PREVIEW).find("."+A.ELEM_ITEM),e=a.eq(e.index);a.removeClass(A.ELEM_SHOW),e.addClass(A.ELEM_SHOW),"preview"===t.attr("lay-id")&&y(e),L()})),p=x(''),o.addClass((E=["layui-code-view layui-border-box"],l.wordWrap||E.push("layui-code-nowrap"),E.join(" "))),(C=l.theme||l.skin)&&(o.removeClass("layui-code-theme-dark layui-code-theme-light"),o.addClass("layui-code-theme-"+C)),l.highlighter&&o.addClass([l.highlighter,"language-"+l.lang,"layui-code-hl"].join(" ")),f=w(l.encode?D.escape(n(a)):a),h=f.lines,o.html(p.html(f.html)),l.ln&&o.append('
            '),l.height&&p.css("max-height",l.height),l.codeStyle=[l.style,l.codeStyle].join(""),l.codeStyle&&p.attr("style",function(e,t){return(t||"")+l.codeStyle}),v=[{selector:">.layui-code-wrap>.layui-code-line{}",setValue:function(e,t){e.style["padding-left"]=t+"px"}},{selector:">.layui-code-wrap>.layui-code-line>.layui-code-line-number{}",setValue:function(e,t){e.style.width=t+"px"}},{selector:">.layui-code-ln-side{}",setValue:function(e,t){e.style.width=t+"px"}}],m=lay.style({target:o[0],id:"DF-code-"+d,text:x.map(x.map(v,function(e){return e.selector}),function(e,t){return['.layui-code-view[lay-code-index="'+d+'"]',e].join(" ")}).join("")}),L=function b(){var e,i;return l.ln&&(e=Math.floor(h.length/100),i=p.children("."+A.ELEM_LINE).last().children("."+A.ELEM_LINE_NUM).outerWidth(),o.addClass(A.ELEM_LN_MODE),e)&&A.LINE_RAW_WIDTH
          • ')).html(l.title||l.text.code),o.prepend(_)),M=x('
            '),l.copy&&!l.preview&&((C=x(['','',""].join(""))).on("click",function(){c.copy.event()}),M.append(C)),l.langMarker&&M.append(''+l.lang+""),l.about&&M.append(l.about),o.append(M),l.preview||setTimeout(function(){"function"==typeof l.done&&l.done({})},3),l.elem.length===1+d&&"function"==typeof l.allDone&&l.allDone())),g})}),layui["layui.all"]||layui.addcss("modules/code.css?v=6","skincodecss"); //# sourceMappingURL=layui.js.map diff --git a/dist/layui.js.map b/dist/layui.js.map index 7013aafa2..abb767879 100644 --- a/dist/layui.js.map +++ b/dist/layui.js.map @@ -1 +1 @@ -{"version":3,"sources":["layui.js","modules/layui.all.js","modules/lay.js","modules/laytpl.js","modules/laypage.js","modules/laydate.js","modules/jquery.js","modules/layer.js","modules/util.js","modules/dropdown.js","modules/slider.js","modules/colorpicker.js","modules/element.js","modules/upload.js","modules/form.js","modules/table.js","modules/treeTable.js","modules/tree.js","modules/transfer.js","modules/carousel.js","modules/rate.js","modules/flow.js","modules/code.js"],"names":["win","jsPath","doc","document","config","modules","status","timeout","event","Layui","this","v","GLOBAL","LAYUI_GLOBAL","getPath","currentScript","src","js","scripts","last","length","i","readyState","dir","substring","lastIndexOf","error","msg","type","console","isOpera","opera","toString","builtin","lay","layer","laydate","laypage","laytpl","form","upload","dropdown","transfer","tree","table","treeTable","element","rate","colorpicker","slider","carousel","flow","util","code","jquery","all","layui.all","EV_REMOVE","prototype","cache","define","deps","factory","use","setApp","app","exports","layui","callback","apps","from","node","url","that","head","getElementsByTagName","item","jQuery","fn","on","each","index","splice","$","onScriptLoad","e","readyRegExp","navigator","platform","test","currentTarget","srcElement","removeChild","poll","onCallback","setTimeout","push","slice","apply","host","match","location","base","replace","createElement","async","charset","version","Date","getTime","appendChild","attachEvent","indexOf","addEventListener","disuse","isArray","getStyle","name","style","currentStyle","getComputedStyle","getPropertyValue","link","href","cssname","id","STAUTS_NAME","debug","rel","media","getElementById","getLinkElem","parseInt","removeAttribute","getAttribute","setAttribute","addcss","firename","modName","img","Image","complete","onload","onerror","options","key","o","clone","extend","router","hash","data","path","search","split","obj","pathname","_index","substr","settings","storage","localStorage","JSON","parse","value","remove","stringify","sessionData","sessionStorage","device","agent","userAgent","toLowerCase","getVersion","label","exp","RegExp","result","os","ie","ActiveXObject","weixin","android","ios","mobile","hint","_typeof","operand","String","Object","call","_isArray","len","callFn","sort","arr","desc","notClone","o1","o2","v1","v2","isNaN","isNum","reverse","stope","thisEvent","stopPropagation","cancelBubble","onevent","events","params","filter","eventName","filterName","_","off","debounce","func","wait","context","args","arguments","clearTimeout","throttle","cooldown","window","selector","Class","elem","querySelectorAll","Array","searchElement","fromIndex","rst","val","constructor","ai","target","digit","num","str","Math","pow","elemName","attr","hasScrollbar","body","scrollHeight","innerHeight","documentElement","clientHeight","getStyleRules","rules","sheet","styleSheet","cssRules","styleText","text","cssText","innerHTML","styleElem","find","append","position","opts","scrollArea","winArea","margin","left","top","rect1","clickType","rect","clientX","clientY","right","bottom","getBoundingClientRect","elemWidth","offsetWidth","elemHeight","offsetHeight","align","allowBottomOut","SYSTEM_RELOAD","othis","attrName","attrValue","Function","ev","errorText","join","isTopElem","topElems","matched","clipboard","writeText","then","done","opacity","select","execCommand","err","addStr","new_str","ii","removeStr","isObject","children","contains","child","addClass","className","removeClass","hasClass","has","css","parseValue","undefined","thisKey","thisValue","width","height","removeAttr","html","parentNode","detachEvent","removeEventListener","open","close","tool","escape","inner","source","template","tagExp","__","jss","jsse","tag","start","render","DISABLED","view","skipText","elemArr","plate","groups","Number","layout","count","curr","limits","limit","pages","ceil","prev","next","views","page","pager","first","halve","floor","end","max","theme","def","limitTemplet","refresh","skip","jump","isskip","childs","btn","input","nodeName","keyCode","load","even","isLayui","ready","MOD_ID","weekStart","laydate_dir","set","thisModule","inst","content","reload","MOD_NAME","THIS","LIMIT_YEAR","ELEM_STATIC","ELEM_LIST","ELEM_SELECTED","ELEM_HINT","ELEM_PREV","ELEM_NEXT","ELEM_CONFIRM","ELEM_TIME_TEXT","ELEM_TIME_BTN","ELEM_PREVIEW","ELEM_SHADE","newThat","getThis","init","dateType","formatArr","format","isLeapYear","year","range","isInitValue","min","trigger","show","showBottom","isPreview","btns","lang","calendar","mark","holidays","zIndex","change","autoConfirm","shade","cn","weeks","time","timeTips","startTime","endTime","dateTips","month","tools","confirm","clear","now","invalidDate","formatError","preview","en","isStatic","date","datetime","eventElem","fullPanel","rangeStr","rangeLinked","autoCalendarModel","state","startDate","endDate","auto","rangeElem","EXP_IF","EXP_SPLIT","EXP","EXP_IF_ONE","isInput","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","ymd","hms","day","tDate","newDate","getFullYear","getMonth","getDate","hours","minutes","seconds","thisDate","getHours","getMinutes","getSeconds","elemID","setValue","systemDate","themeStr","shortcutBtns","colorTheme","class","elemMain","elemHeader","elemCont","elemTable","divFooter","footer","divShortcut","shortcut","divHeader","headerChild","spanY","spanM","divContent","thead","theadTr","tr","insertRow","j","th","insertCell","insertBefore","ELEM_MAIN","title","shortcuts","btnSetting","dataset","timeBtn","dateTime","endState","listYM","checkDate","click","main","isPrimaryColor","thisElemDate","thisId","insertAdjacentHTML","changeEvent","renderAdditional","div","hinTimer","ms","getAsYM","Y","M","thisMaxDate","vals","arrDate","minMaxError","checkValid","getEndDate","initDate","startEnd","thisv","parseFloat","EYM","_i","_v","getDateTime","td","YMD","keys","idx","dayStr","timestamp","isOut","thisDateTime","startWeek","prevMaxDate","isAlone","tds","elemYM","firstDate","setFullYear","getDay","index_","st","list","setBtnStatus","timeParams","stampRange","yearNum","setTimeStatus","span","scroll","ul","haveList","isCN","startY","li","lay-ym","ol","inedx","childUL","ym","closeList","choose","scrollTop","haveSpan","tips","elemBtn","elemPreview","color","thisTime","param","panelIndex","isChange","YM","isSameDate","dateTimeTemp","active","addSubYear","isYear","isMonth","prevYear","prevMonth","nextMonth","nextYear","header","layYM","layType","tagName","toLocaleLowerCase","showEvent","eventHandler","unbind","run","closeStop","preventDefault","getInst","one","concat","amd","global","module","w","Error","noGlobal","deletedIds","class2type","hasOwn","hasOwnProperty","support","rtrim","rmsPrefix","rdashAlpha","fcamelCase","letter","toUpperCase","isArrayLike","isWindow","toArray","get","pushStack","elems","ret","merge","prevObject","map","eq","copyIsArray","copy","deep","isFunction","isPlainObject","expando","random","isReady","noop","isNumeric","realStringObj","isEmptyObject","nodeType","ownFirst","globalEval","trim","execScript","camelCase","string","makeArray","results","inArray","second","grep","invert","matches","callbackExpect","arg","guid","proxy","tmp","Symbol","iterator","Sizzle","Expr","getText","isXML","tokenize","compile","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","preferredDoc","dirruns","classCache","createCache","tokenCache","compilerCache","sortOrder","a","b","pop","push_native","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","rcomma","rcombinators","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rinputs","rheader","rnative","rquickExpr","rsibling","rescape","runescape","funescape","escaped","escapedWhitespace","high","fromCharCode","unloadHandler","childNodes","els","seed","m","nid","nidselect","newSelector","newContext","ownerDocument","exec","getElementsByClassName","qsa","toSelector","testContext","qsaError","cacheLength","shift","markFunction","assert","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createPositionalPseudo","argument","matchIndexes","parent","defaultView","createComment","getById","getElementsByName","attrId","getAttributeNode","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","hasCompare","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","specified","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","what","simple","forward","ofType","xml","uniqueCache","outerCache","nodeIndex","useCache","lastChild","uniqueID","pseudo","setFilters","not","matcher","unmatched","innerText","elemLang","root","focus","activeElement","hasFocus","tabIndex","enabled","disabled","checked","selected","selectedIndex","empty","button","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","addCombinator","combinator","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","matcherIn","matcherOut","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","div1","defaultValue","unique","isXMLDoc","until","truncate","is","siblings","n","rneedsContext","rsingleTag","risSimple","winnow","qualifier","self","rootjQuery","rparentsprev","charAt","parseHTML","guaranteedUnique","contents","sibling","targets","closest","l","pos","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","contentWindow","readyList","rnotwhite","detach","completed","Callbacks","object","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","disable","lock","fireWith","Deferred","tuples","promise","always","deferred","fail","fns","newDefer","tuple","returned","progress","notify","resolve","reject","pipe","stateString","when","subordinate","progressValues","progressContexts","resolveContexts","resolveValues","remaining","updateFunc","values","notifyWith","resolveWith","readyWait","holdReady","hold","triggerHandler","doScroll","frameElement","doScrollCheck","inlineBlockNeedsLayout","container","zoom","deleteExpando","shrinkWrapBlocksVal","acceptData","noData","rbrace","rmultiDash","dataAttr","parseJSON","isEmptyDataObject","internalData","pvt","internalKey","isNode","toJSON","thisCache","internalRemoveData","cleanData","applet ","embed ","object ","hasData","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","defer","shrinkWrapBlocks","pnum","rcssNum","cssExpand","isHidden","el","adjustCSS","prop","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","access","chainable","emptyGet","raw","bulk","rcheckableType","rtagName","rscriptType","rleadingWhitespace","nodeNames","createSafeFragment","safeFrag","createDocumentFragment","fragment","leadingWhitespace","tbody","htmlSerialize","html5Clone","cloneNode","outerHTML","appendChecked","noCloneChecked","checkClone","noCloneEvent","wrapMap","option","legend","area","col","_default","getAll","found","setGlobalEval","refElements","optgroup","tfoot","colgroup","caption","rhtml","rtbody","fixDefaultChecked","defaultChecked","buildFragment","selection","ignored","wrap","safe","nodes","htmlPrefilter","createTextNode","focusin","rformElems","rkeyEvent","rmouseEvent","rfocusMorph","rtypenamespace","returnTrue","returnFalse","safeActiveElement","types","origFn","t","handleObjIn","special","eventHandle","handlers","namespaces","origType","elemData","handle","triggered","dispatch","delegateType","bindType","handleObj","namespace","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","onlyHandlers","ontype","bubbleType","eventPath","Event","isTrigger","rnamespace","noBubble","parentWindow","isPropagationStopped","isDefaultPrevented","fix","handlerQueue","delegateTarget","preDispatch","isImmediatePropagationStopped","postDispatch","sel","originalEvent","fixHook","fixHooks","mouseHooks","keyHooks","props","metaKey","original","which","charCode","eventDoc","fromElement","pageX","scrollLeft","clientLeft","pageY","clientTop","relatedTarget","toElement","blur","beforeunload","returnValue","simulate","isSimulated","defaultPrevented","timeStamp","stopImmediatePropagation","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","_submitBubble","propertyName","_justChanged","attaches","rinlinejQuery","rnoshimcache","rxhtmlTag","rnoInnerhtml","rchecked","rscriptTypeMasked","rcleanScript","fragmentDiv","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","oldData","curData","domManip","collection","hasScripts","iNoClone","_evalUrl","keepData","dataAndEvents","deepDataAndEvents","destElements","srcElements","inPage","fixCloneNodeIssues","defaultSelected","forceAcceptData","prepend","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","insert","iframe","elemdisplay","HTML","BODY","actualDisplay","display","defaultDisplay","write","pixelPositionVal","pixelMarginRightVal","boxSizingReliableVal","reliableHiddenOffsetsVal","reliableMarginRightVal","reliableMarginLeftVal","rmargin","rnumnonpx","swap","old","computeStyleTests","divStyle","marginLeft","marginRight","getClientRects","borderCollapse","cssFloat","backgroundClip","clearCloneStyle","boxSizing","MozBoxSizing","WebkitBoxSizing","reliableHiddenOffsets","boxSizingReliable","pixelMarginRight","pixelPosition","reliableMarginRight","reliableMarginLeft","getStyles","curCSS","rposition","addGetHookIf","conditionFn","hookFn","opener","computed","maxWidth","minWidth","rs","rsLeft","runtimeStyle","pixelLeft","ralpha","ropacity","rdisplayswap","rnumsplit","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","cssPrefixes","emptyStyle","vendorPropName","capName","showHide","hidden","setPositiveNumber","subtract","augmentWidthOrHeight","extra","isBorderBox","styles","getWidthOrHeight","valueIsBorderBox","Tween","easing","cssHooks","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","lineHeight","order","orphans","widows","cssProps","float","origName","isFinite","$1","padding","border","prefix","suffix","expand","expanded","parts","hide","toggle","propHooks","percent","eased","duration","step","fx","linear","p","swing","cos","PI","fxNow","timerId","rfxtypes","rrun","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","tick","currentTime","tweens","specialEasing","originalProperties","originalOptions","gotoEnd","rejectWith","timer","anim","*","tweener","oldfire","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","opt","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","interval","setInterval","clearInterval","slow","fast","delay","getSetAttribute","hrefNormalized","checkOn","optSelected","enctype","optDisabled","radioValue","rreturn","rspaces","valHooks","optionSet","nodeHook","boolHook","ruseDefault","getSetInput","rfocusable","nType","attrHooks","propName","attrNames","propFix","getter","setAttributeNode","createAttribute","coords","contenteditable","rclickable","rclass","removeProp","tabindex","for","getClass","classes","clazz","finalValue","curValue","toggleClass","stateVal","classNames","hover","fnOver","fnOut","nonce","rquery","rvalidtokens","rhash","requireNonComma","depth","comma","parseXML","DOMParser","parseFromString","loadXML","rts","rheaders","rnoContent","rprotocol","rurl","transports","allTypes","ajaxLocation","ajaxLocParts","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","ajaxConvert","s","response","isSuccess","conv2","current","conv","converters","responseFields","dataFilter","filterHidden","lastModified","etag","isLocal","processData","contentType","accepts","json","* text","text html","text json","text xml","ajaxSetup","ajaxPrefilter","ajaxTransport","ajax","cacheURL","responseHeadersString","timeoutTimer","fireGlobals","transport","responseHeaders","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","mimeType","abort","statusText","finalText","success","method","crossDomain","traditional","hasContent","ifModified","headers","beforeSend","send","nativeStatusText","responses","firstDataType","ct","finalDataType","modified","getJSON","getScript","throws","wrapAll","wrapInner","unwrap","visible","r20","rbracket","rCRLF","rsubmitterTypes","rsubmittable","encodeURIComponent","buildParams","serialize","serializeArray","xhr","createActiveXHR","documentMode","createStandardXHR","xhrId","xhrCallbacks","xhrSupported","XMLHttpRequest","cors","username","xhrFields","isAbort","onreadystatechange","responseText","script","text script","scriptCharset","oldCallbacks","rjsonp","_load","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","keepScripts","parsed","getWindow","animated","offset","setOffset","curCSSTop","curTop","curOffset","curCSSLeft","curElem","curLeft","curPosition","using","box","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","bind","delegate","undelegate","size","andSelf","layer_dir","removeFocus","resize","minStackIndex","minStackArr","STATUS_NAME","alert","yes","cancel","btn2","rskin","skin","doms","closeBtn","icon","follow","fixed","setings","creat","pt","0","1","2","3","4","5","6","slideLeft","slideRight","SHADE","MOVE","move","isOutAnim","minStack","moveType","scrollbar","vessel","conType","times","titype","ismax","maxmin","titleHTML","face","animClass","additFaceClass","btnAlign","layero","elemShade","restore","hideOnClose","closeAll","tipsMore","moveElem","shadeo","setScrollbar","background-color","innerWidth","outerWidth","titHeight","outerHeight","btnHeight","setHeight","maxHeight","offsetTop","offsetLeft","layArea","goal","tipsG","guide","autoLeft","tipLeft","where","tipTop","padding-right","_DOC","DATA_NAME","resizeElem","dict","eventMoveElem","eventResizeElem","docEvent","setRig","setBot","X","stX","stY","moveOut","resizing","moveEnd","openLayer","IE6","shadeClose","full","reselect","sthis","setTop","record","restScrollbar","removeProperty","getChildFrame","getFrameIndex","iframeAuto","heg","iframeSrc","contElem","elemMin","hasMinLeft","maxminStatus","minLeft","edgeIndex","isfix","closeAnim","WRAP","domsElem","closeLast","prompt","placeholder","formType","maxlength","tab","photos","loop","toolbar","imgIndex","pushData","alt","pid","thumb","imgprev","tabimg","imgnext","errorMsg","keyup","isNumber","getTransform","transforms","rotate","scaleX","imgElem","transform","ratio","delta","wheelDelta","detail","zoomElem","loadi","loadImage","winarea","imgarea","wh","_$","isMobile","_win","propSuffix","deliver","fixbar","elemTopBar","setTopBar","ELEM","$doc","$target","bars","default","$scroll","bar1","bar2","elemBar","lay-type","bgcolor","countdown","clock","countTime","d","h","setTime","timeAgo","onlyDate","stamp","toDateString","years","days","milliseconds","meridiem","getMilliseconds","customMeridiem","hm","yy","yyyy","MM","dd","H","HH","hh","A","mm","ss","SSS","unescape","openWin","specs","toVisibleArea","scrollElem","SCROLL_NAME","OFFSET_NAME","scrollValue","scrollOffset","thisOffset","thisElem","vertical","eventType","_body","UTIL_EVENT_CALLBACK","_WIN","ELEM_LI","clickOrMousedown","MOD_INDEX","customName","reloadData","STR_ELEM","STR_ITEM_UP","STR_ITEM_DOWN","STR_MENU_TITLE","STR_ITEM_GROUP","STR_ITEM_PARENT","STR_ITEM_CHECKED","STR_ITEM_CHECKED2","STR_MENU_PANEL","STR_MENU_PANEL_L","STR_ELEM_SHADE","STR_GROUP_TITLE","isAllowSpread","isSpreadItem","accordion","rerender","elemView","elemBody","getDefaultView","elemUl","eachItemView","isChild","templet","group","-","viewLi","viewText","elemPanel","TPL_MAIN","delayRemove","prevElem","isClickAllScope","clickScope","elemGroup","spread","elemPrev","prevElemCallback","isAccordion","contentElem","needSpread","groupSibs","ELEM_LI_PAR","dataParams","SLIDER_BAR","SLIDER_WRAP","SLIDER_WRAP_BTN","SLIDER_TIPS","SLIDER_INPUT_TXT","ELEM_HOVER","showstep","minValue","maxValue","scaleFir","scaleSec","hasRender","elemTemp","number","elemInput","slide","sliderWidth","sliderWrap","tipsTxt","setTips","margin-bottom","sliderAct","sliderTxt","inputValue","offsetValue","round","arrValue","firLeft","valueTo","secLeft","wrapWidth","abs","selfValue","oldLeft","elemMove","up","upCall","oldleft","oldx","reaLeft","inputScale","getInputValue","realValue","ICON_PICKER_DOWN","ICON_PICKER_CLOSE","PICKER_TRIG_SPAN","PICKER_TRIG_I","PICKER_SIDE_SLIDER","PICKER_BASIS","PICKER_ALPHA_BG","PICKER_ALPHA_SLIDER","PICKER_BASIS_CUR","PICKER_INPUT","RGBToHSB","rgb","hsb","r","g","HSBToRGB","t1","t3","t2","HSBToHEX","hex","nr","RGBSTo","rgbs","re","$win","alpha","predefine","colors","elemColorBox","bgstr","background","renderPicker","elemPicker","removePicker","thisElemInd","thisColor","pickerEvents","bindElem","elemPickerInput","backgroundColor","side","basis","alphacolor","alphaslider","_h","_b","_s","_a","pre","x","y","z","createMoveElem","oldtop","oldy","maxh","maxw","sidetop","elemColorBoxSpan","colorValue","attrEvent","SHOW","TITLE","Element","NAV_ELEM","tabAdd","layAttr","tabElem","titElem","barElem","tabChange","tabAuto","tabDelete","layid","liElem","tabClick","dom","headerElem","NAV_ITEM","NAV_BAR","NAV_TREE","NAV_CHILD","NAV_MORE","NAV_ANIM","bodyElem","elemA","isJump","unselect","MORE","BAR","CLOSE","STOPE","isSpread","hideTabMore","tsbTitle","clickThis","NAV_ITEMED","needExpand","parentSibs","collapse","isNone","elemFilter","items","nav","timerMore","timeEnd","NAV_TITLE","bar","itemElem","thisA","breadcrumb","ATTE_SPR","separator","aNode","elemTitle","files","ELEM_FILE","ELEM_FORM","ELEM_IFRAME","ELEM_CHOOSE","UPLOADING","accept","exts","bindAction","force","field","acceptMime","drag","multiple","cross-domain","data-format-error","check-error","limit-number","limit-size","elemFile","isFile","initIE","elemForm","FileReader","chooseFiles","reader","readAsDataURL","limitSize","getFiles","ajaxSend","successful","failed","allDone","fileLength","total","request","sets","formData","FormData","resetFileState","unified","res","lengthComputable","loaded","iframeSend","iframeBody","thisFile","pushFile","resetFile","filename","newFile","File","typeName","images","video","audio","toFixed","setChooseFile","setChooseText","dataTransfer","HIDE","Form","verify","required","phone","email","identity","autocomplete","getFormElem","itemForm","getValue","nameIndex","fieldElem","init_name","inputs","handleInputNumber","rawValue","precision","noAction","isInit","decimals","controlBtn","increment","decrement","affix","CLASS_WRAP","CLASS_SUFFIX","CLASS_AFFIX","showAffix","renderAffix","affixOptions","elemAffix","elemIcon","hasElemAffix","hasElemSuffix","inputFilter","eye","SHOW_NAME","isShow","thatInput","TIPS","NONE","initValue","selects","reElem","isSearch","nearElem","laySearch","showDown","hideDown","followScroll","notOption","dl","dds","dts","dlHeight","none","posTop","thisDd","ddHeight","setThisDd","prevNext","thisElem1","showDd","firstIndex","cacheNearElem","nearDd","origin","thisDds","optionsFirst","switch","SUBTRA","checks","RE_CLASS","indeterminate","ICON","radios","ANIM","forms","sameRadio","renderItem","itemType","validate","intercept","DANGER","vers","verType","thisVer","rule","verst","isForm2Elem","layFilter","verifyElem","$dom","checkName","indexName","numbersName","disabledName","thisTable","setColsWidth","getThisTable","getThisTableConfig","parseTempData","item3","tplData","exportTemplet","LAY_COL","HIDE_V","ELEM_VIEW","ELEM_HEADER","ELEM_BODY","ELEM_FIXR","ELEM_PAGE_VIEW","ELEM_SORT","ELEM_CHECKED","ELEM_EDIT","ELEM_GROUP","ELEM_COL_SPECIAL","ELEM_TOOL_PANEL","ELEM_EXPAND","DATA_MOVE_NAME","TPL_HEADER","TPL_BODY","eachChildCols","loading","cellMinWidth","cellMaxWidth","MAX_VALUE","editTrigger","defaultToolbar","defaultContextmenu","autoSort","cols","pageName","limitName","statusName","msgName","dataName","totalRowName","countName","pullData","setInit","fullHeightGap","parentDiv","parentHeightGap","lay-filter","lay-id","renderStyle","layTool","layBox","layHeader","layMain","layBody","layFixed","layFixLeft","layFixRight","layTotal","layPage","renderToolbar","renderPagebar","fullSize","initOpts","space","unresize","numbers","getWidth","clientWidth","initChildCols","i1","item1","i2","item2","indexChild","childIndex","colspan","rowspan","colGroup","i22","item22","HAS_PARENT","parentKey","lineStyle","trClassName","cellMaxHeight","leftDefaultTemp","elemToolTemp","toolbarHtml","layEvent","print","iconElem","thisItem","pagebarHtml","layPagebar","pagebar","setParentCol","parentTh","parentColspan","arrParentKey","getThisCol","colspan2","nextParentKey","setColsPatch","setGroupWidth","getEndTh","colNums","autoColNums","autoWidth","countWidth","cntrWidth","getAutoWidth","eachCols","getScrollWidth","back","patchNums","i3","headerWidth","scrollPatch","haveInit","HAS_SET_COLS_PATCH","errorView","elemNone","layNone","syncCheckAll","renderForm","startLimit","initSort","reloadType","renderData","totalRow","ts","parseData","newData","getTrHtml","trsObj","trs","trs_fixed","trs_fixed_r","tds_fixed","tds_fixed_r","LAY_KEY","edit","trAttr","totalRowData","sortKey","pull","scrollPos","tipsIndex","renderTotal","totalNums","dataTotal","TOTAL_NUMS","totalRowDecimals","thisTotalNum","totalRowText","getContent","TOTAL_ROW","patchElem","getColElem","checkAllElem","checkStatus","isAll","setRowActive","setRowChecked","thisData","existChecked","getChecked","checkedElem","checkedSameElem","fixRElem","_field","elemSort","fromEvent","layInit","selectorText","headerMain","thIndex","thElem","bodyHeight","layMainTable","scrollWidth","outWidth","addPatch","fixHeight","ELEM_CELL","_BODY","commonMember","lis","openPanel","panel","fieldTitle","exportFile","printWin","edg","onafterprint","oLeft","pLeft","allowResize","ruleWidth","thatTable","setWidth","nowType","clearCacheKey","dataCache","del","update","fields","cell","thisTd","setRowEvent","getCol","UNROW","renderGridEdit","elemCell","editType","ELEM_GRID_DOWN","oldValue","reedit","showGridExpandIcon","gridExpand","ELEM_CELL_C","elemCellClose","expandedMode","cellExpandedMode","expandedWidth","cellExpandedWidth","$this","toolFn","errorTips","tdIndex","attrData","tableData","trElem","itemData","row","tableIns","CHILD_COLS","PARENT_COL_INDEX","arrs","eachArrs","nums","invalidNum","getData","dataTitle","dataMain","fieldsIsHide","textType","csv","xls","alink","reduce","acc","ignoreExport","download","getOptions","hideCol","thisTreeTable","ELEM_FIXL","TABLE_TREE","LAY_DATA_INDEX","LAY_DATA_INDEX_HISTORY","LAY_PARENT_INDEX","LAY_CHECKBOX_HALF","LAY_EXPAND","LAY_HAS_EXPANDED","LAY_ASYNC_STATUS","LAY_CASCADE","updateCache","childrenKey","tableCache","itemDataIndex","updateOptions","thatOptionsTemp","treeOptions","idKey","hasNumberCol","hasChecboxCol","hasRadioCol","mod","parseDataThat","retData","isSimpleData","enable","flatToTree","updateStatus","initData","isRenderData","tableView","isExpandAll","layTableAllChooseElem","renderTreeTable","cascade","isParent","indent","flexIconClose","flexIconOpen","showIcon","iconClose","iconOpen","iconLeaf","showFlexIconIfNotParent","dblClickExpand","expandAllDefault","rootPid","autoParam","beforeExpand","onExpand","pIdKey","idTemp","pidTemp","tableId","flatArr","treeToFlat","parentId","parentIndex","flat","dataIndex","dataNew","getTreeNode","getParentNode","getNodeByIndex","treeNode","treeNodeData","getNodeDataByIndex","updateNode","removeNode","expandNode","setChecked","getNodeById","tableDataFlat","newValue","dataRet","indexArr","getTableData","isParentKey","debounceFn","expandFlag","sonSign","callbackFlag","tableViewElem","treeTableThat","trData","isToggle","trExpand","retValue","trExpanded","trsElem","flexIconElem","trDataId","array","asyncSuccessFn","asyncContentType","asyncDataType","asyncJsonpCallback","asyncHeaders","asyncParseData","asyncResponse","str2","str2Obj","dataLevelNew","asyncSetting","asyncUrl","asyncAutoParam","itemArr","asyncType","childItem","data-index","lay-data-index","data-level","childNodesFlat","formatNumber","inherit","expandAll","isAllAsyncDone","isAllExpanded","trAll","trAllObj","dataItem","dataLevel","level","treeOptionsView","dataExpand","nameKey","htmlTemp","itemCell","trIndex","trDefaultExpand","trMain","trFixedL","trFixedR","statusObj","notCascade","dataUpdated","updateObjParams","tableThat","updateFn","checkNode","newNode","trLevel","newNodeTemp","trNew","delNodesFlat","delNode","nodeP","updateCheckStatus","i4","item4","addNodes","newNodes","childKey","childrenNodes","dataAfter","childrenNodesFlat","pageOptions","newNodesHtml","newNodesHtmlObj","trIndexPrev","newNodeIndex","newNodeItem","tableViewElemMAIN","tableViewElemFIXL","tableViewElemFIXR","trIndexNext","scrollIntoViewIfNeeded","includeHalfCheck","checkedData","updateData","setRowCheckedClass","dataP","trsP","isIndeterminate","updateParentCheckStatus","indexP","itemP","checkboxElem","checkedNum","inputElem","isRadio","triggerEvent","trDataP","radioElem","collectNeedExpandNodeIndex","needExpandIndex","nodeData","checkAllNodes","reloadAsyncNode","dataId","getNodesByFilter","isSingle","nodesResult","ELEM_SET","ICON_CLICK","ICON_ADD","ICON_SUB","ELEM_ENTRY","ELEM_TEXT","ELEM_PACK","ELEM_SPREAD","ELEM_LINE_SHORT","ELEM_SHOW","ELEM_EXTEND","showCheckbox","showLine","onlyIconControl","defaultNodeName","checkids","editIcon","hasChild","packDiv","entryDiv","checkClick","operate","entry","elemCheckbox","elemText","touchOpen","packCont","iconClick","updateFieldValue","sibls","setCheckbox","setParentsChecked","thisNodeElem","parentNodeElem","parentCheckbox","parentPack","oncheck","getVal","returnObj","textNew","elemDel","pare","siblingTree","checkState","parentTree","prevDiv","pack","onsearch","checkId","checkData","eachNodes","index2","cloneItem","checkedId","reInput","ELEM_BOX","ELEM_SEARCH","ELEM_DATA","TPL_BOX","checkAllName","showSearch","searchNone","layData","layBtn","listElem","renderCheckBtn","thisDataElem","allElemCheckbox","listElemCheckbox","haveChecked","isHide","stopNone","noneView","createNoneElem","selectedData","thisElemCheckbox","thisBoxElem","siblingInput","thisList","onchange","elemThis","thisListElem","isMatch","ELEM_LEFT","ELEM_RIGHT","ELEM_ARROW","ELEM_IND","arrow","indicator","autoplay","elemItem","prevIndex","nextIndex","addIndex","subIndex","tplArrow","goto","tplInd","elemInd","thisIndex","haveSlide","ICON_RATE","ICON_RATE_SOLID","ICON_RATE_HALF","ICON_SOLID_HALF","ICON_HALF_RATE","readonly","half","setText","action","setvalue","_ul","wide","ind","Flow","isOver","lazyimg","mb","isAuto","notDocument","more","over","isLazyimg","elemTop","CONST","ELEM_TAB","ELEM_FULL","ELEM_ITEM","ELEM_LINE","ELEM_LINE_NUM","ELEM_LN_MODE","CDDE_DATA_CLASS","LINE_RAW_WIDTH","about","ln","encode","wordWrap","highlighter","langMarker","codeIndex","mode","rawCode","finalCode","isIframePreview","elemHeaderView","elemToolbar","runPreview","codeElem","createCodeRst","lines","setCodeLayout","elemFixbar","copyElem","reloadCode","obverse","codeRender","createCode","line","codeParse","hasDataClass","onCopy","elemViewHas","elemTabHas","elemPreviewViewHas","FILTER_VALUE","elemTabView","elemPreviewView","classNameFull","classNameRestore","htmlElem","ELEM_SCROLLBAR_HIDE","oi","parameters","toolsEvent","addTools","viso","thisItemBody","srcdoc","previewStyle","elemItemBody","codeStyle","multiLine"],"mappings":"mCAMC,CAAC,SAASA,GAC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AAW,WACe,YAAxB,OAAOiD,EAAQ2J,MAAuB3J,EAAQ2J,KAAK,EAAE,CACvD,EAAE,CAAC,EAIF3J,EAAQqF,KAAKjN,SAAmB,EAAR6D,GACE,YAA3B,OAAO+D,EAAQ83D,SAA0B93D,EAAQ83D,QAAQ,IAGpDn4C,CACT,CAAC,CACH,CAAC,EAGGxkB,MAAM,cACRA,MAAMqE,OAAO,uBAAwB,aAAa","file":"layui.js","sourcesContent":["/**\n * Layui\n * Classic modular front-end UI library\n * MIT Licensed\n */\n \n;!function(win){\n \"use strict\";\n\n var doc = win.document;\n var config = {\n modules: {}, // 模块物理路径\n status: {}, // 模块加载状态\n timeout: 10, // 符合规范的模块请求最长等待秒数\n event: {} // 模块自定义事件\n };\n\n var Layui = function(){\n this.v = '2.8.18-rc.3'; // Layui 版本号\n };\n \n // 识别预先可能定义的指定全局对象\n var GLOBAL = win.LAYUI_GLOBAL || {};\n\n // 获取 layui 所在目录\n var getPath = function(){\n var jsPath = doc.currentScript ? doc.currentScript.src : function(){\n var js = doc.scripts;\n var last = js.length - 1;\n var src;\n for(var i = last; i > 0; i--){\n if(js[i].readyState === 'interactive'){\n src = js[i].src;\n break;\n }\n }\n return src || js[last].src;\n }();\n \n return config.dir = GLOBAL.dir || jsPath.substring(0, jsPath.lastIndexOf('/') + 1);\n }();\n\n // 异常提示\n var error = function(msg, type){\n type = type || 'log';\n win.console && console[type] && console[type]('layui error hint: ' + msg);\n };\n\n var isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]';\n\n // 内置模块\n var modules = config.builtin = {\n lay: 'lay', // 基础 DOM 操作\n layer: 'layer', // 弹层\n laydate: 'laydate', // 日期\n laypage: 'laypage', // 分页\n laytpl: 'laytpl', // 模板引擎\n form: 'form', // 表单集\n upload: 'upload', // 上传\n dropdown: 'dropdown', // 下拉菜单\n transfer: 'transfer', // 穿梭框\n tree: 'tree', // 树结构\n table: 'table', // 表格\n treeTable: 'treeTable', // 树表\n element: 'element', // 常用元素操作\n rate: 'rate', // 评分组件\n colorpicker: 'colorpicker', // 颜色选择器\n slider: 'slider', // 滑块\n carousel: 'carousel', // 轮播\n flow: 'flow', // 流加载\n util: 'util', // 工具块\n code: 'code', // 代码修饰器\n jquery: 'jquery', // DOM 库(第三方)\n \n all: 'all',\n 'layui.all': 'layui.all' // 聚合标识(功能性的,非真实模块)\n };\n\n // 记录基础数据\n Layui.prototype.cache = config;\n\n // 定义模块\n Layui.prototype.define = function(deps, factory){\n var that = this;\n var type = typeof deps === 'function';\n var callback = function(){\n var setApp = function(app, exports){\n layui[app] = exports;\n config.status[app] = true;\n };\n typeof factory === 'function' && factory(function(app, exports){\n setApp(app, exports);\n config.callback[app] = function(){\n factory(setApp);\n }\n });\n return this;\n };\n \n type && (\n factory = deps,\n deps = []\n );\n \n that.use(deps, callback, null, 'define');\n return that;\n };\n\n // 使用特定模块\n Layui.prototype.use = function(apps, callback, exports, from){\n var that = this;\n var dir = config.dir = config.dir ? config.dir : getPath;\n var head = doc.getElementsByTagName('head')[0];\n\n apps = function(){\n if(typeof apps === 'string'){\n return [apps];\n } \n // 当第一个参数为 function 时,则自动加载所有内置模块,且执行的回调即为该 function 参数;\n else if(typeof apps === 'function'){\n callback = apps;\n return ['all'];\n } \n return apps;\n }();\n \n // 如果页面已经存在 jQuery 1.7+ 库且所定义的模块依赖 jQuery,则不加载内部 jquery 模块\n if(win.jQuery && jQuery.fn.on){\n that.each(apps, function(index, item){\n if(item === 'jquery'){\n apps.splice(index, 1);\n }\n });\n layui.jquery = layui.$ = jQuery;\n }\n \n var item = apps[0];\n var timeout = 0;\n\n exports = exports || [];\n\n // 静态资源host\n config.host = config.host || (dir.match(/\\/\\/([\\s\\S]+?)\\//)||['//'+ location.host +'/'])[0];\n \n // 加载完毕\n function onScriptLoad(e, url){\n var readyRegExp = navigator.platform === 'PLaySTATION 3' ? /^complete$/ : /^(complete|loaded)$/\n if (e.type === 'load' || (readyRegExp.test((e.currentTarget || e.srcElement).readyState))) {\n config.modules[item] = url;\n head.removeChild(node);\n (function poll() {\n if(++timeout > config.timeout * 1000 / 4){\n return error(item + ' is not a valid module', 'error');\n }\n config.status[item] ? onCallback() : setTimeout(poll, 4);\n }());\n }\n }\n \n // 回调\n function onCallback(){\n exports.push(layui[item]);\n apps.length > 1 ?\n that.use(apps.slice(1), callback, exports, from)\n : ( typeof callback === 'function' && function(){\n // 保证文档加载完毕再执行回调\n if(layui.jquery && typeof layui.jquery === 'function' && from !== 'define'){\n return layui.jquery(function(){\n callback.apply(layui, exports);\n });\n }\n callback.apply(layui, exports);\n }() );\n }\n \n // 如果引入了聚合板,内置的模块则不必重复加载\n if( apps.length === 0 || (layui['layui.all'] && modules[item]) ){\n return onCallback(), that;\n }\n \n /*\n * 获取加载的模块 URL\n * 如果是内置模块,则按照 dir 参数拼接模块路径\n * 如果是扩展模块,则判断模块路径值是否为 {/} 开头,\n * 如果路径值是 {/} 开头,则模块路径即为后面紧跟的字符。\n * 否则,则按照 base 参数拼接模块路径\n */\n \n var url = ( modules[item] ? (dir + 'modules/') \n : (/^\\{\\/\\}/.test(that.modules[item]) ? '' : (config.base || ''))\n ) + (that.modules[item] || item) + '.js';\n url = url.replace(/^\\{\\/\\}/, '');\n \n // 如果扩展模块(即:非内置模块)对象已经存在,则不必再加载\n if(!config.modules[item] && layui[item]){\n config.modules[item] = url; // 并记录起该扩展模块的 url\n }\n\n // 首次加载模块\n if(!config.modules[item]){\n var node = doc.createElement('script');\n \n node.async = true;\n node.charset = 'utf-8';\n node.src = url + function(){\n var version = config.version === true \n ? (config.v || (new Date()).getTime())\n : (config.version||'');\n return version ? ('?v=' + version) : '';\n }();\n \n head.appendChild(node);\n \n if(node.attachEvent && !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && !isOpera){\n node.attachEvent('onreadystatechange', function(e){\n onScriptLoad(e, url);\n });\n } else {\n node.addEventListener('load', function(e){\n onScriptLoad(e, url);\n }, false);\n }\n \n config.modules[item] = url;\n } else { // 缓存\n (function poll() {\n if(++timeout > config.timeout * 1000 / 4){\n return error(item + ' is not a valid module', 'error');\n }\n (typeof config.modules[item] === 'string' && config.status[item]) \n ? onCallback() \n : setTimeout(poll, 4);\n }());\n }\n \n return that;\n };\n\n // 弃用原有的指定模块,以便重新扩展新的同名模块\n Layui.prototype.disuse = function(apps){\n var that = this;\n apps = that.isArray(apps) ? apps : [apps];\n that.each(apps, function (index, item) {\n if (!config.status[item]) {\n // return error('module ' + item + ' is not exist');\n }\n delete that[item];\n delete modules[item];\n delete that.modules[item];\n delete config.status[item];\n delete config.modules[item];\n });\n return that;\n };\n\n // 获取节点的 style 属性值\n Layui.prototype.getStyle = function(node, name){\n var style = node.currentStyle ? node.currentStyle : win.getComputedStyle(node, null);\n return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name);\n };\n\n // css 外部加载器\n Layui.prototype.link = function(href, fn, cssname){\n var that = this;\n var head = doc.getElementsByTagName('head')[0];\n var link = doc.createElement('link');\n \n if(typeof fn === 'string') cssname = fn;\n \n var app = (cssname || href).replace(/\\.|\\//g, '');\n var id = 'layuicss-'+ app;\n var STAUTS_NAME = 'creating';\n var timeout = 0;\n \n link.href = href + (config.debug ? '?v='+new Date().getTime() : '');\n link.rel = 'stylesheet';\n link.id = id;\n link.media = 'all';\n \n if(!doc.getElementById(id)){\n head.appendChild(link);\n }\n \n if(typeof fn !== 'function') return that;\n \n // 轮询 css 是否加载完毕\n (function poll(status) {\n var delay = 100;\n var getLinkElem = doc.getElementById(id); // 获取动态插入的 link 元素\n \n // 如果轮询超过指定秒数,则视为请求文件失败或 css 文件不符合规范\n if(++timeout > config.timeout * 1000 / delay){\n return error(href + ' timeout');\n }\n \n // css 加载就绪\n if(parseInt(that.getStyle(getLinkElem, 'width')) === 1989){\n // 如果参数来自于初始轮询(即未加载就绪时的),则移除 link 标签状态\n if(status === STAUTS_NAME) getLinkElem.removeAttribute('lay-status');\n // 如果 link 标签的状态仍为「创建中」,则继续进入轮询,直到状态改变,则执行回调\n getLinkElem.getAttribute('lay-status') === STAUTS_NAME ? setTimeout(poll, delay) : fn();\n } else {\n getLinkElem.setAttribute('lay-status', STAUTS_NAME);\n setTimeout(function(){\n poll(STAUTS_NAME);\n }, delay);\n }\n }());\n \n // 轮询css是否加载完毕\n /*\n (function poll() {\n if(++timeout > config.timeout * 1000 / 100){\n return error(href + ' timeout');\n };\n parseInt(that.getStyle(doc.getElementById(id), 'width')) === 1989 ? function(){\n fn();\n }() : setTimeout(poll, 100);\n }());\n */\n \n return that;\n };\n \n // css 内部加载器\n Layui.prototype.addcss = function(firename, fn, cssname){\n return layui.link(config.dir + 'css/' + firename, fn, cssname);\n };\n \n // 存储模块的回调\n config.callback = {};\n \n // 重新执行模块的工厂函数\n Layui.prototype.factory = function(modName){\n if(layui[modName]){\n return typeof config.callback[modName] === 'function' \n ? config.callback[modName]\n : null;\n }\n };\n\n // 图片预加载\n Layui.prototype.img = function(url, callback, error) { \n var img = new Image();\n img.src = url; \n if(img.complete){\n return callback(img);\n }\n img.onload = function(){\n img.onload = null;\n typeof callback === 'function' && callback(img);\n };\n img.onerror = function(e){\n img.onerror = null;\n typeof error === 'function' && error(e);\n }; \n };\n\n // 全局配置\n Layui.prototype.config = function(options){\n options = options || {};\n for(var key in options){\n config[key] = options[key];\n }\n return this;\n };\n\n // 记录全部模块\n Layui.prototype.modules = function(){\n var clone = {};\n for(var o in modules){\n clone[o] = modules[o];\n }\n return clone;\n }();\n\n // 拓展模块\n Layui.prototype.extend = function(options){\n var that = this;\n\n // 验证模块是否被占用\n options = options || {};\n for(var o in options){\n if(that[o] || that.modules[o]){\n error(o+ ' Module already exists', 'error');\n } else {\n that.modules[o] = options[o];\n }\n }\n\n return that;\n };\n\n // location.hash 路由解析\n Layui.prototype.router = Layui.prototype.hash = function(hash){\n var that = this;\n var hash = hash || location.hash;\n var data = {\n path: [],\n search: {},\n hash: (hash.match(/[^#](#.*$)/) || [])[1] || ''\n };\n \n if(!/^#\\//.test(hash)) return data; // 禁止非路由规范\n\n hash = hash.replace(/^#\\//, '');\n data.href = '/' + hash;\n hash = hash.replace(/([^#])(#.*$)/, '$1').split('/') || [];\n \n // 提取 Hash 结构\n that.each(hash, function(index, item){\n /^\\w+=/.test(item) ? function(){\n item = item.split('=');\n data.search[item[0]] = item[1];\n }() : data.path.push(item);\n });\n \n return data;\n };\n \n // URL 解析\n Layui.prototype.url = function(href){\n var that = this;\n var data = {\n // 提取 url 路径\n pathname: function(){\n var pathname = href\n ? function(){\n var str = (href.match(/\\.[^.]+?\\/.+/) || [])[0] || '';\n return str.replace(/^[^\\/]+/, '').replace(/\\?.+/, '');\n }()\n : location.pathname;\n return pathname.replace(/^\\//, '').split('/');\n }(),\n \n // 提取 url 参数\n search: function(){\n var obj = {};\n var search = (href \n ? function(){\n var str = (href.match(/\\?.+/) || [])[0] || '';\n return str.replace(/\\#.+/, '');\n }()\n : location.search\n ).replace(/^\\?+/, '').split('&'); // 去除 ?,按 & 分割参数\n \n // 遍历分割后的参数\n that.each(search, function(index, item){\n var _index = item.indexOf('=')\n ,key = function(){ // 提取 key\n if(_index < 0){\n return item.substr(0, item.length);\n } else if(_index === 0){\n return false;\n } else {\n return item.substr(0, _index);\n }\n }(); \n // 提取 value\n if(key){\n obj[key] = _index > 0 ? item.substr(_index + 1) : null;\n }\n });\n \n return obj;\n }(),\n \n // 提取 Hash\n hash: that.router(function(){\n return href \n ? ((href.match(/#.+/) || [])[0] || '/')\n : location.hash;\n }())\n };\n \n return data;\n };\n\n // 本地持久存储\n Layui.prototype.data = function(table, settings, storage){\n table = table || 'layui';\n storage = storage || localStorage;\n \n if(!win.JSON || !win.JSON.parse) return;\n \n // 如果 settings 为 null,则删除表\n if(settings === null){\n return delete storage[table];\n }\n \n settings = typeof settings === 'object' \n ? settings \n : {key: settings};\n \n try {\n var data = JSON.parse(storage[table]);\n } catch(e) {\n var data = {};\n }\n \n if('value' in settings) data[settings.key] = settings.value;\n if(settings.remove) delete data[settings.key];\n storage[table] = JSON.stringify(data);\n \n return settings.key ? data[settings.key] : data;\n };\n \n // 本地临时存储\n Layui.prototype.sessionData = function(table, settings){\n return this.data(table, settings, sessionStorage);\n }\n\n // 设备信息\n Layui.prototype.device = function(key){\n var agent = navigator.userAgent.toLowerCase();\n\n // 获取版本号\n var getVersion = function(label){\n var exp = new RegExp(label + '/([^\\\\s\\\\_\\\\-]+)');\n label = (agent.match(exp)||[])[1];\n return label || false;\n };\n \n // 返回结果集\n var result = {\n os: function(){ // 底层操作系统\n if(/windows/.test(agent)){\n return 'windows';\n } else if(/linux/.test(agent)){\n return 'linux';\n } else if(/iphone|ipod|ipad|ios/.test(agent)){\n return 'ios';\n } else if(/mac/.test(agent)){\n return 'mac';\n } \n }(),\n ie: function(){ // ie 版本\n return (!!win.ActiveXObject || \"ActiveXObject\" in win) ? (\n (agent.match(/msie\\s(\\d+)/) || [])[1] || '11' // 由于 ie11 并没有 msie 的标识\n ) : false;\n }(),\n weixin: getVersion('micromessenger') // 是否微信\n };\n \n // 任意的 key\n if(key && !result[key]){\n result[key] = getVersion(key);\n }\n \n // 移动设备\n result.android = /android/.test(agent);\n result.ios = result.os === 'ios';\n result.mobile = (result.android || result.ios);\n \n return result;\n };\n\n // 提示\n Layui.prototype.hint = function(){\n return {\n error: error\n };\n };\n \n // typeof 类型细分 -> string/number/boolean/undefined/null、object/array/function/…\n Layui.prototype._typeof = Layui.prototype.type = function(operand){\n if(operand === null) return String(operand);\n \n // 细分引用类型\n return (typeof operand === 'object' || typeof operand === 'function') ? function(){\n var type = Object.prototype.toString.call(operand).match(/\\s(.+)\\]$/) || []; // 匹配类型字符\n var classType = 'Function|Array|Date|RegExp|Object|Error|Symbol'; // 常见类型字符\n \n type = type[1] || 'Object';\n \n // 除匹配到的类型外,其他对象均返回 object\n return new RegExp('\\\\b('+ classType + ')\\\\b').test(type) \n ? type.toLowerCase() \n : 'object';\n }() : typeof operand;\n };\n \n // 对象是否具备数组结构(此处为兼容 jQuery 对象)\n Layui.prototype._isArray = Layui.prototype.isArray = function(obj){\n var that = this;\n var len;\n var type = that.type(obj);\n \n if(!obj || (typeof obj !== 'object') || obj === win) return false;\n \n len = 'length' in obj && obj.length; // 兼容 ie\n return type === 'array' || len === 0 || (\n typeof len === 'number' && len > 0 && (len - 1) in obj // 兼容 jQuery 对象\n );\n };\n\n // 遍历\n Layui.prototype.each = function(obj, fn){\n var key;\n var that = this;\n var callFn = function(key, obj){ // 回调\n return fn.call(obj[key], key, obj[key])\n };\n \n if(typeof fn !== 'function') return that;\n obj = obj || [];\n \n // 优先处理数组结构\n if(that.isArray(obj)){\n for(key = 0; key < obj.length; key++){\n if(callFn(key, obj)) break;\n }\n } else {\n for(key in obj){\n if(callFn(key, obj)) break;\n }\n }\n \n return that;\n };\n\n // 将数组中的成员对象按照某个 key 的 value 值进行排序\n Layui.prototype.sort = function(arr, key, desc, notClone){\n var that = this;\n var clone = notClone ? (arr || []) : JSON.parse(\n JSON.stringify(arr || [])\n );\n\n // 若未传入 key,则直接返回原对象\n if(that.type(arr) === 'object' && !key){\n return clone;\n } else if(typeof arr !== 'object'){ // 若 arr 非对象\n return [clone];\n }\n \n // 开始排序\n clone.sort(function(o1, o2){\n var v1 = o1[key];\n var v2 = o2[key];\n \n /*\n * 特殊数据\n * 若比较的成员均非对象\n */\n\n // 若比较的成员均为数字\n if(!isNaN(o1) && !isNaN(o2)) return o1 - o2;\n // 若比较的成员只存在某一个非对象\n if(!isNaN(o1) && isNaN(o2)){\n if(key && typeof o2 === 'object'){\n v1 = o1;\n } else {\n return -1;\n }\n } else if (isNaN(o1) && !isNaN(o2)){\n if(key && typeof o1 === 'object'){\n v2 = o2;\n } else {\n return 1;\n }\n }\n\n /*\n * 正常数据\n * 即成员均为对象,也传入了对比依据: key\n * 若 value 为数字,按「大小」排序;若 value 非数字,则按「字典序」排序\n */\n\n // value 是否为数字\n var isNum = [!isNaN(v1), !isNaN(v2)];\n\n // 若为数字比较\n if(isNum[0] && isNum[1]){\n if(v1 && (!v2 && v2 !== 0)){ // 数字 vs 空\n return 1;\n } else if((!v1 && v1 !== 0) && v2){ // 空 vs 数字\n return -1;\n } else { // 数字 vs 数字\n return v1 - v2;\n }\n }\n \n /**\n * 字典序排序\n */\n \n // 若为非数字比较\n if(!isNum[0] && !isNum[1]){\n // 字典序比较\n if(v1 > v2){\n return 1;\n } else if (v1 < v2) {\n return -1;\n } else {\n return 0;\n }\n }\n \n // 若为混合比较\n if(isNum[0] || !isNum[1]){ // 数字 vs 非数字\n return -1;\n } else if(!isNum[0] || isNum[1]) { // 非数字 vs 数字\n return 1;\n }\n\n });\n\n desc && clone.reverse(); // 倒序\n return clone;\n };\n\n // 阻止事件冒泡\n Layui.prototype.stope = function(thisEvent){\n thisEvent = thisEvent || win.event;\n try { thisEvent.stopPropagation() } catch(e){\n thisEvent.cancelBubble = true;\n }\n };\n \n // 字符常理\n var EV_REMOVE = 'LAYUI-EVENT-REMOVE';\n\n // 自定义模块事件\n Layui.prototype.onevent = function(modName, events, callback){\n if(typeof modName !== 'string' \n || typeof callback !== 'function') return this;\n\n return Layui.event(modName, events, null, callback);\n };\n\n // 执行自定义模块事件\n Layui.prototype.event = Layui.event = function(modName, events, params, fn){\n var that = this;\n var result = null;\n var filter = (events || '').match(/\\((.*)\\)$/)||[]; // 提取事件过滤器字符结构,如:select(xxx)\n var eventName = (modName + '.'+ events).replace(filter[0], ''); // 获取事件名称,如:form.select\n var filterName = filter[1] || ''; // 获取过滤器名称,,如:xxx\n var callback = function(_, item){\n var res = item && item.call(that, params);\n res === false && result === null && (result = false);\n };\n \n // 如果参数传入特定字符,则执行移除事件\n if(params === EV_REMOVE){\n delete (that.cache.event[eventName] || {})[filterName];\n return that;\n }\n \n // 添加事件\n if(fn){\n config.event[eventName] = config.event[eventName] || {};\n\n if (filterName) {\n // 带filter不支持重复事件\n config.event[eventName][filterName] = [fn];\n } else {\n // 不带filter处理的是所有的同类事件,应该支持重复事件\n config.event[eventName][filterName] = config.event[eventName][filterName] || [];\n config.event[eventName][filterName].push(fn);\n }\n return this;\n }\n \n // 执行事件回调\n layui.each(config.event[eventName], function(key, item){\n // 执行当前模块的全部事件\n if(filterName === '{*}'){\n layui.each(item, callback);\n return;\n }\n \n // 执行指定事件\n key === '' && layui.each(item, callback);\n (filterName && key === filterName) && layui.each(item, callback);\n });\n \n return result;\n };\n \n // 新增模块事件\n Layui.prototype.on = function(events, modName, callback){\n var that = this;\n return that.onevent.call(that, modName, events, callback);\n }\n \n // 移除模块事件\n Layui.prototype.off = function(events, modName){\n var that = this;\n return that.event.call(that, modName, events, EV_REMOVE);\n };\n\n // 防抖\n Layui.prototype.debounce = function (func, wait) {\n var timeout;\n return function () {\n var context = this;\n var args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n func.apply(context, args);\n }, wait);\n }\n };\n\n // 节流\n Layui.prototype.throttle = function (func, wait) {\n var cooldown = false;\n return function () {\n var context = this;\n var args = arguments;\n if (!cooldown) {\n func.apply(context, args);\n cooldown = true;\n setTimeout(function () {\n cooldown = false;\n }, wait);\n }\n }\n };\n\n // exports layui\n win.layui = new Layui();\n\n}(window); // gulp build: layui-footer\n\n","/**\n * 用于打包聚合版,该文件不会存在于构建后的目录 \n */\n \nlayui.define(function(exports){\n var cache = layui.cache;\n layui.config({\n dir: cache.dir.replace(/lay\\/dest\\/$/, '')\n });\n exports('layui.all', layui.v);\n});","\r\n/** lay 基础模块 | MIT Licensed */\r\n\r\n;!function(window){ // gulp build: lay-header\r\n \"use strict\";\r\n \r\n var MOD_NAME = 'lay'; // 模块名\r\n var document = window.document;\r\n \r\n /**\r\n * 元素查找\r\n * @param {string | HTMLElement | JQuery} selector \r\n */\r\n var lay = function(selector){ \r\n return new Class(selector);\r\n };\r\n \r\n // 构造器\r\n var Class = function(selector){\r\n var that = this;\r\n var elem = typeof selector === 'object' ? function(){\r\n // 仅适配简单元素对象\r\n return layui.isArray(selector) ? selector : [selector];\r\n }() : (\r\n this.selector = selector,\r\n document.querySelectorAll(selector || null)\r\n );\r\n\r\n lay.each(elem, function(index, item){\r\n that.push(elem[index]);\r\n });\r\n };\r\n\r\n /*\r\n * API 兼容\r\n */\r\n Array.prototype.indexOf = Array.prototype.indexOf || function(searchElement, fromIndex) {\r\n var rst = -1;\r\n fromIndex = fromIndex || 0;\r\n layui.each(this, function(index, val){\r\n if (searchElement === val && index >= fromIndex) {\r\n rst = index;\r\n return !0;\r\n }\r\n });\r\n return rst;\r\n };\r\n \r\n /*\r\n lay 对象操作\r\n */\r\n \r\n Class.fn = Class.prototype = [];\r\n Class.fn.constructor = Class;\r\n\r\n /**\r\n * 将两个或多个对象的内容深度合并到第一个对象中\r\n * @callback ExtendFunc\r\n * @param {*} target - 一个对象\r\n * @param {...*} objectN - 包含额外的属性合并到第一个参数\r\n * @returns {*} 返回合并后的对象\r\n */\r\n /** @type ExtendFunc*/\r\n lay.extend = function(){\r\n var ai = 1;\r\n var length;\r\n var args = arguments;\r\n var clone = function(target, obj){\r\n target = target || (layui.type(obj) === 'array' ? [] : {}); // 目标对象\r\n for(var i in obj){\r\n // 若值为普通对象,则进入递归,继续深度合并\r\n target[i] = (obj[i] && obj[i].constructor === Object)\r\n ? clone(target[i], obj[i])\r\n : obj[i];\r\n }\r\n return target;\r\n };\r\n\r\n args[0] = typeof args[0] === 'object' ? args[0] : {};\r\n length = args.length\r\n\r\n for(; ai < length; ai++){\r\n if(typeof args[ai] === 'object'){\r\n clone(args[0], args[ai]);\r\n }\r\n }\r\n return args[0];\r\n };\r\n \r\n /**\r\n * IE 版本\r\n * @type {string | boolean} - 如果是 IE 返回版本字符串,否则返回 false\r\n */\r\n lay.ie = function(){\r\n var agent = navigator.userAgent.toLowerCase();\r\n return (!!window.ActiveXObject || \"ActiveXObject\" in window) ? (\r\n (agent.match(/msie\\s(\\d+)/) || [])[1] || '11' // 由于 ie11 并没有 msie 的标识\r\n ) : false;\r\n }();\r\n \r\n \r\n /** \r\n * 获取 layui 常见方法,以便用于组件单独版\r\n */\r\n \r\n lay.layui = layui || {};\r\n lay.getPath = layui.cache.dir; // 获取当前 JS 所在目录\r\n lay.stope = layui.stope; // 中止冒泡\r\n lay.each = function(){ // 遍历\r\n layui.each.apply(layui, arguments);\r\n return this;\r\n };\r\n\r\n\r\n /**\r\n * 数字前置补零\r\n * @param {number | string} num - 原始数字\r\n * @param {number} [length=2] - 数字长度,如果原始数字长度小于 length,则前面补零\r\n * @returns {string} 返回补 0 后的数字\r\n * @example\r\n * ```js\r\n * lay.digit(6, 2); // \"06\"\r\n * lay.digit('7', 3); // \"007\"\r\n * ```\r\n */\r\n lay.digit = function(num, length){\r\n if(!(typeof num === 'string' || typeof num === 'number')) return '';\r\n\r\n var str = '';\r\n num = String(num);\r\n length = length || 2;\r\n for(var i = num.length; i < length; i++){\r\n str += '0';\r\n }\r\n return num < Math.pow(10, length) ? str + num : num;\r\n };\r\n \r\n /**\r\n * 创建元素\r\n * @param {string} elemName - 元素的标签名\r\n * @param {{attrName: string, attrValue:string}} [attr] - 添加到元素上的属性\r\n * @returns {HTMLElement} 返回创建的 HTML 元素\r\n * @example\r\n * ```js\r\n * lay.elem('div', {id: 'test'}) //
            \r\n * ```\r\n */\r\n lay.elem = function(elemName, attr){\r\n var elem = document.createElement(elemName);\r\n lay.each(attr || {}, function(key, value){\r\n elem.setAttribute(key, value);\r\n });\r\n return elem;\r\n };\r\n\r\n /**\r\n * 当前页面是否存在滚动条\r\n * @returns {boolean} 是否存在滚动条\r\n * @example \r\n * ```\r\n * lay.hasScrollbar() // true 或 false\r\n * ```\r\n */\r\n lay.hasScrollbar = function(){\r\n return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight);\r\n };\r\n\r\n /**\r\n * 获取 style rules\r\n * @param {HTMLStyleElement} style - HTMLStyle 元素\r\n * @param {(ruleItem: CSSStyleRule, index: number) => boolean} [callback] - 用来返回 style 元素中的每个 `style rule` 的函数,返回 true 终止遍历\r\n * @returns {CSSRuleList } 返回 `style rules`\r\n * @example\r\n * ```\r\n * \r\n * \r\n * lay.getStyleRules($('#test')[0], function(rule, index){\r\n * if(rule.selectorText === '.lay-card'){\r\n * console.log(index, rule.cssText) // 0 '.lay-card{color: #000}'\r\n * rule.style.color = '#EEE';\r\n * return true; // 终止遍历\r\n * }\r\n * }) // RuleList\r\n * ```\r\n */\r\n lay.getStyleRules = function(style, callback) {\r\n if (!style) return;\r\n\r\n var sheet = style.sheet || style.styleSheet || {};\r\n var rules = sheet.cssRules || sheet.rules;\r\n\r\n if (typeof callback === 'function') {\r\n layui.each(rules, function(i, item){\r\n if (callback(item, i)) return true;\r\n });\r\n }\r\n\r\n return rules;\r\n };\r\n\r\n /**\r\n * 创建 style 样式\r\n * @param {Object} options - 可配置的选项\r\n * @param {string | HTMLElement | JQuery} [options.target] - 目标容器,指定后会将样式追加到目标容器\r\n * @param {string} [options.id] - 样式元素的 id,默认自增\r\n * @param {string} options.text - 样式内容\r\n * @returns {HTMLStyleElement} 返回创建的样式元素 \r\n * @example\r\n * ```html\r\n *
            \r\n * \r\n * \r\n *
            \r\n * \r\n * lay.style({\r\n * target: '#targetEl',\r\n * text: '.card{color: #000}'\r\n * }) // \r\n * ```\r\n */\r\n lay.style = function(options){\r\n options = options || {};\r\n\r\n var style = lay.elem('style');\r\n var styleText = options.text || '';\r\n var target = options.target;\r\n \r\n if (!styleText) return;\r\n \r\n // 添加样式\r\n if ('styleSheet' in style) {\r\n style.setAttribute('type', 'text/css');\r\n style.styleSheet.cssText = styleText;\r\n } else {\r\n style.innerHTML = styleText;\r\n }\r\n \r\n // ID\r\n style.id = 'LAY-STYLE-'+ (options.id || function(index) {\r\n lay.style.index++;\r\n return 'DF-'+ index;\r\n }(lay.style.index || 0));\r\n\r\n // 是否向目标容器中追加 style 元素\r\n if (target) {\r\n var styleElem = lay(target).find('#'+ style.id);\r\n styleElem[0] && styleElem.remove();\r\n lay(target).append(style);\r\n }\r\n\r\n return style;\r\n };\r\n \r\n /**\r\n * 将元素定位到指定目标元素附近\r\n * @param {HTMLElement} target - 目标元素\r\n * @param {HTMLElement} elem - 定位元素\r\n * @param {Object} [opts] - 可配置的选项\r\n * @param {'absolute' | 'fixed'} [opts.position] - 元素的定位类型\r\n * @param {'left' | 'right'} [opts.clickType=\"left\"] - 点击类型,默认为 'left',如果 {@link target} 是 document 或 body 元素,则为 'right'\r\n * @param {'left' | 'right' | 'center'} [opts.align=\"left\"] - 对齐方式\r\n * @param {boolean} [opts.allowBottomOut=false] - 顶部没有足够区域显示时,是否允许底部溢出\r\n * @param {string | number} [opts.margin=5] - 边距\r\n * @param {Event} [opts.e] - 事件对象,仅右键生效\r\n * @param {boolean} [opts.SYSTEM_RELOAD] - 是否重载,用于出现滚动条时重新计算位置\r\n * @example\r\n * ```js\r\n * \r\n *
              \r\n *
            • 菜单1
            • \r\n *
            • 菜单2
            • \r\n *
            \r\n * \r\n * // 下拉菜单将被定位到按钮附近\r\n * lay.position(\r\n * $('#targetEl')[0], \r\n * $('#contentEl')[0], \r\n * {\r\n * position: 'fixed', \r\n * align: 'center'\r\n * }\r\n * )\r\n * ```\r\n */\r\n lay.position = function(target, elem, opts){\r\n if(!elem) return;\r\n opts = opts || {};\r\n \r\n // 如果绑定的是 document 或 body 元素,则直接获取鼠标坐标\r\n if(target === document || target === lay('body')[0]){\r\n opts.clickType = 'right';\r\n }\r\n\r\n // 绑定绑定元素的坐标\r\n var rect = opts.clickType === 'right' ? function(){\r\n var e = opts.e || window.event || {};\r\n return {\r\n left: e.clientX,\r\n top: e.clientY,\r\n right: e.clientX,\r\n bottom: e.clientY\r\n }\r\n }() : target.getBoundingClientRect();\r\n var elemWidth = elem.offsetWidth; // 控件的宽度\r\n var elemHeight = elem.offsetHeight; // 控件的高度\r\n \r\n // 滚动条高度\r\n var scrollArea = function(type){\r\n type = type ? 'scrollLeft' : 'scrollTop';\r\n return document.body[type] | document.documentElement[type];\r\n };\r\n \r\n // 窗口宽高\r\n var winArea = function(type){\r\n return document.documentElement[type ? 'clientWidth' : 'clientHeight']\r\n };\r\n var margin = 'margin' in opts ? opts.margin : 5;\r\n var left = rect.left;\r\n var top = rect.bottom;\r\n \r\n // 相对元素居中\r\n if(opts.align === 'center'){\r\n left = left - (elemWidth - target.offsetWidth) / 2;\r\n } else if(opts.align === 'right'){\r\n left = left - elemWidth + target.offsetWidth;\r\n }\r\n\r\n // 判断右侧是否超出边界\r\n if(left + elemWidth + margin > winArea('width')){\r\n left = winArea('width') - elemWidth - margin; // 如果超出右侧,则将面板向右靠齐\r\n }\r\n // 左侧是否超出边界\r\n if(left < margin) left = margin;\r\n \r\n\r\n // 判断底部和顶部是否超出边界\r\n if(rect.bottom + elemHeight + margin > winArea()){ // 底部超出边界\r\n // 优先判断顶部是否有足够区域显示完全,且底部不能超出边界\r\n if(rect.top > elemHeight + margin && rect.top <= winArea() ){\r\n top = rect.top - elemHeight - margin*2; // 顶部有足够的区域显示\r\n } else if(!opts.allowBottomOut){ // 顶部没有足够区域显示时,是否允许底部溢出\r\n top = winArea() - elemHeight - margin*2; // 面板向底部靠齐\r\n if(top < 0) top = 0; // 如果面板底部靠齐时,又溢出窗口顶部,则只能将顶部靠齐\r\n }\r\n }\r\n /*\r\n if(top + elemHeight + margin > winArea()){\r\n // 优先顶部是否有足够区域显示完全\r\n if(rect.top > elemHeight + margin){\r\n top = rect.top - elemHeight - margin*2; // 顶部有足够的区域显示\r\n } else {\r\n // 如果面板是鼠标右键弹出,且顶部没有足够区域显示,则将面板向底部靠齐\r\n if(obj.clickType === 'right'){\r\n top = winArea() - elemHeight - margin*2;\r\n if(top < 0) top = 0; // 不能溢出窗口顶部\r\n } else {\r\n top = margin; // 位置计算逻辑完备性处理\r\n }\r\n }\r\n }\r\n */\r\n \r\n // 定位类型\r\n var position = opts.position;\r\n if(position) elem.style.position = position;\r\n \r\n // 设置坐标\r\n elem.style.left = left + (position === 'fixed' ? 0 : scrollArea(1)) + 'px';\r\n elem.style.top = top + (position === 'fixed' ? 0 : scrollArea()) + 'px';\r\n\r\n // 防止页面无滚动条时,又因为弹出面板而出现滚动条导致的坐标计算偏差\r\n if(!lay.hasScrollbar()){\r\n var rect1 = elem.getBoundingClientRect();\r\n // 如果弹出面板的溢出窗口底部,则表示将出现滚动条,此时需要重新计算坐标\r\n if(!opts.SYSTEM_RELOAD && (rect1.bottom + margin) > winArea()){\r\n opts.SYSTEM_RELOAD = true;\r\n setTimeout(function(){\r\n lay.position(target, elem, opts);\r\n }, 50);\r\n }\r\n }\r\n };\r\n \r\n /**\r\n * 获取元素上的属性配置项\r\n * @param {string | HTMLElement | JQuery} elem - HTML 元素\r\n * @param {{attr: string} | string} [opts=\"lay-options\"] - 可配置的选项,string 类型指定属性名\r\n * @returns {*} 返回元素上的属性配置项\r\n * @example\r\n * ```js\r\n *
            \r\n * \r\n * var elem = $('#testEl')\r\n * lay.options(elem) // {color:red}\r\n * lay.options(elem[0]) // {color:red}\r\n * lay.options('#testEl') // {color:red}\r\n * lay.options('#testEl', {attr: 'lay-toc'}) // {hot: true}\r\n * lay.options('#testEl', 'lay-toc') // {hot: true}\r\n * \r\n * $('#testEl').attr('lay-toc') // '{hot: true}'\r\n * ```\r\n */\r\n lay.options = function(elem, opts){\r\n opts = typeof opts === 'object' ? opts : {attr: opts};\r\n\r\n if(elem === document) return {};\r\n\r\n var othis = lay(elem);\r\n var attrName = opts.attr || 'lay-options';\r\n var attrValue = othis.attr(attrName);\r\n\r\n try {\r\n return new Function('return '+ (attrValue || '{}'))();\r\n } catch(ev) {\r\n layui.hint().error(opts.errorText || [\r\n attrName + '=\"'+ attrValue + '\"', \r\n '\\n parseerror: '+ ev\r\n ].join('\\n'), 'error');\r\n return {};\r\n }\r\n };\r\n \r\n\r\n /**\r\n * 元素是否属于顶级元素(document 或 body)\r\n * @param {HTMLElement} elem - HTML 元素\r\n * @returns {boolean} 是否属于顶级元素\r\n * @example\r\n * ```js\r\n * lay.isTopElem(document) // true\r\n * ```\r\n */\r\n lay.isTopElem = function(elem){\r\n var topElems = [document, lay('body')[0]]\r\n ,matched = false;\r\n lay.each(topElems, function(index, item){\r\n if(item === elem){\r\n return matched = true\r\n }\r\n });\r\n return matched;\r\n };\r\n\r\n // 剪切板\r\n lay.clipboard = {\r\n /**\r\n * 写入文本\r\n * @param {Object} options - 可配置的选项\r\n * @param {string} options.text - 写入剪贴板的文本\r\n * @param {() => void} [options.done] - 写入成功/完成回调\r\n * @param {(err?: any) => void} [options.error] - 写入失败回调\r\n * @example\r\n * ```js\r\n * lay.clipboard.writeText({\r\n * text: '测试文本',\r\n * done: function(){ layer.msg('copied')},\r\n * error: function(){ layer.msg('error')}\r\n * })\r\n * ```\r\n */\r\n writeText: function(options) {\r\n var text = String(options.text);\r\n\r\n try {\r\n navigator.clipboard.writeText(text).then(\r\n options.done\r\n )['catch'](options.error);\r\n } catch(e) {\r\n var elem = document.createElement('textarea');\r\n\r\n elem.value = text;\r\n elem.style.position = 'fixed';\r\n elem.style.opacity = '0';\r\n elem.style.top = '0px';\r\n elem.style.left = '0px';\r\n \r\n document.body.appendChild(elem);\r\n elem.select();\r\n\r\n try {\r\n document.execCommand('copy');\r\n typeof options.done === 'function' && options.done();\r\n } catch(err) {\r\n typeof options.error === 'function' && options.error(err);\r\n } finally {\r\n elem.remove ? elem.remove() : document.body.removeChild(elem);\r\n }\r\n }\r\n }\r\n };\r\n\r\n\r\n /*\r\n * lay 元素操作\r\n */\r\n \r\n\r\n // 追加字符\r\n Class.addStr = function(str, new_str){\r\n str = str.replace(/\\s+/, ' ');\r\n new_str = new_str.replace(/\\s+/, ' ').split(' ');\r\n lay.each(new_str, function(ii, item){\r\n if(!new RegExp('\\\\b'+ item + '\\\\b').test(str)){\r\n str = str + ' ' + item;\r\n }\r\n });\r\n return str.replace(/^\\s|\\s$/, '');\r\n };\r\n \r\n // 移除值\r\n Class.removeStr = function(str, new_str){\r\n str = str.replace(/\\s+/, ' ');\r\n new_str = new_str.replace(/\\s+/, ' ').split(' ');\r\n lay.each(new_str, function(ii, item){\r\n var exp = new RegExp('\\\\b'+ item + '\\\\b')\r\n if(exp.test(str)){\r\n str = str.replace(exp, '');\r\n }\r\n });\r\n return str.replace(/\\s+/, ' ').replace(/^\\s|\\s$/, '');\r\n };\r\n \r\n // 查找子元素\r\n Class.fn.find = function(selector){\r\n var that = this;\r\n var elem = [];\r\n var isObject = typeof selector === 'object';\r\n\r\n this.each(function(i, item){\r\n var children = isObject && item.contains(selector) \r\n ? selector\r\n : item.querySelectorAll(selector || null);\r\n\r\n lay.each(children, function(index, child){\r\n elem.push(child);\r\n });\r\n });\r\n\r\n return lay(elem);\r\n };\r\n \r\n // 元素遍历\r\n Class.fn.each = function(fn){\r\n return lay.each.call(this, this, fn);\r\n };\r\n \r\n // 添加 className\r\n Class.fn.addClass = function(className, type){\r\n return this.each(function(index, item){\r\n item.className = Class[type ? 'removeStr' : 'addStr'](item.className, className)\r\n });\r\n };\r\n \r\n // 移除 className\r\n Class.fn.removeClass = function(className){\r\n return this.addClass(className, true);\r\n };\r\n \r\n // 是否包含 css 类\r\n Class.fn.hasClass = function(className){\r\n var has = false;\r\n this.each(function(index, item){\r\n if(new RegExp('\\\\b'+ className +'\\\\b').test(item.className)){\r\n has = true;\r\n }\r\n });\r\n return has;\r\n };\r\n \r\n // 添加或获取 css style\r\n Class.fn.css = function(key, value){\r\n var that = this;\r\n var parseValue = function(v){\r\n return isNaN(v) ? v : (v +'px');\r\n };\r\n return (typeof key === 'string' && value === undefined) ? function(){\r\n if(that.length > 0) return that[0].style[key];\r\n }() : that.each(function(index, item){\r\n typeof key === 'object' ? lay.each(key, function(thisKey, thisValue){\r\n item.style[thisKey] = parseValue(thisValue);\r\n }) : item.style[key] = parseValue(value);\r\n }); \r\n };\r\n \r\n // 添加或获取宽度\r\n Class.fn.width = function(value){\r\n var that = this;\r\n return value === undefined ? function(){\r\n if(that.length > 0) return that[0].offsetWidth; // 此处还需做兼容\r\n }() : that.each(function(index, item){\r\n that.css('width', value);\r\n }); \r\n };\r\n \r\n // 添加或获取高度\r\n Class.fn.height = function(value){\r\n var that = this;\r\n return value === undefined ? function(){\r\n if(that.length > 0) return that[0].offsetHeight; // 此处还需做兼容\r\n }() : that.each(function(index, item){\r\n that.css('height', value);\r\n }); \r\n };\r\n \r\n // 添加或获取属性\r\n Class.fn.attr = function(key, value){\r\n var that = this;\r\n return value === undefined ? function(){\r\n if(that.length > 0) return that[0].getAttribute(key);\r\n }() : that.each(function(index, item){\r\n item.setAttribute(key, value);\r\n }); \r\n };\r\n \r\n // 移除属性\r\n Class.fn.removeAttr = function(key){\r\n return this.each(function(index, item){\r\n item.removeAttribute(key);\r\n });\r\n };\r\n \r\n // 设置或获取 HTML 内容\r\n Class.fn.html = function(html){\r\n var that = this;\r\n return html === undefined ? function(){\r\n if(that.length > 0) return that[0].innerHTML;\r\n }() : this.each(function(index, item){\r\n item.innerHTML = html;\r\n });\r\n };\r\n \r\n // 设置或获取值\r\n Class.fn.val = function(value){\r\n var that = this;\r\n return value === undefined ? function(){\r\n if(that.length > 0) return that[0].value;\r\n }() : this.each(function(index, item){\r\n item.value = value;\r\n });\r\n };\r\n \r\n // 追加内容\r\n Class.fn.append = function(elem){\r\n return this.each(function(index, item){\r\n typeof elem === 'object' \r\n ? item.appendChild(elem)\r\n : item.innerHTML = item.innerHTML + elem;\r\n });\r\n };\r\n \r\n // 移除内容\r\n Class.fn.remove = function(elem){\r\n return this.each(function(index, item){\r\n elem ? item.removeChild(elem) : item.parentNode.removeChild(item);\r\n });\r\n };\r\n \r\n // 事件绑定\r\n Class.fn.on = function(eventName, fn){\r\n return this.each(function(index, item){\r\n item.attachEvent ? item.attachEvent('on' + eventName, function(e){\r\n e.target = e.srcElement;\r\n fn.call(item, e);\r\n }) : item.addEventListener(eventName, fn, false);\r\n });\r\n };\r\n \r\n // 解除事件\r\n Class.fn.off = function(eventName, fn){\r\n return this.each(function(index, item){\r\n item.detachEvent \r\n ? item.detachEvent('on'+ eventName, fn) \r\n : item.removeEventListener(eventName, fn, false);\r\n });\r\n };\r\n \r\n // export\r\n window.lay = lay;\r\n \r\n // 输出为 layui 模块\r\n if(window.layui && layui.define){\r\n layui.define(function(exports){\r\n exports(MOD_NAME, lay);\r\n });\r\n }\r\n \r\n}(window, window.document); // gulp build: lay-footer\r\n","/**\r\n * laytpl 轻量模板引擎\r\n */\r\n\r\nlayui.define(function(exports){\r\n \"use strict\";\r\n\r\n // 默认属性\r\n var config = {\r\n open: '{{', // 标签符前缀\r\n close: '}}' // 标签符后缀\r\n };\r\n\r\n // 模板工具\r\n var tool = { \r\n escape: function(html){\r\n var exp = /[<\"'>]|&(?=#[a-zA-Z0-9]+)/g;\r\n if(html === undefined || html === null) return '';\r\n \r\n html += '';\r\n if(!exp.test(html)) return html;\r\n\r\n return html.replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&')\r\n .replace(//g, '>')\r\n .replace(/'/g, ''').replace(/\"/g, '"');\r\n }\r\n };\r\n\r\n // 内部方法\r\n var inner = {\r\n exp: function(str){\r\n return new RegExp(str, 'g');\r\n },\r\n // 错误提示\r\n error: function(e, source){\r\n var error = 'Laytpl Error: ';\r\n typeof console === 'object' && console.error(error + e + '\\n'+ (source || ''));\r\n return error + e;\r\n }\r\n };\r\n\r\n // constructor\r\n var Class = function(template, options){\r\n var that = this;\r\n that.config = that.config || {};\r\n that.template = template;\r\n\r\n // 简单属性合并\r\n var extend = function(obj){\r\n for(var i in obj){\r\n that.config[i] = obj[i];\r\n }\r\n };\r\n\r\n extend(config);\r\n extend(options);\r\n };\r\n\r\n // 标签正则\r\n Class.prototype.tagExp = function(type, _, __){\r\n var options = this.config;\r\n var types = [\r\n '#([\\\\s\\\\S])+?', // js 语句\r\n '([^{#}])*?' // 普通字段\r\n ][type || 0];\r\n\r\n return inner.exp((_||'') + options.open + types + options.close + (__||''));\r\n };\r\n\r\n // 模版解析\r\n Class.prototype.parse = function(template, data){\r\n var that = this;\r\n var options = that.config;\r\n var source = template;\r\n var jss = inner.exp('^'+ options.open +'#', '');\r\n var jsse = inner.exp(options.close +'$', '');\r\n\r\n // 模板必须为 string 类型\r\n if(typeof template !== 'string') return template;\r\n \r\n // 正则解析\r\n template = template.replace(/\\s+|\\r|\\t|\\n/g, ' ')\r\n .replace(inner.exp(options.open +'#'), options.open +'# ')\r\n .replace(inner.exp(options.close +'}'), '} '+ options.close).replace(/\\\\/g, '\\\\\\\\')\r\n \r\n // 不匹配指定区域的内容\r\n .replace(inner.exp(options.open + '!(.+?)!' + options.close), function(str){\r\n str = str.replace(inner.exp('^'+ options.open + '!'), '')\r\n .replace(inner.exp('!'+ options.close), '')\r\n .replace(inner.exp(options.open + '|' + options.close), function(tag){\r\n return tag.replace(/(.)/g, '\\\\$1')\r\n });\r\n return str\r\n })\r\n \r\n // 匹配 JS 语法\r\n .replace(/(?=\"|')/g, '\\\\').replace(that.tagExp(), function(str){\r\n str = str.replace(jss, '').replace(jsse, '');\r\n return '\";' + str.replace(/\\\\(.)/g, '$1') + ';view+=\"';\r\n })\r\n \r\n // 匹配普通输出语句\r\n .replace(that.tagExp(1), function(str){\r\n var start = '\"+laytpl.escape(';\r\n if(str.replace(/\\s/g, '') === options.open + options.close){\r\n return '';\r\n }\r\n str = str.replace(inner.exp(options.open + '|' + options.close), '');\r\n if(/^=/.test(str)){\r\n str = str.replace(/^=/, '');\r\n } else if(/^-/.test(str)){\r\n str = str.replace(/^-/, '');\r\n start = '\"+(';\r\n }\r\n return start + str.replace(/\\\\(.)/g, '$1') + ')+\"';\r\n });\r\n \r\n template = '\"use strict\";var view = \"' + template + '\";return view;';\r\n\r\n try {\r\n that.cache = template = new Function('d, laytpl', template);\r\n return template(data, tool);\r\n } catch(e) {\r\n delete that.cache;\r\n return inner.error(e, source);\r\n }\r\n };\r\n\r\n // 数据渲染\r\n Class.prototype.render = function(data, callback){\r\n data = data || {};\r\n\r\n var that = this;\r\n var result = that.cache ? that.cache(data, tool) : that.parse(that.template, data);\r\n \r\n // 返回渲染结果\r\n typeof callback === 'function' && callback(result);\r\n return result;\r\n };\r\n\r\n // 创建实例\r\n var laytpl = function(template, options){\r\n return new Class(template, options);\r\n };\r\n\r\n // 配置全局属性\r\n laytpl.config = function(options){\r\n options = options || {};\r\n for(var i in options){\r\n config[i] = options[i];\r\n }\r\n };\r\n\r\n laytpl.v = '2.0.0';\r\n \r\n // export\r\n exports('laytpl', laytpl);\r\n});","/**\n * laypage 分页组件\n */\n\nlayui.define(function(exports){\n \"use strict\";\n \n var doc = document;\n var id = 'getElementById';\n var tag = 'getElementsByTagName';\n \n // 字符常量\n var MOD_NAME = 'laypage';\n var DISABLED = 'layui-disabled';\n \n // 构造器\n var Class = function(options){\n var that = this;\n that.config = options || {};\n that.config.index = ++laypage.index;\n that.render(true);\n };\n\n // 判断传入的容器类型\n Class.prototype.type = function(){\n var config = this.config;\n if(typeof config.elem === 'object'){\n return config.elem.length === undefined ? 2 : 3;\n }\n };\n\n // 分页视图\n Class.prototype.view = function(){\n var that = this;\n var config = that.config;\n\n // 连续页码个数\n var groups = config.groups = 'groups' in config \n ? (Number(config.groups) || 0)\n : 5; \n \n // 排版\n config.layout = typeof config.layout === 'object' \n ? config.layout \n : ['prev', 'page', 'next'];\n \n config.count = Number(config.count) || 0; // 数据总数\n config.curr = Number(config.curr) || 1; // 当前页\n\n // 每页条数的选择项\n config.limits = typeof config.limits === 'object'\n ? config.limits\n : [10, 20, 30, 40, 50];\n\n // 默认条数\n config.limit = Number(config.limit) || 10;\n \n // 总页数\n config.pages = Math.ceil(config.count/config.limit) || 1;\n \n // 当前页不能超过总页数\n if(config.curr > config.pages){\n config.curr = config.pages;\n } else if(config.curr < 1) { // 当前分页不能小于 1\n config.curr = 1;\n }\n \n // 连续分页个数不能低于 0 且不能大于总页数\n if(groups < 0){\n groups = 1;\n } else if (groups > config.pages){\n groups = config.pages;\n }\n \n config.prev = 'prev' in config ? config.prev : '上一页'; // 上一页文本\n config.next = 'next' in config ? config.next : '下一页'; // 下一页文本\n \n // 计算当前组\n var index = config.pages > groups \n ? Math.ceil( (config.curr + (groups > 1 ? 1 : 0)) / (groups > 0 ? groups : 1) )\n : 1;\n \n // 视图片段\n var views = {\n // 上一页\n prev: function(){\n return config.prev \n ? ''+ config.prev +''\n : '';\n }(),\n \n // 页码\n page: function(){\n var pager = [];\n \n // 数据量为0时,不输出页码\n if(config.count < 1){\n return '';\n }\n \n // 首页\n if(index > 1 && config.first !== false && groups !== 0){\n pager.push(''+ (config.first || 1) +'');\n }\n\n // 计算当前页码组的起始页\n var halve = Math.floor((groups-1)/2) // 页码数等分\n var start = index > 1 ? config.curr - halve : 1;\n var end = index > 1 ? (function(){\n var max = config.curr + (groups - halve - 1);\n return max > config.pages ? config.pages : max;\n }()) : groups;\n \n // 防止最后一组出现“不规定”的连续页码数\n if(end - start < groups - 1){\n start = end - groups + 1;\n }\n\n // 输出左分割符\n if(config.first !== false && start > 2){\n pager.push('')\n }\n \n // 输出连续页码\n for(; start <= end; start++){\n if(start === config.curr){\n // 当前页\n pager.push(''+ start +'');\n } else {\n pager.push(''+ start +'');\n }\n }\n \n // 输出输出右分隔符 & 末页\n if(config.pages > groups && config.pages > end && config.last !== false){\n if(end + 1 < config.pages){\n pager.push('');\n }\n if(groups !== 0){\n pager.push(''+ (config.last || config.pages) +'');\n }\n }\n\n return pager.join('');\n }(),\n \n // 下一页\n next: function(){\n return config.next \n ? ''+ config.next +''\n : '';\n }(),\n \n // 数据总数\n count: '共 '+ config.count +' 条',\n \n // 每页条数\n limit: function(){\n var elemArr = ['';\n }(),\n \n // 刷新当前页\n refresh: [\n '',\n '',\n ''\n ].join(''),\n\n // 跳页区域\n skip: function(){\n var skipText = typeof config.skipText === 'object' ? config.skipText : [\n '到第',\n '页',\n '确定'\n ];\n return [\n ''+ skipText[0],\n '',\n skipText[1]+ '',\n ''\n ].join('');\n }()\n };\n\n return ['
            ',\n function(){\n var plate = [];\n layui.each(config.layout, function(index, item){\n if(views[item]){\n plate.push(views[item])\n }\n });\n return plate.join('');\n }(),\n '
            '].join('');\n };\n\n // 跳页的回调\n Class.prototype.jump = function(elem, isskip){\n if(!elem) return;\n\n var that = this;\n var config = that.config;\n var childs = elem.children;\n var btn = elem[tag]('button')[0];\n var input = elem[tag]('input')[0];\n var select = elem[tag]('select')[0];\n var skip = function(){\n var curr = Number(input.value.replace(/\\s|\\D/g, ''));\n if(curr){\n config.curr = curr;\n that.render();\n }\n };\n \n if(isskip) return skip();\n \n // 页码\n for(var i = 0, len = childs.length; i < len; i++){\n if(childs[i].nodeName.toLowerCase() === 'a'){\n laypage.on(childs[i], 'click', function(){\n var curr = Number(this.getAttribute('data-page'));\n if(curr < 1 || curr > config.pages) return;\n config.curr = curr;\n that.render();\n });\n }\n }\n \n // 条数\n if(select){\n laypage.on(select, 'change', function(){\n var value = this.value;\n if(config.curr*value > config.count){\n config.curr = Math.ceil(config.count/value);\n }\n config.limit = value;\n that.render();\n });\n }\n \n // 确定\n if(btn){\n laypage.on(btn, 'click', function(){\n skip();\n });\n }\n };\n \n // 输入页数字控制\n Class.prototype.skip = function(elem){\n if(!elem) return;\n\n var that = this;\n var input = elem[tag]('input')[0];\n\n if(!input) return;\n\n // 键盘事件\n laypage.on(input, 'keyup', function(e){\n var value = this.value;\n var keyCode = e.keyCode;\n\n if(/^(37|38|39|40)$/.test(keyCode)) return;\n\n if(/\\D/.test(value)){\n this.value = value.replace(/\\D/, '');\n }\n if(keyCode === 13){\n that.jump(elem, true)\n }\n });\n };\n\n // 渲染分页\n Class.prototype.render = function(load){\n var that = this;\n var config = that.config;\n var type = that.type();\n var view = that.view();\n \n if(type === 2){\n config.elem && (config.elem.innerHTML = view);\n } else if(type === 3){\n config.elem.html(view);\n } else {\n if(doc[id](config.elem)){\n doc[id](config.elem).innerHTML = view;\n }\n }\n\n config.jump && config.jump(config, load);\n \n var elem = doc[id]('layui-laypage-' + config.index);\n that.jump(elem);\n \n if(config.hash && !load){\n location.hash = '!'+ config.hash +'='+ config.curr;\n }\n \n that.skip(elem);\n };\n \n // 外部接口\n var laypage = {\n // 分页渲染\n render: function(options){\n var o = new Class(options);\n return o.index;\n },\n index: layui.laypage ? (layui.laypage.index + 10000) : 0,\n on: function(elem, even, fn){\n elem.attachEvent ? elem.attachEvent('on'+ even, function(e){ // for ie\n e.target = e.srcElement;\n fn.call(elem, e);\n }) : elem.addEventListener(even, fn, false);\n return this;\n }\n }\n\n exports(MOD_NAME, laypage);\n});\n","/** laydate 日期与时间控件 | MIT Licensed */\r\n\r\n;!function(window, document){ // gulp build: laydate-header\r\n \"use strict\";\r\n\r\n var isLayui = window.layui && layui.define, ready = {\r\n getPath: (window.lay && lay.getPath) ? lay.getPath : ''\r\n \r\n // 载入 CSS 依赖\r\n ,link: function(href, fn, cssname){\r\n \r\n // 未设置路径,则不主动加载 css\r\n if(!laydate.path) return;\r\n \r\n // 加载 css\r\n if(window.lay && lay.layui){\r\n lay.layui.link(laydate.path + href, fn, cssname);\r\n }\r\n }\r\n };\r\n \r\n // 识别预先可能定义的指定全局对象\r\n var GLOBAL = window.LAYUI_GLOBAL || {};\r\n\r\n // 模块名\r\n var MOD_NAME = 'laydate';\r\n var MOD_ID = 'layui-'+ MOD_NAME +'-id' // 已渲染过的索引标记名\r\n \r\n // 外部调用\r\n var laydate = {\r\n v: '5.5.0' // layDate 版本号\r\n ,config: {\r\n weekStart: 0, // 默认周日一周的开始\r\n } // 全局配置项\r\n ,index: (window.laydate && window.laydate.v) ? 100000 : 0\r\n ,path: GLOBAL.laydate_dir || ready.getPath\r\n \r\n // 设置全局项\r\n ,set: function(options){\r\n var that = this;\r\n that.config = lay.extend({}, that.config, options);\r\n return that;\r\n }\r\n \r\n // 主体 CSS 等待事件\r\n ,ready: function(callback){\r\n var cssname = 'laydate';\r\n var ver = ''\r\n var path = (isLayui ? 'modules/' : '') + 'laydate.css?v='+ laydate.v + ver;\r\n\r\n isLayui ? (\r\n layui['layui.all'] \r\n ? (typeof callback === 'function' && callback()) \r\n : layui.addcss(path, callback, cssname)\r\n ) : ready.link(path, callback, cssname);\r\n\r\n return this;\r\n }\r\n };\r\n \r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id;\r\n \r\n thisModule.that[id] = that; // 记录当前实例对象\r\n\r\n return that.inst = {\r\n // 提示框\r\n hint: function(content){\r\n that.hint.call(that, content);\r\n },\r\n // 重载实例\r\n reload: function(options){\r\n that.reload.call(that, options);\r\n },\r\n config: that.config\r\n };\r\n };\r\n\r\n // 字符常量\r\n var MOD_NAME = 'laydate';\r\n var ELEM = '.layui-laydate';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var DISABLED = 'laydate-disabled';\r\n var LIMIT_YEAR = [100, 200000];\r\n \r\n var ELEM_STATIC = 'layui-laydate-static';\r\n var ELEM_LIST = 'layui-laydate-list';\r\n var ELEM_SELECTED = 'laydate-selected';\r\n var ELEM_HINT = 'layui-laydate-hint';\r\n var ELEM_DAY_NOW = 'laydate-day-now';\r\n var ELEM_PREV = 'laydate-day-prev';\r\n var ELEM_NEXT = 'laydate-day-next';\r\n var ELEM_FOOTER = 'layui-laydate-footer';\r\n var ELEM_SHORTCUT = 'layui-laydate-shortcut';\r\n var ELEM_NOW = '.laydate-btns-now'\r\n var ELEM_CONFIRM = '.laydate-btns-confirm';\r\n var ELEM_TIME_TEXT = 'laydate-time-text';\r\n var ELEM_TIME_BTN = 'laydate-btns-time';\r\n var ELEM_PREVIEW = 'layui-laydate-preview';\r\n var ELEM_MAIN = 'layui-laydate-main';\r\n var ELEM_SHADE = 'layui-laydate-shade';\r\n\r\n // 组件构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++laydate.index;\r\n that.config = lay.extend({}, that.config, laydate.config, options);\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n var elem = lay(options.elem || that.config.elem);\r\n if(elem.length > 1){\r\n lay.each(elem, function(){\r\n laydate.render(lay.extend({}, that.config, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n \r\n // 初始化属性\r\n options = lay.extend(that.config, lay.options(elem[0])); // 继承节点上的属性\r\n\r\n // 若重复执行 render,则视为 reload 处理\r\n if(elem[0] && elem.attr(MOD_ID)){\r\n var newThat = thisModule.getThis(elem.attr(MOD_ID));\r\n if(!newThat) return;\r\n return newThat.reload(options);\r\n }\r\n\r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n options.id = 'id' in options ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n\r\n // 自增索引\r\n options.index = that.index;\r\n \r\n // 初始化\r\n laydate.ready(function(){\r\n that.init();\r\n });\r\n };\r\n \r\n // 日期格式字符\r\n var dateType = 'yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s';\r\n \r\n // 将日期格式字符转换为数组\r\n thisModule.formatArr = function(format){\r\n return (format || '').match(new RegExp(dateType + '|.', 'g')) || []\r\n };\r\n \r\n /*\r\n 组件操作\r\n */\r\n \r\n // 是否闰年\r\n Class.isLeapYear = function(year){\r\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n };\r\n \r\n // 默认配置\r\n Class.prototype.config = {\r\n type: 'date' //控件类型,支持:year/month/date/time/datetime\r\n ,range: false //是否开启范围选择,即双控件\r\n ,format: 'yyyy-MM-dd' //默认日期格式\r\n ,value: null //默认日期,支持传入new Date(),或者符合format参数设定的日期格式字符\r\n ,isInitValue: true //用于控制是否自动向元素填充初始值(需配合 value 参数使用)\r\n ,min: '1900-1-1' //有效最小日期,年月日必须用“-”分割,时分秒必须用“:”分割。注意:它并不是遵循 format 设定的格式。\r\n ,max: '2099-12-31' //有效最大日期,同上\r\n ,trigger: 'click' //呼出控件的事件\r\n ,show: false //是否直接显示,如果设置 true,则默认直接显示控件\r\n ,showBottom: true //是否显示底部栏\r\n ,isPreview: true //是否显示值预览\r\n ,btns: ['clear', 'now', 'confirm'] //右下角显示的按钮,会按照数组顺序排列\r\n ,lang: 'cn' //语言,只支持cn/en,即中文和英文\r\n ,theme: 'default' //主题\r\n ,position: null //控件定位方式定位, 默认absolute,支持:fixed/absolute/static\r\n ,calendar: false //是否开启公历重要节日,仅支持中文版\r\n ,mark: {} //日期备注,如重要事件或活动标记\r\n ,holidays: null // 标注法定节假日或补假上班\r\n ,zIndex: null //控件层叠顺序\r\n ,done: null //控件选择完毕后的回调,点击清空/现在/确定也均会触发\r\n ,change: null //日期时间改变后的回调\r\n ,autoConfirm: true //是否自动确认(日期|年份|月份选择器非range下是否自动确认)\r\n ,shade: 0\r\n };\r\n \r\n //多语言\r\n Class.prototype.lang = function(){\r\n var that = this\r\n ,options = that.config\r\n ,text = {\r\n cn: {\r\n weeks: ['日', '一', '二', '三', '四', '五', '六']\r\n ,time: ['时', '分', '秒']\r\n ,timeTips: '选择时间'\r\n ,startTime: '开始时间'\r\n ,endTime: '结束时间'\r\n ,dateTips: '返回日期'\r\n ,month: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二']\r\n ,tools: {\r\n confirm: '确定'\r\n ,clear: '清空'\r\n ,now: '现在'\r\n }\r\n ,timeout: '结束时间不能早于开始时间
            请重新选择'\r\n ,invalidDate: '不在有效日期或时间范围内'\r\n ,formatError: ['日期格式不合法
            必须遵循下述格式:
            ', '
            已为你重置']\r\n ,preview: '当前选中的结果'\r\n }\r\n ,en: {\r\n weeks: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']\r\n ,time: ['Hours', 'Minutes', 'Seconds']\r\n ,timeTips: 'Select Time'\r\n ,startTime: 'Start Time'\r\n ,endTime: 'End Time'\r\n ,dateTips: 'Select Date'\r\n ,month: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\r\n ,tools: {\r\n confirm: 'Confirm'\r\n ,clear: 'Clear'\r\n ,now: 'Now'\r\n }\r\n ,timeout: 'End time cannot be less than start Time
            Please re-select'\r\n ,invalidDate: 'Invalid date'\r\n ,formatError: ['The date format error
            Must be followed:
            ', '
            It has been reset']\r\n ,preview: 'The selected result'\r\n }\r\n };\r\n return text[options.lang] || text['cn'];\r\n };\r\n\r\n // 重载实例\r\n Class.prototype.reload = function(options){\r\n var that = this;\r\n that.config = lay.extend({}, that.config, options);\r\n that.init();\r\n };\r\n \r\n //初始准备\r\n Class.prototype.init = function(){\r\n var that = this\r\n ,options = that.config\r\n ,isStatic = options.position === 'static'\r\n ,format = {\r\n year: 'yyyy'\r\n ,month: 'yyyy-MM'\r\n ,date: 'yyyy-MM-dd'\r\n ,time: 'HH:mm:ss'\r\n ,datetime: 'yyyy-MM-dd HH:mm:ss'\r\n };\r\n \r\n options.elem = lay(options.elem);\r\n options.eventElem = lay(options.eventElem);\r\n \r\n if(!options.elem[0]) return;\r\n\r\n layui.type(options.theme) !== 'array' && (options.theme = [options.theme]);\r\n // 设置了全面版模式\r\n if (options.fullPanel) {\r\n if (options.type !== 'datetime' || options.range) {\r\n // 目前只支持datetime的全面版\r\n delete options.fullPanel;\r\n }\r\n }\r\n\r\n //日期范围分隔符\r\n that.rangeStr = options.range ? (\r\n typeof options.range === 'string' ? options.range : '-'\r\n ) : '';\r\n\r\n //日期范围的日历面板是否联动\r\n that.rangeLinked = !!(options.range && options.rangeLinked && (options.type === 'date' || options.type === 'datetime'))\r\n\r\n //切换日历联动方式\r\n that.autoCalendarModel = function () {\r\n var state = that.rangeLinked;\r\n that.rangeLinked = (options.range && (options.type === 'date' || options.type === 'datetime'))\r\n && ((!that.startDate || !that.endDate) || (that.startDate && that.endDate && that.startDate.year === that.endDate.year && that.startDate.month === that.endDate.month));\r\n lay(that.elem)[that.rangeLinked ? 'addClass' : 'removeClass']('layui-laydate-linkage');\r\n return that.rangeLinked != state; // 返回发生了变化\r\n };\r\n\r\n //是否自动切换\r\n that.autoCalendarModel.auto = that.rangeLinked && options.rangeLinked === 'auto';\r\n\r\n //若 range 参数为数组,则表示为开始日期和结束日期的 input 对象\r\n if(layui.type(options.range) === 'array'){\r\n that.rangeElem = [\r\n lay(options.range[0]),\r\n lay(options.range[1])\r\n ];\r\n }\r\n \r\n //若 type 设置非法,则初始化为 date 类型\r\n if(!format[options.type]){\r\n window.console && console.error && console.error('laydate type error:\\''+ options.type + '\\' is not supported')\r\n options.type = 'date';\r\n }\r\n \r\n //根据不同 type,初始化默认 format\r\n if(options.format === format.date){\r\n options.format = format[options.type] || format.date;\r\n }\r\n \r\n //将日期格式转化成数组\r\n that.format = thisModule.formatArr(options.format);\r\n\r\n // 设置了一周的开始是周几,此处做一个控制\r\n if (options.weekStart) {\r\n if (!/^[0-6]$/.test(options.weekStart)) {\r\n var lang = that.lang();\r\n options.weekStart = lang.weeks.indexOf(options.weekStart);\r\n if (options.weekStart === -1) options.weekStart = 0;\r\n }\r\n }\r\n\r\n //生成正则表达式\r\n that.EXP_IF = ''; \r\n that.EXP_SPLIT = ''; \r\n lay.each(that.format, function(i, item){\r\n var EXP = new RegExp(dateType).test(item) \r\n ? '\\\\d{'+ function(){\r\n if(new RegExp(dateType).test(that.format[i === 0 ? i + 1 : i - 1]||'')){\r\n if(/^yyyy|y$/.test(item)) return 4;\r\n return item.length;\r\n }\r\n if(/^yyyy$/.test(item)) return '1,4';\r\n if(/^y$/.test(item)) return '1,308';\r\n return '1,2';\r\n }() +'}' \r\n : '\\\\' + item;\r\n that.EXP_IF = that.EXP_IF + EXP;\r\n that.EXP_SPLIT = that.EXP_SPLIT + '(' + EXP + ')';\r\n });\r\n //验证日期格式正则\r\n that.EXP_IF_ONE = new RegExp('^'+ that.EXP_IF +'$'); //验证单个日期格式\r\n that.EXP_IF = new RegExp('^'+ (\r\n options.range ? \r\n that.EXP_IF + '\\\\s\\\\'+ that.rangeStr + '\\\\s' + that.EXP_IF\r\n : that.EXP_IF\r\n ) +'$');\r\n that.EXP_SPLIT = new RegExp('^'+ that.EXP_SPLIT +'$', '');\r\n \r\n //如果不是 input|textarea 元素,则默认采用 click 事件\r\n if(!that.isInput(options.elem[0])){\r\n if(options.trigger === 'focus'){\r\n options.trigger = 'click';\r\n }\r\n }\r\n \r\n // 设置唯一 KEY\r\n options.elem.attr('lay-key', that.index);\r\n options.eventElem.attr('lay-key', that.index);\r\n options.elem.attr(MOD_ID, options.id); // 渲染过的标记\r\n\r\n //记录重要日期\r\n options.mark = lay.extend({}, (options.calendar && options.lang === 'cn') ? {\r\n '0-1-1': '元旦'\r\n ,'0-2-14': '情人'\r\n ,'0-3-8': '妇女'\r\n ,'0-3-12': '植树'\r\n ,'0-4-1': '愚人'\r\n ,'0-5-1': '劳动'\r\n ,'0-5-4': '青年'\r\n ,'0-6-1': '儿童'\r\n ,'0-9-10': '教师'\r\n ,'0-10-1': '国庆'\r\n ,'0-12-25': '圣诞'\r\n } : {}, options.mark);\r\n \r\n //获取限制内日期\r\n lay.each(['min', 'max'], function(i, item){\r\n var ymd = [];\r\n var hms = [];\r\n if(typeof options[item] === 'number'){ //如果为数字\r\n var day = options[item]\r\n ,tDate = new Date()\r\n ,time = that.newDate({ //今天的最大毫秒数\r\n year: tDate.getFullYear()\r\n ,month: tDate.getMonth()\r\n ,date: tDate.getDate()\r\n ,hours: i ? 23 : 0\r\n ,minutes: i ? 59 : 0\r\n ,seconds: i ? 59 : 0\r\n }).getTime() \r\n ,STAMP = 86400000 //代表一天的毫秒数\r\n ,thisDate = new Date(\r\n day ? (\r\n day < STAMP ? time + day*STAMP : day //如果数字小于一天的毫秒数,则数字为天数,否则为毫秒数\r\n ) : time\r\n );\r\n ymd = [thisDate.getFullYear(), thisDate.getMonth() + 1, thisDate.getDate()];\r\n hms = [thisDate.getHours(), thisDate.getMinutes(), thisDate.getSeconds()];\r\n } else if(typeof options[item] === 'string') {\r\n ymd = (options[item].match(/\\d+-\\d+-\\d+/) || [''])[0].split('-');\r\n hms = (options[item].match(/\\d+:\\d+:\\d+/) || [''])[0].split(':');\r\n } else if(typeof options[item] === 'object'){\r\n return options[item];\r\n }\r\n options[item] = {\r\n year: ymd[0] | 0 || new Date().getFullYear()\r\n ,month: ymd[1] ? (ymd[1] | 0) - 1 : new Date().getMonth()\r\n ,date: ymd[2] | 0 || new Date().getDate()\r\n ,hours: hms[0] | 0\r\n ,minutes: hms[1] | 0\r\n ,seconds: hms[2] | 0\r\n };\r\n });\r\n \r\n that.elemID = 'layui-laydate'+ options.elem.attr('lay-key');\r\n \r\n if(options.show || isStatic) that.render();\r\n isStatic || that.events();\r\n \r\n //默认赋值\r\n if(options.value && options.isInitValue){\r\n if(layui.type(options.value) === 'date'){\r\n that.setValue(that.parse(0, that.systemDate(options.value))); \r\n } else {\r\n that.setValue(options.value); \r\n }\r\n }\r\n };\r\n \r\n //控件主体渲染\r\n Class.prototype.render = function(){\r\n var that = this\r\n ,options = that.config\r\n ,lang = that.lang()\r\n ,isStatic = options.position === 'static'\r\n \r\n //主面板\r\n ,elem = that.elem = lay.elem('div', {\r\n id: that.elemID\r\n ,\"class\": [\r\n 'layui-laydate'\r\n ,options.range ? ' layui-laydate-range' : ''\r\n ,that.rangeLinked ? ' layui-laydate-linkage' : ''\r\n ,isStatic ? (' '+ ELEM_STATIC) : ''\r\n ,options.fullPanel ? ' laydate-theme-fullpanel' : '' // 全面版\r\n // ,options.theme && options.theme !== 'default' && !/^#/.test(options.theme) ? (' laydate-theme-' + options.theme) : ''\r\n ,(function () {\r\n var themeStr = '';\r\n lay.each(options.theme, function (index, theme) {\r\n if (theme !== 'default' && !/^#/.test(theme)) {\r\n themeStr += ' laydate-theme-' + theme;\r\n }\r\n })\r\n return themeStr;\r\n })()\r\n ].join('')\r\n })\r\n \r\n //主区域\r\n ,elemMain = that.elemMain = []\r\n ,elemHeader = that.elemHeader = []\r\n ,elemCont = that.elemCont = []\r\n ,elemTable = that.table = []\r\n\r\n //底部区域\r\n ,divFooter = that.footer = lay.elem('div', {\r\n \"class\": ELEM_FOOTER\r\n })\r\n\r\n //快捷栏\r\n ,divShortcut = that.shortcut = lay.elem('ul', {\r\n \"class\": ELEM_SHORTCUT\r\n });\r\n \r\n if(options.zIndex) elem.style.zIndex = options.zIndex;\r\n \r\n //单双日历区域\r\n lay.each(new Array(2), function(i){\r\n if(!options.range && i > 0){\r\n return true;\r\n }\r\n\r\n //头部区域\r\n var divHeader = lay.elem('div', {\r\n \"class\": 'layui-laydate-header'\r\n })\r\n \r\n //左右切换\r\n ,headerChild = [function(){ //上一年\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-prev-y'\r\n });\r\n elem.innerHTML = '';\r\n return elem;\r\n }(), function(){ //上一月\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-prev-m'\r\n });\r\n elem.innerHTML = '';\r\n return elem;\r\n }(), function(){ //年月选择\r\n var elem = lay.elem('div', {\r\n \"class\": 'laydate-set-ym'\r\n }), spanY = lay.elem('span'), spanM = lay.elem('span');\r\n elem.appendChild(spanY);\r\n elem.appendChild(spanM);\r\n return elem;\r\n }(), function(){ //下一月\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-next-m'\r\n });\r\n elem.innerHTML = '';\r\n return elem;\r\n }(), function(){ //下一年\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-next-y'\r\n });\r\n elem.innerHTML = '';\r\n return elem;\r\n }()]\r\n \r\n //日历内容区域\r\n ,divContent = lay.elem('div', {\r\n \"class\": 'layui-laydate-content'\r\n })\r\n ,table = lay.elem('table')\r\n ,thead = lay.elem('thead'), theadTr = lay.elem('tr');\r\n \r\n //生成年月选择\r\n lay.each(headerChild, function(i, item){\r\n divHeader.appendChild(item);\r\n });\r\n \r\n //生成表格\r\n thead.appendChild(theadTr);\r\n lay.each(new Array(6), function(i){ //表体\r\n var tr = table.insertRow(0);\r\n lay.each(new Array(7), function(j){\r\n if(i === 0){\r\n var th = lay.elem('th');\r\n th.innerHTML = lang.weeks[(j + options.weekStart) % 7];\r\n theadTr.appendChild(th);\r\n }\r\n tr.insertCell(j);\r\n });\r\n });\r\n table.insertBefore(thead, table.children[0]); //表头\r\n divContent.appendChild(table);\r\n \r\n elemMain[i] = lay.elem('div', {\r\n \"class\": ELEM_MAIN + ' laydate-main-list-'+ i\r\n });\r\n \r\n elemMain[i].appendChild(divHeader);\r\n elemMain[i].appendChild(divContent);\r\n \r\n elemHeader.push(headerChild);\r\n elemCont.push(divContent);\r\n elemTable.push(table);\r\n });\r\n \r\n //生成底部栏\r\n lay(divFooter).html(function(){\r\n var html = [], btns = [];\r\n if(options.type === 'datetime'){\r\n html.push(''+ lang.timeTips +'');\r\n }\r\n if(!(!options.range && options.type === 'datetime') || options.fullPanel){\r\n html.push('')\r\n }\r\n \r\n lay.each(options.btns, function(i, item){\r\n var title = lang.tools[item] || 'btn';\r\n if(options.range && item === 'now') return;\r\n if(isStatic && item === 'clear') title = options.lang === 'cn' ? '重置' : 'Reset';\r\n btns.push(''+ title +'');\r\n });\r\n html.push('');\r\n return html.join('');\r\n }());\r\n\r\n // 生成快捷键栏\r\n if (options.shortcuts) {\r\n elem.appendChild(divShortcut);\r\n lay(divShortcut).html(function () {\r\n var shortcutBtns = [];\r\n lay.each(options.shortcuts, function (i, item) {\r\n shortcutBtns.push('
          • '+item.text+'
          • ')\r\n })\r\n return shortcutBtns.join('');\r\n }()).find('li').on('click', function (event) {\r\n var btnSetting = options.shortcuts[this.dataset['index']] || {};\r\n var value = (typeof btnSetting.value === 'function'\r\n ? btnSetting.value() \r\n : btnSetting.value) || [];\r\n if (!layui.isArray(value)) {\r\n value = [value];\r\n }\r\n var type = options.type;\r\n lay.each(value, function (i, item) {\r\n var dateTime = [options.dateTime, that.endDate][i];\r\n if (type === 'time' && layui.type(item) !== 'date') {\r\n if (that.EXP_IF.test(item)) {\r\n item = (item.match(that.EXP_SPLIT) || []).slice(1);\r\n lay.extend(dateTime, {hours: item[0] | 0, minutes: item[2] | 0, seconds: item[4] | 0})\r\n }\r\n } else {\r\n lay.extend(dateTime, that.systemDate(layui.type(item) === 'date' ? item : new Date(item)))\r\n }\r\n\r\n if (type === 'time' || type === 'datetime') {\r\n that[['startTime', 'endTime'][i]] = {\r\n hours: dateTime.hours,\r\n minutes: dateTime.minutes,\r\n seconds: dateTime.seconds,\r\n }\r\n }\r\n if (i === 0) { // 第一个值作为startDate\r\n that.startDate = lay.extend({}, dateTime);\r\n } else {\r\n that.endState = true;\r\n }\r\n if (type === 'year' || type === 'month' || type === 'time') {\r\n that.listYM[i] = [dateTime.year, dateTime.month + 1];\r\n } else if (i) {\r\n that.autoCalendarModel.auto && that.autoCalendarModel();\r\n }\r\n });\r\n that.checkDate('limit').calendar(null, null, 'init');\r\n\r\n var timeBtn = lay(that.footer).find('.'+ ELEM_TIME_BTN).removeClass(DISABLED);\r\n timeBtn && timeBtn.attr('lay-type') === 'date' && timeBtn[0].click();\r\n that.done(null, 'change');\r\n\r\n lay(this).addClass(THIS);\r\n\r\n // 自动确认\r\n if(options.position !== 'static'){\r\n that.setValue(that.parse()).done().remove();\r\n }\r\n /*\r\n if (options.position !== 'static' && !options.range && options.autoConfirm) {\r\n if (type === 'date') {\r\n that.choose(lay(elem).find('td.layui-this'))\r\n } else if (type === 'year' || type === 'month') {\r\n if(lay(elemMain[0]).find('.' + ELEM_MAIN + ' li.' + THIS + ':not(.laydate-disabled)')[0]) {\r\n that.setValue(that.parse()).done().remove();\r\n }\r\n }\r\n }\r\n */\r\n })\r\n }\r\n\r\n //插入到主区域\r\n lay.each(elemMain, function(i, main){\r\n elem.appendChild(main);\r\n });\r\n options.showBottom && elem.appendChild(divFooter);\r\n \r\n // 生成自定义主题\r\n var style = lay.elem('style');\r\n var styleText = [];\r\n var colorTheme;\r\n var isPrimaryColor = true;\r\n lay.each(options.theme, function (index, theme) {\r\n // 主色\r\n if(isPrimaryColor && /^#/.test(theme)){\r\n colorTheme = true;\r\n isPrimaryColor = false;\r\n styleText.push([\r\n '#{{id}} .layui-laydate-header{background-color:{{theme}};}',\r\n '#{{id}} li.layui-this,#{{id}} td.layui-this>div{background-color:{{theme}} !important;}',\r\n options.theme.indexOf('circle') !== -1 ? '' : '#{{id}} .layui-this{background-color:{{theme}} !important;}',\r\n '#{{id}} .laydate-day-now{color:{{theme}} !important;}',\r\n '#{{id}} .laydate-day-now:after{border-color:{{theme}} !important;}'\r\n ].join('').replace(/{{id}}/g, that.elemID).replace(/{{theme}}/g, theme));\r\n return;\r\n }\r\n // 第二个自定义颜色作为辅色\r\n if(!isPrimaryColor && /^#/.test(theme)){\r\n styleText.push([\r\n '#{{id}} .laydate-selected>div{background-color:{{theme}} !important;}',\r\n '#{{id}} .laydate-selected:hover>div{background-color:{{theme}} !important;}'\r\n ].join('').replace(/{{id}}/g, that.elemID).replace(/{{theme}}/g, theme));\r\n }\r\n });\r\n //快捷栏样式\r\n if (options.shortcuts && options.range) {\r\n styleText.push('#{{id}}.layui-laydate-range{width: 628px;}'.replace(/{{id}}/g, that.elemID))\r\n }\r\n if (styleText.length) {\r\n styleText = styleText.join('');\r\n if('styleSheet' in style){\r\n style.setAttribute('type', 'text/css');\r\n style.styleSheet.cssText = styleText;\r\n } else {\r\n style.innerHTML = styleText;\r\n }\r\n\r\n colorTheme && lay(elem).addClass('laydate-theme-molv');\r\n elem.appendChild(style);\r\n }\r\n\r\n //移除上一个控件\r\n that.remove(Class.thisElemDate);\r\n\r\n //记录当前执行的实例索引\r\n laydate.thisId = options.id;\r\n\r\n //如果是静态定位,则插入到指定的容器中,否则,插入到body\r\n isStatic ? options.elem.append(elem) : (\r\n document.body.appendChild(elem)\r\n ,that.position() //定位\r\n );\r\n \r\n var shade = options.shade ? ('
            ') : '';\r\n elem.insertAdjacentHTML('beforebegin', shade);\r\n\r\n that.checkDate().calendar(null, 0, 'init'); //初始校验\r\n that.changeEvent(); //日期切换\r\n \r\n Class.thisElemDate = that.elemID;\r\n\r\n that.renderAdditional()\r\n typeof options.ready === 'function' && options.ready(lay.extend({}, options.dateTime, {\r\n month: options.dateTime.month + 1\r\n }));\r\n \r\n that.preview();\r\n };\r\n \r\n //控件移除\r\n Class.prototype.remove = function(prev){\r\n var that = this\r\n ,options = that.config\r\n ,elem = lay('#'+ (prev || that.elemID));\r\n if(!elem[0]) return that;\r\n \r\n if(!elem.hasClass(ELEM_STATIC)){\r\n that.checkDate(function(){\r\n elem.remove();\r\n //delete options.dateTime;\r\n delete that.startDate;\r\n delete that.endDate;\r\n delete that.endState;\r\n delete that.startTime;\r\n delete that.endTime;\r\n delete laydate.thisId;\r\n typeof options.close === 'function' && options.close(that);\r\n });\r\n }\r\n lay('.' + ELEM_SHADE).remove();\r\n return that;\r\n };\r\n \r\n //定位算法\r\n Class.prototype.position = function(){\r\n var that = this\r\n ,options = that.config;\r\n lay.position(options.elem[0], that.elem, {\r\n position: options.position\r\n });\r\n return that;\r\n };\r\n \r\n // 提示\r\n Class.prototype.hint = function(opts){\r\n var that = this;\r\n var options = that.config;\r\n var div = lay.elem('div', {\r\n \"class\": ELEM_HINT\r\n });\r\n \r\n if(!that.elem) return;\r\n\r\n // 兼容旧版参数\r\n if(typeof opts === 'object'){\r\n opts = opts || {};\r\n } else {\r\n opts = {\r\n content: opts\r\n }\r\n }\r\n \r\n div.innerHTML = opts.content || '';\r\n lay(that.elem).find('.'+ ELEM_HINT).remove();\r\n that.elem.appendChild(div);\r\n\r\n clearTimeout(that.hinTimer);\r\n that.hinTimer = setTimeout(function(){\r\n lay(that.elem).find('.'+ ELEM_HINT).remove();\r\n }, 'ms' in opts ? opts.ms : 3000);\r\n };\r\n \r\n //获取递增/减后的年月\r\n Class.prototype.getAsYM = function(Y, M, type){\r\n type ? M-- : M++;\r\n if(M < 0){\r\n M = 11;\r\n Y--;\r\n }\r\n if(M > 11){\r\n M = 0;\r\n Y++;\r\n }\r\n return [Y, M];\r\n };\r\n \r\n //系统日期\r\n Class.prototype.systemDate = function(newDate){\r\n var thisDate = newDate || new Date();\r\n return {\r\n year: thisDate.getFullYear() //年\r\n ,month: thisDate.getMonth() //月\r\n ,date: thisDate.getDate() //日\r\n ,hours: newDate ? newDate.getHours() : 0 //时\r\n ,minutes: newDate ? newDate.getMinutes() : 0 //分\r\n ,seconds: newDate ? newDate.getSeconds() : 0 //秒\r\n }\r\n };\r\n \r\n //日期校验\r\n Class.prototype.checkDate = function(fn){\r\n var that = this\r\n ,thisDate = new Date()\r\n ,options = that.config\r\n ,lang = that.lang()\r\n ,dateTime = options.dateTime = options.dateTime || that.systemDate()\r\n ,thisMaxDate, error\r\n \r\n ,elem = options.elem[0]\r\n ,valType = that.isInput(elem) ? 'val' : 'html'\r\n ,value = function(){\r\n //如果传入了开始和结束日期的 input 对象,则将其拼接为日期范围字符\r\n if(that.rangeElem){\r\n var vals = [that.rangeElem[0].val(), that.rangeElem[1].val()];\r\n\r\n if(vals[0] && vals[1]){\r\n return vals.join(' ' + that.rangeStr + ' ');\r\n }\r\n }\r\n return that.isInput(elem) \r\n ? elem.value \r\n : (options.position === 'static' ? '' : lay(elem).attr('lay-date'));\r\n }()\r\n \r\n //校验日期有效数字\r\n ,checkValid = function(dateTime){\r\n if (!dateTime) {\r\n return;\r\n }\r\n if(dateTime.year > LIMIT_YEAR[1]) dateTime.year = LIMIT_YEAR[1], error = true; //不能超过20万年\r\n if(dateTime.month > 11) dateTime.month = 11, error = true;\r\n if(dateTime.seconds > 59) dateTime.seconds = 0, dateTime.minutes++, error = true;\r\n if(dateTime.minutes > 59) dateTime.minutes = 0, dateTime.hours++, error = true;\r\n if(dateTime.hours > 23) dateTime.hours = 0, error = true;\r\n\r\n //计算当前月的最后一天\r\n thisMaxDate = laydate.getEndDate(dateTime.month + 1, dateTime.year);\r\n if(dateTime.date > thisMaxDate) dateTime.date = thisMaxDate, error = true;\r\n }\r\n \r\n //获得初始化日期值\r\n ,initDate = function(dateTime, value, index){\r\n var startEnd = ['startTime', 'endTime'];\r\n value = (value.match(that.EXP_SPLIT) || []).slice(1);\r\n index = index || 0;\r\n \r\n if(options.range){\r\n that[startEnd[index]] = that[startEnd[index]] || {};\r\n }\r\n lay.each(that.format, function(i, item){\r\n var thisv = parseFloat(value[i]);\r\n if(value[i].length < item.length) error = true;\r\n if(/yyyy|y/.test(item)){ //年\r\n if(thisv < LIMIT_YEAR[0]) thisv = LIMIT_YEAR[0], error = true; //年不能低于100年\r\n dateTime.year = thisv;\r\n } else if(/MM|M/.test(item)){ //月\r\n if(thisv < 1) thisv = 1, error = true;\r\n dateTime.month = thisv - 1;\r\n } else if(/dd|d/.test(item)){ //日\r\n if(thisv < 1) thisv = 1, error = true;\r\n dateTime.date = thisv;\r\n } else if(/HH|H/.test(item)){ //时\r\n if (thisv < 0) thisv = 0, error = true;\r\n if (thisv > 23) thisv = 23, error = true;\r\n dateTime.hours = thisv;\r\n options.range && (that[startEnd[index]].hours = thisv);\r\n } else if(/mm|m/.test(item)){ //分\r\n if (thisv < 0) thisv = 0, error = true;\r\n if (thisv > 59) thisv = 59, error = true;\r\n dateTime.minutes = thisv;\r\n options.range && (that[startEnd[index]].minutes = thisv);\r\n } else if(/ss|s/.test(item)){ //秒\r\n if (thisv < 0) thisv = 0, error = true;\r\n if (thisv > 59) thisv = 59, error = true;\r\n dateTime.seconds = thisv;\r\n options.range && (that[startEnd[index]].seconds = thisv);\r\n }\r\n });\r\n checkValid(dateTime);\r\n };\r\n \r\n if(fn === 'limit') {\r\n if (options.range) {\r\n checkValid(that.rangeLinked ? that.startDate : dateTime); // 校验开始时间\r\n that.endDate && checkValid(that.endDate); // 校验结束时间\r\n } else {\r\n checkValid(dateTime);\r\n }\r\n return that;\r\n }\r\n \r\n value = value || options.value;\r\n if(typeof value === 'string'){\r\n value = value.replace(/\\s+/g, ' ').replace(/^\\s|\\s$/g, '');\r\n }\r\n\r\n //如果开启范围,则计算结束日期\r\n var getEndDate = function(){\r\n if(options.range){\r\n that.endDate = that.endDate || lay.extend({}, options.dateTime, function(){\r\n var obj = {}\r\n ,dateTime = options.dateTime\r\n ,EYM = that.getAsYM(dateTime.year, dateTime.month);\r\n \r\n //初始右侧面板的年月\r\n if(options.type === 'year'){\r\n obj.year = dateTime.year + 1;\r\n } else if(options.type !== 'time'){\r\n obj.year = EYM[0];\r\n obj.month = EYM[1];\r\n }\r\n \r\n //初始右侧面板的时间\r\n if(options.type === 'datetime' || options.type === 'time'){\r\n obj.hours = 23;\r\n obj.minutes = obj.seconds = 59;\r\n }\r\n \r\n return obj;\r\n }());\r\n }\r\n };\r\n getEndDate();\r\n \r\n if(typeof value === 'string' && value){\r\n if(that.EXP_IF.test(value)){ //校验日期格式\r\n if(options.range){\r\n value = value.split(' '+ that.rangeStr +' ');\r\n lay.each([options.dateTime, that.endDate], function(i, item){\r\n initDate(item, value[i], i);\r\n });\r\n } else {\r\n initDate(dateTime, value);\r\n }\r\n } else {\r\n //格式不合法\r\n that.hint(lang.formatError[0] + (\r\n options.range ? (options.format + ' '+ that.rangeStr +' ' + options.format) : options.format\r\n ) + lang.formatError[1]);\r\n error = true;\r\n }\r\n } else if(value && layui.type(value) === 'date'){ //若值为日期对象\r\n options.dateTime = that.systemDate(value);\r\n } else {\r\n //重置开始日期\r\n options.dateTime = that.systemDate();\r\n delete that.startTime;\r\n \r\n //重置结束日期\r\n delete that.endDate; //删除原有的结束日期\r\n getEndDate(); //并重新获得新的结束日期\r\n delete that.endTime;\r\n }\r\n \r\n //从日期范围表单中获取初始值\r\n (function(){\r\n if(that.rangeElem){\r\n var vals = [that.rangeElem[0].val(), that.rangeElem[1].val()]\r\n ,arrDate = [options.dateTime, that.endDate];\r\n lay.each(vals, function(_i, _v){\r\n if(that.EXP_IF_ONE.test(_v)){ //校验日期格式\r\n initDate(arrDate[_i], _v, _i);\r\n }\r\n });\r\n }\r\n })();\r\n \r\n // 校验日期有效数字\r\n checkValid(dateTime);\r\n if(options.range) checkValid(that.endDate);\r\n\r\n // 如果初始值格式错误,则纠正初始值\r\n if(error && value){\r\n that.setValue(\r\n options.range ? (that.endDate ? that.parse() : '') : that.parse()\r\n );\r\n }\r\n \r\n //如果当前日期不在设定的最大小日期区间,则自动纠正在可选区域\r\n //校验主面板是否在可选日期区间\r\n var minMaxError;\r\n if(that.getDateTime(dateTime) > that.getDateTime(options.max)){ //若超出最大日期\r\n dateTime = options.dateTime = lay.extend({}, options.max);\r\n minMaxError = true;\r\n } else if(that.getDateTime(dateTime) < that.getDateTime(options.min)){ //若少于最小日期\r\n dateTime = options.dateTime = lay.extend({}, options.min);\r\n minMaxError = true;\r\n }\r\n \r\n //校验右侧面板是否在可选日期区间\r\n if(options.range){\r\n if(that.getDateTime(that.endDate) < that.getDateTime(options.min) || that.getDateTime(that.endDate) > that.getDateTime(options.max)){\r\n that.endDate = lay.extend({}, options.max);\r\n minMaxError = true;\r\n }\r\n // 有时间范围的情况下初始化startTime和endTime\r\n that.startTime = {\r\n hours: options.dateTime.hours,\r\n minutes: options.dateTime.minutes,\r\n seconds: options.dateTime.seconds,\r\n }\r\n that.endTime = {\r\n hours: that.endDate.hours,\r\n minutes: that.endDate.minutes,\r\n seconds: that.endDate.seconds,\r\n }\r\n // 如果是年月范围,将对应的日期统一成当月的1日进行比较,避免出现同一个月但是开始日期大于结束日期的情况\r\n if (options.type === 'month') {\r\n options.dateTime.date = 1;\r\n that.endDate.date = 1;\r\n }\r\n }\r\n\r\n // 初始值不在最大最小范围内\r\n if(minMaxError && value){\r\n that.setValue(that.parse());\r\n that.hint('value ' + lang.invalidDate + lang.formatError[1]);\r\n }\r\n\r\n // 初始赋值 startDate,endState\r\n that.startDate = that.startDate || value && lay.extend({}, options.dateTime); // 有默认值才初始化startDate\r\n that.autoCalendarModel.auto && that.autoCalendarModel();\r\n that.endState = !options.range || !that.rangeLinked || !!(that.startDate && that.endDate); // 初始化选中范围状态\r\n\r\n fn && fn();\r\n return that;\r\n };\r\n \r\n // 公历重要日期与自定义备注\r\n Class.prototype.mark = function(td, YMD){\r\n var that = this\r\n ,mark, options = that.config;\r\n lay.each(options.mark, function(key, title){\r\n var keys = key.split('-');\r\n if((keys[0] == YMD[0] || keys[0] == 0) //每年的每月\r\n && (keys[1] == YMD[1] || keys[1] == 0) //每月的每日\r\n && keys[2] == YMD[2]){ //特定日\r\n mark = title || YMD[2];\r\n }\r\n });\r\n mark && td.find('div').html(''+ mark +'');\r\n \r\n return that;\r\n };\r\n\r\n // 标注法定节假日或补假上班\r\n Class.prototype.holidays = function(td, YMD) {\r\n var that = this;\r\n var options = that.config;\r\n var type = ['', 'work'];\r\n\r\n if(layui.type(options.holidays) !== 'array') return that;\r\n \r\n lay.each(options.holidays, function(idx, item) {\r\n lay.each(item, function(i, dayStr) {\r\n if(dayStr === td.attr('lay-ymd')){\r\n td.find('div').html('' + YMD[2] + '');\r\n }\r\n });\r\n });\r\n\r\n return that;\r\n };\r\n \r\n // 无效日期范围的标记\r\n Class.prototype.limit = function(opts){\r\n opts = opts || {};\r\n\r\n var that = this;\r\n var options = that.config;\r\n var timestamp = {}\r\n var dateTime = opts.index > (opts.time ? 0 : 41) ? that.endDate : options.dateTime;\r\n var isOut;\r\n\r\n lay.each({\r\n now: lay.extend({}, dateTime, opts.date || {})\r\n ,min: options.min\r\n ,max: options.max\r\n }, function(key, item){\r\n timestamp[key] = that.newDate(lay.extend({\r\n year: item.year\r\n ,month: opts.type === 'year' ? 0 : item.month // 年份的时候只比较年\r\n ,date: (opts.type === 'year' || opts.type === 'month') ? 1 : item.date // 年月只比较年月不与最大最小比日期\r\n }, function(){\r\n var hms = {};\r\n lay.each(opts.time, function(i, keys){\r\n hms[keys] = item[keys];\r\n });\r\n return hms;\r\n }())).getTime(); //time:是否比较时分秒\r\n });\r\n \r\n isOut = timestamp.now < timestamp.min || timestamp.now > timestamp.max;\r\n opts.elem && opts.elem[isOut ? 'addClass' : 'removeClass'](DISABLED);\r\n\r\n return isOut;\r\n };\r\n \r\n //当前日期对象\r\n Class.prototype.thisDateTime = function(index){\r\n var that = this\r\n ,options = that.config;\r\n return index ? that.endDate: options.dateTime;\r\n };\r\n \r\n //日历表\r\n Class.prototype.calendar = function(value, index, type){\r\n index = index ? 1 : 0;\r\n var that = this\r\n ,options = that.config\r\n ,dateTime = value || that.thisDateTime(index)\r\n ,thisDate = new Date(), startWeek, prevMaxDate, thisMaxDate\r\n ,lang = that.lang()\r\n \r\n ,isAlone = options.type !== 'date' && options.type !== 'datetime'\r\n ,tds = lay(that.table[index]).find('td')\r\n ,elemYM = lay(that.elemHeader[index][2]).find('span');\r\n \r\n if(dateTime.year < LIMIT_YEAR[0]) dateTime.year = LIMIT_YEAR[0], that.hint(lang.invalidDate);\r\n if(dateTime.year > LIMIT_YEAR[1]) dateTime.year = LIMIT_YEAR[1], that.hint(lang.invalidDate);\r\n \r\n //记录初始值\r\n if(!that.firstDate){\r\n that.firstDate = lay.extend({}, dateTime);\r\n }\r\n \r\n //计算当前月第一天的星期\r\n thisDate.setFullYear(dateTime.year, dateTime.month, 1);\r\n startWeek = (thisDate.getDay() + (7 - options.weekStart)) % 7;\r\n\r\n prevMaxDate = laydate.getEndDate(dateTime.month || 12, dateTime.year); //计算上个月的最后一天\r\n thisMaxDate = laydate.getEndDate(dateTime.month + 1, dateTime.year); //计算当前月的最后一天\r\n \r\n //赋值日\r\n lay.each(tds, function(index_, item){\r\n var YMD = [dateTime.year, dateTime.month], st;\r\n item = lay(item);\r\n item.removeAttr(\"class\");\r\n if(index_ < startWeek){\r\n st = prevMaxDate - startWeek + index_;\r\n item.addClass('laydate-day-prev');\r\n YMD = that.getAsYM(dateTime.year, dateTime.month, 'sub');\r\n } else if(index_ >= startWeek && index_ < thisMaxDate + startWeek){\r\n st = index_ - startWeek;\r\n if (!that.rangeLinked) {\r\n st + 1 === dateTime.date && item.addClass(THIS);\r\n }\r\n } else {\r\n st = index_ - thisMaxDate - startWeek;\r\n item.addClass('laydate-day-next');\r\n YMD = that.getAsYM(dateTime.year, dateTime.month);\r\n }\r\n YMD[1]++;\r\n YMD[2] = st + 1;\r\n item.attr('lay-ymd', YMD.join('-')).html('
            ' + YMD[2] + '
            ');\r\n that.mark(item, YMD).holidays(item, YMD).limit({\r\n elem: item,\r\n date: {\r\n year: YMD[0],\r\n month: YMD[1] - 1,\r\n date: YMD[2]\r\n },\r\n index: index_\r\n });\r\n }); \r\n \r\n //同步头部年月\r\n lay(elemYM[0]).attr('lay-ym', dateTime.year + '-' + (dateTime.month + 1));\r\n lay(elemYM[1]).attr('lay-ym', dateTime.year + '-' + (dateTime.month + 1));\r\n \r\n if(options.lang === 'cn'){\r\n lay(elemYM[0]).attr('lay-type', 'year').html(dateTime.year + ' 年')\r\n lay(elemYM[1]).attr('lay-type', 'month').html((dateTime.month + 1) + ' 月');\r\n } else {\r\n lay(elemYM[0]).attr('lay-type', 'month').html(lang.month[dateTime.month]);\r\n lay(elemYM[1]).attr('lay-type', 'year').html(dateTime.year);\r\n }\r\n\r\n //初始默认选择器\r\n if(isAlone){ //年、月等独立选择器\r\n if(options.range){\r\n if(value || type !== 'init'){ // 判断是否需要显示年月时间列表\r\n that.listYM = [\r\n [(that.startDate || options.dateTime).year, (that.startDate || options.dateTime).month + 1]\r\n ,[that.endDate.year, that.endDate.month + 1]\r\n ]; \r\n that.list(options.type, 0).list(options.type, 1);\r\n \r\n //同步按钮可点状态\r\n options.type === 'time' ? that.setBtnStatus('时间'\r\n ,lay.extend({}, that.systemDate(), that.startTime)\r\n ,lay.extend({}, that.systemDate(), that.endTime)\r\n ) : that.setBtnStatus(true);\r\n } \r\n } else {\r\n that.listYM = [[dateTime.year, dateTime.month + 1]];\r\n that.list(options.type, 0);\r\n }\r\n }\r\n \r\n //初始赋值双日历\r\n if(options.range && type === 'init'){\r\n //执行渲染第二个日历\r\n if (that.rangeLinked) {\r\n var EYM = that.getAsYM(dateTime.year, dateTime.month, index ? 'sub' : null)\r\n that.calendar(lay.extend({}, dateTime, {\r\n year: EYM[0]\r\n ,month: EYM[1]\r\n }), 1 - index); // 渲染另外一个\r\n } else {\r\n that.calendar(null, 1 - index);\r\n }\r\n }\r\n \r\n // 通过检测当前有效日期,来设定底部按钮状态\r\n if(!options.range){\r\n var timeParams = ['hours', 'minutes', 'seconds'];\r\n\r\n // 现在按钮\r\n that.limit({\r\n elem: lay(that.footer).find(ELEM_NOW),\r\n date: that.systemDate(/^(datetime|time)$/.test(options.type) ? new Date() : null),\r\n index: 0,\r\n time: timeParams\r\n });\r\n // 确认按钮\r\n that.limit({\r\n elem: lay(that.footer).find(ELEM_CONFIRM),\r\n index: 0,\r\n time: timeParams\r\n });\r\n }\r\n \r\n //同步按钮可点状态\r\n that.setBtnStatus();\r\n\r\n // 重置快捷栏选中状态\r\n lay(that.shortcut).find('li.' + THIS).removeClass(THIS);\r\n\r\n //标记选择范围\r\n if(options.range && !isAlone && type !== 'init') that.stampRange();\r\n\r\n return that;\r\n };\r\n\r\n //生成年月时分秒列表\r\n Class.prototype.list = function(type, index){\r\n var that = this\r\n ,options = that.config\r\n ,dateTime = that.rangeLinked ? options.dateTime : [options.dateTime, that.endDate][index]\r\n ,lang = that.lang()\r\n ,isAlone = options.range && options.type !== 'date' && options.type !== 'datetime' //独立范围选择器\r\n \r\n ,ul = lay.elem('ul', {\r\n \"class\": ELEM_LIST + ' ' + ({\r\n year: 'laydate-year-list'\r\n ,month: 'laydate-month-list'\r\n ,time: 'laydate-time-list'\r\n })[type]\r\n })\r\n ,elemHeader = that.elemHeader[index]\r\n ,elemYM = lay(elemHeader[2]).find('span')\r\n ,elemCont = that.elemCont[index || 0]\r\n ,haveList = lay(elemCont).find('.'+ ELEM_LIST)[0]\r\n ,isCN = options.lang === 'cn'\r\n ,text = isCN ? '年' : ''\r\n \r\n ,listYM = that.listYM[index] || {}\r\n ,hms = ['hours', 'minutes', 'seconds']\r\n ,startEnd = ['startTime', 'endTime'][index];\r\n\r\n if(listYM[0] < 1) listYM[0] = 1;\r\n \r\n //生成年列表\r\n if(type === 'year'){\r\n var yearNum, startY = yearNum = listYM[0] - 7;\r\n if(startY < 1) startY = yearNum = 1;\r\n lay.each(new Array(15), function(i){\r\n var li = lay.elem('li', {\r\n 'lay-ym': yearNum\r\n })\r\n ,ymd = {\r\n year: yearNum\r\n ,month: 0\r\n ,date: 1\r\n };\r\n\r\n yearNum == listYM[0] && lay(li).addClass(THIS);\r\n li.innerHTML = yearNum + text;\r\n ul.appendChild(li);\r\n\r\n /*\r\n if(yearNum < that.firstDate.year){\r\n ymd.month = options.min.month;\r\n ymd.date = options.min.date;\r\n } else if(yearNum >= that.firstDate.year){\r\n ymd.month = options.max.month;\r\n ymd.date = options.max.date;\r\n }\r\n */\r\n\r\n that.limit({\r\n elem: lay(li),\r\n date: ymd,\r\n index: index,\r\n type: type\r\n });\r\n yearNum++;\r\n });\r\n\r\n lay(elemYM[isCN ? 0 : 1]).attr('lay-ym', (yearNum - 8) + '-' + listYM[1])\r\n .html((startY + text) + ' - ' + (yearNum - 1 + text));\r\n }\r\n \r\n //生成月列表\r\n else if(type === 'month'){\r\n lay.each(new Array(12), function(i){\r\n var li = lay.elem('li', {\r\n 'lay-ym': i\r\n })\r\n ,ymd = {\r\n year: listYM[0]\r\n ,month: i\r\n ,date: 1\r\n };\r\n\r\n i + 1 == listYM[1] && lay(li).addClass(THIS);\r\n li.innerHTML = lang.month[i] + (isCN ? '月' : '');\r\n ul.appendChild(li);\r\n\r\n /*\r\n if(listYM[0] < that.firstDate.year){\r\n ymd.date = options.min.date;\r\n } else if(listYM[0] >= that.firstDate.year){\r\n ymd.date = options.max.date;\r\n }\r\n */\r\n\r\n that.limit({\r\n elem: lay(li),\r\n date: ymd,\r\n index: index,\r\n type: type\r\n });\r\n });\r\n\r\n lay(elemYM[isCN ? 0 : 1]).attr('lay-ym', listYM[0] + '-' + listYM[1])\r\n .html(listYM[0] + text);\r\n } \r\n \r\n //生成时间列表\r\n else if(type === 'time'){\r\n //检测时分秒状态是否在有效日期时间范围内\r\n var setTimeStatus = function(){\r\n lay(ul).find('ol').each(function(i, ol){\r\n lay(ol).find('li').each(function(ii, li){\r\n that.limit({\r\n elem: lay(li),\r\n date: [{\r\n hours: ii\r\n }, {\r\n hours: that[startEnd].hours\r\n ,minutes: ii\r\n }, {\r\n hours: that[startEnd].hours\r\n ,minutes: that[startEnd].minutes\r\n ,seconds: ii\r\n }][i],\r\n index: index,\r\n time: [\r\n ['hours'], \r\n ['hours', 'minutes'], \r\n ['hours', 'minutes', 'seconds']\r\n ][i]\r\n });\r\n });\r\n });\r\n if(!options.range){\r\n that.limit({\r\n elem: lay(that.footer).find(ELEM_CONFIRM),\r\n date: that[startEnd],\r\n inedx: 0,\r\n time: ['hours', 'minutes', 'seconds']\r\n });\r\n }\r\n };\r\n \r\n //初始化时间对象\r\n if(options.range){\r\n if(!that[startEnd]){\r\n that[startEnd] = startEnd === 'startTime' ? dateTime : that.endDate;\r\n }\r\n } else {\r\n that[startEnd] = dateTime;\r\n }\r\n \r\n //生成时分秒\r\n lay.each([24, 60, 60], function(i, item){\r\n var li = lay.elem('li'), childUL = ['

            '+ lang.time[i] +'

              '];\r\n lay.each(new Array(item), function(ii){\r\n childUL.push(''+ lay.digit(ii, 2) +'');\r\n });\r\n li.innerHTML = childUL.join('') + '
            ';\r\n ul.appendChild(li);\r\n });\r\n setTimeStatus();\r\n }\r\n \r\n //插入容器\r\n if(haveList) elemCont.removeChild(haveList);\r\n elemCont.appendChild(ul);\r\n \r\n //年月面板 - 选择事件\r\n if(type === 'year' || type === 'month'){ \r\n //显示切换箭头\r\n lay(that.elemMain[index]).addClass('laydate-ym-show');\r\n \r\n //选中\r\n lay(ul).find('li').on('click', function(){\r\n var ym = lay(this).attr('lay-ym') | 0;\r\n if(lay(this).hasClass(DISABLED)) return;\r\n if (that.rangeLinked) {\r\n lay.extend(dateTime, {\r\n year: type === 'year' ? ym : listYM[0]\r\n ,month: type === 'year' ? listYM[1] - 1 : ym\r\n });\r\n } else {\r\n dateTime[type] = ym;\r\n }\r\n \r\n //当为年选择器或者年月选择器\r\n var isYearOrMonth = options.type === 'year' || options.type === 'month';\r\n if(isYearOrMonth){\r\n lay(ul).find('.'+ THIS).removeClass(THIS);\r\n lay(this).addClass(THIS);\r\n \r\n //如果为年月选择器,点击了年列表,则切换到月选择器\r\n if(options.type === 'month' && type === 'year'){\r\n that.listYM[index][0] = ym;\r\n isAlone && ((index ? that.endDate : dateTime).year = ym);\r\n that.list('month', index);\r\n }\r\n } else {\r\n that.checkDate('limit').calendar(dateTime, index, 'init'); // 重新渲染一下两个面板\r\n that.closeList();\r\n }\r\n\r\n that.setBtnStatus(); //同步按钮可点状态\r\n \r\n //若为月选择器,只有当选择月份时才自动关闭;\r\n //若为年选择器,选择年份即自动关闭\r\n //且在范围未开启时\r\n if(!options.range && options.autoConfirm){\r\n if((options.type === 'month' && type === 'month') || (options.type === 'year' && type === 'year')){\r\n that.setValue(that.parse()).done().remove();\r\n }\r\n }\r\n\r\n (that.autoCalendarModel.auto && !that.rangeLinked) ? that.choose(lay(elemCont).find('td.layui-this'), index) : (that.endState && that.done(null, 'change'));\r\n lay(that.footer).find('.'+ ELEM_TIME_BTN).removeClass(DISABLED);\r\n });\r\n } else { //时间选择面板 - 选择事件\r\n var span = lay.elem('span', {\r\n \"class\": ELEM_TIME_TEXT\r\n })\r\n \r\n //滚动条定位\r\n ,scroll = function(){\r\n lay(ul).find('ol').each(function(i){\r\n var ol = this\r\n ,li = lay(ol).find('li')\r\n ol.scrollTop = 30*(that[startEnd][hms[i]] - 2);\r\n if(ol.scrollTop <= 0){\r\n li.each(function(ii, item){\r\n if(!lay(this).hasClass(DISABLED)){\r\n ol.scrollTop = 30*(ii - 2);\r\n return true;\r\n }\r\n });\r\n }\r\n });\r\n }\r\n ,haveSpan = lay(elemHeader[2]).find('.'+ ELEM_TIME_TEXT);\r\n \r\n scroll();\r\n span.innerHTML = options.range ? [lang.startTime,lang.endTime][index] : lang.timeTips;\r\n lay(that.elemMain[index]).addClass('laydate-time-show');\r\n \r\n if(haveSpan[0]) haveSpan.remove();\r\n elemHeader[2].appendChild(span);\r\n\r\n lay(ul).find('ol').each(function(i){\r\n var ol = this;\r\n //选择时分秒\r\n lay(ol).find('li').on('click', function(){\r\n var value = this.innerHTML | 0;\r\n if(lay(this).hasClass(DISABLED)) return;\r\n \r\n if(options.range){\r\n that[startEnd][hms[i]] = value;\r\n } else {\r\n dateTime[hms[i]] = value;\r\n }\r\n lay(ol).find('.'+ THIS).removeClass(THIS);\r\n lay(this).addClass(THIS);\r\n\r\n setTimeStatus();\r\n scroll();\r\n (that.endDate || options.type === 'time' || (options.type === 'datetime' && options.fullPanel)) && that.done(null, 'change');\r\n \r\n //同步按钮可点状态\r\n that.setBtnStatus();\r\n });\r\n });\r\n }\r\n \r\n return that;\r\n };\r\n \r\n //记录列表切换后的年月\r\n Class.prototype.listYM = [];\r\n \r\n //关闭列表\r\n Class.prototype.closeList = function(){\r\n var that = this\r\n ,options = that.config;\r\n \r\n lay.each(that.elemCont, function(index, item){\r\n lay(this).find('.'+ ELEM_LIST).remove();\r\n lay(that.elemMain[index]).removeClass('laydate-ym-show laydate-time-show');\r\n });\r\n lay(that.elem).find('.'+ ELEM_TIME_TEXT).remove();\r\n };\r\n \r\n //检测结束日期是否超出开始日期\r\n Class.prototype.setBtnStatus = function(tips, start, end){\r\n var that = this\r\n ,options = that.config\r\n ,lang = that.lang()\r\n ,isOut, elemBtn = lay(that.footer).find(ELEM_CONFIRM);\r\n if(options.range && options.type !== 'time'){\r\n start = start || (that.rangeLinked ? that.startDate : options.dateTime);\r\n end = end || that.endDate;\r\n isOut = !that.endState || that.newDate(start).getTime() > that.newDate(end).getTime();\r\n\r\n //如果不在有效日期内,直接禁用按钮,否则比较开始和结束日期\r\n (that.limit({\r\n date: start\r\n }) || that.limit({\r\n date: end\r\n })) \r\n ? elemBtn.addClass(DISABLED)\r\n : elemBtn[isOut ? 'addClass' : 'removeClass'](DISABLED);\r\n \r\n //是否异常提示\r\n if(tips && isOut) that.hint(\r\n typeof tips === 'string' ? lang.timeout.replace(/日期/g, tips) : lang.timeout\r\n );\r\n }\r\n };\r\n \r\n // 转义为规定格式的日期字符\r\n Class.prototype.parse = function(state, date) {\r\n var that = this;\r\n var options = that.config;\r\n var startDate = (that.rangeLinked ? that.startDate : options.dateTime)\r\n var dateTime = date || (\r\n state == 'end' ? lay.extend({}, that.endDate, that.endTime) : (\r\n options.range\r\n ? lay.extend({}, startDate || options.dateTime, that.startTime)\r\n : options.dateTime\r\n )\r\n );\r\n var format = laydate.parse(dateTime, that.format, 1);\r\n\r\n // 返回日期范围字符\r\n if (options.range && state === undefined) {\r\n return format + ' '+ that.rangeStr +' ' + that.parse('end');\r\n }\r\n\r\n return format;\r\n };\r\n \r\n //创建指定日期时间对象\r\n Class.prototype.newDate = function(dateTime){\r\n dateTime = dateTime || {};\r\n return new Date(\r\n dateTime.year || 1\r\n ,dateTime.month || 0\r\n ,dateTime.date || 1\r\n ,dateTime.hours || 0\r\n ,dateTime.minutes || 0\r\n ,dateTime.seconds || 0\r\n );\r\n };\r\n\r\n // 获得指定日期时间对象的毫秒数\r\n Class.prototype.getDateTime = function(obj){\r\n return this.newDate(obj).getTime();\r\n }\r\n\r\n //赋值\r\n Class.prototype.setValue = function(value){\r\n var that = this\r\n ,options = that.config\r\n ,elem = options.elem[0];\r\n \r\n //静态展现则不作默认赋值\r\n if(options.position === 'static') return that;\r\n \r\n value = value || '';\r\n \r\n //绑定的元素是否为 input\r\n if(that.isInput(elem)){\r\n lay(elem).val(value);\r\n } else {\r\n //如果 range 传入了开始和结束的 input 对象,则分别对其赋值\r\n var rangeElem = that.rangeElem;\r\n if(rangeElem){\r\n if(layui.type(value) !== 'array'){\r\n value = value.split(' '+ that.rangeStr +' ');\r\n }\r\n rangeElem[0].val(value[0] || '');\r\n rangeElem[1].val(value[1] || '');\r\n } else {\r\n if(lay(elem).find('*').length === 0){\r\n lay(elem).html(value);\r\n }\r\n lay(elem).attr('lay-date', value);\r\n }\r\n }\r\n \r\n return that;\r\n };\r\n \r\n //预览\r\n Class.prototype.preview = function(){\r\n var that = this\r\n ,options = that.config;\r\n \r\n if(!options.isPreview) return;\r\n \r\n var elemPreview = lay(that.elem).find('.'+ ELEM_PREVIEW)\r\n ,value = options.range ? ((that.rangeLinked ? that.endState : that.endDate) ? that.parse() : '') : that.parse();\r\n \r\n // 显示预览\r\n elemPreview.html(value);\r\n \r\n // 预览颜色渐变\r\n var oldValue = elemPreview.html();\r\n oldValue && (elemPreview.css({\r\n 'color': '#16b777'\r\n }),\r\n setTimeout(function(){\r\n elemPreview.css({\r\n 'color': '#777'\r\n });\r\n }, 300));\r\n };\r\n\r\n // 附加的渲染处理,在 ready 和 change 的时候调用\r\n Class.prototype.renderAdditional = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 处理全面板\r\n if (options.fullPanel) {\r\n that.list('time', 0);\r\n }\r\n };\r\n\r\n // 标记范围内的日期\r\n Class.prototype.stampRange = function(){\r\n var that = this\r\n ,options = that.config\r\n ,startTime = that.rangeLinked ? that.startDate : options.dateTime, endTime\r\n ,tds = lay(that.elem).find('td');\r\n\r\n if(options.range && !that.endState) lay(that.footer).find(ELEM_CONFIRM).addClass(DISABLED);\r\n // if(!that.endState) return;\r\n\r\n startTime = startTime && that.newDate({\r\n year: startTime.year\r\n ,month: startTime.month\r\n ,date: startTime.date\r\n }).getTime();\r\n\r\n endTime = that.endState && that.endDate && that.newDate({\r\n year: that.endDate.year\r\n ,month: that.endDate.month\r\n ,date: that.endDate.date\r\n }).getTime();\r\n\r\n // if(startTime > endTime) return that.hint(TIPS_OUT);\r\n\r\n lay.each(tds, function(i, item){\r\n var ymd = lay(item).attr('lay-ymd').split('-');\r\n var thisTime = that.newDate({\r\n year: ymd[0]\r\n ,month: ymd[1] - 1\r\n ,date: ymd[2]\r\n }).getTime();\r\n\r\n // 标记当天\r\n if(options.rangeLinked && !that.startDate){\r\n if(thisTime === that.newDate(that.systemDate()).getTime()){\r\n lay(item).addClass(\r\n lay(item).hasClass(ELEM_PREV) || lay(item).hasClass(ELEM_NEXT)\r\n ? ''\r\n : ELEM_DAY_NOW\r\n );\r\n }\r\n }\r\n \r\n /*\r\n * 标注区间\r\n */\r\n\r\n lay(item).removeClass(ELEM_SELECTED + ' ' + THIS);\r\n\r\n if(thisTime === startTime || thisTime === endTime){\r\n (that.rangeLinked || (!that.rangeLinked && (i < 42 ? thisTime === startTime : thisTime === endTime))) &&\r\n lay(item).addClass(\r\n lay(item).hasClass(ELEM_PREV) || lay(item).hasClass(ELEM_NEXT)\r\n ? ELEM_SELECTED\r\n : THIS\r\n );\r\n }\r\n if(thisTime > startTime && thisTime < endTime){\r\n lay(item).addClass(ELEM_SELECTED);\r\n }\r\n });\r\n };\r\n\r\n // 执行 done/change 回调\r\n Class.prototype.done = function(param, type){\r\n var that = this;\r\n var options = that.config;\r\n var start = lay.extend({},\r\n lay.extend(that.rangeLinked ? that.startDate : options.dateTime, that.startTime)\r\n );\r\n var end = lay.extend({}, lay.extend(that.endDate, that.endTime));\r\n \r\n lay.each([start, end], function(i, item){\r\n if(!('month' in item)) return;\r\n lay.extend(item, {\r\n month: item.month + 1\r\n });\r\n });\r\n \r\n that.preview();\r\n \r\n param = param || [that.parse(), start, end];\r\n type === 'change' && that.renderAdditional();\r\n typeof options[type || 'done'] === 'function' && options[type || 'done'].apply(options, param);\r\n \r\n return that;\r\n };\r\n \r\n //选择日期\r\n Class.prototype.choose = function(td, index){\r\n if(td.hasClass(DISABLED)) return;\r\n\r\n var that = this\r\n ,options = that.config\r\n ,panelIndex = index; // 记录点击的是哪一个面板的\r\n\r\n if (that.rangeLinked) {\r\n if (that.endState || !that.startDate) {\r\n // 重新选择或者第一次选择\r\n index = 0;\r\n that.endState = false;\r\n that.endDate = {};\r\n } else {\r\n index = 1;\r\n that.endState = true;\r\n }\r\n }\r\n\r\n var dateTime = that.thisDateTime(index)\r\n\r\n ,tds = lay(that.elem).find('td')\r\n ,YMD = td.attr('lay-ymd').split('-');\r\n \r\n YMD = {\r\n year: YMD[0] | 0\r\n ,month: (YMD[1] | 0) - 1\r\n ,date: YMD[2] | 0\r\n };\r\n\r\n lay.extend(dateTime, YMD); //同步 dateTime\r\n\r\n //范围选择\r\n if(options.range){\r\n //补充时分秒\r\n lay.each(['startTime', 'endTime'], function(i, item){\r\n that[item] = that[item] || {\r\n hours: i ? 23: 0\r\n ,minutes: i ? 59: 0\r\n ,seconds: i ? 59: 0\r\n };\r\n if (index === i) {\r\n // 判断选择之后的是否在范围内,超出则需要调整时分秒\r\n if (that.getDateTime(lay.extend({}, dateTime, that[item])) < that.getDateTime(options.min)) {\r\n that[item] = {\r\n hours: options.min.hours\r\n ,minutes: options.min.minutes\r\n ,seconds: options.min.seconds\r\n };\r\n lay.extend(dateTime, that[item]);\r\n } else if (that.getDateTime(lay.extend({}, dateTime, that[item])) > that.getDateTime(options.max)) {\r\n that[item] = {\r\n hours: options.max.hours\r\n ,minutes: options.max.minutes\r\n ,seconds: options.max.seconds\r\n };\r\n lay.extend(dateTime, that[item]);\r\n }\r\n }\r\n });\r\n if (!index) {\r\n that.startDate = lay.extend({}, dateTime); // 同步startDate\r\n }\r\n // 校验另外一个日期是否在有效的范围内\r\n if (that.endState && !that.limit({date: that.thisDateTime(1 - index)})) {\r\n // 根据选择之后判断是否需要切换模式\r\n var isChange;\r\n if (that.endState && that.autoCalendarModel.auto) {\r\n isChange = that.autoCalendarModel();\r\n }\r\n if ((isChange || that.rangeLinked && that.endState) && that.newDate(that.startDate) > that.newDate(that.endDate)) {\r\n var isSameDate = that.startDate.year === that.endDate.year && that.startDate.month === that.endDate.month && that.startDate.date === that.endDate.date;\r\n // 判断是否反选\r\n var startDate = that.startDate;\r\n that.startDate = lay.extend({}, that.endDate, isSameDate ? {} : that.startTime);\r\n options.dateTime = lay.extend({}, that.startDate);\r\n that.endDate = lay.extend({}, startDate, isSameDate ? {} : that.endTime);\r\n isSameDate && ( // 如果是同一天并且出现了反选证明是时分秒出现开始时间大于结束时间的现象\r\n startDate = that.startTime,\r\n that.startTime = that.endTime,\r\n that.endTime = startDate\r\n )\r\n }\r\n isChange && (options.dateTime = lay.extend({}, that.startDate));\r\n }\r\n if (that.rangeLinked) {\r\n var dateTimeTemp = lay.extend({}, dateTime);\r\n if (panelIndex && !index && !isChange) { // 处理可能出现的联动面板中点击右面板但是判定为开始日期这个时候点击头部的切换上下月第一次没有反应的问题\r\n // 选择了右面板但是判断之后作为开始时间\r\n var YM = that.getAsYM(dateTime.year, dateTime.month, 'sub');\r\n lay.extend(options.dateTime, {\r\n year: YM[0]\r\n ,month: YM[1]\r\n });\r\n }\r\n that.calendar(dateTimeTemp, panelIndex, isChange ? 'init' : null);\r\n } else {\r\n that.calendar(null, index, isChange ? 'init' : null);\r\n }\r\n that.endState && that.done(null, 'change');\r\n } else if(options.position === 'static'){ //直接嵌套的选中\r\n that.calendar().done().done(null, 'change'); //同时执行 done 和 change 回调\r\n } else if(options.type === 'date'){\r\n options.autoConfirm ? that.setValue(that.parse()).done().remove() : that.calendar().done(null, 'change');\r\n } else if(options.type === 'datetime'){\r\n that.calendar().done(null, 'change');\r\n }\r\n };\r\n \r\n //底部按钮\r\n Class.prototype.tool = function(btn, type){\r\n var that = this\r\n ,options = that.config\r\n ,lang = that.lang()\r\n ,dateTime = options.dateTime\r\n ,isStatic = options.position === 'static'\r\n ,active = {\r\n //选择时间\r\n datetime: function(){\r\n if(lay(btn).hasClass(DISABLED)) return;\r\n that.list('time', 0);\r\n options.range && that.list('time', 1);\r\n lay(btn).attr('lay-type', 'date').html(that.lang().dateTips);\r\n }\r\n \r\n //选择日期\r\n ,date: function(){\r\n that.closeList();\r\n lay(btn).attr('lay-type', 'datetime').html(that.lang().timeTips);\r\n }\r\n \r\n //清空、重置\r\n ,clear: function(){\r\n isStatic && (\r\n lay.extend(dateTime, that.firstDate)\r\n ,that.calendar()\r\n )\r\n options.range && (\r\n delete options.dateTime\r\n ,delete that.endDate\r\n ,delete that.startTime\r\n ,delete that.endTime\r\n );\r\n that.setValue('');\r\n that.done(null, 'onClear').done(['', {}, {}]).remove();\r\n }\r\n \r\n // 现在\r\n ,now: function(){\r\n var thisDate = new Date();\r\n\r\n // 当前系统时间未在 min/max 范围内,则不可点击\r\n if(lay(btn).hasClass(DISABLED)){\r\n return that.hint(lang.tools.now +', '+ lang.invalidDate);\r\n }\r\n\r\n lay.extend(dateTime, that.systemDate(), {\r\n hours: thisDate.getHours()\r\n ,minutes: thisDate.getMinutes()\r\n ,seconds: thisDate.getSeconds()\r\n });\r\n\r\n that.setValue(that.parse());\r\n isStatic && that.calendar();\r\n that.done(null, 'onNow').done().remove();\r\n }\r\n \r\n //确定\r\n ,confirm: function(){\r\n if(options.range){\r\n if(lay(btn).hasClass(DISABLED)) return that.hint(\r\n options.type === 'time' ? lang.timeout.replace(/日期/g, '时间') : lang.timeout\r\n );\r\n } else {\r\n if(lay(btn).hasClass(DISABLED)) return that.hint(lang.invalidDate);\r\n }\r\n \r\n that.setValue(that.parse());\r\n that.done(null, 'onConfirm').done().remove();\r\n }\r\n };\r\n active[type] && active[type]();\r\n };\r\n \r\n //统一切换处理\r\n Class.prototype.change = function(index){\r\n var that = this\r\n ,options = that.config\r\n ,dateTime = that.thisDateTime(index)\r\n ,isAlone = options.range && (options.type === 'year' || options.type === 'month')\r\n \r\n ,elemCont = that.elemCont[index || 0]\r\n ,listYM = that.listYM[index]\r\n ,addSubYear = function(type){\r\n var isYear = lay(elemCont).find('.laydate-year-list')[0]\r\n ,isMonth = lay(elemCont).find('.laydate-month-list')[0];\r\n \r\n //切换年列表\r\n if(isYear){\r\n listYM[0] = type ? listYM[0] - 15 : listYM[0] + 15;\r\n that.list('year', index);\r\n }\r\n \r\n if(isMonth){ //切换月面板中的年\r\n type ? listYM[0]-- : listYM[0]++;\r\n that.list('month', index);\r\n }\r\n \r\n if(isYear || isMonth){\r\n lay.extend(dateTime, {\r\n year: listYM[0]\r\n });\r\n if(isAlone) dateTime.year = listYM[0];\r\n options.range || that.done(null, 'change'); \r\n options.range || that.limit({\r\n elem: lay(that.footer).find(ELEM_CONFIRM),\r\n date: {\r\n year: listYM[0]\r\n }\r\n });\r\n }\r\n \r\n that.setBtnStatus();\r\n return isYear || isMonth;\r\n };\r\n \r\n return {\r\n prevYear: function(){\r\n if(addSubYear('sub')) return;\r\n if (that.rangeLinked) {\r\n options.dateTime.year--;\r\n that.checkDate('limit').calendar(null, null, 'init');\r\n } else {\r\n dateTime.year--;\r\n that.checkDate('limit').calendar(null, index);\r\n // 面板自动切换的模式下重新判定是否发生模式转换等细节处理\r\n that.autoCalendarModel.auto ? that.choose(lay(elemCont).find('td.layui-this'), index) : that.done(null, 'change');\r\n }\r\n }\r\n ,prevMonth: function(){\r\n if (that.rangeLinked) {\r\n dateTime = options.dateTime;\r\n }\r\n var YM = that.getAsYM(dateTime.year, dateTime.month, 'sub');\r\n lay.extend(dateTime, {\r\n year: YM[0]\r\n ,month: YM[1]\r\n });\r\n\r\n that.checkDate('limit').calendar(null, null, 'init');\r\n if (!that.rangeLinked) {\r\n that.autoCalendarModel.auto ? that.choose(lay(elemCont).find('td.layui-this'), index) : that.done(null, 'change');\r\n }\r\n }\r\n ,nextMonth: function(){\r\n if (that.rangeLinked) {\r\n dateTime = options.dateTime;\r\n }\r\n var YM = that.getAsYM(dateTime.year, dateTime.month);\r\n lay.extend(dateTime, {\r\n year: YM[0]\r\n ,month: YM[1]\r\n });\r\n\r\n that.checkDate('limit').calendar(null, null, 'init');\r\n if (!that.rangeLinked) {\r\n that.autoCalendarModel.auto ? that.choose(lay(elemCont).find('td.layui-this'), index) : that.done(null, 'change');\r\n }\r\n }\r\n ,nextYear: function(){\r\n if(addSubYear()) return;\r\n if (that.rangeLinked) {\r\n options.dateTime.year++;\r\n that.checkDate('limit').calendar(null, 0, 'init');\r\n } else {\r\n dateTime.year++;\r\n that.checkDate('limit').calendar(null, index);\r\n that.autoCalendarModel.auto ? that.choose(lay(elemCont).find('td.layui-this'), index) : that.done(null, 'change');\r\n }\r\n }\r\n };\r\n };\r\n \r\n //日期切换事件\r\n Class.prototype.changeEvent = function(){\r\n var that = this\r\n ,options = that.config;\r\n\r\n //日期选择事件\r\n lay(that.elem).on('click', function(e){\r\n lay.stope(e);\r\n }).on('mousedown', function(e){\r\n lay.stope(e);\r\n });\r\n \r\n //年月切换\r\n lay.each(that.elemHeader, function(i, header){\r\n //上一年\r\n lay(header[0]).on('click', function(e){\r\n that.change(i).prevYear();\r\n });\r\n \r\n //上一月\r\n lay(header[1]).on('click', function(e){\r\n that.change(i).prevMonth();\r\n });\r\n \r\n //选择年月\r\n lay(header[2]).find('span').on('click', function(e){\r\n var othis = lay(this)\r\n ,layYM = othis.attr('lay-ym')\r\n ,layType = othis.attr('lay-type');\r\n \r\n if(!layYM) return;\r\n \r\n layYM = layYM.split('-');\r\n\r\n that.listYM[i] = [layYM[0] | 0, layYM[1] | 0];\r\n that.list(layType, i);\r\n lay(that.footer).find('.'+ ELEM_TIME_BTN).addClass(DISABLED);\r\n });\r\n\r\n //下一月\r\n lay(header[3]).on('click', function(e){\r\n that.change(i).nextMonth();\r\n });\r\n \r\n //下一年\r\n lay(header[4]).on('click', function(e){\r\n that.change(i).nextYear();\r\n });\r\n });\r\n \r\n //点击日期\r\n lay.each(that.table, function(i, table){\r\n var tds = lay(table).find('td');\r\n tds.on('click', function(){\r\n that.choose(lay(this), i);\r\n });\r\n });\r\n \r\n //点击底部按钮\r\n lay(that.footer).find('span').on('click', function(){\r\n var type = lay(this).attr('lay-type');\r\n that.tool(this, type);\r\n });\r\n };\r\n \r\n //是否输入框\r\n Class.prototype.isInput = function(elem){\r\n return /input|textarea/.test(elem.tagName.toLocaleLowerCase()) || /INPUT|TEXTAREA/.test(elem.tagName);\r\n };\r\n\r\n //绑定的元素事件处理\r\n Class.prototype.events = function(){\r\n var that = this\r\n var options = that.config\r\n\r\n if(!options.elem[0] || options.elem[0].eventHandler) return;\r\n\r\n var showEvent = function(){\r\n // 已经打开的面板避免重新渲染\r\n if(laydate.thisId === options.id) return;\r\n that.render();\r\n };\r\n\r\n //绑定呼出控件事件\r\n options.elem.on(options.trigger, showEvent);\r\n options.elem[0].eventHandler = true;\r\n options.eventElem.on(options.trigger, showEvent);\r\n\r\n // 元素解绑\r\n that.unbind = function () {\r\n that.remove();\r\n options.elem.off(options.trigger, showEvent);\r\n options.elem.removeAttr('lay-key');\r\n options.elem.removeAttr(MOD_ID);\r\n options.elem[0].eventHandler = false;\r\n options.eventElem.off(options.trigger, showEvent);\r\n options.eventElem.removeAttr('lay-key');\r\n delete thisModule.that[options.id];\r\n };\r\n };\r\n \r\n //记录所有实例\r\n thisModule.that = {}; //记录所有实例对象\r\n \r\n //获取当前实例对象\r\n thisModule.getThis = function(id){\r\n var that = thisModule.that[id];\r\n if(!that && isLayui) layui.hint().error(id ? (MOD_NAME +' instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return that;\r\n };\r\n \r\n // 初始执行\r\n ready.run = function(lay){\r\n // 绑定关闭控件事件\r\n lay(document).on('mousedown', function(e){\r\n if(!laydate.thisId) return;\r\n var that = thisModule.getThis(laydate.thisId);\r\n if(!that) return;\r\n \r\n var options = that.config;\r\n \r\n if(\r\n e.target === options.elem[0] || \r\n e.target === options.eventElem[0] ||\r\n e.target === lay(options.closeStop)[0] ||\r\n (options.elem[0] && options.elem[0].contains(e.target))\r\n ) return;\r\n \r\n that.remove();\r\n \r\n }).on('keydown', function(e){\r\n if(!laydate.thisId) return;\r\n var that = thisModule.getThis(laydate.thisId);\r\n if(!that) return;\r\n \r\n // 回车触发确认\r\n if(that.config.position === 'static') return;\r\n if(e.keyCode === 13){\r\n if(lay('#'+ that.elemID)[0] && that.elemID === Class.thisElemDate){\r\n e.preventDefault();\r\n lay(that.footer).find(ELEM_CONFIRM)[0].click();\r\n }\r\n }\r\n });\r\n \r\n //自适应定位\r\n lay(window).on('resize', function(){\r\n if(!laydate.thisId) return;\r\n var that = thisModule.getThis(laydate.thisId);\r\n if(!that) return;\r\n \r\n if(!that.elem || !lay(ELEM)[0]){\r\n return false;\r\n }\r\n \r\n that.position();\r\n });\r\n };\r\n \r\n // 渲染 - 核心接口\r\n laydate.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n\r\n // 重载\r\n laydate.reload = function (id, options) {\r\n var that = thisModule.getThis(id);\r\n if(!that) return;\r\n return that.reload(options);\r\n };\r\n\r\n // 获取对应 ID 的实例\r\n laydate.getInst = function (id) {\r\n var that = thisModule.getThis(id);\r\n if(that){\r\n return that.inst;\r\n }\r\n };\r\n\r\n // 面板提示\r\n laydate.hint = function(id, opts){\r\n var that = thisModule.getThis(id);\r\n if(!that) return;\r\n return that.hint(opts);\r\n };\r\n\r\n // 解绑实例\r\n laydate.unbind = function(id){\r\n var that = thisModule.getThis(id);\r\n if(!that) return;\r\n return that.unbind();\r\n };\r\n\r\n // 关闭日期面板\r\n laydate.close = function(id){\r\n var that = thisModule.getThis(id || laydate.thisId);\r\n if(!that) return;\r\n return that.remove();\r\n };\r\n\r\n // 将指定对象转化为日期值\r\n laydate.parse = function(dateTime, format, one){\r\n dateTime = dateTime || {};\r\n \r\n //如果 format 是字符型,则转换为数组格式\r\n if(typeof format === 'string'){\r\n format = thisModule.formatArr(format);\r\n }\r\n \r\n format = (format || []).concat();\r\n \r\n //转义为规定格式\r\n lay.each(format, function(i, item){\r\n if(/yyyy|y/.test(item)){ //年\r\n format[i] = lay.digit(dateTime.year, item.length);\r\n } else if(/MM|M/.test(item)){ //月\r\n format[i] = lay.digit(dateTime.month + (one || 0), item.length);\r\n } else if(/dd|d/.test(item)){ //日\r\n format[i] = lay.digit(dateTime.date, item.length);\r\n } else if(/HH|H/.test(item)){ //时\r\n format[i] = lay.digit(dateTime.hours, item.length);\r\n } else if(/mm|m/.test(item)){ //分\r\n format[i] = lay.digit(dateTime.minutes, item.length);\r\n } else if(/ss|s/.test(item)){ //秒\r\n format[i] = lay.digit(dateTime.seconds, item.length);\r\n }\r\n });\r\n \r\n return format.join('');\r\n };\r\n \r\n // 得到某月的最后一天\r\n laydate.getEndDate = function(month, year){\r\n var thisDate = new Date();\r\n //设置日期为下个月的第一天\r\n thisDate.setFullYear(\r\n year || thisDate.getFullYear()\r\n ,month || (thisDate.getMonth() + 1)\r\n ,1);\r\n //减去一天,得到当前月最后一天\r\n return new Date(thisDate.getTime() - 1000*60*60*24).getDate();\r\n };\r\n\r\n //加载方式\r\n isLayui ? (\r\n laydate.ready()\r\n ,layui.define('lay', function(exports){ //layui 加载\r\n laydate.path = layui.cache.dir;\r\n ready.run(lay);\r\n exports(MOD_NAME, laydate);\r\n })\r\n ) : (\r\n (typeof define === 'function' && define.amd) ? define(function(){ //requirejs 加载\r\n ready.run(lay);\r\n return laydate;\r\n }) : function(){ //普通 script 标签加载\r\n laydate.ready();\r\n ready.run(window.lay);\r\n window.laydate = laydate;\r\n }()\r\n );\r\n\r\n}(window, window.document);\r\n\r\n","/*!\n * jQuery JavaScript Library v1.12.4\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2016-05-20T17:17Z\n */\n\n(function( global, factory ) {\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n}(typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Support: Firefox 18+\n// Can't be in strict mode, several libs including ASP.NET trace\n// the stack via arguments.caller.callee and Firefox dies if\n// you try to trace through \"use strict\" call chains. (#13335)\n//\"use strict\";\nvar deletedIds = [];\n\nvar document = window.document;\n\nvar slice = deletedIds.slice;\n\nvar concat = deletedIds.concat;\n\nvar push = deletedIds.push;\n\nvar indexOf = deletedIds.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar support = {};\n\n\n\nvar\n\tversion = \"1.12.4\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Support: Android<4.1, IE<9\n\t// Make sure we trim BOM and NBSP\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\n\n\t// Matches dashed string for camelizing\n\trmsPrefix = /^-ms-/,\n\trdashAlpha = /-([\\da-z])/gi,\n\n\t// Used by jQuery.camelCase as callback to replace()\n\tfcamelCase = function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num != null ?\n\n\t\t\t// Return just the one element from the set\n\t\t\t( num < 0 ? this[ num + this.length ] : this[ num ] ) :\n\n\t\t\t// Return all the elements in a clean array\n\t\t\tslice.call( this );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\t\tret.context = this.context;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: deletedIds.sort,\n\tsplice: deletedIds.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar src, copyIsArray, copy, name, options, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = jQuery.isArray( copy ) ) ) ) {\n\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && jQuery.isArray( src ) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject( src ) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\t// See test/unit/core.js for details concerning isFunction.\n\t// Since version 1.3, DOM methods and functions like alert\n\t// aren't supported. They return false on IE (#2968).\n\tisFunction: function( obj ) {\n\t\treturn jQuery.type( obj ) === \"function\";\n\t},\n\n\tisArray: Array.isArray || function( obj ) {\n\t\treturn jQuery.type( obj ) === \"array\";\n\t},\n\n\tisWindow: function( obj ) {\n\t\t/* jshint eqeqeq: false */\n\t\treturn obj != null && obj == obj.window;\n\t},\n\n\tisNumeric: function( obj ) {\n\n\t\t// parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t// adding 1 corrects loss of precision from parseFloat (#15100)\n\t\tvar realStringObj = obj && obj.toString();\n\t\treturn !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\tvar key;\n\n\t\t// Must be an Object.\n\t\t// Because of IE, we also have to check the presence of the constructor property.\n\t\t// Make sure that DOM nodes and window objects don't pass through, as well\n\t\tif ( !obj || jQuery.type( obj ) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\n\t\t\t// Not own constructor property must be Object\n\t\t\tif ( obj.constructor &&\n\t\t\t\t!hasOwn.call( obj, \"constructor\" ) &&\n\t\t\t\t!hasOwn.call( obj.constructor.prototype, \"isPrototypeOf\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch ( e ) {\n\n\t\t\t// IE8,9 Will throw exceptions on certain host objects #9897\n\t\t\treturn false;\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Handle iteration over inherited properties before own properties.\n\t\tif ( !support.ownFirst ) {\n\t\t\tfor ( key in obj ) {\n\t\t\t\treturn hasOwn.call( obj, key );\n\t\t\t}\n\t\t}\n\n\t\t// Own properties are enumerated firstly, so to speed up,\n\t\t// if last one is own, then all properties are own.\n\t\tfor ( key in obj ) {}\n\n\t\treturn key === undefined || hasOwn.call( obj, key );\n\t},\n\n\ttype: function( obj ) {\n\t\tif ( obj == null ) {\n\t\t\treturn obj + \"\";\n\t\t}\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\t\ttypeof obj;\n\t},\n\n\t// Workarounds based on findings by Jim Driscoll\n\t// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context\n\tglobalEval: function( data ) {\n\t\tif ( data && jQuery.trim( data ) ) {\n\n\t\t\t// We use execScript on Internet Explorer\n\t\t\t// We use an anonymous function so that context is window\n\t\t\t// rather than jQuery in Firefox\n\t\t\t( window.execScript || function( data ) {\n\t\t\t\twindow[ \"eval\" ].call( window, data ); // jscs:ignore requireDotNotation\n\t\t\t} )( data );\n\t\t}\n\t},\n\n\t// Convert dashed to camelCase; used by the css and data modules\n\t// Microsoft forgot to hump their vendor prefix (#9572)\n\tcamelCase: function( string ) {\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Support: Android<4.1, IE<9\n\ttrim: function( text ) {\n\t\treturn text == null ?\n\t\t\t\"\" :\n\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\tvar len;\n\n\t\tif ( arr ) {\n\t\t\tif ( indexOf ) {\n\t\t\t\treturn indexOf.call( arr, elem, i );\n\t\t\t}\n\n\t\t\tlen = arr.length;\n\t\t\ti = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;\n\n\t\t\tfor ( ; i < len; i++ ) {\n\n\t\t\t\t// Skip accessing in sparse arrays\n\t\t\t\tif ( i in arr && arr[ i ] === elem ) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t},\n\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\twhile ( j < len ) {\n\t\t\tfirst[ i++ ] = second[ j++ ];\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)\n\t\tif ( len !== len ) {\n\t\t\twhile ( second[ j ] !== undefined ) {\n\t\t\t\tfirst[ i++ ] = second[ j++ ];\n\t\t\t}\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// Bind a function to a context, optionally partially applying any\n\t// arguments.\n\tproxy: function( fn, context ) {\n\t\tvar args, proxy, tmp;\n\n\t\tif ( typeof context === \"string\" ) {\n\t\t\ttmp = fn[ context ];\n\t\t\tcontext = fn;\n\t\t\tfn = tmp;\n\t\t}\n\n\t\t// Quick check to determine if target is callable, in the spec\n\t\t// this throws a TypeError, but we will just return undefined.\n\t\tif ( !jQuery.isFunction( fn ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Simulated bind\n\t\targs = slice.call( arguments, 2 );\n\t\tproxy = function() {\n\t\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t\t};\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\t\treturn proxy;\n\t},\n\n\tnow: function() {\n\t\treturn +( new Date() );\n\t},\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\n// JSHint would error on this code due to the Symbol not being defined in ES5.\n// Defining this global in .jshintrc would create a danger of using the global\n// unguarded in another place, it seems safer to just disable JSHint for these\n// three lines.\n/* jshint ignore: start */\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = deletedIds[ Symbol.iterator ];\n}\n/* jshint ignore: end */\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\nfunction( i, name ) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: iOS 8.2 (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = jQuery.type( obj );\n\n\tif ( type === \"function\" || jQuery.isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.2.1\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2015-10-17\n */\n(function( window ) {\n\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// General-purpose constants\n\tMAX_NEGATIVE = 1 << 31,\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf as it's faster than native\n\t// http://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\n\t\t\"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*?)\" + whitespace + \"*\\\\]\", \"g\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\trescape = /'|\\\\/g,\n\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t};\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, nidselect, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\n\t\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\t\tsetDocument( context );\n\t\t}\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( (m = match[1]) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( (elem = context.getElementById( m )) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && (elem = newContext.getElementById( m )) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[2] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!compilerCache[ selector + \" \" ] &&\n\t\t\t\t(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\n\t\t\t\tif ( nodeType !== 1 ) {\n\t\t\t\t\tnewContext = context;\n\t\t\t\t\tnewSelector = selector;\n\n\t\t\t\t// qSA looks outside Element context, which is not what we want\n\t\t\t\t// Thanks to Andrew Dupont for this workaround technique\n\t\t\t\t// Support: IE <=8\n\t\t\t\t// Exclude object elements\n\t\t\t\t} else if ( context.nodeName.toLowerCase() !== \"object\" ) {\n\n\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\tif ( (nid = context.getAttribute( \"id\" )) ) {\n\t\t\t\t\t\tnid = nid.replace( rescape, \"\\\\$&\" );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.setAttribute( \"id\", (nid = expando) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\tnidselect = ridentifier.test( nid ) ? \"#\" + nid : \"[id='\" + nid + \"']\";\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[i] = nidselect + \" \" + toSelector( groups[i] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\t\t\t\t}\n\n\t\t\t\tif ( newSelector ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + \" \" ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\nfunction assert( fn ) {\n\tvar div = document.createElement(\"div\");\n\n\ttry {\n\t\treturn !!fn( div );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( div.parentNode ) {\n\t\t\tdiv.parentNode.removeChild( div );\n\t\t}\n\t\t// release memory in IE\n\t\tdiv = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\t( ~b.sourceIndex || MAX_NEGATIVE ) -\n\t\t\t( ~a.sourceIndex || MAX_NEGATIVE );\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, parent,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9-11, Edge\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\tif ( (parent = document.defaultView) && parent.top !== parent ) {\n\t\t// Support: IE 11\n\t\tif ( parent.addEventListener ) {\n\t\t\tparent.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( parent.attachEvent ) {\n\t\t\tparent.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert(function( div ) {\n\t\tdiv.className = \"i\";\n\t\treturn !div.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( div ) {\n\t\tdiv.appendChild( document.createComment(\"\") );\n\t\treturn !div.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( div ) {\n\t\tdocElem.appendChild( div ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t});\n\n\t// ID find and filter\n\tif ( support.getById ) {\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\t\t\t\treturn m ? [ m ] : [];\n\t\t\t}\n\t\t};\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t} else {\n\t\t// Support: IE6/7\n\t\t// getElementById is not reliable as a find shortcut\n\t\tdelete Expr.find[\"ID\"];\n\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See http://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( div ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// http://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( div ).innerHTML = \"\" +\n\t\t\t\t\"\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( div.querySelectorAll(\"[msallowcapture^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !div.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push(\"~=\");\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibing-combinator selector` fails\n\t\t\tif ( !div.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( div ) {\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tdiv.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( div.querySelectorAll(\"[name=d]\").length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tdiv.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( div ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( div, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\t\t\treturn a === document ? -1 :\n\t\t\t\tb === document ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\t// Make sure that attribute selectors are quoted\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!compilerCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch (e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( (node = elem[i++]) ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[6] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] ) {\n\t\t\t\tmatch[2] = match[4] || match[5] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[0] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": function( elem ) {\n\t\t\treturn elem.disabled === false;\n\t\t},\n\n\t\t\"disabled\": function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( (tokens = []) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tcheckNonElements = base && dir === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});\n\n\t\t\t\t\t\tif ( (oldCache = uniqueCache[ dir ]) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ dir ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", outermost ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context === document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: ) matching elements by id\n\t\t\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\tif ( !context && elem.ownerDocument !== document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[0] = match[0].slice( 0 );\n\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\tsupport.getById && context.nodeType === 9 && documentIsHTML &&\n\t\t\t\tExpr.relative[ tokens[1].type ] ) {\n\n\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[i];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( (seed = find(\n\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\n\t\t\t\t)) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( div1 ) {\n\t// Should return 1, but returns 4 (following)\n\treturn div1.compareDocumentPosition( document.createElement(\"div\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( div ) {\n\tdiv.innerHTML = \"\";\n\treturn div.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( div ) {\n\tdiv.innerHTML = \"\";\n\tdiv.firstChild.setAttribute( \"value\", \"\" );\n\treturn div.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( div ) {\n\treturn div.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\tnull;\n\t\t}\n\t});\n}\n\nreturn Sizzle;\n\n})( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/ );\n\n\n\nvar risSimple = /^.[^:#\\[\\.,]*$/;\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t/* jshint -W018 */\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( jQuery.inArray( elem, qualifier ) > -1 ) !== not;\n\t} );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\treturn elems.length === 1 && elem.nodeType === 1 ?\n\t\tjQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\n\t\tjQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\t\treturn elem.nodeType === 1;\n\t\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i,\n\t\t\tret = [],\n\t\t\tself = this,\n\t\t\tlen = self.length;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\n\t\tret.selector = this.selector ? this.selector + \" \" + selector : selector;\n\t\treturn ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// init accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector.charAt( 0 ) === \"<\" &&\n\t\t\t\tselector.charAt( selector.length - 1 ) === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id !== match[ 2 ] ) {\n\t\t\t\t\t\t\treturn rootjQuery.find( selector );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.context = document;\n\t\t\t\t\tthis.selector = selector;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis.context = this[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn typeof root.ready !== \"undefined\" ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\tif ( selector.selector !== undefined ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar i,\n\t\t\ttargets = jQuery( target, this ),\n\t\t\tlen = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\n\t\t\t\tjQuery( selectors, context || this.context ) :\n\t\t\t\t0;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t// Always skip document fragments\n\t\t\t\tif ( cur.nodeType < 11 && ( pos ?\n\t\t\t\t\tpos.index( cur ) > -1 :\n\n\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within\n\t// the matched set of elements\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn jQuery.inArray( this[ 0 ], jQuery( elem ) );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn jQuery.inArray(\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem, this );\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\tdo {\n\t\tcur = cur[ dir ];\n\t} while ( cur && cur.nodeType !== 1 );\n\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn jQuery.nodeName( elem, \"iframe\" ) ?\n\t\t\telem.contentDocument || elem.contentWindow.document :\n\t\t\tjQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar ret = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tret = jQuery.filter( selector, ret );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tret = jQuery.uniqueSort( ret );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tret = ret.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnotwhite = ( /\\S+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( jQuery.isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && jQuery.type( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = true;\n\t\t\t\tif ( !memory ) {\n\t\t\t\t\tself.disable();\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, listener list, final state\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ), \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ), \"rejected\" ],\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ) ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\t\t\t\t\tvar fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\n\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis === promise ? newDefer.promise() : this,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Keep pipe for back-compat\n\t\tpromise.pipe = promise.then;\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 3 ];\n\n\t\t\t// promise[ done | fail | progress ] = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add( function() {\n\n\t\t\t\t\t// state = [ resolved | rejected ]\n\t\t\t\t\tstate = stateString;\n\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\n\t\t\t}\n\n\t\t\t// deferred[ resolve | reject | notify ]\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? promise : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\n\t\tvar i = 0,\n\t\t\tresolveValues = slice.call( arguments ),\n\t\t\tlength = resolveValues.length,\n\n\t\t\t// the count of uncompleted subordinates\n\t\t\tremaining = length !== 1 ||\n\t\t\t\t( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\n\n\t\t\t// the master Deferred.\n\t\t\t// If resolveValues consist of only a single Deferred, just use that.\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\n\n\t\t\t// Update function for both resolve and progress values\n\t\t\tupdateFunc = function( i, contexts, values ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tcontexts[ i ] = this;\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( values === progressValues ) {\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\n\n\t\t\t\t\t} else if ( !( --remaining ) ) {\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\n\t\t\tprogressValues, progressContexts, resolveContexts;\n\n\t\t// add listeners to Deferred subordinates; treat others as resolved\n\t\tif ( length > 1 ) {\n\t\t\tprogressValues = new Array( length );\n\t\t\tprogressContexts = new Array( length );\n\t\t\tresolveContexts = new Array( length );\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\n\t\t\t\t\tresolveValues[ i ].promise()\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) )\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\n\t\t\t\t\t\t.fail( deferred.reject );\n\t\t\t\t} else {\n\t\t\t\t\t--remaining;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// if we're not waiting on anything, resolve the master\n\t\tif ( !remaining ) {\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\n\t\t}\n\n\t\treturn deferred.promise();\n\t}\n} );\n\n\n// The deferred used on DOM ready\nvar readyList;\n\njQuery.fn.ready = function( fn ) {\n\n\t// Add the callback\n\tjQuery.ready.promise().done( fn );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Hold (or release) the ready event\n\tholdReady: function( hold ) {\n\t\tif ( hold ) {\n\t\t\tjQuery.readyWait++;\n\t\t} else {\n\t\t\tjQuery.ready( true );\n\t\t}\n\t},\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\n\t\t// Trigger any bound ready events\n\t\tif ( jQuery.fn.triggerHandler ) {\n\t\t\tjQuery( document ).triggerHandler( \"ready\" );\n\t\t\tjQuery( document ).off( \"ready\" );\n\t\t}\n\t}\n} );\n\n/**\n * Clean-up method for dom ready events\n */\nfunction detach() {\n\tif ( document.addEventListener ) {\n\t\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\t\twindow.removeEventListener( \"load\", completed );\n\n\t} else {\n\t\tdocument.detachEvent( \"onreadystatechange\", completed );\n\t\twindow.detachEvent( \"onload\", completed );\n\t}\n}\n\n/**\n * The ready event handler and self cleanup method\n */\nfunction completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}\n\njQuery.ready.promise = function( obj ) {\n\tif ( !readyList ) {\n\n\t\treadyList = jQuery.Deferred();\n\n\t\t// Catch cases where $(document).ready() is called\n\t\t// after the browser event has already occurred.\n\t\t// Support: IE6-10\n\t\t// Older IE sometimes signals \"interactive\" too soon\n\t\tif ( document.readyState === \"complete\" ||\n\t\t\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\t\t\twindow.setTimeout( jQuery.ready );\n\n\t\t// Standards-based browsers support DOMContentLoaded\n\t\t} else if ( document.addEventListener ) {\n\n\t\t\t// Use the handy event callback\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.addEventListener( \"load\", completed );\n\n\t\t// If IE event model is used\n\t\t} else {\n\n\t\t\t// Ensure firing before onload, maybe late but safe also for iframes\n\t\t\tdocument.attachEvent( \"onreadystatechange\", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.attachEvent( \"onload\", completed );\n\n\t\t\t// If IE and not a frame\n\t\t\t// continually check to see if the document is ready\n\t\t\tvar top = false;\n\n\t\t\ttry {\n\t\t\t\ttop = window.frameElement == null && document.documentElement;\n\t\t\t} catch ( e ) {}\n\n\t\t\tif ( top && top.doScroll ) {\n\t\t\t\t( function doScrollCheck() {\n\t\t\t\t\tif ( !jQuery.isReady ) {\n\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\t// Use the trick by Diego Perini\n\t\t\t\t\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\n\t\t\t\t\t\t\ttop.doScroll( \"left\" );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn window.setTimeout( doScrollCheck, 50 );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// detach all dom ready events\n\t\t\t\t\t\tdetach();\n\n\t\t\t\t\t\t// and execute any waiting functions\n\t\t\t\t\t\tjQuery.ready();\n\t\t\t\t\t}\n\t\t\t\t} )();\n\t\t\t}\n\t\t}\n\t}\n\treturn readyList.promise( obj );\n};\n\n// Kick off the DOM ready check even if the user does not\njQuery.ready.promise();\n\n\n\n\n// Support: IE<9\n// Iteration over object's inherited properties before its own\nvar i;\nfor ( i in jQuery( support ) ) {\n\tbreak;\n}\nsupport.ownFirst = i === \"0\";\n\n// Note: most support tests are defined in their respective modules.\n// false until the test is run\nsupport.inlineBlockNeedsLayout = false;\n\n// Execute ASAP in case we need to set body.style.zoom\njQuery( function() {\n\n\t// Minified: var a,b,c,d\n\tvar val, div, body, container;\n\n\tbody = document.getElementsByTagName( \"body\" )[ 0 ];\n\tif ( !body || !body.style ) {\n\n\t\t// Return for frameset docs that don't have a body\n\t\treturn;\n\t}\n\n\t// Setup\n\tdiv = document.createElement( \"div\" );\n\tcontainer = document.createElement( \"div\" );\n\tcontainer.style.cssText = \"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\";\n\tbody.appendChild( container ).appendChild( div );\n\n\tif ( typeof div.style.zoom !== \"undefined\" ) {\n\n\t\t// Support: IE<8\n\t\t// Check if natively block-level elements act like inline-block\n\t\t// elements when setting their display to 'inline' and giving\n\t\t// them layout\n\t\tdiv.style.cssText = \"display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1\";\n\n\t\tsupport.inlineBlockNeedsLayout = val = div.offsetWidth === 3;\n\t\tif ( val ) {\n\n\t\t\t// Prevent IE 6 from affecting layout for positioned elements #11048\n\t\t\t// Prevent IE from shrinking the body in IE 7 mode #12869\n\t\t\t// Support: IE<8\n\t\t\tbody.style.zoom = 1;\n\t\t}\n\t}\n\n\tbody.removeChild( container );\n} );\n\n\n( function() {\n\tvar div = document.createElement( \"div\" );\n\n\t// Support: IE<9\n\tsupport.deleteExpando = true;\n\ttry {\n\t\tdelete div.test;\n\t} catch ( e ) {\n\t\tsupport.deleteExpando = false;\n\t}\n\n\t// Null elements to avoid leaks in IE.\n\tdiv = null;\n} )();\nvar acceptData = function( elem ) {\n\tvar noData = jQuery.noData[ ( elem.nodeName + \" \" ).toLowerCase() ],\n\t\tnodeType = +elem.nodeType || 1;\n\n\t// Do not set data on non-element DOM nodes because it will not be cleared (#8335).\n\treturn nodeType !== 1 && nodeType !== 9 ?\n\t\tfalse :\n\n\t\t// Nodes accept data unless otherwise specified; rejection can be conditional\n\t\t!noData || noData !== true && elem.getAttribute( \"classid\" ) === noData;\n};\n\n\n\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /([A-Z])/g;\n\nfunction dataAttr( elem, key, data ) {\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\n\t\tvar name = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\n\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = data === \"true\" ? true :\n\t\t\t\t\tdata === \"false\" ? false :\n\t\t\t\t\tdata === \"null\" ? null :\n\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\n\t\t\t\t\t+data + \"\" === data ? +data :\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\n\t\t\t\t\tdata;\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tjQuery.data( elem, key, data );\n\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\n\treturn data;\n}\n\n// checks a cache object for emptiness\nfunction isEmptyDataObject( obj ) {\n\tvar name;\n\tfor ( name in obj ) {\n\n\t\t// if the public data object is empty, the private is still empty\n\t\tif ( name === \"data\" && jQuery.isEmptyObject( obj[ name ] ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( name !== \"toJSON\" ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\nfunction internalData( elem, name, data, pvt /* Internal Use Only */ ) {\n\tif ( !acceptData( elem ) ) {\n\t\treturn;\n\t}\n\n\tvar ret, thisCache,\n\t\tinternalKey = jQuery.expando,\n\n\t\t// We have to handle DOM nodes and JS objects differently because IE6-7\n\t\t// can't GC object references properly across the DOM-JS boundary\n\t\tisNode = elem.nodeType,\n\n\t\t// Only DOM nodes need the global jQuery cache; JS object data is\n\t\t// attached directly to the object so GC can occur automatically\n\t\tcache = isNode ? jQuery.cache : elem,\n\n\t\t// Only defining an ID for JS objects if its cache already exists allows\n\t\t// the code to shortcut on the same path as a DOM node with no cache\n\t\tid = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;\n\n\t// Avoid doing any more work than we need to when trying to get data on an\n\t// object that has no data at all\n\tif ( ( !id || !cache[ id ] || ( !pvt && !cache[ id ].data ) ) &&\n\t\tdata === undefined && typeof name === \"string\" ) {\n\t\treturn;\n\t}\n\n\tif ( !id ) {\n\n\t\t// Only DOM nodes need a new unique ID for each element since their data\n\t\t// ends up in the global cache\n\t\tif ( isNode ) {\n\t\t\tid = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;\n\t\t} else {\n\t\t\tid = internalKey;\n\t\t}\n\t}\n\n\tif ( !cache[ id ] ) {\n\n\t\t// Avoid exposing jQuery metadata on plain JS objects when the object\n\t\t// is serialized using JSON.stringify\n\t\tcache[ id ] = isNode ? {} : { toJSON: jQuery.noop };\n\t}\n\n\t// An object can be passed to jQuery.data instead of a key/value pair; this gets\n\t// shallow copied over onto the existing cache\n\tif ( typeof name === \"object\" || typeof name === \"function\" ) {\n\t\tif ( pvt ) {\n\t\t\tcache[ id ] = jQuery.extend( cache[ id ], name );\n\t\t} else {\n\t\t\tcache[ id ].data = jQuery.extend( cache[ id ].data, name );\n\t\t}\n\t}\n\n\tthisCache = cache[ id ];\n\n\t// jQuery data() is stored in a separate object inside the object's internal data\n\t// cache in order to avoid key collisions between internal data and user-defined\n\t// data.\n\tif ( !pvt ) {\n\t\tif ( !thisCache.data ) {\n\t\t\tthisCache.data = {};\n\t\t}\n\n\t\tthisCache = thisCache.data;\n\t}\n\n\tif ( data !== undefined ) {\n\t\tthisCache[ jQuery.camelCase( name ) ] = data;\n\t}\n\n\t// Check for both converted-to-camel and non-converted data property names\n\t// If a data property was specified\n\tif ( typeof name === \"string\" ) {\n\n\t\t// First Try to find as-is property data\n\t\tret = thisCache[ name ];\n\n\t\t// Test for null|undefined property data\n\t\tif ( ret == null ) {\n\n\t\t\t// Try to find the camelCased property\n\t\t\tret = thisCache[ jQuery.camelCase( name ) ];\n\t\t}\n\t} else {\n\t\tret = thisCache;\n\t}\n\n\treturn ret;\n}\n\nfunction internalRemoveData( elem, name, pvt ) {\n\tif ( !acceptData( elem ) ) {\n\t\treturn;\n\t}\n\n\tvar thisCache, i,\n\t\tisNode = elem.nodeType,\n\n\t\t// See jQuery.data for more information\n\t\tcache = isNode ? jQuery.cache : elem,\n\t\tid = isNode ? elem[ jQuery.expando ] : jQuery.expando;\n\n\t// If there is already no cache entry for this object, there is no\n\t// purpose in continuing\n\tif ( !cache[ id ] ) {\n\t\treturn;\n\t}\n\n\tif ( name ) {\n\n\t\tthisCache = pvt ? cache[ id ] : cache[ id ].data;\n\n\t\tif ( thisCache ) {\n\n\t\t\t// Support array or space separated string names for data keys\n\t\t\tif ( !jQuery.isArray( name ) ) {\n\n\t\t\t\t// try the string as a key before any manipulation\n\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\tname = [ name ];\n\t\t\t\t} else {\n\n\t\t\t\t\t// split the camel cased version by spaces unless a key with the spaces exists\n\t\t\t\t\tname = jQuery.camelCase( name );\n\t\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\t\tname = [ name ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tname = name.split( \" \" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// If \"name\" is an array of keys...\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\n\t\t\t\t// keys will be converted to camelCase.\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\n\t\t\t\t// both plain key and camelCase key. #12786\n\t\t\t\t// This will only penalize the array argument path.\n\t\t\t\tname = name.concat( jQuery.map( name, jQuery.camelCase ) );\n\t\t\t}\n\n\t\t\ti = name.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete thisCache[ name[ i ] ];\n\t\t\t}\n\n\t\t\t// If there is no data left in the cache, we want to continue\n\t\t\t// and let the cache object itself get destroyed\n\t\t\tif ( pvt ? !isEmptyDataObject( thisCache ) : !jQuery.isEmptyObject( thisCache ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// See jQuery.data for more information\n\tif ( !pvt ) {\n\t\tdelete cache[ id ].data;\n\n\t\t// Don't destroy the parent cache unless the internal data object\n\t\t// had been the only thing left in it\n\t\tif ( !isEmptyDataObject( cache[ id ] ) ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Destroy the cache\n\tif ( isNode ) {\n\t\tjQuery.cleanData( [ elem ], true );\n\n\t// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)\n\t/* jshint eqeqeq: false */\n\t} else if ( support.deleteExpando || cache != cache.window ) {\n\t\t/* jshint eqeqeq: true */\n\t\tdelete cache[ id ];\n\n\t// When all else fails, undefined\n\t} else {\n\t\tcache[ id ] = undefined;\n\t}\n}\n\njQuery.extend( {\n\tcache: {},\n\n\t// The following elements (space-suffixed to avoid Object.prototype collisions)\n\t// throw uncatchable exceptions if you attempt to set expando properties\n\tnoData: {\n\t\t\"applet \": true,\n\t\t\"embed \": true,\n\n\t\t// ...but Flash objects (which have this classid) *can* handle expandos\n\t\t\"object \": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n\t},\n\n\thasData: function( elem ) {\n\t\telem = elem.nodeType ? jQuery.cache[ elem[ jQuery.expando ] ] : elem[ jQuery.expando ];\n\t\treturn !!elem && !isEmptyDataObject( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn internalData( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\treturn internalRemoveData( elem, name );\n\t},\n\n\t// For internal use only.\n\t_data: function( elem, name, data ) {\n\t\treturn internalData( elem, name, data, true );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\treturn internalRemoveData( elem, name, true );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Special expections of .data basically thwart jQuery.access,\n\t\t// so implement the relevant behavior ourselves\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = jQuery.data( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !jQuery._data( elem, \"parsedAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE11+\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tjQuery._data( elem, \"parsedAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tjQuery.data( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn arguments.length > 1 ?\n\n\t\t\t// Sets one value\n\t\t\tthis.each( function() {\n\t\t\t\tjQuery.data( this, key, value );\n\t\t\t} ) :\n\n\t\t\t// Gets one value\n\t\t\t// Try to fetch any internally stored data first\n\t\t\telem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeData( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = jQuery._data( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || jQuery.isArray( data ) ) {\n\t\t\t\t\tqueue = jQuery._data( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// not intended for public consumption - generates a queueHooks object,\n\t// or returns the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn jQuery._data( elem, key ) || jQuery._data( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tjQuery._removeData( elem, type + \"queue\" );\n\t\t\t\tjQuery._removeData( elem, key );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = jQuery._data( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\n\n\n( function() {\n\tvar shrinkWrapBlocksVal;\n\n\tsupport.shrinkWrapBlocks = function() {\n\t\tif ( shrinkWrapBlocksVal != null ) {\n\t\t\treturn shrinkWrapBlocksVal;\n\t\t}\n\n\t\t// Will be changed later if needed.\n\t\tshrinkWrapBlocksVal = false;\n\n\t\t// Minified: var b,c,d\n\t\tvar div, body, container;\n\n\t\tbody = document.getElementsByTagName( \"body\" )[ 0 ];\n\t\tif ( !body || !body.style ) {\n\n\t\t\t// Test fired too early or in an unsupported environment, exit.\n\t\t\treturn;\n\t\t}\n\n\t\t// Setup\n\t\tdiv = document.createElement( \"div\" );\n\t\tcontainer = document.createElement( \"div\" );\n\t\tcontainer.style.cssText = \"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\";\n\t\tbody.appendChild( container ).appendChild( div );\n\n\t\t// Support: IE6\n\t\t// Check if elements with layout shrink-wrap their children\n\t\tif ( typeof div.style.zoom !== \"undefined\" ) {\n\n\t\t\t// Reset CSS: box-sizing; display; margin; border\n\t\t\tdiv.style.cssText =\n\n\t\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;\" +\n\t\t\t\t\"box-sizing:content-box;display:block;margin:0;border:0;\" +\n\t\t\t\t\"padding:1px;width:1px;zoom:1\";\n\t\t\tdiv.appendChild( document.createElement( \"div\" ) ).style.width = \"5px\";\n\t\t\tshrinkWrapBlocksVal = div.offsetWidth !== 3;\n\t\t}\n\n\t\tbody.removeChild( container );\n\n\t\treturn shrinkWrapBlocksVal;\n\t};\n\n} )();\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar isHidden = function( elem, el ) {\n\n\t\t// isHidden might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\t\treturn jQuery.css( elem, \"display\" ) === \"none\" ||\n\t\t\t!jQuery.contains( elem.ownerDocument, elem );\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted,\n\t\tscale = 1,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() { return tween.cur(); } :\n\t\t\tfunction() { return jQuery.css( elem, prop, \"\" ); },\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\tdo {\n\n\t\t\t// If previous iteration zeroed out, double until we get *something*.\n\t\t\t// Use string for doubling so we don't accidentally see scale as unchanged below\n\t\t\tscale = scale || \".5\";\n\n\t\t\t// Adjust and apply\n\t\t\tinitialInUnit = initialInUnit / scale;\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Update scale, tolerating zero or NaN from tween.cur()\n\t\t// Break the loop if scale is unchanged or perfect, or if we've just had enough.\n\t\t} while (\n\t\t\tscale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations\n\t\t);\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlength = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( jQuery.type( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !jQuery.isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ],\n\t\t\t\t\tkey,\n\t\t\t\t\traw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn chainable ?\n\t\telems :\n\n\t\t// Gets\n\t\tbulk ?\n\t\t\tfn.call( elems ) :\n\t\t\tlength ? fn( elems[ 0 ], key ) : emptyGet;\n};\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([\\w:-]+)/ );\n\nvar rscriptType = ( /^$|\\/(?:java|ecma)script/i );\n\nvar rleadingWhitespace = ( /^\\s+/ );\n\nvar nodeNames = \"abbr|article|aside|audio|bdi|canvas|data|datalist|\" +\n\t\t\"details|dialog|figcaption|figure|footer|header|hgroup|main|\" +\n\t\t\"mark|meter|nav|output|picture|progress|section|summary|template|time|video\";\n\n\n\nfunction createSafeFragment( document ) {\n\tvar list = nodeNames.split( \"|\" ),\n\t\tsafeFrag = document.createDocumentFragment();\n\n\tif ( safeFrag.createElement ) {\n\t\twhile ( list.length ) {\n\t\t\tsafeFrag.createElement(\n\t\t\t\tlist.pop()\n\t\t\t);\n\t\t}\n\t}\n\treturn safeFrag;\n}\n\n\n( function() {\n\tvar div = document.createElement( \"div\" ),\n\t\tfragment = document.createDocumentFragment(),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Setup\n\tdiv.innerHTML = \"
            a\";\n\n\t// IE strips leading whitespace when .innerHTML is used\n\tsupport.leadingWhitespace = div.firstChild.nodeType === 3;\n\n\t// Make sure that tbody elements aren't automatically inserted\n\t// IE will insert them into empty tables\n\tsupport.tbody = !div.getElementsByTagName( \"tbody\" ).length;\n\n\t// Make sure that link elements get serialized correctly by innerHTML\n\t// This requires a wrapper element in IE\n\tsupport.htmlSerialize = !!div.getElementsByTagName( \"link\" ).length;\n\n\t// Makes sure cloning an html5 element does not cause problems\n\t// Where outerHTML is undefined, this still works\n\tsupport.html5Clone =\n\t\tdocument.createElement( \"nav\" ).cloneNode( true ).outerHTML !== \"<:nav>\";\n\n\t// Check if a disconnected checkbox will retain its checked\n\t// value of true after appended to the DOM (IE6/7)\n\tinput.type = \"checkbox\";\n\tinput.checked = true;\n\tfragment.appendChild( input );\n\tsupport.appendChecked = input.checked;\n\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\t// Support: IE6-IE11+\n\tdiv.innerHTML = \"\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// #11217 - WebKit loses check when the name is after the checked attribute\n\tfragment.appendChild( div );\n\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput = document.createElement( \"input\" );\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3\n\t// old WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE<9\n\t// Cloned elements keep attachEvent handlers, we use addEventListener on IE9+\n\tsupport.noCloneEvent = !!div.addEventListener;\n\n\t// Support: IE<9\n\t// Since attributes and properties are the same in IE,\n\t// cleanData must set properties to undefined rather than use removeAttribute\n\tdiv[ jQuery.expando ] = 1;\n\tsupport.attributes = !div.getAttribute( jQuery.expando );\n} )();\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\toption: [ 1, \"\" ],\n\tlegend: [ 1, \"
            \", \"
            \" ],\n\tarea: [ 1, \"\", \"\" ],\n\n\t// Support: IE8\n\tparam: [ 1, \"\", \"\" ],\n\tthead: [ 1, \"\", \"
            \" ],\n\ttr: [ 2, \"\", \"
            \" ],\n\tcol: [ 2, \"\", \"
            \" ],\n\ttd: [ 3, \"\", \"
            \" ],\n\n\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\n\t// unless wrapped in a div with non-breaking characters in front of it.\n\t_default: support.htmlSerialize ? [ 0, \"\", \"\" ] : [ 1, \"X
            \", \"
            \" ]\n};\n\n// Support: IE8-IE9\nwrapMap.optgroup = wrapMap.option;\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction getAll( context, tag ) {\n\tvar elems, elem,\n\t\ti = 0,\n\t\tfound = typeof context.getElementsByTagName !== \"undefined\" ?\n\t\t\tcontext.getElementsByTagName( tag || \"*\" ) :\n\t\t\ttypeof context.querySelectorAll !== \"undefined\" ?\n\t\t\t\tcontext.querySelectorAll( tag || \"*\" ) :\n\t\t\t\tundefined;\n\n\tif ( !found ) {\n\t\tfor ( found = [], elems = context.childNodes || context;\n\t\t\t( elem = elems[ i ] ) != null;\n\t\t\ti++\n\t\t) {\n\t\t\tif ( !tag || jQuery.nodeName( elem, tag ) ) {\n\t\t\t\tfound.push( elem );\n\t\t\t} else {\n\t\t\t\tjQuery.merge( found, getAll( elem, tag ) );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\n\t\tjQuery.merge( [ context ], found ) :\n\t\tfound;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; ( elem = elems[ i ] ) != null; i++ ) {\n\t\tjQuery._data(\n\t\t\telem,\n\t\t\t\"globalEval\",\n\t\t\t!refElements || jQuery._data( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/,\n\trtbody = / from table fragments\n\t\t\t\tif ( !support.tbody ) {\n\n\t\t\t\t\t// String was a , *may* have spurious \n\t\t\t\t\telem = tag === \"table\" && !rtbody.test( elem ) ?\n\t\t\t\t\t\ttmp.firstChild :\n\n\t\t\t\t\t\t// String was a bare or \n\t\t\t\t\t\twrap[ 1 ] === \"
            \" && !rtbody.test( elem ) ?\n\t\t\t\t\t\t\ttmp :\n\t\t\t\t\t\t\t0;\n\n\t\t\t\t\tj = elem && elem.childNodes.length;\n\t\t\t\t\twhile ( j-- ) {\n\t\t\t\t\t\tif ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), \"tbody\" ) &&\n\t\t\t\t\t\t\t!tbody.childNodes.length ) {\n\n\t\t\t\t\t\t\telem.removeChild( tbody );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Fix #12392 for WebKit and IE > 9\n\t\t\t\ttmp.textContent = \"\";\n\n\t\t\t\t// Fix #12392 for oldIE\n\t\t\t\twhile ( tmp.firstChild ) {\n\t\t\t\t\ttmp.removeChild( tmp.firstChild );\n\t\t\t\t}\n\n\t\t\t\t// Remember the top-level container for proper cleanup\n\t\t\t\ttmp = safe.lastChild;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Fix #11356: Clear elements from fragment\n\tif ( tmp ) {\n\t\tsafe.removeChild( tmp );\n\t}\n\n\t// Reset defaultChecked for any radios and checkboxes\n\t// about to be appended to the DOM in IE 6/7 (#8060)\n\tif ( !support.appendChecked ) {\n\t\tjQuery.grep( getAll( nodes, \"input\" ), fixDefaultChecked );\n\t}\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( safe.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( contains ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\ttmp = null;\n\n\treturn safe;\n}\n\n\n( function() {\n\tvar i, eventName,\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events)\n\tfor ( i in { submit: true, change: true, focusin: true } ) {\n\t\teventName = \"on\" + i;\n\n\t\tif ( !( support[ i ] = eventName in window ) ) {\n\n\t\t\t// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)\n\t\t\tdiv.setAttribute( eventName, \"t\" );\n\t\t\tsupport[ i ] = div.attributes[ eventName ].expando === false;\n\t\t}\n\t}\n\n\t// Null elements to avoid leaks in IE.\n\tdiv = null;\n} )();\n\n\nvar rformElems = /^(?:input|select|textarea)$/i,\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n\trfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE9\n// See #13393 for more info\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\t\tvar tmp, events, t, handleObjIn,\n\t\t\tspecial, eventHandle, handleObj,\n\t\t\thandlers, type, namespaces, origType,\n\t\t\telemData = jQuery._data( elem );\n\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" &&\n\t\t\t\t\t( !e || jQuery.event.triggered !== e.type ) ?\n\t\t\t\t\tjQuery.event.dispatch.apply( eventHandle.elem, arguments ) :\n\t\t\t\t\tundefined;\n\t\t\t};\n\n\t\t\t// Add elem as a property of the handle fn to prevent a memory leak\n\t\t\t// with IE non-native events\n\t\t\teventHandle.elem = elem;\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener/attachEvent if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\t// Bind the global event handler to the element\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle, false );\n\n\t\t\t\t\t} else if ( elem.attachEvent ) {\n\t\t\t\t\t\telem.attachEvent( \"on\" + type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t\t// Nullify elem to prevent memory leaks in IE\n\t\telem = null;\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\t\tvar j, handleObj, tmp,\n\t\t\torigCount, t, events,\n\t\t\tspecial, handlers, type,\n\t\t\tnamespaces, origType,\n\t\t\telemData = jQuery.hasData( elem ) && jQuery._data( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdelete elemData.handle;\n\n\t\t\t// removeData also checks for emptiness and clears the expando if empty\n\t\t\t// so use it instead of delete\n\t\t\tjQuery._removeData( elem, \"events\" );\n\t\t}\n\t},\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\t\tvar handle, ontype, cur,\n\t\t\tbubbleType, special, tmp, i,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( jQuery._data( cur, \"events\" ) || {} )[ event.type ] &&\n\t\t\t\tjQuery._data( cur, \"handle\" );\n\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif (\n\t\t\t\t( !special._default ||\n\t\t\t\t special._default.apply( eventPath.pop(), data ) === false\n\t\t\t\t) && acceptData( elem )\n\t\t\t) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\n\t\t\t\t// Can't use an .isFunction() check here because IE6/7 fails that test.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\t\t\t\t\ttry {\n\t\t\t\t\t\telem[ type ]();\n\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t// IE<9 dies on focus/blur to hidden element (#1486,#12518)\n\t\t\t\t\t\t// only reproducible on winXP IE8 native, not IE9 in IE8 mode\n\t\t\t\t\t}\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\tdispatch: function( event ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tevent = jQuery.event.fix( event );\n\n\t\tvar i, j, ret, matched, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\targs = slice.call( arguments ),\n\t\t\thandlers = ( jQuery._data( this, \"events\" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// Triggered event must either 1) have no namespace, or 2) have namespace(s)\n\t\t\t\t// a subset or equal to those in the bound event (both can have no namespace).\n\t\t\t\tif ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, matches, sel, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Support (at least): Chrome, IE9\n\t\t// Find delegate handlers\n\t\t// Black-hole SVG instance trees (#13180)\n\t\t//\n\t\t// Support: Firefox<=42+\n\t\t// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)\n\t\tif ( delegateCount && cur.nodeType &&\n\t\t\t( event.type !== \"click\" || isNaN( event.button ) || event.button < 1 ) ) {\n\n\t\t\t/* jshint eqeqeq: false */\n\t\t\tfor ( ; cur != this; cur = cur.parentNode || this ) {\n\t\t\t\t/* jshint eqeqeq: true */\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== \"click\" ) ) {\n\t\t\t\t\tmatches = [];\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matches[ sel ] ) {\n\t\t\t\t\t\t\tmatches.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matches.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matches } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\tfix: function( event ) {\n\t\tif ( event[ jQuery.expando ] ) {\n\t\t\treturn event;\n\t\t}\n\n\t\t// Create a writable copy of the event object and normalize some properties\n\t\tvar i, prop, copy,\n\t\t\ttype = event.type,\n\t\t\toriginalEvent = event,\n\t\t\tfixHook = this.fixHooks[ type ];\n\n\t\tif ( !fixHook ) {\n\t\t\tthis.fixHooks[ type ] = fixHook =\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\n\t\t\t\t{};\n\t\t}\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\n\n\t\tevent = new jQuery.Event( originalEvent );\n\n\t\ti = copy.length;\n\t\twhile ( i-- ) {\n\t\t\tprop = copy[ i ];\n\t\t\tevent[ prop ] = originalEvent[ prop ];\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Fix target property (#1925)\n\t\tif ( !event.target ) {\n\t\t\tevent.target = originalEvent.srcElement || document;\n\t\t}\n\n\t\t// Support: Safari 6-8+\n\t\t// Target should not be a text node (#504, #13143)\n\t\tif ( event.target.nodeType === 3 ) {\n\t\t\tevent.target = event.target.parentNode;\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)\n\t\tevent.metaKey = !!event.metaKey;\n\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\n\t},\n\n\t// Includes some event props shared by KeyEvent and MouseEvent\n\tprops: ( \"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase \" +\n\t\t\"metaKey relatedTarget shiftKey target timeStamp view which\" ).split( \" \" ),\n\n\tfixHooks: {},\n\n\tkeyHooks: {\n\t\tprops: \"char charCode key keyCode\".split( \" \" ),\n\t\tfilter: function( event, original ) {\n\n\t\t\t// Add which for key events\n\t\t\tif ( event.which == null ) {\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tmouseHooks: {\n\t\tprops: ( \"button buttons clientX clientY fromElement offsetX offsetY \" +\n\t\t\t\"pageX pageY screenX screenY toElement\" ).split( \" \" ),\n\t\tfilter: function( event, original ) {\n\t\t\tvar body, eventDoc, doc,\n\t\t\t\tbutton = original.button,\n\t\t\t\tfromElement = original.fromElement;\n\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\n\t\t\t\teventDoc = event.target.ownerDocument || document;\n\t\t\t\tdoc = eventDoc.documentElement;\n\t\t\t\tbody = eventDoc.body;\n\n\t\t\t\tevent.pageX = original.clientX +\n\t\t\t\t\t( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -\n\t\t\t\t\t( doc && doc.clientLeft || body && body.clientLeft || 0 );\n\t\t\t\tevent.pageY = original.clientY +\n\t\t\t\t\t( doc && doc.scrollTop || body && body.scrollTop || 0 ) -\n\t\t\t\t\t( doc && doc.clientTop || body && body.clientTop || 0 );\n\t\t\t}\n\n\t\t\t// Add relatedTarget, if necessary\n\t\t\tif ( !event.relatedTarget && fromElement ) {\n\t\t\t\tevent.relatedTarget = fromElement === event.target ?\n\t\t\t\t\toriginal.toElement :\n\t\t\t\t\tfromElement;\n\t\t\t}\n\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\t\t// Note: button is not normalized, so don't use it\n\t\t\tif ( !event.which && button !== undefined ) {\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tfocus: {\n\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t\t// If we error on focus to hidden element (#1486, #12518),\n\t\t\t\t\t\t// let .trigger() run the handlers\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusin\"\n\t\t},\n\t\tblur: {\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusout\"\n\t\t},\n\t\tclick: {\n\n\t\t\t// For checkbox, fire native event so checked state will be right\n\t\t\ttrigger: function() {\n\t\t\t\tif ( jQuery.nodeName( this, \"input\" ) && this.type === \"checkbox\" && this.click ) {\n\t\t\t\t\tthis.click();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, don't fire native .click() on links\n\t\t\t_default: function( event ) {\n\t\t\t\treturn jQuery.nodeName( event.target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\n\t\t\t\t// Previously, `originalEvent: {}` was set here, so stopPropagation call\n\t\t\t\t// would not be triggered on donor event, since in our own\n\t\t\t\t// jQuery.event.stopPropagation function we had a check for existence of\n\t\t\t\t// originalEvent.stopPropagation method, so, consequently it would be a noop.\n\t\t\t\t//\n\t\t\t\t// Guard for simulated events was moved to jQuery.event.stopPropagation function\n\t\t\t\t// since `originalEvent` should point to the original event for the\n\t\t\t\t// constancy with other events and for more focused logic\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\n\t\tif ( e.isDefaultPrevented() ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n};\n\njQuery.removeEvent = document.removeEventListener ?\n\tfunction( elem, type, handle ) {\n\n\t\t// This \"if\" is needed for plain objects\n\t\tif ( elem.removeEventListener ) {\n\t\t\telem.removeEventListener( type, handle );\n\t\t}\n\t} :\n\tfunction( elem, type, handle ) {\n\t\tvar name = \"on\" + type;\n\n\t\tif ( elem.detachEvent ) {\n\n\t\t\t// #8545, #7054, preventing memory leaks for custom events in IE6-8\n\t\t\t// detachEvent needed property on element, by name of that event,\n\t\t\t// to properly expose it to GC\n\t\t\tif ( typeof elem[ name ] === \"undefined\" ) {\n\t\t\t\telem[ name ] = null;\n\t\t\t}\n\n\t\t\telem.detachEvent( name, handle );\n\t\t}\n\t};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: IE < 9, Android < 4.0\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\t\tif ( !e ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If preventDefault exists, run it on the original event\n\t\tif ( e.preventDefault ) {\n\t\t\te.preventDefault();\n\n\t\t// Support: IE\n\t\t// Otherwise set the returnValue property of the original event to false\n\t\t} else {\n\t\t\te.returnValue = false;\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( !e || this.isSimulated ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If stopPropagation exists, run it on the original event\n\t\tif ( e.stopPropagation ) {\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\t// Support: IE\n\t\t// Set the cancelBubble property of the original event to true\n\t\te.cancelBubble = true;\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && e.stopImmediatePropagation ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://code.google.com/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\n// IE submit delegation\nif ( !support.submit ) {\n\n\tjQuery.event.special.submit = {\n\t\tsetup: function() {\n\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Lazy-add a submit handler when a descendant form may potentially be submitted\n\t\t\tjQuery.event.add( this, \"click._submit keypress._submit\", function( e ) {\n\n\t\t\t\t// Node name check avoids a VML-related crash in IE (#9807)\n\t\t\t\tvar elem = e.target,\n\t\t\t\t\tform = jQuery.nodeName( elem, \"input\" ) || jQuery.nodeName( elem, \"button\" ) ?\n\n\t\t\t\t\t\t// Support: IE <=8\n\t\t\t\t\t\t// We use jQuery.prop instead of elem.form\n\t\t\t\t\t\t// to allow fixing the IE8 delegated submit issue (gh-2332)\n\t\t\t\t\t\t// by 3rd party polyfills/workarounds.\n\t\t\t\t\t\tjQuery.prop( elem, \"form\" ) :\n\t\t\t\t\t\tundefined;\n\n\t\t\t\tif ( form && !jQuery._data( form, \"submit\" ) ) {\n\t\t\t\t\tjQuery.event.add( form, \"submit._submit\", function( event ) {\n\t\t\t\t\t\tevent._submitBubble = true;\n\t\t\t\t\t} );\n\t\t\t\t\tjQuery._data( form, \"submit\", true );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// return undefined since we don't need an event listener\n\t\t},\n\n\t\tpostDispatch: function( event ) {\n\n\t\t\t// If form was submitted by the user, bubble the event up the tree\n\t\t\tif ( event._submitBubble ) {\n\t\t\t\tdelete event._submitBubble;\n\t\t\t\tif ( this.parentNode && !event.isTrigger ) {\n\t\t\t\t\tjQuery.event.simulate( \"submit\", this.parentNode, event );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tteardown: function() {\n\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Remove delegated handlers; cleanData eventually reaps submit handlers attached above\n\t\t\tjQuery.event.remove( this, \"._submit\" );\n\t\t}\n\t};\n}\n\n// IE change delegation and checkbox/radio fix\nif ( !support.change ) {\n\n\tjQuery.event.special.change = {\n\n\t\tsetup: function() {\n\n\t\t\tif ( rformElems.test( this.nodeName ) ) {\n\n\t\t\t\t// IE doesn't fire change on a check/radio until blur; trigger it on click\n\t\t\t\t// after a propertychange. Eat the blur-change in special.change.handle.\n\t\t\t\t// This still fires onchange a second time for check/radio after blur.\n\t\t\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\n\t\t\t\t\tjQuery.event.add( this, \"propertychange._change\", function( event ) {\n\t\t\t\t\t\tif ( event.originalEvent.propertyName === \"checked\" ) {\n\t\t\t\t\t\t\tthis._justChanged = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\tjQuery.event.add( this, \"click._change\", function( event ) {\n\t\t\t\t\t\tif ( this._justChanged && !event.isTrigger ) {\n\t\t\t\t\t\t\tthis._justChanged = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Allow triggered, simulated change events (#11500)\n\t\t\t\t\t\tjQuery.event.simulate( \"change\", this, event );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Delegated event; lazy-add a change handler on descendant inputs\n\t\t\tjQuery.event.add( this, \"beforeactivate._change\", function( e ) {\n\t\t\t\tvar elem = e.target;\n\n\t\t\t\tif ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, \"change\" ) ) {\n\t\t\t\t\tjQuery.event.add( elem, \"change._change\", function( event ) {\n\t\t\t\t\t\tif ( this.parentNode && !event.isSimulated && !event.isTrigger ) {\n\t\t\t\t\t\t\tjQuery.event.simulate( \"change\", this.parentNode, event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\tjQuery._data( elem, \"change\", true );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\n\t\thandle: function( event ) {\n\t\t\tvar elem = event.target;\n\n\t\t\t// Swallow native change events from checkbox/radio, we already triggered them above\n\t\t\tif ( this !== elem || event.isSimulated || event.isTrigger ||\n\t\t\t\t( elem.type !== \"radio\" && elem.type !== \"checkbox\" ) ) {\n\n\t\t\t\treturn event.handleObj.handler.apply( this, arguments );\n\t\t\t}\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tjQuery.event.remove( this, \"._change\" );\n\n\t\t\treturn !rformElems.test( this.nodeName );\n\t\t}\n\t};\n}\n\n// Support: Firefox\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome, Safari\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = jQuery._data( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tjQuery._data( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = jQuery._data( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tjQuery._removeData( doc, fix );\n\t\t\t\t} else {\n\t\t\t\t\tjQuery._data( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event ) dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t},\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\nvar rinlinejQuery = / jQuery\\d+=\"(?:null|\\d+)\"/g,\n\trnoshimcache = new RegExp( \"<(?:\" + nodeNames + \")[\\\\s/>]\", \"i\" ),\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi,\n\n\t// Support: IE 10-11, Edge 10240+\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /\\s*$/g,\n\tsafeFragment = createSafeFragment( document ),\n\tfragmentDiv = safeFragment.appendChild( document.createElement( \"div\" ) );\n\n// Support: IE<8\n// Manipulating tables requires a tbody\nfunction manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName( \"tbody\" )[ 0 ] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement( \"tbody\" ) ) :\n\t\telem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tvar match = rscriptTypeMasked.exec( elem.type );\n\tif ( match ) {\n\t\telem.type = match[ 1 ];\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tif ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {\n\t\treturn;\n\t}\n\n\tvar type, i, l,\n\t\toldData = jQuery._data( src ),\n\t\tcurData = jQuery._data( dest, oldData ),\n\t\tevents = oldData.events;\n\n\tif ( events ) {\n\t\tdelete curData.handle;\n\t\tcurData.events = {};\n\n\t\tfor ( type in events ) {\n\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t}\n\t\t}\n\t}\n\n\t// make the cloned public data object a copy from the original\n\tif ( curData.data ) {\n\t\tcurData.data = jQuery.extend( {}, curData.data );\n\t}\n}\n\nfunction fixCloneNodeIssues( src, dest ) {\n\tvar nodeName, e, data;\n\n\t// We do not need to do anything for non-Elements\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\tnodeName = dest.nodeName.toLowerCase();\n\n\t// IE6-8 copies events bound via attachEvent when using cloneNode.\n\tif ( !support.noCloneEvent && dest[ jQuery.expando ] ) {\n\t\tdata = jQuery._data( dest );\n\n\t\tfor ( e in data.events ) {\n\t\t\tjQuery.removeEvent( dest, e, data.handle );\n\t\t}\n\n\t\t// Event data gets referenced instead of copied if the expando gets copied too\n\t\tdest.removeAttribute( jQuery.expando );\n\t}\n\n\t// IE blanks contents when cloning scripts, and tries to evaluate newly-set text\n\tif ( nodeName === \"script\" && dest.text !== src.text ) {\n\t\tdisableScript( dest ).text = src.text;\n\t\trestoreScript( dest );\n\n\t// IE6-10 improperly clones children of object elements using classid.\n\t// IE10 throws NoModificationAllowedError if parent is null, #12132.\n\t} else if ( nodeName === \"object\" ) {\n\t\tif ( dest.parentNode ) {\n\t\t\tdest.outerHTML = src.outerHTML;\n\t\t}\n\n\t\t// This path appears unavoidable for IE9. When cloning an object\n\t\t// element in IE9, the outerHTML strategy above is not sufficient.\n\t\t// If the src has innerHTML and the destination does not,\n\t\t// copy the src.innerHTML into the dest.innerHTML. #10324\n\t\tif ( support.html5Clone && ( src.innerHTML && !jQuery.trim( dest.innerHTML ) ) ) {\n\t\t\tdest.innerHTML = src.innerHTML;\n\t\t}\n\n\t} else if ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\n\t\t// IE6-8 fails to persist the checked state of a cloned checkbox\n\t\t// or radio button. Worse, IE6-7 fail to give the cloned element\n\t\t// a checked appearance if the defaultChecked value isn't also set\n\n\t\tdest.defaultChecked = dest.checked = src.checked;\n\n\t\t// IE6-7 get confused and end up setting the value of a cloned\n\t\t// checkbox/radio button to an empty string instead of \"on\"\n\t\tif ( dest.value !== src.value ) {\n\t\t\tdest.value = src.value;\n\t\t}\n\n\t// IE6-8 fails to return the selected option to the default selected\n\t// state when cloning options\n\t} else if ( nodeName === \"option\" ) {\n\t\tdest.defaultSelected = dest.selected = src.defaultSelected;\n\n\t// IE6-8 fails to set the defaultValue to the correct value when\n\t// cloning other types of input fields\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = concat.apply( [], args );\n\n\tvar first, node, hasScripts,\n\t\tscripts, doc, fragment,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tisFunction = jQuery.isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( isFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( isFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!jQuery._data( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tjQuery.globalEval(\n\t\t\t\t\t\t\t\t( node.text || node.textContent || node.innerHTML || \"\" )\n\t\t\t\t\t\t\t\t\t.replace( rcleanScript, \"\" )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Fix #11809: Avoid leaking memory\n\t\t\tfragment = first = null;\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\telems = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = elems[ i ] ) != null; i++ ) {\n\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && jQuery.contains( node.ownerDocument, node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html.replace( rxhtmlTag, \"<$1>\" );\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar destElements, node, clone, i, srcElements,\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\n\n\t\tif ( support.html5Clone || jQuery.isXMLDoc( elem ) ||\n\t\t\t!rnoshimcache.test( \"<\" + elem.nodeName + \">\" ) ) {\n\n\t\t\tclone = elem.cloneNode( true );\n\n\t\t// IE<=8 does not properly clone detached, unknown element nodes\n\t\t} else {\n\t\t\tfragmentDiv.innerHTML = elem.outerHTML;\n\t\t\tfragmentDiv.removeChild( clone = fragmentDiv.firstChild );\n\t\t}\n\n\t\tif ( ( !support.noCloneEvent || !support.noCloneChecked ) &&\n\t\t\t\t( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\t// Fix all IE cloning issues\n\t\t\tfor ( i = 0; ( node = srcElements[ i ] ) != null; ++i ) {\n\n\t\t\t\t// Ensure that the destination node is not null; Fixes #9587\n\t\t\t\tif ( destElements[ i ] ) {\n\t\t\t\t\tfixCloneNodeIssues( node, destElements[ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0; ( node = srcElements[ i ] ) != null; i++ ) {\n\t\t\t\t\tcloneCopyEvent( node, destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\tdestElements = srcElements = node = null;\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems, /* internal */ forceAcceptData ) {\n\t\tvar elem, type, id, data,\n\t\t\ti = 0,\n\t\t\tinternalKey = jQuery.expando,\n\t\t\tcache = jQuery.cache,\n\t\t\tattributes = support.attributes,\n\t\t\tspecial = jQuery.event.special;\n\n\t\tfor ( ; ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\tif ( forceAcceptData || acceptData( elem ) ) {\n\n\t\t\t\tid = elem[ internalKey ];\n\t\t\t\tdata = id && cache[ id ];\n\n\t\t\t\tif ( data ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove cache only if it was not already removed by jQuery.event.remove\n\t\t\t\t\tif ( cache[ id ] ) {\n\n\t\t\t\t\t\tdelete cache[ id ];\n\n\t\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t\t// IE does not allow us to delete expando properties from nodes\n\t\t\t\t\t\t// IE creates expando attributes along with the property\n\t\t\t\t\t\t// IE does not have a removeAttribute function on Document nodes\n\t\t\t\t\t\tif ( !attributes && typeof elem.removeAttribute !== \"undefined\" ) {\n\t\t\t\t\t\t\telem.removeAttribute( internalKey );\n\n\t\t\t\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t\t\t\t// https://code.google.com/p/chromium/issues/detail?id=378607\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telem[ internalKey ] = undefined;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdeletedIds.push( id );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\n\t// Keep domManip exposed until 3.0 (gh-2225)\n\tdomManip: domManip,\n\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().append(\n\t\t\t\t\t( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value )\n\t\t\t\t);\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\n\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t}\n\n\t\t\t// Remove any remaining nodes\n\t\t\twhile ( elem.firstChild ) {\n\t\t\t\telem.removeChild( elem.firstChild );\n\t\t\t}\n\n\t\t\t// If this is a select, ensure that it displays empty (#12336)\n\t\t\t// Support: IE<9\n\t\t\tif ( elem.options && jQuery.nodeName( elem, \"select\" ) ) {\n\t\t\t\telem.options.length = 0;\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined ) {\n\t\t\t\treturn elem.nodeType === 1 ?\n\t\t\t\t\telem.innerHTML.replace( rinlinejQuery, \"\" ) :\n\t\t\t\t\tundefined;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t( support.htmlSerialize || !rnoshimcache.test( value ) ) &&\n\t\t\t\t( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\telem = this[ i ] || {};\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\ti = 0,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\n\n\nvar iframe,\n\telemdisplay = {\n\n\t\t// Support: Firefox\n\t\t// We have to pre-define these values for FF (#10227)\n\t\tHTML: \"block\",\n\t\tBODY: \"block\"\n\t};\n\n/**\n * Retrieve the actual display of a element\n * @param {String} name nodeName of the element\n * @param {Object} doc Document object\n */\n\n// Called only from within defaultDisplay\nfunction actualDisplay( name, doc ) {\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\n\n\t\tdisplay = jQuery.css( elem[ 0 ], \"display\" );\n\n\t// We don't have any data stored on the element,\n\t// so use \"detach\" method as fast way to get rid of the element\n\telem.detach();\n\n\treturn display;\n}\n\n/**\n * Try to determine the default display value of an element\n * @param {String} nodeName\n */\nfunction defaultDisplay( nodeName ) {\n\tvar doc = document,\n\t\tdisplay = elemdisplay[ nodeName ];\n\n\tif ( !display ) {\n\t\tdisplay = actualDisplay( nodeName, doc );\n\n\t\t// If the simple way fails, read from inside an iframe\n\t\tif ( display === \"none\" || !display ) {\n\n\t\t\t// Use the already-created iframe if possible\n\t\t\tiframe = ( iframe || jQuery( \"';\r\n break;\r\n case 3:\r\n delete config.title;\r\n delete config.closeBtn;\r\n config.icon === -1 && (config.icon === 0);\r\n layer.closeAll('loading');\r\n break;\r\n case 4:\r\n conType || (config.content = [config.content, 'body']);\r\n config.follow = config.content[1];\r\n config.content = config.content[0] + '';\r\n delete config.title;\r\n config.tips = typeof config.tips === 'object' ? config.tips : [config.tips, true];\r\n config.tipsMore || layer.closeAll('tips');\r\n break;\r\n }\r\n \r\n // 建立容器\r\n that.vessel(conType, function(html, titleHTML, moveElem){\r\n body.append(html[0]);\r\n conType ? function(){\r\n (config.type == 2 || config.type == 4) ? function(){\r\n $('body').append(html[1]);\r\n }() : function(){\r\n if(!content.parents('.'+doms[0])[0]){\r\n content.data('display', content.css('display')).show().addClass('layui-layer-wrap').wrap(html[1]);\r\n $('#'+ doms[0] + times).find('.'+doms[5]).before(titleHTML);\r\n }\r\n }();\r\n }() : body.append(html[1]);\r\n $('#'+ doms.MOVE)[0] || body.append(ready.moveElem = moveElem);\r\n \r\n that.layero = $('#'+ doms[0] + times);\r\n that.shadeo = $('#'+ doms.SHADE + times);\r\n \r\n config.scrollbar || ready.setScrollbar(times);\r\n }).auto(times);\r\n \r\n // 遮罩\r\n that.shadeo.css({\r\n 'background-color': config.shade[1] || '#000'\r\n ,'opacity': config.shade[0] || config.shade\r\n });\r\n\r\n config.type == 2 && layer.ie == 6 && that.layero.find('iframe').attr('src', content[0]);\r\n\r\n // 坐标自适应浏览器窗口尺寸\r\n config.type == 4 ? that.tips() : function(){\r\n that.offset()\r\n // 首次弹出时,若 css 尚未加载,则等待 css 加载完毕后,重新设定尺寸\r\n parseInt(ready.getStyle(document.getElementById(doms.MOVE), 'z-index')) || function(){\r\n that.layero.css('visibility', 'hidden');\r\n layer.ready(function(){\r\n that.offset();\r\n that.layero.css('visibility', 'visible');\r\n });\r\n }();\r\n }();\r\n \r\n // 若是固定定位,则跟随 resize 事件来自适应坐标\r\n if(config.fixed){\r\n if(!ready.events.resize[that.index]){\r\n ready.events.resize[that.index] = function(){\r\n that.resize();\r\n };\r\n // 此处 resize 事件不会一直叠加,当关闭弹层时会移除该事件\r\n win.on('resize', ready.events.resize[that.index]);\r\n }\r\n }\r\n \r\n config.time <= 0 || setTimeout(function(){\r\n layer.close(that.index);\r\n }, config.time);\r\n that.move().callback();\r\n \r\n // 为兼容 jQuery3.0 的 css 动画影响元素尺寸计算\r\n if(doms.anim[config.anim]){\r\n var animClass = 'layer-anim '+ doms.anim[config.anim];\r\n that.layero.addClass(animClass).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){\r\n $(this).removeClass(animClass);\r\n });\r\n }\r\n \r\n // 记录配置信息\r\n that.layero.data('config', config);\r\n};\r\n\r\n// 当前实例的 resize 事件\r\nClass.pt.resize = function(){\r\n var that = this;\r\n var config = that.config;\r\n \r\n that.offset();\r\n (/^\\d+%$/.test(config.area[0]) || /^\\d+%$/.test(config.area[1])) && that.auto(that.index);\r\n config.type == 4 && that.tips();\r\n};\r\n\r\n// 自适应\r\nClass.pt.auto = function(index){\r\n var that = this, config = that.config, layero = $('#'+ doms[0] + index);\r\n \r\n if(config.area[0] === '' && config.maxWidth > 0){\r\n // 适配 ie7\r\n if(layer.ie && layer.ie < 8 && config.btn){\r\n layero.width(layero.innerWidth());\r\n }\r\n layero.outerWidth() > config.maxWidth && layero.width(config.maxWidth);\r\n }\r\n \r\n var area = [layero.innerWidth(), layero.innerHeight()];\r\n var titHeight = layero.find(doms[1]).outerHeight() || 0;\r\n var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;\r\n var setHeight = function(elem){\r\n elem = layero.find(elem);\r\n elem.height(area[1] - titHeight - btnHeight - 2*(parseFloat(elem.css('padding-top'))|0));\r\n };\r\n\r\n switch(config.type){\r\n case 2: \r\n setHeight('iframe');\r\n break;\r\n default:\r\n if(config.area[1] === ''){\r\n if(config.maxHeight > 0 && layero.outerHeight() > config.maxHeight){\r\n area[1] = config.maxHeight;\r\n setHeight('.'+doms[5]);\r\n } else if(config.fixed && area[1] >= win.height()){\r\n area[1] = win.height();\r\n setHeight('.'+doms[5]);\r\n }\r\n } else {\r\n setHeight('.'+doms[5]);\r\n }\r\n break;\r\n }\r\n \r\n return that;\r\n};\r\n\r\n// 计算坐标\r\nClass.pt.offset = function(){\r\n var that = this, config = that.config, layero = that.layero;\r\n var area = [layero.outerWidth(), layero.outerHeight()];\r\n var type = typeof config.offset === 'object';\r\n that.offsetTop = (win.height() - area[1])/2;\r\n that.offsetLeft = (win.width() - area[0])/2;\r\n \r\n if(type){\r\n that.offsetTop = config.offset[0];\r\n that.offsetLeft = config.offset[1]||that.offsetLeft;\r\n } else if(config.offset !== 'auto'){\r\n \r\n if(config.offset === 't'){ // 上\r\n that.offsetTop = 0;\r\n } else if(config.offset === 'r'){ // 右\r\n that.offsetLeft = win.width() - area[0];\r\n } else if(config.offset === 'b'){ // 下\r\n that.offsetTop = win.height() - area[1];\r\n } else if(config.offset === 'l'){ // 左\r\n that.offsetLeft = 0;\r\n } else if(config.offset === 'lt'){ // 左上\r\n that.offsetTop = 0;\r\n that.offsetLeft = 0;\r\n } else if(config.offset === 'lb'){ // 左下\r\n that.offsetTop = win.height() - area[1];\r\n that.offsetLeft = 0;\r\n } else if(config.offset === 'rt'){ // 右上\r\n that.offsetTop = 0;\r\n that.offsetLeft = win.width() - area[0];\r\n } else if(config.offset === 'rb'){ // 右下\r\n that.offsetTop = win.height() - area[1];\r\n that.offsetLeft = win.width() - area[0];\r\n } else {\r\n that.offsetTop = config.offset;\r\n }\r\n \r\n }\r\n \r\n if(!config.fixed){\r\n that.offsetTop = /%$/.test(that.offsetTop) ? \r\n win.height()*parseFloat(that.offsetTop)/100\r\n : parseFloat(that.offsetTop);\r\n that.offsetLeft = /%$/.test(that.offsetLeft) ? \r\n win.width()*parseFloat(that.offsetLeft)/100\r\n : parseFloat(that.offsetLeft);\r\n that.offsetTop += win.scrollTop();\r\n that.offsetLeft += win.scrollLeft();\r\n }\r\n \r\n // 最小化窗口时的自适应\r\n if(layero.data('maxminStatus') === 'min'){\r\n that.offsetTop = win.height() - (layero.find(doms[1]).outerHeight() || 0);\r\n that.offsetLeft = layero.css('left');\r\n }\r\n\r\n // 设置坐标\r\n layero.css({\r\n top: that.offsetTop, \r\n left: that.offsetLeft\r\n });\r\n};\r\n\r\n// Tips\r\nClass.pt.tips = function(){\r\n var that = this, config = that.config, layero = that.layero;\r\n var layArea = [layero.outerWidth(), layero.outerHeight()], follow = $(config.follow);\r\n if(!follow[0]) follow = $('body');\r\n var goal = {\r\n width: follow.outerWidth(),\r\n height: follow.outerHeight(),\r\n top: follow.offset().top,\r\n left: follow.offset().left\r\n }, tipsG = layero.find('.layui-layer-TipsG');\r\n \r\n var guide = config.tips[0];\r\n config.tips[1] || tipsG.remove();\r\n \r\n goal.autoLeft = function(){\r\n if(goal.left + layArea[0] - win.width() > 0){\r\n goal.tipLeft = goal.left + goal.width - layArea[0];\r\n tipsG.css({right: 12, left: 'auto'});\r\n } else {\r\n goal.tipLeft = goal.left;\r\n }\r\n };\r\n \r\n // 辨别 tips 的方位\r\n goal.where = [function(){ // 上 \r\n goal.autoLeft();\r\n goal.tipTop = goal.top - layArea[1] - 10;\r\n tipsG.removeClass('layui-layer-TipsB').addClass('layui-layer-TipsT').css('border-right-color', config.tips[1]);\r\n }, function(){ // 右\r\n goal.tipLeft = goal.left + goal.width + 10;\r\n goal.tipTop = goal.top;\r\n tipsG.removeClass('layui-layer-TipsL').addClass('layui-layer-TipsR').css('border-bottom-color', config.tips[1]); \r\n }, function(){ // 下\r\n goal.autoLeft();\r\n goal.tipTop = goal.top + goal.height + 10;\r\n tipsG.removeClass('layui-layer-TipsT').addClass('layui-layer-TipsB').css('border-right-color', config.tips[1]);\r\n }, function(){ // 左\r\n goal.tipLeft = goal.left - layArea[0] - 10;\r\n goal.tipTop = goal.top;\r\n tipsG.removeClass('layui-layer-TipsR').addClass('layui-layer-TipsL').css('border-bottom-color', config.tips[1]);\r\n }];\r\n goal.where[guide-1]();\r\n \r\n /* 8*2为小三角形占据的空间 */\r\n if(guide === 1){\r\n goal.top - (win.scrollTop() + layArea[1] + 8*2) < 0 && goal.where[2]();\r\n } else if(guide === 2){\r\n win.width() - (goal.left + goal.width + layArea[0] + 8*2) > 0 || goal.where[3]()\r\n } else if(guide === 3){\r\n (goal.top - win.scrollTop() + goal.height + layArea[1] + 8*2) - win.height() > 0 && goal.where[0]();\r\n } else if(guide === 4){\r\n layArea[0] + 8*2 - goal.left > 0 && goal.where[1]()\r\n }\r\n\r\n layero.find('.'+doms[5]).css({\r\n 'background-color': config.tips[1], \r\n 'padding-right': (config.closeBtn ? '30px' : '')\r\n });\r\n layero.css({\r\n left: goal.tipLeft - (config.fixed ? win.scrollLeft() : 0), \r\n top: goal.tipTop - (config.fixed ? win.scrollTop() : 0)\r\n });\r\n}\r\n\r\n// 拖拽层\r\nClass.pt.move = function(){\r\n var that = this;\r\n var config = that.config;\r\n var _DOC = $(document);\r\n var layero = that.layero;\r\n var DATA_NAME = ['LAY_MOVE_DICT', 'LAY_RESIZE_DICT'];\r\n var moveElem = layero.find(config.move);\r\n var resizeElem = layero.find('.layui-layer-resize');\r\n \r\n // 给指定元素添加拖动光标\r\n if(config.move) moveElem.css('cursor', 'move');\r\n \r\n // 按下拖动元素\r\n moveElem.on('mousedown', function(e){\r\n if (e.button) {return;} // 不是左键不处理\r\n var othis = $(this);\r\n var dict = {};\r\n \r\n if(config.move){\r\n dict.layero = layero;\r\n dict.config = config;\r\n dict.offset = [\r\n e.clientX - parseFloat(layero.css('left')),\r\n e.clientY - parseFloat(layero.css('top'))\r\n ];\r\n \r\n othis.data(DATA_NAME[0], dict);\r\n ready.eventMoveElem = othis;\r\n ready.moveElem.css('cursor', 'move').show();\r\n }\r\n \r\n e.preventDefault();\r\n });\r\n \r\n // 按下右下角拉伸\r\n resizeElem.on('mousedown', function(e){\r\n var othis = $(this);\r\n var dict = {};\r\n \r\n if(config.resize){\r\n dict.layero = layero;\r\n dict.config = config;\r\n dict.offset = [e.clientX, e.clientY];\r\n dict.index = that.index;\r\n dict.area = [\r\n layero.outerWidth()\r\n ,layero.outerHeight()\r\n ];\r\n \r\n othis.data(DATA_NAME[1], dict);\r\n ready.eventResizeElem = othis;\r\n ready.moveElem.css('cursor', 'se-resize').show();\r\n }\r\n \r\n e.preventDefault();\r\n });\r\n \r\n // 拖动元素,避免多次调用实例造成事件叠加\r\n if(ready.docEvent) return that;\r\n _DOC.on('mousemove', function(e){\r\n // 拖拽移动\r\n if(ready.eventMoveElem){\r\n var dict = ready.eventMoveElem.data(DATA_NAME[0]) || {}\r\n ,layero = dict.layero\r\n ,config = dict.config;\r\n \r\n var X = e.clientX - dict.offset[0];\r\n var Y = e.clientY - dict.offset[1];\r\n var fixed = layero.css('position') === 'fixed';\r\n \r\n e.preventDefault();\r\n \r\n dict.stX = fixed ? 0 : win.scrollLeft();\r\n dict.stY = fixed ? 0 : win.scrollTop();\r\n\r\n // 控制元素不被拖出窗口外\r\n if(!config.moveOut){\r\n var setRig = win.width() - layero.outerWidth() + dict.stX;\r\n var setBot = win.height() - layero.outerHeight() + dict.stY; \r\n X < dict.stX && (X = dict.stX);\r\n X > setRig && (X = setRig); \r\n Y < dict.stY && (Y = dict.stY);\r\n Y > setBot && (Y = setBot);\r\n }\r\n \r\n // 拖动时跟随鼠标位置\r\n layero.css({\r\n left: X,\r\n top: Y\r\n });\r\n }\r\n \r\n // Resize\r\n if(ready.eventResizeElem){\r\n var dict = ready.eventResizeElem.data(DATA_NAME[1]) || {};\r\n var config = dict.config;\r\n \r\n var X = e.clientX - dict.offset[0];\r\n var Y = e.clientY - dict.offset[1];\r\n \r\n e.preventDefault();\r\n \r\n // 拉伸宽高\r\n layer.style(dict.index, {\r\n width: dict.area[0] + X\r\n ,height: dict.area[1] + Y\r\n });\r\n \r\n config.resizing && config.resizing(dict.layero);\r\n }\r\n }).on('mouseup', function(e){\r\n if(ready.eventMoveElem){\r\n var dict = ready.eventMoveElem.data(DATA_NAME[0]) || {};\r\n var config = dict.config;\r\n \r\n ready.eventMoveElem.removeData(DATA_NAME[0]);\r\n delete ready.eventMoveElem;\r\n ready.moveElem.hide();\r\n config.moveEnd && config.moveEnd(dict.layero);\r\n }\r\n if(ready.eventResizeElem){\r\n ready.eventResizeElem.removeData(DATA_NAME[1]);\r\n delete ready.eventResizeElem;\r\n ready.moveElem.hide();\r\n }\r\n });\r\n \r\n ready.docEvent = true; // 已给 document 执行全局事件\r\n return that;\r\n};\r\n\r\nClass.pt.callback = function(){\r\n var that = this, layero = that.layero, config = that.config;\r\n that.openLayer();\r\n if(config.success){\r\n if(config.type == 2){\r\n layero.find('iframe').on('load', function(){\r\n config.success(layero, that.index, that);\r\n });\r\n } else {\r\n config.success(layero, that.index, that);\r\n }\r\n }\r\n layer.ie == 6 && that.IE6(layero);\r\n \r\n // 按钮\r\n layero.find('.'+ doms[6]).children('a').on('click', function(){\r\n var index = $(this).index();\r\n if(index === 0){\r\n if(config.yes){\r\n config.yes(that.index, layero, that);\r\n } else if(config['btn1']){\r\n config['btn1'](that.index, layero, that);\r\n } else {\r\n layer.close(that.index);\r\n }\r\n } else {\r\n var close = config['btn'+(index+1)] && config['btn'+(index+1)](that.index, layero, that);\r\n close === false || layer.close(that.index);\r\n }\r\n });\r\n \r\n // 取消\r\n function cancel(){\r\n var close = config.cancel && config.cancel(that.index, layero, that);\r\n close === false || layer.close(that.index);\r\n }\r\n \r\n // 右上角关闭回调\r\n layero.find('.'+ doms[7]).on('click', cancel);\r\n \r\n // 点遮罩关闭\r\n if(config.shadeClose){\r\n that.shadeo.on('click', function(){\r\n layer.close(that.index);\r\n });\r\n } \r\n \r\n // 最小化\r\n layero.find('.layui-layer-min').on('click', function(){\r\n var min = config.min && config.min(layero, that.index, that);\r\n min === false || layer.min(that.index, config);\r\n });\r\n \r\n // 全屏/还原\r\n layero.find('.layui-layer-max').on('click', function(){\r\n if($(this).hasClass('layui-layer-maxmin')){\r\n layer.restore(that.index);\r\n config.restore && config.restore(layero, that.index, that);\r\n } else {\r\n layer.full(that.index, config);\r\n setTimeout(function(){\r\n config.full && config.full(layero, that.index, that);\r\n }, 100);\r\n }\r\n });\r\n\r\n config.end && (ready.end[that.index] = config.end);\r\n};\r\n\r\n// for ie6 恢复 select\r\nready.reselect = function(){\r\n $.each($('select'), function(index , value){\r\n var sthis = $(this);\r\n if(!sthis.parents('.'+doms[0])[0]){\r\n (sthis.attr('layer') == 1 && $('.'+doms[0]).length < 1) && sthis.removeAttr('layer').show(); \r\n }\r\n sthis = null;\r\n });\r\n}; \r\n\r\nClass.pt.IE6 = function(layero){\r\n // 隐藏select\r\n $('select').each(function(index , value){\r\n var sthis = $(this);\r\n if(!sthis.parents('.'+doms[0])[0]){\r\n sthis.css('display') === 'none' || sthis.attr({'layer' : '1'}).hide();\r\n }\r\n sthis = null;\r\n });\r\n};\r\n\r\n// 需依赖原型的对外方法\r\nClass.pt.openLayer = function(){\r\n var that = this;\r\n \r\n // 置顶当前窗口\r\n layer.zIndex = that.config.zIndex;\r\n layer.setTop = function(layero){\r\n var setZindex = function(){\r\n layer.zIndex++;\r\n layero.css('z-index', layer.zIndex + 1);\r\n };\r\n layer.zIndex = parseInt(layero[0].style.zIndex);\r\n layero.on('mousedown', setZindex);\r\n return layer.zIndex;\r\n };\r\n};\r\n\r\n// 记录宽高坐标,用于还原\r\nready.record = function(layero){\r\n if(!layero[0]) return window.console && console.error('index error');\r\n var area = [\r\n layero[0].style.width || layero.width(),\r\n layero[0].style.height || layero.height(),\r\n layero.position().top, \r\n layero.position().left + parseFloat(layero.css('margin-left'))\r\n ];\r\n layero.find('.layui-layer-max').addClass('layui-layer-maxmin');\r\n layero.attr({area: area});\r\n};\r\n\r\n// 设置页面滚动条\r\nready.setScrollbar = function(index){\r\n doms.html.css('overflow', 'hidden').attr('layer-full', index);\r\n};\r\n\r\n// 恢复页面滚动条\r\nready.restScrollbar = function(index){\r\n if(doms.html.attr('layer-full') == index){\r\n doms.html[0].style[doms.html[0].style.removeProperty \r\n ? 'removeProperty' \r\n : 'removeAttribute']('overflow');\r\n doms.html.removeAttr('layer-full');\r\n }\r\n};\r\n\r\n/** 内置成员 */\r\n\r\nwindow.layer = layer;\r\n\r\n// 获取子 iframe 的 DOM\r\nlayer.getChildFrame = function(selector, index){\r\n index = index || $('.'+doms[4]).attr('times');\r\n return $('#'+ doms[0] + index).find('iframe').contents().find(selector); \r\n};\r\n\r\n// 得到当前 iframe 层的索引,子 iframe 时使用\r\nlayer.getFrameIndex = function(name){\r\n return $('#'+ name).parents('.'+doms[4]).attr('times');\r\n};\r\n\r\n// iframe 层自适应宽高\r\nlayer.iframeAuto = function(index){\r\n if(!index) return;\r\n var heg = layer.getChildFrame('html', index).outerHeight();\r\n var layero = $('#'+ doms[0] + index);\r\n var titHeight = layero.find(doms[1]).outerHeight() || 0;\r\n var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;\r\n layero.css({height: heg + titHeight + btnHeight});\r\n layero.find('iframe').css({height: heg});\r\n};\r\n\r\n// 重置 iframe url\r\nlayer.iframeSrc = function(index, url){\r\n $('#'+ doms[0] + index).find('iframe').attr('src', url);\r\n};\r\n\r\n// 设定层的样式\r\nlayer.style = function(index, options, limit){\r\n var layero = $('#'+ doms[0] + index);\r\n var contElem = layero.find('.layui-layer-content');\r\n var type = layero.attr('type');\r\n var titHeight = layero.find(doms[1]).outerHeight() || 0;\r\n var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;\r\n var minLeft = layero.attr('minLeft');\r\n \r\n // loading 和 tips 层不允许更改\r\n if(type === ready.type[3] || type === ready.type[4]){\r\n return;\r\n }\r\n \r\n if(!limit){\r\n if(parseFloat(options.width) <= 260){\r\n options.width = 260;\r\n }\r\n \r\n if(parseFloat(options.height) - titHeight - btnHeight <= 64){\r\n options.height = 64 + titHeight + btnHeight;\r\n }\r\n }\r\n layero.css(options);\r\n btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;\r\n \r\n if(type === ready.type[2]){\r\n layero.find('iframe').css({\r\n height: (typeof options.height === 'number' ? options.height : layero.height()) - titHeight - btnHeight\r\n });\r\n } else {\r\n contElem.css({\r\n height: (typeof options.height === 'number' ? options.height : layero.height()) - titHeight - btnHeight\r\n - parseFloat(contElem.css('padding-top'))\r\n - parseFloat(contElem.css('padding-bottom'))\r\n })\r\n }\r\n};\r\n\r\n// 最小化\r\nlayer.min = function(index, options){\r\n var layero = $('#'+ doms[0] + index);\r\n var maxminStatus = layero.data('maxminStatus');\r\n\r\n if(maxminStatus === 'min') return; // 当前的状态是否已经是最小化\r\n if(maxminStatus === 'max') layer.restore(index); // 若当前为最大化,则先还原后再最小化\r\n\r\n layero.data('maxminStatus', 'min');\r\n options = options || layero.data('config') || {};\r\n\r\n var shadeo = $('#'+ doms.SHADE + index);\r\n var elemMin = layero.find('.layui-layer-min');\r\n var titHeight = layero.find(doms[1]).outerHeight() || 0;\r\n var minLeft = layero.attr('minLeft'); // 最小化时的横坐标\r\n var hasMinLeft = typeof minLeft === 'string'; // 是否已经赋值过最小化坐标\r\n var left = hasMinLeft ? minLeft : (181*ready.minStackIndex)+'px';\r\n var position = layero.css('position');\r\n var minWidth = 180; // 最小化时的宽度\r\n var settings = {\r\n width: minWidth\r\n ,height: titHeight\r\n ,position: 'fixed'\r\n ,overflow: 'hidden'\r\n };\r\n\r\n ready.record(layero); // 记录当前尺寸、坐标,用于还原\r\n\r\n // 简易最小化补位\r\n if(ready.minStackArr.length > 0){\r\n left = ready.minStackArr[0];\r\n ready.minStackArr.shift();\r\n }\r\n\r\n // left 是否超出边界\r\n if(parseFloat(left) + minWidth > win.width()){\r\n left = win.width() - minWidth - function(){\r\n ready.minStackArr.edgeIndex = ready.minStackArr.edgeIndex || 0;\r\n return ready.minStackArr.edgeIndex += 3;\r\n }();\r\n if(left < 0) left = 0;\r\n }\r\n \r\n // 是否堆叠在左下角\r\n if(options.minStack){\r\n settings.left = left;\r\n settings.top = win.height() - titHeight;\r\n hasMinLeft || ready.minStackIndex++; // 若未赋值过最小化坐标,则最小化操作索引自增\r\n layero.attr('minLeft', left);\r\n }\r\n \r\n layero.attr('position', position);\r\n layer.style(index, settings, true);\r\n\r\n elemMin.hide();\r\n layero.attr('type') === 'page' && layero.find(doms[4]).hide();\r\n ready.restScrollbar(index);\r\n\r\n // 隐藏遮罩\r\n shadeo.hide();\r\n};\r\n\r\n// 还原\r\nlayer.restore = function(index){\r\n var layero = $('#'+ doms[0] + index);\r\n var shadeo = $('#'+ doms.SHADE + index);\r\n var area = layero.attr('area').split(',');\r\n var type = layero.attr('type');\r\n var options = layero.data('config') || {};\r\n\r\n layero.removeData('maxminStatus'); // 移除最大最小状态\r\n \r\n // 恢复原来尺寸\r\n layer.style(index, {\r\n width: area[0], // 数值或百分比\r\n height: area[1],\r\n top: parseFloat(area[2]),\r\n left: parseFloat(area[3]),\r\n position: layero.attr('position'),\r\n overflow: 'visible'\r\n }, true);\r\n \r\n layero.find('.layui-layer-max').removeClass('layui-layer-maxmin');\r\n layero.find('.layui-layer-min').show();\r\n type === 'page' && layero.find(doms[4]).show();\r\n\r\n // 恢复页面滚动条弹层打开时的状态\r\n options.scrollbar ? ready.restScrollbar(index) : ready.setScrollbar(index);\r\n \r\n // 恢复遮罩\r\n shadeo.show();\r\n // ready.events.resize[index](); // ?\r\n};\r\n\r\n// 全屏(最大化)\r\nlayer.full = function(index){\r\n var layero = $('#'+ doms[0] + index);\r\n var maxminStatus = layero.data('maxminStatus');\r\n\r\n if(maxminStatus === 'max') return // 检查当前的状态是否已经是最大化\r\n if(maxminStatus === 'min') layer.restore(index); // 若当前为最小化,则先还原后再最大化\r\n\r\n layero.data('maxminStatus', 'max');\r\n ready.record(layero); // 记录当前尺寸、坐标\r\n\r\n if(!doms.html.attr('layer-full')){\r\n ready.setScrollbar(index);\r\n }\r\n\r\n setTimeout(function(){\r\n var isfix = layero.css('position') === 'fixed';\r\n layer.style(index, {\r\n top: isfix ? 0 : win.scrollTop(),\r\n left: isfix ? 0 : win.scrollLeft(),\r\n width: '100%',\r\n height: '100%'\r\n }, true);\r\n layero.find('.layui-layer-min').hide();\r\n }, 100);\r\n};\r\n\r\n// 改变 title\r\nlayer.title = function(name, index){\r\n var title = $('#'+ doms[0] + (index || layer.index)).find(doms[1]);\r\n title.html(name);\r\n};\r\n\r\n// 关闭 layer 总方法\r\nlayer.close = function(index, callback){\r\n var layero = function(){\r\n var closest = $('.'+ doms[0]).children('#'+ index).closest('.'+ doms[0]);\r\n return closest[0] ? (\r\n index = closest.attr('times'),\r\n closest\r\n ) : $('#'+ doms[0] + index)\r\n }();\r\n var type = layero.attr('type');\r\n var options = layero.data('config') || {};\r\n var hideOnClose = options.id && options.hideOnClose; // 是否关闭时移除弹层容器\r\n\r\n if(!layero[0]) return;\r\n\r\n // 关闭动画\r\n var closeAnim = ({\r\n slideDown: 'layer-anim-slide-down-out',\r\n slideLeft: 'layer-anim-slide-left-out',\r\n slideUp: 'layer-anim-slide-up-out',\r\n slideRight: 'layer-anim-slide-right-out'\r\n })[options.anim] || 'layer-anim-close';\r\n\r\n // 移除主容器\r\n var remove = function(){\r\n var WRAP = 'layui-layer-wrap';\r\n\r\n // 是否关闭时隐藏弹层容器\r\n if(hideOnClose){\r\n layero.removeClass('layer-anim '+ closeAnim);\r\n return layero.hide();\r\n }\r\n\r\n // 是否为页面捕获层\r\n if(type === ready.type[1] && layero.attr('conType') === 'object'){\r\n layero.children(':not(.'+ doms[5] +')').remove();\r\n var wrap = layero.find('.'+WRAP);\r\n for(var i = 0; i < 2; i++){\r\n wrap.unwrap();\r\n }\r\n wrap.css('display', wrap.data('display')).removeClass(WRAP);\r\n } else {\r\n // 低版本 IE 回收 iframe\r\n if(type === ready.type[2]){\r\n try {\r\n var iframe = $('#'+ doms[4] + index)[0];\r\n iframe.contentWindow.document.write('');\r\n iframe.contentWindow.close();\r\n layero.find('.'+doms[5])[0].removeChild(iframe);\r\n } catch(e){}\r\n }\r\n layero[0].innerHTML = '';\r\n layero.remove();\r\n }\r\n\r\n typeof ready.end[index] === 'function' && ready.end[index]();\r\n delete ready.end[index];\r\n typeof callback === 'function' && callback();\r\n\r\n // 移除 reisze 事件\r\n if(ready.events.resize[index]){\r\n win.off('resize', ready.events.resize[index]);\r\n delete ready.events.resize[index];\r\n }\r\n };\r\n // 移除遮罩\r\n var removeShade = (function fn(){\r\n $('#'+ doms.SHADE + index)[\r\n hideOnClose ? 'hide' : 'remove'\r\n ]();\r\n })();\r\n \r\n // 是否允许关闭动画\r\n if(options.isOutAnim){\r\n layero.addClass('layer-anim '+ closeAnim);\r\n }\r\n \r\n layer.ie == 6 && ready.reselect();\r\n ready.restScrollbar(index); \r\n \r\n // 记住被关闭层的最小化堆叠坐标\r\n if(typeof layero.attr('minLeft') === 'string'){\r\n ready.minStackIndex--;\r\n ready.minStackArr.push(layero.attr('minLeft'));\r\n }\r\n \r\n if((layer.ie && layer.ie < 10) || !options.isOutAnim){\r\n remove()\r\n } else {\r\n setTimeout(function(){\r\n remove();\r\n }, 200);\r\n }\r\n};\r\n\r\n// 关闭所有层\r\nlayer.closeAll = function(type, callback){\r\n if(typeof type === 'function'){\r\n callback = type;\r\n type = null;\r\n }\r\n var domsElem = $('.'+doms[0]);\r\n $.each(domsElem, function(_index){\r\n var othis = $(this);\r\n var is = type ? (othis.attr('type') === type) : 1;\r\n is && layer.close(othis.attr('times'), _index === domsElem.length - 1 ? callback : null);\r\n is = null;\r\n });\r\n if(domsElem.length === 0) typeof callback === 'function' && callback();\r\n};\r\n\r\n// 根据弹层类型关闭最近打开的层\r\nlayer.closeLast = function(type){\r\n type = type || 'page';\r\n layer.close($('.layui-layer-'+ type +':last').attr(\"times\"));\r\n};\r\n\r\n\r\n/*\r\n * 拓展模块,layui 开始合并在一起\r\n */\r\n\r\n\r\nvar cache = layer.cache || {};\r\nvar skin = function(type){\r\n return (cache.skin ? (' ' + cache.skin + ' ' + cache.skin + '-'+type) : '');\r\n}; \r\n \r\n// 仿系统 prompt\r\nlayer.prompt = function(options, yes){\r\n var style = '', placeholder = '';\r\n options = options || {};\r\n \r\n if(typeof options === 'function') yes = options;\r\n \r\n if(options.area){\r\n var area = options.area;\r\n style = 'style=\"width: '+ area[0] +'; height: '+ area[1] + ';\"';\r\n delete options.area;\r\n }\r\n if (options.placeholder) {\r\n placeholder = ' placeholder=\"' + options.placeholder + '\"';\r\n }\r\n var prompt, content = options.formType == 2 ? '' : function () {\r\n return '';\r\n }();\r\n \r\n var success = options.success;\r\n delete options.success;\r\n \r\n return layer.open($.extend({\r\n type: 1,\r\n btn: ['确定','取消'],\r\n content: content,\r\n skin: 'layui-layer-prompt' + skin('prompt'),\r\n maxWidth: win.width(),\r\n success: function(layero){\r\n prompt = layero.find('.layui-layer-input');\r\n prompt.val(options.value || '').focus();\r\n typeof success === 'function' && success(layero);\r\n },\r\n resize: false,\r\n yes: function(index){\r\n var value = prompt.val();\r\n if(value.length > (options.maxlength||500)) {\r\n layer.tips('最多输入'+ (options.maxlength || 500) +'个字数', prompt, {tips: 1});\r\n } else {\r\n yes && yes(value, index, prompt);\r\n }\r\n }\r\n }, options));\r\n};\r\n\r\n// tab 层\r\nlayer.tab = function(options){\r\n options = options || {};\r\n \r\n var tab = options.tab || {};\r\n var THIS = 'layui-this';\r\n var success = options.success;\r\n \r\n delete options.success;\r\n \r\n return layer.open($.extend({\r\n type: 1,\r\n skin: 'layui-layer-tab' + skin('tab'),\r\n resize: false,\r\n title: function(){\r\n var len = tab.length, ii = 1, str = '';\r\n if(len > 0){\r\n str = ''+ tab[0].title +'';\r\n for(; ii < len; ii++){\r\n str += ''+ tab[ii].title +'';\r\n }\r\n }\r\n return str;\r\n }(),\r\n content: '
              '+ function(){\r\n var len = tab.length, ii = 1, str = '';\r\n if(len > 0){\r\n str = '
            • '+ (tab[0].content || 'no content') +'
            • ';\r\n for(; ii < len; ii++){\r\n str += '
            • '+ (tab[ii].content || 'no content') +'
            • ';\r\n }\r\n }\r\n return str;\r\n }() +'
            ',\r\n success: function(layero){\r\n var btn = layero.find('.layui-layer-title').children();\r\n var main = layero.find('.layui-layer-tabmain').children();\r\n btn.on('mousedown', function(e){\r\n e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;\r\n var othis = $(this), index = othis.index();\r\n othis.addClass(THIS).siblings().removeClass(THIS);\r\n main.eq(index).show().siblings().hide();\r\n typeof options.change === 'function' && options.change(index);\r\n });\r\n typeof success === 'function' && success(layero);\r\n }\r\n }, options));\r\n};\r\n\r\n// 图片层\r\nlayer.photos = function(options, loop, key){\r\n var dict = {};\r\n\r\n // 默认属性\r\n options = $.extend(true, {\r\n toolbar: true,\r\n footer: true\r\n }, options);\r\n\r\n if(!options.photos) return;\r\n \r\n // 若 photos 并非选择器或 jQuery 对象,则为普通 object\r\n var isObject = !(typeof options.photos === 'string' || options.photos instanceof $);\r\n var photos = isObject ? options.photos : {};\r\n var data = photos.data || [];\r\n var start = photos.start || 0;\r\n var success = options.success;\r\n \r\n dict.imgIndex = (start|0) + 1;\r\n options.img = options.img || 'img';\r\n delete options.success;\r\n \r\n // 若 options.photos 不是一个对象\r\n if(!isObject){ // 页面直接获取\r\n var parent = $(options.photos), pushData = function(){\r\n data = [];\r\n parent.find(options.img).each(function(index){\r\n var othis = $(this);\r\n othis.attr('layer-index', index);\r\n data.push({\r\n alt: othis.attr('alt'),\r\n pid: othis.attr('layer-pid'),\r\n src: othis.attr('lay-src') || othis.attr('layer-src') || othis.attr('src'),\r\n thumb: othis.attr('src')\r\n });\r\n });\r\n };\r\n \r\n pushData();\r\n \r\n if (data.length === 0) return;\r\n \r\n loop || parent.on('click', options.img, function(){\r\n pushData();\r\n var othis = $(this), index = othis.attr('layer-index'); \r\n layer.photos($.extend(options, {\r\n photos: {\r\n start: index,\r\n data: data,\r\n tab: options.tab\r\n },\r\n full: options.full\r\n }), true);\r\n });\r\n \r\n // 不直接弹出\r\n if (!loop) return;\r\n } else if (data.length === 0){\r\n return layer.msg('没有图片');\r\n }\r\n \r\n // 上一张\r\n dict.imgprev = function(key){\r\n dict.imgIndex--;\r\n if(dict.imgIndex < 1){\r\n dict.imgIndex = data.length;\r\n }\r\n dict.tabimg(key);\r\n };\r\n \r\n // 下一张\r\n dict.imgnext = function(key,errorMsg){\r\n dict.imgIndex++;\r\n if(dict.imgIndex > data.length){\r\n dict.imgIndex = 1;\r\n if (errorMsg) {return}\r\n }\r\n dict.tabimg(key)\r\n };\r\n \r\n // 方向键\r\n dict.keyup = function(event){\r\n if(!dict.end){\r\n var code = event.keyCode;\r\n event.preventDefault();\r\n if(code === 37){\r\n dict.imgprev(true);\r\n } else if(code === 39) {\r\n dict.imgnext(true);\r\n } else if(code === 27) {\r\n layer.close(dict.index);\r\n }\r\n }\r\n }\r\n \r\n // 切换\r\n dict.tabimg = function(key){\r\n if(data.length <= 1) return;\r\n photos.start = dict.imgIndex - 1;\r\n layer.close(dict.index);\r\n return layer.photos(options, true, key);\r\n }\r\n\r\n dict.isNumber = function (n) {\r\n return typeof n === 'number' && !isNaN(n);\r\n }\r\n\r\n dict.image = {};\r\n\r\n dict.getTransform = function(opts){\r\n var transforms = [];\r\n var rotate = opts.rotate;\r\n var scaleX = opts.scaleX;\r\n var scale = opts.scale;\r\n\r\n if (dict.isNumber(rotate) && rotate !== 0) {\r\n transforms.push('rotate(' + rotate + 'deg)');\r\n }\r\n\r\n if (dict.isNumber(scaleX) && scaleX !== 1) {\r\n transforms.push('scaleX(' + scaleX + ')');\r\n }\r\n\r\n if (dict.isNumber(scale)) {\r\n transforms.push('scale(' + scale + ')');\r\n }\r\n\r\n return transforms.length ? transforms.join(' ') : 'none';\r\n }\r\n \r\n // 一些动作\r\n dict.event = function(layero, index, that){\r\n // 上一张\r\n dict.main.find('.layui-layer-photos-prev').on('click', function(event){\r\n event.preventDefault();\r\n dict.imgprev(true);\r\n }); \r\n \r\n // 下一张\r\n dict.main.find('.layui-layer-photos-next').on('click', function(event){\r\n event.preventDefault();\r\n dict.imgnext(true);\r\n });\r\n \r\n $(document).on('keyup', dict.keyup);\r\n\r\n // 头部工具栏事件\r\n layero.off('click').on('click','*[toolbar-event]', function () {\r\n var othis = $(this);\r\n var event = othis.attr('toolbar-event');\r\n switch (event) {\r\n case 'rotate':\r\n dict.image.rotate = ((dict.image.rotate || 0) + Number(othis.attr('data-option'))) % 360;\r\n dict.imgElem.css({\r\n transform: dict.getTransform(dict.image)\r\n });\r\n break;\r\n case 'scalex':\r\n dict.image.scaleX = dict.image.scaleX === -1 ? 1 : -1;\r\n dict.imgElem.css({\r\n transform: dict.getTransform(dict.image)\r\n });\r\n break;\r\n case 'zoom':\r\n var ratio = Number(othis.attr('data-option'));\r\n dict.image.scale = (dict.image.scale || 1) + ratio;\r\n // 缩小状态最小值\r\n if (ratio < 0 && dict.image.scale < 0 - ratio) {\r\n dict.image.scale = 0 - ratio;\r\n }\r\n dict.imgElem.css({\r\n transform: dict.getTransform(dict.image)\r\n });\r\n break;\r\n case 'reset':\r\n dict.image.scaleX = 1;\r\n dict.image.scale = 1;\r\n dict.image.rotate = 0;\r\n dict.imgElem.css({\r\n transform: 'none'\r\n });\r\n break;\r\n case 'close':\r\n layer.close(index);\r\n break;\r\n }\r\n that.offset();\r\n that.auto(index);\r\n });\r\n \r\n // 鼠标滚轮缩放图片事件\r\n dict.main.children('img').on('mousewheel DOMMouseScroll', function(e) {\r\n var delta = e.originalEvent.wheelDelta || -e.originalEvent.detail;\r\n var zoomElem = dict.main.find('[toolbar-event=\"zoom\"]');\r\n if (delta > 0) {\r\n zoomElem.eq(0).trigger('click');\r\n } else {\r\n zoomElem.eq(1).trigger('click');\r\n }\r\n });\r\n\r\n };\r\n \r\n // 图片预加载\r\n function loadImage(url, callback, error) { \r\n var img = new Image();\r\n img.src = url; \r\n if(img.complete){\r\n return callback(img);\r\n }\r\n img.onload = function(){\r\n img.onload = null;\r\n callback(img);\r\n };\r\n img.onerror = function(e){\r\n img.onerror = null;\r\n error(e);\r\n }; \r\n }\r\n \r\n dict.loadi = layer.load(1, {\r\n shade: 'shade' in options ? false : 0.9,\r\n scrollbar: false\r\n });\r\n\r\n loadImage(data[start].src, function(img){\r\n layer.close(dict.loadi);\r\n \r\n var alt = data[start].alt || '';\r\n\r\n // 切换图片时不出现动画\r\n if(key) options.anim = -1;\r\n \r\n // 弹出图片层\r\n dict.index = layer.open($.extend({\r\n type: 1,\r\n id: 'layui-layer-photos',\r\n area: function(){\r\n var imgarea = [img.width, img.height];\r\n var winarea = [$(window).width() - 100, $(window).height() - 100];\r\n \r\n // 若实际图片的宽或者高比 屏幕大(那么进行缩放)\r\n if(!options.full && (imgarea[0]>winarea[0]||imgarea[1]>winarea[1])){\r\n var wh = [imgarea[0]/winarea[0],imgarea[1]/winarea[1]];// 取宽度缩放比例、高度缩放比例\r\n if(wh[0] > wh[1]){// 取缩放比例最大的进行缩放\r\n imgarea[0] = imgarea[0]/wh[0];\r\n imgarea[1] = imgarea[1]/wh[0];\r\n } else if(wh[0] < wh[1]){\r\n imgarea[0] = imgarea[0]/wh[1];\r\n imgarea[1] = imgarea[1]/wh[1];\r\n }\r\n }\r\n\r\n return [imgarea[0]+'px', imgarea[1]+'px']; \r\n }(),\r\n title: false,\r\n shade: 0.9,\r\n shadeClose: true,\r\n closeBtn: false,\r\n move: '.layer-layer-photos-main img',\r\n moveType: 1,\r\n scrollbar: false,\r\n moveOut: true,\r\n anim: 5,\r\n isOutAnim: false,\r\n skin: 'layui-layer-photos' + skin('photos'),\r\n content: '
            '\r\n + '\"'+'\r\n + function(){\r\n var arr = ['
            '];\r\n\r\n // 左右箭头翻页\r\n if (data.length > 1) {\r\n arr.push(['
            ',\r\n '',\r\n '',\r\n '
            '].join(''));\r\n }\r\n\r\n // 头部工具栏\r\n if (options.toolbar) {\r\n arr.push([\r\n '
            ',\r\n '',\r\n '',\r\n '',\r\n '',\r\n '',\r\n '',\r\n '
            '\r\n ].join(''));\r\n }\r\n\r\n // 底部栏\r\n if (options.footer) {\r\n arr.push(['
            ',\r\n '

            '+ alt +'

            ',\r\n ''+ dict.imgIndex +' / '+ data.length +'',\r\n '查看原图',\r\n '
            '].join(''));\r\n }\r\n\r\n arr.push('
            ');\r\n return arr.join('');\r\n }()\r\n +'
            ',\r\n success: function(layero, index, that){\r\n dict.main = layero.find('.layer-layer-photos-main');\r\n dict.footer = layero.find('.layui-layer-photos-footer');\r\n dict.imgElem = dict.main.children('img');\r\n dict.event(layero, index, that);\r\n options.tab && options.tab(data[start], layero);\r\n typeof success === 'function' && success(layero);\r\n }, end: function(){\r\n dict.end = true;\r\n $(document).off('keyup', dict.keyup);\r\n }\r\n }, options));\r\n }, function(){\r\n layer.close(dict.loadi);\r\n layer.msg('当前图片地址异常
            是否继续查看下一张?', {\r\n time: 30000, \r\n btn: ['下一张', '不看了'], \r\n yes: function(){\r\n data.length > 1 && dict.imgnext(true,true);\r\n }\r\n });\r\n });\r\n};\r\n\r\n// 主入口\r\nready.run = function(_$){\r\n $ = _$;\r\n win = $(window);\r\n \r\n // 移动端兼容性处理\r\n // https://gitee.com/layui/layui/issues/I81WGC\r\n // https://github.com/jquery/jquery/issues/1729\r\n var agent = navigator.userAgent.toLowerCase();\r\n var isMobile = /android|iphone|ipod|ipad|ios/.test(agent)\r\n var _win = $(window);\r\n if(isMobile){\r\n $.each({Height: \"height\", Width: \"width\"}, function(propSuffix, funcName){\r\n var propName = 'inner' + propSuffix;\r\n win[funcName] = function(){\r\n return propName in window \r\n ? window[propName]\r\n : _win[funcName]()\r\n }\r\n })\r\n }\r\n doms.html = $('html');\r\n layer.open = function(deliver){\r\n var o = new Class(deliver);\r\n return o.index;\r\n };\r\n};\r\n\r\n// 加载方式\r\nwindow.layui && layui.define ? (\r\n layer.ready(),\r\n layui.define('jquery', function(exports){ // layui\r\n layer.path = layui.cache.dir;\r\n ready.run(layui.$);\r\n\r\n // export api\r\n window.layer = layer;\r\n exports('layer', layer);\r\n })\r\n) : (\r\n (typeof define === 'function' && define.amd) ? define(['jquery'], function(){ // requirejs\r\n ready.run(window.jQuery);\r\n return layer;\r\n }) : function(){ // 普通 script 标签引入\r\n layer.ready();\r\n ready.run(window.jQuery);\r\n }()\r\n);\r\n\r\n}(window);\r\n","/**\r\n * util 工具组件\r\n */\r\n\r\nlayui.define('jquery', function(exports){\r\n \"use strict\";\r\n\r\n var $ = layui.$;\r\n var hint = layui.hint();\r\n\r\n // 外部接口\r\n var util = {\r\n // 固定块\r\n fixbar: function(options){\r\n var ELEM = 'layui-fixbar';\r\n var $doc = $(document);\r\n\r\n // 默认可选项\r\n options = $.extend(true, {\r\n target: 'body', // fixbar 的插入目标选择器\r\n bars: [], // bar 信息\r\n \"default\": true, // 是否显示默认 bar\r\n margin: 160, // 出现 top bar 的滚动条高度临界值\r\n duration: 320 // top bar 等动画时长(毫秒)\r\n }, options);\r\n\r\n // 目标元素对象\r\n var $target = $(options.target);\r\n\r\n // 滚动条所在元素对象\r\n var $scroll = options.scroll\r\n ? $(options.scroll)\r\n : $(options.target === 'body' ? $doc : $target)\r\n\r\n // 是否提供默认图标\r\n if(options['default']){\r\n // 兼容旧版本的一些属性\r\n if(options.bar1){\r\n options.bars.push({\r\n type: 'bar1',\r\n icon: 'layui-icon-chat'\r\n });\r\n }\r\n if(options.bar2){\r\n options.bars.push({\r\n type: 'bar2',\r\n icon: 'layui-icon-help'\r\n });\r\n }\r\n // 默认 top bar\r\n options.bars.push({\r\n type: 'top',\r\n icon: 'layui-icon-top'\r\n });\r\n }\r\n\r\n var elem = $('
              ').addClass(ELEM);\r\n var elemTopBar;\r\n\r\n // 遍历生成 bars 节点\r\n layui.each(options.bars, function(i, item){\r\n var elemBar = $('
            • ');\r\n\r\n // 设置 bar 相关属性\r\n elemBar.addClass(item.icon).attr({\r\n 'lay-type': item.type,\r\n 'style': item.style || (options.bgcolor ? 'background-color: '+ options.bgcolor : '')\r\n }).html(item.content);\r\n\r\n // bar 点击事件\r\n elemBar.on('click', function(){\r\n var type = $(this).attr('lay-type');\r\n if(type === 'top'){\r\n (\r\n options.target === 'body'\r\n ? $('html,body')\r\n : $scroll\r\n ).animate({\r\n scrollTop : 0\r\n }, options.duration);\r\n }\r\n typeof options.click === 'function' && options.click.call(this, type);\r\n });\r\n\r\n // 自定义任意事件\r\n if(layui.type(options.on) === 'object'){\r\n layui.each(options.on, function(eventName, callback){\r\n elemBar.on(eventName, function(){\r\n var type = $(this).attr('lay-type');\r\n typeof callback === 'function' && callback.call(this, type);\r\n });\r\n })\r\n }\r\n\r\n // 获得 top bar 节点\r\n if(item.type === 'top'){\r\n elemBar.addClass('layui-fixbar-top');\r\n elemTopBar = elemBar;\r\n }\r\n\r\n elem.append(elemBar); // 插入 bar 节点\r\n });\r\n\r\n // 若目标元素已存在 fixbar,则移除旧的节点\r\n $target.find('.'+ ELEM).remove();\r\n\r\n // 向目标元素插入 fixbar 节点\r\n typeof options.css === 'object' && elem.css(options.css);\r\n $target.append(elem);\r\n\r\n // top bar 的显示隐藏\r\n if(elemTopBar){\r\n var lock;\r\n var setTopBar = (function setTopBar(){\r\n var top = $scroll.scrollTop();\r\n if(top >= options.margin){\r\n lock || (elemTopBar.show(), lock = 1);\r\n } else {\r\n lock && (elemTopBar.hide(), lock = 0);\r\n }\r\n return setTopBar;\r\n })();\r\n }\r\n\r\n // 根据 scrollbar 设置 fixbar 相关状态\r\n var timer;\r\n $scroll.on('scroll', function(){\r\n if(!setTopBar) return;\r\n clearTimeout(timer);\r\n timer = setTimeout(function(){\r\n setTopBar();\r\n }, 100);\r\n });\r\n },\r\n\r\n // 倒计时\r\n countdown: function(options){\r\n var that = this;\r\n\r\n // 默认可选项\r\n options = $.extend(true, {\r\n date: new Date(),\r\n now: new Date()\r\n }, options);\r\n\r\n // 兼容旧版参数\r\n var args = arguments;\r\n if(args.length > 1){\r\n options.date = new Date(args[0]);\r\n options.now = new Date(args[1]);\r\n options.clock = args[2];\r\n }\r\n\r\n // 实例对象\r\n var inst = {\r\n options: options,\r\n clear: function(){ // 清除计时器\r\n clearTimeout(inst.timer);\r\n },\r\n reload: function(opts){ // 重置倒计时\r\n this.clear();\r\n $.extend(true, this.options, {\r\n now: new Date()\r\n }, opts);\r\n count();\r\n }\r\n };\r\n\r\n typeof options.ready === 'function' && options.ready();\r\n\r\n // 计算倒计时\r\n var count = (function fn(){\r\n var date = new Date(options.date);\r\n var now = new Date(options.now);\r\n var countTime = function(time){\r\n return time > 0 ? time : 0;\r\n }(date.getTime() - now.getTime());\r\n var result = {\r\n d: Math.floor(countTime/(1000*60*60*24)), // 天\r\n h: Math.floor(countTime/(1000*60*60)) % 24, // 时\r\n m: Math.floor(countTime/(1000*60)) % 60, // 分\r\n s: Math.floor(countTime/1000) % 60 // 秒\r\n };\r\n var next = function(){\r\n now.setTime(now.getTime() + 1000);\r\n options.now = now;\r\n count();\r\n };\r\n\r\n // 兼容旧版返回值\r\n if(args.length > 1) result = [result.d,result.h,result.m,result.s]\r\n\r\n // 计时 - 以秒间隔\r\n inst.timer = setTimeout(next, 1000);\r\n typeof options.clock === 'function' && options.clock(result, inst);\r\n\r\n // 计时完成\r\n if(countTime <= 0){\r\n clearTimeout(inst.timer);\r\n typeof options.done === 'function' && options.done(result, inst);\r\n }\r\n\r\n return fn;\r\n })();\r\n\r\n return inst;\r\n },\r\n\r\n // 某个时间在当前时间的多久前\r\n timeAgo: function(time, onlyDate){\r\n var that = this;\r\n var arr = [[], []];\r\n var stamp = new Date().getTime() - new Date(time).getTime();\r\n\r\n // 返回具体日期\r\n if(stamp > 1000*60*60*24*31){\r\n stamp = new Date(time);\r\n arr[0][0] = that.digit(stamp.getFullYear(), 4);\r\n arr[0][1] = that.digit(stamp.getMonth() + 1);\r\n arr[0][2] = that.digit(stamp.getDate());\r\n\r\n // 是否输出时间\r\n if(!onlyDate){\r\n arr[1][0] = that.digit(stamp.getHours());\r\n arr[1][1] = that.digit(stamp.getMinutes());\r\n arr[1][2] = that.digit(stamp.getSeconds());\r\n }\r\n return arr[0].join('-') + ' ' + arr[1].join(':');\r\n }\r\n\r\n // 30 天以内,返回「多久前」\r\n if(stamp >= 1000*60*60*24){\r\n return ((stamp/1000/60/60/24)|0) + ' 天前';\r\n } else if(stamp >= 1000*60*60){\r\n return ((stamp/1000/60/60)|0) + ' 小时前';\r\n } else if(stamp >= 1000*60*3){ // 3 分钟以内为:刚刚\r\n return ((stamp/1000/60)|0) + ' 分钟前';\r\n } else if(stamp < 0){\r\n return '未来';\r\n } else {\r\n return '刚刚';\r\n }\r\n },\r\n\r\n // 数字前置补零\r\n digit: function(num, length){\r\n var str = '';\r\n num = String(num);\r\n length = length || 2;\r\n for(var i = num.length; i < length; i++){\r\n str += '0';\r\n }\r\n return num < Math.pow(10, length) ? str + (num|0) : num;\r\n },\r\n\r\n // 转化为日期格式字符\r\n toDateString: function(time, format, options){\r\n // 若 null 或空字符,则返回空字符\r\n if(time === null || time === '') return '';\r\n\r\n // 引用自 dayjs\r\n // https://github.com/iamkun/dayjs/blob/v1.11.9/src/constant.js#L30\r\n var REGEX_FORMAT = /\\[([^\\]]+)]|y{1,4}|M{1,2}|d{1,2}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|SSS/g;\r\n var that = this;\r\n var date = new Date(function(){\r\n if(!time) return;\r\n return isNaN(time) ? time : (typeof time === 'string' ? parseInt(time) : time)\r\n }() || new Date())\r\n\r\n if(!date.getDate()) return hint.error('Invalid millisecond for \"util.toDateString(millisecond)\"'), '';\r\n\r\n var years = date.getFullYear();\r\n var month = date.getMonth();\r\n var days = date.getDate();\r\n var hours = date.getHours();\r\n var minutes = date.getMinutes();\r\n var seconds = date.getSeconds();\r\n var milliseconds = date.getMilliseconds();\r\n\r\n var defaultMeridiem = function(hours, minutes){\r\n var hm = hours * 100 + minutes;\r\n if (hm < 600) {\r\n return '凌晨';\r\n } else if (hm < 900) {\r\n return '早上';\r\n } else if (hm < 1100) {\r\n return '上午';\r\n } else if (hm < 1300) {\r\n return '中午';\r\n } else if (hm < 1800) {\r\n return '下午';\r\n }\r\n return '晚上';\r\n };\r\n\r\n var meridiem = (options && options.customMeridiem) || defaultMeridiem;\r\n\r\n var matches = {\r\n yy: function(){return String(years).slice(-2);},\r\n yyyy: function(){return that.digit(years, 4);},\r\n M: function(){return String(month + 1);},\r\n MM: function(){return that.digit(month + 1);},\r\n d: function(){return String(days);},\r\n dd: function(){return that.digit(days);},\r\n H: function(){return String(hours);},\r\n HH: function(){return that.digit(hours);},\r\n h: function(){return String(hours % 12 || 12);},\r\n hh: function(){return that.digit(hours % 12 || 12);},\r\n A: function(){return meridiem(hours, minutes);},\r\n m: function(){return String(minutes);},\r\n mm: function(){return that.digit(minutes);},\r\n s: function(){return String(seconds);},\r\n ss: function(){return that.digit(seconds);},\r\n SSS: function(){return that.digit(milliseconds, 3);}\r\n }\r\n\r\n format = format || 'yyyy-MM-dd HH:mm:ss';\r\n\r\n return format.replace(REGEX_FORMAT, function(match, $1) {\r\n return $1 || (matches[match] && matches[match]()) || match;\r\n });\r\n },\r\n\r\n // 转义 html\r\n escape: function(html){\r\n var exp = /[<\"'>]|&(?=#[a-zA-Z0-9]+)/g;\r\n if(html === undefined || html === null) return '';\r\n\r\n html += '';\r\n if(!exp.test(html)) return html;\r\n\r\n return html.replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&')\r\n .replace(//g, '>')\r\n .replace(/'/g, ''').replace(/\"/g, '"');\r\n },\r\n\r\n // 还原转义的 html\r\n unescape: function(html){\r\n if(html === undefined || html === null) html = '';\r\n html += '';\r\n\r\n return html.replace(/\\&/g, '&')\r\n .replace(/\\</g, '<').replace(/\\>/g, '>')\r\n .replace(/\\'/g, '\\'').replace(/\\"/g, '\"');\r\n },\r\n\r\n // 打开新窗口\r\n openWin: function(options){\r\n var win;\r\n options = options || {};\r\n win = options.window || window.open((options.url || ''), options.target, options.specs);\r\n if(options.url) return;\r\n win.document.open('text/html', 'replace');\r\n win.document.write(options.content || '');\r\n win.document.close();\r\n },\r\n\r\n // 让指定的元素保持在可视区域\r\n toVisibleArea: function(options){\r\n options = $.extend({\r\n margin: 160, // 触发动作的边界值\r\n duration: 200, // 动画持续毫秒数\r\n type: 'y' // 触发方向,x 水平、y 垂直\r\n }, options);\r\n\r\n if(!options.scrollElem[0] || !options.thisElem[0]) return;\r\n\r\n var scrollElem = options.scrollElem // 滚动元素\r\n var thisElem = options.thisElem // 目标元素\r\n var vertical = options.type === 'y' // 是否垂直方向\r\n var SCROLL_NAME = vertical ? 'scrollTop' : 'scrollLeft' // 滚动方法\r\n var OFFSET_NAME = vertical ? 'top' : 'left' // 坐标方式\r\n var scrollValue = scrollElem[SCROLL_NAME]() // 当前滚动距离\r\n var size = scrollElem[vertical ? 'height' : 'width']() // 滚动元素的尺寸\r\n var scrollOffset = scrollElem.offset()[OFFSET_NAME] // 滚动元素所处位置\r\n var thisOffset = thisElem.offset()[OFFSET_NAME] - scrollOffset // 目标元素当前的所在位置\r\n var obj = {};\r\n\r\n // 边界满足条件\r\n if(thisOffset > size - options.margin || thisOffset < options.margin){\r\n obj[SCROLL_NAME] = thisOffset - size/2 + scrollValue\r\n scrollElem.animate(obj, options.duration);\r\n }\r\n },\r\n\r\n // 批量事件\r\n event: function(attr, obj, eventType){\r\n var _body = $('body');\r\n eventType = eventType || 'click';\r\n\r\n // 记录事件回调集合\r\n obj = util.event[attr] = $.extend(true, util.event[attr], obj) || {};\r\n\r\n // 清除委托事件\r\n util.event.UTIL_EVENT_CALLBACK = util.event.UTIL_EVENT_CALLBACK || {};\r\n _body.off(eventType, '*['+ attr +']', util.event.UTIL_EVENT_CALLBACK[attr])\r\n\r\n // 绑定委托事件\r\n util.event.UTIL_EVENT_CALLBACK[attr] = function(){\r\n var othis = $(this);\r\n var key = othis.attr(attr);\r\n (typeof obj[key] === 'function') && obj[key].call(this, othis);\r\n };\r\n\r\n // 清除旧事件,绑定新事件\r\n _body.on(eventType, '*['+ attr +']', util.event.UTIL_EVENT_CALLBACK[attr]);\r\n\r\n return obj;\r\n }\r\n };\r\n\r\n util.on = util.event;\r\n\r\n // 输出接口\r\n exports('util', util);\r\n});\r\n","/**\r\n * dropdown \r\n * 下拉菜单组件\r\n */\r\n\r\nlayui.define(['jquery', 'laytpl', 'lay', 'util'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var laytpl = layui.laytpl;\r\n var util = layui.util;\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n var clickOrMousedown = (device.mobile ? 'touchstart' : 'mousedown');\r\n \r\n // 模块名\r\n var MOD_NAME = 'dropdown';\r\n var MOD_INDEX = 'layui_'+ MOD_NAME +'_index'; // 模块索引名\r\n\r\n // 外部接口\r\n var dropdown = {\r\n config: {\r\n customName: { // 自定义 data 字段名\r\n id: 'id',\r\n title: 'title',\r\n children: 'child'\r\n }\r\n },\r\n index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0,\r\n\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n \r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id;\r\n\r\n thisModule.that[id] = that; // 记录当前实例对象\r\n\r\n return {\r\n config: options,\r\n // 重置实例\r\n reload: function(options){\r\n that.reload.call(that, options);\r\n },\r\n reloadData: function(options){\r\n dropdown.reloadData(id, options);\r\n },\r\n close: function () {\r\n that.remove()\r\n }\r\n }\r\n };\r\n\r\n // 字符常量\r\n var STR_ELEM = 'layui-dropdown';\r\n var STR_HIDE = 'layui-hide';\r\n var STR_DISABLED = 'layui-disabled';\r\n var STR_NONE = 'layui-none';\r\n var STR_ITEM_UP = 'layui-menu-item-up';\r\n var STR_ITEM_DOWN = 'layui-menu-item-down';\r\n var STR_MENU_TITLE = 'layui-menu-body-title';\r\n var STR_ITEM_GROUP = 'layui-menu-item-group';\r\n var STR_ITEM_PARENT = 'layui-menu-item-parent';\r\n var STR_ITEM_DIV = 'layui-menu-item-divider';\r\n var STR_ITEM_CHECKED = 'layui-menu-item-checked';\r\n var STR_ITEM_CHECKED2 = 'layui-menu-item-checked2';\r\n var STR_MENU_PANEL = 'layui-menu-body-panel';\r\n var STR_MENU_PANEL_L = 'layui-menu-body-panel-left';\r\n var STR_ELEM_SHADE = 'layui-dropdown-shade';\r\n \r\n var STR_GROUP_TITLE = '.'+ STR_ITEM_GROUP + '>.'+ STR_MENU_TITLE;\r\n\r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++dropdown.index;\r\n that.config = $.extend({}, that.config, dropdown.config, options);\r\n that.init();\r\n };\r\n\r\n // 默认配置\r\n Class.prototype.config = {\r\n trigger: 'click', // 事件类型\r\n content: '', // 自定义菜单内容\r\n className: '', // 自定义样式类名\r\n style: '', // 设置面板 style 属性\r\n show: false, // 是否初始即显示菜单面板\r\n isAllowSpread: true, // 是否允许菜单组展开收缩\r\n isSpreadItem: true, // 是否初始展开子菜单\r\n data: [], // 菜单数据结构\r\n delay: 300, // 延迟关闭的毫秒数,若 trigger 为 hover 时才生效\r\n shade: 0, // 遮罩\r\n accordion: false // 手风琴效果,仅菜单组生效。基础菜单需要在容器上追加 'lay-accordion' 属性。\r\n };\r\n \r\n // 重载实例\r\n Class.prototype.reload = function(options, type){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n that.init(true, type);\r\n };\r\n\r\n // 初始化准备\r\n Class.prototype.init = function(rerender, type){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 若 elem 非唯一\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n layui.each(elem, function(){\r\n dropdown.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0]));\r\n\r\n // 若重复执行 render,则视为 reload 处理\r\n if(!rerender && elem[0] && elem.data(MOD_INDEX)){\r\n var newThat = thisModule.getThis(elem.data(MOD_INDEX));\r\n if(!newThat) return;\r\n\r\n return newThat.reload(options, type);\r\n }\r\n\r\n options.elem = $(options.elem);\r\n \r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n options.id = 'id' in options ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n\r\n // 初始化自定义字段名\r\n options.customName = $.extend({}, dropdown.config.customName, options.customName);\r\n\r\n if(options.show || (type === 'reloadData' && that.elemView && $('body').find(that.elemView.get(0)).length)) that.render(rerender, type); //初始即显示或者面板弹出之后执行了刷新数据\r\n that.events(); // 事件\r\n };\r\n \r\n // 渲染\r\n Class.prototype.render = function(rerender, type){\r\n var that = this;\r\n var options = that.config;\r\n var customName = options.customName;\r\n var elemBody = $('body');\r\n \r\n // 默认菜单内容\r\n var getDefaultView = function(){\r\n var elemUl = $('
                ');\r\n if(options.data.length > 0 ){\r\n eachItemView(elemUl, options.data)\r\n } else {\r\n elemUl.html('
              • No data
              • ');\r\n }\r\n return elemUl;\r\n };\r\n \r\n // 遍历菜单项\r\n var eachItemView = function(views, data){\r\n // var views = [];\r\n\r\n layui.each(data, function(index, item){\r\n // 是否存在子级\r\n var isChild = item[customName.children] && item[customName.children].length > 0;\r\n var isSpreadItem = ('isSpreadItem' in item) ? item.isSpreadItem : options.isSpreadItem\r\n var title = function(title){\r\n var templet = item.templet || options.templet;\r\n if(templet){\r\n title = typeof templet === 'function' \r\n ? templet(item)\r\n : laytpl(templet).render(item);\r\n }\r\n return title;\r\n }(util.escape(item[customName.title]));\r\n \r\n // 初始类型\r\n var type = function(){\r\n if(isChild){\r\n item.type = item.type || 'parent';\r\n }\r\n if(item.type){\r\n return ({\r\n group: 'group'\r\n ,parent: 'parent'\r\n ,'-': '-'\r\n })[item.type] || 'parent';\r\n }\r\n return '';\r\n }();\r\n\r\n if(type !== '-' && (!item[customName.title] && !item[customName.id] && !isChild)) return;\r\n \r\n //列表元素\r\n var viewLi = $([''\r\n \r\n //标题区\r\n ,function(){\r\n //是否超文本\r\n var viewText = ('href' in item) ? (\r\n ''+ title +''\r\n ) : title;\r\n \r\n //是否存在子级\r\n if(isChild){\r\n return '
                '+ viewText + function(){\r\n if(type === 'parent'){\r\n return '';\r\n } else if(type === 'group' && options.isAllowSpread){\r\n return '';\r\n } else {\r\n return '';\r\n }\r\n }() +'
                '\r\n \r\n }\r\n return '
                '+ viewText +'
                ';\r\n }()\r\n ,''].join(''));\r\n \r\n viewLi.data('item', item);\r\n \r\n //子级区\r\n if(isChild){\r\n var elemPanel = $('
                ');\r\n var elemUl = $('
                  ');\r\n\r\n if(type === 'parent'){\r\n elemPanel.append(eachItemView(elemUl, item[customName.children]));\r\n viewLi.append(elemPanel);\r\n } else {\r\n viewLi.append(eachItemView(elemUl, item[customName.children]));\r\n }\r\n }\r\n\r\n views.append(viewLi);\r\n });\r\n return views;\r\n };\r\n \r\n // 主模板\r\n var TPL_MAIN = ['
                  '\r\n ,'
                  '].join('');\r\n \r\n // 如果是右键事件,则每次触发事件时,将允许重新渲染\r\n if(options.trigger === 'contextmenu' || lay.isTopElem(options.elem[0])) rerender = true;\r\n \r\n // 判断是否已经打开了下拉菜单面板\r\n if(!rerender && options.elem.data(MOD_INDEX +'_opened')) return;\r\n\r\n // 记录模板对象\r\n that.elemView = $('.' + STR_ELEM + '[lay-id=\"' + options.id + '\"]');\r\n if (type === 'reloadData' && that.elemView.length) {\r\n that.elemView.html(options.content || getDefaultView());\r\n } else {\r\n that.elemView = $(TPL_MAIN);\r\n that.elemView.append(options.content || getDefaultView());\r\n\r\n // 初始化某些属性\r\n if(options.className) that.elemView.addClass(options.className);\r\n if(options.style) that.elemView.attr('style', options.style);\r\n\r\n // 记录当前执行的实例索引\r\n dropdown.thisId = options.id;\r\n\r\n // 插入视图\r\n that.remove(); // 移除非当前绑定元素的面板\r\n elemBody.append(that.elemView);\r\n options.elem.data(MOD_INDEX +'_opened', true);\r\n\r\n // 遮罩\r\n var shade = options.shade ? ('
                  ') : '';\r\n that.elemView.before(shade);\r\n\r\n // 如果是鼠标移入事件,则鼠标移出时自动关闭\r\n if(options.trigger === 'mouseenter'){\r\n that.elemView.on('mouseenter', function(){\r\n clearTimeout(thisModule.timer);\r\n }).on('mouseleave', function(){\r\n that.delayRemove();\r\n });\r\n }\r\n }\r\n\r\n // 坐标定位\r\n that.position();\r\n thisModule.prevElem = that.elemView; // 记录当前打开的元素,以便在下次关闭\r\n thisModule.prevElem.data('prevElem', options.elem); // 将当前绑定的元素,记录在打开元素的 data 对象中\r\n \r\n // 阻止全局事件\r\n that.elemView.find('.layui-menu').on(clickOrMousedown, function(e){\r\n layui.stope(e);\r\n });\r\n\r\n // 触发菜单列表事件\r\n that.elemView.find('.layui-menu li').on('click', function(e){\r\n var othis = $(this);\r\n var data = othis.data('item') || {};\r\n var isChild = data[customName.children] && data[customName.children].length > 0;\r\n var isClickAllScope = options.clickScope === 'all'; // 是否所有父子菜单均触发点击事件\r\n\r\n if(data.disabled) return; // 菜单项禁用状态\r\n \r\n // 普通菜单项点击后的回调及关闭面板\r\n if((!isChild || isClickAllScope) && data.type !== '-'){\r\n var ret = typeof options.click === 'function' \r\n ? options.click(data, othis) \r\n : null;\r\n \r\n ret === false || (isChild || that.remove());\r\n layui.stope(e);\r\n }\r\n });\r\n \r\n // 触发菜单组展开收缩\r\n that.elemView.find(STR_GROUP_TITLE).on('click', function(e){\r\n var othis = $(this);\r\n var elemGroup = othis.parent();\r\n var data = elemGroup.data('item') || {};\r\n \r\n if(data.type === 'group' && options.isAllowSpread){\r\n thisModule.spread(elemGroup, options.accordion);\r\n }\r\n });\r\n\r\n // 组件打开完毕的事件\r\n typeof options.ready === 'function' && options.ready(\r\n that.elemView, \r\n options.elem\r\n );\r\n };\r\n \r\n // 位置定位\r\n Class.prototype.position = function(obj){\r\n var that = this;\r\n var options = that.config;\r\n \r\n lay.position(options.elem[0], that.elemView[0], {\r\n position: options.position,\r\n e: that.e,\r\n clickType: options.trigger === 'contextmenu' ? 'right' : null,\r\n align: options.align || null\r\n });\r\n };\r\n \r\n // 删除视图\r\n Class.prototype.remove = function(){\r\n var that = this;\r\n var options = that.config;\r\n var elemPrev = thisModule.prevElem;\r\n \r\n // 若存在已打开的面板元素,则移除\r\n if(elemPrev){\r\n elemPrev.data('prevElem') && (\r\n elemPrev.data('prevElem').data(MOD_INDEX +'_opened', false)\r\n );\r\n elemPrev.remove();\r\n }\r\n lay('.' + STR_ELEM_SHADE).remove();\r\n };\r\n \r\n // 延迟删除视图\r\n Class.prototype.delayRemove = function(){\r\n var that = this;\r\n var options = that.config;\r\n clearTimeout(thisModule.timer);\r\n\r\n thisModule.timer = setTimeout(function(){\r\n that.remove();\r\n }, options.delay);\r\n };\r\n \r\n // 事件\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 若传入 hover,则解析为 mouseenter\r\n if(options.trigger === 'hover') options.trigger = 'mouseenter';\r\n\r\n // 解除上一个事件\r\n if(that.prevElem) that.prevElem.off(options.trigger, that.prevElemCallback);\r\n \r\n // 记录被绑定的元素及回调\r\n that.prevElem = options.elem;\r\n that.prevElemCallback = function(e){\r\n clearTimeout(thisModule.timer);\r\n that.e = e;\r\n that.render();\r\n e.preventDefault();\r\n };\r\n\r\n // 触发元素事件\r\n options.elem.on(options.trigger, that.prevElemCallback);\r\n \r\n // 如果是鼠标移入事件\r\n if(options.trigger === 'mouseenter'){\r\n // 直行鼠标移出事件\r\n options.elem.on('mouseleave', function(){\r\n that.delayRemove();\r\n });\r\n }\r\n };\r\n \r\n // 记录所有实例\r\n thisModule.that = {}; // 记录所有实例对象\r\n \r\n // 获取当前实例对象\r\n thisModule.getThis = function(id){\r\n var that = thisModule.that[id];\r\n if(!that) hint.error(id ? (MOD_NAME +' instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return that;\r\n };\r\n \r\n // 设置菜单组展开和收缩状态\r\n thisModule.spread = function(othis, isAccordion){\r\n var contentElem = othis.children('ul');\r\n var needSpread = othis.hasClass(STR_ITEM_UP);\r\n var ANIM_MS = 200;\r\n\r\n // 动画执行完成后的操作\r\n var complete = function() {\r\n $(this).css({'display': ''}); // 剔除临时 style,以适配外部样式的状态重置;\r\n };\r\n\r\n // 动画是否正在执行\r\n if (contentElem.is(':animated')) return;\r\n\r\n // 展开\r\n if (needSpread) {\r\n othis.removeClass(STR_ITEM_UP).addClass(STR_ITEM_DOWN);\r\n contentElem.hide().stop().slideDown(ANIM_MS, complete);\r\n } else { // 收缩\r\n contentElem.stop().slideUp(ANIM_MS, complete);\r\n othis.removeClass(STR_ITEM_DOWN).addClass(STR_ITEM_UP);\r\n }\r\n\r\n // 手风琴\r\n if (needSpread && isAccordion) {\r\n var groupSibs = othis.siblings('.' + STR_ITEM_DOWN);\r\n groupSibs.children('ul').stop().slideUp(ANIM_MS, complete);\r\n groupSibs.removeClass(STR_ITEM_DOWN).addClass(STR_ITEM_UP);\r\n }\r\n };\r\n \r\n // 全局事件\r\n (function(){\r\n var _WIN = $(window);\r\n var _DOC = $(document);\r\n \r\n // 自适应定位\r\n _WIN.on('resize', function(){\r\n if(!dropdown.thisId) return;\r\n var that = thisModule.getThis(dropdown.thisId);\r\n if(!that) return;\r\n \r\n if((that.elemView && !that.elemView[0]) || !$('.'+ STR_ELEM)[0]){\r\n return false;\r\n }\r\n \r\n var options = that.config;\r\n \r\n if(options.trigger === 'contextmenu'){\r\n that.remove();\r\n } else {\r\n that.position();\r\n }\r\n });\r\n \r\n \r\n \r\n // 点击任意处关闭\r\n _DOC.on(clickOrMousedown, function(e){\r\n if(!dropdown.thisId) return;\r\n var that = thisModule.getThis(dropdown.thisId)\r\n if(!that) return;\r\n \r\n var options = that.config;\r\n \r\n // 若触发的是绑定的元素,或者属于绑定元素的子元素,则不关闭\r\n // 满足条件:当前绑定的元素不是 body document,或者不是鼠标右键事件\r\n if(!(lay.isTopElem(options.elem[0]) || options.trigger === 'contextmenu')){\r\n if(\r\n e.target === options.elem[0] || \r\n options.elem.find(e.target)[0] ||\r\n (that.elemView && e.target === that.elemView[0]) ||\r\n (that.elemView && that.elemView.find(e.target)[0])\r\n ) return;\r\n }\r\n \r\n that.remove();\r\n });\r\n \r\n // 基础菜单的静态元素事件\r\n var ELEM_LI = '.layui-menu:not(.layui-dropdown-menu) li';\r\n _DOC.on('click', ELEM_LI, function(e){\r\n var othis = $(this);\r\n var parent = othis.parents('.layui-menu').eq(0);\r\n var isChild = othis.hasClass(STR_ITEM_GROUP) || othis.hasClass(STR_ITEM_PARENT);\r\n var filter = parent.attr('lay-filter') || parent.attr('id');\r\n var options = lay.options(this);\r\n \r\n // 非触发元素\r\n if(othis.hasClass(STR_ITEM_DIV)) return;\r\n\r\n // 非菜单组\r\n if(!isChild){\r\n // 选中\r\n parent.find('.'+ STR_ITEM_CHECKED).removeClass(STR_ITEM_CHECKED); // 清除选中样式\r\n parent.find('.'+ STR_ITEM_CHECKED2).removeClass(STR_ITEM_CHECKED2); // 清除父级菜单选中样式\r\n othis.addClass(STR_ITEM_CHECKED); //添加选中样式\r\n othis.parents('.'+ STR_ITEM_PARENT).addClass(STR_ITEM_CHECKED2); // 添加父级菜单选中样式\r\n\r\n options.title = options.title || $.trim(othis.children('.'+ STR_MENU_TITLE).text());\r\n \r\n // 触发事件\r\n layui.event.call(this, MOD_NAME, 'click('+ filter +')', options);\r\n }\r\n });\r\n \r\n // 基础菜单的展开收缩事件\r\n _DOC.on('click', (ELEM_LI + STR_GROUP_TITLE), function(e){\r\n var othis = $(this);\r\n var elemGroup = othis.parents('.'+ STR_ITEM_GROUP +':eq(0)');\r\n var options = lay.options(elemGroup[0]);\r\n var isAccordion = typeof othis.parents('.layui-menu').eq(0).attr('lay-accordion') === 'string';\r\n\r\n if(('isAllowSpread' in options) ? options.isAllowSpread : true){\r\n thisModule.spread(elemGroup, isAccordion);\r\n }\r\n });\r\n \r\n // 判断子级菜单是否超出屏幕\r\n var ELEM_LI_PAR = '.layui-menu .'+ STR_ITEM_PARENT\r\n _DOC.on('mouseenter', ELEM_LI_PAR, function(e){\r\n var othis = $(this);\r\n var elemPanel = othis.find('.'+ STR_MENU_PANEL);\r\n\r\n if(!elemPanel[0]) return;\r\n var rect = elemPanel[0].getBoundingClientRect();\r\n \r\n // 是否超出右侧屏幕\r\n if(rect.right > _WIN.width()){\r\n elemPanel.addClass(STR_MENU_PANEL_L);\r\n // 不允许超出左侧屏幕\r\n rect = elemPanel[0].getBoundingClientRect();\r\n if(rect.left < 0){\r\n elemPanel.removeClass(STR_MENU_PANEL_L);\r\n }\r\n }\r\n \r\n // 是否超出底部屏幕\r\n if(rect.bottom > _WIN.height()){\r\n elemPanel.eq(0).css('margin-top', -(rect.bottom - _WIN.height() + 5));\r\n }\r\n }).on('mouseleave', ELEM_LI_PAR, function(e){\r\n var othis = $(this)\r\n var elemPanel = othis.children('.'+ STR_MENU_PANEL);\r\n \r\n elemPanel.removeClass(STR_MENU_PANEL_L);\r\n elemPanel.css('margin-top', 0);\r\n });\r\n \r\n })();\r\n\r\n // 关闭面板\r\n dropdown.close = function(id){\r\n var that = thisModule.getThis(id);\r\n if(!that) return this;\r\n \r\n that.remove();\r\n return thisModule.call(that);\r\n };\r\n \r\n // 重载实例\r\n dropdown.reload = function(id, options, type){\r\n var that = thisModule.getThis(id);\r\n if(!that) return this;\r\n\r\n that.reload(options, type);\r\n return thisModule.call(that);\r\n };\r\n\r\n // 仅重载数据\r\n dropdown.reloadData = function(){\r\n var args = $.extend([], arguments);\r\n args[2] = 'reloadData';\r\n\r\n // 重载时,与数据相关的参数\r\n var dataParams = new RegExp('^('+ [\r\n 'data', 'templet', 'content'\r\n ].join('|') + ')$');\r\n\r\n // 过滤与数据无关的参数\r\n layui.each(args[1], function (key, value) {\r\n if(!dataParams.test(key)){\r\n delete args[1][key];\r\n }\r\n });\r\n\r\n return dropdown.reload.apply(null, args);\r\n };\r\n\r\n // 核心入口\r\n dropdown.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, dropdown);\r\n});\r\n","/**\r\n * slider 滑块组件\r\n */\r\n\r\nlayui.define(['jquery', 'lay'], function(exports){\r\n 'use strict';\r\n\r\n var $ = layui.$;\r\n var lay = layui.lay;\r\n\r\n // 外部接口\r\n var slider = {\r\n config: {}\r\n ,index: layui.slider ? (layui.slider.index + 10000) : 0\r\n\r\n // 设置全局项\r\n ,set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n }\r\n\r\n // 事件\r\n ,on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisSlider = function(){\r\n var that = this\r\n ,options = that.config;\r\n\r\n return {\r\n setValue: function(value, index){ // 设置值\r\n value = value > options.max ? options.max : value;\r\n value = value < options.min ? options.min : value;\r\n options.value = value;\r\n return that.slide('set', value, index || 0);\r\n }\r\n ,config: options\r\n }\r\n };\r\n\r\n // 字符常量\r\n var MOD_NAME = 'slider';\r\n var DISABLED = 'layui-disabled';\r\n var ELEM_VIEW = 'layui-slider';\r\n var SLIDER_BAR = 'layui-slider-bar';\r\n var SLIDER_WRAP = 'layui-slider-wrap';\r\n var SLIDER_WRAP_BTN = 'layui-slider-wrap-btn';\r\n var SLIDER_TIPS = 'layui-slider-tips';\r\n var SLIDER_INPUT = 'layui-slider-input';\r\n var SLIDER_INPUT_TXT = 'layui-slider-input-txt';\r\n var SLIDER_INPUT_BTN = 'layui-slider-input-btn';\r\n var ELEM_HOVER = 'layui-slider-hover';\r\n\r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++slider.index;\r\n that.config = $.extend({}, that.config, slider.config, options);\r\n that.render();\r\n };\r\n\r\n // 默认配置\r\n Class.prototype.config = {\r\n type: 'default' //滑块类型,垂直:vertical\r\n ,min: 0 //最小值\r\n ,max: 100 //最大值,默认100\r\n ,value: 0 //初始值,默认为0\r\n ,step: 1 //间隔值\r\n ,showstep: false //间隔点开启\r\n ,tips: true //文字提示,开启\r\n ,input: false //输入框,关闭\r\n ,range: false //范围选择,与输入框不能同时开启,默认关闭\r\n ,height: 200 //配合 type:\"vertical\" 使用,默认200px\r\n ,disabled: false //滑块禁用,默认关闭\r\n ,theme: '#16baaa' //主题颜色\r\n };\r\n\r\n //滑块渲染\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n layui.each(elem, function(){\r\n slider.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0]));\r\n\r\n //间隔值不能小于 1\r\n if(options.step < 1) options.step = 1;\r\n\r\n //最大值不能小于最小值\r\n if(options.max < options.min) options.max = options.min + options.step;\r\n\r\n\r\n\r\n //判断是否开启双滑块\r\n if(options.range){\r\n options.value = typeof(options.value) == 'object' ? options.value : [options.min, options.value];\r\n var minValue = Math.min(options.value[0], options.value[1])\r\n ,maxValue = Math.max(options.value[0], options.value[1]);\r\n options.value[0] = Math.max(minValue,options.min);\r\n options.value[1] = Math.max(maxValue,options.min);\r\n options.value[0] = Math.min(options.value[0],options.max);\r\n options.value[1] = Math.min(options.value[1],options.max);\r\n\r\n var scaleFir = Math.floor((options.value[0] - options.min) / (options.max - options.min) * 100)\r\n ,scaleSec = Math.floor((options.value[1] - options.min) / (options.max - options.min) * 100)\r\n ,scale = scaleSec - scaleFir + '%';\r\n scaleFir = scaleFir + '%';\r\n scaleSec = scaleSec + '%';\r\n } else {\r\n //如果初始值是一个数组,则获取数组的最小值\r\n if(typeof options.value == 'object'){\r\n options.value = Math.min.apply(null, options.value);\r\n }\r\n\r\n //初始值不能小于最小值且不能大于最大值\r\n if(options.value < options.min) options.value = options.min;\r\n if(options.value > options.max) options.value = options.max;\r\n\r\n var scale = Math.floor((options.value - options.min) / (options.max - options.min) * 100) + '%';\r\n }\r\n\r\n\r\n //如果禁用,颜色为统一的灰色\r\n var theme = options.disabled ? '#c2c2c2' : options.theme;\r\n\r\n //滑块\r\n var temp = '
                  '+ (options.tips ? '
                  ' : '') +\r\n '
                  ' +\r\n '
                  '+ (options.range ? '
                  ' : '') +'
                  ';\r\n\r\n var othis = $(options.elem)\r\n ,hasRender = othis.next('.' + ELEM_VIEW);\r\n //生成替代元素\r\n hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender\r\n that.elemTemp = $(temp);\r\n\r\n //把数据缓存到滑块上\r\n if(options.range){\r\n that.elemTemp.find('.' + SLIDER_WRAP).eq(0).data('value', options.value[0]);\r\n that.elemTemp.find('.' + SLIDER_WRAP).eq(1).data('value', options.value[1]);\r\n }else{\r\n that.elemTemp.find('.' + SLIDER_WRAP).data('value', options.value);\r\n }\r\n\r\n //插入替代元素\r\n othis.html(that.elemTemp);\r\n\r\n //垂直滑块\r\n if(options.type === 'vertical'){\r\n that.elemTemp.height(options.height + 'px');\r\n }\r\n\r\n //显示间断点\r\n if(options.showstep){\r\n var number = (options.max - options.min) / options.step, item = '';\r\n for(var i = 1; i < number + 1; i++) {\r\n var step = i * 100 / number;\r\n if(step < 100){\r\n item += '
                  '\r\n }\r\n }\r\n that.elemTemp.append(item);\r\n }\r\n\r\n //插入输入框\r\n if(options.input && !options.range){\r\n var elemInput = $('
                  ');\r\n othis.css(\"position\",\"relative\");\r\n othis.append(elemInput);\r\n othis.find('.' + SLIDER_INPUT_TXT).children('input').val(options.value);\r\n if(options.type === 'vertical'){\r\n elemInput.css({\r\n left: 0\r\n ,top: -48\r\n });\r\n } else {\r\n that.elemTemp.css(\"margin-right\", elemInput.outerWidth() + 15);\r\n }\r\n }\r\n\r\n //给未禁止的滑块滑动事件\r\n if(!options.disabled){\r\n that.slide();\r\n }else{\r\n that.elemTemp.addClass(DISABLED);\r\n that.elemTemp.find('.' + SLIDER_WRAP_BTN).addClass(DISABLED);\r\n }\r\n\r\n //划过滑块显示数值\r\n var timer;\r\n that.elemTemp.find('.' + SLIDER_WRAP_BTN).on('mouseover', function(){\r\n var sliderWidth = options.type === 'vertical' ? options.height : that.elemTemp[0].offsetWidth\r\n ,sliderWrap = that.elemTemp.find('.' + SLIDER_WRAP)\r\n ,tipsLeft = options.type === 'vertical' ? (sliderWidth - $(this).parent()[0].offsetTop - sliderWrap.height()) : $(this).parent()[0].offsetLeft\r\n ,left = tipsLeft / sliderWidth * 100\r\n ,value = $(this).parent().data('value')\r\n ,tipsTxt = options.setTips ? options.setTips(value) : value;\r\n that.elemTemp.find('.' + SLIDER_TIPS).html(tipsTxt);\r\n\r\n clearTimeout(timer);\r\n timer = setTimeout(function(){\r\n if(options.type === 'vertical'){\r\n that.elemTemp.find('.' + SLIDER_TIPS).css({\r\n \"bottom\": left + '%',\r\n \"margin-bottom\": \"20px\",\r\n \"display\": \"inline-block\"\r\n });\r\n } else {\r\n that.elemTemp.find('.' + SLIDER_TIPS).css({\r\n \"left\": left + '%',\r\n \"display\": \"inline-block\"\r\n });\r\n }\r\n }, 300);\r\n }).on('mouseout', function(){\r\n clearTimeout(timer);\r\n that.elemTemp.find('.' + SLIDER_TIPS).css(\"display\", \"none\");\r\n });\r\n };\r\n\r\n //滑块滑动\r\n Class.prototype.slide = function(setValue, value, i){\r\n var that = this\r\n ,options = that.config\r\n ,sliderAct = that.elemTemp\r\n ,sliderWidth = function(){\r\n return options.type === 'vertical' ? options.height : sliderAct[0].offsetWidth\r\n }\r\n ,sliderWrap = sliderAct.find('.' + SLIDER_WRAP)\r\n ,sliderTxt = sliderAct.next('.' + SLIDER_INPUT)\r\n ,inputValue = sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val()\r\n ,step = 100 / ((options.max - options.min) / Math.ceil(options.step))\r\n ,change = function(offsetValue, index, from){\r\n if(Math.ceil(offsetValue) * step > 100){\r\n offsetValue = Math.ceil(offsetValue) * step\r\n }else{\r\n offsetValue = Math.round(offsetValue) * step\r\n }\r\n offsetValue = offsetValue > 100 ? 100: offsetValue;\r\n offsetValue = offsetValue < 0 ? 0: offsetValue;\r\n sliderWrap.eq(index).css((options.type === 'vertical' ?'bottom':'left'), offsetValue + '%');\r\n var firLeft = valueTo(sliderWrap[0].offsetLeft)\r\n ,secLeft = options.range ? valueTo(sliderWrap[1].offsetLeft) : 0;\r\n if(options.type === 'vertical'){\r\n sliderAct.find('.' + SLIDER_TIPS).css({\"bottom\":offsetValue + '%', \"margin-bottom\":\"20px\"});\r\n firLeft = valueTo(sliderWidth() - sliderWrap[0].offsetTop - sliderWrap.height());\r\n secLeft = options.range ? valueTo(sliderWidth() - sliderWrap[1].offsetTop - sliderWrap.height()) : 0;\r\n }else{\r\n sliderAct.find('.' + SLIDER_TIPS).css(\"left\",offsetValue + '%');\r\n }\r\n firLeft = firLeft > 100 ? 100: firLeft;\r\n secLeft = secLeft > 100 ? 100: secLeft;\r\n var minLeft = Math.min(firLeft, secLeft)\r\n ,wrapWidth = Math.abs(firLeft - secLeft);\r\n if(options.type === 'vertical'){\r\n sliderAct.find('.' + SLIDER_BAR).css({\"height\":wrapWidth + '%', \"bottom\":minLeft + '%'});\r\n }else{\r\n sliderAct.find('.' + SLIDER_BAR).css({\"width\":wrapWidth + '%', \"left\":minLeft + '%'});\r\n }\r\n var selfValue = options.min + Math.round((options.max - options.min) * offsetValue / 100);\r\n inputValue = selfValue;\r\n sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val(inputValue);\r\n sliderWrap.eq(index).data('value', selfValue);\r\n sliderAct.find('.' + SLIDER_TIPS).html(options.setTips ? options.setTips(selfValue) : selfValue);\r\n\r\n //如果开启范围选择,则返回数组值\r\n if(options.range){\r\n var arrValue = [\r\n sliderWrap.eq(0).data('value')\r\n ,sliderWrap.eq(1).data('value')\r\n ];\r\n if(arrValue[0] > arrValue[1]) arrValue.reverse(); //如果前面的圆点超过了后面的圆点值,则调换顺序\r\n }\r\n\r\n that.value = options.range ? arrValue : selfValue; // 最新值\r\n options.change && options.change(that.value); // change 回调\r\n\r\n // 值完成选中的事件\r\n if(from === 'done') options.done && options.done(that.value);\r\n }\r\n ,valueTo = function(value){\r\n var oldLeft = value / sliderWidth() * 100 / step\r\n ,left = Math.round(oldLeft) * step;\r\n if(value == sliderWidth()){\r\n left = Math.ceil(oldLeft) * step;\r\n }\r\n return left;\r\n }\r\n\r\n //拖拽元素\r\n ,elemMove = $(['
                  sliderWidth())left = sliderWidth();\r\n var reaLeft = left / sliderWidth() * 100 / step;\r\n change(reaLeft, index);\r\n othis.addClass(ELEM_HOVER);\r\n sliderAct.find('.' + SLIDER_TIPS).show();\r\n e.preventDefault();\r\n };\r\n\r\n var up = function(){\r\n othis.removeClass(ELEM_HOVER);\r\n sliderAct.find('.' + SLIDER_TIPS).hide();\r\n };\r\n\r\n createMoveElem(move, up)\r\n });\r\n });\r\n\r\n // 点击滑块\r\n sliderAct.on('click', function(e){\r\n var main = $('.' + SLIDER_WRAP_BTN);\r\n var othis = $(this);\r\n if(!main.is(event.target) && main.has(event.target).length === 0 && main.length){\r\n var index;\r\n var offset = options.type === 'vertical'\r\n ? (sliderWidth() - e.clientY + othis.offset().top - $(window).scrollTop())\r\n :(e.clientX - othis.offset().left - $(window).scrollLeft());\r\n\r\n if(offset < 0)offset = 0;\r\n if(offset > sliderWidth()) offset = sliderWidth();\r\n var reaLeft = offset / sliderWidth() * 100 / step;\r\n if(options.range){\r\n if(options.type === 'vertical'){\r\n index = Math.abs(offset - parseInt($(sliderWrap[0]).css('bottom'))) > Math.abs(offset - parseInt($(sliderWrap[1]).css('bottom'))) ? 1 : 0;\r\n } else {\r\n index = Math.abs(offset - sliderWrap[0].offsetLeft) > Math.abs(offset - sliderWrap[1].offsetLeft) ? 1 : 0;\r\n }\r\n } else {\r\n index = 0;\r\n }\r\n change(reaLeft, index, 'done');\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n //点击加减输入框\r\n sliderTxt.children('.' + SLIDER_INPUT_BTN).children('i').each(function(index){\r\n $(this).on('click', function(){\r\n inputValue = sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val();\r\n if(index == 1){ //减\r\n inputValue = inputValue - options.step < options.min\r\n ? options.min\r\n : Number(inputValue) - options.step;\r\n }else{\r\n inputValue = Number(inputValue) + options.step > options.max\r\n ? options.max\r\n : Number(inputValue) + options.step;\r\n }\r\n var inputScale = (inputValue - options.min) / (options.max - options.min) * 100 / step;\r\n change(inputScale, 0, 'done');\r\n });\r\n });\r\n\r\n //获取输入框值\r\n var getInputValue = function(){\r\n var realValue = this.value;\r\n realValue = isNaN(realValue) ? 0 : realValue;\r\n realValue = realValue < options.min ? options.min : realValue;\r\n realValue = realValue > options.max ? options.max : realValue;\r\n this.value = realValue;\r\n var inputScale = (realValue - options.min) / (options.max - options.min) * 100 / step;\r\n change(inputScale, 0, 'done');\r\n };\r\n sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').on('keydown', function(e){\r\n if(e.keyCode === 13){\r\n e.preventDefault();\r\n getInputValue.call(this);\r\n }\r\n }).on('change', getInputValue);\r\n };\r\n\r\n //事件处理\r\n Class.prototype.events = function(){\r\n var that = this\r\n ,options = that.config;\r\n };\r\n\r\n //核心入口\r\n slider.render = function(options){\r\n var inst = new Class(options);\r\n return thisSlider.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, slider);\r\n})\r\n","/**\r\n * colorpicker \r\n * 颜色选择组件\r\n */\r\n\r\nlayui.define(['jquery', 'lay'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var lay = layui.lay;\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n var clickOrMousedown = (device.mobile ? 'click' : 'mousedown');\r\n\r\n //外部接口\r\n var colorpicker = {\r\n config: {}\r\n ,index: layui.colorpicker ? (layui.colorpicker.index + 10000) : 0\r\n\r\n //设置全局项\r\n ,set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n }\r\n \r\n //事件\r\n ,on: function(events, callback){\r\n return layui.onevent.call(this, 'colorpicker', events, callback);\r\n }\r\n };\r\n \r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id;\r\n\r\n thisModule.that[id] = that; // 记录当前实例对象\r\n\r\n return {\r\n config: options\r\n };\r\n }\r\n\r\n //字符常量\r\n ,MOD_NAME = 'colorpicker', SHOW = 'layui-show', THIS = 'layui-this', ELEM = 'layui-colorpicker'\r\n \r\n ,ELEM_MAIN = '.layui-colorpicker-main', ICON_PICKER_DOWN = 'layui-icon-down', ICON_PICKER_CLOSE = 'layui-icon-close'\r\n ,PICKER_TRIG_SPAN = 'layui-colorpicker-trigger-span', PICKER_TRIG_I = 'layui-colorpicker-trigger-i', PICKER_SIDE = 'layui-colorpicker-side', PICKER_SIDE_SLIDER = 'layui-colorpicker-side-slider'\r\n ,PICKER_BASIS = 'layui-colorpicker-basis', PICKER_ALPHA_BG = 'layui-colorpicker-alpha-bgcolor', PICKER_ALPHA_SLIDER = 'layui-colorpicker-alpha-slider', PICKER_BASIS_CUR = 'layui-colorpicker-basis-cursor', PICKER_INPUT = 'layui-colorpicker-main-input'\r\n\r\n //RGB转HSB\r\n ,RGBToHSB = function(rgb){\r\n var hsb = {h:0, s:0, b:0};\r\n var min = Math.min(rgb.r, rgb.g, rgb.b);\r\n var max = Math.max(rgb.r, rgb.g, rgb.b);\r\n var delta = max - min;\r\n hsb.b = max;\r\n hsb.s = max !== 0 ? 255*delta/max : 0;\r\n if(hsb.s !== 0){\r\n if(rgb.r == max){ // 因 rgb 中返回的数字为 string 类型\r\n hsb.h = (rgb.g - rgb.b) / delta;\r\n }else if(rgb.g == max){\r\n hsb.h = 2 + (rgb.b - rgb.r) / delta;\r\n }else{\r\n hsb.h = 4 + (rgb.r - rgb.g) / delta;\r\n }\r\n }else{\r\n hsb.h = -1;\r\n }\r\n if(max === min){\r\n hsb.h = 0;\r\n }\r\n hsb.h *= 60;\r\n if(hsb.h < 0) {\r\n hsb.h += 360;\r\n }\r\n hsb.s *= 100/255;\r\n hsb.b *= 100/255;\r\n return hsb; \r\n }\r\n\r\n //HEX转HSB\r\n ,HEXToHSB = function(hex){\r\n hex = hex.indexOf('#') > -1 ? hex.substring(1) : hex;\r\n if(hex.length === 3){\r\n var num = hex.split(\"\");\r\n hex = num[0]+num[0]+num[1]+num[1]+num[2]+num[2]\r\n }\r\n hex = parseInt(hex, 16);\r\n var rgb = {r:hex >> 16, g:(hex & 0x00FF00) >> 8, b:(hex & 0x0000FF)};\r\n return RGBToHSB(rgb);\r\n }\r\n\r\n //HSB转RGB\r\n ,HSBToRGB = function(hsb){\r\n var rgb = {};\r\n var h = hsb.h;\r\n var s = hsb.s*255/100;\r\n var b = hsb.b*255/100;\r\n if(s === 0){\r\n rgb.r = rgb.g = rgb.b = b;\r\n }else{\r\n var t1 = b;\r\n var t2 = (255 - s) * b /255;\r\n var t3 = (t1 - t2) * (h % 60) /60;\r\n if(h === 360) h = 0;\r\n if(h < 60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}\r\n else if(h < 120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}\r\n else if(h < 180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}\r\n else if(h < 240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}\r\n else if(h < 300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}\r\n else if(h < 360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}\r\n else {rgb.r=0; rgb.g=0; rgb.b=0}\r\n }\r\n return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};\r\n }\r\n\r\n //HSB转HEX\r\n ,HSBToHEX = function(hsb){\r\n var rgb = HSBToRGB(hsb);\r\n var hex = [\r\n rgb.r.toString(16)\r\n ,rgb.g.toString(16)\r\n ,rgb.b.toString(16)\r\n ];\r\n $.each(hex, function(nr, val){\r\n if(val.length === 1){\r\n hex[nr] = '0' + val;\r\n }\r\n });\r\n return hex.join('');\r\n }\r\n\r\n //转化成所需rgb格式\r\n ,RGBSTo = function(rgbs){\r\n var regexp = /[0-9]{1,3}/g;\r\n var re = rgbs.match(regexp) || [];\r\n return {r:re[0], g:re[1], b:re[2]};\r\n }\r\n \r\n ,$win = $(window)\r\n ,$doc = $(document)\r\n \r\n //构造器\r\n ,Class = function(options){\r\n var that = this;\r\n that.index = ++colorpicker.index;\r\n that.config = $.extend({}, that.config, colorpicker.config, options);\r\n that.render();\r\n };\r\n\r\n //默认配置\r\n Class.prototype.config = {\r\n color: '' //默认颜色,默认没有\r\n ,size: null //选择器大小\r\n ,alpha: false //是否开启透明度\r\n ,format: 'hex' //颜色显示/输入格式,可选 rgb,hex\r\n ,predefine: false //预定义颜色是否开启\r\n ,colors: [ //默认预定义颜色列表\r\n '#16baaa', '#16b777', '#1E9FFF', '#FF5722', '#FFB800', '#01AAED', '#999', '#c00', '#ff8c00','#ffd700'\r\n ,'#90ee90', '#00ced1', '#1e90ff', '#c71585', 'rgb(0, 186, 189)', 'rgb(255, 120, 0)', 'rgb(250, 212, 0)', '#393D49', 'rgba(0,0,0,.5)', 'rgba(255, 69, 0, 0.68)', 'rgba(144, 240, 144, 0.5)', 'rgba(31, 147, 255, 0.73)'\r\n ]\r\n };\r\n\r\n //初始颜色选择框\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n layui.each(elem, function(){\r\n colorpicker.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0]));\r\n \r\n //颜色选择框对象\r\n var elemColorBox = $(['
                  '\r\n ,''\r\n ,' 3){ //需要优化\r\n if(!(options.alpha && options.format == 'rgb')){\r\n bgstr = '#' + HSBToHEX(RGBToHSB(RGBSTo(options.color)))\r\n }\r\n }\r\n \r\n return 'background: '+ bgstr;\r\n }\r\n \r\n return bgstr;\r\n }() +'\">'\r\n ,''\r\n ,''\r\n ,''\r\n ,'
                  '].join(''))\r\n\r\n //初始化颜色选择框\r\n elem = options.elem = $(options.elem);\r\n options.size && elemColorBox.addClass('layui-colorpicker-'+ options.size); //初始化颜色选择框尺寸\r\n \r\n // 插入颜色选择框\r\n elem.addClass('layui-inline').html(\r\n that.elemColorBox = elemColorBox\r\n );\r\n\r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n options.id = 'id' in options ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n \r\n // 获取背景色值\r\n that.color = that.elemColorBox.find('.'+ PICKER_TRIG_SPAN)[0].style.background;\r\n \r\n // 相关事件\r\n that.events();\r\n };\r\n\r\n //渲染颜色选择器\r\n Class.prototype.renderPicker = function(){\r\n var that = this\r\n ,options = that.config\r\n ,elemColorBox = that.elemColorBox[0]\r\n \r\n //颜色选择器对象\r\n ,elemPicker = that.elemPicker = $(['
                  '\r\n //颜色面板\r\n ,'
                  '\r\n ,'
                  '\r\n ,'
                  '\r\n ,'
                  '\r\n ,'
                  '\r\n ,'
                  '\r\n ,'
                  '\r\n ,'
                  '\r\n ,'
                  '\r\n ,'
                  '\r\n \r\n //透明度条块\r\n ,'
                  '\r\n ,'
                  '\r\n ,'
                  '\r\n ,'
                  '\r\n ,'
                  '\r\n \r\n //预设颜色列表\r\n ,function(){\r\n if(options.predefine){\r\n var list = ['
                  '];\r\n layui.each(options.colors, function(i, v){\r\n list.push(['
                  3 \r\n ? ' layui-colorpicker-pre-isalpha' \r\n : '') +'\">'\r\n ,'
                  '\r\n ,'
                  '].join(''));\r\n });\r\n list.push('
                  ');\r\n return list.join('');\r\n } else {\r\n return '';\r\n }\r\n }()\r\n \r\n //底部表单元素区域\r\n ,'
                  '\r\n ,'
                  '\r\n ,''\r\n ,'
                  '\r\n ,'
                  '\r\n ,''\r\n ,''\r\n ,''\r\n ,'
                  '].join(''))\r\n \r\n ,elemColorBoxSpan = that.elemColorBox.find('.' + PICKER_TRIG_SPAN)[0];\r\n \r\n //如果当前点击的颜色盒子已经存在选择器,则关闭\r\n if($(ELEM_MAIN)[0] && $(ELEM_MAIN).data('index') == that.index){\r\n that.removePicker(Class.thisElemInd);\r\n } else { //插入颜色选择器\r\n that.removePicker(Class.thisElemInd); \r\n $('body').append(elemPicker);\r\n }\r\n\r\n // 记录当前执行的实例索引\r\n colorpicker.thisId = options.id;\r\n \r\n Class.thisElemInd = that.index; //记录最新打开的选择器索引\r\n Class.thisColor = elemColorBox.style.background //记录最新打开的选择器颜色选中值\r\n \r\n that.position();\r\n that.pickerEvents();\r\n };\r\n\r\n //颜色选择器移除\r\n Class.prototype.removePicker = function(index){\r\n var that = this;\r\n var options = that.config;\r\n var elem = $('#layui-colorpicker'+ (index || that.index));\r\n\r\n if(elem[0]){\r\n elem.remove();\r\n delete colorpicker.thisId;\r\n\r\n // 面板关闭后的回调\r\n typeof options.close === 'function' && options.close(that.color);\r\n }\r\n\r\n return that;\r\n };\r\n \r\n //定位算法\r\n Class.prototype.position = function(){\r\n var that = this\r\n ,options = that.config;\r\n lay.position(that.bindElem || that.elemColorBox[0], that.elemPicker[0], {\r\n position: options.position\r\n ,align: 'center'\r\n });\r\n return that;\r\n };\r\n\r\n //颜色选择器赋值\r\n Class.prototype.val = function(){\r\n var that = this\r\n ,options = that.config\r\n \r\n ,elemColorBox = that.elemColorBox.find('.' + PICKER_TRIG_SPAN)\r\n ,elemPickerInput = that.elemPicker.find('.' + PICKER_INPUT)\r\n ,e = elemColorBox[0]\r\n ,bgcolor = e.style.backgroundColor;\r\n\r\n //判断是否有背景颜色\r\n if(bgcolor){\r\n \r\n //转化成hsb格式\r\n var hsb = RGBToHSB(RGBSTo(bgcolor))\r\n ,type = elemColorBox.attr('lay-type');\r\n \r\n //同步滑块的位置及颜色选择器的选择\r\n that.select(hsb.h, hsb.s, hsb.b);\r\n \r\n // 若格式要求为rgb\r\n if(type === 'torgb'){\r\n elemPickerInput.find('input').val(bgcolor);\r\n } else if(type === 'rgba'){ // 若格式要求为 rgba\r\n var rgb = RGBSTo(bgcolor);\r\n \r\n // 若开启透明度而没有设置,则给默认值\r\n if((bgcolor.match(/[0-9]{1,3}/g) || []).length === 3){\r\n elemPickerInput.find('input').val('rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', 1)');\r\n that.elemPicker.find('.'+ PICKER_ALPHA_SLIDER).css(\"left\", 280);\r\n } else {\r\n elemPickerInput.find('input').val(bgcolor);\r\n var left = bgcolor.slice(bgcolor.lastIndexOf(\",\") + 1, bgcolor.length - 1) * 280;\r\n that.elemPicker.find('.'+ PICKER_ALPHA_SLIDER).css(\"left\", left);\r\n }\r\n \r\n // 设置 span 背景色\r\n that.elemPicker.find('.'+ PICKER_ALPHA_BG)[0].style.background = 'linear-gradient(to right, rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', 0), rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +'))'; \r\n } else {\r\n elemPickerInput.find('input').val('#'+ HSBToHEX(hsb));\r\n }\r\n } else {\r\n // 若没有背景颜色则默认到最初始的状态\r\n that.select(0,100,100);\r\n elemPickerInput.find('input').val(\"\");\r\n that.elemPicker.find('.'+ PICKER_ALPHA_BG)[0].style.background = '';\r\n that.elemPicker.find('.'+ PICKER_ALPHA_SLIDER).css(\"left\", 280);\r\n }\r\n };\r\n\r\n //颜色选择器滑动 / 点击\r\n Class.prototype.side = function(){\r\n var that = this\r\n ,options = that.config\r\n \r\n ,span = that.elemColorBox.find('.' + PICKER_TRIG_SPAN)\r\n ,type = span.attr('lay-type')\r\n\r\n ,side = that.elemPicker.find('.' + PICKER_SIDE)\r\n ,slider = that.elemPicker.find('.' + PICKER_SIDE_SLIDER)\r\n ,basis = that.elemPicker.find('.' + PICKER_BASIS)\r\n ,choose = that.elemPicker.find('.' + PICKER_BASIS_CUR)\r\n ,alphacolor = that.elemPicker.find('.' + PICKER_ALPHA_BG)\r\n ,alphaslider = that.elemPicker.find('.' + PICKER_ALPHA_SLIDER)\r\n \r\n ,_h = slider[0].offsetTop/180*360\r\n ,_b = 100 - (choose[0].offsetTop + 3)/180*100\r\n ,_s = (choose[0].offsetLeft + 3)/260*100\r\n ,_a = Math.round(alphaslider[0].offsetLeft/280*100)/100 \r\n \r\n ,i = that.elemColorBox.find('.' + PICKER_TRIG_I)\r\n ,pre = that.elemPicker.find('.layui-colorpicker-pre').children('div')\r\n\r\n ,change = function(x,y,z,a){\r\n that.select(x, y, z);\r\n var rgb = HSBToRGB({h:x, s:y, b:z});\r\n var color = HSBToHEX({h:x, s:y, b:z});\r\n var elemInput = that.elemPicker.find('.' + PICKER_INPUT).find('input');\r\n\r\n i.addClass(ICON_PICKER_DOWN).removeClass(ICON_PICKER_CLOSE);\r\n span[0].style.background = 'rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +')';\r\n\r\n if(type === 'torgb'){\r\n elemInput.val('rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +')');\r\n } else if(type === 'rgba'){\r\n var left = a * 280;\r\n alphaslider.css(\"left\", left);\r\n elemInput.val('rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', '+ a +')');\r\n span[0].style.background = 'rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', '+ a +')';\r\n alphacolor[0].style.background = 'linear-gradient(to right, rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', 0), rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +'))'\r\n } else {\r\n elemInput.val('#'+ color);\r\n }\r\n \r\n //回调更改的颜色\r\n options.change && options.change(that.elemPicker.find('.' + PICKER_INPUT).find('input').val());\r\n }\r\n\r\n //拖拽元素\r\n ,elemMove = $(['
                  '].join(''))\r\n ,createMoveElem = function(call){\r\n $('#LAY-colorpicker-moving')[0] || $('body').append(elemMove);\r\n elemMove.on('mousemove', call);\r\n elemMove.on('mouseup', function(){\r\n elemMove.remove();\r\n }).on('mouseleave', function(){\r\n elemMove.remove();\r\n });\r\n };\r\n\r\n //右侧主色选择\r\n slider.on('mousedown', function(e){\r\n var oldtop = this.offsetTop\r\n ,oldy = e.clientY;\r\n var move = function(e){\r\n var top = oldtop + (e.clientY - oldy)\r\n ,maxh = side[0].offsetHeight;\r\n if(top < 0)top = 0;\r\n if(top > maxh)top = maxh;\r\n var h = top/180*360;\r\n _h = h;\r\n change(h, _s, _b, _a);\r\n e.preventDefault();\r\n };\r\n \r\n createMoveElem(move);\r\n //layui.stope(e);\r\n e.preventDefault();\r\n });\r\n \r\n side.on('click', function(e){\r\n var top = e.clientY - $(this).offset().top + $win.scrollTop();\r\n if(top < 0)top = 0;\r\n if(top > this.offsetHeight) top = this.offsetHeight; \r\n var h = top/180*360;\r\n _h = h;\r\n change(h, _s, _b, _a); \r\n e.preventDefault();\r\n });\r\n \r\n //中间小圆点颜色选择\r\n choose.on('mousedown', function(e){\r\n var oldtop = this.offsetTop\r\n ,oldleft = this.offsetLeft\r\n ,oldy = e.clientY\r\n ,oldx = e.clientX;\r\n var move = function(e){\r\n var top = oldtop + (e.clientY - oldy)\r\n ,left = oldleft + (e.clientX - oldx)\r\n ,maxh = basis[0].offsetHeight - 3\r\n ,maxw = basis[0].offsetWidth - 3;\r\n if(top < -3)top = -3;\r\n if(top > maxh)top = maxh;\r\n if(left < -3)left = -3;\r\n if(left > maxw)left = maxw;\r\n var s = (left + 3)/260*100\r\n ,b = 100 - (top + 3)/180*100;\r\n _b = b;\r\n _s = s;\r\n change(_h, s, b, _a); \r\n e.preventDefault();\r\n };\r\n layui.stope(e);\r\n createMoveElem(move);\r\n e.preventDefault();\r\n });\r\n \r\n basis.on('mousedown', function(e){\r\n var top = e.clientY - $(this).offset().top - 3 + $win.scrollTop()\r\n ,left = e.clientX - $(this).offset().left - 3 + $win.scrollLeft()\r\n if(top < -3)top = -3;\r\n if(top > this.offsetHeight - 3)top = this.offsetHeight - 3;\r\n if(left < -3)left = -3;\r\n if(left > this.offsetWidth - 3)left = this.offsetWidth - 3;\r\n var s = (left + 3)/260*100\r\n ,b = 100 - (top + 3)/180*100;\r\n _b = b;\r\n _s = s;\r\n change(_h, s, b, _a); \r\n layui.stope(e);\r\n e.preventDefault();\r\n choose.trigger(e, 'mousedown');\r\n });\r\n \r\n //底部透明度选择\r\n alphaslider.on('mousedown', function(e){\r\n var oldleft = this.offsetLeft\r\n ,oldx = e.clientX;\r\n var move = function(e){\r\n var left = oldleft + (e.clientX - oldx)\r\n ,maxw = alphacolor[0].offsetWidth;\r\n if(left < 0)left = 0;\r\n if(left > maxw)left = maxw;\r\n var a = Math.round(left /280*100) /100;\r\n _a = a;\r\n change(_h, _s, _b, a); \r\n e.preventDefault();\r\n };\r\n \r\n createMoveElem(move);\r\n e.preventDefault();\r\n });\r\n alphacolor.on('click', function(e){\r\n var left = e.clientX - $(this).offset().left\r\n if(left < 0)left = 0;\r\n if(left > this.offsetWidth)left = this.offsetWidth;\r\n var a = Math.round(left /280*100) /100;\r\n _a = a;\r\n change(_h, _s, _b, a); \r\n e.preventDefault();\r\n });\r\n \r\n //预定义颜色选择\r\n pre.each(function(){\r\n $(this).on('click', function(){\r\n $(this).parent('.layui-colorpicker-pre').addClass('selected').siblings().removeClass('selected');\r\n var color = this.style.backgroundColor\r\n ,hsb = RGBToHSB(RGBSTo(color))\r\n ,a = color.slice(color.lastIndexOf(\",\") + 1, color.length - 1),left;\r\n _h = hsb.h;\r\n _s = hsb.s;\r\n _b = hsb.b;\r\n if((color.match(/[0-9]{1,3}/g) || []).length === 3) a = 1;\r\n _a = a;\r\n left = a * 280;\r\n change(hsb.h, hsb.s, hsb.b, a);\r\n })\r\n });\r\n };\r\n\r\n //颜色选择器hsb转换\r\n Class.prototype.select = function(h, s, b, type){\r\n var that = this;\r\n var options = that.config;\r\n var hex = HSBToHEX({h:h, s:100, b:100});\r\n var color = HSBToHEX({h:h, s:s, b:b});\r\n var sidetop = h/360*180;\r\n var top = 180 - b/100*180 - 3;\r\n var left = s/100*260 - 3;\r\n \r\n that.elemPicker.find('.' + PICKER_SIDE_SLIDER).css(\"top\", sidetop); //滑块的top\r\n that.elemPicker.find('.' + PICKER_BASIS)[0].style.background = '#' + hex; //颜色选择器的背景\r\n \r\n //选择器的top left\r\n that.elemPicker.find('.' + PICKER_BASIS_CUR).css({\r\n \"top\": top\r\n ,\"left\": left\r\n });\r\n \r\n // if(type === 'change') return;\r\n\r\n // 选中的颜色\r\n // that.elemPicker.find('.' + PICKER_INPUT).find('input').val('#'+ color);\r\n };\r\n \r\n Class.prototype.pickerEvents = function(){\r\n var that = this\r\n ,options = that.config\r\n \r\n ,elemColorBoxSpan = that.elemColorBox.find('.' + PICKER_TRIG_SPAN) //颜色盒子\r\n ,elemPickerInput = that.elemPicker.find('.' + PICKER_INPUT + ' input') //颜色选择器表单\r\n \r\n ,pickerEvents = {\r\n //清空\r\n clear: function(othis){\r\n elemColorBoxSpan[0].style.background ='';\r\n that.elemColorBox.find('.' + PICKER_TRIG_I).removeClass(ICON_PICKER_DOWN).addClass(ICON_PICKER_CLOSE);\r\n that.color = '';\r\n \r\n options.done && options.done('');\r\n that.removePicker();\r\n }\r\n \r\n //确认\r\n ,confirm: function(othis, change){\r\n var value = elemPickerInput.val()\r\n ,colorValue\r\n ,hsb;\r\n \r\n if(value.indexOf(',') > -1){\r\n hsb = RGBToHSB(RGBSTo(value));\r\n that.select(hsb.h, hsb.s, hsb.b);\r\n elemColorBoxSpan[0].style.background = (colorValue = '#' + HSBToHEX(hsb)); \r\n \r\n if((value.match(/[0-9]{1,3}/g) || []).length > 3 && elemColorBoxSpan.attr('lay-type') === 'rgba'){\r\n var left = value.slice(value.lastIndexOf(\",\") + 1, value.length - 1) * 280;\r\n that.elemPicker.find('.' + PICKER_ALPHA_SLIDER).css(\"left\", left);\r\n elemColorBoxSpan[0].style.background = value;\r\n colorValue = value;\r\n }\r\n } else {\r\n hsb = HEXToHSB(value);\r\n elemColorBoxSpan[0].style.background = (colorValue = '#' + HSBToHEX(hsb)); \r\n that.elemColorBox.find('.' + PICKER_TRIG_I).removeClass(ICON_PICKER_CLOSE).addClass(ICON_PICKER_DOWN);\r\n }\r\n \r\n if(change === 'change'){\r\n that.select(hsb.h, hsb.s, hsb.b, change);\r\n options.change && options.change(colorValue);\r\n return;\r\n }\r\n that.color = value;\r\n \r\n options.done && options.done(value);\r\n that.removePicker(); \r\n }\r\n };\r\n \r\n //选择器面板点击事件\r\n that.elemPicker.on('click', '*[colorpicker-events]', function(){\r\n var othis = $(this)\r\n ,attrEvent = othis.attr('colorpicker-events');\r\n pickerEvents[attrEvent] && pickerEvents[attrEvent].call(this, othis);\r\n });\r\n \r\n //输入框事件\r\n elemPickerInput.on('keyup', function(e){\r\n var othis = $(this);\r\n pickerEvents.confirm.call(this, othis, e.keyCode === 13 ? null : 'change');\r\n });\r\n }\r\n\r\n // 颜色选择器输入\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 弹出颜色选择器\r\n that.elemColorBox.on('click' , function(){\r\n that.renderPicker();\r\n if($(ELEM_MAIN)[0]){\r\n that.val();\r\n that.side();\r\n }\r\n });\r\n };\r\n\r\n //全局事件\r\n (function(){\r\n //绑定关闭控件事件\r\n $doc.on(clickOrMousedown, function(e){\r\n if(!colorpicker.thisId) return;\r\n var that = thisModule.getThis(colorpicker.thisId);\r\n if(!that) return;\r\n\r\n var options = that.config;\r\n var elemColorBoxSpan = that.elemColorBox.find('.' + PICKER_TRIG_SPAN);\r\n\r\n //如果点击的元素是颜色框\r\n if($(e.target).hasClass(ELEM) \r\n || $(e.target).parents('.'+ELEM)[0]\r\n ) return; \r\n \r\n //如果点击的元素是选择器\r\n if($(e.target).hasClass(ELEM_MAIN.replace(/\\./g, '')) \r\n || $(e.target).parents(ELEM_MAIN)[0]\r\n ) return; \r\n \r\n if(!that.elemPicker) return;\r\n \r\n if(that.color){\r\n var hsb = RGBToHSB(RGBSTo(that.color));\r\n that.select(hsb.h, hsb.s, hsb.b); \r\n } else {\r\n that.elemColorBox.find('.' + PICKER_TRIG_I).removeClass(ICON_PICKER_DOWN).addClass(ICON_PICKER_CLOSE);\r\n }\r\n elemColorBoxSpan[0].style.background = that.color || '';\r\n \r\n // 取消选择的回调\r\n typeof options.cancel === 'function' && options.cancel(that.color);\r\n\r\n // 移除面板\r\n that.removePicker();\r\n });\r\n\r\n //自适应定位\r\n $win.on('resize', function(){\r\n if(!colorpicker.thisId) return;\r\n var that = thisModule.getThis(colorpicker.thisId);\r\n if(!that) return;\r\n\r\n if(!that.elemPicker || !$(ELEM_MAIN)[0]){\r\n return false;\r\n }\r\n that.position();\r\n });\r\n })();\r\n\r\n // 记录所有实例\r\n thisModule.that = {}; // 记录所有实例对象\r\n \r\n // 获取当前实例对象\r\n thisModule.getThis = function(id){\r\n var that = thisModule.that[id];\r\n if(!that) hint.error(id ? (MOD_NAME +' instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return that;\r\n };\r\n \r\n //核心入口\r\n colorpicker.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n \r\n exports(MOD_NAME, colorpicker);\r\n});\r\n","/**\r\n * element\r\n * 常用元素操作组件\r\n */\r\n \r\nlayui.define('jquery', function(exports){\r\n 'use strict';\r\n \r\n var $ = layui.$;\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n \r\n var MOD_NAME = 'element';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var TITLE = '.layui-tab-title';\r\n \r\n var Element = function(){\r\n this.config = {};\r\n };\r\n \r\n // 全局设置\r\n Element.prototype.set = function(options){\r\n var that = this;\r\n $.extend(true, that.config, options);\r\n return that;\r\n };\r\n \r\n // 表单事件\r\n Element.prototype.on = function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n };\r\n \r\n // 外部 Tab 新增\r\n Element.prototype.tabAdd = function(filter, options){\r\n var tabElem = $('.layui-tab[lay-filter='+ filter +']');\r\n var titElem = tabElem.children(TITLE);\r\n var barElem = titElem.children('.layui-tab-bar');\r\n var contElem = tabElem.children('.layui-tab-content');\r\n var li = ' 0) layAttr.unshift(''); //向前插,预留空格\r\n return layAttr.join(' ');\r\n }() +'>'+ (options.title || 'unnaming') +'';\r\n \r\n barElem[0] ? barElem.before(li) : titElem.append(li);\r\n contElem.append('
                  '+ (options.content || '') +'
                  ');\r\n // call.hideTabMore(true);\r\n // 是否添加即切换\r\n options.change && this.tabChange(filter, options.id);\r\n titElem.data('LAY_TAB_CHANGE', options.change);\r\n call.tabAuto(options.change ? 'change' : null);\r\n return this;\r\n };\r\n \r\n // 外部 Tab 删除\r\n Element.prototype.tabDelete = function(filter, layid){\r\n var tabElem = $('.layui-tab[lay-filter='+ filter +']');\r\n var titElem = tabElem.children(TITLE);\r\n var liElem = titElem.find('>li[lay-id=\"'+ layid +'\"]');\r\n call.tabDelete(null, liElem);\r\n return this;\r\n };\r\n \r\n // 外部 Tab 切换\r\n Element.prototype.tabChange = function(filter, layid){\r\n var tabElem = $('.layui-tab[lay-filter='+ filter +']');\r\n var titElem = tabElem.children(TITLE);\r\n var liElem = titElem.find('>li[lay-id=\"'+ layid +'\"]');\r\n\r\n call.tabClick.call(liElem[0], {\r\n liElem: liElem\r\n });\r\n return this;\r\n };\r\n \r\n // 自定义 Tab 选项卡\r\n Element.prototype.tab = function(options){\r\n options = options || {};\r\n dom.on('click', options.headerElem, function(e){\r\n var index = $(this).index();\r\n call.tabClick.call(this, {\r\n index: index,\r\n options: options\r\n });\r\n });\r\n };\r\n \r\n \r\n // 动态改变进度条\r\n Element.prototype.progress = function(filter, percent){\r\n var ELEM = 'layui-progress';\r\n var elem = $('.'+ ELEM +'[lay-filter='+ filter +']');\r\n var elemBar = elem.find('.'+ ELEM +'-bar');\r\n var text = elemBar.find('.'+ ELEM +'-text');\r\n\r\n elemBar.css('width', function(){\r\n return /^.+\\/.+$/.test(percent) \r\n ? (new Function('return '+ percent)() * 100) + '%'\r\n : percent;\r\n }).attr('lay-percent', percent);\r\n text.text(percent);\r\n return this;\r\n };\r\n \r\n var NAV_ELEM = '.layui-nav';\r\n var NAV_ITEM = 'layui-nav-item';\r\n var NAV_BAR = 'layui-nav-bar';\r\n var NAV_TREE = 'layui-nav-tree';\r\n var NAV_CHILD = 'layui-nav-child';\r\n var NAV_CHILD_C = 'layui-nav-child-c';\r\n var NAV_MORE = 'layui-nav-more';\r\n var NAV_DOWN = 'layui-icon-down';\r\n var NAV_ANIM = 'layui-anim layui-anim-upbit';\r\n \r\n // 基础事件体\r\n var call = {\r\n // Tab 点击\r\n tabClick: function(obj){\r\n obj = obj || {};\r\n var options = obj.options || {};\r\n var othis = obj.liElem || $(this);\r\n var parents = options.headerElem \r\n ? othis.parent() \r\n : othis.parents('.layui-tab').eq(0);\r\n var item = options.bodyElem \r\n ? $(options.bodyElem) \r\n : parents.children('.layui-tab-content').children('.layui-tab-item');\r\n var elemA = othis.find('a');\r\n var isJump = elemA.attr('href') !== 'javascript:;' && elemA.attr('target') === '_blank'; // 是否存在跳转\r\n var unselect = typeof othis.attr('lay-unselect') === 'string'; // 是否禁用选中\r\n var filter = parents.attr('lay-filter');\r\n\r\n // 下标\r\n var index = 'index' in obj \r\n ? obj.index \r\n : othis.parent().children('li').index(othis);\r\n \r\n // 执行切换\r\n if(!(isJump || unselect)){\r\n othis.addClass(THIS).siblings().removeClass(THIS);\r\n item.eq(index).addClass(SHOW).siblings().removeClass(SHOW);\r\n }\r\n \r\n layui.event.call(this, MOD_NAME, 'tab('+ filter +')', {\r\n elem: parents,\r\n index: index\r\n });\r\n }\r\n \r\n // Tab 删除\r\n ,tabDelete: function(e, othis){\r\n var li = othis || $(this).parent();\r\n var index = li.parent().children('li').index(li);\r\n var tabElem = li.closest('.layui-tab');\r\n var item = tabElem.children('.layui-tab-content').children('.layui-tab-item');\r\n var filter = tabElem.attr('lay-filter');\r\n \r\n if(li.hasClass(THIS)){\r\n if (li.next()[0] && li.next().is('li')){\r\n call.tabClick.call(li.next()[0], {\r\n index: index + 1\r\n });\r\n } else if (li.prev()[0] && li.prev().is('li')){\r\n call.tabClick.call(li.prev()[0], null, index - 1);\r\n }\r\n }\r\n \r\n li.remove();\r\n item.eq(index).remove();\r\n setTimeout(function(){\r\n call.tabAuto();\r\n }, 50);\r\n \r\n layui.event.call(this, MOD_NAME, 'tabDelete('+ filter +')', {\r\n elem: tabElem,\r\n index: index\r\n });\r\n }\r\n \r\n // Tab 自适应\r\n ,tabAuto: function(spread){\r\n var SCROLL = 'layui-tab-scroll';\r\n var MORE = 'layui-tab-more';\r\n var BAR = 'layui-tab-bar';\r\n var CLOSE = 'layui-tab-close';\r\n var that = this;\r\n \r\n $('.layui-tab').each(function(){\r\n var othis = $(this);\r\n var title = othis.children('.layui-tab-title');\r\n var item = othis.children('.layui-tab-content').children('.layui-tab-item');\r\n var STOPE = 'lay-stope=\"tabmore\"';\r\n var span = $('');\r\n\r\n if(that === window && device.ie != 8){\r\n // call.hideTabMore(true)\r\n }\r\n \r\n // 开启关闭图标\r\n if(othis.attr('lay-allowclose')){\r\n title.find('li').each(function(){\r\n var li = $(this);\r\n if(!li.find('.'+CLOSE)[0]){\r\n var close = $('');\r\n close.on('click', call.tabDelete);\r\n li.append(close);\r\n }\r\n });\r\n }\r\n \r\n if(typeof othis.attr('lay-unauto') === 'string') return;\r\n \r\n // 响应式\r\n if(\r\n title.prop('scrollWidth') > title.outerWidth() + 1 || (\r\n title.find('li').length && title.height() > function(height){\r\n return height + height/2;\r\n }(title.find('li').eq(0).height())\r\n )\r\n ){\r\n // 若执行是来自于切换,则自动展开\r\n (\r\n spread === 'change' && title.data('LAY_TAB_CHANGE')\r\n ) && title.addClass(MORE);\r\n \r\n if(title.find('.'+BAR)[0]) return;\r\n title.append(span);\r\n othis.attr('overflow', '');\r\n\r\n // 展开图标事件\r\n span.on('click', function(e){\r\n var isSpread = title.hasClass(MORE);\r\n title[isSpread ? 'removeClass' : 'addClass'](MORE);\r\n });\r\n } else {\r\n title.find('.'+ BAR).remove();\r\n othis.removeAttr('overflow');\r\n }\r\n });\r\n }\r\n // 隐藏更多 Tab\r\n ,hideTabMore: function(e){\r\n var tsbTitle = $('.layui-tab-title');\r\n if(e === true || $(e.target).attr('lay-stope') !== 'tabmore'){\r\n tsbTitle.removeClass('layui-tab-more');\r\n tsbTitle.find('.layui-tab-bar').attr('title','');\r\n }\r\n }\r\n \r\n //点击一级菜单\r\n /*\r\n ,clickThis: function(){\r\n var othis = $(this), parents = othis.parents(NAV_ELEM)\r\n ,filter = parents.attr('lay-filter')\r\n ,elemA = othis.find('a')\r\n ,unselect = typeof othis.attr('lay-unselect') === 'string';\r\n\r\n if(othis.find('.'+NAV_CHILD)[0]) return;\r\n \r\n if(!(elemA.attr('href') !== 'javascript:;' && elemA.attr('target') === '_blank') && !unselect){\r\n parents.find('.'+THIS).removeClass(THIS);\r\n othis.addClass(THIS);\r\n }\r\n \r\n layui.event.call(this, MOD_NAME, 'nav('+ filter +')', othis);\r\n }\r\n )\r\n */\r\n \r\n // 点击菜单 - a 标签触发\r\n ,clickThis: function() {\r\n var othis = $(this);\r\n var parents = othis.closest(NAV_ELEM);\r\n var filter = parents.attr('lay-filter');\r\n var parent = othis.parent() ;\r\n var child = othis.siblings('.'+ NAV_CHILD);\r\n var unselect = typeof parent.attr('lay-unselect') === 'string'; // 是否禁用选中\r\n \r\n // 满足点击选中的条件\r\n if (!(othis.attr('href') !== 'javascript:;' && othis.attr('target') === '_blank') && !unselect) {\r\n if (!child[0]) {\r\n parents.find('.'+ THIS).removeClass(THIS);\r\n parent.addClass(THIS);\r\n }\r\n }\r\n \r\n // 若为垂直菜单\r\n if (parents.hasClass(NAV_TREE)) {\r\n var NAV_ITEMED = NAV_ITEM + 'ed'; // 用于标注展开状态\r\n var needExpand = !parent.hasClass(NAV_ITEMED); // 是否执行展开\r\n var ANIM_MS = 200; // 动画过渡毫秒数\r\n\r\n // 动画执行完成后的操作\r\n var complete = function() {\r\n $(this).css({\r\n \"display\": \"\" // 剔除动画生成的 style display,以适配外部样式的状态重置\r\n });\r\n // 避免导航滑块错位\r\n parents.children('.'+ NAV_BAR).css({\r\n opacity: 0\r\n })\r\n };\r\n\r\n // 是否正处于动画中的状态\r\n if (child.is(':animated')) return;\r\n\r\n // 剔除可能存在的 CSS3 动画类\r\n child.removeClass(NAV_ANIM);\r\n\r\n // 若有子菜单,则对其执行展开或收缩\r\n if (child[0]) {\r\n if (needExpand) {\r\n // 先执行 slideDown 动画,再标注展开状态样式,避免元素 `block` 状态导致动画无效\r\n child.slideDown(ANIM_MS, complete);\r\n parent.addClass(NAV_ITEMED);\r\n } else {\r\n // 先取消展开状态样式,再将元素临时显示,避免 `none` 状态导致 slideUp 动画无效\r\n parent.removeClass(NAV_ITEMED);\r\n child.show().slideUp(ANIM_MS, complete);\r\n }\r\n\r\n // 手风琴 --- 收缩兄弟展开项\r\n if (typeof parents.attr('lay-accordion') === 'string' || parents.attr('lay-shrink') === 'all') {\r\n var parentSibs = parent.siblings('.'+ NAV_ITEMED);\r\n parentSibs.removeClass(NAV_ITEMED);\r\n parentSibs.children('.'+ NAV_CHILD).show().stop().slideUp(ANIM_MS, complete);\r\n }\r\n }\r\n }\r\n \r\n layui.event.call(this, MOD_NAME, 'nav('+ filter +')', othis);\r\n }\r\n \r\n // 折叠面板\r\n ,collapse: function(){\r\n var othis = $(this);\r\n var icon = othis.find('.layui-colla-icon');\r\n var elemCont = othis.siblings('.layui-colla-content');\r\n var parents = othis.parents('.layui-collapse').eq(0);\r\n var filter = parents.attr('lay-filter');\r\n var isNone = elemCont.css('display') === 'none';\r\n \r\n // 是否手风琴\r\n if(typeof parents.attr('lay-accordion') === 'string'){\r\n var show = parents.children('.layui-colla-item').children('.'+SHOW);\r\n show.siblings('.layui-colla-title').children('.layui-colla-icon').html('');\r\n show.removeClass(SHOW);\r\n }\r\n \r\n elemCont[isNone ? 'addClass' : 'removeClass'](SHOW);\r\n icon.html(isNone ? '' : '');\r\n \r\n layui.event.call(this, MOD_NAME, 'collapse('+ filter +')', {\r\n title: othis\r\n ,content: elemCont\r\n ,show: isNone\r\n });\r\n }\r\n };\r\n \r\n // 初始化元素操作\r\n Element.prototype.init = function(type, filter){\r\n var that = this, elemFilter = function(){\r\n return filter ? ('[lay-filter=\"' + filter +'\"]') : '';\r\n }(), items = {\r\n \r\n // Tab 选项卡\r\n tab: function(){\r\n call.tabAuto.call({});\r\n }\r\n \r\n // 导航菜单\r\n ,nav: function(){\r\n var TIME = 200;\r\n var timer = {};\r\n var timerMore = {};\r\n var timeEnd = {};\r\n var NAV_TITLE = 'layui-nav-title';\r\n \r\n // 滑块跟随\r\n var follow = function(bar, nav, index) {\r\n var othis = $(this);\r\n var child = othis.find('.'+NAV_CHILD);\r\n\r\n // 是否垂直导航菜单\r\n if (nav.hasClass(NAV_TREE)) {\r\n // 无子菜单时跟随\r\n if (!child[0]) {\r\n var thisA = othis.children('.'+ NAV_TITLE);\r\n bar.css({\r\n top: othis.offset().top - nav.offset().top,\r\n height: (thisA[0] ? thisA : othis).outerHeight(),\r\n opacity: 1\r\n });\r\n }\r\n } else {\r\n child.addClass(NAV_ANIM);\r\n \r\n // 若居中对齐\r\n if (child.hasClass(NAV_CHILD_C)) {\r\n child.css({\r\n left: -(child.outerWidth() - othis.width()) / 2\r\n });\r\n }\r\n \r\n // 滑块定位\r\n if (child[0]) { // 若有子菜单,则滑块消失\r\n bar.css({\r\n left: bar.position().left + bar.width() / 2,\r\n width: 0,\r\n opacity: 0\r\n });\r\n } else { // bar 跟随\r\n bar.css({\r\n left: othis.position().left + parseFloat(othis.css('marginLeft')),\r\n top: othis.position().top + othis.height() - bar.height()\r\n });\r\n }\r\n \r\n // 渐显滑块并适配宽度\r\n timer[index] = setTimeout(function() {\r\n bar.css({\r\n width: child[0] ? 0 : othis.width(),\r\n opacity: child[0] ? 0 : 1\r\n });\r\n }, device.ie && device.ie < 10 ? 0 : TIME);\r\n \r\n // 显示子菜单\r\n clearTimeout(timeEnd[index]);\r\n if (child.css('display') === 'block') {\r\n clearTimeout(timerMore[index]);\r\n }\r\n timerMore[index] = setTimeout(function(){\r\n child.addClass(SHOW);\r\n othis.find('.'+NAV_MORE).addClass(NAV_MORE+'d');\r\n }, 300);\r\n }\r\n };\r\n \r\n // 遍历导航\r\n $(NAV_ELEM + elemFilter).each(function(index) {\r\n var othis = $(this);\r\n var bar = $('');\r\n var itemElem = othis.find('.'+NAV_ITEM);\r\n \r\n // hover 滑动效果\r\n if (!othis.find('.'+NAV_BAR)[0]) {\r\n othis.append(bar);\r\n ( othis.hasClass(NAV_TREE)\r\n ? itemElem.find('dd,>.'+ NAV_TITLE) \r\n : itemElem\r\n ).on('mouseenter', function() {\r\n follow.call(this, bar, othis, index);\r\n }).on('mouseleave', function() { // 鼠标移出\r\n // 是否为垂直导航\r\n if (othis.hasClass(NAV_TREE)) {\r\n bar.css({\r\n height: 0,\r\n opacity: 0\r\n });\r\n } else {\r\n // 隐藏子菜单\r\n clearTimeout(timerMore[index]);\r\n timerMore[index] = setTimeout(function(){\r\n othis.find('.'+ NAV_CHILD).removeClass(SHOW);\r\n othis.find('.'+ NAV_MORE).removeClass(NAV_MORE +'d');\r\n }, 300);\r\n }\r\n });\r\n\r\n // 鼠标离开当前菜单时\r\n othis.on('mouseleave', function() {\r\n clearTimeout(timer[index])\r\n timeEnd[index] = setTimeout(function() {\r\n if (!othis.hasClass(NAV_TREE)) {\r\n bar.css({\r\n width: 0,\r\n left: bar.position().left + bar.width() / 2,\r\n opacity: 0\r\n });\r\n }\r\n }, TIME);\r\n });\r\n }\r\n \r\n // 展开子菜单\r\n itemElem.find('a').each(function() {\r\n var thisA = $(this);\r\n var parent = thisA.parent();\r\n var child = thisA.siblings('.'+ NAV_CHILD);\r\n \r\n // 输出小箭头\r\n if (child[0] && !thisA.children('.'+ NAV_MORE)[0]) {\r\n thisA.append('');\r\n }\r\n \r\n thisA.off('click', call.clickThis).on('click', call.clickThis); // 点击菜单\r\n });\r\n });\r\n }\r\n \r\n //面包屑\r\n ,breadcrumb: function(){\r\n var ELEM = '.layui-breadcrumb';\r\n \r\n $(ELEM + elemFilter).each(function(){\r\n var othis = $(this)\r\n ,ATTE_SPR = 'lay-separator'\r\n ,separator = othis.attr(ATTE_SPR) || '/'\r\n ,aNode = othis.find('a');\r\n if(aNode.next('span['+ ATTE_SPR +']')[0]) return;\r\n aNode.each(function(index){\r\n if(index === aNode.length - 1) return;\r\n $(this).after(''+ separator +'');\r\n });\r\n othis.css('visibility', 'visible');\r\n });\r\n }\r\n \r\n //进度条\r\n ,progress: function(){\r\n var ELEM = 'layui-progress';\r\n $('.' + ELEM + elemFilter).each(function(){\r\n var othis = $(this)\r\n ,elemBar = othis.find('.layui-progress-bar')\r\n ,percent = elemBar.attr('lay-percent');\r\n\r\n elemBar.css('width', function(){\r\n return /^.+\\/.+$/.test(percent) \r\n ? (new Function('return '+ percent)() * 100) + '%'\r\n : percent;\r\n });\r\n \r\n if(othis.attr('lay-showpercent')){\r\n setTimeout(function(){\r\n elemBar.html(''+ percent +'');\r\n },350);\r\n }\r\n });\r\n }\r\n \r\n //折叠面板\r\n ,collapse: function(){\r\n var ELEM = 'layui-collapse';\r\n \r\n $('.' + ELEM + elemFilter).each(function(){\r\n var elemItem = $(this).find('.layui-colla-item')\r\n elemItem.each(function(){\r\n var othis = $(this)\r\n ,elemTitle = othis.find('.layui-colla-title')\r\n ,elemCont = othis.find('.layui-colla-content')\r\n ,isNone = elemCont.css('display') === 'none';\r\n \r\n //初始状态\r\n elemTitle.find('.layui-colla-icon').remove();\r\n elemTitle.append(''+ (isNone ? '' : '') +'');\r\n\r\n //点击标题\r\n elemTitle.off('click', call.collapse).on('click', call.collapse);\r\n }); \r\n \r\n });\r\n }\r\n };\r\n\r\n return items[type] ? items[type]() : layui.each(items, function(index, item){\r\n item();\r\n });\r\n };\r\n \r\n Element.prototype.render = Element.prototype.init;\r\n\r\n var element = new Element();\r\n var dom = $(document);\r\n \r\n $(function(){\r\n element.render();\r\n });\r\n\r\n dom.on('click', '.layui-tab-title li', call.tabClick); // Tab 切换\r\n // dom.on('click', call.hideTabMore); // 隐藏展开的 Tab\r\n $(window).on('resize', call.tabAuto); // 自适应\r\n \r\n exports(MOD_NAME, element);\r\n});\r\n\r\n","/**\r\n * upload\r\n * 上传组件\r\n */\r\n \r\nlayui.define(['lay', 'layer'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var lay = layui.lay;\r\n var layer = layui.layer;\r\n var device = layui.device();\r\n\r\n // 模块名\r\n var MOD_NAME = 'upload';\r\n var MOD_INDEX = 'layui_'+ MOD_NAME +'_index'; // 模块索引名\r\n\r\n // 外部接口\r\n var upload = {\r\n config: {}, // 全局配置项\r\n index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0, // 索引\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n \r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id;\r\n\r\n thisModule.that[id] = that; // 记录当前实例对象\r\n\r\n return {\r\n upload: function(files){\r\n that.upload.call(that, files);\r\n },\r\n reload: function(options){\r\n that.reload.call(that, options);\r\n },\r\n config: that.config\r\n }\r\n };\r\n \r\n // 字符常量\r\n var ELEM = 'layui-upload';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var DISABLED = 'layui-disabled';\r\n \r\n var ELEM_FILE = 'layui-upload-file';\r\n var ELEM_FORM = 'layui-upload-form';\r\n var ELEM_IFRAME = 'layui-upload-iframe';\r\n var ELEM_CHOOSE = 'layui-upload-choose';\r\n var ELEM_DRAG = 'layui-upload-drag';\r\n var UPLOADING = 'UPLOADING';\r\n \r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++upload.index;\r\n that.config = $.extend({}, that.config, upload.config, options);\r\n that.render();\r\n };\r\n \r\n // 默认配置\r\n Class.prototype.config = {\r\n accept: 'images', // 允许上传的文件类型:images/file/video/audio\r\n exts: '', // 允许上传的文件后缀名\r\n auto: true, // 是否选完文件后自动上传\r\n bindAction: '', // 手动上传触发的元素\r\n url: '', // 上传地址\r\n force: '', // 强制规定返回的数据格式,目前只支持是否强制 json\r\n field: 'file', // 文件字段名\r\n acceptMime: '', // 筛选出的文件类型,默认为所有文件\r\n method: 'post', // 请求上传的 http 类型\r\n data: {}, // 请求上传的额外参数\r\n drag: true, // 是否允许拖拽上传\r\n size: 0, // 文件限制大小,默认不限制\r\n number: 0, // 允许同时上传的文件数,默认不限制\r\n multiple: false, // 是否允许多文件上传,不支持 ie8-9\r\n text: { // 自定义提示文本\r\n \"cross-domain\": \"Cross-domain requests are not supported\", // 跨域\r\n \"data-format-error\": \"Please return JSON data format\", // 数据格式错误\r\n \"check-error\": \"\", // 文件格式校验失败\r\n \"error\": \"\", // 上传失败\r\n \"limit-number\": null, // 限制 number 属性的提示 --- function\r\n \"limit-size\": null // 限制 size 属性的提示 --- function\r\n }\r\n };\r\n\r\n // 重载实例\r\n Class.prototype.reload = function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n that.render(true);\r\n };\r\n \r\n // 初始渲染\r\n Class.prototype.render = function(rerender){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 若 elem 非唯一\r\n var elem = $(options.elem);\r\n if (elem.length > 1) {\r\n layui.each(elem, function() {\r\n upload.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0], {\r\n attr: elem.attr('lay-data') ? 'lay-data' : null // 兼容旧版的 lay-data 属性\r\n }));\r\n\r\n // 若重复执行 render,则视为 reload 处理\r\n if (!rerender && elem[0] && elem.data(MOD_INDEX)) {\r\n var newThat = thisModule.getThis(elem.data(MOD_INDEX));\r\n if(!newThat) return;\r\n\r\n return newThat.reload(options);\r\n }\r\n\r\n options.elem = $(options.elem);\r\n options.bindAction = $(options.bindAction);\r\n\r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n options.id = 'id' in options ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n\r\n that.file();\r\n that.events();\r\n };\r\n \r\n //追加文件域\r\n Class.prototype.file = function(){\r\n var that = this;\r\n var options = that.config;\r\n var elemFile = that.elemFile = $([\r\n ''\r\n ].join(''));\r\n var next = options.elem.next();\r\n \r\n if(next.hasClass(ELEM_FILE) || next.hasClass(ELEM_FORM)){\r\n next.remove();\r\n }\r\n \r\n //包裹ie8/9容器\r\n if(device.ie && device.ie < 10){\r\n options.elem.wrap('
                  ');\r\n }\r\n \r\n that.isFile() ? (\r\n that.elemFile = options.elem,\r\n options.field = options.elem[0].name\r\n ) : options.elem.after(elemFile);\r\n \r\n //初始化ie8/9的Form域\r\n if(device.ie && device.ie < 10){\r\n that.initIE();\r\n }\r\n };\r\n \r\n //ie8-9初始化\r\n Class.prototype.initIE = function(){\r\n var that = this;\r\n var options = that.config;\r\n var iframe = $('');\r\n var elemForm = $(['
                  '\r\n ,''].join(''));\r\n \r\n //插入iframe \r\n $('#'+ ELEM_IFRAME)[0] || $('body').append(iframe);\r\n\r\n //包裹文件域\r\n if(!options.elem.next().hasClass(ELEM_FORM)){\r\n that.elemFile.wrap(elemForm); \r\n \r\n //追加额外的参数\r\n options.elem.next('.'+ ELEM_FORM).append(function(){\r\n var arr = [];\r\n layui.each(options.data, function(key, value){\r\n value = typeof value === 'function' ? value() : value;\r\n arr.push('')\r\n });\r\n return arr.join('');\r\n }());\r\n }\r\n };\r\n \r\n //异常提示\r\n Class.prototype.msg = function(content){\r\n return layer.msg(content, {\r\n icon: 2,\r\n shift: 6\r\n });\r\n };\r\n \r\n //判断绑定元素是否为文件域本身\r\n Class.prototype.isFile = function(){\r\n var elem = this.config.elem[0];\r\n if(!elem) return;\r\n return elem.tagName.toLocaleLowerCase() === 'input' && elem.type === 'file'\r\n }\r\n \r\n //预读图片信息\r\n Class.prototype.preview = function(callback){\r\n var that = this;\r\n if(window.FileReader){\r\n layui.each(that.chooseFiles, function(index, file){\r\n var reader = new FileReader();\r\n reader.readAsDataURL(file); \r\n reader.onload = function(){\r\n callback && callback(index, file, this.result);\r\n }\r\n });\r\n }\r\n };\r\n \r\n // 执行上传\r\n Class.prototype.upload = function(files, type){\r\n var that = this;\r\n var options = that.config;\r\n var text = options.text || {};\r\n var elemFile = that.elemFile[0];\r\n\r\n // 获取文件队列\r\n var getFiles = function(){\r\n return files || that.files || that.chooseFiles || elemFile.files;\r\n };\r\n \r\n // 高级浏览器处理方式,支持跨域\r\n var ajaxSend = function(){\r\n var successful = 0;\r\n var failed = 0;\r\n var items = getFiles();\r\n\r\n // 多文件全部上传完毕的回调\r\n var allDone = function(){\r\n if(options.multiple && successful + failed === that.fileLength){\r\n typeof options.allDone === 'function' && options.allDone({\r\n total: that.fileLength,\r\n successful: successful,\r\n failed: failed\r\n });\r\n }\r\n };\r\n\r\n // 发送请求\r\n var request = function(sets){\r\n var formData = new FormData();\r\n\r\n // 恢复文件状态\r\n var resetFileState = function(file) {\r\n if (sets.unified) {\r\n layui.each(items, function(index, file){\r\n delete file[UPLOADING];\r\n });\r\n } else {\r\n delete file[UPLOADING];\r\n }\r\n };\r\n\r\n // 追加额外的参数\r\n layui.each(options.data, function(key, value){\r\n value = typeof value === 'function' ? value() : value;\r\n formData.append(key, value);\r\n });\r\n\r\n /*\r\n * 添加 file 到表单域\r\n */\r\n\r\n // 是否统一上传\r\n if (sets.unified) {\r\n layui.each(items, function(index, file){\r\n if (file[UPLOADING]) return;\r\n file[UPLOADING] = true; // 上传中的标记\r\n formData.append(options.field, file);\r\n });\r\n } else { // 逐一上传\r\n if (sets.file[UPLOADING]) return;\r\n formData.append(options.field, sets.file);\r\n sets.file[UPLOADING] = true; // 上传中的标记\r\n }\r\n\r\n // ajax 参数\r\n var opts = {\r\n url: options.url,\r\n type: 'post', // 统一采用 post 上传\r\n data: formData,\r\n dataType: options.dataType || 'json',\r\n contentType: false,\r\n processData: false,\r\n headers: options.headers || {},\r\n success: function(res){ // 成功回调\r\n options.unified ? (successful += that.fileLength) : successful++;\r\n done(sets.index, res);\r\n allDone(sets.index);\r\n resetFileState(sets.file);\r\n },\r\n error: function(e){ // 异常回调\r\n options.unified ? (failed += that.fileLength) : failed++;\r\n that.msg(text['error'] || [\r\n 'Upload failed, please try again.',\r\n 'status: '+ (e.status || '') +' - '+ (e.statusText || 'error')\r\n ].join('
                  '));\r\n error(sets.index);\r\n allDone(sets.index);\r\n resetFileState(sets.file);\r\n }\r\n };\r\n\r\n // 进度条\r\n if(typeof options.progress === 'function'){\r\n opts.xhr = function(){\r\n var xhr = $.ajaxSettings.xhr();\r\n // 上传进度\r\n xhr.upload.addEventListener(\"progress\", function (obj) {\r\n if(obj.lengthComputable){\r\n var percent = Math.floor((obj.loaded/obj.total)* 100); // 百分比\r\n options.progress(percent, (options.item ? options.item[0] : options.elem[0]) , obj, sets.index);\r\n }\r\n });\r\n return xhr;\r\n }\r\n }\r\n $.ajax(opts);\r\n };\r\n\r\n // 多文件是否一起上传\r\n if(options.unified){\r\n request({\r\n unified: true,\r\n index: 0\r\n });\r\n } else {\r\n layui.each(items, function(index, file){\r\n request({\r\n index: index,\r\n file: file\r\n });\r\n });\r\n }\r\n };\r\n \r\n // 低版本 IE 处理方式,不支持跨域\r\n var iframeSend = function(){\r\n var iframe = $('#'+ ELEM_IFRAME);\r\n \r\n that.elemFile.parent().submit();\r\n\r\n // 获取响应信息\r\n clearInterval(Class.timer);\r\n Class.timer = setInterval(function() {\r\n var res, iframeBody = iframe.contents().find('body');\r\n try {\r\n res = iframeBody.text();\r\n } catch(e) {\r\n that.msg(text['cross-domain']); \r\n clearInterval(Class.timer);\r\n error();\r\n }\r\n if(res){\r\n clearInterval(Class.timer);\r\n iframeBody.html('');\r\n done(0, res);\r\n }\r\n }, 30); \r\n };\r\n \r\n // 统一回调\r\n var done = function(index, res){\r\n that.elemFile.next('.'+ ELEM_CHOOSE).remove();\r\n elemFile.value = '';\r\n \r\n if(options.force === 'json'){\r\n if(typeof res !== 'object'){\r\n try {\r\n res = JSON.parse(res);\r\n } catch(e){\r\n res = {};\r\n return that.msg(text['data-format-error']);\r\n }\r\n }\r\n }\r\n \r\n typeof options.done === 'function' && options.done(res, index || 0, function(files){\r\n that.upload(files);\r\n });\r\n };\r\n \r\n // 统一网络异常回调\r\n var error = function(index){\r\n if(options.auto){\r\n elemFile.value = '';\r\n }\r\n typeof options.error === 'function' && options.error(index || 0, function(files){\r\n that.upload(files);\r\n });\r\n };\r\n \r\n var check;\r\n var exts = options.exts;\r\n var value = function(){\r\n var arr = [];\r\n layui.each(files || that.chooseFiles, function(i, item){\r\n arr.push(item.name);\r\n });\r\n return arr;\r\n }();\r\n \r\n // 回调函数返回的参数\r\n var args = {\r\n // 预览\r\n preview: function(callback){\r\n that.preview(callback);\r\n },\r\n // 上传\r\n upload: function(index, file){\r\n var thisFile = {};\r\n thisFile[index] = file;\r\n that.upload(thisFile);\r\n },\r\n // 追加文件到队列\r\n pushFile: function(){\r\n that.files = that.files || {};\r\n layui.each(that.chooseFiles, function(index, item){\r\n that.files[index] = item;\r\n });\r\n return that.files;\r\n },\r\n // 重置文件\r\n resetFile: function(index, file, filename){\r\n var newFile = new File([file], filename);\r\n that.files = that.files || {};\r\n that.files[index] = newFile;\r\n }\r\n };\r\n \r\n // 提交上传\r\n var send = function(){\r\n // 上传前的回调 - 如果回调函数明确返回 false,则停止上传\r\n if(options.before && (options.before(args) === false)) return;\r\n\r\n // IE 兼容处理\r\n if(device.ie){\r\n return device.ie > 9 ? ajaxSend() : iframeSend();\r\n }\r\n \r\n ajaxSend();\r\n };\r\n \r\n // 文件类型名称\r\n var typeName = ({\r\n file: '文件',\r\n images: '图片',\r\n video: '视频',\r\n audio: '音频'\r\n })[options.accept] || '文件';\r\n\r\n // 校验文件格式\r\n value = value.length === 0 \r\n ? ((elemFile.value.match(/[^\\/\\\\]+\\..+/g)||[]) || '')\r\n : value;\r\n \r\n // 若文件域值为空\r\n if (value.length === 0) return;\r\n \r\n // 根据文件类型校验\r\n switch(options.accept){\r\n case 'file': // 一般文件\r\n layui.each(value, function(i, item){\r\n if(exts && !RegExp('.\\\\.('+ exts +')$', 'i').test(escape(item))){\r\n return check = true;\r\n }\r\n });\r\n break;\r\n case 'video': // 视频文件\r\n layui.each(value, function(i, item){\r\n if(!RegExp('.\\\\.('+ (exts || 'avi|mp4|wma|rmvb|rm|flash|3gp|flv') +')$', 'i').test(escape(item))){\r\n return check = true;\r\n }\r\n });\r\n break;\r\n case 'audio': // 音频文件\r\n layui.each(value, function(i, item){\r\n if(!RegExp('.\\\\.('+ (exts || 'mp3|wav|mid') +')$', 'i').test(escape(item))){\r\n return check = true;\r\n }\r\n });\r\n break;\r\n default: // 图片文件\r\n layui.each(value, function(i, item){\r\n if(!RegExp('.\\\\.('+ (exts || 'jpg|png|gif|bmp|jpeg|svg') +')$', 'i').test(escape(item))){\r\n return check = true;\r\n }\r\n });\r\n break;\r\n }\r\n \r\n // 校验失败提示\r\n if(check){\r\n that.msg(text['check-error'] || ('选择的'+ typeName +'中包含不支持的格式'));\r\n return elemFile.value = '';\r\n }\r\n\r\n // 选择文件的回调 \r\n if(type === 'choose' || options.auto){\r\n options.choose && options.choose(args);\r\n if(type === 'choose'){\r\n return;\r\n }\r\n }\r\n \r\n // 检验文件数量\r\n that.fileLength = function(){\r\n var length = 0;\r\n var items = getFiles();\r\n layui.each(items, function(){\r\n length++;\r\n });\r\n return length;\r\n }();\r\n \r\n if(options.number && that.fileLength > options.number){\r\n return that.msg(typeof text['limit-number'] === 'function' \r\n ? text['limit-number'](options, that.fileLength) \r\n : (\r\n '同时最多只能上传: '+ options.number + ' 个文件'\r\n +'
                  您当前已经选择了: '+ that.fileLength +' 个文件'\r\n ));\r\n }\r\n \r\n // 检验文件大小\r\n if(options.size > 0 && !(device.ie && device.ie < 10)){\r\n var limitSize;\r\n \r\n layui.each(getFiles(), function(index, file){\r\n if(file.size > 1024*options.size){\r\n var size = options.size/1024;\r\n size = size >= 1 ? (size.toFixed(2) + 'MB') : options.size + 'KB'\r\n elemFile.value = '';\r\n limitSize = size;\r\n }\r\n });\r\n if(limitSize) return that.msg(typeof text['limit-size'] === 'function' \r\n ? text['limit-size'](options, limitSize) \r\n : '文件大小不能超过 '+ limitSize);\r\n }\r\n\r\n send();\r\n };\r\n \r\n //事件处理\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 设置当前选择的文件队列\r\n var setChooseFile = function(files){\r\n that.chooseFiles = {};\r\n layui.each(files, function(i, item){\r\n var time = new Date().getTime();\r\n that.chooseFiles[time + '-' + i] = item;\r\n });\r\n };\r\n \r\n // 设置选择的文本\r\n var setChooseText = function(files, filename){\r\n var elemFile = that.elemFile;\r\n var item = options.item ? options.item : options.elem;\r\n var value = files.length > 1 \r\n ? files.length + '个文件' \r\n : ((files[0] || {}).name || (elemFile[0].value.match(/[^\\/\\\\]+\\..+/g)||[]) || '');\r\n \r\n if(elemFile.next().hasClass(ELEM_CHOOSE)){\r\n elemFile.next().remove();\r\n }\r\n that.upload(null, 'choose');\r\n if(that.isFile() || options.choose) return;\r\n elemFile.after(''+ value +'');\r\n };\r\n\r\n // 点击上传容器\r\n options.elem.off('upload.start').on('upload.start', function(){\r\n var othis = $(this);\r\n\r\n that.config.item = othis;\r\n that.elemFile[0].click();\r\n });\r\n \r\n // 拖拽上传\r\n if(!(device.ie && device.ie < 10)){\r\n options.elem.off('upload.over').on('upload.over', function(){\r\n var othis = $(this)\r\n othis.attr('lay-over', '');\r\n })\r\n .off('upload.leave').on('upload.leave', function(){\r\n var othis = $(this)\r\n othis.removeAttr('lay-over');\r\n })\r\n .off('upload.drop').on('upload.drop', function(e, param){\r\n var othis = $(this);\r\n var files = param.originalEvent.dataTransfer.files || [];\r\n \r\n othis.removeAttr('lay-over');\r\n setChooseFile(files);\r\n\r\n options.auto ? that.upload() : setChooseText(files); // 是否自动触发上传\r\n });\r\n }\r\n \r\n // 文件选择\r\n that.elemFile.on('change', function(){\r\n var files = this.files || [];\r\n\r\n if(files.length === 0) return;\r\n\r\n setChooseFile(files);\r\n\r\n options.auto ? that.upload() : setChooseText(files); // 是否自动触发上传\r\n });\r\n \r\n // 手动触发上传\r\n options.bindAction.off('upload.action').on('upload.action', function(){\r\n that.upload();\r\n });\r\n\r\n\r\n // 防止事件重复绑定\r\n if(options.elem.data(MOD_INDEX)) return;\r\n\r\n\r\n // 目标元素 click 事件\r\n options.elem.on('click', function(){\r\n if(that.isFile()) return;\r\n $(this).trigger('upload.start');\r\n });\r\n \r\n // 目标元素 drop 事件\r\n if(options.drag){\r\n options.elem.on('dragover', function(e){\r\n e.preventDefault();\r\n $(this).trigger('upload.over');\r\n }).on('dragleave', function(e){\r\n $(this).trigger('upload.leave');\r\n }).on('drop', function(e){\r\n e.preventDefault();\r\n $(this).trigger('upload.drop', e);\r\n });\r\n }\r\n \r\n // 手动上传时触发上传的元素 click 事件\r\n options.bindAction.on('click', function(){\r\n $(this).trigger('upload.action');\r\n });\r\n \r\n // 绑定元素索引\r\n options.elem.data(MOD_INDEX, options.id);\r\n };\r\n\r\n // 记录所有实例\r\n thisModule.that = {}; // 记录所有实例对象\r\n\r\n // 获取当前实例对象\r\n thisModule.getThis = function(id){\r\n var that = thisModule.that[id];\r\n if(!that) hint.error(id ? (MOD_NAME +' instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return that;\r\n };\r\n \r\n // 核心入口 \r\n upload.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n \r\n exports(MOD_NAME, upload);\r\n});\r\n\r\n","/**\r\n * form 表单组件\r\n */\r\n \r\nlayui.define(['lay', 'layer', 'util'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var layer = layui.layer;\r\n var util = layui.util;\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n \r\n var MOD_NAME = 'form';\r\n var ELEM = '.layui-form';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var DISABLED = 'layui-disabled';\r\n var OUT_OF_RANGE = 'layui-input-number-out-of-range';\r\n \r\n var Form = function(){\r\n this.config = {\r\n // 内置的验证规则\r\n verify: {\r\n required: function(value) {\r\n if (!/[\\S]+/.test(value)) {\r\n return '必填项不能为空';\r\n }\r\n },\r\n phone: function(value) {\r\n var EXP = /^1\\d{10}$/;\r\n if (value && !EXP.test(value)) {\r\n return '手机号格式不正确';\r\n }\r\n },\r\n email: function(value) {\r\n var EXP = /^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\r\n if (value && !EXP.test(value)) {\r\n return '邮箱格式不正确';\r\n }\r\n },\r\n url: function(value) {\r\n var EXP = /^(#|(http(s?)):\\/\\/|\\/\\/)[^\\s]+\\.[^\\s]+$/;\r\n if (value && !EXP.test(value)) {\r\n return '链接格式不正确';\r\n }\r\n },\r\n number: function(value){\r\n if (value && isNaN(value)) {\r\n return '只能填写数字';\r\n }\r\n },\r\n date: function(value){\r\n var EXP = /^(\\d{4})[-\\/](\\d{1}|0\\d{1}|1[0-2])([-\\/](\\d{1}|0\\d{1}|[1-2][0-9]|3[0-1]))*$/;\r\n if (value && !EXP.test(value)) {\r\n return '日期格式不正确';\r\n }\r\n },\r\n identity: function(value) {\r\n var EXP = /(^\\d{15}$)|(^\\d{17}(x|X|\\d)$)/;\r\n if (value && !EXP.test(value)) {\r\n return '身份证号格式不正确';\r\n }\r\n }\r\n },\r\n autocomplete: null // 全局 autocomplete 状态。 null 表示不干预\r\n };\r\n };\r\n \r\n // 全局设置\r\n Form.prototype.set = function(options){\r\n var that = this;\r\n $.extend(true, that.config, options);\r\n return that;\r\n };\r\n \r\n // 验证规则设定\r\n Form.prototype.verify = function(settings){\r\n var that = this;\r\n $.extend(true, that.config.verify, settings);\r\n return that;\r\n };\r\n\r\n // 获取指定表单对象\r\n Form.prototype.getFormElem = function(filter){\r\n return $(ELEM + function(){\r\n return filter ? ('[lay-filter=\"' + filter +'\"]') : '';\r\n }());\r\n };\r\n \r\n // 表单事件\r\n Form.prototype.on = function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n };\r\n \r\n // 赋值/取值\r\n Form.prototype.val = function(filter, object){\r\n var that = this\r\n ,formElem = that.getFormElem(filter);\r\n \r\n // 遍历\r\n formElem.each(function(index, item){\r\n var itemForm = $(this);\r\n \r\n // 赋值\r\n layui.each(object, function(key, value){\r\n var itemElem = itemForm.find('[name=\"'+ key +'\"]')\r\n ,type;\r\n \r\n // 如果对应的表单不存在,则不执行\r\n if(!itemElem[0]) return;\r\n type = itemElem[0].type;\r\n \r\n // 如果为复选框\r\n if(type === 'checkbox'){\r\n itemElem[0].checked = value;\r\n } else if(type === 'radio') { // 如果为单选框\r\n itemElem.each(function(){\r\n this.checked = this.value == value;\r\n });\r\n } else { // 其它类型的表单\r\n itemElem.val(value);\r\n }\r\n });\r\n });\r\n \r\n form.render(null, filter);\r\n \r\n // 返回值\r\n return that.getValue(filter);\r\n };\r\n \r\n // 取值\r\n Form.prototype.getValue = function(filter, itemForm){\r\n itemForm = itemForm || this.getFormElem(filter);\r\n \r\n var nameIndex = {} // 数组 name 索引\r\n ,field = {}\r\n ,fieldElem = itemForm.find('input,select,textarea') // 获取所有表单域\r\n \r\n layui.each(fieldElem, function(_, item){ \r\n var othis = $(this)\r\n ,init_name; // 初始 name\r\n \r\n item.name = (item.name || '').replace(/^\\s*|\\s*&/, '');\r\n if(!item.name) return;\r\n \r\n // 用于支持数组 name\r\n if(/^.*\\[\\]$/.test(item.name)){\r\n var key = item.name.match(/^(.*)\\[\\]$/g)[0];\r\n nameIndex[key] = nameIndex[key] | 0;\r\n init_name = item.name.replace(/^(.*)\\[\\]$/, '$1['+ (nameIndex[key]++) +']');\r\n }\r\n \r\n if(/^(checkbox|radio)$/.test(item.type) && !item.checked) return; // 复选框和单选框未选中,不记录字段 \r\n field[init_name || item.name] = item.value;\r\n });\r\n \r\n return field;\r\n };\r\n \r\n // 表单控件渲染\r\n Form.prototype.render = function(type, filter){\r\n var that = this;\r\n var options = that.config;\r\n var elemForm = $(ELEM + function(){\r\n return filter ? ('[lay-filter=\"' + filter +'\"]') : '';\r\n }());\r\n var items = {\r\n // 输入框\r\n input: function(elem){\r\n var inputs = elem || elemForm.find('input,textarea');\r\n\r\n // 初始化全局的 autocomplete\r\n options.autocomplete && inputs.attr('autocomplete', options.autocomplete);\r\n\r\n var handleInputNumber = function(elem, eventType){\r\n var that = this;\r\n var rawValue = elem.val();\r\n var value = Number(rawValue);\r\n var step = Number(elem.attr('step')) || 1; // 加减的数字间隔\r\n var min = Number(elem.attr('min'));\r\n var max = Number(elem.attr('max'));\r\n var precision = Number(elem.attr('lay-precision'));\r\n var noAction = eventType !== 'click' && rawValue === ''; // 初始渲染和失焦时空值不作处理\r\n var isInit = eventType === 'init';\r\n\r\n if(isNaN(value)) return; // 若非数字,则不作处理\r\n\r\n if(eventType === 'click'){\r\n var isDecrement = !!$(that).index() // 0: icon-up, 1: icon-down\r\n value = isDecrement ? value - step : value + step;\r\n }\r\n\r\n // 获取小数点后位数\r\n var decimals = function(step){\r\n var decimals = (step.toString().match(/\\.(\\d+$)/) || [])[1] || '';\r\n return decimals.length;\r\n };\r\n\r\n precision = precision >= 0 ? precision : Math.max(decimals(step), decimals(rawValue));\r\n\r\n if(!noAction){\r\n // 初始渲染时只处理数字精度\r\n if(!isInit){\r\n if(value <= min) value = min;\r\n if(value >= max) value = max;\r\n }\r\n if(precision) value = value.toFixed(precision);\r\n elem.val(value);\r\n }\r\n\r\n // 超出范围的样式\r\n var outOfRange = value < min || value > max;\r\n elem[outOfRange && !noAction ? 'addClass' : 'removeClass'](OUT_OF_RANGE);\r\n\r\n if(isInit) return;\r\n\r\n // 更新按钮状态\r\n var controlBtn = {\r\n increment: elem.next().find('.layui-icon-up'),\r\n decrement: elem.next().find('.layui-icon-down')\r\n }\r\n controlBtn.increment[(value >= max && !noAction) ? 'addClass' : 'removeClass'](DISABLED)\r\n controlBtn.decrement[(value <= min && !noAction) ? 'addClass' : 'removeClass'](DISABLED)\r\n }\r\n\r\n // 初始化输入框动态点缀\r\n elemForm.find('input[lay-affix],textarea[lay-affix]').each(function(){\r\n var othis = $(this);\r\n var affix = othis.attr('lay-affix');\r\n var CLASS_WRAP = 'layui-input-wrap';\r\n var CLASS_SUFFIX = 'layui-input-suffix';\r\n var CLASS_AFFIX = 'layui-input-affix';\r\n var disabled = othis.is('[disabled]') || othis.is('[readonly]');\r\n\r\n // 根据是否空值来显示或隐藏元素\r\n var showAffix = function(elem, value){\r\n elem = $(elem);\r\n if(!elem[0]) return;\r\n elem[$.trim(value) ? 'removeClass' : 'addClass'](HIDE);\r\n };\r\n\r\n // 渲染动态点缀内容\r\n var renderAffix = function(opts){\r\n opts = $.extend({}, (affixOptions[affix] || {\r\n value: affix\r\n }), opts, lay.options(othis[0]));\r\n var elemAffix = $('
                  ');\r\n var value = layui.isArray(opts.value) ? opts.value : [opts.value];\r\n var elemIcon = $(function(){\r\n var arr = [];\r\n layui.each(value, function(i, item){\r\n arr.push('');\r\n });\r\n return arr.join('');\r\n }());\r\n \r\n elemAffix.append(elemIcon); // 插入图标元素\r\n\r\n // 追加 className\r\n if(opts.split) elemAffix.addClass('layui-input-split');\r\n if(opts.className) elemAffix.addClass(opts.className);\r\n\r\n // 移除旧的元素\r\n var hasElemAffix = othis.next('.'+ CLASS_AFFIX);\r\n if(hasElemAffix[0]) hasElemAffix.remove();\r\n\r\n // 是否在规定的容器中\r\n if(!othis.parent().hasClass(CLASS_WRAP)){\r\n othis.wrap('
                  ');\r\n }\r\n\r\n // 是否已经存在后缀元素\r\n var hasElemSuffix = othis.next('.'+ CLASS_SUFFIX);\r\n if(hasElemSuffix[0]){\r\n hasElemAffix = hasElemSuffix.find('.'+ CLASS_AFFIX);\r\n if(hasElemAffix[0]) hasElemAffix.remove();\r\n\r\n hasElemSuffix.prepend(elemAffix);\r\n\r\n othis.css('padding-right', function(){\r\n var paddingRight = othis.closest('.layui-input-group')[0] \r\n ? 0 \r\n : hasElemSuffix.outerWidth();\r\n return paddingRight + elemAffix.outerWidth()\r\n });\r\n } else {\r\n elemAffix.addClass(CLASS_SUFFIX);\r\n othis.after(elemAffix);\r\n }\r\n\r\n opts.show === 'auto' && showAffix(elemAffix, othis.val());\r\n \r\n typeof opts.init === 'function' && opts.init.call(this, othis, opts);\r\n \r\n // 输入事件\r\n othis.on('input propertychange', function(){\r\n var value = this.value;\r\n opts.show === 'auto' && showAffix(elemAffix, value);\r\n });\r\n\r\n // 失去焦点事件\r\n othis.on('blur', function(){\r\n typeof opts.blur === 'function' && opts.blur.call(this, othis, opts);\r\n });\r\n \r\n // 点击动态后缀事件\r\n elemIcon.on('click', function(){\r\n var inputFilter = othis.attr('lay-filter');\r\n if($(this).hasClass(DISABLED)) return;\r\n \r\n typeof opts.click === 'function' && opts.click.call(this, othis, opts);\r\n \r\n // 对外事件\r\n layui.event.call(this, MOD_NAME, 'input-affix('+ inputFilter +')', {\r\n elem: othis[0],\r\n affix: affix,\r\n options: opts\r\n });\r\n });\r\n };\r\n \r\n // 动态点缀配置项\r\n var affixOptions = {\r\n eye: { // 密码显隐\r\n value: 'eye-invisible',\r\n click: function(elem, opts){ // 事件\r\n var SHOW_NAME = 'LAY_FORM_INPUT_AFFIX_SHOW';\r\n var isShow = elem.data(SHOW_NAME);\r\n \r\n elem.attr('type', isShow ? 'password' : 'text').data(SHOW_NAME, !isShow);\r\n\r\n renderAffix({\r\n value: isShow ? 'eye-invisible' : 'eye'\r\n });\r\n }\r\n },\r\n clear: { // 内容清除\r\n value: 'clear',\r\n click: function(elem){\r\n elem.val('').focus();\r\n showAffix($(this).parent(), null);\r\n },\r\n show: 'auto', // 根据输入框值是否存在来显示或隐藏点缀图标\r\n disabled: disabled // 跟随输入框禁用状态\r\n },\r\n number: { // 数字输入框\r\n value: ['up', 'down'],\r\n split: true,\r\n className: 'layui-input-number',\r\n disabled: othis.is('[disabled]'), // 跟随输入框禁用状态\r\n init: function(elem){\r\n handleInputNumber.call(this, elem, 'init')\r\n },\r\n click: function(elem){\r\n handleInputNumber.call(this, elem, 'click')\r\n },\r\n blur: function(elem){\r\n handleInputNumber.call(this, elem, 'blur')\r\n },\r\n }\r\n };\r\n \r\n renderAffix();\r\n });\r\n }\r\n \r\n // 下拉选择框\r\n ,select: function(elem){\r\n var TIPS = '请选择';\r\n var CLASS = 'layui-form-select';\r\n var TITLE = 'layui-select-title';\r\n var NONE = 'layui-select-none';\r\n var initValue = '';\r\n var thatInput;\r\n var selects = elem || elemForm.find('select');\r\n\r\n // 隐藏 select\r\n var hide = function(e, clear){\r\n if(!$(e.target).parent().hasClass(TITLE) || clear){\r\n $('.'+CLASS).removeClass(CLASS+'ed ' + CLASS+'up');\r\n thatInput && initValue && thatInput.val(initValue);\r\n }\r\n thatInput = null;\r\n };\r\n \r\n // 各种事件\r\n var events = function(reElem, disabled, isSearch){\r\n var select = $(this);\r\n var title = reElem.find('.' + TITLE);\r\n var input = title.find('input');\r\n var dl = reElem.find('dl');\r\n var dds = dl.children('dd');\r\n var dts = dl.children('dt'); // select 分组dt元素\r\n var index = this.selectedIndex; // 当前选中的索引\r\n var nearElem; // select 组件当前选中的附近元素,用于辅助快捷键功能\r\n \r\n if(disabled) return;\r\n\r\n // 搜索项\r\n var laySearch = select.attr('lay-search');\r\n \r\n // 展开下拉\r\n var showDown = function(){\r\n var top = reElem.offset().top + reElem.outerHeight() + 5 - $win.scrollTop();\r\n var dlHeight = dl.outerHeight();\r\n \r\n index = select[0].selectedIndex; // 获取最新的 selectedIndex\r\n reElem.addClass(CLASS+'ed');\r\n dds.removeClass(HIDE);\r\n dts.removeClass(HIDE);\r\n nearElem = null;\r\n\r\n // 初始选中样式\r\n dds.removeClass(THIS);\r\n index >= 0 && dds.eq(index).addClass(THIS);\r\n\r\n // 上下定位识别\r\n if(top + dlHeight > $win.height() && top >= dlHeight){\r\n reElem.addClass(CLASS + 'up');\r\n }\r\n\r\n followScroll();\r\n };\r\n \r\n // 隐藏下拉\r\n var hideDown = function(choose){\r\n reElem.removeClass(CLASS+'ed ' + CLASS+'up');\r\n input.blur();\r\n nearElem = null;\r\n \r\n if(choose) return;\r\n \r\n notOption(input.val(), function(none){\r\n var selectedIndex = select[0].selectedIndex;\r\n \r\n // 未查询到相关值\r\n if(none){\r\n initValue = $(select[0].options[selectedIndex]).html(); // 重新获得初始选中值\r\n \r\n // 如果是第一项,且文本值等于 placeholder,则清空初始值\r\n if(selectedIndex === 0 && initValue === input.attr('placeholder')){\r\n initValue = '';\r\n }\r\n\r\n // 如果有选中值,则将输入框纠正为该值。否则清空输入框\r\n input.val(initValue || '');\r\n }\r\n });\r\n };\r\n \r\n // 定位下拉滚动条\r\n var followScroll = function(){ \r\n var thisDd = dl.children('dd.'+ THIS);\r\n \r\n if(!thisDd[0]) return;\r\n \r\n var posTop = thisDd.position().top;\r\n var dlHeight = dl.height();\r\n var ddHeight = thisDd.height();\r\n \r\n // 若选中元素在滚动条不可见底部\r\n if(posTop > dlHeight){\r\n dl.scrollTop(posTop + dl.scrollTop() - dlHeight + ddHeight - 5);\r\n }\r\n \r\n // 若选择玄素在滚动条不可见顶部\r\n if(posTop < 0){\r\n dl.scrollTop(posTop + dl.scrollTop() - 5);\r\n }\r\n };\r\n \r\n // 点击标题区域\r\n title.on('click', function(e){\r\n reElem.hasClass(CLASS+'ed') ? (\r\n hideDown()\r\n ) : (\r\n hide(e, true), \r\n showDown()\r\n );\r\n dl.find('.'+NONE).remove();\r\n }); \r\n \r\n // 点击箭头获取焦点\r\n title.find('.layui-edge').on('click', function(){\r\n input.focus();\r\n });\r\n \r\n // select 中 input 键盘事件\r\n input.on('keyup', function(e){ // 键盘松开\r\n var keyCode = e.keyCode;\r\n \r\n // Tab键展开\r\n if(keyCode === 9){\r\n showDown();\r\n }\r\n }).on('keydown', function(e){ // 键盘按下\r\n var keyCode = e.keyCode;\r\n\r\n // Tab键隐藏\r\n if(keyCode === 9){\r\n hideDown();\r\n }\r\n \r\n // 标注 dd 的选中状态\r\n var setThisDd = function(prevNext, thisElem1){\r\n var nearDd, cacheNearElem\r\n e.preventDefault();\r\n\r\n // 得到当前队列元素 \r\n var thisElem = function(){\r\n var thisDd = dl.children('dd.'+ THIS);\r\n \r\n // 如果是搜索状态,且按 Down 键,且当前可视 dd 元素在选中元素之前,\r\n // 则将当前可视 dd 元素的上一个元素作为虚拟的当前选中元素,以保证递归不中断\r\n if(dl.children('dd.'+ HIDE)[0] && prevNext === 'next'){\r\n var showDd = dl.children('dd:not(.'+ HIDE +',.'+ DISABLED +')')\r\n ,firstIndex = showDd.eq(0).index();\r\n if(firstIndex >=0 && firstIndex < thisDd.index() && !showDd.hasClass(THIS)){\r\n return showDd.eq(0).prev()[0] ? showDd.eq(0).prev() : dl.children(':last');\r\n }\r\n }\r\n\r\n if(thisElem1 && thisElem1[0]){\r\n return thisElem1;\r\n }\r\n if(nearElem && nearElem[0]){\r\n return nearElem;\r\n }\r\n \r\n return thisDd;\r\n // return dds.eq(index);\r\n }();\r\n \r\n cacheNearElem = thisElem[prevNext](); // 当前元素的附近元素\r\n nearDd = thisElem[prevNext]('dd:not(.'+ HIDE +')'); // 当前可视元素的 dd 元素\r\n\r\n // 如果附近的元素不存在,则停止执行,并清空 nearElem\r\n if(!cacheNearElem[0]) return nearElem = null;\r\n \r\n // 记录附近的元素,让其成为下一个当前元素\r\n nearElem = thisElem[prevNext]();\r\n\r\n // 如果附近不是 dd ,或者附近的 dd 元素是禁用状态,则进入递归查找\r\n if((!nearDd[0] || nearDd.hasClass(DISABLED)) && nearElem[0]){\r\n return setThisDd(prevNext, nearElem);\r\n }\r\n \r\n nearDd.addClass(THIS).siblings().removeClass(THIS); // 标注样式\r\n followScroll(); // 定位滚动条\r\n };\r\n \r\n if(keyCode === 38) setThisDd('prev'); // Up 键\r\n if(keyCode === 40) setThisDd('next'); // Down 键\r\n \r\n // Enter 键\r\n if(keyCode === 13){ \r\n e.preventDefault();\r\n dl.children('dd.'+THIS).trigger('click');\r\n }\r\n });\r\n \r\n // 检测值是否不属于 select 项\r\n var notOption = function(value, callback, origin){\r\n var num = 0;\r\n layui.each(dds, function(){\r\n var othis = $(this);\r\n var text = othis.text();\r\n\r\n // 是否区分大小写\r\n if(laySearch !== 'cs'){\r\n text = text.toLowerCase();\r\n value = value.toLowerCase();\r\n }\r\n \r\n // 匹配\r\n var not = text.indexOf(value) === -1;\r\n \r\n if(value === '' || (origin === 'blur') ? value !== text : not) num++;\r\n origin === 'keyup' && othis[not ? 'addClass' : 'removeClass'](HIDE);\r\n });\r\n // 处理 select 分组元素\r\n origin === 'keyup' && layui.each(dts, function(){\r\n var othis = $(this)\r\n ,thisDds = othis.nextUntil('dt').filter('dd') // 当前分组下的dd元素\r\n ,allHide = thisDds.length == thisDds.filter('.' + HIDE).length; // 当前分组下所有dd元素都隐藏了\r\n othis[allHide ? 'addClass' : 'removeClass'](HIDE);\r\n });\r\n var none = num === dds.length;\r\n return callback(none), none;\r\n };\r\n \r\n // 搜索匹配\r\n var search = function(e){\r\n var value = this.value, keyCode = e.keyCode;\r\n \r\n if(keyCode === 9 || keyCode === 13 \r\n || keyCode === 37 || keyCode === 38 \r\n || keyCode === 39 || keyCode === 40\r\n ){\r\n return false;\r\n }\r\n \r\n notOption(value, function(none){\r\n if(none){\r\n dl.find('.'+NONE)[0] || dl.append('

                  无匹配项

                  ');\r\n } else {\r\n dl.find('.'+NONE).remove();\r\n }\r\n }, 'keyup');\r\n \r\n // 当搜索值清空时\r\n if(value === ''){\r\n // 取消选中项\r\n select.val('');\r\n dl.find('.'+ THIS).removeClass(THIS);\r\n (select[0].options[0] || {}).value || dl.children('dd:eq(0)').addClass(THIS);\r\n dl.find('.'+ NONE).remove();\r\n }\r\n \r\n followScroll(); // 定位滚动条\r\n };\r\n \r\n if(isSearch){\r\n input.on('input propertychange', search).on('blur', function(e){\r\n var selectedIndex = select[0].selectedIndex;\r\n \r\n thatInput = input; // 当前的 select 中的 input 元素\r\n initValue = $(select[0].options[selectedIndex]).text(); // 重新获得初始选中值\r\n \r\n // 如果是第一项,且文本值等于 placeholder,则清空初始值\r\n if(selectedIndex === 0 && initValue === input.attr('placeholder')){\r\n initValue = '';\r\n }\r\n \r\n setTimeout(function(){\r\n notOption(input.val(), function(none){\r\n initValue || input.val(''); // none && !initValue\r\n }, 'blur');\r\n }, 200);\r\n });\r\n }\r\n\r\n // 选择\r\n dds.on('click', function(){\r\n var othis = $(this), value = othis.attr('lay-value');\r\n var filter = select.attr('lay-filter'); // 获取过滤器\r\n \r\n if(othis.hasClass(DISABLED)) return false;\r\n \r\n if(othis.hasClass('layui-select-tips')){\r\n input.val('');\r\n } else {\r\n input.val(othis.text());\r\n othis.addClass(THIS);\r\n }\r\n\r\n othis.siblings().removeClass(THIS);\r\n select.val(value).removeClass('layui-form-danger');\r\n\r\n layui.event.call(this, MOD_NAME, 'select('+ filter +')', {\r\n elem: select[0]\r\n ,value: value\r\n ,othis: reElem\r\n });\r\n\r\n hideDown(true);\r\n return false;\r\n });\r\n \r\n reElem.find('dl>dt').on('click', function(e){\r\n return false;\r\n });\r\n \r\n $(document).off('click', hide).on('click', hide); // 点击其它元素关闭 select\r\n }\r\n \r\n // 初始渲染 select 组件选项\r\n selects.each(function(index, select){\r\n var othis = $(this)\r\n ,hasRender = othis.next('.'+CLASS)\r\n ,disabled = this.disabled\r\n ,value = select.value\r\n ,selected = $(select.options[select.selectedIndex]) // 获取当前选中项\r\n ,optionsFirst = select.options[0];\r\n \r\n if(typeof othis.attr('lay-ignore') === 'string') return othis.show();\r\n \r\n var isSearch = typeof othis.attr('lay-search') === 'string'\r\n ,placeholder = optionsFirst ? (\r\n optionsFirst.value ? TIPS : (optionsFirst.innerHTML || TIPS)\r\n ) : TIPS;\r\n\r\n // 替代元素\r\n var reElem = $(['
                  '\r\n ,'
                  '\r\n ,('') // 禁用状态\r\n ,'
                  '\r\n ,'
                  '\r\n ,function(options){\r\n var arr = [];\r\n layui.each(options, function(index, item){\r\n var tagName = item.tagName.toLowerCase();\r\n\r\n if(index === 0 && !item.value && tagName !== 'optgroup'){\r\n arr.push('
                  '+ $.trim(item.innerHTML || TIPS) +'
                  ');\r\n } else if(tagName === 'optgroup'){\r\n arr.push('
                  '+ item.label +'
                  '); \r\n } else {\r\n arr.push('
                  '+ $.trim(item.innerHTML) +'
                  ');\r\n }\r\n });\r\n arr.length === 0 && arr.push('
                  没有选项
                  ');\r\n return arr.join('');\r\n }(othis.find('*')) +'
                  '\r\n ,'
                  '].join(''));\r\n \r\n hasRender[0] && hasRender.remove(); // 如果已经渲染,则Rerender\r\n othis.after(reElem); \r\n events.call(this, reElem, disabled, isSearch);\r\n });\r\n }\r\n \r\n // 复选框/开关\r\n ,checkbox: function(elem){\r\n var CLASS = {\r\n \"checkbox\": ['layui-form-checkbox', 'layui-form-checked', 'checkbox'],\r\n \"switch\": ['layui-form-switch', 'layui-form-onswitch', 'switch'],\r\n SUBTRA: 'layui-icon-indeterminate'\r\n };\r\n var checks = elem || elemForm.find('input[type=checkbox]');\r\n // 风格\r\n var skins = {\r\n \"primary\": true, // 默认风格\r\n \"tag\": true, // 标签风格\r\n \"switch\": true // 开关风格\r\n };\r\n // 事件\r\n var events = function(reElem, RE_CLASS){\r\n var check = $(this);\r\n \r\n // 勾选\r\n reElem.on('click', function(){\r\n var othis = $(this);\r\n var filter = check.attr('lay-filter') // 获取过滤器\r\n var title = (\r\n othis.next('*[lay-checkbox]')[0] \r\n ? othis.next().html()\r\n : check.attr('title') || ''\r\n );\r\n var skin = check.attr('lay-skin') || 'primary';\r\n\r\n // 开关\r\n title = skin === 'switch' ? title.split('|') : [title];\r\n\r\n // 禁用\r\n if(check[0].disabled) return;\r\n \r\n // 半选\r\n if (check[0].indeterminate) {\r\n check[0].indeterminate = false;\r\n reElem.find('.'+ CLASS.SUBTRA).removeClass(CLASS.SUBTRA).addClass('layui-icon-ok');\r\n }\r\n\r\n // 开关\r\n check[0].checked ? (\r\n check[0].checked = false,\r\n reElem.removeClass(RE_CLASS[1]),\r\n skin === 'switch' && reElem.children('div').html(title[1])\r\n ) : (\r\n check[0].checked = true,\r\n reElem.addClass(RE_CLASS[1]),\r\n skin === 'switch' && reElem.children('div').html(title[0])\r\n );\r\n \r\n // 事件\r\n layui.event.call(check[0], MOD_NAME, RE_CLASS[2]+'('+ filter +')', {\r\n elem: check[0],\r\n value: check[0].value,\r\n othis: reElem\r\n });\r\n });\r\n };\r\n \r\n // 遍历复选框\r\n checks.each(function(index, check){\r\n var othis = $(this);\r\n var skin = othis.attr('lay-skin') || 'primary';\r\n var title = util.escape($.trim(check.title || function(){ // 向下兼容 lay-text 属性\r\n return check.title = othis.attr('lay-text') || '';\r\n }()));\r\n var disabled = this.disabled;\r\n\r\n // if(!skins[skin]) skin = 'primary'; // 若非内置风格,则强制为默认风格\r\n var RE_CLASS = CLASS[skin] || CLASS.checkbox;\r\n\r\n // 替代元素\r\n var hasRender = othis.next('.' + RE_CLASS[0]);\r\n hasRender[0] && hasRender.remove(); // 若已经渲染,则 Rerender\r\n \r\n // 若存在标题模板,则优先读取标题模板\r\n if(othis.next('[lay-checkbox]')[0]){\r\n title = othis.next().html() || '';\r\n }\r\n\r\n // 若为开关,则对 title 进行分隔解析\r\n title = skin === 'switch' ? title.split('|') : [title];\r\n \r\n if(typeof othis.attr('lay-ignore') === 'string') return othis.show();\r\n \r\n // 替代元素\r\n var reElem = $(['
                  ',\r\n function(){ // 不同风格的内容\r\n var type = {\r\n // 复选框\r\n \"checkbox\": [\r\n (title[0] ? ('
                  '+ title[0] +'
                  ') : (skin === 'primary' ? '' : '
                  ')),\r\n ''\r\n ].join(''),\r\n // 开关\r\n \"switch\": '
                  '+ ((check.checked ? title[0] : title[1]) || '') +'
                  '\r\n };\r\n return type[skin] || type['checkbox'];\r\n }(),\r\n '
                  '].join(''));\r\n\r\n othis.after(reElem);\r\n events.call(this, reElem, RE_CLASS);\r\n });\r\n }\r\n \r\n // 单选框\r\n ,radio: function(elem){\r\n var CLASS = 'layui-form-radio';\r\n var ICON = ['layui-icon-radio', 'layui-icon-circle'];\r\n var radios = elem || elemForm.find('input[type=radio]');\r\n\r\n // 事件\r\n var events = function(reElem){\r\n var radio = $(this);\r\n var ANIM = 'layui-anim-scaleSpring';\r\n \r\n reElem.on('click', function(){\r\n var name = radio[0].name, forms = radio.parents(ELEM);\r\n var filter = radio.attr('lay-filter'); // 获取过滤器\r\n var sameRadio = forms.find('input[name='+ name.replace(/(\\.|#|\\[|\\])/g, '\\\\$1') +']'); // 找到相同name的兄弟\r\n \r\n if(radio[0].disabled) return;\r\n \r\n layui.each(sameRadio, function(){\r\n var next = $(this).next('.' + CLASS);\r\n this.checked = false;\r\n next.removeClass(CLASS + 'ed');\r\n next.children('.layui-icon').removeClass(ANIM + ' ' + ICON[0]).addClass(ICON[1]);\r\n });\r\n \r\n radio[0].checked = true;\r\n reElem.addClass(CLASS + 'ed');\r\n reElem.children('.layui-icon').addClass(ANIM + ' ' + ICON[0]);\r\n \r\n layui.event.call(radio[0], MOD_NAME, 'radio('+ filter +')', {\r\n elem: radio[0],\r\n value: radio[0].value,\r\n othis: reElem\r\n });\r\n });\r\n };\r\n \r\n // 初始渲染\r\n radios.each(function(index, radio){\r\n var othis = $(this), hasRender = othis.next('.' + CLASS);\r\n var disabled = this.disabled;\r\n \r\n if(typeof othis.attr('lay-ignore') === 'string') return othis.show();\r\n hasRender[0] && hasRender.remove(); // 如果已经渲染,则Rerender\r\n \r\n // 替代元素\r\n var reElem = $(['
                  ', // 禁用状态\r\n '',\r\n '
                  '+ function(){\r\n var title = util.escape(radio.title || '');\r\n if(othis.next('[lay-radio]')[0]){\r\n title = othis.next().html();\r\n }\r\n return title;\r\n }() +'
                  ',\r\n '
                  '].join(''));\r\n\r\n othis.after(reElem);\r\n events.call(this, reElem);\r\n });\r\n }\r\n };\r\n\r\n // 执行所有渲染项\r\n var renderItem = function(){\r\n layui.each(items, function(index, item){\r\n item();\r\n });\r\n };\r\n\r\n // jquery 对象\r\n if (layui.type(type) === 'object') {\r\n // 若对象为表单域容器\r\n if($(type).is(ELEM)){\r\n elemForm = $(type);\r\n renderItem();\r\n } else { // 对象为表单项\r\n type.each(function (index, item) {\r\n var elem = $(item);\r\n if (!elem.closest(ELEM).length) {\r\n return; // 若不在 layui-form 容器中直接跳过\r\n }\r\n if (item.tagName === 'SELECT') {\r\n items['select'](elem);\r\n } else if (item.tagName === 'INPUT') {\r\n var itemType = item.type;\r\n if (itemType === 'checkbox' || itemType === 'radio') {\r\n items[itemType](elem);\r\n } else {\r\n items['input'](elem);\r\n }\r\n }\r\n });\r\n }\r\n } else {\r\n type ? (\r\n items[type] ? items[type]() : hint.error('不支持的 \"'+ type + '\" 表单渲染')\r\n ) : renderItem();\r\n }\r\n return that;\r\n };\r\n\r\n // 主动触发验证 --- elem 即要验证的区域表单选择器 / return true or false\r\n Form.prototype.validate = function(elem) {\r\n var that = this;\r\n var intercept; // 拦截标识\r\n var options = that.config; // 获取全局配置项\r\n var verify = options.verify; // 验证规则\r\n var DANGER = 'layui-form-danger'; // 警示样式\r\n\r\n elem = $(elem);\r\n\r\n // 节点不存在可视为 true\r\n if (!elem[0]) return !0;\r\n\r\n // 若节点不存在特定属性,则查找容器内有待验证的子节点\r\n if (elem.attr('lay-verify') === undefined) {\r\n // 若校验的是一个不带验证规则的容器,校验内部的 lay-verify 节点\r\n if (that.validate(elem.find('*[lay-verify]')) === false) {\r\n return false;\r\n }\r\n }\r\n\r\n // 开始校验\r\n layui.each(elem, function(_, item) {\r\n var othis = $(this);\r\n var verifyStr = othis.attr('lay-verify') || '';\r\n var vers = verifyStr.split('|');\r\n var verType = othis.attr('lay-vertype'); // 提示方式\r\n var value = $.trim(othis.val());\r\n\r\n othis.removeClass(DANGER); // 移除警示样式\r\n \r\n // 遍历元素绑定的验证规则\r\n layui.each(vers, function(_, thisVer) {\r\n var verst; // 校验结果\r\n var errorText = ''; // 错误提示文本\r\n var rule = verify[thisVer]; // 获取校验规则\r\n \r\n // 匹配验证规则\r\n if (rule) {\r\n verst = typeof rule === 'function'\r\n ? errorText = rule(value, item) \r\n : !rule[0].test(value); // 兼容早期数组中的正则写法\r\n \r\n // 是否属于美化替换后的表单元素\r\n var isForm2Elem = item.tagName.toLowerCase() === 'select' || (\r\n /^(checkbox|radio)$/.test(item.type)\r\n );\r\n \r\n errorText = errorText || rule[1];\r\n \r\n // 获取自定义必填项提示文本\r\n if (thisVer === 'required') {\r\n errorText = othis.attr('lay-reqtext') || errorText;\r\n }\r\n \r\n // 若命中校验规则\r\n if (verst) {\r\n // 提示层风格\r\n if (verType === 'tips') {\r\n layer.tips(errorText, function(){\r\n if(typeof othis.attr('lay-ignore') !== 'string'){\r\n if(isForm2Elem){\r\n return othis.next();\r\n }\r\n }\r\n return othis;\r\n }(), {tips: 1});\r\n } else if(verType === 'alert') {\r\n layer.alert(errorText, {title: '提示', shadeClose: true});\r\n } \r\n // 若返回的为字符或数字,则自动弹出默认提示框;否则由 verify 方法中处理提示\r\n else if(/\\b(string|number)\\b/.test(typeof errorText)) {\r\n layer.msg(errorText, {icon: 5, shift: 6});\r\n }\r\n\r\n setTimeout(function() {\r\n (isForm2Elem ? othis.next().find('input') : item).focus();\r\n }, 7);\r\n \r\n othis.addClass(DANGER);\r\n return intercept = true;\r\n }\r\n }\r\n });\r\n\r\n if (intercept) return intercept;\r\n });\r\n\r\n return !intercept;\r\n };\r\n\r\n // 提交表单并校验\r\n var submit = Form.prototype.submit = function(filter, callback){\r\n var field = {}; // 字段集合\r\n var button = $(this); // 当前触发的按钮\r\n\r\n // 表单域 lay-filter 属性值\r\n var layFilter = typeof filter === 'string' \r\n ? filter \r\n : button.attr('lay-filter');\r\n\r\n // 当前所在表单域\r\n var elem = this.getFormElem \r\n ? this.getFormElem(layFilter) \r\n : button.parents(ELEM).eq(0);\r\n\r\n // 获取需要校验的元素\r\n var verifyElem = elem.find('*[lay-verify]');\r\n\r\n // 开始校验\r\n if(!form.validate(verifyElem)) return false;\r\n\r\n // 获取当前表单值\r\n field = form.getValue(null, elem);\r\n\r\n // 返回的参数\r\n var params = {\r\n elem: this.getFormElem ? (window.event && window.event.target) : this // 触发事件的对象\r\n ,form: this.getFormElem ? elem[0] : button.parents('form')[0] // 当前所在的 form 元素,如果存在的话\r\n ,field: field // 当前表单数据\r\n };\r\n \r\n // 回调\r\n typeof callback === 'function' && callback(params);\r\n \r\n // 事件\r\n return layui.event.call(this, MOD_NAME, 'submit('+ layFilter +')', params);\r\n };\r\n \r\n var form = new Form();\r\n var $dom = $(document);\r\n var $win = $(window);\r\n \r\n // 初始自动完成渲染\r\n $(function(){\r\n form.render();\r\n });\r\n \r\n // 表单 reset 重置渲染\r\n $dom.on('reset', ELEM, function(){\r\n var filter = $(this).attr('lay-filter');\r\n setTimeout(function(){\r\n form.render(null, filter);\r\n }, 50);\r\n });\r\n \r\n // 表单提交事件\r\n $dom.on('submit', ELEM, submit)\r\n .on('click', '*[lay-submit]', submit);\r\n \r\n exports(MOD_NAME, form);\r\n});\r\n\r\n \r\n","/**\r\n * layui.table\r\n * 表格组件\r\n */\r\n\r\nlayui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){\r\n \"use strict\";\r\n\r\n var $ = layui.$;\r\n var lay = layui.lay;\r\n var laytpl = layui.laytpl;\r\n var laypage = layui.laypage;\r\n var layer = layui.layer;\r\n var form = layui.form;\r\n var util = layui.util;\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n\r\n // api\r\n var table = {\r\n config: { // 全局配置项\r\n checkName: 'LAY_CHECKED', // 是否选中状态的特定字段名\r\n indexName: 'LAY_INDEX', // 初始下标索引名,用于恢复当前页表格排序\r\n numbersName: 'LAY_NUM', // 序号\r\n disabledName: 'LAY_DISABLED' // 禁用状态的特定字段名\r\n },\r\n cache: {}, // 数据缓存\r\n index: layui.table ? (layui.table.index + 10000) : 0,\r\n\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n\r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisTable = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id || options.index;\r\n\r\n return {\r\n config: options,\r\n reload: function(options, deep){\r\n that.reload.call(that, options, deep);\r\n },\r\n reloadData: function(options, deep){\r\n table.reloadData(id, options, deep);\r\n },\r\n setColsWidth: function(){\r\n that.setColsWidth.call(that);\r\n },\r\n resize: function(){ // 重置表格尺寸/结构\r\n that.resize.call(that);\r\n }\r\n }\r\n };\r\n\r\n // 获取当前实例\r\n var getThisTable = function(id){\r\n var that = thisTable.that[id];\r\n if(!that) hint.error(id ? ('The table instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return that || null;\r\n };\r\n\r\n // 获取当前实例配置项\r\n var getThisTableConfig = function(id){\r\n var config = thisTable.config[id];\r\n if(!config) hint.error(id ? ('The table instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return config || null;\r\n };\r\n\r\n // 解析自定义模板数据\r\n var parseTempData = function(obj){\r\n obj = obj || {};\r\n\r\n var options = this.config || {};\r\n var item3 = obj.item3; // 表头数据\r\n var content = obj.content; // 原始内容\r\n if (item3.type === 'numbers') content = obj.tplData[table.config.numbersName];\r\n\r\n // 是否编码 HTML\r\n var escaped = 'escape' in item3 ? item3.escape : options.escape;\r\n if(escaped) content = util.escape(content);\r\n\r\n // 获取模板\r\n var templet = obj.text && item3.exportTemplet || (item3.templet || item3.toolbar);\r\n\r\n // 获取模板内容\r\n if(templet){\r\n content = typeof templet === 'function'\r\n ? templet.call(item3, obj.tplData, obj.obj)\r\n : laytpl($(templet).html() || String(content)).render($.extend({\r\n LAY_COL: item3\r\n }, obj.tplData));\r\n }\r\n\r\n // 是否只返回文本\r\n return obj.text ? $('
                  '+ content +'
                  ').text() : content;\r\n };\r\n\r\n // 字符\r\n var MOD_NAME = 'table';\r\n var ELEM = '.layui-table';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var HIDE_V = 'layui-hide-v';\r\n var DISABLED = 'layui-disabled';\r\n var NONE = 'layui-none';\r\n\r\n var ELEM_VIEW = 'layui-table-view';\r\n var ELEM_TOOL = '.layui-table-tool';\r\n var ELEM_BOX = '.layui-table-box';\r\n var ELEM_INIT = '.layui-table-init';\r\n var ELEM_HEADER = '.layui-table-header';\r\n var ELEM_BODY = '.layui-table-body';\r\n var ELEM_MAIN = '.layui-table-main';\r\n var ELEM_FIXED = '.layui-table-fixed';\r\n var ELEM_FIXL = '.layui-table-fixed-l';\r\n var ELEM_FIXR = '.layui-table-fixed-r';\r\n var ELEM_TOTAL = '.layui-table-total';\r\n var ELEM_PAGE = '.layui-table-page';\r\n var ELEM_PAGE_VIEW = '.layui-table-pageview';\r\n var ELEM_SORT = '.layui-table-sort';\r\n var ELEM_CHECKED = 'layui-table-checked';\r\n var ELEM_EDIT = 'layui-table-edit';\r\n var ELEM_HOVER = 'layui-table-hover';\r\n var ELEM_GROUP = 'laytable-cell-group';\r\n var ELEM_COL_SPECIAL = 'layui-table-col-special';\r\n var ELEM_TOOL_PANEL = 'layui-table-tool-panel';\r\n var ELEM_EXPAND = 'layui-table-expanded'\r\n\r\n var DATA_MOVE_NAME = 'LAY_TABLE_MOVE_DICT';\r\n\r\n // thead 区域模板\r\n var TPL_HEADER = function(options){\r\n var rowCols = '{{#var colspan = layui.type(item2.colspan2) === \\'number\\' ? item2.colspan2 : item2.colspan; if(colspan){}} colspan=\"{{=colspan}}\"{{#} if(item2.rowspan){}} rowspan=\"{{=item2.rowspan}}\"{{#}}}';\r\n\r\n options = options || {};\r\n return ['
                '\r\n ,''\r\n ,'{{# layui.each(d.data.cols, function(i1, item1){ }}'\r\n ,''\r\n ,'{{# layui.each(item1, function(i2, item2){ }}'\r\n ,'{{# if(item2.fixed && item2.fixed !== \"right\"){ left = true; } }}'\r\n ,'{{# if(item2.fixed === \"right\"){ right = true; } }}'\r\n ,function(){\r\n if(options.fixed && options.fixed !== 'right'){\r\n return '{{# if(item2.fixed && item2.fixed !== \"right\"){ }}';\r\n }\r\n if(options.fixed === 'right'){\r\n return '{{# if(item2.fixed === \"right\"){ }}';\r\n }\r\n return '';\r\n }()\r\n ,'{{# var isSort = !(item2.colGroup) && item2.sort; }}'\r\n ,''\r\n ,(options.fixed ? '{{# }; }}' : '')\r\n ,'{{# }); }}'\r\n ,''\r\n ,'{{# }); }}'\r\n ,''\r\n ,'
                \\' + item2.title + \\'\\').text() }}\"{{# } }}>'\r\n ,'
                '\r\n ,'{{# if(item2.type === \"checkbox\"){ }}' //复选框\r\n ,''\r\n ,'{{# } else { }}'\r\n ,'{{-item2.title||\"\"}}'\r\n ,'{{# if(isSort){ }}'\r\n ,''\r\n ,'{{# } }}'\r\n ,'{{# } }}'\r\n ,'
                '\r\n ,'
                '].join('');\r\n };\r\n\r\n // tbody 区域模板\r\n var TPL_BODY = [''\r\n ,''\r\n ,'
                '].join('');\r\n\r\n // 主模板\r\n var TPL_MAIN = [\r\n ,'{{# if(d.data.toolbar){ }}'\r\n ,'
                '\r\n ,'
                '\r\n ,'
                '\r\n ,'
                '\r\n ,'{{# } }}'\r\n\r\n ,'
                '\r\n ,'{{# if(d.data.loading){ }}'\r\n ,'
                '\r\n ,''\r\n ,'
                '\r\n ,'{{# } }}'\r\n\r\n ,'{{# var left, right; }}'\r\n ,'
                '\r\n ,TPL_HEADER()\r\n ,'
                '\r\n ,'
                '\r\n ,TPL_BODY\r\n ,'
                '\r\n\r\n ,'{{# if(left){ }}'\r\n ,'
                '\r\n ,'
                '\r\n ,TPL_HEADER({fixed: true})\r\n ,'
                '\r\n ,'
                '\r\n ,TPL_BODY\r\n ,'
                '\r\n ,'
                '\r\n ,'{{# }; }}'\r\n\r\n ,'{{# if(right){ }}'\r\n ,'
                '\r\n ,'
                '\r\n ,TPL_HEADER({fixed: 'right'})\r\n ,'
                '\r\n ,'
                '\r\n ,'
                '\r\n ,TPL_BODY\r\n ,'
                '\r\n ,'
                '\r\n ,'{{# }; }}'\r\n ,'
                '\r\n\r\n ,'{{# if(d.data.totalRow){ }}'\r\n ,'
                '\r\n ,''\r\n ,''\r\n , '
                Total
                '\r\n ,'
                '\r\n ,'{{# } }}'\r\n\r\n ,'
                '\r\n ,'
                '\r\n ,'
                '\r\n ].join('');\r\n\r\n var _WIN = $(window);\r\n var _DOC = $(document);\r\n\r\n // constructor\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++table.index;\r\n that.config = $.extend({}, that.config, table.config, options);\r\n that.render();\r\n };\r\n\r\n // 初始默认配置\r\n Class.prototype.config = {\r\n limit: 10, // 每页显示的数量\r\n loading: true, // 请求数据时,是否显示 loading\r\n escape: true, // 是否开启 HTML 编码功能,即转义 html 原文\r\n cellMinWidth: 60, // 所有单元格默认最小宽度\r\n cellMaxWidth: Number.MAX_VALUE, // 所有单元格默认最大宽度\r\n editTrigger: 'click', // 单元格编辑的事件触发方式\r\n defaultToolbar: ['filter', 'exports', 'print'], // 工具栏右侧图标\r\n defaultContextmenu: true, // 显示默认上下文菜单\r\n autoSort: true, // 是否前端自动排序。如果否,则需自主排序(通常为服务端处理好排序)\r\n text: {\r\n none: '无数据'\r\n },\r\n cols: []\r\n };\r\n\r\n // 表格渲染\r\n Class.prototype.render = function(type){\r\n var that = this;\r\n var options = that.config;\r\n\r\n options.elem = $(options.elem);\r\n options.where = options.where || {};\r\n\r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n var id = options.id = 'id' in options ? options.id : (\r\n options.elem.attr('id') || that.index\r\n );\r\n\r\n thisTable.that[id] = that; // 记录当前实例对象\r\n thisTable.config[id] = options; // 记录当前实例配置项\r\n\r\n //请求参数的自定义格式\r\n options.request = $.extend({\r\n pageName: 'page',\r\n limitName: 'limit'\r\n }, options.request)\r\n\r\n // 响应数据的自定义格式\r\n options.response = $.extend({\r\n statusName: 'code', //规定数据状态的字段名称\r\n statusCode: 0, //规定成功的状态码\r\n msgName: 'msg', //规定状态信息的字段名称\r\n dataName: 'data', //规定数据总数的字段名称\r\n totalRowName: 'totalRow', //规定数据统计的字段名称\r\n countName: 'count'\r\n }, options.response);\r\n\r\n //如果 page 传入 laypage 对象\r\n if(options.page !== null && typeof options.page === 'object'){\r\n options.limit = options.page.limit || options.limit;\r\n options.limits = options.page.limits || options.limits;\r\n that.page = options.page.curr = options.page.curr || 1;\r\n delete options.page.elem;\r\n delete options.page.jump;\r\n }\r\n\r\n if(!options.elem[0]) return that;\r\n\r\n // 若元素未设 lay-filter 属性,则取实例 id 值\r\n if(!options.elem.attr('lay-filter')){\r\n options.elem.attr('lay-filter', options.id);\r\n }\r\n\r\n // 仅重载数据\r\n if(type === 'reloadData'){\r\n // 请求数据\r\n return that.pullData(that.page, {\r\n type: 'reloadData'\r\n });\r\n }\r\n\r\n // 初始化索引\r\n options.index = that.index;\r\n that.key = options.id || options.index;\r\n\r\n //初始化一些其他参数\r\n that.setInit();\r\n\r\n //高度铺满:full-差距值\r\n if(options.height && /^full-\\d+$/.test(options.height)){\r\n that.fullHeightGap = options.height.split('-')[1];\r\n options.height = _WIN.height() - that.fullHeightGap;\r\n } else if (options.height && /^#\\w+\\S*-\\d+$/.test(options.height)) {\r\n var parentDiv = options.height.split(\"-\");\r\n that.parentHeightGap = parentDiv.pop();\r\n that.parentDiv = parentDiv.join(\"-\");\r\n options.height = $(that.parentDiv).height() - that.parentHeightGap;\r\n }\r\n\r\n // 开始插入替代元素\r\n var othis = options.elem;\r\n var hasRender = othis.next('.' + ELEM_VIEW);\r\n\r\n // 主容器\r\n var reElem = that.elem = $('
                ');\r\n\r\n // 添加 className\r\n reElem.addClass(function(){\r\n var arr = [\r\n ELEM_VIEW,\r\n ELEM_VIEW +'-'+ that.index,\r\n 'layui-form',\r\n 'layui-border-box'\r\n ];\r\n if(options.className) arr.push(options.className);\r\n return arr.join(' ');\r\n }()).attr({\r\n 'lay-filter': 'LAY-TABLE-FORM-DF-'+ that.index,\r\n 'lay-id': options.id,\r\n 'style': function(){\r\n var arr = [];\r\n if(options.width) arr.push('width:'+ options.width + 'px;');\r\n // if(options.height) arr.push('height:'+ options.height + 'px;');\r\n return arr.join('')\r\n }()\r\n }).html(laytpl(TPL_MAIN, {\r\n open: '{{', // 标签符前缀\r\n close: '}}' // 标签符后缀\r\n }).render({\r\n data: options,\r\n index: that.index //索引\r\n }));\r\n\r\n // 初始化样式\r\n that.renderStyle();\r\n\r\n // 生成替代元素\r\n hasRender[0] && hasRender.remove(); // 如果已经渲染,则 Rerender\r\n othis.after(reElem);\r\n\r\n // 各级容器\r\n that.layTool = reElem.find(ELEM_TOOL);\r\n that.layBox = reElem.find(ELEM_BOX);\r\n that.layHeader = reElem.find(ELEM_HEADER);\r\n that.layMain = reElem.find(ELEM_MAIN);\r\n that.layBody = reElem.find(ELEM_BODY);\r\n that.layFixed = reElem.find(ELEM_FIXED);\r\n that.layFixLeft = reElem.find(ELEM_FIXL);\r\n that.layFixRight = reElem.find(ELEM_FIXR);\r\n that.layTotal = reElem.find(ELEM_TOTAL);\r\n that.layPage = reElem.find(ELEM_PAGE);\r\n\r\n // 初始化头部工具栏\r\n that.renderToolbar();\r\n\r\n // 初始化底部分页栏\r\n that.renderPagebar();\r\n\r\n // 让表格平铺\r\n that.fullSize();\r\n\r\n that.pullData(that.page); // 请求数据\r\n that.events(); // 事件\r\n };\r\n\r\n // 根据列类型,定制化参数\r\n Class.prototype.initOpts = function(item){\r\n var that = this\r\n var options = that.config;\r\n var initWidth = {\r\n checkbox: 50,\r\n radio: 50,\r\n space: 30,\r\n numbers: 60\r\n };\r\n\r\n // 让 type 参数兼容旧版本\r\n if(item.checkbox) item.type = \"checkbox\";\r\n if(item.space) item.type = \"space\";\r\n if(!item.type) item.type = \"normal\";\r\n\r\n if(item.type !== \"normal\"){\r\n item.unresize = true;\r\n item.width = item.width || initWidth[item.type];\r\n }\r\n };\r\n\r\n //初始化一些参数\r\n Class.prototype.setInit = function(type){\r\n var that = this;\r\n var options = that.config;\r\n\r\n options.clientWidth = options.width || function(){ //获取容器宽度\r\n //如果父元素宽度为0(一般为隐藏元素),则继续查找上层元素,直到找到真实宽度为止\r\n var getWidth = function(parent){\r\n var width, isNone;\r\n parent = parent || options.elem.parent()\r\n width = parent.width();\r\n try {\r\n isNone = parent.css('display') === 'none';\r\n } catch(e){}\r\n if(parent[0] && (!width || isNone)) return getWidth(parent.parent());\r\n return width;\r\n };\r\n return getWidth();\r\n }();\r\n\r\n if(type === 'width') return options.clientWidth;\r\n // 初始化高度配置,如果设置了最高高度,以最高高度形式为准\r\n options.height = options.maxHeight || options.height;\r\n\r\n // 初始化 css 参数\r\n if(options.css && options.css.indexOf(ELEM_VIEW) === -1){\r\n var css = options.css.split('}');\r\n layui.each(css, function(index, value){\r\n if(value){\r\n css[index] = '.'+ ELEM_VIEW + '-'+ that.index + ' ' + value;\r\n }\r\n });\r\n options.css = css.join('}');\r\n }\r\n\r\n // 封装对 col 的配置处理\r\n var initChildCols = function (i1, item1, i2, item2) {\r\n //如果列参数为空,则移除\r\n if (!item2) {\r\n item1.splice(i2, 1);\r\n return;\r\n }\r\n\r\n item2.key = [options.index, i1, i2].join('-');\r\n item2.colspan = item2.colspan || 0;\r\n item2.rowspan = item2.rowspan || 0;\r\n\r\n //根据列类型,定制化参数\r\n that.initOpts(item2);\r\n\r\n //设置列的父列索引\r\n //如果是组合列,则捕获对应的子列\r\n var indexChild = i1 + (parseInt(item2.rowspan) || 1);\r\n if (indexChild < options.cols.length) { // 只要不是最后一层都会有子列\r\n item2.colGroup = true;\r\n var childIndex = 0;\r\n layui.each(options.cols[indexChild], function (i22, item22) {\r\n //如果子列已经被标注为{HAS_PARENT},或者子列累计 colspan 数等于父列定义的 colspan,则跳出当前子列循环\r\n if (item22.HAS_PARENT || (childIndex >= 1 && childIndex == (item2.colspan || 1))) return;\r\n\r\n item22.HAS_PARENT = true;\r\n item22.parentKey = [options.index, i1, i2].join('-') // i1 + '-' + i2;\r\n childIndex = childIndex + parseInt(item22.colspan > 1 ? item22.colspan : 1);\r\n initChildCols(indexChild, options.cols[indexChild], i22, item22);\r\n });\r\n } else {\r\n item2.colGroup = false;\r\n }\r\n item2.hide = item2.hide && !item2.colGroup || false; // 初始化中中间节点的hide信息不做处理,否则会出错,如果需要必须将其子节点也都同步成hide\r\n };\r\n\r\n // 初始化列参数\r\n layui.each(options.cols, function(i1, item1){\r\n layui.each(item1, function(i2, item2){\r\n if (i1) {\r\n delete item2.HAS_PARENT; // 去掉临时的计数排除标识,避免有新字段插入的时候重新计算被跳过导致下标出错的问题\r\n } else {\r\n initChildCols(i1, item1, i2, item2); // 只解析顶层节点由递归完成解析\r\n }\r\n });\r\n });\r\n\r\n };\r\n\r\n // 初始化样式\r\n Class.prototype.renderStyle = function() {\r\n var that = this;\r\n var options = that.config;\r\n var index = that.index;\r\n var text = [];\r\n\r\n // 单元格宽度\r\n layui.each(options.cols, function(i1, item1) {\r\n layui.each(item1, function(i2, item2) {\r\n var key = [index, i1, i2].join('-');\r\n var val = item2.width ? ['width: ', item2.width, 'px'].join('') : '';\r\n text.push('.laytable-cell-'+ key +'{'+ val +'}');\r\n });\r\n });\r\n\r\n // 自定义行样式\r\n (function (lineStyle) {\r\n if (!lineStyle) return;\r\n var trClassName = '.layui-table-view-'+ index +' .layui-table-body .layui-table tr';\r\n var rules = lineStyle.split(';');\r\n var cellMaxHeight = 'none';\r\n\r\n // 计算单元格最大高度\r\n layui.each(rules, function(i, rule) {\r\n rule = rule.split(':');\r\n if (rule[0] === 'height') {\r\n var val = parseFloat(rule[1]);\r\n if (!isNaN(val)) cellMaxHeight = (val - 1) + 'px';\r\n return true;\r\n }\r\n });\r\n\r\n // 多行相关样式\r\n layui.each([\r\n '{'+ lineStyle +'}',\r\n '.layui-table-cell{height: auto; max-height: '+ cellMaxHeight +'; white-space: normal; text-overflow: clip;}',\r\n '> td:hover > .layui-table-cell{overflow: auto;}'\r\n ].concat(\r\n device.ie ? [\r\n '.layui-table-edit{height: '+ cellMaxHeight +';}',\r\n 'td[data-edit]:hover:after{height: '+ cellMaxHeight +';}'\r\n ] : []\r\n ), function(i, val) {\r\n val && text.push(trClassName + ' ' + val);\r\n });\r\n })(options.lineStyle);\r\n\r\n // 自定义 css 属性\r\n if (options.css) text.push(options.css);\r\n\r\n // 生成 style\r\n lay.style({\r\n target: that.elem[0],\r\n text: text.join(''),\r\n id: 'DF-table-'+ index\r\n });\r\n };\r\n\r\n // 初始工具栏\r\n Class.prototype.renderToolbar = function(){\r\n var that = this\r\n var options = that.config\r\n\r\n // 添加工具栏左侧模板\r\n var leftDefaultTemp = [\r\n '
                ',\r\n '
                ',\r\n '
                '\r\n ].join('');\r\n var elemToolTemp = that.layTool.find('.layui-table-tool-temp');\r\n\r\n if(options.toolbar === 'default'){\r\n elemToolTemp.html(leftDefaultTemp);\r\n } else if(typeof options.toolbar === 'string'){\r\n var toolbarHtml = $(options.toolbar).html() || '';\r\n toolbarHtml && elemToolTemp.html(\r\n laytpl(toolbarHtml).render(options)\r\n );\r\n }\r\n\r\n // 添加工具栏右侧面板\r\n var layout = {\r\n filter: {\r\n title: '筛选列',\r\n layEvent: 'LAYTABLE_COLS',\r\n icon: 'layui-icon-cols'\r\n },\r\n exports: {\r\n title: '导出',\r\n layEvent: 'LAYTABLE_EXPORT',\r\n icon: 'layui-icon-export'\r\n },\r\n print: {\r\n title: '打印',\r\n layEvent: 'LAYTABLE_PRINT',\r\n icon: 'layui-icon-print'\r\n }\r\n }, iconElem = [];\r\n\r\n if(typeof options.defaultToolbar === 'object'){\r\n layui.each(options.defaultToolbar, function(i, item){\r\n var thisItem = typeof item === 'string' ? layout[item] : item;\r\n if(thisItem){\r\n iconElem.push('
                '\r\n +''\r\n +'
                ');\r\n }\r\n });\r\n }\r\n that.layTool.find('.layui-table-tool-self').html(iconElem.join(''));\r\n };\r\n\r\n // 分页栏\r\n Class.prototype.renderPagebar = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n var layPagebar = that.layPagebar = $('
                ');\r\n\r\n // 开启分页栏自定义模板\r\n if(options.pagebar){\r\n var pagebarHtml = $(options.pagebar).html() || '';\r\n pagebarHtml && layPagebar.append(laytpl(pagebarHtml).render(options));\r\n that.layPage.append(layPagebar);\r\n }\r\n };\r\n\r\n // 同步表头父列的相关值\r\n Class.prototype.setParentCol = function(hide, parentKey){\r\n var that = this;\r\n var options = that.config;\r\n\r\n var parentTh = that.layHeader.find('th[data-key=\"'+ parentKey +'\"]'); // 获取父列元素\r\n var parentColspan = parseInt(parentTh.attr('colspan')) || 0;\r\n\r\n if(parentTh[0]){\r\n var arrParentKey = parentKey.split('-');\r\n var getThisCol = options.cols[arrParentKey[1]][arrParentKey[2]];\r\n\r\n hide ? parentColspan-- : parentColspan++;\r\n\r\n parentTh.attr('colspan', parentColspan);\r\n parentTh[parentColspan ? 'removeClass' : 'addClass'](HIDE); // 如果子列显示,父列必然需要显示\r\n\r\n getThisCol.colspan2 = parentColspan; // 更新实际的 colspan 数\r\n getThisCol.hide = parentColspan < 1; // 同步 hide 参数\r\n\r\n // 递归,继续往上查询是否有父列\r\n var nextParentKey = parentTh.data('parentkey');\r\n nextParentKey && that.setParentCol(hide, nextParentKey);\r\n }\r\n };\r\n\r\n // 多级表头补丁\r\n Class.prototype.setColsPatch = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 同步表头父列的相关值\r\n layui.each(options.cols, function(i1, item1){\r\n layui.each(item1, function(i2, item2){\r\n if(item2.hide){\r\n that.setParentCol(item2.hide, item2.parentKey);\r\n }\r\n });\r\n });\r\n };\r\n\r\n // 设置组合表头的最大宽度\r\n Class.prototype.setGroupWidth = function(th){\r\n var that = this;\r\n var options = that.config;\r\n\r\n if(options.cols.length <= 1) return;\r\n\r\n // 获取表头组合\r\n var groups = that.layHeader.find((\r\n // 根据当前活动的表头 parentkey 属性查找其组合表头\r\n th ? ('th[data-key='+ th.data('parentkey') +']>') : ''\r\n ) + '.' + ELEM_GROUP); // 若无指向当前活动表头,则自下而上获取所有组合表头\r\n\r\n groups.css('width', 0);\r\n layui.each(groups.get().reverse(), function(){\r\n var othis = $(this);\r\n var key = othis.parent().data('key');\r\n var maxWidth = 0;\r\n\r\n that.layHeader.eq(0).find('th[data-parentkey='+ key +']').width(function(i, width){\r\n var oTh = $(this);\r\n if(oTh.hasClass(HIDE)) return;\r\n width > 0 && (maxWidth += width);\r\n });\r\n\r\n // 给组合表头赋值最大宽度\r\n if(maxWidth) othis.css('max-width', maxWidth - 1);\r\n\r\n // 若当前活动的组合表头仍存在上级,则继续向上设置\r\n if(th && othis.parent().data('parentkey')){\r\n that.setGroupWidth(othis.parent());\r\n }\r\n });\r\n groups.css('width', 'auto');\r\n };\r\n\r\n // 动态分配列宽\r\n Class.prototype.setColsWidth = function(){\r\n var that = this;\r\n var options = that.config;\r\n var colNums = 0; // 列个数\r\n var autoColNums = 0; // 自动列宽的列个数\r\n var autoWidth = 0; // 自动列分配的宽度\r\n var countWidth = 0; // 所有列总宽度和\r\n var cntrWidth = that.setInit('width');\r\n\r\n // 统计列个数\r\n that.eachCols(function(i, item){\r\n item.hide || colNums++;\r\n });\r\n\r\n // 减去边框差和滚动条宽\r\n cntrWidth = cntrWidth - function(){\r\n return (options.skin === 'line' || options.skin === 'nob') ? 2 : colNums + 1;\r\n }() - that.getScrollWidth(that.layMain[0]) - 1;\r\n\r\n // 计算自动分配的宽度\r\n var getAutoWidth = function(back){\r\n // 遍历所有列\r\n layui.each(options.cols, function(i1, item1){\r\n layui.each(item1, function(i2, item2){\r\n var width = 0;\r\n var minWidth = item2.minWidth || options.cellMinWidth; // 最小宽度\r\n var maxWidth = item2.maxWidth || options.cellMaxWidth; // 最大宽度\r\n\r\n if(!item2){\r\n item1.splice(i2, 1);\r\n return;\r\n }\r\n\r\n if(item2.colGroup || item2.hide) return;\r\n\r\n if(!back){\r\n width = item2.width || 0;\r\n if(/\\d+%$/.test(width)){ // 列宽为百分比\r\n width = Math.floor((parseFloat(width) / 100) * cntrWidth);\r\n width < minWidth && (width = minWidth);\r\n width > maxWidth && (width = maxWidth);\r\n } else if(!width){ // 列宽未填写\r\n item2.width = width = 0;\r\n autoColNums++;\r\n } else if(item2.type === 'normal'){\r\n // 若 width 小于 minWidth, 则将 width 值自动设为 minWidth 的值\r\n width < minWidth && (item2.width = width = minWidth);\r\n // 若 width 大于 maxWidth, 则将 width 值自动设为 maxWidth 的值\r\n width > maxWidth && (item2.width = width = maxWidth);\r\n }\r\n } else if(autoWidth && autoWidth < minWidth){\r\n autoColNums--;\r\n width = minWidth;\r\n } else if(autoWidth && autoWidth > maxWidth){\r\n autoColNums--;\r\n width = maxWidth;\r\n }\r\n\r\n if(item2.hide) width = 0;\r\n countWidth = countWidth + width;\r\n });\r\n });\r\n\r\n // 如果未填充满,则将剩余宽度平分\r\n (cntrWidth > countWidth && autoColNums > 0) && (\r\n autoWidth = (cntrWidth - countWidth) / autoColNums\r\n );\r\n }\r\n\r\n getAutoWidth();\r\n getAutoWidth(true); // 重新检测分配的宽度是否低于最小列宽\r\n\r\n // 记录自动列数\r\n that.autoColNums = autoColNums = autoColNums > 0 ? autoColNums : 0;\r\n\r\n // 设置列宽\r\n that.eachCols(function(i3, item3){\r\n var minWidth = item3.minWidth || options.cellMinWidth;\r\n var maxWidth = item3.maxWidth || options.cellMaxWidth;\r\n\r\n if(item3.colGroup || item3.hide) return;\r\n\r\n // 给未分配宽的列平均分配宽\r\n if(item3.width === 0){\r\n that.cssRules(item3.key, function(item){\r\n item.style.width = Math.floor(function(){\r\n if(autoWidth < minWidth) return minWidth;\r\n if(autoWidth > maxWidth) return maxWidth;\r\n return autoWidth;\r\n }()) + 'px';\r\n });\r\n }\r\n\r\n // 给设定百分比的列分配列宽\r\n else if(/\\d+%$/.test(item3.width)){\r\n that.cssRules(item3.key, function(item){\r\n var width = Math.floor((parseFloat(item3.width) / 100) * cntrWidth);\r\n width < minWidth && (width = minWidth);\r\n width > maxWidth && (width = maxWidth);\r\n item.style.width = width + 'px';\r\n });\r\n }\r\n\r\n // 给拥有普通 width 值的列分配最新列宽\r\n else {\r\n that.cssRules(item3.key, function(item){\r\n item.style.width = item3.width + 'px';\r\n });\r\n }\r\n });\r\n\r\n // 填补 Math.floor 造成的数差\r\n var patchNums = that.layMain.width() - that.getScrollWidth(that.layMain[0])\r\n - that.layMain.children('table').outerWidth();\r\n\r\n if(that.autoColNums > 0 && patchNums >= -colNums && patchNums <= colNums){\r\n var getEndTh = function(th){\r\n var field;\r\n th = th || that.layHeader.eq(0).find('thead > tr:first-child > th:last-child')\r\n field = th.data('field');\r\n if(!field && th.prev()[0]){\r\n return getEndTh(th.prev())\r\n }\r\n return th;\r\n };\r\n var th = getEndTh();\r\n var key = th.data('key');\r\n\r\n that.cssRules(key, function(item){\r\n var width = item.style.width || th.outerWidth();\r\n item.style.width = (parseFloat(width) + patchNums) + 'px';\r\n\r\n // 二次校验,如果仍然出现横向滚动条(通常是 1px 的误差导致)\r\n if(that.layMain.height() - that.layMain.prop('clientHeight') > 0){\r\n item.style.width = (parseFloat(item.style.width) - 1) + 'px';\r\n }\r\n });\r\n }\r\n\r\n that.setGroupWidth();\r\n\r\n // 如果表格内容为空(无数据 或 请求异常)\r\n if (that.layMain.find('tbody').is(\":empty\")) {\r\n // 将表格宽度设置为跟表头一样的宽度,使之可以出现底部滚动条,以便滚动查看所有字段\r\n var headerWidth = that.layHeader.first().children('table').width()\r\n that.layMain.find('table').width(headerWidth);\r\n } else {\r\n that.layMain.find('table').width('auto');\r\n }\r\n\r\n that.loading(!0);\r\n };\r\n\r\n // 重置表格尺寸/结构\r\n Class.prototype.resize = function(){\r\n var that = this;\r\n\r\n if (!that.layMain) return;\r\n\r\n that.fullSize(); // 让表格铺满\r\n that.setColsWidth(); // 自适应列宽\r\n that.scrollPatch(); // 滚动条补丁\r\n };\r\n\r\n // 表格重载\r\n Class.prototype.reload = function(options, deep, type){\r\n var that = this;\r\n\r\n options = options || {};\r\n delete that.haveInit;\r\n\r\n // 防止数组深度合并\r\n layui.each(options, function(key, item){\r\n if(layui.type(item) === 'array') delete that.config[key];\r\n });\r\n\r\n // 对参数进行深度或浅扩展\r\n that.config = $.extend(deep, {}, that.config, options);\r\n if (type !== 'reloadData') {\r\n layui.each(that.config.cols, function (i1, item1) {\r\n layui.each(item1, function (i2, item2) {\r\n delete item2.colspan2;\r\n })\r\n })\r\n delete that.config.HAS_SET_COLS_PATCH;\r\n }\r\n // 执行渲染\r\n that.render(type);\r\n };\r\n\r\n // 异常提示\r\n Class.prototype.errorView = function(html){\r\n var that = this\r\n ,elemNone = that.layMain.find('.'+ NONE)\r\n ,layNone = $('
                '+ (html || 'Error') +'
                ');\r\n\r\n if(elemNone[0]){\r\n that.layNone.remove();\r\n elemNone.remove();\r\n }\r\n\r\n that.layFixed.addClass(HIDE);\r\n that.layMain.find('tbody').html('');\r\n\r\n that.layMain.append(that.layNone = layNone);\r\n\r\n // 异常情况下对 page 和 total 的内容处理\r\n that.layTotal.addClass(HIDE_V);\r\n that.layPage.find(ELEM_PAGE_VIEW).addClass(HIDE_V);\r\n\r\n table.cache[that.key] = []; //格式化缓存数据\r\n\r\n that.syncCheckAll();\r\n that.renderForm();\r\n that.setColsWidth();\r\n };\r\n\r\n // 初始页码\r\n Class.prototype.page = 1;\r\n\r\n // 获得数据\r\n Class.prototype.pullData = function(curr, opts){\r\n var that = this;\r\n var options = that.config;\r\n // 同步表头父列的相关值\r\n options.HAS_SET_COLS_PATCH || that.setColsPatch();\r\n options.HAS_SET_COLS_PATCH = true;\r\n var request = options.request;\r\n var response = options.response;\r\n var res;\r\n var sort = function(){\r\n if(typeof options.initSort === 'object'){\r\n that.sort({\r\n field: options.initSort.field,\r\n type: options.initSort.type,\r\n reloadType: opts.type\r\n });\r\n }\r\n };\r\n var done = function(res, origin){\r\n that.setColsWidth();\r\n typeof options.done === 'function' && options.done(\r\n res, curr, res[response.countName], origin\r\n );\r\n };\r\n\r\n opts = opts || {};\r\n\r\n // 数据拉取前的回调\r\n typeof options.before === 'function' && options.before(\r\n options\r\n );\r\n that.startTime = new Date().getTime(); // 渲染开始时间\r\n\r\n if (opts.renderData) { // 将 cache 信息重新渲染\r\n res = {};\r\n res[response.dataName] = table.cache[that.key];\r\n res[response.countName] = options.url ? (layui.type(options.page) === 'object' ? options.page.count : res[response.dataName].length) : options.data.length;\r\n\r\n // 记录合计行数据\r\n if(typeof options.totalRow === 'object'){\r\n res[response.totalRowName] = $.extend({}, that.totalRow);\r\n }\r\n\r\n that.renderData({\r\n res: res,\r\n curr: curr,\r\n count: res[response.countName],\r\n type: opts.type,\r\n sort: true\r\n }), done(res, 'renderData');\r\n } else if(options.url){ // Ajax请求\r\n var params = {};\r\n // 当 page 开启,默认自动传递 page、limit 参数\r\n if(options.page){\r\n params[request.pageName] = curr;\r\n params[request.limitName] = options.limit;\r\n }\r\n\r\n // 参数\r\n var data = $.extend(params, options.where);\r\n if(options.contentType && options.contentType.indexOf(\"application/json\") == 0){ // 提交 json 格式\r\n data = JSON.stringify(data);\r\n }\r\n\r\n that.loading();\r\n\r\n $.ajax({\r\n type: options.method || 'get',\r\n url: options.url,\r\n contentType: options.contentType,\r\n data: data,\r\n dataType: options.dataType || 'json',\r\n jsonpCallback: options.jsonpCallback,\r\n headers: options.headers || {},\r\n complete: function(xhr,ts){\r\n typeof options.complete === 'function' && options.complete(xhr, ts);\r\n },\r\n success: function(res){\r\n // 若有数据解析的回调,则获得其返回的数据\r\n if(typeof options.parseData === 'function'){\r\n res = options.parseData(res) || res;\r\n }\r\n // 检查数据格式是否符合规范\r\n if(res[response.statusName] != response.statusCode){\r\n that.errorView(\r\n res[response.msgName] ||\r\n ('返回的数据不符合规范,正确的成功状态码应为:\"'+ response.statusName +'\": '+ response.statusCode)\r\n );\r\n } else {\r\n that.totalRow = res[response.totalRowName];\r\n that.renderData({\r\n res: res,\r\n curr: curr,\r\n count: res[response.countName],\r\n type: opts.type\r\n }), sort();\r\n\r\n // 耗时(接口请求+视图渲染)\r\n options.time = (new Date().getTime() - that.startTime) + ' ms';\r\n }\r\n done(res);\r\n },\r\n error: function(e, msg){\r\n that.errorView('请求异常,错误提示:'+ msg);\r\n typeof options.error === 'function' && options.error(e, msg);\r\n }\r\n });\r\n } else if(layui.type(options.data) === 'array'){ //已知数据\r\n res = {};\r\n var startLimit = curr*options.limit - options.limit;\r\n var newData = options.data.concat();\r\n\r\n res[response.dataName] = options.page\r\n ? newData.splice(startLimit, options.limit)\r\n : newData;\r\n res[response.countName] = options.data.length;\r\n\r\n // 记录合计行数据\r\n if(typeof options.totalRow === 'object'){\r\n res[response.totalRowName] = $.extend({}, options.totalRow);\r\n }\r\n that.totalRow = res[response.totalRowName];\r\n\r\n that.renderData({\r\n res: res,\r\n curr: curr,\r\n count: res[response.countName],\r\n type: opts.type\r\n }), sort();\r\n\r\n done(res);\r\n }\r\n };\r\n\r\n // 遍历表头\r\n Class.prototype.eachCols = function(callback){\r\n var that = this;\r\n table.eachCols(null, callback, that.config.cols);\r\n return that;\r\n };\r\n\r\n // 获取表头参数项\r\n Class.prototype.col = function(key){\r\n try {\r\n key = key.split('-');\r\n return this.config.cols[key[1]][key[2]] || {};\r\n } catch(e){\r\n hint.error(e);\r\n return {};\r\n }\r\n };\r\n\r\n Class.prototype.getTrHtml = function(data, sort, curr, trsObj) {\r\n var that = this;\r\n var options = that.config;\r\n var trs = trsObj && trsObj.trs || [];\r\n var trs_fixed = trsObj && trsObj.trs_fixed || [];\r\n var trs_fixed_r = trsObj && trsObj.trs_fixed_r || [];\r\n curr = curr || 1\r\n\r\n layui.each(data, function(i1, item1){\r\n var tds = [];\r\n var tds_fixed = [];\r\n var tds_fixed_r = [];\r\n var numbers = i1 + options.limit*(curr - 1) + 1; // 序号\r\n\r\n // 数组值是否为 object,如果不是,则自动转为 object\r\n if(typeof item1 !== 'object'){\r\n data[i1] = item1 = {LAY_KEY: item1};\r\n try {\r\n table.cache[that.key][i1] = item1;\r\n } catch(e) {}\r\n }\r\n\r\n //若数据项为空数组,则不往下执行(因为删除数据时,会将原有数据设置为 [])\r\n if(layui.type(item1) === 'array' && item1.length === 0) return;\r\n\r\n // 加入序号保留字段\r\n item1[table.config.numbersName] = numbers;\r\n\r\n // 记录下标索引,用于恢复排序\r\n if(!sort) item1[table.config.indexName] = i1;\r\n\r\n // 遍历表头\r\n that.eachCols(function(i3, item3){\r\n var field = item3.field || i3;\r\n var key = item3.key;\r\n var content = item1[field];\r\n\r\n if(content === undefined || content === null) content = '';\r\n if(item3.colGroup) return;\r\n\r\n // td 内容\r\n var td = [''\r\n ,'
                '\r\n + function(){\r\n var tplData = $.extend(true, {\r\n LAY_COL: item3\r\n }, item1);\r\n var checkName = table.config.checkName;\r\n var disabledName = table.config.disabledName;\r\n\r\n // 渲染不同风格的列\r\n switch(item3.type){\r\n case 'checkbox': // 复选\r\n return '';\r\n //break;\r\n case 'radio': // 单选\r\n return '';\r\n //break;\r\n case 'numbers':\r\n return numbers;\r\n //break;\r\n }\r\n\r\n //解析工具列模板\r\n if(item3.toolbar){\r\n return laytpl($(item3.toolbar).html()||'').render(tplData);\r\n }\r\n return parseTempData.call(that, {\r\n item3: item3\r\n ,content: content\r\n ,tplData: tplData\r\n });\r\n }()\r\n ,'
                '].join('');\r\n\r\n tds.push(td);\r\n if(item3.fixed && item3.fixed !== 'right') tds_fixed.push(td);\r\n if(item3.fixed === 'right') tds_fixed_r.push(td);\r\n });\r\n\r\n // 添加 tr 属性\r\n var trAttr = function(){\r\n var arr = ['data-index=\"'+ i1 +'\"'];\r\n if(item1[table.config.checkName]) arr.push('class=\"'+ ELEM_CHECKED +'\"');\r\n return arr.join(' ');\r\n }();\r\n\r\n trs.push(''+ tds.join('') + '');\r\n trs_fixed.push(''+ tds_fixed.join('') + '');\r\n trs_fixed_r.push(''+ tds_fixed_r.join('') + '');\r\n });\r\n\r\n return {\r\n trs: trs,\r\n trs_fixed: trs_fixed,\r\n trs_fixed_r: trs_fixed_r\r\n }\r\n }\r\n\r\n // 返回行节点代码\r\n table.getTrHtml = function (id, data) {\r\n var that = getThisTable(id);\r\n return that.getTrHtml(data, null, that.page);\r\n }\r\n\r\n // 数据渲染\r\n Class.prototype.renderData = function(opts){\r\n var that = this;\r\n var options = that.config;\r\n\r\n var res = opts.res;\r\n var curr = opts.curr;\r\n var count = that.count = opts.count;\r\n var sort = opts.sort;\r\n\r\n var data = res[options.response.dataName] || []; //列表数据\r\n var totalRowData = res[options.response.totalRowName]; //合计行数据\r\n var trs = [];\r\n var trs_fixed = [];\r\n var trs_fixed_r = [];\r\n\r\n // 渲染视图\r\n var render = function(){ // 后续性能提升的重点\r\n if(!sort && that.sortKey){\r\n return that.sort({\r\n field: that.sortKey.field,\r\n type: that.sortKey.sort,\r\n pull: true,\r\n reloadType: opts.type\r\n });\r\n }\r\n that.getTrHtml(data, sort, curr, {\r\n trs: trs,\r\n trs_fixed: trs_fixed,\r\n trs_fixed_r: trs_fixed_r\r\n });\r\n\r\n // 容器的滚动条位置\r\n if(!(options.scrollPos === 'fixed' && opts.type === 'reloadData')){\r\n that.layBody.scrollTop(0);\r\n }\r\n if(options.scrollPos === 'reset'){\r\n that.layBody.scrollLeft(0);\r\n }\r\n\r\n that.layMain.find('.'+ NONE).remove();\r\n that.layMain.find('tbody').html(trs.join(''));\r\n that.layFixLeft.find('tbody').html(trs_fixed.join(''));\r\n that.layFixRight.find('tbody').html(trs_fixed_r.join(''));\r\n\r\n // 渲染表单\r\n that.syncCheckAll();\r\n that.renderForm();\r\n\r\n // 因为 page 参数有可能发生变化 先重新铺满\r\n that.fullSize();\r\n\r\n // 滚动条补丁\r\n that.haveInit ? that.scrollPatch() : setTimeout(function(){\r\n that.scrollPatch();\r\n }, 50);\r\n that.haveInit = true;\r\n\r\n layer.close(that.tipsIndex);\r\n };\r\n\r\n table.cache[that.key] = data; //记录数据\r\n\r\n //显示隐藏合计栏\r\n that.layTotal[data.length == 0 ? 'addClass' : 'removeClass'](HIDE_V);\r\n\r\n //显示隐藏分页栏\r\n that.layPage[(options.page || options.pagebar) ? 'removeClass' : 'addClass'](HIDE);\r\n that.layPage.find(ELEM_PAGE_VIEW)[\r\n (!options.page || count == 0 || (data.length === 0 && curr == 1))\r\n ? 'addClass'\r\n : 'removeClass'\r\n ](HIDE_V);\r\n\r\n //如果无数据\r\n if(data.length === 0){\r\n return that.errorView(options.text.none);\r\n } else {\r\n that.layFixLeft.removeClass(HIDE);\r\n }\r\n\r\n //如果执行初始排序\r\n if(sort){\r\n return render();\r\n }\r\n\r\n //正常初始化数据渲染\r\n render(); //渲染数据\r\n that.renderTotal(data, totalRowData); //数据合计\r\n that.layTotal && that.layTotal.removeClass(HIDE);\r\n\r\n //同步分页状态\r\n if(options.page){\r\n options.page = $.extend({\r\n elem: 'layui-table-page' + options.index,\r\n count: count,\r\n limit: options.limit,\r\n limits: options.limits || [10,20,30,40,50,60,70,80,90],\r\n groups: 3,\r\n layout: ['prev', 'page', 'next', 'skip', 'count', 'limit'],\r\n prev: '',\r\n next: '',\r\n jump: function(obj, first){\r\n if(!first){\r\n //分页本身并非需要做以下更新,下面参数的同步,主要是因为其它处理统一用到了它们\r\n //而并非用的是 options.page 中的参数(以确保分页未开启的情况仍能正常使用)\r\n that.page = obj.curr; //更新页码\r\n options.limit = obj.limit; //更新每页条数\r\n\r\n that.pullData(obj.curr);\r\n }\r\n }\r\n }, options.page);\r\n options.page.count = count; //更新总条数\r\n laypage.render(options.page);\r\n }\r\n };\r\n\r\n // 重新渲染数据\r\n table.renderData = function (id) {\r\n var that = getThisTable(id);\r\n if (!that) {\r\n return;\r\n }\r\n\r\n that.pullData(that.page, {\r\n renderData: true,\r\n type: 'reloadData'\r\n });\r\n }\r\n\r\n // 数据合计行\r\n Class.prototype.renderTotal = function(data, totalRowData){\r\n var that = this;\r\n var options = that.config;\r\n var totalNums = {};\r\n\r\n if(!options.totalRow) return;\r\n\r\n layui.each(data, function(i1, item1){\r\n // 若数据项为空数组,则不往下执行(因为删除数据时,会将原有数据设置为 [])\r\n if(layui.type(item1) === 'array' && item1.length === 0) return;\r\n\r\n that.eachCols(function(i3, item3){\r\n var field = item3.field || i3\r\n ,content = item1[field];\r\n\r\n if(item3.totalRow){\r\n totalNums[field] = (totalNums[field] || 0) + (parseFloat(content) || 0);\r\n }\r\n });\r\n });\r\n\r\n that.dataTotal = []; // 记录合计行结果\r\n\r\n var tds = [];\r\n that.eachCols(function(i3, item3){\r\n var field = item3.field || i3;\r\n\r\n // 合计数据的特定字段\r\n var TOTAL_NUMS = totalRowData && totalRowData[item3.field];\r\n\r\n // 合计数据的小数点位数处理\r\n var decimals = 'totalRowDecimals' in item3 ? item3.totalRowDecimals : 2;\r\n var thisTotalNum = totalNums[field]\r\n ? parseFloat(totalNums[field] || 0).toFixed(decimals)\r\n : '';\r\n\r\n // td 显示内容\r\n var content = function(){\r\n var text = item3.totalRowText || '';\r\n var tplData = {\r\n LAY_COL: item3\r\n };\r\n\r\n tplData[field] = thisTotalNum;\r\n\r\n // 获取自动计算的合并内容\r\n var getContent = item3.totalRow ? (parseTempData.call(that, {\r\n item3: item3,\r\n content: thisTotalNum,\r\n tplData: tplData\r\n }) || text) : text;\r\n\r\n // 如果直接传入了合计行数据,则不输出自动计算的结果\r\n return TOTAL_NUMS || getContent;\r\n }();\r\n\r\n // 合计原始结果\r\n var total = TOTAL_NUMS || thisTotalNum || '';\r\n item3.field && that.dataTotal.push({\r\n field: item3.field,\r\n total: $('
                '+ content +'
                ').text()\r\n });\r\n\r\n // td 容器\r\n var td = ['',\r\n '
                ' + function(){\r\n var totalRow = item3.totalRow || options.totalRow;\r\n\r\n // 如果 totalRow 参数为字符类型,则解析为自定义模版\r\n if(typeof totalRow === 'string'){\r\n return laytpl(totalRow).render($.extend({\r\n TOTAL_NUMS: TOTAL_NUMS || totalNums[field],\r\n TOTAL_ROW: totalRowData || {},\r\n LAY_COL: item3\r\n }, item3));\r\n }\r\n return content;\r\n }(),\r\n '
                '].join('');\r\n\r\n tds.push(td);\r\n });\r\n\r\n var patchElem = that.layTotal.find('.layui-table-patch'); // 可能存在滚动条补丁\r\n that.layTotal.find('tbody').html('' + tds.join('') + (patchElem.length ? patchElem.get(0).outerHTML : '') + '');\r\n };\r\n\r\n //找到对应的列元素\r\n Class.prototype.getColElem = function(parent, key){\r\n var that = this;\r\n //var options = that.config;\r\n return parent.eq(0).find('.laytable-cell-'+ key + ':eq(0)');\r\n };\r\n\r\n // 渲染表单\r\n Class.prototype.renderForm = function(type){\r\n var that = this;\r\n var options = that.config;\r\n var filter = that.elem.attr('lay-filter');\r\n form.render(type, filter);\r\n };\r\n\r\n // 同步全选按钮状态\r\n Class.prototype.syncCheckAll = function(){\r\n var that = this;\r\n var options = that.config;\r\n var checkAllElem = that.layHeader.find('input[name=\"layTableCheckbox\"]');\r\n var syncColsCheck = function(checked){\r\n that.eachCols(function(i, item){\r\n if(item.type === 'checkbox'){\r\n item[options.checkName] = checked;\r\n }\r\n });\r\n return checked;\r\n };\r\n var checkStatus = table.checkStatus(that.key);\r\n\r\n if(!checkAllElem[0]) return;\r\n\r\n // 选中状态\r\n syncColsCheck(checkStatus.isAll);\r\n checkAllElem.prop({\r\n checked: checkStatus.isAll,\r\n indeterminate: !checkStatus.isAll && checkStatus.data.length // 半选\r\n });\r\n form.render(checkAllElem);\r\n };\r\n\r\n // 标记当前活动行背景色\r\n Class.prototype.setRowActive = function(index, className, removeClass){\r\n var that = this;\r\n var options = that.config;\r\n var tr = that.layBody.find('tr[data-index=\"'+ index +'\"]');\r\n className = className || 'layui-table-click';\r\n\r\n if(removeClass) return tr.removeClass(className);\r\n\r\n tr.addClass(className);\r\n tr.siblings('tr').removeClass(className);\r\n };\r\n\r\n // 设置行选中状态\r\n Class.prototype.setRowChecked = function(opts){\r\n var that = this;\r\n var options = that.config;\r\n var tr = that.layBody.find('tr'+ (\r\n opts.index === 'all' ? '' : '[data-index=\"'+ opts.index +'\"]'\r\n ));\r\n\r\n // 默认属性\r\n opts = $.extend({\r\n type: 'checkbox' // 选中方式\r\n }, opts);\r\n\r\n // 同步数据选中属性值\r\n var thisData = table.cache[that.key];\r\n var existChecked = 'checked' in opts;\r\n var getChecked = function(value){\r\n // 若为单选框,则单向选中;若为复选框,则切换选中。\r\n return opts.type === 'radio' ? true : (existChecked ? opts.checked : !value)\r\n };\r\n\r\n // 设置数据选中属性\r\n layui.each(thisData, function(i, item){\r\n if(layui.type(item) === 'array' || item[options.disabledName]) return; // 空项\r\n if(Number(opts.index) === i || opts.index === 'all'){\r\n var checked = item[options.checkName] = getChecked(item[options.checkName]);\r\n tr[checked ? 'addClass' : 'removeClass'](ELEM_CHECKED); // 标记当前选中行背景色\r\n // 若为 radio 类型,则取消其他行选中背景色\r\n if(opts.type === 'radio'){\r\n tr.siblings().removeClass(ELEM_CHECKED);\r\n }\r\n } else if(opts.type === 'radio') {\r\n delete item[options.checkName];\r\n }\r\n });\r\n\r\n // 若存在复选框或单选框,则标注选中状态样式\r\n var checkedElem = tr.find('input[lay-type=\"'+ ({\r\n radio: 'layTableRadio',\r\n checkbox: 'layTableCheckbox'\r\n }[opts.type] || 'checkbox') +'\"]:not(:disabled)');\r\n var checkedSameElem = checkedElem.last();\r\n var fixRElem = checkedSameElem.closest(ELEM_FIXR);\r\n\r\n ( opts.type === 'radio' && fixRElem.hasClass(HIDE)\r\n ? checkedElem.first()\r\n : checkedElem ).prop('checked', getChecked(checkedSameElem.prop('checked')));\r\n\r\n that.syncCheckAll();\r\n that.renderForm(opts.type);\r\n };\r\n\r\n // 数据排序\r\n Class.prototype.sort = function(opts){ // field, type, pull, fromEvent\r\n var that = this;\r\n var field;\r\n var res = {};\r\n var options = that.config;\r\n var filter = options.elem.attr('lay-filter');\r\n var data = table.cache[that.key], thisData;\r\n\r\n opts = opts || {};\r\n\r\n // 字段匹配\r\n if(typeof opts.field === 'string'){\r\n field = opts.field;\r\n that.layHeader.find('th').each(function(i, item){\r\n var othis = $(this);\r\n var _field = othis.data('field');\r\n if(_field === opts.field){\r\n opts.field = othis;\r\n field = _field;\r\n return false;\r\n }\r\n });\r\n }\r\n\r\n try {\r\n field = field || opts.field.data('field');\r\n var key = opts.field.data('key');\r\n\r\n // 如果欲执行的排序已在状态中,则不执行渲染\r\n if(that.sortKey && !opts.pull){\r\n if(field === that.sortKey.field && opts.type === that.sortKey.sort){\r\n return;\r\n }\r\n }\r\n\r\n var elemSort = that.layHeader.find('th .laytable-cell-'+ key).find(ELEM_SORT);\r\n that.layHeader.find('th').find(ELEM_SORT).removeAttr('lay-sort'); // 清除其它标题排序状态\r\n elemSort.attr('lay-sort', opts.type || null);\r\n that.layFixed.find('th')\r\n } catch(e){\r\n hint.error('Table modules: sort field \\''+ field +'\\' not matched');\r\n }\r\n\r\n // 记录排序索引和类型\r\n that.sortKey = {\r\n field: field,\r\n sort: opts.type\r\n };\r\n\r\n // 默认为前端自动排序。如果否,则需自主排序(通常为服务端处理好排序)\r\n if(options.autoSort){\r\n if(opts.type === 'asc'){ //升序\r\n thisData = layui.sort(data, field, null, true);\r\n } else if(opts.type === 'desc'){ //降序\r\n thisData = layui.sort(data, field, true, true);\r\n } else { // 清除排序\r\n thisData = layui.sort(data, table.config.indexName, null, true);\r\n delete that.sortKey;\r\n delete options.initSort;\r\n }\r\n }\r\n\r\n res[options.response.dataName] = thisData || data;\r\n\r\n // 重载数据\r\n that.renderData({\r\n res: res,\r\n curr: that.page,\r\n count: that.count,\r\n sort: true,\r\n type: opts.reloadType\r\n });\r\n\r\n // 排序是否来自于点击表头事件触发\r\n if(opts.fromEvent){\r\n options.initSort = {\r\n field: field,\r\n type: opts.type\r\n };\r\n layui.event.call(opts.field, MOD_NAME, 'sort('+ filter +')', $.extend({\r\n config: options\r\n }, options.initSort));\r\n }\r\n };\r\n\r\n // 请求 loading\r\n Class.prototype.loading = function(hide){\r\n var that = this;\r\n var options = that.config;\r\n if(options.loading){\r\n if(hide){\r\n that.layInit && that.layInit.remove();\r\n delete that.layInit;\r\n that.layBox.find(ELEM_INIT).remove();\r\n } else {\r\n that.layInit = $(['
                ',\r\n '',\r\n '
                '].join(''));\r\n that.layBox.append(that.layInit);\r\n }\r\n }\r\n };\r\n\r\n // 获取对应单元格的 cssRules\r\n Class.prototype.cssRules = function(key, callback){\r\n var that = this;\r\n var style = that.elem.children('style')[0];\r\n\r\n lay.getStyleRules(style, function(item){\r\n if (item.selectorText === ('.laytable-cell-'+ key)) {\r\n return callback(item), true;\r\n }\r\n });\r\n };\r\n\r\n // 让表格铺满\r\n Class.prototype.fullSize = function(){\r\n var that = this;\r\n var options = that.config;\r\n var height = options.height;\r\n var bodyHeight;\r\n\r\n if(that.fullHeightGap){\r\n height = _WIN.height() - that.fullHeightGap;\r\n if(height < 135) height = 135;\r\n // that.elem.css('height', height);\r\n } else if (that.parentDiv && that.parentHeightGap) {\r\n height = $(that.parentDiv).height() - that.parentHeightGap;\r\n if (height < 135) height = 135;\r\n // that.elem.css(\"height\", height);\r\n }\r\n\r\n // 如果多级表头,则填补表头高度\r\n if(options.cols.length > 1){\r\n // 补全高度\r\n var th = that.layFixed.find(ELEM_HEADER).find('th');\r\n // 固定列表头同步跟本体 th 一致高度\r\n var headerMain = that.layHeader.first();\r\n layui.each(th, function (thIndex, thElem) {\r\n thElem = $(thElem);\r\n thElem.height(headerMain.find('th[data-key=\"' + thElem.attr('data-key') + '\"]').height() + 'px');\r\n })\r\n }\r\n\r\n if(!height) return;\r\n\r\n // 减去列头区域的高度 --- 此处的数字常量是为了防止容器处在隐藏区域无法获得高度的问题,只对默认尺寸表格做支持\r\n bodyHeight = parseFloat(height) - (that.layHeader.outerHeight() || 39)\r\n\r\n // 减去工具栏的高度\r\n if(options.toolbar){\r\n bodyHeight -= (that.layTool.outerHeight() || 51);\r\n }\r\n\r\n // 减去统计栏的高度\r\n if(options.totalRow){\r\n bodyHeight -= (that.layTotal.outerHeight() || 40);\r\n }\r\n\r\n // 减去分页栏的高度\r\n if(options.page || options.pagebar){\r\n bodyHeight -= (that.layPage.outerHeight() || 43);\r\n }\r\n\r\n if (options.maxHeight) {\r\n layui.each({elem: height, layMain: bodyHeight}, function (elemName, elemHeight) {\r\n that[elemName].css({\r\n height: 'auto',\r\n maxHeight: elemHeight + 'px'\r\n });\r\n });\r\n } else {\r\n that.layMain.outerHeight(bodyHeight);\r\n }\r\n };\r\n\r\n //获取滚动条宽度\r\n Class.prototype.getScrollWidth = function(elem){\r\n var width;\r\n if(elem){\r\n width = elem.offsetWidth - elem.clientWidth;\r\n } else {\r\n elem = document.createElement('div');\r\n elem.style.width = '100px';\r\n elem.style.height = '100px';\r\n elem.style.overflowY = 'scroll';\r\n\r\n document.body.appendChild(elem);\r\n width = elem.offsetWidth - elem.clientWidth;\r\n document.body.removeChild(elem);\r\n }\r\n return width;\r\n };\r\n\r\n // 滚动条补丁\r\n Class.prototype.scrollPatch = function(){\r\n var that = this;\r\n var layMainTable = that.layMain.children('table');\r\n var scrollWidth = that.layMain.width() - that.layMain.prop('clientWidth'); // 纵向滚动条宽度\r\n var scrollHeight = that.layMain.height() - that.layMain.prop('clientHeight'); // 横向滚动条高度\r\n var getScrollWidth = that.getScrollWidth(that.layMain[0]); // 获取主容器滚动条宽度,如果有的话\r\n var outWidth = layMainTable.outerWidth() - that.layMain.width(); // 表格内容器的超出宽度\r\n\r\n // 添加补丁\r\n var addPatch = function(elem){\r\n if(scrollWidth && scrollHeight){\r\n elem = elem.eq(0);\r\n if(!elem.find('.layui-table-patch')[0]){\r\n var patchElem = $('
                '); // 补丁元素\r\n patchElem.find('div').css({\r\n width: scrollWidth\r\n });\r\n elem.find('tr').append(patchElem);\r\n }\r\n } else {\r\n elem.find('.layui-table-patch').remove();\r\n }\r\n };\r\n\r\n addPatch(that.layHeader);\r\n addPatch(that.layTotal);\r\n\r\n // 固定列区域高度\r\n var mainHeight = that.layMain.height();\r\n var fixHeight = mainHeight - scrollHeight;\r\n\r\n that.layFixed.find(ELEM_BODY).css(\r\n 'height',\r\n layMainTable.height() >= fixHeight ? fixHeight : 'auto'\r\n ).scrollTop(that.layMain.scrollTop()); // 固定列滚动条高度\r\n\r\n // 表格宽度小于容器宽度时,隐藏固定列\r\n that.layFixRight[\r\n (table.cache[that.key] && table.cache[that.key].length) && outWidth > 0\r\n ? 'removeClass'\r\n : 'addClass'\r\n ](HIDE);\r\n\r\n // 操作栏\r\n that.layFixRight.css('right', scrollWidth - 1);\r\n };\r\n\r\n // 事件处理\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n var filter = options.elem.attr('lay-filter');\r\n var th = that.layHeader.find('th');\r\n var ELEM_CELL = '.layui-table-cell';\r\n\r\n var _BODY = $('body');\r\n var dict = {};\r\n\r\n // 头部工具栏操作事件\r\n that.layTool.on('click', '*[lay-event]', function(e){\r\n var othis = $(this);\r\n var events = othis.attr('lay-event');\r\n var data = table.cache[options.id];\r\n var openPanel = function(sets){\r\n var list = $(sets.list);\r\n var panel = $('
                  ');\r\n\r\n panel.html(list);\r\n\r\n // 限制最大高度\r\n if(options.height){\r\n panel.css('max-height', options.height - (that.layTool.outerHeight() || 50));\r\n }\r\n\r\n // 插入元素\r\n othis.find('.' + ELEM_TOOL_PANEL)[0] || othis.append(panel);\r\n that.renderForm();\r\n\r\n panel.on('click', function(e){\r\n layui.stope(e);\r\n });\r\n\r\n sets.done && sets.done(panel, list)\r\n };\r\n\r\n layui.stope(e);\r\n _DOC.trigger('table.tool.panel.remove');\r\n layer.close(that.tipsIndex);\r\n\r\n switch(events){\r\n case 'LAYTABLE_COLS': // 筛选列\r\n openPanel({\r\n list: function(){\r\n var lis = [];\r\n that.eachCols(function(i, item){\r\n if(item.field && item.type == 'normal'){\r\n lis.push('
                • ' + (item.fieldTitle || item.title || item.field) + '
                • ').text()) +'\" lay-filter=\"LAY_TABLE_TOOL_COLS\">');\r\n }\r\n });\r\n return lis.join('');\r\n }()\r\n ,done: function(){\r\n form.on('checkbox(LAY_TABLE_TOOL_COLS)', function(obj){\r\n var othis = $(obj.elem);\r\n var checked = this.checked;\r\n var key = othis.data('key');\r\n var col = that.col(key);\r\n var hide = col.hide;\r\n var parentKey = othis.data('parentkey');\r\n\r\n if(!col.key) return;\r\n\r\n // 同步勾选列的 hide 值和隐藏样式\r\n col.hide = !checked;\r\n that.elem.find('*[data-key=\"'+ key +'\"]')[\r\n checked ? 'removeClass' : 'addClass'\r\n ](HIDE);\r\n\r\n // 根据列的显示隐藏,同步多级表头的父级相关属性值\r\n if(hide != col.hide){\r\n that.setParentCol(!checked, parentKey);\r\n }\r\n\r\n // 重新适配尺寸\r\n that.resize();\r\n\r\n // 列筛选(显示或隐藏)后的事件\r\n layui.event.call(this, MOD_NAME, 'colToggled('+ filter +')', {\r\n col: col,\r\n config: options\r\n });\r\n });\r\n }\r\n });\r\n break;\r\n case 'LAYTABLE_EXPORT': // 导出\r\n if (!data.length) return layer.tips('当前表格无数据', this, {tips: 3});\r\n if(device.ie){\r\n layer.tips('导出功能不支持 IE,请用 Chrome 等高级浏览器导出', this, {\r\n tips: 3\r\n });\r\n } else {\r\n openPanel({\r\n list: function(){\r\n return [\r\n '
                • 导出 csv 格式文件
                • ',\r\n '
                • 导出 xls 格式文件
                • '\r\n ].join('')\r\n }(),\r\n done: function(panel, list){\r\n list.on('click', function(){\r\n var type = $(this).data('type')\r\n table.exportFile.call(that, options.id, null, type);\r\n });\r\n }\r\n });\r\n }\r\n break;\r\n case 'LAYTABLE_PRINT': // 打印\r\n if (!data.length) return layer.tips('当前表格无数据', this, {tips: 3});\r\n var printWin = window.open('about:blank', '_blank');\r\n var style = [''].join('')\r\n var html = $(that.layHeader.html()); // 输出表头\r\n\r\n html.append(that.layMain.find('table').html()); // 输出表体\r\n html.append(that.layTotal.find('table').html()) // 输出合计行\r\n\r\n html.find('th.layui-table-patch').remove(); // 移除补丁\r\n // 移除表头特殊列\r\n html.find('thead>tr>th.'+ ELEM_COL_SPECIAL).filter(function(i, thElem){\r\n return !$(thElem).children('.'+ ELEM_GROUP).length; // 父级表头除外\r\n }).remove();\r\n html.find('tbody>tr>td.'+ ELEM_COL_SPECIAL).remove(); // 移除表体特殊列\r\n\r\n printWin.document.write(style + html.prop('outerHTML'));\r\n printWin.document.close();\r\n\r\n if(layui.device('edg').edg){\r\n printWin.onafterprint = printWin.close;\r\n printWin.print();\r\n }else{\r\n printWin.print();\r\n printWin.close();\r\n }\r\n break;\r\n }\r\n\r\n layui.event.call(this, MOD_NAME, 'toolbar('+ filter +')', $.extend({\r\n event: events,\r\n config: options\r\n },{}));\r\n });\r\n\r\n // 表头自定义元素事件\r\n that.layHeader.on('click', '*[lay-event]', function(e){\r\n var othis = $(this);\r\n var events = othis.attr('lay-event');\r\n var th = othis.closest('th');\r\n var key = th.data('key');\r\n var col = that.col(key);\r\n\r\n layui.event.call(this, MOD_NAME, 'colTool('+ filter +')', $.extend({\r\n event: events,\r\n config: options,\r\n col: col\r\n },{}));\r\n });\r\n\r\n // 分页栏操作事件\r\n that.layPagebar.on('click', '*[lay-event]', function(e){\r\n var othis = $(this);\r\n var events = othis.attr('lay-event');\r\n\r\n layui.event.call(this, MOD_NAME, 'pagebar('+ filter +')', $.extend({\r\n event: events,\r\n config: options\r\n },{}));\r\n });\r\n\r\n // 拖拽调整宽度\r\n th.on('mousemove', function(e){\r\n var othis = $(this);\r\n var oLeft = othis.offset().left;\r\n var pLeft = e.clientX - oLeft;\r\n if(othis.data('unresize') || thisTable.eventMoveElem){\r\n return;\r\n }\r\n dict.allowResize = othis.width() - pLeft <= 10; //是否处于拖拽允许区域\r\n _BODY.css('cursor', (dict.allowResize ? 'col-resize' : ''));\r\n }).on('mouseleave', function(){\r\n var othis = $(this);\r\n if(thisTable.eventMoveElem) return;\r\n _BODY.css('cursor', '');\r\n }).on('mousedown', function(e){\r\n var othis = $(this);\r\n if(dict.allowResize){\r\n var key = othis.data('key');\r\n e.preventDefault();\r\n dict.offset = [e.clientX, e.clientY]; //记录初始坐标\r\n\r\n that.cssRules(key, function(item){\r\n var width = item.style.width || othis.outerWidth();\r\n dict.rule = item;\r\n dict.ruleWidth = parseFloat(width);\r\n dict.minWidth = othis.data('minwidth') || options.cellMinWidth;\r\n dict.maxWidth = othis.data('maxwidth') || options.cellMaxWidth;\r\n });\r\n\r\n // 临时记录当前拖拽信息\r\n othis.data(DATA_MOVE_NAME, dict);\r\n thisTable.eventMoveElem = othis;\r\n }\r\n });\r\n\r\n // 拖拽中\r\n if(!thisTable.docEvent){\r\n _DOC.on('mousemove', function(e){\r\n if(thisTable.eventMoveElem){\r\n var dict = thisTable.eventMoveElem.data(DATA_MOVE_NAME) || {};\r\n\r\n thisTable.eventMoveElem.data('resizing', 1);\r\n e.preventDefault();\r\n\r\n if(dict.rule){\r\n var setWidth = dict.ruleWidth + e.clientX - dict.offset[0];\r\n var id = thisTable.eventMoveElem.closest('.' + ELEM_VIEW).attr('lay-id');\r\n var thatTable = getThisTable(id);\r\n\r\n if(!thatTable) return;\r\n\r\n if(setWidth < dict.minWidth) setWidth = dict.minWidth;\r\n if(setWidth > dict.maxWidth) setWidth = dict.maxWidth;\r\n\r\n dict.rule.style.width = setWidth + 'px';\r\n thatTable.setGroupWidth(thisTable.eventMoveElem);\r\n layer.close(that.tipsIndex);\r\n }\r\n }\r\n }).on('mouseup', function(e){\r\n if(thisTable.eventMoveElem){\r\n var th = thisTable.eventMoveElem; // 当前触发拖拽的 th 元素\r\n var id = th.closest('.' + ELEM_VIEW).attr('lay-id');\r\n var thatTable = getThisTable(id);\r\n\r\n if(!thatTable) return;\r\n\r\n var key = th.data('key');\r\n var col = thatTable.col(key);\r\n var filter = thatTable.config.elem.attr('lay-filter');\r\n\r\n // 重置过度信息\r\n dict = {};\r\n _BODY.css('cursor', '');\r\n thatTable.scrollPatch();\r\n\r\n // 清除当前拖拽信息\r\n th.removeData(DATA_MOVE_NAME);\r\n delete thisTable.eventMoveElem;\r\n\r\n // 列拖拽宽度后的事件\r\n thatTable.cssRules(key, function(item){\r\n col.width = parseFloat(item.style.width);\r\n layui.event.call(th[0], MOD_NAME, 'colResized('+ filter +')', {\r\n col: col,\r\n config: thatTable.config\r\n });\r\n });\r\n }\r\n });\r\n }\r\n\r\n // 已给 document 执行全局事件,避免重复绑定\r\n thisTable.docEvent = true;\r\n\r\n\r\n // 排序\r\n th.on('click', function(e){\r\n var othis = $(this);\r\n var elemSort = othis.find(ELEM_SORT);\r\n var nowType = elemSort.attr('lay-sort');\r\n var type;\r\n\r\n // 排序不触发的条件\r\n if(!elemSort[0] || othis.data('resizing') === 1){\r\n return othis.removeData('resizing');\r\n }\r\n\r\n if(nowType === 'asc'){\r\n type = 'desc';\r\n } else if(nowType === 'desc'){\r\n type = null;\r\n } else {\r\n type = 'asc';\r\n }\r\n that.sort({\r\n field: othis,\r\n type: type,\r\n fromEvent: true\r\n });\r\n }).find(ELEM_SORT+' .layui-edge ').on('click', function(e){\r\n var othis = $(this);\r\n var index = othis.index();\r\n var field = othis.parents('th').eq(0).data('field');\r\n layui.stope(e);\r\n if(index === 0){\r\n that.sort({\r\n field: field,\r\n type: 'asc',\r\n fromEvent: true\r\n });\r\n } else {\r\n that.sort({\r\n field: field,\r\n type: 'desc',\r\n fromEvent: true\r\n });\r\n }\r\n });\r\n\r\n //数据行中的事件返回的公共对象成员\r\n var commonMember = that.commonMember = function(sets){\r\n var othis = $(this);\r\n var index = othis.parents('tr').eq(0).data('index');\r\n var tr = that.layBody.find('tr[data-index=\"'+ index +'\"]');\r\n var data = table.cache[that.key] || [];\r\n\r\n data = data[index] || {};\r\n\r\n // 事件返回的公共成员\r\n var obj = {\r\n tr: tr, // 行元素\r\n config: options,\r\n data: table.clearCacheKey(data), // 当前行数据\r\n dataCache: data, // 当前行缓存中的数据\r\n index: index,\r\n del: function(){ // 删除行数据\r\n table.cache[that.key][index] = [];\r\n tr.remove();\r\n that.scrollPatch();\r\n },\r\n update: function(fields, related){ // 修改行数据\r\n fields = fields || {};\r\n layui.each(fields, function(key, value){\r\n var td = tr.children('td[data-field=\"'+ key +'\"]');\r\n var cell = td.children(ELEM_CELL); // 获取当前修改的列\r\n\r\n // 更新缓存中的数据\r\n data[key] = obj.data[key] = value;\r\n\r\n // 更新相应列视图\r\n that.eachCols(function(i, item3){\r\n if(item3.field == key){\r\n cell.html(parseTempData.call(that, {\r\n item3: item3\r\n ,content: value\r\n ,tplData: $.extend({\r\n LAY_COL: item3\r\n }, data)\r\n }));\r\n td.data('content', value);\r\n }\r\n // 更新其他包含自定义模板且可能有所关联的列视图\r\n else if(related && (item3.templet || item3.toolbar)){\r\n var thisTd = tr.children('td[data-field=\"'+ (item3.field || i) +'\"]');\r\n var content = data[item3.field];\r\n\r\n thisTd.children(ELEM_CELL).html(parseTempData.call(that, {\r\n item3: item3\r\n ,content: content\r\n ,tplData: $.extend({\r\n LAY_COL: item3\r\n }, data)\r\n }));\r\n thisTd.data('content', content);\r\n }\r\n });\r\n });\r\n\r\n that.renderForm();\r\n },\r\n // 设置行选中状态\r\n setRowChecked: function(opts){\r\n that.setRowChecked($.extend({\r\n index: index\r\n }, opts));\r\n }\r\n // 获取当前列\r\n };\r\n\r\n return $.extend(obj, sets);\r\n };\r\n\r\n // 复选框选择(替代元素的 click 事件)\r\n that.elem.on('click', 'input[name=\"layTableCheckbox\"]+', function(e){\r\n var othis = $(this);\r\n var td = othis.closest('td');\r\n var checkbox = othis.prev();\r\n var children = that.layBody.find('input[name=\"layTableCheckbox\"]');\r\n var index = checkbox.parents('tr').eq(0).data('index');\r\n var checked = checkbox[0].checked;\r\n var isAll = checkbox.attr('lay-filter') === 'layTableAllChoose';\r\n\r\n if(checkbox[0].disabled) return;\r\n\r\n // 全选\r\n if(isAll){\r\n that.setRowChecked({\r\n index: 'all',\r\n checked: checked\r\n });\r\n } else {\r\n that.setRowChecked({\r\n index: index,\r\n checked: checked\r\n });\r\n layui.stope(e);\r\n }\r\n\r\n // 事件\r\n layui.event.call(\r\n checkbox[0],\r\n MOD_NAME, 'checkbox('+ filter +')',\r\n commonMember.call(checkbox[0], {\r\n checked: checked,\r\n type: isAll ? 'all' : 'one',\r\n getCol: function(){ // 获取当前列的表头配置信息\r\n return that.col(td.data('key'));\r\n }\r\n })\r\n );\r\n });\r\n\r\n // 单选框选择\r\n that.elem.on('click', 'input[lay-type=\"layTableRadio\"]+', function(e){\r\n var othis = $(this);\r\n var td = othis.closest('td');\r\n var radio = othis.prev();\r\n var checked = radio[0].checked;\r\n var index = radio.parents('tr').eq(0).data('index');\r\n\r\n layui.stope(e);\r\n if(radio[0].disabled) return false;\r\n\r\n // 标注选中样式\r\n that.setRowChecked({\r\n type: 'radio',\r\n index: index\r\n });\r\n\r\n // 事件\r\n layui.event.call(\r\n radio[0],\r\n MOD_NAME, 'radio('+ filter +')',\r\n commonMember.call(radio[0], {\r\n checked: checked,\r\n getCol: function(){ // 获取当前列的表头配置信息\r\n return that.col(td.data('key'));\r\n }\r\n })\r\n );\r\n });\r\n\r\n // 行事件\r\n that.layBody.on('mouseenter', 'tr', function(){ // 鼠标移入行\r\n var othis = $(this);\r\n var index = othis.index();\r\n if(othis.data('off')) return; // 不触发事件\r\n that.layBody.find('tr:eq('+ index +')').addClass(ELEM_HOVER)\r\n }).on('mouseleave', 'tr', function(){ // 鼠标移出行\r\n var othis = $(this);\r\n var index = othis.index();\r\n if(othis.data('off')) return; // 不触发事件\r\n that.layBody.find('tr:eq('+ index +')').removeClass(ELEM_HOVER)\r\n }).on('click', 'tr', function(e){ // 单击行\r\n // 不支持行单击事件的元素\r\n var UNROW = [\r\n '.layui-form-checkbox',\r\n '.layui-form-switch',\r\n '.layui-form-radio',\r\n '[lay-unrow]'\r\n ].join(',');\r\n if( $(e.target).is(UNROW) || $(e.target).closest(UNROW)[0]){\r\n return;\r\n }\r\n setRowEvent.call(this, 'row');\r\n }).on('dblclick', 'tr', function(){ // 双击行\r\n setRowEvent.call(this, 'rowDouble');\r\n }).on('contextmenu', 'tr', function(e){ // 菜单\r\n if (!options.defaultContextmenu) e.preventDefault();\r\n setRowEvent.call(this, 'rowContextmenu');\r\n });\r\n\r\n // 创建行单击、双击、菜单事件\r\n var setRowEvent = function(eventType){\r\n var othis = $(this);\r\n if(othis.data('off')) return; //不触发事件\r\n layui.event.call(this,\r\n MOD_NAME, eventType + '('+ filter +')',\r\n commonMember.call(othis.children('td')[0])\r\n );\r\n };\r\n\r\n // 渲染单元格编辑状态\r\n var renderGridEdit = function(othis, e){\r\n othis = $(othis);\r\n\r\n if(othis.data('off')) return; // 不触发事件\r\n\r\n var field = othis.data('field');\r\n var key = othis.data('key');\r\n var col = that.col(key);\r\n var index = othis.closest('tr').data('index');\r\n var data = table.cache[that.key][index];\r\n var elemCell = othis.children(ELEM_CELL);\r\n\r\n // 是否开启编辑\r\n // 若 edit 传入函数,则根据函数的返回结果判断是否开启编辑\r\n var editType = typeof col.edit === 'function'\r\n ? col.edit(data)\r\n : col.edit;\r\n\r\n // 显示编辑表单\r\n if(editType){\r\n var input = $(function(){\r\n var inputElem = '';\r\n if(editType === 'textarea') {\r\n inputElem = '';\r\n }\r\n return inputElem;\r\n }());\r\n\r\n input[0].value = othis.data('content') || data[field] || elemCell.text();\r\n othis.find('.'+ELEM_EDIT)[0] || othis.append(input);\r\n input.focus();\r\n e && layui.stope(e);\r\n }\r\n };\r\n\r\n // 单元格编辑 - 输入框内容被改变的事件\r\n that.layBody.on('change', '.'+ ELEM_EDIT, function(){\r\n var othis = $(this);\r\n var td = othis.parent();\r\n var value = this.value;\r\n var field = othis.parent().data('field');\r\n var index = othis.closest('tr').data('index');\r\n var data = table.cache[that.key][index];\r\n\r\n //事件回调的参数对象\r\n var params = commonMember.call(td[0], {\r\n value: value,\r\n field: field,\r\n oldValue: data[field], // 编辑前的值\r\n td: td,\r\n reedit: function(){ // 重新编辑\r\n setTimeout(function(){\r\n // 重新渲染为编辑状态\r\n renderGridEdit(params.td);\r\n\r\n // 将字段缓存的值恢复到编辑之前的值\r\n var obj = {};\r\n obj[field] = params.oldValue;\r\n params.update(obj);\r\n });\r\n },\r\n getCol: function(){ // 获取当前列的表头配置信息\r\n return that.col(td.data('key'));\r\n }\r\n });\r\n\r\n // 更新缓存中的值\r\n var obj = {}; //变更的键值\r\n obj[field] = value;\r\n params.update(obj);\r\n\r\n // 执行 API 编辑事件\r\n layui.event.call(td[0], MOD_NAME, 'edit('+ filter +')', params);\r\n }).on('blur', '.'+ ELEM_EDIT, function(){ // 单元格编辑 - 恢复非编辑状态事件\r\n $(this).remove(); // 移除编辑状态\r\n });\r\n\r\n // 表格主体单元格触发编辑的事件\r\n that.layBody.on(options.editTrigger, 'td', function(e){\r\n renderGridEdit(this, e)\r\n }).on('mouseenter', 'td', function(){\r\n showGridExpandIcon.call(this)\r\n }).on('mouseleave', 'td', function(){\r\n showGridExpandIcon.call(this, 'hide');\r\n });\r\n\r\n // 表格合计栏单元格 hover 显示展开图标\r\n that.layTotal.on('mouseenter', 'td', function(){\r\n showGridExpandIcon.call(this)\r\n }).on('mouseleave', 'td', function(){\r\n showGridExpandIcon.call(this, 'hide');\r\n });\r\n\r\n // 显示单元格展开图标\r\n var ELEM_GRID = 'layui-table-grid';\r\n var ELEM_GRID_DOWN = 'layui-table-grid-down';\r\n var ELEM_GRID_PANEL = 'layui-table-grid-panel';\r\n var showGridExpandIcon = function(hide){\r\n var othis = $(this);\r\n var elemCell = othis.children(ELEM_CELL);\r\n\r\n if(othis.data('off')) return; // 不触发事件\r\n if(othis.parent().hasClass(ELEM_EXPAND)) return; // 是否已为展开状态\r\n\r\n if(hide){\r\n othis.find('.layui-table-grid-down').remove();\r\n } else if((\r\n elemCell.prop('scrollWidth') > elemCell.outerWidth() ||\r\n elemCell.find(\"br\").length > 0\r\n ) && !options.lineStyle){\r\n if(elemCell.find('.'+ ELEM_GRID_DOWN)[0]) return;\r\n othis.append('
                  ');\r\n }\r\n };\r\n // 展开单元格内容\r\n var gridExpand = function(e){\r\n var othis = $(this);\r\n var td = othis.parent();\r\n var key = td.data('key');\r\n var col = that.col(key);\r\n var index = td.parent().data('index');\r\n var elemCell = td.children(ELEM_CELL);\r\n var ELEM_CELL_C = 'layui-table-cell-c';\r\n var elemCellClose = $('');\r\n var expandedMode = col.expandedMode || options.cellExpandedMode;\r\n\r\n // 展开风格\r\n if (expandedMode === 'tips') { // TIPS 展开风格\r\n that.tipsIndex = layer.tips([\r\n '
                  ',\r\n elemCell.html(),\r\n '
                  ',\r\n ''\r\n ].join(''), elemCell[0], {\r\n tips: [3, ''],\r\n time: -1,\r\n anim: -1,\r\n maxWidth: (device.ios || device.android) ? 300 : that.elem.width()/2,\r\n isOutAnim: false,\r\n skin: 'layui-table-tips',\r\n success: function(layero, index){\r\n layero.find('.layui-table-tips-c').on('click', function(){\r\n layer.close(index);\r\n });\r\n }\r\n });\r\n } else { // 多行展开风格\r\n // 恢复其他已经展开的单元格\r\n that.elem.find('.'+ ELEM_CELL_C).trigger('click');\r\n\r\n // 设置当前单元格展开宽度\r\n that.cssRules(key, function(item){\r\n var width = item.style.width;\r\n var expandedWidth = col.expandedWidth || options.cellExpandedWidth;\r\n\r\n // 展开后的宽度不能小于当前宽度\r\n if(expandedWidth < parseFloat(width)) expandedWidth = parseFloat(width);\r\n\r\n elemCellClose.data('cell-width', width);\r\n item.style.width = expandedWidth + 'px';\r\n\r\n setTimeout(function(){\r\n that.scrollPatch(); // 滚动条补丁\r\n });\r\n });\r\n\r\n // 设置当前单元格展开样式\r\n that.setRowActive(index, ELEM_EXPAND);\r\n\r\n // 插入关闭按钮\r\n if(!elemCell.next('.'+ ELEM_CELL_C)[0]){\r\n elemCell.after(elemCellClose);\r\n }\r\n\r\n // 关闭展开状态\r\n elemCellClose.on('click', function(){\r\n var $this = $(this);\r\n that.setRowActive(index, ELEM_EXPAND, true); // 移除单元格展开样式\r\n that.cssRules(key, function(item){\r\n item.style.width = $this.data('cell-width'); // 恢复单元格展开前的宽度\r\n that.resize(); // 滚动条补丁\r\n });\r\n $this.remove();\r\n });\r\n }\r\n\r\n othis.remove();\r\n layui.stope(e);\r\n };\r\n\r\n // 表格主体单元格展开事件\r\n that.layBody.on('click', '.'+ ELEM_GRID_DOWN, function(e){\r\n gridExpand.call(this, e);\r\n });\r\n // 表格合计栏单元格展开事件\r\n that.layTotal.on('click', '.'+ ELEM_GRID_DOWN, function(e){\r\n gridExpand.call(this, e);\r\n });\r\n\r\n // 行工具条操作事件\r\n var toolFn = function(type){\r\n var othis = $(this);\r\n var td = othis.closest('td');\r\n var index = othis.parents('tr').eq(0).data('index');\r\n // 标记当前活动行\r\n that.setRowActive(index);\r\n\r\n // 执行事件\r\n layui.event.call(\r\n this,\r\n MOD_NAME,\r\n (type || 'tool') + '('+ filter +')',\r\n commonMember.call(this, {\r\n event: othis.attr('lay-event'),\r\n getCol: function(){ // 获取当前列的表头配置信息\r\n return that.col(td.data('key'));\r\n }\r\n })\r\n );\r\n };\r\n\r\n // 行工具条单击事件\r\n that.layBody.on('click', '*[lay-event]', function(e){\r\n toolFn.call(this);\r\n layui.stope(e);\r\n }).on('dblclick', '*[lay-event]', function(e){ //行工具条双击事件\r\n toolFn.call(this, 'toolDouble');\r\n layui.stope(e);\r\n });\r\n\r\n // 同步滚动条\r\n that.layMain.on('scroll', function(){\r\n var othis = $(this);\r\n var scrollLeft = othis.scrollLeft();\r\n var scrollTop = othis.scrollTop();\r\n\r\n that.layHeader.scrollLeft(scrollLeft);\r\n that.layTotal.scrollLeft(scrollLeft);\r\n that.layFixed.find(ELEM_BODY).scrollTop(scrollTop);\r\n\r\n layer.close(that.tipsIndex);\r\n });\r\n };\r\n\r\n // 全局事件\r\n (function(){\r\n // 自适应尺寸\r\n _WIN.on('resize', function(){\r\n layui.each(thisTable.that, function(){\r\n this.resize();\r\n });\r\n });\r\n\r\n // 全局点击\r\n _DOC.on('click', function(){\r\n _DOC.trigger('table.remove.tool.panel');\r\n });\r\n\r\n // 工具面板移除事件\r\n _DOC.on('table.remove.tool.panel', function(){\r\n $('.' + ELEM_TOOL_PANEL).remove();\r\n });\r\n })();\r\n\r\n // 初始化\r\n table.init = function(filter, settings){\r\n settings = settings || {};\r\n var that = this;\r\n var inst = null;\r\n var elemTable = typeof filter === 'object' ? filter : (\r\n typeof filter === 'string'\r\n ? $('table[lay-filter=\"'+ filter +'\"]')\r\n : $(ELEM + '[lay-data], '+ ELEM + '[lay-options]')\r\n );\r\n var errorTips = 'Table element property lay-data configuration item has a syntax error: ';\r\n\r\n //遍历数据表格\r\n elemTable.each(function(){\r\n var othis = $(this);\r\n var attrData = othis.attr('lay-data');\r\n var tableData = lay.options(this, {\r\n attr: attrData ? 'lay-data' : null,\r\n errorText: errorTips + (attrData || othis.attr('lay-options'))\r\n });\r\n\r\n var options = $.extend({\r\n elem: this\r\n ,cols: []\r\n ,data: []\r\n ,skin: othis.attr('lay-skin') //风格\r\n ,size: othis.attr('lay-size') //尺寸\r\n ,even: typeof othis.attr('lay-even') === 'string' //偶数行背景\r\n }, table.config, settings, tableData);\r\n\r\n filter && othis.hide();\r\n\r\n //获取表头数据\r\n othis.find('thead>tr').each(function(i){\r\n options.cols[i] = [];\r\n $(this).children().each(function(ii){\r\n var th = $(this);\r\n var attrData = th.attr('lay-data');\r\n var itemData = lay.options(this, {\r\n attr: attrData ? 'lay-data' : null,\r\n errorText: errorTips + (attrData || th.attr('lay-options'))\r\n });\r\n\r\n var row = $.extend({\r\n title: th.text()\r\n ,colspan: parseInt(th.attr('colspan')) || 1 //列单元格\r\n ,rowspan: parseInt(th.attr('rowspan')) || 1 //行单元格\r\n }, itemData);\r\n\r\n options.cols[i].push(row);\r\n });\r\n });\r\n\r\n //缓存静态表体数据\r\n var trElem = othis.find('tbody>tr');\r\n\r\n //执行渲染\r\n var tableIns = table.render(options);\r\n\r\n //获取表体数据\r\n if (trElem.length && !settings.data && !tableIns.config.url) {\r\n var tdIndex = 0;\r\n table.eachCols(tableIns.config.id, function (i3, item3) {\r\n trElem.each(function(i1){\r\n options.data[i1] = options.data[i1] || {};\r\n var tr = $(this);\r\n var field = item3.field;\r\n options.data[i1][field] = tr.children('td').eq(tdIndex).html();\r\n });\r\n tdIndex++;\r\n })\r\n\r\n tableIns.reloadData({\r\n data: options.data\r\n });\r\n }\r\n });\r\n\r\n return that;\r\n };\r\n\r\n //记录所有实例\r\n thisTable.that = {}; //记录所有实例对象\r\n thisTable.config = {}; //记录所有实例配置项\r\n\r\n var eachChildCols = function (index, cols, i1, item2) {\r\n //如果是组合列,则捕获对应的子列\r\n if (item2.colGroup) {\r\n var childIndex = 0;\r\n index++;\r\n item2.CHILD_COLS = [];\r\n // 找到它的子列所在cols的下标\r\n var i2 = i1 + (parseInt(item2.rowspan) || 1);\r\n layui.each(cols[i2], function (i22, item22) {\r\n if (item22.parentKey) { // 如果字段信息中包含了parentKey和key信息\r\n if (item22.parentKey === item2.key) {\r\n item22.PARENT_COL_INDEX = index;\r\n item2.CHILD_COLS.push(item22);\r\n eachChildCols(index, cols, i2, item22);\r\n }\r\n } else {\r\n // 没有key信息以colspan数量所谓判断标准\r\n //如果子列已经被标注为{PARENT_COL_INDEX},或者子列累计 colspan 数等于父列定义的 colspan,则跳出当前子列循环\r\n if (item22.PARENT_COL_INDEX || (childIndex >= 1 && childIndex == (item2.colspan || 1))) return;\r\n item22.PARENT_COL_INDEX = index;\r\n item2.CHILD_COLS.push(item22);\r\n childIndex = childIndex + (parseInt(item22.colspan > 1 ? item22.colspan : 1));\r\n eachChildCols(index, cols, i2, item22);\r\n }\r\n });\r\n }\r\n };\r\n\r\n // 遍历表头\r\n table.eachCols = function(id, callback, cols){\r\n var config = thisTable.config[id] || {};\r\n var arrs = [], index = 0;\r\n\r\n cols = $.extend(true, [], cols || config.cols);\r\n\r\n //重新整理表头结构\r\n layui.each(cols, function(i1, item1){\r\n if (i1) return true; // 只需遍历第一层\r\n layui.each(item1, function(i2, item2){\r\n eachChildCols(index, cols, i1, item2);\r\n if(item2.PARENT_COL_INDEX) return; //如果是子列,则不进行追加,因为已经存储在父列中\r\n arrs.push(item2)\r\n });\r\n });\r\n\r\n //重新遍历列,如果有子列,则进入递归\r\n var eachArrs = function(obj){\r\n layui.each(obj || arrs, function(i, item){\r\n if(item.CHILD_COLS) return eachArrs(item.CHILD_COLS);\r\n typeof callback === 'function' && callback(i, item);\r\n });\r\n };\r\n\r\n eachArrs();\r\n };\r\n\r\n // 获取表格选中状态\r\n table.checkStatus = function(id){\r\n var nums = 0;\r\n var invalidNum = 0;\r\n var arr = [];\r\n var data = table.cache[id] || [];\r\n\r\n //计算全选个数\r\n layui.each(data, function(i, item){\r\n if(layui.type(item) === 'array' || item[table.config.disabledName]){\r\n invalidNum++; // 无效数据,或已删除的\r\n return;\r\n }\r\n if(item[table.config.checkName]){\r\n nums++;\r\n if(!item[table.config.disabledName]){\r\n arr.push(table.clearCacheKey(item));\r\n }\r\n }\r\n });\r\n return {\r\n data: arr, // 选中的数据\r\n isAll: data.length ? (nums === (data.length - invalidNum)) : false // 是否全选\r\n };\r\n };\r\n\r\n // 设置行选中状态\r\n table.setRowChecked = function(id, opts){\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n that.setRowChecked(opts);\r\n };\r\n\r\n // 获取表格当前页的所有行数据\r\n table.getData = function(id){\r\n var arr = [];\r\n var data = table.cache[id] || [];\r\n layui.each(data, function(i, item){\r\n if(layui.type(item) === 'array'){\r\n return;\r\n }\r\n arr.push(table.clearCacheKey(item));\r\n });\r\n return arr;\r\n };\r\n\r\n // 重置表格尺寸结构\r\n table.resize = function(id){\r\n // 若指定表格唯一 id,则只执行该 id 对应的表格实例\r\n if(id){\r\n var config = getThisTableConfig(id); // 获取当前实例配置项\r\n if(!config) return;\r\n\r\n getThisTable(id).resize();\r\n\r\n } else { // 否则重置所有表格实例尺寸\r\n layui.each(thisTable.that, function(){\r\n this.resize();\r\n });\r\n }\r\n };\r\n\r\n // 表格导出\r\n table.exportFile = function(id, data, opts){\r\n data = data || table.clearCacheKey(table.cache[id]);\r\n opts = typeof opts === 'object' ? opts : function(){\r\n var obj = {};\r\n opts && (obj.type = opts);\r\n return obj;\r\n }();\r\n\r\n var type = opts.type || 'csv';\r\n var thatTable = thisTable.that[id];\r\n var config = thisTable.config[id] || {};\r\n var textType = ({\r\n csv: 'text/csv',\r\n xls: 'application/vnd.ms-excel'\r\n })[type];\r\n var alink = document.createElement(\"a\");\r\n\r\n if(device.ie) return hint.error('IE_NOT_SUPPORT_EXPORTS');\r\n\r\n // 处理 treeTable 数据\r\n if (config.tree && config.tree.view) {\r\n try {\r\n data = $.extend(true, [], table.cache[id]);\r\n data = (function fn(data) {\r\n return data.reduce(function (acc, obj){\r\n var children = obj.children || [];\r\n delete obj.children;\r\n return acc.concat(obj, fn(children));\r\n }, []);\r\n })(Array.from(data));\r\n } catch (e) {}\r\n }\r\n\r\n alink.href = 'data:'+ textType +';charset=utf-8,\\ufeff'+ encodeURIComponent(function(){\r\n var dataTitle = [];\r\n var dataMain = [];\r\n var dataTotal = [];\r\n var fieldsIsHide = {};\r\n\r\n // 表头和表体\r\n layui.each(data, function(i1, item1){\r\n var vals = [];\r\n if(typeof id === 'object'){ // 若 id 参数直接为表头数据\r\n layui.each(id, function(i, item){\r\n i1 == 0 && dataTitle.push(item || '');\r\n });\r\n layui.each(layui.isArray(item1) ? $.extend([], item1) : table.clearCacheKey(item1), function(i2, item2){\r\n vals.push('\"'+ (item2 || '') +'\"');\r\n });\r\n } else {\r\n table.eachCols(id, function(i3, item3){\r\n if(item3.ignoreExport === false || item3.field && item3.type == 'normal'){\r\n // 不导出隐藏列,除非设置 ignoreExport 强制导出\r\n if (\r\n (item3.hide && item3.ignoreExport !== false) ||\r\n item3.ignoreExport === true // 忽略导出\r\n ) {\r\n if(i1 == 0) fieldsIsHide[item3.field] = true; // 记录隐藏列\r\n return;\r\n }\r\n\r\n var content = item1[item3.field];\r\n if(content === undefined || content === null) content = '';\r\n\r\n i1 == 0 && dataTitle.push(item3.fieldTitle || item3.title || item3.field || '');\r\n\r\n // 解析内容\r\n content = parseTempData.call(thatTable, {\r\n item3: item3,\r\n content: content,\r\n tplData: item1,\r\n text: 'text',\r\n obj: {\r\n td: function(field){\r\n var td = thatTable.layBody.find('tr[data-index=\"'+ i1 +'\"]>td');\r\n return td.filter('[data-field=\"'+ field +'\"]');\r\n }\r\n }\r\n });\r\n\r\n // 异常处理\r\n content = content.replace(/\"/g, '\"\"'); // 避免内容存在「双引号」导致异常分隔\r\n // content += '\\t'; // 加「水平制表符」 避免内容被转换格式\r\n content = '\"'+ content +'\"'; // 避免内容存在「逗号」导致异常分隔\r\n\r\n // 插入内容\r\n vals.push(content);\r\n }\r\n });\r\n }\r\n dataMain.push(vals.join(','));\r\n });\r\n\r\n // 表合计\r\n thatTable && layui.each(thatTable.dataTotal, function(i, o){\r\n fieldsIsHide[o.field] || dataTotal.push('\"' + (o.total || '') + '\"');\r\n });\r\n\r\n return dataTitle.join(',') + '\\r\\n' + dataMain.join('\\r\\n') + '\\r\\n' + dataTotal.join(',');\r\n }());\r\n\r\n alink.download = (opts.title || config.title || 'table_'+ (config.index || '')) + '.' + type;\r\n document.body.appendChild(alink);\r\n alink.click();\r\n document.body.removeChild(alink);\r\n };\r\n\r\n // 获取表格配置信息\r\n table.getOptions = function (id) {\r\n return getThisTableConfig(id);\r\n }\r\n\r\n // 显示或隐藏列\r\n table.hideCol = function (id, cols) {\r\n var that = getThisTable(id);\r\n if (!that) {\r\n return;\r\n }\r\n\r\n if (layui.type(cols) === 'boolean') {\r\n // 显示全部或者隐藏全部\r\n that.eachCols(function (i2, item2) {\r\n var key = item2.key;\r\n var col = that.col(key);\r\n var parentKey = item2.parentKey;\r\n // 同步勾选列的 hide 值和隐藏样式\r\n if (col.hide != cols) {\r\n var hide = col.hide = cols;\r\n that.elem.find('*[data-key=\"'+ key +'\"]')[\r\n hide ? 'addClass' : 'removeClass'\r\n ](HIDE);\r\n // 根据列的显示隐藏,同步多级表头的父级相关属性值\r\n that.setParentCol(hide, parentKey);\r\n }\r\n })\r\n } else {\r\n cols = layui.isArray(cols) ? cols : [cols];\r\n layui.each(cols, function (i1, item1) {\r\n that.eachCols(function (i2, item2) {\r\n if (item1.field === item2.field) {\r\n var key = item2.key;\r\n var col = that.col(key);\r\n var parentKey = item2.parentKey;\r\n // 同步勾选列的 hide 值和隐藏样式\r\n if ('hide' in item1 && col.hide != item1.hide) {\r\n var hide = col.hide = !!item1.hide;\r\n that.elem.find('*[data-key=\"'+ key +'\"]')[\r\n hide ? 'addClass' : 'removeClass'\r\n ](HIDE);\r\n // 根据列的显示隐藏,同步多级表头的父级相关属性值\r\n that.setParentCol(hide, parentKey);\r\n }\r\n }\r\n })\r\n });\r\n }\r\n $('.' + ELEM_TOOL_PANEL).remove(); // 关闭字段筛选面板如果打开的话\r\n // 重新适配尺寸\r\n that.resize();\r\n }\r\n\r\n // 重载\r\n table.reload = function(id, options, deep, type){\r\n var config = getThisTableConfig(id); //获取当前实例配置项\r\n if(!config) return;\r\n\r\n var that = getThisTable(id);\r\n that.reload(options, deep, type);\r\n\r\n return thisTable.call(that);\r\n };\r\n\r\n // 仅重载数据\r\n table.reloadData = function(){\r\n var args = $.extend([], arguments);\r\n args[3] = 'reloadData';\r\n\r\n // 重载时,影响整个结构的参数,不适合更新的参数\r\n var dataParams = new RegExp('^('+ [\r\n 'elem', 'id', 'cols', 'width', 'height', 'maxHeight',\r\n 'toolbar', 'defaultToolbar',\r\n 'className', 'css', 'pagebar'\r\n ].join('|') + ')$');\r\n\r\n // 过滤与数据无关的参数\r\n layui.each(args[1], function (key, value) {\r\n if(dataParams.test(key)){\r\n delete args[1][key];\r\n }\r\n });\r\n\r\n return table.reload.apply(null, args);\r\n };\r\n\r\n // 核心入口\r\n table.render = function(options){\r\n var inst = new Class(options);\r\n return thisTable.call(inst);\r\n };\r\n\r\n // 清除临时 Key\r\n table.clearCacheKey = function(data){\r\n data = $.extend({}, data);\r\n delete data[table.config.checkName];\r\n delete data[table.config.indexName];\r\n delete data[table.config.numbersName];\r\n delete data[table.config.disabledName];\r\n return data;\r\n };\r\n\r\n // 自动完成渲染\r\n $(function(){\r\n table.init();\r\n });\r\n\r\n exports(MOD_NAME, table);\r\n});\r\n","/**\n * layui.treeTable\n * 树表组件\n */\n\nlayui.define(['table'], function (exports) {\n \"use strict\";\n\n var $ = layui.$;\n var form = layui.form;\n var table = layui.table;\n var hint = layui.hint();\n\n // api\n var treeTable = {\n config: {},\n // 事件\n on: table.on,\n // 遍历字段\n eachCols: table.eachCols,\n index: table.index,\n set: function (options) {\n var that = this;\n that.config = $.extend({}, that.config, options);\n return that;\n },\n resize: table.resize,\n getOptions: table.getOptions,\n hideCol: table.hideCol,\n renderData: table.renderData\n };\n\n // 操作当前实例\n var thisTreeTable = function () {\n var that = this;\n var options = that.config\n var id = options.id || options.index;\n\n return {\n config: options,\n reload: function (options, deep) {\n that.reload.call(that, options, deep);\n },\n reloadData: function (options, deep) {\n treeTable.reloadData(id, options, deep);\n }\n }\n }\n\n // 获取当前实例\n var getThisTable = function (id) {\n var that = thisTreeTable.that[id];\n if (!that) hint.error(id ? ('The treeTable instance with ID \\'' + id + '\\' not found') : 'ID argument required');\n return that || null;\n }\n\n // 字符\n var MOD_NAME = 'treeTable';\n var HIDE = 'layui-hide';\n\n var ELEM_VIEW = '.layui-table-view';\n var ELEM_TREE = '.layui-table-tree';\n var ELEM_TOOL = '.layui-table-tool';\n var ELEM_BOX = '.layui-table-box';\n var ELEM_HEADER = '.layui-table-header';\n var ELEM_BODY = '.layui-table-body';\n var ELEM_MAIN = '.layui-table-main';\n var ELEM_FIXED = '.layui-table-fixed';\n var ELEM_FIXL = '.layui-table-fixed-l';\n var ELEM_FIXR = '.layui-table-fixed-r';\n var ELEM_CHECKED = 'layui-table-checked';\n\n var TABLE_TREE = 'layui-table-tree';\n var LAY_DATA_INDEX = 'LAY_DATA_INDEX';\n var LAY_DATA_INDEX_HISTORY = 'LAY_DATA_INDEX_HISTORY';\n var LAY_PARENT_INDEX = 'LAY_PARENT_INDEX';\n var LAY_CHECKBOX_HALF = 'LAY_CHECKBOX_HALF';\n var LAY_EXPAND = 'LAY_EXPAND';\n var LAY_HAS_EXPANDED = 'LAY_HAS_EXPANDED';\n var LAY_ASYNC_STATUS = 'LAY_ASYNC_STATUS';\n var LAY_CASCADE = ['all', 'parent', 'children', 'none'];\n\n // 构造器\n var Class = function (options) {\n var that = this;\n that.index = ++treeTable.index;\n that.config = $.extend(true, {}, that.config, treeTable.config, options);\n // 处理一些属性\n that.init();\n that.render();\n };\n\n var updateCache = function (id, childrenKey, data) {\n var tableCache = table.cache[id];\n layui.each(data || tableCache, function (index, item) {\n var itemDataIndex = item[LAY_DATA_INDEX];\n if (itemDataIndex.indexOf('-') !== -1) {\n tableCache[itemDataIndex] = item\n }\n item[childrenKey] && updateCache(id, childrenKey, item[childrenKey]);\n })\n }\n\n var updateOptions = function (id, options, reload) {\n var that = getThisTable(id);\n reload === 'reloadData' || (that.status = { // 用于记录一些状态信息\n expand: {} // 折叠状态\n });\n var thatOptionsTemp = $.extend(true, {}, that.getOptions(), options);\n var treeOptions = thatOptionsTemp.tree;\n var childrenKey = treeOptions.customName.children;\n var idKey = treeOptions.customName.id;\n // 处理属性\n delete options.hasNumberCol;\n delete options.hasChecboxCol;\n delete options.hasRadioCol;\n table.eachCols(null, function (i1, item1) {\n if (item1.type === 'numbers') {\n options.hasNumberCol = true;\n } else if (item1.type === 'checkbox') {\n options.hasChecboxCol = true;\n } else if (item1.type === 'radio') {\n options.hasRadioCol = true;\n }\n }, thatOptionsTemp.cols)\n\n var parseData = options.parseData;\n var done = options.done;\n\n if (thatOptionsTemp.url) {\n // 异步加载的时候需要处理parseData进行转换\n if (!reload || (reload && parseData && !parseData.mod)) {\n options.parseData = function () {\n var parseDataThat = this;\n var args = arguments;\n var retData = args[0];\n if (layui.type(parseData) === 'function') {\n retData = parseData.apply(parseDataThat, args) || args[0];\n }\n var dataName = parseDataThat.response.dataName;\n // 处理 isSimpleData\n if (treeOptions.data.isSimpleData && !treeOptions.async.enable) { // 异步加载和 isSimpleData 不应该一起使用\n retData[dataName] = that.flatToTree(retData[dataName]);\n }\n // 处理节点状态\n updateStatus(retData[dataName], function (item) {\n item[LAY_EXPAND] = LAY_EXPAND in item ? item[LAY_EXPAND] : (item[idKey] !== undefined && that.status.expand[item[idKey]])\n }, childrenKey);\n\n if (parseDataThat.autoSort && parseDataThat.initSort && parseDataThat.initSort.type) {\n layui.sort(retData[dataName], parseDataThat.initSort.field, parseDataThat.initSort.type === 'desc', true)\n }\n\n that.initData(retData[dataName]);\n\n return retData;\n }\n options.parseData.mod = true\n }\n } else {\n options.data = options.data || [];\n // 处理 isSimpleData\n if (treeOptions.data.isSimpleData) {\n options.data = that.flatToTree(options.data);\n }\n that.initData(options.data);\n }\n\n if (!reload || (reload && done && !done.mod)) {\n options.done = function () {\n var args = arguments;\n var doneThat = this;\n var isRenderData = args[3]; // 是否是 renderData\n if (!isRenderData) {\n delete that.isExpandAll;\n }\n\n var tableView = this.elem.next();\n that.updateStatus(null, {\n LAY_HAS_EXPANDED: false // 去除已经打开过的状态\n });\n // 更新cache中的内容 将子节点也存到cache中\n updateCache(id, childrenKey);\n // 更新全选框的状态\n var layTableAllChooseElem = tableView.find('[name=\"layTableCheckbox\"][lay-filter=\"layTableAllChoose\"]');\n if (layTableAllChooseElem.length) {\n var checkStatus = treeTable.checkStatus(id);\n layTableAllChooseElem.prop({\n checked: checkStatus.isAll && checkStatus.data.length,\n indeterminate: !checkStatus.isAll && checkStatus.data.length\n })\n }\n if (!isRenderData && thatOptionsTemp.autoSort && thatOptionsTemp.initSort && thatOptionsTemp.initSort.type) {\n treeTable.sort(id);\n }\n\n that.renderTreeTable(tableView);\n\n if (layui.type(done) === 'function') {\n return done.apply(doneThat, args);\n }\n }\n options.done.mod = true;\n }\n }\n\n Class.prototype.init = function () {\n var that = this;\n var options = that.config;\n var cascade = options.tree.data.cascade;\n if (LAY_CASCADE.indexOf(cascade) === -1) {\n options.tree.data.cascade = 'all'; // 超出范围的都重置为全联动\n }\n\n // 先初始一个空的表格以便拿到对应的表格实例信息\n var tableIns = table.render($.extend({}, options, {\n data: [],\n url: '',\n done: null\n }))\n var id = tableIns.config.id;\n thisTreeTable.that[id] = that; // 记录当前实例对象\n that.tableIns = tableIns;\n\n updateOptions(id, options);\n }\n\n // 初始默认配置\n Class.prototype.config = {\n tree: {\n customName: {\n children: \"children\", // 节点数据中保存子节点数据的属性名称\n isParent: \"isParent\", // 节点数据保存节点是否为父节点的属性名称\n name: \"name\", // 节点数据保存节点名称的属性名称\n id: \"id\", // 唯一标识的属性名称\n pid: \"parentId\", // 父节点唯一标识的属性名称\n icon: \"icon\" // 图标的属性名称\n },\n view: {\n indent: 14, // 层级缩进量\n flexIconClose: '', // 关闭时候的折叠图标\n flexIconOpen: '', // 打开时候的折叠图标\n showIcon: true, // 是否显示图标(节点类型图标)\n icon: '', // 节点图标,如果设置了这个属性或者数据中有这个字段信息,不管打开还是关闭都以这个图标的值为准\n iconClose: '', // 关闭时候的图标\n iconOpen: '', // 打开时候的图标\n iconLeaf: '', // 叶子节点的图标\n showFlexIconIfNotParent: false, // 当节点不是父节点的时候是否显示折叠图标\n dblClickExpand: true, // 双击节点时,是否自动展开父节点的标识\n expandAllDefault: false // 默认展开所有节点\n },\n data: {\n isSimpleData: false, // 是否简单数据模式\n rootPid: null, // 根节点的父 ID 值\n cascade: 'all' // 级联方式 默认全部级联:all 可选 级联父 parent 级联子 children\n },\n async: {\n enable: false, // 是否开启异步加载模式,只有开启的时候其他参数才起作用\n url: '', // 异步加载的接口,可以根据需要设置与顶层接口不同的接口,如果相同可以不设置该参数\n type: null, // 请求的接口类型,设置可缺省同上\n contentType: null, // 提交参数的数据类型,设置可缺省同上\n headers: null, // 设置可缺省同上\n where: null, // 设置可缺省同上\n autoParam: [] // 自动参数\n },\n callback: {\n beforeExpand: null, // 展开前的回调 return false 可以阻止展开的动作\n onExpand: null // 展开之后的回调\n }\n },\n };\n\n Class.prototype.getOptions = function () {\n var that = this;\n if (that.tableIns) {\n return table.getOptions(that.tableIns.config.id); // 获取表格的实时配置信息\n } else {\n return that.config;\n }\n };\n\n function flatToTree(flatArr, idKey, pIdKey, childrenKey, rootPid) {\n idKey = idKey || 'id';\n pIdKey = pIdKey || 'parentId';\n childrenKey = childrenKey || 'children';\n // 创建一个空的 nodes 对象,用于保存所有的节点\n var nodes = {};\n // 遍历所有节点,将其加入 nodes 对象中\n var idTemp = '';\n layui.each(flatArr, function (index, item) {\n idTemp = idKey + item[idKey];\n nodes[idTemp] = $.extend({}, item);\n nodes[idTemp][childrenKey] = [];\n })\n // 遍历所有节点,将其父子关系加入 nodes 对象\n var pidTemp = '';\n layui.each(nodes, function (index, item) {\n pidTemp = idKey + item[pIdKey];\n if (pidTemp && nodes[pidTemp]) {\n nodes[pidTemp][childrenKey].push(item);\n }\n })\n // 返回顶层节点\n return Object.values(nodes).filter(function (item) {\n return rootPid ? item[pIdKey] === rootPid : !item[pIdKey];\n })\n }\n\n Class.prototype.flatToTree = function (tableData) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var customName = treeOptions.customName;\n var tableId = options.id;\n\n tableData = tableData || table.cache[tableId];\n\n return flatToTree(tableData, customName.id, customName.pid, customName.children, treeOptions.data.rootPid)\n }\n\n Class.prototype.treeToFlat = function (tableData, parentId, parentIndex) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var customName = treeOptions.customName;\n var childrenKey = customName.children;\n var pIdKey = customName.pid;\n\n var flat = [];\n layui.each(tableData, function (i1, item1) {\n var dataIndex = (parentIndex ? parentIndex + '-' : '') + i1;\n var dataNew = $.extend({}, item1);\n dataNew[pIdKey] = item1[pIdKey] || parentId;\n flat.push(dataNew);\n flat = flat.concat(that.treeToFlat(item1[childrenKey], item1[customName.id], dataIndex));\n });\n\n return flat;\n }\n\n // 通过当前行数据返回 treeNode 信息\n Class.prototype.getTreeNode = function (data) {\n var that = this;\n if (!data) {\n return hint.error('找不到节点数据');\n }\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableId = options.id;\n var customName = treeOptions.customName;\n\n // 带上一些常用的方法\n return {\n data: data,\n dataIndex: data[LAY_DATA_INDEX],\n getParentNode: function () {\n return that.getNodeByIndex(data[LAY_PARENT_INDEX])\n },\n };\n }\n\n // 通过 index 返回节点信息\n Class.prototype.getNodeByIndex = function (index) {\n var that = this;\n var treeNodeData = that.getNodeDataByIndex(index);\n if (!treeNodeData) {\n return hint.error('找不到节点数据');\n }\n var options = that.getOptions();\n var treeOptions = options.tree;\n var customName = treeOptions.customName;\n var parentKey = customName.parent;\n var tableId = options.id;\n\n var treeNode = {\n data: treeNodeData,\n dataIndex: treeNodeData[LAY_DATA_INDEX],\n getParentNode: function () {\n return that.getNodeByIndex(treeNodeData[LAY_PARENT_INDEX])\n },\n update: function (data) {\n return treeTable.updateNode(tableId, index, data)\n },\n remove: function () {\n return treeTable.removeNode(tableId, index)\n },\n expand: function (opts) {\n return treeTable.expandNode(tableId, $.extend({}, opts, {\n index: index\n }))\n },\n setChecked: function (opts) {\n return treeTable.setRowChecked(tableId, $.extend({}, opts, {\n index: index\n }))\n }\n };\n\n treeNode.dataIndex = index;\n return treeNode;\n }\n\n // 通过 id 获取节点信息\n Class.prototype.getNodeById = function (id) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var customName = treeOptions.customName;\n var idKey = customName.id;\n\n // 通过 id 拿到数据的 dataIndex\n var dataIndex = '';\n var tableDataFlat = treeTable.getData(options.id, true);\n layui.each(tableDataFlat, function (i1, item1) {\n if (item1[idKey] === id) {\n dataIndex = item1[LAY_DATA_INDEX];\n return true;\n }\n })\n if (!dataIndex) {\n return;\n }\n\n // 用 index\n return that.getNodeByIndex(dataIndex);\n }\n\n // 通过 index 获取节点数据\n Class.prototype.getNodeDataByIndex = function (index, clone, newValue) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableId = options.id;\n var tableCache = table.cache[tableId];\n\n // 获取当前行中的数据\n var dataCache = tableCache[index];\n\n // 若非删除操作,则返回合并后的数据\n if (newValue !== 'delete' && dataCache) {\n $.extend(dataCache, newValue);\n return clone ? $.extend({}, dataCache) : dataCache;\n }\n\n // 删除操作\n var dataRet = tableCache;\n var indexArr = String(index).split('-');\n\n // if (options.url || indexArr.length > 1) tableCache = null // 只有在删除根节点的时候才需要处理\n\n // 根据 index 进行数据处理\n for (var i = 0, childrenKey = treeOptions.customName.children; i < indexArr.length; i++) {\n if (newValue && i === indexArr.length - 1) {\n if (newValue === 'delete') { // 删除并返回当前数据\n // 同步 cache --- 此段代码注释缘由:data 属性模式造成数据重复执行 splice (@Gitee: #I7Z0A/I82E2S)\n /*if (tableCache) {\n layui.each(tableCache, function (i1, item1) {\n if (item1[LAY_DATA_INDEX] === index) {\n tableCache.splice(i1, 1);\n return true;\n }\n })\n }*/\n return (i ? dataRet[childrenKey] : dataRet).splice(indexArr[i], 1)[0];\n } else { // 更新值\n $.extend((i ? dataRet[childrenKey] : dataRet)[indexArr[i]], newValue);\n }\n }\n dataRet = i ? dataRet[childrenKey][indexArr[i]] : dataRet[indexArr[i]];\n }\n return clone ? $.extend({}, dataRet) : dataRet;\n }\n\n treeTable.getNodeDataByIndex = function (id, index) {\n var that = getThisTable(id);\n if(!that) return;\n return that.getNodeDataByIndex(index, true);\n }\n\n // 判断是否是父节点\n var checkIsParent = function (data, isParentKey, childrenKey) {\n isParentKey = isParentKey || 'isParent';\n childrenKey = childrenKey || 'children';\n layui.each(data, function (i1, item1) {\n if (!(isParentKey in item1)) {\n item1[isParentKey] = !!(item1[childrenKey] && item1[childrenKey].length);\n checkIsParent(item1[childrenKey]);\n }\n })\n }\n\n Class.prototype.initData = function (data, parentIndex) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableId = options.id;\n\n data = data || that.getTableData();\n\n var customName = treeOptions.customName;\n var isParentKey = customName.isParent;\n var childrenKey = customName.children;\n\n layui.each(data, function (i1, item1) {\n if (!(isParentKey in item1)) {\n item1[isParentKey] = !!(item1[childrenKey] && item1[childrenKey].length);\n }\n item1[LAY_DATA_INDEX_HISTORY] = item1[LAY_DATA_INDEX];\n item1[LAY_PARENT_INDEX] = parentIndex = parentIndex || '';\n var dataIndex = item1[LAY_DATA_INDEX] = (parentIndex ? parentIndex + '-' : '') + i1;\n that.initData(item1[childrenKey] || [], dataIndex);\n });\n\n updateCache(tableId, childrenKey, data);\n\n return data;\n }\n\n // 与 tableId 有关带防抖的方法\n var debounceFn = (function () {\n var fn = {};\n return function (tableId, func, wait) {\n if (!fn[tableId]) {\n fn[tableId] = layui.debounce(func, wait);\n }\n return fn[tableId];\n }\n })()\n\n // 优化参数,添加一个 getNodeByIndex 方法 只传 表格id 和行 dataIndex 分几步优化 todo\n var expandNode = function (treeNode, expandFlag, sonSign, focus, callbackFlag) {\n // treeNode // 需要展开的节点\n var trElem = treeNode.trElem;\n var tableViewElem = treeNode.tableViewElem || trElem.closest(ELEM_VIEW);\n var tableId = treeNode.tableId || tableViewElem.attr('lay-id');\n var options = treeNode.options || table.getOptions(tableId);\n var dataIndex = treeNode.dataIndex || trElem.attr('lay-data-index'); // 可能出现多层\n var treeTableThat = getThisTable(tableId);\n\n var treeOptions = options.tree || {};\n var customName = treeOptions.customName || {};\n var isParentKey = customName.isParent;\n\n var trData = treeTableThat.getNodeDataByIndex(dataIndex);\n\n // 后续调优:对已经展开的节点进行展开和已经关闭的节点进行关闭应该做优化减少不必要的代码执行 todo\n var isToggle = layui.type(expandFlag) !== 'boolean';\n var trExpand = isToggle ? !trData[LAY_EXPAND] : expandFlag;\n var retValue = trData[isParentKey] ? trExpand : null;\n\n if (callbackFlag && trExpand != trData[LAY_EXPAND] && (!trData[LAY_ASYNC_STATUS] || trData[LAY_ASYNC_STATUS] === 'local')) {\n var beforeExpand = treeOptions.callback.beforeExpand;\n if (layui.type(beforeExpand) === 'function') {\n if (beforeExpand(tableId, trData, expandFlag) === false) {\n return retValue;\n }\n }\n }\n\n var trExpanded = trData[LAY_HAS_EXPANDED]; // 展开过,包括异步加载\n\n // 找到表格中的同类节点(需要找到lay-data-index一致的所有行)\n var trsElem = tableViewElem.find('tr[lay-data-index=\"' + dataIndex + '\"]');\n // 处理折叠按钮图标\n var flexIconElem = trsElem.find('.layui-table-tree-flexIcon');\n flexIconElem.html(trExpand ? treeOptions.view.flexIconOpen : treeOptions.view.flexIconClose)\n trData[isParentKey] && flexIconElem.css('visibility', 'visible');\n // 处理节点图标\n treeOptions.view.showIcon && trsElem\n .find('.layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)')\n .html(trExpand ? treeOptions.view.iconOpen : treeOptions.view.iconClose);\n trData[LAY_EXPAND] = trExpand;\n var trDataId = trData[customName.id];\n trDataId !== undefined && (treeTableThat.status.expand[trDataId] = trExpand);\n if (retValue === null) {\n return retValue;\n }\n\n var childNodes = trData[customName.children] || [];\n // 处理子节点展示与否\n if (trExpand) {\n // 展开\n if (trExpanded) { // 已经展开过\n if (!childNodes.length) return ;//异步如果子节点没有数据情况下双点行展开所有已展开的节点问题解决\n trsElem.nextAll(childNodes.map(function (value, index, array) {\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\n }).join(',')).removeClass(HIDE);\n layui.each(childNodes, function (i1, item1) {\n if (!item1[isParentKey]) {\n return;\n }\n\n if (sonSign && !isToggle && !item1[LAY_EXPAND]) { // 非状态切换的情况下\n // 级联展开子节点\n expandNode({\n dataIndex: item1[LAY_DATA_INDEX],\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\n tableViewElem: tableViewElem,\n tableId: tableId,\n options: options,\n }, expandFlag, sonSign, focus, callbackFlag);\n } else if (item1[LAY_EXPAND]) { // 初始化级联展开\n expandNode({\n dataIndex: item1[LAY_DATA_INDEX],\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\n tableViewElem: tableViewElem,\n tableId: tableId,\n options: options,\n }, true);\n }\n });\n } else {\n var asyncSetting = treeOptions.async || {};\n var asyncUrl = asyncSetting.url || options.url;\n if (asyncSetting.enable && trData[isParentKey] && !trData[LAY_ASYNC_STATUS]) {\n trData[LAY_ASYNC_STATUS] = 'loading';\n flexIconElem.html('');\n\n // 异步获取子节点数据成功之后处理方法\n var asyncSuccessFn = function (data) {\n trData[LAY_ASYNC_STATUS] = 'success';\n trData[customName.children] = data;\n treeTableThat.initData(trData[customName.children], trData[LAY_DATA_INDEX])\n expandNode(treeNode, true, isToggle ? false : sonSign, focus, callbackFlag);\n }\n\n var format = asyncSetting.format; // 自定义数据返回方法\n if (layui.type(format) === 'function') {\n format(trData, options, asyncSuccessFn);\n return retValue;\n }\n\n var params = {};\n // 参数\n var data = $.extend(params, asyncSetting.where || options.where);\n var asyncAutoParam = asyncSetting.autoParam;\n layui.each(asyncAutoParam, function (index, item) {\n var itemStr = item;\n var itemArr = item.split('=');\n data[itemArr[0].trim()] = trData[(itemArr[1] || itemArr[0]).trim()]\n })\n\n var asyncContentType = asyncSetting.contentType || options.contentType;\n if (asyncContentType && asyncContentType.indexOf(\"application/json\") == 0) { // 提交 json 格式\n data = JSON.stringify(data);\n }\n var asyncType = asyncSetting.method || options.method;\n var asyncDataType = asyncSetting.dataType || options.dataType;\n var asyncJsonpCallback = asyncSetting.jsonpCallback || options.jsonpCallback;\n var asyncHeaders = asyncSetting.headers || options.headers;\n var asyncParseData = asyncSetting.parseData || options.parseData;\n var asyncResponse = asyncSetting.response || options.response;\n\n $.ajax({\n type: asyncType || 'get',\n url: asyncUrl,\n contentType: asyncContentType,\n data: data,\n dataType: asyncDataType || 'json',\n jsonpCallback: asyncJsonpCallback,\n headers: asyncHeaders || {},\n success: function (res) {\n // 若有数据解析的回调,则获得其返回的数据\n if (typeof asyncParseData === 'function') {\n res = asyncParseData.call(options, res) || res;\n }\n // 检查数据格式是否符合规范\n if (res[asyncResponse.statusName] != asyncResponse.statusCode) {\n trData[LAY_ASYNC_STATUS] = 'error';\n // 异常处理 todo\n flexIconElem.html('');\n // 事件\n } else {\n // 正常返回\n asyncSuccessFn(res[asyncResponse.dataName]);\n }\n },\n error: function (e, msg) {\n trData[LAY_ASYNC_STATUS] = 'error';\n // 异常处理 todo\n typeof options.error === 'function' && options.error(e, msg);\n }\n });\n return retValue;\n }\n trExpanded = trData[LAY_HAS_EXPANDED] = true;\n if (childNodes.length) {\n // 判断是否需要排序\n if (options.initSort && (!options.url || options.autoSort)) {\n var initSort = options.initSort;\n if (initSort.type) {\n layui.sort(childNodes, initSort.field, initSort.type === 'desc', true);\n } else {\n // 恢复默认\n layui.sort(childNodes, table.config.indexName, null, true);\n }\n }\n treeTableThat.initData(trData[customName.children], trData[LAY_DATA_INDEX]);\n // 将数据通过模板得出节点的html代码\n var str2 = table.getTrHtml(tableId, childNodes, null, null, dataIndex);\n\n var str2Obj = {\n trs: $(str2.trs.join('')),\n trs_fixed: $(str2.trs_fixed.join('')),\n trs_fixed_r: $(str2.trs_fixed_r.join(''))\n }\n var dataLevel = dataIndex.split('-').length - 1;\n var dataLevelNew = (dataLevel || 0) + 1;\n layui.each(childNodes, function (childIndex, childItem) {\n str2Obj.trs.eq(childIndex).attr({\n 'data-index': childItem[LAY_DATA_INDEX],\n 'lay-data-index': childItem[LAY_DATA_INDEX],\n 'data-level': dataLevelNew\n })\n str2Obj.trs_fixed.eq(childIndex).attr({\n 'data-index': childItem[LAY_DATA_INDEX],\n 'lay-data-index': childItem[LAY_DATA_INDEX],\n 'data-level': dataLevelNew\n })\n str2Obj.trs_fixed_r.eq(childIndex).attr({\n 'data-index': childItem[LAY_DATA_INDEX],\n 'lay-data-index': childItem[LAY_DATA_INDEX],\n 'data-level': dataLevelNew\n })\n })\n\n tableViewElem.find(ELEM_MAIN).find('tbody tr[lay-data-index=\"' + dataIndex + '\"]').after(str2Obj.trs);\n tableViewElem.find(ELEM_FIXL).find('tbody tr[lay-data-index=\"' + dataIndex + '\"]').after(str2Obj.trs_fixed);\n tableViewElem.find(ELEM_FIXR).find('tbody tr[lay-data-index=\"' + dataIndex + '\"]').after(str2Obj.trs_fixed_r);\n\n // 初始化新增的节点中的内容\n treeTableThat.renderTreeTable(str2Obj.trs, dataLevelNew);\n\n if (sonSign && !isToggle) { // 非状态切换的情况下\n // 级联展开/关闭子节点\n layui.each(childNodes, function (i1, item1) {\n expandNode({\n dataIndex: item1[LAY_DATA_INDEX],\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\n tableViewElem: tableViewElem,\n tableId: tableId,\n options: options,\n }, expandFlag, sonSign, focus, callbackFlag);\n })\n }\n }\n }\n } else {\n treeTableThat.isExpandAll = false;\n // 关闭\n if (sonSign && !isToggle) { // 非状态切换的情况下\n layui.each(childNodes, function (i1, item1) {\n expandNode({\n dataIndex: item1[LAY_DATA_INDEX],\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\n tableViewElem: tableViewElem,\n tableId: tableId,\n options: options,\n }, expandFlag, sonSign, focus, callbackFlag);\n });\n tableViewElem.find(childNodes.map(function (value, index, array) { // 只隐藏直接子节点,其他由递归的处理\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\n }).join(',')).addClass(HIDE);\n } else {\n var childNodesFlat = treeTableThat.treeToFlat(childNodes, trData[customName.id], dataIndex);\n tableViewElem.find(childNodesFlat.map(function (value, index, array) {\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\n }).join(',')).addClass(HIDE);\n }\n }\n\n\n debounceFn('resize-' + tableId, function () {\n treeTable.resize(tableId);\n }, 0)();\n\n if (callbackFlag && trData[LAY_ASYNC_STATUS] !== 'loading') {\n var onExpand = treeOptions.callback.onExpand;\n layui.type(onExpand) === 'function' && onExpand(tableId, trData, trExpand);\n }\n\n return retValue;\n }\n\n /**\n * 展开或关闭一个节点\n * @param {String} id 树表id\n * @param {Object} opts\n * @param {Number|String} opts.index 展开行的数据下标\n * @param {Boolean} [opts.expandFlag] 展开、关闭、切换\n * @param {Boolean} [opts.inherit] 是否级联子节点\n * @param {Boolean} [opts.callbackFlag] 是否触发事件\n * @return [{Boolean}] 状态结果\n * */\n treeTable.expandNode = function (id, opts) {\n var that = getThisTable(id);\n if (!that) return;\n\n opts = opts || {};\n\n var index = opts.index;\n var expandFlag = opts.expandFlag;\n var sonSign = opts.inherit;\n var callbackFlag = opts.callbackFlag;\n\n var options = that.getOptions();\n var tableViewElem = options.elem.next();\n return expandNode({\n trElem: tableViewElem.find('tr[lay-data-index=\"' + index + '\"]').first()\n }, expandFlag, sonSign, null, callbackFlag)\n };\n\n /**\n * 展开或关闭全部节点\n * @param {String} id 树表id\n * @param {Boolean} expandFlag 展开或关闭\n * */\n treeTable.expandAll = function (id, expandFlag) {\n if (layui.type(expandFlag) !== 'boolean') {\n return hint.error('expandAll 的展开状态参数只接收true/false')\n }\n\n var that = getThisTable(id);\n if (!that) return;\n\n that.isExpandAll = expandFlag;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableView = options.elem.next();\n var isParentKey = treeOptions.customName.isParent;\n var idKey = treeOptions.customName.id;\n var showFlexIconIfNotParent = treeOptions.view.showFlexIconIfNotParent;\n\n if (!expandFlag) {\n // 关闭所有\n // 将所有已经打开的节点的状态设置为关闭,\n that.updateStatus(null, function (d) {\n if (d[isParentKey] || showFlexIconIfNotParent) {\n d[LAY_EXPAND] = false;\n d[idKey] !== undefined && (that.status.expand[d[idKey]] = false);\n }\n }) // 只处理当前页,如果需要处理全部表格,需要用treeTable.updateStatus\n // 隐藏所有非顶层的节点\n tableView.find('.layui-table-box tbody tr[data-level!=\"0\"]').addClass(HIDE);\n\n tableView.find('.layui-table-tree-flexIcon').html(treeOptions.view.flexIconClose);\n treeOptions.view.showIcon && tableView\n .find('.layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)')\n .html(treeOptions.view.iconClose);\n } else {\n var tableDataFlat = treeTable.getData(id, true);\n // 展开所有\n // 存在异步加载\n if (treeOptions.async.enable) {\n // 判断是否有未加载过的节点\n var isAllAsyncDone = true;\n layui.each(tableDataFlat, function (i1, item1) {\n if (item1[isParentKey] && !item1[LAY_ASYNC_STATUS]) {\n isAllAsyncDone = false;\n return true;\n }\n })\n // 有未加载过的节点\n if (!isAllAsyncDone) {\n // 逐个展开\n layui.each(treeTable.getData(id), function (i1, item1) {\n treeTable.expandNode(id, {\n index: item1[LAY_DATA_INDEX],\n expandFlag: true,\n inherit: true\n })\n })\n return;\n }\n }\n\n // 先判断是否全部打开过了\n var isAllExpanded = true;\n layui.each(tableDataFlat, function (i1, item1) {\n if (item1[isParentKey] && !item1[LAY_HAS_EXPANDED]) {\n isAllExpanded = false;\n return true;\n }\n })\n // 如果全部节点已经都打开过,就可以简单处理跟隐藏所有节点反操作\n if (isAllExpanded) {\n that.updateStatus(null, function (d) {\n if (d[isParentKey] || showFlexIconIfNotParent) {\n d[LAY_EXPAND] = true;\n d[idKey] !== undefined && (that.status.expand[d[idKey]] = true);\n }\n });\n // 显示所有子节点\n tableView.find('tbody tr[data-level!=\"0\"]').removeClass(HIDE);\n // 处理节点的图标\n tableView.find('.layui-table-tree-flexIcon').html(treeOptions.view.flexIconOpen);\n treeOptions.view.showIcon && tableView\n .find('.layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)')\n .html(treeOptions.view.iconOpen);\n } else {\n // 如果有未打开过的父节点,将 tr 内容全部重新生成\n that.updateStatus(null, function (d) {\n if (d[isParentKey] || showFlexIconIfNotParent) {\n d[LAY_EXPAND] = true;\n d[LAY_HAS_EXPANDED] = true;\n d[idKey] !== undefined && (that.status.expand[d[idKey]] = true);\n }\n });\n if (options.initSort && options.initSort.type && options.autoSort) {\n return treeTable.sort(id);\n }\n var trAll = table.getTrHtml(id, tableDataFlat);\n\n var trAllObj = {\n trs: $(trAll.trs.join('')),\n trs_fixed: $(trAll.trs_fixed.join('')),\n trs_fixed_r: $(trAll.trs_fixed_r.join(''))\n }\n var props;\n layui.each(tableDataFlat, function (dataIndex, dataItem) {\n var dataLevel = dataItem[LAY_DATA_INDEX].split('-').length - 1;\n props = {\n 'data-index': dataItem[LAY_DATA_INDEX],\n 'lay-data-index': dataItem[LAY_DATA_INDEX],\n 'data-level': dataLevel\n };\n trAllObj.trs.eq(dataIndex).attr(props)\n trAllObj.trs_fixed.eq(dataIndex).attr(props)\n trAllObj.trs_fixed_r.eq(dataIndex).attr(props)\n })\n layui.each(['main', 'fixed-l', 'fixed-r'], function (i, item) {\n tableView.find('.layui-table-' + item + ' tbody').html(trAllObj[['trs', 'trs_fixed', 'trs_fixed_r'][i]]);\n });\n that.renderTreeTable(tableView, 0, false);\n }\n }\n treeTable.resize(id);\n }\n\n Class.prototype.renderTreeTable = function (tableView, level, sonSign) {\n var that = this;\n var options = that.getOptions();\n var tableViewElem = options.elem.next();\n !tableViewElem.hasClass(TABLE_TREE) && tableViewElem.addClass(TABLE_TREE);\n var tableId = options.id;\n var treeOptions = options.tree || {};\n var treeOptionsData = treeOptions.data || {};\n var treeOptionsView = treeOptions.view || {};\n var customName = treeOptions.customName || {};\n var isParentKey = customName.isParent;\n var tableFilterId = tableViewElem.attr('lay-filter');\n var treeTableThat = that;\n // var tableData = treeTableThat.getTableData();\n\n level = level || 0;\n\n if (!level) {\n // 初始化的表格里面没有level信息,可以作为顶层节点的判断\n tableViewElem.find('.layui-table-body tr:not([data-level])').attr('data-level', level);\n layui.each(table.cache[tableId], function (dataIndex, dataItem) {\n tableViewElem.find('.layui-table-main tbody tr[data-level=\"0\"]:eq(' + dataIndex + ')').attr('lay-data-index', dataItem[LAY_DATA_INDEX]);\n tableViewElem.find('.layui-table-fixed-l tbody tr[data-level=\"0\"]:eq(' + dataIndex + ')').attr('lay-data-index', dataItem[LAY_DATA_INDEX]);\n tableViewElem.find('.layui-table-fixed-r tbody tr[data-level=\"0\"]:eq(' + dataIndex + ')').attr('lay-data-index', dataItem[LAY_DATA_INDEX]);\n })\n }\n\n var dataExpand = null; // 记录需要展开的数据\n var nameKey = customName.name;\n var indent = treeOptionsView.indent || 14;\n layui.each(tableView.find('td[data-field=\"' + nameKey + '\"]'), function (index, item) {\n item = $(item);\n var trElem = item.closest('tr');\n var itemCell = item.children('.layui-table-cell');\n if (itemCell.hasClass('layui-table-tree-item')) {\n return;\n }\n var trIndex = trElem.attr('lay-data-index');\n if (!trIndex) { // 排除在统计行中的节点\n return;\n }\n trElem = tableViewElem.find('tr[lay-data-index=\"' + trIndex + '\"]');\n var trData = treeTableThat.getNodeDataByIndex(trIndex);\n\n if (trData[LAY_EXPAND] && trData[isParentKey]) {\n // 需要展开\n dataExpand = dataExpand || {};\n dataExpand[trIndex] = true;\n }\n if (trData[LAY_CHECKBOX_HALF]) {\n trElem.find('input[type=\"checkbox\"][name=\"layTableCheckbox\"]').prop('indeterminate', true);\n }\n\n var htmlTemp = itemCell.html();\n itemCell = trElem.find('td[data-field=\"' + nameKey + '\"]>div.layui-table-cell');\n itemCell.addClass('layui-table-tree-item');\n var flexIconElem = itemCell\n .html(['
                  ',\n trData[LAY_EXPAND] ? treeOptionsView.flexIconOpen : treeOptionsView.flexIconClose, // 折叠图标\n '
                  ',\n treeOptionsView.showIcon ? '
                  ' +\n (trData[customName.icon] || treeOptionsView.icon ||\n (trData[isParentKey] ?\n (trData[LAY_EXPAND] ? treeOptionsView.iconOpen : treeOptionsView.iconClose) :\n treeOptionsView.iconLeaf) ||\n '') + '
                  ' : '', // 区分父子节点\n htmlTemp].join('')) // 图标要可定制\n .find('.layui-table-tree-flexIcon');\n\n // 添加展开按钮的事件\n flexIconElem.on('click', function (event) {\n layui.stope(event);\n // 处理数据\n // var trElem = item.closest('tr');\n expandNode({trElem: trElem}, null, null, null, true);\n });\n });\n\n if (!level && treeOptions.view.expandAllDefault && that.isExpandAll === undefined) {\n return treeTable.expandAll(tableId, true); // 默认展开全部\n }\n\n // 当前层的数据看看是否需要展开\n if (sonSign !== false && dataExpand) {\n layui.each(dataExpand, function (index, item) {\n var trDefaultExpand = tableViewElem.find('tr[lay-data-index=\"' + index + '\"]');\n trDefaultExpand.find('.layui-table-tree-flexIcon').html(treeOptionsView.flexIconOpen);\n expandNode({trElem: trDefaultExpand.first()}, true);\n });\n } else {\n debounceFn('renderTreeTable-' + tableId, function () {\n options.hasNumberCol && formatNumber(that);\n form.render($('.layui-table-tree[lay-id=\"' + tableId + '\"]'));\n }, 0)();\n }\n }\n\n var formatNumber = function (that) {\n var options = that.getOptions();\n var tableViewElem = options.elem.next();\n\n var num = 0;\n var trMain = tableViewElem.find('.layui-table-main tbody tr');\n var trFixedL = tableViewElem.find('.layui-table-fixed-l tbody tr');\n var trFixedR = tableViewElem.find('.layui-table-fixed-r tbody tr');\n layui.each(that.treeToFlat(table.cache[options.id]), function (i1, item1) {\n if (item1['LAY_HIDE']) return;\n var itemData = that.getNodeDataByIndex(item1[LAY_DATA_INDEX]);\n itemData['LAY_NUM'] = ++num;\n trMain.eq(i1).find('.laytable-cell-numbers').html(num);\n trFixedL.eq(i1).find('.laytable-cell-numbers').html(num);\n trFixedR.eq(i1).find('.laytable-cell-numbers').html(num);\n })\n }\n\n // 树表渲染\n Class.prototype.render = function (type) {\n var that = this;\n that.tableIns = table[type === 'reloadData' ? 'reloadData' : 'reload'](that.tableIns.config.id, $.extend(true, {}, that.config));\n that.config = that.tableIns.config;\n };\n\n // 表格重载\n Class.prototype.reload = function (options, deep, type) {\n var that = this;\n\n options = options || {};\n delete that.haveInit;\n\n // 防止数组深度合并\n layui.each(options, function (key, item) {\n if (layui.type(item) === 'array') delete that.config[key];\n });\n\n // 根据需要处理options中的一些参数\n updateOptions(that.getOptions().id, options, type || true);\n\n // 对参数进行深度或浅扩展\n that.config = $.extend(deep, {}, that.config, options);\n\n // 执行渲染\n that.render(type);\n };\n\n // 仅重载数据\n treeTable.reloadData = function () {\n var args = $.extend(true, [], arguments);\n args[3] = 'reloadData';\n\n return treeTable.reload.apply(null, args);\n };\n\n var updateStatus = function (data, statusObj, childrenKey, notCascade) {\n var dataUpdated = [];\n layui.each(data, function (i1, item1) {\n if (layui.type(statusObj) === 'function') {\n statusObj(item1);\n } else {\n $.extend(item1, statusObj);\n }\n dataUpdated.push($.extend({}, item1));\n notCascade || (dataUpdated = dataUpdated.concat(updateStatus(item1[childrenKey], statusObj, childrenKey, notCascade)));\n });\n return dataUpdated;\n }\n\n Class.prototype.updateStatus = function (data, statusObj, notCascade) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n data = data || table.cache[options.id];\n\n return updateStatus(data, statusObj, treeOptions.customName.children, notCascade);\n }\n\n Class.prototype.getTableData = function () {\n var that = this;\n var options = that.getOptions();\n // return options.url ? table.cache[options.id] : options.data;\n return table.cache[options.id];\n }\n\n treeTable.updateStatus = function (id, statusObj, data) {\n var that = getThisTable(id);\n var options = that.getOptions();\n if (!data) {\n if (options.url) {\n data = table.cache[options.id];\n } else {\n data = options.data;\n }\n }\n return that.updateStatus(data, statusObj);\n }\n\n treeTable.sort = function (id) {\n var that = getThisTable(id);\n if(!that) return;\n\n var options = that.getOptions();\n if (options.autoSort) {\n that.initData();\n treeTable.renderData(id);\n }\n }\n\n // 处理事件\n var updateObjParams = function (obj) {\n var tableId = obj.config.id;\n var tableThat = getThisTable(tableId);\n var trData = obj.data = treeTable.getNodeDataByIndex(tableId, obj.index); // 克隆的\n var trIndex = trData[LAY_DATA_INDEX];\n obj.dataIndex = trIndex;\n\n // 处理update方法\n var updateFn = obj.update;\n obj.update = function () {\n var updateThat = this;\n var args = arguments;\n $.extend(tableThat.getNodeDataByIndex(trIndex), args[0]);\n var ret = updateFn.apply(updateThat, args); // 主要负责更新节点内容\n var nameKey = obj.config.tree.customName.name;\n nameKey in args[0] && obj.tr.find('td[data-field=\"' + nameKey + '\"]').children('div.layui-table-cell').removeClass('layui-table-tree-item');\n tableThat.renderTreeTable(obj.tr, obj.tr.attr('data-level'), false);\n return ret;\n }\n\n // 处理del方法\n obj.del = function () {\n treeTable.removeNode(tableId, trData);\n }\n\n // 处理setRowChecked\n obj.setRowChecked = function (checked) {\n treeTable.setRowChecked(tableId, {\n index: trData,\n checked: checked\n });\n }\n }\n\n // 更新数据\n treeTable.updateNode = function (id, index, newNode) {\n var that = getThisTable(id);\n if(!that) return;\n\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableView = options.elem.next();\n var trElem = tableView.find('tr[lay-data-index=\"' + index + '\"]');\n var trIndex = trElem.attr('data-index');\n var trLevel = trElem.attr('data-level')\n\n if (!newNode) {\n return;\n }\n // 更新值\n var newNodeTemp = that.getNodeDataByIndex(index, false, newNode);\n // 获取新的tr替换\n var trNew = table.getTrHtml(id, [newNodeTemp]);\n // 重新渲染tr\n layui.each(['main', 'fixed-l', 'fixed-r'], function (i, item) {\n tableView.find('.layui-table-' + item + ' tbody tr[lay-data-index=\"' + index + '\"]').replaceWith($(trNew[['trs', 'trs_fixed', 'trs_fixed_r'][i]].join('')).attr({\n 'data-index': trIndex,\n 'lay-data-index': index,\n 'data-level': trLevel\n }));\n });\n that.renderTreeTable(tableView.find('tr[lay-data-index=\"' + index + '\"]'), trLevel);\n }\n\n // 删除数据\n treeTable.removeNode = function (id, node) {\n var that = getThisTable(id);\n if(!that) return;\n\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableView = options.elem.next();\n var delNode;\n var indexArr = [];\n delNode = that.getNodeDataByIndex(layui.type(node) === 'string' ? node : node[LAY_DATA_INDEX], false, 'delete');\n var nodeP = that.getNodeDataByIndex(delNode[LAY_PARENT_INDEX]);\n that.updateCheckStatus(nodeP);\n var delNodesFlat = that.treeToFlat([delNode], delNode[treeOptions.customName.pid], delNode[LAY_PARENT_INDEX]);\n layui.each(delNodesFlat, function (i2, item2) {\n indexArr.push('tr[lay-data-index=\"' + item2[LAY_DATA_INDEX] + '\"]');\n })\n\n tableView.find(indexArr.join(',')).remove(); // 删除行\n // 重新整理数据\n var tableData = that.initData();\n // index发生变化需要更新页面tr中对应的lay-data-index 新增和删除都要注意数据结构变动之后的index问题\n layui.each(that.treeToFlat(tableData), function (i3, item3) {\n if (item3[LAY_DATA_INDEX_HISTORY] && item3[LAY_DATA_INDEX_HISTORY] !== item3[LAY_DATA_INDEX]) {\n tableView.find('tr[lay-data-index=\"' + item3[LAY_DATA_INDEX_HISTORY] + '\"]').attr({\n 'data-index': item3[LAY_DATA_INDEX],\n 'lay-data-index': item3[LAY_DATA_INDEX],\n });\n // item3[LAY_DATA_INDEX_HISTORY] = item3[LAY_DATA_INDEX]\n }\n });\n // 重新更新顶层节点的data-index;\n layui.each(table.cache[id], function (i4, item4) {\n tableView.find('tr[data-level=\"0\"][lay-data-index=\"' + item4[LAY_DATA_INDEX] + '\"]').attr('data-index', i4);\n })\n options.hasNumberCol && formatNumber(that);\n\n // 重新适配尺寸\n treeTable.resize(id);\n }\n\n /**\n * 新增数据节点\n * @param {String} id 树表id\n * @param {Object} opts\n * @param {String|Number} opts.parentIndex 指定的父节点,如果增加根节点,请设置 parentIndex 为 null 即可\n * @param {Number} opts.index 新节点插入的位置(从 0 开始)index = -1(默认) 时,插入到最后\n * @param {Object|Array} opts.data 新增的节点,单个或者多个\n * @param {Boolean} opts.focus 新增的节点,单个或者多个\n * @return {Array} 新增的节点\n * */\n treeTable.addNodes = function (id, opts) {\n var that = getThisTable(id);\n if(!that) return;\n\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableViewElem = options.elem.next();\n var checkName = table.config.checkName;\n\n opts = opts || {};\n\n var parentIndex = opts.parentIndex;\n var index = opts.index;\n var newNodes = opts.data;\n var focus = opts.focus;\n\n parentIndex = layui.type(parentIndex) === 'number' ? parentIndex.toString() : parentIndex;\n var parentNode = parentIndex ? that.getNodeDataByIndex(parentIndex) : null;\n index = layui.type(index) === 'number' ? index : -1;\n\n // 添加数据\n newNodes = $.extend(true, [], (layui.isArray(newNodes) ? newNodes : [newNodes]));\n\n // 若未传入 LAY_CHECKED 属性,则继承父节点的 checked 状态\n layui.each(newNodes, function(i, item){\n if(!(checkName in item)){\n item[checkName] = parentNode[checkName];\n }\n })\n\n var tableData = that.getTableData(), dataAfter;\n if (!parentNode) {\n // 添加到根节点\n dataAfter = table.cache[id].splice(index === -1 ? table.cache[id].length : index);\n table.cache[id] = table.cache[id].concat(newNodes, dataAfter);\n if (!options.url) {\n // 静态data模式\n if (!options.page) {\n options.data = table.cache[id];\n } else {\n var pageOptions = options.page;\n options.data.splice.apply(options.data, [pageOptions.limit * (pageOptions.curr - 1), pageOptions.limit].concat(table.cache[id]))\n }\n }\n // 将新节点添加到页面\n tableData = that.initData();\n\n if (tableViewElem.find('.layui-none').length) {\n table.renderData(id);\n return newNodes;\n }\n\n var newNodesHtml = table.getTrHtml(id, newNodes);\n var newNodesHtmlObj = {\n trs: $(newNodesHtml.trs.join('')),\n trs_fixed: $(newNodesHtml.trs_fixed.join('')),\n trs_fixed_r: $(newNodesHtml.trs_fixed_r.join(''))\n }\n\n var attrs = {};\n layui.each(newNodes, function (newNodeIndex, newNodeItem) {\n attrs = {\n 'data-index': newNodeItem[LAY_DATA_INDEX],\n 'lay-data-index': newNodeItem[LAY_DATA_INDEX],\n 'data-level': '0'\n };\n newNodesHtmlObj.trs.eq(newNodeIndex).attr(attrs)\n newNodesHtmlObj.trs_fixed.eq(newNodeIndex).attr(attrs)\n newNodesHtmlObj.trs_fixed_r.eq(newNodeIndex).attr(attrs)\n })\n var trIndexPrev = parseInt(newNodes[0][LAY_DATA_INDEX]) - 1;\n var tableViewElemMAIN = tableViewElem.find(ELEM_MAIN);\n var tableViewElemFIXL = tableViewElem.find(ELEM_FIXL);\n var tableViewElemFIXR = tableViewElem.find(ELEM_FIXR);\n if (trIndexPrev === -1) {\n // 插入到开头\n tableViewElemMAIN.find('tr[data-level=\"0\"][data-index=\"0\"]').before(newNodesHtmlObj.trs);\n tableViewElemFIXL.find('tr[data-level=\"0\"][data-index=\"0\"]').before(newNodesHtmlObj.trs_fixed);\n tableViewElemFIXR.find('tr[data-level=\"0\"][data-index=\"0\"]').before(newNodesHtmlObj.trs_fixed_r);\n } else {\n if (index === -1) {\n // 追加到最后\n tableViewElemMAIN.find('tbody').append(newNodesHtmlObj.trs);\n tableViewElemFIXL.find('tbody').append(newNodesHtmlObj.trs_fixed);\n tableViewElemFIXR.find('tbody').append(newNodesHtmlObj.trs_fixed_r);\n } else {\n var trIndexNext = dataAfter[0][LAY_DATA_INDEX_HISTORY];\n tableViewElemMAIN.find('tr[data-level=\"0\"][data-index=\"' + trIndexNext + '\"]').before(newNodesHtmlObj.trs);\n tableViewElemFIXL.find('tr[data-level=\"0\"][data-index=\"' + trIndexNext + '\"]').before(newNodesHtmlObj.trs_fixed);\n tableViewElemFIXR.find('tr[data-level=\"0\"][data-index=\"' + trIndexNext + '\"]').before(newNodesHtmlObj.trs_fixed_r);\n }\n\n }\n\n // 重新更新顶层节点的data-index;\n layui.each(table.cache[id], function (i4, item4) {\n tableViewElem.find('tr[data-level=\"0\"][lay-data-index=\"' + item4[LAY_DATA_INDEX] + '\"]').attr('data-index', i4);\n })\n\n that.renderTreeTable(tableViewElem.find(newNodes.map(function (value, index, array) {\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\n }).join(',')));\n } else {\n var isParentKey = treeOptions.customName.isParent;\n var childKey = treeOptions.customName.children;\n\n parentNode[isParentKey] = true;\n var childrenNodes = parentNode[childKey];\n if (!childrenNodes) {\n childrenNodes = parentNode[childKey] = newNodes;\n } else {\n dataAfter = childrenNodes.splice(index === -1 ? childrenNodes.length : index);\n childrenNodes = parentNode[childKey] = childrenNodes.concat(newNodes, dataAfter);\n }\n // 删除已经存在的同级节点以及他们的子节点,并且把中间节点的已展开过的状态设置为false\n that.updateStatus(childrenNodes, function (d) {\n if (d[isParentKey] || treeOptions.view.showFlexIconIfNotParent) {\n d[LAY_HAS_EXPANDED] = false;\n }\n });\n var childrenNodesFlat = that.treeToFlat(childrenNodes);\n tableViewElem.find(childrenNodesFlat.map(function (value) {\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\n }).join(',')).remove();\n\n tableData = that.initData();\n // 去掉父节点的已经展开过的状态,重新执行一次展开的方法\n parentNode[LAY_HAS_EXPANDED] = false;\n parentNode[LAY_ASYNC_STATUS] = 'local'; // 转为本地数据,应该规定异步加载子节点的时候addNodes的规则\n expandNode({trElem: tableViewElem.find('tr[lay-data-index=\"' + parentIndex + '\"]')}, true)\n }\n that.updateCheckStatus(parentNode);\n treeTable.resize(id);\n if (focus) {\n // 滚动到第一个新增的节点\n tableViewElem.find(ELEM_MAIN).find('tr[lay-data-index=\"' + newNodes[0][LAY_DATA_INDEX] + '\"]').get(0).scrollIntoViewIfNeeded();\n }\n\n return newNodes;\n }\n\n // 获取表格选中状态\n treeTable.checkStatus = function (id, includeHalfCheck) {\n var that = getThisTable(id);\n if (!that) return;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var checkName = table.config.checkName;\n\n // 需要区分单双选\n var tableData = treeTable.getData(id, true);\n var checkedData = tableData.filter(function (value, index, array) {\n return value[checkName] || (includeHalfCheck && value[LAY_CHECKBOX_HALF]);\n });\n\n var isAll = true;\n layui.each(treeOptions.data.cascade === 'all' ? table.cache[id] : treeTable.getData(id, true), function (i1, item1) {\n if (!item1[checkName]) {\n isAll = false;\n return true;\n }\n })\n\n return {\n data: checkedData,\n isAll: isAll\n }\n }\n\n // 排序之后重新渲染成树表\n treeTable.on('sort', function (obj) {\n var options = obj.config;\n var tableView = options.elem.next();\n var tableId = options.id;\n\n if (tableView.hasClass(TABLE_TREE)) {\n treeTable.sort(tableId);\n }\n });\n\n // 行点击\n treeTable.on('row', function (obj) {\n var options = obj.config;\n var tableView = options.elem.next();\n\n if (tableView.hasClass(TABLE_TREE)) {\n updateObjParams(obj);\n }\n })\n\n // 行双击\n treeTable.on('rowDouble', function (obj) {\n var options = obj.config;\n var tableView = options.elem.next();\n var tableId = options.id;\n\n if (tableView.hasClass(TABLE_TREE)) {\n updateObjParams(obj);\n\n var treeOptions = options.tree || {};\n if (treeOptions.view.dblClickExpand) {\n expandNode({trElem: obj.tr.first()}, null, null, null, true);\n }\n }\n })\n\n // 菜单\n treeTable.on('rowContextmenu', function (obj) {\n var options = obj.config;\n var tableView = options.elem.next();\n var tableId = options.id;\n\n if (tableView.hasClass(TABLE_TREE)) {\n updateObjParams(obj);\n }\n })\n\n // tr中带lay-event节点点击\n treeTable.on('tool', function (obj) {\n var options = obj.config;\n var tableView = options.elem.next();\n var tableId = options.id;\n\n if (tableView.hasClass(TABLE_TREE)) {\n updateObjParams(obj);\n }\n })\n\n // 行内编辑\n treeTable.on('edit', function (obj) {\n // 如果编辑涉及到关键的name字段需要重新更新一下tr节点\n var options = obj.config;\n var tableView = options.elem.next();\n var tableId = options.id;\n\n if (tableView.hasClass(TABLE_TREE)) {\n updateObjParams(obj);\n if (obj.field === options.tree.customName.name) {\n var updateData = {};\n updateData[obj.field] = obj.value;\n obj.update(updateData); // 通过update调用执行tr节点的更新\n }\n }\n });\n\n // 单选\n treeTable.on('radio', function (obj) {\n var options = obj.config;\n var tableView = options.elem.next();\n var tableId = options.id;\n\n if (tableView.hasClass(TABLE_TREE)) {\n var that = getThisTable(tableId);\n updateObjParams(obj);\n checkNode.call(that, obj.tr, obj.checked)\n }\n })\n\n // 设置或取消行选中样式\n Class.prototype.setRowCheckedClass = function(tr, checked){\n var that = this;\n var options = that.getOptions();\n\n var index = tr.data('index');\n var tableViewElem = options.elem.next();\n \n tr[checked ? 'addClass' : 'removeClass'](ELEM_CHECKED); // 主体行\n\n // 右侧固定行\n tr.each(function(){\n var index = $(this).data('index');\n var trFixedR = tableViewElem.find('.layui-table-fixed-r tbody tr[data-index=\"'+ index +'\"]');\n trFixedR[checked ? 'addClass' : 'removeClass'](ELEM_CHECKED);\n });\n };\n\n // 更新表格的复选框状态\n Class.prototype.updateCheckStatus = function (dataP, checked) {\n var that = this;\n var options = that.getOptions();\n if (!options.hasChecboxCol) {\n return false; // 如果没有复选列则不需要更新状态\n }\n var treeOptions = options.tree;\n var tableId = options.id;\n var tableView = options.elem.next();\n\n var checkName = table.config.checkName;\n\n var cascade = treeOptions.data.cascade;\n var isCascadeParent = cascade === 'all' || cascade === 'parent';\n\n // 如有必要更新父节点们的状态\n if (isCascadeParent && dataP) {\n var trsP = that.updateParentCheckStatus(dataP, layui.type(checked) === 'boolean' ? checked : null);\n layui.each(trsP, function (indexP, itemP) {\n var checkboxElem = tableView.find('tr[lay-data-index=\"' + itemP[LAY_DATA_INDEX] + '\"] input[name=\"layTableCheckbox\"]:not(:disabled)');\n var checked = itemP[checkName];\n\n // 标记父节点行背景色\n that.setRowCheckedClass(checkboxElem.closest('tr'), checked);\n \n // 设置原始复选框 checked 属性值并渲染\n form.render(checkboxElem.prop({\n checked: checked,\n indeterminate: itemP[LAY_CHECKBOX_HALF]\n }))\n })\n }\n\n // 更新全选的状态\n var isAll = true;\n var isIndeterminate = false;\n var data = treeOptions.data.cascade === 'all' ? table.cache[tableId] : treeTable.getData(tableId, true);\n data = data.filter(function (item) {\n return !item[options.disabledName];\n });\n layui.each(data, function (i1, item1) {\n if (item1[checkName] || item1[LAY_CHECKBOX_HALF]) {\n isIndeterminate = true;\n }\n if (!item1[checkName]) {\n isAll = false;\n }\n if (isIndeterminate && !isAll) {\n return true;\n }\n })\n isIndeterminate = isIndeterminate && !isAll;\n form.render(tableView.find('input[name=\"layTableCheckbox\"][lay-filter=\"layTableAllChoose\"]').prop({\n 'checked': isAll,\n indeterminate: isIndeterminate\n }));\n\n return isAll\n }\n\n // 更新父节点的选中状态\n Class.prototype.updateParentCheckStatus = function (dataP, checked) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableId = options.id;\n var checkName = table.config.checkName;\n var childrenKey = treeOptions.customName.children;\n\n var dataRet = [];\n dataP[LAY_CHECKBOX_HALF] = false; // 先设置为非半选,是否为半选又下面逻辑判断\n if (checked === true) {\n // 为真需要判断子节点的情况\n if (!dataP[childrenKey].length) {\n checked = false;\n } else {\n layui.each(dataP[childrenKey], function (index, item) {\n if (!item[checkName]) { // 只要有一个子节点为false\n checked = false;\n dataP[LAY_CHECKBOX_HALF] = true;\n return true; // 跳出循环\n }\n });\n }\n } else if (checked === false) {\n // 判断是否为半选\n layui.each(dataP[childrenKey], function (index, item) {\n if (item[checkName] || item[LAY_CHECKBOX_HALF]) { // 只要有一个子节点为选中或者半选状态\n dataP[LAY_CHECKBOX_HALF] = true;\n return true;\n }\n });\n } else {\n // 状态不确定的情况下根据子节点的信息\n checked = false;\n var checkedNum = 0;\n layui.each(dataP[childrenKey], function (index, item) {\n if (item[checkName]) {\n checkedNum++;\n }\n });\n checked = dataP[childrenKey].length ? dataP[childrenKey].length === checkedNum : dataP[checkName]; // 如果没有子节点保留原来的状态;\n dataP[LAY_CHECKBOX_HALF] = checked ? false : checkedNum > 0;\n }\n dataP[checkName] = checked;\n dataRet.push($.extend({}, dataP));\n if (dataP[LAY_PARENT_INDEX]) {\n dataRet = dataRet.concat(that.updateParentCheckStatus(table.cache[tableId][dataP[LAY_PARENT_INDEX]], checked));\n }\n return dataRet\n }\n\n var checkNode = function (trElem, checked, callbackFlag) {\n var that = this;\n var options = that.getOptions();\n var treeOptions = options.tree;\n var tableId = options.id;\n var tableView = options.elem.next();\n var inputElem = (trElem.length ? trElem : tableView).find('.laytable-cell-radio, .laytable-cell-checkbox').children('input').last();\n // 判断是单选还是多选 不应该同时存在radio列和checkbox列\n var isRadio = inputElem.attr('type') === 'radio';\n\n if (callbackFlag) {\n var triggerEvent = function () {\n var fn = function (event) {\n layui.stope(event);\n }\n inputElem.parent().on('click', fn); // 添加临时的阻止冒泡事件\n inputElem.next().click();\n inputElem.parent().off('click', fn);\n }\n // 如果需要触发事件可以简单的触发对应节点的click事件\n if (isRadio) {\n // 单选只能选中或者切换其他的不能取消选中 后续看是否有支持的必要 todo\n if (checked && !inputElem.prop('checked')) {\n triggerEvent()\n }\n } else {\n if (layui.type(checked) === 'boolean') {\n if (inputElem.prop('checked') !== checked) {\n // 如果当前已经是想要修改的状态则不做处理\n triggerEvent()\n }\n } else {\n // 切换\n triggerEvent()\n }\n }\n } else {\n var trData = that.getNodeDataByIndex(trElem.attr('data-index'));\n var checkName = table.config.checkName;\n // 如果不触发事件应该有一个方法可以更新数据以及页面的节点\n if (isRadio) {\n if (!trData) {\n // 单选必须是一个存在的行\n return;\n }\n var statusChecked = {};\n statusChecked[checkName] = false;\n // that.updateStatus(null, statusChecked); // 取消其他的选中状态\n that.updateStatus(null, function (d) {\n if (d[checkName]) {\n var radioElem = tableView.find('tr[lay-data-index=\"' + d[LAY_DATA_INDEX] + '\"] input[type=\"radio\"][lay-type=\"layTableRadio\"]');\n d[checkName] = false;\n\n // 取消当前选中行背景色\n that.setRowCheckedClass(radioElem.closest('tr'), false);\n form.render(radioElem.prop('checked', false));\n }\n }); // 取消其他的选中状态\n trData[checkName] = checked;\n\n that.setRowCheckedClass(trElem, checked); // 标记当前选中行背景色\n that.setRowCheckedClass(trElem.siblings(), false); // 取消其他行背景色\n\n form.render(trElem.find('input[type=\"radio\"][lay-type=\"layTableRadio\"]').prop('checked', checked));\n } else {\n // 切换只能用到单条,全选到这一步的时候应该是一个确定的状态\n checked = layui.type(checked) === 'boolean' ? checked : !trData[checkName]; // 状态切换,如果遇到不可操作的节点待处理 todo\n // 全选或者是一个父节点,将子节点的状态同步为当前节点的状态\n // 处理不可操作的信息\n var checkedStatusFn = function (d) {\n if (!d[table.config.disabledName]) { // 节点不可操作的不处理\n d[checkName] = checked;\n d[LAY_CHECKBOX_HALF] = false;\n }\n }\n\n var trs = that.updateStatus(trData ? [trData] : table.cache[tableId], checkedStatusFn, trData && ['parent', 'none'].indexOf(treeOptions.data.cascade) !== -1);\n var checkboxElem = tableView.find(trs.map(function (value) {\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"] input[name=\"layTableCheckbox\"]:not(:disabled)';\n }).join(','));\n\n that.setRowCheckedClass(checkboxElem.closest('tr'), checked); // 标记当前选中行背景色\n form.render(checkboxElem.prop({checked: checked, indeterminate: false}));\n\n var trDataP;\n\n // 更新父节点以及更上层节点的状态\n if (trData && trData[LAY_PARENT_INDEX]) {\n // 找到父节点,然后判断父节点的子节点是否全部选中\n trDataP = that.getNodeDataByIndex(trData[LAY_PARENT_INDEX]);\n }\n\n return that.updateCheckStatus(trDataP, checked);\n }\n }\n }\n\n // 多选\n treeTable.on('checkbox', function (obj) {\n var options = obj.config;\n var tableView = options.elem.next();\n var tableId = options.id;\n\n if (tableView.hasClass(TABLE_TREE)) {\n var that = getThisTable(tableId);\n var checked = obj.checked;\n updateObjParams(obj)\n obj.isAll = checkNode.call(that, obj.tr, checked);\n }\n })\n\n /**\n * 设置行选中状态\n * @param {String} id 树表id\n * @param {Object} opts\n * @param {Object|String} opts.index 节点下标\n * @param {Boolean} opts.checked 选中或取消\n * @param {Boolean} [opts.callbackFlag] 是否触发事件回调\n * */\n treeTable.setRowChecked = function (id, opts) {\n var that = getThisTable(id);\n if(!that) return;\n\n var options = that.getOptions();\n var tableView = options.elem.next();\n\n opts = opts || {};\n\n var node = opts.index;\n var checked = opts.checked;\n var callbackFlag = opts.callbackFlag;\n\n var dataIndex = layui.type(node) === 'string' ? node : node[LAY_DATA_INDEX];\n // 判断是否在当前页面中\n var nodeData = that.getNodeDataByIndex(dataIndex);\n if (!nodeData) {\n // 目前只能处理当前页的数据\n return;\n }\n\n var collectNeedExpandNodeIndex = function(index){\n needExpandIndex.push(index);\n var trElem = tableView.find('tr[lay-data-index=\"' + index + '\"]');\n if (!trElem.length) {\n var nodeData = that.getNodeDataByIndex(index);\n var parentIndex = nodeData[LAY_PARENT_INDEX];\n parentIndex && collectNeedExpandNodeIndex(parentIndex);\n }\n }\n\n // 判断是否展开过\n var trElem = tableView.find('tr[lay-data-index=\"' + dataIndex + '\"]');\n if (!trElem.length) {\n var parentIndex = nodeData[LAY_PARENT_INDEX];\n var needExpandIndex = [];\n collectNeedExpandNodeIndex(parentIndex);\n // 如果还没有展开没有渲染的要先渲染出来\n layui.each(needExpandIndex.reverse(),function(index, nodeIndex){\n treeTable.expandNode(id, {\n index: nodeIndex,\n expandFlag: true\n });\n })\n trElem = tableView.find('tr[lay-data-index=\"' + dataIndex + '\"]');\n }\n checkNode.call(that, trElem, checked, callbackFlag);\n }\n\n treeTable.checkAllNodes = function (id, checked) {\n var that = getThisTable(id);\n if(!that) return;\n\n var options = that.getOptions();\n var tableView = options.elem.next();\n\n checkNode.call(that, tableView.find('tr[data-index=\"NONE\"]'), !!checked)\n }\n\n /**\n * 获得数据\n * @param {String} id 表格id\n * @param {Boolean} [isSimpleData] 是否返回平铺结构的数据\n * @return {Array} 表格数据\n * */\n treeTable.getData = function (id, isSimpleData) {\n var that = getThisTable(id);\n if (!that) return;\n\n var tableData = [];\n layui.each($.extend(true, [], table.cache[id] || []), function (index, item) {\n // 遍历排除掉临时的数据\n tableData.push(item);\n })\n return isSimpleData ? that.treeToFlat(tableData) : tableData;\n }\n\n /**\n * 重新加载子节点\n * @param {String} id 表格id\n * @param {String} dataIndex 父节点的dataIndex\n * */\n treeTable.reloadAsyncNode = function (id, dataIndex) {\n var that = getThisTable(id);\n if (!that) {\n return;\n }\n\n var options = that.getOptions();\n var treeOptions = options.tree;\n if (!treeOptions.async || !treeOptions.async.enable) {\n return;\n }\n var dataP = that.getNodeDataByIndex(dataIndex);\n if (!dataP) {\n return;\n }\n dataP[LAY_HAS_EXPANDED] = false;\n dataP[LAY_EXPAND] = false;\n dataP[LAY_ASYNC_STATUS] = false;\n layui.each(that.treeToFlat(dataP[treeOptions.customName.children]).reverse(), function (i1, item1) {\n treeTable.removeNode(id, item1[LAY_DATA_INDEX]);\n })\n // 重新展开\n treeTable.expandNode(id, {\n index: dataIndex,\n expandFlag: true,\n callbackFlag: true,\n })\n }\n\n /**\n * 通过数据id获取节点对象\n * */\n treeTable.getNodeById = function (id, dataId) {\n var that = getThisTable(id);\n if (!that) return;\n\n return that.getNodeById(dataId);\n }\n\n /**\n * 根据自定义规则搜索节点数据\n * @param {String} id 树表id\n * @param {Function} filter 自定义过滤器函数\n * @param {Object} [opts]\n * @param {Boolean} [opts.isSingle] 是否只找到第一个\n * @param {Object} [opts.parentNode] 在指定在某个父节点下的子节点中搜索\n * @return {Object} 节点对象\n * */\n treeTable.getNodesByFilter = function (id, filter, opts) {\n var that = getThisTable(id);\n if (!that) return;\n var options = that.getOptions();\n\n opts = opts || {};\n var isSingle = opts.isSingle;\n var parentNode = opts.parentNode;\n var dataP = parentNode && parentNode.data;\n // dataP = dataP || table.cache[id];\n var nodes = that.treeToFlat(dataP ? (dataP[options.tree.customName.children] || []) : table.cache[id]).filter(filter);\n var nodesResult = [];\n layui.each(nodes, function (i1, item1) {\n nodesResult.push(that.getNodeByIndex(item1[LAY_DATA_INDEX]));\n if (isSingle) {\n return true;\n }\n });\n\n return nodesResult;\n }\n\n\n // 记录所有实例\n thisTreeTable.that = {}; // 记录所有实例对象\n // thisTreeTable.config = {}; // 记录所有实例配置项\n\n // 重载\n treeTable.reload = function (id, options, deep, type) {\n // deep = deep !== false; // 默认采用深拷贝\n var that = getThisTable(id);\n if (!that) return;\n that.reload(options, deep, type);\n return thisTreeTable.call(that);\n };\n\n // 核心入口\n treeTable.render = function (options) {\n var inst = new Class(options);\n return thisTreeTable.call(inst);\n };\n\n exports(MOD_NAME, treeTable);\n});\n","/**\r\n * tree 树组件\r\n */\r\n\r\nlayui.define('form', function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var form = layui.form;\r\n var layer = layui.layer;\r\n \r\n // 模块名\r\n var MOD_NAME = 'tree';\r\n\r\n // 外部接口\r\n var tree = {\r\n config: {\r\n customName: { // 自定义 data 字段名\r\n id: 'id',\r\n title: 'title',\r\n children: 'children'\r\n }\r\n },\r\n index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0,\r\n\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n \r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id || that.index;\r\n \r\n thisModule.that[id] = that; // 记录当前实例对象\r\n thisModule.config[id] = options; // 记录当前实例配置项\r\n \r\n return {\r\n config: options,\r\n // 重置实例\r\n reload: function(options){\r\n that.reload.call(that, options);\r\n },\r\n getChecked: function(){\r\n return that.getChecked.call(that);\r\n },\r\n setChecked: function(id){// 设置值\r\n return that.setChecked.call(that, id);\r\n }\r\n }\r\n };\r\n \r\n // 获取当前实例配置项\r\n var getThisModuleConfig = function(id){\r\n var config = thisModule.config[id];\r\n if(!config) hint.error('The ID option was not found in the '+ MOD_NAME +' instance');\r\n return config || null;\r\n }\r\n\r\n // 字符常量\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var NONE = 'layui-none';\r\n var DISABLED = 'layui-disabled';\r\n \r\n var ELEM_VIEW = 'layui-tree';\r\n var ELEM_SET = 'layui-tree-set';\r\n var ICON_CLICK = 'layui-tree-iconClick';\r\n var ICON_ADD = 'layui-icon-addition';\r\n var ICON_SUB = 'layui-icon-subtraction';\r\n var ELEM_ENTRY = 'layui-tree-entry';\r\n var ELEM_MAIN = 'layui-tree-main';\r\n var ELEM_TEXT = 'layui-tree-txt';\r\n var ELEM_PACK = 'layui-tree-pack';\r\n var ELEM_SPREAD = 'layui-tree-spread';\r\n var ELEM_LINE_SHORT = 'layui-tree-setLineShort';\r\n var ELEM_SHOW = 'layui-tree-showLine';\r\n var ELEM_EXTEND = 'layui-tree-lineExtend';\r\n \r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++tree.index;\r\n that.config = $.extend({}, that.config, tree.config, options);\r\n that.render();\r\n };\r\n\r\n // 默认配置\r\n Class.prototype.config = {\r\n data: [], // 数据\r\n \r\n showCheckbox: false, // 是否显示复选框\r\n showLine: true, // 是否开启连接线\r\n accordion: false, // 是否开启手风琴模式\r\n onlyIconControl: false, // 是否仅允许节点左侧图标控制展开收缩\r\n isJump: false, // 是否允许点击节点时弹出新窗口跳转\r\n edit: false, // 是否开启节点的操作图标\r\n \r\n text: {\r\n defaultNodeName: '未命名', // 节点默认名称\r\n none: '无数据' // 数据为空时的文本提示\r\n }\r\n };\r\n \r\n // 重载实例\r\n Class.prototype.reload = function(options){\r\n var that = this;\r\n \r\n layui.each(options, function(key, item){\r\n if(layui.type(item) === 'array') delete that.config[key];\r\n });\r\n \r\n that.config = $.extend(true, {}, that.config, options);\r\n that.render();\r\n };\r\n\r\n // 主体渲染\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 初始化自定义字段名\r\n options.customName = $.extend({}, tree.config.customName, options.customName);\r\n \r\n that.checkids = [];\r\n\r\n var temp = $('
                  ');\r\n that.tree(temp);\r\n\r\n var othis = options.elem = $(options.elem);\r\n if(!othis[0]) return;\r\n\r\n // 索引\r\n that.key = options.id || that.index;\r\n \r\n // 插入组件结构\r\n that.elem = temp;\r\n that.elemNone = $('
                  '+ options.text.none +'
                  ');\r\n othis.html(that.elem);\r\n\r\n if(that.elem.find('.layui-tree-set').length == 0){\r\n return that.elem.append(that.elemNone);\r\n };\r\n \r\n // 复选框渲染\r\n if(options.showCheckbox){\r\n that.renderForm('checkbox');\r\n };\r\n\r\n that.elem.find('.layui-tree-set').each(function(){\r\n var othis = $(this);\r\n // 最外层\r\n if(!othis.parent('.layui-tree-pack')[0]){\r\n othis.addClass('layui-tree-setHide');\r\n };\r\n\r\n // 没有下一个节点 上一层父级有延伸线\r\n if(!othis.next()[0] && othis.parents('.layui-tree-pack').eq(1).hasClass('layui-tree-lineExtend')){\r\n othis.addClass(ELEM_LINE_SHORT);\r\n };\r\n \r\n // 没有下一个节点 外层最后一个\r\n if(!othis.next()[0] && !othis.parents('.layui-tree-set').eq(0).next()[0]){\r\n othis.addClass(ELEM_LINE_SHORT);\r\n };\r\n });\r\n\r\n that.events();\r\n };\r\n \r\n // 渲染表单\r\n Class.prototype.renderForm = function(type){\r\n form.render(type, 'LAY-tree-'+ this.index);\r\n };\r\n\r\n // 节点解析\r\n Class.prototype.tree = function(elem, children){\r\n var that = this;\r\n var options = that.config;\r\n var customName = options.customName;\r\n var data = children || options.data;\r\n\r\n // 遍历数据\r\n layui.each(data, function(index, item){\r\n var hasChild = item[customName.children] && item[customName.children].length > 0;\r\n var packDiv = $('
                  ');\r\n var entryDiv = $(['
                  '\r\n ,'
                  '\r\n ,'
                  '\r\n // 箭头\r\n ,function(){\r\n if(options.showLine){\r\n if(hasChild){\r\n return '';\r\n }else{\r\n return '';\r\n };\r\n }else{\r\n return '';\r\n };\r\n }()\r\n \r\n // 复选框\r\n ,function(){\r\n return options.showCheckbox ? '' : '';\r\n }()\r\n \r\n // 节点\r\n ,function(){\r\n if(options.isJump && item.href){\r\n return ''+ (item[customName.title] || item.label || options.text.defaultNodeName) +'';\r\n }else{\r\n return ''+ (item[customName.title] || item.label || options.text.defaultNodeName) +'';\r\n }\r\n }()\r\n ,'
                  '\r\n \r\n // 节点操作图标\r\n ,function(){\r\n if(!options.edit) return '';\r\n \r\n var editIcon = {\r\n add: ''\r\n ,update: ''\r\n ,del: ''\r\n }, arr = ['
                  '];\r\n \r\n if(options.edit === true){\r\n options.edit = ['update', 'del']\r\n }\r\n \r\n if(typeof options.edit === 'object'){\r\n layui.each(options.edit, function(i, val){\r\n arr.push(editIcon[val] || '')\r\n });\r\n return arr.join('') + '
                  ';\r\n }\r\n }()\r\n ,'
                  '].join(''));\r\n\r\n // 如果有子节点,则递归继续生成树\r\n if(hasChild){\r\n entryDiv.append(packDiv);\r\n that.tree(packDiv, item[customName.children]);\r\n };\r\n\r\n elem.append(entryDiv);\r\n \r\n // 若有前置节点,前置节点加连接线\r\n if(entryDiv.prev('.'+ELEM_SET)[0]){\r\n entryDiv.prev().children('.layui-tree-pack').addClass('layui-tree-showLine');\r\n };\r\n \r\n // 若无子节点,则父节点加延伸线\r\n if(!hasChild){\r\n entryDiv.parent('.layui-tree-pack').addClass('layui-tree-lineExtend');\r\n };\r\n\r\n // 展开节点操作\r\n that.spread(entryDiv, item);\r\n \r\n // 选择框\r\n if(options.showCheckbox){\r\n item.checked && that.checkids.push(item[customName.id]);\r\n that.checkClick(entryDiv, item);\r\n }\r\n \r\n // 操作节点\r\n options.edit && that.operate(entryDiv, item);\r\n \r\n });\r\n };\r\n\r\n // 展开节点\r\n Class.prototype.spread = function(elem, item){\r\n var that = this;\r\n var options = that.config;\r\n var entry = elem.children('.'+ELEM_ENTRY);\r\n var elemMain = entry.children('.'+ ELEM_MAIN);\r\n var elemCheckbox = elemMain.find('input[same=\"layuiTreeCheck\"]');\r\n var elemIcon = entry.find('.'+ ICON_CLICK);\r\n var elemText = entry.find('.'+ ELEM_TEXT);\r\n var touchOpen = options.onlyIconControl ? elemIcon : elemMain; // 判断展开通过节点还是箭头图标\r\n var state = '';\r\n \r\n // 展开收缩\r\n touchOpen.on('click', function(e){\r\n var packCont = elem.children('.'+ELEM_PACK)\r\n ,iconClick = touchOpen.children('.layui-icon')[0] ? touchOpen.children('.layui-icon') : touchOpen.find('.layui-tree-icon').children('.layui-icon');\r\n\r\n // 若没有子节点\r\n if(!packCont[0]){\r\n state = 'normal';\r\n }else{\r\n if(elem.hasClass(ELEM_SPREAD)){\r\n elem.removeClass(ELEM_SPREAD);\r\n packCont.slideUp(200);\r\n iconClick.removeClass(ICON_SUB).addClass(ICON_ADD); \r\n that.updateFieldValue(item, 'spread', false);\r\n }else{\r\n elem.addClass(ELEM_SPREAD);\r\n packCont.slideDown(200);\r\n iconClick.addClass(ICON_SUB).removeClass(ICON_ADD);\r\n that.updateFieldValue(item, 'spread', true);\r\n\r\n // 是否手风琴\r\n if(options.accordion){\r\n var sibls = elem.siblings('.'+ELEM_SET);\r\n sibls.removeClass(ELEM_SPREAD);\r\n sibls.children('.'+ELEM_PACK).slideUp(200);\r\n sibls.find('.layui-tree-icon').children('.layui-icon').removeClass(ICON_SUB).addClass(ICON_ADD);\r\n };\r\n };\r\n };\r\n });\r\n \r\n // 点击回调\r\n elemText.on('click', function(){\r\n var othis = $(this);\r\n \r\n // 判断是否禁用状态\r\n if(othis.hasClass(DISABLED)) return;\r\n \r\n // 判断展开收缩状态\r\n if(elem.hasClass(ELEM_SPREAD)){\r\n state = options.onlyIconControl ? 'open' : 'close';\r\n } else {\r\n state = options.onlyIconControl ? 'close' : 'open';\r\n }\r\n\r\n // 获取选中状态\r\n if(elemCheckbox[0]){\r\n that.updateFieldValue(item, 'checked', elemCheckbox.prop('checked'));\r\n }\r\n \r\n // 点击产生的回调\r\n options.click && options.click({\r\n elem: elem,\r\n state: state,\r\n data: item\r\n });\r\n });\r\n };\r\n\r\n // 更新数据源 checked,spread 字段值\r\n Class.prototype.updateFieldValue = function(obj, field, value){\r\n if(field in obj) obj[field] = value;\r\n };\r\n \r\n // 计算复选框选中状态\r\n Class.prototype.setCheckbox = function(elem, item, elemCheckbox){\r\n var that = this;\r\n var options = that.config;\r\n var customName = options.customName;\r\n var checked = elemCheckbox.prop('checked');\r\n \r\n if(elemCheckbox.prop('disabled')) return;\r\n\r\n // 同步子节点选中状态\r\n if(typeof item[customName.children] === 'object' || elem.find('.'+ELEM_PACK)[0]){\r\n var elemCheckboxs = elem.find('.'+ ELEM_PACK).find('input[same=\"layuiTreeCheck\"]');\r\n elemCheckboxs.each(function(index){\r\n if(this.disabled) return; // 不可点击则跳过\r\n var children = item[customName.children][index];\r\n if(children) that.updateFieldValue(children, 'checked', checked);\r\n that.updateFieldValue(this, 'checked', checked);\r\n });\r\n };\r\n\r\n // 同步父节点选中状态\r\n var setParentsChecked = function(thisNodeElem){\r\n // 若无父节点,则终止递归\r\n if(!thisNodeElem.parents('.'+ ELEM_SET)[0]) return;\r\n\r\n var state;\r\n var parentPack = thisNodeElem.parent('.'+ ELEM_PACK);\r\n var parentNodeElem = parentPack.parent();\r\n var parentCheckbox = parentPack.prev().find('input[same=\"layuiTreeCheck\"]');\r\n\r\n // 如果子节点有任意一条选中,则父节点为选中状态\r\n if(checked){\r\n parentCheckbox.prop('checked', checked);\r\n } else { // 如果当前节点取消选中,则根据计算“兄弟和子孙”节点选中状态,来同步父节点选中状态\r\n parentPack.find('input[same=\"layuiTreeCheck\"]').each(function(){\r\n if(this.checked){\r\n state = true;\r\n }\r\n });\r\n \r\n // 如果兄弟子孙节点全部未选中,则父节点也应为非选中状态\r\n state || parentCheckbox.prop('checked', false);\r\n }\r\n \r\n // 向父节点递归\r\n setParentsChecked(parentNodeElem);\r\n };\r\n \r\n setParentsChecked(elem);\r\n\r\n that.renderForm('checkbox');\r\n };\r\n \r\n // 复选框选择\r\n Class.prototype.checkClick = function(elem, item){\r\n var that = this;\r\n var options = that.config;\r\n var entry = elem.children('.'+ ELEM_ENTRY);\r\n var elemMain = entry.children('.'+ ELEM_MAIN);\r\n \r\n \r\n \r\n // 点击复选框\r\n elemMain.on('click', 'input[same=\"layuiTreeCheck\"]+', function(e){\r\n layui.stope(e); // 阻止点击节点事件\r\n\r\n var elemCheckbox = $(this).prev();\r\n var checked = elemCheckbox.prop('checked');\r\n \r\n if(elemCheckbox.prop('disabled')) return;\r\n \r\n that.setCheckbox(elem, item, elemCheckbox);\r\n that.updateFieldValue(item, 'checked', checked);\r\n\r\n // 复选框点击产生的回调\r\n options.oncheck && options.oncheck({\r\n elem: elem,\r\n checked: checked,\r\n data: item\r\n });\r\n });\r\n };\r\n\r\n // 节点操作\r\n Class.prototype.operate = function(elem, item){\r\n var that = this;\r\n var options = that.config;\r\n var customName = options.customName;\r\n var entry = elem.children('.'+ ELEM_ENTRY);\r\n var elemMain = entry.children('.'+ ELEM_MAIN);\r\n\r\n entry.children('.layui-tree-btnGroup').on('click', '.layui-icon', function(e){\r\n layui.stope(e); // 阻止节点操作\r\n\r\n var type = $(this).data(\"type\");\r\n var packCont = elem.children('.'+ELEM_PACK);\r\n var returnObj = {\r\n data: item,\r\n type: type,\r\n elem:elem\r\n };\r\n // 增加\r\n if(type == 'add'){\r\n // 若节点本身无子节点\r\n if(!packCont[0]){\r\n // 若开启连接线,更改图标样式\r\n if(options.showLine){\r\n elemMain.find('.'+ICON_CLICK).addClass('layui-tree-icon');\r\n elemMain.find('.'+ICON_CLICK).children('.layui-icon').addClass(ICON_ADD).removeClass('layui-icon-file');\r\n // 若未开启连接线,显示箭头\r\n } else {\r\n elemMain.find('.layui-tree-iconArrow').removeClass(HIDE);\r\n };\r\n // 节点添加子节点容器\r\n elem.append('
                  ');\r\n };\r\n\r\n // 新增节点\r\n var key = options.operate && options.operate(returnObj);\r\n var obj = {};\r\n\r\n obj[customName.title] = options.text.defaultNodeName;\r\n obj[customName.id] = key;\r\n that.tree(elem.children('.'+ELEM_PACK), [obj]);\r\n \r\n // 放在新增后面,因为要对元素进行操作\r\n if(options.showLine){\r\n // 节点本身无子节点\r\n if(!packCont[0]){\r\n // 遍历兄弟节点,判断兄弟节点是否有子节点\r\n var siblings = elem.siblings('.'+ELEM_SET)\r\n var num = 1;\r\n var parentPack = elem.parent('.'+ELEM_PACK);\r\n\r\n layui.each(siblings, function(index, i){\r\n if(!$(i).children('.'+ELEM_PACK)[0]){\r\n num = 0;\r\n };\r\n });\r\n\r\n // 若兄弟节点都有子节点\r\n if(num == 1){\r\n // 兄弟节点添加连接线\r\n siblings.children('.'+ELEM_PACK).addClass(ELEM_SHOW);\r\n siblings.children('.'+ELEM_PACK).children('.'+ELEM_SET).removeClass(ELEM_LINE_SHORT);\r\n elem.children('.'+ELEM_PACK).addClass(ELEM_SHOW);\r\n // 父级移除延伸线\r\n parentPack.removeClass(ELEM_EXTEND);\r\n // 同层节点最后一个更改线的状态\r\n parentPack.children('.'+ELEM_SET).last().children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT);\r\n } else {\r\n elem.children('.'+ELEM_PACK).children('.'+ELEM_SET).addClass(ELEM_LINE_SHORT);\r\n };\r\n } else {\r\n // 添加延伸线\r\n if(!packCont.hasClass(ELEM_EXTEND)){\r\n packCont.addClass(ELEM_EXTEND);\r\n };\r\n // 子节点添加延伸线\r\n elem.find('.'+ELEM_PACK).each(function(){\r\n $(this).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT);\r\n });\r\n // 如果前一个节点有延伸线\r\n if(packCont.children('.'+ELEM_SET).last().prev().hasClass(ELEM_LINE_SHORT)){\r\n packCont.children('.'+ELEM_SET).last().prev().removeClass(ELEM_LINE_SHORT);\r\n }else{\r\n // 若之前的没有,说明处于连接状态\r\n packCont.children('.'+ELEM_SET).last().removeClass(ELEM_LINE_SHORT);\r\n };\r\n // 若是最外层,要始终保持相连的状态\r\n if(!elem.parent('.'+ELEM_PACK)[0] && elem.next()[0]){\r\n packCont.children('.'+ELEM_SET).last().removeClass(ELEM_LINE_SHORT);\r\n };\r\n };\r\n };\r\n if(!options.showCheckbox) return;\r\n // 若开启复选框,同步新增节点状态\r\n if(elemMain.find('input[same=\"layuiTreeCheck\"]')[0].checked){\r\n var packLast = elem.children('.'+ELEM_PACK).children('.'+ELEM_SET).last();\r\n packLast.find('input[same=\"layuiTreeCheck\"]')[0].checked = true;\r\n };\r\n that.renderForm('checkbox');\r\n \r\n // 修改\r\n } else if(type == 'update') {\r\n var text = elemMain.children('.'+ ELEM_TEXT).html();\r\n elemMain.children('.'+ ELEM_TEXT).html('');\r\n // 添加输入框,覆盖在文字上方\r\n elemMain.append('');\r\n // 获取焦点\r\n elemMain.children('.layui-tree-editInput').val(text).focus();\r\n // 嵌入文字移除输入框\r\n var getVal = function(input){\r\n var textNew = input.val().trim();\r\n textNew = textNew ? textNew : options.text.defaultNodeName;\r\n input.remove();\r\n elemMain.children('.'+ ELEM_TEXT).html(textNew);\r\n \r\n // 同步数据\r\n returnObj.data[customName.title] = textNew;\r\n \r\n // 节点修改的回调\r\n options.operate && options.operate(returnObj);\r\n };\r\n // 失去焦点\r\n elemMain.children('.layui-tree-editInput').blur(function(){\r\n getVal($(this));\r\n });\r\n // 回车\r\n elemMain.children('.layui-tree-editInput').on('keydown', function(e){\r\n if(e.keyCode === 13){\r\n e.preventDefault();\r\n getVal($(this));\r\n };\r\n });\r\n\r\n // 删除\r\n } else {\r\n layer.confirm('确认删除该节点 \"'+ (item[customName.title] || '') +'\" 吗?', function(index){\r\n options.operate && options.operate(returnObj); // 节点删除的回调\r\n returnObj.status = 'remove'; // 标注节点删除\r\n \r\n layer.close(index);\r\n \r\n // 若删除最后一个,显示空数据提示\r\n if(!elem.prev('.'+ELEM_SET)[0] && !elem.next('.'+ELEM_SET)[0] && !elem.parent('.'+ELEM_PACK)[0]){\r\n elem.remove();\r\n that.elem.append(that.elemNone);\r\n return;\r\n };\r\n // 若有兄弟节点\r\n if(elem.siblings('.'+ELEM_SET).children('.'+ELEM_ENTRY)[0]){\r\n // 若开启复选框\r\n if(options.showCheckbox){\r\n // 若开启复选框,进行下步操作\r\n var elemDel = function(elem){\r\n // 若无父结点,则不执行\r\n if(!elem.parents('.'+ELEM_SET)[0]) return;\r\n var siblingTree = elem.siblings('.'+ELEM_SET).children('.'+ELEM_ENTRY);\r\n var parentTree = elem.parent('.'+ELEM_PACK).prev();\r\n var checkState = parentTree.find('input[same=\"layuiTreeCheck\"]')[0];\r\n var state = 1;\r\n var num = 0;\r\n\r\n // 若父节点未勾选\r\n if(checkState.checked == false){\r\n // 遍历兄弟节点\r\n siblingTree.each(function(i, item1){\r\n var input = $(item1).find('input[same=\"layuiTreeCheck\"]')[0]\r\n if(input.checked == false && !input.disabled){\r\n state = 0;\r\n };\r\n // 判断是否全为不可勾选框\r\n if(!input.disabled){\r\n num = 1;\r\n };\r\n });\r\n // 若有可勾选选择框并且已勾选\r\n if(state == 1 && num == 1){\r\n // 勾选父节点\r\n checkState.checked = true;\r\n that.renderForm('checkbox');\r\n // 向上遍历祖先节点\r\n elemDel(parentTree.parent('.'+ELEM_SET));\r\n };\r\n };\r\n };\r\n elemDel(elem);\r\n };\r\n // 若开启连接线\r\n if(options.showLine){\r\n // 遍历兄弟节点,判断兄弟节点是否有子节点\r\n var siblings = elem.siblings('.'+ELEM_SET);\r\n var num = 1;\r\n var parentPack = elem.parent('.'+ELEM_PACK);\r\n\r\n layui.each(siblings, function(index, i){\r\n if(!$(i).children('.'+ELEM_PACK)[0]){\r\n num = 0;\r\n };\r\n });\r\n // 若兄弟节点都有子节点\r\n if(num == 1){\r\n // 若节点本身无子节点\r\n if(!packCont[0]){\r\n // 父级去除延伸线,因为此时子节点里没有空节点\r\n parentPack.removeClass(ELEM_EXTEND);\r\n siblings.children('.'+ELEM_PACK).addClass(ELEM_SHOW);\r\n siblings.children('.'+ELEM_PACK).children('.'+ELEM_SET).removeClass(ELEM_LINE_SHORT);\r\n };\r\n // 若为最后一个节点\r\n if(!elem.next()[0]){\r\n elem.prev().children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT);\r\n }else{\r\n parentPack.children('.'+ELEM_SET).last().children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT);\r\n };\r\n // 若为最外层最后一个节点,去除前一个结点的连接线\r\n if(!elem.next()[0] && !elem.parents('.'+ELEM_SET)[1] && !elem.parents('.'+ELEM_SET).eq(0).next()[0]){\r\n elem.prev('.'+ELEM_SET).addClass(ELEM_LINE_SHORT);\r\n };\r\n }else{\r\n // 若为最后一个节点且有延伸线\r\n if(!elem.next()[0] && elem.hasClass(ELEM_LINE_SHORT)){\r\n elem.prev().addClass(ELEM_LINE_SHORT);\r\n };\r\n };\r\n };\r\n \r\n } else {\r\n // 若无兄弟节点\r\n var prevDiv = elem.parent('.'+ELEM_PACK).prev();\r\n // 若开启了连接线\r\n if(options.showLine){\r\n prevDiv.find('.'+ICON_CLICK).removeClass('layui-tree-icon');\r\n prevDiv.find('.'+ICON_CLICK).children('.layui-icon').removeClass(ICON_SUB).addClass('layui-icon-file');\r\n // 父节点所在层添加延伸线\r\n var pare = prevDiv.parents('.'+ELEM_PACK).eq(0);\r\n pare.addClass(ELEM_EXTEND);\r\n\r\n // 兄弟节点最后子节点添加延伸线\r\n pare.children('.'+ELEM_SET).each(function(){\r\n $(this).children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT);\r\n });\r\n }else{\r\n // 父节点隐藏箭头\r\n prevDiv.find('.layui-tree-iconArrow').addClass(HIDE);\r\n };\r\n // 移除展开属性\r\n elem.parents('.'+ELEM_SET).eq(0).removeClass(ELEM_SPREAD);\r\n // 移除节点容器\r\n elem.parent('.'+ELEM_PACK).remove();\r\n };\r\n\r\n elem.remove();\r\n });\r\n \r\n };\r\n });\r\n };\r\n\r\n // 部分事件\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n var checkWarp = that.elem.find('.layui-tree-checkedFirst');\r\n \r\n // 初始选中\r\n that.setChecked(that.checkids);\r\n \r\n // 搜索\r\n that.elem.find('.layui-tree-search').on('keyup', function(){\r\n var input = $(this);\r\n var val = input.val();\r\n var pack = input.nextAll();\r\n var arr = [];\r\n\r\n // 遍历所有的值\r\n pack.find('.'+ ELEM_TEXT).each(function(){\r\n var entry = $(this).parents('.'+ELEM_ENTRY);\r\n // 若值匹配,加一个类以作标识\r\n if($(this).html().indexOf(val) != -1){\r\n arr.push($(this).parent());\r\n \r\n var select = function(div){\r\n div.addClass('layui-tree-searchShow');\r\n // 向上父节点渲染\r\n if(div.parent('.'+ELEM_PACK)[0]){\r\n select(div.parent('.'+ELEM_PACK).parent('.'+ELEM_SET));\r\n };\r\n };\r\n select(entry.parent('.'+ELEM_SET));\r\n };\r\n });\r\n\r\n // 根据标志剔除\r\n pack.find('.'+ELEM_ENTRY).each(function(){\r\n var parent = $(this).parent('.'+ELEM_SET);\r\n if(!parent.hasClass('layui-tree-searchShow')){\r\n parent.addClass(HIDE);\r\n };\r\n });\r\n if(pack.find('.layui-tree-searchShow').length == 0){\r\n that.elem.append(that.elemNone);\r\n };\r\n\r\n // 节点过滤的回调\r\n options.onsearch && options.onsearch({\r\n elem: arr\r\n });\r\n });\r\n\r\n // 还原搜索初始状态\r\n that.elem.find('.layui-tree-search').on('keydown', function(){\r\n $(this).nextAll().find('.'+ELEM_ENTRY).each(function(){\r\n var parent = $(this).parent('.'+ELEM_SET);\r\n parent.removeClass('layui-tree-searchShow '+ HIDE);\r\n });\r\n if($('.layui-tree-emptyText')[0]) $('.layui-tree-emptyText').remove();\r\n });\r\n };\r\n\r\n // 得到选中节点\r\n Class.prototype.getChecked = function(){\r\n var that = this;\r\n var options = that.config;\r\n var customName = options.customName;\r\n var checkId = [];\r\n var checkData = [];\r\n \r\n // 遍历节点找到选中索引\r\n that.elem.find('.layui-form-checked').each(function(){\r\n checkId.push($(this).prev()[0].value);\r\n });\r\n \r\n // 遍历节点\r\n var eachNodes = function(data, checkNode){\r\n layui.each(data, function(index, item){\r\n layui.each(checkId, function(index2, item2){\r\n if(item[customName.id] == item2){\r\n that.updateFieldValue(item, 'checked', true);\r\n\r\n var cloneItem = $.extend({}, item);\r\n delete cloneItem[customName.children];\r\n\r\n checkNode.push(cloneItem);\r\n \r\n if(item[customName.children]){\r\n cloneItem[customName.children] = [];\r\n eachNodes(item[customName.children], cloneItem[customName.children]);\r\n }\r\n return true\r\n }\r\n });\r\n });\r\n };\r\n\r\n eachNodes($.extend({}, options.data), checkData);\r\n \r\n return checkData;\r\n };\r\n\r\n // 设置选中节点\r\n Class.prototype.setChecked = function(checkedId){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 初始选中\r\n that.elem.find('.'+ELEM_SET).each(function(i, item){\r\n var thisId = $(this).data('id');\r\n var input = $(item).children('.'+ELEM_ENTRY).find('input[same=\"layuiTreeCheck\"]');\r\n var reInput = input.next();\r\n \r\n // 若返回数字\r\n if(typeof checkedId === 'number'){\r\n if(thisId.toString() == checkedId.toString()){\r\n if(!input[0].checked){\r\n reInput.click();\r\n };\r\n return false;\r\n };\r\n } \r\n // 若返回数组\r\n else if(typeof checkedId === 'object'){\r\n layui.each(checkedId, function(index, value){\r\n if(value.toString() == thisId.toString() && !input[0].checked){\r\n reInput.click();\r\n return true;\r\n }\r\n });\r\n };\r\n });\r\n };\r\n\r\n // 记录所有实例\r\n thisModule.that = {}; // 记录所有实例对象\r\n thisModule.config = {}; // 记录所有实例配置项\r\n \r\n // 重载实例\r\n tree.reload = function(id, options){\r\n var that = thisModule.that[id];\r\n that.reload(options);\r\n \r\n return thisModule.call(that);\r\n };\r\n \r\n // 获得选中的节点数据\r\n tree.getChecked = function(id){\r\n var that = thisModule.that[id];\r\n return that.getChecked();\r\n };\r\n \r\n // 设置选中节点\r\n tree.setChecked = function(id, checkedId){\r\n var that = thisModule.that[id];\r\n return that.setChecked(checkedId);\r\n };\r\n \r\n // 核心入口\r\n tree.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, tree);\r\n})","/**\r\n * transfer 穿梭框组件\r\n */\r\n\r\nlayui.define(['laytpl', 'form'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var laytpl = layui.laytpl;\r\n var form = layui.form;\r\n \r\n // 模块名\r\n var MOD_NAME = 'transfer';\r\n\r\n // 外部接口\r\n var transfer = {\r\n config: {},\r\n index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0,\r\n\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n \r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id || that.index;\r\n \r\n thisModule.that[id] = that; // 记录当前实例对象\r\n thisModule.config[id] = options; // 记录当前实例配置项\r\n \r\n return {\r\n config: options,\r\n // 重置实例\r\n reload: function(options){\r\n that.reload.call(that, options);\r\n },\r\n // 获取右侧数据\r\n getData: function(){\r\n return that.getData.call(that);\r\n }\r\n }\r\n };\r\n \r\n // 获取当前实例配置项\r\n var getThisModuleConfig = function(id){\r\n var config = thisModule.config[id];\r\n if(!config) hint.error('The ID option was not found in the '+ MOD_NAME +' instance');\r\n return config || null;\r\n };\r\n\r\n // 字符常量\r\n var ELEM = 'layui-transfer';\r\n var HIDE = 'layui-hide'; \r\n var DISABLED = 'layui-btn-disabled';\r\n var NONE = 'layui-none';\r\n var ELEM_BOX = 'layui-transfer-box';\r\n var ELEM_HEADER = 'layui-transfer-header';\r\n var ELEM_SEARCH = 'layui-transfer-search';\r\n var ELEM_ACTIVE = 'layui-transfer-active';\r\n var ELEM_DATA = 'layui-transfer-data';\r\n \r\n // 穿梭框模板\r\n var TPL_BOX = function(obj){\r\n obj = obj || {};\r\n return ['
                  '\r\n ,'
                  '\r\n ,''\r\n ,'
                  '\r\n ,'{{# if(d.data.showSearch){ }}'\r\n ,'
                  '\r\n ,''\r\n ,''\r\n ,'
                  '\r\n ,'{{# } }}'\r\n ,'
                    '\r\n ,'
                    '].join('');\r\n };\r\n \r\n // 主模板\r\n var TPL_MAIN = ['
                    '\r\n ,TPL_BOX({\r\n index: 0\r\n ,checkAllName: 'layTransferLeftCheckAll'\r\n })\r\n ,'
                    '\r\n ,''\r\n ,''\r\n ,'
                    '\r\n ,TPL_BOX({\r\n index: 1\r\n ,checkAllName: 'layTransferRightCheckAll'\r\n })\r\n ,'
                    '].join('');\r\n\r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++transfer.index;\r\n that.config = $.extend({}, that.config, transfer.config, options);\r\n that.render();\r\n };\r\n\r\n //默认配置\r\n Class.prototype.config = {\r\n title: ['列表一', '列表二'],\r\n width: 200,\r\n height: 360,\r\n data: [], // 数据源\r\n value: [], // 选中的数据\r\n showSearch: false, // 是否开启搜索\r\n id: '', // 唯一索引,默认自增 index\r\n text: {\r\n none: '无数据',\r\n searchNone: '无匹配数据'\r\n }\r\n };\r\n \r\n //重载实例\r\n Class.prototype.reload = function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n that.render();\r\n };\r\n\r\n //渲染\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n //解析模板\r\n var thisElem = that.elem = $(laytpl(TPL_MAIN, {\r\n open: '{{', // 标签符前缀\r\n close: '}}' // 标签符后缀\r\n }).render({\r\n data: options\r\n ,index: that.index //索引\r\n }));\r\n \r\n var othis = options.elem = $(options.elem);\r\n if(!othis[0]) return;\r\n \r\n //初始化属性\r\n options.data = options.data || [];\r\n options.value = options.value || [];\r\n \r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n options.id = 'id' in options ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n that.key = options.id;\r\n \r\n //插入组件结构\r\n othis.html(that.elem);\r\n \r\n //各级容器\r\n that.layBox = that.elem.find('.'+ ELEM_BOX)\r\n that.layHeader = that.elem.find('.'+ ELEM_HEADER)\r\n that.laySearch = that.elem.find('.'+ ELEM_SEARCH)\r\n that.layData = thisElem.find('.'+ ELEM_DATA);\r\n that.layBtn = thisElem.find('.'+ ELEM_ACTIVE + ' .layui-btn');\r\n \r\n //初始化尺寸\r\n that.layBox.css({\r\n width: options.width\r\n ,height: options.height\r\n });\r\n that.layData.css({\r\n height: function(){\r\n var height = options.height - that.layHeader.outerHeight();\r\n if(options.showSearch){\r\n height -= that.laySearch.outerHeight();\r\n }\r\n return height - 2;\r\n }()\r\n });\r\n \r\n that.renderData(); //渲染数据\r\n that.events(); //事件\r\n };\r\n \r\n // 渲染数据\r\n Class.prototype.renderData = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 左右穿梭框差异数据\r\n var arr = [{\r\n checkName: 'layTransferLeftCheck',\r\n views: []\r\n }, {\r\n checkName: 'layTransferRightCheck',\r\n views: []\r\n }];\r\n \r\n // 解析格式\r\n that.parseData(function(item){ \r\n // 标注为 selected 的为右边的数据\r\n var _index = item.selected ? 1 : 0\r\n var listElem = ['
                  • ',\r\n '',\r\n '
                  • '].join('');\r\n // 按照 options.value 顺序排列右侧数据\r\n if(_index){\r\n layui.each(options.value, function(i, v){\r\n if(v == item.value && item.selected){\r\n arr[_index].views[i] = listElem;\r\n }\r\n });\r\n } else {\r\n arr[_index].views.push(listElem);\r\n }\r\n delete item.selected;\r\n });\r\n \r\n that.layData.eq(0).html(arr[0].views.join(''));\r\n that.layData.eq(1).html(arr[1].views.join(''));\r\n \r\n that.renderCheckBtn();\r\n };\r\n \r\n //渲染表单\r\n Class.prototype.renderForm = function(type){\r\n form.render(type, 'LAY-transfer-'+ this.index);\r\n };\r\n \r\n //同步复选框和按钮状态\r\n Class.prototype.renderCheckBtn = function(obj){\r\n var that = this\r\n ,options = that.config;\r\n \r\n obj = obj || {};\r\n \r\n that.layBox.each(function(_index){\r\n var othis = $(this)\r\n ,thisDataElem = othis.find('.'+ ELEM_DATA)\r\n ,allElemCheckbox = othis.find('.'+ ELEM_HEADER).find('input[type=\"checkbox\"]')\r\n ,listElemCheckbox = thisDataElem.find('input[type=\"checkbox\"]');\r\n \r\n //同步复选框和按钮状态\r\n var nums = 0\r\n ,haveChecked = false;\r\n listElemCheckbox.each(function(){\r\n var isHide = $(this).data('hide');\r\n if(this.checked || this.disabled || isHide){\r\n nums++;\r\n }\r\n if(this.checked && !isHide){\r\n haveChecked = true;\r\n }\r\n });\r\n \r\n allElemCheckbox.prop('checked', haveChecked && nums === listElemCheckbox.length); //全选复选框状态\r\n that.layBtn.eq(_index)[haveChecked ? 'removeClass' : 'addClass'](DISABLED); //对应的按钮状态\r\n \r\n //无数据视图\r\n if(!obj.stopNone){\r\n var isNone = thisDataElem.children('li:not(.'+ HIDE +')').length\r\n that.noneView(thisDataElem, isNone ? '' : options.text.none);\r\n }\r\n });\r\n \r\n that.renderForm('checkbox');\r\n };\r\n \r\n //无数据视图\r\n Class.prototype.noneView = function(thisDataElem, text){\r\n var createNoneElem = $('

                    '+ (text || '') +'

                    ');\r\n if(thisDataElem.find('.'+ NONE)[0]){\r\n thisDataElem.find('.'+ NONE).remove();\r\n }\r\n text.replace(/\\s/g, '') && thisDataElem.append(createNoneElem);\r\n };\r\n \r\n //同步 value 属性值\r\n Class.prototype.setValue = function(){\r\n var that = this\r\n ,options = that.config\r\n ,arr = [];\r\n that.layBox.eq(1).find('.'+ ELEM_DATA +' input[type=\"checkbox\"]').each(function(){\r\n var isHide = $(this).data('hide');\r\n isHide || arr.push(this.value);\r\n });\r\n options.value = arr;\r\n \r\n return that;\r\n };\r\n\r\n //解析数据\r\n Class.prototype.parseData = function(callback){\r\n var that = this\r\n ,options = that.config\r\n ,newData = [];\r\n \r\n layui.each(options.data, function(index, item){\r\n //解析格式\r\n item = (typeof options.parseData === 'function' \r\n ? options.parseData(item) \r\n : item) || item;\r\n \r\n newData.push(item = $.extend({}, item))\r\n \r\n layui.each(options.value, function(index2, item2){\r\n if(item2 == item.value){\r\n item.selected = true;\r\n }\r\n });\r\n callback && callback(item);\r\n });\r\n \r\n options.data = newData;\r\n return that;\r\n };\r\n \r\n //获得右侧面板数据\r\n Class.prototype.getData = function(value){\r\n var that = this\r\n ,options = that.config\r\n ,selectedData = [];\r\n \r\n that.setValue();\r\n \r\n layui.each(value || options.value, function(index, item){\r\n layui.each(options.data, function(index2, item2){\r\n delete item2.selected;\r\n if(item == item2.value){\r\n selectedData.push(item2);\r\n };\r\n });\r\n });\r\n return selectedData;\r\n };\r\n\r\n //执行穿梭\r\n Class.prototype.transfer = function (_index, elem) {\r\n var that = this\r\n ,options = that.config\r\n ,thisBoxElem = that.layBox.eq(_index)\r\n ,arr = []\r\n\r\n if (!elem) {\r\n //通过按钮触发找到选中的进行移动\r\n thisBoxElem.each(function(_index){\r\n var othis = $(this)\r\n ,thisDataElem = othis.find('.'+ ELEM_DATA);\r\n\r\n thisDataElem.children('li').each(function(){\r\n var thisList = $(this)\r\n ,thisElemCheckbox = thisList.find('input[type=\"checkbox\"]')\r\n ,isHide = thisElemCheckbox.data('hide');\r\n\r\n if(thisElemCheckbox[0].checked && !isHide){\r\n thisElemCheckbox[0].checked = false;\r\n thisBoxElem.siblings('.'+ ELEM_BOX).find('.'+ ELEM_DATA).append(thisList.clone());\r\n thisList.remove();\r\n\r\n //记录当前穿梭的数据\r\n arr.push(thisElemCheckbox[0].value);\r\n }\r\n\r\n that.setValue();\r\n });\r\n });\r\n } else {\r\n //双击单条记录移动\r\n var thisList = elem\r\n ,thisElemCheckbox = thisList.find('input[type=\"checkbox\"]')\r\n\r\n thisElemCheckbox[0].checked = false;\r\n thisBoxElem.siblings('.'+ ELEM_BOX).find('.'+ ELEM_DATA).append(thisList.clone());\r\n thisList.remove();\r\n\r\n //记录当前穿梭的数据\r\n arr.push(thisElemCheckbox[0].value);\r\n\r\n that.setValue();\r\n }\r\n\r\n that.renderCheckBtn();\r\n\r\n //穿梭时,如果另外一个框正在搜索,则触发匹配\r\n var siblingInput = thisBoxElem.siblings('.'+ ELEM_BOX).find('.'+ ELEM_SEARCH +' input')\r\n siblingInput.val() === '' || siblingInput.trigger('keyup');\r\n\r\n //穿梭时的回调\r\n options.onchange && options.onchange(that.getData(arr), _index);\r\n }\r\n\r\n //事件\r\n Class.prototype.events = function(){\r\n var that = this\r\n ,options = that.config;\r\n \r\n //左右复选框\r\n that.elem.on('click', 'input[lay-filter=\"layTransferCheckbox\"]+', function(){ \r\n var thisElemCheckbox = $(this).prev()\r\n ,checked = thisElemCheckbox[0].checked\r\n ,thisDataElem = thisElemCheckbox.parents('.'+ ELEM_BOX).eq(0).find('.'+ ELEM_DATA);\r\n \r\n if(thisElemCheckbox[0].disabled) return;\r\n \r\n //判断是否全选\r\n if(thisElemCheckbox.attr('lay-type') === 'all'){\r\n thisDataElem.find('input[type=\"checkbox\"]').each(function(){\r\n if(this.disabled) return;\r\n this.checked = checked;\r\n });\r\n }\r\n\r\n setTimeout(function () {\r\n that.renderCheckBtn({stopNone: true});\r\n }, 0)\r\n });\r\n\r\n // 双击穿梭\r\n that.elem.on('dblclick', '.' + ELEM_DATA + '>li', function(event){\r\n var elemThis = $(this)\r\n ,thisElemCheckbox = elemThis.children('input[type=\"checkbox\"]')\r\n ,thisDataElem = elemThis.parent()\r\n ,thisBoxElem = thisDataElem.parent()\r\n\r\n if(thisElemCheckbox[0].disabled) return;\r\n\r\n that.transfer(thisBoxElem.data('index'), elemThis);\r\n })\r\n\r\n // 穿梭按钮事件\r\n that.layBtn.on('click', function(){\r\n var othis = $(this)\r\n ,_index = othis.data('index')\r\n if(othis.hasClass(DISABLED)) return;\r\n\r\n that.transfer(_index);\r\n });\r\n \r\n //搜索\r\n that.laySearch.find('input').on('keyup', function(){\r\n var value = this.value;\r\n var thisDataElem = $(this).parents('.'+ ELEM_SEARCH).eq(0).siblings('.'+ ELEM_DATA);\r\n var thisListElem = thisDataElem.children('li');\r\n\r\n thisListElem.each(function(){\r\n var thisList = $(this);\r\n var thisElemCheckbox = thisList.find('input[type=\"checkbox\"]');\r\n var title = thisElemCheckbox[0].title;\r\n\r\n // 是否区分大小写\r\n if(options.showSearch !== 'cs'){\r\n title = title.toLowerCase();\r\n value = value.toLowerCase();\r\n }\r\n\r\n var isMatch = title.indexOf(value) !== -1;\r\n\r\n thisList[isMatch ? 'removeClass': 'addClass'](HIDE);\r\n thisElemCheckbox.data('hide', isMatch ? false : true);\r\n });\r\n\r\n that.renderCheckBtn();\r\n \r\n //无匹配数据视图\r\n var isNone = thisListElem.length === thisDataElem.children('li.'+ HIDE).length;\r\n that.noneView(thisDataElem, isNone ? options.text.searchNone : '');\r\n });\r\n };\r\n \r\n //记录所有实例\r\n thisModule.that = {}; //记录所有实例对象\r\n thisModule.config = {}; //记录所有实例配置项\r\n \r\n //重载实例\r\n transfer.reload = function(id, options){\r\n var that = thisModule.that[id];\r\n that.reload(options);\r\n \r\n return thisModule.call(that);\r\n };\r\n \r\n //获得选中的数据(右侧面板)\r\n transfer.getData = function(id){\r\n var that = thisModule.that[id];\r\n return that.getData();\r\n };\r\n\r\n //核心入口\r\n transfer.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, transfer);\r\n});\r\n","/**\r\n * carousel 轮播模块\r\n * MIT Licensed \r\n */\r\n \r\nlayui.define(['jquery', 'lay'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var lay = layui.lay;\r\n\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n\r\n // 外部接口\r\n var carousel = {\r\n config: {}, // 全局配置项\r\n\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n \r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n \r\n // 字符常量\r\n var MOD_NAME = 'carousel';\r\n var ELEM = '.layui-carousel';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var DISABLED = 'layui-disabled'\r\n \r\n var ELEM_ITEM = '>*[carousel-item]>*';\r\n var ELEM_LEFT = 'layui-carousel-left';\r\n var ELEM_RIGHT = 'layui-carousel-right';\r\n var ELEM_PREV = 'layui-carousel-prev';\r\n var ELEM_NEXT = 'layui-carousel-next';\r\n var ELEM_ARROW = 'layui-carousel-arrow';\r\n var ELEM_IND = 'layui-carousel-ind';\r\n \r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, carousel.config, options);\r\n that.render();\r\n };\r\n \r\n // 默认配置\r\n Class.prototype.config = {\r\n width: '600px',\r\n height: '280px',\r\n full: false, // 是否全屏\r\n arrow: 'hover', // 切换箭头默认显示状态:hover/always/none\r\n indicator: 'inside', // 指示器位置:inside/outside/none\r\n autoplay: true, // 是否自动切换\r\n interval: 3000, // 自动切换的时间间隔,不能低于800ms\r\n anim: '', // 动画类型:default/updown/fade\r\n trigger: 'click', // 指示器的触发方式:click/hover\r\n index: 0 // 初始开始的索引\r\n };\r\n \r\n // 轮播渲染\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n layui.each(elem, function(){\r\n carousel.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0]));\r\n\r\n options.elem = $(options.elem);\r\n if(!options.elem[0]) return;\r\n that.elemItem = options.elem.find(ELEM_ITEM);\r\n \r\n if(options.index < 0) options.index = 0;\r\n if(options.index >= that.elemItem.length) options.index = that.elemItem.length - 1;\r\n if(options.interval < 800) options.interval = 800;\r\n\r\n // 是否全屏模式\r\n if(options.full){\r\n options.elem.css({\r\n position: 'fixed',\r\n width: '100%',\r\n height: '100%',\r\n zIndex: 9999\r\n });\r\n } else {\r\n options.elem.css({\r\n width: options.width,\r\n height: options.height\r\n });\r\n }\r\n \r\n options.elem.attr('lay-anim', options.anim);\r\n \r\n // 初始焦点状态\r\n that.elemItem.eq(options.index).addClass(THIS);\r\n\r\n // 指示器等动作\r\n if(that.elemItem.length <= 1) return;\r\n\r\n that.indicator();\r\n that.arrow();\r\n that.autoplay();\r\n that.events();\r\n };\r\n \r\n // 重置轮播\r\n Class.prototype.reload = function(options){\r\n var that = this;\r\n clearInterval(that.timer);\r\n that.config = $.extend({}, that.config, options);\r\n that.render();\r\n };\r\n \r\n // 获取上一个等待条目的索引\r\n Class.prototype.prevIndex = function(){\r\n var that = this;\r\n var options = that.config;\r\n var prevIndex = options.index - 1;\r\n\r\n if(prevIndex < 0){\r\n prevIndex = that.elemItem.length - 1;\r\n }\r\n\r\n return prevIndex;\r\n };\r\n \r\n // 获取下一个等待条目的索引\r\n Class.prototype.nextIndex = function(){\r\n var that = this;\r\n var options = that.config;\r\n var nextIndex = options.index + 1;\r\n\r\n if(nextIndex >= that.elemItem.length){\r\n nextIndex = 0;\r\n }\r\n\r\n return nextIndex;\r\n };\r\n \r\n // 索引递增\r\n Class.prototype.addIndex = function(num){\r\n var that = this;\r\n var options = that.config;\r\n \r\n num = num || 1;\r\n options.index = options.index + num;\r\n \r\n // index 不能超过轮播总数量\r\n if(options.index >= that.elemItem.length){\r\n options.index = 0;\r\n }\r\n };\r\n \r\n // 索引递减\r\n Class.prototype.subIndex = function(num){\r\n var that = this;\r\n var options = that.config;\r\n \r\n num = num || 1;\r\n options.index = options.index - num;\r\n \r\n // index 不能超过轮播总数量\r\n if(options.index < 0){\r\n options.index = that.elemItem.length - 1;\r\n }\r\n };\r\n \r\n // 自动轮播\r\n Class.prototype.autoplay = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n if(!options.autoplay) return;\r\n clearInterval(that.timer);\r\n \r\n that.timer = setInterval(function(){\r\n that.slide();\r\n }, options.interval);\r\n };\r\n \r\n // 箭头\r\n Class.prototype.arrow = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 模板\r\n var tplArrow = $([\r\n '',\r\n ''\r\n ].join(''));\r\n \r\n // 预设基础属性\r\n options.elem.attr('lay-arrow', options.arrow);\r\n \r\n // 避免重复插入\r\n if(options.elem.find('.'+ELEM_ARROW)[0]){\r\n options.elem.find('.'+ELEM_ARROW).remove();\r\n }\r\n options.elem.append(tplArrow);\r\n \r\n // 事件\r\n tplArrow.on('click', function(){\r\n var othis = $(this);\r\n var type = othis.attr('lay-type')\r\n that.slide(type);\r\n });\r\n };\r\n\r\n // 跳转到特定下标\r\n Class.prototype.goto = function(index){\r\n var that = this;\r\n var options = that.config;\r\n\r\n if(index > options.index){\r\n that.slide('add', index - options.index);\r\n } else if(index < options.index){\r\n that.slide('sub', options.index - index);\r\n }\r\n }\r\n \r\n // 指示器\r\n Class.prototype.indicator = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 模板\r\n var tplInd = that.elemInd = $(['
                      ',\r\n function(){\r\n var li = [];\r\n layui.each(that.elemItem, function(index){\r\n li.push('');\r\n });\r\n return li.join('');\r\n }(),\r\n '
                    '].join(''));\r\n \r\n // 预设基础属性\r\n options.elem.attr('lay-indicator', options.indicator);\r\n \r\n // 避免重复插入\r\n if(options.elem.find('.'+ELEM_IND)[0]){\r\n options.elem.find('.'+ELEM_IND).remove();\r\n }\r\n options.elem.append(tplInd);\r\n \r\n if(options.anim === 'updown'){\r\n tplInd.css('margin-top', -(tplInd.height()/2));\r\n }\r\n \r\n // 事件\r\n tplInd.find('li').on(options.trigger === 'hover' ? 'mouseover' : options.trigger, function(){\r\n that.goto($(this).index());\r\n });\r\n };\r\n \r\n // 滑动切换\r\n Class.prototype.slide = function(type, num){\r\n var that = this;\r\n var elemItem = that.elemItem;\r\n var options = that.config;\r\n var thisIndex = options.index;\r\n var filter = options.elem.attr('lay-filter');\r\n \r\n if(that.haveSlide) return;\r\n \r\n // 滑动方向\r\n if(type === 'sub'){\r\n that.subIndex(num);\r\n elemItem.eq(options.index).addClass(ELEM_PREV);\r\n setTimeout(function(){\r\n elemItem.eq(thisIndex).addClass(ELEM_RIGHT);\r\n elemItem.eq(options.index).addClass(ELEM_RIGHT);\r\n }, 50);\r\n } else { // 默认递增滑\r\n that.addIndex(num);\r\n elemItem.eq(options.index).addClass(ELEM_NEXT);\r\n setTimeout(function(){\r\n elemItem.eq(thisIndex).addClass(ELEM_LEFT);\r\n elemItem.eq(options.index).addClass(ELEM_LEFT);\r\n }, 50); \r\n }\r\n \r\n // 移除过渡类\r\n setTimeout(function(){\r\n elemItem.removeClass(THIS + ' ' + ELEM_PREV + ' ' + ELEM_NEXT + ' ' + ELEM_LEFT + ' ' + ELEM_RIGHT);\r\n elemItem.eq(options.index).addClass(THIS);\r\n that.haveSlide = false; // 解锁\r\n }, 350);\r\n \r\n // 指示器焦点\r\n that.elemInd.find('li').eq(options.index).addClass(THIS)\r\n .siblings().removeClass(THIS);\r\n \r\n that.haveSlide = true;\r\n \r\n // 回调返回的参数\r\n var params = {\r\n index: options.index,\r\n prevIndex: thisIndex,\r\n item: elemItem.eq(options.index)\r\n };\r\n \r\n typeof options.change === 'function' && options.change(params);\r\n layui.event.call(this, MOD_NAME, 'change('+ filter +')', params);\r\n };\r\n \r\n // 事件处理\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n if(options.elem.data('haveEvents')) return;\r\n \r\n // 移入移出容器\r\n options.elem.on('mouseenter', function(){\r\n if (that.config.autoplay === 'always') return;\r\n clearInterval(that.timer);\r\n }).on('mouseleave', function(){\r\n if (that.config.autoplay === 'always') return;\r\n that.autoplay();\r\n });\r\n \r\n options.elem.data('haveEvents', true);\r\n };\r\n \r\n // 核心入口\r\n carousel.render = function(options){\r\n return new Class(options);\r\n };\r\n \r\n exports(MOD_NAME, carousel);\r\n});\r\n\r\n \r\n","/**\r\n * rate 评分评星组件\r\n */\r\n\r\nlayui.define(['jquery', 'lay'],function(exports){\r\n \"use strict\";\r\n\r\n var $ = layui.jquery;\r\n var lay = layui.lay;\r\n\r\n // 外部接口\r\n var rate = {\r\n config: {},\r\n index: layui.rate ? (layui.rate.index + 10000) : 0,\r\n\r\n //设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n\r\n //事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n }\r\n\r\n // 操作当前实例\r\n var thisRate = function () {\r\n var that = this;\r\n var options = that.config;\r\n\r\n return {\r\n setvalue: function (value) {\r\n that.setvalue.call(that, value);\r\n },\r\n config: options\r\n }\r\n };\r\n\r\n //字符常量\r\n var MOD_NAME = 'rate';\r\n var ELEM_VIEW = 'layui-rate';\r\n var ICON_RATE = 'layui-icon-rate';\r\n var ICON_RATE_SOLID = 'layui-icon-rate-solid';\r\n var ICON_RATE_HALF = 'layui-icon-rate-half';\r\n var ICON_SOLID_HALF = 'layui-icon-rate-solid layui-icon-rate-half';\r\n var ICON_SOLID_RATE = 'layui-icon-rate-solid layui-icon-rate';\r\n var ICON_HALF_RATE = 'layui-icon-rate layui-icon-rate-half';\r\n\r\n //构造器\r\n var Class = function (options) {\r\n var that = this;\r\n that.index = ++rate.index;\r\n that.config = $.extend({}, that.config, rate.config, options);\r\n that.render();\r\n };\r\n\r\n //默认配置\r\n Class.prototype.config = {\r\n length: 5, //初始长度\r\n text: false, //是否显示评分等级\r\n readonly: false, //是否只读\r\n half: false, //是否可以半星\r\n value: 0, //星星选中个数\r\n theme: '' //主题颜色\r\n };\r\n\r\n //评分渲染\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n layui.each(elem, function(){\r\n rate.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0]));\r\n\r\n // 自定义主题\r\n var style = options.theme ? ('style=\"color: '+ options.theme + ';\"') : '';\r\n\r\n options.elem = $(options.elem);\r\n\r\n //最大值不能大于总长度\r\n if(options.value > options.length){\r\n options.value = options.length;\r\n }\r\n\r\n //如果没有选择半星的属性,却给了小数的数值,统一向上或向下取整\r\n if(parseInt(options.value) !== options.value){\r\n if(!options.half){\r\n options.value = (Math.ceil(options.value) - options.value) < 0.5 ? Math.ceil(options.value): Math.floor(options.value)\r\n }\r\n }\r\n\r\n //组件模板\r\n var temp = '
                      ';\r\n for(var i = 1;i <= options.length;i++){\r\n var item = '
                    • Math.floor(options.value)?ICON_RATE:ICON_RATE_SOLID)\r\n + '\" '+ style +'>
                    • ';\r\n\r\n if(options.half&&parseInt(options.value) !== options.value&&i == Math.ceil(options.value)){\r\n temp = temp + '
                    • ';\r\n }else{\r\n temp = temp +item;\r\n }\r\n }\r\n temp += '
                    ' + (options.text ? (''+ options.value + '星') : '') + '';\r\n\r\n //开始插入替代元素\r\n var othis = options.elem;\r\n var hasRender = othis.next('.' + ELEM_VIEW);\r\n\r\n //生成替代元素\r\n hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender\r\n\r\n that.elemTemp = $(temp);\r\n\r\n options.span = that.elemTemp.next('span');\r\n\r\n options.setText && options.setText(options.value);\r\n\r\n othis.html(that.elemTemp);\r\n\r\n othis.addClass(\"layui-inline\");\r\n\r\n //如果不是只读,那么进行触控事件\r\n if(!options.readonly) that.action();\r\n\r\n };\r\n\r\n //评分重置\r\n Class.prototype.setvalue = function(value){\r\n var that = this;\r\n var options = that.config;\r\n\r\n options.value = value ;\r\n that.render();\r\n };\r\n\r\n //li触控事件\r\n Class.prototype.action = function(){\r\n var that = this;\r\n var options = that.config;\r\n var _ul = that.elemTemp;\r\n var wide = _ul.find(\"i\").width();\r\n\r\n _ul.children(\"li\").each(function(index){\r\n var ind = index + 1;\r\n var othis = $(this);\r\n\r\n //点击\r\n othis.on('click', function(e){\r\n //将当前点击li的索引值赋给value\r\n options.value = ind;\r\n if(options.half){\r\n //获取鼠标在li上的位置\r\n var x = e.pageX - $(this).offset().left;\r\n if(x <= wide / 2){\r\n options.value = options.value - 0.5;\r\n }\r\n }\r\n\r\n if(options.text) _ul.next(\"span\").text(options.value + \"星\");\r\n\r\n options.choose && options.choose(options.value);\r\n options.setText && options.setText(options.value);\r\n });\r\n\r\n //移入\r\n othis.on('mousemove', function(e){\r\n _ul.find(\"i\").each(function(){\r\n $(this).addClass(ICON_RATE).removeClass(ICON_SOLID_HALF)\r\n });\r\n _ul.find(\"i:lt(\" + ind + \")\").each(function(){\r\n $(this).addClass(ICON_RATE_SOLID).removeClass(ICON_HALF_RATE)\r\n });\r\n // 如果设置可选半星,那么判断鼠标相对li的位置\r\n if(options.half){\r\n var x = e.pageX - $(this).offset().left;\r\n if(x <= wide / 2){\r\n othis.children(\"i\").addClass(ICON_RATE_HALF).removeClass(ICON_RATE_SOLID)\r\n }\r\n }\r\n })\r\n\r\n //移出\r\n othis.on('mouseleave', function(){\r\n _ul.find(\"i\").each(function(){\r\n $(this).addClass(ICON_RATE).removeClass(ICON_SOLID_HALF)\r\n });\r\n _ul.find(\"i:lt(\" + Math.floor(options.value) + \")\").each(function(){\r\n $(this).addClass(ICON_RATE_SOLID).removeClass(ICON_HALF_RATE)\r\n });\r\n //如果设置可选半星,根据分数判断是否有半星\r\n if(options.half){\r\n if(parseInt(options.value) !== options.value){\r\n _ul.children(\"li:eq(\" + Math.floor(options.value) + \")\").children(\"i\").addClass(ICON_RATE_HALF).removeClass(ICON_SOLID_RATE)\r\n }\r\n }\r\n })\r\n\r\n })\r\n };\r\n\r\n //事件处理\r\n Class.prototype.events = function () {\r\n var that = this;\r\n //var options = that.config;\r\n };\r\n\r\n //核心入口\r\n rate.render = function(options){\r\n var inst = new Class(options);\r\n return thisRate.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, rate);\r\n})\r\n","/**\r\n * flow 流加载组件\r\n */\r\n\r\n\r\nlayui.define('jquery', function(exports){\r\n \"use strict\";\r\n\r\n var $ = layui.$, Flow = function(options){}\r\n ,ELEM_MORE = 'layui-flow-more'\r\n ,ELEM_LOAD = '';\r\n\r\n //主方法\r\n Flow.prototype.load = function(options){\r\n var that = this, page = 0, lock, isOver, lazyimg, timer;\r\n options = options || {};\r\n\r\n var elem = $(options.elem); if(!elem[0]) return;\r\n var scrollElem = $(options.scrollElem || document); //滚动条所在元素\r\n var mb = options.mb || 50; //与底部的临界距离\r\n var isAuto = 'isAuto' in options ? options.isAuto : true; //是否自动滚动加载\r\n var end = options.end || '没有更多了'; //“末页”显示文案\r\n\r\n //滚动条所在元素是否为document\r\n var notDocument = options.scrollElem && options.scrollElem !== document;\r\n\r\n //加载更多\r\n var ELEM_TEXT = '加载更多'\r\n ,more = $('');\r\n\r\n if(!elem.find('.layui-flow-more')[0]){\r\n elem.append(more);\r\n }\r\n\r\n //加载下一个元素\r\n var next = function(html, over){\r\n html = $(html);\r\n more.before(html);\r\n over = over == 0 ? true : null;\r\n over ? more.html(end) : more.find('a').html(ELEM_TEXT);\r\n isOver = over;\r\n lock = null;\r\n lazyimg && lazyimg();\r\n };\r\n\r\n //触发请求\r\n var done = function(){\r\n lock = true;\r\n more.find('a').html(ELEM_LOAD);\r\n typeof options.done === 'function' && options.done(++page, next);\r\n };\r\n\r\n done();\r\n\r\n //不自动滚动加载\r\n more.find('a').on('click', function(){\r\n var othis = $(this);\r\n if(isOver) return;\r\n lock || done();\r\n });\r\n\r\n //如果允许图片懒加载\r\n if(options.isLazyimg){\r\n lazyimg = that.lazyimg({\r\n elem: options.elem + ' img'\r\n ,scrollElem: options.scrollElem\r\n });\r\n }\r\n\r\n if(!isAuto) return that;\r\n\r\n scrollElem.on('scroll', function(){\r\n var othis = $(this), top = othis.scrollTop();\r\n\r\n if(timer) clearTimeout(timer);\r\n if(isOver || !elem.width()) return; //如果已经结束,或者元素处于隐藏状态,则不执行滚动加载\r\n\r\n timer = setTimeout(function(){\r\n //计算滚动所在容器的可视高度\r\n var height = notDocument ? othis.height() : $(window).height();\r\n\r\n //计算滚动所在容器的实际高度\r\n var scrollHeight = notDocument\r\n ? othis.prop('scrollHeight')\r\n : document.documentElement.scrollHeight;\r\n\r\n //临界点\r\n if(scrollHeight - top - height <= mb){\r\n lock || done();\r\n }\r\n }, 100);\r\n });\r\n\r\n return that;\r\n };\r\n\r\n //图片懒加载\r\n Flow.prototype.lazyimg = function(options){\r\n var that = this, index = 0, haveScroll;\r\n options = options || {};\r\n\r\n var scrollElem = $(options.scrollElem || document); //滚动条所在元素\r\n var elem = options.elem || 'img';\r\n\r\n //滚动条所在元素是否为document\r\n var notDocument = options.scrollElem && options.scrollElem !== document;\r\n\r\n //显示图片\r\n var show = function(item, height){\r\n var start = scrollElem.scrollTop(), end = start + height;\r\n var elemTop = notDocument ? function(){\r\n return item.offset().top - scrollElem.offset().top + start;\r\n }() : item.offset().top;\r\n\r\n /* 始终只加载在当前屏范围内的图片 */\r\n if(elemTop >= start && elemTop <= end){\r\n if(item.attr('lay-src')){\r\n var src = item.attr('lay-src');\r\n layui.img(src, function(){\r\n var next = that.lazyimg.elem.eq(index);\r\n item.attr('src', src).removeAttr('lay-src');\r\n\r\n /* 当前图片加载就绪后,检测下一个图片是否在当前屏 */\r\n next[0] && render(next);\r\n index++;\r\n }, function(){\r\n var next = that.lazyimg.elem.eq(index);\r\n item.removeAttr('lay-src');\r\n });\r\n }\r\n }\r\n }, render = function(othis, scroll){\r\n\r\n //计算滚动所在容器的可视高度\r\n var height = notDocument ? (scroll||scrollElem).height() : $(window).height();\r\n var start = scrollElem.scrollTop(), end = start + height;\r\n\r\n that.lazyimg.elem = $(elem);\r\n\r\n if(othis){\r\n show(othis, height);\r\n } else {\r\n //计算未加载过的图片\r\n for(var i = 0; i < that.lazyimg.elem.length; i++){\r\n var item = that.lazyimg.elem.eq(i), elemTop = notDocument ? function(){\r\n return item.offset().top - scrollElem.offset().top + start;\r\n }() : item.offset().top;\r\n\r\n show(item, height);\r\n index = i;\r\n\r\n //如果图片的top坐标,超出了当前屏,则终止后续图片的遍历\r\n if(elemTop > end) break;\r\n }\r\n }\r\n };\r\n\r\n render();\r\n\r\n if(!haveScroll){\r\n var timer;\r\n scrollElem.on('scroll', function(){\r\n var othis = $(this);\r\n if(timer) clearTimeout(timer)\r\n timer = setTimeout(function(){\r\n render(null, othis);\r\n }, 50);\r\n });\r\n haveScroll = true;\r\n }\r\n return render;\r\n };\r\n\r\n //暴露接口\r\n exports('flow', new Flow());\r\n});\r\n","/**\r\n * code\r\n * Code 预览组件\r\n */\r\n\r\nlayui.define(['lay', 'util', 'element', 'form'], function(exports){\r\n \"use strict\";\r\n\r\n var $ = layui.$;\r\n var util = layui.util;\r\n var element = layui.element;\r\n var form = layui.form;\r\n var layer = layui.layer;\r\n var hint = layui.hint();\r\n\r\n // 常量\r\n var CONST = {\r\n ELEM_VIEW: 'layui-code-view',\r\n ELEM_TAB: 'layui-tab',\r\n ELEM_HEADER: 'layui-code-header',\r\n ELEM_FULL: 'layui-code-full',\r\n ELEM_PREVIEW: 'layui-code-preview',\r\n ELEM_ITEM: 'layui-code-item',\r\n ELEM_SHOW: 'layui-show',\r\n ELEM_LINE: 'layui-code-line',\r\n ELEM_LINE_NUM: 'layui-code-line-number',\r\n ELEM_LN_MODE: 'layui-code-ln-mode',\r\n CDDE_DATA_CLASS: 'LayuiCodeDataClass',\r\n LINE_RAW_WIDTH: 45, // 行号初始宽度,需与 css 保持一致\r\n };\r\n\r\n // 默认参数项\r\n var config = {\r\n elem: '', // 元素选择器\r\n about: '', // 代码栏右上角信息\r\n ln: true, // 代码区域是否显示行号\r\n header: false, // 是否显示代码栏头部区域\r\n encode: true, // 是否对 code 进行编码(若开启预览,则强制开启)\r\n copy: true, // 是否开启代码区域复制功能图标\r\n // 默认文本\r\n text: {\r\n code: util.escape(''),\r\n preview: 'Preview',\r\n },\r\n wordWrap: true, // 是否自动换行\r\n lang: 'text', // 指定语言类型\r\n highlighter: false, // 是否开启语法高亮,'hljs','prism','shiki'\r\n langMarker: false, // 代码区域是否显示语言类型标记\r\n };\r\n\r\n // 初始索引\r\n var codeIndex = layui.code ? (layui.code.index + 10000) : 0;\r\n\r\n // 去除尾部空格\r\n var trimEnd = function(str){\r\n return String(str).replace(/\\s+$/, '');\r\n }\r\n // 保留首行缩进\r\n var trim = function(str){\r\n return trimEnd(str).replace(/^\\n|\\n$/, '');\r\n };\r\n\r\n // export api\r\n exports('code', function(options, mode){\r\n options = $.extend(true, {}, config, options);\r\n\r\n // 返回对象\r\n var ret = {\r\n config: options,\r\n reload: function(opts) { // 重载\r\n layui.code(this.updateOptions(opts));\r\n },\r\n updateOptions: function(opts) { // 更新属性(选项)\r\n opts = opts || {};\r\n delete opts.elem;\r\n return $.extend(true, options, opts);\r\n },\r\n reloadCode: function(opts) { // 仅重载 code\r\n layui.code(this.updateOptions(opts), 'reloadCode');\r\n }\r\n };\r\n\r\n // 若 elem 非唯一\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n // 是否正向渲染\r\n layui.each(options.obverse ? elem : elem.get().reverse(), function(){\r\n layui.code($.extend({}, options, {\r\n elem: this\r\n }), mode);\r\n });\r\n return ret;\r\n }\r\n\r\n // 目标元素是否存在\r\n var othis = options.elem = $(options.elem);\r\n if(!othis[0]) return ret;\r\n\r\n // 合并属性上的参数,并兼容旧版本属性写法 lay-*\r\n $.extend(true, options, lay.options(othis[0]), function(obj){\r\n var attrs = ['title', 'height', 'encode', 'skin', 'about'];\r\n layui.each(attrs, function(i, attr){\r\n var value = othis.attr('lay-'+ attr);\r\n if(typeof value === 'string'){\r\n obj[attr] = value;\r\n }\r\n })\r\n return obj;\r\n }({}));\r\n\r\n // codeRender 需要关闭编码\r\n // 未使用 codeRender 时若开启了预览,则强制开启编码\r\n options.encode = (options.encode || options.preview) && !options.codeRender;\r\n\r\n // 获得初始 code\r\n options.code = options.code || function(){\r\n var arr = [];\r\n var textarea = othis.children('textarea');\r\n\r\n // 若内容放置在 textarea 中\r\n textarea.each(function(){\r\n arr.push(trim(this.value));\r\n });\r\n\r\n // 内容直接放置在元素外层\r\n if(arr.length === 0){\r\n arr.push(trim(othis.html()));\r\n }\r\n\r\n return arr.join('');\r\n }();\r\n\r\n // 创建 code 行结构\r\n var createCode = function(html) {\r\n // codeRender\r\n if(typeof options.codeRender === 'function') {\r\n html = options.codeRender(String(html), options);\r\n }\r\n\r\n // code 行\r\n var lines = String(html).split(/\\r?\\n/g);\r\n\r\n // 包裹 code 行结构\r\n html = $.map(lines, function(line, num) {\r\n return [\r\n '
                    ',\r\n (\r\n options.ln ? [\r\n '
                    ',\r\n (util.digit(num + 1) + '.'),\r\n '
                    ',\r\n ].join('') : ''\r\n ),\r\n '
                    ',\r\n (line || ' '),\r\n '
                    ',\r\n '
                    '\r\n ].join('');\r\n });\r\n\r\n return {\r\n lines: lines,\r\n html: html\r\n };\r\n };\r\n\r\n // 原始 code\r\n var rawCode = options.code;\r\n\r\n // 最终 code\r\n var finalCode = function(code) {\r\n return typeof options.codeParse === 'function' ?\r\n options.codeParse(code, options) :\r\n code;\r\n };\r\n\r\n // 仅重载 code\r\n if (mode === 'reloadCode') {\r\n return othis.children('.layui-code-wrap').html(\r\n createCode(finalCode(rawCode)).html\r\n ), ret;\r\n }\r\n\r\n // 自增索引\r\n var index = layui.code.index = ++codeIndex;\r\n othis.attr('lay-code-index', index);\r\n\r\n // 初始化 className\r\n var hasDataClass = CONST.CDDE_DATA_CLASS in othis.data();\r\n if (hasDataClass) {\r\n othis.attr('class', othis.data(CONST.CDDE_DATA_CLASS) || '');\r\n }\r\n\r\n // 记录初始 className\r\n if (!hasDataClass) {\r\n othis.data(CONST.CDDE_DATA_CLASS, othis.attr('class'));\r\n }\r\n\r\n // 工具栏\r\n var tools = {\r\n copy: {\r\n className: 'file-b',\r\n title: ['复制代码'],\r\n event: function(obj){\r\n var code = util.unescape(finalCode(options.code));\r\n\r\n // 写入剪切板\r\n lay.clipboard.writeText({\r\n text: code,\r\n done: function() {\r\n layer.msg('已复制', {icon: 1});\r\n },\r\n error: function() {\r\n layer.msg('复制失败', {icon: 2});\r\n }\r\n });\r\n\r\n typeof options.onCopy === 'function' && options.onCopy(code);\r\n }\r\n }\r\n };\r\n\r\n // 移除包裹结构\r\n var unwrap = (function fn() {\r\n var elemViewHas = othis.parent('.' + CONST.ELEM_PREVIEW);\r\n var elemTabHas = elemViewHas.children('.'+ CONST.ELEM_TAB);\r\n var elemPreviewViewHas = elemViewHas.children('.' + CONST.ELEM_ITEM +'-preview');\r\n\r\n // 移除旧结构\r\n elemTabHas.remove(); // 移除 tab\r\n elemPreviewViewHas.remove(); // 移除预览区域\r\n if (elemViewHas[0]) othis.unwrap(); // 移除外层容器\r\n\r\n return fn;\r\n })();\r\n\r\n // 是否开启预览\r\n if(options.preview){\r\n var FILTER_VALUE = 'LAY-CODE-DF-'+ index;\r\n var layout = options.layout || ['code', 'preview'];\r\n var isIframePreview = options.preview === 'iframe';\r\n\r\n // 追加 Tab 组件\r\n var elemView = $('
                    ');\r\n var elemTabView = $('
                    ');\r\n var elemHeaderView = $('
                    ');\r\n var elemPreviewView = $('
                    ');\r\n var elemToolbar = $('
                    ');\r\n\r\n\r\n if(options.id) elemView.attr('id', options.id);\r\n elemView.addClass(options.className);\r\n elemTabView.attr('lay-filter', FILTER_VALUE);\r\n\r\n // 标签头\r\n layui.each(layout, function(i, v){\r\n var li = $('
                  • ');\r\n if(i === 0) li.addClass('layui-this');\r\n li.html(options.text[v]);\r\n elemHeaderView.append(li);\r\n });\r\n\r\n // 工具栏\r\n $.extend(tools, {\r\n 'full': {\r\n className: 'screen-full',\r\n title: ['最大化显示', '还原显示'],\r\n event: function(obj){\r\n var el = obj.elem;\r\n var elemView = el.closest('.'+ CONST.ELEM_PREVIEW);\r\n var classNameFull = 'layui-icon-'+ this.className;\r\n var classNameRestore = 'layui-icon-screen-restore';\r\n var title = this.title;\r\n var htmlElem = $('html,body');\r\n var ELEM_SCROLLBAR_HIDE = 'layui-scrollbar-hide';\r\n\r\n if(el.hasClass(classNameFull)){\r\n elemView.addClass(CONST.ELEM_FULL);\r\n el.removeClass(classNameFull).addClass(classNameRestore);\r\n el.attr('title', title[1]);\r\n htmlElem.addClass(ELEM_SCROLLBAR_HIDE);\r\n } else {\r\n elemView.removeClass(CONST.ELEM_FULL);\r\n el.removeClass(classNameRestore).addClass(classNameFull);\r\n el.attr('title', title[0]);\r\n htmlElem.removeClass(ELEM_SCROLLBAR_HIDE);\r\n }\r\n }\r\n },\r\n 'window': {\r\n className: 'release',\r\n title: ['在新窗口预览'],\r\n event: function(obj){\r\n util.openWin({\r\n content: finalCode(options.code)\r\n });\r\n }\r\n }\r\n });\r\n\r\n // copy\r\n if(options.copy){\r\n if(layui.type(options.tools) === 'array'){\r\n // 若 copy 未存在于 tools 中,则追加到最前\r\n if(options.tools.indexOf('copy') === -1){\r\n options.tools.unshift('copy');\r\n }\r\n } else {\r\n options.tools = ['copy'];\r\n }\r\n }\r\n\r\n // 工具栏事件\r\n elemToolbar.on('click', '>i', function(){\r\n var oi = $(this);\r\n var type = oi.data('type');\r\n var parameters = {\r\n elem: oi,\r\n type: type,\r\n options: options, // 当前属性选项\r\n rawCode: options.code, // 原始 code\r\n finalCode: util.unescape(finalCode(options.code)) // 最终 code\r\n };\r\n\r\n // 内部 tools event\r\n tools[type] && typeof tools[type].event === 'function' && tools[type].event(parameters);\r\n\r\n // 外部 tools event\r\n typeof options.toolsEvent === 'function' && options.toolsEvent(parameters);\r\n });\r\n\r\n // 增加工具栏\r\n if (options.addTools && options.tools) {\r\n options.tools = [].concat(options.tools, options.addTools);\r\n }\r\n\r\n // 渲染工具栏\r\n layui.each(options.tools, function(i, v){\r\n var viso = typeof v === 'object'; // 若为 object 值,则可自定义更多属性\r\n var tool = viso ? v : (\r\n tools[v] || {\r\n className: v,\r\n title: [v]\r\n }\r\n );\r\n\r\n var className = tool.className || tool.type;\r\n var title = tool.title || [''];\r\n var type = viso ? ( tool.type || className ) : v;\r\n\r\n if (!type) return;\r\n\r\n // 若非内置 tool,则合并到 tools 中\r\n if (!tools[type]) {\r\n var obj = {};\r\n obj[type] = tool;\r\n $.extend(tools, obj);\r\n }\r\n\r\n elemToolbar.append(\r\n ''\r\n );\r\n });\r\n\r\n othis.addClass(CONST.ELEM_ITEM).wrap(elemView); // 包裹外层容器\r\n elemTabView.append(elemHeaderView); // 追加标签头\r\n options.tools && elemTabView.append(elemToolbar); // 追加工具栏\r\n othis.before(elemTabView); // 追加标签结构\r\n\r\n // 追加预览\r\n if(isIframePreview){\r\n elemPreviewView.html('');\r\n }\r\n\r\n // 执行预览\r\n var runPreview = function(thisItemBody){\r\n var iframe = thisItemBody.children('iframe')[0];\r\n\r\n // 是否 iframe 方式预览\r\n if(isIframePreview && iframe){\r\n iframe.srcdoc = finalCode(options.code);\r\n } else {\r\n thisItemBody.html(options.code);\r\n }\r\n\r\n // 当前实例预览完毕后的回调\r\n setTimeout(function(){\r\n typeof options.done === 'function' && options.done({\r\n container: thisItemBody,\r\n options: options,\r\n render: function(){\r\n form.render(thisItemBody.find('.layui-form'));\r\n element.render();\r\n }\r\n });\r\n },3);\r\n };\r\n\r\n if(layout[0] === 'preview'){\r\n elemPreviewView.addClass(CONST.ELEM_SHOW);\r\n othis.before(elemPreviewView);\r\n runPreview(elemPreviewView);\r\n } else {\r\n othis.addClass(CONST.ELEM_SHOW).after(elemPreviewView);\r\n }\r\n\r\n // 内容项初始化样式\r\n options.previewStyle = [options.style, options.previewStyle].join('');\r\n elemPreviewView.attr('style', options.previewStyle);\r\n\r\n // tab change\r\n element.on('tab('+ FILTER_VALUE +')', function(data){\r\n var $this = $(this);\r\n var thisElem = $(data.elem).closest('.'+ CONST.ELEM_PREVIEW);\r\n var elemItemBody = thisElem.find('.'+ CONST.ELEM_ITEM);\r\n var thisItemBody = elemItemBody.eq(data.index);\r\n\r\n elemItemBody.removeClass(CONST.ELEM_SHOW);\r\n thisItemBody.addClass(CONST.ELEM_SHOW);\r\n\r\n if($this.attr('lay-id') === 'preview'){\r\n runPreview(thisItemBody);\r\n }\r\n\r\n setCodeLayout();\r\n });\r\n }\r\n\r\n // 创建 code 容器\r\n var codeElem = $(''); // 此处的闭合标签是为了兼容 IE8\r\n\r\n // 添加主容器 className\r\n othis.addClass(function(arr) {\r\n if (!options.wordWrap) arr.push('layui-code-nowrap');\r\n return arr.join(' ')\r\n }(['layui-code-view layui-border-box']));\r\n\r\n // code 主题风格\r\n var theme = options.theme || options.skin;\r\n if (theme) {\r\n othis.removeClass('layui-code-theme-dark layui-code-theme-light');\r\n othis.addClass('layui-code-theme-'+ theme);\r\n }\r\n\r\n // 添加高亮必要的 className\r\n if (options.highlighter) {\r\n othis.addClass([\r\n options.highlighter,\r\n 'language-' + options.lang,\r\n 'layui-code-hl'\r\n ].join(' '));\r\n }\r\n\r\n // 获取 code 行结构\r\n var createCodeRst = createCode(\r\n options.encode ? util.escape(finalCode(rawCode)) : rawCode // 是否编码\r\n );\r\n var lines = createCodeRst.lines;\r\n\r\n // 插入 code\r\n othis.html(codeElem.html(createCodeRst.html));\r\n\r\n // 插入行号边栏\r\n if (options.ln) {\r\n othis.append('
                    ');\r\n }\r\n\r\n // 兼容旧版本 height 属性\r\n if (options.height) {\r\n codeElem.css('max-height', options.height);\r\n }\r\n\r\n // code 区域样式\r\n options.codeStyle = [options.style, options.codeStyle].join('');\r\n if (options.codeStyle) {\r\n codeElem.attr('style', function(i, val) {\r\n return (val || '') + options.codeStyle;\r\n });\r\n }\r\n\r\n // 动态设置样式\r\n var cssRules = [\r\n {\r\n selector: '>.layui-code-wrap>.layui-code-line{}',\r\n setValue: function(item, value) {\r\n item.style['padding-left'] = value + 'px';\r\n }\r\n },\r\n {\r\n selector: '>.layui-code-wrap>.layui-code-line>.layui-code-line-number{}',\r\n setValue: function(item, value) {\r\n item.style.width = value + 'px';\r\n }\r\n },\r\n {\r\n selector: '>.layui-code-ln-side{}',\r\n setValue: function(item, value) {\r\n item.style.width = value + 'px';\r\n }\r\n }\r\n ];\r\n\r\n // 生成初始 style 元素\r\n var styleElem = lay.style({\r\n target: othis[0],\r\n id: 'DF-code-'+ index,\r\n text: $.map($.map(cssRules, function(val){\r\n return val.selector;\r\n }), function(val, i) {\r\n return ['.layui-code-view[lay-code-index=\"'+ index + '\"]', val].join(' ');\r\n }).join('')\r\n })\r\n\r\n // 动态设置 code 布局\r\n var setCodeLayout = (function fn() {\r\n if (options.ln) {\r\n var multiLine = Math.floor(lines.length / 100);\r\n var lineElem = codeElem.children('.'+ CONST.ELEM_LINE);\r\n var width = lineElem.last().children('.'+ CONST.ELEM_LINE_NUM).outerWidth();\r\n\r\n othis.addClass(CONST.ELEM_LN_MODE);\r\n\r\n // 若超出 100 行\r\n if (multiLine && width > CONST.LINE_RAW_WIDTH) {\r\n lay.getStyleRules(styleElem, function(item, i) {\r\n try {\r\n cssRules[i].setValue(item, width);\r\n } catch(e) { }\r\n });\r\n }\r\n }\r\n\r\n return fn;\r\n })();\r\n\r\n // 创建 code header\r\n if (options.header) {\r\n var headerElem = $('
                    ');\r\n headerElem.html(options.title || options.text.code);\r\n othis.prepend(headerElem);\r\n }\r\n\r\n // 创建 code 区域固定条\r\n var elemFixbar = $('
                    ');\r\n\r\n // 若开启复制,且未开启预览,则单独生成复制图标\r\n if(options.copy && !options.preview){\r\n var copyElem = $(['',\r\n '',\r\n ''].join(''));\r\n\r\n // 点击复制\r\n copyElem.on('click', function(){\r\n tools.copy.event();\r\n });\r\n\r\n elemFixbar.append(copyElem);\r\n }\r\n\r\n // 创建 language marker\r\n if (options.langMarker) {\r\n elemFixbar.append('' + options.lang + '');\r\n }\r\n\r\n // 创建 about 自定义内容\r\n if (options.about) {\r\n elemFixbar.append(options.about);\r\n }\r\n\r\n // 生成 code fixbar\r\n othis.append(elemFixbar);\r\n\r\n // code 渲染完毕后的回调\r\n if (!options.preview) {\r\n setTimeout(function(){\r\n typeof options.done === 'function' && options.done({});\r\n },3);\r\n }\r\n\r\n // 所有实例渲染完毕后的回调\r\n if(options.elem.length === index + 1){\r\n typeof options.allDone === 'function' && options.allDone();\r\n }\r\n\r\n return ret;\r\n });\r\n});\r\n\r\n// 若为源码版,则自动加载该组件依赖的 css 文件\r\nif(!layui['layui.all']){\r\n layui.addcss('modules/code.css?v=6', 'skincodecss');\r\n}\r\n"]} \ No newline at end of file +{"version":3,"sources":["layui.js","modules/layui.all.js","modules/lay.js","modules/laytpl.js","modules/laypage.js","modules/laydate.js","modules/jquery.js","modules/layer.js","modules/util.js","modules/dropdown.js","modules/slider.js","modules/colorpicker.js","modules/element.js","modules/upload.js","modules/form.js","modules/table.js","modules/treeTable.js","modules/tree.js","modules/transfer.js","modules/carousel.js","modules/rate.js","modules/flow.js","modules/code.js"],"names":["win","jsPath","doc","document","config","modules","status","timeout","event","Layui","this","v","GLOBAL","LAYUI_GLOBAL","getPath","currentScript","src","js","scripts","last","length","i","readyState","dir","substring","lastIndexOf","error","msg","type","console","isOpera","opera","toString","builtin","lay","layer","laydate","laypage","laytpl","form","upload","dropdown","transfer","tree","table","treeTable","element","rate","colorpicker","slider","carousel","flow","util","code","jquery","all","layui.all","EV_REMOVE","prototype","cache","define","deps","factory","use","setApp","app","exports","layui","callback","apps","from","node","url","that","head","getElementsByTagName","item","jQuery","fn","on","each","index","splice","$","onScriptLoad","e","readyRegExp","navigator","platform","test","currentTarget","srcElement","removeChild","poll","onCallback","setTimeout","push","slice","apply","host","match","location","base","replace","createElement","async","charset","version","Date","getTime","appendChild","attachEvent","indexOf","addEventListener","disuse","isArray","getStyle","name","style","currentStyle","getComputedStyle","getPropertyValue","link","href","cssname","id","STAUTS_NAME","debug","rel","media","getElementById","getLinkElem","parseInt","removeAttribute","getAttribute","setAttribute","addcss","firename","modName","img","Image","complete","onload","onerror","options","key","o","clone","extend","router","hash","data","path","search","split","obj","pathname","_index","substr","settings","storage","localStorage","JSON","parse","value","remove","stringify","sessionData","sessionStorage","device","agent","userAgent","toLowerCase","getVersion","label","exp","RegExp","result","os","ie","ActiveXObject","weixin","android","ios","mobile","hint","_typeof","operand","String","Object","call","_isArray","len","callFn","sort","arr","desc","notClone","o1","o2","v1","v2","isNaN","isNum","reverse","stope","thisEvent","stopPropagation","cancelBubble","onevent","events","params","filter","eventName","filterName","_","off","debounce","func","wait","context","args","arguments","clearTimeout","throttle","cooldown","window","selector","Class","elem","querySelectorAll","Array","searchElement","fromIndex","rst","val","constructor","ai","target","digit","num","str","Math","pow","elemName","attr","hasScrollbar","body","scrollHeight","innerHeight","documentElement","clientHeight","getStyleRules","rules","sheet","styleSheet","cssRules","styleText","text","cssText","innerHTML","styleElem","find","append","position","opts","scrollArea","winArea","margin","left","top","rect1","clickType","rect","clientX","clientY","right","bottom","getBoundingClientRect","elemWidth","offsetWidth","elemHeight","offsetHeight","align","allowBottomOut","SYSTEM_RELOAD","othis","attrName","attrValue","Function","ev","errorText","join","isTopElem","topElems","matched","clipboard","writeText","then","done","opacity","select","execCommand","err","addStr","new_str","ii","removeStr","isObject","children","contains","child","addClass","className","removeClass","hasClass","has","css","parseValue","undefined","thisKey","thisValue","width","height","removeAttr","html","parentNode","detachEvent","removeEventListener","open","close","tool","escape","inner","source","template","tagExp","__","jss","jsse","tag","start","render","DISABLED","view","skipText","elemArr","plate","groups","Number","layout","count","curr","limits","limit","pages","ceil","prev","next","views","page","pager","first","halve","floor","end","max","theme","def","limitTemplet","refresh","skip","jump","isskip","childs","btn","input","nodeName","keyCode","load","even","isLayui","ready","MOD_ID","weekStart","laydate_dir","set","thisModule","inst","content","reload","MOD_NAME","THIS","LIMIT_YEAR","ELEM_STATIC","ELEM_LIST","ELEM_SELECTED","ELEM_HINT","ELEM_PREV","ELEM_NEXT","ELEM_CONFIRM","ELEM_TIME_TEXT","ELEM_TIME_BTN","ELEM_PREVIEW","ELEM_SHADE","newThat","getThis","init","dateType","formatArr","format","isLeapYear","year","range","isInitValue","min","trigger","show","showBottom","isPreview","btns","lang","calendar","mark","holidays","zIndex","change","autoConfirm","shade","cn","weeks","time","timeTips","startTime","endTime","dateTips","month","tools","confirm","clear","now","invalidDate","formatError","preview","en","isStatic","date","datetime","eventElem","fullPanel","rangeStr","rangeLinked","autoCalendarModel","state","startDate","endDate","auto","rangeElem","EXP_IF","EXP_SPLIT","EXP","EXP_IF_ONE","isInput","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","ymd","hms","day","tDate","newDate","getFullYear","getMonth","getDate","hours","minutes","seconds","thisDate","getHours","getMinutes","getSeconds","elemID","setValue","systemDate","themeStr","shortcutBtns","colorTheme","class","elemMain","elemHeader","elemCont","elemTable","divFooter","footer","divShortcut","shortcut","divHeader","headerChild","spanY","spanM","divContent","thead","theadTr","tr","insertRow","j","th","insertCell","insertBefore","ELEM_MAIN","title","shortcuts","btnSetting","dataset","timeBtn","dateTime","endState","listYM","checkDate","click","main","isPrimaryColor","thisElemDate","thisId","insertAdjacentHTML","changeEvent","renderAdditional","div","hinTimer","ms","getAsYM","Y","M","thisMaxDate","vals","arrDate","minMaxError","checkValid","getEndDate","initDate","startEnd","thisv","parseFloat","EYM","_i","_v","getDateTime","td","YMD","keys","idx","dayStr","timestamp","isOut","thisDateTime","startWeek","prevMaxDate","isAlone","tds","elemYM","firstDate","setFullYear","getDay","index_","st","list","setBtnStatus","timeParams","stampRange","yearNum","setTimeStatus","span","scroll","ul","haveList","isCN","startY","li","lay-ym","ol","inedx","childUL","ym","closeList","choose","scrollTop","haveSpan","tips","elemBtn","elemPreview","color","thisTime","param","panelIndex","isChange","YM","isSameDate","dateTimeTemp","active","addSubYear","isYear","isMonth","prevYear","prevMonth","nextMonth","nextYear","header","layYM","layType","tagName","toLocaleLowerCase","showEvent","eventHandler","unbind","run","closeStop","preventDefault","getInst","one","concat","amd","global","module","w","Error","noGlobal","deletedIds","class2type","hasOwn","hasOwnProperty","support","rtrim","rmsPrefix","rdashAlpha","fcamelCase","letter","toUpperCase","isArrayLike","isWindow","toArray","get","pushStack","elems","ret","merge","prevObject","map","eq","copyIsArray","copy","deep","isFunction","isPlainObject","expando","random","isReady","noop","isNumeric","realStringObj","isEmptyObject","nodeType","ownFirst","globalEval","trim","execScript","camelCase","string","makeArray","results","inArray","second","grep","invert","matches","callbackExpect","arg","guid","proxy","tmp","Symbol","iterator","Sizzle","Expr","getText","isXML","tokenize","compile","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","preferredDoc","dirruns","classCache","createCache","tokenCache","compilerCache","sortOrder","a","b","pop","push_native","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","rcomma","rcombinators","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rinputs","rheader","rnative","rquickExpr","rsibling","rescape","runescape","funescape","escaped","escapedWhitespace","high","fromCharCode","unloadHandler","childNodes","els","seed","m","nid","nidselect","newSelector","newContext","ownerDocument","exec","getElementsByClassName","qsa","toSelector","testContext","qsaError","cacheLength","shift","markFunction","assert","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createPositionalPseudo","argument","matchIndexes","parent","defaultView","createComment","getById","getElementsByName","attrId","getAttributeNode","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","hasCompare","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","specified","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","what","simple","forward","ofType","xml","uniqueCache","outerCache","nodeIndex","useCache","lastChild","uniqueID","pseudo","setFilters","not","matcher","unmatched","innerText","elemLang","root","focus","activeElement","hasFocus","tabIndex","enabled","disabled","checked","selected","selectedIndex","empty","button","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","addCombinator","combinator","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","matcherIn","matcherOut","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","div1","defaultValue","unique","isXMLDoc","until","truncate","is","siblings","n","rneedsContext","rsingleTag","risSimple","winnow","qualifier","self","rootjQuery","rparentsprev","charAt","parseHTML","guaranteedUnique","contents","sibling","targets","closest","l","pos","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","contentWindow","readyList","rnotwhite","detach","completed","Callbacks","object","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","disable","lock","fireWith","Deferred","tuples","promise","always","deferred","fail","fns","newDefer","tuple","returned","progress","notify","resolve","reject","pipe","stateString","when","subordinate","progressValues","progressContexts","resolveContexts","resolveValues","remaining","updateFunc","values","notifyWith","resolveWith","readyWait","holdReady","hold","triggerHandler","doScroll","frameElement","doScrollCheck","inlineBlockNeedsLayout","container","zoom","deleteExpando","shrinkWrapBlocksVal","acceptData","noData","rbrace","rmultiDash","dataAttr","parseJSON","isEmptyDataObject","internalData","pvt","internalKey","isNode","toJSON","thisCache","internalRemoveData","cleanData","applet ","embed ","object ","hasData","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","defer","shrinkWrapBlocks","pnum","rcssNum","cssExpand","isHidden","el","adjustCSS","prop","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","access","chainable","emptyGet","raw","bulk","rcheckableType","rtagName","rscriptType","rleadingWhitespace","nodeNames","createSafeFragment","safeFrag","createDocumentFragment","fragment","leadingWhitespace","tbody","htmlSerialize","html5Clone","cloneNode","outerHTML","appendChecked","noCloneChecked","checkClone","noCloneEvent","wrapMap","option","legend","area","col","_default","getAll","found","setGlobalEval","refElements","optgroup","tfoot","colgroup","caption","rhtml","rtbody","fixDefaultChecked","defaultChecked","buildFragment","selection","ignored","wrap","safe","nodes","htmlPrefilter","createTextNode","focusin","rformElems","rkeyEvent","rmouseEvent","rfocusMorph","rtypenamespace","returnTrue","returnFalse","safeActiveElement","types","origFn","t","handleObjIn","special","eventHandle","handlers","namespaces","origType","elemData","handle","triggered","dispatch","delegateType","bindType","handleObj","namespace","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","onlyHandlers","ontype","bubbleType","eventPath","Event","isTrigger","rnamespace","noBubble","parentWindow","isPropagationStopped","isDefaultPrevented","fix","handlerQueue","delegateTarget","preDispatch","isImmediatePropagationStopped","postDispatch","sel","originalEvent","fixHook","fixHooks","mouseHooks","keyHooks","props","metaKey","original","which","charCode","eventDoc","fromElement","pageX","scrollLeft","clientLeft","pageY","clientTop","relatedTarget","toElement","blur","beforeunload","returnValue","simulate","isSimulated","defaultPrevented","timeStamp","stopImmediatePropagation","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","_submitBubble","propertyName","_justChanged","attaches","rinlinejQuery","rnoshimcache","rxhtmlTag","rnoInnerhtml","rchecked","rscriptTypeMasked","rcleanScript","fragmentDiv","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","oldData","curData","domManip","collection","hasScripts","iNoClone","_evalUrl","keepData","dataAndEvents","deepDataAndEvents","destElements","srcElements","inPage","fixCloneNodeIssues","defaultSelected","forceAcceptData","prepend","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","insert","iframe","elemdisplay","HTML","BODY","actualDisplay","display","defaultDisplay","write","pixelPositionVal","pixelMarginRightVal","boxSizingReliableVal","reliableHiddenOffsetsVal","reliableMarginRightVal","reliableMarginLeftVal","rmargin","rnumnonpx","swap","old","computeStyleTests","divStyle","marginLeft","marginRight","getClientRects","borderCollapse","cssFloat","backgroundClip","clearCloneStyle","boxSizing","MozBoxSizing","WebkitBoxSizing","reliableHiddenOffsets","boxSizingReliable","pixelMarginRight","pixelPosition","reliableMarginRight","reliableMarginLeft","getStyles","curCSS","rposition","addGetHookIf","conditionFn","hookFn","opener","computed","maxWidth","minWidth","rs","rsLeft","runtimeStyle","pixelLeft","ralpha","ropacity","rdisplayswap","rnumsplit","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","cssPrefixes","emptyStyle","vendorPropName","capName","showHide","hidden","setPositiveNumber","subtract","augmentWidthOrHeight","extra","isBorderBox","styles","getWidthOrHeight","valueIsBorderBox","Tween","easing","cssHooks","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","lineHeight","order","orphans","widows","cssProps","float","origName","isFinite","$1","padding","border","prefix","suffix","expand","expanded","parts","hide","toggle","propHooks","percent","eased","duration","step","fx","linear","p","swing","cos","PI","fxNow","timerId","rfxtypes","rrun","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","tick","currentTime","tweens","specialEasing","originalProperties","originalOptions","gotoEnd","rejectWith","timer","anim","*","tweener","oldfire","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","opt","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","interval","setInterval","clearInterval","slow","fast","delay","getSetAttribute","hrefNormalized","checkOn","optSelected","enctype","optDisabled","radioValue","rreturn","rspaces","valHooks","optionSet","nodeHook","boolHook","ruseDefault","getSetInput","rfocusable","nType","attrHooks","propName","attrNames","propFix","getter","setAttributeNode","createAttribute","coords","contenteditable","rclickable","rclass","removeProp","tabindex","for","getClass","classes","clazz","finalValue","curValue","toggleClass","stateVal","classNames","hover","fnOver","fnOut","nonce","rquery","rvalidtokens","rhash","requireNonComma","depth","comma","parseXML","DOMParser","parseFromString","loadXML","rts","rheaders","rnoContent","rprotocol","rurl","transports","allTypes","ajaxLocation","ajaxLocParts","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","ajaxConvert","s","response","isSuccess","conv2","current","conv","converters","responseFields","dataFilter","filterHidden","lastModified","etag","isLocal","processData","contentType","accepts","json","* text","text html","text json","text xml","ajaxSetup","ajaxPrefilter","ajaxTransport","ajax","cacheURL","responseHeadersString","timeoutTimer","fireGlobals","transport","responseHeaders","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","mimeType","abort","statusText","finalText","success","method","crossDomain","traditional","hasContent","ifModified","headers","beforeSend","send","nativeStatusText","responses","firstDataType","ct","finalDataType","modified","getJSON","getScript","throws","wrapAll","wrapInner","unwrap","visible","r20","rbracket","rCRLF","rsubmitterTypes","rsubmittable","encodeURIComponent","buildParams","serialize","serializeArray","xhr","createActiveXHR","documentMode","createStandardXHR","xhrId","xhrCallbacks","xhrSupported","XMLHttpRequest","cors","username","xhrFields","isAbort","onreadystatechange","responseText","script","text script","scriptCharset","oldCallbacks","rjsonp","_load","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","keepScripts","parsed","getWindow","animated","offset","setOffset","curCSSTop","curTop","curOffset","curCSSLeft","curElem","curLeft","curPosition","using","box","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","bind","delegate","undelegate","size","andSelf","layer_dir","removeFocus","resize","minStackIndex","minStackArr","STATUS_NAME","alert","yes","cancel","btn2","rskin","skin","doms","closeBtn","icon","follow","fixed","setings","creat","pt","0","1","2","3","4","5","6","slideLeft","slideRight","SHADE","MOVE","move","isOutAnim","minStack","moveType","scrollbar","vessel","conType","times","titype","ismax","maxmin","titleHTML","face","animClass","additFaceClass","btnAlign","layero","elemShade","restore","hideOnClose","closeAll","tipsMore","moveElem","shadeo","setScrollbar","background-color","innerWidth","outerWidth","titHeight","outerHeight","btnHeight","setHeight","maxHeight","offsetTop","offsetLeft","layArea","goal","tipsG","guide","autoLeft","tipLeft","where","tipTop","padding-right","_DOC","DATA_NAME","resizeElem","dict","eventMoveElem","eventResizeElem","docEvent","setRig","setBot","X","stX","stY","moveOut","resizing","moveEnd","openLayer","IE6","shadeClose","full","reselect","sthis","setTop","record","restScrollbar","removeProperty","getChildFrame","getFrameIndex","iframeAuto","heg","iframeSrc","contElem","elemMin","hasMinLeft","maxminStatus","minLeft","edgeIndex","isfix","closeAnim","WRAP","domsElem","closeLast","prompt","placeholder","formType","maxlength","tab","photos","loop","toolbar","imgIndex","pushData","alt","pid","thumb","imgprev","tabimg","imgnext","errorMsg","keyup","isNumber","getTransform","transforms","rotate","scaleX","imgElem","transform","ratio","delta","wheelDelta","detail","zoomElem","loadi","loadImage","winarea","imgarea","wh","_$","isMobile","_win","propSuffix","deliver","fixbar","elemTopBar","setTopBar","ELEM","$doc","$target","bars","default","$scroll","bar1","bar2","elemBar","lay-type","bgcolor","countdown","clock","countTime","d","h","setTime","timeAgo","onlyDate","stamp","toDateString","years","days","milliseconds","meridiem","getMilliseconds","customMeridiem","hm","yy","yyyy","MM","dd","H","HH","hh","A","mm","ss","SSS","unescape","openWin","specs","toVisibleArea","scrollElem","SCROLL_NAME","OFFSET_NAME","scrollValue","scrollOffset","thisOffset","thisElem","vertical","eventType","_body","UTIL_EVENT_CALLBACK","_WIN","ELEM_LI","clickOrMousedown","MOD_INDEX","customName","reloadData","STR_ELEM","STR_ITEM_UP","STR_ITEM_DOWN","STR_MENU_TITLE","STR_ITEM_GROUP","STR_ITEM_PARENT","STR_ITEM_CHECKED","STR_ITEM_CHECKED2","STR_MENU_PANEL","STR_MENU_PANEL_L","STR_ELEM_SHADE","STR_GROUP_TITLE","isAllowSpread","isSpreadItem","accordion","rerender","elemView","elemBody","getDefaultView","elemUl","eachItemView","isChild","templet","group","-","viewLi","viewText","elemPanel","TPL_MAIN","delayRemove","prevElem","isClickAllScope","clickScope","elemGroup","spread","elemPrev","prevElemCallback","isAccordion","contentElem","needSpread","groupSibs","ELEM_LI_PAR","dataParams","SLIDER_BAR","SLIDER_WRAP","SLIDER_WRAP_BTN","SLIDER_TIPS","SLIDER_INPUT_TXT","ELEM_HOVER","showstep","minValue","maxValue","scaleFir","scaleSec","hasRender","elemTemp","number","elemInput","slide","sliderWidth","sliderWrap","tipsTxt","setTips","margin-bottom","sliderAct","sliderTxt","inputValue","offsetValue","round","arrValue","firLeft","valueTo","secLeft","wrapWidth","abs","selfValue","oldLeft","elemMove","up","upCall","oldleft","oldx","reaLeft","inputScale","getInputValue","realValue","ICON_PICKER_DOWN","ICON_PICKER_CLOSE","PICKER_TRIG_SPAN","PICKER_TRIG_I","PICKER_SIDE_SLIDER","PICKER_BASIS","PICKER_ALPHA_BG","PICKER_ALPHA_SLIDER","PICKER_BASIS_CUR","PICKER_INPUT","RGBToHSB","rgb","hsb","r","g","HSBToRGB","t1","t3","t2","HSBToHEX","hex","nr","RGBSTo","rgbs","re","$win","alpha","predefine","colors","elemColorBox","bgstr","background","renderPicker","elemPicker","removePicker","thisElemInd","thisColor","pickerEvents","bindElem","elemPickerInput","backgroundColor","side","basis","alphacolor","alphaslider","_h","_b","_s","_a","pre","x","y","z","createMoveElem","oldtop","oldy","maxh","maxw","sidetop","elemColorBoxSpan","colorValue","attrEvent","SHOW","TITLE","Element","NAV_ELEM","tabAdd","layAttr","tabElem","titElem","barElem","tabChange","tabAuto","tabDelete","layid","liElem","tabClick","dom","headerElem","NAV_ITEM","NAV_BAR","NAV_TREE","NAV_CHILD","NAV_MORE","NAV_ANIM","bodyElem","elemA","isJump","unselect","MORE","BAR","CLOSE","STOPE","isSpread","hideTabMore","tsbTitle","clickThis","NAV_ITEMED","needExpand","parentSibs","collapse","isNone","elemFilter","items","nav","timerMore","timeEnd","NAV_TITLE","bar","itemElem","thisA","breadcrumb","ATTE_SPR","separator","aNode","elemTitle","files","ELEM_FILE","ELEM_FORM","ELEM_IFRAME","ELEM_CHOOSE","UPLOADING","accept","exts","bindAction","force","field","acceptMime","drag","multiple","cross-domain","data-format-error","check-error","limit-number","limit-size","elemFile","isFile","initIE","elemForm","FileReader","chooseFiles","reader","readAsDataURL","limitSize","getFiles","ajaxSend","successful","failed","allDone","fileLength","total","request","sets","formData","FormData","resetFileState","unified","res","lengthComputable","loaded","iframeSend","iframeBody","thisFile","pushFile","resetFile","filename","newFile","File","typeName","images","video","audio","toFixed","setChooseFile","setChooseText","dataTransfer","HIDE","Form","verify","required","phone","email","identity","autocomplete","getFormElem","itemForm","getValue","nameIndex","fieldElem","init_name","inputs","handleInputNumber","rawValue","precision","noAction","isInit","decimals","controlBtn","increment","decrement","affix","CLASS_WRAP","CLASS_SUFFIX","CLASS_AFFIX","showAffix","renderAffix","affixOptions","elemAffix","elemIcon","hasElemAffix","hasElemSuffix","inputFilter","eye","SHOW_NAME","isShow","thatInput","TIPS","NONE","initValue","selects","reElem","isSearch","nearElem","laySearch","showDown","hideDown","followScroll","notOption","dl","dds","dts","dlHeight","none","posTop","thisDd","ddHeight","setThisDd","prevNext","thisElem1","showDd","firstIndex","cacheNearElem","nearDd","origin","thisDds","optionsFirst","switch","SUBTRA","checks","RE_CLASS","indeterminate","ICON","radios","ANIM","forms","sameRadio","renderItem","itemType","validate","intercept","DANGER","vers","verType","thisVer","rule","verst","isForm2Elem","layFilter","verifyElem","$dom","checkName","indexName","numbersName","disabledName","thisTable","setColsWidth","getThisTable","getThisTableConfig","parseTempData","item3","tplData","exportTemplet","LAY_COL","HIDE_V","ELEM_VIEW","ELEM_HEADER","ELEM_BODY","ELEM_FIXR","ELEM_PAGE_VIEW","ELEM_SORT","ELEM_CHECKED","ELEM_EDIT","ELEM_GROUP","ELEM_COL_SPECIAL","ELEM_TOOL_PANEL","ELEM_EXPAND","DATA_MOVE_NAME","TPL_HEADER","TPL_BODY","eachChildCols","loading","cellMinWidth","cellMaxWidth","MAX_VALUE","editTrigger","defaultToolbar","defaultContextmenu","autoSort","cols","pageName","limitName","statusName","msgName","dataName","totalRowName","countName","pullData","setInit","fullHeightGap","parentDiv","parentHeightGap","lay-filter","lay-id","renderStyle","layTool","layBox","layHeader","layMain","layBody","layFixed","layFixLeft","layFixRight","layTotal","layPage","renderToolbar","renderPagebar","fullSize","initOpts","space","unresize","numbers","getWidth","clientWidth","initChildCols","i1","item1","i2","item2","indexChild","childIndex","colspan","rowspan","colGroup","i22","item22","HAS_PARENT","parentKey","lineStyle","trClassName","cellMaxHeight","leftDefaultTemp","elemToolTemp","toolbarHtml","layEvent","print","iconElem","thisItem","pagebarHtml","layPagebar","pagebar","setParentCol","parentTh","parentColspan","arrParentKey","getThisCol","colspan2","nextParentKey","setColsPatch","setGroupWidth","getEndTh","colNums","autoColNums","autoWidth","countWidth","cntrWidth","getAutoWidth","eachCols","getScrollWidth","back","patchNums","i3","headerWidth","scrollPatch","haveInit","HAS_SET_COLS_PATCH","errorView","elemNone","layNone","syncCheckAll","renderForm","startLimit","initSort","reloadType","renderData","totalRow","ts","parseData","newData","getTrHtml","trsObj","trs","trs_fixed","trs_fixed_r","tds_fixed","tds_fixed_r","LAY_KEY","edit","trAttr","totalRowData","sortKey","pull","scrollPos","tipsIndex","renderTotal","totalNums","dataTotal","TOTAL_NUMS","totalRowDecimals","thisTotalNum","totalRowText","getContent","TOTAL_ROW","patchElem","getColElem","checkAllElem","checkStatus","isAll","setRowActive","setRowChecked","thisData","existChecked","getChecked","checkedElem","checkedSameElem","fixRElem","_field","elemSort","fromEvent","layInit","selectorText","headerMain","thIndex","thElem","bodyHeight","layMainTable","scrollWidth","outWidth","addPatch","fixHeight","ELEM_CELL","_BODY","commonMember","lis","openPanel","panel","fieldTitle","exportFile","printWin","edg","onafterprint","oLeft","pLeft","allowResize","ruleWidth","thatTable","setWidth","nowType","clearCacheKey","dataCache","del","update","fields","cell","thisTd","setRowEvent","getCol","UNROW","renderGridEdit","elemCell","editType","ELEM_GRID_DOWN","oldValue","reedit","showGridExpandIcon","gridExpand","ELEM_CELL_C","elemCellClose","expandedMode","cellExpandedMode","expandedWidth","cellExpandedWidth","$this","toolFn","errorTips","tdIndex","attrData","tableData","trElem","itemData","row","tableIns","CHILD_COLS","PARENT_COL_INDEX","arrs","eachArrs","nums","invalidNum","getData","dataTitle","dataMain","fieldsIsHide","textType","csv","xls","alink","reduce","acc","ignoreExport","download","getOptions","hideCol","thisTreeTable","ELEM_FIXL","TABLE_TREE","LAY_DATA_INDEX","LAY_DATA_INDEX_HISTORY","LAY_PARENT_INDEX","LAY_CHECKBOX_HALF","LAY_EXPAND","LAY_HAS_EXPANDED","LAY_ASYNC_STATUS","LAY_CASCADE","updateCache","childrenKey","tableCache","itemDataIndex","updateOptions","thatOptionsTemp","treeOptions","idKey","hasNumberCol","hasChecboxCol","hasRadioCol","mod","parseDataThat","retData","isSimpleData","enable","flatToTree","updateStatus","initData","isRenderData","tableView","isExpandAll","layTableAllChooseElem","renderTreeTable","cascade","isParent","indent","flexIconClose","flexIconOpen","showIcon","iconClose","iconOpen","iconLeaf","showFlexIconIfNotParent","dblClickExpand","expandAllDefault","rootPid","autoParam","beforeExpand","onExpand","pIdKey","idTemp","pidTemp","tableId","flatArr","k","treeToFlat","parentId","parentIndex","flat","dataIndex","dataNew","getTreeNode","getParentNode","getNodeByIndex","treeNode","treeNodeData","getNodeDataByIndex","updateNode","removeNode","expandNode","setChecked","getNodeById","tableDataFlat","newValue","dataRet","indexArr","getTableData","isParentKey","debounceFn","expandFlag","sonSign","callbackFlag","tableViewElem","treeTableThat","trData","isToggle","trExpand","retValue","trExpanded","trsElem","flexIconElem","trDataId","array","asyncSuccessFn","asyncContentType","asyncDataType","asyncJsonpCallback","asyncHeaders","asyncParseData","asyncResponse","str2","str2Obj","dataLevelNew","asyncSetting","asyncUrl","asyncAutoParam","itemArr","asyncType","childItem","data-index","lay-data-index","data-level","childNodesFlat","formatNumber","inherit","expandAll","isAllAsyncDone","isAllExpanded","trAll","trAllObj","dataItem","dataLevel","level","treeOptionsView","dataExpand","nameKey","htmlTemp","itemCell","trIndex","trDefaultExpand","trMain","trFixedL","trFixedR","statusObj","notCascade","dataUpdated","updateObjParams","tableThat","updateFn","checkNode","newNode","trLevel","newNodeTemp","trNew","delNodesFlat","delNode","nodeP","updateCheckStatus","i4","item4","addNodes","newNodes","childKey","childrenNodes","dataAfter","childrenNodesFlat","pageOptions","newNodesHtml","newNodesHtmlObj","trIndexPrev","newNodeIndex","newNodeItem","tableViewElemMAIN","tableViewElemFIXL","tableViewElemFIXR","trIndexNext","scrollIntoViewIfNeeded","includeHalfCheck","checkedData","updateData","setRowCheckedClass","dataP","trsP","isIndeterminate","updateParentCheckStatus","indexP","itemP","checkboxElem","checkedNum","inputElem","isRadio","triggerEvent","trDataP","radioElem","collectNeedExpandNodeIndex","needExpandIndex","nodeData","checkAllNodes","reloadAsyncNode","dataId","getNodesByFilter","isSingle","nodesResult","ELEM_SET","ICON_CLICK","ICON_ADD","ICON_SUB","ELEM_ENTRY","ELEM_TEXT","ELEM_PACK","ELEM_SPREAD","ELEM_LINE_SHORT","ELEM_SHOW","ELEM_EXTEND","showCheckbox","showLine","onlyIconControl","defaultNodeName","checkids","editIcon","hasChild","packDiv","entryDiv","checkClick","operate","entry","elemCheckbox","elemText","touchOpen","packCont","iconClick","updateFieldValue","sibls","setCheckbox","setParentsChecked","thisNodeElem","parentNodeElem","parentCheckbox","parentPack","oncheck","getVal","returnObj","textNew","elemDel","pare","siblingTree","checkState","parentTree","prevDiv","pack","onsearch","checkId","checkData","eachNodes","index2","cloneItem","checkedId","reInput","ELEM_BOX","ELEM_SEARCH","ELEM_DATA","TPL_BOX","checkAllName","showSearch","searchNone","layData","layBtn","listElem","renderCheckBtn","thisDataElem","allElemCheckbox","listElemCheckbox","haveChecked","isHide","stopNone","noneView","createNoneElem","selectedData","thisElemCheckbox","thisBoxElem","siblingInput","thisList","onchange","elemThis","thisListElem","isMatch","ELEM_LEFT","ELEM_RIGHT","ELEM_ARROW","ELEM_IND","arrow","indicator","autoplay","elemItem","prevIndex","nextIndex","addIndex","subIndex","tplArrow","goto","tplInd","elemInd","thisIndex","haveSlide","ICON_RATE","ICON_RATE_SOLID","ICON_RATE_HALF","ICON_SOLID_HALF","ICON_HALF_RATE","readonly","half","setText","action","setvalue","_ul","wide","ind","Flow","isOver","lazyimg","mb","isAuto","notDocument","more","over","isLazyimg","elemTop","CONST","ELEM_TAB","ELEM_FULL","ELEM_ITEM","ELEM_LINE","ELEM_LINE_NUM","ELEM_LN_MODE","CDDE_DATA_CLASS","LINE_RAW_WIDTH","about","ln","encode","wordWrap","highlighter","langMarker","codeIndex","mode","rawCode","finalCode","isIframePreview","elemHeaderView","elemToolbar","runPreview","codeElem","createCodeRst","lines","setCodeLayout","elemFixbar","copyElem","reloadCode","obverse","codeRender","createCode","line","codeParse","hasDataClass","onCopy","elemViewHas","elemTabHas","elemPreviewViewHas","FILTER_VALUE","elemTabView","elemPreviewView","classNameFull","classNameRestore","htmlElem","ELEM_SCROLLBAR_HIDE","oi","parameters","toolsEvent","addTools","viso","thisItemBody","srcdoc","previewStyle","elemItemBody","codeStyle","multiLine"],"mappings":"mCAMC,CAAC,SAASA,GACT,aAEA,IAiBMC,EAjBFC,EAAMF,EAAIG,SACVC,EAAS,CACXC,QAAS,GACTC,OAAQ,GACRC,QAAS,GACTC,MAAO,EACT,EAEIC,EAAQ,WACVC,KAAKC,EAAI,aACX,EAGIC,EAASZ,EAAIa,cAAgB,GAG7BC,GACEb,EAASC,EAAIa,cAAgBb,EAAIa,cAAcC,IAAM,WAIvD,IAHA,IAEIA,EAFAC,EAAKf,E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B,MAAM,cACRA,MAAMqE,OAAO,uBAAwB,aAAa","file":"layui.js","sourcesContent":["/**\n * Layui\n * Classic modular front-end UI library\n * MIT Licensed\n */\n \n;!function(win){\n \"use strict\";\n\n var doc = win.document;\n var config = {\n modules: {}, // 模块物理路径\n status: {}, // 模块加载状态\n timeout: 10, // 符合规范的模块请求最长等待秒数\n event: {} // 模块自定义事件\n };\n\n var Layui = function(){\n this.v = '2.8.18-rc.4'; // Layui 版本号\n };\n \n // 识别预先可能定义的指定全局对象\n var GLOBAL = win.LAYUI_GLOBAL || {};\n\n // 获取 layui 所在目录\n var getPath = function(){\n var jsPath = doc.currentScript ? doc.currentScript.src : function(){\n var js = doc.scripts;\n var last = js.length - 1;\n var src;\n for(var i = last; i > 0; i--){\n if(js[i].readyState === 'interactive'){\n src = js[i].src;\n break;\n }\n }\n return src || js[last].src;\n }();\n \n return config.dir = GLOBAL.dir || jsPath.substring(0, jsPath.lastIndexOf('/') + 1);\n }();\n\n // 异常提示\n var error = function(msg, type){\n type = type || 'log';\n win.console && console[type] && console[type]('layui error hint: ' + msg);\n };\n\n var isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]';\n\n // 内置模块\n var modules = config.builtin = {\n lay: 'lay', // 基础 DOM 操作\n layer: 'layer', // 弹层\n laydate: 'laydate', // 日期\n laypage: 'laypage', // 分页\n laytpl: 'laytpl', // 模板引擎\n form: 'form', // 表单集\n upload: 'upload', // 上传\n dropdown: 'dropdown', // 下拉菜单\n transfer: 'transfer', // 穿梭框\n tree: 'tree', // 树结构\n table: 'table', // 表格\n treeTable: 'treeTable', // 树表\n element: 'element', // 常用元素操作\n rate: 'rate', // 评分组件\n colorpicker: 'colorpicker', // 颜色选择器\n slider: 'slider', // 滑块\n carousel: 'carousel', // 轮播\n flow: 'flow', // 流加载\n util: 'util', // 工具块\n code: 'code', // 代码修饰器\n jquery: 'jquery', // DOM 库(第三方)\n \n all: 'all',\n 'layui.all': 'layui.all' // 聚合标识(功能性的,非真实模块)\n };\n\n // 记录基础数据\n Layui.prototype.cache = config;\n\n // 定义模块\n Layui.prototype.define = function(deps, factory){\n var that = this;\n var type = typeof deps === 'function';\n var callback = function(){\n var setApp = function(app, exports){\n layui[app] = exports;\n config.status[app] = true;\n };\n typeof factory === 'function' && factory(function(app, exports){\n setApp(app, exports);\n config.callback[app] = function(){\n factory(setApp);\n }\n });\n return this;\n };\n \n type && (\n factory = deps,\n deps = []\n );\n \n that.use(deps, callback, null, 'define');\n return that;\n };\n\n // 使用特定模块\n Layui.prototype.use = function(apps, callback, exports, from){\n var that = this;\n var dir = config.dir = config.dir ? config.dir : getPath;\n var head = doc.getElementsByTagName('head')[0];\n\n apps = function(){\n if(typeof apps === 'string'){\n return [apps];\n } \n // 当第一个参数为 function 时,则自动加载所有内置模块,且执行的回调即为该 function 参数;\n else if(typeof apps === 'function'){\n callback = apps;\n return ['all'];\n } \n return apps;\n }();\n \n // 如果页面已经存在 jQuery 1.7+ 库且所定义的模块依赖 jQuery,则不加载内部 jquery 模块\n if(win.jQuery && jQuery.fn.on){\n that.each(apps, function(index, item){\n if(item === 'jquery'){\n apps.splice(index, 1);\n }\n });\n layui.jquery = layui.$ = jQuery;\n }\n \n var item = apps[0];\n var timeout = 0;\n\n exports = exports || [];\n\n // 静态资源host\n config.host = config.host || (dir.match(/\\/\\/([\\s\\S]+?)\\//)||['//'+ location.host +'/'])[0];\n \n // 加载完毕\n function onScriptLoad(e, url){\n var readyRegExp = navigator.platform === 'PLaySTATION 3' ? /^complete$/ : /^(complete|loaded)$/\n if (e.type === 'load' || (readyRegExp.test((e.currentTarget || e.srcElement).readyState))) {\n config.modules[item] = url;\n head.removeChild(node);\n (function poll() {\n if(++timeout > config.timeout * 1000 / 4){\n return error(item + ' is not a valid module', 'error');\n }\n config.status[item] ? onCallback() : setTimeout(poll, 4);\n }());\n }\n }\n \n // 回调\n function onCallback(){\n exports.push(layui[item]);\n apps.length > 1 ?\n that.use(apps.slice(1), callback, exports, from)\n : ( typeof callback === 'function' && function(){\n // 保证文档加载完毕再执行回调\n if(layui.jquery && typeof layui.jquery === 'function' && from !== 'define'){\n return layui.jquery(function(){\n callback.apply(layui, exports);\n });\n }\n callback.apply(layui, exports);\n }() );\n }\n \n // 如果引入了聚合板,内置的模块则不必重复加载\n if( apps.length === 0 || (layui['layui.all'] && modules[item]) ){\n return onCallback(), that;\n }\n \n /*\n * 获取加载的模块 URL\n * 如果是内置模块,则按照 dir 参数拼接模块路径\n * 如果是扩展模块,则判断模块路径值是否为 {/} 开头,\n * 如果路径值是 {/} 开头,则模块路径即为后面紧跟的字符。\n * 否则,则按照 base 参数拼接模块路径\n */\n \n var url = ( modules[item] ? (dir + 'modules/') \n : (/^\\{\\/\\}/.test(that.modules[item]) ? '' : (config.base || ''))\n ) + (that.modules[item] || item) + '.js';\n url = url.replace(/^\\{\\/\\}/, '');\n \n // 如果扩展模块(即:非内置模块)对象已经存在,则不必再加载\n if(!config.modules[item] && layui[item]){\n config.modules[item] = url; // 并记录起该扩展模块的 url\n }\n\n // 首次加载模块\n if(!config.modules[item]){\n var node = doc.createElement('script');\n \n node.async = true;\n node.charset = 'utf-8';\n node.src = url + function(){\n var version = config.version === true \n ? (config.v || (new Date()).getTime())\n : (config.version||'');\n return version ? ('?v=' + version) : '';\n }();\n \n head.appendChild(node);\n \n if(node.attachEvent && !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && !isOpera){\n node.attachEvent('onreadystatechange', function(e){\n onScriptLoad(e, url);\n });\n } else {\n node.addEventListener('load', function(e){\n onScriptLoad(e, url);\n }, false);\n }\n \n config.modules[item] = url;\n } else { // 缓存\n (function poll() {\n if(++timeout > config.timeout * 1000 / 4){\n return error(item + ' is not a valid module', 'error');\n }\n (typeof config.modules[item] === 'string' && config.status[item]) \n ? onCallback() \n : setTimeout(poll, 4);\n }());\n }\n \n return that;\n };\n\n // 弃用原有的指定模块,以便重新扩展新的同名模块\n Layui.prototype.disuse = function(apps){\n var that = this;\n apps = that.isArray(apps) ? apps : [apps];\n that.each(apps, function (index, item) {\n if (!config.status[item]) {\n // return error('module ' + item + ' is not exist');\n }\n delete that[item];\n delete modules[item];\n delete that.modules[item];\n delete config.status[item];\n delete config.modules[item];\n });\n return that;\n };\n\n // 获取节点的 style 属性值\n Layui.prototype.getStyle = function(node, name){\n var style = node.currentStyle ? node.currentStyle : win.getComputedStyle(node, null);\n return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name);\n };\n\n // css 外部加载器\n Layui.prototype.link = function(href, fn, cssname){\n var that = this;\n var head = doc.getElementsByTagName('head')[0];\n var link = doc.createElement('link');\n \n if(typeof fn === 'string') cssname = fn;\n \n var app = (cssname || href).replace(/\\.|\\//g, '');\n var id = 'layuicss-'+ app;\n var STAUTS_NAME = 'creating';\n var timeout = 0;\n \n link.href = href + (config.debug ? '?v='+new Date().getTime() : '');\n link.rel = 'stylesheet';\n link.id = id;\n link.media = 'all';\n \n if(!doc.getElementById(id)){\n head.appendChild(link);\n }\n \n if(typeof fn !== 'function') return that;\n \n // 轮询 css 是否加载完毕\n (function poll(status) {\n var delay = 100;\n var getLinkElem = doc.getElementById(id); // 获取动态插入的 link 元素\n \n // 如果轮询超过指定秒数,则视为请求文件失败或 css 文件不符合规范\n if(++timeout > config.timeout * 1000 / delay){\n return error(href + ' timeout');\n }\n \n // css 加载就绪\n if(parseInt(that.getStyle(getLinkElem, 'width')) === 1989){\n // 如果参数来自于初始轮询(即未加载就绪时的),则移除 link 标签状态\n if(status === STAUTS_NAME) getLinkElem.removeAttribute('lay-status');\n // 如果 link 标签的状态仍为「创建中」,则继续进入轮询,直到状态改变,则执行回调\n getLinkElem.getAttribute('lay-status') === STAUTS_NAME ? setTimeout(poll, delay) : fn();\n } else {\n getLinkElem.setAttribute('lay-status', STAUTS_NAME);\n setTimeout(function(){\n poll(STAUTS_NAME);\n }, delay);\n }\n }());\n \n // 轮询css是否加载完毕\n /*\n (function poll() {\n if(++timeout > config.timeout * 1000 / 100){\n return error(href + ' timeout');\n };\n parseInt(that.getStyle(doc.getElementById(id), 'width')) === 1989 ? function(){\n fn();\n }() : setTimeout(poll, 100);\n }());\n */\n \n return that;\n };\n \n // css 内部加载器\n Layui.prototype.addcss = function(firename, fn, cssname){\n return layui.link(config.dir + 'css/' + firename, fn, cssname);\n };\n \n // 存储模块的回调\n config.callback = {};\n \n // 重新执行模块的工厂函数\n Layui.prototype.factory = function(modName){\n if(layui[modName]){\n return typeof config.callback[modName] === 'function' \n ? config.callback[modName]\n : null;\n }\n };\n\n // 图片预加载\n Layui.prototype.img = function(url, callback, error) { \n var img = new Image();\n img.src = url; \n if(img.complete){\n return callback(img);\n }\n img.onload = function(){\n img.onload = null;\n typeof callback === 'function' && callback(img);\n };\n img.onerror = function(e){\n img.onerror = null;\n typeof error === 'function' && error(e);\n }; \n };\n\n // 全局配置\n Layui.prototype.config = function(options){\n options = options || {};\n for(var key in options){\n config[key] = options[key];\n }\n return this;\n };\n\n // 记录全部模块\n Layui.prototype.modules = function(){\n var clone = {};\n for(var o in modules){\n clone[o] = modules[o];\n }\n return clone;\n }();\n\n // 拓展模块\n Layui.prototype.extend = function(options){\n var that = this;\n\n // 验证模块是否被占用\n options = options || {};\n for(var o in options){\n if(that[o] || that.modules[o]){\n error(o+ ' Module already exists', 'error');\n } else {\n that.modules[o] = options[o];\n }\n }\n\n return that;\n };\n\n // location.hash 路由解析\n Layui.prototype.router = Layui.prototype.hash = function(hash){\n var that = this;\n var hash = hash || location.hash;\n var data = {\n path: [],\n search: {},\n hash: (hash.match(/[^#](#.*$)/) || [])[1] || ''\n };\n \n if(!/^#\\//.test(hash)) return data; // 禁止非路由规范\n\n hash = hash.replace(/^#\\//, '');\n data.href = '/' + hash;\n hash = hash.replace(/([^#])(#.*$)/, '$1').split('/') || [];\n \n // 提取 Hash 结构\n that.each(hash, function(index, item){\n /^\\w+=/.test(item) ? function(){\n item = item.split('=');\n data.search[item[0]] = item[1];\n }() : data.path.push(item);\n });\n \n return data;\n };\n \n // URL 解析\n Layui.prototype.url = function(href){\n var that = this;\n var data = {\n // 提取 url 路径\n pathname: function(){\n var pathname = href\n ? function(){\n var str = (href.match(/\\.[^.]+?\\/.+/) || [])[0] || '';\n return str.replace(/^[^\\/]+/, '').replace(/\\?.+/, '');\n }()\n : location.pathname;\n return pathname.replace(/^\\//, '').split('/');\n }(),\n \n // 提取 url 参数\n search: function(){\n var obj = {};\n var search = (href \n ? function(){\n var str = (href.match(/\\?.+/) || [])[0] || '';\n return str.replace(/\\#.+/, '');\n }()\n : location.search\n ).replace(/^\\?+/, '').split('&'); // 去除 ?,按 & 分割参数\n \n // 遍历分割后的参数\n that.each(search, function(index, item){\n var _index = item.indexOf('=')\n ,key = function(){ // 提取 key\n if(_index < 0){\n return item.substr(0, item.length);\n } else if(_index === 0){\n return false;\n } else {\n return item.substr(0, _index);\n }\n }(); \n // 提取 value\n if(key){\n obj[key] = _index > 0 ? item.substr(_index + 1) : null;\n }\n });\n \n return obj;\n }(),\n \n // 提取 Hash\n hash: that.router(function(){\n return href \n ? ((href.match(/#.+/) || [])[0] || '/')\n : location.hash;\n }())\n };\n \n return data;\n };\n\n // 本地持久存储\n Layui.prototype.data = function(table, settings, storage){\n table = table || 'layui';\n storage = storage || localStorage;\n \n if(!win.JSON || !win.JSON.parse) return;\n \n // 如果 settings 为 null,则删除表\n if(settings === null){\n return delete storage[table];\n }\n \n settings = typeof settings === 'object' \n ? settings \n : {key: settings};\n \n try {\n var data = JSON.parse(storage[table]);\n } catch(e) {\n var data = {};\n }\n \n if('value' in settings) data[settings.key] = settings.value;\n if(settings.remove) delete data[settings.key];\n storage[table] = JSON.stringify(data);\n \n return settings.key ? data[settings.key] : data;\n };\n \n // 本地临时存储\n Layui.prototype.sessionData = function(table, settings){\n return this.data(table, settings, sessionStorage);\n }\n\n // 设备信息\n Layui.prototype.device = function(key){\n var agent = navigator.userAgent.toLowerCase();\n\n // 获取版本号\n var getVersion = function(label){\n var exp = new RegExp(label + '/([^\\\\s\\\\_\\\\-]+)');\n label = (agent.match(exp)||[])[1];\n return label || false;\n };\n \n // 返回结果集\n var result = {\n os: function(){ // 底层操作系统\n if(/windows/.test(agent)){\n return 'windows';\n } else if(/linux/.test(agent)){\n return 'linux';\n } else if(/iphone|ipod|ipad|ios/.test(agent)){\n return 'ios';\n } else if(/mac/.test(agent)){\n return 'mac';\n } \n }(),\n ie: function(){ // ie 版本\n return (!!win.ActiveXObject || \"ActiveXObject\" in win) ? (\n (agent.match(/msie\\s(\\d+)/) || [])[1] || '11' // 由于 ie11 并没有 msie 的标识\n ) : false;\n }(),\n weixin: getVersion('micromessenger') // 是否微信\n };\n \n // 任意的 key\n if(key && !result[key]){\n result[key] = getVersion(key);\n }\n \n // 移动设备\n result.android = /android/.test(agent);\n result.ios = result.os === 'ios';\n result.mobile = (result.android || result.ios);\n \n return result;\n };\n\n // 提示\n Layui.prototype.hint = function(){\n return {\n error: error\n };\n };\n \n // typeof 类型细分 -> string/number/boolean/undefined/null、object/array/function/…\n Layui.prototype._typeof = Layui.prototype.type = function(operand){\n if(operand === null) return String(operand);\n \n // 细分引用类型\n return (typeof operand === 'object' || typeof operand === 'function') ? function(){\n var type = Object.prototype.toString.call(operand).match(/\\s(.+)\\]$/) || []; // 匹配类型字符\n var classType = 'Function|Array|Date|RegExp|Object|Error|Symbol'; // 常见类型字符\n \n type = type[1] || 'Object';\n \n // 除匹配到的类型外,其他对象均返回 object\n return new RegExp('\\\\b('+ classType + ')\\\\b').test(type) \n ? type.toLowerCase() \n : 'object';\n }() : typeof operand;\n };\n \n // 对象是否具备数组结构(此处为兼容 jQuery 对象)\n Layui.prototype._isArray = Layui.prototype.isArray = function(obj){\n var that = this;\n var len;\n var type = that.type(obj);\n \n if(!obj || (typeof obj !== 'object') || obj === win) return false;\n \n len = 'length' in obj && obj.length; // 兼容 ie\n return type === 'array' || len === 0 || (\n typeof len === 'number' && len > 0 && (len - 1) in obj // 兼容 jQuery 对象\n );\n };\n\n // 遍历\n Layui.prototype.each = function(obj, fn){\n var key;\n var that = this;\n var callFn = function(key, obj){ // 回调\n return fn.call(obj[key], key, obj[key])\n };\n \n if(typeof fn !== 'function') return that;\n obj = obj || [];\n \n // 优先处理数组结构\n if(that.isArray(obj)){\n for(key = 0; key < obj.length; key++){\n if(callFn(key, obj)) break;\n }\n } else {\n for(key in obj){\n if(callFn(key, obj)) break;\n }\n }\n \n return that;\n };\n\n // 将数组中的成员对象按照某个 key 的 value 值进行排序\n Layui.prototype.sort = function(arr, key, desc, notClone){\n var that = this;\n var clone = notClone ? (arr || []) : JSON.parse(\n JSON.stringify(arr || [])\n );\n\n // 若未传入 key,则直接返回原对象\n if(that.type(arr) === 'object' && !key){\n return clone;\n } else if(typeof arr !== 'object'){ // 若 arr 非对象\n return [clone];\n }\n \n // 开始排序\n clone.sort(function(o1, o2){\n var v1 = o1[key];\n var v2 = o2[key];\n \n /*\n * 特殊数据\n * 若比较的成员均非对象\n */\n\n // 若比较的成员均为数字\n if(!isNaN(o1) && !isNaN(o2)) return o1 - o2;\n // 若比较的成员只存在某一个非对象\n if(!isNaN(o1) && isNaN(o2)){\n if(key && typeof o2 === 'object'){\n v1 = o1;\n } else {\n return -1;\n }\n } else if (isNaN(o1) && !isNaN(o2)){\n if(key && typeof o1 === 'object'){\n v2 = o2;\n } else {\n return 1;\n }\n }\n\n /*\n * 正常数据\n * 即成员均为对象,也传入了对比依据: key\n * 若 value 为数字,按「大小」排序;若 value 非数字,则按「字典序」排序\n */\n\n // value 是否为数字\n var isNum = [!isNaN(v1), !isNaN(v2)];\n\n // 若为数字比较\n if(isNum[0] && isNum[1]){\n if(v1 && (!v2 && v2 !== 0)){ // 数字 vs 空\n return 1;\n } else if((!v1 && v1 !== 0) && v2){ // 空 vs 数字\n return -1;\n } else { // 数字 vs 数字\n return v1 - v2;\n }\n }\n \n /**\n * 字典序排序\n */\n \n // 若为非数字比较\n if(!isNum[0] && !isNum[1]){\n // 字典序比较\n if(v1 > v2){\n return 1;\n } else if (v1 < v2) {\n return -1;\n } else {\n return 0;\n }\n }\n \n // 若为混合比较\n if(isNum[0] || !isNum[1]){ // 数字 vs 非数字\n return -1;\n } else if(!isNum[0] || isNum[1]) { // 非数字 vs 数字\n return 1;\n }\n\n });\n\n desc && clone.reverse(); // 倒序\n return clone;\n };\n\n // 阻止事件冒泡\n Layui.prototype.stope = function(thisEvent){\n thisEvent = thisEvent || win.event;\n try { thisEvent.stopPropagation() } catch(e){\n thisEvent.cancelBubble = true;\n }\n };\n \n // 字符常理\n var EV_REMOVE = 'LAYUI-EVENT-REMOVE';\n\n // 自定义模块事件\n Layui.prototype.onevent = function(modName, events, callback){\n if(typeof modName !== 'string' \n || typeof callback !== 'function') return this;\n\n return Layui.event(modName, events, null, callback);\n };\n\n // 执行自定义模块事件\n Layui.prototype.event = Layui.event = function(modName, events, params, fn){\n var that = this;\n var result = null;\n var filter = (events || '').match(/\\((.*)\\)$/)||[]; // 提取事件过滤器字符结构,如:select(xxx)\n var eventName = (modName + '.'+ events).replace(filter[0], ''); // 获取事件名称,如:form.select\n var filterName = filter[1] || ''; // 获取过滤器名称,,如:xxx\n var callback = function(_, item){\n var res = item && item.call(that, params);\n res === false && result === null && (result = false);\n };\n \n // 如果参数传入特定字符,则执行移除事件\n if(params === EV_REMOVE){\n delete (that.cache.event[eventName] || {})[filterName];\n return that;\n }\n \n // 添加事件\n if(fn){\n config.event[eventName] = config.event[eventName] || {};\n\n if (filterName) {\n // 带filter不支持重复事件\n config.event[eventName][filterName] = [fn];\n } else {\n // 不带filter处理的是所有的同类事件,应该支持重复事件\n config.event[eventName][filterName] = config.event[eventName][filterName] || [];\n config.event[eventName][filterName].push(fn);\n }\n return this;\n }\n \n // 执行事件回调\n layui.each(config.event[eventName], function(key, item){\n // 执行当前模块的全部事件\n if(filterName === '{*}'){\n layui.each(item, callback);\n return;\n }\n \n // 执行指定事件\n key === '' && layui.each(item, callback);\n (filterName && key === filterName) && layui.each(item, callback);\n });\n \n return result;\n };\n \n // 新增模块事件\n Layui.prototype.on = function(events, modName, callback){\n var that = this;\n return that.onevent.call(that, modName, events, callback);\n }\n \n // 移除模块事件\n Layui.prototype.off = function(events, modName){\n var that = this;\n return that.event.call(that, modName, events, EV_REMOVE);\n };\n\n // 防抖\n Layui.prototype.debounce = function (func, wait) {\n var timeout;\n return function () {\n var context = this;\n var args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n func.apply(context, args);\n }, wait);\n }\n };\n\n // 节流\n Layui.prototype.throttle = function (func, wait) {\n var cooldown = false;\n return function () {\n var context = this;\n var args = arguments;\n if (!cooldown) {\n func.apply(context, args);\n cooldown = true;\n setTimeout(function () {\n cooldown = false;\n }, wait);\n }\n }\n };\n\n // exports layui\n win.layui = new Layui();\n\n}(window); // gulp build: layui-footer\n\n","/**\n * 用于打包聚合版,该文件不会存在于构建后的目录 \n */\n \nlayui.define(function(exports){\n var cache = layui.cache;\n layui.config({\n dir: cache.dir.replace(/lay\\/dest\\/$/, '')\n });\n exports('layui.all', layui.v);\n});","\r\n/** lay 基础模块 | MIT Licensed */\r\n\r\n;!function(window){ // gulp build: lay-header\r\n \"use strict\";\r\n \r\n var MOD_NAME = 'lay'; // 模块名\r\n var document = window.document;\r\n \r\n /**\r\n * 元素查找\r\n * @param {string | HTMLElement | JQuery} selector \r\n */\r\n var lay = function(selector){ \r\n return new Class(selector);\r\n };\r\n \r\n // 构造器\r\n var Class = function(selector){\r\n var that = this;\r\n var elem = typeof selector === 'object' ? function(){\r\n // 仅适配简单元素对象\r\n return layui.isArray(selector) ? selector : [selector];\r\n }() : (\r\n this.selector = selector,\r\n document.querySelectorAll(selector || null)\r\n );\r\n\r\n lay.each(elem, function(index, item){\r\n that.push(elem[index]);\r\n });\r\n };\r\n\r\n /*\r\n * API 兼容\r\n */\r\n Array.prototype.indexOf = Array.prototype.indexOf || function(searchElement, fromIndex) {\r\n var rst = -1;\r\n fromIndex = fromIndex || 0;\r\n layui.each(this, function(index, val){\r\n if (searchElement === val && index >= fromIndex) {\r\n rst = index;\r\n return !0;\r\n }\r\n });\r\n return rst;\r\n };\r\n \r\n /*\r\n lay 对象操作\r\n */\r\n \r\n Class.fn = Class.prototype = [];\r\n Class.fn.constructor = Class;\r\n\r\n /**\r\n * 将两个或多个对象的内容深度合并到第一个对象中\r\n * @callback ExtendFunc\r\n * @param {*} target - 一个对象\r\n * @param {...*} objectN - 包含额外的属性合并到第一个参数\r\n * @returns {*} 返回合并后的对象\r\n */\r\n /** @type ExtendFunc*/\r\n lay.extend = function(){\r\n var ai = 1;\r\n var length;\r\n var args = arguments;\r\n var clone = function(target, obj){\r\n target = target || (layui.type(obj) === 'array' ? [] : {}); // 目标对象\r\n for(var i in obj){\r\n // 若值为普通对象,则进入递归,继续深度合并\r\n target[i] = (obj[i] && obj[i].constructor === Object)\r\n ? clone(target[i], obj[i])\r\n : obj[i];\r\n }\r\n return target;\r\n };\r\n\r\n args[0] = typeof args[0] === 'object' ? args[0] : {};\r\n length = args.length\r\n\r\n for(; ai < length; ai++){\r\n if(typeof args[ai] === 'object'){\r\n clone(args[0], args[ai]);\r\n }\r\n }\r\n return args[0];\r\n };\r\n \r\n /**\r\n * IE 版本\r\n * @type {string | boolean} - 如果是 IE 返回版本字符串,否则返回 false\r\n */\r\n lay.ie = function(){\r\n var agent = navigator.userAgent.toLowerCase();\r\n return (!!window.ActiveXObject || \"ActiveXObject\" in window) ? (\r\n (agent.match(/msie\\s(\\d+)/) || [])[1] || '11' // 由于 ie11 并没有 msie 的标识\r\n ) : false;\r\n }();\r\n \r\n \r\n /** \r\n * 获取 layui 常见方法,以便用于组件单独版\r\n */\r\n \r\n lay.layui = layui || {};\r\n lay.getPath = layui.cache.dir; // 获取当前 JS 所在目录\r\n lay.stope = layui.stope; // 中止冒泡\r\n lay.each = function(){ // 遍历\r\n layui.each.apply(layui, arguments);\r\n return this;\r\n };\r\n\r\n\r\n /**\r\n * 数字前置补零\r\n * @param {number | string} num - 原始数字\r\n * @param {number} [length=2] - 数字长度,如果原始数字长度小于 length,则前面补零\r\n * @returns {string} 返回补 0 后的数字\r\n * @example\r\n * ```js\r\n * lay.digit(6, 2); // \"06\"\r\n * lay.digit('7', 3); // \"007\"\r\n * ```\r\n */\r\n lay.digit = function(num, length){\r\n if(!(typeof num === 'string' || typeof num === 'number')) return '';\r\n\r\n var str = '';\r\n num = String(num);\r\n length = length || 2;\r\n for(var i = num.length; i < length; i++){\r\n str += '0';\r\n }\r\n return num < Math.pow(10, length) ? str + num : num;\r\n };\r\n \r\n /**\r\n * 创建元素\r\n * @param {string} elemName - 元素的标签名\r\n * @param {{attrName: string, attrValue:string}} [attr] - 添加到元素上的属性\r\n * @returns {HTMLElement} 返回创建的 HTML 元素\r\n * @example\r\n * ```js\r\n * lay.elem('div', {id: 'test'}) //
                    \r\n * ```\r\n */\r\n lay.elem = function(elemName, attr){\r\n var elem = document.createElement(elemName);\r\n lay.each(attr || {}, function(key, value){\r\n elem.setAttribute(key, value);\r\n });\r\n return elem;\r\n };\r\n\r\n /**\r\n * 当前页面是否存在滚动条\r\n * @returns {boolean} 是否存在滚动条\r\n * @example \r\n * ```\r\n * lay.hasScrollbar() // true 或 false\r\n * ```\r\n */\r\n lay.hasScrollbar = function(){\r\n return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight);\r\n };\r\n\r\n /**\r\n * 获取 style rules\r\n * @param {HTMLStyleElement} style - HTMLStyle 元素\r\n * @param {(ruleItem: CSSStyleRule, index: number) => boolean} [callback] - 用来返回 style 元素中的每个 `style rule` 的函数,返回 true 终止遍历\r\n * @returns {CSSRuleList } 返回 `style rules`\r\n * @example\r\n * ```\r\n * \r\n * \r\n * lay.getStyleRules($('#test')[0], function(rule, index){\r\n * if(rule.selectorText === '.lay-card'){\r\n * console.log(index, rule.cssText) // 0 '.lay-card{color: #000}'\r\n * rule.style.color = '#EEE';\r\n * return true; // 终止遍历\r\n * }\r\n * }) // RuleList\r\n * ```\r\n */\r\n lay.getStyleRules = function(style, callback) {\r\n if (!style) return;\r\n\r\n var sheet = style.sheet || style.styleSheet || {};\r\n var rules = sheet.cssRules || sheet.rules;\r\n\r\n if (typeof callback === 'function') {\r\n layui.each(rules, function(i, item){\r\n if (callback(item, i)) return true;\r\n });\r\n }\r\n\r\n return rules;\r\n };\r\n\r\n /**\r\n * 创建 style 样式\r\n * @param {Object} options - 可配置的选项\r\n * @param {string | HTMLElement | JQuery} [options.target] - 目标容器,指定后会将样式追加到目标容器\r\n * @param {string} [options.id] - 样式元素的 id,默认自增\r\n * @param {string} options.text - 样式内容\r\n * @returns {HTMLStyleElement} 返回创建的样式元素 \r\n * @example\r\n * ```html\r\n *
                    \r\n * \r\n * \r\n *
                    \r\n * \r\n * lay.style({\r\n * target: '#targetEl',\r\n * text: '.card{color: #000}'\r\n * }) // \r\n * ```\r\n */\r\n lay.style = function(options){\r\n options = options || {};\r\n\r\n var style = lay.elem('style');\r\n var styleText = options.text || '';\r\n var target = options.target;\r\n \r\n if (!styleText) return;\r\n \r\n // 添加样式\r\n if ('styleSheet' in style) {\r\n style.setAttribute('type', 'text/css');\r\n style.styleSheet.cssText = styleText;\r\n } else {\r\n style.innerHTML = styleText;\r\n }\r\n \r\n // ID\r\n style.id = 'LAY-STYLE-'+ (options.id || function(index) {\r\n lay.style.index++;\r\n return 'DF-'+ index;\r\n }(lay.style.index || 0));\r\n\r\n // 是否向目标容器中追加 style 元素\r\n if (target) {\r\n var styleElem = lay(target).find('#'+ style.id);\r\n styleElem[0] && styleElem.remove();\r\n lay(target).append(style);\r\n }\r\n\r\n return style;\r\n };\r\n \r\n /**\r\n * 将元素定位到指定目标元素附近\r\n * @param {HTMLElement} target - 目标元素\r\n * @param {HTMLElement} elem - 定位元素\r\n * @param {Object} [opts] - 可配置的选项\r\n * @param {'absolute' | 'fixed'} [opts.position] - 元素的定位类型\r\n * @param {'left' | 'right'} [opts.clickType=\"left\"] - 点击类型,默认为 'left',如果 {@link target} 是 document 或 body 元素,则为 'right'\r\n * @param {'left' | 'right' | 'center'} [opts.align=\"left\"] - 对齐方式\r\n * @param {boolean} [opts.allowBottomOut=false] - 顶部没有足够区域显示时,是否允许底部溢出\r\n * @param {string | number} [opts.margin=5] - 边距\r\n * @param {Event} [opts.e] - 事件对象,仅右键生效\r\n * @param {boolean} [opts.SYSTEM_RELOAD] - 是否重载,用于出现滚动条时重新计算位置\r\n * @example\r\n * ```js\r\n * \r\n *
                      \r\n *
                    • 菜单1
                    • \r\n *
                    • 菜单2
                    • \r\n *
                    \r\n * \r\n * // 下拉菜单将被定位到按钮附近\r\n * lay.position(\r\n * $('#targetEl')[0], \r\n * $('#contentEl')[0], \r\n * {\r\n * position: 'fixed', \r\n * align: 'center'\r\n * }\r\n * )\r\n * ```\r\n */\r\n lay.position = function(target, elem, opts){\r\n if(!elem) return;\r\n opts = opts || {};\r\n \r\n // 如果绑定的是 document 或 body 元素,则直接获取鼠标坐标\r\n if(target === document || target === lay('body')[0]){\r\n opts.clickType = 'right';\r\n }\r\n\r\n // 绑定绑定元素的坐标\r\n var rect = opts.clickType === 'right' ? function(){\r\n var e = opts.e || window.event || {};\r\n return {\r\n left: e.clientX,\r\n top: e.clientY,\r\n right: e.clientX,\r\n bottom: e.clientY\r\n }\r\n }() : target.getBoundingClientRect();\r\n var elemWidth = elem.offsetWidth; // 控件的宽度\r\n var elemHeight = elem.offsetHeight; // 控件的高度\r\n \r\n // 滚动条高度\r\n var scrollArea = function(type){\r\n type = type ? 'scrollLeft' : 'scrollTop';\r\n return document.body[type] | document.documentElement[type];\r\n };\r\n \r\n // 窗口宽高\r\n var winArea = function(type){\r\n return document.documentElement[type ? 'clientWidth' : 'clientHeight']\r\n };\r\n var margin = 'margin' in opts ? opts.margin : 5;\r\n var left = rect.left;\r\n var top = rect.bottom;\r\n \r\n // 相对元素居中\r\n if(opts.align === 'center'){\r\n left = left - (elemWidth - target.offsetWidth) / 2;\r\n } else if(opts.align === 'right'){\r\n left = left - elemWidth + target.offsetWidth;\r\n }\r\n\r\n // 判断右侧是否超出边界\r\n if(left + elemWidth + margin > winArea('width')){\r\n left = winArea('width') - elemWidth - margin; // 如果超出右侧,则将面板向右靠齐\r\n }\r\n // 左侧是否超出边界\r\n if(left < margin) left = margin;\r\n \r\n\r\n // 判断底部和顶部是否超出边界\r\n if(rect.bottom + elemHeight + margin > winArea()){ // 底部超出边界\r\n // 优先判断顶部是否有足够区域显示完全,且底部不能超出边界\r\n if(rect.top > elemHeight + margin && rect.top <= winArea() ){\r\n top = rect.top - elemHeight - margin*2; // 顶部有足够的区域显示\r\n } else if(!opts.allowBottomOut){ // 顶部没有足够区域显示时,是否允许底部溢出\r\n top = winArea() - elemHeight - margin*2; // 面板向底部靠齐\r\n if(top < 0) top = 0; // 如果面板底部靠齐时,又溢出窗口顶部,则只能将顶部靠齐\r\n }\r\n }\r\n /*\r\n if(top + elemHeight + margin > winArea()){\r\n // 优先顶部是否有足够区域显示完全\r\n if(rect.top > elemHeight + margin){\r\n top = rect.top - elemHeight - margin*2; // 顶部有足够的区域显示\r\n } else {\r\n // 如果面板是鼠标右键弹出,且顶部没有足够区域显示,则将面板向底部靠齐\r\n if(obj.clickType === 'right'){\r\n top = winArea() - elemHeight - margin*2;\r\n if(top < 0) top = 0; // 不能溢出窗口顶部\r\n } else {\r\n top = margin; // 位置计算逻辑完备性处理\r\n }\r\n }\r\n }\r\n */\r\n \r\n // 定位类型\r\n var position = opts.position;\r\n if(position) elem.style.position = position;\r\n \r\n // 设置坐标\r\n elem.style.left = left + (position === 'fixed' ? 0 : scrollArea(1)) + 'px';\r\n elem.style.top = top + (position === 'fixed' ? 0 : scrollArea()) + 'px';\r\n\r\n // 防止页面无滚动条时,又因为弹出面板而出现滚动条导致的坐标计算偏差\r\n if(!lay.hasScrollbar()){\r\n var rect1 = elem.getBoundingClientRect();\r\n // 如果弹出面板的溢出窗口底部,则表示将出现滚动条,此时需要重新计算坐标\r\n if(!opts.SYSTEM_RELOAD && (rect1.bottom + margin) > winArea()){\r\n opts.SYSTEM_RELOAD = true;\r\n setTimeout(function(){\r\n lay.position(target, elem, opts);\r\n }, 50);\r\n }\r\n }\r\n };\r\n \r\n /**\r\n * 获取元素上的属性配置项\r\n * @param {string | HTMLElement | JQuery} elem - HTML 元素\r\n * @param {{attr: string} | string} [opts=\"lay-options\"] - 可配置的选项,string 类型指定属性名\r\n * @returns {*} 返回元素上的属性配置项\r\n * @example\r\n * ```js\r\n *
                    \r\n * \r\n * var elem = $('#testEl')\r\n * lay.options(elem) // {color:red}\r\n * lay.options(elem[0]) // {color:red}\r\n * lay.options('#testEl') // {color:red}\r\n * lay.options('#testEl', {attr: 'lay-toc'}) // {hot: true}\r\n * lay.options('#testEl', 'lay-toc') // {hot: true}\r\n * \r\n * $('#testEl').attr('lay-toc') // '{hot: true}'\r\n * ```\r\n */\r\n lay.options = function(elem, opts){\r\n opts = typeof opts === 'object' ? opts : {attr: opts};\r\n\r\n if(elem === document) return {};\r\n\r\n var othis = lay(elem);\r\n var attrName = opts.attr || 'lay-options';\r\n var attrValue = othis.attr(attrName);\r\n\r\n try {\r\n return new Function('return '+ (attrValue || '{}'))();\r\n } catch(ev) {\r\n layui.hint().error(opts.errorText || [\r\n attrName + '=\"'+ attrValue + '\"', \r\n '\\n parseerror: '+ ev\r\n ].join('\\n'), 'error');\r\n return {};\r\n }\r\n };\r\n \r\n\r\n /**\r\n * 元素是否属于顶级元素(document 或 body)\r\n * @param {HTMLElement} elem - HTML 元素\r\n * @returns {boolean} 是否属于顶级元素\r\n * @example\r\n * ```js\r\n * lay.isTopElem(document) // true\r\n * ```\r\n */\r\n lay.isTopElem = function(elem){\r\n var topElems = [document, lay('body')[0]]\r\n ,matched = false;\r\n lay.each(topElems, function(index, item){\r\n if(item === elem){\r\n return matched = true\r\n }\r\n });\r\n return matched;\r\n };\r\n\r\n // 剪切板\r\n lay.clipboard = {\r\n /**\r\n * 写入文本\r\n * @param {Object} options - 可配置的选项\r\n * @param {string} options.text - 写入剪贴板的文本\r\n * @param {() => void} [options.done] - 写入成功/完成回调\r\n * @param {(err?: any) => void} [options.error] - 写入失败回调\r\n * @example\r\n * ```js\r\n * lay.clipboard.writeText({\r\n * text: '测试文本',\r\n * done: function(){ layer.msg('copied')},\r\n * error: function(){ layer.msg('error')}\r\n * })\r\n * ```\r\n */\r\n writeText: function(options) {\r\n var text = String(options.text);\r\n\r\n try {\r\n navigator.clipboard.writeText(text).then(\r\n options.done\r\n )['catch'](options.error);\r\n } catch(e) {\r\n var elem = document.createElement('textarea');\r\n\r\n elem.value = text;\r\n elem.style.position = 'fixed';\r\n elem.style.opacity = '0';\r\n elem.style.top = '0px';\r\n elem.style.left = '0px';\r\n \r\n document.body.appendChild(elem);\r\n elem.select();\r\n\r\n try {\r\n document.execCommand('copy');\r\n typeof options.done === 'function' && options.done();\r\n } catch(err) {\r\n typeof options.error === 'function' && options.error(err);\r\n } finally {\r\n elem.remove ? elem.remove() : document.body.removeChild(elem);\r\n }\r\n }\r\n }\r\n };\r\n\r\n\r\n /*\r\n * lay 元素操作\r\n */\r\n \r\n\r\n // 追加字符\r\n Class.addStr = function(str, new_str){\r\n str = str.replace(/\\s+/, ' ');\r\n new_str = new_str.replace(/\\s+/, ' ').split(' ');\r\n lay.each(new_str, function(ii, item){\r\n if(!new RegExp('\\\\b'+ item + '\\\\b').test(str)){\r\n str = str + ' ' + item;\r\n }\r\n });\r\n return str.replace(/^\\s|\\s$/, '');\r\n };\r\n \r\n // 移除值\r\n Class.removeStr = function(str, new_str){\r\n str = str.replace(/\\s+/, ' ');\r\n new_str = new_str.replace(/\\s+/, ' ').split(' ');\r\n lay.each(new_str, function(ii, item){\r\n var exp = new RegExp('\\\\b'+ item + '\\\\b')\r\n if(exp.test(str)){\r\n str = str.replace(exp, '');\r\n }\r\n });\r\n return str.replace(/\\s+/, ' ').replace(/^\\s|\\s$/, '');\r\n };\r\n \r\n // 查找子元素\r\n Class.fn.find = function(selector){\r\n var that = this;\r\n var elem = [];\r\n var isObject = typeof selector === 'object';\r\n\r\n this.each(function(i, item){\r\n var children = isObject && item.contains(selector) \r\n ? selector\r\n : item.querySelectorAll(selector || null);\r\n\r\n lay.each(children, function(index, child){\r\n elem.push(child);\r\n });\r\n });\r\n\r\n return lay(elem);\r\n };\r\n \r\n // 元素遍历\r\n Class.fn.each = function(fn){\r\n return lay.each.call(this, this, fn);\r\n };\r\n \r\n // 添加 className\r\n Class.fn.addClass = function(className, type){\r\n return this.each(function(index, item){\r\n item.className = Class[type ? 'removeStr' : 'addStr'](item.className, className)\r\n });\r\n };\r\n \r\n // 移除 className\r\n Class.fn.removeClass = function(className){\r\n return this.addClass(className, true);\r\n };\r\n \r\n // 是否包含 css 类\r\n Class.fn.hasClass = function(className){\r\n var has = false;\r\n this.each(function(index, item){\r\n if(new RegExp('\\\\b'+ className +'\\\\b').test(item.className)){\r\n has = true;\r\n }\r\n });\r\n return has;\r\n };\r\n \r\n // 添加或获取 css style\r\n Class.fn.css = function(key, value){\r\n var that = this;\r\n var parseValue = function(v){\r\n return isNaN(v) ? v : (v +'px');\r\n };\r\n return (typeof key === 'string' && value === undefined) ? function(){\r\n if(that.length > 0) return that[0].style[key];\r\n }() : that.each(function(index, item){\r\n typeof key === 'object' ? lay.each(key, function(thisKey, thisValue){\r\n item.style[thisKey] = parseValue(thisValue);\r\n }) : item.style[key] = parseValue(value);\r\n }); \r\n };\r\n \r\n // 添加或获取宽度\r\n Class.fn.width = function(value){\r\n var that = this;\r\n return value === undefined ? function(){\r\n if(that.length > 0) return that[0].offsetWidth; // 此处还需做兼容\r\n }() : that.each(function(index, item){\r\n that.css('width', value);\r\n }); \r\n };\r\n \r\n // 添加或获取高度\r\n Class.fn.height = function(value){\r\n var that = this;\r\n return value === undefined ? function(){\r\n if(that.length > 0) return that[0].offsetHeight; // 此处还需做兼容\r\n }() : that.each(function(index, item){\r\n that.css('height', value);\r\n }); \r\n };\r\n \r\n // 添加或获取属性\r\n Class.fn.attr = function(key, value){\r\n var that = this;\r\n return value === undefined ? function(){\r\n if(that.length > 0) return that[0].getAttribute(key);\r\n }() : that.each(function(index, item){\r\n item.setAttribute(key, value);\r\n }); \r\n };\r\n \r\n // 移除属性\r\n Class.fn.removeAttr = function(key){\r\n return this.each(function(index, item){\r\n item.removeAttribute(key);\r\n });\r\n };\r\n \r\n // 设置或获取 HTML 内容\r\n Class.fn.html = function(html){\r\n var that = this;\r\n return html === undefined ? function(){\r\n if(that.length > 0) return that[0].innerHTML;\r\n }() : this.each(function(index, item){\r\n item.innerHTML = html;\r\n });\r\n };\r\n \r\n // 设置或获取值\r\n Class.fn.val = function(value){\r\n var that = this;\r\n return value === undefined ? function(){\r\n if(that.length > 0) return that[0].value;\r\n }() : this.each(function(index, item){\r\n item.value = value;\r\n });\r\n };\r\n \r\n // 追加内容\r\n Class.fn.append = function(elem){\r\n return this.each(function(index, item){\r\n typeof elem === 'object' \r\n ? item.appendChild(elem)\r\n : item.innerHTML = item.innerHTML + elem;\r\n });\r\n };\r\n \r\n // 移除内容\r\n Class.fn.remove = function(elem){\r\n return this.each(function(index, item){\r\n elem ? item.removeChild(elem) : item.parentNode.removeChild(item);\r\n });\r\n };\r\n \r\n // 事件绑定\r\n Class.fn.on = function(eventName, fn){\r\n return this.each(function(index, item){\r\n item.attachEvent ? item.attachEvent('on' + eventName, function(e){\r\n e.target = e.srcElement;\r\n fn.call(item, e);\r\n }) : item.addEventListener(eventName, fn, false);\r\n });\r\n };\r\n \r\n // 解除事件\r\n Class.fn.off = function(eventName, fn){\r\n return this.each(function(index, item){\r\n item.detachEvent \r\n ? item.detachEvent('on'+ eventName, fn) \r\n : item.removeEventListener(eventName, fn, false);\r\n });\r\n };\r\n \r\n // export\r\n window.lay = lay;\r\n \r\n // 输出为 layui 模块\r\n if(window.layui && layui.define){\r\n layui.define(function(exports){\r\n exports(MOD_NAME, lay);\r\n });\r\n }\r\n \r\n}(window, window.document); // gulp build: lay-footer\r\n","/**\r\n * laytpl 轻量模板引擎\r\n */\r\n\r\nlayui.define(function(exports){\r\n \"use strict\";\r\n\r\n // 默认属性\r\n var config = {\r\n open: '{{', // 标签符前缀\r\n close: '}}' // 标签符后缀\r\n };\r\n\r\n // 模板工具\r\n var tool = { \r\n escape: function(html){\r\n var exp = /[<\"'>]|&(?=#[a-zA-Z0-9]+)/g;\r\n if(html === undefined || html === null) return '';\r\n \r\n html += '';\r\n if(!exp.test(html)) return html;\r\n\r\n return html.replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&')\r\n .replace(//g, '>')\r\n .replace(/'/g, ''').replace(/\"/g, '"');\r\n }\r\n };\r\n\r\n // 内部方法\r\n var inner = {\r\n exp: function(str){\r\n return new RegExp(str, 'g');\r\n },\r\n // 错误提示\r\n error: function(e, source){\r\n var error = 'Laytpl Error: ';\r\n typeof console === 'object' && console.error(error + e + '\\n'+ (source || ''));\r\n return error + e;\r\n }\r\n };\r\n\r\n // constructor\r\n var Class = function(template, options){\r\n var that = this;\r\n that.config = that.config || {};\r\n that.template = template;\r\n\r\n // 简单属性合并\r\n var extend = function(obj){\r\n for(var i in obj){\r\n that.config[i] = obj[i];\r\n }\r\n };\r\n\r\n extend(config);\r\n extend(options);\r\n };\r\n\r\n // 标签正则\r\n Class.prototype.tagExp = function(type, _, __){\r\n var options = this.config;\r\n var types = [\r\n '#([\\\\s\\\\S])+?', // js 语句\r\n '([^{#}])*?' // 普通字段\r\n ][type || 0];\r\n\r\n return inner.exp((_||'') + options.open + types + options.close + (__||''));\r\n };\r\n\r\n // 模版解析\r\n Class.prototype.parse = function(template, data){\r\n var that = this;\r\n var options = that.config;\r\n var source = template;\r\n var jss = inner.exp('^'+ options.open +'#', '');\r\n var jsse = inner.exp(options.close +'$', '');\r\n\r\n // 模板必须为 string 类型\r\n if(typeof template !== 'string') return template;\r\n \r\n // 正则解析\r\n template = template.replace(/\\s+|\\r|\\t|\\n/g, ' ')\r\n .replace(inner.exp(options.open +'#'), options.open +'# ')\r\n .replace(inner.exp(options.close +'}'), '} '+ options.close).replace(/\\\\/g, '\\\\\\\\')\r\n \r\n // 不匹配指定区域的内容\r\n .replace(inner.exp(options.open + '!(.+?)!' + options.close), function(str){\r\n str = str.replace(inner.exp('^'+ options.open + '!'), '')\r\n .replace(inner.exp('!'+ options.close), '')\r\n .replace(inner.exp(options.open + '|' + options.close), function(tag){\r\n return tag.replace(/(.)/g, '\\\\$1')\r\n });\r\n return str\r\n })\r\n \r\n // 匹配 JS 语法\r\n .replace(/(?=\"|')/g, '\\\\').replace(that.tagExp(), function(str){\r\n str = str.replace(jss, '').replace(jsse, '');\r\n return '\";' + str.replace(/\\\\(.)/g, '$1') + ';view+=\"';\r\n })\r\n \r\n // 匹配普通输出语句\r\n .replace(that.tagExp(1), function(str){\r\n var start = '\"+laytpl.escape(';\r\n if(str.replace(/\\s/g, '') === options.open + options.close){\r\n return '';\r\n }\r\n str = str.replace(inner.exp(options.open + '|' + options.close), '');\r\n if(/^=/.test(str)){\r\n str = str.replace(/^=/, '');\r\n } else if(/^-/.test(str)){\r\n str = str.replace(/^-/, '');\r\n start = '\"+(';\r\n }\r\n return start + str.replace(/\\\\(.)/g, '$1') + ')+\"';\r\n });\r\n \r\n template = '\"use strict\";var view = \"' + template + '\";return view;';\r\n\r\n try {\r\n that.cache = template = new Function('d, laytpl', template);\r\n return template(data, tool);\r\n } catch(e) {\r\n delete that.cache;\r\n return inner.error(e, source);\r\n }\r\n };\r\n\r\n // 数据渲染\r\n Class.prototype.render = function(data, callback){\r\n data = data || {};\r\n\r\n var that = this;\r\n var result = that.cache ? that.cache(data, tool) : that.parse(that.template, data);\r\n \r\n // 返回渲染结果\r\n typeof callback === 'function' && callback(result);\r\n return result;\r\n };\r\n\r\n // 创建实例\r\n var laytpl = function(template, options){\r\n return new Class(template, options);\r\n };\r\n\r\n // 配置全局属性\r\n laytpl.config = function(options){\r\n options = options || {};\r\n for(var i in options){\r\n config[i] = options[i];\r\n }\r\n };\r\n\r\n laytpl.v = '2.0.0';\r\n \r\n // export\r\n exports('laytpl', laytpl);\r\n});","/**\n * laypage 分页组件\n */\n\nlayui.define(function(exports){\n \"use strict\";\n \n var doc = document;\n var id = 'getElementById';\n var tag = 'getElementsByTagName';\n \n // 字符常量\n var MOD_NAME = 'laypage';\n var DISABLED = 'layui-disabled';\n \n // 构造器\n var Class = function(options){\n var that = this;\n that.config = options || {};\n that.config.index = ++laypage.index;\n that.render(true);\n };\n\n // 判断传入的容器类型\n Class.prototype.type = function(){\n var config = this.config;\n if(typeof config.elem === 'object'){\n return config.elem.length === undefined ? 2 : 3;\n }\n };\n\n // 分页视图\n Class.prototype.view = function(){\n var that = this;\n var config = that.config;\n\n // 连续页码个数\n var groups = config.groups = 'groups' in config \n ? (Number(config.groups) || 0)\n : 5; \n \n // 排版\n config.layout = typeof config.layout === 'object' \n ? config.layout \n : ['prev', 'page', 'next'];\n \n config.count = Number(config.count) || 0; // 数据总数\n config.curr = Number(config.curr) || 1; // 当前页\n\n // 每页条数的选择项\n config.limits = typeof config.limits === 'object'\n ? config.limits\n : [10, 20, 30, 40, 50];\n\n // 默认条数\n config.limit = Number(config.limit) || 10;\n \n // 总页数\n config.pages = Math.ceil(config.count/config.limit) || 1;\n \n // 当前页不能超过总页数\n if(config.curr > config.pages){\n config.curr = config.pages;\n } else if(config.curr < 1) { // 当前分页不能小于 1\n config.curr = 1;\n }\n \n // 连续分页个数不能低于 0 且不能大于总页数\n if(groups < 0){\n groups = 1;\n } else if (groups > config.pages){\n groups = config.pages;\n }\n \n config.prev = 'prev' in config ? config.prev : '上一页'; // 上一页文本\n config.next = 'next' in config ? config.next : '下一页'; // 下一页文本\n \n // 计算当前组\n var index = config.pages > groups \n ? Math.ceil( (config.curr + (groups > 1 ? 1 : 0)) / (groups > 0 ? groups : 1) )\n : 1;\n \n // 视图片段\n var views = {\n // 上一页\n prev: function(){\n return config.prev \n ? ''+ config.prev +''\n : '';\n }(),\n \n // 页码\n page: function(){\n var pager = [];\n \n // 数据量为0时,不输出页码\n if(config.count < 1){\n return '';\n }\n \n // 首页\n if(index > 1 && config.first !== false && groups !== 0){\n pager.push(''+ (config.first || 1) +'');\n }\n\n // 计算当前页码组的起始页\n var halve = Math.floor((groups-1)/2) // 页码数等分\n var start = index > 1 ? config.curr - halve : 1;\n var end = index > 1 ? (function(){\n var max = config.curr + (groups - halve - 1);\n return max > config.pages ? config.pages : max;\n }()) : groups;\n \n // 防止最后一组出现“不规定”的连续页码数\n if(end - start < groups - 1){\n start = end - groups + 1;\n }\n\n // 输出左分割符\n if(config.first !== false && start > 2){\n pager.push('')\n }\n \n // 输出连续页码\n for(; start <= end; start++){\n if(start === config.curr){\n // 当前页\n pager.push(''+ start +'');\n } else {\n pager.push(''+ start +'');\n }\n }\n \n // 输出输出右分隔符 & 末页\n if(config.pages > groups && config.pages > end && config.last !== false){\n if(end + 1 < config.pages){\n pager.push('');\n }\n if(groups !== 0){\n pager.push(''+ (config.last || config.pages) +'');\n }\n }\n\n return pager.join('');\n }(),\n \n // 下一页\n next: function(){\n return config.next \n ? ''+ config.next +''\n : '';\n }(),\n \n // 数据总数\n count: '共 '+ config.count +' 条',\n \n // 每页条数\n limit: function(){\n var elemArr = ['';\n }(),\n \n // 刷新当前页\n refresh: [\n '',\n '',\n ''\n ].join(''),\n\n // 跳页区域\n skip: function(){\n var skipText = typeof config.skipText === 'object' ? config.skipText : [\n '到第',\n '页',\n '确定'\n ];\n return [\n ''+ skipText[0],\n '',\n skipText[1]+ '',\n ''\n ].join('');\n }()\n };\n\n return ['
                    ',\n function(){\n var plate = [];\n layui.each(config.layout, function(index, item){\n if(views[item]){\n plate.push(views[item])\n }\n });\n return plate.join('');\n }(),\n '
                    '].join('');\n };\n\n // 跳页的回调\n Class.prototype.jump = function(elem, isskip){\n if(!elem) return;\n\n var that = this;\n var config = that.config;\n var childs = elem.children;\n var btn = elem[tag]('button')[0];\n var input = elem[tag]('input')[0];\n var select = elem[tag]('select')[0];\n var skip = function(){\n var curr = Number(input.value.replace(/\\s|\\D/g, ''));\n if(curr){\n config.curr = curr;\n that.render();\n }\n };\n \n if(isskip) return skip();\n \n // 页码\n for(var i = 0, len = childs.length; i < len; i++){\n if(childs[i].nodeName.toLowerCase() === 'a'){\n laypage.on(childs[i], 'click', function(){\n var curr = Number(this.getAttribute('data-page'));\n if(curr < 1 || curr > config.pages) return;\n config.curr = curr;\n that.render();\n });\n }\n }\n \n // 条数\n if(select){\n laypage.on(select, 'change', function(){\n var value = this.value;\n if(config.curr*value > config.count){\n config.curr = Math.ceil(config.count/value);\n }\n config.limit = value;\n that.render();\n });\n }\n \n // 确定\n if(btn){\n laypage.on(btn, 'click', function(){\n skip();\n });\n }\n };\n \n // 输入页数字控制\n Class.prototype.skip = function(elem){\n if(!elem) return;\n\n var that = this;\n var input = elem[tag]('input')[0];\n\n if(!input) return;\n\n // 键盘事件\n laypage.on(input, 'keyup', function(e){\n var value = this.value;\n var keyCode = e.keyCode;\n\n if(/^(37|38|39|40)$/.test(keyCode)) return;\n\n if(/\\D/.test(value)){\n this.value = value.replace(/\\D/, '');\n }\n if(keyCode === 13){\n that.jump(elem, true)\n }\n });\n };\n\n // 渲染分页\n Class.prototype.render = function(load){\n var that = this;\n var config = that.config;\n var type = that.type();\n var view = that.view();\n \n if(type === 2){\n config.elem && (config.elem.innerHTML = view);\n } else if(type === 3){\n config.elem.html(view);\n } else {\n if(doc[id](config.elem)){\n doc[id](config.elem).innerHTML = view;\n }\n }\n\n config.jump && config.jump(config, load);\n \n var elem = doc[id]('layui-laypage-' + config.index);\n that.jump(elem);\n \n if(config.hash && !load){\n location.hash = '!'+ config.hash +'='+ config.curr;\n }\n \n that.skip(elem);\n };\n \n // 外部接口\n var laypage = {\n // 分页渲染\n render: function(options){\n var o = new Class(options);\n return o.index;\n },\n index: layui.laypage ? (layui.laypage.index + 10000) : 0,\n on: function(elem, even, fn){\n elem.attachEvent ? elem.attachEvent('on'+ even, function(e){ // for ie\n e.target = e.srcElement;\n fn.call(elem, e);\n }) : elem.addEventListener(even, fn, false);\n return this;\n }\n }\n\n exports(MOD_NAME, laypage);\n});\n","/** laydate 日期与时间控件 | MIT Licensed */\r\n\r\n;!function(window, document){ // gulp build: laydate-header\r\n \"use strict\";\r\n\r\n var isLayui = window.layui && layui.define, ready = {\r\n getPath: (window.lay && lay.getPath) ? lay.getPath : ''\r\n \r\n // 载入 CSS 依赖\r\n ,link: function(href, fn, cssname){\r\n \r\n // 未设置路径,则不主动加载 css\r\n if(!laydate.path) return;\r\n \r\n // 加载 css\r\n if(window.lay && lay.layui){\r\n lay.layui.link(laydate.path + href, fn, cssname);\r\n }\r\n }\r\n };\r\n \r\n // 识别预先可能定义的指定全局对象\r\n var GLOBAL = window.LAYUI_GLOBAL || {};\r\n\r\n // 模块名\r\n var MOD_NAME = 'laydate';\r\n var MOD_ID = 'layui-'+ MOD_NAME +'-id' // 已渲染过的索引标记名\r\n \r\n // 外部调用\r\n var laydate = {\r\n v: '5.5.0' // layDate 版本号\r\n ,config: {\r\n weekStart: 0, // 默认周日一周的开始\r\n } // 全局配置项\r\n ,index: (window.laydate && window.laydate.v) ? 100000 : 0\r\n ,path: GLOBAL.laydate_dir || ready.getPath\r\n \r\n // 设置全局项\r\n ,set: function(options){\r\n var that = this;\r\n that.config = lay.extend({}, that.config, options);\r\n return that;\r\n }\r\n \r\n // 主体 CSS 等待事件\r\n ,ready: function(callback){\r\n var cssname = 'laydate';\r\n var ver = ''\r\n var path = (isLayui ? 'modules/' : '') + 'laydate.css?v='+ laydate.v + ver;\r\n\r\n isLayui ? (\r\n layui['layui.all'] \r\n ? (typeof callback === 'function' && callback()) \r\n : layui.addcss(path, callback, cssname)\r\n ) : ready.link(path, callback, cssname);\r\n\r\n return this;\r\n }\r\n };\r\n \r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id;\r\n \r\n thisModule.that[id] = that; // 记录当前实例对象\r\n\r\n return that.inst = {\r\n // 提示框\r\n hint: function(content){\r\n that.hint.call(that, content);\r\n },\r\n // 重载实例\r\n reload: function(options){\r\n that.reload.call(that, options);\r\n },\r\n config: that.config\r\n };\r\n };\r\n\r\n // 字符常量\r\n var MOD_NAME = 'laydate';\r\n var ELEM = '.layui-laydate';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var DISABLED = 'laydate-disabled';\r\n var LIMIT_YEAR = [100, 200000];\r\n \r\n var ELEM_STATIC = 'layui-laydate-static';\r\n var ELEM_LIST = 'layui-laydate-list';\r\n var ELEM_SELECTED = 'laydate-selected';\r\n var ELEM_HINT = 'layui-laydate-hint';\r\n var ELEM_DAY_NOW = 'laydate-day-now';\r\n var ELEM_PREV = 'laydate-day-prev';\r\n var ELEM_NEXT = 'laydate-day-next';\r\n var ELEM_FOOTER = 'layui-laydate-footer';\r\n var ELEM_SHORTCUT = 'layui-laydate-shortcut';\r\n var ELEM_NOW = '.laydate-btns-now'\r\n var ELEM_CONFIRM = '.laydate-btns-confirm';\r\n var ELEM_TIME_TEXT = 'laydate-time-text';\r\n var ELEM_TIME_BTN = 'laydate-btns-time';\r\n var ELEM_PREVIEW = 'layui-laydate-preview';\r\n var ELEM_MAIN = 'layui-laydate-main';\r\n var ELEM_SHADE = 'layui-laydate-shade';\r\n\r\n // 组件构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++laydate.index;\r\n that.config = lay.extend({}, that.config, laydate.config, options);\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n var elem = lay(options.elem || that.config.elem);\r\n if(elem.length > 1){\r\n lay.each(elem, function(){\r\n laydate.render(lay.extend({}, that.config, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n \r\n // 初始化属性\r\n options = lay.extend(that.config, lay.options(elem[0])); // 继承节点上的属性\r\n\r\n // 若重复执行 render,则视为 reload 处理\r\n if(elem[0] && elem.attr(MOD_ID)){\r\n var newThat = thisModule.getThis(elem.attr(MOD_ID));\r\n if(!newThat) return;\r\n return newThat.reload(options);\r\n }\r\n\r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n options.id = 'id' in options ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n\r\n // 自增索引\r\n options.index = that.index;\r\n \r\n // 初始化\r\n laydate.ready(function(){\r\n that.init();\r\n });\r\n };\r\n \r\n // 日期格式字符\r\n var dateType = 'yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s';\r\n \r\n // 将日期格式字符转换为数组\r\n thisModule.formatArr = function(format){\r\n return (format || '').match(new RegExp(dateType + '|.', 'g')) || []\r\n };\r\n \r\n /*\r\n 组件操作\r\n */\r\n \r\n // 是否闰年\r\n Class.isLeapYear = function(year){\r\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n };\r\n \r\n // 默认配置\r\n Class.prototype.config = {\r\n type: 'date' //控件类型,支持:year/month/date/time/datetime\r\n ,range: false //是否开启范围选择,即双控件\r\n ,format: 'yyyy-MM-dd' //默认日期格式\r\n ,value: null //默认日期,支持传入new Date(),或者符合format参数设定的日期格式字符\r\n ,isInitValue: true //用于控制是否自动向元素填充初始值(需配合 value 参数使用)\r\n ,min: '1900-1-1' //有效最小日期,年月日必须用“-”分割,时分秒必须用“:”分割。注意:它并不是遵循 format 设定的格式。\r\n ,max: '2099-12-31' //有效最大日期,同上\r\n ,trigger: 'click' //呼出控件的事件\r\n ,show: false //是否直接显示,如果设置 true,则默认直接显示控件\r\n ,showBottom: true //是否显示底部栏\r\n ,isPreview: true //是否显示值预览\r\n ,btns: ['clear', 'now', 'confirm'] //右下角显示的按钮,会按照数组顺序排列\r\n ,lang: 'cn' //语言,只支持cn/en,即中文和英文\r\n ,theme: 'default' //主题\r\n ,position: null //控件定位方式定位, 默认absolute,支持:fixed/absolute/static\r\n ,calendar: false //是否开启公历重要节日,仅支持中文版\r\n ,mark: {} //日期备注,如重要事件或活动标记\r\n ,holidays: null // 标注法定节假日或补假上班\r\n ,zIndex: null //控件层叠顺序\r\n ,done: null //控件选择完毕后的回调,点击清空/现在/确定也均会触发\r\n ,change: null //日期时间改变后的回调\r\n ,autoConfirm: true //是否自动确认(日期|年份|月份选择器非range下是否自动确认)\r\n ,shade: 0\r\n };\r\n \r\n //多语言\r\n Class.prototype.lang = function(){\r\n var that = this\r\n ,options = that.config\r\n ,text = {\r\n cn: {\r\n weeks: ['日', '一', '二', '三', '四', '五', '六']\r\n ,time: ['时', '分', '秒']\r\n ,timeTips: '选择时间'\r\n ,startTime: '开始时间'\r\n ,endTime: '结束时间'\r\n ,dateTips: '返回日期'\r\n ,month: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二']\r\n ,tools: {\r\n confirm: '确定'\r\n ,clear: '清空'\r\n ,now: '现在'\r\n }\r\n ,timeout: '结束时间不能早于开始时间
                    请重新选择'\r\n ,invalidDate: '不在有效日期或时间范围内'\r\n ,formatError: ['日期格式不合法
                    必须遵循下述格式:
                    ', '
                    已为你重置']\r\n ,preview: '当前选中的结果'\r\n }\r\n ,en: {\r\n weeks: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']\r\n ,time: ['Hours', 'Minutes', 'Seconds']\r\n ,timeTips: 'Select Time'\r\n ,startTime: 'Start Time'\r\n ,endTime: 'End Time'\r\n ,dateTips: 'Select Date'\r\n ,month: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\r\n ,tools: {\r\n confirm: 'Confirm'\r\n ,clear: 'Clear'\r\n ,now: 'Now'\r\n }\r\n ,timeout: 'End time cannot be less than start Time
                    Please re-select'\r\n ,invalidDate: 'Invalid date'\r\n ,formatError: ['The date format error
                    Must be followed:
                    ', '
                    It has been reset']\r\n ,preview: 'The selected result'\r\n }\r\n };\r\n return text[options.lang] || text['cn'];\r\n };\r\n\r\n // 重载实例\r\n Class.prototype.reload = function(options){\r\n var that = this;\r\n that.config = lay.extend({}, that.config, options);\r\n that.init();\r\n };\r\n \r\n //初始准备\r\n Class.prototype.init = function(){\r\n var that = this\r\n ,options = that.config\r\n ,isStatic = options.position === 'static'\r\n ,format = {\r\n year: 'yyyy'\r\n ,month: 'yyyy-MM'\r\n ,date: 'yyyy-MM-dd'\r\n ,time: 'HH:mm:ss'\r\n ,datetime: 'yyyy-MM-dd HH:mm:ss'\r\n };\r\n \r\n options.elem = lay(options.elem);\r\n options.eventElem = lay(options.eventElem);\r\n \r\n if(!options.elem[0]) return;\r\n\r\n layui.type(options.theme) !== 'array' && (options.theme = [options.theme]);\r\n // 设置了全面版模式\r\n if (options.fullPanel) {\r\n if (options.type !== 'datetime' || options.range) {\r\n // 目前只支持datetime的全面版\r\n delete options.fullPanel;\r\n }\r\n }\r\n\r\n //日期范围分隔符\r\n that.rangeStr = options.range ? (\r\n typeof options.range === 'string' ? options.range : '-'\r\n ) : '';\r\n\r\n //日期范围的日历面板是否联动\r\n that.rangeLinked = !!(options.range && options.rangeLinked && (options.type === 'date' || options.type === 'datetime'))\r\n\r\n //切换日历联动方式\r\n that.autoCalendarModel = function () {\r\n var state = that.rangeLinked;\r\n that.rangeLinked = (options.range && (options.type === 'date' || options.type === 'datetime'))\r\n && ((!that.startDate || !that.endDate) || (that.startDate && that.endDate && that.startDate.year === that.endDate.year && that.startDate.month === that.endDate.month));\r\n lay(that.elem)[that.rangeLinked ? 'addClass' : 'removeClass']('layui-laydate-linkage');\r\n return that.rangeLinked != state; // 返回发生了变化\r\n };\r\n\r\n //是否自动切换\r\n that.autoCalendarModel.auto = that.rangeLinked && options.rangeLinked === 'auto';\r\n\r\n //若 range 参数为数组,则表示为开始日期和结束日期的 input 对象\r\n if(layui.type(options.range) === 'array'){\r\n that.rangeElem = [\r\n lay(options.range[0]),\r\n lay(options.range[1])\r\n ];\r\n }\r\n \r\n //若 type 设置非法,则初始化为 date 类型\r\n if(!format[options.type]){\r\n window.console && console.error && console.error('laydate type error:\\''+ options.type + '\\' is not supported')\r\n options.type = 'date';\r\n }\r\n \r\n //根据不同 type,初始化默认 format\r\n if(options.format === format.date){\r\n options.format = format[options.type] || format.date;\r\n }\r\n \r\n //将日期格式转化成数组\r\n that.format = thisModule.formatArr(options.format);\r\n\r\n // 设置了一周的开始是周几,此处做一个控制\r\n if (options.weekStart) {\r\n if (!/^[0-6]$/.test(options.weekStart)) {\r\n var lang = that.lang();\r\n options.weekStart = lang.weeks.indexOf(options.weekStart);\r\n if (options.weekStart === -1) options.weekStart = 0;\r\n }\r\n }\r\n\r\n //生成正则表达式\r\n that.EXP_IF = ''; \r\n that.EXP_SPLIT = ''; \r\n lay.each(that.format, function(i, item){\r\n var EXP = new RegExp(dateType).test(item) \r\n ? '\\\\d{'+ function(){\r\n if(new RegExp(dateType).test(that.format[i === 0 ? i + 1 : i - 1]||'')){\r\n if(/^yyyy|y$/.test(item)) return 4;\r\n return item.length;\r\n }\r\n if(/^yyyy$/.test(item)) return '1,4';\r\n if(/^y$/.test(item)) return '1,308';\r\n return '1,2';\r\n }() +'}' \r\n : '\\\\' + item;\r\n that.EXP_IF = that.EXP_IF + EXP;\r\n that.EXP_SPLIT = that.EXP_SPLIT + '(' + EXP + ')';\r\n });\r\n //验证日期格式正则\r\n that.EXP_IF_ONE = new RegExp('^'+ that.EXP_IF +'$'); //验证单个日期格式\r\n that.EXP_IF = new RegExp('^'+ (\r\n options.range ? \r\n that.EXP_IF + '\\\\s\\\\'+ that.rangeStr + '\\\\s' + that.EXP_IF\r\n : that.EXP_IF\r\n ) +'$');\r\n that.EXP_SPLIT = new RegExp('^'+ that.EXP_SPLIT +'$', '');\r\n \r\n //如果不是 input|textarea 元素,则默认采用 click 事件\r\n if(!that.isInput(options.elem[0])){\r\n if(options.trigger === 'focus'){\r\n options.trigger = 'click';\r\n }\r\n }\r\n \r\n // 设置唯一 KEY\r\n options.elem.attr('lay-key', that.index);\r\n options.eventElem.attr('lay-key', that.index);\r\n options.elem.attr(MOD_ID, options.id); // 渲染过的标记\r\n\r\n //记录重要日期\r\n options.mark = lay.extend({}, (options.calendar && options.lang === 'cn') ? {\r\n '0-1-1': '元旦'\r\n ,'0-2-14': '情人'\r\n ,'0-3-8': '妇女'\r\n ,'0-3-12': '植树'\r\n ,'0-4-1': '愚人'\r\n ,'0-5-1': '劳动'\r\n ,'0-5-4': '青年'\r\n ,'0-6-1': '儿童'\r\n ,'0-9-10': '教师'\r\n ,'0-10-1': '国庆'\r\n ,'0-12-25': '圣诞'\r\n } : {}, options.mark);\r\n \r\n //获取限制内日期\r\n lay.each(['min', 'max'], function(i, item){\r\n var ymd = [];\r\n var hms = [];\r\n if(typeof options[item] === 'number'){ //如果为数字\r\n var day = options[item]\r\n ,tDate = new Date()\r\n ,time = that.newDate({ //今天的最大毫秒数\r\n year: tDate.getFullYear()\r\n ,month: tDate.getMonth()\r\n ,date: tDate.getDate()\r\n ,hours: i ? 23 : 0\r\n ,minutes: i ? 59 : 0\r\n ,seconds: i ? 59 : 0\r\n }).getTime() \r\n ,STAMP = 86400000 //代表一天的毫秒数\r\n ,thisDate = new Date(\r\n day ? (\r\n day < STAMP ? time + day*STAMP : day //如果数字小于一天的毫秒数,则数字为天数,否则为毫秒数\r\n ) : time\r\n );\r\n ymd = [thisDate.getFullYear(), thisDate.getMonth() + 1, thisDate.getDate()];\r\n hms = [thisDate.getHours(), thisDate.getMinutes(), thisDate.getSeconds()];\r\n } else if(typeof options[item] === 'string') {\r\n ymd = (options[item].match(/\\d+-\\d+-\\d+/) || [''])[0].split('-');\r\n hms = (options[item].match(/\\d+:\\d+:\\d+/) || [''])[0].split(':');\r\n } else if(typeof options[item] === 'object'){\r\n return options[item];\r\n }\r\n options[item] = {\r\n year: ymd[0] | 0 || new Date().getFullYear()\r\n ,month: ymd[1] ? (ymd[1] | 0) - 1 : new Date().getMonth()\r\n ,date: ymd[2] | 0 || new Date().getDate()\r\n ,hours: hms[0] | 0\r\n ,minutes: hms[1] | 0\r\n ,seconds: hms[2] | 0\r\n };\r\n });\r\n \r\n that.elemID = 'layui-laydate'+ options.elem.attr('lay-key');\r\n \r\n if(options.show || isStatic) that.render();\r\n isStatic || that.events();\r\n \r\n //默认赋值\r\n if(options.value && options.isInitValue){\r\n if(layui.type(options.value) === 'date'){\r\n that.setValue(that.parse(0, that.systemDate(options.value))); \r\n } else {\r\n that.setValue(options.value); \r\n }\r\n }\r\n };\r\n \r\n //控件主体渲染\r\n Class.prototype.render = function(){\r\n var that = this\r\n ,options = that.config\r\n ,lang = that.lang()\r\n ,isStatic = options.position === 'static'\r\n \r\n //主面板\r\n ,elem = that.elem = lay.elem('div', {\r\n id: that.elemID\r\n ,\"class\": [\r\n 'layui-laydate'\r\n ,options.range ? ' layui-laydate-range' : ''\r\n ,that.rangeLinked ? ' layui-laydate-linkage' : ''\r\n ,isStatic ? (' '+ ELEM_STATIC) : ''\r\n ,options.fullPanel ? ' laydate-theme-fullpanel' : '' // 全面版\r\n // ,options.theme && options.theme !== 'default' && !/^#/.test(options.theme) ? (' laydate-theme-' + options.theme) : ''\r\n ,(function () {\r\n var themeStr = '';\r\n lay.each(options.theme, function (index, theme) {\r\n if (theme !== 'default' && !/^#/.test(theme)) {\r\n themeStr += ' laydate-theme-' + theme;\r\n }\r\n })\r\n return themeStr;\r\n })()\r\n ].join('')\r\n })\r\n \r\n //主区域\r\n ,elemMain = that.elemMain = []\r\n ,elemHeader = that.elemHeader = []\r\n ,elemCont = that.elemCont = []\r\n ,elemTable = that.table = []\r\n\r\n //底部区域\r\n ,divFooter = that.footer = lay.elem('div', {\r\n \"class\": ELEM_FOOTER\r\n })\r\n\r\n //快捷栏\r\n ,divShortcut = that.shortcut = lay.elem('ul', {\r\n \"class\": ELEM_SHORTCUT\r\n });\r\n \r\n if(options.zIndex) elem.style.zIndex = options.zIndex;\r\n \r\n //单双日历区域\r\n lay.each(new Array(2), function(i){\r\n if(!options.range && i > 0){\r\n return true;\r\n }\r\n\r\n //头部区域\r\n var divHeader = lay.elem('div', {\r\n \"class\": 'layui-laydate-header'\r\n })\r\n \r\n //左右切换\r\n ,headerChild = [function(){ //上一年\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-prev-y'\r\n });\r\n elem.innerHTML = '';\r\n return elem;\r\n }(), function(){ //上一月\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-prev-m'\r\n });\r\n elem.innerHTML = '';\r\n return elem;\r\n }(), function(){ //年月选择\r\n var elem = lay.elem('div', {\r\n \"class\": 'laydate-set-ym'\r\n }), spanY = lay.elem('span'), spanM = lay.elem('span');\r\n elem.appendChild(spanY);\r\n elem.appendChild(spanM);\r\n return elem;\r\n }(), function(){ //下一月\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-next-m'\r\n });\r\n elem.innerHTML = '';\r\n return elem;\r\n }(), function(){ //下一年\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-next-y'\r\n });\r\n elem.innerHTML = '';\r\n return elem;\r\n }()]\r\n \r\n //日历内容区域\r\n ,divContent = lay.elem('div', {\r\n \"class\": 'layui-laydate-content'\r\n })\r\n ,table = lay.elem('table')\r\n ,thead = lay.elem('thead'), theadTr = lay.elem('tr');\r\n \r\n //生成年月选择\r\n lay.each(headerChild, function(i, item){\r\n divHeader.appendChild(item);\r\n });\r\n \r\n //生成表格\r\n thead.appendChild(theadTr);\r\n lay.each(new Array(6), function(i){ //表体\r\n var tr = table.insertRow(0);\r\n lay.each(new Array(7), function(j){\r\n if(i === 0){\r\n var th = lay.elem('th');\r\n th.innerHTML = lang.weeks[(j + options.weekStart) % 7];\r\n theadTr.appendChild(th);\r\n }\r\n tr.insertCell(j);\r\n });\r\n });\r\n table.insertBefore(thead, table.children[0]); //表头\r\n divContent.appendChild(table);\r\n \r\n elemMain[i] = lay.elem('div', {\r\n \"class\": ELEM_MAIN + ' laydate-main-list-'+ i\r\n });\r\n \r\n elemMain[i].appendChild(divHeader);\r\n elemMain[i].appendChild(divContent);\r\n \r\n elemHeader.push(headerChild);\r\n elemCont.push(divContent);\r\n elemTable.push(table);\r\n });\r\n \r\n //生成底部栏\r\n lay(divFooter).html(function(){\r\n var html = [], btns = [];\r\n if(options.type === 'datetime'){\r\n html.push(''+ lang.timeTips +'');\r\n }\r\n if(!(!options.range && options.type === 'datetime') || options.fullPanel){\r\n html.push('')\r\n }\r\n \r\n lay.each(options.btns, function(i, item){\r\n var title = lang.tools[item] || 'btn';\r\n if(options.range && item === 'now') return;\r\n if(isStatic && item === 'clear') title = options.lang === 'cn' ? '重置' : 'Reset';\r\n btns.push(''+ title +'');\r\n });\r\n html.push('');\r\n return html.join('');\r\n }());\r\n\r\n // 生成快捷键栏\r\n if (options.shortcuts) {\r\n elem.appendChild(divShortcut);\r\n lay(divShortcut).html(function () {\r\n var shortcutBtns = [];\r\n lay.each(options.shortcuts, function (i, item) {\r\n shortcutBtns.push('
                  • '+item.text+'
                  • ')\r\n })\r\n return shortcutBtns.join('');\r\n }()).find('li').on('click', function (event) {\r\n var btnSetting = options.shortcuts[this.dataset['index']] || {};\r\n var value = (typeof btnSetting.value === 'function'\r\n ? btnSetting.value() \r\n : btnSetting.value) || [];\r\n if (!layui.isArray(value)) {\r\n value = [value];\r\n }\r\n var type = options.type;\r\n lay.each(value, function (i, item) {\r\n var dateTime = [options.dateTime, that.endDate][i];\r\n if (type === 'time' && layui.type(item) !== 'date') {\r\n if (that.EXP_IF.test(item)) {\r\n item = (item.match(that.EXP_SPLIT) || []).slice(1);\r\n lay.extend(dateTime, {hours: item[0] | 0, minutes: item[2] | 0, seconds: item[4] | 0})\r\n }\r\n } else {\r\n lay.extend(dateTime, that.systemDate(layui.type(item) === 'date' ? item : new Date(item)))\r\n }\r\n\r\n if (type === 'time' || type === 'datetime') {\r\n that[['startTime', 'endTime'][i]] = {\r\n hours: dateTime.hours,\r\n minutes: dateTime.minutes,\r\n seconds: dateTime.seconds,\r\n }\r\n }\r\n if (i === 0) { // 第一个值作为startDate\r\n that.startDate = lay.extend({}, dateTime);\r\n } else {\r\n that.endState = true;\r\n }\r\n if (type === 'year' || type === 'month' || type === 'time') {\r\n that.listYM[i] = [dateTime.year, dateTime.month + 1];\r\n } else if (i) {\r\n that.autoCalendarModel.auto && that.autoCalendarModel();\r\n }\r\n });\r\n that.checkDate('limit').calendar(null, null, 'init');\r\n\r\n var timeBtn = lay(that.footer).find('.'+ ELEM_TIME_BTN).removeClass(DISABLED);\r\n timeBtn && timeBtn.attr('lay-type') === 'date' && timeBtn[0].click();\r\n that.done(null, 'change');\r\n\r\n lay(this).addClass(THIS);\r\n\r\n // 自动确认\r\n if(options.position !== 'static'){\r\n that.setValue(that.parse()).done().remove();\r\n }\r\n /*\r\n if (options.position !== 'static' && !options.range && options.autoConfirm) {\r\n if (type === 'date') {\r\n that.choose(lay(elem).find('td.layui-this'))\r\n } else if (type === 'year' || type === 'month') {\r\n if(lay(elemMain[0]).find('.' + ELEM_MAIN + ' li.' + THIS + ':not(.laydate-disabled)')[0]) {\r\n that.setValue(that.parse()).done().remove();\r\n }\r\n }\r\n }\r\n */\r\n })\r\n }\r\n\r\n //插入到主区域\r\n lay.each(elemMain, function(i, main){\r\n elem.appendChild(main);\r\n });\r\n options.showBottom && elem.appendChild(divFooter);\r\n \r\n // 生成自定义主题\r\n var style = lay.elem('style');\r\n var styleText = [];\r\n var colorTheme;\r\n var isPrimaryColor = true;\r\n lay.each(options.theme, function (index, theme) {\r\n // 主色\r\n if(isPrimaryColor && /^#/.test(theme)){\r\n colorTheme = true;\r\n isPrimaryColor = false;\r\n styleText.push([\r\n '#{{id}} .layui-laydate-header{background-color:{{theme}};}',\r\n '#{{id}} li.layui-this,#{{id}} td.layui-this>div{background-color:{{theme}} !important;}',\r\n options.theme.indexOf('circle') !== -1 ? '' : '#{{id}} .layui-this{background-color:{{theme}} !important;}',\r\n '#{{id}} .laydate-day-now{color:{{theme}} !important;}',\r\n '#{{id}} .laydate-day-now:after{border-color:{{theme}} !important;}'\r\n ].join('').replace(/{{id}}/g, that.elemID).replace(/{{theme}}/g, theme));\r\n return;\r\n }\r\n // 第二个自定义颜色作为辅色\r\n if(!isPrimaryColor && /^#/.test(theme)){\r\n styleText.push([\r\n '#{{id}} .laydate-selected>div{background-color:{{theme}} !important;}',\r\n '#{{id}} .laydate-selected:hover>div{background-color:{{theme}} !important;}'\r\n ].join('').replace(/{{id}}/g, that.elemID).replace(/{{theme}}/g, theme));\r\n }\r\n });\r\n //快捷栏样式\r\n if (options.shortcuts && options.range) {\r\n styleText.push('#{{id}}.layui-laydate-range{width: 628px;}'.replace(/{{id}}/g, that.elemID))\r\n }\r\n if (styleText.length) {\r\n styleText = styleText.join('');\r\n if('styleSheet' in style){\r\n style.setAttribute('type', 'text/css');\r\n style.styleSheet.cssText = styleText;\r\n } else {\r\n style.innerHTML = styleText;\r\n }\r\n\r\n colorTheme && lay(elem).addClass('laydate-theme-molv');\r\n elem.appendChild(style);\r\n }\r\n\r\n //移除上一个控件\r\n that.remove(Class.thisElemDate);\r\n\r\n //记录当前执行的实例索引\r\n laydate.thisId = options.id;\r\n\r\n //如果是静态定位,则插入到指定的容器中,否则,插入到body\r\n isStatic ? options.elem.append(elem) : (\r\n document.body.appendChild(elem)\r\n ,that.position() //定位\r\n );\r\n \r\n var shade = options.shade ? ('
                    ') : '';\r\n elem.insertAdjacentHTML('beforebegin', shade);\r\n\r\n that.checkDate().calendar(null, 0, 'init'); //初始校验\r\n that.changeEvent(); //日期切换\r\n \r\n Class.thisElemDate = that.elemID;\r\n\r\n that.renderAdditional()\r\n typeof options.ready === 'function' && options.ready(lay.extend({}, options.dateTime, {\r\n month: options.dateTime.month + 1\r\n }));\r\n \r\n that.preview();\r\n };\r\n \r\n //控件移除\r\n Class.prototype.remove = function(prev){\r\n var that = this\r\n ,options = that.config\r\n ,elem = lay('#'+ (prev || that.elemID));\r\n if(!elem[0]) return that;\r\n \r\n if(!elem.hasClass(ELEM_STATIC)){\r\n that.checkDate(function(){\r\n elem.remove();\r\n //delete options.dateTime;\r\n delete that.startDate;\r\n delete that.endDate;\r\n delete that.endState;\r\n delete that.startTime;\r\n delete that.endTime;\r\n delete laydate.thisId;\r\n typeof options.close === 'function' && options.close(that);\r\n });\r\n }\r\n lay('.' + ELEM_SHADE).remove();\r\n return that;\r\n };\r\n \r\n //定位算法\r\n Class.prototype.position = function(){\r\n var that = this\r\n ,options = that.config;\r\n lay.position(options.elem[0], that.elem, {\r\n position: options.position\r\n });\r\n return that;\r\n };\r\n \r\n // 提示\r\n Class.prototype.hint = function(opts){\r\n var that = this;\r\n var options = that.config;\r\n var div = lay.elem('div', {\r\n \"class\": ELEM_HINT\r\n });\r\n \r\n if(!that.elem) return;\r\n\r\n // 兼容旧版参数\r\n if(typeof opts === 'object'){\r\n opts = opts || {};\r\n } else {\r\n opts = {\r\n content: opts\r\n }\r\n }\r\n \r\n div.innerHTML = opts.content || '';\r\n lay(that.elem).find('.'+ ELEM_HINT).remove();\r\n that.elem.appendChild(div);\r\n\r\n clearTimeout(that.hinTimer);\r\n that.hinTimer = setTimeout(function(){\r\n lay(that.elem).find('.'+ ELEM_HINT).remove();\r\n }, 'ms' in opts ? opts.ms : 3000);\r\n };\r\n \r\n //获取递增/减后的年月\r\n Class.prototype.getAsYM = function(Y, M, type){\r\n type ? M-- : M++;\r\n if(M < 0){\r\n M = 11;\r\n Y--;\r\n }\r\n if(M > 11){\r\n M = 0;\r\n Y++;\r\n }\r\n return [Y, M];\r\n };\r\n \r\n //系统日期\r\n Class.prototype.systemDate = function(newDate){\r\n var thisDate = newDate || new Date();\r\n return {\r\n year: thisDate.getFullYear() //年\r\n ,month: thisDate.getMonth() //月\r\n ,date: thisDate.getDate() //日\r\n ,hours: newDate ? newDate.getHours() : 0 //时\r\n ,minutes: newDate ? newDate.getMinutes() : 0 //分\r\n ,seconds: newDate ? newDate.getSeconds() : 0 //秒\r\n }\r\n };\r\n \r\n //日期校验\r\n Class.prototype.checkDate = function(fn){\r\n var that = this\r\n ,thisDate = new Date()\r\n ,options = that.config\r\n ,lang = that.lang()\r\n ,dateTime = options.dateTime = options.dateTime || that.systemDate()\r\n ,thisMaxDate, error\r\n \r\n ,elem = options.elem[0]\r\n ,valType = that.isInput(elem) ? 'val' : 'html'\r\n ,value = function(){\r\n //如果传入了开始和结束日期的 input 对象,则将其拼接为日期范围字符\r\n if(that.rangeElem){\r\n var vals = [that.rangeElem[0].val(), that.rangeElem[1].val()];\r\n\r\n if(vals[0] && vals[1]){\r\n return vals.join(' ' + that.rangeStr + ' ');\r\n }\r\n }\r\n return that.isInput(elem) \r\n ? elem.value \r\n : (options.position === 'static' ? '' : lay(elem).attr('lay-date'));\r\n }()\r\n \r\n //校验日期有效数字\r\n ,checkValid = function(dateTime){\r\n if (!dateTime) {\r\n return;\r\n }\r\n if(dateTime.year > LIMIT_YEAR[1]) dateTime.year = LIMIT_YEAR[1], error = true; //不能超过20万年\r\n if(dateTime.month > 11) dateTime.month = 11, error = true;\r\n if(dateTime.seconds > 59) dateTime.seconds = 0, dateTime.minutes++, error = true;\r\n if(dateTime.minutes > 59) dateTime.minutes = 0, dateTime.hours++, error = true;\r\n if(dateTime.hours > 23) dateTime.hours = 0, error = true;\r\n\r\n //计算当前月的最后一天\r\n thisMaxDate = laydate.getEndDate(dateTime.month + 1, dateTime.year);\r\n if(dateTime.date > thisMaxDate) dateTime.date = thisMaxDate, error = true;\r\n }\r\n \r\n //获得初始化日期值\r\n ,initDate = function(dateTime, value, index){\r\n var startEnd = ['startTime', 'endTime'];\r\n value = (value.match(that.EXP_SPLIT) || []).slice(1);\r\n index = index || 0;\r\n \r\n if(options.range){\r\n that[startEnd[index]] = that[startEnd[index]] || {};\r\n }\r\n lay.each(that.format, function(i, item){\r\n var thisv = parseFloat(value[i]);\r\n if(value[i].length < item.length) error = true;\r\n if(/yyyy|y/.test(item)){ //年\r\n if(thisv < LIMIT_YEAR[0]) thisv = LIMIT_YEAR[0], error = true; //年不能低于100年\r\n dateTime.year = thisv;\r\n } else if(/MM|M/.test(item)){ //月\r\n if(thisv < 1) thisv = 1, error = true;\r\n dateTime.month = thisv - 1;\r\n } else if(/dd|d/.test(item)){ //日\r\n if(thisv < 1) thisv = 1, error = true;\r\n dateTime.date = thisv;\r\n } else if(/HH|H/.test(item)){ //时\r\n if (thisv < 0) thisv = 0, error = true;\r\n if (thisv > 23) thisv = 23, error = true;\r\n dateTime.hours = thisv;\r\n options.range && (that[startEnd[index]].hours = thisv);\r\n } else if(/mm|m/.test(item)){ //分\r\n if (thisv < 0) thisv = 0, error = true;\r\n if (thisv > 59) thisv = 59, error = true;\r\n dateTime.minutes = thisv;\r\n options.range && (that[startEnd[index]].minutes = thisv);\r\n } else if(/ss|s/.test(item)){ //秒\r\n if (thisv < 0) thisv = 0, error = true;\r\n if (thisv > 59) thisv = 59, error = true;\r\n dateTime.seconds = thisv;\r\n options.range && (that[startEnd[index]].seconds = thisv);\r\n }\r\n });\r\n checkValid(dateTime);\r\n };\r\n \r\n if(fn === 'limit') {\r\n if (options.range) {\r\n checkValid(that.rangeLinked ? that.startDate : dateTime); // 校验开始时间\r\n that.endDate && checkValid(that.endDate); // 校验结束时间\r\n } else {\r\n checkValid(dateTime);\r\n }\r\n return that;\r\n }\r\n \r\n value = value || options.value;\r\n if(typeof value === 'string'){\r\n value = value.replace(/\\s+/g, ' ').replace(/^\\s|\\s$/g, '');\r\n }\r\n\r\n //如果开启范围,则计算结束日期\r\n var getEndDate = function(){\r\n if(options.range){\r\n that.endDate = that.endDate || lay.extend({}, options.dateTime, function(){\r\n var obj = {}\r\n ,dateTime = options.dateTime\r\n ,EYM = that.getAsYM(dateTime.year, dateTime.month);\r\n \r\n //初始右侧面板的年月\r\n if(options.type === 'year'){\r\n obj.year = dateTime.year + 1;\r\n } else if(options.type !== 'time'){\r\n obj.year = EYM[0];\r\n obj.month = EYM[1];\r\n }\r\n \r\n //初始右侧面板的时间\r\n if(options.type === 'datetime' || options.type === 'time'){\r\n obj.hours = 23;\r\n obj.minutes = obj.seconds = 59;\r\n }\r\n \r\n return obj;\r\n }());\r\n }\r\n };\r\n getEndDate();\r\n \r\n if(typeof value === 'string' && value){\r\n if(that.EXP_IF.test(value)){ //校验日期格式\r\n if(options.range){\r\n value = value.split(' '+ that.rangeStr +' ');\r\n lay.each([options.dateTime, that.endDate], function(i, item){\r\n initDate(item, value[i], i);\r\n });\r\n } else {\r\n initDate(dateTime, value);\r\n }\r\n } else {\r\n //格式不合法\r\n that.hint(lang.formatError[0] + (\r\n options.range ? (options.format + ' '+ that.rangeStr +' ' + options.format) : options.format\r\n ) + lang.formatError[1]);\r\n error = true;\r\n }\r\n } else if(value && layui.type(value) === 'date'){ //若值为日期对象\r\n options.dateTime = that.systemDate(value);\r\n } else {\r\n //重置开始日期\r\n options.dateTime = that.systemDate();\r\n delete that.startTime;\r\n \r\n //重置结束日期\r\n delete that.endDate; //删除原有的结束日期\r\n getEndDate(); //并重新获得新的结束日期\r\n delete that.endTime;\r\n }\r\n \r\n //从日期范围表单中获取初始值\r\n (function(){\r\n if(that.rangeElem){\r\n var vals = [that.rangeElem[0].val(), that.rangeElem[1].val()]\r\n ,arrDate = [options.dateTime, that.endDate];\r\n lay.each(vals, function(_i, _v){\r\n if(that.EXP_IF_ONE.test(_v)){ //校验日期格式\r\n initDate(arrDate[_i], _v, _i);\r\n }\r\n });\r\n }\r\n })();\r\n \r\n // 校验日期有效数字\r\n checkValid(dateTime);\r\n if(options.range) checkValid(that.endDate);\r\n\r\n // 如果初始值格式错误,则纠正初始值\r\n if(error && value){\r\n that.setValue(\r\n options.range ? (that.endDate ? that.parse() : '') : that.parse()\r\n );\r\n }\r\n \r\n //如果当前日期不在设定的最大小日期区间,则自动纠正在可选区域\r\n //校验主面板是否在可选日期区间\r\n var minMaxError;\r\n if(that.getDateTime(dateTime) > that.getDateTime(options.max)){ //若超出最大日期\r\n dateTime = options.dateTime = lay.extend({}, options.max);\r\n minMaxError = true;\r\n } else if(that.getDateTime(dateTime) < that.getDateTime(options.min)){ //若少于最小日期\r\n dateTime = options.dateTime = lay.extend({}, options.min);\r\n minMaxError = true;\r\n }\r\n \r\n //校验右侧面板是否在可选日期区间\r\n if(options.range){\r\n if(that.getDateTime(that.endDate) < that.getDateTime(options.min) || that.getDateTime(that.endDate) > that.getDateTime(options.max)){\r\n that.endDate = lay.extend({}, options.max);\r\n minMaxError = true;\r\n }\r\n // 有时间范围的情况下初始化startTime和endTime\r\n that.startTime = {\r\n hours: options.dateTime.hours,\r\n minutes: options.dateTime.minutes,\r\n seconds: options.dateTime.seconds,\r\n }\r\n that.endTime = {\r\n hours: that.endDate.hours,\r\n minutes: that.endDate.minutes,\r\n seconds: that.endDate.seconds,\r\n }\r\n // 如果是年月范围,将对应的日期统一成当月的1日进行比较,避免出现同一个月但是开始日期大于结束日期的情况\r\n if (options.type === 'month') {\r\n options.dateTime.date = 1;\r\n that.endDate.date = 1;\r\n }\r\n }\r\n\r\n // 初始值不在最大最小范围内\r\n if(minMaxError && value){\r\n that.setValue(that.parse());\r\n that.hint('value ' + lang.invalidDate + lang.formatError[1]);\r\n }\r\n\r\n // 初始赋值 startDate,endState\r\n that.startDate = that.startDate || value && lay.extend({}, options.dateTime); // 有默认值才初始化startDate\r\n that.autoCalendarModel.auto && that.autoCalendarModel();\r\n that.endState = !options.range || !that.rangeLinked || !!(that.startDate && that.endDate); // 初始化选中范围状态\r\n\r\n fn && fn();\r\n return that;\r\n };\r\n \r\n // 公历重要日期与自定义备注\r\n Class.prototype.mark = function(td, YMD){\r\n var that = this\r\n ,mark, options = that.config;\r\n lay.each(options.mark, function(key, title){\r\n var keys = key.split('-');\r\n if((keys[0] == YMD[0] || keys[0] == 0) //每年的每月\r\n && (keys[1] == YMD[1] || keys[1] == 0) //每月的每日\r\n && keys[2] == YMD[2]){ //特定日\r\n mark = title || YMD[2];\r\n }\r\n });\r\n mark && td.find('div').html(''+ mark +'');\r\n \r\n return that;\r\n };\r\n\r\n // 标注法定节假日或补假上班\r\n Class.prototype.holidays = function(td, YMD) {\r\n var that = this;\r\n var options = that.config;\r\n var type = ['', 'work'];\r\n\r\n if(layui.type(options.holidays) !== 'array') return that;\r\n \r\n lay.each(options.holidays, function(idx, item) {\r\n lay.each(item, function(i, dayStr) {\r\n if(dayStr === td.attr('lay-ymd')){\r\n td.find('div').html('' + YMD[2] + '');\r\n }\r\n });\r\n });\r\n\r\n return that;\r\n };\r\n \r\n // 无效日期范围的标记\r\n Class.prototype.limit = function(opts){\r\n opts = opts || {};\r\n\r\n var that = this;\r\n var options = that.config;\r\n var timestamp = {}\r\n var dateTime = opts.index > (opts.time ? 0 : 41) ? that.endDate : options.dateTime;\r\n var isOut;\r\n\r\n lay.each({\r\n now: lay.extend({}, dateTime, opts.date || {})\r\n ,min: options.min\r\n ,max: options.max\r\n }, function(key, item){\r\n timestamp[key] = that.newDate(lay.extend({\r\n year: item.year\r\n ,month: opts.type === 'year' ? 0 : item.month // 年份的时候只比较年\r\n ,date: (opts.type === 'year' || opts.type === 'month') ? 1 : item.date // 年月只比较年月不与最大最小比日期\r\n }, function(){\r\n var hms = {};\r\n lay.each(opts.time, function(i, keys){\r\n hms[keys] = item[keys];\r\n });\r\n return hms;\r\n }())).getTime(); //time:是否比较时分秒\r\n });\r\n \r\n isOut = timestamp.now < timestamp.min || timestamp.now > timestamp.max;\r\n opts.elem && opts.elem[isOut ? 'addClass' : 'removeClass'](DISABLED);\r\n\r\n return isOut;\r\n };\r\n \r\n //当前日期对象\r\n Class.prototype.thisDateTime = function(index){\r\n var that = this\r\n ,options = that.config;\r\n return index ? that.endDate: options.dateTime;\r\n };\r\n \r\n //日历表\r\n Class.prototype.calendar = function(value, index, type){\r\n index = index ? 1 : 0;\r\n var that = this\r\n ,options = that.config\r\n ,dateTime = value || that.thisDateTime(index)\r\n ,thisDate = new Date(), startWeek, prevMaxDate, thisMaxDate\r\n ,lang = that.lang()\r\n \r\n ,isAlone = options.type !== 'date' && options.type !== 'datetime'\r\n ,tds = lay(that.table[index]).find('td')\r\n ,elemYM = lay(that.elemHeader[index][2]).find('span');\r\n \r\n if(dateTime.year < LIMIT_YEAR[0]) dateTime.year = LIMIT_YEAR[0], that.hint(lang.invalidDate);\r\n if(dateTime.year > LIMIT_YEAR[1]) dateTime.year = LIMIT_YEAR[1], that.hint(lang.invalidDate);\r\n \r\n //记录初始值\r\n if(!that.firstDate){\r\n that.firstDate = lay.extend({}, dateTime);\r\n }\r\n \r\n //计算当前月第一天的星期\r\n thisDate.setFullYear(dateTime.year, dateTime.month, 1);\r\n startWeek = (thisDate.getDay() + (7 - options.weekStart)) % 7;\r\n\r\n prevMaxDate = laydate.getEndDate(dateTime.month || 12, dateTime.year); //计算上个月的最后一天\r\n thisMaxDate = laydate.getEndDate(dateTime.month + 1, dateTime.year); //计算当前月的最后一天\r\n \r\n //赋值日\r\n lay.each(tds, function(index_, item){\r\n var YMD = [dateTime.year, dateTime.month], st;\r\n item = lay(item);\r\n item.removeAttr(\"class\");\r\n if(index_ < startWeek){\r\n st = prevMaxDate - startWeek + index_;\r\n item.addClass('laydate-day-prev');\r\n YMD = that.getAsYM(dateTime.year, dateTime.month, 'sub');\r\n } else if(index_ >= startWeek && index_ < thisMaxDate + startWeek){\r\n st = index_ - startWeek;\r\n if (!that.rangeLinked) {\r\n st + 1 === dateTime.date && item.addClass(THIS);\r\n }\r\n } else {\r\n st = index_ - thisMaxDate - startWeek;\r\n item.addClass('laydate-day-next');\r\n YMD = that.getAsYM(dateTime.year, dateTime.month);\r\n }\r\n YMD[1]++;\r\n YMD[2] = st + 1;\r\n item.attr('lay-ymd', YMD.join('-')).html('
                    ' + YMD[2] + '
                    ');\r\n that.mark(item, YMD).holidays(item, YMD).limit({\r\n elem: item,\r\n date: {\r\n year: YMD[0],\r\n month: YMD[1] - 1,\r\n date: YMD[2]\r\n },\r\n index: index_\r\n });\r\n }); \r\n \r\n //同步头部年月\r\n lay(elemYM[0]).attr('lay-ym', dateTime.year + '-' + (dateTime.month + 1));\r\n lay(elemYM[1]).attr('lay-ym', dateTime.year + '-' + (dateTime.month + 1));\r\n \r\n if(options.lang === 'cn'){\r\n lay(elemYM[0]).attr('lay-type', 'year').html(dateTime.year + ' 年')\r\n lay(elemYM[1]).attr('lay-type', 'month').html((dateTime.month + 1) + ' 月');\r\n } else {\r\n lay(elemYM[0]).attr('lay-type', 'month').html(lang.month[dateTime.month]);\r\n lay(elemYM[1]).attr('lay-type', 'year').html(dateTime.year);\r\n }\r\n\r\n //初始默认选择器\r\n if(isAlone){ //年、月等独立选择器\r\n if(options.range){\r\n if(value || type !== 'init'){ // 判断是否需要显示年月时间列表\r\n that.listYM = [\r\n [(that.startDate || options.dateTime).year, (that.startDate || options.dateTime).month + 1]\r\n ,[that.endDate.year, that.endDate.month + 1]\r\n ]; \r\n that.list(options.type, 0).list(options.type, 1);\r\n \r\n //同步按钮可点状态\r\n options.type === 'time' ? that.setBtnStatus('时间'\r\n ,lay.extend({}, that.systemDate(), that.startTime)\r\n ,lay.extend({}, that.systemDate(), that.endTime)\r\n ) : that.setBtnStatus(true);\r\n } \r\n } else {\r\n that.listYM = [[dateTime.year, dateTime.month + 1]];\r\n that.list(options.type, 0);\r\n }\r\n }\r\n \r\n //初始赋值双日历\r\n if(options.range && type === 'init'){\r\n //执行渲染第二个日历\r\n if (that.rangeLinked) {\r\n var EYM = that.getAsYM(dateTime.year, dateTime.month, index ? 'sub' : null)\r\n that.calendar(lay.extend({}, dateTime, {\r\n year: EYM[0]\r\n ,month: EYM[1]\r\n }), 1 - index); // 渲染另外一个\r\n } else {\r\n that.calendar(null, 1 - index);\r\n }\r\n }\r\n \r\n // 通过检测当前有效日期,来设定底部按钮状态\r\n if(!options.range){\r\n var timeParams = ['hours', 'minutes', 'seconds'];\r\n\r\n // 现在按钮\r\n that.limit({\r\n elem: lay(that.footer).find(ELEM_NOW),\r\n date: that.systemDate(/^(datetime|time)$/.test(options.type) ? new Date() : null),\r\n index: 0,\r\n time: timeParams\r\n });\r\n // 确认按钮\r\n that.limit({\r\n elem: lay(that.footer).find(ELEM_CONFIRM),\r\n index: 0,\r\n time: timeParams\r\n });\r\n }\r\n \r\n //同步按钮可点状态\r\n that.setBtnStatus();\r\n\r\n // 重置快捷栏选中状态\r\n lay(that.shortcut).find('li.' + THIS).removeClass(THIS);\r\n\r\n //标记选择范围\r\n if(options.range && !isAlone && type !== 'init') that.stampRange();\r\n\r\n return that;\r\n };\r\n\r\n //生成年月时分秒列表\r\n Class.prototype.list = function(type, index){\r\n var that = this\r\n ,options = that.config\r\n ,dateTime = that.rangeLinked ? options.dateTime : [options.dateTime, that.endDate][index]\r\n ,lang = that.lang()\r\n ,isAlone = options.range && options.type !== 'date' && options.type !== 'datetime' //独立范围选择器\r\n \r\n ,ul = lay.elem('ul', {\r\n \"class\": ELEM_LIST + ' ' + ({\r\n year: 'laydate-year-list'\r\n ,month: 'laydate-month-list'\r\n ,time: 'laydate-time-list'\r\n })[type]\r\n })\r\n ,elemHeader = that.elemHeader[index]\r\n ,elemYM = lay(elemHeader[2]).find('span')\r\n ,elemCont = that.elemCont[index || 0]\r\n ,haveList = lay(elemCont).find('.'+ ELEM_LIST)[0]\r\n ,isCN = options.lang === 'cn'\r\n ,text = isCN ? '年' : ''\r\n \r\n ,listYM = that.listYM[index] || {}\r\n ,hms = ['hours', 'minutes', 'seconds']\r\n ,startEnd = ['startTime', 'endTime'][index];\r\n\r\n if(listYM[0] < 1) listYM[0] = 1;\r\n \r\n //生成年列表\r\n if(type === 'year'){\r\n var yearNum, startY = yearNum = listYM[0] - 7;\r\n if(startY < 1) startY = yearNum = 1;\r\n lay.each(new Array(15), function(i){\r\n var li = lay.elem('li', {\r\n 'lay-ym': yearNum\r\n })\r\n ,ymd = {\r\n year: yearNum\r\n ,month: 0\r\n ,date: 1\r\n };\r\n\r\n yearNum == listYM[0] && lay(li).addClass(THIS);\r\n li.innerHTML = yearNum + text;\r\n ul.appendChild(li);\r\n\r\n /*\r\n if(yearNum < that.firstDate.year){\r\n ymd.month = options.min.month;\r\n ymd.date = options.min.date;\r\n } else if(yearNum >= that.firstDate.year){\r\n ymd.month = options.max.month;\r\n ymd.date = options.max.date;\r\n }\r\n */\r\n\r\n that.limit({\r\n elem: lay(li),\r\n date: ymd,\r\n index: index,\r\n type: type\r\n });\r\n yearNum++;\r\n });\r\n\r\n lay(elemYM[isCN ? 0 : 1]).attr('lay-ym', (yearNum - 8) + '-' + listYM[1])\r\n .html((startY + text) + ' - ' + (yearNum - 1 + text));\r\n }\r\n \r\n //生成月列表\r\n else if(type === 'month'){\r\n lay.each(new Array(12), function(i){\r\n var li = lay.elem('li', {\r\n 'lay-ym': i\r\n })\r\n ,ymd = {\r\n year: listYM[0]\r\n ,month: i\r\n ,date: 1\r\n };\r\n\r\n i + 1 == listYM[1] && lay(li).addClass(THIS);\r\n li.innerHTML = lang.month[i] + (isCN ? '月' : '');\r\n ul.appendChild(li);\r\n\r\n /*\r\n if(listYM[0] < that.firstDate.year){\r\n ymd.date = options.min.date;\r\n } else if(listYM[0] >= that.firstDate.year){\r\n ymd.date = options.max.date;\r\n }\r\n */\r\n\r\n that.limit({\r\n elem: lay(li),\r\n date: ymd,\r\n index: index,\r\n type: type\r\n });\r\n });\r\n\r\n lay(elemYM[isCN ? 0 : 1]).attr('lay-ym', listYM[0] + '-' + listYM[1])\r\n .html(listYM[0] + text);\r\n } \r\n \r\n //生成时间列表\r\n else if(type === 'time'){\r\n //检测时分秒状态是否在有效日期时间范围内\r\n var setTimeStatus = function(){\r\n lay(ul).find('ol').each(function(i, ol){\r\n lay(ol).find('li').each(function(ii, li){\r\n that.limit({\r\n elem: lay(li),\r\n date: [{\r\n hours: ii\r\n }, {\r\n hours: that[startEnd].hours\r\n ,minutes: ii\r\n }, {\r\n hours: that[startEnd].hours\r\n ,minutes: that[startEnd].minutes\r\n ,seconds: ii\r\n }][i],\r\n index: index,\r\n time: [\r\n ['hours'], \r\n ['hours', 'minutes'], \r\n ['hours', 'minutes', 'seconds']\r\n ][i]\r\n });\r\n });\r\n });\r\n if(!options.range){\r\n that.limit({\r\n elem: lay(that.footer).find(ELEM_CONFIRM),\r\n date: that[startEnd],\r\n inedx: 0,\r\n time: ['hours', 'minutes', 'seconds']\r\n });\r\n }\r\n };\r\n \r\n //初始化时间对象\r\n if(options.range){\r\n if(!that[startEnd]){\r\n that[startEnd] = startEnd === 'startTime' ? dateTime : that.endDate;\r\n }\r\n } else {\r\n that[startEnd] = dateTime;\r\n }\r\n \r\n //生成时分秒\r\n lay.each([24, 60, 60], function(i, item){\r\n var li = lay.elem('li'), childUL = ['

                    '+ lang.time[i] +'

                      '];\r\n lay.each(new Array(item), function(ii){\r\n childUL.push(''+ lay.digit(ii, 2) +'');\r\n });\r\n li.innerHTML = childUL.join('') + '
                    ';\r\n ul.appendChild(li);\r\n });\r\n setTimeStatus();\r\n }\r\n \r\n //插入容器\r\n if(haveList) elemCont.removeChild(haveList);\r\n elemCont.appendChild(ul);\r\n \r\n //年月面板 - 选择事件\r\n if(type === 'year' || type === 'month'){ \r\n //显示切换箭头\r\n lay(that.elemMain[index]).addClass('laydate-ym-show');\r\n \r\n //选中\r\n lay(ul).find('li').on('click', function(){\r\n var ym = lay(this).attr('lay-ym') | 0;\r\n if(lay(this).hasClass(DISABLED)) return;\r\n if (that.rangeLinked) {\r\n lay.extend(dateTime, {\r\n year: type === 'year' ? ym : listYM[0]\r\n ,month: type === 'year' ? listYM[1] - 1 : ym\r\n });\r\n } else {\r\n dateTime[type] = ym;\r\n }\r\n \r\n //当为年选择器或者年月选择器\r\n var isYearOrMonth = options.type === 'year' || options.type === 'month';\r\n if(isYearOrMonth){\r\n lay(ul).find('.'+ THIS).removeClass(THIS);\r\n lay(this).addClass(THIS);\r\n \r\n //如果为年月选择器,点击了年列表,则切换到月选择器\r\n if(options.type === 'month' && type === 'year'){\r\n that.listYM[index][0] = ym;\r\n isAlone && ((index ? that.endDate : dateTime).year = ym);\r\n that.list('month', index);\r\n }\r\n } else {\r\n that.checkDate('limit').calendar(dateTime, index, 'init'); // 重新渲染一下两个面板\r\n that.closeList();\r\n }\r\n\r\n that.setBtnStatus(); //同步按钮可点状态\r\n \r\n //若为月选择器,只有当选择月份时才自动关闭;\r\n //若为年选择器,选择年份即自动关闭\r\n //且在范围未开启时\r\n if(!options.range && options.autoConfirm){\r\n if((options.type === 'month' && type === 'month') || (options.type === 'year' && type === 'year')){\r\n that.setValue(that.parse()).done().remove();\r\n }\r\n }\r\n\r\n (that.autoCalendarModel.auto && !that.rangeLinked) ? that.choose(lay(elemCont).find('td.layui-this'), index) : (that.endState && that.done(null, 'change'));\r\n lay(that.footer).find('.'+ ELEM_TIME_BTN).removeClass(DISABLED);\r\n });\r\n } else { //时间选择面板 - 选择事件\r\n var span = lay.elem('span', {\r\n \"class\": ELEM_TIME_TEXT\r\n })\r\n \r\n //滚动条定位\r\n ,scroll = function(){\r\n lay(ul).find('ol').each(function(i){\r\n var ol = this\r\n ,li = lay(ol).find('li')\r\n ol.scrollTop = 30*(that[startEnd][hms[i]] - 2);\r\n if(ol.scrollTop <= 0){\r\n li.each(function(ii, item){\r\n if(!lay(this).hasClass(DISABLED)){\r\n ol.scrollTop = 30*(ii - 2);\r\n return true;\r\n }\r\n });\r\n }\r\n });\r\n }\r\n ,haveSpan = lay(elemHeader[2]).find('.'+ ELEM_TIME_TEXT);\r\n \r\n scroll();\r\n span.innerHTML = options.range ? [lang.startTime,lang.endTime][index] : lang.timeTips;\r\n lay(that.elemMain[index]).addClass('laydate-time-show');\r\n \r\n if(haveSpan[0]) haveSpan.remove();\r\n elemHeader[2].appendChild(span);\r\n\r\n lay(ul).find('ol').each(function(i){\r\n var ol = this;\r\n //选择时分秒\r\n lay(ol).find('li').on('click', function(){\r\n var value = this.innerHTML | 0;\r\n if(lay(this).hasClass(DISABLED)) return;\r\n \r\n if(options.range){\r\n that[startEnd][hms[i]] = value;\r\n } else {\r\n dateTime[hms[i]] = value;\r\n }\r\n lay(ol).find('.'+ THIS).removeClass(THIS);\r\n lay(this).addClass(THIS);\r\n\r\n setTimeStatus();\r\n scroll();\r\n (that.endDate || options.type === 'time' || (options.type === 'datetime' && options.fullPanel)) && that.done(null, 'change');\r\n \r\n //同步按钮可点状态\r\n that.setBtnStatus();\r\n });\r\n });\r\n }\r\n \r\n return that;\r\n };\r\n \r\n //记录列表切换后的年月\r\n Class.prototype.listYM = [];\r\n \r\n //关闭列表\r\n Class.prototype.closeList = function(){\r\n var that = this\r\n ,options = that.config;\r\n \r\n lay.each(that.elemCont, function(index, item){\r\n lay(this).find('.'+ ELEM_LIST).remove();\r\n lay(that.elemMain[index]).removeClass('laydate-ym-show laydate-time-show');\r\n });\r\n lay(that.elem).find('.'+ ELEM_TIME_TEXT).remove();\r\n };\r\n \r\n //检测结束日期是否超出开始日期\r\n Class.prototype.setBtnStatus = function(tips, start, end){\r\n var that = this\r\n ,options = that.config\r\n ,lang = that.lang()\r\n ,isOut, elemBtn = lay(that.footer).find(ELEM_CONFIRM);\r\n if(options.range && options.type !== 'time'){\r\n start = start || (that.rangeLinked ? that.startDate : options.dateTime);\r\n end = end || that.endDate;\r\n isOut = !that.endState || that.newDate(start).getTime() > that.newDate(end).getTime();\r\n\r\n //如果不在有效日期内,直接禁用按钮,否则比较开始和结束日期\r\n (that.limit({\r\n date: start\r\n }) || that.limit({\r\n date: end\r\n })) \r\n ? elemBtn.addClass(DISABLED)\r\n : elemBtn[isOut ? 'addClass' : 'removeClass'](DISABLED);\r\n \r\n //是否异常提示\r\n if(tips && isOut) that.hint(\r\n typeof tips === 'string' ? lang.timeout.replace(/日期/g, tips) : lang.timeout\r\n );\r\n }\r\n };\r\n \r\n // 转义为规定格式的日期字符\r\n Class.prototype.parse = function(state, date) {\r\n var that = this;\r\n var options = that.config;\r\n var startDate = (that.rangeLinked ? that.startDate : options.dateTime)\r\n var dateTime = date || (\r\n state == 'end' ? lay.extend({}, that.endDate, that.endTime) : (\r\n options.range\r\n ? lay.extend({}, startDate || options.dateTime, that.startTime)\r\n : options.dateTime\r\n )\r\n );\r\n var format = laydate.parse(dateTime, that.format, 1);\r\n\r\n // 返回日期范围字符\r\n if (options.range && state === undefined) {\r\n return format + ' '+ that.rangeStr +' ' + that.parse('end');\r\n }\r\n\r\n return format;\r\n };\r\n \r\n //创建指定日期时间对象\r\n Class.prototype.newDate = function(dateTime){\r\n dateTime = dateTime || {};\r\n return new Date(\r\n dateTime.year || 1\r\n ,dateTime.month || 0\r\n ,dateTime.date || 1\r\n ,dateTime.hours || 0\r\n ,dateTime.minutes || 0\r\n ,dateTime.seconds || 0\r\n );\r\n };\r\n\r\n // 获得指定日期时间对象的毫秒数\r\n Class.prototype.getDateTime = function(obj){\r\n return this.newDate(obj).getTime();\r\n }\r\n\r\n //赋值\r\n Class.prototype.setValue = function(value){\r\n var that = this\r\n ,options = that.config\r\n ,elem = options.elem[0];\r\n \r\n //静态展现则不作默认赋值\r\n if(options.position === 'static') return that;\r\n \r\n value = value || '';\r\n \r\n //绑定的元素是否为 input\r\n if(that.isInput(elem)){\r\n lay(elem).val(value);\r\n } else {\r\n //如果 range 传入了开始和结束的 input 对象,则分别对其赋值\r\n var rangeElem = that.rangeElem;\r\n if(rangeElem){\r\n if(layui.type(value) !== 'array'){\r\n value = value.split(' '+ that.rangeStr +' ');\r\n }\r\n rangeElem[0].val(value[0] || '');\r\n rangeElem[1].val(value[1] || '');\r\n } else {\r\n if(lay(elem).find('*').length === 0){\r\n lay(elem).html(value);\r\n }\r\n lay(elem).attr('lay-date', value);\r\n }\r\n }\r\n \r\n return that;\r\n };\r\n \r\n //预览\r\n Class.prototype.preview = function(){\r\n var that = this\r\n ,options = that.config;\r\n \r\n if(!options.isPreview) return;\r\n \r\n var elemPreview = lay(that.elem).find('.'+ ELEM_PREVIEW)\r\n ,value = options.range ? ((that.rangeLinked ? that.endState : that.endDate) ? that.parse() : '') : that.parse();\r\n \r\n // 显示预览\r\n elemPreview.html(value);\r\n \r\n // 预览颜色渐变\r\n var oldValue = elemPreview.html();\r\n oldValue && (elemPreview.css({\r\n 'color': '#16b777'\r\n }),\r\n setTimeout(function(){\r\n elemPreview.css({\r\n 'color': '#777'\r\n });\r\n }, 300));\r\n };\r\n\r\n // 附加的渲染处理,在 ready 和 change 的时候调用\r\n Class.prototype.renderAdditional = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 处理全面板\r\n if (options.fullPanel) {\r\n that.list('time', 0);\r\n }\r\n };\r\n\r\n // 标记范围内的日期\r\n Class.prototype.stampRange = function(){\r\n var that = this\r\n ,options = that.config\r\n ,startTime = that.rangeLinked ? that.startDate : options.dateTime, endTime\r\n ,tds = lay(that.elem).find('td');\r\n\r\n if(options.range && !that.endState) lay(that.footer).find(ELEM_CONFIRM).addClass(DISABLED);\r\n // if(!that.endState) return;\r\n\r\n startTime = startTime && that.newDate({\r\n year: startTime.year\r\n ,month: startTime.month\r\n ,date: startTime.date\r\n }).getTime();\r\n\r\n endTime = that.endState && that.endDate && that.newDate({\r\n year: that.endDate.year\r\n ,month: that.endDate.month\r\n ,date: that.endDate.date\r\n }).getTime();\r\n\r\n // if(startTime > endTime) return that.hint(TIPS_OUT);\r\n\r\n lay.each(tds, function(i, item){\r\n var ymd = lay(item).attr('lay-ymd').split('-');\r\n var thisTime = that.newDate({\r\n year: ymd[0]\r\n ,month: ymd[1] - 1\r\n ,date: ymd[2]\r\n }).getTime();\r\n\r\n // 标记当天\r\n if(options.rangeLinked && !that.startDate){\r\n if(thisTime === that.newDate(that.systemDate()).getTime()){\r\n lay(item).addClass(\r\n lay(item).hasClass(ELEM_PREV) || lay(item).hasClass(ELEM_NEXT)\r\n ? ''\r\n : ELEM_DAY_NOW\r\n );\r\n }\r\n }\r\n \r\n /*\r\n * 标注区间\r\n */\r\n\r\n lay(item).removeClass(ELEM_SELECTED + ' ' + THIS);\r\n\r\n if(thisTime === startTime || thisTime === endTime){\r\n (that.rangeLinked || (!that.rangeLinked && (i < 42 ? thisTime === startTime : thisTime === endTime))) &&\r\n lay(item).addClass(\r\n lay(item).hasClass(ELEM_PREV) || lay(item).hasClass(ELEM_NEXT)\r\n ? ELEM_SELECTED\r\n : THIS\r\n );\r\n }\r\n if(thisTime > startTime && thisTime < endTime){\r\n lay(item).addClass(ELEM_SELECTED);\r\n }\r\n });\r\n };\r\n\r\n // 执行 done/change 回调\r\n Class.prototype.done = function(param, type){\r\n var that = this;\r\n var options = that.config;\r\n var start = lay.extend({},\r\n lay.extend(that.rangeLinked ? that.startDate : options.dateTime, that.startTime)\r\n );\r\n var end = lay.extend({}, lay.extend(that.endDate, that.endTime));\r\n \r\n lay.each([start, end], function(i, item){\r\n if(!('month' in item)) return;\r\n lay.extend(item, {\r\n month: item.month + 1\r\n });\r\n });\r\n \r\n that.preview();\r\n \r\n param = param || [that.parse(), start, end];\r\n type === 'change' && that.renderAdditional();\r\n typeof options[type || 'done'] === 'function' && options[type || 'done'].apply(options, param);\r\n \r\n return that;\r\n };\r\n \r\n //选择日期\r\n Class.prototype.choose = function(td, index){\r\n if(td.hasClass(DISABLED)) return;\r\n\r\n var that = this\r\n ,options = that.config\r\n ,panelIndex = index; // 记录点击的是哪一个面板的\r\n\r\n if (that.rangeLinked) {\r\n if (that.endState || !that.startDate) {\r\n // 重新选择或者第一次选择\r\n index = 0;\r\n that.endState = false;\r\n that.endDate = {};\r\n } else {\r\n index = 1;\r\n that.endState = true;\r\n }\r\n }\r\n\r\n var dateTime = that.thisDateTime(index)\r\n\r\n ,tds = lay(that.elem).find('td')\r\n ,YMD = td.attr('lay-ymd').split('-');\r\n \r\n YMD = {\r\n year: YMD[0] | 0\r\n ,month: (YMD[1] | 0) - 1\r\n ,date: YMD[2] | 0\r\n };\r\n\r\n lay.extend(dateTime, YMD); //同步 dateTime\r\n\r\n //范围选择\r\n if(options.range){\r\n //补充时分秒\r\n lay.each(['startTime', 'endTime'], function(i, item){\r\n that[item] = that[item] || {\r\n hours: i ? 23: 0\r\n ,minutes: i ? 59: 0\r\n ,seconds: i ? 59: 0\r\n };\r\n if (index === i) {\r\n // 判断选择之后的是否在范围内,超出则需要调整时分秒\r\n if (that.getDateTime(lay.extend({}, dateTime, that[item])) < that.getDateTime(options.min)) {\r\n that[item] = {\r\n hours: options.min.hours\r\n ,minutes: options.min.minutes\r\n ,seconds: options.min.seconds\r\n };\r\n lay.extend(dateTime, that[item]);\r\n } else if (that.getDateTime(lay.extend({}, dateTime, that[item])) > that.getDateTime(options.max)) {\r\n that[item] = {\r\n hours: options.max.hours\r\n ,minutes: options.max.minutes\r\n ,seconds: options.max.seconds\r\n };\r\n lay.extend(dateTime, that[item]);\r\n }\r\n }\r\n });\r\n if (!index) {\r\n that.startDate = lay.extend({}, dateTime); // 同步startDate\r\n }\r\n // 校验另外一个日期是否在有效的范围内\r\n if (that.endState && !that.limit({date: that.thisDateTime(1 - index)})) {\r\n // 根据选择之后判断是否需要切换模式\r\n var isChange;\r\n if (that.endState && that.autoCalendarModel.auto) {\r\n isChange = that.autoCalendarModel();\r\n }\r\n if ((isChange || that.rangeLinked && that.endState) && that.newDate(that.startDate) > that.newDate(that.endDate)) {\r\n var isSameDate = that.startDate.year === that.endDate.year && that.startDate.month === that.endDate.month && that.startDate.date === that.endDate.date;\r\n // 判断是否反选\r\n var startDate = that.startDate;\r\n that.startDate = lay.extend({}, that.endDate, isSameDate ? {} : that.startTime);\r\n options.dateTime = lay.extend({}, that.startDate);\r\n that.endDate = lay.extend({}, startDate, isSameDate ? {} : that.endTime);\r\n isSameDate && ( // 如果是同一天并且出现了反选证明是时分秒出现开始时间大于结束时间的现象\r\n startDate = that.startTime,\r\n that.startTime = that.endTime,\r\n that.endTime = startDate\r\n )\r\n }\r\n isChange && (options.dateTime = lay.extend({}, that.startDate));\r\n }\r\n if (that.rangeLinked) {\r\n var dateTimeTemp = lay.extend({}, dateTime);\r\n if (panelIndex && !index && !isChange) { // 处理可能出现的联动面板中点击右面板但是判定为开始日期这个时候点击头部的切换上下月第一次没有反应的问题\r\n // 选择了右面板但是判断之后作为开始时间\r\n var YM = that.getAsYM(dateTime.year, dateTime.month, 'sub');\r\n lay.extend(options.dateTime, {\r\n year: YM[0]\r\n ,month: YM[1]\r\n });\r\n }\r\n that.calendar(dateTimeTemp, panelIndex, isChange ? 'init' : null);\r\n } else {\r\n that.calendar(null, index, isChange ? 'init' : null);\r\n }\r\n that.endState && that.done(null, 'change');\r\n } else if(options.position === 'static'){ //直接嵌套的选中\r\n that.calendar().done().done(null, 'change'); //同时执行 done 和 change 回调\r\n } else if(options.type === 'date'){\r\n options.autoConfirm ? that.setValue(that.parse()).done().remove() : that.calendar().done(null, 'change');\r\n } else if(options.type === 'datetime'){\r\n that.calendar().done(null, 'change');\r\n }\r\n };\r\n \r\n //底部按钮\r\n Class.prototype.tool = function(btn, type){\r\n var that = this\r\n ,options = that.config\r\n ,lang = that.lang()\r\n ,dateTime = options.dateTime\r\n ,isStatic = options.position === 'static'\r\n ,active = {\r\n //选择时间\r\n datetime: function(){\r\n if(lay(btn).hasClass(DISABLED)) return;\r\n that.list('time', 0);\r\n options.range && that.list('time', 1);\r\n lay(btn).attr('lay-type', 'date').html(that.lang().dateTips);\r\n }\r\n \r\n //选择日期\r\n ,date: function(){\r\n that.closeList();\r\n lay(btn).attr('lay-type', 'datetime').html(that.lang().timeTips);\r\n }\r\n \r\n //清空、重置\r\n ,clear: function(){\r\n isStatic && (\r\n lay.extend(dateTime, that.firstDate)\r\n ,that.calendar()\r\n )\r\n options.range && (\r\n delete options.dateTime\r\n ,delete that.endDate\r\n ,delete that.startTime\r\n ,delete that.endTime\r\n );\r\n that.setValue('');\r\n that.done(null, 'onClear').done(['', {}, {}]).remove();\r\n }\r\n \r\n // 现在\r\n ,now: function(){\r\n var thisDate = new Date();\r\n\r\n // 当前系统时间未在 min/max 范围内,则不可点击\r\n if(lay(btn).hasClass(DISABLED)){\r\n return that.hint(lang.tools.now +', '+ lang.invalidDate);\r\n }\r\n\r\n lay.extend(dateTime, that.systemDate(), {\r\n hours: thisDate.getHours()\r\n ,minutes: thisDate.getMinutes()\r\n ,seconds: thisDate.getSeconds()\r\n });\r\n\r\n that.setValue(that.parse());\r\n isStatic && that.calendar();\r\n that.done(null, 'onNow').done().remove();\r\n }\r\n \r\n //确定\r\n ,confirm: function(){\r\n if(options.range){\r\n if(lay(btn).hasClass(DISABLED)) return that.hint(\r\n options.type === 'time' ? lang.timeout.replace(/日期/g, '时间') : lang.timeout\r\n );\r\n } else {\r\n if(lay(btn).hasClass(DISABLED)) return that.hint(lang.invalidDate);\r\n }\r\n \r\n that.setValue(that.parse());\r\n that.done(null, 'onConfirm').done().remove();\r\n }\r\n };\r\n active[type] && active[type]();\r\n };\r\n \r\n //统一切换处理\r\n Class.prototype.change = function(index){\r\n var that = this\r\n ,options = that.config\r\n ,dateTime = that.thisDateTime(index)\r\n ,isAlone = options.range && (options.type === 'year' || options.type === 'month')\r\n \r\n ,elemCont = that.elemCont[index || 0]\r\n ,listYM = that.listYM[index]\r\n ,addSubYear = function(type){\r\n var isYear = lay(elemCont).find('.laydate-year-list')[0]\r\n ,isMonth = lay(elemCont).find('.laydate-month-list')[0];\r\n \r\n //切换年列表\r\n if(isYear){\r\n listYM[0] = type ? listYM[0] - 15 : listYM[0] + 15;\r\n that.list('year', index);\r\n }\r\n \r\n if(isMonth){ //切换月面板中的年\r\n type ? listYM[0]-- : listYM[0]++;\r\n that.list('month', index);\r\n }\r\n \r\n if(isYear || isMonth){\r\n lay.extend(dateTime, {\r\n year: listYM[0]\r\n });\r\n if(isAlone) dateTime.year = listYM[0];\r\n options.range || that.done(null, 'change'); \r\n options.range || that.limit({\r\n elem: lay(that.footer).find(ELEM_CONFIRM),\r\n date: {\r\n year: listYM[0]\r\n }\r\n });\r\n }\r\n \r\n that.setBtnStatus();\r\n return isYear || isMonth;\r\n };\r\n \r\n return {\r\n prevYear: function(){\r\n if(addSubYear('sub')) return;\r\n if (that.rangeLinked) {\r\n options.dateTime.year--;\r\n that.checkDate('limit').calendar(null, null, 'init');\r\n } else {\r\n dateTime.year--;\r\n that.checkDate('limit').calendar(null, index);\r\n // 面板自动切换的模式下重新判定是否发生模式转换等细节处理\r\n that.autoCalendarModel.auto ? that.choose(lay(elemCont).find('td.layui-this'), index) : that.done(null, 'change');\r\n }\r\n }\r\n ,prevMonth: function(){\r\n if (that.rangeLinked) {\r\n dateTime = options.dateTime;\r\n }\r\n var YM = that.getAsYM(dateTime.year, dateTime.month, 'sub');\r\n lay.extend(dateTime, {\r\n year: YM[0]\r\n ,month: YM[1]\r\n });\r\n\r\n that.checkDate('limit').calendar(null, null, 'init');\r\n if (!that.rangeLinked) {\r\n that.autoCalendarModel.auto ? that.choose(lay(elemCont).find('td.layui-this'), index) : that.done(null, 'change');\r\n }\r\n }\r\n ,nextMonth: function(){\r\n if (that.rangeLinked) {\r\n dateTime = options.dateTime;\r\n }\r\n var YM = that.getAsYM(dateTime.year, dateTime.month);\r\n lay.extend(dateTime, {\r\n year: YM[0]\r\n ,month: YM[1]\r\n });\r\n\r\n that.checkDate('limit').calendar(null, null, 'init');\r\n if (!that.rangeLinked) {\r\n that.autoCalendarModel.auto ? that.choose(lay(elemCont).find('td.layui-this'), index) : that.done(null, 'change');\r\n }\r\n }\r\n ,nextYear: function(){\r\n if(addSubYear()) return;\r\n if (that.rangeLinked) {\r\n options.dateTime.year++;\r\n that.checkDate('limit').calendar(null, 0, 'init');\r\n } else {\r\n dateTime.year++;\r\n that.checkDate('limit').calendar(null, index);\r\n that.autoCalendarModel.auto ? that.choose(lay(elemCont).find('td.layui-this'), index) : that.done(null, 'change');\r\n }\r\n }\r\n };\r\n };\r\n \r\n //日期切换事件\r\n Class.prototype.changeEvent = function(){\r\n var that = this\r\n ,options = that.config;\r\n\r\n //日期选择事件\r\n lay(that.elem).on('click', function(e){\r\n lay.stope(e);\r\n }).on('mousedown', function(e){\r\n lay.stope(e);\r\n });\r\n \r\n //年月切换\r\n lay.each(that.elemHeader, function(i, header){\r\n //上一年\r\n lay(header[0]).on('click', function(e){\r\n that.change(i).prevYear();\r\n });\r\n \r\n //上一月\r\n lay(header[1]).on('click', function(e){\r\n that.change(i).prevMonth();\r\n });\r\n \r\n //选择年月\r\n lay(header[2]).find('span').on('click', function(e){\r\n var othis = lay(this)\r\n ,layYM = othis.attr('lay-ym')\r\n ,layType = othis.attr('lay-type');\r\n \r\n if(!layYM) return;\r\n \r\n layYM = layYM.split('-');\r\n\r\n that.listYM[i] = [layYM[0] | 0, layYM[1] | 0];\r\n that.list(layType, i);\r\n lay(that.footer).find('.'+ ELEM_TIME_BTN).addClass(DISABLED);\r\n });\r\n\r\n //下一月\r\n lay(header[3]).on('click', function(e){\r\n that.change(i).nextMonth();\r\n });\r\n \r\n //下一年\r\n lay(header[4]).on('click', function(e){\r\n that.change(i).nextYear();\r\n });\r\n });\r\n \r\n //点击日期\r\n lay.each(that.table, function(i, table){\r\n var tds = lay(table).find('td');\r\n tds.on('click', function(){\r\n that.choose(lay(this), i);\r\n });\r\n });\r\n \r\n //点击底部按钮\r\n lay(that.footer).find('span').on('click', function(){\r\n var type = lay(this).attr('lay-type');\r\n that.tool(this, type);\r\n });\r\n };\r\n \r\n //是否输入框\r\n Class.prototype.isInput = function(elem){\r\n return /input|textarea/.test(elem.tagName.toLocaleLowerCase()) || /INPUT|TEXTAREA/.test(elem.tagName);\r\n };\r\n\r\n //绑定的元素事件处理\r\n Class.prototype.events = function(){\r\n var that = this\r\n var options = that.config\r\n\r\n if(!options.elem[0] || options.elem[0].eventHandler) return;\r\n\r\n var showEvent = function(){\r\n // 已经打开的面板避免重新渲染\r\n if(laydate.thisId === options.id) return;\r\n that.render();\r\n };\r\n\r\n //绑定呼出控件事件\r\n options.elem.on(options.trigger, showEvent);\r\n options.elem[0].eventHandler = true;\r\n options.eventElem.on(options.trigger, showEvent);\r\n\r\n // 元素解绑\r\n that.unbind = function () {\r\n that.remove();\r\n options.elem.off(options.trigger, showEvent);\r\n options.elem.removeAttr('lay-key');\r\n options.elem.removeAttr(MOD_ID);\r\n options.elem[0].eventHandler = false;\r\n options.eventElem.off(options.trigger, showEvent);\r\n options.eventElem.removeAttr('lay-key');\r\n delete thisModule.that[options.id];\r\n };\r\n };\r\n \r\n //记录所有实例\r\n thisModule.that = {}; //记录所有实例对象\r\n \r\n //获取当前实例对象\r\n thisModule.getThis = function(id){\r\n var that = thisModule.that[id];\r\n if(!that && isLayui) layui.hint().error(id ? (MOD_NAME +' instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return that;\r\n };\r\n \r\n // 初始执行\r\n ready.run = function(lay){\r\n // 绑定关闭控件事件\r\n lay(document).on('mousedown', function(e){\r\n if(!laydate.thisId) return;\r\n var that = thisModule.getThis(laydate.thisId);\r\n if(!that) return;\r\n \r\n var options = that.config;\r\n \r\n if(\r\n e.target === options.elem[0] || \r\n e.target === options.eventElem[0] ||\r\n e.target === lay(options.closeStop)[0] ||\r\n (options.elem[0] && options.elem[0].contains(e.target))\r\n ) return;\r\n \r\n that.remove();\r\n \r\n }).on('keydown', function(e){\r\n if(!laydate.thisId) return;\r\n var that = thisModule.getThis(laydate.thisId);\r\n if(!that) return;\r\n \r\n // 回车触发确认\r\n if(that.config.position === 'static') return;\r\n if(e.keyCode === 13){\r\n if(lay('#'+ that.elemID)[0] && that.elemID === Class.thisElemDate){\r\n e.preventDefault();\r\n lay(that.footer).find(ELEM_CONFIRM)[0].click();\r\n }\r\n }\r\n });\r\n \r\n //自适应定位\r\n lay(window).on('resize', function(){\r\n if(!laydate.thisId) return;\r\n var that = thisModule.getThis(laydate.thisId);\r\n if(!that) return;\r\n \r\n if(!that.elem || !lay(ELEM)[0]){\r\n return false;\r\n }\r\n \r\n that.position();\r\n });\r\n };\r\n \r\n // 渲染 - 核心接口\r\n laydate.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n\r\n // 重载\r\n laydate.reload = function (id, options) {\r\n var that = thisModule.getThis(id);\r\n if(!that) return;\r\n return that.reload(options);\r\n };\r\n\r\n // 获取对应 ID 的实例\r\n laydate.getInst = function (id) {\r\n var that = thisModule.getThis(id);\r\n if(that){\r\n return that.inst;\r\n }\r\n };\r\n\r\n // 面板提示\r\n laydate.hint = function(id, opts){\r\n var that = thisModule.getThis(id);\r\n if(!that) return;\r\n return that.hint(opts);\r\n };\r\n\r\n // 解绑实例\r\n laydate.unbind = function(id){\r\n var that = thisModule.getThis(id);\r\n if(!that) return;\r\n return that.unbind();\r\n };\r\n\r\n // 关闭日期面板\r\n laydate.close = function(id){\r\n var that = thisModule.getThis(id || laydate.thisId);\r\n if(!that) return;\r\n return that.remove();\r\n };\r\n\r\n // 将指定对象转化为日期值\r\n laydate.parse = function(dateTime, format, one){\r\n dateTime = dateTime || {};\r\n \r\n //如果 format 是字符型,则转换为数组格式\r\n if(typeof format === 'string'){\r\n format = thisModule.formatArr(format);\r\n }\r\n \r\n format = (format || []).concat();\r\n \r\n //转义为规定格式\r\n lay.each(format, function(i, item){\r\n if(/yyyy|y/.test(item)){ //年\r\n format[i] = lay.digit(dateTime.year, item.length);\r\n } else if(/MM|M/.test(item)){ //月\r\n format[i] = lay.digit(dateTime.month + (one || 0), item.length);\r\n } else if(/dd|d/.test(item)){ //日\r\n format[i] = lay.digit(dateTime.date, item.length);\r\n } else if(/HH|H/.test(item)){ //时\r\n format[i] = lay.digit(dateTime.hours, item.length);\r\n } else if(/mm|m/.test(item)){ //分\r\n format[i] = lay.digit(dateTime.minutes, item.length);\r\n } else if(/ss|s/.test(item)){ //秒\r\n format[i] = lay.digit(dateTime.seconds, item.length);\r\n }\r\n });\r\n \r\n return format.join('');\r\n };\r\n \r\n // 得到某月的最后一天\r\n laydate.getEndDate = function(month, year){\r\n var thisDate = new Date();\r\n //设置日期为下个月的第一天\r\n thisDate.setFullYear(\r\n year || thisDate.getFullYear()\r\n ,month || (thisDate.getMonth() + 1)\r\n ,1);\r\n //减去一天,得到当前月最后一天\r\n return new Date(thisDate.getTime() - 1000*60*60*24).getDate();\r\n };\r\n\r\n //加载方式\r\n isLayui ? (\r\n laydate.ready()\r\n ,layui.define('lay', function(exports){ //layui 加载\r\n laydate.path = layui.cache.dir;\r\n ready.run(lay);\r\n exports(MOD_NAME, laydate);\r\n })\r\n ) : (\r\n (typeof define === 'function' && define.amd) ? define(function(){ //requirejs 加载\r\n ready.run(lay);\r\n return laydate;\r\n }) : function(){ //普通 script 标签加载\r\n laydate.ready();\r\n ready.run(window.lay);\r\n window.laydate = laydate;\r\n }()\r\n );\r\n\r\n}(window, window.document);\r\n\r\n","/*!\n * jQuery JavaScript Library v1.12.4\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2016-05-20T17:17Z\n */\n\n(function( global, factory ) {\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n}(typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Support: Firefox 18+\n// Can't be in strict mode, several libs including ASP.NET trace\n// the stack via arguments.caller.callee and Firefox dies if\n// you try to trace through \"use strict\" call chains. (#13335)\n//\"use strict\";\nvar deletedIds = [];\n\nvar document = window.document;\n\nvar slice = deletedIds.slice;\n\nvar concat = deletedIds.concat;\n\nvar push = deletedIds.push;\n\nvar indexOf = deletedIds.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar support = {};\n\n\n\nvar\n\tversion = \"1.12.4\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Support: Android<4.1, IE<9\n\t// Make sure we trim BOM and NBSP\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\n\n\t// Matches dashed string for camelizing\n\trmsPrefix = /^-ms-/,\n\trdashAlpha = /-([\\da-z])/gi,\n\n\t// Used by jQuery.camelCase as callback to replace()\n\tfcamelCase = function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num != null ?\n\n\t\t\t// Return just the one element from the set\n\t\t\t( num < 0 ? this[ num + this.length ] : this[ num ] ) :\n\n\t\t\t// Return all the elements in a clean array\n\t\t\tslice.call( this );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\t\tret.context = this.context;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: deletedIds.sort,\n\tsplice: deletedIds.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar src, copyIsArray, copy, name, options, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = jQuery.isArray( copy ) ) ) ) {\n\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && jQuery.isArray( src ) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject( src ) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\t// See test/unit/core.js for details concerning isFunction.\n\t// Since version 1.3, DOM methods and functions like alert\n\t// aren't supported. They return false on IE (#2968).\n\tisFunction: function( obj ) {\n\t\treturn jQuery.type( obj ) === \"function\";\n\t},\n\n\tisArray: Array.isArray || function( obj ) {\n\t\treturn jQuery.type( obj ) === \"array\";\n\t},\n\n\tisWindow: function( obj ) {\n\t\t/* jshint eqeqeq: false */\n\t\treturn obj != null && obj == obj.window;\n\t},\n\n\tisNumeric: function( obj ) {\n\n\t\t// parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t// adding 1 corrects loss of precision from parseFloat (#15100)\n\t\tvar realStringObj = obj && obj.toString();\n\t\treturn !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\tvar key;\n\n\t\t// Must be an Object.\n\t\t// Because of IE, we also have to check the presence of the constructor property.\n\t\t// Make sure that DOM nodes and window objects don't pass through, as well\n\t\tif ( !obj || jQuery.type( obj ) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\n\t\t\t// Not own constructor property must be Object\n\t\t\tif ( obj.constructor &&\n\t\t\t\t!hasOwn.call( obj, \"constructor\" ) &&\n\t\t\t\t!hasOwn.call( obj.constructor.prototype, \"isPrototypeOf\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch ( e ) {\n\n\t\t\t// IE8,9 Will throw exceptions on certain host objects #9897\n\t\t\treturn false;\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Handle iteration over inherited properties before own properties.\n\t\tif ( !support.ownFirst ) {\n\t\t\tfor ( key in obj ) {\n\t\t\t\treturn hasOwn.call( obj, key );\n\t\t\t}\n\t\t}\n\n\t\t// Own properties are enumerated firstly, so to speed up,\n\t\t// if last one is own, then all properties are own.\n\t\tfor ( key in obj ) {}\n\n\t\treturn key === undefined || hasOwn.call( obj, key );\n\t},\n\n\ttype: function( obj ) {\n\t\tif ( obj == null ) {\n\t\t\treturn obj + \"\";\n\t\t}\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\t\ttypeof obj;\n\t},\n\n\t// Workarounds based on findings by Jim Driscoll\n\t// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context\n\tglobalEval: function( data ) {\n\t\tif ( data && jQuery.trim( data ) ) {\n\n\t\t\t// We use execScript on Internet Explorer\n\t\t\t// We use an anonymous function so that context is window\n\t\t\t// rather than jQuery in Firefox\n\t\t\t( window.execScript || function( data ) {\n\t\t\t\twindow[ \"eval\" ].call( window, data ); // jscs:ignore requireDotNotation\n\t\t\t} )( data );\n\t\t}\n\t},\n\n\t// Convert dashed to camelCase; used by the css and data modules\n\t// Microsoft forgot to hump their vendor prefix (#9572)\n\tcamelCase: function( string ) {\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Support: Android<4.1, IE<9\n\ttrim: function( text ) {\n\t\treturn text == null ?\n\t\t\t\"\" :\n\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\tvar len;\n\n\t\tif ( arr ) {\n\t\t\tif ( indexOf ) {\n\t\t\t\treturn indexOf.call( arr, elem, i );\n\t\t\t}\n\n\t\t\tlen = arr.length;\n\t\t\ti = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;\n\n\t\t\tfor ( ; i < len; i++ ) {\n\n\t\t\t\t// Skip accessing in sparse arrays\n\t\t\t\tif ( i in arr && arr[ i ] === elem ) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t},\n\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\twhile ( j < len ) {\n\t\t\tfirst[ i++ ] = second[ j++ ];\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)\n\t\tif ( len !== len ) {\n\t\t\twhile ( second[ j ] !== undefined ) {\n\t\t\t\tfirst[ i++ ] = second[ j++ ];\n\t\t\t}\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// Bind a function to a context, optionally partially applying any\n\t// arguments.\n\tproxy: function( fn, context ) {\n\t\tvar args, proxy, tmp;\n\n\t\tif ( typeof context === \"string\" ) {\n\t\t\ttmp = fn[ context ];\n\t\t\tcontext = fn;\n\t\t\tfn = tmp;\n\t\t}\n\n\t\t// Quick check to determine if target is callable, in the spec\n\t\t// this throws a TypeError, but we will just return undefined.\n\t\tif ( !jQuery.isFunction( fn ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Simulated bind\n\t\targs = slice.call( arguments, 2 );\n\t\tproxy = function() {\n\t\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t\t};\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\t\treturn proxy;\n\t},\n\n\tnow: function() {\n\t\treturn +( new Date() );\n\t},\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\n// JSHint would error on this code due to the Symbol not being defined in ES5.\n// Defining this global in .jshintrc would create a danger of using the global\n// unguarded in another place, it seems safer to just disable JSHint for these\n// three lines.\n/* jshint ignore: start */\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = deletedIds[ Symbol.iterator ];\n}\n/* jshint ignore: end */\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\nfunction( i, name ) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: iOS 8.2 (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = jQuery.type( obj );\n\n\tif ( type === \"function\" || jQuery.isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.2.1\n * http://sizzlejs.com/\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2015-10-17\n */\n(function( window ) {\n\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// General-purpose constants\n\tMAX_NEGATIVE = 1 << 31,\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf as it's faster than native\n\t// http://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\n\t\t\"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*?)\" + whitespace + \"*\\\\]\", \"g\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\trescape = /'|\\\\/g,\n\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t};\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, nidselect, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\n\t\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\t\tsetDocument( context );\n\t\t}\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( (m = match[1]) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( (elem = context.getElementById( m )) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && (elem = newContext.getElementById( m )) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[2] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!compilerCache[ selector + \" \" ] &&\n\t\t\t\t(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\n\t\t\t\tif ( nodeType !== 1 ) {\n\t\t\t\t\tnewContext = context;\n\t\t\t\t\tnewSelector = selector;\n\n\t\t\t\t// qSA looks outside Element context, which is not what we want\n\t\t\t\t// Thanks to Andrew Dupont for this workaround technique\n\t\t\t\t// Support: IE <=8\n\t\t\t\t// Exclude object elements\n\t\t\t\t} else if ( context.nodeName.toLowerCase() !== \"object\" ) {\n\n\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\tif ( (nid = context.getAttribute( \"id\" )) ) {\n\t\t\t\t\t\tnid = nid.replace( rescape, \"\\\\$&\" );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontext.setAttribute( \"id\", (nid = expando) );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\tnidselect = ridentifier.test( nid ) ? \"#\" + nid : \"[id='\" + nid + \"']\";\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[i] = nidselect + \" \" + toSelector( groups[i] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\t\t\t\t}\n\n\t\t\t\tif ( newSelector ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + \" \" ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\nfunction assert( fn ) {\n\tvar div = document.createElement(\"div\");\n\n\ttry {\n\t\treturn !!fn( div );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( div.parentNode ) {\n\t\t\tdiv.parentNode.removeChild( div );\n\t\t}\n\t\t// release memory in IE\n\t\tdiv = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\t( ~b.sourceIndex || MAX_NEGATIVE ) -\n\t\t\t( ~a.sourceIndex || MAX_NEGATIVE );\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, parent,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9-11, Edge\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\tif ( (parent = document.defaultView) && parent.top !== parent ) {\n\t\t// Support: IE 11\n\t\tif ( parent.addEventListener ) {\n\t\t\tparent.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( parent.attachEvent ) {\n\t\t\tparent.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert(function( div ) {\n\t\tdiv.className = \"i\";\n\t\treturn !div.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( div ) {\n\t\tdiv.appendChild( document.createComment(\"\") );\n\t\treturn !div.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( div ) {\n\t\tdocElem.appendChild( div ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t});\n\n\t// ID find and filter\n\tif ( support.getById ) {\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\t\t\t\treturn m ? [ m ] : [];\n\t\t\t}\n\t\t};\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t} else {\n\t\t// Support: IE6/7\n\t\t// getElementById is not reliable as a find shortcut\n\t\tdelete Expr.find[\"ID\"];\n\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See http://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( div ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// http://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( div ).innerHTML = \"\" +\n\t\t\t\t\"\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( div.querySelectorAll(\"[msallowcapture^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !div.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push(\"~=\");\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibing-combinator selector` fails\n\t\t\tif ( !div.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( div ) {\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tdiv.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( div.querySelectorAll(\"[name=d]\").length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tdiv.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( div ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( div, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\t\t\treturn a === document ? -1 :\n\t\t\t\tb === document ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\t// Make sure that attribute selectors are quoted\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!compilerCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch (e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( (node = elem[i++]) ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[6] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] ) {\n\t\t\t\tmatch[2] = match[4] || match[5] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[0] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": function( elem ) {\n\t\t\treturn elem.disabled === false;\n\t\t},\n\n\t\t\"disabled\": function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( (tokens = []) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tcheckNonElements = base && dir === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});\n\n\t\t\t\t\t\tif ( (oldCache = uniqueCache[ dir ]) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ dir ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", outermost ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context === document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: ) matching elements by id\n\t\t\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\tif ( !context && elem.ownerDocument !== document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[0] = match[0].slice( 0 );\n\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\tsupport.getById && context.nodeType === 9 && documentIsHTML &&\n\t\t\t\tExpr.relative[ tokens[1].type ] ) {\n\n\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[i];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( (seed = find(\n\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\n\t\t\t\t)) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( div1 ) {\n\t// Should return 1, but returns 4 (following)\n\treturn div1.compareDocumentPosition( document.createElement(\"div\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( div ) {\n\tdiv.innerHTML = \"\";\n\treturn div.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( div ) {\n\tdiv.innerHTML = \"\";\n\tdiv.firstChild.setAttribute( \"value\", \"\" );\n\treturn div.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( div ) {\n\treturn div.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\tnull;\n\t\t}\n\t});\n}\n\nreturn Sizzle;\n\n})( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/ );\n\n\n\nvar risSimple = /^.[^:#\\[\\.,]*$/;\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t/* jshint -W018 */\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( jQuery.inArray( elem, qualifier ) > -1 ) !== not;\n\t} );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\treturn elems.length === 1 && elem.nodeType === 1 ?\n\t\tjQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\n\t\tjQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\t\treturn elem.nodeType === 1;\n\t\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i,\n\t\t\tret = [],\n\t\t\tself = this,\n\t\t\tlen = self.length;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\n\t\tret.selector = this.selector ? this.selector + \" \" + selector : selector;\n\t\treturn ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// init accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector.charAt( 0 ) === \"<\" &&\n\t\t\t\tselector.charAt( selector.length - 1 ) === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id !== match[ 2 ] ) {\n\t\t\t\t\t\t\treturn rootjQuery.find( selector );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.context = document;\n\t\t\t\t\tthis.selector = selector;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis.context = this[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn typeof root.ready !== \"undefined\" ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\tif ( selector.selector !== undefined ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar i,\n\t\t\ttargets = jQuery( target, this ),\n\t\t\tlen = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\n\t\t\t\tjQuery( selectors, context || this.context ) :\n\t\t\t\t0;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t// Always skip document fragments\n\t\t\t\tif ( cur.nodeType < 11 && ( pos ?\n\t\t\t\t\tpos.index( cur ) > -1 :\n\n\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within\n\t// the matched set of elements\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn jQuery.inArray( this[ 0 ], jQuery( elem ) );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn jQuery.inArray(\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem, this );\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\tdo {\n\t\tcur = cur[ dir ];\n\t} while ( cur && cur.nodeType !== 1 );\n\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn jQuery.nodeName( elem, \"iframe\" ) ?\n\t\t\telem.contentDocument || elem.contentWindow.document :\n\t\t\tjQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar ret = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tret = jQuery.filter( selector, ret );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tret = jQuery.uniqueSort( ret );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tret = ret.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnotwhite = ( /\\S+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( jQuery.isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && jQuery.type( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = true;\n\t\t\t\tif ( !memory ) {\n\t\t\t\t\tself.disable();\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, listener list, final state\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ), \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ), \"rejected\" ],\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ) ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\t\t\t\t\tvar fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\n\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis === promise ? newDefer.promise() : this,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Keep pipe for back-compat\n\t\tpromise.pipe = promise.then;\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 3 ];\n\n\t\t\t// promise[ done | fail | progress ] = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add( function() {\n\n\t\t\t\t\t// state = [ resolved | rejected ]\n\t\t\t\t\tstate = stateString;\n\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\n\t\t\t}\n\n\t\t\t// deferred[ resolve | reject | notify ]\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? promise : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\n\t\tvar i = 0,\n\t\t\tresolveValues = slice.call( arguments ),\n\t\t\tlength = resolveValues.length,\n\n\t\t\t// the count of uncompleted subordinates\n\t\t\tremaining = length !== 1 ||\n\t\t\t\t( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\n\n\t\t\t// the master Deferred.\n\t\t\t// If resolveValues consist of only a single Deferred, just use that.\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\n\n\t\t\t// Update function for both resolve and progress values\n\t\t\tupdateFunc = function( i, contexts, values ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tcontexts[ i ] = this;\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( values === progressValues ) {\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\n\n\t\t\t\t\t} else if ( !( --remaining ) ) {\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\n\t\t\tprogressValues, progressContexts, resolveContexts;\n\n\t\t// add listeners to Deferred subordinates; treat others as resolved\n\t\tif ( length > 1 ) {\n\t\t\tprogressValues = new Array( length );\n\t\t\tprogressContexts = new Array( length );\n\t\t\tresolveContexts = new Array( length );\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\n\t\t\t\t\tresolveValues[ i ].promise()\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) )\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\n\t\t\t\t\t\t.fail( deferred.reject );\n\t\t\t\t} else {\n\t\t\t\t\t--remaining;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// if we're not waiting on anything, resolve the master\n\t\tif ( !remaining ) {\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\n\t\t}\n\n\t\treturn deferred.promise();\n\t}\n} );\n\n\n// The deferred used on DOM ready\nvar readyList;\n\njQuery.fn.ready = function( fn ) {\n\n\t// Add the callback\n\tjQuery.ready.promise().done( fn );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Hold (or release) the ready event\n\tholdReady: function( hold ) {\n\t\tif ( hold ) {\n\t\t\tjQuery.readyWait++;\n\t\t} else {\n\t\t\tjQuery.ready( true );\n\t\t}\n\t},\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\n\t\t// Trigger any bound ready events\n\t\tif ( jQuery.fn.triggerHandler ) {\n\t\t\tjQuery( document ).triggerHandler( \"ready\" );\n\t\t\tjQuery( document ).off( \"ready\" );\n\t\t}\n\t}\n} );\n\n/**\n * Clean-up method for dom ready events\n */\nfunction detach() {\n\tif ( document.addEventListener ) {\n\t\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\t\twindow.removeEventListener( \"load\", completed );\n\n\t} else {\n\t\tdocument.detachEvent( \"onreadystatechange\", completed );\n\t\twindow.detachEvent( \"onload\", completed );\n\t}\n}\n\n/**\n * The ready event handler and self cleanup method\n */\nfunction completed() {\n\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\n\tif ( document.addEventListener ||\n\t\twindow.event.type === \"load\" ||\n\t\tdocument.readyState === \"complete\" ) {\n\n\t\tdetach();\n\t\tjQuery.ready();\n\t}\n}\n\njQuery.ready.promise = function( obj ) {\n\tif ( !readyList ) {\n\n\t\treadyList = jQuery.Deferred();\n\n\t\t// Catch cases where $(document).ready() is called\n\t\t// after the browser event has already occurred.\n\t\t// Support: IE6-10\n\t\t// Older IE sometimes signals \"interactive\" too soon\n\t\tif ( document.readyState === \"complete\" ||\n\t\t\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\t\t\twindow.setTimeout( jQuery.ready );\n\n\t\t// Standards-based browsers support DOMContentLoaded\n\t\t} else if ( document.addEventListener ) {\n\n\t\t\t// Use the handy event callback\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.addEventListener( \"load\", completed );\n\n\t\t// If IE event model is used\n\t\t} else {\n\n\t\t\t// Ensure firing before onload, maybe late but safe also for iframes\n\t\t\tdocument.attachEvent( \"onreadystatechange\", completed );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.attachEvent( \"onload\", completed );\n\n\t\t\t// If IE and not a frame\n\t\t\t// continually check to see if the document is ready\n\t\t\tvar top = false;\n\n\t\t\ttry {\n\t\t\t\ttop = window.frameElement == null && document.documentElement;\n\t\t\t} catch ( e ) {}\n\n\t\t\tif ( top && top.doScroll ) {\n\t\t\t\t( function doScrollCheck() {\n\t\t\t\t\tif ( !jQuery.isReady ) {\n\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\t// Use the trick by Diego Perini\n\t\t\t\t\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\n\t\t\t\t\t\t\ttop.doScroll( \"left\" );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn window.setTimeout( doScrollCheck, 50 );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// detach all dom ready events\n\t\t\t\t\t\tdetach();\n\n\t\t\t\t\t\t// and execute any waiting functions\n\t\t\t\t\t\tjQuery.ready();\n\t\t\t\t\t}\n\t\t\t\t} )();\n\t\t\t}\n\t\t}\n\t}\n\treturn readyList.promise( obj );\n};\n\n// Kick off the DOM ready check even if the user does not\njQuery.ready.promise();\n\n\n\n\n// Support: IE<9\n// Iteration over object's inherited properties before its own\nvar i;\nfor ( i in jQuery( support ) ) {\n\tbreak;\n}\nsupport.ownFirst = i === \"0\";\n\n// Note: most support tests are defined in their respective modules.\n// false until the test is run\nsupport.inlineBlockNeedsLayout = false;\n\n// Execute ASAP in case we need to set body.style.zoom\njQuery( function() {\n\n\t// Minified: var a,b,c,d\n\tvar val, div, body, container;\n\n\tbody = document.getElementsByTagName( \"body\" )[ 0 ];\n\tif ( !body || !body.style ) {\n\n\t\t// Return for frameset docs that don't have a body\n\t\treturn;\n\t}\n\n\t// Setup\n\tdiv = document.createElement( \"div\" );\n\tcontainer = document.createElement( \"div\" );\n\tcontainer.style.cssText = \"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\";\n\tbody.appendChild( container ).appendChild( div );\n\n\tif ( typeof div.style.zoom !== \"undefined\" ) {\n\n\t\t// Support: IE<8\n\t\t// Check if natively block-level elements act like inline-block\n\t\t// elements when setting their display to 'inline' and giving\n\t\t// them layout\n\t\tdiv.style.cssText = \"display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1\";\n\n\t\tsupport.inlineBlockNeedsLayout = val = div.offsetWidth === 3;\n\t\tif ( val ) {\n\n\t\t\t// Prevent IE 6 from affecting layout for positioned elements #11048\n\t\t\t// Prevent IE from shrinking the body in IE 7 mode #12869\n\t\t\t// Support: IE<8\n\t\t\tbody.style.zoom = 1;\n\t\t}\n\t}\n\n\tbody.removeChild( container );\n} );\n\n\n( function() {\n\tvar div = document.createElement( \"div\" );\n\n\t// Support: IE<9\n\tsupport.deleteExpando = true;\n\ttry {\n\t\tdelete div.test;\n\t} catch ( e ) {\n\t\tsupport.deleteExpando = false;\n\t}\n\n\t// Null elements to avoid leaks in IE.\n\tdiv = null;\n} )();\nvar acceptData = function( elem ) {\n\tvar noData = jQuery.noData[ ( elem.nodeName + \" \" ).toLowerCase() ],\n\t\tnodeType = +elem.nodeType || 1;\n\n\t// Do not set data on non-element DOM nodes because it will not be cleared (#8335).\n\treturn nodeType !== 1 && nodeType !== 9 ?\n\t\tfalse :\n\n\t\t// Nodes accept data unless otherwise specified; rejection can be conditional\n\t\t!noData || noData !== true && elem.getAttribute( \"classid\" ) === noData;\n};\n\n\n\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /([A-Z])/g;\n\nfunction dataAttr( elem, key, data ) {\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\n\t\tvar name = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\n\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = data === \"true\" ? true :\n\t\t\t\t\tdata === \"false\" ? false :\n\t\t\t\t\tdata === \"null\" ? null :\n\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\n\t\t\t\t\t+data + \"\" === data ? +data :\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\n\t\t\t\t\tdata;\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tjQuery.data( elem, key, data );\n\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\n\treturn data;\n}\n\n// checks a cache object for emptiness\nfunction isEmptyDataObject( obj ) {\n\tvar name;\n\tfor ( name in obj ) {\n\n\t\t// if the public data object is empty, the private is still empty\n\t\tif ( name === \"data\" && jQuery.isEmptyObject( obj[ name ] ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( name !== \"toJSON\" ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\nfunction internalData( elem, name, data, pvt /* Internal Use Only */ ) {\n\tif ( !acceptData( elem ) ) {\n\t\treturn;\n\t}\n\n\tvar ret, thisCache,\n\t\tinternalKey = jQuery.expando,\n\n\t\t// We have to handle DOM nodes and JS objects differently because IE6-7\n\t\t// can't GC object references properly across the DOM-JS boundary\n\t\tisNode = elem.nodeType,\n\n\t\t// Only DOM nodes need the global jQuery cache; JS object data is\n\t\t// attached directly to the object so GC can occur automatically\n\t\tcache = isNode ? jQuery.cache : elem,\n\n\t\t// Only defining an ID for JS objects if its cache already exists allows\n\t\t// the code to shortcut on the same path as a DOM node with no cache\n\t\tid = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;\n\n\t// Avoid doing any more work than we need to when trying to get data on an\n\t// object that has no data at all\n\tif ( ( !id || !cache[ id ] || ( !pvt && !cache[ id ].data ) ) &&\n\t\tdata === undefined && typeof name === \"string\" ) {\n\t\treturn;\n\t}\n\n\tif ( !id ) {\n\n\t\t// Only DOM nodes need a new unique ID for each element since their data\n\t\t// ends up in the global cache\n\t\tif ( isNode ) {\n\t\t\tid = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;\n\t\t} else {\n\t\t\tid = internalKey;\n\t\t}\n\t}\n\n\tif ( !cache[ id ] ) {\n\n\t\t// Avoid exposing jQuery metadata on plain JS objects when the object\n\t\t// is serialized using JSON.stringify\n\t\tcache[ id ] = isNode ? {} : { toJSON: jQuery.noop };\n\t}\n\n\t// An object can be passed to jQuery.data instead of a key/value pair; this gets\n\t// shallow copied over onto the existing cache\n\tif ( typeof name === \"object\" || typeof name === \"function\" ) {\n\t\tif ( pvt ) {\n\t\t\tcache[ id ] = jQuery.extend( cache[ id ], name );\n\t\t} else {\n\t\t\tcache[ id ].data = jQuery.extend( cache[ id ].data, name );\n\t\t}\n\t}\n\n\tthisCache = cache[ id ];\n\n\t// jQuery data() is stored in a separate object inside the object's internal data\n\t// cache in order to avoid key collisions between internal data and user-defined\n\t// data.\n\tif ( !pvt ) {\n\t\tif ( !thisCache.data ) {\n\t\t\tthisCache.data = {};\n\t\t}\n\n\t\tthisCache = thisCache.data;\n\t}\n\n\tif ( data !== undefined ) {\n\t\tthisCache[ jQuery.camelCase( name ) ] = data;\n\t}\n\n\t// Check for both converted-to-camel and non-converted data property names\n\t// If a data property was specified\n\tif ( typeof name === \"string\" ) {\n\n\t\t// First Try to find as-is property data\n\t\tret = thisCache[ name ];\n\n\t\t// Test for null|undefined property data\n\t\tif ( ret == null ) {\n\n\t\t\t// Try to find the camelCased property\n\t\t\tret = thisCache[ jQuery.camelCase( name ) ];\n\t\t}\n\t} else {\n\t\tret = thisCache;\n\t}\n\n\treturn ret;\n}\n\nfunction internalRemoveData( elem, name, pvt ) {\n\tif ( !acceptData( elem ) ) {\n\t\treturn;\n\t}\n\n\tvar thisCache, i,\n\t\tisNode = elem.nodeType,\n\n\t\t// See jQuery.data for more information\n\t\tcache = isNode ? jQuery.cache : elem,\n\t\tid = isNode ? elem[ jQuery.expando ] : jQuery.expando;\n\n\t// If there is already no cache entry for this object, there is no\n\t// purpose in continuing\n\tif ( !cache[ id ] ) {\n\t\treturn;\n\t}\n\n\tif ( name ) {\n\n\t\tthisCache = pvt ? cache[ id ] : cache[ id ].data;\n\n\t\tif ( thisCache ) {\n\n\t\t\t// Support array or space separated string names for data keys\n\t\t\tif ( !jQuery.isArray( name ) ) {\n\n\t\t\t\t// try the string as a key before any manipulation\n\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\tname = [ name ];\n\t\t\t\t} else {\n\n\t\t\t\t\t// split the camel cased version by spaces unless a key with the spaces exists\n\t\t\t\t\tname = jQuery.camelCase( name );\n\t\t\t\t\tif ( name in thisCache ) {\n\t\t\t\t\t\tname = [ name ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tname = name.split( \" \" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// If \"name\" is an array of keys...\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\n\t\t\t\t// keys will be converted to camelCase.\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\n\t\t\t\t// both plain key and camelCase key. #12786\n\t\t\t\t// This will only penalize the array argument path.\n\t\t\t\tname = name.concat( jQuery.map( name, jQuery.camelCase ) );\n\t\t\t}\n\n\t\t\ti = name.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete thisCache[ name[ i ] ];\n\t\t\t}\n\n\t\t\t// If there is no data left in the cache, we want to continue\n\t\t\t// and let the cache object itself get destroyed\n\t\t\tif ( pvt ? !isEmptyDataObject( thisCache ) : !jQuery.isEmptyObject( thisCache ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// See jQuery.data for more information\n\tif ( !pvt ) {\n\t\tdelete cache[ id ].data;\n\n\t\t// Don't destroy the parent cache unless the internal data object\n\t\t// had been the only thing left in it\n\t\tif ( !isEmptyDataObject( cache[ id ] ) ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Destroy the cache\n\tif ( isNode ) {\n\t\tjQuery.cleanData( [ elem ], true );\n\n\t// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)\n\t/* jshint eqeqeq: false */\n\t} else if ( support.deleteExpando || cache != cache.window ) {\n\t\t/* jshint eqeqeq: true */\n\t\tdelete cache[ id ];\n\n\t// When all else fails, undefined\n\t} else {\n\t\tcache[ id ] = undefined;\n\t}\n}\n\njQuery.extend( {\n\tcache: {},\n\n\t// The following elements (space-suffixed to avoid Object.prototype collisions)\n\t// throw uncatchable exceptions if you attempt to set expando properties\n\tnoData: {\n\t\t\"applet \": true,\n\t\t\"embed \": true,\n\n\t\t// ...but Flash objects (which have this classid) *can* handle expandos\n\t\t\"object \": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n\t},\n\n\thasData: function( elem ) {\n\t\telem = elem.nodeType ? jQuery.cache[ elem[ jQuery.expando ] ] : elem[ jQuery.expando ];\n\t\treturn !!elem && !isEmptyDataObject( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn internalData( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\treturn internalRemoveData( elem, name );\n\t},\n\n\t// For internal use only.\n\t_data: function( elem, name, data ) {\n\t\treturn internalData( elem, name, data, true );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\treturn internalRemoveData( elem, name, true );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Special expections of .data basically thwart jQuery.access,\n\t\t// so implement the relevant behavior ourselves\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = jQuery.data( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !jQuery._data( elem, \"parsedAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE11+\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tjQuery._data( elem, \"parsedAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tjQuery.data( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn arguments.length > 1 ?\n\n\t\t\t// Sets one value\n\t\t\tthis.each( function() {\n\t\t\t\tjQuery.data( this, key, value );\n\t\t\t} ) :\n\n\t\t\t// Gets one value\n\t\t\t// Try to fetch any internally stored data first\n\t\t\telem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeData( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = jQuery._data( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || jQuery.isArray( data ) ) {\n\t\t\t\t\tqueue = jQuery._data( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// not intended for public consumption - generates a queueHooks object,\n\t// or returns the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn jQuery._data( elem, key ) || jQuery._data( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tjQuery._removeData( elem, type + \"queue\" );\n\t\t\t\tjQuery._removeData( elem, key );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = jQuery._data( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\n\n\n( function() {\n\tvar shrinkWrapBlocksVal;\n\n\tsupport.shrinkWrapBlocks = function() {\n\t\tif ( shrinkWrapBlocksVal != null ) {\n\t\t\treturn shrinkWrapBlocksVal;\n\t\t}\n\n\t\t// Will be changed later if needed.\n\t\tshrinkWrapBlocksVal = false;\n\n\t\t// Minified: var b,c,d\n\t\tvar div, body, container;\n\n\t\tbody = document.getElementsByTagName( \"body\" )[ 0 ];\n\t\tif ( !body || !body.style ) {\n\n\t\t\t// Test fired too early or in an unsupported environment, exit.\n\t\t\treturn;\n\t\t}\n\n\t\t// Setup\n\t\tdiv = document.createElement( \"div\" );\n\t\tcontainer = document.createElement( \"div\" );\n\t\tcontainer.style.cssText = \"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\";\n\t\tbody.appendChild( container ).appendChild( div );\n\n\t\t// Support: IE6\n\t\t// Check if elements with layout shrink-wrap their children\n\t\tif ( typeof div.style.zoom !== \"undefined\" ) {\n\n\t\t\t// Reset CSS: box-sizing; display; margin; border\n\t\t\tdiv.style.cssText =\n\n\t\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;\" +\n\t\t\t\t\"box-sizing:content-box;display:block;margin:0;border:0;\" +\n\t\t\t\t\"padding:1px;width:1px;zoom:1\";\n\t\t\tdiv.appendChild( document.createElement( \"div\" ) ).style.width = \"5px\";\n\t\t\tshrinkWrapBlocksVal = div.offsetWidth !== 3;\n\t\t}\n\n\t\tbody.removeChild( container );\n\n\t\treturn shrinkWrapBlocksVal;\n\t};\n\n} )();\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar isHidden = function( elem, el ) {\n\n\t\t// isHidden might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\t\treturn jQuery.css( elem, \"display\" ) === \"none\" ||\n\t\t\t!jQuery.contains( elem.ownerDocument, elem );\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted,\n\t\tscale = 1,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() { return tween.cur(); } :\n\t\t\tfunction() { return jQuery.css( elem, prop, \"\" ); },\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\tdo {\n\n\t\t\t// If previous iteration zeroed out, double until we get *something*.\n\t\t\t// Use string for doubling so we don't accidentally see scale as unchanged below\n\t\t\tscale = scale || \".5\";\n\n\t\t\t// Adjust and apply\n\t\t\tinitialInUnit = initialInUnit / scale;\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Update scale, tolerating zero or NaN from tween.cur()\n\t\t// Break the loop if scale is unchanged or perfect, or if we've just had enough.\n\t\t} while (\n\t\t\tscale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations\n\t\t);\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlength = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( jQuery.type( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !jQuery.isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ],\n\t\t\t\t\tkey,\n\t\t\t\t\traw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn chainable ?\n\t\telems :\n\n\t\t// Gets\n\t\tbulk ?\n\t\t\tfn.call( elems ) :\n\t\t\tlength ? fn( elems[ 0 ], key ) : emptyGet;\n};\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([\\w:-]+)/ );\n\nvar rscriptType = ( /^$|\\/(?:java|ecma)script/i );\n\nvar rleadingWhitespace = ( /^\\s+/ );\n\nvar nodeNames = \"abbr|article|aside|audio|bdi|canvas|data|datalist|\" +\n\t\t\"details|dialog|figcaption|figure|footer|header|hgroup|main|\" +\n\t\t\"mark|meter|nav|output|picture|progress|section|summary|template|time|video\";\n\n\n\nfunction createSafeFragment( document ) {\n\tvar list = nodeNames.split( \"|\" ),\n\t\tsafeFrag = document.createDocumentFragment();\n\n\tif ( safeFrag.createElement ) {\n\t\twhile ( list.length ) {\n\t\t\tsafeFrag.createElement(\n\t\t\t\tlist.pop()\n\t\t\t);\n\t\t}\n\t}\n\treturn safeFrag;\n}\n\n\n( function() {\n\tvar div = document.createElement( \"div\" ),\n\t\tfragment = document.createDocumentFragment(),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Setup\n\tdiv.innerHTML = \"
                    a\";\n\n\t// IE strips leading whitespace when .innerHTML is used\n\tsupport.leadingWhitespace = div.firstChild.nodeType === 3;\n\n\t// Make sure that tbody elements aren't automatically inserted\n\t// IE will insert them into empty tables\n\tsupport.tbody = !div.getElementsByTagName( \"tbody\" ).length;\n\n\t// Make sure that link elements get serialized correctly by innerHTML\n\t// This requires a wrapper element in IE\n\tsupport.htmlSerialize = !!div.getElementsByTagName( \"link\" ).length;\n\n\t// Makes sure cloning an html5 element does not cause problems\n\t// Where outerHTML is undefined, this still works\n\tsupport.html5Clone =\n\t\tdocument.createElement( \"nav\" ).cloneNode( true ).outerHTML !== \"<:nav>\";\n\n\t// Check if a disconnected checkbox will retain its checked\n\t// value of true after appended to the DOM (IE6/7)\n\tinput.type = \"checkbox\";\n\tinput.checked = true;\n\tfragment.appendChild( input );\n\tsupport.appendChecked = input.checked;\n\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\t// Support: IE6-IE11+\n\tdiv.innerHTML = \"\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// #11217 - WebKit loses check when the name is after the checked attribute\n\tfragment.appendChild( div );\n\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput = document.createElement( \"input\" );\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3\n\t// old WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE<9\n\t// Cloned elements keep attachEvent handlers, we use addEventListener on IE9+\n\tsupport.noCloneEvent = !!div.addEventListener;\n\n\t// Support: IE<9\n\t// Since attributes and properties are the same in IE,\n\t// cleanData must set properties to undefined rather than use removeAttribute\n\tdiv[ jQuery.expando ] = 1;\n\tsupport.attributes = !div.getAttribute( jQuery.expando );\n} )();\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\toption: [ 1, \"\" ],\n\tlegend: [ 1, \"
                    \", \"
                    \" ],\n\tarea: [ 1, \"\", \"\" ],\n\n\t// Support: IE8\n\tparam: [ 1, \"\", \"\" ],\n\tthead: [ 1, \"\", \"
                    \" ],\n\ttr: [ 2, \"\", \"
                    \" ],\n\tcol: [ 2, \"\", \"
                    \" ],\n\ttd: [ 3, \"\", \"
                    \" ],\n\n\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\n\t// unless wrapped in a div with non-breaking characters in front of it.\n\t_default: support.htmlSerialize ? [ 0, \"\", \"\" ] : [ 1, \"X
                    \", \"
                    \" ]\n};\n\n// Support: IE8-IE9\nwrapMap.optgroup = wrapMap.option;\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction getAll( context, tag ) {\n\tvar elems, elem,\n\t\ti = 0,\n\t\tfound = typeof context.getElementsByTagName !== \"undefined\" ?\n\t\t\tcontext.getElementsByTagName( tag || \"*\" ) :\n\t\t\ttypeof context.querySelectorAll !== \"undefined\" ?\n\t\t\t\tcontext.querySelectorAll( tag || \"*\" ) :\n\t\t\t\tundefined;\n\n\tif ( !found ) {\n\t\tfor ( found = [], elems = context.childNodes || context;\n\t\t\t( elem = elems[ i ] ) != null;\n\t\t\ti++\n\t\t) {\n\t\t\tif ( !tag || jQuery.nodeName( elem, tag ) ) {\n\t\t\t\tfound.push( elem );\n\t\t\t} else {\n\t\t\t\tjQuery.merge( found, getAll( elem, tag ) );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\n\t\tjQuery.merge( [ context ], found ) :\n\t\tfound;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar elem,\n\t\ti = 0;\n\tfor ( ; ( elem = elems[ i ] ) != null; i++ ) {\n\t\tjQuery._data(\n\t\t\telem,\n\t\t\t\"globalEval\",\n\t\t\t!refElements || jQuery._data( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/,\n\trtbody = / from table fragments\n\t\t\t\tif ( !support.tbody ) {\n\n\t\t\t\t\t// String was a , *may* have spurious \n\t\t\t\t\telem = tag === \"table\" && !rtbody.test( elem ) ?\n\t\t\t\t\t\ttmp.firstChild :\n\n\t\t\t\t\t\t// String was a bare or \n\t\t\t\t\t\twrap[ 1 ] === \"
                    \" && !rtbody.test( elem ) ?\n\t\t\t\t\t\t\ttmp :\n\t\t\t\t\t\t\t0;\n\n\t\t\t\t\tj = elem && elem.childNodes.length;\n\t\t\t\t\twhile ( j-- ) {\n\t\t\t\t\t\tif ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), \"tbody\" ) &&\n\t\t\t\t\t\t\t!tbody.childNodes.length ) {\n\n\t\t\t\t\t\t\telem.removeChild( tbody );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Fix #12392 for WebKit and IE > 9\n\t\t\t\ttmp.textContent = \"\";\n\n\t\t\t\t// Fix #12392 for oldIE\n\t\t\t\twhile ( tmp.firstChild ) {\n\t\t\t\t\ttmp.removeChild( tmp.firstChild );\n\t\t\t\t}\n\n\t\t\t\t// Remember the top-level container for proper cleanup\n\t\t\t\ttmp = safe.lastChild;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Fix #11356: Clear elements from fragment\n\tif ( tmp ) {\n\t\tsafe.removeChild( tmp );\n\t}\n\n\t// Reset defaultChecked for any radios and checkboxes\n\t// about to be appended to the DOM in IE 6/7 (#8060)\n\tif ( !support.appendChecked ) {\n\t\tjQuery.grep( getAll( nodes, \"input\" ), fixDefaultChecked );\n\t}\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( safe.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( contains ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\ttmp = null;\n\n\treturn safe;\n}\n\n\n( function() {\n\tvar i, eventName,\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events)\n\tfor ( i in { submit: true, change: true, focusin: true } ) {\n\t\teventName = \"on\" + i;\n\n\t\tif ( !( support[ i ] = eventName in window ) ) {\n\n\t\t\t// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)\n\t\t\tdiv.setAttribute( eventName, \"t\" );\n\t\t\tsupport[ i ] = div.attributes[ eventName ].expando === false;\n\t\t}\n\t}\n\n\t// Null elements to avoid leaks in IE.\n\tdiv = null;\n} )();\n\n\nvar rformElems = /^(?:input|select|textarea)$/i,\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n\trfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE9\n// See #13393 for more info\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\t\tvar tmp, events, t, handleObjIn,\n\t\t\tspecial, eventHandle, handleObj,\n\t\t\thandlers, type, namespaces, origType,\n\t\t\telemData = jQuery._data( elem );\n\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" &&\n\t\t\t\t\t( !e || jQuery.event.triggered !== e.type ) ?\n\t\t\t\t\tjQuery.event.dispatch.apply( eventHandle.elem, arguments ) :\n\t\t\t\t\tundefined;\n\t\t\t};\n\n\t\t\t// Add elem as a property of the handle fn to prevent a memory leak\n\t\t\t// with IE non-native events\n\t\t\teventHandle.elem = elem;\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener/attachEvent if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\t// Bind the global event handler to the element\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle, false );\n\n\t\t\t\t\t} else if ( elem.attachEvent ) {\n\t\t\t\t\t\telem.attachEvent( \"on\" + type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t\t// Nullify elem to prevent memory leaks in IE\n\t\telem = null;\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\t\tvar j, handleObj, tmp,\n\t\t\torigCount, t, events,\n\t\t\tspecial, handlers, type,\n\t\t\tnamespaces, origType,\n\t\t\telemData = jQuery.hasData( elem ) && jQuery._data( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdelete elemData.handle;\n\n\t\t\t// removeData also checks for emptiness and clears the expando if empty\n\t\t\t// so use it instead of delete\n\t\t\tjQuery._removeData( elem, \"events\" );\n\t\t}\n\t},\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\t\tvar handle, ontype, cur,\n\t\t\tbubbleType, special, tmp, i,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( jQuery._data( cur, \"events\" ) || {} )[ event.type ] &&\n\t\t\t\tjQuery._data( cur, \"handle\" );\n\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif (\n\t\t\t\t( !special._default ||\n\t\t\t\t special._default.apply( eventPath.pop(), data ) === false\n\t\t\t\t) && acceptData( elem )\n\t\t\t) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\n\t\t\t\t// Can't use an .isFunction() check here because IE6/7 fails that test.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\t\t\t\t\ttry {\n\t\t\t\t\t\telem[ type ]();\n\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t// IE<9 dies on focus/blur to hidden element (#1486,#12518)\n\t\t\t\t\t\t// only reproducible on winXP IE8 native, not IE9 in IE8 mode\n\t\t\t\t\t}\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\tdispatch: function( event ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tevent = jQuery.event.fix( event );\n\n\t\tvar i, j, ret, matched, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\targs = slice.call( arguments ),\n\t\t\thandlers = ( jQuery._data( this, \"events\" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// Triggered event must either 1) have no namespace, or 2) have namespace(s)\n\t\t\t\t// a subset or equal to those in the bound event (both can have no namespace).\n\t\t\t\tif ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, matches, sel, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Support (at least): Chrome, IE9\n\t\t// Find delegate handlers\n\t\t// Black-hole SVG instance trees (#13180)\n\t\t//\n\t\t// Support: Firefox<=42+\n\t\t// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)\n\t\tif ( delegateCount && cur.nodeType &&\n\t\t\t( event.type !== \"click\" || isNaN( event.button ) || event.button < 1 ) ) {\n\n\t\t\t/* jshint eqeqeq: false */\n\t\t\tfor ( ; cur != this; cur = cur.parentNode || this ) {\n\t\t\t\t/* jshint eqeqeq: true */\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== \"click\" ) ) {\n\t\t\t\t\tmatches = [];\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matches[ sel ] ) {\n\t\t\t\t\t\t\tmatches.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matches.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matches } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\tfix: function( event ) {\n\t\tif ( event[ jQuery.expando ] ) {\n\t\t\treturn event;\n\t\t}\n\n\t\t// Create a writable copy of the event object and normalize some properties\n\t\tvar i, prop, copy,\n\t\t\ttype = event.type,\n\t\t\toriginalEvent = event,\n\t\t\tfixHook = this.fixHooks[ type ];\n\n\t\tif ( !fixHook ) {\n\t\t\tthis.fixHooks[ type ] = fixHook =\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\n\t\t\t\t{};\n\t\t}\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\n\n\t\tevent = new jQuery.Event( originalEvent );\n\n\t\ti = copy.length;\n\t\twhile ( i-- ) {\n\t\t\tprop = copy[ i ];\n\t\t\tevent[ prop ] = originalEvent[ prop ];\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// Fix target property (#1925)\n\t\tif ( !event.target ) {\n\t\t\tevent.target = originalEvent.srcElement || document;\n\t\t}\n\n\t\t// Support: Safari 6-8+\n\t\t// Target should not be a text node (#504, #13143)\n\t\tif ( event.target.nodeType === 3 ) {\n\t\t\tevent.target = event.target.parentNode;\n\t\t}\n\n\t\t// Support: IE<9\n\t\t// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)\n\t\tevent.metaKey = !!event.metaKey;\n\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\n\t},\n\n\t// Includes some event props shared by KeyEvent and MouseEvent\n\tprops: ( \"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase \" +\n\t\t\"metaKey relatedTarget shiftKey target timeStamp view which\" ).split( \" \" ),\n\n\tfixHooks: {},\n\n\tkeyHooks: {\n\t\tprops: \"char charCode key keyCode\".split( \" \" ),\n\t\tfilter: function( event, original ) {\n\n\t\t\t// Add which for key events\n\t\t\tif ( event.which == null ) {\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tmouseHooks: {\n\t\tprops: ( \"button buttons clientX clientY fromElement offsetX offsetY \" +\n\t\t\t\"pageX pageY screenX screenY toElement\" ).split( \" \" ),\n\t\tfilter: function( event, original ) {\n\t\t\tvar body, eventDoc, doc,\n\t\t\t\tbutton = original.button,\n\t\t\t\tfromElement = original.fromElement;\n\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\n\t\t\t\teventDoc = event.target.ownerDocument || document;\n\t\t\t\tdoc = eventDoc.documentElement;\n\t\t\t\tbody = eventDoc.body;\n\n\t\t\t\tevent.pageX = original.clientX +\n\t\t\t\t\t( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -\n\t\t\t\t\t( doc && doc.clientLeft || body && body.clientLeft || 0 );\n\t\t\t\tevent.pageY = original.clientY +\n\t\t\t\t\t( doc && doc.scrollTop || body && body.scrollTop || 0 ) -\n\t\t\t\t\t( doc && doc.clientTop || body && body.clientTop || 0 );\n\t\t\t}\n\n\t\t\t// Add relatedTarget, if necessary\n\t\t\tif ( !event.relatedTarget && fromElement ) {\n\t\t\t\tevent.relatedTarget = fromElement === event.target ?\n\t\t\t\t\toriginal.toElement :\n\t\t\t\t\tfromElement;\n\t\t\t}\n\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\t\t// Note: button is not normalized, so don't use it\n\t\t\tif ( !event.which && button !== undefined ) {\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tfocus: {\n\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.focus();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t\t// If we error on focus to hidden element (#1486, #12518),\n\t\t\t\t\t\t// let .trigger() run the handlers\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusin\"\n\t\t},\n\t\tblur: {\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusout\"\n\t\t},\n\t\tclick: {\n\n\t\t\t// For checkbox, fire native event so checked state will be right\n\t\t\ttrigger: function() {\n\t\t\t\tif ( jQuery.nodeName( this, \"input\" ) && this.type === \"checkbox\" && this.click ) {\n\t\t\t\t\tthis.click();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, don't fire native .click() on links\n\t\t\t_default: function( event ) {\n\t\t\t\treturn jQuery.nodeName( event.target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\n\t\t\t\t// Previously, `originalEvent: {}` was set here, so stopPropagation call\n\t\t\t\t// would not be triggered on donor event, since in our own\n\t\t\t\t// jQuery.event.stopPropagation function we had a check for existence of\n\t\t\t\t// originalEvent.stopPropagation method, so, consequently it would be a noop.\n\t\t\t\t//\n\t\t\t\t// Guard for simulated events was moved to jQuery.event.stopPropagation function\n\t\t\t\t// since `originalEvent` should point to the original event for the\n\t\t\t\t// constancy with other events and for more focused logic\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\n\t\tif ( e.isDefaultPrevented() ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n};\n\njQuery.removeEvent = document.removeEventListener ?\n\tfunction( elem, type, handle ) {\n\n\t\t// This \"if\" is needed for plain objects\n\t\tif ( elem.removeEventListener ) {\n\t\t\telem.removeEventListener( type, handle );\n\t\t}\n\t} :\n\tfunction( elem, type, handle ) {\n\t\tvar name = \"on\" + type;\n\n\t\tif ( elem.detachEvent ) {\n\n\t\t\t// #8545, #7054, preventing memory leaks for custom events in IE6-8\n\t\t\t// detachEvent needed property on element, by name of that event,\n\t\t\t// to properly expose it to GC\n\t\t\tif ( typeof elem[ name ] === \"undefined\" ) {\n\t\t\t\telem[ name ] = null;\n\t\t\t}\n\n\t\t\telem.detachEvent( name, handle );\n\t\t}\n\t};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: IE < 9, Android < 4.0\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\t\tif ( !e ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If preventDefault exists, run it on the original event\n\t\tif ( e.preventDefault ) {\n\t\t\te.preventDefault();\n\n\t\t// Support: IE\n\t\t// Otherwise set the returnValue property of the original event to false\n\t\t} else {\n\t\t\te.returnValue = false;\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( !e || this.isSimulated ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If stopPropagation exists, run it on the original event\n\t\tif ( e.stopPropagation ) {\n\t\t\te.stopPropagation();\n\t\t}\n\n\t\t// Support: IE\n\t\t// Set the cancelBubble property of the original event to true\n\t\te.cancelBubble = true;\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && e.stopImmediatePropagation ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://code.google.com/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\n// IE submit delegation\nif ( !support.submit ) {\n\n\tjQuery.event.special.submit = {\n\t\tsetup: function() {\n\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Lazy-add a submit handler when a descendant form may potentially be submitted\n\t\t\tjQuery.event.add( this, \"click._submit keypress._submit\", function( e ) {\n\n\t\t\t\t// Node name check avoids a VML-related crash in IE (#9807)\n\t\t\t\tvar elem = e.target,\n\t\t\t\t\tform = jQuery.nodeName( elem, \"input\" ) || jQuery.nodeName( elem, \"button\" ) ?\n\n\t\t\t\t\t\t// Support: IE <=8\n\t\t\t\t\t\t// We use jQuery.prop instead of elem.form\n\t\t\t\t\t\t// to allow fixing the IE8 delegated submit issue (gh-2332)\n\t\t\t\t\t\t// by 3rd party polyfills/workarounds.\n\t\t\t\t\t\tjQuery.prop( elem, \"form\" ) :\n\t\t\t\t\t\tundefined;\n\n\t\t\t\tif ( form && !jQuery._data( form, \"submit\" ) ) {\n\t\t\t\t\tjQuery.event.add( form, \"submit._submit\", function( event ) {\n\t\t\t\t\t\tevent._submitBubble = true;\n\t\t\t\t\t} );\n\t\t\t\t\tjQuery._data( form, \"submit\", true );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// return undefined since we don't need an event listener\n\t\t},\n\n\t\tpostDispatch: function( event ) {\n\n\t\t\t// If form was submitted by the user, bubble the event up the tree\n\t\t\tif ( event._submitBubble ) {\n\t\t\t\tdelete event._submitBubble;\n\t\t\t\tif ( this.parentNode && !event.isTrigger ) {\n\t\t\t\t\tjQuery.event.simulate( \"submit\", this.parentNode, event );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tteardown: function() {\n\n\t\t\t// Only need this for delegated form submit events\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Remove delegated handlers; cleanData eventually reaps submit handlers attached above\n\t\t\tjQuery.event.remove( this, \"._submit\" );\n\t\t}\n\t};\n}\n\n// IE change delegation and checkbox/radio fix\nif ( !support.change ) {\n\n\tjQuery.event.special.change = {\n\n\t\tsetup: function() {\n\n\t\t\tif ( rformElems.test( this.nodeName ) ) {\n\n\t\t\t\t// IE doesn't fire change on a check/radio until blur; trigger it on click\n\t\t\t\t// after a propertychange. Eat the blur-change in special.change.handle.\n\t\t\t\t// This still fires onchange a second time for check/radio after blur.\n\t\t\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\n\t\t\t\t\tjQuery.event.add( this, \"propertychange._change\", function( event ) {\n\t\t\t\t\t\tif ( event.originalEvent.propertyName === \"checked\" ) {\n\t\t\t\t\t\t\tthis._justChanged = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\tjQuery.event.add( this, \"click._change\", function( event ) {\n\t\t\t\t\t\tif ( this._justChanged && !event.isTrigger ) {\n\t\t\t\t\t\t\tthis._justChanged = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Allow triggered, simulated change events (#11500)\n\t\t\t\t\t\tjQuery.event.simulate( \"change\", this, event );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Delegated event; lazy-add a change handler on descendant inputs\n\t\t\tjQuery.event.add( this, \"beforeactivate._change\", function( e ) {\n\t\t\t\tvar elem = e.target;\n\n\t\t\t\tif ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, \"change\" ) ) {\n\t\t\t\t\tjQuery.event.add( elem, \"change._change\", function( event ) {\n\t\t\t\t\t\tif ( this.parentNode && !event.isSimulated && !event.isTrigger ) {\n\t\t\t\t\t\t\tjQuery.event.simulate( \"change\", this.parentNode, event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\tjQuery._data( elem, \"change\", true );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\n\t\thandle: function( event ) {\n\t\t\tvar elem = event.target;\n\n\t\t\t// Swallow native change events from checkbox/radio, we already triggered them above\n\t\t\tif ( this !== elem || event.isSimulated || event.isTrigger ||\n\t\t\t\t( elem.type !== \"radio\" && elem.type !== \"checkbox\" ) ) {\n\n\t\t\t\treturn event.handleObj.handler.apply( this, arguments );\n\t\t\t}\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tjQuery.event.remove( this, \"._change\" );\n\n\t\t\treturn !rformElems.test( this.nodeName );\n\t\t}\n\t};\n}\n\n// Support: Firefox\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome, Safari\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = jQuery._data( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tjQuery._data( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = jQuery._data( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tjQuery._removeData( doc, fix );\n\t\t\t\t} else {\n\t\t\t\t\tjQuery._data( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event ) dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t},\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\nvar rinlinejQuery = / jQuery\\d+=\"(?:null|\\d+)\"/g,\n\trnoshimcache = new RegExp( \"<(?:\" + nodeNames + \")[\\\\s/>]\", \"i\" ),\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi,\n\n\t// Support: IE 10-11, Edge 10240+\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /\\s*$/g,\n\tsafeFragment = createSafeFragment( document ),\n\tfragmentDiv = safeFragment.appendChild( document.createElement( \"div\" ) );\n\n// Support: IE<8\n// Manipulating tables requires a tbody\nfunction manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName( \"tbody\" )[ 0 ] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement( \"tbody\" ) ) :\n\t\telem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tvar match = rscriptTypeMasked.exec( elem.type );\n\tif ( match ) {\n\t\telem.type = match[ 1 ];\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tif ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {\n\t\treturn;\n\t}\n\n\tvar type, i, l,\n\t\toldData = jQuery._data( src ),\n\t\tcurData = jQuery._data( dest, oldData ),\n\t\tevents = oldData.events;\n\n\tif ( events ) {\n\t\tdelete curData.handle;\n\t\tcurData.events = {};\n\n\t\tfor ( type in events ) {\n\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t}\n\t\t}\n\t}\n\n\t// make the cloned public data object a copy from the original\n\tif ( curData.data ) {\n\t\tcurData.data = jQuery.extend( {}, curData.data );\n\t}\n}\n\nfunction fixCloneNodeIssues( src, dest ) {\n\tvar nodeName, e, data;\n\n\t// We do not need to do anything for non-Elements\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\tnodeName = dest.nodeName.toLowerCase();\n\n\t// IE6-8 copies events bound via attachEvent when using cloneNode.\n\tif ( !support.noCloneEvent && dest[ jQuery.expando ] ) {\n\t\tdata = jQuery._data( dest );\n\n\t\tfor ( e in data.events ) {\n\t\t\tjQuery.removeEvent( dest, e, data.handle );\n\t\t}\n\n\t\t// Event data gets referenced instead of copied if the expando gets copied too\n\t\tdest.removeAttribute( jQuery.expando );\n\t}\n\n\t// IE blanks contents when cloning scripts, and tries to evaluate newly-set text\n\tif ( nodeName === \"script\" && dest.text !== src.text ) {\n\t\tdisableScript( dest ).text = src.text;\n\t\trestoreScript( dest );\n\n\t// IE6-10 improperly clones children of object elements using classid.\n\t// IE10 throws NoModificationAllowedError if parent is null, #12132.\n\t} else if ( nodeName === \"object\" ) {\n\t\tif ( dest.parentNode ) {\n\t\t\tdest.outerHTML = src.outerHTML;\n\t\t}\n\n\t\t// This path appears unavoidable for IE9. When cloning an object\n\t\t// element in IE9, the outerHTML strategy above is not sufficient.\n\t\t// If the src has innerHTML and the destination does not,\n\t\t// copy the src.innerHTML into the dest.innerHTML. #10324\n\t\tif ( support.html5Clone && ( src.innerHTML && !jQuery.trim( dest.innerHTML ) ) ) {\n\t\t\tdest.innerHTML = src.innerHTML;\n\t\t}\n\n\t} else if ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\n\t\t// IE6-8 fails to persist the checked state of a cloned checkbox\n\t\t// or radio button. Worse, IE6-7 fail to give the cloned element\n\t\t// a checked appearance if the defaultChecked value isn't also set\n\n\t\tdest.defaultChecked = dest.checked = src.checked;\n\n\t\t// IE6-7 get confused and end up setting the value of a cloned\n\t\t// checkbox/radio button to an empty string instead of \"on\"\n\t\tif ( dest.value !== src.value ) {\n\t\t\tdest.value = src.value;\n\t\t}\n\n\t// IE6-8 fails to return the selected option to the default selected\n\t// state when cloning options\n\t} else if ( nodeName === \"option\" ) {\n\t\tdest.defaultSelected = dest.selected = src.defaultSelected;\n\n\t// IE6-8 fails to set the defaultValue to the correct value when\n\t// cloning other types of input fields\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = concat.apply( [], args );\n\n\tvar first, node, hasScripts,\n\t\tscripts, doc, fragment,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tisFunction = jQuery.isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( isFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( isFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android<4.1, PhantomJS<2\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!jQuery._data( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tjQuery.globalEval(\n\t\t\t\t\t\t\t\t( node.text || node.textContent || node.innerHTML || \"\" )\n\t\t\t\t\t\t\t\t\t.replace( rcleanScript, \"\" )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Fix #11809: Avoid leaking memory\n\t\t\tfragment = first = null;\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\telems = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = elems[ i ] ) != null; i++ ) {\n\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && jQuery.contains( node.ownerDocument, node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html.replace( rxhtmlTag, \"<$1>\" );\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar destElements, node, clone, i, srcElements,\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\n\n\t\tif ( support.html5Clone || jQuery.isXMLDoc( elem ) ||\n\t\t\t!rnoshimcache.test( \"<\" + elem.nodeName + \">\" ) ) {\n\n\t\t\tclone = elem.cloneNode( true );\n\n\t\t// IE<=8 does not properly clone detached, unknown element nodes\n\t\t} else {\n\t\t\tfragmentDiv.innerHTML = elem.outerHTML;\n\t\t\tfragmentDiv.removeChild( clone = fragmentDiv.firstChild );\n\t\t}\n\n\t\tif ( ( !support.noCloneEvent || !support.noCloneChecked ) &&\n\t\t\t\t( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\t// Fix all IE cloning issues\n\t\t\tfor ( i = 0; ( node = srcElements[ i ] ) != null; ++i ) {\n\n\t\t\t\t// Ensure that the destination node is not null; Fixes #9587\n\t\t\t\tif ( destElements[ i ] ) {\n\t\t\t\t\tfixCloneNodeIssues( node, destElements[ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0; ( node = srcElements[ i ] ) != null; i++ ) {\n\t\t\t\t\tcloneCopyEvent( node, destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\tdestElements = srcElements = node = null;\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems, /* internal */ forceAcceptData ) {\n\t\tvar elem, type, id, data,\n\t\t\ti = 0,\n\t\t\tinternalKey = jQuery.expando,\n\t\t\tcache = jQuery.cache,\n\t\t\tattributes = support.attributes,\n\t\t\tspecial = jQuery.event.special;\n\n\t\tfor ( ; ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\tif ( forceAcceptData || acceptData( elem ) ) {\n\n\t\t\t\tid = elem[ internalKey ];\n\t\t\t\tdata = id && cache[ id ];\n\n\t\t\t\tif ( data ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove cache only if it was not already removed by jQuery.event.remove\n\t\t\t\t\tif ( cache[ id ] ) {\n\n\t\t\t\t\t\tdelete cache[ id ];\n\n\t\t\t\t\t\t// Support: IE<9\n\t\t\t\t\t\t// IE does not allow us to delete expando properties from nodes\n\t\t\t\t\t\t// IE creates expando attributes along with the property\n\t\t\t\t\t\t// IE does not have a removeAttribute function on Document nodes\n\t\t\t\t\t\tif ( !attributes && typeof elem.removeAttribute !== \"undefined\" ) {\n\t\t\t\t\t\t\telem.removeAttribute( internalKey );\n\n\t\t\t\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t\t\t\t// https://code.google.com/p/chromium/issues/detail?id=378607\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telem[ internalKey ] = undefined;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdeletedIds.push( id );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\n\t// Keep domManip exposed until 3.0 (gh-2225)\n\tdomManip: domManip,\n\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().append(\n\t\t\t\t\t( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value )\n\t\t\t\t);\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\n\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t}\n\n\t\t\t// Remove any remaining nodes\n\t\t\twhile ( elem.firstChild ) {\n\t\t\t\telem.removeChild( elem.firstChild );\n\t\t\t}\n\n\t\t\t// If this is a select, ensure that it displays empty (#12336)\n\t\t\t// Support: IE<9\n\t\t\tif ( elem.options && jQuery.nodeName( elem, \"select\" ) ) {\n\t\t\t\telem.options.length = 0;\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined ) {\n\t\t\t\treturn elem.nodeType === 1 ?\n\t\t\t\t\telem.innerHTML.replace( rinlinejQuery, \"\" ) :\n\t\t\t\t\tundefined;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t( support.htmlSerialize || !rnoshimcache.test( value ) ) &&\n\t\t\t\t( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\telem = this[ i ] || {};\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\ti = 0,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\n\n\nvar iframe,\n\telemdisplay = {\n\n\t\t// Support: Firefox\n\t\t// We have to pre-define these values for FF (#10227)\n\t\tHTML: \"block\",\n\t\tBODY: \"block\"\n\t};\n\n/**\n * Retrieve the actual display of a element\n * @param {String} name nodeName of the element\n * @param {Object} doc Document object\n */\n\n// Called only from within defaultDisplay\nfunction actualDisplay( name, doc ) {\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\n\n\t\tdisplay = jQuery.css( elem[ 0 ], \"display\" );\n\n\t// We don't have any data stored on the element,\n\t// so use \"detach\" method as fast way to get rid of the element\n\telem.detach();\n\n\treturn display;\n}\n\n/**\n * Try to determine the default display value of an element\n * @param {String} nodeName\n */\nfunction defaultDisplay( nodeName ) {\n\tvar doc = document,\n\t\tdisplay = elemdisplay[ nodeName ];\n\n\tif ( !display ) {\n\t\tdisplay = actualDisplay( nodeName, doc );\n\n\t\t// If the simple way fails, read from inside an iframe\n\t\tif ( display === \"none\" || !display ) {\n\n\t\t\t// Use the already-created iframe if possible\n\t\t\tiframe = ( iframe || jQuery( \"';\r\n break;\r\n case 3:\r\n delete config.title;\r\n delete config.closeBtn;\r\n config.icon === -1 && (config.icon === 0);\r\n layer.closeAll('loading');\r\n break;\r\n case 4:\r\n conType || (config.content = [config.content, 'body']);\r\n config.follow = config.content[1];\r\n config.content = config.content[0] + '';\r\n delete config.title;\r\n config.tips = typeof config.tips === 'object' ? config.tips : [config.tips, true];\r\n config.tipsMore || layer.closeAll('tips');\r\n break;\r\n }\r\n \r\n // 建立容器\r\n that.vessel(conType, function(html, titleHTML, moveElem){\r\n body.append(html[0]);\r\n conType ? function(){\r\n (config.type == 2 || config.type == 4) ? function(){\r\n $('body').append(html[1]);\r\n }() : function(){\r\n if(!content.parents('.'+doms[0])[0]){\r\n content.data('display', content.css('display')).show().addClass('layui-layer-wrap').wrap(html[1]);\r\n $('#'+ doms[0] + times).find('.'+doms[5]).before(titleHTML);\r\n }\r\n }();\r\n }() : body.append(html[1]);\r\n $('#'+ doms.MOVE)[0] || body.append(ready.moveElem = moveElem);\r\n \r\n that.layero = $('#'+ doms[0] + times);\r\n that.shadeo = $('#'+ doms.SHADE + times);\r\n \r\n config.scrollbar || ready.setScrollbar(times);\r\n }).auto(times);\r\n \r\n // 遮罩\r\n that.shadeo.css({\r\n 'background-color': config.shade[1] || '#000'\r\n ,'opacity': config.shade[0] || config.shade\r\n });\r\n\r\n config.type == 2 && layer.ie == 6 && that.layero.find('iframe').attr('src', content[0]);\r\n\r\n // 坐标自适应浏览器窗口尺寸\r\n config.type == 4 ? that.tips() : function(){\r\n that.offset()\r\n // 首次弹出时,若 css 尚未加载,则等待 css 加载完毕后,重新设定尺寸\r\n parseInt(ready.getStyle(document.getElementById(doms.MOVE), 'z-index')) || function(){\r\n that.layero.css('visibility', 'hidden');\r\n layer.ready(function(){\r\n that.offset();\r\n that.layero.css('visibility', 'visible');\r\n });\r\n }();\r\n }();\r\n \r\n // 若是固定定位,则跟随 resize 事件来自适应坐标\r\n if(config.fixed){\r\n if(!ready.events.resize[that.index]){\r\n ready.events.resize[that.index] = function(){\r\n that.resize();\r\n };\r\n // 此处 resize 事件不会一直叠加,当关闭弹层时会移除该事件\r\n win.on('resize', ready.events.resize[that.index]);\r\n }\r\n }\r\n \r\n config.time <= 0 || setTimeout(function(){\r\n layer.close(that.index);\r\n }, config.time);\r\n that.move().callback();\r\n \r\n // 为兼容 jQuery3.0 的 css 动画影响元素尺寸计算\r\n if(doms.anim[config.anim]){\r\n var animClass = 'layer-anim '+ doms.anim[config.anim];\r\n that.layero.addClass(animClass).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){\r\n $(this).removeClass(animClass);\r\n });\r\n }\r\n \r\n // 记录配置信息\r\n that.layero.data('config', config);\r\n};\r\n\r\n// 当前实例的 resize 事件\r\nClass.pt.resize = function(){\r\n var that = this;\r\n var config = that.config;\r\n \r\n that.offset();\r\n (/^\\d+%$/.test(config.area[0]) || /^\\d+%$/.test(config.area[1])) && that.auto(that.index);\r\n config.type == 4 && that.tips();\r\n};\r\n\r\n// 自适应\r\nClass.pt.auto = function(index){\r\n var that = this, config = that.config, layero = $('#'+ doms[0] + index);\r\n \r\n if(config.area[0] === '' && config.maxWidth > 0){\r\n // 适配 ie7\r\n if(layer.ie && layer.ie < 8 && config.btn){\r\n layero.width(layero.innerWidth());\r\n }\r\n layero.outerWidth() > config.maxWidth && layero.width(config.maxWidth);\r\n }\r\n \r\n var area = [layero.innerWidth(), layero.innerHeight()];\r\n var titHeight = layero.find(doms[1]).outerHeight() || 0;\r\n var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;\r\n var setHeight = function(elem){\r\n elem = layero.find(elem);\r\n elem.height(area[1] - titHeight - btnHeight - 2*(parseFloat(elem.css('padding-top'))|0));\r\n };\r\n\r\n switch(config.type){\r\n case 2: \r\n setHeight('iframe');\r\n break;\r\n default:\r\n if(config.area[1] === ''){\r\n if(config.maxHeight > 0 && layero.outerHeight() > config.maxHeight){\r\n area[1] = config.maxHeight;\r\n setHeight('.'+doms[5]);\r\n } else if(config.fixed && area[1] >= win.height()){\r\n area[1] = win.height();\r\n setHeight('.'+doms[5]);\r\n }\r\n } else {\r\n setHeight('.'+doms[5]);\r\n }\r\n break;\r\n }\r\n \r\n return that;\r\n};\r\n\r\n// 计算坐标\r\nClass.pt.offset = function(){\r\n var that = this, config = that.config, layero = that.layero;\r\n var area = [layero.outerWidth(), layero.outerHeight()];\r\n var type = typeof config.offset === 'object';\r\n that.offsetTop = (win.height() - area[1])/2;\r\n that.offsetLeft = (win.width() - area[0])/2;\r\n \r\n if(type){\r\n that.offsetTop = config.offset[0];\r\n that.offsetLeft = config.offset[1]||that.offsetLeft;\r\n } else if(config.offset !== 'auto'){\r\n \r\n if(config.offset === 't'){ // 上\r\n that.offsetTop = 0;\r\n } else if(config.offset === 'r'){ // 右\r\n that.offsetLeft = win.width() - area[0];\r\n } else if(config.offset === 'b'){ // 下\r\n that.offsetTop = win.height() - area[1];\r\n } else if(config.offset === 'l'){ // 左\r\n that.offsetLeft = 0;\r\n } else if(config.offset === 'lt'){ // 左上\r\n that.offsetTop = 0;\r\n that.offsetLeft = 0;\r\n } else if(config.offset === 'lb'){ // 左下\r\n that.offsetTop = win.height() - area[1];\r\n that.offsetLeft = 0;\r\n } else if(config.offset === 'rt'){ // 右上\r\n that.offsetTop = 0;\r\n that.offsetLeft = win.width() - area[0];\r\n } else if(config.offset === 'rb'){ // 右下\r\n that.offsetTop = win.height() - area[1];\r\n that.offsetLeft = win.width() - area[0];\r\n } else {\r\n that.offsetTop = config.offset;\r\n }\r\n \r\n }\r\n \r\n if(!config.fixed){\r\n that.offsetTop = /%$/.test(that.offsetTop) ? \r\n win.height()*parseFloat(that.offsetTop)/100\r\n : parseFloat(that.offsetTop);\r\n that.offsetLeft = /%$/.test(that.offsetLeft) ? \r\n win.width()*parseFloat(that.offsetLeft)/100\r\n : parseFloat(that.offsetLeft);\r\n that.offsetTop += win.scrollTop();\r\n that.offsetLeft += win.scrollLeft();\r\n }\r\n \r\n // 最小化窗口时的自适应\r\n if(layero.data('maxminStatus') === 'min'){\r\n that.offsetTop = win.height() - (layero.find(doms[1]).outerHeight() || 0);\r\n that.offsetLeft = layero.css('left');\r\n }\r\n\r\n // 设置坐标\r\n layero.css({\r\n top: that.offsetTop, \r\n left: that.offsetLeft\r\n });\r\n};\r\n\r\n// Tips\r\nClass.pt.tips = function(){\r\n var that = this, config = that.config, layero = that.layero;\r\n var layArea = [layero.outerWidth(), layero.outerHeight()], follow = $(config.follow);\r\n if(!follow[0]) follow = $('body');\r\n var goal = {\r\n width: follow.outerWidth(),\r\n height: follow.outerHeight(),\r\n top: follow.offset().top,\r\n left: follow.offset().left\r\n }, tipsG = layero.find('.layui-layer-TipsG');\r\n \r\n var guide = config.tips[0];\r\n config.tips[1] || tipsG.remove();\r\n \r\n goal.autoLeft = function(){\r\n if(goal.left + layArea[0] - win.width() > 0){\r\n goal.tipLeft = goal.left + goal.width - layArea[0];\r\n tipsG.css({right: 12, left: 'auto'});\r\n } else {\r\n goal.tipLeft = goal.left;\r\n }\r\n };\r\n \r\n // 辨别 tips 的方位\r\n goal.where = [function(){ // 上 \r\n goal.autoLeft();\r\n goal.tipTop = goal.top - layArea[1] - 10;\r\n tipsG.removeClass('layui-layer-TipsB').addClass('layui-layer-TipsT').css('border-right-color', config.tips[1]);\r\n }, function(){ // 右\r\n goal.tipLeft = goal.left + goal.width + 10;\r\n goal.tipTop = goal.top;\r\n tipsG.removeClass('layui-layer-TipsL').addClass('layui-layer-TipsR').css('border-bottom-color', config.tips[1]); \r\n }, function(){ // 下\r\n goal.autoLeft();\r\n goal.tipTop = goal.top + goal.height + 10;\r\n tipsG.removeClass('layui-layer-TipsT').addClass('layui-layer-TipsB').css('border-right-color', config.tips[1]);\r\n }, function(){ // 左\r\n goal.tipLeft = goal.left - layArea[0] - 10;\r\n goal.tipTop = goal.top;\r\n tipsG.removeClass('layui-layer-TipsR').addClass('layui-layer-TipsL').css('border-bottom-color', config.tips[1]);\r\n }];\r\n goal.where[guide-1]();\r\n \r\n /* 8*2为小三角形占据的空间 */\r\n if(guide === 1){\r\n goal.top - (win.scrollTop() + layArea[1] + 8*2) < 0 && goal.where[2]();\r\n } else if(guide === 2){\r\n win.width() - (goal.left + goal.width + layArea[0] + 8*2) > 0 || goal.where[3]()\r\n } else if(guide === 3){\r\n (goal.top - win.scrollTop() + goal.height + layArea[1] + 8*2) - win.height() > 0 && goal.where[0]();\r\n } else if(guide === 4){\r\n layArea[0] + 8*2 - goal.left > 0 && goal.where[1]()\r\n }\r\n\r\n layero.find('.'+doms[5]).css({\r\n 'background-color': config.tips[1], \r\n 'padding-right': (config.closeBtn ? '30px' : '')\r\n });\r\n layero.css({\r\n left: goal.tipLeft - (config.fixed ? win.scrollLeft() : 0), \r\n top: goal.tipTop - (config.fixed ? win.scrollTop() : 0)\r\n });\r\n}\r\n\r\n// 拖拽层\r\nClass.pt.move = function(){\r\n var that = this;\r\n var config = that.config;\r\n var _DOC = $(document);\r\n var layero = that.layero;\r\n var DATA_NAME = ['LAY_MOVE_DICT', 'LAY_RESIZE_DICT'];\r\n var moveElem = layero.find(config.move);\r\n var resizeElem = layero.find('.layui-layer-resize');\r\n \r\n // 给指定元素添加拖动光标\r\n if(config.move) moveElem.css('cursor', 'move');\r\n \r\n // 按下拖动元素\r\n moveElem.on('mousedown', function(e){\r\n if (e.button) {return;} // 不是左键不处理\r\n var othis = $(this);\r\n var dict = {};\r\n \r\n if(config.move){\r\n dict.layero = layero;\r\n dict.config = config;\r\n dict.offset = [\r\n e.clientX - parseFloat(layero.css('left')),\r\n e.clientY - parseFloat(layero.css('top'))\r\n ];\r\n \r\n othis.data(DATA_NAME[0], dict);\r\n ready.eventMoveElem = othis;\r\n ready.moveElem.css('cursor', 'move').show();\r\n }\r\n \r\n e.preventDefault();\r\n });\r\n \r\n // 按下右下角拉伸\r\n resizeElem.on('mousedown', function(e){\r\n var othis = $(this);\r\n var dict = {};\r\n \r\n if(config.resize){\r\n dict.layero = layero;\r\n dict.config = config;\r\n dict.offset = [e.clientX, e.clientY];\r\n dict.index = that.index;\r\n dict.area = [\r\n layero.outerWidth()\r\n ,layero.outerHeight()\r\n ];\r\n \r\n othis.data(DATA_NAME[1], dict);\r\n ready.eventResizeElem = othis;\r\n ready.moveElem.css('cursor', 'se-resize').show();\r\n }\r\n \r\n e.preventDefault();\r\n });\r\n \r\n // 拖动元素,避免多次调用实例造成事件叠加\r\n if(ready.docEvent) return that;\r\n _DOC.on('mousemove', function(e){\r\n // 拖拽移动\r\n if(ready.eventMoveElem){\r\n var dict = ready.eventMoveElem.data(DATA_NAME[0]) || {}\r\n ,layero = dict.layero\r\n ,config = dict.config;\r\n \r\n var X = e.clientX - dict.offset[0];\r\n var Y = e.clientY - dict.offset[1];\r\n var fixed = layero.css('position') === 'fixed';\r\n \r\n e.preventDefault();\r\n \r\n dict.stX = fixed ? 0 : win.scrollLeft();\r\n dict.stY = fixed ? 0 : win.scrollTop();\r\n\r\n // 控制元素不被拖出窗口外\r\n if(!config.moveOut){\r\n var setRig = win.width() - layero.outerWidth() + dict.stX;\r\n var setBot = win.height() - layero.outerHeight() + dict.stY; \r\n X < dict.stX && (X = dict.stX);\r\n X > setRig && (X = setRig); \r\n Y < dict.stY && (Y = dict.stY);\r\n Y > setBot && (Y = setBot);\r\n }\r\n \r\n // 拖动时跟随鼠标位置\r\n layero.css({\r\n left: X,\r\n top: Y\r\n });\r\n }\r\n \r\n // Resize\r\n if(ready.eventResizeElem){\r\n var dict = ready.eventResizeElem.data(DATA_NAME[1]) || {};\r\n var config = dict.config;\r\n \r\n var X = e.clientX - dict.offset[0];\r\n var Y = e.clientY - dict.offset[1];\r\n \r\n e.preventDefault();\r\n \r\n // 拉伸宽高\r\n layer.style(dict.index, {\r\n width: dict.area[0] + X\r\n ,height: dict.area[1] + Y\r\n });\r\n \r\n config.resizing && config.resizing(dict.layero);\r\n }\r\n }).on('mouseup', function(e){\r\n if(ready.eventMoveElem){\r\n var dict = ready.eventMoveElem.data(DATA_NAME[0]) || {};\r\n var config = dict.config;\r\n \r\n ready.eventMoveElem.removeData(DATA_NAME[0]);\r\n delete ready.eventMoveElem;\r\n ready.moveElem.hide();\r\n config.moveEnd && config.moveEnd(dict.layero);\r\n }\r\n if(ready.eventResizeElem){\r\n ready.eventResizeElem.removeData(DATA_NAME[1]);\r\n delete ready.eventResizeElem;\r\n ready.moveElem.hide();\r\n }\r\n });\r\n \r\n ready.docEvent = true; // 已给 document 执行全局事件\r\n return that;\r\n};\r\n\r\nClass.pt.callback = function(){\r\n var that = this, layero = that.layero, config = that.config;\r\n that.openLayer();\r\n if(config.success){\r\n if(config.type == 2){\r\n layero.find('iframe').on('load', function(){\r\n config.success(layero, that.index, that);\r\n });\r\n } else {\r\n config.success(layero, that.index, that);\r\n }\r\n }\r\n layer.ie == 6 && that.IE6(layero);\r\n \r\n // 按钮\r\n layero.find('.'+ doms[6]).children('a').on('click', function(){\r\n var index = $(this).index();\r\n if(index === 0){\r\n if(config.yes){\r\n config.yes(that.index, layero, that);\r\n } else if(config['btn1']){\r\n config['btn1'](that.index, layero, that);\r\n } else {\r\n layer.close(that.index);\r\n }\r\n } else {\r\n var close = config['btn'+(index+1)] && config['btn'+(index+1)](that.index, layero, that);\r\n close === false || layer.close(that.index);\r\n }\r\n });\r\n \r\n // 取消\r\n function cancel(){\r\n var close = config.cancel && config.cancel(that.index, layero, that);\r\n close === false || layer.close(that.index);\r\n }\r\n \r\n // 右上角关闭回调\r\n layero.find('.'+ doms[7]).on('click', cancel);\r\n \r\n // 点遮罩关闭\r\n if(config.shadeClose){\r\n that.shadeo.on('click', function(){\r\n layer.close(that.index);\r\n });\r\n } \r\n \r\n // 最小化\r\n layero.find('.layui-layer-min').on('click', function(){\r\n var min = config.min && config.min(layero, that.index, that);\r\n min === false || layer.min(that.index, config);\r\n });\r\n \r\n // 全屏/还原\r\n layero.find('.layui-layer-max').on('click', function(){\r\n if($(this).hasClass('layui-layer-maxmin')){\r\n layer.restore(that.index);\r\n config.restore && config.restore(layero, that.index, that);\r\n } else {\r\n layer.full(that.index, config);\r\n setTimeout(function(){\r\n config.full && config.full(layero, that.index, that);\r\n }, 100);\r\n }\r\n });\r\n\r\n config.end && (ready.end[that.index] = config.end);\r\n};\r\n\r\n// for ie6 恢复 select\r\nready.reselect = function(){\r\n $.each($('select'), function(index , value){\r\n var sthis = $(this);\r\n if(!sthis.parents('.'+doms[0])[0]){\r\n (sthis.attr('layer') == 1 && $('.'+doms[0]).length < 1) && sthis.removeAttr('layer').show(); \r\n }\r\n sthis = null;\r\n });\r\n}; \r\n\r\nClass.pt.IE6 = function(layero){\r\n // 隐藏select\r\n $('select').each(function(index , value){\r\n var sthis = $(this);\r\n if(!sthis.parents('.'+doms[0])[0]){\r\n sthis.css('display') === 'none' || sthis.attr({'layer' : '1'}).hide();\r\n }\r\n sthis = null;\r\n });\r\n};\r\n\r\n// 需依赖原型的对外方法\r\nClass.pt.openLayer = function(){\r\n var that = this;\r\n \r\n // 置顶当前窗口\r\n layer.zIndex = that.config.zIndex;\r\n layer.setTop = function(layero){\r\n var setZindex = function(){\r\n layer.zIndex++;\r\n layero.css('z-index', layer.zIndex + 1);\r\n };\r\n layer.zIndex = parseInt(layero[0].style.zIndex);\r\n layero.on('mousedown', setZindex);\r\n return layer.zIndex;\r\n };\r\n};\r\n\r\n// 记录宽高坐标,用于还原\r\nready.record = function(layero){\r\n if(!layero[0]) return window.console && console.error('index error');\r\n var area = [\r\n layero[0].style.width || layero.width(),\r\n layero[0].style.height || layero.height(),\r\n layero.position().top, \r\n layero.position().left + parseFloat(layero.css('margin-left'))\r\n ];\r\n layero.find('.layui-layer-max').addClass('layui-layer-maxmin');\r\n layero.attr({area: area});\r\n};\r\n\r\n// 设置页面滚动条\r\nready.setScrollbar = function(index){\r\n doms.html.css('overflow', 'hidden').attr('layer-full', index);\r\n};\r\n\r\n// 恢复页面滚动条\r\nready.restScrollbar = function(index){\r\n if(doms.html.attr('layer-full') == index){\r\n doms.html[0].style[doms.html[0].style.removeProperty \r\n ? 'removeProperty' \r\n : 'removeAttribute']('overflow');\r\n doms.html.removeAttr('layer-full');\r\n }\r\n};\r\n\r\n/** 内置成员 */\r\n\r\nwindow.layer = layer;\r\n\r\n// 获取子 iframe 的 DOM\r\nlayer.getChildFrame = function(selector, index){\r\n index = index || $('.'+doms[4]).attr('times');\r\n return $('#'+ doms[0] + index).find('iframe').contents().find(selector); \r\n};\r\n\r\n// 得到当前 iframe 层的索引,子 iframe 时使用\r\nlayer.getFrameIndex = function(name){\r\n return $('#'+ name).parents('.'+doms[4]).attr('times');\r\n};\r\n\r\n// iframe 层自适应宽高\r\nlayer.iframeAuto = function(index){\r\n if(!index) return;\r\n var heg = layer.getChildFrame('html', index).outerHeight();\r\n var layero = $('#'+ doms[0] + index);\r\n var titHeight = layero.find(doms[1]).outerHeight() || 0;\r\n var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;\r\n layero.css({height: heg + titHeight + btnHeight});\r\n layero.find('iframe').css({height: heg});\r\n};\r\n\r\n// 重置 iframe url\r\nlayer.iframeSrc = function(index, url){\r\n $('#'+ doms[0] + index).find('iframe').attr('src', url);\r\n};\r\n\r\n// 设定层的样式\r\nlayer.style = function(index, options, limit){\r\n var layero = $('#'+ doms[0] + index);\r\n var contElem = layero.find('.layui-layer-content');\r\n var type = layero.attr('type');\r\n var titHeight = layero.find(doms[1]).outerHeight() || 0;\r\n var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;\r\n var minLeft = layero.attr('minLeft');\r\n \r\n // loading 和 tips 层不允许更改\r\n if(type === ready.type[3] || type === ready.type[4]){\r\n return;\r\n }\r\n \r\n if(!limit){\r\n if(parseFloat(options.width) <= 260){\r\n options.width = 260;\r\n }\r\n \r\n if(parseFloat(options.height) - titHeight - btnHeight <= 64){\r\n options.height = 64 + titHeight + btnHeight;\r\n }\r\n }\r\n layero.css(options);\r\n btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;\r\n \r\n if(type === ready.type[2]){\r\n layero.find('iframe').css({\r\n height: (typeof options.height === 'number' ? options.height : layero.height()) - titHeight - btnHeight\r\n });\r\n } else {\r\n contElem.css({\r\n height: (typeof options.height === 'number' ? options.height : layero.height()) - titHeight - btnHeight\r\n - parseFloat(contElem.css('padding-top'))\r\n - parseFloat(contElem.css('padding-bottom'))\r\n })\r\n }\r\n};\r\n\r\n// 最小化\r\nlayer.min = function(index, options){\r\n var layero = $('#'+ doms[0] + index);\r\n var maxminStatus = layero.data('maxminStatus');\r\n\r\n if(maxminStatus === 'min') return; // 当前的状态是否已经是最小化\r\n if(maxminStatus === 'max') layer.restore(index); // 若当前为最大化,则先还原后再最小化\r\n\r\n layero.data('maxminStatus', 'min');\r\n options = options || layero.data('config') || {};\r\n\r\n var shadeo = $('#'+ doms.SHADE + index);\r\n var elemMin = layero.find('.layui-layer-min');\r\n var titHeight = layero.find(doms[1]).outerHeight() || 0;\r\n var minLeft = layero.attr('minLeft'); // 最小化时的横坐标\r\n var hasMinLeft = typeof minLeft === 'string'; // 是否已经赋值过最小化坐标\r\n var left = hasMinLeft ? minLeft : (181*ready.minStackIndex)+'px';\r\n var position = layero.css('position');\r\n var minWidth = 180; // 最小化时的宽度\r\n var settings = {\r\n width: minWidth\r\n ,height: titHeight\r\n ,position: 'fixed'\r\n ,overflow: 'hidden'\r\n };\r\n\r\n ready.record(layero); // 记录当前尺寸、坐标,用于还原\r\n\r\n // 简易最小化补位\r\n if(ready.minStackArr.length > 0){\r\n left = ready.minStackArr[0];\r\n ready.minStackArr.shift();\r\n }\r\n\r\n // left 是否超出边界\r\n if(parseFloat(left) + minWidth > win.width()){\r\n left = win.width() - minWidth - function(){\r\n ready.minStackArr.edgeIndex = ready.minStackArr.edgeIndex || 0;\r\n return ready.minStackArr.edgeIndex += 3;\r\n }();\r\n if(left < 0) left = 0;\r\n }\r\n \r\n // 是否堆叠在左下角\r\n if(options.minStack){\r\n settings.left = left;\r\n settings.top = win.height() - titHeight;\r\n hasMinLeft || ready.minStackIndex++; // 若未赋值过最小化坐标,则最小化操作索引自增\r\n layero.attr('minLeft', left);\r\n }\r\n \r\n layero.attr('position', position);\r\n layer.style(index, settings, true);\r\n\r\n elemMin.hide();\r\n layero.attr('type') === 'page' && layero.find(doms[4]).hide();\r\n ready.restScrollbar(index);\r\n\r\n // 隐藏遮罩\r\n shadeo.hide();\r\n};\r\n\r\n// 还原\r\nlayer.restore = function(index){\r\n var layero = $('#'+ doms[0] + index);\r\n var shadeo = $('#'+ doms.SHADE + index);\r\n var area = layero.attr('area').split(',');\r\n var type = layero.attr('type');\r\n var options = layero.data('config') || {};\r\n\r\n layero.removeData('maxminStatus'); // 移除最大最小状态\r\n \r\n // 恢复原来尺寸\r\n layer.style(index, {\r\n width: area[0], // 数值或百分比\r\n height: area[1],\r\n top: parseFloat(area[2]),\r\n left: parseFloat(area[3]),\r\n position: layero.attr('position'),\r\n overflow: 'visible'\r\n }, true);\r\n \r\n layero.find('.layui-layer-max').removeClass('layui-layer-maxmin');\r\n layero.find('.layui-layer-min').show();\r\n type === 'page' && layero.find(doms[4]).show();\r\n\r\n // 恢复页面滚动条弹层打开时的状态\r\n options.scrollbar ? ready.restScrollbar(index) : ready.setScrollbar(index);\r\n \r\n // 恢复遮罩\r\n shadeo.show();\r\n // ready.events.resize[index](); // ?\r\n};\r\n\r\n// 全屏(最大化)\r\nlayer.full = function(index){\r\n var layero = $('#'+ doms[0] + index);\r\n var maxminStatus = layero.data('maxminStatus');\r\n\r\n if(maxminStatus === 'max') return // 检查当前的状态是否已经是最大化\r\n if(maxminStatus === 'min') layer.restore(index); // 若当前为最小化,则先还原后再最大化\r\n\r\n layero.data('maxminStatus', 'max');\r\n ready.record(layero); // 记录当前尺寸、坐标\r\n\r\n if(!doms.html.attr('layer-full')){\r\n ready.setScrollbar(index);\r\n }\r\n\r\n setTimeout(function(){\r\n var isfix = layero.css('position') === 'fixed';\r\n layer.style(index, {\r\n top: isfix ? 0 : win.scrollTop(),\r\n left: isfix ? 0 : win.scrollLeft(),\r\n width: '100%',\r\n height: '100%'\r\n }, true);\r\n layero.find('.layui-layer-min').hide();\r\n }, 100);\r\n};\r\n\r\n// 改变 title\r\nlayer.title = function(name, index){\r\n var title = $('#'+ doms[0] + (index || layer.index)).find(doms[1]);\r\n title.html(name);\r\n};\r\n\r\n// 关闭 layer 总方法\r\nlayer.close = function(index, callback){\r\n var layero = function(){\r\n var closest = $('.'+ doms[0]).children('#'+ index).closest('.'+ doms[0]);\r\n return closest[0] ? (\r\n index = closest.attr('times'),\r\n closest\r\n ) : $('#'+ doms[0] + index)\r\n }();\r\n var type = layero.attr('type');\r\n var options = layero.data('config') || {};\r\n var hideOnClose = options.id && options.hideOnClose; // 是否关闭时移除弹层容器\r\n\r\n if(!layero[0]) return;\r\n\r\n // 关闭动画\r\n var closeAnim = ({\r\n slideDown: 'layer-anim-slide-down-out',\r\n slideLeft: 'layer-anim-slide-left-out',\r\n slideUp: 'layer-anim-slide-up-out',\r\n slideRight: 'layer-anim-slide-right-out'\r\n })[options.anim] || 'layer-anim-close';\r\n\r\n // 移除主容器\r\n var remove = function(){\r\n var WRAP = 'layui-layer-wrap';\r\n\r\n // 是否关闭时隐藏弹层容器\r\n if(hideOnClose){\r\n layero.removeClass('layer-anim '+ closeAnim);\r\n return layero.hide();\r\n }\r\n\r\n // 是否为页面捕获层\r\n if(type === ready.type[1] && layero.attr('conType') === 'object'){\r\n layero.children(':not(.'+ doms[5] +')').remove();\r\n var wrap = layero.find('.'+WRAP);\r\n for(var i = 0; i < 2; i++){\r\n wrap.unwrap();\r\n }\r\n wrap.css('display', wrap.data('display')).removeClass(WRAP);\r\n } else {\r\n // 低版本 IE 回收 iframe\r\n if(type === ready.type[2]){\r\n try {\r\n var iframe = $('#'+ doms[4] + index)[0];\r\n iframe.contentWindow.document.write('');\r\n iframe.contentWindow.close();\r\n layero.find('.'+doms[5])[0].removeChild(iframe);\r\n } catch(e){}\r\n }\r\n layero[0].innerHTML = '';\r\n layero.remove();\r\n }\r\n\r\n typeof ready.end[index] === 'function' && ready.end[index]();\r\n delete ready.end[index];\r\n typeof callback === 'function' && callback();\r\n\r\n // 移除 reisze 事件\r\n if(ready.events.resize[index]){\r\n win.off('resize', ready.events.resize[index]);\r\n delete ready.events.resize[index];\r\n }\r\n };\r\n // 移除遮罩\r\n var removeShade = (function fn(){\r\n $('#'+ doms.SHADE + index)[\r\n hideOnClose ? 'hide' : 'remove'\r\n ]();\r\n })();\r\n \r\n // 是否允许关闭动画\r\n if(options.isOutAnim){\r\n layero.addClass('layer-anim '+ closeAnim);\r\n }\r\n \r\n layer.ie == 6 && ready.reselect();\r\n ready.restScrollbar(index); \r\n \r\n // 记住被关闭层的最小化堆叠坐标\r\n if(typeof layero.attr('minLeft') === 'string'){\r\n ready.minStackIndex--;\r\n ready.minStackArr.push(layero.attr('minLeft'));\r\n }\r\n \r\n if((layer.ie && layer.ie < 10) || !options.isOutAnim){\r\n remove()\r\n } else {\r\n setTimeout(function(){\r\n remove();\r\n }, 200);\r\n }\r\n};\r\n\r\n// 关闭所有层\r\nlayer.closeAll = function(type, callback){\r\n if(typeof type === 'function'){\r\n callback = type;\r\n type = null;\r\n }\r\n var domsElem = $('.'+doms[0]);\r\n $.each(domsElem, function(_index){\r\n var othis = $(this);\r\n var is = type ? (othis.attr('type') === type) : 1;\r\n is && layer.close(othis.attr('times'), _index === domsElem.length - 1 ? callback : null);\r\n is = null;\r\n });\r\n if(domsElem.length === 0) typeof callback === 'function' && callback();\r\n};\r\n\r\n// 根据弹层类型关闭最近打开的层\r\nlayer.closeLast = function(type){\r\n type = type || 'page';\r\n layer.close($('.layui-layer-'+ type +':last').attr(\"times\"));\r\n};\r\n\r\n\r\n/*\r\n * 拓展模块,layui 开始合并在一起\r\n */\r\n\r\n\r\nvar cache = layer.cache || {};\r\nvar skin = function(type){\r\n return (cache.skin ? (' ' + cache.skin + ' ' + cache.skin + '-'+type) : '');\r\n}; \r\n \r\n// 仿系统 prompt\r\nlayer.prompt = function(options, yes){\r\n var style = '', placeholder = '';\r\n options = options || {};\r\n \r\n if(typeof options === 'function') yes = options;\r\n \r\n if(options.area){\r\n var area = options.area;\r\n style = 'style=\"width: '+ area[0] +'; height: '+ area[1] + ';\"';\r\n delete options.area;\r\n }\r\n if (options.placeholder) {\r\n placeholder = ' placeholder=\"' + options.placeholder + '\"';\r\n }\r\n var prompt, content = options.formType == 2 ? '' : function () {\r\n return '';\r\n }();\r\n \r\n var success = options.success;\r\n delete options.success;\r\n \r\n return layer.open($.extend({\r\n type: 1,\r\n btn: ['确定','取消'],\r\n content: content,\r\n skin: 'layui-layer-prompt' + skin('prompt'),\r\n maxWidth: win.width(),\r\n success: function(layero){\r\n prompt = layero.find('.layui-layer-input');\r\n prompt.val(options.value || '').focus();\r\n typeof success === 'function' && success(layero);\r\n },\r\n resize: false,\r\n yes: function(index){\r\n var value = prompt.val();\r\n if(value.length > (options.maxlength||500)) {\r\n layer.tips('最多输入'+ (options.maxlength || 500) +'个字数', prompt, {tips: 1});\r\n } else {\r\n yes && yes(value, index, prompt);\r\n }\r\n }\r\n }, options));\r\n};\r\n\r\n// tab 层\r\nlayer.tab = function(options){\r\n options = options || {};\r\n \r\n var tab = options.tab || {};\r\n var THIS = 'layui-this';\r\n var success = options.success;\r\n \r\n delete options.success;\r\n \r\n return layer.open($.extend({\r\n type: 1,\r\n skin: 'layui-layer-tab' + skin('tab'),\r\n resize: false,\r\n title: function(){\r\n var len = tab.length, ii = 1, str = '';\r\n if(len > 0){\r\n str = ''+ tab[0].title +'';\r\n for(; ii < len; ii++){\r\n str += ''+ tab[ii].title +'';\r\n }\r\n }\r\n return str;\r\n }(),\r\n content: '
                      '+ function(){\r\n var len = tab.length, ii = 1, str = '';\r\n if(len > 0){\r\n str = '
                    • '+ (tab[0].content || 'no content') +'
                    • ';\r\n for(; ii < len; ii++){\r\n str += '
                    • '+ (tab[ii].content || 'no content') +'
                    • ';\r\n }\r\n }\r\n return str;\r\n }() +'
                    ',\r\n success: function(layero){\r\n var btn = layero.find('.layui-layer-title').children();\r\n var main = layero.find('.layui-layer-tabmain').children();\r\n btn.on('mousedown', function(e){\r\n e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;\r\n var othis = $(this), index = othis.index();\r\n othis.addClass(THIS).siblings().removeClass(THIS);\r\n main.eq(index).show().siblings().hide();\r\n typeof options.change === 'function' && options.change(index);\r\n });\r\n typeof success === 'function' && success(layero);\r\n }\r\n }, options));\r\n};\r\n\r\n// 图片层\r\nlayer.photos = function(options, loop, key){\r\n var dict = {};\r\n\r\n // 默认属性\r\n options = $.extend(true, {\r\n toolbar: true,\r\n footer: true\r\n }, options);\r\n\r\n if(!options.photos) return;\r\n \r\n // 若 photos 并非选择器或 jQuery 对象,则为普通 object\r\n var isObject = !(typeof options.photos === 'string' || options.photos instanceof $);\r\n var photos = isObject ? options.photos : {};\r\n var data = photos.data || [];\r\n var start = photos.start || 0;\r\n var success = options.success;\r\n \r\n dict.imgIndex = (start|0) + 1;\r\n options.img = options.img || 'img';\r\n delete options.success;\r\n \r\n // 若 options.photos 不是一个对象\r\n if(!isObject){ // 页面直接获取\r\n var parent = $(options.photos), pushData = function(){\r\n data = [];\r\n parent.find(options.img).each(function(index){\r\n var othis = $(this);\r\n othis.attr('layer-index', index);\r\n data.push({\r\n alt: othis.attr('alt'),\r\n pid: othis.attr('layer-pid'),\r\n src: othis.attr('lay-src') || othis.attr('layer-src') || othis.attr('src'),\r\n thumb: othis.attr('src')\r\n });\r\n });\r\n };\r\n \r\n pushData();\r\n \r\n if (data.length === 0) return;\r\n \r\n loop || parent.on('click', options.img, function(){\r\n pushData();\r\n var othis = $(this), index = othis.attr('layer-index'); \r\n layer.photos($.extend(options, {\r\n photos: {\r\n start: index,\r\n data: data,\r\n tab: options.tab\r\n },\r\n full: options.full\r\n }), true);\r\n });\r\n \r\n // 不直接弹出\r\n if (!loop) return;\r\n } else if (data.length === 0){\r\n return layer.msg('没有图片');\r\n }\r\n \r\n // 上一张\r\n dict.imgprev = function(key){\r\n dict.imgIndex--;\r\n if(dict.imgIndex < 1){\r\n dict.imgIndex = data.length;\r\n }\r\n dict.tabimg(key);\r\n };\r\n \r\n // 下一张\r\n dict.imgnext = function(key,errorMsg){\r\n dict.imgIndex++;\r\n if(dict.imgIndex > data.length){\r\n dict.imgIndex = 1;\r\n if (errorMsg) {return}\r\n }\r\n dict.tabimg(key)\r\n };\r\n \r\n // 方向键\r\n dict.keyup = function(event){\r\n if(!dict.end){\r\n var code = event.keyCode;\r\n event.preventDefault();\r\n if(code === 37){\r\n dict.imgprev(true);\r\n } else if(code === 39) {\r\n dict.imgnext(true);\r\n } else if(code === 27) {\r\n layer.close(dict.index);\r\n }\r\n }\r\n }\r\n \r\n // 切换\r\n dict.tabimg = function(key){\r\n if(data.length <= 1) return;\r\n photos.start = dict.imgIndex - 1;\r\n layer.close(dict.index);\r\n return layer.photos(options, true, key);\r\n }\r\n\r\n dict.isNumber = function (n) {\r\n return typeof n === 'number' && !isNaN(n);\r\n }\r\n\r\n dict.image = {};\r\n\r\n dict.getTransform = function(opts){\r\n var transforms = [];\r\n var rotate = opts.rotate;\r\n var scaleX = opts.scaleX;\r\n var scale = opts.scale;\r\n\r\n if (dict.isNumber(rotate) && rotate !== 0) {\r\n transforms.push('rotate(' + rotate + 'deg)');\r\n }\r\n\r\n if (dict.isNumber(scaleX) && scaleX !== 1) {\r\n transforms.push('scaleX(' + scaleX + ')');\r\n }\r\n\r\n if (dict.isNumber(scale)) {\r\n transforms.push('scale(' + scale + ')');\r\n }\r\n\r\n return transforms.length ? transforms.join(' ') : 'none';\r\n }\r\n \r\n // 一些动作\r\n dict.event = function(layero, index, that){\r\n // 上一张\r\n dict.main.find('.layui-layer-photos-prev').on('click', function(event){\r\n event.preventDefault();\r\n dict.imgprev(true);\r\n }); \r\n \r\n // 下一张\r\n dict.main.find('.layui-layer-photos-next').on('click', function(event){\r\n event.preventDefault();\r\n dict.imgnext(true);\r\n });\r\n \r\n $(document).on('keyup', dict.keyup);\r\n\r\n // 头部工具栏事件\r\n layero.off('click').on('click','*[toolbar-event]', function () {\r\n var othis = $(this);\r\n var event = othis.attr('toolbar-event');\r\n switch (event) {\r\n case 'rotate':\r\n dict.image.rotate = ((dict.image.rotate || 0) + Number(othis.attr('data-option'))) % 360;\r\n dict.imgElem.css({\r\n transform: dict.getTransform(dict.image)\r\n });\r\n break;\r\n case 'scalex':\r\n dict.image.scaleX = dict.image.scaleX === -1 ? 1 : -1;\r\n dict.imgElem.css({\r\n transform: dict.getTransform(dict.image)\r\n });\r\n break;\r\n case 'zoom':\r\n var ratio = Number(othis.attr('data-option'));\r\n dict.image.scale = (dict.image.scale || 1) + ratio;\r\n // 缩小状态最小值\r\n if (ratio < 0 && dict.image.scale < 0 - ratio) {\r\n dict.image.scale = 0 - ratio;\r\n }\r\n dict.imgElem.css({\r\n transform: dict.getTransform(dict.image)\r\n });\r\n break;\r\n case 'reset':\r\n dict.image.scaleX = 1;\r\n dict.image.scale = 1;\r\n dict.image.rotate = 0;\r\n dict.imgElem.css({\r\n transform: 'none'\r\n });\r\n break;\r\n case 'close':\r\n layer.close(index);\r\n break;\r\n }\r\n that.offset();\r\n that.auto(index);\r\n });\r\n \r\n // 鼠标滚轮缩放图片事件\r\n dict.main.children('img').on('mousewheel DOMMouseScroll', function(e) {\r\n var delta = e.originalEvent.wheelDelta || -e.originalEvent.detail;\r\n var zoomElem = dict.main.find('[toolbar-event=\"zoom\"]');\r\n if (delta > 0) {\r\n zoomElem.eq(0).trigger('click');\r\n } else {\r\n zoomElem.eq(1).trigger('click');\r\n }\r\n });\r\n\r\n };\r\n \r\n // 图片预加载\r\n function loadImage(url, callback, error) { \r\n var img = new Image();\r\n img.src = url; \r\n if(img.complete){\r\n return callback(img);\r\n }\r\n img.onload = function(){\r\n img.onload = null;\r\n callback(img);\r\n };\r\n img.onerror = function(e){\r\n img.onerror = null;\r\n error(e);\r\n }; \r\n }\r\n \r\n dict.loadi = layer.load(1, {\r\n shade: 'shade' in options ? false : 0.9,\r\n scrollbar: false\r\n });\r\n\r\n loadImage(data[start].src, function(img){\r\n layer.close(dict.loadi);\r\n \r\n var alt = data[start].alt || '';\r\n\r\n // 切换图片时不出现动画\r\n if(key) options.anim = -1;\r\n \r\n // 弹出图片层\r\n dict.index = layer.open($.extend({\r\n type: 1,\r\n id: 'layui-layer-photos',\r\n area: function(){\r\n var imgarea = [img.width, img.height];\r\n var winarea = [$(window).width() - 100, $(window).height() - 100];\r\n \r\n // 若实际图片的宽或者高比 屏幕大(那么进行缩放)\r\n if(!options.full && (imgarea[0]>winarea[0]||imgarea[1]>winarea[1])){\r\n var wh = [imgarea[0]/winarea[0],imgarea[1]/winarea[1]];// 取宽度缩放比例、高度缩放比例\r\n if(wh[0] > wh[1]){// 取缩放比例最大的进行缩放\r\n imgarea[0] = imgarea[0]/wh[0];\r\n imgarea[1] = imgarea[1]/wh[0];\r\n } else if(wh[0] < wh[1]){\r\n imgarea[0] = imgarea[0]/wh[1];\r\n imgarea[1] = imgarea[1]/wh[1];\r\n }\r\n }\r\n\r\n return [imgarea[0]+'px', imgarea[1]+'px']; \r\n }(),\r\n title: false,\r\n shade: 0.9,\r\n shadeClose: true,\r\n closeBtn: false,\r\n move: '.layer-layer-photos-main img',\r\n moveType: 1,\r\n scrollbar: false,\r\n moveOut: true,\r\n anim: 5,\r\n isOutAnim: false,\r\n skin: 'layui-layer-photos' + skin('photos'),\r\n content: '
                    '\r\n + '\"'+'\r\n + function(){\r\n var arr = ['
                    '];\r\n\r\n // 左右箭头翻页\r\n if (data.length > 1) {\r\n arr.push(['
                    ',\r\n '',\r\n '',\r\n '
                    '].join(''));\r\n }\r\n\r\n // 头部工具栏\r\n if (options.toolbar) {\r\n arr.push([\r\n '
                    ',\r\n '',\r\n '',\r\n '',\r\n '',\r\n '',\r\n '',\r\n '
                    '\r\n ].join(''));\r\n }\r\n\r\n // 底部栏\r\n if (options.footer) {\r\n arr.push(['
                    ',\r\n '

                    '+ alt +'

                    ',\r\n ''+ dict.imgIndex +' / '+ data.length +'',\r\n '查看原图',\r\n '
                    '].join(''));\r\n }\r\n\r\n arr.push('
                    ');\r\n return arr.join('');\r\n }()\r\n +'
                    ',\r\n success: function(layero, index, that){\r\n dict.main = layero.find('.layer-layer-photos-main');\r\n dict.footer = layero.find('.layui-layer-photos-footer');\r\n dict.imgElem = dict.main.children('img');\r\n dict.event(layero, index, that);\r\n options.tab && options.tab(data[start], layero);\r\n typeof success === 'function' && success(layero);\r\n }, end: function(){\r\n dict.end = true;\r\n $(document).off('keyup', dict.keyup);\r\n }\r\n }, options));\r\n }, function(){\r\n layer.close(dict.loadi);\r\n layer.msg('当前图片地址异常
                    是否继续查看下一张?', {\r\n time: 30000, \r\n btn: ['下一张', '不看了'], \r\n yes: function(){\r\n data.length > 1 && dict.imgnext(true,true);\r\n }\r\n });\r\n });\r\n};\r\n\r\n// 主入口\r\nready.run = function(_$){\r\n $ = _$;\r\n win = $(window);\r\n \r\n // 移动端兼容性处理\r\n // https://gitee.com/layui/layui/issues/I81WGC\r\n // https://github.com/jquery/jquery/issues/1729\r\n var agent = navigator.userAgent.toLowerCase();\r\n var isMobile = /android|iphone|ipod|ipad|ios/.test(agent)\r\n var _win = $(window);\r\n if(isMobile){\r\n $.each({Height: \"height\", Width: \"width\"}, function(propSuffix, funcName){\r\n var propName = 'inner' + propSuffix;\r\n win[funcName] = function(){\r\n return propName in window \r\n ? window[propName]\r\n : _win[funcName]()\r\n }\r\n })\r\n }\r\n doms.html = $('html');\r\n layer.open = function(deliver){\r\n var o = new Class(deliver);\r\n return o.index;\r\n };\r\n};\r\n\r\n// 加载方式\r\nwindow.layui && layui.define ? (\r\n layer.ready(),\r\n layui.define('jquery', function(exports){ // layui\r\n layer.path = layui.cache.dir;\r\n ready.run(layui.$);\r\n\r\n // export api\r\n window.layer = layer;\r\n exports('layer', layer);\r\n })\r\n) : (\r\n (typeof define === 'function' && define.amd) ? define(['jquery'], function(){ // requirejs\r\n ready.run(window.jQuery);\r\n return layer;\r\n }) : function(){ // 普通 script 标签引入\r\n layer.ready();\r\n ready.run(window.jQuery);\r\n }()\r\n);\r\n\r\n}(window);\r\n","/**\r\n * util 工具组件\r\n */\r\n\r\nlayui.define('jquery', function(exports){\r\n \"use strict\";\r\n\r\n var $ = layui.$;\r\n var hint = layui.hint();\r\n\r\n // 外部接口\r\n var util = {\r\n // 固定块\r\n fixbar: function(options){\r\n var ELEM = 'layui-fixbar';\r\n var $doc = $(document);\r\n\r\n // 默认可选项\r\n options = $.extend(true, {\r\n target: 'body', // fixbar 的插入目标选择器\r\n bars: [], // bar 信息\r\n \"default\": true, // 是否显示默认 bar\r\n margin: 160, // 出现 top bar 的滚动条高度临界值\r\n duration: 320 // top bar 等动画时长(毫秒)\r\n }, options);\r\n\r\n // 目标元素对象\r\n var $target = $(options.target);\r\n\r\n // 滚动条所在元素对象\r\n var $scroll = options.scroll\r\n ? $(options.scroll)\r\n : $(options.target === 'body' ? $doc : $target)\r\n\r\n // 是否提供默认图标\r\n if(options['default']){\r\n // 兼容旧版本的一些属性\r\n if(options.bar1){\r\n options.bars.push({\r\n type: 'bar1',\r\n icon: 'layui-icon-chat'\r\n });\r\n }\r\n if(options.bar2){\r\n options.bars.push({\r\n type: 'bar2',\r\n icon: 'layui-icon-help'\r\n });\r\n }\r\n // 默认 top bar\r\n options.bars.push({\r\n type: 'top',\r\n icon: 'layui-icon-top'\r\n });\r\n }\r\n\r\n var elem = $('
                      ').addClass(ELEM);\r\n var elemTopBar;\r\n\r\n // 遍历生成 bars 节点\r\n layui.each(options.bars, function(i, item){\r\n var elemBar = $('
                    • ');\r\n\r\n // 设置 bar 相关属性\r\n elemBar.addClass(item.icon).attr({\r\n 'lay-type': item.type,\r\n 'style': item.style || (options.bgcolor ? 'background-color: '+ options.bgcolor : '')\r\n }).html(item.content);\r\n\r\n // bar 点击事件\r\n elemBar.on('click', function(){\r\n var type = $(this).attr('lay-type');\r\n if(type === 'top'){\r\n (\r\n options.target === 'body'\r\n ? $('html,body')\r\n : $scroll\r\n ).animate({\r\n scrollTop : 0\r\n }, options.duration);\r\n }\r\n typeof options.click === 'function' && options.click.call(this, type);\r\n });\r\n\r\n // 自定义任意事件\r\n if(layui.type(options.on) === 'object'){\r\n layui.each(options.on, function(eventName, callback){\r\n elemBar.on(eventName, function(){\r\n var type = $(this).attr('lay-type');\r\n typeof callback === 'function' && callback.call(this, type);\r\n });\r\n })\r\n }\r\n\r\n // 获得 top bar 节点\r\n if(item.type === 'top'){\r\n elemBar.addClass('layui-fixbar-top');\r\n elemTopBar = elemBar;\r\n }\r\n\r\n elem.append(elemBar); // 插入 bar 节点\r\n });\r\n\r\n // 若目标元素已存在 fixbar,则移除旧的节点\r\n $target.find('.'+ ELEM).remove();\r\n\r\n // 向目标元素插入 fixbar 节点\r\n typeof options.css === 'object' && elem.css(options.css);\r\n $target.append(elem);\r\n\r\n // top bar 的显示隐藏\r\n if(elemTopBar){\r\n var lock;\r\n var setTopBar = (function setTopBar(){\r\n var top = $scroll.scrollTop();\r\n if(top >= options.margin){\r\n lock || (elemTopBar.show(), lock = 1);\r\n } else {\r\n lock && (elemTopBar.hide(), lock = 0);\r\n }\r\n return setTopBar;\r\n })();\r\n }\r\n\r\n // 根据 scrollbar 设置 fixbar 相关状态\r\n var timer;\r\n $scroll.on('scroll', function(){\r\n if(!setTopBar) return;\r\n clearTimeout(timer);\r\n timer = setTimeout(function(){\r\n setTopBar();\r\n }, 100);\r\n });\r\n },\r\n\r\n // 倒计时\r\n countdown: function(options){\r\n var that = this;\r\n\r\n // 默认可选项\r\n options = $.extend(true, {\r\n date: new Date(),\r\n now: new Date()\r\n }, options);\r\n\r\n // 兼容旧版参数\r\n var args = arguments;\r\n if(args.length > 1){\r\n options.date = new Date(args[0]);\r\n options.now = new Date(args[1]);\r\n options.clock = args[2];\r\n }\r\n\r\n // 实例对象\r\n var inst = {\r\n options: options,\r\n clear: function(){ // 清除计时器\r\n clearTimeout(inst.timer);\r\n },\r\n reload: function(opts){ // 重置倒计时\r\n this.clear();\r\n $.extend(true, this.options, {\r\n now: new Date()\r\n }, opts);\r\n count();\r\n }\r\n };\r\n\r\n typeof options.ready === 'function' && options.ready();\r\n\r\n // 计算倒计时\r\n var count = (function fn(){\r\n var date = new Date(options.date);\r\n var now = new Date(options.now);\r\n var countTime = function(time){\r\n return time > 0 ? time : 0;\r\n }(date.getTime() - now.getTime());\r\n var result = {\r\n d: Math.floor(countTime/(1000*60*60*24)), // 天\r\n h: Math.floor(countTime/(1000*60*60)) % 24, // 时\r\n m: Math.floor(countTime/(1000*60)) % 60, // 分\r\n s: Math.floor(countTime/1000) % 60 // 秒\r\n };\r\n var next = function(){\r\n now.setTime(now.getTime() + 1000);\r\n options.now = now;\r\n count();\r\n };\r\n\r\n // 兼容旧版返回值\r\n if(args.length > 1) result = [result.d,result.h,result.m,result.s]\r\n\r\n // 计时 - 以秒间隔\r\n inst.timer = setTimeout(next, 1000);\r\n typeof options.clock === 'function' && options.clock(result, inst);\r\n\r\n // 计时完成\r\n if(countTime <= 0){\r\n clearTimeout(inst.timer);\r\n typeof options.done === 'function' && options.done(result, inst);\r\n }\r\n\r\n return fn;\r\n })();\r\n\r\n return inst;\r\n },\r\n\r\n // 某个时间在当前时间的多久前\r\n timeAgo: function(time, onlyDate){\r\n var that = this;\r\n var arr = [[], []];\r\n var stamp = new Date().getTime() - new Date(time).getTime();\r\n\r\n // 返回具体日期\r\n if(stamp > 1000*60*60*24*31){\r\n stamp = new Date(time);\r\n arr[0][0] = that.digit(stamp.getFullYear(), 4);\r\n arr[0][1] = that.digit(stamp.getMonth() + 1);\r\n arr[0][2] = that.digit(stamp.getDate());\r\n\r\n // 是否输出时间\r\n if(!onlyDate){\r\n arr[1][0] = that.digit(stamp.getHours());\r\n arr[1][1] = that.digit(stamp.getMinutes());\r\n arr[1][2] = that.digit(stamp.getSeconds());\r\n }\r\n return arr[0].join('-') + ' ' + arr[1].join(':');\r\n }\r\n\r\n // 30 天以内,返回「多久前」\r\n if(stamp >= 1000*60*60*24){\r\n return ((stamp/1000/60/60/24)|0) + ' 天前';\r\n } else if(stamp >= 1000*60*60){\r\n return ((stamp/1000/60/60)|0) + ' 小时前';\r\n } else if(stamp >= 1000*60*3){ // 3 分钟以内为:刚刚\r\n return ((stamp/1000/60)|0) + ' 分钟前';\r\n } else if(stamp < 0){\r\n return '未来';\r\n } else {\r\n return '刚刚';\r\n }\r\n },\r\n\r\n // 数字前置补零\r\n digit: function(num, length){\r\n var str = '';\r\n num = String(num);\r\n length = length || 2;\r\n for(var i = num.length; i < length; i++){\r\n str += '0';\r\n }\r\n return num < Math.pow(10, length) ? str + (num|0) : num;\r\n },\r\n\r\n // 转化为日期格式字符\r\n toDateString: function(time, format, options){\r\n // 若 null 或空字符,则返回空字符\r\n if(time === null || time === '') return '';\r\n\r\n // 引用自 dayjs\r\n // https://github.com/iamkun/dayjs/blob/v1.11.9/src/constant.js#L30\r\n var REGEX_FORMAT = /\\[([^\\]]+)]|y{1,4}|M{1,2}|d{1,2}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|SSS/g;\r\n var that = this;\r\n var date = new Date(function(){\r\n if(!time) return;\r\n return isNaN(time) ? time : (typeof time === 'string' ? parseInt(time) : time)\r\n }() || new Date())\r\n\r\n if(!date.getDate()) return hint.error('Invalid millisecond for \"util.toDateString(millisecond)\"'), '';\r\n\r\n var years = date.getFullYear();\r\n var month = date.getMonth();\r\n var days = date.getDate();\r\n var hours = date.getHours();\r\n var minutes = date.getMinutes();\r\n var seconds = date.getSeconds();\r\n var milliseconds = date.getMilliseconds();\r\n\r\n var defaultMeridiem = function(hours, minutes){\r\n var hm = hours * 100 + minutes;\r\n if (hm < 600) {\r\n return '凌晨';\r\n } else if (hm < 900) {\r\n return '早上';\r\n } else if (hm < 1100) {\r\n return '上午';\r\n } else if (hm < 1300) {\r\n return '中午';\r\n } else if (hm < 1800) {\r\n return '下午';\r\n }\r\n return '晚上';\r\n };\r\n\r\n var meridiem = (options && options.customMeridiem) || defaultMeridiem;\r\n\r\n var matches = {\r\n yy: function(){return String(years).slice(-2);},\r\n yyyy: function(){return that.digit(years, 4);},\r\n M: function(){return String(month + 1);},\r\n MM: function(){return that.digit(month + 1);},\r\n d: function(){return String(days);},\r\n dd: function(){return that.digit(days);},\r\n H: function(){return String(hours);},\r\n HH: function(){return that.digit(hours);},\r\n h: function(){return String(hours % 12 || 12);},\r\n hh: function(){return that.digit(hours % 12 || 12);},\r\n A: function(){return meridiem(hours, minutes);},\r\n m: function(){return String(minutes);},\r\n mm: function(){return that.digit(minutes);},\r\n s: function(){return String(seconds);},\r\n ss: function(){return that.digit(seconds);},\r\n SSS: function(){return that.digit(milliseconds, 3);}\r\n }\r\n\r\n format = format || 'yyyy-MM-dd HH:mm:ss';\r\n\r\n return format.replace(REGEX_FORMAT, function(match, $1) {\r\n return $1 || (matches[match] && matches[match]()) || match;\r\n });\r\n },\r\n\r\n // 转义 html\r\n escape: function(html){\r\n var exp = /[<\"'>]|&(?=#[a-zA-Z0-9]+)/g;\r\n if(html === undefined || html === null) return '';\r\n\r\n html += '';\r\n if(!exp.test(html)) return html;\r\n\r\n return html.replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&')\r\n .replace(//g, '>')\r\n .replace(/'/g, ''').replace(/\"/g, '"');\r\n },\r\n\r\n // 还原转义的 html\r\n unescape: function(html){\r\n if(html === undefined || html === null) html = '';\r\n html += '';\r\n\r\n return html.replace(/\\&/g, '&')\r\n .replace(/\\</g, '<').replace(/\\>/g, '>')\r\n .replace(/\\'/g, '\\'').replace(/\\"/g, '\"');\r\n },\r\n\r\n // 打开新窗口\r\n openWin: function(options){\r\n var win;\r\n options = options || {};\r\n win = options.window || window.open((options.url || ''), options.target, options.specs);\r\n if(options.url) return;\r\n win.document.open('text/html', 'replace');\r\n win.document.write(options.content || '');\r\n win.document.close();\r\n },\r\n\r\n // 让指定的元素保持在可视区域\r\n toVisibleArea: function(options){\r\n options = $.extend({\r\n margin: 160, // 触发动作的边界值\r\n duration: 200, // 动画持续毫秒数\r\n type: 'y' // 触发方向,x 水平、y 垂直\r\n }, options);\r\n\r\n if(!options.scrollElem[0] || !options.thisElem[0]) return;\r\n\r\n var scrollElem = options.scrollElem // 滚动元素\r\n var thisElem = options.thisElem // 目标元素\r\n var vertical = options.type === 'y' // 是否垂直方向\r\n var SCROLL_NAME = vertical ? 'scrollTop' : 'scrollLeft' // 滚动方法\r\n var OFFSET_NAME = vertical ? 'top' : 'left' // 坐标方式\r\n var scrollValue = scrollElem[SCROLL_NAME]() // 当前滚动距离\r\n var size = scrollElem[vertical ? 'height' : 'width']() // 滚动元素的尺寸\r\n var scrollOffset = scrollElem.offset()[OFFSET_NAME] // 滚动元素所处位置\r\n var thisOffset = thisElem.offset()[OFFSET_NAME] - scrollOffset // 目标元素当前的所在位置\r\n var obj = {};\r\n\r\n // 边界满足条件\r\n if(thisOffset > size - options.margin || thisOffset < options.margin){\r\n obj[SCROLL_NAME] = thisOffset - size/2 + scrollValue\r\n scrollElem.animate(obj, options.duration);\r\n }\r\n },\r\n\r\n // 批量事件\r\n event: function(attr, obj, eventType){\r\n var _body = $('body');\r\n eventType = eventType || 'click';\r\n\r\n // 记录事件回调集合\r\n obj = util.event[attr] = $.extend(true, util.event[attr], obj) || {};\r\n\r\n // 清除委托事件\r\n util.event.UTIL_EVENT_CALLBACK = util.event.UTIL_EVENT_CALLBACK || {};\r\n _body.off(eventType, '*['+ attr +']', util.event.UTIL_EVENT_CALLBACK[attr])\r\n\r\n // 绑定委托事件\r\n util.event.UTIL_EVENT_CALLBACK[attr] = function(){\r\n var othis = $(this);\r\n var key = othis.attr(attr);\r\n (typeof obj[key] === 'function') && obj[key].call(this, othis);\r\n };\r\n\r\n // 清除旧事件,绑定新事件\r\n _body.on(eventType, '*['+ attr +']', util.event.UTIL_EVENT_CALLBACK[attr]);\r\n\r\n return obj;\r\n }\r\n };\r\n\r\n util.on = util.event;\r\n\r\n // 输出接口\r\n exports('util', util);\r\n});\r\n","/**\r\n * dropdown \r\n * 下拉菜单组件\r\n */\r\n\r\nlayui.define(['jquery', 'laytpl', 'lay', 'util'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var laytpl = layui.laytpl;\r\n var util = layui.util;\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n var clickOrMousedown = (device.mobile ? 'touchstart' : 'mousedown');\r\n \r\n // 模块名\r\n var MOD_NAME = 'dropdown';\r\n var MOD_INDEX = 'layui_'+ MOD_NAME +'_index'; // 模块索引名\r\n\r\n // 外部接口\r\n var dropdown = {\r\n config: {\r\n customName: { // 自定义 data 字段名\r\n id: 'id',\r\n title: 'title',\r\n children: 'child'\r\n }\r\n },\r\n index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0,\r\n\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n \r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id;\r\n\r\n thisModule.that[id] = that; // 记录当前实例对象\r\n\r\n return {\r\n config: options,\r\n // 重置实例\r\n reload: function(options){\r\n that.reload.call(that, options);\r\n },\r\n reloadData: function(options){\r\n dropdown.reloadData(id, options);\r\n },\r\n close: function () {\r\n that.remove()\r\n }\r\n }\r\n };\r\n\r\n // 字符常量\r\n var STR_ELEM = 'layui-dropdown';\r\n var STR_HIDE = 'layui-hide';\r\n var STR_DISABLED = 'layui-disabled';\r\n var STR_NONE = 'layui-none';\r\n var STR_ITEM_UP = 'layui-menu-item-up';\r\n var STR_ITEM_DOWN = 'layui-menu-item-down';\r\n var STR_MENU_TITLE = 'layui-menu-body-title';\r\n var STR_ITEM_GROUP = 'layui-menu-item-group';\r\n var STR_ITEM_PARENT = 'layui-menu-item-parent';\r\n var STR_ITEM_DIV = 'layui-menu-item-divider';\r\n var STR_ITEM_CHECKED = 'layui-menu-item-checked';\r\n var STR_ITEM_CHECKED2 = 'layui-menu-item-checked2';\r\n var STR_MENU_PANEL = 'layui-menu-body-panel';\r\n var STR_MENU_PANEL_L = 'layui-menu-body-panel-left';\r\n var STR_ELEM_SHADE = 'layui-dropdown-shade';\r\n \r\n var STR_GROUP_TITLE = '.'+ STR_ITEM_GROUP + '>.'+ STR_MENU_TITLE;\r\n\r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++dropdown.index;\r\n that.config = $.extend({}, that.config, dropdown.config, options);\r\n that.init();\r\n };\r\n\r\n // 默认配置\r\n Class.prototype.config = {\r\n trigger: 'click', // 事件类型\r\n content: '', // 自定义菜单内容\r\n className: '', // 自定义样式类名\r\n style: '', // 设置面板 style 属性\r\n show: false, // 是否初始即显示菜单面板\r\n isAllowSpread: true, // 是否允许菜单组展开收缩\r\n isSpreadItem: true, // 是否初始展开子菜单\r\n data: [], // 菜单数据结构\r\n delay: 300, // 延迟关闭的毫秒数,若 trigger 为 hover 时才生效\r\n shade: 0, // 遮罩\r\n accordion: false // 手风琴效果,仅菜单组生效。基础菜单需要在容器上追加 'lay-accordion' 属性。\r\n };\r\n \r\n // 重载实例\r\n Class.prototype.reload = function(options, type){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n that.init(true, type);\r\n };\r\n\r\n // 初始化准备\r\n Class.prototype.init = function(rerender, type){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 若 elem 非唯一\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n layui.each(elem, function(){\r\n dropdown.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0]));\r\n\r\n // 若重复执行 render,则视为 reload 处理\r\n if(!rerender && elem[0] && elem.data(MOD_INDEX)){\r\n var newThat = thisModule.getThis(elem.data(MOD_INDEX));\r\n if(!newThat) return;\r\n\r\n return newThat.reload(options, type);\r\n }\r\n\r\n options.elem = $(options.elem);\r\n \r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n options.id = 'id' in options ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n\r\n // 初始化自定义字段名\r\n options.customName = $.extend({}, dropdown.config.customName, options.customName);\r\n\r\n if(options.show || (type === 'reloadData' && that.elemView && $('body').find(that.elemView.get(0)).length)) that.render(rerender, type); //初始即显示或者面板弹出之后执行了刷新数据\r\n that.events(); // 事件\r\n };\r\n \r\n // 渲染\r\n Class.prototype.render = function(rerender, type){\r\n var that = this;\r\n var options = that.config;\r\n var customName = options.customName;\r\n var elemBody = $('body');\r\n \r\n // 默认菜单内容\r\n var getDefaultView = function(){\r\n var elemUl = $('
                        ');\r\n if(options.data.length > 0 ){\r\n eachItemView(elemUl, options.data)\r\n } else {\r\n elemUl.html('
                      • No data
                      • ');\r\n }\r\n return elemUl;\r\n };\r\n \r\n // 遍历菜单项\r\n var eachItemView = function(views, data){\r\n // var views = [];\r\n\r\n layui.each(data, function(index, item){\r\n // 是否存在子级\r\n var isChild = item[customName.children] && item[customName.children].length > 0;\r\n var isSpreadItem = ('isSpreadItem' in item) ? item.isSpreadItem : options.isSpreadItem\r\n var title = function(title){\r\n var templet = item.templet || options.templet;\r\n if(templet){\r\n title = typeof templet === 'function' \r\n ? templet(item)\r\n : laytpl(templet).render(item);\r\n }\r\n return title;\r\n }(util.escape(item[customName.title]));\r\n \r\n // 初始类型\r\n var type = function(){\r\n if(isChild){\r\n item.type = item.type || 'parent';\r\n }\r\n if(item.type){\r\n return ({\r\n group: 'group'\r\n ,parent: 'parent'\r\n ,'-': '-'\r\n })[item.type] || 'parent';\r\n }\r\n return '';\r\n }();\r\n\r\n if(type !== '-' && (!item[customName.title] && !item[customName.id] && !isChild)) return;\r\n \r\n //列表元素\r\n var viewLi = $([''\r\n \r\n //标题区\r\n ,function(){\r\n //是否超文本\r\n var viewText = ('href' in item) ? (\r\n ''+ title +''\r\n ) : title;\r\n \r\n //是否存在子级\r\n if(isChild){\r\n return '
                        '+ viewText + function(){\r\n if(type === 'parent'){\r\n return '';\r\n } else if(type === 'group' && options.isAllowSpread){\r\n return '';\r\n } else {\r\n return '';\r\n }\r\n }() +'
                        '\r\n \r\n }\r\n return '
                        '+ viewText +'
                        ';\r\n }()\r\n ,''].join(''));\r\n \r\n viewLi.data('item', item);\r\n \r\n //子级区\r\n if(isChild){\r\n var elemPanel = $('
                        ');\r\n var elemUl = $('
                          ');\r\n\r\n if(type === 'parent'){\r\n elemPanel.append(eachItemView(elemUl, item[customName.children]));\r\n viewLi.append(elemPanel);\r\n } else {\r\n viewLi.append(eachItemView(elemUl, item[customName.children]));\r\n }\r\n }\r\n\r\n views.append(viewLi);\r\n });\r\n return views;\r\n };\r\n \r\n // 主模板\r\n var TPL_MAIN = ['
                          '\r\n ,'
                          '].join('');\r\n \r\n // 如果是右键事件,则每次触发事件时,将允许重新渲染\r\n if(options.trigger === 'contextmenu' || lay.isTopElem(options.elem[0])) rerender = true;\r\n \r\n // 判断是否已经打开了下拉菜单面板\r\n if(!rerender && options.elem.data(MOD_INDEX +'_opened')) return;\r\n\r\n // 记录模板对象\r\n that.elemView = $('.' + STR_ELEM + '[lay-id=\"' + options.id + '\"]');\r\n if (type === 'reloadData' && that.elemView.length) {\r\n that.elemView.html(options.content || getDefaultView());\r\n } else {\r\n that.elemView = $(TPL_MAIN);\r\n that.elemView.append(options.content || getDefaultView());\r\n\r\n // 初始化某些属性\r\n if(options.className) that.elemView.addClass(options.className);\r\n if(options.style) that.elemView.attr('style', options.style);\r\n\r\n // 记录当前执行的实例索引\r\n dropdown.thisId = options.id;\r\n\r\n // 插入视图\r\n that.remove(); // 移除非当前绑定元素的面板\r\n elemBody.append(that.elemView);\r\n options.elem.data(MOD_INDEX +'_opened', true);\r\n\r\n // 遮罩\r\n var shade = options.shade ? ('
                          ') : '';\r\n that.elemView.before(shade);\r\n\r\n // 如果是鼠标移入事件,则鼠标移出时自动关闭\r\n if(options.trigger === 'mouseenter'){\r\n that.elemView.on('mouseenter', function(){\r\n clearTimeout(thisModule.timer);\r\n }).on('mouseleave', function(){\r\n that.delayRemove();\r\n });\r\n }\r\n }\r\n\r\n // 坐标定位\r\n that.position();\r\n thisModule.prevElem = that.elemView; // 记录当前打开的元素,以便在下次关闭\r\n thisModule.prevElem.data('prevElem', options.elem); // 将当前绑定的元素,记录在打开元素的 data 对象中\r\n \r\n // 阻止全局事件\r\n that.elemView.find('.layui-menu').on(clickOrMousedown, function(e){\r\n layui.stope(e);\r\n });\r\n\r\n // 触发菜单列表事件\r\n that.elemView.find('.layui-menu li').on('click', function(e){\r\n var othis = $(this);\r\n var data = othis.data('item') || {};\r\n var isChild = data[customName.children] && data[customName.children].length > 0;\r\n var isClickAllScope = options.clickScope === 'all'; // 是否所有父子菜单均触发点击事件\r\n\r\n if(data.disabled) return; // 菜单项禁用状态\r\n \r\n // 普通菜单项点击后的回调及关闭面板\r\n if((!isChild || isClickAllScope) && data.type !== '-'){\r\n var ret = typeof options.click === 'function' \r\n ? options.click(data, othis) \r\n : null;\r\n \r\n ret === false || (isChild || that.remove());\r\n layui.stope(e);\r\n }\r\n });\r\n \r\n // 触发菜单组展开收缩\r\n that.elemView.find(STR_GROUP_TITLE).on('click', function(e){\r\n var othis = $(this);\r\n var elemGroup = othis.parent();\r\n var data = elemGroup.data('item') || {};\r\n \r\n if(data.type === 'group' && options.isAllowSpread){\r\n thisModule.spread(elemGroup, options.accordion);\r\n }\r\n });\r\n\r\n // 组件打开完毕的事件\r\n typeof options.ready === 'function' && options.ready(\r\n that.elemView, \r\n options.elem\r\n );\r\n };\r\n \r\n // 位置定位\r\n Class.prototype.position = function(obj){\r\n var that = this;\r\n var options = that.config;\r\n \r\n lay.position(options.elem[0], that.elemView[0], {\r\n position: options.position,\r\n e: that.e,\r\n clickType: options.trigger === 'contextmenu' ? 'right' : null,\r\n align: options.align || null\r\n });\r\n };\r\n \r\n // 删除视图\r\n Class.prototype.remove = function(){\r\n var that = this;\r\n var options = that.config;\r\n var elemPrev = thisModule.prevElem;\r\n \r\n // 若存在已打开的面板元素,则移除\r\n if(elemPrev){\r\n elemPrev.data('prevElem') && (\r\n elemPrev.data('prevElem').data(MOD_INDEX +'_opened', false)\r\n );\r\n elemPrev.remove();\r\n }\r\n lay('.' + STR_ELEM_SHADE).remove();\r\n };\r\n \r\n // 延迟删除视图\r\n Class.prototype.delayRemove = function(){\r\n var that = this;\r\n var options = that.config;\r\n clearTimeout(thisModule.timer);\r\n\r\n thisModule.timer = setTimeout(function(){\r\n that.remove();\r\n }, options.delay);\r\n };\r\n \r\n // 事件\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 若传入 hover,则解析为 mouseenter\r\n if(options.trigger === 'hover') options.trigger = 'mouseenter';\r\n\r\n // 解除上一个事件\r\n if(that.prevElem) that.prevElem.off(options.trigger, that.prevElemCallback);\r\n \r\n // 记录被绑定的元素及回调\r\n that.prevElem = options.elem;\r\n that.prevElemCallback = function(e){\r\n clearTimeout(thisModule.timer);\r\n that.e = e;\r\n that.render();\r\n e.preventDefault();\r\n };\r\n\r\n // 触发元素事件\r\n options.elem.on(options.trigger, that.prevElemCallback);\r\n \r\n // 如果是鼠标移入事件\r\n if(options.trigger === 'mouseenter'){\r\n // 直行鼠标移出事件\r\n options.elem.on('mouseleave', function(){\r\n that.delayRemove();\r\n });\r\n }\r\n };\r\n \r\n // 记录所有实例\r\n thisModule.that = {}; // 记录所有实例对象\r\n \r\n // 获取当前实例对象\r\n thisModule.getThis = function(id){\r\n var that = thisModule.that[id];\r\n if(!that) hint.error(id ? (MOD_NAME +' instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return that;\r\n };\r\n \r\n // 设置菜单组展开和收缩状态\r\n thisModule.spread = function(othis, isAccordion){\r\n var contentElem = othis.children('ul');\r\n var needSpread = othis.hasClass(STR_ITEM_UP);\r\n var ANIM_MS = 200;\r\n\r\n // 动画执行完成后的操作\r\n var complete = function() {\r\n $(this).css({'display': ''}); // 剔除临时 style,以适配外部样式的状态重置;\r\n };\r\n\r\n // 动画是否正在执行\r\n if (contentElem.is(':animated')) return;\r\n\r\n // 展开\r\n if (needSpread) {\r\n othis.removeClass(STR_ITEM_UP).addClass(STR_ITEM_DOWN);\r\n contentElem.hide().stop().slideDown(ANIM_MS, complete);\r\n } else { // 收缩\r\n contentElem.stop().slideUp(ANIM_MS, complete);\r\n othis.removeClass(STR_ITEM_DOWN).addClass(STR_ITEM_UP);\r\n }\r\n\r\n // 手风琴\r\n if (needSpread && isAccordion) {\r\n var groupSibs = othis.siblings('.' + STR_ITEM_DOWN);\r\n groupSibs.children('ul').stop().slideUp(ANIM_MS, complete);\r\n groupSibs.removeClass(STR_ITEM_DOWN).addClass(STR_ITEM_UP);\r\n }\r\n };\r\n \r\n // 全局事件\r\n (function(){\r\n var _WIN = $(window);\r\n var _DOC = $(document);\r\n \r\n // 自适应定位\r\n _WIN.on('resize', function(){\r\n if(!dropdown.thisId) return;\r\n var that = thisModule.getThis(dropdown.thisId);\r\n if(!that) return;\r\n \r\n if((that.elemView && !that.elemView[0]) || !$('.'+ STR_ELEM)[0]){\r\n return false;\r\n }\r\n \r\n var options = that.config;\r\n \r\n if(options.trigger === 'contextmenu'){\r\n that.remove();\r\n } else {\r\n that.position();\r\n }\r\n });\r\n \r\n \r\n \r\n // 点击任意处关闭\r\n _DOC.on(clickOrMousedown, function(e){\r\n if(!dropdown.thisId) return;\r\n var that = thisModule.getThis(dropdown.thisId)\r\n if(!that) return;\r\n \r\n var options = that.config;\r\n \r\n // 若触发的是绑定的元素,或者属于绑定元素的子元素,则不关闭\r\n // 满足条件:当前绑定的元素不是 body document,或者不是鼠标右键事件\r\n if(!(lay.isTopElem(options.elem[0]) || options.trigger === 'contextmenu')){\r\n if(\r\n e.target === options.elem[0] || \r\n options.elem.find(e.target)[0] ||\r\n (that.elemView && e.target === that.elemView[0]) ||\r\n (that.elemView && that.elemView.find(e.target)[0])\r\n ) return;\r\n }\r\n \r\n that.remove();\r\n });\r\n \r\n // 基础菜单的静态元素事件\r\n var ELEM_LI = '.layui-menu:not(.layui-dropdown-menu) li';\r\n _DOC.on('click', ELEM_LI, function(e){\r\n var othis = $(this);\r\n var parent = othis.parents('.layui-menu').eq(0);\r\n var isChild = othis.hasClass(STR_ITEM_GROUP) || othis.hasClass(STR_ITEM_PARENT);\r\n var filter = parent.attr('lay-filter') || parent.attr('id');\r\n var options = lay.options(this);\r\n \r\n // 非触发元素\r\n if(othis.hasClass(STR_ITEM_DIV)) return;\r\n\r\n // 非菜单组\r\n if(!isChild){\r\n // 选中\r\n parent.find('.'+ STR_ITEM_CHECKED).removeClass(STR_ITEM_CHECKED); // 清除选中样式\r\n parent.find('.'+ STR_ITEM_CHECKED2).removeClass(STR_ITEM_CHECKED2); // 清除父级菜单选中样式\r\n othis.addClass(STR_ITEM_CHECKED); //添加选中样式\r\n othis.parents('.'+ STR_ITEM_PARENT).addClass(STR_ITEM_CHECKED2); // 添加父级菜单选中样式\r\n\r\n options.title = options.title || $.trim(othis.children('.'+ STR_MENU_TITLE).text());\r\n \r\n // 触发事件\r\n layui.event.call(this, MOD_NAME, 'click('+ filter +')', options);\r\n }\r\n });\r\n \r\n // 基础菜单的展开收缩事件\r\n _DOC.on('click', (ELEM_LI + STR_GROUP_TITLE), function(e){\r\n var othis = $(this);\r\n var elemGroup = othis.parents('.'+ STR_ITEM_GROUP +':eq(0)');\r\n var options = lay.options(elemGroup[0]);\r\n var isAccordion = typeof othis.parents('.layui-menu').eq(0).attr('lay-accordion') === 'string';\r\n\r\n if(('isAllowSpread' in options) ? options.isAllowSpread : true){\r\n thisModule.spread(elemGroup, isAccordion);\r\n }\r\n });\r\n \r\n // 判断子级菜单是否超出屏幕\r\n var ELEM_LI_PAR = '.layui-menu .'+ STR_ITEM_PARENT\r\n _DOC.on('mouseenter', ELEM_LI_PAR, function(e){\r\n var othis = $(this);\r\n var elemPanel = othis.find('.'+ STR_MENU_PANEL);\r\n\r\n if(!elemPanel[0]) return;\r\n var rect = elemPanel[0].getBoundingClientRect();\r\n \r\n // 是否超出右侧屏幕\r\n if(rect.right > _WIN.width()){\r\n elemPanel.addClass(STR_MENU_PANEL_L);\r\n // 不允许超出左侧屏幕\r\n rect = elemPanel[0].getBoundingClientRect();\r\n if(rect.left < 0){\r\n elemPanel.removeClass(STR_MENU_PANEL_L);\r\n }\r\n }\r\n \r\n // 是否超出底部屏幕\r\n if(rect.bottom > _WIN.height()){\r\n elemPanel.eq(0).css('margin-top', -(rect.bottom - _WIN.height() + 5));\r\n }\r\n }).on('mouseleave', ELEM_LI_PAR, function(e){\r\n var othis = $(this)\r\n var elemPanel = othis.children('.'+ STR_MENU_PANEL);\r\n \r\n elemPanel.removeClass(STR_MENU_PANEL_L);\r\n elemPanel.css('margin-top', 0);\r\n });\r\n \r\n })();\r\n\r\n // 关闭面板\r\n dropdown.close = function(id){\r\n var that = thisModule.getThis(id);\r\n if(!that) return this;\r\n \r\n that.remove();\r\n return thisModule.call(that);\r\n };\r\n \r\n // 重载实例\r\n dropdown.reload = function(id, options, type){\r\n var that = thisModule.getThis(id);\r\n if(!that) return this;\r\n\r\n that.reload(options, type);\r\n return thisModule.call(that);\r\n };\r\n\r\n // 仅重载数据\r\n dropdown.reloadData = function(){\r\n var args = $.extend([], arguments);\r\n args[2] = 'reloadData';\r\n\r\n // 重载时,与数据相关的参数\r\n var dataParams = new RegExp('^('+ [\r\n 'data', 'templet', 'content'\r\n ].join('|') + ')$');\r\n\r\n // 过滤与数据无关的参数\r\n layui.each(args[1], function (key, value) {\r\n if(!dataParams.test(key)){\r\n delete args[1][key];\r\n }\r\n });\r\n\r\n return dropdown.reload.apply(null, args);\r\n };\r\n\r\n // 核心入口\r\n dropdown.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, dropdown);\r\n});\r\n","/**\r\n * slider 滑块组件\r\n */\r\n\r\nlayui.define(['jquery', 'lay'], function(exports){\r\n 'use strict';\r\n\r\n var $ = layui.$;\r\n var lay = layui.lay;\r\n\r\n // 外部接口\r\n var slider = {\r\n config: {}\r\n ,index: layui.slider ? (layui.slider.index + 10000) : 0\r\n\r\n // 设置全局项\r\n ,set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n }\r\n\r\n // 事件\r\n ,on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisSlider = function(){\r\n var that = this\r\n ,options = that.config;\r\n\r\n return {\r\n setValue: function(value, index){ // 设置值\r\n value = value > options.max ? options.max : value;\r\n value = value < options.min ? options.min : value;\r\n options.value = value;\r\n return that.slide('set', value, index || 0);\r\n }\r\n ,config: options\r\n }\r\n };\r\n\r\n // 字符常量\r\n var MOD_NAME = 'slider';\r\n var DISABLED = 'layui-disabled';\r\n var ELEM_VIEW = 'layui-slider';\r\n var SLIDER_BAR = 'layui-slider-bar';\r\n var SLIDER_WRAP = 'layui-slider-wrap';\r\n var SLIDER_WRAP_BTN = 'layui-slider-wrap-btn';\r\n var SLIDER_TIPS = 'layui-slider-tips';\r\n var SLIDER_INPUT = 'layui-slider-input';\r\n var SLIDER_INPUT_TXT = 'layui-slider-input-txt';\r\n var SLIDER_INPUT_BTN = 'layui-slider-input-btn';\r\n var ELEM_HOVER = 'layui-slider-hover';\r\n\r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++slider.index;\r\n that.config = $.extend({}, that.config, slider.config, options);\r\n that.render();\r\n };\r\n\r\n // 默认配置\r\n Class.prototype.config = {\r\n type: 'default' //滑块类型,垂直:vertical\r\n ,min: 0 //最小值\r\n ,max: 100 //最大值,默认100\r\n ,value: 0 //初始值,默认为0\r\n ,step: 1 //间隔值\r\n ,showstep: false //间隔点开启\r\n ,tips: true //文字提示,开启\r\n ,input: false //输入框,关闭\r\n ,range: false //范围选择,与输入框不能同时开启,默认关闭\r\n ,height: 200 //配合 type:\"vertical\" 使用,默认200px\r\n ,disabled: false //滑块禁用,默认关闭\r\n ,theme: '#16baaa' //主题颜色\r\n };\r\n\r\n //滑块渲染\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n layui.each(elem, function(){\r\n slider.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0]));\r\n\r\n //间隔值不能小于 1\r\n if(options.step < 1) options.step = 1;\r\n\r\n //最大值不能小于最小值\r\n if(options.max < options.min) options.max = options.min + options.step;\r\n\r\n\r\n\r\n //判断是否开启双滑块\r\n if(options.range){\r\n options.value = typeof(options.value) == 'object' ? options.value : [options.min, options.value];\r\n var minValue = Math.min(options.value[0], options.value[1])\r\n ,maxValue = Math.max(options.value[0], options.value[1]);\r\n options.value[0] = Math.max(minValue,options.min);\r\n options.value[1] = Math.max(maxValue,options.min);\r\n options.value[0] = Math.min(options.value[0],options.max);\r\n options.value[1] = Math.min(options.value[1],options.max);\r\n\r\n var scaleFir = Math.floor((options.value[0] - options.min) / (options.max - options.min) * 100)\r\n ,scaleSec = Math.floor((options.value[1] - options.min) / (options.max - options.min) * 100)\r\n ,scale = scaleSec - scaleFir + '%';\r\n scaleFir = scaleFir + '%';\r\n scaleSec = scaleSec + '%';\r\n } else {\r\n //如果初始值是一个数组,则获取数组的最小值\r\n if(typeof options.value == 'object'){\r\n options.value = Math.min.apply(null, options.value);\r\n }\r\n\r\n //初始值不能小于最小值且不能大于最大值\r\n if(options.value < options.min) options.value = options.min;\r\n if(options.value > options.max) options.value = options.max;\r\n\r\n var scale = Math.floor((options.value - options.min) / (options.max - options.min) * 100) + '%';\r\n }\r\n\r\n\r\n //如果禁用,颜色为统一的灰色\r\n var theme = options.disabled ? '#c2c2c2' : options.theme;\r\n\r\n //滑块\r\n var temp = '
                          '+ (options.tips ? '
                          ' : '') +\r\n '
                          ' +\r\n '
                          '+ (options.range ? '
                          ' : '') +'
                          ';\r\n\r\n var othis = $(options.elem)\r\n ,hasRender = othis.next('.' + ELEM_VIEW);\r\n //生成替代元素\r\n hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender\r\n that.elemTemp = $(temp);\r\n\r\n //把数据缓存到滑块上\r\n if(options.range){\r\n that.elemTemp.find('.' + SLIDER_WRAP).eq(0).data('value', options.value[0]);\r\n that.elemTemp.find('.' + SLIDER_WRAP).eq(1).data('value', options.value[1]);\r\n }else{\r\n that.elemTemp.find('.' + SLIDER_WRAP).data('value', options.value);\r\n }\r\n\r\n //插入替代元素\r\n othis.html(that.elemTemp);\r\n\r\n //垂直滑块\r\n if(options.type === 'vertical'){\r\n that.elemTemp.height(options.height + 'px');\r\n }\r\n\r\n //显示间断点\r\n if(options.showstep){\r\n var number = (options.max - options.min) / options.step, item = '';\r\n for(var i = 1; i < number + 1; i++) {\r\n var step = i * 100 / number;\r\n if(step < 100){\r\n item += '
                          '\r\n }\r\n }\r\n that.elemTemp.append(item);\r\n }\r\n\r\n //插入输入框\r\n if(options.input && !options.range){\r\n var elemInput = $('
                          ');\r\n othis.css(\"position\",\"relative\");\r\n othis.append(elemInput);\r\n othis.find('.' + SLIDER_INPUT_TXT).children('input').val(options.value);\r\n if(options.type === 'vertical'){\r\n elemInput.css({\r\n left: 0\r\n ,top: -48\r\n });\r\n } else {\r\n that.elemTemp.css(\"margin-right\", elemInput.outerWidth() + 15);\r\n }\r\n }\r\n\r\n //给未禁止的滑块滑动事件\r\n if(!options.disabled){\r\n that.slide();\r\n }else{\r\n that.elemTemp.addClass(DISABLED);\r\n that.elemTemp.find('.' + SLIDER_WRAP_BTN).addClass(DISABLED);\r\n }\r\n\r\n //划过滑块显示数值\r\n var timer;\r\n that.elemTemp.find('.' + SLIDER_WRAP_BTN).on('mouseover', function(){\r\n var sliderWidth = options.type === 'vertical' ? options.height : that.elemTemp[0].offsetWidth\r\n ,sliderWrap = that.elemTemp.find('.' + SLIDER_WRAP)\r\n ,tipsLeft = options.type === 'vertical' ? (sliderWidth - $(this).parent()[0].offsetTop - sliderWrap.height()) : $(this).parent()[0].offsetLeft\r\n ,left = tipsLeft / sliderWidth * 100\r\n ,value = $(this).parent().data('value')\r\n ,tipsTxt = options.setTips ? options.setTips(value) : value;\r\n that.elemTemp.find('.' + SLIDER_TIPS).html(tipsTxt);\r\n\r\n clearTimeout(timer);\r\n timer = setTimeout(function(){\r\n if(options.type === 'vertical'){\r\n that.elemTemp.find('.' + SLIDER_TIPS).css({\r\n \"bottom\": left + '%',\r\n \"margin-bottom\": \"20px\",\r\n \"display\": \"inline-block\"\r\n });\r\n } else {\r\n that.elemTemp.find('.' + SLIDER_TIPS).css({\r\n \"left\": left + '%',\r\n \"display\": \"inline-block\"\r\n });\r\n }\r\n }, 300);\r\n }).on('mouseout', function(){\r\n clearTimeout(timer);\r\n that.elemTemp.find('.' + SLIDER_TIPS).css(\"display\", \"none\");\r\n });\r\n };\r\n\r\n //滑块滑动\r\n Class.prototype.slide = function(setValue, value, i){\r\n var that = this\r\n ,options = that.config\r\n ,sliderAct = that.elemTemp\r\n ,sliderWidth = function(){\r\n return options.type === 'vertical' ? options.height : sliderAct[0].offsetWidth\r\n }\r\n ,sliderWrap = sliderAct.find('.' + SLIDER_WRAP)\r\n ,sliderTxt = sliderAct.next('.' + SLIDER_INPUT)\r\n ,inputValue = sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val()\r\n ,step = 100 / ((options.max - options.min) / Math.ceil(options.step))\r\n ,change = function(offsetValue, index, from){\r\n if(Math.ceil(offsetValue) * step > 100){\r\n offsetValue = Math.ceil(offsetValue) * step\r\n }else{\r\n offsetValue = Math.round(offsetValue) * step\r\n }\r\n offsetValue = offsetValue > 100 ? 100: offsetValue;\r\n offsetValue = offsetValue < 0 ? 0: offsetValue;\r\n sliderWrap.eq(index).css((options.type === 'vertical' ?'bottom':'left'), offsetValue + '%');\r\n var firLeft = valueTo(sliderWrap[0].offsetLeft)\r\n ,secLeft = options.range ? valueTo(sliderWrap[1].offsetLeft) : 0;\r\n if(options.type === 'vertical'){\r\n sliderAct.find('.' + SLIDER_TIPS).css({\"bottom\":offsetValue + '%', \"margin-bottom\":\"20px\"});\r\n firLeft = valueTo(sliderWidth() - sliderWrap[0].offsetTop - sliderWrap.height());\r\n secLeft = options.range ? valueTo(sliderWidth() - sliderWrap[1].offsetTop - sliderWrap.height()) : 0;\r\n }else{\r\n sliderAct.find('.' + SLIDER_TIPS).css(\"left\",offsetValue + '%');\r\n }\r\n firLeft = firLeft > 100 ? 100: firLeft;\r\n secLeft = secLeft > 100 ? 100: secLeft;\r\n var minLeft = Math.min(firLeft, secLeft)\r\n ,wrapWidth = Math.abs(firLeft - secLeft);\r\n if(options.type === 'vertical'){\r\n sliderAct.find('.' + SLIDER_BAR).css({\"height\":wrapWidth + '%', \"bottom\":minLeft + '%'});\r\n }else{\r\n sliderAct.find('.' + SLIDER_BAR).css({\"width\":wrapWidth + '%', \"left\":minLeft + '%'});\r\n }\r\n var selfValue = options.min + Math.round((options.max - options.min) * offsetValue / 100);\r\n inputValue = selfValue;\r\n sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val(inputValue);\r\n sliderWrap.eq(index).data('value', selfValue);\r\n sliderAct.find('.' + SLIDER_TIPS).html(options.setTips ? options.setTips(selfValue) : selfValue);\r\n\r\n //如果开启范围选择,则返回数组值\r\n if(options.range){\r\n var arrValue = [\r\n sliderWrap.eq(0).data('value')\r\n ,sliderWrap.eq(1).data('value')\r\n ];\r\n if(arrValue[0] > arrValue[1]) arrValue.reverse(); //如果前面的圆点超过了后面的圆点值,则调换顺序\r\n }\r\n\r\n that.value = options.range ? arrValue : selfValue; // 最新值\r\n options.change && options.change(that.value); // change 回调\r\n\r\n // 值完成选中的事件\r\n if(from === 'done') options.done && options.done(that.value);\r\n }\r\n ,valueTo = function(value){\r\n var oldLeft = value / sliderWidth() * 100 / step\r\n ,left = Math.round(oldLeft) * step;\r\n if(value == sliderWidth()){\r\n left = Math.ceil(oldLeft) * step;\r\n }\r\n return left;\r\n }\r\n\r\n //拖拽元素\r\n ,elemMove = $(['
                          sliderWidth())left = sliderWidth();\r\n var reaLeft = left / sliderWidth() * 100 / step;\r\n change(reaLeft, index);\r\n othis.addClass(ELEM_HOVER);\r\n sliderAct.find('.' + SLIDER_TIPS).show();\r\n e.preventDefault();\r\n };\r\n\r\n var up = function(){\r\n othis.removeClass(ELEM_HOVER);\r\n sliderAct.find('.' + SLIDER_TIPS).hide();\r\n };\r\n\r\n createMoveElem(move, up)\r\n });\r\n });\r\n\r\n // 点击滑块\r\n sliderAct.on('click', function(e){\r\n var main = $('.' + SLIDER_WRAP_BTN);\r\n var othis = $(this);\r\n if(!main.is(event.target) && main.has(event.target).length === 0 && main.length){\r\n var index;\r\n var offset = options.type === 'vertical'\r\n ? (sliderWidth() - e.clientY + othis.offset().top - $(window).scrollTop())\r\n :(e.clientX - othis.offset().left - $(window).scrollLeft());\r\n\r\n if(offset < 0)offset = 0;\r\n if(offset > sliderWidth()) offset = sliderWidth();\r\n var reaLeft = offset / sliderWidth() * 100 / step;\r\n if(options.range){\r\n if(options.type === 'vertical'){\r\n index = Math.abs(offset - parseInt($(sliderWrap[0]).css('bottom'))) > Math.abs(offset - parseInt($(sliderWrap[1]).css('bottom'))) ? 1 : 0;\r\n } else {\r\n index = Math.abs(offset - sliderWrap[0].offsetLeft) > Math.abs(offset - sliderWrap[1].offsetLeft) ? 1 : 0;\r\n }\r\n } else {\r\n index = 0;\r\n }\r\n change(reaLeft, index, 'done');\r\n e.preventDefault();\r\n }\r\n });\r\n\r\n //点击加减输入框\r\n sliderTxt.children('.' + SLIDER_INPUT_BTN).children('i').each(function(index){\r\n $(this).on('click', function(){\r\n inputValue = sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val();\r\n if(index == 1){ //减\r\n inputValue = inputValue - options.step < options.min\r\n ? options.min\r\n : Number(inputValue) - options.step;\r\n }else{\r\n inputValue = Number(inputValue) + options.step > options.max\r\n ? options.max\r\n : Number(inputValue) + options.step;\r\n }\r\n var inputScale = (inputValue - options.min) / (options.max - options.min) * 100 / step;\r\n change(inputScale, 0, 'done');\r\n });\r\n });\r\n\r\n //获取输入框值\r\n var getInputValue = function(){\r\n var realValue = this.value;\r\n realValue = isNaN(realValue) ? 0 : realValue;\r\n realValue = realValue < options.min ? options.min : realValue;\r\n realValue = realValue > options.max ? options.max : realValue;\r\n this.value = realValue;\r\n var inputScale = (realValue - options.min) / (options.max - options.min) * 100 / step;\r\n change(inputScale, 0, 'done');\r\n };\r\n sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').on('keydown', function(e){\r\n if(e.keyCode === 13){\r\n e.preventDefault();\r\n getInputValue.call(this);\r\n }\r\n }).on('change', getInputValue);\r\n };\r\n\r\n //事件处理\r\n Class.prototype.events = function(){\r\n var that = this\r\n ,options = that.config;\r\n };\r\n\r\n //核心入口\r\n slider.render = function(options){\r\n var inst = new Class(options);\r\n return thisSlider.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, slider);\r\n})\r\n","/**\r\n * colorpicker \r\n * 颜色选择组件\r\n */\r\n\r\nlayui.define(['jquery', 'lay'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var lay = layui.lay;\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n var clickOrMousedown = (device.mobile ? 'click' : 'mousedown');\r\n\r\n //外部接口\r\n var colorpicker = {\r\n config: {}\r\n ,index: layui.colorpicker ? (layui.colorpicker.index + 10000) : 0\r\n\r\n //设置全局项\r\n ,set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n }\r\n \r\n //事件\r\n ,on: function(events, callback){\r\n return layui.onevent.call(this, 'colorpicker', events, callback);\r\n }\r\n };\r\n \r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id;\r\n\r\n thisModule.that[id] = that; // 记录当前实例对象\r\n\r\n return {\r\n config: options\r\n };\r\n }\r\n\r\n //字符常量\r\n ,MOD_NAME = 'colorpicker', SHOW = 'layui-show', THIS = 'layui-this', ELEM = 'layui-colorpicker'\r\n \r\n ,ELEM_MAIN = '.layui-colorpicker-main', ICON_PICKER_DOWN = 'layui-icon-down', ICON_PICKER_CLOSE = 'layui-icon-close'\r\n ,PICKER_TRIG_SPAN = 'layui-colorpicker-trigger-span', PICKER_TRIG_I = 'layui-colorpicker-trigger-i', PICKER_SIDE = 'layui-colorpicker-side', PICKER_SIDE_SLIDER = 'layui-colorpicker-side-slider'\r\n ,PICKER_BASIS = 'layui-colorpicker-basis', PICKER_ALPHA_BG = 'layui-colorpicker-alpha-bgcolor', PICKER_ALPHA_SLIDER = 'layui-colorpicker-alpha-slider', PICKER_BASIS_CUR = 'layui-colorpicker-basis-cursor', PICKER_INPUT = 'layui-colorpicker-main-input'\r\n\r\n //RGB转HSB\r\n ,RGBToHSB = function(rgb){\r\n var hsb = {h:0, s:0, b:0};\r\n var min = Math.min(rgb.r, rgb.g, rgb.b);\r\n var max = Math.max(rgb.r, rgb.g, rgb.b);\r\n var delta = max - min;\r\n hsb.b = max;\r\n hsb.s = max !== 0 ? 255*delta/max : 0;\r\n if(hsb.s !== 0){\r\n if(rgb.r == max){ // 因 rgb 中返回的数字为 string 类型\r\n hsb.h = (rgb.g - rgb.b) / delta;\r\n }else if(rgb.g == max){\r\n hsb.h = 2 + (rgb.b - rgb.r) / delta;\r\n }else{\r\n hsb.h = 4 + (rgb.r - rgb.g) / delta;\r\n }\r\n }else{\r\n hsb.h = -1;\r\n }\r\n if(max === min){\r\n hsb.h = 0;\r\n }\r\n hsb.h *= 60;\r\n if(hsb.h < 0) {\r\n hsb.h += 360;\r\n }\r\n hsb.s *= 100/255;\r\n hsb.b *= 100/255;\r\n return hsb; \r\n }\r\n\r\n //HEX转HSB\r\n ,HEXToHSB = function(hex){\r\n hex = hex.indexOf('#') > -1 ? hex.substring(1) : hex;\r\n if(hex.length === 3){\r\n var num = hex.split(\"\");\r\n hex = num[0]+num[0]+num[1]+num[1]+num[2]+num[2]\r\n }\r\n hex = parseInt(hex, 16);\r\n var rgb = {r:hex >> 16, g:(hex & 0x00FF00) >> 8, b:(hex & 0x0000FF)};\r\n return RGBToHSB(rgb);\r\n }\r\n\r\n //HSB转RGB\r\n ,HSBToRGB = function(hsb){\r\n var rgb = {};\r\n var h = hsb.h;\r\n var s = hsb.s*255/100;\r\n var b = hsb.b*255/100;\r\n if(s === 0){\r\n rgb.r = rgb.g = rgb.b = b;\r\n }else{\r\n var t1 = b;\r\n var t2 = (255 - s) * b /255;\r\n var t3 = (t1 - t2) * (h % 60) /60;\r\n if(h === 360) h = 0;\r\n if(h < 60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}\r\n else if(h < 120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}\r\n else if(h < 180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}\r\n else if(h < 240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}\r\n else if(h < 300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}\r\n else if(h < 360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}\r\n else {rgb.r=0; rgb.g=0; rgb.b=0}\r\n }\r\n return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};\r\n }\r\n\r\n //HSB转HEX\r\n ,HSBToHEX = function(hsb){\r\n var rgb = HSBToRGB(hsb);\r\n var hex = [\r\n rgb.r.toString(16)\r\n ,rgb.g.toString(16)\r\n ,rgb.b.toString(16)\r\n ];\r\n $.each(hex, function(nr, val){\r\n if(val.length === 1){\r\n hex[nr] = '0' + val;\r\n }\r\n });\r\n return hex.join('');\r\n }\r\n\r\n //转化成所需rgb格式\r\n ,RGBSTo = function(rgbs){\r\n var regexp = /[0-9]{1,3}/g;\r\n var re = rgbs.match(regexp) || [];\r\n return {r:re[0], g:re[1], b:re[2]};\r\n }\r\n \r\n ,$win = $(window)\r\n ,$doc = $(document)\r\n \r\n //构造器\r\n ,Class = function(options){\r\n var that = this;\r\n that.index = ++colorpicker.index;\r\n that.config = $.extend({}, that.config, colorpicker.config, options);\r\n that.render();\r\n };\r\n\r\n //默认配置\r\n Class.prototype.config = {\r\n color: '' //默认颜色,默认没有\r\n ,size: null //选择器大小\r\n ,alpha: false //是否开启透明度\r\n ,format: 'hex' //颜色显示/输入格式,可选 rgb,hex\r\n ,predefine: false //预定义颜色是否开启\r\n ,colors: [ //默认预定义颜色列表\r\n '#16baaa', '#16b777', '#1E9FFF', '#FF5722', '#FFB800', '#01AAED', '#999', '#c00', '#ff8c00','#ffd700'\r\n ,'#90ee90', '#00ced1', '#1e90ff', '#c71585', 'rgb(0, 186, 189)', 'rgb(255, 120, 0)', 'rgb(250, 212, 0)', '#393D49', 'rgba(0,0,0,.5)', 'rgba(255, 69, 0, 0.68)', 'rgba(144, 240, 144, 0.5)', 'rgba(31, 147, 255, 0.73)'\r\n ]\r\n };\r\n\r\n //初始颜色选择框\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n layui.each(elem, function(){\r\n colorpicker.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0]));\r\n \r\n //颜色选择框对象\r\n var elemColorBox = $(['
                          '\r\n ,''\r\n ,' 3){ //需要优化\r\n if(!(options.alpha && options.format == 'rgb')){\r\n bgstr = '#' + HSBToHEX(RGBToHSB(RGBSTo(options.color)))\r\n }\r\n }\r\n \r\n return 'background: '+ bgstr;\r\n }\r\n \r\n return bgstr;\r\n }() +'\">'\r\n ,''\r\n ,''\r\n ,''\r\n ,'
                          '].join(''))\r\n\r\n //初始化颜色选择框\r\n elem = options.elem = $(options.elem);\r\n options.size && elemColorBox.addClass('layui-colorpicker-'+ options.size); //初始化颜色选择框尺寸\r\n \r\n // 插入颜色选择框\r\n elem.addClass('layui-inline').html(\r\n that.elemColorBox = elemColorBox\r\n );\r\n\r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n options.id = 'id' in options ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n \r\n // 获取背景色值\r\n that.color = that.elemColorBox.find('.'+ PICKER_TRIG_SPAN)[0].style.background;\r\n \r\n // 相关事件\r\n that.events();\r\n };\r\n\r\n //渲染颜色选择器\r\n Class.prototype.renderPicker = function(){\r\n var that = this\r\n ,options = that.config\r\n ,elemColorBox = that.elemColorBox[0]\r\n \r\n //颜色选择器对象\r\n ,elemPicker = that.elemPicker = $(['
                          '\r\n //颜色面板\r\n ,'
                          '\r\n ,'
                          '\r\n ,'
                          '\r\n ,'
                          '\r\n ,'
                          '\r\n ,'
                          '\r\n ,'
                          '\r\n ,'
                          '\r\n ,'
                          '\r\n ,'
                          '\r\n \r\n //透明度条块\r\n ,'
                          '\r\n ,'
                          '\r\n ,'
                          '\r\n ,'
                          '\r\n ,'
                          '\r\n \r\n //预设颜色列表\r\n ,function(){\r\n if(options.predefine){\r\n var list = ['
                          '];\r\n layui.each(options.colors, function(i, v){\r\n list.push(['
                          3 \r\n ? ' layui-colorpicker-pre-isalpha' \r\n : '') +'\">'\r\n ,'
                          '\r\n ,'
                          '].join(''));\r\n });\r\n list.push('
                          ');\r\n return list.join('');\r\n } else {\r\n return '';\r\n }\r\n }()\r\n \r\n //底部表单元素区域\r\n ,'
                          '\r\n ,'
                          '\r\n ,''\r\n ,'
                          '\r\n ,'
                          '\r\n ,''\r\n ,''\r\n ,''\r\n ,'
                          '].join(''))\r\n \r\n ,elemColorBoxSpan = that.elemColorBox.find('.' + PICKER_TRIG_SPAN)[0];\r\n \r\n //如果当前点击的颜色盒子已经存在选择器,则关闭\r\n if($(ELEM_MAIN)[0] && $(ELEM_MAIN).data('index') == that.index){\r\n that.removePicker(Class.thisElemInd);\r\n } else { //插入颜色选择器\r\n that.removePicker(Class.thisElemInd); \r\n $('body').append(elemPicker);\r\n }\r\n\r\n // 记录当前执行的实例索引\r\n colorpicker.thisId = options.id;\r\n \r\n Class.thisElemInd = that.index; //记录最新打开的选择器索引\r\n Class.thisColor = elemColorBox.style.background //记录最新打开的选择器颜色选中值\r\n \r\n that.position();\r\n that.pickerEvents();\r\n };\r\n\r\n //颜色选择器移除\r\n Class.prototype.removePicker = function(index){\r\n var that = this;\r\n var options = that.config;\r\n var elem = $('#layui-colorpicker'+ (index || that.index));\r\n\r\n if(elem[0]){\r\n elem.remove();\r\n delete colorpicker.thisId;\r\n\r\n // 面板关闭后的回调\r\n typeof options.close === 'function' && options.close(that.color);\r\n }\r\n\r\n return that;\r\n };\r\n \r\n //定位算法\r\n Class.prototype.position = function(){\r\n var that = this\r\n ,options = that.config;\r\n lay.position(that.bindElem || that.elemColorBox[0], that.elemPicker[0], {\r\n position: options.position\r\n ,align: 'center'\r\n });\r\n return that;\r\n };\r\n\r\n //颜色选择器赋值\r\n Class.prototype.val = function(){\r\n var that = this\r\n ,options = that.config\r\n \r\n ,elemColorBox = that.elemColorBox.find('.' + PICKER_TRIG_SPAN)\r\n ,elemPickerInput = that.elemPicker.find('.' + PICKER_INPUT)\r\n ,e = elemColorBox[0]\r\n ,bgcolor = e.style.backgroundColor;\r\n\r\n //判断是否有背景颜色\r\n if(bgcolor){\r\n \r\n //转化成hsb格式\r\n var hsb = RGBToHSB(RGBSTo(bgcolor))\r\n ,type = elemColorBox.attr('lay-type');\r\n \r\n //同步滑块的位置及颜色选择器的选择\r\n that.select(hsb.h, hsb.s, hsb.b);\r\n \r\n // 若格式要求为rgb\r\n if(type === 'torgb'){\r\n elemPickerInput.find('input').val(bgcolor);\r\n } else if(type === 'rgba'){ // 若格式要求为 rgba\r\n var rgb = RGBSTo(bgcolor);\r\n \r\n // 若开启透明度而没有设置,则给默认值\r\n if((bgcolor.match(/[0-9]{1,3}/g) || []).length === 3){\r\n elemPickerInput.find('input').val('rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', 1)');\r\n that.elemPicker.find('.'+ PICKER_ALPHA_SLIDER).css(\"left\", 280);\r\n } else {\r\n elemPickerInput.find('input').val(bgcolor);\r\n var left = bgcolor.slice(bgcolor.lastIndexOf(\",\") + 1, bgcolor.length - 1) * 280;\r\n that.elemPicker.find('.'+ PICKER_ALPHA_SLIDER).css(\"left\", left);\r\n }\r\n \r\n // 设置 span 背景色\r\n that.elemPicker.find('.'+ PICKER_ALPHA_BG)[0].style.background = 'linear-gradient(to right, rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', 0), rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +'))'; \r\n } else {\r\n elemPickerInput.find('input').val('#'+ HSBToHEX(hsb));\r\n }\r\n } else {\r\n // 若没有背景颜色则默认到最初始的状态\r\n that.select(0,100,100);\r\n elemPickerInput.find('input').val(\"\");\r\n that.elemPicker.find('.'+ PICKER_ALPHA_BG)[0].style.background = '';\r\n that.elemPicker.find('.'+ PICKER_ALPHA_SLIDER).css(\"left\", 280);\r\n }\r\n };\r\n\r\n //颜色选择器滑动 / 点击\r\n Class.prototype.side = function(){\r\n var that = this\r\n ,options = that.config\r\n \r\n ,span = that.elemColorBox.find('.' + PICKER_TRIG_SPAN)\r\n ,type = span.attr('lay-type')\r\n\r\n ,side = that.elemPicker.find('.' + PICKER_SIDE)\r\n ,slider = that.elemPicker.find('.' + PICKER_SIDE_SLIDER)\r\n ,basis = that.elemPicker.find('.' + PICKER_BASIS)\r\n ,choose = that.elemPicker.find('.' + PICKER_BASIS_CUR)\r\n ,alphacolor = that.elemPicker.find('.' + PICKER_ALPHA_BG)\r\n ,alphaslider = that.elemPicker.find('.' + PICKER_ALPHA_SLIDER)\r\n \r\n ,_h = slider[0].offsetTop/180*360\r\n ,_b = 100 - (choose[0].offsetTop + 3)/180*100\r\n ,_s = (choose[0].offsetLeft + 3)/260*100\r\n ,_a = Math.round(alphaslider[0].offsetLeft/280*100)/100 \r\n \r\n ,i = that.elemColorBox.find('.' + PICKER_TRIG_I)\r\n ,pre = that.elemPicker.find('.layui-colorpicker-pre').children('div')\r\n\r\n ,change = function(x,y,z,a){\r\n that.select(x, y, z);\r\n var rgb = HSBToRGB({h:x, s:y, b:z});\r\n var color = HSBToHEX({h:x, s:y, b:z});\r\n var elemInput = that.elemPicker.find('.' + PICKER_INPUT).find('input');\r\n\r\n i.addClass(ICON_PICKER_DOWN).removeClass(ICON_PICKER_CLOSE);\r\n span[0].style.background = 'rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +')';\r\n\r\n if(type === 'torgb'){\r\n elemInput.val('rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +')');\r\n } else if(type === 'rgba'){\r\n var left = a * 280;\r\n alphaslider.css(\"left\", left);\r\n elemInput.val('rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', '+ a +')');\r\n span[0].style.background = 'rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', '+ a +')';\r\n alphacolor[0].style.background = 'linear-gradient(to right, rgba('+ rgb.r +', '+ rgb.g +', '+ rgb.b +', 0), rgb('+ rgb.r +', '+ rgb.g +', '+ rgb.b +'))'\r\n } else {\r\n elemInput.val('#'+ color);\r\n }\r\n \r\n //回调更改的颜色\r\n options.change && options.change(that.elemPicker.find('.' + PICKER_INPUT).find('input').val());\r\n }\r\n\r\n //拖拽元素\r\n ,elemMove = $(['
                          '].join(''))\r\n ,createMoveElem = function(call){\r\n $('#LAY-colorpicker-moving')[0] || $('body').append(elemMove);\r\n elemMove.on('mousemove', call);\r\n elemMove.on('mouseup', function(){\r\n elemMove.remove();\r\n }).on('mouseleave', function(){\r\n elemMove.remove();\r\n });\r\n };\r\n\r\n //右侧主色选择\r\n slider.on('mousedown', function(e){\r\n var oldtop = this.offsetTop\r\n ,oldy = e.clientY;\r\n var move = function(e){\r\n var top = oldtop + (e.clientY - oldy)\r\n ,maxh = side[0].offsetHeight;\r\n if(top < 0)top = 0;\r\n if(top > maxh)top = maxh;\r\n var h = top/180*360;\r\n _h = h;\r\n change(h, _s, _b, _a);\r\n e.preventDefault();\r\n };\r\n \r\n createMoveElem(move);\r\n //layui.stope(e);\r\n e.preventDefault();\r\n });\r\n \r\n side.on('click', function(e){\r\n var top = e.clientY - $(this).offset().top + $win.scrollTop();\r\n if(top < 0)top = 0;\r\n if(top > this.offsetHeight) top = this.offsetHeight; \r\n var h = top/180*360;\r\n _h = h;\r\n change(h, _s, _b, _a); \r\n e.preventDefault();\r\n });\r\n \r\n //中间小圆点颜色选择\r\n choose.on('mousedown', function(e){\r\n var oldtop = this.offsetTop\r\n ,oldleft = this.offsetLeft\r\n ,oldy = e.clientY\r\n ,oldx = e.clientX;\r\n var move = function(e){\r\n var top = oldtop + (e.clientY - oldy)\r\n ,left = oldleft + (e.clientX - oldx)\r\n ,maxh = basis[0].offsetHeight - 3\r\n ,maxw = basis[0].offsetWidth - 3;\r\n if(top < -3)top = -3;\r\n if(top > maxh)top = maxh;\r\n if(left < -3)left = -3;\r\n if(left > maxw)left = maxw;\r\n var s = (left + 3)/260*100\r\n ,b = 100 - (top + 3)/180*100;\r\n _b = b;\r\n _s = s;\r\n change(_h, s, b, _a); \r\n e.preventDefault();\r\n };\r\n layui.stope(e);\r\n createMoveElem(move);\r\n e.preventDefault();\r\n });\r\n \r\n basis.on('mousedown', function(e){\r\n var top = e.clientY - $(this).offset().top - 3 + $win.scrollTop()\r\n ,left = e.clientX - $(this).offset().left - 3 + $win.scrollLeft()\r\n if(top < -3)top = -3;\r\n if(top > this.offsetHeight - 3)top = this.offsetHeight - 3;\r\n if(left < -3)left = -3;\r\n if(left > this.offsetWidth - 3)left = this.offsetWidth - 3;\r\n var s = (left + 3)/260*100\r\n ,b = 100 - (top + 3)/180*100;\r\n _b = b;\r\n _s = s;\r\n change(_h, s, b, _a); \r\n layui.stope(e);\r\n e.preventDefault();\r\n choose.trigger(e, 'mousedown');\r\n });\r\n \r\n //底部透明度选择\r\n alphaslider.on('mousedown', function(e){\r\n var oldleft = this.offsetLeft\r\n ,oldx = e.clientX;\r\n var move = function(e){\r\n var left = oldleft + (e.clientX - oldx)\r\n ,maxw = alphacolor[0].offsetWidth;\r\n if(left < 0)left = 0;\r\n if(left > maxw)left = maxw;\r\n var a = Math.round(left /280*100) /100;\r\n _a = a;\r\n change(_h, _s, _b, a); \r\n e.preventDefault();\r\n };\r\n \r\n createMoveElem(move);\r\n e.preventDefault();\r\n });\r\n alphacolor.on('click', function(e){\r\n var left = e.clientX - $(this).offset().left\r\n if(left < 0)left = 0;\r\n if(left > this.offsetWidth)left = this.offsetWidth;\r\n var a = Math.round(left /280*100) /100;\r\n _a = a;\r\n change(_h, _s, _b, a); \r\n e.preventDefault();\r\n });\r\n \r\n //预定义颜色选择\r\n pre.each(function(){\r\n $(this).on('click', function(){\r\n $(this).parent('.layui-colorpicker-pre').addClass('selected').siblings().removeClass('selected');\r\n var color = this.style.backgroundColor\r\n ,hsb = RGBToHSB(RGBSTo(color))\r\n ,a = color.slice(color.lastIndexOf(\",\") + 1, color.length - 1),left;\r\n _h = hsb.h;\r\n _s = hsb.s;\r\n _b = hsb.b;\r\n if((color.match(/[0-9]{1,3}/g) || []).length === 3) a = 1;\r\n _a = a;\r\n left = a * 280;\r\n change(hsb.h, hsb.s, hsb.b, a);\r\n })\r\n });\r\n };\r\n\r\n //颜色选择器hsb转换\r\n Class.prototype.select = function(h, s, b, type){\r\n var that = this;\r\n var options = that.config;\r\n var hex = HSBToHEX({h:h, s:100, b:100});\r\n var color = HSBToHEX({h:h, s:s, b:b});\r\n var sidetop = h/360*180;\r\n var top = 180 - b/100*180 - 3;\r\n var left = s/100*260 - 3;\r\n \r\n that.elemPicker.find('.' + PICKER_SIDE_SLIDER).css(\"top\", sidetop); //滑块的top\r\n that.elemPicker.find('.' + PICKER_BASIS)[0].style.background = '#' + hex; //颜色选择器的背景\r\n \r\n //选择器的top left\r\n that.elemPicker.find('.' + PICKER_BASIS_CUR).css({\r\n \"top\": top\r\n ,\"left\": left\r\n });\r\n \r\n // if(type === 'change') return;\r\n\r\n // 选中的颜色\r\n // that.elemPicker.find('.' + PICKER_INPUT).find('input').val('#'+ color);\r\n };\r\n \r\n Class.prototype.pickerEvents = function(){\r\n var that = this\r\n ,options = that.config\r\n \r\n ,elemColorBoxSpan = that.elemColorBox.find('.' + PICKER_TRIG_SPAN) //颜色盒子\r\n ,elemPickerInput = that.elemPicker.find('.' + PICKER_INPUT + ' input') //颜色选择器表单\r\n \r\n ,pickerEvents = {\r\n //清空\r\n clear: function(othis){\r\n elemColorBoxSpan[0].style.background ='';\r\n that.elemColorBox.find('.' + PICKER_TRIG_I).removeClass(ICON_PICKER_DOWN).addClass(ICON_PICKER_CLOSE);\r\n that.color = '';\r\n \r\n options.done && options.done('');\r\n that.removePicker();\r\n }\r\n \r\n //确认\r\n ,confirm: function(othis, change){\r\n var value = elemPickerInput.val()\r\n ,colorValue\r\n ,hsb;\r\n \r\n if(value.indexOf(',') > -1){\r\n hsb = RGBToHSB(RGBSTo(value));\r\n that.select(hsb.h, hsb.s, hsb.b);\r\n elemColorBoxSpan[0].style.background = (colorValue = '#' + HSBToHEX(hsb)); \r\n \r\n if((value.match(/[0-9]{1,3}/g) || []).length > 3 && elemColorBoxSpan.attr('lay-type') === 'rgba'){\r\n var left = value.slice(value.lastIndexOf(\",\") + 1, value.length - 1) * 280;\r\n that.elemPicker.find('.' + PICKER_ALPHA_SLIDER).css(\"left\", left);\r\n elemColorBoxSpan[0].style.background = value;\r\n colorValue = value;\r\n }\r\n } else {\r\n hsb = HEXToHSB(value);\r\n elemColorBoxSpan[0].style.background = (colorValue = '#' + HSBToHEX(hsb)); \r\n that.elemColorBox.find('.' + PICKER_TRIG_I).removeClass(ICON_PICKER_CLOSE).addClass(ICON_PICKER_DOWN);\r\n }\r\n \r\n if(change === 'change'){\r\n that.select(hsb.h, hsb.s, hsb.b, change);\r\n options.change && options.change(colorValue);\r\n return;\r\n }\r\n that.color = value;\r\n \r\n options.done && options.done(value);\r\n that.removePicker(); \r\n }\r\n };\r\n \r\n //选择器面板点击事件\r\n that.elemPicker.on('click', '*[colorpicker-events]', function(){\r\n var othis = $(this)\r\n ,attrEvent = othis.attr('colorpicker-events');\r\n pickerEvents[attrEvent] && pickerEvents[attrEvent].call(this, othis);\r\n });\r\n \r\n //输入框事件\r\n elemPickerInput.on('keyup', function(e){\r\n var othis = $(this);\r\n pickerEvents.confirm.call(this, othis, e.keyCode === 13 ? null : 'change');\r\n });\r\n }\r\n\r\n // 颜色选择器输入\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 弹出颜色选择器\r\n that.elemColorBox.on('click' , function(){\r\n that.renderPicker();\r\n if($(ELEM_MAIN)[0]){\r\n that.val();\r\n that.side();\r\n }\r\n });\r\n };\r\n\r\n //全局事件\r\n (function(){\r\n //绑定关闭控件事件\r\n $doc.on(clickOrMousedown, function(e){\r\n if(!colorpicker.thisId) return;\r\n var that = thisModule.getThis(colorpicker.thisId);\r\n if(!that) return;\r\n\r\n var options = that.config;\r\n var elemColorBoxSpan = that.elemColorBox.find('.' + PICKER_TRIG_SPAN);\r\n\r\n //如果点击的元素是颜色框\r\n if($(e.target).hasClass(ELEM) \r\n || $(e.target).parents('.'+ELEM)[0]\r\n ) return; \r\n \r\n //如果点击的元素是选择器\r\n if($(e.target).hasClass(ELEM_MAIN.replace(/\\./g, '')) \r\n || $(e.target).parents(ELEM_MAIN)[0]\r\n ) return; \r\n \r\n if(!that.elemPicker) return;\r\n \r\n if(that.color){\r\n var hsb = RGBToHSB(RGBSTo(that.color));\r\n that.select(hsb.h, hsb.s, hsb.b); \r\n } else {\r\n that.elemColorBox.find('.' + PICKER_TRIG_I).removeClass(ICON_PICKER_DOWN).addClass(ICON_PICKER_CLOSE);\r\n }\r\n elemColorBoxSpan[0].style.background = that.color || '';\r\n \r\n // 取消选择的回调\r\n typeof options.cancel === 'function' && options.cancel(that.color);\r\n\r\n // 移除面板\r\n that.removePicker();\r\n });\r\n\r\n //自适应定位\r\n $win.on('resize', function(){\r\n if(!colorpicker.thisId) return;\r\n var that = thisModule.getThis(colorpicker.thisId);\r\n if(!that) return;\r\n\r\n if(!that.elemPicker || !$(ELEM_MAIN)[0]){\r\n return false;\r\n }\r\n that.position();\r\n });\r\n })();\r\n\r\n // 记录所有实例\r\n thisModule.that = {}; // 记录所有实例对象\r\n \r\n // 获取当前实例对象\r\n thisModule.getThis = function(id){\r\n var that = thisModule.that[id];\r\n if(!that) hint.error(id ? (MOD_NAME +' instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return that;\r\n };\r\n \r\n //核心入口\r\n colorpicker.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n \r\n exports(MOD_NAME, colorpicker);\r\n});\r\n","/**\r\n * element\r\n * 常用元素操作组件\r\n */\r\n \r\nlayui.define('jquery', function(exports){\r\n 'use strict';\r\n \r\n var $ = layui.$;\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n \r\n var MOD_NAME = 'element';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var TITLE = '.layui-tab-title';\r\n \r\n var Element = function(){\r\n this.config = {};\r\n };\r\n \r\n // 全局设置\r\n Element.prototype.set = function(options){\r\n var that = this;\r\n $.extend(true, that.config, options);\r\n return that;\r\n };\r\n \r\n // 表单事件\r\n Element.prototype.on = function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n };\r\n \r\n // 外部 Tab 新增\r\n Element.prototype.tabAdd = function(filter, options){\r\n var tabElem = $('.layui-tab[lay-filter='+ filter +']');\r\n var titElem = tabElem.children(TITLE);\r\n var barElem = titElem.children('.layui-tab-bar');\r\n var contElem = tabElem.children('.layui-tab-content');\r\n var li = ' 0) layAttr.unshift(''); //向前插,预留空格\r\n return layAttr.join(' ');\r\n }() +'>'+ (options.title || 'unnaming') +'';\r\n \r\n barElem[0] ? barElem.before(li) : titElem.append(li);\r\n contElem.append('
                          '+ (options.content || '') +'
                          ');\r\n // call.hideTabMore(true);\r\n // 是否添加即切换\r\n options.change && this.tabChange(filter, options.id);\r\n titElem.data('LAY_TAB_CHANGE', options.change);\r\n call.tabAuto(options.change ? 'change' : null);\r\n return this;\r\n };\r\n \r\n // 外部 Tab 删除\r\n Element.prototype.tabDelete = function(filter, layid){\r\n var tabElem = $('.layui-tab[lay-filter='+ filter +']');\r\n var titElem = tabElem.children(TITLE);\r\n var liElem = titElem.find('>li[lay-id=\"'+ layid +'\"]');\r\n call.tabDelete(null, liElem);\r\n return this;\r\n };\r\n \r\n // 外部 Tab 切换\r\n Element.prototype.tabChange = function(filter, layid){\r\n var tabElem = $('.layui-tab[lay-filter='+ filter +']');\r\n var titElem = tabElem.children(TITLE);\r\n var liElem = titElem.find('>li[lay-id=\"'+ layid +'\"]');\r\n\r\n call.tabClick.call(liElem[0], {\r\n liElem: liElem\r\n });\r\n return this;\r\n };\r\n \r\n // 自定义 Tab 选项卡\r\n Element.prototype.tab = function(options){\r\n options = options || {};\r\n dom.on('click', options.headerElem, function(e){\r\n var index = $(this).index();\r\n call.tabClick.call(this, {\r\n index: index,\r\n options: options\r\n });\r\n });\r\n };\r\n \r\n \r\n // 动态改变进度条\r\n Element.prototype.progress = function(filter, percent){\r\n var ELEM = 'layui-progress';\r\n var elem = $('.'+ ELEM +'[lay-filter='+ filter +']');\r\n var elemBar = elem.find('.'+ ELEM +'-bar');\r\n var text = elemBar.find('.'+ ELEM +'-text');\r\n\r\n elemBar.css('width', function(){\r\n return /^.+\\/.+$/.test(percent) \r\n ? (new Function('return '+ percent)() * 100) + '%'\r\n : percent;\r\n }).attr('lay-percent', percent);\r\n text.text(percent);\r\n return this;\r\n };\r\n \r\n var NAV_ELEM = '.layui-nav';\r\n var NAV_ITEM = 'layui-nav-item';\r\n var NAV_BAR = 'layui-nav-bar';\r\n var NAV_TREE = 'layui-nav-tree';\r\n var NAV_CHILD = 'layui-nav-child';\r\n var NAV_CHILD_C = 'layui-nav-child-c';\r\n var NAV_MORE = 'layui-nav-more';\r\n var NAV_DOWN = 'layui-icon-down';\r\n var NAV_ANIM = 'layui-anim layui-anim-upbit';\r\n \r\n // 基础事件体\r\n var call = {\r\n // Tab 点击\r\n tabClick: function(obj){\r\n obj = obj || {};\r\n var options = obj.options || {};\r\n var othis = obj.liElem || $(this);\r\n var parents = options.headerElem \r\n ? othis.parent() \r\n : othis.parents('.layui-tab').eq(0);\r\n var item = options.bodyElem \r\n ? $(options.bodyElem) \r\n : parents.children('.layui-tab-content').children('.layui-tab-item');\r\n var elemA = othis.find('a');\r\n var isJump = elemA.attr('href') !== 'javascript:;' && elemA.attr('target') === '_blank'; // 是否存在跳转\r\n var unselect = typeof othis.attr('lay-unselect') === 'string'; // 是否禁用选中\r\n var filter = parents.attr('lay-filter');\r\n\r\n // 下标\r\n var index = 'index' in obj \r\n ? obj.index \r\n : othis.parent().children('li').index(othis);\r\n \r\n // 执行切换\r\n if(!(isJump || unselect)){\r\n othis.addClass(THIS).siblings().removeClass(THIS);\r\n item.eq(index).addClass(SHOW).siblings().removeClass(SHOW);\r\n }\r\n \r\n layui.event.call(this, MOD_NAME, 'tab('+ filter +')', {\r\n elem: parents,\r\n index: index\r\n });\r\n }\r\n \r\n // Tab 删除\r\n ,tabDelete: function(e, othis){\r\n var li = othis || $(this).parent();\r\n var index = li.parent().children('li').index(li);\r\n var tabElem = li.closest('.layui-tab');\r\n var item = tabElem.children('.layui-tab-content').children('.layui-tab-item');\r\n var filter = tabElem.attr('lay-filter');\r\n \r\n if(li.hasClass(THIS)){\r\n if (li.next()[0] && li.next().is('li')){\r\n call.tabClick.call(li.next()[0], {\r\n index: index + 1\r\n });\r\n } else if (li.prev()[0] && li.prev().is('li')){\r\n call.tabClick.call(li.prev()[0], null, index - 1);\r\n }\r\n }\r\n \r\n li.remove();\r\n item.eq(index).remove();\r\n setTimeout(function(){\r\n call.tabAuto();\r\n }, 50);\r\n \r\n layui.event.call(this, MOD_NAME, 'tabDelete('+ filter +')', {\r\n elem: tabElem,\r\n index: index\r\n });\r\n }\r\n \r\n // Tab 自适应\r\n ,tabAuto: function(spread){\r\n var SCROLL = 'layui-tab-scroll';\r\n var MORE = 'layui-tab-more';\r\n var BAR = 'layui-tab-bar';\r\n var CLOSE = 'layui-tab-close';\r\n var that = this;\r\n \r\n $('.layui-tab').each(function(){\r\n var othis = $(this);\r\n var title = othis.children('.layui-tab-title');\r\n var item = othis.children('.layui-tab-content').children('.layui-tab-item');\r\n var STOPE = 'lay-stope=\"tabmore\"';\r\n var span = $('');\r\n\r\n if(that === window && device.ie != 8){\r\n // call.hideTabMore(true)\r\n }\r\n \r\n // 开启关闭图标\r\n if(othis.attr('lay-allowclose')){\r\n title.find('li').each(function(){\r\n var li = $(this);\r\n if(!li.find('.'+CLOSE)[0]){\r\n var close = $('');\r\n close.on('click', call.tabDelete);\r\n li.append(close);\r\n }\r\n });\r\n }\r\n \r\n if(typeof othis.attr('lay-unauto') === 'string') return;\r\n \r\n // 响应式\r\n if(\r\n title.prop('scrollWidth') > title.outerWidth() + 1 || (\r\n title.find('li').length && title.height() > function(height){\r\n return height + height/2;\r\n }(title.find('li').eq(0).height())\r\n )\r\n ){\r\n // 若执行是来自于切换,则自动展开\r\n (\r\n spread === 'change' && title.data('LAY_TAB_CHANGE')\r\n ) && title.addClass(MORE);\r\n \r\n if(title.find('.'+BAR)[0]) return;\r\n title.append(span);\r\n othis.attr('overflow', '');\r\n\r\n // 展开图标事件\r\n span.on('click', function(e){\r\n var isSpread = title.hasClass(MORE);\r\n title[isSpread ? 'removeClass' : 'addClass'](MORE);\r\n });\r\n } else {\r\n title.find('.'+ BAR).remove();\r\n othis.removeAttr('overflow');\r\n }\r\n });\r\n }\r\n // 隐藏更多 Tab\r\n ,hideTabMore: function(e){\r\n var tsbTitle = $('.layui-tab-title');\r\n if(e === true || $(e.target).attr('lay-stope') !== 'tabmore'){\r\n tsbTitle.removeClass('layui-tab-more');\r\n tsbTitle.find('.layui-tab-bar').attr('title','');\r\n }\r\n }\r\n \r\n //点击一级菜单\r\n /*\r\n ,clickThis: function(){\r\n var othis = $(this), parents = othis.parents(NAV_ELEM)\r\n ,filter = parents.attr('lay-filter')\r\n ,elemA = othis.find('a')\r\n ,unselect = typeof othis.attr('lay-unselect') === 'string';\r\n\r\n if(othis.find('.'+NAV_CHILD)[0]) return;\r\n \r\n if(!(elemA.attr('href') !== 'javascript:;' && elemA.attr('target') === '_blank') && !unselect){\r\n parents.find('.'+THIS).removeClass(THIS);\r\n othis.addClass(THIS);\r\n }\r\n \r\n layui.event.call(this, MOD_NAME, 'nav('+ filter +')', othis);\r\n }\r\n )\r\n */\r\n \r\n // 点击菜单 - a 标签触发\r\n ,clickThis: function() {\r\n var othis = $(this);\r\n var parents = othis.closest(NAV_ELEM);\r\n var filter = parents.attr('lay-filter');\r\n var parent = othis.parent() ;\r\n var child = othis.siblings('.'+ NAV_CHILD);\r\n var unselect = typeof parent.attr('lay-unselect') === 'string'; // 是否禁用选中\r\n \r\n // 满足点击选中的条件\r\n if (!(othis.attr('href') !== 'javascript:;' && othis.attr('target') === '_blank') && !unselect) {\r\n if (!child[0]) {\r\n parents.find('.'+ THIS).removeClass(THIS);\r\n parent.addClass(THIS);\r\n }\r\n }\r\n \r\n // 若为垂直菜单\r\n if (parents.hasClass(NAV_TREE)) {\r\n var NAV_ITEMED = NAV_ITEM + 'ed'; // 用于标注展开状态\r\n var needExpand = !parent.hasClass(NAV_ITEMED); // 是否执行展开\r\n var ANIM_MS = 200; // 动画过渡毫秒数\r\n\r\n // 动画执行完成后的操作\r\n var complete = function() {\r\n $(this).css({\r\n \"display\": \"\" // 剔除动画生成的 style display,以适配外部样式的状态重置\r\n });\r\n // 避免导航滑块错位\r\n parents.children('.'+ NAV_BAR).css({\r\n opacity: 0\r\n })\r\n };\r\n\r\n // 是否正处于动画中的状态\r\n if (child.is(':animated')) return;\r\n\r\n // 剔除可能存在的 CSS3 动画类\r\n child.removeClass(NAV_ANIM);\r\n\r\n // 若有子菜单,则对其执行展开或收缩\r\n if (child[0]) {\r\n if (needExpand) {\r\n // 先执行 slideDown 动画,再标注展开状态样式,避免元素 `block` 状态导致动画无效\r\n child.slideDown(ANIM_MS, complete);\r\n parent.addClass(NAV_ITEMED);\r\n } else {\r\n // 先取消展开状态样式,再将元素临时显示,避免 `none` 状态导致 slideUp 动画无效\r\n parent.removeClass(NAV_ITEMED);\r\n child.show().slideUp(ANIM_MS, complete);\r\n }\r\n\r\n // 手风琴 --- 收缩兄弟展开项\r\n if (typeof parents.attr('lay-accordion') === 'string' || parents.attr('lay-shrink') === 'all') {\r\n var parentSibs = parent.siblings('.'+ NAV_ITEMED);\r\n parentSibs.removeClass(NAV_ITEMED);\r\n parentSibs.children('.'+ NAV_CHILD).show().stop().slideUp(ANIM_MS, complete);\r\n }\r\n }\r\n }\r\n \r\n layui.event.call(this, MOD_NAME, 'nav('+ filter +')', othis);\r\n }\r\n \r\n // 折叠面板\r\n ,collapse: function(){\r\n var othis = $(this);\r\n var icon = othis.find('.layui-colla-icon');\r\n var elemCont = othis.siblings('.layui-colla-content');\r\n var parents = othis.parents('.layui-collapse').eq(0);\r\n var filter = parents.attr('lay-filter');\r\n var isNone = elemCont.css('display') === 'none';\r\n \r\n // 是否手风琴\r\n if(typeof parents.attr('lay-accordion') === 'string'){\r\n var show = parents.children('.layui-colla-item').children('.'+SHOW);\r\n show.siblings('.layui-colla-title').children('.layui-colla-icon').html('');\r\n show.removeClass(SHOW);\r\n }\r\n \r\n elemCont[isNone ? 'addClass' : 'removeClass'](SHOW);\r\n icon.html(isNone ? '' : '');\r\n \r\n layui.event.call(this, MOD_NAME, 'collapse('+ filter +')', {\r\n title: othis\r\n ,content: elemCont\r\n ,show: isNone\r\n });\r\n }\r\n };\r\n \r\n // 初始化元素操作\r\n Element.prototype.init = function(type, filter){\r\n var that = this, elemFilter = function(){\r\n return filter ? ('[lay-filter=\"' + filter +'\"]') : '';\r\n }(), items = {\r\n \r\n // Tab 选项卡\r\n tab: function(){\r\n call.tabAuto.call({});\r\n }\r\n \r\n // 导航菜单\r\n ,nav: function(){\r\n var TIME = 200;\r\n var timer = {};\r\n var timerMore = {};\r\n var timeEnd = {};\r\n var NAV_TITLE = 'layui-nav-title';\r\n \r\n // 滑块跟随\r\n var follow = function(bar, nav, index) {\r\n var othis = $(this);\r\n var child = othis.find('.'+NAV_CHILD);\r\n\r\n // 是否垂直导航菜单\r\n if (nav.hasClass(NAV_TREE)) {\r\n // 无子菜单时跟随\r\n if (!child[0]) {\r\n var thisA = othis.children('.'+ NAV_TITLE);\r\n bar.css({\r\n top: othis.offset().top - nav.offset().top,\r\n height: (thisA[0] ? thisA : othis).outerHeight(),\r\n opacity: 1\r\n });\r\n }\r\n } else {\r\n child.addClass(NAV_ANIM);\r\n \r\n // 若居中对齐\r\n if (child.hasClass(NAV_CHILD_C)) {\r\n child.css({\r\n left: -(child.outerWidth() - othis.width()) / 2\r\n });\r\n }\r\n \r\n // 滑块定位\r\n if (child[0]) { // 若有子菜单,则滑块消失\r\n bar.css({\r\n left: bar.position().left + bar.width() / 2,\r\n width: 0,\r\n opacity: 0\r\n });\r\n } else { // bar 跟随\r\n bar.css({\r\n left: othis.position().left + parseFloat(othis.css('marginLeft')),\r\n top: othis.position().top + othis.height() - bar.height()\r\n });\r\n }\r\n \r\n // 渐显滑块并适配宽度\r\n timer[index] = setTimeout(function() {\r\n bar.css({\r\n width: child[0] ? 0 : othis.width(),\r\n opacity: child[0] ? 0 : 1\r\n });\r\n }, device.ie && device.ie < 10 ? 0 : TIME);\r\n \r\n // 显示子菜单\r\n clearTimeout(timeEnd[index]);\r\n if (child.css('display') === 'block') {\r\n clearTimeout(timerMore[index]);\r\n }\r\n timerMore[index] = setTimeout(function(){\r\n child.addClass(SHOW);\r\n othis.find('.'+NAV_MORE).addClass(NAV_MORE+'d');\r\n }, 300);\r\n }\r\n };\r\n \r\n // 遍历导航\r\n $(NAV_ELEM + elemFilter).each(function(index) {\r\n var othis = $(this);\r\n var bar = $('');\r\n var itemElem = othis.find('.'+NAV_ITEM);\r\n \r\n // hover 滑动效果\r\n if (!othis.find('.'+NAV_BAR)[0]) {\r\n othis.append(bar);\r\n ( othis.hasClass(NAV_TREE)\r\n ? itemElem.find('dd,>.'+ NAV_TITLE) \r\n : itemElem\r\n ).on('mouseenter', function() {\r\n follow.call(this, bar, othis, index);\r\n }).on('mouseleave', function() { // 鼠标移出\r\n // 是否为垂直导航\r\n if (othis.hasClass(NAV_TREE)) {\r\n bar.css({\r\n height: 0,\r\n opacity: 0\r\n });\r\n } else {\r\n // 隐藏子菜单\r\n clearTimeout(timerMore[index]);\r\n timerMore[index] = setTimeout(function(){\r\n othis.find('.'+ NAV_CHILD).removeClass(SHOW);\r\n othis.find('.'+ NAV_MORE).removeClass(NAV_MORE +'d');\r\n }, 300);\r\n }\r\n });\r\n\r\n // 鼠标离开当前菜单时\r\n othis.on('mouseleave', function() {\r\n clearTimeout(timer[index])\r\n timeEnd[index] = setTimeout(function() {\r\n if (!othis.hasClass(NAV_TREE)) {\r\n bar.css({\r\n width: 0,\r\n left: bar.position().left + bar.width() / 2,\r\n opacity: 0\r\n });\r\n }\r\n }, TIME);\r\n });\r\n }\r\n \r\n // 展开子菜单\r\n itemElem.find('a').each(function() {\r\n var thisA = $(this);\r\n var parent = thisA.parent();\r\n var child = thisA.siblings('.'+ NAV_CHILD);\r\n \r\n // 输出小箭头\r\n if (child[0] && !thisA.children('.'+ NAV_MORE)[0]) {\r\n thisA.append('');\r\n }\r\n \r\n thisA.off('click', call.clickThis).on('click', call.clickThis); // 点击菜单\r\n });\r\n });\r\n }\r\n \r\n //面包屑\r\n ,breadcrumb: function(){\r\n var ELEM = '.layui-breadcrumb';\r\n \r\n $(ELEM + elemFilter).each(function(){\r\n var othis = $(this)\r\n ,ATTE_SPR = 'lay-separator'\r\n ,separator = othis.attr(ATTE_SPR) || '/'\r\n ,aNode = othis.find('a');\r\n if(aNode.next('span['+ ATTE_SPR +']')[0]) return;\r\n aNode.each(function(index){\r\n if(index === aNode.length - 1) return;\r\n $(this).after(''+ separator +'');\r\n });\r\n othis.css('visibility', 'visible');\r\n });\r\n }\r\n \r\n //进度条\r\n ,progress: function(){\r\n var ELEM = 'layui-progress';\r\n $('.' + ELEM + elemFilter).each(function(){\r\n var othis = $(this)\r\n ,elemBar = othis.find('.layui-progress-bar')\r\n ,percent = elemBar.attr('lay-percent');\r\n\r\n elemBar.css('width', function(){\r\n return /^.+\\/.+$/.test(percent) \r\n ? (new Function('return '+ percent)() * 100) + '%'\r\n : percent;\r\n });\r\n \r\n if(othis.attr('lay-showpercent')){\r\n setTimeout(function(){\r\n elemBar.html(''+ percent +'');\r\n },350);\r\n }\r\n });\r\n }\r\n \r\n //折叠面板\r\n ,collapse: function(){\r\n var ELEM = 'layui-collapse';\r\n \r\n $('.' + ELEM + elemFilter).each(function(){\r\n var elemItem = $(this).find('.layui-colla-item')\r\n elemItem.each(function(){\r\n var othis = $(this)\r\n ,elemTitle = othis.find('.layui-colla-title')\r\n ,elemCont = othis.find('.layui-colla-content')\r\n ,isNone = elemCont.css('display') === 'none';\r\n \r\n //初始状态\r\n elemTitle.find('.layui-colla-icon').remove();\r\n elemTitle.append(''+ (isNone ? '' : '') +'');\r\n\r\n //点击标题\r\n elemTitle.off('click', call.collapse).on('click', call.collapse);\r\n }); \r\n \r\n });\r\n }\r\n };\r\n\r\n return items[type] ? items[type]() : layui.each(items, function(index, item){\r\n item();\r\n });\r\n };\r\n \r\n Element.prototype.render = Element.prototype.init;\r\n\r\n var element = new Element();\r\n var dom = $(document);\r\n \r\n $(function(){\r\n element.render();\r\n });\r\n\r\n dom.on('click', '.layui-tab-title li', call.tabClick); // Tab 切换\r\n // dom.on('click', call.hideTabMore); // 隐藏展开的 Tab\r\n $(window).on('resize', call.tabAuto); // 自适应\r\n \r\n exports(MOD_NAME, element);\r\n});\r\n\r\n","/**\r\n * upload\r\n * 上传组件\r\n */\r\n \r\nlayui.define(['lay', 'layer'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var lay = layui.lay;\r\n var layer = layui.layer;\r\n var device = layui.device();\r\n\r\n // 模块名\r\n var MOD_NAME = 'upload';\r\n var MOD_INDEX = 'layui_'+ MOD_NAME +'_index'; // 模块索引名\r\n\r\n // 外部接口\r\n var upload = {\r\n config: {}, // 全局配置项\r\n index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0, // 索引\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n \r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id;\r\n\r\n thisModule.that[id] = that; // 记录当前实例对象\r\n\r\n return {\r\n upload: function(files){\r\n that.upload.call(that, files);\r\n },\r\n reload: function(options){\r\n that.reload.call(that, options);\r\n },\r\n config: that.config\r\n }\r\n };\r\n \r\n // 字符常量\r\n var ELEM = 'layui-upload';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var DISABLED = 'layui-disabled';\r\n \r\n var ELEM_FILE = 'layui-upload-file';\r\n var ELEM_FORM = 'layui-upload-form';\r\n var ELEM_IFRAME = 'layui-upload-iframe';\r\n var ELEM_CHOOSE = 'layui-upload-choose';\r\n var ELEM_DRAG = 'layui-upload-drag';\r\n var UPLOADING = 'UPLOADING';\r\n \r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++upload.index;\r\n that.config = $.extend({}, that.config, upload.config, options);\r\n that.render();\r\n };\r\n \r\n // 默认配置\r\n Class.prototype.config = {\r\n accept: 'images', // 允许上传的文件类型:images/file/video/audio\r\n exts: '', // 允许上传的文件后缀名\r\n auto: true, // 是否选完文件后自动上传\r\n bindAction: '', // 手动上传触发的元素\r\n url: '', // 上传地址\r\n force: '', // 强制规定返回的数据格式,目前只支持是否强制 json\r\n field: 'file', // 文件字段名\r\n acceptMime: '', // 筛选出的文件类型,默认为所有文件\r\n method: 'post', // 请求上传的 http 类型\r\n data: {}, // 请求上传的额外参数\r\n drag: true, // 是否允许拖拽上传\r\n size: 0, // 文件限制大小,默认不限制\r\n number: 0, // 允许同时上传的文件数,默认不限制\r\n multiple: false, // 是否允许多文件上传,不支持 ie8-9\r\n text: { // 自定义提示文本\r\n \"cross-domain\": \"Cross-domain requests are not supported\", // 跨域\r\n \"data-format-error\": \"Please return JSON data format\", // 数据格式错误\r\n \"check-error\": \"\", // 文件格式校验失败\r\n \"error\": \"\", // 上传失败\r\n \"limit-number\": null, // 限制 number 属性的提示 --- function\r\n \"limit-size\": null // 限制 size 属性的提示 --- function\r\n }\r\n };\r\n\r\n // 重载实例\r\n Class.prototype.reload = function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n that.render(true);\r\n };\r\n \r\n // 初始渲染\r\n Class.prototype.render = function(rerender){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 若 elem 非唯一\r\n var elem = $(options.elem);\r\n if (elem.length > 1) {\r\n layui.each(elem, function() {\r\n upload.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0], {\r\n attr: elem.attr('lay-data') ? 'lay-data' : null // 兼容旧版的 lay-data 属性\r\n }));\r\n\r\n // 若重复执行 render,则视为 reload 处理\r\n if (!rerender && elem[0] && elem.data(MOD_INDEX)) {\r\n var newThat = thisModule.getThis(elem.data(MOD_INDEX));\r\n if(!newThat) return;\r\n\r\n return newThat.reload(options);\r\n }\r\n\r\n options.elem = $(options.elem);\r\n options.bindAction = $(options.bindAction);\r\n\r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n options.id = 'id' in options ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n\r\n that.file();\r\n that.events();\r\n };\r\n \r\n //追加文件域\r\n Class.prototype.file = function(){\r\n var that = this;\r\n var options = that.config;\r\n var elemFile = that.elemFile = $([\r\n ''\r\n ].join(''));\r\n var next = options.elem.next();\r\n \r\n if(next.hasClass(ELEM_FILE) || next.hasClass(ELEM_FORM)){\r\n next.remove();\r\n }\r\n \r\n //包裹ie8/9容器\r\n if(device.ie && device.ie < 10){\r\n options.elem.wrap('
                          ');\r\n }\r\n \r\n that.isFile() ? (\r\n that.elemFile = options.elem,\r\n options.field = options.elem[0].name\r\n ) : options.elem.after(elemFile);\r\n \r\n //初始化ie8/9的Form域\r\n if(device.ie && device.ie < 10){\r\n that.initIE();\r\n }\r\n };\r\n \r\n //ie8-9初始化\r\n Class.prototype.initIE = function(){\r\n var that = this;\r\n var options = that.config;\r\n var iframe = $('');\r\n var elemForm = $(['
                          '\r\n ,''].join(''));\r\n \r\n //插入iframe \r\n $('#'+ ELEM_IFRAME)[0] || $('body').append(iframe);\r\n\r\n //包裹文件域\r\n if(!options.elem.next().hasClass(ELEM_FORM)){\r\n that.elemFile.wrap(elemForm); \r\n \r\n //追加额外的参数\r\n options.elem.next('.'+ ELEM_FORM).append(function(){\r\n var arr = [];\r\n layui.each(options.data, function(key, value){\r\n value = typeof value === 'function' ? value() : value;\r\n arr.push('')\r\n });\r\n return arr.join('');\r\n }());\r\n }\r\n };\r\n \r\n //异常提示\r\n Class.prototype.msg = function(content){\r\n return layer.msg(content, {\r\n icon: 2,\r\n shift: 6\r\n });\r\n };\r\n \r\n //判断绑定元素是否为文件域本身\r\n Class.prototype.isFile = function(){\r\n var elem = this.config.elem[0];\r\n if(!elem) return;\r\n return elem.tagName.toLocaleLowerCase() === 'input' && elem.type === 'file'\r\n }\r\n \r\n //预读图片信息\r\n Class.prototype.preview = function(callback){\r\n var that = this;\r\n if(window.FileReader){\r\n layui.each(that.chooseFiles, function(index, file){\r\n var reader = new FileReader();\r\n reader.readAsDataURL(file); \r\n reader.onload = function(){\r\n callback && callback(index, file, this.result);\r\n }\r\n });\r\n }\r\n };\r\n \r\n // 执行上传\r\n Class.prototype.upload = function(files, type){\r\n var that = this;\r\n var options = that.config;\r\n var text = options.text || {};\r\n var elemFile = that.elemFile[0];\r\n\r\n // 获取文件队列\r\n var getFiles = function(){\r\n return files || that.files || that.chooseFiles || elemFile.files;\r\n };\r\n \r\n // 高级浏览器处理方式,支持跨域\r\n var ajaxSend = function(){\r\n var successful = 0;\r\n var failed = 0;\r\n var items = getFiles();\r\n\r\n // 多文件全部上传完毕的回调\r\n var allDone = function(){\r\n if(options.multiple && successful + failed === that.fileLength){\r\n typeof options.allDone === 'function' && options.allDone({\r\n total: that.fileLength,\r\n successful: successful,\r\n failed: failed\r\n });\r\n }\r\n };\r\n\r\n // 发送请求\r\n var request = function(sets){\r\n var formData = new FormData();\r\n\r\n // 恢复文件状态\r\n var resetFileState = function(file) {\r\n if (sets.unified) {\r\n layui.each(items, function(index, file){\r\n delete file[UPLOADING];\r\n });\r\n } else {\r\n delete file[UPLOADING];\r\n }\r\n };\r\n\r\n // 追加额外的参数\r\n layui.each(options.data, function(key, value){\r\n value = typeof value === 'function' ? value() : value;\r\n formData.append(key, value);\r\n });\r\n\r\n /*\r\n * 添加 file 到表单域\r\n */\r\n\r\n // 是否统一上传\r\n if (sets.unified) {\r\n layui.each(items, function(index, file){\r\n if (file[UPLOADING]) return;\r\n file[UPLOADING] = true; // 上传中的标记\r\n formData.append(options.field, file);\r\n });\r\n } else { // 逐一上传\r\n if (sets.file[UPLOADING]) return;\r\n formData.append(options.field, sets.file);\r\n sets.file[UPLOADING] = true; // 上传中的标记\r\n }\r\n\r\n // ajax 参数\r\n var opts = {\r\n url: options.url,\r\n type: 'post', // 统一采用 post 上传\r\n data: formData,\r\n dataType: options.dataType || 'json',\r\n contentType: false,\r\n processData: false,\r\n headers: options.headers || {},\r\n success: function(res){ // 成功回调\r\n options.unified ? (successful += that.fileLength) : successful++;\r\n done(sets.index, res);\r\n allDone(sets.index);\r\n resetFileState(sets.file);\r\n },\r\n error: function(e){ // 异常回调\r\n options.unified ? (failed += that.fileLength) : failed++;\r\n that.msg(text['error'] || [\r\n 'Upload failed, please try again.',\r\n 'status: '+ (e.status || '') +' - '+ (e.statusText || 'error')\r\n ].join('
                          '));\r\n error(sets.index);\r\n allDone(sets.index);\r\n resetFileState(sets.file);\r\n }\r\n };\r\n\r\n // 进度条\r\n if(typeof options.progress === 'function'){\r\n opts.xhr = function(){\r\n var xhr = $.ajaxSettings.xhr();\r\n // 上传进度\r\n xhr.upload.addEventListener(\"progress\", function (obj) {\r\n if(obj.lengthComputable){\r\n var percent = Math.floor((obj.loaded/obj.total)* 100); // 百分比\r\n options.progress(percent, (options.item ? options.item[0] : options.elem[0]) , obj, sets.index);\r\n }\r\n });\r\n return xhr;\r\n }\r\n }\r\n $.ajax(opts);\r\n };\r\n\r\n // 多文件是否一起上传\r\n if(options.unified){\r\n request({\r\n unified: true,\r\n index: 0\r\n });\r\n } else {\r\n layui.each(items, function(index, file){\r\n request({\r\n index: index,\r\n file: file\r\n });\r\n });\r\n }\r\n };\r\n \r\n // 低版本 IE 处理方式,不支持跨域\r\n var iframeSend = function(){\r\n var iframe = $('#'+ ELEM_IFRAME);\r\n \r\n that.elemFile.parent().submit();\r\n\r\n // 获取响应信息\r\n clearInterval(Class.timer);\r\n Class.timer = setInterval(function() {\r\n var res, iframeBody = iframe.contents().find('body');\r\n try {\r\n res = iframeBody.text();\r\n } catch(e) {\r\n that.msg(text['cross-domain']); \r\n clearInterval(Class.timer);\r\n error();\r\n }\r\n if(res){\r\n clearInterval(Class.timer);\r\n iframeBody.html('');\r\n done(0, res);\r\n }\r\n }, 30); \r\n };\r\n \r\n // 统一回调\r\n var done = function(index, res){\r\n that.elemFile.next('.'+ ELEM_CHOOSE).remove();\r\n elemFile.value = '';\r\n \r\n if(options.force === 'json'){\r\n if(typeof res !== 'object'){\r\n try {\r\n res = JSON.parse(res);\r\n } catch(e){\r\n res = {};\r\n return that.msg(text['data-format-error']);\r\n }\r\n }\r\n }\r\n \r\n typeof options.done === 'function' && options.done(res, index || 0, function(files){\r\n that.upload(files);\r\n });\r\n };\r\n \r\n // 统一网络异常回调\r\n var error = function(index){\r\n if(options.auto){\r\n elemFile.value = '';\r\n }\r\n typeof options.error === 'function' && options.error(index || 0, function(files){\r\n that.upload(files);\r\n });\r\n };\r\n \r\n var check;\r\n var exts = options.exts;\r\n var value = function(){\r\n var arr = [];\r\n layui.each(files || that.chooseFiles, function(i, item){\r\n arr.push(item.name);\r\n });\r\n return arr;\r\n }();\r\n \r\n // 回调函数返回的参数\r\n var args = {\r\n // 预览\r\n preview: function(callback){\r\n that.preview(callback);\r\n },\r\n // 上传\r\n upload: function(index, file){\r\n var thisFile = {};\r\n thisFile[index] = file;\r\n that.upload(thisFile);\r\n },\r\n // 追加文件到队列\r\n pushFile: function(){\r\n that.files = that.files || {};\r\n layui.each(that.chooseFiles, function(index, item){\r\n that.files[index] = item;\r\n });\r\n return that.files;\r\n },\r\n // 重置文件\r\n resetFile: function(index, file, filename){\r\n var newFile = new File([file], filename);\r\n that.files = that.files || {};\r\n that.files[index] = newFile;\r\n }\r\n };\r\n \r\n // 提交上传\r\n var send = function(){\r\n // 上传前的回调 - 如果回调函数明确返回 false,则停止上传\r\n if(options.before && (options.before(args) === false)) return;\r\n\r\n // IE 兼容处理\r\n if(device.ie){\r\n return device.ie > 9 ? ajaxSend() : iframeSend();\r\n }\r\n \r\n ajaxSend();\r\n };\r\n \r\n // 文件类型名称\r\n var typeName = ({\r\n file: '文件',\r\n images: '图片',\r\n video: '视频',\r\n audio: '音频'\r\n })[options.accept] || '文件';\r\n\r\n // 校验文件格式\r\n value = value.length === 0 \r\n ? ((elemFile.value.match(/[^\\/\\\\]+\\..+/g)||[]) || '')\r\n : value;\r\n \r\n // 若文件域值为空\r\n if (value.length === 0) return;\r\n \r\n // 根据文件类型校验\r\n switch(options.accept){\r\n case 'file': // 一般文件\r\n layui.each(value, function(i, item){\r\n if(exts && !RegExp('.\\\\.('+ exts +')$', 'i').test(escape(item))){\r\n return check = true;\r\n }\r\n });\r\n break;\r\n case 'video': // 视频文件\r\n layui.each(value, function(i, item){\r\n if(!RegExp('.\\\\.('+ (exts || 'avi|mp4|wma|rmvb|rm|flash|3gp|flv') +')$', 'i').test(escape(item))){\r\n return check = true;\r\n }\r\n });\r\n break;\r\n case 'audio': // 音频文件\r\n layui.each(value, function(i, item){\r\n if(!RegExp('.\\\\.('+ (exts || 'mp3|wav|mid') +')$', 'i').test(escape(item))){\r\n return check = true;\r\n }\r\n });\r\n break;\r\n default: // 图片文件\r\n layui.each(value, function(i, item){\r\n if(!RegExp('.\\\\.('+ (exts || 'jpg|png|gif|bmp|jpeg|svg') +')$', 'i').test(escape(item))){\r\n return check = true;\r\n }\r\n });\r\n break;\r\n }\r\n \r\n // 校验失败提示\r\n if(check){\r\n that.msg(text['check-error'] || ('选择的'+ typeName +'中包含不支持的格式'));\r\n return elemFile.value = '';\r\n }\r\n\r\n // 选择文件的回调 \r\n if(type === 'choose' || options.auto){\r\n options.choose && options.choose(args);\r\n if(type === 'choose'){\r\n return;\r\n }\r\n }\r\n \r\n // 检验文件数量\r\n that.fileLength = function(){\r\n var length = 0;\r\n var items = getFiles();\r\n layui.each(items, function(){\r\n length++;\r\n });\r\n return length;\r\n }();\r\n \r\n if(options.number && that.fileLength > options.number){\r\n return that.msg(typeof text['limit-number'] === 'function' \r\n ? text['limit-number'](options, that.fileLength) \r\n : (\r\n '同时最多只能上传: '+ options.number + ' 个文件'\r\n +'
                          您当前已经选择了: '+ that.fileLength +' 个文件'\r\n ));\r\n }\r\n \r\n // 检验文件大小\r\n if(options.size > 0 && !(device.ie && device.ie < 10)){\r\n var limitSize;\r\n \r\n layui.each(getFiles(), function(index, file){\r\n if(file.size > 1024*options.size){\r\n var size = options.size/1024;\r\n size = size >= 1 ? (size.toFixed(2) + 'MB') : options.size + 'KB'\r\n elemFile.value = '';\r\n limitSize = size;\r\n }\r\n });\r\n if(limitSize) return that.msg(typeof text['limit-size'] === 'function' \r\n ? text['limit-size'](options, limitSize) \r\n : '文件大小不能超过 '+ limitSize);\r\n }\r\n\r\n send();\r\n };\r\n \r\n //事件处理\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 设置当前选择的文件队列\r\n var setChooseFile = function(files){\r\n that.chooseFiles = {};\r\n layui.each(files, function(i, item){\r\n var time = new Date().getTime();\r\n that.chooseFiles[time + '-' + i] = item;\r\n });\r\n };\r\n \r\n // 设置选择的文本\r\n var setChooseText = function(files, filename){\r\n var elemFile = that.elemFile;\r\n var item = options.item ? options.item : options.elem;\r\n var value = files.length > 1 \r\n ? files.length + '个文件' \r\n : ((files[0] || {}).name || (elemFile[0].value.match(/[^\\/\\\\]+\\..+/g)||[]) || '');\r\n \r\n if(elemFile.next().hasClass(ELEM_CHOOSE)){\r\n elemFile.next().remove();\r\n }\r\n that.upload(null, 'choose');\r\n if(that.isFile() || options.choose) return;\r\n elemFile.after(''+ value +'');\r\n };\r\n\r\n // 点击上传容器\r\n options.elem.off('upload.start').on('upload.start', function(){\r\n var othis = $(this);\r\n\r\n that.config.item = othis;\r\n that.elemFile[0].click();\r\n });\r\n \r\n // 拖拽上传\r\n if(!(device.ie && device.ie < 10)){\r\n options.elem.off('upload.over').on('upload.over', function(){\r\n var othis = $(this)\r\n othis.attr('lay-over', '');\r\n })\r\n .off('upload.leave').on('upload.leave', function(){\r\n var othis = $(this)\r\n othis.removeAttr('lay-over');\r\n })\r\n .off('upload.drop').on('upload.drop', function(e, param){\r\n var othis = $(this);\r\n var files = param.originalEvent.dataTransfer.files || [];\r\n \r\n othis.removeAttr('lay-over');\r\n setChooseFile(files);\r\n\r\n options.auto ? that.upload() : setChooseText(files); // 是否自动触发上传\r\n });\r\n }\r\n \r\n // 文件选择\r\n that.elemFile.on('change', function(){\r\n var files = this.files || [];\r\n\r\n if(files.length === 0) return;\r\n\r\n setChooseFile(files);\r\n\r\n options.auto ? that.upload() : setChooseText(files); // 是否自动触发上传\r\n });\r\n \r\n // 手动触发上传\r\n options.bindAction.off('upload.action').on('upload.action', function(){\r\n that.upload();\r\n });\r\n\r\n\r\n // 防止事件重复绑定\r\n if(options.elem.data(MOD_INDEX)) return;\r\n\r\n\r\n // 目标元素 click 事件\r\n options.elem.on('click', function(){\r\n if(that.isFile()) return;\r\n $(this).trigger('upload.start');\r\n });\r\n \r\n // 目标元素 drop 事件\r\n if(options.drag){\r\n options.elem.on('dragover', function(e){\r\n e.preventDefault();\r\n $(this).trigger('upload.over');\r\n }).on('dragleave', function(e){\r\n $(this).trigger('upload.leave');\r\n }).on('drop', function(e){\r\n e.preventDefault();\r\n $(this).trigger('upload.drop', e);\r\n });\r\n }\r\n \r\n // 手动上传时触发上传的元素 click 事件\r\n options.bindAction.on('click', function(){\r\n $(this).trigger('upload.action');\r\n });\r\n \r\n // 绑定元素索引\r\n options.elem.data(MOD_INDEX, options.id);\r\n };\r\n\r\n // 记录所有实例\r\n thisModule.that = {}; // 记录所有实例对象\r\n\r\n // 获取当前实例对象\r\n thisModule.getThis = function(id){\r\n var that = thisModule.that[id];\r\n if(!that) hint.error(id ? (MOD_NAME +' instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return that;\r\n };\r\n \r\n // 核心入口 \r\n upload.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n \r\n exports(MOD_NAME, upload);\r\n});\r\n\r\n","/**\r\n * form 表单组件\r\n */\r\n \r\nlayui.define(['lay', 'layer', 'util'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var layer = layui.layer;\r\n var util = layui.util;\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n \r\n var MOD_NAME = 'form';\r\n var ELEM = '.layui-form';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var DISABLED = 'layui-disabled';\r\n var OUT_OF_RANGE = 'layui-input-number-out-of-range';\r\n \r\n var Form = function(){\r\n this.config = {\r\n // 内置的验证规则\r\n verify: {\r\n required: function(value) {\r\n if (!/[\\S]+/.test(value)) {\r\n return '必填项不能为空';\r\n }\r\n },\r\n phone: function(value) {\r\n var EXP = /^1\\d{10}$/;\r\n if (value && !EXP.test(value)) {\r\n return '手机号格式不正确';\r\n }\r\n },\r\n email: function(value) {\r\n var EXP = /^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\r\n if (value && !EXP.test(value)) {\r\n return '邮箱格式不正确';\r\n }\r\n },\r\n url: function(value) {\r\n var EXP = /^(#|(http(s?)):\\/\\/|\\/\\/)[^\\s]+\\.[^\\s]+$/;\r\n if (value && !EXP.test(value)) {\r\n return '链接格式不正确';\r\n }\r\n },\r\n number: function(value){\r\n if (value && isNaN(value)) {\r\n return '只能填写数字';\r\n }\r\n },\r\n date: function(value){\r\n var EXP = /^(\\d{4})[-\\/](\\d{1}|0\\d{1}|1[0-2])([-\\/](\\d{1}|0\\d{1}|[1-2][0-9]|3[0-1]))*$/;\r\n if (value && !EXP.test(value)) {\r\n return '日期格式不正确';\r\n }\r\n },\r\n identity: function(value) {\r\n var EXP = /(^\\d{15}$)|(^\\d{17}(x|X|\\d)$)/;\r\n if (value && !EXP.test(value)) {\r\n return '身份证号格式不正确';\r\n }\r\n }\r\n },\r\n autocomplete: null // 全局 autocomplete 状态。 null 表示不干预\r\n };\r\n };\r\n \r\n // 全局设置\r\n Form.prototype.set = function(options){\r\n var that = this;\r\n $.extend(true, that.config, options);\r\n return that;\r\n };\r\n \r\n // 验证规则设定\r\n Form.prototype.verify = function(settings){\r\n var that = this;\r\n $.extend(true, that.config.verify, settings);\r\n return that;\r\n };\r\n\r\n // 获取指定表单对象\r\n Form.prototype.getFormElem = function(filter){\r\n return $(ELEM + function(){\r\n return filter ? ('[lay-filter=\"' + filter +'\"]') : '';\r\n }());\r\n };\r\n \r\n // 表单事件\r\n Form.prototype.on = function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n };\r\n \r\n // 赋值/取值\r\n Form.prototype.val = function(filter, object){\r\n var that = this\r\n ,formElem = that.getFormElem(filter);\r\n \r\n // 遍历\r\n formElem.each(function(index, item){\r\n var itemForm = $(this);\r\n \r\n // 赋值\r\n layui.each(object, function(key, value){\r\n var itemElem = itemForm.find('[name=\"'+ key +'\"]')\r\n ,type;\r\n \r\n // 如果对应的表单不存在,则不执行\r\n if(!itemElem[0]) return;\r\n type = itemElem[0].type;\r\n \r\n // 如果为复选框\r\n if(type === 'checkbox'){\r\n itemElem[0].checked = value;\r\n } else if(type === 'radio') { // 如果为单选框\r\n itemElem.each(function(){\r\n this.checked = this.value == value;\r\n });\r\n } else { // 其它类型的表单\r\n itemElem.val(value);\r\n }\r\n });\r\n });\r\n \r\n form.render(null, filter);\r\n \r\n // 返回值\r\n return that.getValue(filter);\r\n };\r\n \r\n // 取值\r\n Form.prototype.getValue = function(filter, itemForm){\r\n itemForm = itemForm || this.getFormElem(filter);\r\n \r\n var nameIndex = {} // 数组 name 索引\r\n ,field = {}\r\n ,fieldElem = itemForm.find('input,select,textarea') // 获取所有表单域\r\n \r\n layui.each(fieldElem, function(_, item){ \r\n var othis = $(this)\r\n ,init_name; // 初始 name\r\n \r\n item.name = (item.name || '').replace(/^\\s*|\\s*&/, '');\r\n if(!item.name) return;\r\n \r\n // 用于支持数组 name\r\n if(/^.*\\[\\]$/.test(item.name)){\r\n var key = item.name.match(/^(.*)\\[\\]$/g)[0];\r\n nameIndex[key] = nameIndex[key] | 0;\r\n init_name = item.name.replace(/^(.*)\\[\\]$/, '$1['+ (nameIndex[key]++) +']');\r\n }\r\n \r\n if(/^(checkbox|radio)$/.test(item.type) && !item.checked) return; // 复选框和单选框未选中,不记录字段 \r\n field[init_name || item.name] = item.value;\r\n });\r\n \r\n return field;\r\n };\r\n \r\n // 表单控件渲染\r\n Form.prototype.render = function(type, filter){\r\n var that = this;\r\n var options = that.config;\r\n var elemForm = $(ELEM + function(){\r\n return filter ? ('[lay-filter=\"' + filter +'\"]') : '';\r\n }());\r\n var items = {\r\n // 输入框\r\n input: function(elem){\r\n var inputs = elem || elemForm.find('input,textarea');\r\n\r\n // 初始化全局的 autocomplete\r\n options.autocomplete && inputs.attr('autocomplete', options.autocomplete);\r\n\r\n var handleInputNumber = function(elem, eventType){\r\n var that = this;\r\n var rawValue = elem.val();\r\n var value = Number(rawValue);\r\n var step = Number(elem.attr('step')) || 1; // 加减的数字间隔\r\n var min = Number(elem.attr('min'));\r\n var max = Number(elem.attr('max'));\r\n var precision = Number(elem.attr('lay-precision'));\r\n var noAction = eventType !== 'click' && rawValue === ''; // 初始渲染和失焦时空值不作处理\r\n var isInit = eventType === 'init';\r\n\r\n if(isNaN(value)) return; // 若非数字,则不作处理\r\n\r\n if(eventType === 'click'){\r\n var isDecrement = !!$(that).index() // 0: icon-up, 1: icon-down\r\n value = isDecrement ? value - step : value + step;\r\n }\r\n\r\n // 获取小数点后位数\r\n var decimals = function(step){\r\n var decimals = (step.toString().match(/\\.(\\d+$)/) || [])[1] || '';\r\n return decimals.length;\r\n };\r\n\r\n precision = precision >= 0 ? precision : Math.max(decimals(step), decimals(rawValue));\r\n\r\n if(!noAction){\r\n // 初始渲染时只处理数字精度\r\n if(!isInit){\r\n if(value <= min) value = min;\r\n if(value >= max) value = max;\r\n }\r\n if(precision) value = value.toFixed(precision);\r\n elem.val(value);\r\n }\r\n\r\n // 超出范围的样式\r\n var outOfRange = value < min || value > max;\r\n elem[outOfRange && !noAction ? 'addClass' : 'removeClass'](OUT_OF_RANGE);\r\n\r\n if(isInit) return;\r\n\r\n // 更新按钮状态\r\n var controlBtn = {\r\n increment: elem.next().find('.layui-icon-up'),\r\n decrement: elem.next().find('.layui-icon-down')\r\n }\r\n controlBtn.increment[(value >= max && !noAction) ? 'addClass' : 'removeClass'](DISABLED)\r\n controlBtn.decrement[(value <= min && !noAction) ? 'addClass' : 'removeClass'](DISABLED)\r\n }\r\n\r\n // 初始化输入框动态点缀\r\n elemForm.find('input[lay-affix],textarea[lay-affix]').each(function(){\r\n var othis = $(this);\r\n var affix = othis.attr('lay-affix');\r\n var CLASS_WRAP = 'layui-input-wrap';\r\n var CLASS_SUFFIX = 'layui-input-suffix';\r\n var CLASS_AFFIX = 'layui-input-affix';\r\n var disabled = othis.is('[disabled]') || othis.is('[readonly]');\r\n\r\n // 根据是否空值来显示或隐藏元素\r\n var showAffix = function(elem, value){\r\n elem = $(elem);\r\n if(!elem[0]) return;\r\n elem[$.trim(value) ? 'removeClass' : 'addClass'](HIDE);\r\n };\r\n\r\n // 渲染动态点缀内容\r\n var renderAffix = function(opts){\r\n opts = $.extend({}, (affixOptions[affix] || {\r\n value: affix\r\n }), opts, lay.options(othis[0]));\r\n var elemAffix = $('
                          ');\r\n var value = layui.isArray(opts.value) ? opts.value : [opts.value];\r\n var elemIcon = $(function(){\r\n var arr = [];\r\n layui.each(value, function(i, item){\r\n arr.push('');\r\n });\r\n return arr.join('');\r\n }());\r\n \r\n elemAffix.append(elemIcon); // 插入图标元素\r\n\r\n // 追加 className\r\n if(opts.split) elemAffix.addClass('layui-input-split');\r\n if(opts.className) elemAffix.addClass(opts.className);\r\n\r\n // 移除旧的元素\r\n var hasElemAffix = othis.next('.'+ CLASS_AFFIX);\r\n if(hasElemAffix[0]) hasElemAffix.remove();\r\n\r\n // 是否在规定的容器中\r\n if(!othis.parent().hasClass(CLASS_WRAP)){\r\n othis.wrap('
                          ');\r\n }\r\n\r\n // 是否已经存在后缀元素\r\n var hasElemSuffix = othis.next('.'+ CLASS_SUFFIX);\r\n if(hasElemSuffix[0]){\r\n hasElemAffix = hasElemSuffix.find('.'+ CLASS_AFFIX);\r\n if(hasElemAffix[0]) hasElemAffix.remove();\r\n\r\n hasElemSuffix.prepend(elemAffix);\r\n\r\n othis.css('padding-right', function(){\r\n var paddingRight = othis.closest('.layui-input-group')[0] \r\n ? 0 \r\n : hasElemSuffix.outerWidth();\r\n return paddingRight + elemAffix.outerWidth()\r\n });\r\n } else {\r\n elemAffix.addClass(CLASS_SUFFIX);\r\n othis.after(elemAffix);\r\n }\r\n\r\n opts.show === 'auto' && showAffix(elemAffix, othis.val());\r\n \r\n typeof opts.init === 'function' && opts.init.call(this, othis, opts);\r\n \r\n // 输入事件\r\n othis.on('input propertychange', function(){\r\n var value = this.value;\r\n opts.show === 'auto' && showAffix(elemAffix, value);\r\n });\r\n\r\n // 失去焦点事件\r\n othis.on('blur', function(){\r\n typeof opts.blur === 'function' && opts.blur.call(this, othis, opts);\r\n });\r\n \r\n // 点击动态后缀事件\r\n elemIcon.on('click', function(){\r\n var inputFilter = othis.attr('lay-filter');\r\n if($(this).hasClass(DISABLED)) return;\r\n \r\n typeof opts.click === 'function' && opts.click.call(this, othis, opts);\r\n \r\n // 对外事件\r\n layui.event.call(this, MOD_NAME, 'input-affix('+ inputFilter +')', {\r\n elem: othis[0],\r\n affix: affix,\r\n options: opts\r\n });\r\n });\r\n };\r\n \r\n // 动态点缀配置项\r\n var affixOptions = {\r\n eye: { // 密码显隐\r\n value: 'eye-invisible',\r\n click: function(elem, opts){ // 事件\r\n var SHOW_NAME = 'LAY_FORM_INPUT_AFFIX_SHOW';\r\n var isShow = elem.data(SHOW_NAME);\r\n \r\n elem.attr('type', isShow ? 'password' : 'text').data(SHOW_NAME, !isShow);\r\n\r\n renderAffix({\r\n value: isShow ? 'eye-invisible' : 'eye'\r\n });\r\n }\r\n },\r\n clear: { // 内容清除\r\n value: 'clear',\r\n click: function(elem){\r\n elem.val('').focus();\r\n showAffix($(this).parent(), null);\r\n },\r\n show: 'auto', // 根据输入框值是否存在来显示或隐藏点缀图标\r\n disabled: disabled // 跟随输入框禁用状态\r\n },\r\n number: { // 数字输入框\r\n value: ['up', 'down'],\r\n split: true,\r\n className: 'layui-input-number',\r\n disabled: othis.is('[disabled]'), // 跟随输入框禁用状态\r\n init: function(elem){\r\n handleInputNumber.call(this, elem, 'init')\r\n },\r\n click: function(elem){\r\n handleInputNumber.call(this, elem, 'click')\r\n },\r\n blur: function(elem){\r\n handleInputNumber.call(this, elem, 'blur')\r\n },\r\n }\r\n };\r\n \r\n renderAffix();\r\n });\r\n }\r\n \r\n // 下拉选择框\r\n ,select: function(elem){\r\n var TIPS = '请选择';\r\n var CLASS = 'layui-form-select';\r\n var TITLE = 'layui-select-title';\r\n var NONE = 'layui-select-none';\r\n var initValue = '';\r\n var thatInput;\r\n var selects = elem || elemForm.find('select');\r\n\r\n // 隐藏 select\r\n var hide = function(e, clear){\r\n if(!$(e.target).parent().hasClass(TITLE) || clear){\r\n $('.'+CLASS).removeClass(CLASS+'ed ' + CLASS+'up');\r\n thatInput && initValue && thatInput.val(initValue);\r\n }\r\n thatInput = null;\r\n };\r\n \r\n // 各种事件\r\n var events = function(reElem, disabled, isSearch){\r\n var select = $(this);\r\n var title = reElem.find('.' + TITLE);\r\n var input = title.find('input');\r\n var dl = reElem.find('dl');\r\n var dds = dl.children('dd');\r\n var dts = dl.children('dt'); // select 分组dt元素\r\n var index = this.selectedIndex; // 当前选中的索引\r\n var nearElem; // select 组件当前选中的附近元素,用于辅助快捷键功能\r\n \r\n if(disabled) return;\r\n\r\n // 搜索项\r\n var laySearch = select.attr('lay-search');\r\n \r\n // 展开下拉\r\n var showDown = function(){\r\n var top = reElem.offset().top + reElem.outerHeight() + 5 - $win.scrollTop();\r\n var dlHeight = dl.outerHeight();\r\n \r\n index = select[0].selectedIndex; // 获取最新的 selectedIndex\r\n reElem.addClass(CLASS+'ed');\r\n dds.removeClass(HIDE);\r\n dts.removeClass(HIDE);\r\n nearElem = null;\r\n\r\n // 初始选中样式\r\n dds.removeClass(THIS);\r\n index >= 0 && dds.eq(index).addClass(THIS);\r\n\r\n // 上下定位识别\r\n if(top + dlHeight > $win.height() && top >= dlHeight){\r\n reElem.addClass(CLASS + 'up');\r\n }\r\n\r\n followScroll();\r\n };\r\n \r\n // 隐藏下拉\r\n var hideDown = function(choose){\r\n reElem.removeClass(CLASS+'ed ' + CLASS+'up');\r\n input.blur();\r\n nearElem = null;\r\n \r\n if(choose) return;\r\n \r\n notOption(input.val(), function(none){\r\n var selectedIndex = select[0].selectedIndex;\r\n \r\n // 未查询到相关值\r\n if(none){\r\n initValue = $(select[0].options[selectedIndex]).html(); // 重新获得初始选中值\r\n \r\n // 如果是第一项,且文本值等于 placeholder,则清空初始值\r\n if(selectedIndex === 0 && initValue === input.attr('placeholder')){\r\n initValue = '';\r\n }\r\n\r\n // 如果有选中值,则将输入框纠正为该值。否则清空输入框\r\n input.val(initValue || '');\r\n }\r\n });\r\n };\r\n \r\n // 定位下拉滚动条\r\n var followScroll = function(){ \r\n var thisDd = dl.children('dd.'+ THIS);\r\n \r\n if(!thisDd[0]) return;\r\n \r\n var posTop = thisDd.position().top;\r\n var dlHeight = dl.height();\r\n var ddHeight = thisDd.height();\r\n \r\n // 若选中元素在滚动条不可见底部\r\n if(posTop > dlHeight){\r\n dl.scrollTop(posTop + dl.scrollTop() - dlHeight + ddHeight - 5);\r\n }\r\n \r\n // 若选择玄素在滚动条不可见顶部\r\n if(posTop < 0){\r\n dl.scrollTop(posTop + dl.scrollTop() - 5);\r\n }\r\n };\r\n \r\n // 点击标题区域\r\n title.on('click', function(e){\r\n reElem.hasClass(CLASS+'ed') ? (\r\n hideDown()\r\n ) : (\r\n hide(e, true), \r\n showDown()\r\n );\r\n dl.find('.'+NONE).remove();\r\n }); \r\n \r\n // 点击箭头获取焦点\r\n title.find('.layui-edge').on('click', function(){\r\n input.focus();\r\n });\r\n \r\n // select 中 input 键盘事件\r\n input.on('keyup', function(e){ // 键盘松开\r\n var keyCode = e.keyCode;\r\n \r\n // Tab键展开\r\n if(keyCode === 9){\r\n showDown();\r\n }\r\n }).on('keydown', function(e){ // 键盘按下\r\n var keyCode = e.keyCode;\r\n\r\n // Tab键隐藏\r\n if(keyCode === 9){\r\n hideDown();\r\n }\r\n \r\n // 标注 dd 的选中状态\r\n var setThisDd = function(prevNext, thisElem1){\r\n var nearDd, cacheNearElem\r\n e.preventDefault();\r\n\r\n // 得到当前队列元素 \r\n var thisElem = function(){\r\n var thisDd = dl.children('dd.'+ THIS);\r\n \r\n // 如果是搜索状态,且按 Down 键,且当前可视 dd 元素在选中元素之前,\r\n // 则将当前可视 dd 元素的上一个元素作为虚拟的当前选中元素,以保证递归不中断\r\n if(dl.children('dd.'+ HIDE)[0] && prevNext === 'next'){\r\n var showDd = dl.children('dd:not(.'+ HIDE +',.'+ DISABLED +')')\r\n ,firstIndex = showDd.eq(0).index();\r\n if(firstIndex >=0 && firstIndex < thisDd.index() && !showDd.hasClass(THIS)){\r\n return showDd.eq(0).prev()[0] ? showDd.eq(0).prev() : dl.children(':last');\r\n }\r\n }\r\n\r\n if(thisElem1 && thisElem1[0]){\r\n return thisElem1;\r\n }\r\n if(nearElem && nearElem[0]){\r\n return nearElem;\r\n }\r\n \r\n return thisDd;\r\n // return dds.eq(index);\r\n }();\r\n \r\n cacheNearElem = thisElem[prevNext](); // 当前元素的附近元素\r\n nearDd = thisElem[prevNext]('dd:not(.'+ HIDE +')'); // 当前可视元素的 dd 元素\r\n\r\n // 如果附近的元素不存在,则停止执行,并清空 nearElem\r\n if(!cacheNearElem[0]) return nearElem = null;\r\n \r\n // 记录附近的元素,让其成为下一个当前元素\r\n nearElem = thisElem[prevNext]();\r\n\r\n // 如果附近不是 dd ,或者附近的 dd 元素是禁用状态,则进入递归查找\r\n if((!nearDd[0] || nearDd.hasClass(DISABLED)) && nearElem[0]){\r\n return setThisDd(prevNext, nearElem);\r\n }\r\n \r\n nearDd.addClass(THIS).siblings().removeClass(THIS); // 标注样式\r\n followScroll(); // 定位滚动条\r\n };\r\n \r\n if(keyCode === 38) setThisDd('prev'); // Up 键\r\n if(keyCode === 40) setThisDd('next'); // Down 键\r\n \r\n // Enter 键\r\n if(keyCode === 13){ \r\n e.preventDefault();\r\n dl.children('dd.'+THIS).trigger('click');\r\n }\r\n });\r\n \r\n // 检测值是否不属于 select 项\r\n var notOption = function(value, callback, origin){\r\n var num = 0;\r\n layui.each(dds, function(){\r\n var othis = $(this);\r\n var text = othis.text();\r\n\r\n // 是否区分大小写\r\n if(laySearch !== 'cs'){\r\n text = text.toLowerCase();\r\n value = value.toLowerCase();\r\n }\r\n \r\n // 匹配\r\n var not = text.indexOf(value) === -1;\r\n \r\n if(value === '' || (origin === 'blur') ? value !== text : not) num++;\r\n origin === 'keyup' && othis[not ? 'addClass' : 'removeClass'](HIDE);\r\n });\r\n // 处理 select 分组元素\r\n origin === 'keyup' && layui.each(dts, function(){\r\n var othis = $(this)\r\n ,thisDds = othis.nextUntil('dt').filter('dd') // 当前分组下的dd元素\r\n ,allHide = thisDds.length == thisDds.filter('.' + HIDE).length; // 当前分组下所有dd元素都隐藏了\r\n othis[allHide ? 'addClass' : 'removeClass'](HIDE);\r\n });\r\n var none = num === dds.length;\r\n return callback(none), none;\r\n };\r\n \r\n // 搜索匹配\r\n var search = function(e){\r\n var value = this.value, keyCode = e.keyCode;\r\n \r\n if(keyCode === 9 || keyCode === 13 \r\n || keyCode === 37 || keyCode === 38 \r\n || keyCode === 39 || keyCode === 40\r\n ){\r\n return false;\r\n }\r\n \r\n notOption(value, function(none){\r\n if(none){\r\n dl.find('.'+NONE)[0] || dl.append('

                          无匹配项

                          ');\r\n } else {\r\n dl.find('.'+NONE).remove();\r\n }\r\n }, 'keyup');\r\n \r\n // 当搜索值清空时\r\n if(value === ''){\r\n // 取消选中项\r\n select.val('');\r\n dl.find('.'+ THIS).removeClass(THIS);\r\n (select[0].options[0] || {}).value || dl.children('dd:eq(0)').addClass(THIS);\r\n dl.find('.'+ NONE).remove();\r\n }\r\n \r\n followScroll(); // 定位滚动条\r\n };\r\n \r\n if(isSearch){\r\n input.on('input propertychange', search).on('blur', function(e){\r\n var selectedIndex = select[0].selectedIndex;\r\n \r\n thatInput = input; // 当前的 select 中的 input 元素\r\n initValue = $(select[0].options[selectedIndex]).text(); // 重新获得初始选中值\r\n \r\n // 如果是第一项,且文本值等于 placeholder,则清空初始值\r\n if(selectedIndex === 0 && initValue === input.attr('placeholder')){\r\n initValue = '';\r\n }\r\n \r\n setTimeout(function(){\r\n notOption(input.val(), function(none){\r\n initValue || input.val(''); // none && !initValue\r\n }, 'blur');\r\n }, 200);\r\n });\r\n }\r\n\r\n // 选择\r\n dds.on('click', function(){\r\n var othis = $(this), value = othis.attr('lay-value');\r\n var filter = select.attr('lay-filter'); // 获取过滤器\r\n \r\n if(othis.hasClass(DISABLED)) return false;\r\n \r\n if(othis.hasClass('layui-select-tips')){\r\n input.val('');\r\n } else {\r\n input.val(othis.text());\r\n othis.addClass(THIS);\r\n }\r\n\r\n othis.siblings().removeClass(THIS);\r\n select.val(value).removeClass('layui-form-danger');\r\n\r\n layui.event.call(this, MOD_NAME, 'select('+ filter +')', {\r\n elem: select[0]\r\n ,value: value\r\n ,othis: reElem\r\n });\r\n\r\n hideDown(true);\r\n return false;\r\n });\r\n \r\n reElem.find('dl>dt').on('click', function(e){\r\n return false;\r\n });\r\n \r\n $(document).off('click', hide).on('click', hide); // 点击其它元素关闭 select\r\n }\r\n \r\n // 初始渲染 select 组件选项\r\n selects.each(function(index, select){\r\n var othis = $(this)\r\n ,hasRender = othis.next('.'+CLASS)\r\n ,disabled = this.disabled\r\n ,value = select.value\r\n ,selected = $(select.options[select.selectedIndex]) // 获取当前选中项\r\n ,optionsFirst = select.options[0];\r\n \r\n if(typeof othis.attr('lay-ignore') === 'string') return othis.show();\r\n \r\n var isSearch = typeof othis.attr('lay-search') === 'string'\r\n ,placeholder = optionsFirst ? (\r\n optionsFirst.value ? TIPS : (optionsFirst.innerHTML || TIPS)\r\n ) : TIPS;\r\n\r\n // 替代元素\r\n var reElem = $(['
                          '\r\n ,'
                          '\r\n ,('') // 禁用状态\r\n ,'
                          '\r\n ,'
                          '\r\n ,function(options){\r\n var arr = [];\r\n layui.each(options, function(index, item){\r\n var tagName = item.tagName.toLowerCase();\r\n\r\n if(index === 0 && !item.value && tagName !== 'optgroup'){\r\n arr.push('
                          '+ $.trim(item.innerHTML || TIPS) +'
                          ');\r\n } else if(tagName === 'optgroup'){\r\n arr.push('
                          '+ item.label +'
                          '); \r\n } else {\r\n arr.push('
                          '+ $.trim(item.innerHTML) +'
                          ');\r\n }\r\n });\r\n arr.length === 0 && arr.push('
                          没有选项
                          ');\r\n return arr.join('');\r\n }(othis.find('*')) +'
                          '\r\n ,'
                          '].join(''));\r\n \r\n hasRender[0] && hasRender.remove(); // 如果已经渲染,则Rerender\r\n othis.after(reElem); \r\n events.call(this, reElem, disabled, isSearch);\r\n });\r\n }\r\n \r\n // 复选框/开关\r\n ,checkbox: function(elem){\r\n var CLASS = {\r\n \"checkbox\": ['layui-form-checkbox', 'layui-form-checked', 'checkbox'],\r\n \"switch\": ['layui-form-switch', 'layui-form-onswitch', 'switch'],\r\n SUBTRA: 'layui-icon-indeterminate'\r\n };\r\n var checks = elem || elemForm.find('input[type=checkbox]');\r\n // 风格\r\n var skins = {\r\n \"primary\": true, // 默认风格\r\n \"tag\": true, // 标签风格\r\n \"switch\": true // 开关风格\r\n };\r\n // 事件\r\n var events = function(reElem, RE_CLASS){\r\n var check = $(this);\r\n \r\n // 勾选\r\n reElem.on('click', function(){\r\n var othis = $(this);\r\n var filter = check.attr('lay-filter') // 获取过滤器\r\n var title = (\r\n othis.next('*[lay-checkbox]')[0] \r\n ? othis.next().html()\r\n : check.attr('title') || ''\r\n );\r\n var skin = check.attr('lay-skin') || 'primary';\r\n\r\n // 开关\r\n title = skin === 'switch' ? title.split('|') : [title];\r\n\r\n // 禁用\r\n if(check[0].disabled) return;\r\n \r\n // 半选\r\n if (check[0].indeterminate) {\r\n check[0].indeterminate = false;\r\n reElem.find('.'+ CLASS.SUBTRA).removeClass(CLASS.SUBTRA).addClass('layui-icon-ok');\r\n }\r\n\r\n // 开关\r\n check[0].checked ? (\r\n check[0].checked = false,\r\n reElem.removeClass(RE_CLASS[1]),\r\n skin === 'switch' && reElem.children('div').html(title[1])\r\n ) : (\r\n check[0].checked = true,\r\n reElem.addClass(RE_CLASS[1]),\r\n skin === 'switch' && reElem.children('div').html(title[0])\r\n );\r\n \r\n // 事件\r\n layui.event.call(check[0], MOD_NAME, RE_CLASS[2]+'('+ filter +')', {\r\n elem: check[0],\r\n value: check[0].value,\r\n othis: reElem\r\n });\r\n });\r\n };\r\n \r\n // 遍历复选框\r\n checks.each(function(index, check){\r\n var othis = $(this);\r\n var skin = othis.attr('lay-skin') || 'primary';\r\n var title = util.escape($.trim(check.title || function(){ // 向下兼容 lay-text 属性\r\n return check.title = othis.attr('lay-text') || '';\r\n }()));\r\n var disabled = this.disabled;\r\n\r\n // if(!skins[skin]) skin = 'primary'; // 若非内置风格,则强制为默认风格\r\n var RE_CLASS = CLASS[skin] || CLASS.checkbox;\r\n\r\n // 替代元素\r\n var hasRender = othis.next('.' + RE_CLASS[0]);\r\n hasRender[0] && hasRender.remove(); // 若已经渲染,则 Rerender\r\n \r\n // 若存在标题模板,则优先读取标题模板\r\n if(othis.next('[lay-checkbox]')[0]){\r\n title = othis.next().html() || '';\r\n }\r\n\r\n // 若为开关,则对 title 进行分隔解析\r\n title = skin === 'switch' ? title.split('|') : [title];\r\n \r\n if(typeof othis.attr('lay-ignore') === 'string') return othis.show();\r\n \r\n // 替代元素\r\n var reElem = $(['
                          ',\r\n function(){ // 不同风格的内容\r\n var type = {\r\n // 复选框\r\n \"checkbox\": [\r\n (title[0] ? ('
                          '+ title[0] +'
                          ') : (skin === 'primary' ? '' : '
                          ')),\r\n ''\r\n ].join(''),\r\n // 开关\r\n \"switch\": '
                          '+ ((check.checked ? title[0] : title[1]) || '') +'
                          '\r\n };\r\n return type[skin] || type['checkbox'];\r\n }(),\r\n '
                          '].join(''));\r\n\r\n othis.after(reElem);\r\n events.call(this, reElem, RE_CLASS);\r\n });\r\n }\r\n \r\n // 单选框\r\n ,radio: function(elem){\r\n var CLASS = 'layui-form-radio';\r\n var ICON = ['layui-icon-radio', 'layui-icon-circle'];\r\n var radios = elem || elemForm.find('input[type=radio]');\r\n\r\n // 事件\r\n var events = function(reElem){\r\n var radio = $(this);\r\n var ANIM = 'layui-anim-scaleSpring';\r\n \r\n reElem.on('click', function(){\r\n var name = radio[0].name, forms = radio.parents(ELEM);\r\n var filter = radio.attr('lay-filter'); // 获取过滤器\r\n var sameRadio = forms.find('input[name='+ name.replace(/(\\.|#|\\[|\\])/g, '\\\\$1') +']'); // 找到相同name的兄弟\r\n \r\n if(radio[0].disabled) return;\r\n \r\n layui.each(sameRadio, function(){\r\n var next = $(this).next('.' + CLASS);\r\n this.checked = false;\r\n next.removeClass(CLASS + 'ed');\r\n next.children('.layui-icon').removeClass(ANIM + ' ' + ICON[0]).addClass(ICON[1]);\r\n });\r\n \r\n radio[0].checked = true;\r\n reElem.addClass(CLASS + 'ed');\r\n reElem.children('.layui-icon').addClass(ANIM + ' ' + ICON[0]);\r\n \r\n layui.event.call(radio[0], MOD_NAME, 'radio('+ filter +')', {\r\n elem: radio[0],\r\n value: radio[0].value,\r\n othis: reElem\r\n });\r\n });\r\n };\r\n \r\n // 初始渲染\r\n radios.each(function(index, radio){\r\n var othis = $(this), hasRender = othis.next('.' + CLASS);\r\n var disabled = this.disabled;\r\n \r\n if(typeof othis.attr('lay-ignore') === 'string') return othis.show();\r\n hasRender[0] && hasRender.remove(); // 如果已经渲染,则Rerender\r\n \r\n // 替代元素\r\n var reElem = $(['
                          ', // 禁用状态\r\n '',\r\n '
                          '+ function(){\r\n var title = util.escape(radio.title || '');\r\n if(othis.next('[lay-radio]')[0]){\r\n title = othis.next().html();\r\n }\r\n return title;\r\n }() +'
                          ',\r\n '
                          '].join(''));\r\n\r\n othis.after(reElem);\r\n events.call(this, reElem);\r\n });\r\n }\r\n };\r\n\r\n // 执行所有渲染项\r\n var renderItem = function(){\r\n layui.each(items, function(index, item){\r\n item();\r\n });\r\n };\r\n\r\n // jquery 对象\r\n if (layui.type(type) === 'object') {\r\n // 若对象为表单域容器\r\n if($(type).is(ELEM)){\r\n elemForm = $(type);\r\n renderItem();\r\n } else { // 对象为表单项\r\n type.each(function (index, item) {\r\n var elem = $(item);\r\n if (!elem.closest(ELEM).length) {\r\n return; // 若不在 layui-form 容器中直接跳过\r\n }\r\n if (item.tagName === 'SELECT') {\r\n items['select'](elem);\r\n } else if (item.tagName === 'INPUT') {\r\n var itemType = item.type;\r\n if (itemType === 'checkbox' || itemType === 'radio') {\r\n items[itemType](elem);\r\n } else {\r\n items['input'](elem);\r\n }\r\n }\r\n });\r\n }\r\n } else {\r\n type ? (\r\n items[type] ? items[type]() : hint.error('不支持的 \"'+ type + '\" 表单渲染')\r\n ) : renderItem();\r\n }\r\n return that;\r\n };\r\n\r\n // 主动触发验证 --- elem 即要验证的区域表单选择器 / return true or false\r\n Form.prototype.validate = function(elem) {\r\n var that = this;\r\n var intercept; // 拦截标识\r\n var options = that.config; // 获取全局配置项\r\n var verify = options.verify; // 验证规则\r\n var DANGER = 'layui-form-danger'; // 警示样式\r\n\r\n elem = $(elem);\r\n\r\n // 节点不存在可视为 true\r\n if (!elem[0]) return !0;\r\n\r\n // 若节点不存在特定属性,则查找容器内有待验证的子节点\r\n if (elem.attr('lay-verify') === undefined) {\r\n // 若校验的是一个不带验证规则的容器,校验内部的 lay-verify 节点\r\n if (that.validate(elem.find('*[lay-verify]')) === false) {\r\n return false;\r\n }\r\n }\r\n\r\n // 开始校验\r\n layui.each(elem, function(_, item) {\r\n var othis = $(this);\r\n var verifyStr = othis.attr('lay-verify') || '';\r\n var vers = verifyStr.split('|');\r\n var verType = othis.attr('lay-vertype'); // 提示方式\r\n var value = $.trim(othis.val());\r\n\r\n othis.removeClass(DANGER); // 移除警示样式\r\n \r\n // 遍历元素绑定的验证规则\r\n layui.each(vers, function(_, thisVer) {\r\n var verst; // 校验结果\r\n var errorText = ''; // 错误提示文本\r\n var rule = verify[thisVer]; // 获取校验规则\r\n \r\n // 匹配验证规则\r\n if (rule) {\r\n verst = typeof rule === 'function'\r\n ? errorText = rule(value, item) \r\n : !rule[0].test(value); // 兼容早期数组中的正则写法\r\n \r\n // 是否属于美化替换后的表单元素\r\n var isForm2Elem = item.tagName.toLowerCase() === 'select' || (\r\n /^(checkbox|radio)$/.test(item.type)\r\n );\r\n \r\n errorText = errorText || rule[1];\r\n \r\n // 获取自定义必填项提示文本\r\n if (thisVer === 'required') {\r\n errorText = othis.attr('lay-reqtext') || errorText;\r\n }\r\n \r\n // 若命中校验规则\r\n if (verst) {\r\n // 提示层风格\r\n if (verType === 'tips') {\r\n layer.tips(errorText, function(){\r\n if(typeof othis.attr('lay-ignore') !== 'string'){\r\n if(isForm2Elem){\r\n return othis.next();\r\n }\r\n }\r\n return othis;\r\n }(), {tips: 1});\r\n } else if(verType === 'alert') {\r\n layer.alert(errorText, {title: '提示', shadeClose: true});\r\n } \r\n // 若返回的为字符或数字,则自动弹出默认提示框;否则由 verify 方法中处理提示\r\n else if(/\\b(string|number)\\b/.test(typeof errorText)) {\r\n layer.msg(errorText, {icon: 5, shift: 6});\r\n }\r\n\r\n setTimeout(function() {\r\n (isForm2Elem ? othis.next().find('input') : item).focus();\r\n }, 7);\r\n \r\n othis.addClass(DANGER);\r\n return intercept = true;\r\n }\r\n }\r\n });\r\n\r\n if (intercept) return intercept;\r\n });\r\n\r\n return !intercept;\r\n };\r\n\r\n // 提交表单并校验\r\n var submit = Form.prototype.submit = function(filter, callback){\r\n var field = {}; // 字段集合\r\n var button = $(this); // 当前触发的按钮\r\n\r\n // 表单域 lay-filter 属性值\r\n var layFilter = typeof filter === 'string' \r\n ? filter \r\n : button.attr('lay-filter');\r\n\r\n // 当前所在表单域\r\n var elem = this.getFormElem \r\n ? this.getFormElem(layFilter) \r\n : button.parents(ELEM).eq(0);\r\n\r\n // 获取需要校验的元素\r\n var verifyElem = elem.find('*[lay-verify]');\r\n\r\n // 开始校验\r\n if(!form.validate(verifyElem)) return false;\r\n\r\n // 获取当前表单值\r\n field = form.getValue(null, elem);\r\n\r\n // 返回的参数\r\n var params = {\r\n elem: this.getFormElem ? (window.event && window.event.target) : this // 触发事件的对象\r\n ,form: this.getFormElem ? elem[0] : button.parents('form')[0] // 当前所在的 form 元素,如果存在的话\r\n ,field: field // 当前表单数据\r\n };\r\n \r\n // 回调\r\n typeof callback === 'function' && callback(params);\r\n \r\n // 事件\r\n return layui.event.call(this, MOD_NAME, 'submit('+ layFilter +')', params);\r\n };\r\n \r\n var form = new Form();\r\n var $dom = $(document);\r\n var $win = $(window);\r\n \r\n // 初始自动完成渲染\r\n $(function(){\r\n form.render();\r\n });\r\n \r\n // 表单 reset 重置渲染\r\n $dom.on('reset', ELEM, function(){\r\n var filter = $(this).attr('lay-filter');\r\n setTimeout(function(){\r\n form.render(null, filter);\r\n }, 50);\r\n });\r\n \r\n // 表单提交事件\r\n $dom.on('submit', ELEM, submit)\r\n .on('click', '*[lay-submit]', submit);\r\n \r\n exports(MOD_NAME, form);\r\n});\r\n\r\n \r\n","/**\r\n * layui.table\r\n * 表格组件\r\n */\r\n\r\nlayui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){\r\n \"use strict\";\r\n\r\n var $ = layui.$;\r\n var lay = layui.lay;\r\n var laytpl = layui.laytpl;\r\n var laypage = layui.laypage;\r\n var layer = layui.layer;\r\n var form = layui.form;\r\n var util = layui.util;\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n\r\n // api\r\n var table = {\r\n config: { // 全局配置项\r\n checkName: 'LAY_CHECKED', // 是否选中状态的特定字段名\r\n indexName: 'LAY_INDEX', // 初始下标索引名,用于恢复当前页表格排序\r\n numbersName: 'LAY_NUM', // 序号\r\n disabledName: 'LAY_DISABLED' // 禁用状态的特定字段名\r\n },\r\n cache: {}, // 数据缓存\r\n index: layui.table ? (layui.table.index + 10000) : 0,\r\n\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n\r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisTable = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id || options.index;\r\n\r\n return {\r\n config: options,\r\n reload: function(options, deep){\r\n that.reload.call(that, options, deep);\r\n },\r\n reloadData: function(options, deep){\r\n table.reloadData(id, options, deep);\r\n },\r\n setColsWidth: function(){\r\n that.setColsWidth.call(that);\r\n },\r\n resize: function(){ // 重置表格尺寸/结构\r\n that.resize.call(that);\r\n }\r\n }\r\n };\r\n\r\n // 获取当前实例\r\n var getThisTable = function(id){\r\n var that = thisTable.that[id];\r\n if(!that) hint.error(id ? ('The table instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return that || null;\r\n };\r\n\r\n // 获取当前实例配置项\r\n var getThisTableConfig = function(id){\r\n var config = thisTable.config[id];\r\n if(!config) hint.error(id ? ('The table instance with ID \\''+ id +'\\' not found') : 'ID argument required');\r\n return config || null;\r\n };\r\n\r\n // 解析自定义模板数据\r\n var parseTempData = function(obj){\r\n obj = obj || {};\r\n\r\n var options = this.config || {};\r\n var item3 = obj.item3; // 表头数据\r\n var content = obj.content; // 原始内容\r\n if (item3.type === 'numbers') content = obj.tplData[table.config.numbersName];\r\n\r\n // 是否编码 HTML\r\n var escaped = 'escape' in item3 ? item3.escape : options.escape;\r\n if(escaped) content = util.escape(content);\r\n\r\n // 获取模板\r\n var templet = obj.text && item3.exportTemplet || (item3.templet || item3.toolbar);\r\n\r\n // 获取模板内容\r\n if(templet){\r\n content = typeof templet === 'function'\r\n ? templet.call(item3, obj.tplData, obj.obj)\r\n : laytpl($(templet).html() || String(content)).render($.extend({\r\n LAY_COL: item3\r\n }, obj.tplData));\r\n }\r\n\r\n // 是否只返回文本\r\n return obj.text ? $('
                          '+ content +'
                          ').text() : content;\r\n };\r\n\r\n // 字符\r\n var MOD_NAME = 'table';\r\n var ELEM = '.layui-table';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var HIDE_V = 'layui-hide-v';\r\n var DISABLED = 'layui-disabled';\r\n var NONE = 'layui-none';\r\n\r\n var ELEM_VIEW = 'layui-table-view';\r\n var ELEM_TOOL = '.layui-table-tool';\r\n var ELEM_BOX = '.layui-table-box';\r\n var ELEM_INIT = '.layui-table-init';\r\n var ELEM_HEADER = '.layui-table-header';\r\n var ELEM_BODY = '.layui-table-body';\r\n var ELEM_MAIN = '.layui-table-main';\r\n var ELEM_FIXED = '.layui-table-fixed';\r\n var ELEM_FIXL = '.layui-table-fixed-l';\r\n var ELEM_FIXR = '.layui-table-fixed-r';\r\n var ELEM_TOTAL = '.layui-table-total';\r\n var ELEM_PAGE = '.layui-table-page';\r\n var ELEM_PAGE_VIEW = '.layui-table-pageview';\r\n var ELEM_SORT = '.layui-table-sort';\r\n var ELEM_CHECKED = 'layui-table-checked';\r\n var ELEM_EDIT = 'layui-table-edit';\r\n var ELEM_HOVER = 'layui-table-hover';\r\n var ELEM_GROUP = 'laytable-cell-group';\r\n var ELEM_COL_SPECIAL = 'layui-table-col-special';\r\n var ELEM_TOOL_PANEL = 'layui-table-tool-panel';\r\n var ELEM_EXPAND = 'layui-table-expanded'\r\n\r\n var DATA_MOVE_NAME = 'LAY_TABLE_MOVE_DICT';\r\n\r\n // thead 区域模板\r\n var TPL_HEADER = function(options){\r\n var rowCols = '{{#var colspan = layui.type(item2.colspan2) === \\'number\\' ? item2.colspan2 : item2.colspan; if(colspan){}} colspan=\"{{=colspan}}\"{{#} if(item2.rowspan){}} rowspan=\"{{=item2.rowspan}}\"{{#}}}';\r\n\r\n options = options || {};\r\n return ['
                        '\r\n ,''\r\n ,'{{# layui.each(d.data.cols, function(i1, item1){ }}'\r\n ,''\r\n ,'{{# layui.each(item1, function(i2, item2){ }}'\r\n ,'{{# if(item2.fixed && item2.fixed !== \"right\"){ left = true; } }}'\r\n ,'{{# if(item2.fixed === \"right\"){ right = true; } }}'\r\n ,function(){\r\n if(options.fixed && options.fixed !== 'right'){\r\n return '{{# if(item2.fixed && item2.fixed !== \"right\"){ }}';\r\n }\r\n if(options.fixed === 'right'){\r\n return '{{# if(item2.fixed === \"right\"){ }}';\r\n }\r\n return '';\r\n }()\r\n ,'{{# var isSort = !(item2.colGroup) && item2.sort; }}'\r\n ,''\r\n ,(options.fixed ? '{{# }; }}' : '')\r\n ,'{{# }); }}'\r\n ,''\r\n ,'{{# }); }}'\r\n ,''\r\n ,'
                        \\' + item2.title + \\'\\').text() }}\"{{# } }}>'\r\n ,'
                        '\r\n ,'{{# if(item2.type === \"checkbox\"){ }}' //复选框\r\n ,''\r\n ,'{{# } else { }}'\r\n ,'{{-item2.title||\"\"}}'\r\n ,'{{# if(isSort){ }}'\r\n ,''\r\n ,'{{# } }}'\r\n ,'{{# } }}'\r\n ,'
                        '\r\n ,'
                        '].join('');\r\n };\r\n\r\n // tbody 区域模板\r\n var TPL_BODY = [''\r\n ,''\r\n ,'
                        '].join('');\r\n\r\n // 主模板\r\n var TPL_MAIN = [\r\n ,'{{# if(d.data.toolbar){ }}'\r\n ,'
                        '\r\n ,'
                        '\r\n ,'
                        '\r\n ,'
                        '\r\n ,'{{# } }}'\r\n\r\n ,'
                        '\r\n ,'{{# if(d.data.loading){ }}'\r\n ,'
                        '\r\n ,''\r\n ,'
                        '\r\n ,'{{# } }}'\r\n\r\n ,'{{# var left, right; }}'\r\n ,'
                        '\r\n ,TPL_HEADER()\r\n ,'
                        '\r\n ,'
                        '\r\n ,TPL_BODY\r\n ,'
                        '\r\n\r\n ,'{{# if(left){ }}'\r\n ,'
                        '\r\n ,'
                        '\r\n ,TPL_HEADER({fixed: true})\r\n ,'
                        '\r\n ,'
                        '\r\n ,TPL_BODY\r\n ,'
                        '\r\n ,'
                        '\r\n ,'{{# }; }}'\r\n\r\n ,'{{# if(right){ }}'\r\n ,'
                        '\r\n ,'
                        '\r\n ,TPL_HEADER({fixed: 'right'})\r\n ,'
                        '\r\n ,'
                        '\r\n ,'
                        '\r\n ,TPL_BODY\r\n ,'
                        '\r\n ,'
                        '\r\n ,'{{# }; }}'\r\n ,'
                        '\r\n\r\n ,'{{# if(d.data.totalRow){ }}'\r\n ,'
                        '\r\n ,''\r\n ,''\r\n , '
                        Total
                        '\r\n ,'
                        '\r\n ,'{{# } }}'\r\n\r\n ,'
                        '\r\n ,'
                        '\r\n ,'
                        '\r\n ].join('');\r\n\r\n var _WIN = $(window);\r\n var _DOC = $(document);\r\n\r\n // constructor\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++table.index;\r\n that.config = $.extend({}, that.config, table.config, options);\r\n that.render();\r\n };\r\n\r\n // 初始默认配置\r\n Class.prototype.config = {\r\n limit: 10, // 每页显示的数量\r\n loading: true, // 请求数据时,是否显示 loading\r\n escape: true, // 是否开启 HTML 编码功能,即转义 html 原文\r\n cellMinWidth: 60, // 所有单元格默认最小宽度\r\n cellMaxWidth: Number.MAX_VALUE, // 所有单元格默认最大宽度\r\n editTrigger: 'click', // 单元格编辑的事件触发方式\r\n defaultToolbar: ['filter', 'exports', 'print'], // 工具栏右侧图标\r\n defaultContextmenu: true, // 显示默认上下文菜单\r\n autoSort: true, // 是否前端自动排序。如果否,则需自主排序(通常为服务端处理好排序)\r\n text: {\r\n none: '无数据'\r\n },\r\n cols: []\r\n };\r\n\r\n // 表格渲染\r\n Class.prototype.render = function(type){\r\n var that = this;\r\n var options = that.config;\r\n\r\n options.elem = $(options.elem);\r\n options.where = options.where || {};\r\n\r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n var id = options.id = 'id' in options ? options.id : (\r\n options.elem.attr('id') || that.index\r\n );\r\n\r\n thisTable.that[id] = that; // 记录当前实例对象\r\n thisTable.config[id] = options; // 记录当前实例配置项\r\n\r\n //请求参数的自定义格式\r\n options.request = $.extend({\r\n pageName: 'page',\r\n limitName: 'limit'\r\n }, options.request)\r\n\r\n // 响应数据的自定义格式\r\n options.response = $.extend({\r\n statusName: 'code', //规定数据状态的字段名称\r\n statusCode: 0, //规定成功的状态码\r\n msgName: 'msg', //规定状态信息的字段名称\r\n dataName: 'data', //规定数据总数的字段名称\r\n totalRowName: 'totalRow', //规定数据统计的字段名称\r\n countName: 'count'\r\n }, options.response);\r\n\r\n //如果 page 传入 laypage 对象\r\n if(options.page !== null && typeof options.page === 'object'){\r\n options.limit = options.page.limit || options.limit;\r\n options.limits = options.page.limits || options.limits;\r\n that.page = options.page.curr = options.page.curr || 1;\r\n delete options.page.elem;\r\n delete options.page.jump;\r\n }\r\n\r\n if(!options.elem[0]) return that;\r\n\r\n // 若元素未设 lay-filter 属性,则取实例 id 值\r\n if(!options.elem.attr('lay-filter')){\r\n options.elem.attr('lay-filter', options.id);\r\n }\r\n\r\n // 仅重载数据\r\n if(type === 'reloadData'){\r\n // 请求数据\r\n return that.pullData(that.page, {\r\n type: 'reloadData'\r\n });\r\n }\r\n\r\n // 初始化索引\r\n options.index = that.index;\r\n that.key = options.id || options.index;\r\n\r\n //初始化一些其他参数\r\n that.setInit();\r\n\r\n //高度铺满:full-差距值\r\n if(options.height && /^full-\\d+$/.test(options.height)){\r\n that.fullHeightGap = options.height.split('-')[1];\r\n options.height = _WIN.height() - that.fullHeightGap;\r\n } else if (options.height && /^#\\w+\\S*-\\d+$/.test(options.height)) {\r\n var parentDiv = options.height.split(\"-\");\r\n that.parentHeightGap = parentDiv.pop();\r\n that.parentDiv = parentDiv.join(\"-\");\r\n options.height = $(that.parentDiv).height() - that.parentHeightGap;\r\n }\r\n\r\n // 开始插入替代元素\r\n var othis = options.elem;\r\n var hasRender = othis.next('.' + ELEM_VIEW);\r\n\r\n // 主容器\r\n var reElem = that.elem = $('
                        ');\r\n\r\n // 添加 className\r\n reElem.addClass(function(){\r\n var arr = [\r\n ELEM_VIEW,\r\n ELEM_VIEW +'-'+ that.index,\r\n 'layui-form',\r\n 'layui-border-box'\r\n ];\r\n if(options.className) arr.push(options.className);\r\n return arr.join(' ');\r\n }()).attr({\r\n 'lay-filter': 'LAY-TABLE-FORM-DF-'+ that.index,\r\n 'lay-id': options.id,\r\n 'style': function(){\r\n var arr = [];\r\n if(options.width) arr.push('width:'+ options.width + 'px;');\r\n // if(options.height) arr.push('height:'+ options.height + 'px;');\r\n return arr.join('')\r\n }()\r\n }).html(laytpl(TPL_MAIN, {\r\n open: '{{', // 标签符前缀\r\n close: '}}' // 标签符后缀\r\n }).render({\r\n data: options,\r\n index: that.index //索引\r\n }));\r\n\r\n // 初始化样式\r\n that.renderStyle();\r\n\r\n // 生成替代元素\r\n hasRender[0] && hasRender.remove(); // 如果已经渲染,则 Rerender\r\n othis.after(reElem);\r\n\r\n // 各级容器\r\n that.layTool = reElem.find(ELEM_TOOL);\r\n that.layBox = reElem.find(ELEM_BOX);\r\n that.layHeader = reElem.find(ELEM_HEADER);\r\n that.layMain = reElem.find(ELEM_MAIN);\r\n that.layBody = reElem.find(ELEM_BODY);\r\n that.layFixed = reElem.find(ELEM_FIXED);\r\n that.layFixLeft = reElem.find(ELEM_FIXL);\r\n that.layFixRight = reElem.find(ELEM_FIXR);\r\n that.layTotal = reElem.find(ELEM_TOTAL);\r\n that.layPage = reElem.find(ELEM_PAGE);\r\n\r\n // 初始化头部工具栏\r\n that.renderToolbar();\r\n\r\n // 初始化底部分页栏\r\n that.renderPagebar();\r\n\r\n // 让表格平铺\r\n that.fullSize();\r\n\r\n that.pullData(that.page); // 请求数据\r\n that.events(); // 事件\r\n };\r\n\r\n // 根据列类型,定制化参数\r\n Class.prototype.initOpts = function(item){\r\n var that = this\r\n var options = that.config;\r\n var initWidth = {\r\n checkbox: 50,\r\n radio: 50,\r\n space: 30,\r\n numbers: 60\r\n };\r\n\r\n // 让 type 参数兼容旧版本\r\n if(item.checkbox) item.type = \"checkbox\";\r\n if(item.space) item.type = \"space\";\r\n if(!item.type) item.type = \"normal\";\r\n\r\n if(item.type !== \"normal\"){\r\n item.unresize = true;\r\n item.width = item.width || initWidth[item.type];\r\n }\r\n };\r\n\r\n //初始化一些参数\r\n Class.prototype.setInit = function(type){\r\n var that = this;\r\n var options = that.config;\r\n\r\n options.clientWidth = options.width || function(){ //获取容器宽度\r\n //如果父元素宽度为0(一般为隐藏元素),则继续查找上层元素,直到找到真实宽度为止\r\n var getWidth = function(parent){\r\n var width, isNone;\r\n parent = parent || options.elem.parent()\r\n width = parent.width();\r\n try {\r\n isNone = parent.css('display') === 'none';\r\n } catch(e){}\r\n if(parent[0] && (!width || isNone)) return getWidth(parent.parent());\r\n return width;\r\n };\r\n return getWidth();\r\n }();\r\n\r\n if(type === 'width') return options.clientWidth;\r\n // 初始化高度配置,如果设置了最高高度,以最高高度形式为准\r\n options.height = options.maxHeight || options.height;\r\n\r\n // 初始化 css 参数\r\n if(options.css && options.css.indexOf(ELEM_VIEW) === -1){\r\n var css = options.css.split('}');\r\n layui.each(css, function(index, value){\r\n if(value){\r\n css[index] = '.'+ ELEM_VIEW + '-'+ that.index + ' ' + value;\r\n }\r\n });\r\n options.css = css.join('}');\r\n }\r\n\r\n // 封装对 col 的配置处理\r\n var initChildCols = function (i1, item1, i2, item2) {\r\n //如果列参数为空,则移除\r\n if (!item2) {\r\n item1.splice(i2, 1);\r\n return;\r\n }\r\n\r\n item2.key = [options.index, i1, i2].join('-');\r\n item2.colspan = item2.colspan || 0;\r\n item2.rowspan = item2.rowspan || 0;\r\n\r\n //根据列类型,定制化参数\r\n that.initOpts(item2);\r\n\r\n //设置列的父列索引\r\n //如果是组合列,则捕获对应的子列\r\n var indexChild = i1 + (parseInt(item2.rowspan) || 1);\r\n if (indexChild < options.cols.length) { // 只要不是最后一层都会有子列\r\n item2.colGroup = true;\r\n var childIndex = 0;\r\n layui.each(options.cols[indexChild], function (i22, item22) {\r\n //如果子列已经被标注为{HAS_PARENT},或者子列累计 colspan 数等于父列定义的 colspan,则跳出当前子列循环\r\n if (item22.HAS_PARENT || (childIndex >= 1 && childIndex == (item2.colspan || 1))) return;\r\n\r\n item22.HAS_PARENT = true;\r\n item22.parentKey = [options.index, i1, i2].join('-') // i1 + '-' + i2;\r\n childIndex = childIndex + parseInt(item22.colspan > 1 ? item22.colspan : 1);\r\n initChildCols(indexChild, options.cols[indexChild], i22, item22);\r\n });\r\n } else {\r\n item2.colGroup = false;\r\n }\r\n item2.hide = item2.hide && !item2.colGroup || false; // 初始化中中间节点的hide信息不做处理,否则会出错,如果需要必须将其子节点也都同步成hide\r\n };\r\n\r\n // 初始化列参数\r\n layui.each(options.cols, function(i1, item1){\r\n layui.each(item1, function(i2, item2){\r\n if (i1) {\r\n delete item2.HAS_PARENT; // 去掉临时的计数排除标识,避免有新字段插入的时候重新计算被跳过导致下标出错的问题\r\n } else {\r\n initChildCols(i1, item1, i2, item2); // 只解析顶层节点由递归完成解析\r\n }\r\n });\r\n });\r\n\r\n };\r\n\r\n // 初始化样式\r\n Class.prototype.renderStyle = function() {\r\n var that = this;\r\n var options = that.config;\r\n var index = that.index;\r\n var text = [];\r\n\r\n // 单元格宽度\r\n layui.each(options.cols, function(i1, item1) {\r\n layui.each(item1, function(i2, item2) {\r\n var key = [index, i1, i2].join('-');\r\n var val = item2.width ? ['width: ', item2.width, 'px'].join('') : '';\r\n text.push('.laytable-cell-'+ key +'{'+ val +'}');\r\n });\r\n });\r\n\r\n // 自定义行样式\r\n (function (lineStyle) {\r\n if (!lineStyle) return;\r\n var trClassName = '.layui-table-view-'+ index +' .layui-table-body .layui-table tr';\r\n var rules = lineStyle.split(';');\r\n var cellMaxHeight = 'none';\r\n\r\n // 计算单元格最大高度\r\n layui.each(rules, function(i, rule) {\r\n rule = rule.split(':');\r\n if (rule[0] === 'height') {\r\n var val = parseFloat(rule[1]);\r\n if (!isNaN(val)) cellMaxHeight = (val - 1) + 'px';\r\n return true;\r\n }\r\n });\r\n\r\n // 多行相关样式\r\n layui.each([\r\n '{'+ lineStyle +'}',\r\n '.layui-table-cell{height: auto; max-height: '+ cellMaxHeight +'; white-space: normal; text-overflow: clip;}',\r\n '> td:hover > .layui-table-cell{overflow: auto;}'\r\n ].concat(\r\n device.ie ? [\r\n '.layui-table-edit{height: '+ cellMaxHeight +';}',\r\n 'td[data-edit]:hover:after{height: '+ cellMaxHeight +';}'\r\n ] : []\r\n ), function(i, val) {\r\n val && text.push(trClassName + ' ' + val);\r\n });\r\n })(options.lineStyle);\r\n\r\n // 自定义 css 属性\r\n if (options.css) text.push(options.css);\r\n\r\n // 生成 style\r\n lay.style({\r\n target: that.elem[0],\r\n text: text.join(''),\r\n id: 'DF-table-'+ index\r\n });\r\n };\r\n\r\n // 初始工具栏\r\n Class.prototype.renderToolbar = function(){\r\n var that = this\r\n var options = that.config\r\n\r\n // 添加工具栏左侧模板\r\n var leftDefaultTemp = [\r\n '
                        ',\r\n '
                        ',\r\n '
                        '\r\n ].join('');\r\n var elemToolTemp = that.layTool.find('.layui-table-tool-temp');\r\n\r\n if(options.toolbar === 'default'){\r\n elemToolTemp.html(leftDefaultTemp);\r\n } else if(typeof options.toolbar === 'string'){\r\n var toolbarHtml = $(options.toolbar).html() || '';\r\n toolbarHtml && elemToolTemp.html(\r\n laytpl(toolbarHtml).render(options)\r\n );\r\n }\r\n\r\n // 添加工具栏右侧面板\r\n var layout = {\r\n filter: {\r\n title: '筛选列',\r\n layEvent: 'LAYTABLE_COLS',\r\n icon: 'layui-icon-cols'\r\n },\r\n exports: {\r\n title: '导出',\r\n layEvent: 'LAYTABLE_EXPORT',\r\n icon: 'layui-icon-export'\r\n },\r\n print: {\r\n title: '打印',\r\n layEvent: 'LAYTABLE_PRINT',\r\n icon: 'layui-icon-print'\r\n }\r\n }, iconElem = [];\r\n\r\n if(typeof options.defaultToolbar === 'object'){\r\n layui.each(options.defaultToolbar, function(i, item){\r\n var thisItem = typeof item === 'string' ? layout[item] : item;\r\n if(thisItem){\r\n iconElem.push('
                        '\r\n +''\r\n +'
                        ');\r\n }\r\n });\r\n }\r\n that.layTool.find('.layui-table-tool-self').html(iconElem.join(''));\r\n };\r\n\r\n // 分页栏\r\n Class.prototype.renderPagebar = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n var layPagebar = that.layPagebar = $('
                        ');\r\n\r\n // 开启分页栏自定义模板\r\n if(options.pagebar){\r\n var pagebarHtml = $(options.pagebar).html() || '';\r\n pagebarHtml && layPagebar.append(laytpl(pagebarHtml).render(options));\r\n that.layPage.append(layPagebar);\r\n }\r\n };\r\n\r\n // 同步表头父列的相关值\r\n Class.prototype.setParentCol = function(hide, parentKey){\r\n var that = this;\r\n var options = that.config;\r\n\r\n var parentTh = that.layHeader.find('th[data-key=\"'+ parentKey +'\"]'); // 获取父列元素\r\n var parentColspan = parseInt(parentTh.attr('colspan')) || 0;\r\n\r\n if(parentTh[0]){\r\n var arrParentKey = parentKey.split('-');\r\n var getThisCol = options.cols[arrParentKey[1]][arrParentKey[2]];\r\n\r\n hide ? parentColspan-- : parentColspan++;\r\n\r\n parentTh.attr('colspan', parentColspan);\r\n parentTh[parentColspan ? 'removeClass' : 'addClass'](HIDE); // 如果子列显示,父列必然需要显示\r\n\r\n getThisCol.colspan2 = parentColspan; // 更新实际的 colspan 数\r\n getThisCol.hide = parentColspan < 1; // 同步 hide 参数\r\n\r\n // 递归,继续往上查询是否有父列\r\n var nextParentKey = parentTh.data('parentkey');\r\n nextParentKey && that.setParentCol(hide, nextParentKey);\r\n }\r\n };\r\n\r\n // 多级表头补丁\r\n Class.prototype.setColsPatch = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 同步表头父列的相关值\r\n layui.each(options.cols, function(i1, item1){\r\n layui.each(item1, function(i2, item2){\r\n if(item2.hide){\r\n that.setParentCol(item2.hide, item2.parentKey);\r\n }\r\n });\r\n });\r\n };\r\n\r\n // 设置组合表头的最大宽度\r\n Class.prototype.setGroupWidth = function(th){\r\n var that = this;\r\n var options = that.config;\r\n\r\n if(options.cols.length <= 1) return;\r\n\r\n // 获取表头组合\r\n var groups = that.layHeader.find((\r\n // 根据当前活动的表头 parentkey 属性查找其组合表头\r\n th ? ('th[data-key='+ th.data('parentkey') +']>') : ''\r\n ) + '.' + ELEM_GROUP); // 若无指向当前活动表头,则自下而上获取所有组合表头\r\n\r\n groups.css('width', 0);\r\n layui.each(groups.get().reverse(), function(){\r\n var othis = $(this);\r\n var key = othis.parent().data('key');\r\n var maxWidth = 0;\r\n\r\n that.layHeader.eq(0).find('th[data-parentkey='+ key +']').width(function(i, width){\r\n var oTh = $(this);\r\n if(oTh.hasClass(HIDE)) return;\r\n width > 0 && (maxWidth += width);\r\n });\r\n\r\n // 给组合表头赋值最大宽度\r\n if(maxWidth) othis.css('max-width', maxWidth - 1);\r\n\r\n // 若当前活动的组合表头仍存在上级,则继续向上设置\r\n if(th && othis.parent().data('parentkey')){\r\n that.setGroupWidth(othis.parent());\r\n }\r\n });\r\n groups.css('width', 'auto');\r\n };\r\n\r\n // 动态分配列宽\r\n Class.prototype.setColsWidth = function(){\r\n var that = this;\r\n var options = that.config;\r\n var colNums = 0; // 列个数\r\n var autoColNums = 0; // 自动列宽的列个数\r\n var autoWidth = 0; // 自动列分配的宽度\r\n var countWidth = 0; // 所有列总宽度和\r\n var cntrWidth = that.setInit('width');\r\n\r\n // 统计列个数\r\n that.eachCols(function(i, item){\r\n item.hide || colNums++;\r\n });\r\n\r\n // 减去边框差和滚动条宽\r\n cntrWidth = cntrWidth - function(){\r\n return (options.skin === 'line' || options.skin === 'nob') ? 2 : colNums + 1;\r\n }() - that.getScrollWidth(that.layMain[0]) - 1;\r\n\r\n // 计算自动分配的宽度\r\n var getAutoWidth = function(back){\r\n // 遍历所有列\r\n layui.each(options.cols, function(i1, item1){\r\n layui.each(item1, function(i2, item2){\r\n var width = 0;\r\n var minWidth = item2.minWidth || options.cellMinWidth; // 最小宽度\r\n var maxWidth = item2.maxWidth || options.cellMaxWidth; // 最大宽度\r\n\r\n if(!item2){\r\n item1.splice(i2, 1);\r\n return;\r\n }\r\n\r\n if(item2.colGroup || item2.hide) return;\r\n\r\n if(!back){\r\n width = item2.width || 0;\r\n if(/\\d+%$/.test(width)){ // 列宽为百分比\r\n width = Math.floor((parseFloat(width) / 100) * cntrWidth);\r\n width < minWidth && (width = minWidth);\r\n width > maxWidth && (width = maxWidth);\r\n } else if(!width){ // 列宽未填写\r\n item2.width = width = 0;\r\n autoColNums++;\r\n } else if(item2.type === 'normal'){\r\n // 若 width 小于 minWidth, 则将 width 值自动设为 minWidth 的值\r\n width < minWidth && (item2.width = width = minWidth);\r\n // 若 width 大于 maxWidth, 则将 width 值自动设为 maxWidth 的值\r\n width > maxWidth && (item2.width = width = maxWidth);\r\n }\r\n } else if(autoWidth && autoWidth < minWidth){\r\n autoColNums--;\r\n width = minWidth;\r\n } else if(autoWidth && autoWidth > maxWidth){\r\n autoColNums--;\r\n width = maxWidth;\r\n }\r\n\r\n if(item2.hide) width = 0;\r\n countWidth = countWidth + width;\r\n });\r\n });\r\n\r\n // 如果未填充满,则将剩余宽度平分\r\n (cntrWidth > countWidth && autoColNums > 0) && (\r\n autoWidth = (cntrWidth - countWidth) / autoColNums\r\n );\r\n }\r\n\r\n getAutoWidth();\r\n getAutoWidth(true); // 重新检测分配的宽度是否低于最小列宽\r\n\r\n // 记录自动列数\r\n that.autoColNums = autoColNums = autoColNums > 0 ? autoColNums : 0;\r\n\r\n // 设置列宽\r\n that.eachCols(function(i3, item3){\r\n var minWidth = item3.minWidth || options.cellMinWidth;\r\n var maxWidth = item3.maxWidth || options.cellMaxWidth;\r\n\r\n if(item3.colGroup || item3.hide) return;\r\n\r\n // 给未分配宽的列平均分配宽\r\n if(item3.width === 0){\r\n that.cssRules(item3.key, function(item){\r\n item.style.width = Math.floor(function(){\r\n if(autoWidth < minWidth) return minWidth;\r\n if(autoWidth > maxWidth) return maxWidth;\r\n return autoWidth;\r\n }()) + 'px';\r\n });\r\n }\r\n\r\n // 给设定百分比的列分配列宽\r\n else if(/\\d+%$/.test(item3.width)){\r\n that.cssRules(item3.key, function(item){\r\n var width = Math.floor((parseFloat(item3.width) / 100) * cntrWidth);\r\n width < minWidth && (width = minWidth);\r\n width > maxWidth && (width = maxWidth);\r\n item.style.width = width + 'px';\r\n });\r\n }\r\n\r\n // 给拥有普通 width 值的列分配最新列宽\r\n else {\r\n that.cssRules(item3.key, function(item){\r\n item.style.width = item3.width + 'px';\r\n });\r\n }\r\n });\r\n\r\n // 填补 Math.floor 造成的数差\r\n var patchNums = that.layMain.width() - that.getScrollWidth(that.layMain[0])\r\n - that.layMain.children('table').outerWidth();\r\n\r\n if(that.autoColNums > 0 && patchNums >= -colNums && patchNums <= colNums){\r\n var getEndTh = function(th){\r\n var field;\r\n th = th || that.layHeader.eq(0).find('thead > tr:first-child > th:last-child')\r\n field = th.data('field');\r\n if(!field && th.prev()[0]){\r\n return getEndTh(th.prev())\r\n }\r\n return th;\r\n };\r\n var th = getEndTh();\r\n var key = th.data('key');\r\n\r\n that.cssRules(key, function(item){\r\n var width = item.style.width || th.outerWidth();\r\n item.style.width = (parseFloat(width) + patchNums) + 'px';\r\n\r\n // 二次校验,如果仍然出现横向滚动条(通常是 1px 的误差导致)\r\n if(that.layMain.height() - that.layMain.prop('clientHeight') > 0){\r\n item.style.width = (parseFloat(item.style.width) - 1) + 'px';\r\n }\r\n });\r\n }\r\n\r\n that.setGroupWidth();\r\n\r\n // 如果表格内容为空(无数据 或 请求异常)\r\n if (that.layMain.find('tbody').is(\":empty\")) {\r\n // 将表格宽度设置为跟表头一样的宽度,使之可以出现底部滚动条,以便滚动查看所有字段\r\n var headerWidth = that.layHeader.first().children('table').width()\r\n that.layMain.find('table').width(headerWidth);\r\n } else {\r\n that.layMain.find('table').width('auto');\r\n }\r\n\r\n that.loading(!0);\r\n };\r\n\r\n // 重置表格尺寸/结构\r\n Class.prototype.resize = function(){\r\n var that = this;\r\n\r\n if (!that.layMain) return;\r\n\r\n that.fullSize(); // 让表格铺满\r\n that.setColsWidth(); // 自适应列宽\r\n that.scrollPatch(); // 滚动条补丁\r\n };\r\n\r\n // 表格重载\r\n Class.prototype.reload = function(options, deep, type){\r\n var that = this;\r\n\r\n options = options || {};\r\n delete that.haveInit;\r\n\r\n // 防止数组深度合并\r\n layui.each(options, function(key, item){\r\n if(layui.type(item) === 'array') delete that.config[key];\r\n });\r\n\r\n // 对参数进行深度或浅扩展\r\n that.config = $.extend(deep, {}, that.config, options);\r\n if (type !== 'reloadData') {\r\n layui.each(that.config.cols, function (i1, item1) {\r\n layui.each(item1, function (i2, item2) {\r\n delete item2.colspan2;\r\n })\r\n })\r\n delete that.config.HAS_SET_COLS_PATCH;\r\n }\r\n // 执行渲染\r\n that.render(type);\r\n };\r\n\r\n // 异常提示\r\n Class.prototype.errorView = function(html){\r\n var that = this\r\n ,elemNone = that.layMain.find('.'+ NONE)\r\n ,layNone = $('
                        '+ (html || 'Error') +'
                        ');\r\n\r\n if(elemNone[0]){\r\n that.layNone.remove();\r\n elemNone.remove();\r\n }\r\n\r\n that.layFixed.addClass(HIDE);\r\n that.layMain.find('tbody').html('');\r\n\r\n that.layMain.append(that.layNone = layNone);\r\n\r\n // 异常情况下对 page 和 total 的内容处理\r\n that.layTotal.addClass(HIDE_V);\r\n that.layPage.find(ELEM_PAGE_VIEW).addClass(HIDE_V);\r\n\r\n table.cache[that.key] = []; //格式化缓存数据\r\n\r\n that.syncCheckAll();\r\n that.renderForm();\r\n that.setColsWidth();\r\n };\r\n\r\n // 初始页码\r\n Class.prototype.page = 1;\r\n\r\n // 获得数据\r\n Class.prototype.pullData = function(curr, opts){\r\n var that = this;\r\n var options = that.config;\r\n // 同步表头父列的相关值\r\n options.HAS_SET_COLS_PATCH || that.setColsPatch();\r\n options.HAS_SET_COLS_PATCH = true;\r\n var request = options.request;\r\n var response = options.response;\r\n var res;\r\n var sort = function(){\r\n if(typeof options.initSort === 'object'){\r\n that.sort({\r\n field: options.initSort.field,\r\n type: options.initSort.type,\r\n reloadType: opts.type\r\n });\r\n }\r\n };\r\n var done = function(res, origin){\r\n that.setColsWidth();\r\n typeof options.done === 'function' && options.done(\r\n res, curr, res[response.countName], origin\r\n );\r\n };\r\n\r\n opts = opts || {};\r\n\r\n // 数据拉取前的回调\r\n typeof options.before === 'function' && options.before(\r\n options\r\n );\r\n that.startTime = new Date().getTime(); // 渲染开始时间\r\n\r\n if (opts.renderData) { // 将 cache 信息重新渲染\r\n res = {};\r\n res[response.dataName] = table.cache[that.key];\r\n res[response.countName] = options.url ? (layui.type(options.page) === 'object' ? options.page.count : res[response.dataName].length) : options.data.length;\r\n\r\n // 记录合计行数据\r\n if(typeof options.totalRow === 'object'){\r\n res[response.totalRowName] = $.extend({}, that.totalRow);\r\n }\r\n\r\n that.renderData({\r\n res: res,\r\n curr: curr,\r\n count: res[response.countName],\r\n type: opts.type,\r\n sort: true\r\n }), done(res, 'renderData');\r\n } else if(options.url){ // Ajax请求\r\n var params = {};\r\n // 当 page 开启,默认自动传递 page、limit 参数\r\n if(options.page){\r\n params[request.pageName] = curr;\r\n params[request.limitName] = options.limit;\r\n }\r\n\r\n // 参数\r\n var data = $.extend(params, options.where);\r\n if(options.contentType && options.contentType.indexOf(\"application/json\") == 0){ // 提交 json 格式\r\n data = JSON.stringify(data);\r\n }\r\n\r\n that.loading();\r\n\r\n $.ajax({\r\n type: options.method || 'get',\r\n url: options.url,\r\n contentType: options.contentType,\r\n data: data,\r\n dataType: options.dataType || 'json',\r\n jsonpCallback: options.jsonpCallback,\r\n headers: options.headers || {},\r\n complete: function(xhr,ts){\r\n typeof options.complete === 'function' && options.complete(xhr, ts);\r\n },\r\n success: function(res){\r\n // 若有数据解析的回调,则获得其返回的数据\r\n if(typeof options.parseData === 'function'){\r\n res = options.parseData(res) || res;\r\n }\r\n // 检查数据格式是否符合规范\r\n if(res[response.statusName] != response.statusCode){\r\n that.errorView(\r\n res[response.msgName] ||\r\n ('返回的数据不符合规范,正确的成功状态码应为:\"'+ response.statusName +'\": '+ response.statusCode)\r\n );\r\n } else {\r\n that.totalRow = res[response.totalRowName];\r\n that.renderData({\r\n res: res,\r\n curr: curr,\r\n count: res[response.countName],\r\n type: opts.type\r\n }), sort();\r\n\r\n // 耗时(接口请求+视图渲染)\r\n options.time = (new Date().getTime() - that.startTime) + ' ms';\r\n }\r\n done(res);\r\n },\r\n error: function(e, msg){\r\n that.errorView('请求异常,错误提示:'+ msg);\r\n typeof options.error === 'function' && options.error(e, msg);\r\n }\r\n });\r\n } else if(layui.type(options.data) === 'array'){ //已知数据\r\n res = {};\r\n var startLimit = curr*options.limit - options.limit;\r\n var newData = options.data.concat();\r\n\r\n res[response.dataName] = options.page\r\n ? newData.splice(startLimit, options.limit)\r\n : newData;\r\n res[response.countName] = options.data.length;\r\n\r\n // 记录合计行数据\r\n if(typeof options.totalRow === 'object'){\r\n res[response.totalRowName] = $.extend({}, options.totalRow);\r\n }\r\n that.totalRow = res[response.totalRowName];\r\n\r\n that.renderData({\r\n res: res,\r\n curr: curr,\r\n count: res[response.countName],\r\n type: opts.type\r\n }), sort();\r\n\r\n done(res);\r\n }\r\n };\r\n\r\n // 遍历表头\r\n Class.prototype.eachCols = function(callback){\r\n var that = this;\r\n table.eachCols(null, callback, that.config.cols);\r\n return that;\r\n };\r\n\r\n // 获取表头参数项\r\n Class.prototype.col = function(key){\r\n try {\r\n key = key.split('-');\r\n return this.config.cols[key[1]][key[2]] || {};\r\n } catch(e){\r\n hint.error(e);\r\n return {};\r\n }\r\n };\r\n\r\n Class.prototype.getTrHtml = function(data, sort, curr, trsObj) {\r\n var that = this;\r\n var options = that.config;\r\n var trs = trsObj && trsObj.trs || [];\r\n var trs_fixed = trsObj && trsObj.trs_fixed || [];\r\n var trs_fixed_r = trsObj && trsObj.trs_fixed_r || [];\r\n curr = curr || 1\r\n\r\n layui.each(data, function(i1, item1){\r\n var tds = [];\r\n var tds_fixed = [];\r\n var tds_fixed_r = [];\r\n var numbers = i1 + options.limit*(curr - 1) + 1; // 序号\r\n\r\n // 数组值是否为 object,如果不是,则自动转为 object\r\n if(typeof item1 !== 'object'){\r\n data[i1] = item1 = {LAY_KEY: item1};\r\n try {\r\n table.cache[that.key][i1] = item1;\r\n } catch(e) {}\r\n }\r\n\r\n //若数据项为空数组,则不往下执行(因为删除数据时,会将原有数据设置为 [])\r\n if(layui.type(item1) === 'array' && item1.length === 0) return;\r\n\r\n // 加入序号保留字段\r\n item1[table.config.numbersName] = numbers;\r\n\r\n // 记录下标索引,用于恢复排序\r\n if(!sort) item1[table.config.indexName] = i1;\r\n\r\n // 遍历表头\r\n that.eachCols(function(i3, item3){\r\n var field = item3.field || i3;\r\n var key = item3.key;\r\n var content = item1[field];\r\n\r\n if(content === undefined || content === null) content = '';\r\n if(item3.colGroup) return;\r\n\r\n // td 内容\r\n var td = [''\r\n ,'
                        '\r\n + function(){\r\n var tplData = $.extend(true, {\r\n LAY_COL: item3\r\n }, item1);\r\n var checkName = table.config.checkName;\r\n var disabledName = table.config.disabledName;\r\n\r\n // 渲染不同风格的列\r\n switch(item3.type){\r\n case 'checkbox': // 复选\r\n return '';\r\n //break;\r\n case 'radio': // 单选\r\n return '';\r\n //break;\r\n case 'numbers':\r\n return numbers;\r\n //break;\r\n }\r\n\r\n //解析工具列模板\r\n if(item3.toolbar){\r\n return laytpl($(item3.toolbar).html()||'').render(tplData);\r\n }\r\n return parseTempData.call(that, {\r\n item3: item3\r\n ,content: content\r\n ,tplData: tplData\r\n });\r\n }()\r\n ,'
                        '].join('');\r\n\r\n tds.push(td);\r\n if(item3.fixed && item3.fixed !== 'right') tds_fixed.push(td);\r\n if(item3.fixed === 'right') tds_fixed_r.push(td);\r\n });\r\n\r\n // 添加 tr 属性\r\n var trAttr = function(){\r\n var arr = ['data-index=\"'+ i1 +'\"'];\r\n if(item1[table.config.checkName]) arr.push('class=\"'+ ELEM_CHECKED +'\"');\r\n return arr.join(' ');\r\n }();\r\n\r\n trs.push(''+ tds.join('') + '');\r\n trs_fixed.push(''+ tds_fixed.join('') + '');\r\n trs_fixed_r.push(''+ tds_fixed_r.join('') + '');\r\n });\r\n\r\n return {\r\n trs: trs,\r\n trs_fixed: trs_fixed,\r\n trs_fixed_r: trs_fixed_r\r\n }\r\n }\r\n\r\n // 返回行节点代码\r\n table.getTrHtml = function (id, data) {\r\n var that = getThisTable(id);\r\n return that.getTrHtml(data, null, that.page);\r\n }\r\n\r\n // 数据渲染\r\n Class.prototype.renderData = function(opts){\r\n var that = this;\r\n var options = that.config;\r\n\r\n var res = opts.res;\r\n var curr = opts.curr;\r\n var count = that.count = opts.count;\r\n var sort = opts.sort;\r\n\r\n var data = res[options.response.dataName] || []; //列表数据\r\n var totalRowData = res[options.response.totalRowName]; //合计行数据\r\n var trs = [];\r\n var trs_fixed = [];\r\n var trs_fixed_r = [];\r\n\r\n // 渲染视图\r\n var render = function(){ // 后续性能提升的重点\r\n if(!sort && that.sortKey){\r\n return that.sort({\r\n field: that.sortKey.field,\r\n type: that.sortKey.sort,\r\n pull: true,\r\n reloadType: opts.type\r\n });\r\n }\r\n that.getTrHtml(data, sort, curr, {\r\n trs: trs,\r\n trs_fixed: trs_fixed,\r\n trs_fixed_r: trs_fixed_r\r\n });\r\n\r\n // 容器的滚动条位置\r\n if(!(options.scrollPos === 'fixed' && opts.type === 'reloadData')){\r\n that.layBody.scrollTop(0);\r\n }\r\n if(options.scrollPos === 'reset'){\r\n that.layBody.scrollLeft(0);\r\n }\r\n\r\n that.layMain.find('.'+ NONE).remove();\r\n that.layMain.find('tbody').html(trs.join(''));\r\n that.layFixLeft.find('tbody').html(trs_fixed.join(''));\r\n that.layFixRight.find('tbody').html(trs_fixed_r.join(''));\r\n\r\n // 渲染表单\r\n that.syncCheckAll();\r\n that.renderForm();\r\n\r\n // 因为 page 参数有可能发生变化 先重新铺满\r\n that.fullSize();\r\n\r\n // 滚动条补丁\r\n that.haveInit ? that.scrollPatch() : setTimeout(function(){\r\n that.scrollPatch();\r\n }, 50);\r\n that.haveInit = true;\r\n\r\n layer.close(that.tipsIndex);\r\n };\r\n\r\n table.cache[that.key] = data; //记录数据\r\n\r\n //显示隐藏合计栏\r\n that.layTotal[data.length == 0 ? 'addClass' : 'removeClass'](HIDE_V);\r\n\r\n //显示隐藏分页栏\r\n that.layPage[(options.page || options.pagebar) ? 'removeClass' : 'addClass'](HIDE);\r\n that.layPage.find(ELEM_PAGE_VIEW)[\r\n (!options.page || count == 0 || (data.length === 0 && curr == 1))\r\n ? 'addClass'\r\n : 'removeClass'\r\n ](HIDE_V);\r\n\r\n //如果无数据\r\n if(data.length === 0){\r\n return that.errorView(options.text.none);\r\n } else {\r\n that.layFixLeft.removeClass(HIDE);\r\n }\r\n\r\n //如果执行初始排序\r\n if(sort){\r\n return render();\r\n }\r\n\r\n //正常初始化数据渲染\r\n render(); //渲染数据\r\n that.renderTotal(data, totalRowData); //数据合计\r\n that.layTotal && that.layTotal.removeClass(HIDE);\r\n\r\n //同步分页状态\r\n if(options.page){\r\n options.page = $.extend({\r\n elem: 'layui-table-page' + options.index,\r\n count: count,\r\n limit: options.limit,\r\n limits: options.limits || [10,20,30,40,50,60,70,80,90],\r\n groups: 3,\r\n layout: ['prev', 'page', 'next', 'skip', 'count', 'limit'],\r\n prev: '',\r\n next: '',\r\n jump: function(obj, first){\r\n if(!first){\r\n //分页本身并非需要做以下更新,下面参数的同步,主要是因为其它处理统一用到了它们\r\n //而并非用的是 options.page 中的参数(以确保分页未开启的情况仍能正常使用)\r\n that.page = obj.curr; //更新页码\r\n options.limit = obj.limit; //更新每页条数\r\n\r\n that.pullData(obj.curr);\r\n }\r\n }\r\n }, options.page);\r\n options.page.count = count; //更新总条数\r\n laypage.render(options.page);\r\n }\r\n };\r\n\r\n // 重新渲染数据\r\n table.renderData = function (id) {\r\n var that = getThisTable(id);\r\n if (!that) {\r\n return;\r\n }\r\n\r\n that.pullData(that.page, {\r\n renderData: true,\r\n type: 'reloadData'\r\n });\r\n }\r\n\r\n // 数据合计行\r\n Class.prototype.renderTotal = function(data, totalRowData){\r\n var that = this;\r\n var options = that.config;\r\n var totalNums = {};\r\n\r\n if(!options.totalRow) return;\r\n\r\n layui.each(data, function(i1, item1){\r\n // 若数据项为空数组,则不往下执行(因为删除数据时,会将原有数据设置为 [])\r\n if(layui.type(item1) === 'array' && item1.length === 0) return;\r\n\r\n that.eachCols(function(i3, item3){\r\n var field = item3.field || i3\r\n ,content = item1[field];\r\n\r\n if(item3.totalRow){\r\n totalNums[field] = (totalNums[field] || 0) + (parseFloat(content) || 0);\r\n }\r\n });\r\n });\r\n\r\n that.dataTotal = []; // 记录合计行结果\r\n\r\n var tds = [];\r\n that.eachCols(function(i3, item3){\r\n var field = item3.field || i3;\r\n\r\n // 合计数据的特定字段\r\n var TOTAL_NUMS = totalRowData && totalRowData[item3.field];\r\n\r\n // 合计数据的小数点位数处理\r\n var decimals = 'totalRowDecimals' in item3 ? item3.totalRowDecimals : 2;\r\n var thisTotalNum = totalNums[field]\r\n ? parseFloat(totalNums[field] || 0).toFixed(decimals)\r\n : '';\r\n\r\n // td 显示内容\r\n var content = function(){\r\n var text = item3.totalRowText || '';\r\n var tplData = {\r\n LAY_COL: item3\r\n };\r\n\r\n tplData[field] = thisTotalNum;\r\n\r\n // 获取自动计算的合并内容\r\n var getContent = item3.totalRow ? (parseTempData.call(that, {\r\n item3: item3,\r\n content: thisTotalNum,\r\n tplData: tplData\r\n }) || text) : text;\r\n\r\n // 如果直接传入了合计行数据,则不输出自动计算的结果\r\n return TOTAL_NUMS || getContent;\r\n }();\r\n\r\n // 合计原始结果\r\n var total = TOTAL_NUMS || thisTotalNum || '';\r\n item3.field && that.dataTotal.push({\r\n field: item3.field,\r\n total: $('
                        '+ content +'
                        ').text()\r\n });\r\n\r\n // td 容器\r\n var td = ['',\r\n '
                        ' + function(){\r\n var totalRow = item3.totalRow || options.totalRow;\r\n\r\n // 如果 totalRow 参数为字符类型,则解析为自定义模版\r\n if(typeof totalRow === 'string'){\r\n return laytpl(totalRow).render($.extend({\r\n TOTAL_NUMS: TOTAL_NUMS || totalNums[field],\r\n TOTAL_ROW: totalRowData || {},\r\n LAY_COL: item3\r\n }, item3));\r\n }\r\n return content;\r\n }(),\r\n '
                        '].join('');\r\n\r\n tds.push(td);\r\n });\r\n\r\n var patchElem = that.layTotal.find('.layui-table-patch'); // 可能存在滚动条补丁\r\n that.layTotal.find('tbody').html('' + tds.join('') + (patchElem.length ? patchElem.get(0).outerHTML : '') + '');\r\n };\r\n\r\n //找到对应的列元素\r\n Class.prototype.getColElem = function(parent, key){\r\n var that = this;\r\n //var options = that.config;\r\n return parent.eq(0).find('.laytable-cell-'+ key + ':eq(0)');\r\n };\r\n\r\n // 渲染表单\r\n Class.prototype.renderForm = function(type){\r\n var that = this;\r\n var options = that.config;\r\n var filter = that.elem.attr('lay-filter');\r\n form.render(type, filter);\r\n };\r\n\r\n // 同步全选按钮状态\r\n Class.prototype.syncCheckAll = function(){\r\n var that = this;\r\n var options = that.config;\r\n var checkAllElem = that.layHeader.find('input[name=\"layTableCheckbox\"]');\r\n var syncColsCheck = function(checked){\r\n that.eachCols(function(i, item){\r\n if(item.type === 'checkbox'){\r\n item[options.checkName] = checked;\r\n }\r\n });\r\n return checked;\r\n };\r\n var checkStatus = table.checkStatus(that.key);\r\n\r\n if(!checkAllElem[0]) return;\r\n\r\n // 选中状态\r\n syncColsCheck(checkStatus.isAll);\r\n checkAllElem.prop({\r\n checked: checkStatus.isAll,\r\n indeterminate: !checkStatus.isAll && checkStatus.data.length // 半选\r\n });\r\n form.render(checkAllElem);\r\n };\r\n\r\n // 标记当前活动行背景色\r\n Class.prototype.setRowActive = function(index, className, removeClass){\r\n var that = this;\r\n var options = that.config;\r\n var tr = that.layBody.find('tr[data-index=\"'+ index +'\"]');\r\n className = className || 'layui-table-click';\r\n\r\n if(removeClass) return tr.removeClass(className);\r\n\r\n tr.addClass(className);\r\n tr.siblings('tr').removeClass(className);\r\n };\r\n\r\n // 设置行选中状态\r\n Class.prototype.setRowChecked = function(opts){\r\n var that = this;\r\n var options = that.config;\r\n var tr = that.layBody.find('tr'+ (\r\n opts.index === 'all' ? '' : '[data-index=\"'+ opts.index +'\"]'\r\n ));\r\n\r\n // 默认属性\r\n opts = $.extend({\r\n type: 'checkbox' // 选中方式\r\n }, opts);\r\n\r\n // 同步数据选中属性值\r\n var thisData = table.cache[that.key];\r\n var existChecked = 'checked' in opts;\r\n var getChecked = function(value){\r\n // 若为单选框,则单向选中;若为复选框,则切换选中。\r\n return opts.type === 'radio' ? true : (existChecked ? opts.checked : !value)\r\n };\r\n\r\n // 设置数据选中属性\r\n layui.each(thisData, function(i, item){\r\n if(layui.type(item) === 'array' || item[options.disabledName]) return; // 空项\r\n if(Number(opts.index) === i || opts.index === 'all'){\r\n var checked = item[options.checkName] = getChecked(item[options.checkName]);\r\n tr[checked ? 'addClass' : 'removeClass'](ELEM_CHECKED); // 标记当前选中行背景色\r\n // 若为 radio 类型,则取消其他行选中背景色\r\n if(opts.type === 'radio'){\r\n tr.siblings().removeClass(ELEM_CHECKED);\r\n }\r\n } else if(opts.type === 'radio') {\r\n delete item[options.checkName];\r\n }\r\n });\r\n\r\n // 若存在复选框或单选框,则标注选中状态样式\r\n var checkedElem = tr.find('input[lay-type=\"'+ ({\r\n radio: 'layTableRadio',\r\n checkbox: 'layTableCheckbox'\r\n }[opts.type] || 'checkbox') +'\"]:not(:disabled)');\r\n var checkedSameElem = checkedElem.last();\r\n var fixRElem = checkedSameElem.closest(ELEM_FIXR);\r\n\r\n ( opts.type === 'radio' && fixRElem.hasClass(HIDE)\r\n ? checkedElem.first()\r\n : checkedElem ).prop('checked', getChecked(checkedSameElem.prop('checked')));\r\n\r\n that.syncCheckAll();\r\n that.renderForm(opts.type);\r\n };\r\n\r\n // 数据排序\r\n Class.prototype.sort = function(opts){ // field, type, pull, fromEvent\r\n var that = this;\r\n var field;\r\n var res = {};\r\n var options = that.config;\r\n var filter = options.elem.attr('lay-filter');\r\n var data = table.cache[that.key], thisData;\r\n\r\n opts = opts || {};\r\n\r\n // 字段匹配\r\n if(typeof opts.field === 'string'){\r\n field = opts.field;\r\n that.layHeader.find('th').each(function(i, item){\r\n var othis = $(this);\r\n var _field = othis.data('field');\r\n if(_field === opts.field){\r\n opts.field = othis;\r\n field = _field;\r\n return false;\r\n }\r\n });\r\n }\r\n\r\n try {\r\n field = field || opts.field.data('field');\r\n var key = opts.field.data('key');\r\n\r\n // 如果欲执行的排序已在状态中,则不执行渲染\r\n if(that.sortKey && !opts.pull){\r\n if(field === that.sortKey.field && opts.type === that.sortKey.sort){\r\n return;\r\n }\r\n }\r\n\r\n var elemSort = that.layHeader.find('th .laytable-cell-'+ key).find(ELEM_SORT);\r\n that.layHeader.find('th').find(ELEM_SORT).removeAttr('lay-sort'); // 清除其它标题排序状态\r\n elemSort.attr('lay-sort', opts.type || null);\r\n that.layFixed.find('th')\r\n } catch(e){\r\n hint.error('Table modules: sort field \\''+ field +'\\' not matched');\r\n }\r\n\r\n // 记录排序索引和类型\r\n that.sortKey = {\r\n field: field,\r\n sort: opts.type\r\n };\r\n\r\n // 默认为前端自动排序。如果否,则需自主排序(通常为服务端处理好排序)\r\n if(options.autoSort){\r\n if(opts.type === 'asc'){ //升序\r\n thisData = layui.sort(data, field, null, true);\r\n } else if(opts.type === 'desc'){ //降序\r\n thisData = layui.sort(data, field, true, true);\r\n } else { // 清除排序\r\n thisData = layui.sort(data, table.config.indexName, null, true);\r\n delete that.sortKey;\r\n delete options.initSort;\r\n }\r\n }\r\n\r\n res[options.response.dataName] = thisData || data;\r\n\r\n // 重载数据\r\n that.renderData({\r\n res: res,\r\n curr: that.page,\r\n count: that.count,\r\n sort: true,\r\n type: opts.reloadType\r\n });\r\n\r\n // 排序是否来自于点击表头事件触发\r\n if(opts.fromEvent){\r\n options.initSort = {\r\n field: field,\r\n type: opts.type\r\n };\r\n layui.event.call(opts.field, MOD_NAME, 'sort('+ filter +')', $.extend({\r\n config: options\r\n }, options.initSort));\r\n }\r\n };\r\n\r\n // 请求 loading\r\n Class.prototype.loading = function(hide){\r\n var that = this;\r\n var options = that.config;\r\n if(options.loading){\r\n if(hide){\r\n that.layInit && that.layInit.remove();\r\n delete that.layInit;\r\n that.layBox.find(ELEM_INIT).remove();\r\n } else {\r\n that.layInit = $(['
                        ',\r\n '',\r\n '
                        '].join(''));\r\n that.layBox.append(that.layInit);\r\n }\r\n }\r\n };\r\n\r\n // 获取对应单元格的 cssRules\r\n Class.prototype.cssRules = function(key, callback){\r\n var that = this;\r\n var style = that.elem.children('style')[0];\r\n\r\n lay.getStyleRules(style, function(item){\r\n if (item.selectorText === ('.laytable-cell-'+ key)) {\r\n return callback(item), true;\r\n }\r\n });\r\n };\r\n\r\n // 让表格铺满\r\n Class.prototype.fullSize = function(){\r\n var that = this;\r\n var options = that.config;\r\n var height = options.height;\r\n var bodyHeight;\r\n\r\n if(that.fullHeightGap){\r\n height = _WIN.height() - that.fullHeightGap;\r\n if(height < 135) height = 135;\r\n // that.elem.css('height', height);\r\n } else if (that.parentDiv && that.parentHeightGap) {\r\n height = $(that.parentDiv).height() - that.parentHeightGap;\r\n if (height < 135) height = 135;\r\n // that.elem.css(\"height\", height);\r\n }\r\n\r\n // 如果多级表头,则填补表头高度\r\n if(options.cols.length > 1){\r\n // 补全高度\r\n var th = that.layFixed.find(ELEM_HEADER).find('th');\r\n // 固定列表头同步跟本体 th 一致高度\r\n var headerMain = that.layHeader.first();\r\n layui.each(th, function (thIndex, thElem) {\r\n thElem = $(thElem);\r\n thElem.height(headerMain.find('th[data-key=\"' + thElem.attr('data-key') + '\"]').height() + 'px');\r\n })\r\n }\r\n\r\n if(!height) return;\r\n\r\n // 减去列头区域的高度 --- 此处的数字常量是为了防止容器处在隐藏区域无法获得高度的问题,只对默认尺寸表格做支持\r\n bodyHeight = parseFloat(height) - (that.layHeader.outerHeight() || 39)\r\n\r\n // 减去工具栏的高度\r\n if(options.toolbar){\r\n bodyHeight -= (that.layTool.outerHeight() || 51);\r\n }\r\n\r\n // 减去统计栏的高度\r\n if(options.totalRow){\r\n bodyHeight -= (that.layTotal.outerHeight() || 40);\r\n }\r\n\r\n // 减去分页栏的高度\r\n if(options.page || options.pagebar){\r\n bodyHeight -= (that.layPage.outerHeight() || 43);\r\n }\r\n\r\n if (options.maxHeight) {\r\n layui.each({elem: height, layMain: bodyHeight}, function (elemName, elemHeight) {\r\n that[elemName].css({\r\n height: 'auto',\r\n maxHeight: elemHeight + 'px'\r\n });\r\n });\r\n } else {\r\n that.layMain.outerHeight(bodyHeight);\r\n }\r\n };\r\n\r\n //获取滚动条宽度\r\n Class.prototype.getScrollWidth = function(elem){\r\n var width;\r\n if(elem){\r\n width = elem.offsetWidth - elem.clientWidth;\r\n } else {\r\n elem = document.createElement('div');\r\n elem.style.width = '100px';\r\n elem.style.height = '100px';\r\n elem.style.overflowY = 'scroll';\r\n\r\n document.body.appendChild(elem);\r\n width = elem.offsetWidth - elem.clientWidth;\r\n document.body.removeChild(elem);\r\n }\r\n return width;\r\n };\r\n\r\n // 滚动条补丁\r\n Class.prototype.scrollPatch = function(){\r\n var that = this;\r\n var layMainTable = that.layMain.children('table');\r\n var scrollWidth = that.layMain.width() - that.layMain.prop('clientWidth'); // 纵向滚动条宽度\r\n var scrollHeight = that.layMain.height() - that.layMain.prop('clientHeight'); // 横向滚动条高度\r\n var getScrollWidth = that.getScrollWidth(that.layMain[0]); // 获取主容器滚动条宽度,如果有的话\r\n var outWidth = layMainTable.outerWidth() - that.layMain.width(); // 表格内容器的超出宽度\r\n\r\n // 添加补丁\r\n var addPatch = function(elem){\r\n if(scrollWidth && scrollHeight){\r\n elem = elem.eq(0);\r\n if(!elem.find('.layui-table-patch')[0]){\r\n var patchElem = $('
                        '); // 补丁元素\r\n patchElem.find('div').css({\r\n width: scrollWidth\r\n });\r\n elem.find('tr').append(patchElem);\r\n }\r\n } else {\r\n elem.find('.layui-table-patch').remove();\r\n }\r\n };\r\n\r\n addPatch(that.layHeader);\r\n addPatch(that.layTotal);\r\n\r\n // 固定列区域高度\r\n var mainHeight = that.layMain.height();\r\n var fixHeight = mainHeight - scrollHeight;\r\n\r\n that.layFixed.find(ELEM_BODY).css(\r\n 'height',\r\n layMainTable.height() >= fixHeight ? fixHeight : 'auto'\r\n ).scrollTop(that.layMain.scrollTop()); // 固定列滚动条高度\r\n\r\n // 表格宽度小于容器宽度时,隐藏固定列\r\n that.layFixRight[\r\n (table.cache[that.key] && table.cache[that.key].length) && outWidth > 0\r\n ? 'removeClass'\r\n : 'addClass'\r\n ](HIDE);\r\n\r\n // 操作栏\r\n that.layFixRight.css('right', scrollWidth - 1);\r\n };\r\n\r\n // 事件处理\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n var filter = options.elem.attr('lay-filter');\r\n var th = that.layHeader.find('th');\r\n var ELEM_CELL = '.layui-table-cell';\r\n\r\n var _BODY = $('body');\r\n var dict = {};\r\n\r\n // 头部工具栏操作事件\r\n that.layTool.on('click', '*[lay-event]', function(e){\r\n var othis = $(this);\r\n var events = othis.attr('lay-event');\r\n var data = table.cache[options.id];\r\n var openPanel = function(sets){\r\n var list = $(sets.list);\r\n var panel = $('
                          ');\r\n\r\n panel.html(list);\r\n\r\n // 限制最大高度\r\n if(options.height){\r\n panel.css('max-height', options.height - (that.layTool.outerHeight() || 50));\r\n }\r\n\r\n // 插入元素\r\n othis.find('.' + ELEM_TOOL_PANEL)[0] || othis.append(panel);\r\n that.renderForm();\r\n\r\n panel.on('click', function(e){\r\n layui.stope(e);\r\n });\r\n\r\n sets.done && sets.done(panel, list)\r\n };\r\n\r\n layui.stope(e);\r\n _DOC.trigger('table.tool.panel.remove');\r\n layer.close(that.tipsIndex);\r\n\r\n switch(events){\r\n case 'LAYTABLE_COLS': // 筛选列\r\n openPanel({\r\n list: function(){\r\n var lis = [];\r\n that.eachCols(function(i, item){\r\n if(item.field && item.type == 'normal'){\r\n lis.push('
                        • ' + (item.fieldTitle || item.title || item.field) + '
                        • ').text()) +'\" lay-filter=\"LAY_TABLE_TOOL_COLS\">');\r\n }\r\n });\r\n return lis.join('');\r\n }()\r\n ,done: function(){\r\n form.on('checkbox(LAY_TABLE_TOOL_COLS)', function(obj){\r\n var othis = $(obj.elem);\r\n var checked = this.checked;\r\n var key = othis.data('key');\r\n var col = that.col(key);\r\n var hide = col.hide;\r\n var parentKey = othis.data('parentkey');\r\n\r\n if(!col.key) return;\r\n\r\n // 同步勾选列的 hide 值和隐藏样式\r\n col.hide = !checked;\r\n that.elem.find('*[data-key=\"'+ key +'\"]')[\r\n checked ? 'removeClass' : 'addClass'\r\n ](HIDE);\r\n\r\n // 根据列的显示隐藏,同步多级表头的父级相关属性值\r\n if(hide != col.hide){\r\n that.setParentCol(!checked, parentKey);\r\n }\r\n\r\n // 重新适配尺寸\r\n that.resize();\r\n\r\n // 列筛选(显示或隐藏)后的事件\r\n layui.event.call(this, MOD_NAME, 'colToggled('+ filter +')', {\r\n col: col,\r\n config: options\r\n });\r\n });\r\n }\r\n });\r\n break;\r\n case 'LAYTABLE_EXPORT': // 导出\r\n if (!data.length) return layer.tips('当前表格无数据', this, {tips: 3});\r\n if(device.ie){\r\n layer.tips('导出功能不支持 IE,请用 Chrome 等高级浏览器导出', this, {\r\n tips: 3\r\n });\r\n } else {\r\n openPanel({\r\n list: function(){\r\n return [\r\n '
                        • 导出 csv 格式文件
                        • ',\r\n '
                        • 导出 xls 格式文件
                        • '\r\n ].join('')\r\n }(),\r\n done: function(panel, list){\r\n list.on('click', function(){\r\n var type = $(this).data('type')\r\n table.exportFile.call(that, options.id, null, type);\r\n });\r\n }\r\n });\r\n }\r\n break;\r\n case 'LAYTABLE_PRINT': // 打印\r\n if (!data.length) return layer.tips('当前表格无数据', this, {tips: 3});\r\n var printWin = window.open('about:blank', '_blank');\r\n var style = [''].join('')\r\n var html = $(that.layHeader.html()); // 输出表头\r\n\r\n html.append(that.layMain.find('table').html()); // 输出表体\r\n html.append(that.layTotal.find('table').html()) // 输出合计行\r\n\r\n html.find('th.layui-table-patch').remove(); // 移除补丁\r\n // 移除表头特殊列\r\n html.find('thead>tr>th.'+ ELEM_COL_SPECIAL).filter(function(i, thElem){\r\n return !$(thElem).children('.'+ ELEM_GROUP).length; // 父级表头除外\r\n }).remove();\r\n html.find('tbody>tr>td.'+ ELEM_COL_SPECIAL).remove(); // 移除表体特殊列\r\n\r\n printWin.document.write(style + html.prop('outerHTML'));\r\n printWin.document.close();\r\n\r\n if(layui.device('edg').edg){\r\n printWin.onafterprint = printWin.close;\r\n printWin.print();\r\n }else{\r\n printWin.print();\r\n printWin.close();\r\n }\r\n break;\r\n }\r\n\r\n layui.event.call(this, MOD_NAME, 'toolbar('+ filter +')', $.extend({\r\n event: events,\r\n config: options\r\n },{}));\r\n });\r\n\r\n // 表头自定义元素事件\r\n that.layHeader.on('click', '*[lay-event]', function(e){\r\n var othis = $(this);\r\n var events = othis.attr('lay-event');\r\n var th = othis.closest('th');\r\n var key = th.data('key');\r\n var col = that.col(key);\r\n\r\n layui.event.call(this, MOD_NAME, 'colTool('+ filter +')', $.extend({\r\n event: events,\r\n config: options,\r\n col: col\r\n },{}));\r\n });\r\n\r\n // 分页栏操作事件\r\n that.layPagebar.on('click', '*[lay-event]', function(e){\r\n var othis = $(this);\r\n var events = othis.attr('lay-event');\r\n\r\n layui.event.call(this, MOD_NAME, 'pagebar('+ filter +')', $.extend({\r\n event: events,\r\n config: options\r\n },{}));\r\n });\r\n\r\n // 拖拽调整宽度\r\n th.on('mousemove', function(e){\r\n var othis = $(this);\r\n var oLeft = othis.offset().left;\r\n var pLeft = e.clientX - oLeft;\r\n if(othis.data('unresize') || thisTable.eventMoveElem){\r\n return;\r\n }\r\n dict.allowResize = othis.width() - pLeft <= 10; //是否处于拖拽允许区域\r\n _BODY.css('cursor', (dict.allowResize ? 'col-resize' : ''));\r\n }).on('mouseleave', function(){\r\n var othis = $(this);\r\n if(thisTable.eventMoveElem) return;\r\n _BODY.css('cursor', '');\r\n }).on('mousedown', function(e){\r\n var othis = $(this);\r\n if(dict.allowResize){\r\n var key = othis.data('key');\r\n e.preventDefault();\r\n dict.offset = [e.clientX, e.clientY]; //记录初始坐标\r\n\r\n that.cssRules(key, function(item){\r\n var width = item.style.width || othis.outerWidth();\r\n dict.rule = item;\r\n dict.ruleWidth = parseFloat(width);\r\n dict.minWidth = othis.data('minwidth') || options.cellMinWidth;\r\n dict.maxWidth = othis.data('maxwidth') || options.cellMaxWidth;\r\n });\r\n\r\n // 临时记录当前拖拽信息\r\n othis.data(DATA_MOVE_NAME, dict);\r\n thisTable.eventMoveElem = othis;\r\n }\r\n });\r\n\r\n // 拖拽中\r\n if(!thisTable.docEvent){\r\n _DOC.on('mousemove', function(e){\r\n if(thisTable.eventMoveElem){\r\n var dict = thisTable.eventMoveElem.data(DATA_MOVE_NAME) || {};\r\n\r\n thisTable.eventMoveElem.data('resizing', 1);\r\n e.preventDefault();\r\n\r\n if(dict.rule){\r\n var setWidth = dict.ruleWidth + e.clientX - dict.offset[0];\r\n var id = thisTable.eventMoveElem.closest('.' + ELEM_VIEW).attr('lay-id');\r\n var thatTable = getThisTable(id);\r\n\r\n if(!thatTable) return;\r\n\r\n if(setWidth < dict.minWidth) setWidth = dict.minWidth;\r\n if(setWidth > dict.maxWidth) setWidth = dict.maxWidth;\r\n\r\n dict.rule.style.width = setWidth + 'px';\r\n thatTable.setGroupWidth(thisTable.eventMoveElem);\r\n layer.close(that.tipsIndex);\r\n }\r\n }\r\n }).on('mouseup', function(e){\r\n if(thisTable.eventMoveElem){\r\n var th = thisTable.eventMoveElem; // 当前触发拖拽的 th 元素\r\n var id = th.closest('.' + ELEM_VIEW).attr('lay-id');\r\n var thatTable = getThisTable(id);\r\n\r\n if(!thatTable) return;\r\n\r\n var key = th.data('key');\r\n var col = thatTable.col(key);\r\n var filter = thatTable.config.elem.attr('lay-filter');\r\n\r\n // 重置过度信息\r\n dict = {};\r\n _BODY.css('cursor', '');\r\n thatTable.scrollPatch();\r\n\r\n // 清除当前拖拽信息\r\n th.removeData(DATA_MOVE_NAME);\r\n delete thisTable.eventMoveElem;\r\n\r\n // 列拖拽宽度后的事件\r\n thatTable.cssRules(key, function(item){\r\n col.width = parseFloat(item.style.width);\r\n layui.event.call(th[0], MOD_NAME, 'colResized('+ filter +')', {\r\n col: col,\r\n config: thatTable.config\r\n });\r\n });\r\n }\r\n });\r\n }\r\n\r\n // 已给 document 执行全局事件,避免重复绑定\r\n thisTable.docEvent = true;\r\n\r\n\r\n // 排序\r\n th.on('click', function(e){\r\n var othis = $(this);\r\n var elemSort = othis.find(ELEM_SORT);\r\n var nowType = elemSort.attr('lay-sort');\r\n var type;\r\n\r\n // 排序不触发的条件\r\n if(!elemSort[0] || othis.data('resizing') === 1){\r\n return othis.removeData('resizing');\r\n }\r\n\r\n if(nowType === 'asc'){\r\n type = 'desc';\r\n } else if(nowType === 'desc'){\r\n type = null;\r\n } else {\r\n type = 'asc';\r\n }\r\n that.sort({\r\n field: othis,\r\n type: type,\r\n fromEvent: true\r\n });\r\n }).find(ELEM_SORT+' .layui-edge ').on('click', function(e){\r\n var othis = $(this);\r\n var index = othis.index();\r\n var field = othis.parents('th').eq(0).data('field');\r\n layui.stope(e);\r\n if(index === 0){\r\n that.sort({\r\n field: field,\r\n type: 'asc',\r\n fromEvent: true\r\n });\r\n } else {\r\n that.sort({\r\n field: field,\r\n type: 'desc',\r\n fromEvent: true\r\n });\r\n }\r\n });\r\n\r\n //数据行中的事件返回的公共对象成员\r\n var commonMember = that.commonMember = function(sets){\r\n var othis = $(this);\r\n var index = othis.parents('tr').eq(0).data('index');\r\n var tr = that.layBody.find('tr[data-index=\"'+ index +'\"]');\r\n var data = table.cache[that.key] || [];\r\n\r\n data = data[index] || {};\r\n\r\n // 事件返回的公共成员\r\n var obj = {\r\n tr: tr, // 行元素\r\n config: options,\r\n data: table.clearCacheKey(data), // 当前行数据\r\n dataCache: data, // 当前行缓存中的数据\r\n index: index,\r\n del: function(){ // 删除行数据\r\n table.cache[that.key][index] = [];\r\n tr.remove();\r\n that.scrollPatch();\r\n },\r\n update: function(fields, related){ // 修改行数据\r\n fields = fields || {};\r\n layui.each(fields, function(key, value){\r\n var td = tr.children('td[data-field=\"'+ key +'\"]');\r\n var cell = td.children(ELEM_CELL); // 获取当前修改的列\r\n\r\n // 更新缓存中的数据\r\n data[key] = obj.data[key] = value;\r\n\r\n // 更新相应列视图\r\n that.eachCols(function(i, item3){\r\n if(item3.field == key){\r\n cell.html(parseTempData.call(that, {\r\n item3: item3\r\n ,content: value\r\n ,tplData: $.extend({\r\n LAY_COL: item3\r\n }, data)\r\n }));\r\n td.data('content', value);\r\n }\r\n // 更新其他包含自定义模板且可能有所关联的列视图\r\n else if(related && (item3.templet || item3.toolbar)){\r\n var thisTd = tr.children('td[data-field=\"'+ (item3.field || i) +'\"]');\r\n var content = data[item3.field];\r\n\r\n thisTd.children(ELEM_CELL).html(parseTempData.call(that, {\r\n item3: item3\r\n ,content: content\r\n ,tplData: $.extend({\r\n LAY_COL: item3\r\n }, data)\r\n }));\r\n thisTd.data('content', content);\r\n }\r\n });\r\n });\r\n\r\n that.renderForm();\r\n },\r\n // 设置行选中状态\r\n setRowChecked: function(opts){\r\n that.setRowChecked($.extend({\r\n index: index\r\n }, opts));\r\n }\r\n // 获取当前列\r\n };\r\n\r\n return $.extend(obj, sets);\r\n };\r\n\r\n // 复选框选择(替代元素的 click 事件)\r\n that.elem.on('click', 'input[name=\"layTableCheckbox\"]+', function(e){\r\n var othis = $(this);\r\n var td = othis.closest('td');\r\n var checkbox = othis.prev();\r\n var children = that.layBody.find('input[name=\"layTableCheckbox\"]');\r\n var index = checkbox.parents('tr').eq(0).data('index');\r\n var checked = checkbox[0].checked;\r\n var isAll = checkbox.attr('lay-filter') === 'layTableAllChoose';\r\n\r\n if(checkbox[0].disabled) return;\r\n\r\n // 全选\r\n if(isAll){\r\n that.setRowChecked({\r\n index: 'all',\r\n checked: checked\r\n });\r\n } else {\r\n that.setRowChecked({\r\n index: index,\r\n checked: checked\r\n });\r\n layui.stope(e);\r\n }\r\n\r\n // 事件\r\n layui.event.call(\r\n checkbox[0],\r\n MOD_NAME, 'checkbox('+ filter +')',\r\n commonMember.call(checkbox[0], {\r\n checked: checked,\r\n type: isAll ? 'all' : 'one',\r\n getCol: function(){ // 获取当前列的表头配置信息\r\n return that.col(td.data('key'));\r\n }\r\n })\r\n );\r\n });\r\n\r\n // 单选框选择\r\n that.elem.on('click', 'input[lay-type=\"layTableRadio\"]+', function(e){\r\n var othis = $(this);\r\n var td = othis.closest('td');\r\n var radio = othis.prev();\r\n var checked = radio[0].checked;\r\n var index = radio.parents('tr').eq(0).data('index');\r\n\r\n layui.stope(e);\r\n if(radio[0].disabled) return false;\r\n\r\n // 标注选中样式\r\n that.setRowChecked({\r\n type: 'radio',\r\n index: index\r\n });\r\n\r\n // 事件\r\n layui.event.call(\r\n radio[0],\r\n MOD_NAME, 'radio('+ filter +')',\r\n commonMember.call(radio[0], {\r\n checked: checked,\r\n getCol: function(){ // 获取当前列的表头配置信息\r\n return that.col(td.data('key'));\r\n }\r\n })\r\n );\r\n });\r\n\r\n // 行事件\r\n that.layBody.on('mouseenter', 'tr', function(){ // 鼠标移入行\r\n var othis = $(this);\r\n var index = othis.index();\r\n if(othis.data('off')) return; // 不触发事件\r\n that.layBody.find('tr:eq('+ index +')').addClass(ELEM_HOVER)\r\n }).on('mouseleave', 'tr', function(){ // 鼠标移出行\r\n var othis = $(this);\r\n var index = othis.index();\r\n if(othis.data('off')) return; // 不触发事件\r\n that.layBody.find('tr:eq('+ index +')').removeClass(ELEM_HOVER)\r\n }).on('click', 'tr', function(e){ // 单击行\r\n // 不支持行单击事件的元素\r\n var UNROW = [\r\n '.layui-form-checkbox',\r\n '.layui-form-switch',\r\n '.layui-form-radio',\r\n '[lay-unrow]'\r\n ].join(',');\r\n if( $(e.target).is(UNROW) || $(e.target).closest(UNROW)[0]){\r\n return;\r\n }\r\n setRowEvent.call(this, 'row');\r\n }).on('dblclick', 'tr', function(){ // 双击行\r\n setRowEvent.call(this, 'rowDouble');\r\n }).on('contextmenu', 'tr', function(e){ // 菜单\r\n if (!options.defaultContextmenu) e.preventDefault();\r\n setRowEvent.call(this, 'rowContextmenu');\r\n });\r\n\r\n // 创建行单击、双击、菜单事件\r\n var setRowEvent = function(eventType){\r\n var othis = $(this);\r\n if(othis.data('off')) return; //不触发事件\r\n layui.event.call(this,\r\n MOD_NAME, eventType + '('+ filter +')',\r\n commonMember.call(othis.children('td')[0])\r\n );\r\n };\r\n\r\n // 渲染单元格编辑状态\r\n var renderGridEdit = function(othis, e){\r\n othis = $(othis);\r\n\r\n if(othis.data('off')) return; // 不触发事件\r\n\r\n var field = othis.data('field');\r\n var key = othis.data('key');\r\n var col = that.col(key);\r\n var index = othis.closest('tr').data('index');\r\n var data = table.cache[that.key][index];\r\n var elemCell = othis.children(ELEM_CELL);\r\n\r\n // 是否开启编辑\r\n // 若 edit 传入函数,则根据函数的返回结果判断是否开启编辑\r\n var editType = typeof col.edit === 'function'\r\n ? col.edit(data)\r\n : col.edit;\r\n\r\n // 显示编辑表单\r\n if(editType){\r\n var input = $(function(){\r\n var inputElem = '';\r\n if(editType === 'textarea') {\r\n inputElem = '';\r\n }\r\n return inputElem;\r\n }());\r\n\r\n input[0].value = othis.data('content') || data[field] || elemCell.text();\r\n othis.find('.'+ELEM_EDIT)[0] || othis.append(input);\r\n input.focus();\r\n e && layui.stope(e);\r\n }\r\n };\r\n\r\n // 单元格编辑 - 输入框内容被改变的事件\r\n that.layBody.on('change', '.'+ ELEM_EDIT, function(){\r\n var othis = $(this);\r\n var td = othis.parent();\r\n var value = this.value;\r\n var field = othis.parent().data('field');\r\n var index = othis.closest('tr').data('index');\r\n var data = table.cache[that.key][index];\r\n\r\n //事件回调的参数对象\r\n var params = commonMember.call(td[0], {\r\n value: value,\r\n field: field,\r\n oldValue: data[field], // 编辑前的值\r\n td: td,\r\n reedit: function(){ // 重新编辑\r\n setTimeout(function(){\r\n // 重新渲染为编辑状态\r\n renderGridEdit(params.td);\r\n\r\n // 将字段缓存的值恢复到编辑之前的值\r\n var obj = {};\r\n obj[field] = params.oldValue;\r\n params.update(obj);\r\n });\r\n },\r\n getCol: function(){ // 获取当前列的表头配置信息\r\n return that.col(td.data('key'));\r\n }\r\n });\r\n\r\n // 更新缓存中的值\r\n var obj = {}; //变更的键值\r\n obj[field] = value;\r\n params.update(obj);\r\n\r\n // 执行 API 编辑事件\r\n layui.event.call(td[0], MOD_NAME, 'edit('+ filter +')', params);\r\n }).on('blur', '.'+ ELEM_EDIT, function(){ // 单元格编辑 - 恢复非编辑状态事件\r\n $(this).remove(); // 移除编辑状态\r\n });\r\n\r\n // 表格主体单元格触发编辑的事件\r\n that.layBody.on(options.editTrigger, 'td', function(e){\r\n renderGridEdit(this, e)\r\n }).on('mouseenter', 'td', function(){\r\n showGridExpandIcon.call(this)\r\n }).on('mouseleave', 'td', function(){\r\n showGridExpandIcon.call(this, 'hide');\r\n });\r\n\r\n // 表格合计栏单元格 hover 显示展开图标\r\n that.layTotal.on('mouseenter', 'td', function(){\r\n showGridExpandIcon.call(this)\r\n }).on('mouseleave', 'td', function(){\r\n showGridExpandIcon.call(this, 'hide');\r\n });\r\n\r\n // 显示单元格展开图标\r\n var ELEM_GRID = 'layui-table-grid';\r\n var ELEM_GRID_DOWN = 'layui-table-grid-down';\r\n var ELEM_GRID_PANEL = 'layui-table-grid-panel';\r\n var showGridExpandIcon = function(hide){\r\n var othis = $(this);\r\n var elemCell = othis.children(ELEM_CELL);\r\n\r\n if(othis.data('off')) return; // 不触发事件\r\n if(othis.parent().hasClass(ELEM_EXPAND)) return; // 是否已为展开状态\r\n\r\n if(hide){\r\n othis.find('.layui-table-grid-down').remove();\r\n } else if((\r\n elemCell.prop('scrollWidth') > elemCell.outerWidth() ||\r\n elemCell.find(\"br\").length > 0\r\n ) && !options.lineStyle){\r\n if(elemCell.find('.'+ ELEM_GRID_DOWN)[0]) return;\r\n othis.append('
                          ');\r\n }\r\n };\r\n // 展开单元格内容\r\n var gridExpand = function(e){\r\n var othis = $(this);\r\n var td = othis.parent();\r\n var key = td.data('key');\r\n var col = that.col(key);\r\n var index = td.parent().data('index');\r\n var elemCell = td.children(ELEM_CELL);\r\n var ELEM_CELL_C = 'layui-table-cell-c';\r\n var elemCellClose = $('');\r\n var expandedMode = col.expandedMode || options.cellExpandedMode;\r\n\r\n // 展开风格\r\n if (expandedMode === 'tips') { // TIPS 展开风格\r\n that.tipsIndex = layer.tips([\r\n '
                          ',\r\n elemCell.html(),\r\n '
                          ',\r\n ''\r\n ].join(''), elemCell[0], {\r\n tips: [3, ''],\r\n time: -1,\r\n anim: -1,\r\n maxWidth: (device.ios || device.android) ? 300 : that.elem.width()/2,\r\n isOutAnim: false,\r\n skin: 'layui-table-tips',\r\n success: function(layero, index){\r\n layero.find('.layui-table-tips-c').on('click', function(){\r\n layer.close(index);\r\n });\r\n }\r\n });\r\n } else { // 多行展开风格\r\n // 恢复其他已经展开的单元格\r\n that.elem.find('.'+ ELEM_CELL_C).trigger('click');\r\n\r\n // 设置当前单元格展开宽度\r\n that.cssRules(key, function(item){\r\n var width = item.style.width;\r\n var expandedWidth = col.expandedWidth || options.cellExpandedWidth;\r\n\r\n // 展开后的宽度不能小于当前宽度\r\n if(expandedWidth < parseFloat(width)) expandedWidth = parseFloat(width);\r\n\r\n elemCellClose.data('cell-width', width);\r\n item.style.width = expandedWidth + 'px';\r\n\r\n setTimeout(function(){\r\n that.scrollPatch(); // 滚动条补丁\r\n });\r\n });\r\n\r\n // 设置当前单元格展开样式\r\n that.setRowActive(index, ELEM_EXPAND);\r\n\r\n // 插入关闭按钮\r\n if(!elemCell.next('.'+ ELEM_CELL_C)[0]){\r\n elemCell.after(elemCellClose);\r\n }\r\n\r\n // 关闭展开状态\r\n elemCellClose.on('click', function(){\r\n var $this = $(this);\r\n that.setRowActive(index, ELEM_EXPAND, true); // 移除单元格展开样式\r\n that.cssRules(key, function(item){\r\n item.style.width = $this.data('cell-width'); // 恢复单元格展开前的宽度\r\n that.resize(); // 滚动条补丁\r\n });\r\n $this.remove();\r\n });\r\n }\r\n\r\n othis.remove();\r\n layui.stope(e);\r\n };\r\n\r\n // 表格主体单元格展开事件\r\n that.layBody.on('click', '.'+ ELEM_GRID_DOWN, function(e){\r\n gridExpand.call(this, e);\r\n });\r\n // 表格合计栏单元格展开事件\r\n that.layTotal.on('click', '.'+ ELEM_GRID_DOWN, function(e){\r\n gridExpand.call(this, e);\r\n });\r\n\r\n // 行工具条操作事件\r\n var toolFn = function(type){\r\n var othis = $(this);\r\n var td = othis.closest('td');\r\n var index = othis.parents('tr').eq(0).data('index');\r\n // 标记当前活动行\r\n that.setRowActive(index);\r\n\r\n // 执行事件\r\n layui.event.call(\r\n this,\r\n MOD_NAME,\r\n (type || 'tool') + '('+ filter +')',\r\n commonMember.call(this, {\r\n event: othis.attr('lay-event'),\r\n getCol: function(){ // 获取当前列的表头配置信息\r\n return that.col(td.data('key'));\r\n }\r\n })\r\n );\r\n };\r\n\r\n // 行工具条单击事件\r\n that.layBody.on('click', '*[lay-event]', function(e){\r\n toolFn.call(this);\r\n layui.stope(e);\r\n }).on('dblclick', '*[lay-event]', function(e){ //行工具条双击事件\r\n toolFn.call(this, 'toolDouble');\r\n layui.stope(e);\r\n });\r\n\r\n // 同步滚动条\r\n that.layMain.on('scroll', function(){\r\n var othis = $(this);\r\n var scrollLeft = othis.scrollLeft();\r\n var scrollTop = othis.scrollTop();\r\n\r\n that.layHeader.scrollLeft(scrollLeft);\r\n that.layTotal.scrollLeft(scrollLeft);\r\n that.layFixed.find(ELEM_BODY).scrollTop(scrollTop);\r\n\r\n layer.close(that.tipsIndex);\r\n });\r\n };\r\n\r\n // 全局事件\r\n (function(){\r\n // 自适应尺寸\r\n _WIN.on('resize', function(){\r\n layui.each(thisTable.that, function(){\r\n this.resize();\r\n });\r\n });\r\n\r\n // 全局点击\r\n _DOC.on('click', function(){\r\n _DOC.trigger('table.remove.tool.panel');\r\n });\r\n\r\n // 工具面板移除事件\r\n _DOC.on('table.remove.tool.panel', function(){\r\n $('.' + ELEM_TOOL_PANEL).remove();\r\n });\r\n })();\r\n\r\n // 初始化\r\n table.init = function(filter, settings){\r\n settings = settings || {};\r\n var that = this;\r\n var inst = null;\r\n var elemTable = typeof filter === 'object' ? filter : (\r\n typeof filter === 'string'\r\n ? $('table[lay-filter=\"'+ filter +'\"]')\r\n : $(ELEM + '[lay-data], '+ ELEM + '[lay-options]')\r\n );\r\n var errorTips = 'Table element property lay-data configuration item has a syntax error: ';\r\n\r\n //遍历数据表格\r\n elemTable.each(function(){\r\n var othis = $(this);\r\n var attrData = othis.attr('lay-data');\r\n var tableData = lay.options(this, {\r\n attr: attrData ? 'lay-data' : null,\r\n errorText: errorTips + (attrData || othis.attr('lay-options'))\r\n });\r\n\r\n var options = $.extend({\r\n elem: this\r\n ,cols: []\r\n ,data: []\r\n ,skin: othis.attr('lay-skin') //风格\r\n ,size: othis.attr('lay-size') //尺寸\r\n ,even: typeof othis.attr('lay-even') === 'string' //偶数行背景\r\n }, table.config, settings, tableData);\r\n\r\n filter && othis.hide();\r\n\r\n //获取表头数据\r\n othis.find('thead>tr').each(function(i){\r\n options.cols[i] = [];\r\n $(this).children().each(function(ii){\r\n var th = $(this);\r\n var attrData = th.attr('lay-data');\r\n var itemData = lay.options(this, {\r\n attr: attrData ? 'lay-data' : null,\r\n errorText: errorTips + (attrData || th.attr('lay-options'))\r\n });\r\n\r\n var row = $.extend({\r\n title: th.text()\r\n ,colspan: parseInt(th.attr('colspan')) || 1 //列单元格\r\n ,rowspan: parseInt(th.attr('rowspan')) || 1 //行单元格\r\n }, itemData);\r\n\r\n options.cols[i].push(row);\r\n });\r\n });\r\n\r\n //缓存静态表体数据\r\n var trElem = othis.find('tbody>tr');\r\n\r\n //执行渲染\r\n var tableIns = table.render(options);\r\n\r\n //获取表体数据\r\n if (trElem.length && !settings.data && !tableIns.config.url) {\r\n var tdIndex = 0;\r\n table.eachCols(tableIns.config.id, function (i3, item3) {\r\n trElem.each(function(i1){\r\n options.data[i1] = options.data[i1] || {};\r\n var tr = $(this);\r\n var field = item3.field;\r\n options.data[i1][field] = tr.children('td').eq(tdIndex).html();\r\n });\r\n tdIndex++;\r\n })\r\n\r\n tableIns.reloadData({\r\n data: options.data\r\n });\r\n }\r\n });\r\n\r\n return that;\r\n };\r\n\r\n //记录所有实例\r\n thisTable.that = {}; //记录所有实例对象\r\n thisTable.config = {}; //记录所有实例配置项\r\n\r\n var eachChildCols = function (index, cols, i1, item2) {\r\n //如果是组合列,则捕获对应的子列\r\n if (item2.colGroup) {\r\n var childIndex = 0;\r\n index++;\r\n item2.CHILD_COLS = [];\r\n // 找到它的子列所在cols的下标\r\n var i2 = i1 + (parseInt(item2.rowspan) || 1);\r\n layui.each(cols[i2], function (i22, item22) {\r\n if (item22.parentKey) { // 如果字段信息中包含了parentKey和key信息\r\n if (item22.parentKey === item2.key) {\r\n item22.PARENT_COL_INDEX = index;\r\n item2.CHILD_COLS.push(item22);\r\n eachChildCols(index, cols, i2, item22);\r\n }\r\n } else {\r\n // 没有key信息以colspan数量所谓判断标准\r\n //如果子列已经被标注为{PARENT_COL_INDEX},或者子列累计 colspan 数等于父列定义的 colspan,则跳出当前子列循环\r\n if (item22.PARENT_COL_INDEX || (childIndex >= 1 && childIndex == (item2.colspan || 1))) return;\r\n item22.PARENT_COL_INDEX = index;\r\n item2.CHILD_COLS.push(item22);\r\n childIndex = childIndex + (parseInt(item22.colspan > 1 ? item22.colspan : 1));\r\n eachChildCols(index, cols, i2, item22);\r\n }\r\n });\r\n }\r\n };\r\n\r\n // 遍历表头\r\n table.eachCols = function(id, callback, cols){\r\n var config = thisTable.config[id] || {};\r\n var arrs = [], index = 0;\r\n\r\n cols = $.extend(true, [], cols || config.cols);\r\n\r\n //重新整理表头结构\r\n layui.each(cols, function(i1, item1){\r\n if (i1) return true; // 只需遍历第一层\r\n layui.each(item1, function(i2, item2){\r\n eachChildCols(index, cols, i1, item2);\r\n if(item2.PARENT_COL_INDEX) return; //如果是子列,则不进行追加,因为已经存储在父列中\r\n arrs.push(item2)\r\n });\r\n });\r\n\r\n //重新遍历列,如果有子列,则进入递归\r\n var eachArrs = function(obj){\r\n layui.each(obj || arrs, function(i, item){\r\n if(item.CHILD_COLS) return eachArrs(item.CHILD_COLS);\r\n typeof callback === 'function' && callback(i, item);\r\n });\r\n };\r\n\r\n eachArrs();\r\n };\r\n\r\n // 获取表格选中状态\r\n table.checkStatus = function(id){\r\n var nums = 0;\r\n var invalidNum = 0;\r\n var arr = [];\r\n var data = table.cache[id] || [];\r\n\r\n //计算全选个数\r\n layui.each(data, function(i, item){\r\n if(layui.type(item) === 'array' || item[table.config.disabledName]){\r\n invalidNum++; // 无效数据,或已删除的\r\n return;\r\n }\r\n if(item[table.config.checkName]){\r\n nums++;\r\n if(!item[table.config.disabledName]){\r\n arr.push(table.clearCacheKey(item));\r\n }\r\n }\r\n });\r\n return {\r\n data: arr, // 选中的数据\r\n isAll: data.length ? (nums === (data.length - invalidNum)) : false // 是否全选\r\n };\r\n };\r\n\r\n // 设置行选中状态\r\n table.setRowChecked = function(id, opts){\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n that.setRowChecked(opts);\r\n };\r\n\r\n // 获取表格当前页的所有行数据\r\n table.getData = function(id){\r\n var arr = [];\r\n var data = table.cache[id] || [];\r\n layui.each(data, function(i, item){\r\n if(layui.type(item) === 'array'){\r\n return;\r\n }\r\n arr.push(table.clearCacheKey(item));\r\n });\r\n return arr;\r\n };\r\n\r\n // 重置表格尺寸结构\r\n table.resize = function(id){\r\n // 若指定表格唯一 id,则只执行该 id 对应的表格实例\r\n if(id){\r\n var config = getThisTableConfig(id); // 获取当前实例配置项\r\n if(!config) return;\r\n\r\n getThisTable(id).resize();\r\n\r\n } else { // 否则重置所有表格实例尺寸\r\n layui.each(thisTable.that, function(){\r\n this.resize();\r\n });\r\n }\r\n };\r\n\r\n // 表格导出\r\n table.exportFile = function(id, data, opts){\r\n data = data || table.clearCacheKey(table.cache[id]);\r\n opts = typeof opts === 'object' ? opts : function(){\r\n var obj = {};\r\n opts && (obj.type = opts);\r\n return obj;\r\n }();\r\n\r\n var type = opts.type || 'csv';\r\n var thatTable = thisTable.that[id];\r\n var config = thisTable.config[id] || {};\r\n var textType = ({\r\n csv: 'text/csv',\r\n xls: 'application/vnd.ms-excel'\r\n })[type];\r\n var alink = document.createElement(\"a\");\r\n\r\n if(device.ie) return hint.error('IE_NOT_SUPPORT_EXPORTS');\r\n\r\n // 处理 treeTable 数据\r\n if (config.tree && config.tree.view) {\r\n try {\r\n data = $.extend(true, [], table.cache[id]);\r\n data = (function fn(data) {\r\n return data.reduce(function (acc, obj){\r\n var children = obj.children || [];\r\n delete obj.children;\r\n return acc.concat(obj, fn(children));\r\n }, []);\r\n })(Array.from(data));\r\n } catch (e) {}\r\n }\r\n\r\n alink.href = 'data:'+ textType +';charset=utf-8,\\ufeff'+ encodeURIComponent(function(){\r\n var dataTitle = [];\r\n var dataMain = [];\r\n var dataTotal = [];\r\n var fieldsIsHide = {};\r\n\r\n // 表头和表体\r\n layui.each(data, function(i1, item1){\r\n var vals = [];\r\n if(typeof id === 'object'){ // 若 id 参数直接为表头数据\r\n layui.each(id, function(i, item){\r\n i1 == 0 && dataTitle.push(item || '');\r\n });\r\n layui.each(layui.isArray(item1) ? $.extend([], item1) : table.clearCacheKey(item1), function(i2, item2){\r\n vals.push('\"'+ (item2 || '') +'\"');\r\n });\r\n } else {\r\n table.eachCols(id, function(i3, item3){\r\n if(item3.ignoreExport === false || item3.field && item3.type == 'normal'){\r\n // 不导出隐藏列,除非设置 ignoreExport 强制导出\r\n if (\r\n (item3.hide && item3.ignoreExport !== false) ||\r\n item3.ignoreExport === true // 忽略导出\r\n ) {\r\n if(i1 == 0) fieldsIsHide[item3.field] = true; // 记录隐藏列\r\n return;\r\n }\r\n\r\n var content = item1[item3.field];\r\n if(content === undefined || content === null) content = '';\r\n\r\n i1 == 0 && dataTitle.push(item3.fieldTitle || item3.title || item3.field || '');\r\n\r\n // 解析内容\r\n content = parseTempData.call(thatTable, {\r\n item3: item3,\r\n content: content,\r\n tplData: item1,\r\n text: 'text',\r\n obj: {\r\n td: function(field){\r\n var td = thatTable.layBody.find('tr[data-index=\"'+ i1 +'\"]>td');\r\n return td.filter('[data-field=\"'+ field +'\"]');\r\n }\r\n }\r\n });\r\n\r\n // 异常处理\r\n content = content.replace(/\"/g, '\"\"'); // 避免内容存在「双引号」导致异常分隔\r\n // content += '\\t'; // 加「水平制表符」 避免内容被转换格式\r\n content = '\"'+ content +'\"'; // 避免内容存在「逗号」导致异常分隔\r\n\r\n // 插入内容\r\n vals.push(content);\r\n }\r\n });\r\n }\r\n dataMain.push(vals.join(','));\r\n });\r\n\r\n // 表合计\r\n thatTable && layui.each(thatTable.dataTotal, function(i, o){\r\n fieldsIsHide[o.field] || dataTotal.push('\"' + (o.total || '') + '\"');\r\n });\r\n\r\n return dataTitle.join(',') + '\\r\\n' + dataMain.join('\\r\\n') + '\\r\\n' + dataTotal.join(',');\r\n }());\r\n\r\n alink.download = (opts.title || config.title || 'table_'+ (config.index || '')) + '.' + type;\r\n document.body.appendChild(alink);\r\n alink.click();\r\n document.body.removeChild(alink);\r\n };\r\n\r\n // 获取表格配置信息\r\n table.getOptions = function (id) {\r\n return getThisTableConfig(id);\r\n }\r\n\r\n // 显示或隐藏列\r\n table.hideCol = function (id, cols) {\r\n var that = getThisTable(id);\r\n if (!that) {\r\n return;\r\n }\r\n\r\n if (layui.type(cols) === 'boolean') {\r\n // 显示全部或者隐藏全部\r\n that.eachCols(function (i2, item2) {\r\n var key = item2.key;\r\n var col = that.col(key);\r\n var parentKey = item2.parentKey;\r\n // 同步勾选列的 hide 值和隐藏样式\r\n if (col.hide != cols) {\r\n var hide = col.hide = cols;\r\n that.elem.find('*[data-key=\"'+ key +'\"]')[\r\n hide ? 'addClass' : 'removeClass'\r\n ](HIDE);\r\n // 根据列的显示隐藏,同步多级表头的父级相关属性值\r\n that.setParentCol(hide, parentKey);\r\n }\r\n })\r\n } else {\r\n cols = layui.isArray(cols) ? cols : [cols];\r\n layui.each(cols, function (i1, item1) {\r\n that.eachCols(function (i2, item2) {\r\n if (item1.field === item2.field) {\r\n var key = item2.key;\r\n var col = that.col(key);\r\n var parentKey = item2.parentKey;\r\n // 同步勾选列的 hide 值和隐藏样式\r\n if ('hide' in item1 && col.hide != item1.hide) {\r\n var hide = col.hide = !!item1.hide;\r\n that.elem.find('*[data-key=\"'+ key +'\"]')[\r\n hide ? 'addClass' : 'removeClass'\r\n ](HIDE);\r\n // 根据列的显示隐藏,同步多级表头的父级相关属性值\r\n that.setParentCol(hide, parentKey);\r\n }\r\n }\r\n })\r\n });\r\n }\r\n $('.' + ELEM_TOOL_PANEL).remove(); // 关闭字段筛选面板如果打开的话\r\n // 重新适配尺寸\r\n that.resize();\r\n }\r\n\r\n // 重载\r\n table.reload = function(id, options, deep, type){\r\n var config = getThisTableConfig(id); //获取当前实例配置项\r\n if(!config) return;\r\n\r\n var that = getThisTable(id);\r\n that.reload(options, deep, type);\r\n\r\n return thisTable.call(that);\r\n };\r\n\r\n // 仅重载数据\r\n table.reloadData = function(){\r\n var args = $.extend([], arguments);\r\n args[3] = 'reloadData';\r\n\r\n // 重载时,影响整个结构的参数,不适合更新的参数\r\n var dataParams = new RegExp('^('+ [\r\n 'elem', 'id', 'cols', 'width', 'height', 'maxHeight',\r\n 'toolbar', 'defaultToolbar',\r\n 'className', 'css', 'pagebar'\r\n ].join('|') + ')$');\r\n\r\n // 过滤与数据无关的参数\r\n layui.each(args[1], function (key, value) {\r\n if(dataParams.test(key)){\r\n delete args[1][key];\r\n }\r\n });\r\n\r\n return table.reload.apply(null, args);\r\n };\r\n\r\n // 核心入口\r\n table.render = function(options){\r\n var inst = new Class(options);\r\n return thisTable.call(inst);\r\n };\r\n\r\n // 清除临时 Key\r\n table.clearCacheKey = function(data){\r\n data = $.extend({}, data);\r\n delete data[table.config.checkName];\r\n delete data[table.config.indexName];\r\n delete data[table.config.numbersName];\r\n delete data[table.config.disabledName];\r\n return data;\r\n };\r\n\r\n // 自动完成渲染\r\n $(function(){\r\n table.init();\r\n });\r\n\r\n exports(MOD_NAME, table);\r\n});\r\n","/**\r\n * layui.treeTable\r\n * 树表组件\r\n */\r\n\r\nlayui.define(['table'], function (exports) {\r\n \"use strict\";\r\n\r\n var $ = layui.$;\r\n var form = layui.form;\r\n var table = layui.table;\r\n var hint = layui.hint();\r\n\r\n // api\r\n var treeTable = {\r\n config: {},\r\n // 事件\r\n on: table.on,\r\n // 遍历字段\r\n eachCols: table.eachCols,\r\n index: table.index,\r\n set: function (options) {\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n resize: table.resize,\r\n getOptions: table.getOptions,\r\n hideCol: table.hideCol,\r\n renderData: table.renderData\r\n };\r\n\r\n // 操作当前实例\r\n var thisTreeTable = function () {\r\n var that = this;\r\n var options = that.config\r\n var id = options.id || options.index;\r\n\r\n return {\r\n config: options,\r\n reload: function (options, deep) {\r\n that.reload.call(that, options, deep);\r\n },\r\n reloadData: function (options, deep) {\r\n treeTable.reloadData(id, options, deep);\r\n }\r\n }\r\n }\r\n\r\n // 获取当前实例\r\n var getThisTable = function (id) {\r\n var that = thisTreeTable.that[id];\r\n if (!that) hint.error(id ? ('The treeTable instance with ID \\'' + id + '\\' not found') : 'ID argument required');\r\n return that || null;\r\n }\r\n\r\n // 字符\r\n var MOD_NAME = 'treeTable';\r\n var HIDE = 'layui-hide';\r\n\r\n var ELEM_VIEW = '.layui-table-view';\r\n var ELEM_TREE = '.layui-table-tree';\r\n var ELEM_TOOL = '.layui-table-tool';\r\n var ELEM_BOX = '.layui-table-box';\r\n var ELEM_HEADER = '.layui-table-header';\r\n var ELEM_BODY = '.layui-table-body';\r\n var ELEM_MAIN = '.layui-table-main';\r\n var ELEM_FIXED = '.layui-table-fixed';\r\n var ELEM_FIXL = '.layui-table-fixed-l';\r\n var ELEM_FIXR = '.layui-table-fixed-r';\r\n var ELEM_CHECKED = 'layui-table-checked';\r\n\r\n var TABLE_TREE = 'layui-table-tree';\r\n var LAY_DATA_INDEX = 'LAY_DATA_INDEX';\r\n var LAY_DATA_INDEX_HISTORY = 'LAY_DATA_INDEX_HISTORY';\r\n var LAY_PARENT_INDEX = 'LAY_PARENT_INDEX';\r\n var LAY_CHECKBOX_HALF = 'LAY_CHECKBOX_HALF';\r\n var LAY_EXPAND = 'LAY_EXPAND';\r\n var LAY_HAS_EXPANDED = 'LAY_HAS_EXPANDED';\r\n var LAY_ASYNC_STATUS = 'LAY_ASYNC_STATUS';\r\n var LAY_CASCADE = ['all', 'parent', 'children', 'none'];\r\n\r\n // 构造器\r\n var Class = function (options) {\r\n var that = this;\r\n that.index = ++treeTable.index;\r\n that.config = $.extend(true, {}, that.config, treeTable.config, options);\r\n // 处理一些属性\r\n that.init();\r\n that.render();\r\n };\r\n\r\n var updateCache = function (id, childrenKey, data) {\r\n var tableCache = table.cache[id];\r\n layui.each(data || tableCache, function (index, item) {\r\n var itemDataIndex = item[LAY_DATA_INDEX];\r\n if (itemDataIndex.indexOf('-') !== -1) {\r\n tableCache[itemDataIndex] = item\r\n }\r\n item[childrenKey] && updateCache(id, childrenKey, item[childrenKey]);\r\n })\r\n }\r\n\r\n var updateOptions = function (id, options, reload) {\r\n var that = getThisTable(id);\r\n reload === 'reloadData' || (that.status = { // 用于记录一些状态信息\r\n expand: {} // 折叠状态\r\n });\r\n var thatOptionsTemp = $.extend(true, {}, that.getOptions(), options);\r\n var treeOptions = thatOptionsTemp.tree;\r\n var childrenKey = treeOptions.customName.children;\r\n var idKey = treeOptions.customName.id;\r\n // 处理属性\r\n delete options.hasNumberCol;\r\n delete options.hasChecboxCol;\r\n delete options.hasRadioCol;\r\n table.eachCols(null, function (i1, item1) {\r\n if (item1.type === 'numbers') {\r\n options.hasNumberCol = true;\r\n } else if (item1.type === 'checkbox') {\r\n options.hasChecboxCol = true;\r\n } else if (item1.type === 'radio') {\r\n options.hasRadioCol = true;\r\n }\r\n }, thatOptionsTemp.cols)\r\n\r\n var parseData = options.parseData;\r\n var done = options.done;\r\n\r\n if (thatOptionsTemp.url) {\r\n // 异步加载的时候需要处理parseData进行转换\r\n if (!reload || (reload && parseData && !parseData.mod)) {\r\n options.parseData = function () {\r\n var parseDataThat = this;\r\n var args = arguments;\r\n var retData = args[0];\r\n if (layui.type(parseData) === 'function') {\r\n retData = parseData.apply(parseDataThat, args) || args[0];\r\n }\r\n var dataName = parseDataThat.response.dataName;\r\n // 处理 isSimpleData\r\n if (treeOptions.data.isSimpleData && !treeOptions.async.enable) { // 异步加载和 isSimpleData 不应该一起使用\r\n retData[dataName] = that.flatToTree(retData[dataName]);\r\n }\r\n // 处理节点状态\r\n updateStatus(retData[dataName], function (item) {\r\n item[LAY_EXPAND] = LAY_EXPAND in item ? item[LAY_EXPAND] : (item[idKey] !== undefined && that.status.expand[item[idKey]])\r\n }, childrenKey);\r\n\r\n if (parseDataThat.autoSort && parseDataThat.initSort && parseDataThat.initSort.type) {\r\n layui.sort(retData[dataName], parseDataThat.initSort.field, parseDataThat.initSort.type === 'desc', true)\r\n }\r\n\r\n that.initData(retData[dataName]);\r\n\r\n return retData;\r\n }\r\n options.parseData.mod = true\r\n }\r\n } else {\r\n options.data = options.data || [];\r\n // 处理 isSimpleData\r\n if (treeOptions.data.isSimpleData) {\r\n options.data = that.flatToTree(options.data);\r\n }\r\n that.initData(options.data);\r\n }\r\n\r\n if (!reload || (reload && done && !done.mod)) {\r\n options.done = function () {\r\n var args = arguments;\r\n var doneThat = this;\r\n var isRenderData = args[3]; // 是否是 renderData\r\n if (!isRenderData) {\r\n delete that.isExpandAll;\r\n }\r\n\r\n var tableView = this.elem.next();\r\n that.updateStatus(null, {\r\n LAY_HAS_EXPANDED: false // 去除已经打开过的状态\r\n });\r\n // 更新cache中的内容 将子节点也存到cache中\r\n updateCache(id, childrenKey);\r\n // 更新全选框的状态\r\n var layTableAllChooseElem = tableView.find('[name=\"layTableCheckbox\"][lay-filter=\"layTableAllChoose\"]');\r\n if (layTableAllChooseElem.length) {\r\n var checkStatus = treeTable.checkStatus(id);\r\n layTableAllChooseElem.prop({\r\n checked: checkStatus.isAll && checkStatus.data.length,\r\n indeterminate: !checkStatus.isAll && checkStatus.data.length\r\n })\r\n }\r\n if (!isRenderData && thatOptionsTemp.autoSort && thatOptionsTemp.initSort && thatOptionsTemp.initSort.type) {\r\n treeTable.sort(id);\r\n }\r\n\r\n that.renderTreeTable(tableView);\r\n\r\n if (layui.type(done) === 'function') {\r\n return done.apply(doneThat, args);\r\n }\r\n }\r\n options.done.mod = true;\r\n }\r\n }\r\n\r\n Class.prototype.init = function () {\r\n var that = this;\r\n var options = that.config;\r\n var cascade = options.tree.data.cascade;\r\n if (LAY_CASCADE.indexOf(cascade) === -1) {\r\n options.tree.data.cascade = 'all'; // 超出范围的都重置为全联动\r\n }\r\n\r\n // 先初始一个空的表格以便拿到对应的表格实例信息\r\n var tableIns = table.render($.extend({}, options, {\r\n data: [],\r\n url: '',\r\n done: null\r\n }))\r\n var id = tableIns.config.id;\r\n thisTreeTable.that[id] = that; // 记录当前实例对象\r\n that.tableIns = tableIns;\r\n\r\n updateOptions(id, options);\r\n }\r\n\r\n // 初始默认配置\r\n Class.prototype.config = {\r\n tree: {\r\n customName: {\r\n children: \"children\", // 节点数据中保存子节点数据的属性名称\r\n isParent: \"isParent\", // 节点数据保存节点是否为父节点的属性名称\r\n name: \"name\", // 节点数据保存节点名称的属性名称\r\n id: \"id\", // 唯一标识的属性名称\r\n pid: \"parentId\", // 父节点唯一标识的属性名称\r\n icon: \"icon\" // 图标的属性名称\r\n },\r\n view: {\r\n indent: 14, // 层级缩进量\r\n flexIconClose: '', // 关闭时候的折叠图标\r\n flexIconOpen: '', // 打开时候的折叠图标\r\n showIcon: true, // 是否显示图标(节点类型图标)\r\n icon: '', // 节点图标,如果设置了这个属性或者数据中有这个字段信息,不管打开还是关闭都以这个图标的值为准\r\n iconClose: '', // 关闭时候的图标\r\n iconOpen: '', // 打开时候的图标\r\n iconLeaf: '', // 叶子节点的图标\r\n showFlexIconIfNotParent: false, // 当节点不是父节点的时候是否显示折叠图标\r\n dblClickExpand: true, // 双击节点时,是否自动展开父节点的标识\r\n expandAllDefault: false // 默认展开所有节点\r\n },\r\n data: {\r\n isSimpleData: false, // 是否简单数据模式\r\n rootPid: null, // 根节点的父 ID 值\r\n cascade: 'all' // 级联方式 默认全部级联:all 可选 级联父 parent 级联子 children\r\n },\r\n async: {\r\n enable: false, // 是否开启异步加载模式,只有开启的时候其他参数才起作用\r\n url: '', // 异步加载的接口,可以根据需要设置与顶层接口不同的接口,如果相同可以不设置该参数\r\n type: null, // 请求的接口类型,设置可缺省同上\r\n contentType: null, // 提交参数的数据类型,设置可缺省同上\r\n headers: null, // 设置可缺省同上\r\n where: null, // 设置可缺省同上\r\n autoParam: [] // 自动参数\r\n },\r\n callback: {\r\n beforeExpand: null, // 展开前的回调 return false 可以阻止展开的动作\r\n onExpand: null // 展开之后的回调\r\n }\r\n },\r\n };\r\n\r\n Class.prototype.getOptions = function () {\r\n var that = this;\r\n if (that.tableIns) {\r\n return table.getOptions(that.tableIns.config.id); // 获取表格的实时配置信息\r\n } else {\r\n return that.config;\r\n }\r\n };\r\n\r\n function flatToTree(flatArr, idKey, pIdKey, childrenKey, rootPid) {\r\n idKey = idKey || 'id';\r\n pIdKey = pIdKey || 'parentId';\r\n childrenKey = childrenKey || 'children';\r\n // 创建一个空的 nodes 对象,用于保存所有的节点\r\n var nodes = {};\r\n // 遍历所有节点,将其加入 nodes 对象中\r\n var idTemp = '';\r\n layui.each(flatArr, function (index, item) {\r\n idTemp = idKey + item[idKey];\r\n nodes[idTemp] = $.extend({}, item);\r\n nodes[idTemp][childrenKey] = [];\r\n })\r\n // 遍历所有节点,将其父子关系加入 nodes 对象\r\n var pidTemp = '';\r\n layui.each(nodes, function (index, item) {\r\n pidTemp = idKey + item[pIdKey];\r\n if (pidTemp && nodes[pidTemp]) {\r\n nodes[pidTemp][childrenKey].push(item);\r\n }\r\n })\r\n // 返回顶层节点\r\n return Object.keys(nodes)\r\n .map(function(k) {\r\n return nodes[k];\r\n })\r\n .filter(function (item) {\r\n return rootPid ? item[pIdKey] === rootPid : !item[pIdKey];\r\n })\r\n }\r\n\r\n Class.prototype.flatToTree = function (tableData) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var customName = treeOptions.customName;\r\n var tableId = options.id;\r\n\r\n tableData = tableData || table.cache[tableId];\r\n\r\n return flatToTree(tableData, customName.id, customName.pid, customName.children, treeOptions.data.rootPid)\r\n }\r\n\r\n Class.prototype.treeToFlat = function (tableData, parentId, parentIndex) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var customName = treeOptions.customName;\r\n var childrenKey = customName.children;\r\n var pIdKey = customName.pid;\r\n\r\n var flat = [];\r\n layui.each(tableData, function (i1, item1) {\r\n var dataIndex = (parentIndex ? parentIndex + '-' : '') + i1;\r\n var dataNew = $.extend({}, item1);\r\n dataNew[pIdKey] = item1[pIdKey] || parentId;\r\n flat.push(dataNew);\r\n flat = flat.concat(that.treeToFlat(item1[childrenKey], item1[customName.id], dataIndex));\r\n });\r\n\r\n return flat;\r\n }\r\n\r\n // 通过当前行数据返回 treeNode 信息\r\n Class.prototype.getTreeNode = function (data) {\r\n var that = this;\r\n if (!data) {\r\n return hint.error('找不到节点数据');\r\n }\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableId = options.id;\r\n var customName = treeOptions.customName;\r\n\r\n // 带上一些常用的方法\r\n return {\r\n data: data,\r\n dataIndex: data[LAY_DATA_INDEX],\r\n getParentNode: function () {\r\n return that.getNodeByIndex(data[LAY_PARENT_INDEX])\r\n },\r\n };\r\n }\r\n\r\n // 通过 index 返回节点信息\r\n Class.prototype.getNodeByIndex = function (index) {\r\n var that = this;\r\n var treeNodeData = that.getNodeDataByIndex(index);\r\n if (!treeNodeData) {\r\n return hint.error('找不到节点数据');\r\n }\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var customName = treeOptions.customName;\r\n var parentKey = customName.parent;\r\n var tableId = options.id;\r\n\r\n var treeNode = {\r\n data: treeNodeData,\r\n dataIndex: treeNodeData[LAY_DATA_INDEX],\r\n getParentNode: function () {\r\n return that.getNodeByIndex(treeNodeData[LAY_PARENT_INDEX])\r\n },\r\n update: function (data) {\r\n return treeTable.updateNode(tableId, index, data)\r\n },\r\n remove: function () {\r\n return treeTable.removeNode(tableId, index)\r\n },\r\n expand: function (opts) {\r\n return treeTable.expandNode(tableId, $.extend({}, opts, {\r\n index: index\r\n }))\r\n },\r\n setChecked: function (opts) {\r\n return treeTable.setRowChecked(tableId, $.extend({}, opts, {\r\n index: index\r\n }))\r\n }\r\n };\r\n\r\n treeNode.dataIndex = index;\r\n return treeNode;\r\n }\r\n\r\n // 通过 id 获取节点信息\r\n Class.prototype.getNodeById = function (id) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var customName = treeOptions.customName;\r\n var idKey = customName.id;\r\n\r\n // 通过 id 拿到数据的 dataIndex\r\n var dataIndex = '';\r\n var tableDataFlat = treeTable.getData(options.id, true);\r\n layui.each(tableDataFlat, function (i1, item1) {\r\n if (item1[idKey] === id) {\r\n dataIndex = item1[LAY_DATA_INDEX];\r\n return true;\r\n }\r\n })\r\n if (!dataIndex) {\r\n return;\r\n }\r\n\r\n // 用 index\r\n return that.getNodeByIndex(dataIndex);\r\n }\r\n\r\n // 通过 index 获取节点数据\r\n Class.prototype.getNodeDataByIndex = function (index, clone, newValue) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableId = options.id;\r\n var tableCache = table.cache[tableId];\r\n\r\n // 获取当前行中的数据\r\n var dataCache = tableCache[index];\r\n\r\n // 若非删除操作,则返回合并后的数据\r\n if (newValue !== 'delete' && dataCache) {\r\n $.extend(dataCache, newValue);\r\n return clone ? $.extend({}, dataCache) : dataCache;\r\n }\r\n\r\n // 删除操作\r\n var dataRet = tableCache;\r\n var indexArr = String(index).split('-');\r\n\r\n // if (options.url || indexArr.length > 1) tableCache = null // 只有在删除根节点的时候才需要处理\r\n\r\n // 根据 index 进行数据处理\r\n for (var i = 0, childrenKey = treeOptions.customName.children; i < indexArr.length; i++) {\r\n if (newValue && i === indexArr.length - 1) {\r\n if (newValue === 'delete') { // 删除并返回当前数据\r\n // 同步 cache --- 此段代码注释缘由:data 属性模式造成数据重复执行 splice (@Gitee: #I7Z0A/I82E2S)\r\n /*if (tableCache) {\r\n layui.each(tableCache, function (i1, item1) {\r\n if (item1[LAY_DATA_INDEX] === index) {\r\n tableCache.splice(i1, 1);\r\n return true;\r\n }\r\n })\r\n }*/\r\n return (i ? dataRet[childrenKey] : dataRet).splice(indexArr[i], 1)[0];\r\n } else { // 更新值\r\n $.extend((i ? dataRet[childrenKey] : dataRet)[indexArr[i]], newValue);\r\n }\r\n }\r\n dataRet = i ? dataRet[childrenKey][indexArr[i]] : dataRet[indexArr[i]];\r\n }\r\n return clone ? $.extend({}, dataRet) : dataRet;\r\n }\r\n\r\n treeTable.getNodeDataByIndex = function (id, index) {\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n return that.getNodeDataByIndex(index, true);\r\n }\r\n\r\n // 判断是否是父节点\r\n var checkIsParent = function (data, isParentKey, childrenKey) {\r\n isParentKey = isParentKey || 'isParent';\r\n childrenKey = childrenKey || 'children';\r\n layui.each(data, function (i1, item1) {\r\n if (!(isParentKey in item1)) {\r\n item1[isParentKey] = !!(item1[childrenKey] && item1[childrenKey].length);\r\n checkIsParent(item1[childrenKey]);\r\n }\r\n })\r\n }\r\n\r\n Class.prototype.initData = function (data, parentIndex) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableId = options.id;\r\n\r\n data = data || that.getTableData();\r\n\r\n var customName = treeOptions.customName;\r\n var isParentKey = customName.isParent;\r\n var childrenKey = customName.children;\r\n\r\n layui.each(data, function (i1, item1) {\r\n if (!(isParentKey in item1)) {\r\n item1[isParentKey] = !!(item1[childrenKey] && item1[childrenKey].length);\r\n }\r\n item1[LAY_DATA_INDEX_HISTORY] = item1[LAY_DATA_INDEX];\r\n item1[LAY_PARENT_INDEX] = parentIndex = parentIndex || '';\r\n var dataIndex = item1[LAY_DATA_INDEX] = (parentIndex ? parentIndex + '-' : '') + i1;\r\n that.initData(item1[childrenKey] || [], dataIndex);\r\n });\r\n\r\n updateCache(tableId, childrenKey, data);\r\n\r\n return data;\r\n }\r\n\r\n // 与 tableId 有关带防抖的方法\r\n var debounceFn = (function () {\r\n var fn = {};\r\n return function (tableId, func, wait) {\r\n if (!fn[tableId]) {\r\n fn[tableId] = layui.debounce(func, wait);\r\n }\r\n return fn[tableId];\r\n }\r\n })()\r\n\r\n // 优化参数,添加一个 getNodeByIndex 方法 只传 表格id 和行 dataIndex 分几步优化 todo\r\n var expandNode = function (treeNode, expandFlag, sonSign, focus, callbackFlag) {\r\n // treeNode // 需要展开的节点\r\n var trElem = treeNode.trElem;\r\n var tableViewElem = treeNode.tableViewElem || trElem.closest(ELEM_VIEW);\r\n var tableId = treeNode.tableId || tableViewElem.attr('lay-id');\r\n var options = treeNode.options || table.getOptions(tableId);\r\n var dataIndex = treeNode.dataIndex || trElem.attr('lay-data-index'); // 可能出现多层\r\n var treeTableThat = getThisTable(tableId);\r\n\r\n var treeOptions = options.tree || {};\r\n var customName = treeOptions.customName || {};\r\n var isParentKey = customName.isParent;\r\n\r\n var trData = treeTableThat.getNodeDataByIndex(dataIndex);\r\n\r\n // 后续调优:对已经展开的节点进行展开和已经关闭的节点进行关闭应该做优化减少不必要的代码执行 todo\r\n var isToggle = layui.type(expandFlag) !== 'boolean';\r\n var trExpand = isToggle ? !trData[LAY_EXPAND] : expandFlag;\r\n var retValue = trData[isParentKey] ? trExpand : null;\r\n\r\n if (callbackFlag && trExpand != trData[LAY_EXPAND] && (!trData[LAY_ASYNC_STATUS] || trData[LAY_ASYNC_STATUS] === 'local')) {\r\n var beforeExpand = treeOptions.callback.beforeExpand;\r\n if (layui.type(beforeExpand) === 'function') {\r\n if (beforeExpand(tableId, trData, expandFlag) === false) {\r\n return retValue;\r\n }\r\n }\r\n }\r\n\r\n var trExpanded = trData[LAY_HAS_EXPANDED]; // 展开过,包括异步加载\r\n\r\n // 找到表格中的同类节点(需要找到lay-data-index一致的所有行)\r\n var trsElem = tableViewElem.find('tr[lay-data-index=\"' + dataIndex + '\"]');\r\n // 处理折叠按钮图标\r\n var flexIconElem = trsElem.find('.layui-table-tree-flexIcon');\r\n flexIconElem.html(trExpand ? treeOptions.view.flexIconOpen : treeOptions.view.flexIconClose)\r\n trData[isParentKey] && flexIconElem.css('visibility', 'visible');\r\n // 处理节点图标\r\n treeOptions.view.showIcon && trsElem\r\n .find('.layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)')\r\n .html(trExpand ? treeOptions.view.iconOpen : treeOptions.view.iconClose);\r\n trData[LAY_EXPAND] = trExpand;\r\n var trDataId = trData[customName.id];\r\n trDataId !== undefined && (treeTableThat.status.expand[trDataId] = trExpand);\r\n if (retValue === null) {\r\n return retValue;\r\n }\r\n\r\n var childNodes = trData[customName.children] || [];\r\n // 处理子节点展示与否\r\n if (trExpand) {\r\n // 展开\r\n if (trExpanded) { // 已经展开过\r\n if (!childNodes.length) return ;//异步如果子节点没有数据情况下双点行展开所有已展开的节点问题解决\r\n trsElem.nextAll(childNodes.map(function (value, index, array) {\r\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\r\n }).join(',')).removeClass(HIDE);\r\n layui.each(childNodes, function (i1, item1) {\r\n if (!item1[isParentKey]) {\r\n return;\r\n }\r\n\r\n if (sonSign && !isToggle && !item1[LAY_EXPAND]) { // 非状态切换的情况下\r\n // 级联展开子节点\r\n expandNode({\r\n dataIndex: item1[LAY_DATA_INDEX],\r\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\r\n tableViewElem: tableViewElem,\r\n tableId: tableId,\r\n options: options,\r\n }, expandFlag, sonSign, focus, callbackFlag);\r\n } else if (item1[LAY_EXPAND]) { // 初始化级联展开\r\n expandNode({\r\n dataIndex: item1[LAY_DATA_INDEX],\r\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\r\n tableViewElem: tableViewElem,\r\n tableId: tableId,\r\n options: options,\r\n }, true);\r\n }\r\n });\r\n } else {\r\n var asyncSetting = treeOptions.async || {};\r\n var asyncUrl = asyncSetting.url || options.url;\r\n if (asyncSetting.enable && trData[isParentKey] && !trData[LAY_ASYNC_STATUS]) {\r\n trData[LAY_ASYNC_STATUS] = 'loading';\r\n flexIconElem.html('');\r\n\r\n // 异步获取子节点数据成功之后处理方法\r\n var asyncSuccessFn = function (data) {\r\n trData[LAY_ASYNC_STATUS] = 'success';\r\n trData[customName.children] = data;\r\n treeTableThat.initData(trData[customName.children], trData[LAY_DATA_INDEX])\r\n expandNode(treeNode, true, isToggle ? false : sonSign, focus, callbackFlag);\r\n }\r\n\r\n var format = asyncSetting.format; // 自定义数据返回方法\r\n if (layui.type(format) === 'function') {\r\n format(trData, options, asyncSuccessFn);\r\n return retValue;\r\n }\r\n\r\n var params = {};\r\n // 参数\r\n var data = $.extend(params, asyncSetting.where || options.where);\r\n var asyncAutoParam = asyncSetting.autoParam;\r\n layui.each(asyncAutoParam, function (index, item) {\r\n var itemStr = item;\r\n var itemArr = item.split('=');\r\n data[itemArr[0].trim()] = trData[(itemArr[1] || itemArr[0]).trim()]\r\n })\r\n\r\n var asyncContentType = asyncSetting.contentType || options.contentType;\r\n if (asyncContentType && asyncContentType.indexOf(\"application/json\") == 0) { // 提交 json 格式\r\n data = JSON.stringify(data);\r\n }\r\n var asyncType = asyncSetting.method || options.method;\r\n var asyncDataType = asyncSetting.dataType || options.dataType;\r\n var asyncJsonpCallback = asyncSetting.jsonpCallback || options.jsonpCallback;\r\n var asyncHeaders = asyncSetting.headers || options.headers;\r\n var asyncParseData = asyncSetting.parseData || options.parseData;\r\n var asyncResponse = asyncSetting.response || options.response;\r\n\r\n $.ajax({\r\n type: asyncType || 'get',\r\n url: asyncUrl,\r\n contentType: asyncContentType,\r\n data: data,\r\n dataType: asyncDataType || 'json',\r\n jsonpCallback: asyncJsonpCallback,\r\n headers: asyncHeaders || {},\r\n success: function (res) {\r\n // 若有数据解析的回调,则获得其返回的数据\r\n if (typeof asyncParseData === 'function') {\r\n res = asyncParseData.call(options, res) || res;\r\n }\r\n // 检查数据格式是否符合规范\r\n if (res[asyncResponse.statusName] != asyncResponse.statusCode) {\r\n trData[LAY_ASYNC_STATUS] = 'error';\r\n // 异常处理 todo\r\n flexIconElem.html('');\r\n // 事件\r\n } else {\r\n // 正常返回\r\n asyncSuccessFn(res[asyncResponse.dataName]);\r\n }\r\n },\r\n error: function (e, msg) {\r\n trData[LAY_ASYNC_STATUS] = 'error';\r\n // 异常处理 todo\r\n typeof options.error === 'function' && options.error(e, msg);\r\n }\r\n });\r\n return retValue;\r\n }\r\n trExpanded = trData[LAY_HAS_EXPANDED] = true;\r\n if (childNodes.length) {\r\n // 判断是否需要排序\r\n if (options.initSort && (!options.url || options.autoSort)) {\r\n var initSort = options.initSort;\r\n if (initSort.type) {\r\n layui.sort(childNodes, initSort.field, initSort.type === 'desc', true);\r\n } else {\r\n // 恢复默认\r\n layui.sort(childNodes, table.config.indexName, null, true);\r\n }\r\n }\r\n treeTableThat.initData(trData[customName.children], trData[LAY_DATA_INDEX]);\r\n // 将数据通过模板得出节点的html代码\r\n var str2 = table.getTrHtml(tableId, childNodes, null, null, dataIndex);\r\n\r\n var str2Obj = {\r\n trs: $(str2.trs.join('')),\r\n trs_fixed: $(str2.trs_fixed.join('')),\r\n trs_fixed_r: $(str2.trs_fixed_r.join(''))\r\n }\r\n var dataLevel = dataIndex.split('-').length - 1;\r\n var dataLevelNew = (dataLevel || 0) + 1;\r\n layui.each(childNodes, function (childIndex, childItem) {\r\n str2Obj.trs.eq(childIndex).attr({\r\n 'data-index': childItem[LAY_DATA_INDEX],\r\n 'lay-data-index': childItem[LAY_DATA_INDEX],\r\n 'data-level': dataLevelNew\r\n })\r\n str2Obj.trs_fixed.eq(childIndex).attr({\r\n 'data-index': childItem[LAY_DATA_INDEX],\r\n 'lay-data-index': childItem[LAY_DATA_INDEX],\r\n 'data-level': dataLevelNew\r\n })\r\n str2Obj.trs_fixed_r.eq(childIndex).attr({\r\n 'data-index': childItem[LAY_DATA_INDEX],\r\n 'lay-data-index': childItem[LAY_DATA_INDEX],\r\n 'data-level': dataLevelNew\r\n })\r\n })\r\n\r\n tableViewElem.find(ELEM_MAIN).find('tbody tr[lay-data-index=\"' + dataIndex + '\"]').after(str2Obj.trs);\r\n tableViewElem.find(ELEM_FIXL).find('tbody tr[lay-data-index=\"' + dataIndex + '\"]').after(str2Obj.trs_fixed);\r\n tableViewElem.find(ELEM_FIXR).find('tbody tr[lay-data-index=\"' + dataIndex + '\"]').after(str2Obj.trs_fixed_r);\r\n\r\n // 初始化新增的节点中的内容\r\n treeTableThat.renderTreeTable(str2Obj.trs, dataLevelNew);\r\n\r\n if (sonSign && !isToggle) { // 非状态切换的情况下\r\n // 级联展开/关闭子节点\r\n layui.each(childNodes, function (i1, item1) {\r\n expandNode({\r\n dataIndex: item1[LAY_DATA_INDEX],\r\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\r\n tableViewElem: tableViewElem,\r\n tableId: tableId,\r\n options: options,\r\n }, expandFlag, sonSign, focus, callbackFlag);\r\n })\r\n }\r\n }\r\n }\r\n } else {\r\n treeTableThat.isExpandAll = false;\r\n // 关闭\r\n if (sonSign && !isToggle) { // 非状态切换的情况下\r\n layui.each(childNodes, function (i1, item1) {\r\n expandNode({\r\n dataIndex: item1[LAY_DATA_INDEX],\r\n trElem: tableViewElem.find('tr[lay-data-index=\"' + item1[LAY_DATA_INDEX] + '\"]').first(),\r\n tableViewElem: tableViewElem,\r\n tableId: tableId,\r\n options: options,\r\n }, expandFlag, sonSign, focus, callbackFlag);\r\n });\r\n tableViewElem.find(childNodes.map(function (value, index, array) { // 只隐藏直接子节点,其他由递归的处理\r\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\r\n }).join(',')).addClass(HIDE);\r\n } else {\r\n var childNodesFlat = treeTableThat.treeToFlat(childNodes, trData[customName.id], dataIndex);\r\n tableViewElem.find(childNodesFlat.map(function (value, index, array) {\r\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\r\n }).join(',')).addClass(HIDE);\r\n }\r\n }\r\n\r\n\r\n debounceFn('resize-' + tableId, function () {\r\n treeTable.resize(tableId);\r\n }, 0)();\r\n\r\n if (callbackFlag && trData[LAY_ASYNC_STATUS] !== 'loading') {\r\n var onExpand = treeOptions.callback.onExpand;\r\n layui.type(onExpand) === 'function' && onExpand(tableId, trData, trExpand);\r\n }\r\n\r\n return retValue;\r\n }\r\n\r\n /**\r\n * 展开或关闭一个节点\r\n * @param {String} id 树表id\r\n * @param {Object} opts\r\n * @param {Number|String} opts.index 展开行的数据下标\r\n * @param {Boolean} [opts.expandFlag] 展开、关闭、切换\r\n * @param {Boolean} [opts.inherit] 是否级联子节点\r\n * @param {Boolean} [opts.callbackFlag] 是否触发事件\r\n * @return [{Boolean}] 状态结果\r\n * */\r\n treeTable.expandNode = function (id, opts) {\r\n var that = getThisTable(id);\r\n if (!that) return;\r\n\r\n opts = opts || {};\r\n\r\n var index = opts.index;\r\n var expandFlag = opts.expandFlag;\r\n var sonSign = opts.inherit;\r\n var callbackFlag = opts.callbackFlag;\r\n\r\n var options = that.getOptions();\r\n var tableViewElem = options.elem.next();\r\n return expandNode({\r\n trElem: tableViewElem.find('tr[lay-data-index=\"' + index + '\"]').first()\r\n }, expandFlag, sonSign, null, callbackFlag)\r\n };\r\n\r\n /**\r\n * 展开或关闭全部节点\r\n * @param {String} id 树表id\r\n * @param {Boolean} expandFlag 展开或关闭\r\n * */\r\n treeTable.expandAll = function (id, expandFlag) {\r\n if (layui.type(expandFlag) !== 'boolean') {\r\n return hint.error('expandAll 的展开状态参数只接收true/false')\r\n }\r\n\r\n var that = getThisTable(id);\r\n if (!that) return;\r\n\r\n that.isExpandAll = expandFlag;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableView = options.elem.next();\r\n var isParentKey = treeOptions.customName.isParent;\r\n var idKey = treeOptions.customName.id;\r\n var showFlexIconIfNotParent = treeOptions.view.showFlexIconIfNotParent;\r\n\r\n if (!expandFlag) {\r\n // 关闭所有\r\n // 将所有已经打开的节点的状态设置为关闭,\r\n that.updateStatus(null, function (d) {\r\n if (d[isParentKey] || showFlexIconIfNotParent) {\r\n d[LAY_EXPAND] = false;\r\n d[idKey] !== undefined && (that.status.expand[d[idKey]] = false);\r\n }\r\n }) // 只处理当前页,如果需要处理全部表格,需要用treeTable.updateStatus\r\n // 隐藏所有非顶层的节点\r\n tableView.find('.layui-table-box tbody tr[data-level!=\"0\"]').addClass(HIDE);\r\n\r\n tableView.find('.layui-table-tree-flexIcon').html(treeOptions.view.flexIconClose);\r\n treeOptions.view.showIcon && tableView\r\n .find('.layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)')\r\n .html(treeOptions.view.iconClose);\r\n } else {\r\n var tableDataFlat = treeTable.getData(id, true);\r\n // 展开所有\r\n // 存在异步加载\r\n if (treeOptions.async.enable) {\r\n // 判断是否有未加载过的节点\r\n var isAllAsyncDone = true;\r\n layui.each(tableDataFlat, function (i1, item1) {\r\n if (item1[isParentKey] && !item1[LAY_ASYNC_STATUS]) {\r\n isAllAsyncDone = false;\r\n return true;\r\n }\r\n })\r\n // 有未加载过的节点\r\n if (!isAllAsyncDone) {\r\n // 逐个展开\r\n layui.each(treeTable.getData(id), function (i1, item1) {\r\n treeTable.expandNode(id, {\r\n index: item1[LAY_DATA_INDEX],\r\n expandFlag: true,\r\n inherit: true\r\n })\r\n })\r\n return;\r\n }\r\n }\r\n\r\n // 先判断是否全部打开过了\r\n var isAllExpanded = true;\r\n layui.each(tableDataFlat, function (i1, item1) {\r\n if (item1[isParentKey] && !item1[LAY_HAS_EXPANDED]) {\r\n isAllExpanded = false;\r\n return true;\r\n }\r\n })\r\n // 如果全部节点已经都打开过,就可以简单处理跟隐藏所有节点反操作\r\n if (isAllExpanded) {\r\n that.updateStatus(null, function (d) {\r\n if (d[isParentKey] || showFlexIconIfNotParent) {\r\n d[LAY_EXPAND] = true;\r\n d[idKey] !== undefined && (that.status.expand[d[idKey]] = true);\r\n }\r\n });\r\n // 显示所有子节点\r\n tableView.find('tbody tr[data-level!=\"0\"]').removeClass(HIDE);\r\n // 处理节点的图标\r\n tableView.find('.layui-table-tree-flexIcon').html(treeOptions.view.flexIconOpen);\r\n treeOptions.view.showIcon && tableView\r\n .find('.layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom,.layui-table-tree-iconLeaf)')\r\n .html(treeOptions.view.iconOpen);\r\n } else {\r\n // 如果有未打开过的父节点,将 tr 内容全部重新生成\r\n that.updateStatus(null, function (d) {\r\n if (d[isParentKey] || showFlexIconIfNotParent) {\r\n d[LAY_EXPAND] = true;\r\n d[LAY_HAS_EXPANDED] = true;\r\n d[idKey] !== undefined && (that.status.expand[d[idKey]] = true);\r\n }\r\n });\r\n if (options.initSort && options.initSort.type && options.autoSort) {\r\n return treeTable.sort(id);\r\n }\r\n var trAll = table.getTrHtml(id, tableDataFlat);\r\n\r\n var trAllObj = {\r\n trs: $(trAll.trs.join('')),\r\n trs_fixed: $(trAll.trs_fixed.join('')),\r\n trs_fixed_r: $(trAll.trs_fixed_r.join(''))\r\n }\r\n var props;\r\n layui.each(tableDataFlat, function (dataIndex, dataItem) {\r\n var dataLevel = dataItem[LAY_DATA_INDEX].split('-').length - 1;\r\n props = {\r\n 'data-index': dataItem[LAY_DATA_INDEX],\r\n 'lay-data-index': dataItem[LAY_DATA_INDEX],\r\n 'data-level': dataLevel\r\n };\r\n trAllObj.trs.eq(dataIndex).attr(props)\r\n trAllObj.trs_fixed.eq(dataIndex).attr(props)\r\n trAllObj.trs_fixed_r.eq(dataIndex).attr(props)\r\n })\r\n layui.each(['main', 'fixed-l', 'fixed-r'], function (i, item) {\r\n tableView.find('.layui-table-' + item + ' tbody').html(trAllObj[['trs', 'trs_fixed', 'trs_fixed_r'][i]]);\r\n });\r\n that.renderTreeTable(tableView, 0, false);\r\n }\r\n }\r\n treeTable.resize(id);\r\n }\r\n\r\n Class.prototype.renderTreeTable = function (tableView, level, sonSign) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var tableViewElem = options.elem.next();\r\n !tableViewElem.hasClass(TABLE_TREE) && tableViewElem.addClass(TABLE_TREE);\r\n var tableId = options.id;\r\n var treeOptions = options.tree || {};\r\n var treeOptionsData = treeOptions.data || {};\r\n var treeOptionsView = treeOptions.view || {};\r\n var customName = treeOptions.customName || {};\r\n var isParentKey = customName.isParent;\r\n var tableFilterId = tableViewElem.attr('lay-filter');\r\n var treeTableThat = that;\r\n // var tableData = treeTableThat.getTableData();\r\n\r\n level = level || 0;\r\n\r\n if (!level) {\r\n // 初始化的表格里面没有level信息,可以作为顶层节点的判断\r\n tableViewElem.find('.layui-table-body tr:not([data-level])').attr('data-level', level);\r\n layui.each(table.cache[tableId], function (dataIndex, dataItem) {\r\n tableViewElem.find('.layui-table-main tbody tr[data-level=\"0\"]:eq(' + dataIndex + ')').attr('lay-data-index', dataItem[LAY_DATA_INDEX]);\r\n tableViewElem.find('.layui-table-fixed-l tbody tr[data-level=\"0\"]:eq(' + dataIndex + ')').attr('lay-data-index', dataItem[LAY_DATA_INDEX]);\r\n tableViewElem.find('.layui-table-fixed-r tbody tr[data-level=\"0\"]:eq(' + dataIndex + ')').attr('lay-data-index', dataItem[LAY_DATA_INDEX]);\r\n })\r\n }\r\n\r\n var dataExpand = null; // 记录需要展开的数据\r\n var nameKey = customName.name;\r\n var indent = treeOptionsView.indent || 14;\r\n layui.each(tableView.find('td[data-field=\"' + nameKey + '\"]'), function (index, item) {\r\n item = $(item);\r\n var trElem = item.closest('tr');\r\n var itemCell = item.children('.layui-table-cell');\r\n if (itemCell.hasClass('layui-table-tree-item')) {\r\n return;\r\n }\r\n var trIndex = trElem.attr('lay-data-index');\r\n if (!trIndex) { // 排除在统计行中的节点\r\n return;\r\n }\r\n trElem = tableViewElem.find('tr[lay-data-index=\"' + trIndex + '\"]');\r\n var trData = treeTableThat.getNodeDataByIndex(trIndex);\r\n\r\n if (trData[LAY_EXPAND] && trData[isParentKey]) {\r\n // 需要展开\r\n dataExpand = dataExpand || {};\r\n dataExpand[trIndex] = true;\r\n }\r\n if (trData[LAY_CHECKBOX_HALF]) {\r\n trElem.find('input[type=\"checkbox\"][name=\"layTableCheckbox\"]').prop('indeterminate', true);\r\n }\r\n\r\n var htmlTemp = itemCell.html();\r\n itemCell = trElem.find('td[data-field=\"' + nameKey + '\"]>div.layui-table-cell');\r\n itemCell.addClass('layui-table-tree-item');\r\n var flexIconElem = itemCell\r\n .html(['
                          ',\r\n trData[LAY_EXPAND] ? treeOptionsView.flexIconOpen : treeOptionsView.flexIconClose, // 折叠图标\r\n '
                          ',\r\n treeOptionsView.showIcon ? '
                          ' +\r\n (trData[customName.icon] || treeOptionsView.icon ||\r\n (trData[isParentKey] ?\r\n (trData[LAY_EXPAND] ? treeOptionsView.iconOpen : treeOptionsView.iconClose) :\r\n treeOptionsView.iconLeaf) ||\r\n '') + '
                          ' : '', // 区分父子节点\r\n htmlTemp].join('')) // 图标要可定制\r\n .find('.layui-table-tree-flexIcon');\r\n\r\n // 添加展开按钮的事件\r\n flexIconElem.on('click', function (event) {\r\n layui.stope(event);\r\n // 处理数据\r\n // var trElem = item.closest('tr');\r\n expandNode({trElem: trElem}, null, null, null, true);\r\n });\r\n });\r\n\r\n if (!level && treeOptions.view.expandAllDefault && that.isExpandAll === undefined) {\r\n return treeTable.expandAll(tableId, true); // 默认展开全部\r\n }\r\n\r\n // 当前层的数据看看是否需要展开\r\n if (sonSign !== false && dataExpand) {\r\n layui.each(dataExpand, function (index, item) {\r\n var trDefaultExpand = tableViewElem.find('tr[lay-data-index=\"' + index + '\"]');\r\n trDefaultExpand.find('.layui-table-tree-flexIcon').html(treeOptionsView.flexIconOpen);\r\n expandNode({trElem: trDefaultExpand.first()}, true);\r\n });\r\n } else {\r\n debounceFn('renderTreeTable-' + tableId, function () {\r\n options.hasNumberCol && formatNumber(that);\r\n form.render($('.layui-table-tree[lay-id=\"' + tableId + '\"]'));\r\n }, 0)();\r\n }\r\n }\r\n\r\n var formatNumber = function (that) {\r\n var options = that.getOptions();\r\n var tableViewElem = options.elem.next();\r\n\r\n var num = 0;\r\n var trMain = tableViewElem.find('.layui-table-main tbody tr');\r\n var trFixedL = tableViewElem.find('.layui-table-fixed-l tbody tr');\r\n var trFixedR = tableViewElem.find('.layui-table-fixed-r tbody tr');\r\n layui.each(that.treeToFlat(table.cache[options.id]), function (i1, item1) {\r\n if (item1['LAY_HIDE']) return;\r\n var itemData = that.getNodeDataByIndex(item1[LAY_DATA_INDEX]);\r\n itemData['LAY_NUM'] = ++num;\r\n trMain.eq(i1).find('.laytable-cell-numbers').html(num);\r\n trFixedL.eq(i1).find('.laytable-cell-numbers').html(num);\r\n trFixedR.eq(i1).find('.laytable-cell-numbers').html(num);\r\n })\r\n }\r\n\r\n // 树表渲染\r\n Class.prototype.render = function (type) {\r\n var that = this;\r\n that.tableIns = table[type === 'reloadData' ? 'reloadData' : 'reload'](that.tableIns.config.id, $.extend(true, {}, that.config));\r\n that.config = that.tableIns.config;\r\n };\r\n\r\n // 表格重载\r\n Class.prototype.reload = function (options, deep, type) {\r\n var that = this;\r\n\r\n options = options || {};\r\n delete that.haveInit;\r\n\r\n // 防止数组深度合并\r\n layui.each(options, function (key, item) {\r\n if (layui.type(item) === 'array') delete that.config[key];\r\n });\r\n\r\n // 根据需要处理options中的一些参数\r\n updateOptions(that.getOptions().id, options, type || true);\r\n\r\n // 对参数进行深度或浅扩展\r\n that.config = $.extend(deep, {}, that.config, options);\r\n\r\n // 执行渲染\r\n that.render(type);\r\n };\r\n\r\n // 仅重载数据\r\n treeTable.reloadData = function () {\r\n var args = $.extend(true, [], arguments);\r\n args[3] = 'reloadData';\r\n\r\n return treeTable.reload.apply(null, args);\r\n };\r\n\r\n var updateStatus = function (data, statusObj, childrenKey, notCascade) {\r\n var dataUpdated = [];\r\n layui.each(data, function (i1, item1) {\r\n if (layui.type(statusObj) === 'function') {\r\n statusObj(item1);\r\n } else {\r\n $.extend(item1, statusObj);\r\n }\r\n dataUpdated.push($.extend({}, item1));\r\n notCascade || (dataUpdated = dataUpdated.concat(updateStatus(item1[childrenKey], statusObj, childrenKey, notCascade)));\r\n });\r\n return dataUpdated;\r\n }\r\n\r\n Class.prototype.updateStatus = function (data, statusObj, notCascade) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n data = data || table.cache[options.id];\r\n\r\n return updateStatus(data, statusObj, treeOptions.customName.children, notCascade);\r\n }\r\n\r\n Class.prototype.getTableData = function () {\r\n var that = this;\r\n var options = that.getOptions();\r\n // return options.url ? table.cache[options.id] : options.data;\r\n return table.cache[options.id];\r\n }\r\n\r\n treeTable.updateStatus = function (id, statusObj, data) {\r\n var that = getThisTable(id);\r\n var options = that.getOptions();\r\n if (!data) {\r\n if (options.url) {\r\n data = table.cache[options.id];\r\n } else {\r\n data = options.data;\r\n }\r\n }\r\n return that.updateStatus(data, statusObj);\r\n }\r\n\r\n treeTable.sort = function (id) {\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n\r\n var options = that.getOptions();\r\n if (options.autoSort) {\r\n that.initData();\r\n treeTable.renderData(id);\r\n }\r\n }\r\n\r\n // 处理事件\r\n var updateObjParams = function (obj) {\r\n var tableId = obj.config.id;\r\n var tableThat = getThisTable(tableId);\r\n var trData = obj.data = treeTable.getNodeDataByIndex(tableId, obj.index); // 克隆的\r\n var trIndex = trData[LAY_DATA_INDEX];\r\n obj.dataIndex = trIndex;\r\n\r\n // 处理update方法\r\n var updateFn = obj.update;\r\n obj.update = function () {\r\n var updateThat = this;\r\n var args = arguments;\r\n $.extend(tableThat.getNodeDataByIndex(trIndex), args[0]);\r\n var ret = updateFn.apply(updateThat, args); // 主要负责更新节点内容\r\n var nameKey = obj.config.tree.customName.name;\r\n nameKey in args[0] && obj.tr.find('td[data-field=\"' + nameKey + '\"]').children('div.layui-table-cell').removeClass('layui-table-tree-item');\r\n tableThat.renderTreeTable(obj.tr, obj.tr.attr('data-level'), false);\r\n return ret;\r\n }\r\n\r\n // 处理del方法\r\n obj.del = function () {\r\n treeTable.removeNode(tableId, trData);\r\n }\r\n\r\n // 处理setRowChecked\r\n obj.setRowChecked = function (checked) {\r\n treeTable.setRowChecked(tableId, {\r\n index: trData,\r\n checked: checked\r\n });\r\n }\r\n }\r\n\r\n // 更新数据\r\n treeTable.updateNode = function (id, index, newNode) {\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableView = options.elem.next();\r\n var trElem = tableView.find('tr[lay-data-index=\"' + index + '\"]');\r\n var trIndex = trElem.attr('data-index');\r\n var trLevel = trElem.attr('data-level')\r\n\r\n if (!newNode) {\r\n return;\r\n }\r\n // 更新值\r\n var newNodeTemp = that.getNodeDataByIndex(index, false, newNode);\r\n // 获取新的tr替换\r\n var trNew = table.getTrHtml(id, [newNodeTemp]);\r\n // 重新渲染tr\r\n layui.each(['main', 'fixed-l', 'fixed-r'], function (i, item) {\r\n tableView.find('.layui-table-' + item + ' tbody tr[lay-data-index=\"' + index + '\"]').replaceWith($(trNew[['trs', 'trs_fixed', 'trs_fixed_r'][i]].join('')).attr({\r\n 'data-index': trIndex,\r\n 'lay-data-index': index,\r\n 'data-level': trLevel\r\n }));\r\n });\r\n that.renderTreeTable(tableView.find('tr[lay-data-index=\"' + index + '\"]'), trLevel);\r\n }\r\n\r\n // 删除数据\r\n treeTable.removeNode = function (id, node) {\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableView = options.elem.next();\r\n var delNode;\r\n var indexArr = [];\r\n delNode = that.getNodeDataByIndex(layui.type(node) === 'string' ? node : node[LAY_DATA_INDEX], false, 'delete');\r\n var nodeP = that.getNodeDataByIndex(delNode[LAY_PARENT_INDEX]);\r\n that.updateCheckStatus(nodeP);\r\n var delNodesFlat = that.treeToFlat([delNode], delNode[treeOptions.customName.pid], delNode[LAY_PARENT_INDEX]);\r\n layui.each(delNodesFlat, function (i2, item2) {\r\n indexArr.push('tr[lay-data-index=\"' + item2[LAY_DATA_INDEX] + '\"]');\r\n })\r\n\r\n tableView.find(indexArr.join(',')).remove(); // 删除行\r\n // 重新整理数据\r\n var tableData = that.initData();\r\n // index发生变化需要更新页面tr中对应的lay-data-index 新增和删除都要注意数据结构变动之后的index问题\r\n layui.each(that.treeToFlat(tableData), function (i3, item3) {\r\n if (item3[LAY_DATA_INDEX_HISTORY] && item3[LAY_DATA_INDEX_HISTORY] !== item3[LAY_DATA_INDEX]) {\r\n tableView.find('tr[lay-data-index=\"' + item3[LAY_DATA_INDEX_HISTORY] + '\"]').attr({\r\n 'data-index': item3[LAY_DATA_INDEX],\r\n 'lay-data-index': item3[LAY_DATA_INDEX],\r\n });\r\n // item3[LAY_DATA_INDEX_HISTORY] = item3[LAY_DATA_INDEX]\r\n }\r\n });\r\n // 重新更新顶层节点的data-index;\r\n layui.each(table.cache[id], function (i4, item4) {\r\n tableView.find('tr[data-level=\"0\"][lay-data-index=\"' + item4[LAY_DATA_INDEX] + '\"]').attr('data-index', i4);\r\n })\r\n options.hasNumberCol && formatNumber(that);\r\n\r\n // 重新适配尺寸\r\n treeTable.resize(id);\r\n }\r\n\r\n /**\r\n * 新增数据节点\r\n * @param {String} id 树表id\r\n * @param {Object} opts\r\n * @param {String|Number} opts.parentIndex 指定的父节点,如果增加根节点,请设置 parentIndex 为 null 即可\r\n * @param {Number} opts.index 新节点插入的位置(从 0 开始)index = -1(默认) 时,插入到最后\r\n * @param {Object|Array} opts.data 新增的节点,单个或者多个\r\n * @param {Boolean} opts.focus 新增的节点,单个或者多个\r\n * @return {Array} 新增的节点\r\n * */\r\n treeTable.addNodes = function (id, opts) {\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableViewElem = options.elem.next();\r\n var checkName = table.config.checkName;\r\n\r\n opts = opts || {};\r\n\r\n var parentIndex = opts.parentIndex;\r\n var index = opts.index;\r\n var newNodes = opts.data;\r\n var focus = opts.focus;\r\n\r\n parentIndex = layui.type(parentIndex) === 'number' ? parentIndex.toString() : parentIndex;\r\n var parentNode = parentIndex ? that.getNodeDataByIndex(parentIndex) : null;\r\n index = layui.type(index) === 'number' ? index : -1;\r\n\r\n // 添加数据\r\n newNodes = $.extend(true, [], (layui.isArray(newNodes) ? newNodes : [newNodes]));\r\n\r\n // 若未传入 LAY_CHECKED 属性,则继承父节点的 checked 状态\r\n layui.each(newNodes, function(i, item){\r\n if(!(checkName in item) && parentNode){\r\n item[checkName] = parentNode[checkName];\r\n }\r\n })\r\n\r\n var tableData = that.getTableData(), dataAfter;\r\n if (!parentNode) {\r\n // 添加到根节点\r\n dataAfter = table.cache[id].splice(index === -1 ? table.cache[id].length : index);\r\n table.cache[id] = table.cache[id].concat(newNodes, dataAfter);\r\n if (!options.url) {\r\n // 静态data模式\r\n if (!options.page) {\r\n options.data = table.cache[id];\r\n } else {\r\n var pageOptions = options.page;\r\n options.data.splice.apply(options.data, [pageOptions.limit * (pageOptions.curr - 1), pageOptions.limit].concat(table.cache[id]))\r\n }\r\n }\r\n // 将新节点添加到页面\r\n tableData = that.initData();\r\n\r\n if (tableViewElem.find('.layui-none').length) {\r\n table.renderData(id);\r\n return newNodes;\r\n }\r\n\r\n var newNodesHtml = table.getTrHtml(id, newNodes);\r\n var newNodesHtmlObj = {\r\n trs: $(newNodesHtml.trs.join('')),\r\n trs_fixed: $(newNodesHtml.trs_fixed.join('')),\r\n trs_fixed_r: $(newNodesHtml.trs_fixed_r.join(''))\r\n }\r\n\r\n var attrs = {};\r\n layui.each(newNodes, function (newNodeIndex, newNodeItem) {\r\n attrs = {\r\n 'data-index': newNodeItem[LAY_DATA_INDEX],\r\n 'lay-data-index': newNodeItem[LAY_DATA_INDEX],\r\n 'data-level': '0'\r\n };\r\n newNodesHtmlObj.trs.eq(newNodeIndex).attr(attrs)\r\n newNodesHtmlObj.trs_fixed.eq(newNodeIndex).attr(attrs)\r\n newNodesHtmlObj.trs_fixed_r.eq(newNodeIndex).attr(attrs)\r\n })\r\n var trIndexPrev = parseInt(newNodes[0][LAY_DATA_INDEX]) - 1;\r\n var tableViewElemMAIN = tableViewElem.find(ELEM_MAIN);\r\n var tableViewElemFIXL = tableViewElem.find(ELEM_FIXL);\r\n var tableViewElemFIXR = tableViewElem.find(ELEM_FIXR);\r\n if (trIndexPrev === -1) {\r\n // 插入到开头\r\n tableViewElemMAIN.find('tr[data-level=\"0\"][data-index=\"0\"]').before(newNodesHtmlObj.trs);\r\n tableViewElemFIXL.find('tr[data-level=\"0\"][data-index=\"0\"]').before(newNodesHtmlObj.trs_fixed);\r\n tableViewElemFIXR.find('tr[data-level=\"0\"][data-index=\"0\"]').before(newNodesHtmlObj.trs_fixed_r);\r\n } else {\r\n if (index === -1) {\r\n // 追加到最后\r\n tableViewElemMAIN.find('tbody').append(newNodesHtmlObj.trs);\r\n tableViewElemFIXL.find('tbody').append(newNodesHtmlObj.trs_fixed);\r\n tableViewElemFIXR.find('tbody').append(newNodesHtmlObj.trs_fixed_r);\r\n } else {\r\n var trIndexNext = dataAfter[0][LAY_DATA_INDEX_HISTORY];\r\n tableViewElemMAIN.find('tr[data-level=\"0\"][data-index=\"' + trIndexNext + '\"]').before(newNodesHtmlObj.trs);\r\n tableViewElemFIXL.find('tr[data-level=\"0\"][data-index=\"' + trIndexNext + '\"]').before(newNodesHtmlObj.trs_fixed);\r\n tableViewElemFIXR.find('tr[data-level=\"0\"][data-index=\"' + trIndexNext + '\"]').before(newNodesHtmlObj.trs_fixed_r);\r\n }\r\n\r\n }\r\n\r\n // 重新更新顶层节点的data-index;\r\n layui.each(table.cache[id], function (i4, item4) {\r\n tableViewElem.find('tr[data-level=\"0\"][lay-data-index=\"' + item4[LAY_DATA_INDEX] + '\"]').attr('data-index', i4);\r\n })\r\n\r\n that.renderTreeTable(tableViewElem.find(newNodes.map(function (value, index, array) {\r\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\r\n }).join(',')));\r\n } else {\r\n var isParentKey = treeOptions.customName.isParent;\r\n var childKey = treeOptions.customName.children;\r\n\r\n parentNode[isParentKey] = true;\r\n var childrenNodes = parentNode[childKey];\r\n if (!childrenNodes) {\r\n childrenNodes = parentNode[childKey] = newNodes;\r\n } else {\r\n dataAfter = childrenNodes.splice(index === -1 ? childrenNodes.length : index);\r\n childrenNodes = parentNode[childKey] = childrenNodes.concat(newNodes, dataAfter);\r\n }\r\n // 删除已经存在的同级节点以及他们的子节点,并且把中间节点的已展开过的状态设置为false\r\n that.updateStatus(childrenNodes, function (d) {\r\n if (d[isParentKey] || treeOptions.view.showFlexIconIfNotParent) {\r\n d[LAY_HAS_EXPANDED] = false;\r\n }\r\n });\r\n var childrenNodesFlat = that.treeToFlat(childrenNodes);\r\n tableViewElem.find(childrenNodesFlat.map(function (value) {\r\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"]'\r\n }).join(',')).remove();\r\n\r\n tableData = that.initData();\r\n // 去掉父节点的已经展开过的状态,重新执行一次展开的方法\r\n parentNode[LAY_HAS_EXPANDED] = false;\r\n parentNode[LAY_ASYNC_STATUS] = 'local'; // 转为本地数据,应该规定异步加载子节点的时候addNodes的规则\r\n expandNode({trElem: tableViewElem.find('tr[lay-data-index=\"' + parentIndex + '\"]')}, true)\r\n }\r\n that.updateCheckStatus(parentNode);\r\n treeTable.resize(id);\r\n if (focus) {\r\n // 滚动到第一个新增的节点\r\n tableViewElem.find(ELEM_MAIN).find('tr[lay-data-index=\"' + newNodes[0][LAY_DATA_INDEX] + '\"]').get(0).scrollIntoViewIfNeeded();\r\n }\r\n\r\n return newNodes;\r\n }\r\n\r\n // 获取表格选中状态\r\n treeTable.checkStatus = function (id, includeHalfCheck) {\r\n var that = getThisTable(id);\r\n if (!that) return;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var checkName = table.config.checkName;\r\n\r\n // 需要区分单双选\r\n var tableData = treeTable.getData(id, true);\r\n var checkedData = tableData.filter(function (value, index, array) {\r\n return value[checkName] || (includeHalfCheck && value[LAY_CHECKBOX_HALF]);\r\n });\r\n\r\n var isAll = true;\r\n layui.each(treeOptions.data.cascade === 'all' ? table.cache[id] : treeTable.getData(id, true), function (i1, item1) {\r\n if (!item1[checkName]) {\r\n isAll = false;\r\n return true;\r\n }\r\n })\r\n\r\n return {\r\n data: checkedData,\r\n isAll: isAll\r\n }\r\n }\r\n\r\n // 排序之后重新渲染成树表\r\n treeTable.on('sort', function (obj) {\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n var tableId = options.id;\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n treeTable.sort(tableId);\r\n }\r\n });\r\n\r\n // 行点击\r\n treeTable.on('row', function (obj) {\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n updateObjParams(obj);\r\n }\r\n })\r\n\r\n // 行双击\r\n treeTable.on('rowDouble', function (obj) {\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n var tableId = options.id;\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n updateObjParams(obj);\r\n\r\n var treeOptions = options.tree || {};\r\n if (treeOptions.view.dblClickExpand) {\r\n expandNode({trElem: obj.tr.first()}, null, null, null, true);\r\n }\r\n }\r\n })\r\n\r\n // 菜单\r\n treeTable.on('rowContextmenu', function (obj) {\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n var tableId = options.id;\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n updateObjParams(obj);\r\n }\r\n })\r\n\r\n // tr中带lay-event节点点击\r\n treeTable.on('tool', function (obj) {\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n var tableId = options.id;\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n updateObjParams(obj);\r\n }\r\n })\r\n\r\n // 行内编辑\r\n treeTable.on('edit', function (obj) {\r\n // 如果编辑涉及到关键的name字段需要重新更新一下tr节点\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n var tableId = options.id;\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n updateObjParams(obj);\r\n if (obj.field === options.tree.customName.name) {\r\n var updateData = {};\r\n updateData[obj.field] = obj.value;\r\n obj.update(updateData); // 通过update调用执行tr节点的更新\r\n }\r\n }\r\n });\r\n\r\n // 单选\r\n treeTable.on('radio', function (obj) {\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n var tableId = options.id;\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n var that = getThisTable(tableId);\r\n updateObjParams(obj);\r\n checkNode.call(that, obj.tr, obj.checked)\r\n }\r\n })\r\n\r\n // 设置或取消行选中样式\r\n Class.prototype.setRowCheckedClass = function(tr, checked){\r\n var that = this;\r\n var options = that.getOptions();\r\n\r\n var index = tr.data('index');\r\n var tableViewElem = options.elem.next();\r\n \r\n tr[checked ? 'addClass' : 'removeClass'](ELEM_CHECKED); // 主体行\r\n\r\n // 右侧固定行\r\n tr.each(function(){\r\n var index = $(this).data('index');\r\n var trFixedR = tableViewElem.find('.layui-table-fixed-r tbody tr[data-index=\"'+ index +'\"]');\r\n trFixedR[checked ? 'addClass' : 'removeClass'](ELEM_CHECKED);\r\n });\r\n };\r\n\r\n // 更新表格的复选框状态\r\n Class.prototype.updateCheckStatus = function (dataP, checked) {\r\n var that = this;\r\n var options = that.getOptions();\r\n if (!options.hasChecboxCol) {\r\n return false; // 如果没有复选列则不需要更新状态\r\n }\r\n var treeOptions = options.tree;\r\n var tableId = options.id;\r\n var tableView = options.elem.next();\r\n\r\n var checkName = table.config.checkName;\r\n\r\n var cascade = treeOptions.data.cascade;\r\n var isCascadeParent = cascade === 'all' || cascade === 'parent';\r\n\r\n // 如有必要更新父节点们的状态\r\n if (isCascadeParent && dataP) {\r\n var trsP = that.updateParentCheckStatus(dataP, layui.type(checked) === 'boolean' ? checked : null);\r\n layui.each(trsP, function (indexP, itemP) {\r\n var checkboxElem = tableView.find('tr[lay-data-index=\"' + itemP[LAY_DATA_INDEX] + '\"] input[name=\"layTableCheckbox\"]:not(:disabled)');\r\n var checked = itemP[checkName];\r\n\r\n // 标记父节点行背景色\r\n that.setRowCheckedClass(checkboxElem.closest('tr'), checked);\r\n \r\n // 设置原始复选框 checked 属性值并渲染\r\n form.render(checkboxElem.prop({\r\n checked: checked,\r\n indeterminate: itemP[LAY_CHECKBOX_HALF]\r\n }))\r\n })\r\n }\r\n\r\n // 更新全选的状态\r\n var isAll = true;\r\n var isIndeterminate = false;\r\n var data = treeOptions.data.cascade === 'all' ? table.cache[tableId] : treeTable.getData(tableId, true);\r\n data = data.filter(function (item) {\r\n return !item[options.disabledName];\r\n });\r\n layui.each(data, function (i1, item1) {\r\n if (item1[checkName] || item1[LAY_CHECKBOX_HALF]) {\r\n isIndeterminate = true;\r\n }\r\n if (!item1[checkName]) {\r\n isAll = false;\r\n }\r\n if (isIndeterminate && !isAll) {\r\n return true;\r\n }\r\n })\r\n isIndeterminate = isIndeterminate && !isAll;\r\n form.render(tableView.find('input[name=\"layTableCheckbox\"][lay-filter=\"layTableAllChoose\"]').prop({\r\n 'checked': isAll,\r\n indeterminate: isIndeterminate\r\n }));\r\n\r\n return isAll\r\n }\r\n\r\n // 更新父节点的选中状态\r\n Class.prototype.updateParentCheckStatus = function (dataP, checked) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableId = options.id;\r\n var checkName = table.config.checkName;\r\n var childrenKey = treeOptions.customName.children;\r\n\r\n var dataRet = [];\r\n dataP[LAY_CHECKBOX_HALF] = false; // 先设置为非半选,是否为半选又下面逻辑判断\r\n if (checked === true) {\r\n // 为真需要判断子节点的情况\r\n if (!dataP[childrenKey].length) {\r\n checked = false;\r\n } else {\r\n layui.each(dataP[childrenKey], function (index, item) {\r\n if (!item[checkName]) { // 只要有一个子节点为false\r\n checked = false;\r\n dataP[LAY_CHECKBOX_HALF] = true;\r\n return true; // 跳出循环\r\n }\r\n });\r\n }\r\n } else if (checked === false) {\r\n // 判断是否为半选\r\n layui.each(dataP[childrenKey], function (index, item) {\r\n if (item[checkName] || item[LAY_CHECKBOX_HALF]) { // 只要有一个子节点为选中或者半选状态\r\n dataP[LAY_CHECKBOX_HALF] = true;\r\n return true;\r\n }\r\n });\r\n } else {\r\n // 状态不确定的情况下根据子节点的信息\r\n checked = false;\r\n var checkedNum = 0;\r\n layui.each(dataP[childrenKey], function (index, item) {\r\n if (item[checkName]) {\r\n checkedNum++;\r\n }\r\n });\r\n checked = dataP[childrenKey].length ? dataP[childrenKey].length === checkedNum : dataP[checkName]; // 如果没有子节点保留原来的状态;\r\n dataP[LAY_CHECKBOX_HALF] = checked ? false : checkedNum > 0;\r\n }\r\n dataP[checkName] = checked;\r\n dataRet.push($.extend({}, dataP));\r\n if (dataP[LAY_PARENT_INDEX]) {\r\n dataRet = dataRet.concat(that.updateParentCheckStatus(table.cache[tableId][dataP[LAY_PARENT_INDEX]], checked));\r\n }\r\n return dataRet\r\n }\r\n\r\n var checkNode = function (trElem, checked, callbackFlag) {\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n var tableId = options.id;\r\n var tableView = options.elem.next();\r\n var inputElem = (trElem.length ? trElem : tableView).find('.laytable-cell-radio, .laytable-cell-checkbox').children('input').last();\r\n // 判断是单选还是多选 不应该同时存在radio列和checkbox列\r\n var isRadio = inputElem.attr('type') === 'radio';\r\n\r\n if (callbackFlag) {\r\n var triggerEvent = function () {\r\n var fn = function (event) {\r\n layui.stope(event);\r\n }\r\n inputElem.parent().on('click', fn); // 添加临时的阻止冒泡事件\r\n inputElem.next().click();\r\n inputElem.parent().off('click', fn);\r\n }\r\n // 如果需要触发事件可以简单的触发对应节点的click事件\r\n if (isRadio) {\r\n // 单选只能选中或者切换其他的不能取消选中 后续看是否有支持的必要 todo\r\n if (checked && !inputElem.prop('checked')) {\r\n triggerEvent()\r\n }\r\n } else {\r\n if (layui.type(checked) === 'boolean') {\r\n if (inputElem.prop('checked') !== checked) {\r\n // 如果当前已经是想要修改的状态则不做处理\r\n triggerEvent()\r\n }\r\n } else {\r\n // 切换\r\n triggerEvent()\r\n }\r\n }\r\n } else {\r\n var trData = that.getNodeDataByIndex(trElem.attr('data-index'));\r\n var checkName = table.config.checkName;\r\n // 如果不触发事件应该有一个方法可以更新数据以及页面的节点\r\n if (isRadio) {\r\n if (!trData) {\r\n // 单选必须是一个存在的行\r\n return;\r\n }\r\n var statusChecked = {};\r\n statusChecked[checkName] = false;\r\n // that.updateStatus(null, statusChecked); // 取消其他的选中状态\r\n that.updateStatus(null, function (d) {\r\n if (d[checkName]) {\r\n var radioElem = tableView.find('tr[lay-data-index=\"' + d[LAY_DATA_INDEX] + '\"] input[type=\"radio\"][lay-type=\"layTableRadio\"]');\r\n d[checkName] = false;\r\n\r\n // 取消当前选中行背景色\r\n that.setRowCheckedClass(radioElem.closest('tr'), false);\r\n form.render(radioElem.prop('checked', false));\r\n }\r\n }); // 取消其他的选中状态\r\n trData[checkName] = checked;\r\n\r\n that.setRowCheckedClass(trElem, checked); // 标记当前选中行背景色\r\n that.setRowCheckedClass(trElem.siblings(), false); // 取消其他行背景色\r\n\r\n form.render(trElem.find('input[type=\"radio\"][lay-type=\"layTableRadio\"]').prop('checked', checked));\r\n } else {\r\n // 切换只能用到单条,全选到这一步的时候应该是一个确定的状态\r\n checked = layui.type(checked) === 'boolean' ? checked : !trData[checkName]; // 状态切换,如果遇到不可操作的节点待处理 todo\r\n // 全选或者是一个父节点,将子节点的状态同步为当前节点的状态\r\n // 处理不可操作的信息\r\n var checkedStatusFn = function (d) {\r\n if (!d[table.config.disabledName]) { // 节点不可操作的不处理\r\n d[checkName] = checked;\r\n d[LAY_CHECKBOX_HALF] = false;\r\n }\r\n }\r\n\r\n var trs = that.updateStatus(trData ? [trData] : table.cache[tableId], checkedStatusFn, trData && ['parent', 'none'].indexOf(treeOptions.data.cascade) !== -1);\r\n var checkboxElem = tableView.find(trs.map(function (value) {\r\n return 'tr[lay-data-index=\"' + value[LAY_DATA_INDEX] + '\"] input[name=\"layTableCheckbox\"]:not(:disabled)';\r\n }).join(','));\r\n\r\n that.setRowCheckedClass(checkboxElem.closest('tr'), checked); // 标记当前选中行背景色\r\n form.render(checkboxElem.prop({checked: checked, indeterminate: false}));\r\n\r\n var trDataP;\r\n\r\n // 更新父节点以及更上层节点的状态\r\n if (trData && trData[LAY_PARENT_INDEX]) {\r\n // 找到父节点,然后判断父节点的子节点是否全部选中\r\n trDataP = that.getNodeDataByIndex(trData[LAY_PARENT_INDEX]);\r\n }\r\n\r\n return that.updateCheckStatus(trDataP, checked);\r\n }\r\n }\r\n }\r\n\r\n // 多选\r\n treeTable.on('checkbox', function (obj) {\r\n var options = obj.config;\r\n var tableView = options.elem.next();\r\n var tableId = options.id;\r\n\r\n if (tableView.hasClass(TABLE_TREE)) {\r\n var that = getThisTable(tableId);\r\n var checked = obj.checked;\r\n updateObjParams(obj)\r\n obj.isAll = checkNode.call(that, obj.tr, checked);\r\n }\r\n })\r\n\r\n /**\r\n * 设置行选中状态\r\n * @param {String} id 树表id\r\n * @param {Object} opts\r\n * @param {Object|String} opts.index 节点下标\r\n * @param {Boolean} opts.checked 选中或取消\r\n * @param {Boolean} [opts.callbackFlag] 是否触发事件回调\r\n * */\r\n treeTable.setRowChecked = function (id, opts) {\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n\r\n var options = that.getOptions();\r\n var tableView = options.elem.next();\r\n\r\n opts = opts || {};\r\n\r\n var node = opts.index;\r\n var checked = opts.checked;\r\n var callbackFlag = opts.callbackFlag;\r\n\r\n var dataIndex = layui.type(node) === 'string' ? node : node[LAY_DATA_INDEX];\r\n // 判断是否在当前页面中\r\n var nodeData = that.getNodeDataByIndex(dataIndex);\r\n if (!nodeData) {\r\n // 目前只能处理当前页的数据\r\n return;\r\n }\r\n\r\n var collectNeedExpandNodeIndex = function(index){\r\n needExpandIndex.push(index);\r\n var trElem = tableView.find('tr[lay-data-index=\"' + index + '\"]');\r\n if (!trElem.length) {\r\n var nodeData = that.getNodeDataByIndex(index);\r\n var parentIndex = nodeData[LAY_PARENT_INDEX];\r\n parentIndex && collectNeedExpandNodeIndex(parentIndex);\r\n }\r\n }\r\n\r\n // 判断是否展开过\r\n var trElem = tableView.find('tr[lay-data-index=\"' + dataIndex + '\"]');\r\n if (!trElem.length) {\r\n var parentIndex = nodeData[LAY_PARENT_INDEX];\r\n var needExpandIndex = [];\r\n collectNeedExpandNodeIndex(parentIndex);\r\n // 如果还没有展开没有渲染的要先渲染出来\r\n layui.each(needExpandIndex.reverse(),function(index, nodeIndex){\r\n treeTable.expandNode(id, {\r\n index: nodeIndex,\r\n expandFlag: true\r\n });\r\n })\r\n trElem = tableView.find('tr[lay-data-index=\"' + dataIndex + '\"]');\r\n }\r\n checkNode.call(that, trElem, checked, callbackFlag);\r\n }\r\n\r\n treeTable.checkAllNodes = function (id, checked) {\r\n var that = getThisTable(id);\r\n if(!that) return;\r\n\r\n var options = that.getOptions();\r\n var tableView = options.elem.next();\r\n\r\n checkNode.call(that, tableView.find('tr[data-index=\"NONE\"]'), !!checked)\r\n }\r\n\r\n /**\r\n * 获得数据\r\n * @param {String} id 表格id\r\n * @param {Boolean} [isSimpleData] 是否返回平铺结构的数据\r\n * @return {Array} 表格数据\r\n * */\r\n treeTable.getData = function (id, isSimpleData) {\r\n var that = getThisTable(id);\r\n if (!that) return;\r\n\r\n var tableData = [];\r\n layui.each($.extend(true, [], table.cache[id] || []), function (index, item) {\r\n // 遍历排除掉临时的数据\r\n tableData.push(item);\r\n })\r\n return isSimpleData ? that.treeToFlat(tableData) : tableData;\r\n }\r\n\r\n /**\r\n * 重新加载子节点\r\n * @param {String} id 表格id\r\n * @param {String} dataIndex 父节点的dataIndex\r\n * */\r\n treeTable.reloadAsyncNode = function (id, dataIndex) {\r\n var that = getThisTable(id);\r\n if (!that) {\r\n return;\r\n }\r\n\r\n var options = that.getOptions();\r\n var treeOptions = options.tree;\r\n if (!treeOptions.async || !treeOptions.async.enable) {\r\n return;\r\n }\r\n var dataP = that.getNodeDataByIndex(dataIndex);\r\n if (!dataP) {\r\n return;\r\n }\r\n dataP[LAY_HAS_EXPANDED] = false;\r\n dataP[LAY_EXPAND] = false;\r\n dataP[LAY_ASYNC_STATUS] = false;\r\n layui.each(that.treeToFlat(dataP[treeOptions.customName.children]).reverse(), function (i1, item1) {\r\n treeTable.removeNode(id, item1[LAY_DATA_INDEX]);\r\n })\r\n // 重新展开\r\n treeTable.expandNode(id, {\r\n index: dataIndex,\r\n expandFlag: true,\r\n callbackFlag: true,\r\n })\r\n }\r\n\r\n /**\r\n * 通过数据id获取节点对象\r\n * */\r\n treeTable.getNodeById = function (id, dataId) {\r\n var that = getThisTable(id);\r\n if (!that) return;\r\n\r\n return that.getNodeById(dataId);\r\n }\r\n\r\n /**\r\n * 根据自定义规则搜索节点数据\r\n * @param {String} id 树表id\r\n * @param {Function} filter 自定义过滤器函数\r\n * @param {Object} [opts]\r\n * @param {Boolean} [opts.isSingle] 是否只找到第一个\r\n * @param {Object} [opts.parentNode] 在指定在某个父节点下的子节点中搜索\r\n * @return {Object} 节点对象\r\n * */\r\n treeTable.getNodesByFilter = function (id, filter, opts) {\r\n var that = getThisTable(id);\r\n if (!that) return;\r\n var options = that.getOptions();\r\n\r\n opts = opts || {};\r\n var isSingle = opts.isSingle;\r\n var parentNode = opts.parentNode;\r\n var dataP = parentNode && parentNode.data;\r\n // dataP = dataP || table.cache[id];\r\n var nodes = that.treeToFlat(dataP ? (dataP[options.tree.customName.children] || []) : table.cache[id]).filter(filter);\r\n var nodesResult = [];\r\n layui.each(nodes, function (i1, item1) {\r\n nodesResult.push(that.getNodeByIndex(item1[LAY_DATA_INDEX]));\r\n if (isSingle) {\r\n return true;\r\n }\r\n });\r\n\r\n return nodesResult;\r\n }\r\n\r\n\r\n // 记录所有实例\r\n thisTreeTable.that = {}; // 记录所有实例对象\r\n // thisTreeTable.config = {}; // 记录所有实例配置项\r\n\r\n // 重载\r\n treeTable.reload = function (id, options, deep, type) {\r\n // deep = deep !== false; // 默认采用深拷贝\r\n var that = getThisTable(id);\r\n if (!that) return;\r\n that.reload(options, deep, type);\r\n return thisTreeTable.call(that);\r\n };\r\n\r\n // 核心入口\r\n treeTable.render = function (options) {\r\n var inst = new Class(options);\r\n return thisTreeTable.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, treeTable);\r\n});\r\n","/**\r\n * tree 树组件\r\n */\r\n\r\nlayui.define('form', function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var form = layui.form;\r\n var layer = layui.layer;\r\n \r\n // 模块名\r\n var MOD_NAME = 'tree';\r\n\r\n // 外部接口\r\n var tree = {\r\n config: {\r\n customName: { // 自定义 data 字段名\r\n id: 'id',\r\n title: 'title',\r\n children: 'children'\r\n }\r\n },\r\n index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0,\r\n\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n \r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id || that.index;\r\n \r\n thisModule.that[id] = that; // 记录当前实例对象\r\n thisModule.config[id] = options; // 记录当前实例配置项\r\n \r\n return {\r\n config: options,\r\n // 重置实例\r\n reload: function(options){\r\n that.reload.call(that, options);\r\n },\r\n getChecked: function(){\r\n return that.getChecked.call(that);\r\n },\r\n setChecked: function(id){// 设置值\r\n return that.setChecked.call(that, id);\r\n }\r\n }\r\n };\r\n \r\n // 获取当前实例配置项\r\n var getThisModuleConfig = function(id){\r\n var config = thisModule.config[id];\r\n if(!config) hint.error('The ID option was not found in the '+ MOD_NAME +' instance');\r\n return config || null;\r\n }\r\n\r\n // 字符常量\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var NONE = 'layui-none';\r\n var DISABLED = 'layui-disabled';\r\n \r\n var ELEM_VIEW = 'layui-tree';\r\n var ELEM_SET = 'layui-tree-set';\r\n var ICON_CLICK = 'layui-tree-iconClick';\r\n var ICON_ADD = 'layui-icon-addition';\r\n var ICON_SUB = 'layui-icon-subtraction';\r\n var ELEM_ENTRY = 'layui-tree-entry';\r\n var ELEM_MAIN = 'layui-tree-main';\r\n var ELEM_TEXT = 'layui-tree-txt';\r\n var ELEM_PACK = 'layui-tree-pack';\r\n var ELEM_SPREAD = 'layui-tree-spread';\r\n var ELEM_LINE_SHORT = 'layui-tree-setLineShort';\r\n var ELEM_SHOW = 'layui-tree-showLine';\r\n var ELEM_EXTEND = 'layui-tree-lineExtend';\r\n \r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++tree.index;\r\n that.config = $.extend({}, that.config, tree.config, options);\r\n that.render();\r\n };\r\n\r\n // 默认配置\r\n Class.prototype.config = {\r\n data: [], // 数据\r\n \r\n showCheckbox: false, // 是否显示复选框\r\n showLine: true, // 是否开启连接线\r\n accordion: false, // 是否开启手风琴模式\r\n onlyIconControl: false, // 是否仅允许节点左侧图标控制展开收缩\r\n isJump: false, // 是否允许点击节点时弹出新窗口跳转\r\n edit: false, // 是否开启节点的操作图标\r\n \r\n text: {\r\n defaultNodeName: '未命名', // 节点默认名称\r\n none: '无数据' // 数据为空时的文本提示\r\n }\r\n };\r\n \r\n // 重载实例\r\n Class.prototype.reload = function(options){\r\n var that = this;\r\n \r\n layui.each(options, function(key, item){\r\n if(layui.type(item) === 'array') delete that.config[key];\r\n });\r\n \r\n that.config = $.extend(true, {}, that.config, options);\r\n that.render();\r\n };\r\n\r\n // 主体渲染\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 初始化自定义字段名\r\n options.customName = $.extend({}, tree.config.customName, options.customName);\r\n \r\n that.checkids = [];\r\n\r\n var temp = $('
                          ');\r\n that.tree(temp);\r\n\r\n var othis = options.elem = $(options.elem);\r\n if(!othis[0]) return;\r\n\r\n // 索引\r\n that.key = options.id || that.index;\r\n \r\n // 插入组件结构\r\n that.elem = temp;\r\n that.elemNone = $('
                          '+ options.text.none +'
                          ');\r\n othis.html(that.elem);\r\n\r\n if(that.elem.find('.layui-tree-set').length == 0){\r\n return that.elem.append(that.elemNone);\r\n };\r\n \r\n // 复选框渲染\r\n if(options.showCheckbox){\r\n that.renderForm('checkbox');\r\n };\r\n\r\n that.elem.find('.layui-tree-set').each(function(){\r\n var othis = $(this);\r\n // 最外层\r\n if(!othis.parent('.layui-tree-pack')[0]){\r\n othis.addClass('layui-tree-setHide');\r\n };\r\n\r\n // 没有下一个节点 上一层父级有延伸线\r\n if(!othis.next()[0] && othis.parents('.layui-tree-pack').eq(1).hasClass('layui-tree-lineExtend')){\r\n othis.addClass(ELEM_LINE_SHORT);\r\n };\r\n \r\n // 没有下一个节点 外层最后一个\r\n if(!othis.next()[0] && !othis.parents('.layui-tree-set').eq(0).next()[0]){\r\n othis.addClass(ELEM_LINE_SHORT);\r\n };\r\n });\r\n\r\n that.events();\r\n };\r\n \r\n // 渲染表单\r\n Class.prototype.renderForm = function(type){\r\n form.render(type, 'LAY-tree-'+ this.index);\r\n };\r\n\r\n // 节点解析\r\n Class.prototype.tree = function(elem, children){\r\n var that = this;\r\n var options = that.config;\r\n var customName = options.customName;\r\n var data = children || options.data;\r\n\r\n // 遍历数据\r\n layui.each(data, function(index, item){\r\n var hasChild = item[customName.children] && item[customName.children].length > 0;\r\n var packDiv = $('
                          ');\r\n var entryDiv = $(['
                          '\r\n ,'
                          '\r\n ,'
                          '\r\n // 箭头\r\n ,function(){\r\n if(options.showLine){\r\n if(hasChild){\r\n return '';\r\n }else{\r\n return '';\r\n };\r\n }else{\r\n return '';\r\n };\r\n }()\r\n \r\n // 复选框\r\n ,function(){\r\n return options.showCheckbox ? '' : '';\r\n }()\r\n \r\n // 节点\r\n ,function(){\r\n if(options.isJump && item.href){\r\n return ''+ (item[customName.title] || item.label || options.text.defaultNodeName) +'';\r\n }else{\r\n return ''+ (item[customName.title] || item.label || options.text.defaultNodeName) +'';\r\n }\r\n }()\r\n ,'
                          '\r\n \r\n // 节点操作图标\r\n ,function(){\r\n if(!options.edit) return '';\r\n \r\n var editIcon = {\r\n add: ''\r\n ,update: ''\r\n ,del: ''\r\n }, arr = ['
                          '];\r\n \r\n if(options.edit === true){\r\n options.edit = ['update', 'del']\r\n }\r\n \r\n if(typeof options.edit === 'object'){\r\n layui.each(options.edit, function(i, val){\r\n arr.push(editIcon[val] || '')\r\n });\r\n return arr.join('') + '
                          ';\r\n }\r\n }()\r\n ,'
                          '].join(''));\r\n\r\n // 如果有子节点,则递归继续生成树\r\n if(hasChild){\r\n entryDiv.append(packDiv);\r\n that.tree(packDiv, item[customName.children]);\r\n };\r\n\r\n elem.append(entryDiv);\r\n \r\n // 若有前置节点,前置节点加连接线\r\n if(entryDiv.prev('.'+ELEM_SET)[0]){\r\n entryDiv.prev().children('.layui-tree-pack').addClass('layui-tree-showLine');\r\n };\r\n \r\n // 若无子节点,则父节点加延伸线\r\n if(!hasChild){\r\n entryDiv.parent('.layui-tree-pack').addClass('layui-tree-lineExtend');\r\n };\r\n\r\n // 展开节点操作\r\n that.spread(entryDiv, item);\r\n \r\n // 选择框\r\n if(options.showCheckbox){\r\n item.checked && that.checkids.push(item[customName.id]);\r\n that.checkClick(entryDiv, item);\r\n }\r\n \r\n // 操作节点\r\n options.edit && that.operate(entryDiv, item);\r\n \r\n });\r\n };\r\n\r\n // 展开节点\r\n Class.prototype.spread = function(elem, item){\r\n var that = this;\r\n var options = that.config;\r\n var entry = elem.children('.'+ELEM_ENTRY);\r\n var elemMain = entry.children('.'+ ELEM_MAIN);\r\n var elemCheckbox = elemMain.find('input[same=\"layuiTreeCheck\"]');\r\n var elemIcon = entry.find('.'+ ICON_CLICK);\r\n var elemText = entry.find('.'+ ELEM_TEXT);\r\n var touchOpen = options.onlyIconControl ? elemIcon : elemMain; // 判断展开通过节点还是箭头图标\r\n var state = '';\r\n \r\n // 展开收缩\r\n touchOpen.on('click', function(e){\r\n var packCont = elem.children('.'+ELEM_PACK)\r\n ,iconClick = touchOpen.children('.layui-icon')[0] ? touchOpen.children('.layui-icon') : touchOpen.find('.layui-tree-icon').children('.layui-icon');\r\n\r\n // 若没有子节点\r\n if(!packCont[0]){\r\n state = 'normal';\r\n }else{\r\n if(elem.hasClass(ELEM_SPREAD)){\r\n elem.removeClass(ELEM_SPREAD);\r\n packCont.slideUp(200);\r\n iconClick.removeClass(ICON_SUB).addClass(ICON_ADD); \r\n that.updateFieldValue(item, 'spread', false);\r\n }else{\r\n elem.addClass(ELEM_SPREAD);\r\n packCont.slideDown(200);\r\n iconClick.addClass(ICON_SUB).removeClass(ICON_ADD);\r\n that.updateFieldValue(item, 'spread', true);\r\n\r\n // 是否手风琴\r\n if(options.accordion){\r\n var sibls = elem.siblings('.'+ELEM_SET);\r\n sibls.removeClass(ELEM_SPREAD);\r\n sibls.children('.'+ELEM_PACK).slideUp(200);\r\n sibls.find('.layui-tree-icon').children('.layui-icon').removeClass(ICON_SUB).addClass(ICON_ADD);\r\n };\r\n };\r\n };\r\n });\r\n \r\n // 点击回调\r\n elemText.on('click', function(){\r\n var othis = $(this);\r\n \r\n // 判断是否禁用状态\r\n if(othis.hasClass(DISABLED)) return;\r\n \r\n // 判断展开收缩状态\r\n if(elem.hasClass(ELEM_SPREAD)){\r\n state = options.onlyIconControl ? 'open' : 'close';\r\n } else {\r\n state = options.onlyIconControl ? 'close' : 'open';\r\n }\r\n\r\n // 获取选中状态\r\n if(elemCheckbox[0]){\r\n that.updateFieldValue(item, 'checked', elemCheckbox.prop('checked'));\r\n }\r\n \r\n // 点击产生的回调\r\n options.click && options.click({\r\n elem: elem,\r\n state: state,\r\n data: item\r\n });\r\n });\r\n };\r\n\r\n // 更新数据源 checked,spread 字段值\r\n Class.prototype.updateFieldValue = function(obj, field, value){\r\n if(field in obj) obj[field] = value;\r\n };\r\n \r\n // 计算复选框选中状态\r\n Class.prototype.setCheckbox = function(elem, item, elemCheckbox){\r\n var that = this;\r\n var options = that.config;\r\n var customName = options.customName;\r\n var checked = elemCheckbox.prop('checked');\r\n \r\n if(elemCheckbox.prop('disabled')) return;\r\n\r\n // 同步子节点选中状态\r\n if(typeof item[customName.children] === 'object' || elem.find('.'+ELEM_PACK)[0]){\r\n var elemCheckboxs = elem.find('.'+ ELEM_PACK).find('input[same=\"layuiTreeCheck\"]');\r\n elemCheckboxs.each(function(index){\r\n if(this.disabled) return; // 不可点击则跳过\r\n var children = item[customName.children][index];\r\n if(children) that.updateFieldValue(children, 'checked', checked);\r\n that.updateFieldValue(this, 'checked', checked);\r\n });\r\n };\r\n\r\n // 同步父节点选中状态\r\n var setParentsChecked = function(thisNodeElem){\r\n // 若无父节点,则终止递归\r\n if(!thisNodeElem.parents('.'+ ELEM_SET)[0]) return;\r\n\r\n var state;\r\n var parentPack = thisNodeElem.parent('.'+ ELEM_PACK);\r\n var parentNodeElem = parentPack.parent();\r\n var parentCheckbox = parentPack.prev().find('input[same=\"layuiTreeCheck\"]');\r\n\r\n // 如果子节点有任意一条选中,则父节点为选中状态\r\n if(checked){\r\n parentCheckbox.prop('checked', checked);\r\n } else { // 如果当前节点取消选中,则根据计算“兄弟和子孙”节点选中状态,来同步父节点选中状态\r\n parentPack.find('input[same=\"layuiTreeCheck\"]').each(function(){\r\n if(this.checked){\r\n state = true;\r\n }\r\n });\r\n \r\n // 如果兄弟子孙节点全部未选中,则父节点也应为非选中状态\r\n state || parentCheckbox.prop('checked', false);\r\n }\r\n \r\n // 向父节点递归\r\n setParentsChecked(parentNodeElem);\r\n };\r\n \r\n setParentsChecked(elem);\r\n\r\n that.renderForm('checkbox');\r\n };\r\n \r\n // 复选框选择\r\n Class.prototype.checkClick = function(elem, item){\r\n var that = this;\r\n var options = that.config;\r\n var entry = elem.children('.'+ ELEM_ENTRY);\r\n var elemMain = entry.children('.'+ ELEM_MAIN);\r\n \r\n \r\n \r\n // 点击复选框\r\n elemMain.on('click', 'input[same=\"layuiTreeCheck\"]+', function(e){\r\n layui.stope(e); // 阻止点击节点事件\r\n\r\n var elemCheckbox = $(this).prev();\r\n var checked = elemCheckbox.prop('checked');\r\n \r\n if(elemCheckbox.prop('disabled')) return;\r\n \r\n that.setCheckbox(elem, item, elemCheckbox);\r\n that.updateFieldValue(item, 'checked', checked);\r\n\r\n // 复选框点击产生的回调\r\n options.oncheck && options.oncheck({\r\n elem: elem,\r\n checked: checked,\r\n data: item\r\n });\r\n });\r\n };\r\n\r\n // 节点操作\r\n Class.prototype.operate = function(elem, item){\r\n var that = this;\r\n var options = that.config;\r\n var customName = options.customName;\r\n var entry = elem.children('.'+ ELEM_ENTRY);\r\n var elemMain = entry.children('.'+ ELEM_MAIN);\r\n\r\n entry.children('.layui-tree-btnGroup').on('click', '.layui-icon', function(e){\r\n layui.stope(e); // 阻止节点操作\r\n\r\n var type = $(this).data(\"type\");\r\n var packCont = elem.children('.'+ELEM_PACK);\r\n var returnObj = {\r\n data: item,\r\n type: type,\r\n elem:elem\r\n };\r\n // 增加\r\n if(type == 'add'){\r\n // 若节点本身无子节点\r\n if(!packCont[0]){\r\n // 若开启连接线,更改图标样式\r\n if(options.showLine){\r\n elemMain.find('.'+ICON_CLICK).addClass('layui-tree-icon');\r\n elemMain.find('.'+ICON_CLICK).children('.layui-icon').addClass(ICON_ADD).removeClass('layui-icon-file');\r\n // 若未开启连接线,显示箭头\r\n } else {\r\n elemMain.find('.layui-tree-iconArrow').removeClass(HIDE);\r\n };\r\n // 节点添加子节点容器\r\n elem.append('
                          ');\r\n };\r\n\r\n // 新增节点\r\n var key = options.operate && options.operate(returnObj);\r\n var obj = {};\r\n\r\n obj[customName.title] = options.text.defaultNodeName;\r\n obj[customName.id] = key;\r\n that.tree(elem.children('.'+ELEM_PACK), [obj]);\r\n \r\n // 放在新增后面,因为要对元素进行操作\r\n if(options.showLine){\r\n // 节点本身无子节点\r\n if(!packCont[0]){\r\n // 遍历兄弟节点,判断兄弟节点是否有子节点\r\n var siblings = elem.siblings('.'+ELEM_SET)\r\n var num = 1;\r\n var parentPack = elem.parent('.'+ELEM_PACK);\r\n\r\n layui.each(siblings, function(index, i){\r\n if(!$(i).children('.'+ELEM_PACK)[0]){\r\n num = 0;\r\n };\r\n });\r\n\r\n // 若兄弟节点都有子节点\r\n if(num == 1){\r\n // 兄弟节点添加连接线\r\n siblings.children('.'+ELEM_PACK).addClass(ELEM_SHOW);\r\n siblings.children('.'+ELEM_PACK).children('.'+ELEM_SET).removeClass(ELEM_LINE_SHORT);\r\n elem.children('.'+ELEM_PACK).addClass(ELEM_SHOW);\r\n // 父级移除延伸线\r\n parentPack.removeClass(ELEM_EXTEND);\r\n // 同层节点最后一个更改线的状态\r\n parentPack.children('.'+ELEM_SET).last().children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT);\r\n } else {\r\n elem.children('.'+ELEM_PACK).children('.'+ELEM_SET).addClass(ELEM_LINE_SHORT);\r\n };\r\n } else {\r\n // 添加延伸线\r\n if(!packCont.hasClass(ELEM_EXTEND)){\r\n packCont.addClass(ELEM_EXTEND);\r\n };\r\n // 子节点添加延伸线\r\n elem.find('.'+ELEM_PACK).each(function(){\r\n $(this).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT);\r\n });\r\n // 如果前一个节点有延伸线\r\n if(packCont.children('.'+ELEM_SET).last().prev().hasClass(ELEM_LINE_SHORT)){\r\n packCont.children('.'+ELEM_SET).last().prev().removeClass(ELEM_LINE_SHORT);\r\n }else{\r\n // 若之前的没有,说明处于连接状态\r\n packCont.children('.'+ELEM_SET).last().removeClass(ELEM_LINE_SHORT);\r\n };\r\n // 若是最外层,要始终保持相连的状态\r\n if(!elem.parent('.'+ELEM_PACK)[0] && elem.next()[0]){\r\n packCont.children('.'+ELEM_SET).last().removeClass(ELEM_LINE_SHORT);\r\n };\r\n };\r\n };\r\n if(!options.showCheckbox) return;\r\n // 若开启复选框,同步新增节点状态\r\n if(elemMain.find('input[same=\"layuiTreeCheck\"]')[0].checked){\r\n var packLast = elem.children('.'+ELEM_PACK).children('.'+ELEM_SET).last();\r\n packLast.find('input[same=\"layuiTreeCheck\"]')[0].checked = true;\r\n };\r\n that.renderForm('checkbox');\r\n \r\n // 修改\r\n } else if(type == 'update') {\r\n var text = elemMain.children('.'+ ELEM_TEXT).html();\r\n elemMain.children('.'+ ELEM_TEXT).html('');\r\n // 添加输入框,覆盖在文字上方\r\n elemMain.append('');\r\n // 获取焦点\r\n elemMain.children('.layui-tree-editInput').val(text).focus();\r\n // 嵌入文字移除输入框\r\n var getVal = function(input){\r\n var textNew = input.val().trim();\r\n textNew = textNew ? textNew : options.text.defaultNodeName;\r\n input.remove();\r\n elemMain.children('.'+ ELEM_TEXT).html(textNew);\r\n \r\n // 同步数据\r\n returnObj.data[customName.title] = textNew;\r\n \r\n // 节点修改的回调\r\n options.operate && options.operate(returnObj);\r\n };\r\n // 失去焦点\r\n elemMain.children('.layui-tree-editInput').blur(function(){\r\n getVal($(this));\r\n });\r\n // 回车\r\n elemMain.children('.layui-tree-editInput').on('keydown', function(e){\r\n if(e.keyCode === 13){\r\n e.preventDefault();\r\n getVal($(this));\r\n };\r\n });\r\n\r\n // 删除\r\n } else {\r\n layer.confirm('确认删除该节点 \"'+ (item[customName.title] || '') +'\" 吗?', function(index){\r\n options.operate && options.operate(returnObj); // 节点删除的回调\r\n returnObj.status = 'remove'; // 标注节点删除\r\n \r\n layer.close(index);\r\n \r\n // 若删除最后一个,显示空数据提示\r\n if(!elem.prev('.'+ELEM_SET)[0] && !elem.next('.'+ELEM_SET)[0] && !elem.parent('.'+ELEM_PACK)[0]){\r\n elem.remove();\r\n that.elem.append(that.elemNone);\r\n return;\r\n };\r\n // 若有兄弟节点\r\n if(elem.siblings('.'+ELEM_SET).children('.'+ELEM_ENTRY)[0]){\r\n // 若开启复选框\r\n if(options.showCheckbox){\r\n // 若开启复选框,进行下步操作\r\n var elemDel = function(elem){\r\n // 若无父结点,则不执行\r\n if(!elem.parents('.'+ELEM_SET)[0]) return;\r\n var siblingTree = elem.siblings('.'+ELEM_SET).children('.'+ELEM_ENTRY);\r\n var parentTree = elem.parent('.'+ELEM_PACK).prev();\r\n var checkState = parentTree.find('input[same=\"layuiTreeCheck\"]')[0];\r\n var state = 1;\r\n var num = 0;\r\n\r\n // 若父节点未勾选\r\n if(checkState.checked == false){\r\n // 遍历兄弟节点\r\n siblingTree.each(function(i, item1){\r\n var input = $(item1).find('input[same=\"layuiTreeCheck\"]')[0]\r\n if(input.checked == false && !input.disabled){\r\n state = 0;\r\n };\r\n // 判断是否全为不可勾选框\r\n if(!input.disabled){\r\n num = 1;\r\n };\r\n });\r\n // 若有可勾选选择框并且已勾选\r\n if(state == 1 && num == 1){\r\n // 勾选父节点\r\n checkState.checked = true;\r\n that.renderForm('checkbox');\r\n // 向上遍历祖先节点\r\n elemDel(parentTree.parent('.'+ELEM_SET));\r\n };\r\n };\r\n };\r\n elemDel(elem);\r\n };\r\n // 若开启连接线\r\n if(options.showLine){\r\n // 遍历兄弟节点,判断兄弟节点是否有子节点\r\n var siblings = elem.siblings('.'+ELEM_SET);\r\n var num = 1;\r\n var parentPack = elem.parent('.'+ELEM_PACK);\r\n\r\n layui.each(siblings, function(index, i){\r\n if(!$(i).children('.'+ELEM_PACK)[0]){\r\n num = 0;\r\n };\r\n });\r\n // 若兄弟节点都有子节点\r\n if(num == 1){\r\n // 若节点本身无子节点\r\n if(!packCont[0]){\r\n // 父级去除延伸线,因为此时子节点里没有空节点\r\n parentPack.removeClass(ELEM_EXTEND);\r\n siblings.children('.'+ELEM_PACK).addClass(ELEM_SHOW);\r\n siblings.children('.'+ELEM_PACK).children('.'+ELEM_SET).removeClass(ELEM_LINE_SHORT);\r\n };\r\n // 若为最后一个节点\r\n if(!elem.next()[0]){\r\n elem.prev().children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT);\r\n }else{\r\n parentPack.children('.'+ELEM_SET).last().children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT);\r\n };\r\n // 若为最外层最后一个节点,去除前一个结点的连接线\r\n if(!elem.next()[0] && !elem.parents('.'+ELEM_SET)[1] && !elem.parents('.'+ELEM_SET).eq(0).next()[0]){\r\n elem.prev('.'+ELEM_SET).addClass(ELEM_LINE_SHORT);\r\n };\r\n }else{\r\n // 若为最后一个节点且有延伸线\r\n if(!elem.next()[0] && elem.hasClass(ELEM_LINE_SHORT)){\r\n elem.prev().addClass(ELEM_LINE_SHORT);\r\n };\r\n };\r\n };\r\n \r\n } else {\r\n // 若无兄弟节点\r\n var prevDiv = elem.parent('.'+ELEM_PACK).prev();\r\n // 若开启了连接线\r\n if(options.showLine){\r\n prevDiv.find('.'+ICON_CLICK).removeClass('layui-tree-icon');\r\n prevDiv.find('.'+ICON_CLICK).children('.layui-icon').removeClass(ICON_SUB).addClass('layui-icon-file');\r\n // 父节点所在层添加延伸线\r\n var pare = prevDiv.parents('.'+ELEM_PACK).eq(0);\r\n pare.addClass(ELEM_EXTEND);\r\n\r\n // 兄弟节点最后子节点添加延伸线\r\n pare.children('.'+ELEM_SET).each(function(){\r\n $(this).children('.'+ELEM_PACK).children('.'+ELEM_SET).last().addClass(ELEM_LINE_SHORT);\r\n });\r\n }else{\r\n // 父节点隐藏箭头\r\n prevDiv.find('.layui-tree-iconArrow').addClass(HIDE);\r\n };\r\n // 移除展开属性\r\n elem.parents('.'+ELEM_SET).eq(0).removeClass(ELEM_SPREAD);\r\n // 移除节点容器\r\n elem.parent('.'+ELEM_PACK).remove();\r\n };\r\n\r\n elem.remove();\r\n });\r\n \r\n };\r\n });\r\n };\r\n\r\n // 部分事件\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n var checkWarp = that.elem.find('.layui-tree-checkedFirst');\r\n \r\n // 初始选中\r\n that.setChecked(that.checkids);\r\n \r\n // 搜索\r\n that.elem.find('.layui-tree-search').on('keyup', function(){\r\n var input = $(this);\r\n var val = input.val();\r\n var pack = input.nextAll();\r\n var arr = [];\r\n\r\n // 遍历所有的值\r\n pack.find('.'+ ELEM_TEXT).each(function(){\r\n var entry = $(this).parents('.'+ELEM_ENTRY);\r\n // 若值匹配,加一个类以作标识\r\n if($(this).html().indexOf(val) != -1){\r\n arr.push($(this).parent());\r\n \r\n var select = function(div){\r\n div.addClass('layui-tree-searchShow');\r\n // 向上父节点渲染\r\n if(div.parent('.'+ELEM_PACK)[0]){\r\n select(div.parent('.'+ELEM_PACK).parent('.'+ELEM_SET));\r\n };\r\n };\r\n select(entry.parent('.'+ELEM_SET));\r\n };\r\n });\r\n\r\n // 根据标志剔除\r\n pack.find('.'+ELEM_ENTRY).each(function(){\r\n var parent = $(this).parent('.'+ELEM_SET);\r\n if(!parent.hasClass('layui-tree-searchShow')){\r\n parent.addClass(HIDE);\r\n };\r\n });\r\n if(pack.find('.layui-tree-searchShow').length == 0){\r\n that.elem.append(that.elemNone);\r\n };\r\n\r\n // 节点过滤的回调\r\n options.onsearch && options.onsearch({\r\n elem: arr\r\n });\r\n });\r\n\r\n // 还原搜索初始状态\r\n that.elem.find('.layui-tree-search').on('keydown', function(){\r\n $(this).nextAll().find('.'+ELEM_ENTRY).each(function(){\r\n var parent = $(this).parent('.'+ELEM_SET);\r\n parent.removeClass('layui-tree-searchShow '+ HIDE);\r\n });\r\n if($('.layui-tree-emptyText')[0]) $('.layui-tree-emptyText').remove();\r\n });\r\n };\r\n\r\n // 得到选中节点\r\n Class.prototype.getChecked = function(){\r\n var that = this;\r\n var options = that.config;\r\n var customName = options.customName;\r\n var checkId = [];\r\n var checkData = [];\r\n \r\n // 遍历节点找到选中索引\r\n that.elem.find('.layui-form-checked').each(function(){\r\n checkId.push($(this).prev()[0].value);\r\n });\r\n \r\n // 遍历节点\r\n var eachNodes = function(data, checkNode){\r\n layui.each(data, function(index, item){\r\n layui.each(checkId, function(index2, item2){\r\n if(item[customName.id] == item2){\r\n that.updateFieldValue(item, 'checked', true);\r\n\r\n var cloneItem = $.extend({}, item);\r\n delete cloneItem[customName.children];\r\n\r\n checkNode.push(cloneItem);\r\n \r\n if(item[customName.children]){\r\n cloneItem[customName.children] = [];\r\n eachNodes(item[customName.children], cloneItem[customName.children]);\r\n }\r\n return true\r\n }\r\n });\r\n });\r\n };\r\n\r\n eachNodes($.extend({}, options.data), checkData);\r\n \r\n return checkData;\r\n };\r\n\r\n // 设置选中节点\r\n Class.prototype.setChecked = function(checkedId){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 初始选中\r\n that.elem.find('.'+ELEM_SET).each(function(i, item){\r\n var thisId = $(this).data('id');\r\n var input = $(item).children('.'+ELEM_ENTRY).find('input[same=\"layuiTreeCheck\"]');\r\n var reInput = input.next();\r\n \r\n // 若返回数字\r\n if(typeof checkedId === 'number'){\r\n if(thisId.toString() == checkedId.toString()){\r\n if(!input[0].checked){\r\n reInput.click();\r\n };\r\n return false;\r\n };\r\n } \r\n // 若返回数组\r\n else if(typeof checkedId === 'object'){\r\n layui.each(checkedId, function(index, value){\r\n if(value.toString() == thisId.toString() && !input[0].checked){\r\n reInput.click();\r\n return true;\r\n }\r\n });\r\n };\r\n });\r\n };\r\n\r\n // 记录所有实例\r\n thisModule.that = {}; // 记录所有实例对象\r\n thisModule.config = {}; // 记录所有实例配置项\r\n \r\n // 重载实例\r\n tree.reload = function(id, options){\r\n var that = thisModule.that[id];\r\n that.reload(options);\r\n \r\n return thisModule.call(that);\r\n };\r\n \r\n // 获得选中的节点数据\r\n tree.getChecked = function(id){\r\n var that = thisModule.that[id];\r\n return that.getChecked();\r\n };\r\n \r\n // 设置选中节点\r\n tree.setChecked = function(id, checkedId){\r\n var that = thisModule.that[id];\r\n return that.setChecked(checkedId);\r\n };\r\n \r\n // 核心入口\r\n tree.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, tree);\r\n})","/**\r\n * transfer 穿梭框组件\r\n */\r\n\r\nlayui.define(['laytpl', 'form'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var laytpl = layui.laytpl;\r\n var form = layui.form;\r\n \r\n // 模块名\r\n var MOD_NAME = 'transfer';\r\n\r\n // 外部接口\r\n var transfer = {\r\n config: {},\r\n index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0,\r\n\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n \r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n\r\n // 操作当前实例\r\n var thisModule = function(){\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id || that.index;\r\n \r\n thisModule.that[id] = that; // 记录当前实例对象\r\n thisModule.config[id] = options; // 记录当前实例配置项\r\n \r\n return {\r\n config: options,\r\n // 重置实例\r\n reload: function(options){\r\n that.reload.call(that, options);\r\n },\r\n // 获取右侧数据\r\n getData: function(){\r\n return that.getData.call(that);\r\n }\r\n }\r\n };\r\n \r\n // 获取当前实例配置项\r\n var getThisModuleConfig = function(id){\r\n var config = thisModule.config[id];\r\n if(!config) hint.error('The ID option was not found in the '+ MOD_NAME +' instance');\r\n return config || null;\r\n };\r\n\r\n // 字符常量\r\n var ELEM = 'layui-transfer';\r\n var HIDE = 'layui-hide'; \r\n var DISABLED = 'layui-btn-disabled';\r\n var NONE = 'layui-none';\r\n var ELEM_BOX = 'layui-transfer-box';\r\n var ELEM_HEADER = 'layui-transfer-header';\r\n var ELEM_SEARCH = 'layui-transfer-search';\r\n var ELEM_ACTIVE = 'layui-transfer-active';\r\n var ELEM_DATA = 'layui-transfer-data';\r\n \r\n // 穿梭框模板\r\n var TPL_BOX = function(obj){\r\n obj = obj || {};\r\n return ['
                          '\r\n ,'
                          '\r\n ,''\r\n ,'
                          '\r\n ,'{{# if(d.data.showSearch){ }}'\r\n ,'
                          '\r\n ,''\r\n ,''\r\n ,'
                          '\r\n ,'{{# } }}'\r\n ,'
                            '\r\n ,'
                            '].join('');\r\n };\r\n \r\n // 主模板\r\n var TPL_MAIN = ['
                            '\r\n ,TPL_BOX({\r\n index: 0\r\n ,checkAllName: 'layTransferLeftCheckAll'\r\n })\r\n ,'
                            '\r\n ,''\r\n ,''\r\n ,'
                            '\r\n ,TPL_BOX({\r\n index: 1\r\n ,checkAllName: 'layTransferRightCheckAll'\r\n })\r\n ,'
                            '].join('');\r\n\r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.index = ++transfer.index;\r\n that.config = $.extend({}, that.config, transfer.config, options);\r\n that.render();\r\n };\r\n\r\n //默认配置\r\n Class.prototype.config = {\r\n title: ['列表一', '列表二'],\r\n width: 200,\r\n height: 360,\r\n data: [], // 数据源\r\n value: [], // 选中的数据\r\n showSearch: false, // 是否开启搜索\r\n id: '', // 唯一索引,默认自增 index\r\n text: {\r\n none: '无数据',\r\n searchNone: '无匹配数据'\r\n }\r\n };\r\n \r\n //重载实例\r\n Class.prototype.reload = function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n that.render();\r\n };\r\n\r\n //渲染\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n //解析模板\r\n var thisElem = that.elem = $(laytpl(TPL_MAIN, {\r\n open: '{{', // 标签符前缀\r\n close: '}}' // 标签符后缀\r\n }).render({\r\n data: options\r\n ,index: that.index //索引\r\n }));\r\n \r\n var othis = options.elem = $(options.elem);\r\n if(!othis[0]) return;\r\n \r\n //初始化属性\r\n options.data = options.data || [];\r\n options.value = options.value || [];\r\n \r\n // 初始化 id 属性 - 优先取 options > 元素 id > 自增索引\r\n options.id = 'id' in options ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n that.key = options.id;\r\n \r\n //插入组件结构\r\n othis.html(that.elem);\r\n \r\n //各级容器\r\n that.layBox = that.elem.find('.'+ ELEM_BOX)\r\n that.layHeader = that.elem.find('.'+ ELEM_HEADER)\r\n that.laySearch = that.elem.find('.'+ ELEM_SEARCH)\r\n that.layData = thisElem.find('.'+ ELEM_DATA);\r\n that.layBtn = thisElem.find('.'+ ELEM_ACTIVE + ' .layui-btn');\r\n \r\n //初始化尺寸\r\n that.layBox.css({\r\n width: options.width\r\n ,height: options.height\r\n });\r\n that.layData.css({\r\n height: function(){\r\n var height = options.height - that.layHeader.outerHeight();\r\n if(options.showSearch){\r\n height -= that.laySearch.outerHeight();\r\n }\r\n return height - 2;\r\n }()\r\n });\r\n \r\n that.renderData(); //渲染数据\r\n that.events(); //事件\r\n };\r\n \r\n // 渲染数据\r\n Class.prototype.renderData = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 左右穿梭框差异数据\r\n var arr = [{\r\n checkName: 'layTransferLeftCheck',\r\n views: []\r\n }, {\r\n checkName: 'layTransferRightCheck',\r\n views: []\r\n }];\r\n \r\n // 解析格式\r\n that.parseData(function(item){ \r\n // 标注为 selected 的为右边的数据\r\n var _index = item.selected ? 1 : 0\r\n var listElem = ['
                          • ',\r\n '',\r\n '
                          • '].join('');\r\n // 按照 options.value 顺序排列右侧数据\r\n if(_index){\r\n layui.each(options.value, function(i, v){\r\n if(v == item.value && item.selected){\r\n arr[_index].views[i] = listElem;\r\n }\r\n });\r\n } else {\r\n arr[_index].views.push(listElem);\r\n }\r\n delete item.selected;\r\n });\r\n \r\n that.layData.eq(0).html(arr[0].views.join(''));\r\n that.layData.eq(1).html(arr[1].views.join(''));\r\n \r\n that.renderCheckBtn();\r\n };\r\n \r\n //渲染表单\r\n Class.prototype.renderForm = function(type){\r\n form.render(type, 'LAY-transfer-'+ this.index);\r\n };\r\n \r\n //同步复选框和按钮状态\r\n Class.prototype.renderCheckBtn = function(obj){\r\n var that = this\r\n ,options = that.config;\r\n \r\n obj = obj || {};\r\n \r\n that.layBox.each(function(_index){\r\n var othis = $(this)\r\n ,thisDataElem = othis.find('.'+ ELEM_DATA)\r\n ,allElemCheckbox = othis.find('.'+ ELEM_HEADER).find('input[type=\"checkbox\"]')\r\n ,listElemCheckbox = thisDataElem.find('input[type=\"checkbox\"]');\r\n \r\n //同步复选框和按钮状态\r\n var nums = 0\r\n ,haveChecked = false;\r\n listElemCheckbox.each(function(){\r\n var isHide = $(this).data('hide');\r\n if(this.checked || this.disabled || isHide){\r\n nums++;\r\n }\r\n if(this.checked && !isHide){\r\n haveChecked = true;\r\n }\r\n });\r\n \r\n allElemCheckbox.prop('checked', haveChecked && nums === listElemCheckbox.length); //全选复选框状态\r\n that.layBtn.eq(_index)[haveChecked ? 'removeClass' : 'addClass'](DISABLED); //对应的按钮状态\r\n \r\n //无数据视图\r\n if(!obj.stopNone){\r\n var isNone = thisDataElem.children('li:not(.'+ HIDE +')').length\r\n that.noneView(thisDataElem, isNone ? '' : options.text.none);\r\n }\r\n });\r\n \r\n that.renderForm('checkbox');\r\n };\r\n \r\n //无数据视图\r\n Class.prototype.noneView = function(thisDataElem, text){\r\n var createNoneElem = $('

                            '+ (text || '') +'

                            ');\r\n if(thisDataElem.find('.'+ NONE)[0]){\r\n thisDataElem.find('.'+ NONE).remove();\r\n }\r\n text.replace(/\\s/g, '') && thisDataElem.append(createNoneElem);\r\n };\r\n \r\n //同步 value 属性值\r\n Class.prototype.setValue = function(){\r\n var that = this\r\n ,options = that.config\r\n ,arr = [];\r\n that.layBox.eq(1).find('.'+ ELEM_DATA +' input[type=\"checkbox\"]').each(function(){\r\n var isHide = $(this).data('hide');\r\n isHide || arr.push(this.value);\r\n });\r\n options.value = arr;\r\n \r\n return that;\r\n };\r\n\r\n //解析数据\r\n Class.prototype.parseData = function(callback){\r\n var that = this\r\n ,options = that.config\r\n ,newData = [];\r\n \r\n layui.each(options.data, function(index, item){\r\n //解析格式\r\n item = (typeof options.parseData === 'function' \r\n ? options.parseData(item) \r\n : item) || item;\r\n \r\n newData.push(item = $.extend({}, item))\r\n \r\n layui.each(options.value, function(index2, item2){\r\n if(item2 == item.value){\r\n item.selected = true;\r\n }\r\n });\r\n callback && callback(item);\r\n });\r\n \r\n options.data = newData;\r\n return that;\r\n };\r\n \r\n //获得右侧面板数据\r\n Class.prototype.getData = function(value){\r\n var that = this\r\n ,options = that.config\r\n ,selectedData = [];\r\n \r\n that.setValue();\r\n \r\n layui.each(value || options.value, function(index, item){\r\n layui.each(options.data, function(index2, item2){\r\n delete item2.selected;\r\n if(item == item2.value){\r\n selectedData.push(item2);\r\n };\r\n });\r\n });\r\n return selectedData;\r\n };\r\n\r\n //执行穿梭\r\n Class.prototype.transfer = function (_index, elem) {\r\n var that = this\r\n ,options = that.config\r\n ,thisBoxElem = that.layBox.eq(_index)\r\n ,arr = []\r\n\r\n if (!elem) {\r\n //通过按钮触发找到选中的进行移动\r\n thisBoxElem.each(function(_index){\r\n var othis = $(this)\r\n ,thisDataElem = othis.find('.'+ ELEM_DATA);\r\n\r\n thisDataElem.children('li').each(function(){\r\n var thisList = $(this)\r\n ,thisElemCheckbox = thisList.find('input[type=\"checkbox\"]')\r\n ,isHide = thisElemCheckbox.data('hide');\r\n\r\n if(thisElemCheckbox[0].checked && !isHide){\r\n thisElemCheckbox[0].checked = false;\r\n thisBoxElem.siblings('.'+ ELEM_BOX).find('.'+ ELEM_DATA).append(thisList.clone());\r\n thisList.remove();\r\n\r\n //记录当前穿梭的数据\r\n arr.push(thisElemCheckbox[0].value);\r\n }\r\n\r\n that.setValue();\r\n });\r\n });\r\n } else {\r\n //双击单条记录移动\r\n var thisList = elem\r\n ,thisElemCheckbox = thisList.find('input[type=\"checkbox\"]')\r\n\r\n thisElemCheckbox[0].checked = false;\r\n thisBoxElem.siblings('.'+ ELEM_BOX).find('.'+ ELEM_DATA).append(thisList.clone());\r\n thisList.remove();\r\n\r\n //记录当前穿梭的数据\r\n arr.push(thisElemCheckbox[0].value);\r\n\r\n that.setValue();\r\n }\r\n\r\n that.renderCheckBtn();\r\n\r\n //穿梭时,如果另外一个框正在搜索,则触发匹配\r\n var siblingInput = thisBoxElem.siblings('.'+ ELEM_BOX).find('.'+ ELEM_SEARCH +' input')\r\n siblingInput.val() === '' || siblingInput.trigger('keyup');\r\n\r\n //穿梭时的回调\r\n options.onchange && options.onchange(that.getData(arr), _index);\r\n }\r\n\r\n //事件\r\n Class.prototype.events = function(){\r\n var that = this\r\n ,options = that.config;\r\n \r\n //左右复选框\r\n that.elem.on('click', 'input[lay-filter=\"layTransferCheckbox\"]+', function(){ \r\n var thisElemCheckbox = $(this).prev()\r\n ,checked = thisElemCheckbox[0].checked\r\n ,thisDataElem = thisElemCheckbox.parents('.'+ ELEM_BOX).eq(0).find('.'+ ELEM_DATA);\r\n \r\n if(thisElemCheckbox[0].disabled) return;\r\n \r\n //判断是否全选\r\n if(thisElemCheckbox.attr('lay-type') === 'all'){\r\n thisDataElem.find('input[type=\"checkbox\"]').each(function(){\r\n if(this.disabled) return;\r\n this.checked = checked;\r\n });\r\n }\r\n\r\n setTimeout(function () {\r\n that.renderCheckBtn({stopNone: true});\r\n }, 0)\r\n });\r\n\r\n // 双击穿梭\r\n that.elem.on('dblclick', '.' + ELEM_DATA + '>li', function(event){\r\n var elemThis = $(this)\r\n ,thisElemCheckbox = elemThis.children('input[type=\"checkbox\"]')\r\n ,thisDataElem = elemThis.parent()\r\n ,thisBoxElem = thisDataElem.parent()\r\n\r\n if(thisElemCheckbox[0].disabled) return;\r\n\r\n that.transfer(thisBoxElem.data('index'), elemThis);\r\n })\r\n\r\n // 穿梭按钮事件\r\n that.layBtn.on('click', function(){\r\n var othis = $(this)\r\n ,_index = othis.data('index')\r\n if(othis.hasClass(DISABLED)) return;\r\n\r\n that.transfer(_index);\r\n });\r\n \r\n //搜索\r\n that.laySearch.find('input').on('keyup', function(){\r\n var value = this.value;\r\n var thisDataElem = $(this).parents('.'+ ELEM_SEARCH).eq(0).siblings('.'+ ELEM_DATA);\r\n var thisListElem = thisDataElem.children('li');\r\n\r\n thisListElem.each(function(){\r\n var thisList = $(this);\r\n var thisElemCheckbox = thisList.find('input[type=\"checkbox\"]');\r\n var title = thisElemCheckbox[0].title;\r\n\r\n // 是否区分大小写\r\n if(options.showSearch !== 'cs'){\r\n title = title.toLowerCase();\r\n value = value.toLowerCase();\r\n }\r\n\r\n var isMatch = title.indexOf(value) !== -1;\r\n\r\n thisList[isMatch ? 'removeClass': 'addClass'](HIDE);\r\n thisElemCheckbox.data('hide', isMatch ? false : true);\r\n });\r\n\r\n that.renderCheckBtn();\r\n \r\n //无匹配数据视图\r\n var isNone = thisListElem.length === thisDataElem.children('li.'+ HIDE).length;\r\n that.noneView(thisDataElem, isNone ? options.text.searchNone : '');\r\n });\r\n };\r\n \r\n //记录所有实例\r\n thisModule.that = {}; //记录所有实例对象\r\n thisModule.config = {}; //记录所有实例配置项\r\n \r\n //重载实例\r\n transfer.reload = function(id, options){\r\n var that = thisModule.that[id];\r\n that.reload(options);\r\n \r\n return thisModule.call(that);\r\n };\r\n \r\n //获得选中的数据(右侧面板)\r\n transfer.getData = function(id){\r\n var that = thisModule.that[id];\r\n return that.getData();\r\n };\r\n\r\n //核心入口\r\n transfer.render = function(options){\r\n var inst = new Class(options);\r\n return thisModule.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, transfer);\r\n});\r\n","/**\r\n * carousel 轮播模块\r\n * MIT Licensed \r\n */\r\n \r\nlayui.define(['jquery', 'lay'], function(exports){\r\n \"use strict\";\r\n \r\n var $ = layui.$;\r\n var lay = layui.lay;\r\n\r\n var hint = layui.hint();\r\n var device = layui.device();\r\n\r\n // 外部接口\r\n var carousel = {\r\n config: {}, // 全局配置项\r\n\r\n // 设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n \r\n // 事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n };\r\n \r\n // 字符常量\r\n var MOD_NAME = 'carousel';\r\n var ELEM = '.layui-carousel';\r\n var THIS = 'layui-this';\r\n var SHOW = 'layui-show';\r\n var HIDE = 'layui-hide';\r\n var DISABLED = 'layui-disabled'\r\n \r\n var ELEM_ITEM = '>*[carousel-item]>*';\r\n var ELEM_LEFT = 'layui-carousel-left';\r\n var ELEM_RIGHT = 'layui-carousel-right';\r\n var ELEM_PREV = 'layui-carousel-prev';\r\n var ELEM_NEXT = 'layui-carousel-next';\r\n var ELEM_ARROW = 'layui-carousel-arrow';\r\n var ELEM_IND = 'layui-carousel-ind';\r\n \r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, carousel.config, options);\r\n that.render();\r\n };\r\n \r\n // 默认配置\r\n Class.prototype.config = {\r\n width: '600px',\r\n height: '280px',\r\n full: false, // 是否全屏\r\n arrow: 'hover', // 切换箭头默认显示状态:hover/always/none\r\n indicator: 'inside', // 指示器位置:inside/outside/none\r\n autoplay: true, // 是否自动切换\r\n interval: 3000, // 自动切换的时间间隔,不能低于800ms\r\n anim: '', // 动画类型:default/updown/fade\r\n trigger: 'click', // 指示器的触发方式:click/hover\r\n index: 0 // 初始开始的索引\r\n };\r\n \r\n // 轮播渲染\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n layui.each(elem, function(){\r\n carousel.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0]));\r\n\r\n options.elem = $(options.elem);\r\n if(!options.elem[0]) return;\r\n that.elemItem = options.elem.find(ELEM_ITEM);\r\n \r\n if(options.index < 0) options.index = 0;\r\n if(options.index >= that.elemItem.length) options.index = that.elemItem.length - 1;\r\n if(options.interval < 800) options.interval = 800;\r\n\r\n // 是否全屏模式\r\n if(options.full){\r\n options.elem.css({\r\n position: 'fixed',\r\n width: '100%',\r\n height: '100%',\r\n zIndex: 9999\r\n });\r\n } else {\r\n options.elem.css({\r\n width: options.width,\r\n height: options.height\r\n });\r\n }\r\n \r\n options.elem.attr('lay-anim', options.anim);\r\n \r\n // 初始焦点状态\r\n that.elemItem.eq(options.index).addClass(THIS);\r\n\r\n // 指示器等动作\r\n if(that.elemItem.length <= 1) return;\r\n\r\n that.indicator();\r\n that.arrow();\r\n that.autoplay();\r\n that.events();\r\n };\r\n \r\n // 重置轮播\r\n Class.prototype.reload = function(options){\r\n var that = this;\r\n clearInterval(that.timer);\r\n that.config = $.extend({}, that.config, options);\r\n that.render();\r\n };\r\n \r\n // 获取上一个等待条目的索引\r\n Class.prototype.prevIndex = function(){\r\n var that = this;\r\n var options = that.config;\r\n var prevIndex = options.index - 1;\r\n\r\n if(prevIndex < 0){\r\n prevIndex = that.elemItem.length - 1;\r\n }\r\n\r\n return prevIndex;\r\n };\r\n \r\n // 获取下一个等待条目的索引\r\n Class.prototype.nextIndex = function(){\r\n var that = this;\r\n var options = that.config;\r\n var nextIndex = options.index + 1;\r\n\r\n if(nextIndex >= that.elemItem.length){\r\n nextIndex = 0;\r\n }\r\n\r\n return nextIndex;\r\n };\r\n \r\n // 索引递增\r\n Class.prototype.addIndex = function(num){\r\n var that = this;\r\n var options = that.config;\r\n \r\n num = num || 1;\r\n options.index = options.index + num;\r\n \r\n // index 不能超过轮播总数量\r\n if(options.index >= that.elemItem.length){\r\n options.index = 0;\r\n }\r\n };\r\n \r\n // 索引递减\r\n Class.prototype.subIndex = function(num){\r\n var that = this;\r\n var options = that.config;\r\n \r\n num = num || 1;\r\n options.index = options.index - num;\r\n \r\n // index 不能超过轮播总数量\r\n if(options.index < 0){\r\n options.index = that.elemItem.length - 1;\r\n }\r\n };\r\n \r\n // 自动轮播\r\n Class.prototype.autoplay = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n if(!options.autoplay) return;\r\n clearInterval(that.timer);\r\n \r\n that.timer = setInterval(function(){\r\n that.slide();\r\n }, options.interval);\r\n };\r\n \r\n // 箭头\r\n Class.prototype.arrow = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 模板\r\n var tplArrow = $([\r\n '',\r\n ''\r\n ].join(''));\r\n \r\n // 预设基础属性\r\n options.elem.attr('lay-arrow', options.arrow);\r\n \r\n // 避免重复插入\r\n if(options.elem.find('.'+ELEM_ARROW)[0]){\r\n options.elem.find('.'+ELEM_ARROW).remove();\r\n }\r\n options.elem.append(tplArrow);\r\n \r\n // 事件\r\n tplArrow.on('click', function(){\r\n var othis = $(this);\r\n var type = othis.attr('lay-type')\r\n that.slide(type);\r\n });\r\n };\r\n\r\n // 跳转到特定下标\r\n Class.prototype.goto = function(index){\r\n var that = this;\r\n var options = that.config;\r\n\r\n if(index > options.index){\r\n that.slide('add', index - options.index);\r\n } else if(index < options.index){\r\n that.slide('sub', options.index - index);\r\n }\r\n }\r\n \r\n // 指示器\r\n Class.prototype.indicator = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n // 模板\r\n var tplInd = that.elemInd = $(['
                              ',\r\n function(){\r\n var li = [];\r\n layui.each(that.elemItem, function(index){\r\n li.push('');\r\n });\r\n return li.join('');\r\n }(),\r\n '
                            '].join(''));\r\n \r\n // 预设基础属性\r\n options.elem.attr('lay-indicator', options.indicator);\r\n \r\n // 避免重复插入\r\n if(options.elem.find('.'+ELEM_IND)[0]){\r\n options.elem.find('.'+ELEM_IND).remove();\r\n }\r\n options.elem.append(tplInd);\r\n \r\n if(options.anim === 'updown'){\r\n tplInd.css('margin-top', -(tplInd.height()/2));\r\n }\r\n \r\n // 事件\r\n tplInd.find('li').on(options.trigger === 'hover' ? 'mouseover' : options.trigger, function(){\r\n that.goto($(this).index());\r\n });\r\n };\r\n \r\n // 滑动切换\r\n Class.prototype.slide = function(type, num){\r\n var that = this;\r\n var elemItem = that.elemItem;\r\n var options = that.config;\r\n var thisIndex = options.index;\r\n var filter = options.elem.attr('lay-filter');\r\n \r\n if(that.haveSlide) return;\r\n \r\n // 滑动方向\r\n if(type === 'sub'){\r\n that.subIndex(num);\r\n elemItem.eq(options.index).addClass(ELEM_PREV);\r\n setTimeout(function(){\r\n elemItem.eq(thisIndex).addClass(ELEM_RIGHT);\r\n elemItem.eq(options.index).addClass(ELEM_RIGHT);\r\n }, 50);\r\n } else { // 默认递增滑\r\n that.addIndex(num);\r\n elemItem.eq(options.index).addClass(ELEM_NEXT);\r\n setTimeout(function(){\r\n elemItem.eq(thisIndex).addClass(ELEM_LEFT);\r\n elemItem.eq(options.index).addClass(ELEM_LEFT);\r\n }, 50); \r\n }\r\n \r\n // 移除过渡类\r\n setTimeout(function(){\r\n elemItem.removeClass(THIS + ' ' + ELEM_PREV + ' ' + ELEM_NEXT + ' ' + ELEM_LEFT + ' ' + ELEM_RIGHT);\r\n elemItem.eq(options.index).addClass(THIS);\r\n that.haveSlide = false; // 解锁\r\n }, 350);\r\n \r\n // 指示器焦点\r\n that.elemInd.find('li').eq(options.index).addClass(THIS)\r\n .siblings().removeClass(THIS);\r\n \r\n that.haveSlide = true;\r\n \r\n // 回调返回的参数\r\n var params = {\r\n index: options.index,\r\n prevIndex: thisIndex,\r\n item: elemItem.eq(options.index)\r\n };\r\n \r\n typeof options.change === 'function' && options.change(params);\r\n layui.event.call(this, MOD_NAME, 'change('+ filter +')', params);\r\n };\r\n \r\n // 事件处理\r\n Class.prototype.events = function(){\r\n var that = this;\r\n var options = that.config;\r\n \r\n if(options.elem.data('haveEvents')) return;\r\n \r\n // 移入移出容器\r\n options.elem.on('mouseenter', function(){\r\n if (that.config.autoplay === 'always') return;\r\n clearInterval(that.timer);\r\n }).on('mouseleave', function(){\r\n if (that.config.autoplay === 'always') return;\r\n that.autoplay();\r\n });\r\n \r\n options.elem.data('haveEvents', true);\r\n };\r\n \r\n // 核心入口\r\n carousel.render = function(options){\r\n return new Class(options);\r\n };\r\n \r\n exports(MOD_NAME, carousel);\r\n});\r\n\r\n \r\n","/**\r\n * rate 评分评星组件\r\n */\r\n\r\nlayui.define(['jquery', 'lay'],function(exports){\r\n \"use strict\";\r\n\r\n var $ = layui.jquery;\r\n var lay = layui.lay;\r\n\r\n // 外部接口\r\n var rate = {\r\n config: {},\r\n index: layui.rate ? (layui.rate.index + 10000) : 0,\r\n\r\n //设置全局项\r\n set: function(options){\r\n var that = this;\r\n that.config = $.extend({}, that.config, options);\r\n return that;\r\n },\r\n\r\n //事件\r\n on: function(events, callback){\r\n return layui.onevent.call(this, MOD_NAME, events, callback);\r\n }\r\n }\r\n\r\n // 操作当前实例\r\n var thisRate = function () {\r\n var that = this;\r\n var options = that.config;\r\n\r\n return {\r\n setvalue: function (value) {\r\n that.setvalue.call(that, value);\r\n },\r\n config: options\r\n }\r\n };\r\n\r\n //字符常量\r\n var MOD_NAME = 'rate';\r\n var ELEM_VIEW = 'layui-rate';\r\n var ICON_RATE = 'layui-icon-rate';\r\n var ICON_RATE_SOLID = 'layui-icon-rate-solid';\r\n var ICON_RATE_HALF = 'layui-icon-rate-half';\r\n var ICON_SOLID_HALF = 'layui-icon-rate-solid layui-icon-rate-half';\r\n var ICON_SOLID_RATE = 'layui-icon-rate-solid layui-icon-rate';\r\n var ICON_HALF_RATE = 'layui-icon-rate layui-icon-rate-half';\r\n\r\n //构造器\r\n var Class = function (options) {\r\n var that = this;\r\n that.index = ++rate.index;\r\n that.config = $.extend({}, that.config, rate.config, options);\r\n that.render();\r\n };\r\n\r\n //默认配置\r\n Class.prototype.config = {\r\n length: 5, //初始长度\r\n text: false, //是否显示评分等级\r\n readonly: false, //是否只读\r\n half: false, //是否可以半星\r\n value: 0, //星星选中个数\r\n theme: '' //主题颜色\r\n };\r\n\r\n //评分渲染\r\n Class.prototype.render = function(){\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n layui.each(elem, function(){\r\n rate.render($.extend({}, options, {\r\n elem: this\r\n }));\r\n });\r\n return that;\r\n }\r\n\r\n // 合并 lay-options 属性上的配置信息\r\n $.extend(options, lay.options(elem[0]));\r\n\r\n // 自定义主题\r\n var style = options.theme ? ('style=\"color: '+ options.theme + ';\"') : '';\r\n\r\n options.elem = $(options.elem);\r\n\r\n //最大值不能大于总长度\r\n if(options.value > options.length){\r\n options.value = options.length;\r\n }\r\n\r\n //如果没有选择半星的属性,却给了小数的数值,统一向上或向下取整\r\n if(parseInt(options.value) !== options.value){\r\n if(!options.half){\r\n options.value = (Math.ceil(options.value) - options.value) < 0.5 ? Math.ceil(options.value): Math.floor(options.value)\r\n }\r\n }\r\n\r\n //组件模板\r\n var temp = '
                              ';\r\n for(var i = 1;i <= options.length;i++){\r\n var item = '
                            • Math.floor(options.value)?ICON_RATE:ICON_RATE_SOLID)\r\n + '\" '+ style +'>
                            • ';\r\n\r\n if(options.half&&parseInt(options.value) !== options.value&&i == Math.ceil(options.value)){\r\n temp = temp + '
                            • ';\r\n }else{\r\n temp = temp +item;\r\n }\r\n }\r\n temp += '
                            ' + (options.text ? (''+ options.value + '星') : '') + '';\r\n\r\n //开始插入替代元素\r\n var othis = options.elem;\r\n var hasRender = othis.next('.' + ELEM_VIEW);\r\n\r\n //生成替代元素\r\n hasRender[0] && hasRender.remove(); //如果已经渲染,则Rerender\r\n\r\n that.elemTemp = $(temp);\r\n\r\n options.span = that.elemTemp.next('span');\r\n\r\n options.setText && options.setText(options.value);\r\n\r\n othis.html(that.elemTemp);\r\n\r\n othis.addClass(\"layui-inline\");\r\n\r\n //如果不是只读,那么进行触控事件\r\n if(!options.readonly) that.action();\r\n\r\n };\r\n\r\n //评分重置\r\n Class.prototype.setvalue = function(value){\r\n var that = this;\r\n var options = that.config;\r\n\r\n options.value = value ;\r\n that.render();\r\n };\r\n\r\n //li触控事件\r\n Class.prototype.action = function(){\r\n var that = this;\r\n var options = that.config;\r\n var _ul = that.elemTemp;\r\n var wide = _ul.find(\"i\").width();\r\n\r\n _ul.children(\"li\").each(function(index){\r\n var ind = index + 1;\r\n var othis = $(this);\r\n\r\n //点击\r\n othis.on('click', function(e){\r\n //将当前点击li的索引值赋给value\r\n options.value = ind;\r\n if(options.half){\r\n //获取鼠标在li上的位置\r\n var x = e.pageX - $(this).offset().left;\r\n if(x <= wide / 2){\r\n options.value = options.value - 0.5;\r\n }\r\n }\r\n\r\n if(options.text) _ul.next(\"span\").text(options.value + \"星\");\r\n\r\n options.choose && options.choose(options.value);\r\n options.setText && options.setText(options.value);\r\n });\r\n\r\n //移入\r\n othis.on('mousemove', function(e){\r\n _ul.find(\"i\").each(function(){\r\n $(this).addClass(ICON_RATE).removeClass(ICON_SOLID_HALF)\r\n });\r\n _ul.find(\"i:lt(\" + ind + \")\").each(function(){\r\n $(this).addClass(ICON_RATE_SOLID).removeClass(ICON_HALF_RATE)\r\n });\r\n // 如果设置可选半星,那么判断鼠标相对li的位置\r\n if(options.half){\r\n var x = e.pageX - $(this).offset().left;\r\n if(x <= wide / 2){\r\n othis.children(\"i\").addClass(ICON_RATE_HALF).removeClass(ICON_RATE_SOLID)\r\n }\r\n }\r\n })\r\n\r\n //移出\r\n othis.on('mouseleave', function(){\r\n _ul.find(\"i\").each(function(){\r\n $(this).addClass(ICON_RATE).removeClass(ICON_SOLID_HALF)\r\n });\r\n _ul.find(\"i:lt(\" + Math.floor(options.value) + \")\").each(function(){\r\n $(this).addClass(ICON_RATE_SOLID).removeClass(ICON_HALF_RATE)\r\n });\r\n //如果设置可选半星,根据分数判断是否有半星\r\n if(options.half){\r\n if(parseInt(options.value) !== options.value){\r\n _ul.children(\"li:eq(\" + Math.floor(options.value) + \")\").children(\"i\").addClass(ICON_RATE_HALF).removeClass(ICON_SOLID_RATE)\r\n }\r\n }\r\n })\r\n\r\n })\r\n };\r\n\r\n //事件处理\r\n Class.prototype.events = function () {\r\n var that = this;\r\n //var options = that.config;\r\n };\r\n\r\n //核心入口\r\n rate.render = function(options){\r\n var inst = new Class(options);\r\n return thisRate.call(inst);\r\n };\r\n\r\n exports(MOD_NAME, rate);\r\n})\r\n","/**\r\n * flow 流加载组件\r\n */\r\n\r\n\r\nlayui.define('jquery', function(exports){\r\n \"use strict\";\r\n\r\n var $ = layui.$, Flow = function(options){}\r\n ,ELEM_MORE = 'layui-flow-more'\r\n ,ELEM_LOAD = '';\r\n\r\n //主方法\r\n Flow.prototype.load = function(options){\r\n var that = this, page = 0, lock, isOver, lazyimg, timer;\r\n options = options || {};\r\n\r\n var elem = $(options.elem); if(!elem[0]) return;\r\n var scrollElem = $(options.scrollElem || document); //滚动条所在元素\r\n var mb = options.mb || 50; //与底部的临界距离\r\n var isAuto = 'isAuto' in options ? options.isAuto : true; //是否自动滚动加载\r\n var end = options.end || '没有更多了'; //“末页”显示文案\r\n\r\n //滚动条所在元素是否为document\r\n var notDocument = options.scrollElem && options.scrollElem !== document;\r\n\r\n //加载更多\r\n var ELEM_TEXT = '加载更多'\r\n ,more = $('');\r\n\r\n if(!elem.find('.layui-flow-more')[0]){\r\n elem.append(more);\r\n }\r\n\r\n //加载下一个元素\r\n var next = function(html, over){\r\n html = $(html);\r\n more.before(html);\r\n over = over == 0 ? true : null;\r\n over ? more.html(end) : more.find('a').html(ELEM_TEXT);\r\n isOver = over;\r\n lock = null;\r\n lazyimg && lazyimg();\r\n };\r\n\r\n //触发请求\r\n var done = function(){\r\n lock = true;\r\n more.find('a').html(ELEM_LOAD);\r\n typeof options.done === 'function' && options.done(++page, next);\r\n };\r\n\r\n done();\r\n\r\n //不自动滚动加载\r\n more.find('a').on('click', function(){\r\n var othis = $(this);\r\n if(isOver) return;\r\n lock || done();\r\n });\r\n\r\n //如果允许图片懒加载\r\n if(options.isLazyimg){\r\n lazyimg = that.lazyimg({\r\n elem: options.elem + ' img'\r\n ,scrollElem: options.scrollElem\r\n });\r\n }\r\n\r\n if(!isAuto) return that;\r\n\r\n scrollElem.on('scroll', function(){\r\n var othis = $(this), top = othis.scrollTop();\r\n\r\n if(timer) clearTimeout(timer);\r\n if(isOver || !elem.width()) return; //如果已经结束,或者元素处于隐藏状态,则不执行滚动加载\r\n\r\n timer = setTimeout(function(){\r\n //计算滚动所在容器的可视高度\r\n var height = notDocument ? othis.height() : $(window).height();\r\n\r\n //计算滚动所在容器的实际高度\r\n var scrollHeight = notDocument\r\n ? othis.prop('scrollHeight')\r\n : document.documentElement.scrollHeight;\r\n\r\n //临界点\r\n if(scrollHeight - top - height <= mb){\r\n lock || done();\r\n }\r\n }, 100);\r\n });\r\n\r\n return that;\r\n };\r\n\r\n //图片懒加载\r\n Flow.prototype.lazyimg = function(options){\r\n var that = this, index = 0, haveScroll;\r\n options = options || {};\r\n\r\n var scrollElem = $(options.scrollElem || document); //滚动条所在元素\r\n var elem = options.elem || 'img';\r\n\r\n //滚动条所在元素是否为document\r\n var notDocument = options.scrollElem && options.scrollElem !== document;\r\n\r\n //显示图片\r\n var show = function(item, height){\r\n var start = scrollElem.scrollTop(), end = start + height;\r\n var elemTop = notDocument ? function(){\r\n return item.offset().top - scrollElem.offset().top + start;\r\n }() : item.offset().top;\r\n\r\n /* 始终只加载在当前屏范围内的图片 */\r\n if(elemTop >= start && elemTop <= end){\r\n if(item.attr('lay-src')){\r\n var src = item.attr('lay-src');\r\n layui.img(src, function(){\r\n var next = that.lazyimg.elem.eq(index);\r\n item.attr('src', src).removeAttr('lay-src');\r\n\r\n /* 当前图片加载就绪后,检测下一个图片是否在当前屏 */\r\n next[0] && render(next);\r\n index++;\r\n }, function(){\r\n var next = that.lazyimg.elem.eq(index);\r\n item.removeAttr('lay-src');\r\n });\r\n }\r\n }\r\n }, render = function(othis, scroll){\r\n\r\n //计算滚动所在容器的可视高度\r\n var height = notDocument ? (scroll||scrollElem).height() : $(window).height();\r\n var start = scrollElem.scrollTop(), end = start + height;\r\n\r\n that.lazyimg.elem = $(elem);\r\n\r\n if(othis){\r\n show(othis, height);\r\n } else {\r\n //计算未加载过的图片\r\n for(var i = 0; i < that.lazyimg.elem.length; i++){\r\n var item = that.lazyimg.elem.eq(i), elemTop = notDocument ? function(){\r\n return item.offset().top - scrollElem.offset().top + start;\r\n }() : item.offset().top;\r\n\r\n show(item, height);\r\n index = i;\r\n\r\n //如果图片的top坐标,超出了当前屏,则终止后续图片的遍历\r\n if(elemTop > end) break;\r\n }\r\n }\r\n };\r\n\r\n render();\r\n\r\n if(!haveScroll){\r\n var timer;\r\n scrollElem.on('scroll', function(){\r\n var othis = $(this);\r\n if(timer) clearTimeout(timer)\r\n timer = setTimeout(function(){\r\n render(null, othis);\r\n }, 50);\r\n });\r\n haveScroll = true;\r\n }\r\n return render;\r\n };\r\n\r\n //暴露接口\r\n exports('flow', new Flow());\r\n});\r\n","/**\r\n * code\r\n * Code 预览组件\r\n */\r\n\r\nlayui.define(['lay', 'util', 'element', 'form'], function(exports){\r\n \"use strict\";\r\n\r\n var $ = layui.$;\r\n var util = layui.util;\r\n var element = layui.element;\r\n var form = layui.form;\r\n var layer = layui.layer;\r\n var hint = layui.hint();\r\n\r\n // 常量\r\n var CONST = {\r\n ELEM_VIEW: 'layui-code-view',\r\n ELEM_TAB: 'layui-tab',\r\n ELEM_HEADER: 'layui-code-header',\r\n ELEM_FULL: 'layui-code-full',\r\n ELEM_PREVIEW: 'layui-code-preview',\r\n ELEM_ITEM: 'layui-code-item',\r\n ELEM_SHOW: 'layui-show',\r\n ELEM_LINE: 'layui-code-line',\r\n ELEM_LINE_NUM: 'layui-code-line-number',\r\n ELEM_LN_MODE: 'layui-code-ln-mode',\r\n CDDE_DATA_CLASS: 'LayuiCodeDataClass',\r\n LINE_RAW_WIDTH: 45, // 行号初始宽度,需与 css 保持一致\r\n };\r\n\r\n // 默认参数项\r\n var config = {\r\n elem: '', // 元素选择器\r\n about: '', // 代码栏右上角信息\r\n ln: true, // 代码区域是否显示行号\r\n header: false, // 是否显示代码栏头部区域\r\n encode: true, // 是否对 code 进行编码(若开启预览,则强制开启)\r\n copy: true, // 是否开启代码区域复制功能图标\r\n // 默认文本\r\n text: {\r\n code: util.escape(''),\r\n preview: 'Preview',\r\n },\r\n wordWrap: true, // 是否自动换行\r\n lang: 'text', // 指定语言类型\r\n highlighter: false, // 是否开启语法高亮,'hljs','prism','shiki'\r\n langMarker: false, // 代码区域是否显示语言类型标记\r\n };\r\n\r\n // 初始索引\r\n var codeIndex = layui.code ? (layui.code.index + 10000) : 0;\r\n\r\n // 去除尾部空格\r\n var trimEnd = function(str){\r\n return String(str).replace(/\\s+$/, '');\r\n }\r\n // 保留首行缩进\r\n var trim = function(str){\r\n return trimEnd(str).replace(/^\\n|\\n$/, '');\r\n };\r\n\r\n // export api\r\n exports('code', function(options, mode){\r\n options = $.extend(true, {}, config, options);\r\n\r\n // 返回对象\r\n var ret = {\r\n config: options,\r\n reload: function(opts) { // 重载\r\n layui.code(this.updateOptions(opts));\r\n },\r\n updateOptions: function(opts) { // 更新属性(选项)\r\n opts = opts || {};\r\n delete opts.elem;\r\n return $.extend(true, options, opts);\r\n },\r\n reloadCode: function(opts) { // 仅重载 code\r\n layui.code(this.updateOptions(opts), 'reloadCode');\r\n }\r\n };\r\n\r\n // 若 elem 非唯一\r\n var elem = $(options.elem);\r\n if(elem.length > 1){\r\n // 是否正向渲染\r\n layui.each(options.obverse ? elem : elem.get().reverse(), function(){\r\n layui.code($.extend({}, options, {\r\n elem: this\r\n }), mode);\r\n });\r\n return ret;\r\n }\r\n\r\n // 目标元素是否存在\r\n var othis = options.elem = $(options.elem);\r\n if(!othis[0]) return ret;\r\n\r\n // 合并属性上的参数,并兼容旧版本属性写法 lay-*\r\n $.extend(true, options, lay.options(othis[0]), function(obj){\r\n var attrs = ['title', 'height', 'encode', 'skin', 'about'];\r\n layui.each(attrs, function(i, attr){\r\n var value = othis.attr('lay-'+ attr);\r\n if(typeof value === 'string'){\r\n obj[attr] = value;\r\n }\r\n })\r\n return obj;\r\n }({}));\r\n\r\n // codeRender 需要关闭编码\r\n // 未使用 codeRender 时若开启了预览,则强制开启编码\r\n options.encode = (options.encode || options.preview) && !options.codeRender;\r\n\r\n // 获得初始 code\r\n options.code = options.code || function(){\r\n var arr = [];\r\n var textarea = othis.children('textarea');\r\n\r\n // 若内容放置在 textarea 中\r\n textarea.each(function(){\r\n arr.push(trim(this.value));\r\n });\r\n\r\n // 内容直接放置在元素外层\r\n if(arr.length === 0){\r\n arr.push(trim(othis.html()));\r\n }\r\n\r\n return arr.join('');\r\n }();\r\n\r\n // 创建 code 行结构\r\n var createCode = function(html) {\r\n // codeRender\r\n if(typeof options.codeRender === 'function') {\r\n html = options.codeRender(String(html), options);\r\n }\r\n\r\n // code 行\r\n var lines = String(html).split(/\\r?\\n/g);\r\n\r\n // 包裹 code 行结构\r\n html = $.map(lines, function(line, num) {\r\n return [\r\n '
                            ',\r\n (\r\n options.ln ? [\r\n '
                            ',\r\n (util.digit(num + 1) + '.'),\r\n '
                            ',\r\n ].join('') : ''\r\n ),\r\n '
                            ',\r\n (line || ' '),\r\n '
                            ',\r\n '
                            '\r\n ].join('');\r\n });\r\n\r\n return {\r\n lines: lines,\r\n html: html\r\n };\r\n };\r\n\r\n // 原始 code\r\n var rawCode = options.code;\r\n\r\n // 最终 code\r\n var finalCode = function(code) {\r\n return typeof options.codeParse === 'function' ?\r\n options.codeParse(code, options) :\r\n code;\r\n };\r\n\r\n // 仅重载 code\r\n if (mode === 'reloadCode') {\r\n return othis.children('.layui-code-wrap').html(\r\n createCode(finalCode(rawCode)).html\r\n ), ret;\r\n }\r\n\r\n // 自增索引\r\n var index = layui.code.index = ++codeIndex;\r\n othis.attr('lay-code-index', index);\r\n\r\n // 初始化 className\r\n var hasDataClass = CONST.CDDE_DATA_CLASS in othis.data();\r\n if (hasDataClass) {\r\n othis.attr('class', othis.data(CONST.CDDE_DATA_CLASS) || '');\r\n }\r\n\r\n // 记录初始 className\r\n if (!hasDataClass) {\r\n othis.data(CONST.CDDE_DATA_CLASS, othis.attr('class'));\r\n }\r\n\r\n // 工具栏\r\n var tools = {\r\n copy: {\r\n className: 'file-b',\r\n title: ['复制代码'],\r\n event: function(obj){\r\n var code = util.unescape(finalCode(options.code));\r\n\r\n // 写入剪切板\r\n lay.clipboard.writeText({\r\n text: code,\r\n done: function() {\r\n layer.msg('已复制', {icon: 1});\r\n },\r\n error: function() {\r\n layer.msg('复制失败', {icon: 2});\r\n }\r\n });\r\n\r\n typeof options.onCopy === 'function' && options.onCopy(code);\r\n }\r\n }\r\n };\r\n\r\n // 移除包裹结构\r\n var unwrap = (function fn() {\r\n var elemViewHas = othis.parent('.' + CONST.ELEM_PREVIEW);\r\n var elemTabHas = elemViewHas.children('.'+ CONST.ELEM_TAB);\r\n var elemPreviewViewHas = elemViewHas.children('.' + CONST.ELEM_ITEM +'-preview');\r\n\r\n // 移除旧结构\r\n elemTabHas.remove(); // 移除 tab\r\n elemPreviewViewHas.remove(); // 移除预览区域\r\n if (elemViewHas[0]) othis.unwrap(); // 移除外层容器\r\n\r\n return fn;\r\n })();\r\n\r\n // 是否开启预览\r\n if(options.preview){\r\n var FILTER_VALUE = 'LAY-CODE-DF-'+ index;\r\n var layout = options.layout || ['code', 'preview'];\r\n var isIframePreview = options.preview === 'iframe';\r\n\r\n // 追加 Tab 组件\r\n var elemView = $('
                            ');\r\n var elemTabView = $('
                            ');\r\n var elemHeaderView = $('
                            ');\r\n var elemPreviewView = $('
                            ');\r\n var elemToolbar = $('
                            ');\r\n\r\n\r\n if(options.id) elemView.attr('id', options.id);\r\n elemView.addClass(options.className);\r\n elemTabView.attr('lay-filter', FILTER_VALUE);\r\n\r\n // 标签头\r\n layui.each(layout, function(i, v){\r\n var li = $('
                          • ');\r\n if(i === 0) li.addClass('layui-this');\r\n li.html(options.text[v]);\r\n elemHeaderView.append(li);\r\n });\r\n\r\n // 工具栏\r\n $.extend(tools, {\r\n 'full': {\r\n className: 'screen-full',\r\n title: ['最大化显示', '还原显示'],\r\n event: function(obj){\r\n var el = obj.elem;\r\n var elemView = el.closest('.'+ CONST.ELEM_PREVIEW);\r\n var classNameFull = 'layui-icon-'+ this.className;\r\n var classNameRestore = 'layui-icon-screen-restore';\r\n var title = this.title;\r\n var htmlElem = $('html,body');\r\n var ELEM_SCROLLBAR_HIDE = 'layui-scrollbar-hide';\r\n\r\n if(el.hasClass(classNameFull)){\r\n elemView.addClass(CONST.ELEM_FULL);\r\n el.removeClass(classNameFull).addClass(classNameRestore);\r\n el.attr('title', title[1]);\r\n htmlElem.addClass(ELEM_SCROLLBAR_HIDE);\r\n } else {\r\n elemView.removeClass(CONST.ELEM_FULL);\r\n el.removeClass(classNameRestore).addClass(classNameFull);\r\n el.attr('title', title[0]);\r\n htmlElem.removeClass(ELEM_SCROLLBAR_HIDE);\r\n }\r\n }\r\n },\r\n 'window': {\r\n className: 'release',\r\n title: ['在新窗口预览'],\r\n event: function(obj){\r\n util.openWin({\r\n content: finalCode(options.code)\r\n });\r\n }\r\n }\r\n });\r\n\r\n // copy\r\n if(options.copy){\r\n if(layui.type(options.tools) === 'array'){\r\n // 若 copy 未存在于 tools 中,则追加到最前\r\n if(options.tools.indexOf('copy') === -1){\r\n options.tools.unshift('copy');\r\n }\r\n } else {\r\n options.tools = ['copy'];\r\n }\r\n }\r\n\r\n // 工具栏事件\r\n elemToolbar.on('click', '>i', function(){\r\n var oi = $(this);\r\n var type = oi.data('type');\r\n var parameters = {\r\n elem: oi,\r\n type: type,\r\n options: options, // 当前属性选项\r\n rawCode: options.code, // 原始 code\r\n finalCode: util.unescape(finalCode(options.code)) // 最终 code\r\n };\r\n\r\n // 内部 tools event\r\n tools[type] && typeof tools[type].event === 'function' && tools[type].event(parameters);\r\n\r\n // 外部 tools event\r\n typeof options.toolsEvent === 'function' && options.toolsEvent(parameters);\r\n });\r\n\r\n // 增加工具栏\r\n if (options.addTools && options.tools) {\r\n options.tools = [].concat(options.tools, options.addTools);\r\n }\r\n\r\n // 渲染工具栏\r\n layui.each(options.tools, function(i, v){\r\n var viso = typeof v === 'object'; // 若为 object 值,则可自定义更多属性\r\n var tool = viso ? v : (\r\n tools[v] || {\r\n className: v,\r\n title: [v]\r\n }\r\n );\r\n\r\n var className = tool.className || tool.type;\r\n var title = tool.title || [''];\r\n var type = viso ? ( tool.type || className ) : v;\r\n\r\n if (!type) return;\r\n\r\n // 若非内置 tool,则合并到 tools 中\r\n if (!tools[type]) {\r\n var obj = {};\r\n obj[type] = tool;\r\n $.extend(tools, obj);\r\n }\r\n\r\n elemToolbar.append(\r\n ''\r\n );\r\n });\r\n\r\n othis.addClass(CONST.ELEM_ITEM).wrap(elemView); // 包裹外层容器\r\n elemTabView.append(elemHeaderView); // 追加标签头\r\n options.tools && elemTabView.append(elemToolbar); // 追加工具栏\r\n othis.before(elemTabView); // 追加标签结构\r\n\r\n // 追加预览\r\n if(isIframePreview){\r\n elemPreviewView.html('');\r\n }\r\n\r\n // 执行预览\r\n var runPreview = function(thisItemBody){\r\n var iframe = thisItemBody.children('iframe')[0];\r\n\r\n // 是否 iframe 方式预览\r\n if(isIframePreview && iframe){\r\n iframe.srcdoc = finalCode(options.code);\r\n } else {\r\n thisItemBody.html(options.code);\r\n }\r\n\r\n // 当前实例预览完毕后的回调\r\n setTimeout(function(){\r\n typeof options.done === 'function' && options.done({\r\n container: thisItemBody,\r\n options: options,\r\n render: function(){\r\n form.render(thisItemBody.find('.layui-form'));\r\n element.render();\r\n }\r\n });\r\n },3);\r\n };\r\n\r\n if(layout[0] === 'preview'){\r\n elemPreviewView.addClass(CONST.ELEM_SHOW);\r\n othis.before(elemPreviewView);\r\n runPreview(elemPreviewView);\r\n } else {\r\n othis.addClass(CONST.ELEM_SHOW).after(elemPreviewView);\r\n }\r\n\r\n // 内容项初始化样式\r\n options.previewStyle = [options.style, options.previewStyle].join('');\r\n elemPreviewView.attr('style', options.previewStyle);\r\n\r\n // tab change\r\n element.on('tab('+ FILTER_VALUE +')', function(data){\r\n var $this = $(this);\r\n var thisElem = $(data.elem).closest('.'+ CONST.ELEM_PREVIEW);\r\n var elemItemBody = thisElem.find('.'+ CONST.ELEM_ITEM);\r\n var thisItemBody = elemItemBody.eq(data.index);\r\n\r\n elemItemBody.removeClass(CONST.ELEM_SHOW);\r\n thisItemBody.addClass(CONST.ELEM_SHOW);\r\n\r\n if($this.attr('lay-id') === 'preview'){\r\n runPreview(thisItemBody);\r\n }\r\n\r\n setCodeLayout();\r\n });\r\n }\r\n\r\n // 创建 code 容器\r\n var codeElem = $(''); // 此处的闭合标签是为了兼容 IE8\r\n\r\n // 添加主容器 className\r\n othis.addClass(function(arr) {\r\n if (!options.wordWrap) arr.push('layui-code-nowrap');\r\n return arr.join(' ')\r\n }(['layui-code-view layui-border-box']));\r\n\r\n // code 主题风格\r\n var theme = options.theme || options.skin;\r\n if (theme) {\r\n othis.removeClass('layui-code-theme-dark layui-code-theme-light');\r\n othis.addClass('layui-code-theme-'+ theme);\r\n }\r\n\r\n // 添加高亮必要的 className\r\n if (options.highlighter) {\r\n othis.addClass([\r\n options.highlighter,\r\n 'language-' + options.lang,\r\n 'layui-code-hl'\r\n ].join(' '));\r\n }\r\n\r\n // 获取 code 行结构\r\n var createCodeRst = createCode(\r\n options.encode ? util.escape(finalCode(rawCode)) : rawCode // 是否编码\r\n );\r\n var lines = createCodeRst.lines;\r\n\r\n // 插入 code\r\n othis.html(codeElem.html(createCodeRst.html));\r\n\r\n // 插入行号边栏\r\n if (options.ln) {\r\n othis.append('
                            ');\r\n }\r\n\r\n // 兼容旧版本 height 属性\r\n if (options.height) {\r\n codeElem.css('max-height', options.height);\r\n }\r\n\r\n // code 区域样式\r\n options.codeStyle = [options.style, options.codeStyle].join('');\r\n if (options.codeStyle) {\r\n codeElem.attr('style', function(i, val) {\r\n return (val || '') + options.codeStyle;\r\n });\r\n }\r\n\r\n // 动态设置样式\r\n var cssRules = [\r\n {\r\n selector: '>.layui-code-wrap>.layui-code-line{}',\r\n setValue: function(item, value) {\r\n item.style['padding-left'] = value + 'px';\r\n }\r\n },\r\n {\r\n selector: '>.layui-code-wrap>.layui-code-line>.layui-code-line-number{}',\r\n setValue: function(item, value) {\r\n item.style.width = value + 'px';\r\n }\r\n },\r\n {\r\n selector: '>.layui-code-ln-side{}',\r\n setValue: function(item, value) {\r\n item.style.width = value + 'px';\r\n }\r\n }\r\n ];\r\n\r\n // 生成初始 style 元素\r\n var styleElem = lay.style({\r\n target: othis[0],\r\n id: 'DF-code-'+ index,\r\n text: $.map($.map(cssRules, function(val){\r\n return val.selector;\r\n }), function(val, i) {\r\n return ['.layui-code-view[lay-code-index=\"'+ index + '\"]', val].join(' ');\r\n }).join('')\r\n })\r\n\r\n // 动态设置 code 布局\r\n var setCodeLayout = (function fn() {\r\n if (options.ln) {\r\n var multiLine = Math.floor(lines.length / 100);\r\n var lineElem = codeElem.children('.'+ CONST.ELEM_LINE);\r\n var width = lineElem.last().children('.'+ CONST.ELEM_LINE_NUM).outerWidth();\r\n\r\n othis.addClass(CONST.ELEM_LN_MODE);\r\n\r\n // 若超出 100 行\r\n if (multiLine && width > CONST.LINE_RAW_WIDTH) {\r\n lay.getStyleRules(styleElem, function(item, i) {\r\n try {\r\n cssRules[i].setValue(item, width);\r\n } catch(e) { }\r\n });\r\n }\r\n }\r\n\r\n return fn;\r\n })();\r\n\r\n // 创建 code header\r\n if (options.header) {\r\n var headerElem = $('
                            ');\r\n headerElem.html(options.title || options.text.code);\r\n othis.prepend(headerElem);\r\n }\r\n\r\n // 创建 code 区域固定条\r\n var elemFixbar = $('
                            ');\r\n\r\n // 若开启复制,且未开启预览,则单独生成复制图标\r\n if(options.copy && !options.preview){\r\n var copyElem = $(['',\r\n '',\r\n ''].join(''));\r\n\r\n // 点击复制\r\n copyElem.on('click', function(){\r\n tools.copy.event();\r\n });\r\n\r\n elemFixbar.append(copyElem);\r\n }\r\n\r\n // 创建 language marker\r\n if (options.langMarker) {\r\n elemFixbar.append('' + options.lang + '');\r\n }\r\n\r\n // 创建 about 自定义内容\r\n if (options.about) {\r\n elemFixbar.append(options.about);\r\n }\r\n\r\n // 生成 code fixbar\r\n othis.append(elemFixbar);\r\n\r\n // code 渲染完毕后的回调\r\n if (!options.preview) {\r\n setTimeout(function(){\r\n typeof options.done === 'function' && options.done({});\r\n },3);\r\n }\r\n\r\n // 所有实例渲染完毕后的回调\r\n if(options.elem.length === index + 1){\r\n typeof options.allDone === 'function' && options.allDone();\r\n }\r\n\r\n return ret;\r\n });\r\n});\r\n\r\n// 若为源码版,则自动加载该组件依赖的 css 文件\r\nif(!layui['layui.all']){\r\n layui.addcss('modules/code.css?v=6', 'skincodecss');\r\n}\r\n"]} \ No newline at end of file