layui/dist/layui.js.map
2023-12-31 23:57:09 +08:00

1 line
1.5 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"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","legacyCopy","opacity","select","execCommand","done","err","then","passiveSupported","defineProperty","get","removeEventListener","touchEventsSupported","touchSwipe","state","onMove","onEnd","targetElem","pointerStart","x","y","pointerEnd","distanceX","distanceY","direction","timeStart","onStart","touches","passive","now","onTouchStart","preventDefault","abs","onTouchMove","onTouchEnd","__lay_touchswipe_cb_","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","open","close","tool","escape","inner","source","template","tagExp","__","jss","jsse","tag","start","render","DISABLED","view","elemArr","countText","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","skipText","jump","isskip","childs","btn","input","nodeName","keyCode","load","even","isLayui","ready","MOD_NAME","MOD_ID","weekStart","laydate_dir","set","thisModule","inst","content","reload","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","invalidDate","formatError","preview","en","isStatic","date","datetime","eventElem","fullPanel","rangeStr","rangeLinked","autoCalendarModel","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","childUL","ym","closeList","choose","scrollTop","haveSpan","olElem","tips","elemBtn","elemPreview","color","thisTime","param","panelIndex","isChange","YM","dateTimeTemp","active","addSubYear","isYear","isMonth","prevYear","prevMonth","nextMonth","nextYear","header","layYM","layType","tagName","toLocaleLowerCase","showEvent","eventHandler","unbind","run","closeStop","getInst","one","concat","amd","global","module","w","Error","noGlobal","deletedIds","class2type","hasOwn","hasOwnProperty","support","rtrim","rmsPrefix","rdashAlpha","fcamelCase","letter","toUpperCase","isArrayLike","isWindow","toArray","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","touchEndCallback","imgElem","transform","ratio","delta","wheelDelta","detail","zoomElem","threshold","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","callbacks","attrSelector","DATANAME","dataCache","_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","normalizedDelay","isMouseEnter","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","selfValue","oldLeft","elemMove","sliderBtnElem","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","z","createMoveElem","oldtop","oldy","maxh","maxw","eventType","simulatedEvent","pointer","createEvent","initMouseEvent","screenX","screenY","dispatchEvent","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","eventsType","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","customHeightFunc","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","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","isCheckAll","isCheckMult","dataIndex","thisData","existChecked","getChecked","checkedElem","currTr","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","del","update","fields","cell","thisTd","setRowEvent","getCol","UNROW","renderGridEdit","editType","ELEM_GRID_DOWN","oldValue","reedit","showGridExpandIcon","elemCell","gridExpand","expandedMode","ELEM_CELL_C","elemCellClose","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","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","dblclick","thisListElem","isMatch","ELEM_LEFT","ELEM_RIGHT","ELEM_ARROW","ELEM_IND","arrow","indicator","autoplay","elemItem","prevIndex","nextIndex","addIndex","subIndex","tplArrow","goto","tplInd","elemInd","thisIndex","haveSlide","touchEl","isVertical","distance","ICON_RATE","ICON_RATE_SOLID","ICON_RATE_HALF","ICON_SOLID_HALF","ICON_HALF_RATE","readonly","half","setText","action","setvalue","_ul","wide","liElems","ind","score","itemElemWidth","remainder","isActiveIcon","needSelect","shouldHalfIcon","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":"6BAMC,CAAC,SAASA,GACT,aAEA,IAiBMC,EAjBFC,EAAMF,EAAIG,SACVC,EAAS,CACXC,QAAS,GACTC,OAAQ,GACRC,QAAS,GACTC,MAAO,EACT,EAEIC,EAAQ,WACVC,KAAKC,EAAI,OAC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,EAIjCx+E,EAAMvB,OAAOihF,CAAU,EAGlBxoF,EAAQuU,SACXxX,WAAW,WACe,YAAxB,OAAOiD,EAAQ8J,MAAuB9J,EAAQ8J,KAAK,EAAE,CACvD,EAAE,CAAC,EAIF9J,EAAQqF,KAAKjN,SAAmB,EAAR6D,GACE,YAA3B,OAAO+D,EAAQi6D,SAA0Bj6D,EAAQi6D,QAAQ,IAGpD94C,CACT,CAAC,CACH,CAAC,EAGGhmB,MAAM,cACRA,MAAMqE,OAAO,uBAAwB,aAAa","file":"layui.js","sourcesContent":["/**\r\n * Layui\r\n * Classic modular front-end UI library\r\n * MIT Licensed\r\n */\r\n\r\n;!function(win){\r\n \"use strict\";\r\n\r\n var doc = win.document;\r\n var config = {\r\n modules: {}, // 模块物理路径\r\n status: {}, // 模块加载状态\r\n timeout: 10, // 符合规范的模块请求最长等待秒数\r\n event: {} // 模块自定义事件\r\n };\r\n\r\n var Layui = function(){\r\n this.v = '2.9.3'; // Layui 版本号\r\n };\r\n\r\n // 识别预先可能定义的指定全局对象\r\n var GLOBAL = win.LAYUI_GLOBAL || {};\r\n\r\n // 获取 layui 所在目录\r\n var getPath = function(){\r\n var jsPath = doc.currentScript ? doc.currentScript.src : function(){\r\n var js = doc.scripts;\r\n var last = js.length - 1;\r\n var src;\r\n for(var i = last; i > 0; i--){\r\n if(js[i].readyState === 'interactive'){\r\n src = js[i].src;\r\n break;\r\n }\r\n }\r\n return src || js[last].src;\r\n }();\r\n\r\n return config.dir = GLOBAL.dir || jsPath.substring(0, jsPath.lastIndexOf('/') + 1);\r\n }();\r\n\r\n // 异常提示\r\n var error = function(msg, type){\r\n type = type || 'log';\r\n win.console && console[type] && console[type]('layui error hint: ' + msg);\r\n };\r\n\r\n var isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]';\r\n\r\n // 内置模块\r\n var modules = config.builtin = {\r\n lay: 'lay', // 基础 DOM 操作\r\n layer: 'layer', // 弹层\r\n laydate: 'laydate', // 日期\r\n laypage: 'laypage', // 分页\r\n laytpl: 'laytpl', // 模板引擎\r\n form: 'form', // 表单集\r\n upload: 'upload', // 上传\r\n dropdown: 'dropdown', // 下拉菜单\r\n transfer: 'transfer', // 穿梭框\r\n tree: 'tree', // 树结构\r\n table: 'table', // 表格\r\n treeTable: 'treeTable', // 树表\r\n element: 'element', // 常用元素操作\r\n rate: 'rate', // 评分组件\r\n colorpicker: 'colorpicker', // 颜色选择器\r\n slider: 'slider', // 滑块\r\n carousel: 'carousel', // 轮播\r\n flow: 'flow', // 流加载\r\n util: 'util', // 工具块\r\n code: 'code', // 代码修饰器\r\n jquery: 'jquery', // DOM 库(第三方)\r\n\r\n all: 'all',\r\n 'layui.all': 'layui.all' // 聚合标识(功能性的,非真实模块)\r\n };\r\n\r\n // 记录基础数据\r\n Layui.prototype.cache = config;\r\n\r\n // 定义模块\r\n Layui.prototype.define = function(deps, factory){\r\n var that = this;\r\n var type = typeof deps === 'function';\r\n var callback = function(){\r\n var setApp = function(app, exports){\r\n layui[app] = exports;\r\n config.status[app] = true;\r\n };\r\n typeof factory === 'function' && factory(function(app, exports){\r\n setApp(app, exports);\r\n config.callback[app] = function(){\r\n factory(setApp);\r\n }\r\n });\r\n return this;\r\n };\r\n\r\n type && (\r\n factory = deps,\r\n deps = []\r\n );\r\n\r\n that.use(deps, callback, null, 'define');\r\n return that;\r\n };\r\n\r\n // 使用特定模块\r\n Layui.prototype.use = function(apps, callback, exports, from){\r\n var that = this;\r\n var dir = config.dir = config.dir ? config.dir : getPath;\r\n var head = doc.getElementsByTagName('head')[0];\r\n\r\n apps = function(){\r\n if(typeof apps === 'string'){\r\n return [apps];\r\n }\r\n // 当第一个参数为 function 时,则自动加载所有内置模块,且执行的回调即为该 function 参数;\r\n else if(typeof apps === 'function'){\r\n callback = apps;\r\n return ['all'];\r\n }\r\n return apps;\r\n }();\r\n\r\n // 如果页面已经存在 jQuery 1.7+ 库且所定义的模块依赖 jQuery则不加载内部 jquery 模块\r\n if(win.jQuery && jQuery.fn.on){\r\n that.each(apps, function(index, item){\r\n if(item === 'jquery'){\r\n apps.splice(index, 1);\r\n }\r\n });\r\n layui.jquery = layui.$ = jQuery;\r\n }\r\n\r\n var item = apps[0];\r\n var timeout = 0;\r\n\r\n exports = exports || [];\r\n\r\n // 静态资源host\r\n config.host = config.host || (dir.match(/\\/\\/([\\s\\S]+?)\\//)||['//'+ location.host +'/'])[0];\r\n\r\n // 加载完毕\r\n function onScriptLoad(e, url){\r\n var readyRegExp = navigator.platform === 'PLaySTATION 3' ? /^complete$/ : /^(complete|loaded)$/\r\n if (e.type === 'load' || (readyRegExp.test((e.currentTarget || e.srcElement).readyState))) {\r\n config.modules[item] = url;\r\n head.removeChild(node);\r\n (function poll() {\r\n if(++timeout > config.timeout * 1000 / 4){\r\n return error(item + ' is not a valid module', 'error');\r\n }\r\n config.status[item] ? onCallback() : setTimeout(poll, 4);\r\n }());\r\n }\r\n }\r\n\r\n // 回调\r\n function onCallback(){\r\n exports.push(layui[item]);\r\n apps.length > 1 ?\r\n that.use(apps.slice(1), callback, exports, from)\r\n : ( typeof callback === 'function' && function(){\r\n // 保证文档加载完毕再执行回调\r\n if(layui.jquery && typeof layui.jquery === 'function' && from !== 'define'){\r\n return layui.jquery(function(){\r\n callback.apply(layui, exports);\r\n });\r\n }\r\n callback.apply(layui, exports);\r\n }() );\r\n }\r\n\r\n // 如果引入了聚合板,内置的模块则不必重复加载\r\n if( apps.length === 0 || (layui['layui.all'] && modules[item]) ){\r\n return onCallback(), that;\r\n }\r\n\r\n /*\r\n * 获取加载的模块 URL\r\n * 如果是内置模块,则按照 dir 参数拼接模块路径\r\n * 如果是扩展模块,则判断模块路径值是否为 {/} 开头,\r\n * 如果路径值是 {/} 开头,则模块路径即为后面紧跟的字符。\r\n * 否则,则按照 base 参数拼接模块路径\r\n */\r\n\r\n var url = ( modules[item] ? (dir + 'modules/')\r\n : (/^\\{\\/\\}/.test(that.modules[item]) ? '' : (config.base || ''))\r\n ) + (that.modules[item] || item) + '.js';\r\n url = url.replace(/^\\{\\/\\}/, '');\r\n\r\n // 如果扩展模块(即:非内置模块)对象已经存在,则不必再加载\r\n if(!config.modules[item] && layui[item]){\r\n config.modules[item] = url; // 并记录起该扩展模块的 url\r\n }\r\n\r\n // 首次加载模块\r\n if(!config.modules[item]){\r\n var node = doc.createElement('script');\r\n\r\n node.async = true;\r\n node.charset = 'utf-8';\r\n node.src = url + function(){\r\n var version = config.version === true\r\n ? (config.v || (new Date()).getTime())\r\n : (config.version||'');\r\n return version ? ('?v=' + version) : '';\r\n }();\r\n\r\n head.appendChild(node);\r\n\r\n if(node.attachEvent && !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && !isOpera){\r\n node.attachEvent('onreadystatechange', function(e){\r\n onScriptLoad(e, url);\r\n });\r\n } else {\r\n node.addEventListener('load', function(e){\r\n onScriptLoad(e, url);\r\n }, false);\r\n }\r\n\r\n config.modules[item] = url;\r\n } else { // 缓存\r\n (function poll() {\r\n if(++timeout > config.timeout * 1000 / 4){\r\n return error(item + ' is not a valid module', 'error');\r\n }\r\n (typeof config.modules[item] === 'string' && config.status[item])\r\n ? onCallback()\r\n : setTimeout(poll, 4);\r\n }());\r\n }\r\n\r\n return that;\r\n };\r\n\r\n // 弃用原有的指定模块,以便重新扩展新的同名模块\r\n Layui.prototype.disuse = function(apps){\r\n var that = this;\r\n apps = that.isArray(apps) ? apps : [apps];\r\n that.each(apps, function (index, item) {\r\n if (!config.status[item]) {\r\n // return error('module ' + item + ' is not exist');\r\n }\r\n delete that[item];\r\n delete modules[item];\r\n delete that.modules[item];\r\n delete config.status[item];\r\n delete config.modules[item];\r\n });\r\n return that;\r\n };\r\n\r\n // 获取节点的 style 属性值\r\n Layui.prototype.getStyle = function(node, name){\r\n var style = node.currentStyle ? node.currentStyle : win.getComputedStyle(node, null);\r\n return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name);\r\n };\r\n\r\n // css 外部加载器\r\n Layui.prototype.link = function(href, fn, cssname){\r\n var that = this;\r\n var head = doc.getElementsByTagName('head')[0];\r\n var link = doc.createElement('link');\r\n\r\n if(typeof fn === 'string') cssname = fn;\r\n\r\n var app = (cssname || href).replace(/\\.|\\//g, '');\r\n var id = 'layuicss-'+ app;\r\n var STAUTS_NAME = 'creating';\r\n var timeout = 0;\r\n\r\n link.href = href + (config.debug ? '?v='+new Date().getTime() : '');\r\n link.rel = 'stylesheet';\r\n link.id = id;\r\n link.media = 'all';\r\n\r\n if(!doc.getElementById(id)){\r\n head.appendChild(link);\r\n }\r\n\r\n if(typeof fn !== 'function') return that;\r\n\r\n // 轮询 css 是否加载完毕\r\n (function poll(status) {\r\n var delay = 100;\r\n var getLinkElem = doc.getElementById(id); // 获取动态插入的 link 元素\r\n\r\n // 如果轮询超过指定秒数,则视为请求文件失败或 css 文件不符合规范\r\n if(++timeout > config.timeout * 1000 / delay){\r\n return error(href + ' timeout');\r\n }\r\n\r\n // css 加载就绪\r\n if(parseInt(that.getStyle(getLinkElem, 'width')) === 1989){\r\n // 如果参数来自于初始轮询(即未加载就绪时的),则移除 link 标签状态\r\n if(status === STAUTS_NAME) getLinkElem.removeAttribute('lay-status');\r\n // 如果 link 标签的状态仍为「创建中」,则继续进入轮询,直到状态改变,则执行回调\r\n getLinkElem.getAttribute('lay-status') === STAUTS_NAME ? setTimeout(poll, delay) : fn();\r\n } else {\r\n getLinkElem.setAttribute('lay-status', STAUTS_NAME);\r\n setTimeout(function(){\r\n poll(STAUTS_NAME);\r\n }, delay);\r\n }\r\n }());\r\n\r\n // 轮询css是否加载完毕\r\n /*\r\n (function poll() {\r\n if(++timeout > config.timeout * 1000 / 100){\r\n return error(href + ' timeout');\r\n };\r\n parseInt(that.getStyle(doc.getElementById(id), 'width')) === 1989 ? function(){\r\n fn();\r\n }() : setTimeout(poll, 100);\r\n }());\r\n */\r\n\r\n return that;\r\n };\r\n\r\n // css 内部加载器\r\n Layui.prototype.addcss = function(firename, fn, cssname){\r\n return layui.link(config.dir + 'css/' + firename, fn, cssname);\r\n };\r\n\r\n // 存储模块的回调\r\n config.callback = {};\r\n\r\n // 重新执行模块的工厂函数\r\n Layui.prototype.factory = function(modName){\r\n if(layui[modName]){\r\n return typeof config.callback[modName] === 'function'\r\n ? config.callback[modName]\r\n : null;\r\n }\r\n };\r\n\r\n // 图片预加载\r\n Layui.prototype.img = function(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 typeof callback === 'function' && callback(img);\r\n };\r\n img.onerror = function(e){\r\n img.onerror = null;\r\n typeof error === 'function' && error(e);\r\n };\r\n };\r\n\r\n // 全局配置\r\n Layui.prototype.config = function(options){\r\n options = options || {};\r\n for(var key in options){\r\n config[key] = options[key];\r\n }\r\n return this;\r\n };\r\n\r\n // 记录全部模块\r\n Layui.prototype.modules = function(){\r\n var clone = {};\r\n for(var o in modules){\r\n clone[o] = modules[o];\r\n }\r\n return clone;\r\n }();\r\n\r\n // 拓展模块\r\n Layui.prototype.extend = function(options){\r\n var that = this;\r\n\r\n // 验证模块是否被占用\r\n options = options || {};\r\n for(var o in options){\r\n if(that[o] || that.modules[o]){\r\n error(o+ ' Module already exists', 'error');\r\n } else {\r\n that.modules[o] = options[o];\r\n }\r\n }\r\n\r\n return that;\r\n };\r\n\r\n // location.hash 路由解析\r\n Layui.prototype.router = Layui.prototype.hash = function(hash){\r\n var that = this;\r\n var hash = hash || location.hash;\r\n var data = {\r\n path: [],\r\n search: {},\r\n hash: (hash.match(/[^#](#.*$)/) || [])[1] || ''\r\n };\r\n\r\n if(!/^#\\//.test(hash)) return data; // 禁止非路由规范\r\n\r\n hash = hash.replace(/^#\\//, '');\r\n data.href = '/' + hash;\r\n hash = hash.replace(/([^#])(#.*$)/, '$1').split('/') || [];\r\n\r\n // 提取 Hash 结构\r\n that.each(hash, function(index, item){\r\n /^\\w+=/.test(item) ? function(){\r\n item = item.split('=');\r\n data.search[item[0]] = item[1];\r\n }() : data.path.push(item);\r\n });\r\n\r\n return data;\r\n };\r\n\r\n // URL 解析\r\n Layui.prototype.url = function(href){\r\n var that = this;\r\n var data = {\r\n // 提取 url 路径\r\n pathname: function(){\r\n var pathname = href\r\n ? function(){\r\n var str = (href.match(/\\.[^.]+?\\/.+/) || [])[0] || '';\r\n return str.replace(/^[^\\/]+/, '').replace(/\\?.+/, '');\r\n }()\r\n : location.pathname;\r\n return pathname.replace(/^\\//, '').split('/');\r\n }(),\r\n\r\n // 提取 url 参数\r\n search: function(){\r\n var obj = {};\r\n var search = (href\r\n ? function(){\r\n var str = (href.match(/\\?.+/) || [])[0] || '';\r\n return str.replace(/\\#.+/, '');\r\n }()\r\n : location.search\r\n ).replace(/^\\?+/, '').split('&'); // 去除 ?,按 & 分割参数\r\n\r\n // 遍历分割后的参数\r\n that.each(search, function(index, item){\r\n var _index = item.indexOf('=')\r\n ,key = function(){ // 提取 key\r\n if(_index < 0){\r\n return item.substr(0, item.length);\r\n } else if(_index === 0){\r\n return false;\r\n } else {\r\n return item.substr(0, _index);\r\n }\r\n }();\r\n // 提取 value\r\n if(key){\r\n obj[key] = _index > 0 ? item.substr(_index + 1) : null;\r\n }\r\n });\r\n\r\n return obj;\r\n }(),\r\n\r\n // 提取 Hash\r\n hash: that.router(function(){\r\n return href\r\n ? ((href.match(/#.+/) || [])[0] || '/')\r\n : location.hash;\r\n }())\r\n };\r\n\r\n return data;\r\n };\r\n\r\n // 本地持久存储\r\n Layui.prototype.data = function(table, settings, storage){\r\n table = table || 'layui';\r\n storage = storage || localStorage;\r\n\r\n if(!win.JSON || !win.JSON.parse) return;\r\n\r\n // 如果 settings 为 null则删除表\r\n if(settings === null){\r\n return delete storage[table];\r\n }\r\n\r\n settings = typeof settings === 'object'\r\n ? settings\r\n : {key: settings};\r\n\r\n try {\r\n var data = JSON.parse(storage[table]);\r\n } catch(e) {\r\n var data = {};\r\n }\r\n\r\n if('value' in settings) data[settings.key] = settings.value;\r\n if(settings.remove) delete data[settings.key];\r\n storage[table] = JSON.stringify(data);\r\n\r\n return settings.key ? data[settings.key] : data;\r\n };\r\n\r\n // 本地临时存储\r\n Layui.prototype.sessionData = function(table, settings){\r\n return this.data(table, settings, sessionStorage);\r\n }\r\n\r\n // 设备信息\r\n Layui.prototype.device = function(key){\r\n var agent = navigator.userAgent.toLowerCase();\r\n\r\n // 获取版本号\r\n var getVersion = function(label){\r\n var exp = new RegExp(label + '/([^\\\\s\\\\_\\\\-]+)');\r\n label = (agent.match(exp)||[])[1];\r\n return label || false;\r\n };\r\n\r\n // 返回结果集\r\n var result = {\r\n os: function(){ // 底层操作系统\r\n if(/windows/.test(agent)){\r\n return 'windows';\r\n } else if(/linux/.test(agent)){\r\n return 'linux';\r\n } else if(/iphone|ipod|ipad|ios/.test(agent)){\r\n return 'ios';\r\n } else if(/mac/.test(agent)){\r\n return 'mac';\r\n }\r\n }(),\r\n ie: function(){ // ie 版本\r\n return (!!win.ActiveXObject || \"ActiveXObject\" in win) ? (\r\n (agent.match(/msie\\s(\\d+)/) || [])[1] || '11' // 由于 ie11 并没有 msie 的标识\r\n ) : false;\r\n }(),\r\n weixin: getVersion('micromessenger') // 是否微信\r\n };\r\n\r\n // 任意的 key\r\n if(key && !result[key]){\r\n result[key] = getVersion(key);\r\n }\r\n\r\n // 移动设备\r\n result.android = /android/.test(agent);\r\n result.ios = result.os === 'ios';\r\n result.mobile = (result.android || result.ios);\r\n\r\n return result;\r\n };\r\n\r\n // 提示\r\n Layui.prototype.hint = function(){\r\n return {\r\n error: error\r\n };\r\n };\r\n\r\n // typeof 类型细分 -> string/number/boolean/undefined/null、object/array/function/…\r\n Layui.prototype._typeof = Layui.prototype.type = function(operand){\r\n if(operand === null) return String(operand);\r\n\r\n // 细分引用类型\r\n return (typeof operand === 'object' || typeof operand === 'function') ? function(){\r\n var type = Object.prototype.toString.call(operand).match(/\\s(.+)\\]$/) || []; // 匹配类型字符\r\n var classType = 'Function|Array|Date|RegExp|Object|Error|Symbol'; // 常见类型字符\r\n\r\n type = type[1] || 'Object';\r\n\r\n // 除匹配到的类型外,其他对象均返回 object\r\n return new RegExp('\\\\b('+ classType + ')\\\\b').test(type)\r\n ? type.toLowerCase()\r\n : 'object';\r\n }() : typeof operand;\r\n };\r\n\r\n // 对象是否具备数组结构(此处为兼容 jQuery 对象)\r\n Layui.prototype._isArray = Layui.prototype.isArray = function(obj){\r\n var that = this;\r\n var len;\r\n var type = that.type(obj);\r\n\r\n if(!obj || (typeof obj !== 'object') || obj === win) return false;\r\n\r\n len = 'length' in obj && obj.length; // 兼容 ie\r\n return type === 'array' || len === 0 || (\r\n typeof len === 'number' && len > 0 && (len - 1) in obj // 兼容 jQuery 对象\r\n );\r\n };\r\n\r\n // 遍历\r\n Layui.prototype.each = function(obj, fn){\r\n var key;\r\n var that = this;\r\n var callFn = function(key, obj){ // 回调\r\n return fn.call(obj[key], key, obj[key])\r\n };\r\n\r\n if(typeof fn !== 'function') return that;\r\n obj = obj || [];\r\n\r\n // 优先处理数组结构\r\n if(that.isArray(obj)){\r\n for(key = 0; key < obj.length; key++){\r\n if(callFn(key, obj)) break;\r\n }\r\n } else {\r\n for(key in obj){\r\n if(callFn(key, obj)) break;\r\n }\r\n }\r\n\r\n return that;\r\n };\r\n\r\n // 将数组中的成员对象按照某个 key 的 value 值进行排序\r\n Layui.prototype.sort = function(arr, key, desc, notClone){\r\n var that = this;\r\n var clone = notClone ? (arr || []) : JSON.parse(\r\n JSON.stringify(arr || [])\r\n );\r\n\r\n // 若未传入 key则直接返回原对象\r\n if(that.type(arr) === 'object' && !key){\r\n return clone;\r\n } else if(typeof arr !== 'object'){ // 若 arr 非对象\r\n return [clone];\r\n }\r\n\r\n // 开始排序\r\n clone.sort(function(o1, o2){\r\n var v1 = o1[key];\r\n var v2 = o2[key];\r\n\r\n /*\r\n * 特殊数据\r\n * 若比较的成员均非对象\r\n */\r\n\r\n // 若比较的成员均为数字\r\n if(!isNaN(o1) && !isNaN(o2)) return o1 - o2;\r\n // 若比较的成员只存在某一个非对象\r\n if(!isNaN(o1) && isNaN(o2)){\r\n if(key && typeof o2 === 'object'){\r\n v1 = o1;\r\n } else {\r\n return -1;\r\n }\r\n } else if (isNaN(o1) && !isNaN(o2)){\r\n if(key && typeof o1 === 'object'){\r\n v2 = o2;\r\n } else {\r\n return 1;\r\n }\r\n }\r\n\r\n /*\r\n * 正常数据\r\n * 即成员均为对象,也传入了对比依据: key\r\n * 若 value 为数字,按「大小」排序;若 value 非数字,则按「字典序」排序\r\n */\r\n\r\n // value 是否为数字\r\n var isNum = [!isNaN(v1), !isNaN(v2)];\r\n\r\n // 若为数字比较\r\n if(isNum[0] && isNum[1]){\r\n if(v1 && (!v2 && v2 !== 0)){ // 数字 vs 空\r\n return 1;\r\n } else if((!v1 && v1 !== 0) && v2){ // 空 vs 数字\r\n return -1;\r\n } else { // 数字 vs 数字\r\n return v1 - v2;\r\n }\r\n }\r\n\r\n /**\r\n * 字典序排序\r\n */\r\n\r\n // 若为非数字比较\r\n if(!isNum[0] && !isNum[1]){\r\n // 字典序比较\r\n if(v1 > v2){\r\n return 1;\r\n } else if (v1 < v2) {\r\n return -1;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n // 若为混合比较\r\n if(isNum[0] || !isNum[1]){ // 数字 vs 非数字\r\n return -1;\r\n } else if(!isNum[0] || isNum[1]) { // 非数字 vs 数字\r\n return 1;\r\n }\r\n\r\n });\r\n\r\n desc && clone.reverse(); // 倒序\r\n return clone;\r\n };\r\n\r\n // 阻止事件冒泡\r\n Layui.prototype.stope = function(thisEvent){\r\n thisEvent = thisEvent || win.event;\r\n try { thisEvent.stopPropagation() } catch(e){\r\n thisEvent.cancelBubble = true;\r\n }\r\n };\r\n\r\n // 字符常理\r\n var EV_REMOVE = 'LAYUI-EVENT-REMOVE';\r\n\r\n // 自定义模块事件\r\n Layui.prototype.onevent = function(modName, events, callback){\r\n if(typeof modName !== 'string'\r\n || typeof callback !== 'function') return this;\r\n\r\n return Layui.event(modName, events, null, callback);\r\n };\r\n\r\n // 执行自定义模块事件\r\n Layui.prototype.event = Layui.event = function(modName, events, params, fn){\r\n var that = this;\r\n var result = null;\r\n var filter = (events || '').match(/\\((.*)\\)$/)||[]; // 提取事件过滤器字符结构select(xxx)\r\n var eventName = (modName + '.'+ events).replace(filter[0], ''); // 获取事件名称form.select\r\n var filterName = filter[1] || ''; // 获取过滤器名称,xxx\r\n var callback = function(_, item){\r\n var res = item && item.call(that, params);\r\n res === false && result === null && (result = false);\r\n };\r\n\r\n // 如果参数传入特定字符,则执行移除事件\r\n if(params === EV_REMOVE){\r\n delete (that.cache.event[eventName] || {})[filterName];\r\n return that;\r\n }\r\n\r\n // 添加事件\r\n if(fn){\r\n config.event[eventName] = config.event[eventName] || {};\r\n\r\n if (filterName) {\r\n // 带filter不支持重复事件\r\n config.event[eventName][filterName] = [fn];\r\n } else {\r\n // 不带filter处理的是所有的同类事件应该支持重复事件\r\n config.event[eventName][filterName] = config.event[eventName][filterName] || [];\r\n config.event[eventName][filterName].push(fn);\r\n }\r\n return this;\r\n }\r\n\r\n // 执行事件回调\r\n layui.each(config.event[eventName], function(key, item){\r\n // 执行当前模块的全部事件\r\n if(filterName === '{*}'){\r\n layui.each(item, callback);\r\n return;\r\n }\r\n\r\n // 执行指定事件\r\n key === '' && layui.each(item, callback);\r\n (filterName && key === filterName) && layui.each(item, callback);\r\n });\r\n\r\n return result;\r\n };\r\n\r\n // 新增模块事件\r\n Layui.prototype.on = function(events, modName, callback){\r\n var that = this;\r\n return that.onevent.call(that, modName, events, callback);\r\n }\r\n\r\n // 移除模块事件\r\n Layui.prototype.off = function(events, modName){\r\n var that = this;\r\n return that.event.call(that, modName, events, EV_REMOVE);\r\n };\r\n\r\n // 防抖\r\n Layui.prototype.debounce = function (func, wait) {\r\n var timeout;\r\n return function () {\r\n var context = this;\r\n var args = arguments;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(function () {\r\n func.apply(context, args);\r\n }, wait);\r\n }\r\n };\r\n\r\n // 节流\r\n Layui.prototype.throttle = function (func, wait) {\r\n var cooldown = false;\r\n return function () {\r\n var context = this;\r\n var args = arguments;\r\n if (!cooldown) {\r\n func.apply(context, args);\r\n cooldown = true;\r\n setTimeout(function () {\r\n cooldown = false;\r\n }, wait);\r\n }\r\n }\r\n };\r\n\r\n // exports layui\r\n win.layui = new Layui();\r\n\r\n}(window); // gulp build: layui-footer\r\n\r\n","/**\r\n * 用于打包聚合版,该文件不会存在于构建后的目录 \r\n */\r\n \r\nlayui.define(function(exports){\r\n var cache = layui.cache;\r\n layui.config({\r\n dir: cache.dir.replace(/lay\\/dest\\/$/, '')\r\n });\r\n exports('layui.all', layui.v);\r\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 {Object.<string, string>} [attr] - 添加到元素上的属性\r\n * @returns {HTMLElement} 返回创建的 HTML 元素\r\n * @example\r\n * ```js\r\n * lay.elem('div', {id: 'test'}) // <div id=\"test\"></div>\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 * <style id=\"test\">\r\n * .lay-card{\r\n * color: #000;\r\n * }\r\n * .lay-btn-success{\r\n * color: green;\r\n * }\r\n * </style>\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 * <div id=\"targetEl\">\r\n * <!-- 样式追加到目标容器 -->\r\n * <style id=\"LAY-STYLE-DF-0\">.card{color: #000}</style>\r\n * </div>\r\n *\r\n * lay.style({\r\n * target: '#targetEl',\r\n * text: '.card{color: #000}'\r\n * }) // <style id=\"LAY-STYLE-DF-0\">.card{color: #000}</style>\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 * <button id=\"targetEl\">dropdown</button>\r\n * <ul id=\"contentEl\" class=\"dropdown-menu\">\r\n * <li>菜单1</li>\r\n * <li>菜单2</li>\r\n * </ul>\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 {Object.<string, any>} 返回元素上的属性配置项\r\n * @example\r\n * ```js\r\n * <div id=\"testEl\" lay-options=\"{color:red}\" lay-toc=\"{hot: true}\"></div>\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 /**\r\n * 请注意: 开发者在使用 lay-options=\"{}\" 配置组件选项时,需确保属性值不来自于网页用户,\r\n * 即属性值必须在网页开发者自身的可控范围内,否则请勿在 HTML 标签属性中获取组件选项。\r\n */\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 if(navigator && 'clipboard' in navigator){\r\n navigator.clipboard.writeText(text)\r\n .then(options.done, function(){\r\n legacyCopy();\r\n });\r\n }else{\r\n legacyCopy();\r\n }\r\n\r\n function legacyCopy(){\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 * 检测是否支持 Passive Event Listeners\r\n * 引用自 https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\r\n * @type {boolean}\r\n */\r\n lay.passiveSupported = function(){\r\n var passiveSupported = false;\r\n try {\r\n var opts = Object.defineProperty({}, 'passive', {\r\n get: function() {\r\n passiveSupported = true;\r\n }\r\n });\r\n window.addEventListener('test', null, opts);\r\n window.removeEventListener('test', null, opts);\r\n } catch (err) {}\r\n return passiveSupported;\r\n }();\r\n\r\n /**\r\n * 是否支持 touch 事件\r\n */\r\n lay.touchEventsSupported = function(){\r\n return 'ontouchstart' in window;\r\n };\r\n\r\n /**\r\n * @typedef touchSwipeState\r\n * @prop {{x: number,y: number}} pointerStart - 初始坐标\r\n * @prop {{x: number,y: number}} pointerEnd - 结束坐标\r\n * @prop {number} distanceX - X 轴移动距离\r\n * @prop {number} distanceY - Y 轴移动距离\r\n * @prop {'none'|'right'|'left'|'up'|'down'} direction - 滑动方向\r\n * @prop {Date} timeStart 开始时间\r\n */\r\n /**\r\n * @callback touchSwipeCallback\r\n * @param {TouchEvent} e 滑动事件\r\n * @param {touchSwipeState} state 滑动相关的状态\r\n */\r\n /**\r\n * 基于 touch 事件的触摸滑动\r\n * @param {string | HTMLElement | JQuery} elem - HTML 元素\r\n * @param {{onTouchStart?: touchSwipeCallback, onTouchMove?: touchSwipeCallback, onTouchEnd?: touchSwipeCallback}} opts - 配置项\r\n */\r\n lay.touchSwipe = function(elem, opts){\r\n var options = opts\r\n var targetElem = lay(elem)[0];\r\n\r\n if(!targetElem || !lay.touchEventsSupported()) return;\r\n\r\n var state = {\r\n pointerStart: {x:0, y:0},\r\n pointerEnd: {x:0, y:0},\r\n distanceX: 0,\r\n distanceY: 0,\r\n direction:'none', // 'up','down','left','right','none\r\n timeStart: null\r\n }\r\n\r\n var onStart = function(e){\r\n if(e.touches.length !== 1) return;\r\n bindEvents();\r\n // 重置状态\r\n state.timeStart = Date.now();\r\n state.pointerStart.x = state.pointerEnd.x = e.touches[0].clientX;\r\n state.pointerStart.y = state.pointerEnd.y = e.touches[0].clientY;\r\n state.distanceX = state.distanceY = 0;\r\n state.direction = 'none'\r\n\r\n options.onTouchStart && options.onTouchStart(e, state);\r\n }\r\n\r\n var onMove = function(e){\r\n e.preventDefault();\r\n state.pointerEnd.x = e.touches[0].clientX;\r\n state.pointerEnd.y = e.touches[0].clientY;\r\n state.distanceX = state.pointerStart.x - state.pointerEnd.x;\r\n state.distanceY = state.pointerStart.y - state.pointerEnd.y;\r\n if(Math.abs(state.distanceX) > Math.abs(state.distanceY)){\r\n state.direction = state.distanceX > 0 ? 'left' : 'right';\r\n }else{\r\n state.direction = state.distanceY > 0 ? 'up' : 'down';\r\n }\r\n options.onTouchMove && options.onTouchMove(e, state);\r\n }\r\n\r\n var onEnd = function(e){\r\n options.onTouchEnd && options.onTouchEnd(e, state);\r\n unbindEvents();\r\n }\r\n \r\n var bindEvents = function(){\r\n targetElem.addEventListener('touchmove', onMove, lay.passiveSupported ? { passive: false} : false);\r\n targetElem.addEventListener('touchend', onEnd);\r\n targetElem.addEventListener('touchcancel', onEnd);\r\n }\r\n\r\n var unbindEvents = function(){\r\n targetElem.removeEventListener('touchmove', onMove);\r\n targetElem.removeEventListener('touchend', onEnd, lay.passiveSupported ? { passive: false} : false);\r\n targetElem.removeEventListener('touchcancel', onEnd);\r\n }\r\n\r\n // 防止事件重复绑定\r\n if(targetElem.__lay_touchswipe_cb_){\r\n targetElem.removeEventListener('touchstart', targetElem.__lay_touchswipe_cb_);\r\n }\r\n targetElem.__lay_touchswipe_cb_ = onStart;\r\n targetElem.addEventListener('touchstart', onStart);\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, '&amp;')\r\n .replace(/</g, '&lt;').replace(/>/g, '&gt;')\r\n .replace(/'/g, '&#39;').replace(/\"/g, '&quot;');\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 /**\r\n * 请注意: 开发者在使用模板语法时,需确保模板中的 JS 语句不来自于页面用户输入。\r\n * 即模板中的 JS 语句必须在页面开发者自身的可控范围内,否则请避免使用该模板解析。\r\n */\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});\r\n","/**\r\n * laypage 分页组件\r\n */\r\n\r\nlayui.define(function(exports){\r\n \"use strict\";\r\n \r\n var doc = document;\r\n var id = 'getElementById';\r\n var tag = 'getElementsByTagName';\r\n \r\n // 字符常量\r\n var MOD_NAME = 'laypage';\r\n var DISABLED = 'layui-disabled';\r\n \r\n // 构造器\r\n var Class = function(options){\r\n var that = this;\r\n that.config = options || {};\r\n that.config.index = ++laypage.index;\r\n that.render(true);\r\n };\r\n\r\n // 判断传入的容器类型\r\n Class.prototype.type = function(){\r\n var config = this.config;\r\n if(typeof config.elem === 'object'){\r\n return config.elem.length === undefined ? 2 : 3;\r\n }\r\n };\r\n\r\n // 分页视图\r\n Class.prototype.view = function(){\r\n var that = this;\r\n var config = that.config;\r\n\r\n // 连续页码个数\r\n var groups = config.groups = 'groups' in config \r\n ? (Number(config.groups) || 0)\r\n : 5; \r\n \r\n // 排版\r\n config.layout = typeof config.layout === 'object' \r\n ? config.layout \r\n : ['prev', 'page', 'next'];\r\n \r\n config.count = Number(config.count) || 0; // 数据总数\r\n config.curr = Number(config.curr) || 1; // 当前页\r\n\r\n // 每页条数的选择项\r\n config.limits = typeof config.limits === 'object'\r\n ? config.limits\r\n : [10, 20, 30, 40, 50];\r\n\r\n // 默认条数\r\n config.limit = Number(config.limit) || 10;\r\n \r\n // 总页数\r\n config.pages = Math.ceil(config.count/config.limit) || 1;\r\n \r\n // 当前页不能超过总页数\r\n if(config.curr > config.pages){\r\n config.curr = config.pages;\r\n } else if(config.curr < 1) { // 当前分页不能小于 1\r\n config.curr = 1;\r\n }\r\n \r\n // 连续分页个数不能低于 0 且不能大于总页数\r\n if(groups < 0){\r\n groups = 1;\r\n } else if (groups > config.pages){\r\n groups = config.pages;\r\n }\r\n \r\n config.prev = 'prev' in config ? config.prev : '&#x4E0A;&#x4E00;&#x9875;'; // 上一页文本\r\n config.next = 'next' in config ? config.next : '&#x4E0B;&#x4E00;&#x9875;'; // 下一页文本\r\n \r\n // 计算当前组\r\n var index = config.pages > groups \r\n ? Math.ceil( (config.curr + (groups > 1 ? 1 : 0)) / (groups > 0 ? groups : 1) )\r\n : 1;\r\n \r\n // 视图片段\r\n var views = {\r\n // 上一页\r\n prev: function(){\r\n return config.prev \r\n ? '<a class=\"layui-laypage-prev'+ (config.curr == 1 ? (' ' + DISABLED) : '') +'\" data-page=\"'+ (config.curr - 1) +'\">'+ config.prev +'</a>'\r\n : '';\r\n }(),\r\n \r\n // 页码\r\n page: function(){\r\n var pager = [];\r\n \r\n // 数据量为0时不输出页码\r\n if(config.count < 1){\r\n return '';\r\n }\r\n \r\n // 首页\r\n if(index > 1 && config.first !== false && groups !== 0){\r\n pager.push('<a class=\"layui-laypage-first\" data-page=\"1\" title=\"&#x9996;&#x9875;\">'+ (config.first || 1) +'</a>');\r\n }\r\n\r\n // 计算当前页码组的起始页\r\n var halve = Math.floor((groups-1)/2) // 页码数等分\r\n var start = index > 1 ? config.curr - halve : 1;\r\n var end = index > 1 ? (function(){\r\n var max = config.curr + (groups - halve - 1);\r\n return max > config.pages ? config.pages : max;\r\n }()) : groups;\r\n \r\n // 防止最后一组出现“不规定”的连续页码数\r\n if(end - start < groups - 1){\r\n start = end - groups + 1;\r\n }\r\n\r\n // 输出左分割符\r\n if(config.first !== false && start > 2){\r\n pager.push('<span class=\"layui-laypage-spr\">&#x2026;</span>')\r\n }\r\n \r\n // 输出连续页码\r\n for(; start <= end; start++){\r\n if(start === config.curr){\r\n // 当前页\r\n pager.push('<span class=\"layui-laypage-curr\"><em class=\"layui-laypage-em\" '+ (/^#/.test(config.theme) ? 'style=\"background-color:'+ config.theme +';\"' : '') +'></em><em>'+ start +'</em></span>');\r\n } else {\r\n pager.push('<a data-page=\"'+ start +'\">'+ start +'</a>');\r\n }\r\n }\r\n \r\n // 输出输出右分隔符 & 末页\r\n if(config.pages > groups && config.pages > end && config.last !== false){\r\n if(end + 1 < config.pages){\r\n pager.push('<span class=\"layui-laypage-spr\">&#x2026;</span>');\r\n }\r\n if(groups !== 0){\r\n pager.push('<a class=\"layui-laypage-last\" title=\"&#x5C3E;&#x9875;\" data-page=\"'+ config.pages +'\">'+ (config.last || config.pages) +'</a>');\r\n }\r\n }\r\n\r\n return pager.join('');\r\n }(),\r\n \r\n // 下一页\r\n next: function(){\r\n return config.next \r\n ? '<a class=\"layui-laypage-next'+ (config.curr == config.pages ? (' ' + DISABLED) : '') +'\" data-page=\"'+ (config.curr + 1) +'\">'+ config.next +'</a>'\r\n : '';\r\n }(),\r\n \r\n // 数据总数\r\n count: function(){\r\n var countText = typeof config.countText === 'object' ? config.countText : ['共 ', ' 条'];\r\n return '<span class=\"layui-laypage-count\">'+ countText[0] + config.count + countText[1] +'</span>'\r\n }(),\r\n \r\n // 每页条数\r\n limit: function(){\r\n var elemArr = ['<span class=\"layui-laypage-limits\"><select lay-ignore>'];\r\n var template = function(item) {\r\n var def = item +' 条/页';\r\n return typeof config.limitTemplet === 'function'\r\n ? (config.limitTemplet(item) || def)\r\n : def;\r\n };\r\n\r\n // 条目选项列表\r\n layui.each(config.limits, function(index, item){\r\n elemArr.push(\r\n '<option value=\"'+ item +'\"'+ (item === config.limit ? ' selected' : '') +'>'\r\n + template(item)\r\n + '</option>'\r\n );\r\n });\r\n\r\n return elemArr.join('') +'</select></span>';\r\n }(),\r\n \r\n // 刷新当前页\r\n refresh: [\r\n '<a data-page=\"'+ config.curr +'\" class=\"layui-laypage-refresh\">',\r\n '<i class=\"layui-icon layui-icon-refresh\"></i>',\r\n '</a>'\r\n ].join(''),\r\n\r\n // 跳页区域\r\n skip: function(){\r\n var skipText = typeof config.skipText === 'object' ? config.skipText : [\r\n '&#x5230;&#x7B2C;',\r\n '&#x9875;',\r\n '&#x786e;&#x5b9a;'\r\n ];\r\n return [\r\n '<span class=\"layui-laypage-skip\">'+ skipText[0],\r\n '<input type=\"text\" min=\"1\" value=\"'+ config.curr +'\" class=\"layui-input\">',\r\n skipText[1]+ '<button type=\"button\" class=\"layui-laypage-btn\">'+ skipText[2] +'</button>',\r\n '</span>'\r\n ].join('');\r\n }()\r\n };\r\n\r\n return ['<div class=\"layui-box layui-laypage layui-laypage-'+ (config.theme ? (\r\n /^#/.test(config.theme) ? 'molv' : config.theme\r\n ) : 'default') +'\" id=\"layui-laypage-'+ config.index +'\">',\r\n function(){\r\n var plate = [];\r\n layui.each(config.layout, function(index, item){\r\n if(views[item]){\r\n plate.push(views[item])\r\n }\r\n });\r\n return plate.join('');\r\n }(),\r\n '</div>'].join('');\r\n };\r\n\r\n // 跳页的回调\r\n Class.prototype.jump = function(elem, isskip){\r\n if(!elem) return;\r\n\r\n var that = this;\r\n var config = that.config;\r\n var childs = elem.children;\r\n var btn = elem[tag]('button')[0];\r\n var input = elem[tag]('input')[0];\r\n var select = elem[tag]('select')[0];\r\n var skip = function(){\r\n var curr = Number(input.value.replace(/\\s|\\D/g, ''));\r\n if(curr){\r\n config.curr = curr;\r\n that.render();\r\n }\r\n };\r\n \r\n if(isskip) return skip();\r\n \r\n // 页码\r\n for(var i = 0, len = childs.length; i < len; i++){\r\n if(childs[i].nodeName.toLowerCase() === 'a'){\r\n laypage.on(childs[i], 'click', function(){\r\n var curr = Number(this.getAttribute('data-page'));\r\n if(curr < 1 || curr > config.pages) return;\r\n config.curr = curr;\r\n that.render();\r\n });\r\n }\r\n }\r\n \r\n // 条数\r\n if(select){\r\n laypage.on(select, 'change', function(){\r\n var value = this.value;\r\n if(config.curr*value > config.count){\r\n config.curr = Math.ceil(config.count/value);\r\n }\r\n config.limit = value;\r\n that.render();\r\n });\r\n }\r\n \r\n // 确定\r\n if(btn){\r\n laypage.on(btn, 'click', function(){\r\n skip();\r\n });\r\n }\r\n };\r\n \r\n // 输入页数字控制\r\n Class.prototype.skip = function(elem){\r\n if(!elem) return;\r\n\r\n var that = this;\r\n var input = elem[tag]('input')[0];\r\n\r\n if(!input) return;\r\n\r\n // 键盘事件\r\n laypage.on(input, 'keyup', function(e){\r\n var value = this.value;\r\n var keyCode = e.keyCode;\r\n\r\n if(/^(37|38|39|40)$/.test(keyCode)) return;\r\n\r\n if(/\\D/.test(value)){\r\n this.value = value.replace(/\\D/, '');\r\n }\r\n if(keyCode === 13){\r\n that.jump(elem, true)\r\n }\r\n });\r\n };\r\n\r\n // 渲染分页\r\n Class.prototype.render = function(load){\r\n var that = this;\r\n var config = that.config;\r\n var type = that.type();\r\n var view = that.view();\r\n \r\n if(type === 2){\r\n config.elem && (config.elem.innerHTML = view);\r\n } else if(type === 3){\r\n config.elem.html(view);\r\n } else {\r\n if(doc[id](config.elem)){\r\n doc[id](config.elem).innerHTML = view;\r\n }\r\n }\r\n\r\n config.jump && config.jump(config, load);\r\n \r\n var elem = doc[id]('layui-laypage-' + config.index);\r\n that.jump(elem);\r\n \r\n if(config.hash && !load){\r\n location.hash = '!'+ config.hash +'='+ config.curr;\r\n }\r\n \r\n that.skip(elem);\r\n };\r\n \r\n // 外部接口\r\n var laypage = {\r\n // 分页渲染\r\n render: function(options){\r\n var o = new Class(options);\r\n return o.index;\r\n },\r\n index: layui.laypage ? (layui.laypage.index + 10000) : 0,\r\n on: function(elem, even, fn){\r\n elem.attachEvent ? elem.attachEvent('on'+ even, function(e){ // for ie\r\n e.target = e.srcElement;\r\n fn.call(elem, e);\r\n }) : elem.addEventListener(even, fn, false);\r\n return this;\r\n }\r\n }\r\n\r\n exports(MOD_NAME, laypage);\r\n});\r\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 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: '结束时间不能早于开始时间<br>请重新选择'\r\n ,invalidDate: '不在有效日期或时间范围内'\r\n ,formatError: ['日期格式不合法<br>必须遵循下述格式:<br>', '<br>已为你重置']\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<br>Please re-select'\r\n ,invalidDate: 'Invalid date'\r\n ,formatError: ['The date format error<br>Must be followed<br>', '<br>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 = '&#xe65a;';\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 = '&#xe603;';\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 = '&#xe602;';\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 = '&#xe65b;';\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('<span lay-type=\"datetime\" class=\"'+ ELEM_TIME_BTN +'\">'+ lang.timeTips +'</span>');\r\n }\r\n if(!(!options.range && options.type === 'datetime') || options.fullPanel){\r\n html.push('<span class=\"'+ ELEM_PREVIEW +'\" title=\"'+ lang.preview +'\"></span>')\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('<span lay-type=\"'+ item +'\" class=\"laydate-btns-'+ item +'\">'+ title +'</span>');\r\n });\r\n html.push('<div class=\"laydate-footer-btns\">'+ btns.join('') +'</div>');\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('<li data-index=\"' + i + '\">'+item.text+'</li>')\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 ? ('<div class=\"'+ ELEM_SHADE +'\" style=\"'+ ('z-index:'+ (parseInt(layui.getStyle(elem, 'z-index'))-1) +'; background-color: ' + (options.shade[1] || '#000') + '; opacity: ' + (options.shade[0] || options.shade)) +'\"></div>') : '';\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('<span class=\"laydate-day-mark\">'+ mark +'</span>');\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('<span class=\"laydate-day-holidays\"' + (\r\n type[idx] ? ('type=\"'+ type[idx] +'\"') : ''\r\n ) + '>' + YMD[2] + '</span>');\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('<div>' + YMD[2] + '</div>');\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 index: 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 = ['<p>'+ lang.time[i] +'</p><ol>'];\r\n lay.each(new Array(item), function(ii){\r\n childUL.push('<li'+ (that[startEnd][hms[i]] === ii ? ' class=\"'+ THIS +'\"' : '') +'>'+ lay.digit(ii, 2) +'</li>');\r\n });\r\n li.innerHTML = childUL.join('') + '</ol>';\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 var olElem = lay(ul).find('ol');\r\n olElem.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 if(lay.touchEventsSupported()){\r\n olElem.on('touchstart', function(){\r\n this.style['overflow-y'] = 'auto';\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 } 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 // 判断是否反选\r\n var needSwapDate = (isChange || that.rangeLinked && that.endState) && that.newDate(that.startDate) > that.newDate(that.endDate);\r\n if (needSwapDate){\r\n var isSameDate = that.startDate.year === that.endDate.year && that.startDate.month === that.endDate.month && that.startDate.date === that.endDate.date;\r\n var startDate;\r\n // 如果是同一天并且出现了反选证明是时分秒出现开始时间大于结束时间的现象\r\n if(isSameDate){\r\n startDate = that.startTime;\r\n that.startTime = that.endTime;\r\n that.endTime = startDate;\r\n }\r\n // 当出现反向选择时(即“后点击”的日期比“先点击”的日期小),重新提取区间\r\n startDate = that.startDate;\r\n that.startDate = lay.extend({}, that.endDate, that.startTime);\r\n options.dateTime = lay.extend({}, that.startDate);\r\n that.endDate = lay.extend({}, startDate, that.endTime);\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","/*!\r\n * jQuery JavaScript Library v1.12.4\r\n * http://jquery.com/\r\n *\r\n * Includes Sizzle.js\r\n * http://sizzlejs.com/\r\n *\r\n * Copyright jQuery Foundation and other contributors\r\n * Released under the MIT license\r\n * http://jquery.org/license\r\n *\r\n * Date: 2016-05-20T17:17Z\r\n */\r\n\r\n(function( global, factory ) {\r\n\r\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\r\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\r\n\t\t// is present, execute the factory and get jQuery.\r\n\t\t// For environments that do not have a `window` with a `document`\r\n\t\t// (such as Node.js), expose a factory as module.exports.\r\n\t\t// This accentuates the need for the creation of a real `window`.\r\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\r\n\t\t// See ticket #14549 for more info.\r\n\t\tmodule.exports = global.document ?\r\n\t\t\tfactory( global, true ) :\r\n\t\t\tfunction( w ) {\r\n\t\t\t\tif ( !w.document ) {\r\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\r\n\t\t\t\t}\r\n\t\t\t\treturn factory( w );\r\n\t\t\t};\r\n\t} else {\r\n\t\tfactory( global );\r\n\t}\r\n\r\n// Pass this if window is not defined yet\r\n}(typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\r\n\r\n// Support: Firefox 18+\r\n// Can't be in strict mode, several libs including ASP.NET trace\r\n// the stack via arguments.caller.callee and Firefox dies if\r\n// you try to trace through \"use strict\" call chains. (#13335)\r\n//\"use strict\";\r\nvar deletedIds = [];\r\n\r\nvar document = window.document;\r\n\r\nvar slice = deletedIds.slice;\r\n\r\nvar concat = deletedIds.concat;\r\n\r\nvar push = deletedIds.push;\r\n\r\nvar indexOf = deletedIds.indexOf;\r\n\r\nvar class2type = {};\r\n\r\nvar toString = class2type.toString;\r\n\r\nvar hasOwn = class2type.hasOwnProperty;\r\n\r\nvar support = {};\r\n\r\n\r\n\r\nvar\r\n\tversion = \"1.12.4\",\r\n\r\n\t// Define a local copy of jQuery\r\n\tjQuery = function( selector, context ) {\r\n\r\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\r\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\r\n\t\treturn new jQuery.fn.init( selector, context );\r\n\t},\r\n\r\n\t// Support: Android<4.1, IE<9\r\n\t// Make sure we trim BOM and NBSP\r\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\r\n\r\n\t// Matches dashed string for camelizing\r\n\trmsPrefix = /^-ms-/,\r\n\trdashAlpha = /-([\\da-z])/gi,\r\n\r\n\t// Used by jQuery.camelCase as callback to replace()\r\n\tfcamelCase = function( all, letter ) {\r\n\t\treturn letter.toUpperCase();\r\n\t};\r\n\r\njQuery.fn = jQuery.prototype = {\r\n\r\n\t// The current version of jQuery being used\r\n\tjquery: version,\r\n\r\n\tconstructor: jQuery,\r\n\r\n\t// Start with an empty selector\r\n\tselector: \"\",\r\n\r\n\t// The default length of a jQuery object is 0\r\n\tlength: 0,\r\n\r\n\ttoArray: function() {\r\n\t\treturn slice.call( this );\r\n\t},\r\n\r\n\t// Get the Nth element in the matched element set OR\r\n\t// Get the whole matched element set as a clean array\r\n\tget: function( num ) {\r\n\t\treturn num != null ?\r\n\r\n\t\t\t// Return just the one element from the set\r\n\t\t\t( num < 0 ? this[ num + this.length ] : this[ num ] ) :\r\n\r\n\t\t\t// Return all the elements in a clean array\r\n\t\t\tslice.call( this );\r\n\t},\r\n\r\n\t// Take an array of elements and push it onto the stack\r\n\t// (returning the new matched element set)\r\n\tpushStack: function( elems ) {\r\n\r\n\t\t// Build a new jQuery matched element set\r\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\r\n\r\n\t\t// Add the old object onto the stack (as a reference)\r\n\t\tret.prevObject = this;\r\n\t\tret.context = this.context;\r\n\r\n\t\t// Return the newly-formed element set\r\n\t\treturn ret;\r\n\t},\r\n\r\n\t// Execute a callback for every element in the matched set.\r\n\teach: function( callback ) {\r\n\t\treturn jQuery.each( this, callback );\r\n\t},\r\n\r\n\tmap: function( callback ) {\r\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\r\n\t\t\treturn callback.call( elem, i, elem );\r\n\t\t} ) );\r\n\t},\r\n\r\n\tslice: function() {\r\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\r\n\t},\r\n\r\n\tfirst: function() {\r\n\t\treturn this.eq( 0 );\r\n\t},\r\n\r\n\tlast: function() {\r\n\t\treturn this.eq( -1 );\r\n\t},\r\n\r\n\teq: function( i ) {\r\n\t\tvar len = this.length,\r\n\t\t\tj = +i + ( i < 0 ? len : 0 );\r\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\r\n\t},\r\n\r\n\tend: function() {\r\n\t\treturn this.prevObject || this.constructor();\r\n\t},\r\n\r\n\t// For internal use only.\r\n\t// Behaves like an Array's method, not like a jQuery method.\r\n\tpush: push,\r\n\tsort: deletedIds.sort,\r\n\tsplice: deletedIds.splice\r\n};\r\n\r\njQuery.extend = jQuery.fn.extend = function() {\r\n\tvar src, copyIsArray, copy, name, options, clone,\r\n\t\ttarget = arguments[ 0 ] || {},\r\n\t\ti = 1,\r\n\t\tlength = arguments.length,\r\n\t\tdeep = false;\r\n\r\n\t// Handle a deep copy situation\r\n\tif ( typeof target === \"boolean\" ) {\r\n\t\tdeep = target;\r\n\r\n\t\t// skip the boolean and the target\r\n\t\ttarget = arguments[ i ] || {};\r\n\t\ti++;\r\n\t}\r\n\r\n\t// Handle case when target is a string or something (possible in deep copy)\r\n\tif ( typeof target !== \"object\" && !jQuery.isFunction( target ) ) {\r\n\t\ttarget = {};\r\n\t}\r\n\r\n\t// extend jQuery itself if only one argument is passed\r\n\tif ( i === length ) {\r\n\t\ttarget = this;\r\n\t\ti--;\r\n\t}\r\n\r\n\tfor ( ; i < length; i++ ) {\r\n\r\n\t\t// Only deal with non-null/undefined values\r\n\t\tif ( ( options = arguments[ i ] ) != null ) {\r\n\r\n\t\t\t// Extend the base object\r\n\t\t\tfor ( name in options ) {\r\n\t\t\t\tsrc = target[ name ];\r\n\t\t\t\tcopy = options[ name ];\r\n\r\n\t\t\t\t// Prevent never-ending loop\r\n\t\t\t\tif ( target === copy ) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Recurse if we're merging plain objects or arrays\r\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\r\n\t\t\t\t\t( copyIsArray = jQuery.isArray( copy ) ) ) ) {\r\n\r\n\t\t\t\t\tif ( copyIsArray ) {\r\n\t\t\t\t\t\tcopyIsArray = false;\r\n\t\t\t\t\t\tclone = src && jQuery.isArray( src ) ? src : [];\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject( src ) ? src : {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Never move original objects, clone them\r\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\r\n\r\n\t\t\t\t// Don't bring in undefined values\r\n\t\t\t\t} else if ( copy !== undefined ) {\r\n\t\t\t\t\ttarget[ name ] = copy;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the modified object\r\n\treturn target;\r\n};\r\n\r\njQuery.extend( {\r\n\r\n\t// Unique for each copy of jQuery on the page\r\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\r\n\r\n\t// Assume jQuery is ready without the ready module\r\n\tisReady: true,\r\n\r\n\terror: function( msg ) {\r\n\t\tthrow new Error( msg );\r\n\t},\r\n\r\n\tnoop: function() {},\r\n\r\n\t// See test/unit/core.js for details concerning isFunction.\r\n\t// Since version 1.3, DOM methods and functions like alert\r\n\t// aren't supported. They return false on IE (#2968).\r\n\tisFunction: function( obj ) {\r\n\t\treturn jQuery.type( obj ) === \"function\";\r\n\t},\r\n\r\n\tisArray: Array.isArray || function( obj ) {\r\n\t\treturn jQuery.type( obj ) === \"array\";\r\n\t},\r\n\r\n\tisWindow: function( obj ) {\r\n\t\t/* jshint eqeqeq: false */\r\n\t\treturn obj != null && obj == obj.window;\r\n\t},\r\n\r\n\tisNumeric: function( obj ) {\r\n\r\n\t\t// parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\r\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\r\n\t\t// subtraction forces infinities to NaN\r\n\t\t// adding 1 corrects loss of precision from parseFloat (#15100)\r\n\t\tvar realStringObj = obj && obj.toString();\r\n\t\treturn !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;\r\n\t},\r\n\r\n\tisEmptyObject: function( obj ) {\r\n\t\tvar name;\r\n\t\tfor ( name in obj ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\tisPlainObject: function( obj ) {\r\n\t\tvar key;\r\n\r\n\t\t// Must be an Object.\r\n\t\t// Because of IE, we also have to check the presence of the constructor property.\r\n\t\t// Make sure that DOM nodes and window objects don't pass through, as well\r\n\t\tif ( !obj || jQuery.type( obj ) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// Not own constructor property must be Object\r\n\t\t\tif ( obj.constructor &&\r\n\t\t\t\t!hasOwn.call( obj, \"constructor\" ) &&\r\n\t\t\t\t!hasOwn.call( obj.constructor.prototype, \"isPrototypeOf\" ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch ( e ) {\r\n\r\n\t\t\t// IE8,9 Will throw exceptions on certain host objects #9897\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Support: IE<9\r\n\t\t// Handle iteration over inherited properties before own properties.\r\n\t\tif ( !support.ownFirst ) {\r\n\t\t\tfor ( key in obj ) {\r\n\t\t\t\treturn hasOwn.call( obj, key );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Own properties are enumerated firstly, so to speed up,\r\n\t\t// if last one is own, then all properties are own.\r\n\t\tfor ( key in obj ) {}\r\n\r\n\t\treturn key === undefined || hasOwn.call( obj, key );\r\n\t},\r\n\r\n\ttype: function( obj ) {\r\n\t\tif ( obj == null ) {\r\n\t\t\treturn obj + \"\";\r\n\t\t}\r\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\r\n\t\t\tclass2type[ toString.call( obj ) ] || \"object\" :\r\n\t\t\ttypeof obj;\r\n\t},\r\n\r\n\t// Workarounds based on findings by Jim Driscoll\r\n\t// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context\r\n\tglobalEval: function( data ) {\r\n\t\tif ( data && jQuery.trim( data ) ) {\r\n\r\n\t\t\t// We use execScript on Internet Explorer\r\n\t\t\t// We use an anonymous function so that context is window\r\n\t\t\t// rather than jQuery in Firefox\r\n\t\t\t( window.execScript || function( data ) {\r\n\t\t\t\twindow[ \"eval\" ].call( window, data ); // jscs:ignore requireDotNotation\r\n\t\t\t} )( data );\r\n\t\t}\r\n\t},\r\n\r\n\t// Convert dashed to camelCase; used by the css and data modules\r\n\t// Microsoft forgot to hump their vendor prefix (#9572)\r\n\tcamelCase: function( string ) {\r\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\r\n\t},\r\n\r\n\tnodeName: function( elem, name ) {\r\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\r\n\t},\r\n\r\n\teach: function( obj, callback ) {\r\n\t\tvar length, i = 0;\r\n\r\n\t\tif ( isArrayLike( obj ) ) {\r\n\t\t\tlength = obj.length;\r\n\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor ( i in obj ) {\r\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn obj;\r\n\t},\r\n\r\n\t// Support: Android<4.1, IE<9\r\n\ttrim: function( text ) {\r\n\t\treturn text == null ?\r\n\t\t\t\"\" :\r\n\t\t\t( text + \"\" ).replace( rtrim, \"\" );\r\n\t},\r\n\r\n\t// results is for internal usage only\r\n\tmakeArray: function( arr, results ) {\r\n\t\tvar ret = results || [];\r\n\r\n\t\tif ( arr != null ) {\r\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\r\n\t\t\t\tjQuery.merge( ret,\r\n\t\t\t\t\ttypeof arr === \"string\" ?\r\n\t\t\t\t\t[ arr ] : arr\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tpush.call( ret, arr );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t},\r\n\r\n\tinArray: function( elem, arr, i ) {\r\n\t\tvar len;\r\n\r\n\t\tif ( arr ) {\r\n\t\t\tif ( indexOf ) {\r\n\t\t\t\treturn indexOf.call( arr, elem, i );\r\n\t\t\t}\r\n\r\n\t\t\tlen = arr.length;\r\n\t\t\ti = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;\r\n\r\n\t\t\tfor ( ; i < len; i++ ) {\r\n\r\n\t\t\t\t// Skip accessing in sparse arrays\r\n\t\t\t\tif ( i in arr && arr[ i ] === elem ) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t},\r\n\r\n\tmerge: function( first, second ) {\r\n\t\tvar len = +second.length,\r\n\t\t\tj = 0,\r\n\t\t\ti = first.length;\r\n\r\n\t\twhile ( j < len ) {\r\n\t\t\tfirst[ i++ ] = second[ j++ ];\r\n\t\t}\r\n\r\n\t\t// Support: IE<9\r\n\t\t// Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)\r\n\t\tif ( len !== len ) {\r\n\t\t\twhile ( second[ j ] !== undefined ) {\r\n\t\t\t\tfirst[ i++ ] = second[ j++ ];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfirst.length = i;\r\n\r\n\t\treturn first;\r\n\t},\r\n\r\n\tgrep: function( elems, callback, invert ) {\r\n\t\tvar callbackInverse,\r\n\t\t\tmatches = [],\r\n\t\t\ti = 0,\r\n\t\t\tlength = elems.length,\r\n\t\t\tcallbackExpect = !invert;\r\n\r\n\t\t// Go through the array, only saving the items\r\n\t\t// that pass the validator function\r\n\t\tfor ( ; i < length; i++ ) {\r\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\r\n\t\t\tif ( callbackInverse !== callbackExpect ) {\r\n\t\t\t\tmatches.push( elems[ i ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn matches;\r\n\t},\r\n\r\n\t// arg is for internal usage only\r\n\tmap: function( elems, callback, arg ) {\r\n\t\tvar length, value,\r\n\t\t\ti = 0,\r\n\t\t\tret = [];\r\n\r\n\t\t// Go through the array, translating each of the items to their new values\r\n\t\tif ( isArrayLike( elems ) ) {\r\n\t\t\tlength = elems.length;\r\n\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\r\n\r\n\t\t\t\tif ( value != null ) {\r\n\t\t\t\t\tret.push( value );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// Go through every key on the object,\r\n\t\t} else {\r\n\t\t\tfor ( i in elems ) {\r\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\r\n\r\n\t\t\t\tif ( value != null ) {\r\n\t\t\t\t\tret.push( value );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Flatten any nested arrays\r\n\t\treturn concat.apply( [], ret );\r\n\t},\r\n\r\n\t// A global GUID counter for objects\r\n\tguid: 1,\r\n\r\n\t// Bind a function to a context, optionally partially applying any\r\n\t// arguments.\r\n\tproxy: function( fn, context ) {\r\n\t\tvar args, proxy, tmp;\r\n\r\n\t\tif ( typeof context === \"string\" ) {\r\n\t\t\ttmp = fn[ context ];\r\n\t\t\tcontext = fn;\r\n\t\t\tfn = tmp;\r\n\t\t}\r\n\r\n\t\t// Quick check to determine if target is callable, in the spec\r\n\t\t// this throws a TypeError, but we will just return undefined.\r\n\t\tif ( !jQuery.isFunction( fn ) ) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\t// Simulated bind\r\n\t\targs = slice.call( arguments, 2 );\r\n\t\tproxy = function() {\r\n\t\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\r\n\t\t};\r\n\r\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\r\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\r\n\r\n\t\treturn proxy;\r\n\t},\r\n\r\n\tnow: function() {\r\n\t\treturn +( new Date() );\r\n\t},\r\n\r\n\t// jQuery.support is not used in Core but other projects attach their\r\n\t// properties to it so it needs to exist.\r\n\tsupport: support\r\n} );\r\n\r\n// JSHint would error on this code due to the Symbol not being defined in ES5.\r\n// Defining this global in .jshintrc would create a danger of using the global\r\n// unguarded in another place, it seems safer to just disable JSHint for these\r\n// three lines.\r\n/* jshint ignore: start */\r\nif ( typeof Symbol === \"function\" ) {\r\n\tjQuery.fn[ Symbol.iterator ] = deletedIds[ Symbol.iterator ];\r\n}\r\n/* jshint ignore: end */\r\n\r\n// Populate the class2type map\r\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\r\nfunction( i, name ) {\r\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\r\n} );\r\n\r\nfunction isArrayLike( obj ) {\r\n\r\n\t// Support: iOS 8.2 (not reproducible in simulator)\r\n\t// `in` check used to prevent JIT error (gh-2145)\r\n\t// hasOwn isn't used here due to false negatives\r\n\t// regarding Nodelist length in IE\r\n\tvar length = !!obj && \"length\" in obj && obj.length,\r\n\t\ttype = jQuery.type( obj );\r\n\r\n\tif ( type === \"function\" || jQuery.isWindow( obj ) ) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\treturn type === \"array\" || length === 0 ||\r\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\r\n}\r\nvar Sizzle =\r\n/*!\r\n * Sizzle CSS Selector Engine v2.2.1\r\n * http://sizzlejs.com/\r\n *\r\n * Copyright jQuery Foundation and other contributors\r\n * Released under the MIT license\r\n * http://jquery.org/license\r\n *\r\n * Date: 2015-10-17\r\n */\r\n(function( window ) {\r\n\r\nvar i,\r\n\tsupport,\r\n\tExpr,\r\n\tgetText,\r\n\tisXML,\r\n\ttokenize,\r\n\tcompile,\r\n\tselect,\r\n\toutermostContext,\r\n\tsortInput,\r\n\thasDuplicate,\r\n\r\n\t// Local document vars\r\n\tsetDocument,\r\n\tdocument,\r\n\tdocElem,\r\n\tdocumentIsHTML,\r\n\trbuggyQSA,\r\n\trbuggyMatches,\r\n\tmatches,\r\n\tcontains,\r\n\r\n\t// Instance-specific data\r\n\texpando = \"sizzle\" + 1 * new Date(),\r\n\tpreferredDoc = window.document,\r\n\tdirruns = 0,\r\n\tdone = 0,\r\n\tclassCache = createCache(),\r\n\ttokenCache = createCache(),\r\n\tcompilerCache = createCache(),\r\n\tsortOrder = function( a, b ) {\r\n\t\tif ( a === b ) {\r\n\t\t\thasDuplicate = true;\r\n\t\t}\r\n\t\treturn 0;\r\n\t},\r\n\r\n\t// General-purpose constants\r\n\tMAX_NEGATIVE = 1 << 31,\r\n\r\n\t// Instance methods\r\n\thasOwn = ({}).hasOwnProperty,\r\n\tarr = [],\r\n\tpop = arr.pop,\r\n\tpush_native = arr.push,\r\n\tpush = arr.push,\r\n\tslice = arr.slice,\r\n\t// Use a stripped-down indexOf as it's faster than native\r\n\t// http://jsperf.com/thor-indexof-vs-for/5\r\n\tindexOf = function( list, elem ) {\r\n\t\tvar i = 0,\r\n\t\t\tlen = list.length;\r\n\t\tfor ( ; i < len; i++ ) {\r\n\t\t\tif ( list[i] === elem ) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t},\r\n\r\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\r\n\r\n\t// Regular expressions\r\n\r\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\r\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\r\n\r\n\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\r\n\tidentifier = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\r\n\r\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\r\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\r\n\t\t// Operator (capture 2)\r\n\t\t\"*([*^$|!~]?=)\" + whitespace +\r\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\r\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\r\n\t\t\"*\\\\]\",\r\n\r\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\r\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\r\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\r\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\r\n\t\t// 2. simple (capture 6)\r\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\r\n\t\t// 3. anything else (capture 2)\r\n\t\t\".*\" +\r\n\t\t\")\\\\)|)\",\r\n\r\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\r\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\r\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\r\n\r\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\r\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\r\n\r\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*?)\" + whitespace + \"*\\\\]\", \"g\" ),\r\n\r\n\trpseudo = new RegExp( pseudos ),\r\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\r\n\r\n\tmatchExpr = {\r\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\r\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\r\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\r\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\r\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\r\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\r\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\r\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\r\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\r\n\t\t// For use in libraries implementing .is()\r\n\t\t// We use this for POS matching in `select`\r\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\r\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\r\n\t},\r\n\r\n\trinputs = /^(?:input|select|textarea|button)$/i,\r\n\trheader = /^h\\d$/i,\r\n\r\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\r\n\r\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\r\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\r\n\r\n\trsibling = /[+~]/,\r\n\trescape = /'|\\\\/g,\r\n\r\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\r\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\r\n\tfunescape = function( _, escaped, escapedWhitespace ) {\r\n\t\tvar high = \"0x\" + escaped - 0x10000;\r\n\t\t// NaN means non-codepoint\r\n\t\t// Support: Firefox<24\r\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\r\n\t\treturn high !== high || escapedWhitespace ?\r\n\t\t\tescaped :\r\n\t\t\thigh < 0 ?\r\n\t\t\t\t// BMP codepoint\r\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\r\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\r\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\r\n\t},\r\n\r\n\t// Used for iframes\r\n\t// See setDocument()\r\n\t// Removing the function wrapper causes a \"Permission Denied\"\r\n\t// error in IE\r\n\tunloadHandler = function() {\r\n\t\tsetDocument();\r\n\t};\r\n\r\n// Optimize for push.apply( _, NodeList )\r\ntry {\r\n\tpush.apply(\r\n\t\t(arr = slice.call( preferredDoc.childNodes )),\r\n\t\tpreferredDoc.childNodes\r\n\t);\r\n\t// Support: Android<4.0\r\n\t// Detect silently failing push.apply\r\n\tarr[ preferredDoc.childNodes.length ].nodeType;\r\n} catch ( e ) {\r\n\tpush = { apply: arr.length ?\r\n\r\n\t\t// Leverage slice if possible\r\n\t\tfunction( target, els ) {\r\n\t\t\tpush_native.apply( target, slice.call(els) );\r\n\t\t} :\r\n\r\n\t\t// Support: IE<9\r\n\t\t// Otherwise append directly\r\n\t\tfunction( target, els ) {\r\n\t\t\tvar j = target.length,\r\n\t\t\t\ti = 0;\r\n\t\t\t// Can't trust NodeList.length\r\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\r\n\t\t\ttarget.length = j - 1;\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction Sizzle( selector, context, results, seed ) {\r\n\tvar m, i, elem, nid, nidselect, match, groups, newSelector,\r\n\t\tnewContext = context && context.ownerDocument,\r\n\r\n\t\t// nodeType defaults to 9, since context defaults to document\r\n\t\tnodeType = context ? context.nodeType : 9;\r\n\r\n\tresults = results || [];\r\n\r\n\t// Return early from calls with invalid selector or context\r\n\tif ( typeof selector !== \"string\" || !selector ||\r\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\r\n\r\n\t\treturn results;\r\n\t}\r\n\r\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\r\n\tif ( !seed ) {\r\n\r\n\t\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\r\n\t\t\tsetDocument( context );\r\n\t\t}\r\n\t\tcontext = context || document;\r\n\r\n\t\tif ( documentIsHTML ) {\r\n\r\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\r\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\r\n\t\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\r\n\r\n\t\t\t\t// ID selector\r\n\t\t\t\tif ( (m = match[1]) ) {\r\n\r\n\t\t\t\t\t// Document context\r\n\t\t\t\t\tif ( nodeType === 9 ) {\r\n\t\t\t\t\t\tif ( (elem = context.getElementById( m )) ) {\r\n\r\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\r\n\t\t\t\t\t\t\t// TODO: identify versions\r\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\r\n\t\t\t\t\t\t\tif ( elem.id === m ) {\r\n\t\t\t\t\t\t\t\tresults.push( elem );\r\n\t\t\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Element context\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\r\n\t\t\t\t\t\t// TODO: identify versions\r\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\r\n\t\t\t\t\t\tif ( newContext && (elem = newContext.getElementById( m )) &&\r\n\t\t\t\t\t\t\tcontains( context, elem ) &&\r\n\t\t\t\t\t\t\telem.id === m ) {\r\n\r\n\t\t\t\t\t\t\tresults.push( elem );\r\n\t\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// Type selector\r\n\t\t\t\t} else if ( match[2] ) {\r\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\r\n\t\t\t\t\treturn results;\r\n\r\n\t\t\t\t// Class selector\r\n\t\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName &&\r\n\t\t\t\t\tcontext.getElementsByClassName ) {\r\n\r\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\r\n\t\t\t\t\treturn results;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Take advantage of querySelectorAll\r\n\t\t\tif ( support.qsa &&\r\n\t\t\t\t!compilerCache[ selector + \" \" ] &&\r\n\t\t\t\t(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\r\n\r\n\t\t\t\tif ( nodeType !== 1 ) {\r\n\t\t\t\t\tnewContext = context;\r\n\t\t\t\t\tnewSelector = selector;\r\n\r\n\t\t\t\t// qSA looks outside Element context, which is not what we want\r\n\t\t\t\t// Thanks to Andrew Dupont for this workaround technique\r\n\t\t\t\t// Support: IE <=8\r\n\t\t\t\t// Exclude object elements\r\n\t\t\t\t} else if ( context.nodeName.toLowerCase() !== \"object\" ) {\r\n\r\n\t\t\t\t\t// Capture the context ID, setting it first if necessary\r\n\t\t\t\t\tif ( (nid = context.getAttribute( \"id\" )) ) {\r\n\t\t\t\t\t\tnid = nid.replace( rescape, \"\\\\$&\" );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcontext.setAttribute( \"id\", (nid = expando) );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Prefix every selector in the list\r\n\t\t\t\t\tgroups = tokenize( selector );\r\n\t\t\t\t\ti = groups.length;\r\n\t\t\t\t\tnidselect = ridentifier.test( nid ) ? \"#\" + nid : \"[id='\" + nid + \"']\";\r\n\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\tgroups[i] = nidselect + \" \" + toSelector( groups[i] );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tnewSelector = groups.join( \",\" );\r\n\r\n\t\t\t\t\t// Expand context for sibling selectors\r\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\r\n\t\t\t\t\t\tcontext;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( newSelector ) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tpush.apply( results,\r\n\t\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t} catch ( qsaError ) {\r\n\t\t\t\t\t} finally {\r\n\t\t\t\t\t\tif ( nid === expando ) {\r\n\t\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// All others\r\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\r\n}\r\n\r\n/**\r\n * Create key-value caches of limited size\r\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\r\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\r\n *\tdeleting the oldest entry\r\n */\r\nfunction createCache() {\r\n\tvar keys = [];\r\n\r\n\tfunction cache( key, value ) {\r\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\r\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\r\n\t\t\t// Only keep the most recent entries\r\n\t\t\tdelete cache[ keys.shift() ];\r\n\t\t}\r\n\t\treturn (cache[ key + \" \" ] = value);\r\n\t}\r\n\treturn cache;\r\n}\r\n\r\n/**\r\n * Mark a function for special use by Sizzle\r\n * @param {Function} fn The function to mark\r\n */\r\nfunction markFunction( fn ) {\r\n\tfn[ expando ] = true;\r\n\treturn fn;\r\n}\r\n\r\n/**\r\n * Support testing using an element\r\n * @param {Function} fn Passed the created div and expects a boolean result\r\n */\r\nfunction assert( fn ) {\r\n\tvar div = document.createElement(\"div\");\r\n\r\n\ttry {\r\n\t\treturn !!fn( div );\r\n\t} catch (e) {\r\n\t\treturn false;\r\n\t} finally {\r\n\t\t// Remove from its parent by default\r\n\t\tif ( div.parentNode ) {\r\n\t\t\tdiv.parentNode.removeChild( div );\r\n\t\t}\r\n\t\t// release memory in IE\r\n\t\tdiv = null;\r\n\t}\r\n}\r\n\r\n/**\r\n * Adds the same handler for all of the specified attrs\r\n * @param {String} attrs Pipe-separated list of attributes\r\n * @param {Function} handler The method that will be applied\r\n */\r\nfunction addHandle( attrs, handler ) {\r\n\tvar arr = attrs.split(\"|\"),\r\n\t\ti = arr.length;\r\n\r\n\twhile ( i-- ) {\r\n\t\tExpr.attrHandle[ arr[i] ] = handler;\r\n\t}\r\n}\r\n\r\n/**\r\n * Checks document order of two siblings\r\n * @param {Element} a\r\n * @param {Element} b\r\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\r\n */\r\nfunction siblingCheck( a, b ) {\r\n\tvar cur = b && a,\r\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\r\n\t\t\t( ~b.sourceIndex || MAX_NEGATIVE ) -\r\n\t\t\t( ~a.sourceIndex || MAX_NEGATIVE );\r\n\r\n\t// Use IE sourceIndex if available on both nodes\r\n\tif ( diff ) {\r\n\t\treturn diff;\r\n\t}\r\n\r\n\t// Check if b follows a\r\n\tif ( cur ) {\r\n\t\twhile ( (cur = cur.nextSibling) ) {\r\n\t\t\tif ( cur === b ) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn a ? 1 : -1;\r\n}\r\n\r\n/**\r\n * Returns a function to use in pseudos for input types\r\n * @param {String} type\r\n */\r\nfunction createInputPseudo( type ) {\r\n\treturn function( elem ) {\r\n\t\tvar name = elem.nodeName.toLowerCase();\r\n\t\treturn name === \"input\" && elem.type === type;\r\n\t};\r\n}\r\n\r\n/**\r\n * Returns a function to use in pseudos for buttons\r\n * @param {String} type\r\n */\r\nfunction createButtonPseudo( type ) {\r\n\treturn function( elem ) {\r\n\t\tvar name = elem.nodeName.toLowerCase();\r\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\r\n\t};\r\n}\r\n\r\n/**\r\n * Returns a function to use in pseudos for positionals\r\n * @param {Function} fn\r\n */\r\nfunction createPositionalPseudo( fn ) {\r\n\treturn markFunction(function( argument ) {\r\n\t\targument = +argument;\r\n\t\treturn markFunction(function( seed, matches ) {\r\n\t\t\tvar j,\r\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\r\n\t\t\t\ti = matchIndexes.length;\r\n\r\n\t\t\t// Match elements found at the specified indexes\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\r\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}\r\n\r\n/**\r\n * Checks a node for validity as a Sizzle context\r\n * @param {Element|Object=} context\r\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\r\n */\r\nfunction testContext( context ) {\r\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\r\n}\r\n\r\n// Expose support vars for convenience\r\nsupport = Sizzle.support = {};\r\n\r\n/**\r\n * Detects XML nodes\r\n * @param {Element|Object} elem An element or a document\r\n * @returns {Boolean} True iff elem is a non-HTML XML node\r\n */\r\nisXML = Sizzle.isXML = function( elem ) {\r\n\t// documentElement is verified for cases where it doesn't yet exist\r\n\t// (such as loading iframes in IE - #4833)\r\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\r\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\r\n};\r\n\r\n/**\r\n * Sets document-related variables once based on the current document\r\n * @param {Element|Object} [doc] An element or document object to use to set the document\r\n * @returns {Object} Returns the current document\r\n */\r\nsetDocument = Sizzle.setDocument = function( node ) {\r\n\tvar hasCompare, parent,\r\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\r\n\r\n\t// Return early if doc is invalid or already selected\r\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\r\n\t\treturn document;\r\n\t}\r\n\r\n\t// Update global variables\r\n\tdocument = doc;\r\n\tdocElem = document.documentElement;\r\n\tdocumentIsHTML = !isXML( document );\r\n\r\n\t// Support: IE 9-11, Edge\r\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\r\n\tif ( (parent = document.defaultView) && parent.top !== parent ) {\r\n\t\t// Support: IE 11\r\n\t\tif ( parent.addEventListener ) {\r\n\t\t\tparent.addEventListener( \"unload\", unloadHandler, false );\r\n\r\n\t\t// Support: IE 9 - 10 only\r\n\t\t} else if ( parent.attachEvent ) {\r\n\t\t\tparent.attachEvent( \"onunload\", unloadHandler );\r\n\t\t}\r\n\t}\r\n\r\n\t/* Attributes\r\n\t---------------------------------------------------------------------- */\r\n\r\n\t// Support: IE<8\r\n\t// Verify that getAttribute really returns attributes and not properties\r\n\t// (excepting IE8 booleans)\r\n\tsupport.attributes = assert(function( div ) {\r\n\t\tdiv.className = \"i\";\r\n\t\treturn !div.getAttribute(\"className\");\r\n\t});\r\n\r\n\t/* getElement(s)By*\r\n\t---------------------------------------------------------------------- */\r\n\r\n\t// Check if getElementsByTagName(\"*\") returns only elements\r\n\tsupport.getElementsByTagName = assert(function( div ) {\r\n\t\tdiv.appendChild( document.createComment(\"\") );\r\n\t\treturn !div.getElementsByTagName(\"*\").length;\r\n\t});\r\n\r\n\t// Support: IE<9\r\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\r\n\r\n\t// Support: IE<10\r\n\t// Check if getElementById returns elements by name\r\n\t// The broken getElementById methods don't pick up programatically-set names,\r\n\t// so use a roundabout getElementsByName test\r\n\tsupport.getById = assert(function( div ) {\r\n\t\tdocElem.appendChild( div ).id = expando;\r\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\r\n\t});\r\n\r\n\t// ID find and filter\r\n\tif ( support.getById ) {\r\n\t\tExpr.find[\"ID\"] = function( id, context ) {\r\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\r\n\t\t\t\tvar m = context.getElementById( id );\r\n\t\t\t\treturn m ? [ m ] : [];\r\n\t\t\t}\r\n\t\t};\r\n\t\tExpr.filter[\"ID\"] = function( id ) {\r\n\t\t\tvar attrId = id.replace( runescape, funescape );\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\r\n\t\t\t};\r\n\t\t};\r\n\t} else {\r\n\t\t// Support: IE6/7\r\n\t\t// getElementById is not reliable as a find shortcut\r\n\t\tdelete Expr.find[\"ID\"];\r\n\r\n\t\tExpr.filter[\"ID\"] = function( id ) {\r\n\t\t\tvar attrId = id.replace( runescape, funescape );\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\r\n\t\t\t\t\telem.getAttributeNode(\"id\");\r\n\t\t\t\treturn node && node.value === attrId;\r\n\t\t\t};\r\n\t\t};\r\n\t}\r\n\r\n\t// Tag\r\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\r\n\t\tfunction( tag, context ) {\r\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\r\n\t\t\t\treturn context.getElementsByTagName( tag );\r\n\r\n\t\t\t// DocumentFragment nodes don't have gEBTN\r\n\t\t\t} else if ( support.qsa ) {\r\n\t\t\t\treturn context.querySelectorAll( tag );\r\n\t\t\t}\r\n\t\t} :\r\n\r\n\t\tfunction( tag, context ) {\r\n\t\t\tvar elem,\r\n\t\t\t\ttmp = [],\r\n\t\t\t\ti = 0,\r\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\r\n\t\t\t\tresults = context.getElementsByTagName( tag );\r\n\r\n\t\t\t// Filter out possible comments\r\n\t\t\tif ( tag === \"*\" ) {\r\n\t\t\t\twhile ( (elem = results[i++]) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\t\t\ttmp.push( elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn tmp;\r\n\t\t\t}\r\n\t\t\treturn results;\r\n\t\t};\r\n\r\n\t// Class\r\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\r\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\r\n\t\t\treturn context.getElementsByClassName( className );\r\n\t\t}\r\n\t};\r\n\r\n\t/* QSA/matchesSelector\r\n\t---------------------------------------------------------------------- */\r\n\r\n\t// QSA and matchesSelector support\r\n\r\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\r\n\trbuggyMatches = [];\r\n\r\n\t// qSa(:focus) reports false when true (Chrome 21)\r\n\t// We allow this because of a bug in IE8/9 that throws an error\r\n\t// whenever `document.activeElement` is accessed on an iframe\r\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\r\n\t// See http://bugs.jquery.com/ticket/13378\r\n\trbuggyQSA = [];\r\n\r\n\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\r\n\t\t// Build QSA regex\r\n\t\t// Regex strategy adopted from Diego Perini\r\n\t\tassert(function( div ) {\r\n\t\t\t// Select is set to empty string on purpose\r\n\t\t\t// This is to test IE's treatment of not explicitly\r\n\t\t\t// setting a boolean content attribute,\r\n\t\t\t// since its presence should be enough\r\n\t\t\t// http://bugs.jquery.com/ticket/12359\r\n\t\t\tdocElem.appendChild( div ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\r\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\r\n\t\t\t\t\"<option selected=''></option></select>\";\r\n\r\n\t\t\t// Support: IE8, Opera 11-12.16\r\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\r\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\r\n\t\t\t// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\r\n\t\t\tif ( div.querySelectorAll(\"[msallowcapture^='']\").length ) {\r\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\r\n\t\t\t}\r\n\r\n\t\t\t// Support: IE8\r\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\r\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\r\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\r\n\t\t\t}\r\n\r\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\r\n\t\t\tif ( !div.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\r\n\t\t\t\trbuggyQSA.push(\"~=\");\r\n\t\t\t}\r\n\r\n\t\t\t// Webkit/Opera - :checked should return selected option elements\r\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\r\n\t\t\t// IE8 throws error here and will not see later tests\r\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\r\n\t\t\t\trbuggyQSA.push(\":checked\");\r\n\t\t\t}\r\n\r\n\t\t\t// Support: Safari 8+, iOS 8+\r\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\r\n\t\t\t// In-page `selector#id sibing-combinator selector` fails\r\n\t\t\tif ( !div.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\r\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tassert(function( div ) {\r\n\t\t\t// Support: Windows 8 Native Apps\r\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\r\n\t\t\tvar input = document.createElement(\"input\");\r\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\r\n\t\t\tdiv.appendChild( input ).setAttribute( \"name\", \"D\" );\r\n\r\n\t\t\t// Support: IE8\r\n\t\t\t// Enforce case-sensitivity of name attribute\r\n\t\t\tif ( div.querySelectorAll(\"[name=d]\").length ) {\r\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\r\n\t\t\t}\r\n\r\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\r\n\t\t\t// IE8 throws error here and will not see later tests\r\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\r\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\r\n\t\t\t}\r\n\r\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\r\n\t\t\tdiv.querySelectorAll(\"*,:x\");\r\n\t\t\trbuggyQSA.push(\",.*:\");\r\n\t\t});\r\n\t}\r\n\r\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\r\n\t\tdocElem.webkitMatchesSelector ||\r\n\t\tdocElem.mozMatchesSelector ||\r\n\t\tdocElem.oMatchesSelector ||\r\n\t\tdocElem.msMatchesSelector) )) ) {\r\n\r\n\t\tassert(function( div ) {\r\n\t\t\t// Check to see if it's possible to do matchesSelector\r\n\t\t\t// on a disconnected node (IE 9)\r\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\r\n\r\n\t\t\t// This should fail with an exception\r\n\t\t\t// Gecko does not error, returns false instead\r\n\t\t\tmatches.call( div, \"[s!='']:x\" );\r\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\r\n\t\t});\r\n\t}\r\n\r\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\r\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\r\n\r\n\t/* Contains\r\n\t---------------------------------------------------------------------- */\r\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\r\n\r\n\t// Element contains another\r\n\t// Purposefully self-exclusive\r\n\t// As in, an element does not contain itself\r\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\r\n\t\tfunction( a, b ) {\r\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\r\n\t\t\t\tbup = b && b.parentNode;\r\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\r\n\t\t\t\tadown.contains ?\r\n\t\t\t\t\tadown.contains( bup ) :\r\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\r\n\t\t\t));\r\n\t\t} :\r\n\t\tfunction( a, b ) {\r\n\t\t\tif ( b ) {\r\n\t\t\t\twhile ( (b = b.parentNode) ) {\r\n\t\t\t\t\tif ( b === a ) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t};\r\n\r\n\t/* Sorting\r\n\t---------------------------------------------------------------------- */\r\n\r\n\t// Document order sorting\r\n\tsortOrder = hasCompare ?\r\n\tfunction( a, b ) {\r\n\r\n\t\t// Flag for duplicate removal\r\n\t\tif ( a === b ) {\r\n\t\t\thasDuplicate = true;\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\t// Sort on method existence if only one input has compareDocumentPosition\r\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\r\n\t\tif ( compare ) {\r\n\t\t\treturn compare;\r\n\t\t}\r\n\r\n\t\t// Calculate position if both inputs belong to the same document\r\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\r\n\t\t\ta.compareDocumentPosition( b ) :\r\n\r\n\t\t\t// Otherwise we know they are disconnected\r\n\t\t\t1;\r\n\r\n\t\t// Disconnected nodes\r\n\t\tif ( compare & 1 ||\r\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\r\n\r\n\t\t\t// Choose the first element that is related to our preferred document\r\n\t\t\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\r\n\t\t\t// Maintain original order\r\n\t\t\treturn sortInput ?\r\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\r\n\t\t\t\t0;\r\n\t\t}\r\n\r\n\t\treturn compare & 4 ? -1 : 1;\r\n\t} :\r\n\tfunction( a, b ) {\r\n\t\t// Exit early if the nodes are identical\r\n\t\tif ( a === b ) {\r\n\t\t\thasDuplicate = true;\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tvar cur,\r\n\t\t\ti = 0,\r\n\t\t\taup = a.parentNode,\r\n\t\t\tbup = b.parentNode,\r\n\t\t\tap = [ a ],\r\n\t\t\tbp = [ b ];\r\n\r\n\t\t// Parentless nodes are either documents or disconnected\r\n\t\tif ( !aup || !bup ) {\r\n\t\t\treturn a === document ? -1 :\r\n\t\t\t\tb === document ? 1 :\r\n\t\t\t\taup ? -1 :\r\n\t\t\t\tbup ? 1 :\r\n\t\t\t\tsortInput ?\r\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\r\n\t\t\t\t0;\r\n\r\n\t\t// If the nodes are siblings, we can do a quick check\r\n\t\t} else if ( aup === bup ) {\r\n\t\t\treturn siblingCheck( a, b );\r\n\t\t}\r\n\r\n\t\t// Otherwise we need full lists of their ancestors for comparison\r\n\t\tcur = a;\r\n\t\twhile ( (cur = cur.parentNode) ) {\r\n\t\t\tap.unshift( cur );\r\n\t\t}\r\n\t\tcur = b;\r\n\t\twhile ( (cur = cur.parentNode) ) {\r\n\t\t\tbp.unshift( cur );\r\n\t\t}\r\n\r\n\t\t// Walk down the tree looking for a discrepancy\r\n\t\twhile ( ap[i] === bp[i] ) {\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\treturn i ?\r\n\t\t\t// Do a sibling check if the nodes have a common ancestor\r\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\r\n\r\n\t\t\t// Otherwise nodes in our document sort first\r\n\t\t\tap[i] === preferredDoc ? -1 :\r\n\t\t\tbp[i] === preferredDoc ? 1 :\r\n\t\t\t0;\r\n\t};\r\n\r\n\treturn document;\r\n};\r\n\r\nSizzle.matches = function( expr, elements ) {\r\n\treturn Sizzle( expr, null, null, elements );\r\n};\r\n\r\nSizzle.matchesSelector = function( elem, expr ) {\r\n\t// Set document vars if needed\r\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\r\n\t\tsetDocument( elem );\r\n\t}\r\n\r\n\t// Make sure that attribute selectors are quoted\r\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\r\n\r\n\tif ( support.matchesSelector && documentIsHTML &&\r\n\t\t!compilerCache[ expr + \" \" ] &&\r\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\r\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\r\n\r\n\t\ttry {\r\n\t\t\tvar ret = matches.call( elem, expr );\r\n\r\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\r\n\t\t\tif ( ret || support.disconnectedMatch ||\r\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\r\n\t\t\t\t\t// fragment in IE 9\r\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\t\t} catch (e) {}\r\n\t}\r\n\r\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\r\n};\r\n\r\nSizzle.contains = function( context, elem ) {\r\n\t// Set document vars if needed\r\n\tif ( ( context.ownerDocument || context ) !== document ) {\r\n\t\tsetDocument( context );\r\n\t}\r\n\treturn contains( context, elem );\r\n};\r\n\r\nSizzle.attr = function( elem, name ) {\r\n\t// Set document vars if needed\r\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\r\n\t\tsetDocument( elem );\r\n\t}\r\n\r\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\r\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\r\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\r\n\t\t\tfn( elem, name, !documentIsHTML ) :\r\n\t\t\tundefined;\r\n\r\n\treturn val !== undefined ?\r\n\t\tval :\r\n\t\tsupport.attributes || !documentIsHTML ?\r\n\t\t\telem.getAttribute( name ) :\r\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\r\n\t\t\t\tval.value :\r\n\t\t\t\tnull;\r\n};\r\n\r\nSizzle.error = function( msg ) {\r\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\r\n};\r\n\r\n/**\r\n * Document sorting and removing duplicates\r\n * @param {ArrayLike} results\r\n */\r\nSizzle.uniqueSort = function( results ) {\r\n\tvar elem,\r\n\t\tduplicates = [],\r\n\t\tj = 0,\r\n\t\ti = 0;\r\n\r\n\t// Unless we *know* we can detect duplicates, assume their presence\r\n\thasDuplicate = !support.detectDuplicates;\r\n\tsortInput = !support.sortStable && results.slice( 0 );\r\n\tresults.sort( sortOrder );\r\n\r\n\tif ( hasDuplicate ) {\r\n\t\twhile ( (elem = results[i++]) ) {\r\n\t\t\tif ( elem === results[ i ] ) {\r\n\t\t\t\tj = duplicates.push( i );\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile ( j-- ) {\r\n\t\t\tresults.splice( duplicates[ j ], 1 );\r\n\t\t}\r\n\t}\r\n\r\n\t// Clear input after sorting to release objects\r\n\t// See https://github.com/jquery/sizzle/pull/225\r\n\tsortInput = null;\r\n\r\n\treturn results;\r\n};\r\n\r\n/**\r\n * Utility function for retrieving the text value of an array of DOM nodes\r\n * @param {Array|Element} elem\r\n */\r\ngetText = Sizzle.getText = function( elem ) {\r\n\tvar node,\r\n\t\tret = \"\",\r\n\t\ti = 0,\r\n\t\tnodeType = elem.nodeType;\r\n\r\n\tif ( !nodeType ) {\r\n\t\t// If no nodeType, this is expected to be an array\r\n\t\twhile ( (node = elem[i++]) ) {\r\n\t\t\t// Do not traverse comment nodes\r\n\t\t\tret += getText( node );\r\n\t\t}\r\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\r\n\t\t// Use textContent for elements\r\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\r\n\t\tif ( typeof elem.textContent === \"string\" ) {\r\n\t\t\treturn elem.textContent;\r\n\t\t} else {\r\n\t\t\t// Traverse its children\r\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\r\n\t\t\t\tret += getText( elem );\r\n\t\t\t}\r\n\t\t}\r\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\r\n\t\treturn elem.nodeValue;\r\n\t}\r\n\t// Do not include comment or processing instruction nodes\r\n\r\n\treturn ret;\r\n};\r\n\r\nExpr = Sizzle.selectors = {\r\n\r\n\t// Can be adjusted by the user\r\n\tcacheLength: 50,\r\n\r\n\tcreatePseudo: markFunction,\r\n\r\n\tmatch: matchExpr,\r\n\r\n\tattrHandle: {},\r\n\r\n\tfind: {},\r\n\r\n\trelative: {\r\n\t\t\">\": { dir: \"parentNode\", first: true },\r\n\t\t\" \": { dir: \"parentNode\" },\r\n\t\t\"+\": { dir: \"previousSibling\", first: true },\r\n\t\t\"~\": { dir: \"previousSibling\" }\r\n\t},\r\n\r\n\tpreFilter: {\r\n\t\t\"ATTR\": function( match ) {\r\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\r\n\r\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\r\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || \"\" ).replace( runescape, funescape );\r\n\r\n\t\t\tif ( match[2] === \"~=\" ) {\r\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\r\n\t\t\t}\r\n\r\n\t\t\treturn match.slice( 0, 4 );\r\n\t\t},\r\n\r\n\t\t\"CHILD\": function( match ) {\r\n\t\t\t/* matches from matchExpr[\"CHILD\"]\r\n\t\t\t\t1 type (only|nth|...)\r\n\t\t\t\t2 what (child|of-type)\r\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\r\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\r\n\t\t\t\t5 sign of xn-component\r\n\t\t\t\t6 x of xn-component\r\n\t\t\t\t7 sign of y-component\r\n\t\t\t\t8 y of y-component\r\n\t\t\t*/\r\n\t\t\tmatch[1] = match[1].toLowerCase();\r\n\r\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\r\n\t\t\t\t// nth-* requires argument\r\n\t\t\t\tif ( !match[3] ) {\r\n\t\t\t\t\tSizzle.error( match[0] );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\r\n\t\t\t\t// remember that false/true cast respectively to 0/1\r\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\r\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\r\n\r\n\t\t\t// other types prohibit arguments\r\n\t\t\t} else if ( match[3] ) {\r\n\t\t\t\tSizzle.error( match[0] );\r\n\t\t\t}\r\n\r\n\t\t\treturn match;\r\n\t\t},\r\n\r\n\t\t\"PSEUDO\": function( match ) {\r\n\t\t\tvar excess,\r\n\t\t\t\tunquoted = !match[6] && match[2];\r\n\r\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\t// Accept quoted arguments as-is\r\n\t\t\tif ( match[3] ) {\r\n\t\t\t\tmatch[2] = match[4] || match[5] || \"\";\r\n\r\n\t\t\t// Strip excess characters from unquoted arguments\r\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\r\n\t\t\t\t// Get excess from tokenize (recursively)\r\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\r\n\t\t\t\t// advance to the next closing parenthesis\r\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\r\n\r\n\t\t\t\t// excess is a negative index\r\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\r\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\r\n\t\t\t}\r\n\r\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\r\n\t\t\treturn match.slice( 0, 3 );\r\n\t\t}\r\n\t},\r\n\r\n\tfilter: {\r\n\r\n\t\t\"TAG\": function( nodeNameSelector ) {\r\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\r\n\t\t\treturn nodeNameSelector === \"*\" ?\r\n\t\t\t\tfunction() { return true; } :\r\n\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\r\n\t\t\t\t};\r\n\t\t},\r\n\r\n\t\t\"CLASS\": function( className ) {\r\n\t\t\tvar pattern = classCache[ className + \" \" ];\r\n\r\n\t\t\treturn pattern ||\r\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\r\n\t\t\t\tclassCache( className, function( elem ) {\r\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\" );\r\n\t\t\t\t});\r\n\t\t},\r\n\r\n\t\t\"ATTR\": function( name, operator, check ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar result = Sizzle.attr( elem, name );\r\n\r\n\t\t\t\tif ( result == null ) {\r\n\t\t\t\t\treturn operator === \"!=\";\r\n\t\t\t\t}\r\n\t\t\t\tif ( !operator ) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresult += \"\";\r\n\r\n\t\t\t\treturn operator === \"=\" ? result === check :\r\n\t\t\t\t\toperator === \"!=\" ? result !== check :\r\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\r\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\r\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\r\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\r\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\r\n\t\t\t\t\tfalse;\r\n\t\t\t};\r\n\t\t},\r\n\r\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\r\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\r\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\r\n\t\t\t\tofType = what === \"of-type\";\r\n\r\n\t\t\treturn first === 1 && last === 0 ?\r\n\r\n\t\t\t\t// Shortcut for :nth-*(n)\r\n\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\treturn !!elem.parentNode;\r\n\t\t\t\t} :\r\n\r\n\t\t\t\tfunction( elem, context, xml ) {\r\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\r\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\r\n\t\t\t\t\t\tparent = elem.parentNode,\r\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\r\n\t\t\t\t\t\tuseCache = !xml && !ofType,\r\n\t\t\t\t\t\tdiff = false;\r\n\r\n\t\t\t\t\tif ( parent ) {\r\n\r\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\r\n\t\t\t\t\t\tif ( simple ) {\r\n\t\t\t\t\t\t\twhile ( dir ) {\r\n\t\t\t\t\t\t\t\tnode = elem;\r\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\r\n\t\t\t\t\t\t\t\t\tif ( ofType ?\r\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\r\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\r\n\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\r\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\r\n\r\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\r\n\t\t\t\t\t\tif ( forward && useCache ) {\r\n\r\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\r\n\r\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\r\n\t\t\t\t\t\t\tnode = parent;\r\n\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\r\n\r\n\t\t\t\t\t\t\t// Support: IE <9 only\r\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\r\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\r\n\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\r\n\r\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\r\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\r\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\r\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\r\n\r\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\r\n\r\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\r\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\r\n\r\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\r\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\r\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Use previously-cached element index if available\r\n\t\t\t\t\t\t\tif ( useCache ) {\r\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\r\n\t\t\t\t\t\t\t\tnode = elem;\r\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\r\n\r\n\t\t\t\t\t\t\t\t// Support: IE <9 only\r\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\r\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\r\n\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\r\n\r\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\r\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\r\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// xml :nth-child(...)\r\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\r\n\t\t\t\t\t\t\tif ( diff === false ) {\r\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\r\n\t\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\r\n\t\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\r\n\r\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\r\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\r\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\r\n\t\t\t\t\t\t\t\t\t\t++diff ) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\r\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\r\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] || (node[ expando ] = {});\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\r\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\r\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\r\n\t\t\t\t\t\t\t\t\t\t\t\t(outerCache[ node.uniqueID ] = {});\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\r\n\t\t\t\t\t\tdiff -= last;\r\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t},\r\n\r\n\t\t\"PSEUDO\": function( pseudo, argument ) {\r\n\t\t\t// pseudo-class names are case-insensitive\r\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\r\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\r\n\t\t\t// Remember that setFilters inherits from pseudos\r\n\t\t\tvar args,\r\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\r\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\r\n\r\n\t\t\t// The user may use createPseudo to indicate that\r\n\t\t\t// arguments are needed to create the filter function\r\n\t\t\t// just as Sizzle does\r\n\t\t\tif ( fn[ expando ] ) {\r\n\t\t\t\treturn fn( argument );\r\n\t\t\t}\r\n\r\n\t\t\t// But maintain support for old signatures\r\n\t\t\tif ( fn.length > 1 ) {\r\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\r\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\r\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\r\n\t\t\t\t\t\tvar idx,\r\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\r\n\t\t\t\t\t\t\ti = matched.length;\r\n\t\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[i] );\r\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}) :\r\n\t\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\t\treturn fn( elem, 0, args );\r\n\t\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\treturn fn;\r\n\t\t}\r\n\t},\r\n\r\n\tpseudos: {\r\n\t\t// Potentially complex pseudos\r\n\t\t\"not\": markFunction(function( selector ) {\r\n\t\t\t// Trim the selector passed to compile\r\n\t\t\t// to avoid treating leading and trailing\r\n\t\t\t// spaces as combinators\r\n\t\t\tvar input = [],\r\n\t\t\t\tresults = [],\r\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\r\n\r\n\t\t\treturn matcher[ expando ] ?\r\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\r\n\t\t\t\t\tvar elem,\r\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\r\n\t\t\t\t\t\ti = seed.length;\r\n\r\n\t\t\t\t\t// Match elements unmatched by `matcher`\r\n\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\r\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}) :\r\n\t\t\t\tfunction( elem, context, xml ) {\r\n\t\t\t\t\tinput[0] = elem;\r\n\t\t\t\t\tmatcher( input, null, xml, results );\r\n\t\t\t\t\t// Don't keep the element (issue #299)\r\n\t\t\t\t\tinput[0] = null;\r\n\t\t\t\t\treturn !results.pop();\r\n\t\t\t\t};\r\n\t\t}),\r\n\r\n\t\t\"has\": markFunction(function( selector ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\r\n\t\t\t};\r\n\t\t}),\r\n\r\n\t\t\"contains\": markFunction(function( text ) {\r\n\t\t\ttext = text.replace( runescape, funescape );\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\r\n\t\t\t};\r\n\t\t}),\r\n\r\n\t\t// \"Whether an element is represented by a :lang() selector\r\n\t\t// is based solely on the element's language value\r\n\t\t// being equal to the identifier C,\r\n\t\t// or beginning with the identifier C immediately followed by \"-\".\r\n\t\t// The matching of C against the element's language value is performed case-insensitively.\r\n\t\t// The identifier C does not have to be a valid language name.\"\r\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\r\n\t\t\"lang\": markFunction( function( lang ) {\r\n\t\t\t// lang value must be a valid identifier\r\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\r\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\r\n\t\t\t}\r\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar elemLang;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\r\n\t\t\t\t\t\telem.lang :\r\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\r\n\r\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\r\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\r\n\t\t\t\treturn false;\r\n\t\t\t};\r\n\t\t}),\r\n\r\n\t\t// Miscellaneous\r\n\t\t\"target\": function( elem ) {\r\n\t\t\tvar hash = window.location && window.location.hash;\r\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\r\n\t\t},\r\n\r\n\t\t\"root\": function( elem ) {\r\n\t\t\treturn elem === docElem;\r\n\t\t},\r\n\r\n\t\t\"focus\": function( elem ) {\r\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\r\n\t\t},\r\n\r\n\t\t// Boolean properties\r\n\t\t\"enabled\": function( elem ) {\r\n\t\t\treturn elem.disabled === false;\r\n\t\t},\r\n\r\n\t\t\"disabled\": function( elem ) {\r\n\t\t\treturn elem.disabled === true;\r\n\t\t},\r\n\r\n\t\t\"checked\": function( elem ) {\r\n\t\t\t// In CSS3, :checked should return both checked and selected elements\r\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\r\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\r\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\r\n\t\t},\r\n\r\n\t\t\"selected\": function( elem ) {\r\n\t\t\t// Accessing this property makes selected-by-default\r\n\t\t\t// options in Safari work properly\r\n\t\t\tif ( elem.parentNode ) {\r\n\t\t\t\telem.parentNode.selectedIndex;\r\n\t\t\t}\r\n\r\n\t\t\treturn elem.selected === true;\r\n\t\t},\r\n\r\n\t\t// Contents\r\n\t\t\"empty\": function( elem ) {\r\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\r\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\r\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\r\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\r\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\r\n\t\t\t\tif ( elem.nodeType < 6 ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\t\"parent\": function( elem ) {\r\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\r\n\t\t},\r\n\r\n\t\t// Element/input types\r\n\t\t\"header\": function( elem ) {\r\n\t\t\treturn rheader.test( elem.nodeName );\r\n\t\t},\r\n\r\n\t\t\"input\": function( elem ) {\r\n\t\t\treturn rinputs.test( elem.nodeName );\r\n\t\t},\r\n\r\n\t\t\"button\": function( elem ) {\r\n\t\t\tvar name = elem.nodeName.toLowerCase();\r\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\r\n\t\t},\r\n\r\n\t\t\"text\": function( elem ) {\r\n\t\t\tvar attr;\r\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\r\n\t\t\t\telem.type === \"text\" &&\r\n\r\n\t\t\t\t// Support: IE<8\r\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\r\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\" );\r\n\t\t},\r\n\r\n\t\t// Position-in-collection\r\n\t\t\"first\": createPositionalPseudo(function() {\r\n\t\t\treturn [ 0 ];\r\n\t\t}),\r\n\r\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\r\n\t\t\treturn [ length - 1 ];\r\n\t\t}),\r\n\r\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\r\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\r\n\t\t}),\r\n\r\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\r\n\t\t\tvar i = 0;\r\n\t\t\tfor ( ; i < length; i += 2 ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t}),\r\n\r\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\r\n\t\t\tvar i = 1;\r\n\t\t\tfor ( ; i < length; i += 2 ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t}),\r\n\r\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\r\n\t\t\tvar i = argument < 0 ? argument + length : argument;\r\n\t\t\tfor ( ; --i >= 0; ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t}),\r\n\r\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\r\n\t\t\tvar i = argument < 0 ? argument + length : argument;\r\n\t\t\tfor ( ; ++i < length; ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t})\r\n\t}\r\n};\r\n\r\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\r\n\r\n// Add button/input type pseudos\r\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\r\n\tExpr.pseudos[ i ] = createInputPseudo( i );\r\n}\r\nfor ( i in { submit: true, reset: true } ) {\r\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\r\n}\r\n\r\n// Easy API for creating new setFilters\r\nfunction setFilters() {}\r\nsetFilters.prototype = Expr.filters = Expr.pseudos;\r\nExpr.setFilters = new setFilters();\r\n\r\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\r\n\tvar matched, match, tokens, type,\r\n\t\tsoFar, groups, preFilters,\r\n\t\tcached = tokenCache[ selector + \" \" ];\r\n\r\n\tif ( cached ) {\r\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\r\n\t}\r\n\r\n\tsoFar = selector;\r\n\tgroups = [];\r\n\tpreFilters = Expr.preFilter;\r\n\r\n\twhile ( soFar ) {\r\n\r\n\t\t// Comma and first run\r\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\r\n\t\t\tif ( match ) {\r\n\t\t\t\t// Don't consume trailing commas as valid\r\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\r\n\t\t\t}\r\n\t\t\tgroups.push( (tokens = []) );\r\n\t\t}\r\n\r\n\t\tmatched = false;\r\n\r\n\t\t// Combinators\r\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\r\n\t\t\tmatched = match.shift();\r\n\t\t\ttokens.push({\r\n\t\t\t\tvalue: matched,\r\n\t\t\t\t// Cast descendant combinators to space\r\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\r\n\t\t\t});\r\n\t\t\tsoFar = soFar.slice( matched.length );\r\n\t\t}\r\n\r\n\t\t// Filters\r\n\t\tfor ( type in Expr.filter ) {\r\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\r\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\r\n\t\t\t\tmatched = match.shift();\r\n\t\t\t\ttokens.push({\r\n\t\t\t\t\tvalue: matched,\r\n\t\t\t\t\ttype: type,\r\n\t\t\t\t\tmatches: match\r\n\t\t\t\t});\r\n\t\t\t\tsoFar = soFar.slice( matched.length );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( !matched ) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the length of the invalid excess\r\n\t// if we're just parsing\r\n\t// Otherwise, throw an error or return tokens\r\n\treturn parseOnly ?\r\n\t\tsoFar.length :\r\n\t\tsoFar ?\r\n\t\t\tSizzle.error( selector ) :\r\n\t\t\t// Cache the tokens\r\n\t\t\ttokenCache( selector, groups ).slice( 0 );\r\n};\r\n\r\nfunction toSelector( tokens ) {\r\n\tvar i = 0,\r\n\t\tlen = tokens.length,\r\n\t\tselector = \"\";\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tselector += tokens[i].value;\r\n\t}\r\n\treturn selector;\r\n}\r\n\r\nfunction addCombinator( matcher, combinator, base ) {\r\n\tvar dir = combinator.dir,\r\n\t\tcheckNonElements = base && dir === \"parentNode\",\r\n\t\tdoneName = done++;\r\n\r\n\treturn combinator.first ?\r\n\t\t// Check against closest ancestor/preceding element\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\twhile ( (elem = elem[ dir ]) ) {\r\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\treturn matcher( elem, context, xml );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} :\r\n\r\n\t\t// Check against all ancestor/preceding elements\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\tvar oldCache, uniqueCache, outerCache,\r\n\t\t\t\tnewCache = [ dirruns, doneName ];\r\n\r\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\r\n\t\t\tif ( xml ) {\r\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\r\n\r\n\t\t\t\t\t\t// Support: IE <9 only\r\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\r\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});\r\n\r\n\t\t\t\t\t\tif ( (oldCache = uniqueCache[ dir ]) &&\r\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\r\n\r\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\r\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\r\n\t\t\t\t\t\t\tuniqueCache[ dir ] = newCache;\r\n\r\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\r\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n}\r\n\r\nfunction elementMatcher( matchers ) {\r\n\treturn matchers.length > 1 ?\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\tvar i = matchers.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} :\r\n\t\tmatchers[0];\r\n}\r\n\r\nfunction multipleContexts( selector, contexts, results ) {\r\n\tvar i = 0,\r\n\t\tlen = contexts.length;\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tSizzle( selector, contexts[i], results );\r\n\t}\r\n\treturn results;\r\n}\r\n\r\nfunction condense( unmatched, map, filter, context, xml ) {\r\n\tvar elem,\r\n\t\tnewUnmatched = [],\r\n\t\ti = 0,\r\n\t\tlen = unmatched.length,\r\n\t\tmapped = map != null;\r\n\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tif ( (elem = unmatched[i]) ) {\r\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\r\n\t\t\t\tnewUnmatched.push( elem );\r\n\t\t\t\tif ( mapped ) {\r\n\t\t\t\t\tmap.push( i );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn newUnmatched;\r\n}\r\n\r\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\r\n\tif ( postFilter && !postFilter[ expando ] ) {\r\n\t\tpostFilter = setMatcher( postFilter );\r\n\t}\r\n\tif ( postFinder && !postFinder[ expando ] ) {\r\n\t\tpostFinder = setMatcher( postFinder, postSelector );\r\n\t}\r\n\treturn markFunction(function( seed, results, context, xml ) {\r\n\t\tvar temp, i, elem,\r\n\t\t\tpreMap = [],\r\n\t\t\tpostMap = [],\r\n\t\t\tpreexisting = results.length,\r\n\r\n\t\t\t// Get initial elements from seed or context\r\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\r\n\r\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\r\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\r\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\r\n\t\t\t\telems,\r\n\r\n\t\t\tmatcherOut = matcher ?\r\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\r\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\r\n\r\n\t\t\t\t\t// ...intermediate processing is necessary\r\n\t\t\t\t\t[] :\r\n\r\n\t\t\t\t\t// ...otherwise use results directly\r\n\t\t\t\t\tresults :\r\n\t\t\t\tmatcherIn;\r\n\r\n\t\t// Find primary matches\r\n\t\tif ( matcher ) {\r\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\r\n\t\t}\r\n\r\n\t\t// Apply postFilter\r\n\t\tif ( postFilter ) {\r\n\t\t\ttemp = condense( matcherOut, postMap );\r\n\t\t\tpostFilter( temp, [], context, xml );\r\n\r\n\t\t\t// Un-match failing elements by moving them back to matcherIn\r\n\t\t\ti = temp.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( (elem = temp[i]) ) {\r\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( seed ) {\r\n\t\t\tif ( postFinder || preFilter ) {\r\n\t\t\t\tif ( postFinder ) {\r\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\r\n\t\t\t\t\ttemp = [];\r\n\t\t\t\t\ti = matcherOut.length;\r\n\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\r\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\r\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\r\n\t\t\t\ti = matcherOut.length;\r\n\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\r\n\t\t\t\t\t\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\r\n\r\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// Add elements to results, through postFinder if defined\r\n\t\t} else {\r\n\t\t\tmatcherOut = condense(\r\n\t\t\t\tmatcherOut === results ?\r\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\r\n\t\t\t\t\tmatcherOut\r\n\t\t\t);\r\n\t\t\tif ( postFinder ) {\r\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\r\n\t\t\t} else {\r\n\t\t\t\tpush.apply( results, matcherOut );\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction matcherFromTokens( tokens ) {\r\n\tvar checkContext, matcher, j,\r\n\t\tlen = tokens.length,\r\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\r\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\r\n\t\ti = leadingRelative ? 1 : 0,\r\n\r\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\r\n\t\tmatchContext = addCombinator( function( elem ) {\r\n\t\t\treturn elem === checkContext;\r\n\t\t}, implicitRelative, true ),\r\n\t\tmatchAnyContext = addCombinator( function( elem ) {\r\n\t\t\treturn indexOf( checkContext, elem ) > -1;\r\n\t\t}, implicitRelative, true ),\r\n\t\tmatchers = [ function( elem, context, xml ) {\r\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\r\n\t\t\t\t(checkContext = context).nodeType ?\r\n\t\t\t\t\tmatchContext( elem, context, xml ) :\r\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\r\n\t\t\t// Avoid hanging onto element (issue #299)\r\n\t\t\tcheckContext = null;\r\n\t\t\treturn ret;\r\n\t\t} ];\r\n\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\r\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\r\n\t\t} else {\r\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\r\n\r\n\t\t\t// Return special upon seeing a positional matcher\r\n\t\t\tif ( matcher[ expando ] ) {\r\n\t\t\t\t// Find the next relative operator (if any) for proper handling\r\n\t\t\t\tj = ++i;\r\n\t\t\t\tfor ( ; j < len; j++ ) {\r\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn setMatcher(\r\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\r\n\t\t\t\t\ti > 1 && toSelector(\r\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\r\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\r\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\r\n\t\t\t\t\tmatcher,\r\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\r\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\r\n\t\t\t\t\tj < len && toSelector( tokens )\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tmatchers.push( matcher );\r\n\t\t}\r\n\t}\r\n\r\n\treturn elementMatcher( matchers );\r\n}\r\n\r\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\r\n\tvar bySet = setMatchers.length > 0,\r\n\t\tbyElement = elementMatchers.length > 0,\r\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\r\n\t\t\tvar elem, j, matcher,\r\n\t\t\t\tmatchedCount = 0,\r\n\t\t\t\ti = \"0\",\r\n\t\t\t\tunmatched = seed && [],\r\n\t\t\t\tsetMatched = [],\r\n\t\t\t\tcontextBackup = outermostContext,\r\n\t\t\t\t// We must always have either seed elements or outermost context\r\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", outermost ),\r\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\r\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\r\n\t\t\t\tlen = elems.length;\r\n\r\n\t\t\tif ( outermost ) {\r\n\t\t\t\toutermostContext = context === document || context || outermost;\r\n\t\t\t}\r\n\r\n\t\t\t// Add elements passing elementMatchers directly to results\r\n\t\t\t// Support: IE<9, Safari\r\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\r\n\t\t\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\r\n\t\t\t\tif ( byElement && elem ) {\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\tif ( !context && elem.ownerDocument !== document ) {\r\n\t\t\t\t\t\tsetDocument( elem );\r\n\t\t\t\t\t\txml = !documentIsHTML;\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\r\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml) ) {\r\n\t\t\t\t\t\t\tresults.push( elem );\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( outermost ) {\r\n\t\t\t\t\t\tdirruns = dirrunsUnique;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Track unmatched elements for set filters\r\n\t\t\t\tif ( bySet ) {\r\n\t\t\t\t\t// They will have gone through all possible matchers\r\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\r\n\t\t\t\t\t\tmatchedCount--;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Lengthen the array for every element, matched or not\r\n\t\t\t\t\tif ( seed ) {\r\n\t\t\t\t\t\tunmatched.push( elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\r\n\t\t\t// makes the latter nonnegative.\r\n\t\t\tmatchedCount += i;\r\n\r\n\t\t\t// Apply set filters to unmatched elements\r\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\r\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\r\n\t\t\t// no element matchers and no seed.\r\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\r\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\r\n\t\t\t// numerically zero.\r\n\t\t\tif ( bySet && i !== matchedCount ) {\r\n\t\t\t\tj = 0;\r\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\r\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( seed ) {\r\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\r\n\t\t\t\t\tif ( matchedCount > 0 ) {\r\n\t\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\r\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\r\n\t\t\t\t\tsetMatched = condense( setMatched );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Add matches to results\r\n\t\t\t\tpush.apply( results, setMatched );\r\n\r\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\r\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\r\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\r\n\r\n\t\t\t\t\tSizzle.uniqueSort( results );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Override manipulation of globals by nested matchers\r\n\t\t\tif ( outermost ) {\r\n\t\t\t\tdirruns = dirrunsUnique;\r\n\t\t\t\toutermostContext = contextBackup;\r\n\t\t\t}\r\n\r\n\t\t\treturn unmatched;\r\n\t\t};\r\n\r\n\treturn bySet ?\r\n\t\tmarkFunction( superMatcher ) :\r\n\t\tsuperMatcher;\r\n}\r\n\r\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\r\n\tvar i,\r\n\t\tsetMatchers = [],\r\n\t\telementMatchers = [],\r\n\t\tcached = compilerCache[ selector + \" \" ];\r\n\r\n\tif ( !cached ) {\r\n\t\t// Generate a function of recursive functions that can be used to check each element\r\n\t\tif ( !match ) {\r\n\t\t\tmatch = tokenize( selector );\r\n\t\t}\r\n\t\ti = match.length;\r\n\t\twhile ( i-- ) {\r\n\t\t\tcached = matcherFromTokens( match[i] );\r\n\t\t\tif ( cached[ expando ] ) {\r\n\t\t\t\tsetMatchers.push( cached );\r\n\t\t\t} else {\r\n\t\t\t\telementMatchers.push( cached );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Cache the compiled function\r\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\r\n\r\n\t\t// Save selector and tokenization\r\n\t\tcached.selector = selector;\r\n\t}\r\n\treturn cached;\r\n};\r\n\r\n/**\r\n * A low-level selection function that works with Sizzle's compiled\r\n * selector functions\r\n * @param {String|Function} selector A selector or a pre-compiled\r\n * selector function built with Sizzle.compile\r\n * @param {Element} context\r\n * @param {Array} [results]\r\n * @param {Array} [seed] A set of elements to match against\r\n */\r\nselect = Sizzle.select = function( selector, context, results, seed ) {\r\n\tvar i, tokens, token, type, find,\r\n\t\tcompiled = typeof selector === \"function\" && selector,\r\n\t\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\r\n\r\n\tresults = results || [];\r\n\r\n\t// Try to minimize operations if there is only one selector in the list and no seed\r\n\t// (the latter of which guarantees us context)\r\n\tif ( match.length === 1 ) {\r\n\r\n\t\t// Reduce context if the leading compound selector is an ID\r\n\t\ttokens = match[0] = match[0].slice( 0 );\r\n\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\r\n\t\t\t\tsupport.getById && context.nodeType === 9 && documentIsHTML &&\r\n\t\t\t\tExpr.relative[ tokens[1].type ] ) {\r\n\r\n\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\r\n\t\t\tif ( !context ) {\r\n\t\t\t\treturn results;\r\n\r\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\r\n\t\t\t} else if ( compiled ) {\r\n\t\t\t\tcontext = context.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tselector = selector.slice( tokens.shift().value.length );\r\n\t\t}\r\n\r\n\t\t// Fetch a seed set for right-to-left matching\r\n\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\r\n\t\twhile ( i-- ) {\r\n\t\t\ttoken = tokens[i];\r\n\r\n\t\t\t// Abort if we hit a combinator\r\n\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( (find = Expr.find[ type ]) ) {\r\n\t\t\t\t// Search, expanding context for leading sibling combinators\r\n\t\t\t\tif ( (seed = find(\r\n\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\r\n\t\t\t\t\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\r\n\t\t\t\t)) ) {\r\n\r\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\r\n\t\t\t\t\ttokens.splice( i, 1 );\r\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\r\n\t\t\t\t\tif ( !selector ) {\r\n\t\t\t\t\t\tpush.apply( results, seed );\r\n\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Compile and execute a filtering function if one is not provided\r\n\t// Provide `match` to avoid retokenization if we modified the selector above\r\n\t( compiled || compile( selector, match ) )(\r\n\t\tseed,\r\n\t\tcontext,\r\n\t\t!documentIsHTML,\r\n\t\tresults,\r\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\r\n\t);\r\n\treturn results;\r\n};\r\n\r\n// One-time assignments\r\n\r\n// Sort stability\r\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\r\n\r\n// Support: Chrome 14-35+\r\n// Always assume duplicates if they aren't passed to the comparison function\r\nsupport.detectDuplicates = !!hasDuplicate;\r\n\r\n// Initialize against the default document\r\nsetDocument();\r\n\r\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\r\n// Detached nodes confoundingly follow *each other*\r\nsupport.sortDetached = assert(function( div1 ) {\r\n\t// Should return 1, but returns 4 (following)\r\n\treturn div1.compareDocumentPosition( document.createElement(\"div\") ) & 1;\r\n});\r\n\r\n// Support: IE<8\r\n// Prevent attribute/property \"interpolation\"\r\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\r\nif ( !assert(function( div ) {\r\n\tdiv.innerHTML = \"<a href='#'></a>\";\r\n\treturn div.firstChild.getAttribute(\"href\") === \"#\" ;\r\n}) ) {\r\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\r\n\t\tif ( !isXML ) {\r\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\r\n\t\t}\r\n\t});\r\n}\r\n\r\n// Support: IE<9\r\n// Use defaultValue in place of getAttribute(\"value\")\r\nif ( !support.attributes || !assert(function( div ) {\r\n\tdiv.innerHTML = \"<input/>\";\r\n\tdiv.firstChild.setAttribute( \"value\", \"\" );\r\n\treturn div.firstChild.getAttribute( \"value\" ) === \"\";\r\n}) ) {\r\n\taddHandle( \"value\", function( elem, name, isXML ) {\r\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\r\n\t\t\treturn elem.defaultValue;\r\n\t\t}\r\n\t});\r\n}\r\n\r\n// Support: IE<9\r\n// Use getAttributeNode to fetch booleans when getAttribute lies\r\nif ( !assert(function( div ) {\r\n\treturn div.getAttribute(\"disabled\") == null;\r\n}) ) {\r\n\taddHandle( booleans, function( elem, name, isXML ) {\r\n\t\tvar val;\r\n\t\tif ( !isXML ) {\r\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\r\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\r\n\t\t\t\t\tval.value :\r\n\t\t\t\tnull;\r\n\t\t}\r\n\t});\r\n}\r\n\r\nreturn Sizzle;\r\n\r\n})( window );\r\n\r\n\r\n\r\njQuery.find = Sizzle;\r\njQuery.expr = Sizzle.selectors;\r\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\r\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\r\njQuery.text = Sizzle.getText;\r\njQuery.isXMLDoc = Sizzle.isXML;\r\njQuery.contains = Sizzle.contains;\r\n\r\n\r\n\r\nvar dir = function( elem, dir, until ) {\r\n\tvar matched = [],\r\n\t\ttruncate = until !== undefined;\r\n\r\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\r\n\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tmatched.push( elem );\r\n\t\t}\r\n\t}\r\n\treturn matched;\r\n};\r\n\r\n\r\nvar siblings = function( n, elem ) {\r\n\tvar matched = [];\r\n\r\n\tfor ( ; n; n = n.nextSibling ) {\r\n\t\tif ( n.nodeType === 1 && n !== elem ) {\r\n\t\t\tmatched.push( n );\r\n\t\t}\r\n\t}\r\n\r\n\treturn matched;\r\n};\r\n\r\n\r\nvar rneedsContext = jQuery.expr.match.needsContext;\r\n\r\nvar rsingleTag = ( /^<([\\w-]+)\\s*\\/?>(?:<\\/\\1>|)$/ );\r\n\r\n\r\n\r\nvar risSimple = /^.[^:#\\[\\.,]*$/;\r\n\r\n// Implement the identical functionality for filter and not\r\nfunction winnow( elements, qualifier, not ) {\r\n\tif ( jQuery.isFunction( qualifier ) ) {\r\n\t\treturn jQuery.grep( elements, function( elem, i ) {\r\n\t\t\t/* jshint -W018 */\r\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\tif ( qualifier.nodeType ) {\r\n\t\treturn jQuery.grep( elements, function( elem ) {\r\n\t\t\treturn ( elem === qualifier ) !== not;\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\tif ( typeof qualifier === \"string\" ) {\r\n\t\tif ( risSimple.test( qualifier ) ) {\r\n\t\t\treturn jQuery.filter( qualifier, elements, not );\r\n\t\t}\r\n\r\n\t\tqualifier = jQuery.filter( qualifier, elements );\r\n\t}\r\n\r\n\treturn jQuery.grep( elements, function( elem ) {\r\n\t\treturn ( jQuery.inArray( elem, qualifier ) > -1 ) !== not;\r\n\t} );\r\n}\r\n\r\njQuery.filter = function( expr, elems, not ) {\r\n\tvar elem = elems[ 0 ];\r\n\r\n\tif ( not ) {\r\n\t\texpr = \":not(\" + expr + \")\";\r\n\t}\r\n\r\n\treturn elems.length === 1 && elem.nodeType === 1 ?\r\n\t\tjQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\r\n\t\tjQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\r\n\t\t\treturn elem.nodeType === 1;\r\n\t\t} ) );\r\n};\r\n\r\njQuery.fn.extend( {\r\n\tfind: function( selector ) {\r\n\t\tvar i,\r\n\t\t\tret = [],\r\n\t\t\tself = this,\r\n\t\t\tlen = self.length;\r\n\r\n\t\tif ( typeof selector !== \"string\" ) {\r\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\r\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} ) );\r\n\t\t}\r\n\r\n\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\tjQuery.find( selector, self[ i ], ret );\r\n\t\t}\r\n\r\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\r\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\r\n\t\tret.selector = this.selector ? this.selector + \" \" + selector : selector;\r\n\t\treturn ret;\r\n\t},\r\n\tfilter: function( selector ) {\r\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\r\n\t},\r\n\tnot: function( selector ) {\r\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\r\n\t},\r\n\tis: function( selector ) {\r\n\t\treturn !!winnow(\r\n\t\t\tthis,\r\n\r\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\r\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\r\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\r\n\t\t\t\tjQuery( selector ) :\r\n\t\t\t\tselector || [],\r\n\t\t\tfalse\r\n\t\t).length;\r\n\t}\r\n} );\r\n\r\n\r\n// Initialize a jQuery object\r\n\r\n\r\n// A central reference to the root jQuery(document)\r\nvar rootjQuery,\r\n\r\n\t// A simple way to check for HTML strings\r\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\r\n\t// Strict HTML recognition (#11290: must start with <)\r\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\r\n\r\n\tinit = jQuery.fn.init = function( selector, context, root ) {\r\n\t\tvar match, elem;\r\n\r\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\r\n\t\tif ( !selector ) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\t// init accepts an alternate rootjQuery\r\n\t\t// so migrate can support jQuery.sub (gh-2101)\r\n\t\troot = root || rootjQuery;\r\n\r\n\t\t// Handle HTML strings\r\n\t\tif ( typeof selector === \"string\" ) {\r\n\t\t\tif ( selector.charAt( 0 ) === \"<\" &&\r\n\t\t\t\tselector.charAt( selector.length - 1 ) === \">\" &&\r\n\t\t\t\tselector.length >= 3 ) {\r\n\r\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\r\n\t\t\t\tmatch = [ null, selector, null ];\r\n\r\n\t\t\t} else {\r\n\t\t\t\tmatch = rquickExpr.exec( selector );\r\n\t\t\t}\r\n\r\n\t\t\t// Match html or make sure no context is specified for #id\r\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\r\n\r\n\t\t\t\t// HANDLE: $(html) -> $(array)\r\n\t\t\t\tif ( match[ 1 ] ) {\r\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\r\n\r\n\t\t\t\t\t// scripts is true for back-compat\r\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\r\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\r\n\t\t\t\t\t\tmatch[ 1 ],\r\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\r\n\t\t\t\t\t\ttrue\r\n\t\t\t\t\t) );\r\n\r\n\t\t\t\t\t// HANDLE: $(html, props)\r\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\r\n\t\t\t\t\t\tfor ( match in context ) {\r\n\r\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\r\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\r\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\r\n\r\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn this;\r\n\r\n\t\t\t\t// HANDLE: $(#id)\r\n\t\t\t\t} else {\r\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\r\n\r\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\r\n\t\t\t\t\t// nodes that are no longer in the document #6963\r\n\t\t\t\t\tif ( elem && elem.parentNode ) {\r\n\r\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\r\n\t\t\t\t\t\t// by name instead of ID\r\n\t\t\t\t\t\tif ( elem.id !== match[ 2 ] ) {\r\n\t\t\t\t\t\t\treturn rootjQuery.find( selector );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\r\n\t\t\t\t\t\tthis.length = 1;\r\n\t\t\t\t\t\tthis[ 0 ] = elem;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.context = document;\r\n\t\t\t\t\tthis.selector = selector;\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\r\n\t\t\t// HANDLE: $(expr, $(...))\r\n\t\t\t} else if ( !context || context.jquery ) {\r\n\t\t\t\treturn ( context || root ).find( selector );\r\n\r\n\t\t\t// HANDLE: $(expr, context)\r\n\t\t\t// (which is just equivalent to: $(context).find(expr)\r\n\t\t\t} else {\r\n\t\t\t\treturn this.constructor( context ).find( selector );\r\n\t\t\t}\r\n\r\n\t\t// HANDLE: $(DOMElement)\r\n\t\t} else if ( selector.nodeType ) {\r\n\t\t\tthis.context = this[ 0 ] = selector;\r\n\t\t\tthis.length = 1;\r\n\t\t\treturn this;\r\n\r\n\t\t// HANDLE: $(function)\r\n\t\t// Shortcut for document ready\r\n\t\t} else if ( jQuery.isFunction( selector ) ) {\r\n\t\t\treturn typeof root.ready !== \"undefined\" ?\r\n\t\t\t\troot.ready( selector ) :\r\n\r\n\t\t\t\t// Execute immediately if ready is not present\r\n\t\t\t\tselector( jQuery );\r\n\t\t}\r\n\r\n\t\tif ( selector.selector !== undefined ) {\r\n\t\t\tthis.selector = selector.selector;\r\n\t\t\tthis.context = selector.context;\r\n\t\t}\r\n\r\n\t\treturn jQuery.makeArray( selector, this );\r\n\t};\r\n\r\n// Give the init function the jQuery prototype for later instantiation\r\ninit.prototype = jQuery.fn;\r\n\r\n// Initialize central reference\r\nrootjQuery = jQuery( document );\r\n\r\n\r\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\r\n\r\n\t// methods guaranteed to produce a unique set when starting from a unique set\r\n\tguaranteedUnique = {\r\n\t\tchildren: true,\r\n\t\tcontents: true,\r\n\t\tnext: true,\r\n\t\tprev: true\r\n\t};\r\n\r\njQuery.fn.extend( {\r\n\thas: function( target ) {\r\n\t\tvar i,\r\n\t\t\ttargets = jQuery( target, this ),\r\n\t\t\tlen = targets.length;\r\n\r\n\t\treturn this.filter( function() {\r\n\t\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\tclosest: function( selectors, context ) {\r\n\t\tvar cur,\r\n\t\t\ti = 0,\r\n\t\t\tl = this.length,\r\n\t\t\tmatched = [],\r\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\r\n\t\t\t\tjQuery( selectors, context || this.context ) :\r\n\t\t\t\t0;\r\n\r\n\t\tfor ( ; i < l; i++ ) {\r\n\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\r\n\r\n\t\t\t\t// Always skip document fragments\r\n\t\t\t\tif ( cur.nodeType < 11 && ( pos ?\r\n\t\t\t\t\tpos.index( cur ) > -1 :\r\n\r\n\t\t\t\t\t// Don't pass non-elements to Sizzle\r\n\t\t\t\t\tcur.nodeType === 1 &&\r\n\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\r\n\r\n\t\t\t\t\tmatched.push( cur );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\r\n\t},\r\n\r\n\t// Determine the position of an element within\r\n\t// the matched set of elements\r\n\tindex: function( elem ) {\r\n\r\n\t\t// No argument, return index in parent\r\n\t\tif ( !elem ) {\r\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\r\n\t\t}\r\n\r\n\t\t// index in selector\r\n\t\tif ( typeof elem === \"string\" ) {\r\n\t\t\treturn jQuery.inArray( this[ 0 ], jQuery( elem ) );\r\n\t\t}\r\n\r\n\t\t// Locate the position of the desired element\r\n\t\treturn jQuery.inArray(\r\n\r\n\t\t\t// If it receives a jQuery object, the first element is used\r\n\t\t\telem.jquery ? elem[ 0 ] : elem, this );\r\n\t},\r\n\r\n\tadd: function( selector, context ) {\r\n\t\treturn this.pushStack(\r\n\t\t\tjQuery.uniqueSort(\r\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\r\n\t\t\t)\r\n\t\t);\r\n\t},\r\n\r\n\taddBack: function( selector ) {\r\n\t\treturn this.add( selector == null ?\r\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\r\n\t\t);\r\n\t}\r\n} );\r\n\r\nfunction sibling( cur, dir ) {\r\n\tdo {\r\n\t\tcur = cur[ dir ];\r\n\t} while ( cur && cur.nodeType !== 1 );\r\n\r\n\treturn cur;\r\n}\r\n\r\njQuery.each( {\r\n\tparent: function( elem ) {\r\n\t\tvar parent = elem.parentNode;\r\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\r\n\t},\r\n\tparents: function( elem ) {\r\n\t\treturn dir( elem, \"parentNode\" );\r\n\t},\r\n\tparentsUntil: function( elem, i, until ) {\r\n\t\treturn dir( elem, \"parentNode\", until );\r\n\t},\r\n\tnext: function( elem ) {\r\n\t\treturn sibling( elem, \"nextSibling\" );\r\n\t},\r\n\tprev: function( elem ) {\r\n\t\treturn sibling( elem, \"previousSibling\" );\r\n\t},\r\n\tnextAll: function( elem ) {\r\n\t\treturn dir( elem, \"nextSibling\" );\r\n\t},\r\n\tprevAll: function( elem ) {\r\n\t\treturn dir( elem, \"previousSibling\" );\r\n\t},\r\n\tnextUntil: function( elem, i, until ) {\r\n\t\treturn dir( elem, \"nextSibling\", until );\r\n\t},\r\n\tprevUntil: function( elem, i, until ) {\r\n\t\treturn dir( elem, \"previousSibling\", until );\r\n\t},\r\n\tsiblings: function( elem ) {\r\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\r\n\t},\r\n\tchildren: function( elem ) {\r\n\t\treturn siblings( elem.firstChild );\r\n\t},\r\n\tcontents: function( elem ) {\r\n\t\treturn jQuery.nodeName( elem, \"iframe\" ) ?\r\n\t\t\telem.contentDocument || elem.contentWindow.document :\r\n\t\t\tjQuery.merge( [], elem.childNodes );\r\n\t}\r\n}, function( name, fn ) {\r\n\tjQuery.fn[ name ] = function( until, selector ) {\r\n\t\tvar ret = jQuery.map( this, fn, until );\r\n\r\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\r\n\t\t\tselector = until;\r\n\t\t}\r\n\r\n\t\tif ( selector && typeof selector === \"string\" ) {\r\n\t\t\tret = jQuery.filter( selector, ret );\r\n\t\t}\r\n\r\n\t\tif ( this.length > 1 ) {\r\n\r\n\t\t\t// Remove duplicates\r\n\t\t\tif ( !guaranteedUnique[ name ] ) {\r\n\t\t\t\tret = jQuery.uniqueSort( ret );\r\n\t\t\t}\r\n\r\n\t\t\t// Reverse order for parents* and prev-derivatives\r\n\t\t\tif ( rparentsprev.test( name ) ) {\r\n\t\t\t\tret = ret.reverse();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( ret );\r\n\t};\r\n} );\r\nvar rnotwhite = ( /\\S+/g );\r\n\r\n\r\n\r\n// Convert String-formatted options into Object-formatted ones\r\nfunction createOptions( options ) {\r\n\tvar object = {};\r\n\tjQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {\r\n\t\tobject[ flag ] = true;\r\n\t} );\r\n\treturn object;\r\n}\r\n\r\n/*\r\n * Create a callback list using the following parameters:\r\n *\r\n *\toptions: an optional list of space-separated options that will change how\r\n *\t\t\tthe callback list behaves or a more traditional option object\r\n *\r\n * By default a callback list will act like an event callback list and can be\r\n * \"fired\" multiple times.\r\n *\r\n * Possible options:\r\n *\r\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\r\n *\r\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\r\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\r\n *\t\t\t\t\tvalues (like a Deferred)\r\n *\r\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\r\n *\r\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\r\n *\r\n */\r\njQuery.Callbacks = function( options ) {\r\n\r\n\t// Convert options from String-formatted to Object-formatted if needed\r\n\t// (we check in cache first)\r\n\toptions = typeof options === \"string\" ?\r\n\t\tcreateOptions( options ) :\r\n\t\tjQuery.extend( {}, options );\r\n\r\n\tvar // Flag to know if list is currently firing\r\n\t\tfiring,\r\n\r\n\t\t// Last fire value for non-forgettable lists\r\n\t\tmemory,\r\n\r\n\t\t// Flag to know if list was already fired\r\n\t\tfired,\r\n\r\n\t\t// Flag to prevent firing\r\n\t\tlocked,\r\n\r\n\t\t// Actual callback list\r\n\t\tlist = [],\r\n\r\n\t\t// Queue of execution data for repeatable lists\r\n\t\tqueue = [],\r\n\r\n\t\t// Index of currently firing callback (modified by add/remove as needed)\r\n\t\tfiringIndex = -1,\r\n\r\n\t\t// Fire callbacks\r\n\t\tfire = function() {\r\n\r\n\t\t\t// Enforce single-firing\r\n\t\t\tlocked = options.once;\r\n\r\n\t\t\t// Execute callbacks for all pending executions,\r\n\t\t\t// respecting firingIndex overrides and runtime changes\r\n\t\t\tfired = firing = true;\r\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\r\n\t\t\t\tmemory = queue.shift();\r\n\t\t\t\twhile ( ++firingIndex < list.length ) {\r\n\r\n\t\t\t\t\t// Run callback and check for early termination\r\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\r\n\t\t\t\t\t\toptions.stopOnFalse ) {\r\n\r\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\r\n\t\t\t\t\t\tfiringIndex = list.length;\r\n\t\t\t\t\t\tmemory = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Forget the data if we're done with it\r\n\t\t\tif ( !options.memory ) {\r\n\t\t\t\tmemory = false;\r\n\t\t\t}\r\n\r\n\t\t\tfiring = false;\r\n\r\n\t\t\t// Clean up if we're done firing for good\r\n\t\t\tif ( locked ) {\r\n\r\n\t\t\t\t// Keep an empty list if we have data for future add calls\r\n\t\t\t\tif ( memory ) {\r\n\t\t\t\t\tlist = [];\r\n\r\n\t\t\t\t// Otherwise, this object is spent\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlist = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t// Actual Callbacks object\r\n\t\tself = {\r\n\r\n\t\t\t// Add a callback or a collection of callbacks to the list\r\n\t\t\tadd: function() {\r\n\t\t\t\tif ( list ) {\r\n\r\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\r\n\t\t\t\t\tif ( memory && !firing ) {\r\n\t\t\t\t\t\tfiringIndex = list.length - 1;\r\n\t\t\t\t\t\tqueue.push( memory );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t( function add( args ) {\r\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\r\n\t\t\t\t\t\t\tif ( jQuery.isFunction( arg ) ) {\r\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\r\n\t\t\t\t\t\t\t\t\tlist.push( arg );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if ( arg && arg.length && jQuery.type( arg ) !== \"string\" ) {\r\n\r\n\t\t\t\t\t\t\t\t// Inspect recursively\r\n\t\t\t\t\t\t\t\tadd( arg );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} );\r\n\t\t\t\t\t} )( arguments );\r\n\r\n\t\t\t\t\tif ( memory && !firing ) {\r\n\t\t\t\t\t\tfire();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\r\n\t\t\t// Remove a callback from the list\r\n\t\t\tremove: function() {\r\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\r\n\t\t\t\t\tvar index;\r\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\r\n\t\t\t\t\t\tlist.splice( index, 1 );\r\n\r\n\t\t\t\t\t\t// Handle firing indexes\r\n\t\t\t\t\t\tif ( index <= firingIndex ) {\r\n\t\t\t\t\t\t\tfiringIndex--;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} );\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\r\n\t\t\t// Check if a given callback is in the list.\r\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\r\n\t\t\thas: function( fn ) {\r\n\t\t\t\treturn fn ?\r\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\r\n\t\t\t\t\tlist.length > 0;\r\n\t\t\t},\r\n\r\n\t\t\t// Remove all callbacks from the list\r\n\t\t\tempty: function() {\r\n\t\t\t\tif ( list ) {\r\n\t\t\t\t\tlist = [];\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\r\n\t\t\t// Disable .fire and .add\r\n\t\t\t// Abort any current/pending executions\r\n\t\t\t// Clear all callbacks and values\r\n\t\t\tdisable: function() {\r\n\t\t\t\tlocked = queue = [];\r\n\t\t\t\tlist = memory = \"\";\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\tdisabled: function() {\r\n\t\t\t\treturn !list;\r\n\t\t\t},\r\n\r\n\t\t\t// Disable .fire\r\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\r\n\t\t\t// Abort any pending executions\r\n\t\t\tlock: function() {\r\n\t\t\t\tlocked = true;\r\n\t\t\t\tif ( !memory ) {\r\n\t\t\t\t\tself.disable();\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\tlocked: function() {\r\n\t\t\t\treturn !!locked;\r\n\t\t\t},\r\n\r\n\t\t\t// Call all callbacks with the given context and arguments\r\n\t\t\tfireWith: function( context, args ) {\r\n\t\t\t\tif ( !locked ) {\r\n\t\t\t\t\targs = args || [];\r\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\r\n\t\t\t\t\tqueue.push( args );\r\n\t\t\t\t\tif ( !firing ) {\r\n\t\t\t\t\t\tfire();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\r\n\t\t\t// Call all the callbacks with the given arguments\r\n\t\t\tfire: function() {\r\n\t\t\t\tself.fireWith( this, arguments );\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\r\n\t\t\t// To know if the callbacks have already been called at least once\r\n\t\t\tfired: function() {\r\n\t\t\t\treturn !!fired;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\treturn self;\r\n};\r\n\r\n\r\njQuery.extend( {\r\n\r\n\tDeferred: function( func ) {\r\n\t\tvar tuples = [\r\n\r\n\t\t\t\t// action, add listener, listener list, final state\r\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ), \"resolved\" ],\r\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ), \"rejected\" ],\r\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ) ]\r\n\t\t\t],\r\n\t\t\tstate = \"pending\",\r\n\t\t\tpromise = {\r\n\t\t\t\tstate: function() {\r\n\t\t\t\t\treturn state;\r\n\t\t\t\t},\r\n\t\t\t\talways: function() {\r\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\r\n\t\t\t\t\tvar fns = arguments;\r\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\r\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\r\n\t\t\t\t\t\t\tvar fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\r\n\r\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\r\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\r\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\r\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\r\n\t\t\t\t\t\t\t\t\treturned.promise()\r\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\r\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\r\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\r\n\t\t\t\t\t\t\t\t\t\tthis === promise ? newDefer.promise() : this,\r\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} );\r\n\t\t\t\t\t\t} );\r\n\t\t\t\t\t\tfns = null;\r\n\t\t\t\t\t} ).promise();\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Get a promise for this deferred\r\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\r\n\t\t\t\tpromise: function( obj ) {\r\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdeferred = {};\r\n\r\n\t\t// Keep pipe for back-compat\r\n\t\tpromise.pipe = promise.then;\r\n\r\n\t\t// Add list-specific methods\r\n\t\tjQuery.each( tuples, function( i, tuple ) {\r\n\t\t\tvar list = tuple[ 2 ],\r\n\t\t\t\tstateString = tuple[ 3 ];\r\n\r\n\t\t\t// promise[ done | fail | progress ] = list.add\r\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\r\n\r\n\t\t\t// Handle state\r\n\t\t\tif ( stateString ) {\r\n\t\t\t\tlist.add( function() {\r\n\r\n\t\t\t\t\t// state = [ resolved | rejected ]\r\n\t\t\t\t\tstate = stateString;\r\n\r\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\r\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\r\n\t\t\t}\r\n\r\n\t\t\t// deferred[ resolve | reject | notify ]\r\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\r\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? promise : this, arguments );\r\n\t\t\t\treturn this;\r\n\t\t\t};\r\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\r\n\t\t} );\r\n\r\n\t\t// Make the deferred a promise\r\n\t\tpromise.promise( deferred );\r\n\r\n\t\t// Call given func if any\r\n\t\tif ( func ) {\r\n\t\t\tfunc.call( deferred, deferred );\r\n\t\t}\r\n\r\n\t\t// All done!\r\n\t\treturn deferred;\r\n\t},\r\n\r\n\t// Deferred helper\r\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\r\n\t\tvar i = 0,\r\n\t\t\tresolveValues = slice.call( arguments ),\r\n\t\t\tlength = resolveValues.length,\r\n\r\n\t\t\t// the count of uncompleted subordinates\r\n\t\t\tremaining = length !== 1 ||\r\n\t\t\t\t( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\r\n\r\n\t\t\t// the master Deferred.\r\n\t\t\t// If resolveValues consist of only a single Deferred, just use that.\r\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\r\n\r\n\t\t\t// Update function for both resolve and progress values\r\n\t\t\tupdateFunc = function( i, contexts, values ) {\r\n\t\t\t\treturn function( value ) {\r\n\t\t\t\t\tcontexts[ i ] = this;\r\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\r\n\t\t\t\t\tif ( values === progressValues ) {\r\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\r\n\r\n\t\t\t\t\t} else if ( !( --remaining ) ) {\r\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t},\r\n\r\n\t\t\tprogressValues, progressContexts, resolveContexts;\r\n\r\n\t\t// add listeners to Deferred subordinates; treat others as resolved\r\n\t\tif ( length > 1 ) {\r\n\t\t\tprogressValues = new Array( length );\r\n\t\t\tprogressContexts = new Array( length );\r\n\t\t\tresolveContexts = new Array( length );\r\n\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\r\n\t\t\t\t\tresolveValues[ i ].promise()\r\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) )\r\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\r\n\t\t\t\t\t\t.fail( deferred.reject );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t--remaining;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// if we're not waiting on anything, resolve the master\r\n\t\tif ( !remaining ) {\r\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\r\n\t\t}\r\n\r\n\t\treturn deferred.promise();\r\n\t}\r\n} );\r\n\r\n\r\n// The deferred used on DOM ready\r\nvar readyList;\r\n\r\njQuery.fn.ready = function( fn ) {\r\n\r\n\t// Add the callback\r\n\tjQuery.ready.promise().done( fn );\r\n\r\n\treturn this;\r\n};\r\n\r\njQuery.extend( {\r\n\r\n\t// Is the DOM ready to be used? Set to true once it occurs.\r\n\tisReady: false,\r\n\r\n\t// A counter to track how many items to wait for before\r\n\t// the ready event fires. See #6781\r\n\treadyWait: 1,\r\n\r\n\t// Hold (or release) the ready event\r\n\tholdReady: function( hold ) {\r\n\t\tif ( hold ) {\r\n\t\t\tjQuery.readyWait++;\r\n\t\t} else {\r\n\t\t\tjQuery.ready( true );\r\n\t\t}\r\n\t},\r\n\r\n\t// Handle when the DOM is ready\r\n\tready: function( wait ) {\r\n\r\n\t\t// Abort if there are pending holds or we're already ready\r\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Remember that the DOM is ready\r\n\t\tjQuery.isReady = true;\r\n\r\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\r\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// If there are functions bound, to execute\r\n\t\treadyList.resolveWith( document, [ jQuery ] );\r\n\r\n\t\t// Trigger any bound ready events\r\n\t\tif ( jQuery.fn.triggerHandler ) {\r\n\t\t\tjQuery( document ).triggerHandler( \"ready\" );\r\n\t\t\tjQuery( document ).off( \"ready\" );\r\n\t\t}\r\n\t}\r\n} );\r\n\r\n/**\r\n * Clean-up method for dom ready events\r\n */\r\nfunction detach() {\r\n\tif ( document.addEventListener ) {\r\n\t\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\r\n\t\twindow.removeEventListener( \"load\", completed );\r\n\r\n\t} else {\r\n\t\tdocument.detachEvent( \"onreadystatechange\", completed );\r\n\t\twindow.detachEvent( \"onload\", completed );\r\n\t}\r\n}\r\n\r\n/**\r\n * The ready event handler and self cleanup method\r\n */\r\nfunction completed() {\r\n\r\n\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\r\n\tif ( document.addEventListener ||\r\n\t\twindow.event.type === \"load\" ||\r\n\t\tdocument.readyState === \"complete\" ) {\r\n\r\n\t\tdetach();\r\n\t\tjQuery.ready();\r\n\t}\r\n}\r\n\r\njQuery.ready.promise = function( obj ) {\r\n\tif ( !readyList ) {\r\n\r\n\t\treadyList = jQuery.Deferred();\r\n\r\n\t\t// Catch cases where $(document).ready() is called\r\n\t\t// after the browser event has already occurred.\r\n\t\t// Support: IE6-10\r\n\t\t// Older IE sometimes signals \"interactive\" too soon\r\n\t\tif ( document.readyState === \"complete\" ||\r\n\t\t\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\r\n\r\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\r\n\t\t\twindow.setTimeout( jQuery.ready );\r\n\r\n\t\t// Standards-based browsers support DOMContentLoaded\r\n\t\t} else if ( document.addEventListener ) {\r\n\r\n\t\t\t// Use the handy event callback\r\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed );\r\n\r\n\t\t\t// A fallback to window.onload, that will always work\r\n\t\t\twindow.addEventListener( \"load\", completed );\r\n\r\n\t\t// If IE event model is used\r\n\t\t} else {\r\n\r\n\t\t\t// Ensure firing before onload, maybe late but safe also for iframes\r\n\t\t\tdocument.attachEvent( \"onreadystatechange\", completed );\r\n\r\n\t\t\t// A fallback to window.onload, that will always work\r\n\t\t\twindow.attachEvent( \"onload\", completed );\r\n\r\n\t\t\t// If IE and not a frame\r\n\t\t\t// continually check to see if the document is ready\r\n\t\t\tvar top = false;\r\n\r\n\t\t\ttry {\r\n\t\t\t\ttop = window.frameElement == null && document.documentElement;\r\n\t\t\t} catch ( e ) {}\r\n\r\n\t\t\tif ( top && top.doScroll ) {\r\n\t\t\t\t( function doScrollCheck() {\r\n\t\t\t\t\tif ( !jQuery.isReady ) {\r\n\r\n\t\t\t\t\t\ttry {\r\n\r\n\t\t\t\t\t\t\t// Use the trick by Diego Perini\r\n\t\t\t\t\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\r\n\t\t\t\t\t\t\ttop.doScroll( \"left\" );\r\n\t\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t\treturn window.setTimeout( doScrollCheck, 50 );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// detach all dom ready events\r\n\t\t\t\t\t\tdetach();\r\n\r\n\t\t\t\t\t\t// and execute any waiting functions\r\n\t\t\t\t\t\tjQuery.ready();\r\n\t\t\t\t\t}\r\n\t\t\t\t} )();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn readyList.promise( obj );\r\n};\r\n\r\n// Kick off the DOM ready check even if the user does not\r\njQuery.ready.promise();\r\n\r\n\r\n\r\n\r\n// Support: IE<9\r\n// Iteration over object's inherited properties before its own\r\nvar i;\r\nfor ( i in jQuery( support ) ) {\r\n\tbreak;\r\n}\r\nsupport.ownFirst = i === \"0\";\r\n\r\n// Note: most support tests are defined in their respective modules.\r\n// false until the test is run\r\nsupport.inlineBlockNeedsLayout = false;\r\n\r\n// Execute ASAP in case we need to set body.style.zoom\r\njQuery( function() {\r\n\r\n\t// Minified: var a,b,c,d\r\n\tvar val, div, body, container;\r\n\r\n\tbody = document.getElementsByTagName( \"body\" )[ 0 ];\r\n\tif ( !body || !body.style ) {\r\n\r\n\t\t// Return for frameset docs that don't have a body\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Setup\r\n\tdiv = document.createElement( \"div\" );\r\n\tcontainer = document.createElement( \"div\" );\r\n\tcontainer.style.cssText = \"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\";\r\n\tbody.appendChild( container ).appendChild( div );\r\n\r\n\tif ( typeof div.style.zoom !== \"undefined\" ) {\r\n\r\n\t\t// Support: IE<8\r\n\t\t// Check if natively block-level elements act like inline-block\r\n\t\t// elements when setting their display to 'inline' and giving\r\n\t\t// them layout\r\n\t\tdiv.style.cssText = \"display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1\";\r\n\r\n\t\tsupport.inlineBlockNeedsLayout = val = div.offsetWidth === 3;\r\n\t\tif ( val ) {\r\n\r\n\t\t\t// Prevent IE 6 from affecting layout for positioned elements #11048\r\n\t\t\t// Prevent IE from shrinking the body in IE 7 mode #12869\r\n\t\t\t// Support: IE<8\r\n\t\t\tbody.style.zoom = 1;\r\n\t\t}\r\n\t}\r\n\r\n\tbody.removeChild( container );\r\n} );\r\n\r\n\r\n( function() {\r\n\tvar div = document.createElement( \"div\" );\r\n\r\n\t// Support: IE<9\r\n\tsupport.deleteExpando = true;\r\n\ttry {\r\n\t\tdelete div.test;\r\n\t} catch ( e ) {\r\n\t\tsupport.deleteExpando = false;\r\n\t}\r\n\r\n\t// Null elements to avoid leaks in IE.\r\n\tdiv = null;\r\n} )();\r\nvar acceptData = function( elem ) {\r\n\tvar noData = jQuery.noData[ ( elem.nodeName + \" \" ).toLowerCase() ],\r\n\t\tnodeType = +elem.nodeType || 1;\r\n\r\n\t// Do not set data on non-element DOM nodes because it will not be cleared (#8335).\r\n\treturn nodeType !== 1 && nodeType !== 9 ?\r\n\t\tfalse :\r\n\r\n\t\t// Nodes accept data unless otherwise specified; rejection can be conditional\r\n\t\t!noData || noData !== true && elem.getAttribute( \"classid\" ) === noData;\r\n};\r\n\r\n\r\n\r\n\r\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\r\n\trmultiDash = /([A-Z])/g;\r\n\r\nfunction dataAttr( elem, key, data ) {\r\n\r\n\t// If nothing was found internally, try to fetch any\r\n\t// data from the HTML5 data-* attribute\r\n\tif ( data === undefined && elem.nodeType === 1 ) {\r\n\r\n\t\tvar name = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\r\n\r\n\t\tdata = elem.getAttribute( name );\r\n\r\n\t\tif ( typeof data === \"string\" ) {\r\n\t\t\ttry {\r\n\t\t\t\tdata = data === \"true\" ? true :\r\n\t\t\t\t\tdata === \"false\" ? false :\r\n\t\t\t\t\tdata === \"null\" ? null :\r\n\r\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\r\n\t\t\t\t\t+data + \"\" === data ? +data :\r\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\r\n\t\t\t\t\tdata;\r\n\t\t\t} catch ( e ) {}\r\n\r\n\t\t\t// Make sure we set the data so it isn't changed later\r\n\t\t\tjQuery.data( elem, key, data );\r\n\r\n\t\t} else {\r\n\t\t\tdata = undefined;\r\n\t\t}\r\n\t}\r\n\r\n\treturn data;\r\n}\r\n\r\n// checks a cache object for emptiness\r\nfunction isEmptyDataObject( obj ) {\r\n\tvar name;\r\n\tfor ( name in obj ) {\r\n\r\n\t\t// if the public data object is empty, the private is still empty\r\n\t\tif ( name === \"data\" && jQuery.isEmptyObject( obj[ name ] ) ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif ( name !== \"toJSON\" ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\nfunction internalData( elem, name, data, pvt /* Internal Use Only */ ) {\r\n\tif ( !acceptData( elem ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar ret, thisCache,\r\n\t\tinternalKey = jQuery.expando,\r\n\r\n\t\t// We have to handle DOM nodes and JS objects differently because IE6-7\r\n\t\t// can't GC object references properly across the DOM-JS boundary\r\n\t\tisNode = elem.nodeType,\r\n\r\n\t\t// Only DOM nodes need the global jQuery cache; JS object data is\r\n\t\t// attached directly to the object so GC can occur automatically\r\n\t\tcache = isNode ? jQuery.cache : elem,\r\n\r\n\t\t// Only defining an ID for JS objects if its cache already exists allows\r\n\t\t// the code to shortcut on the same path as a DOM node with no cache\r\n\t\tid = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;\r\n\r\n\t// Avoid doing any more work than we need to when trying to get data on an\r\n\t// object that has no data at all\r\n\tif ( ( !id || !cache[ id ] || ( !pvt && !cache[ id ].data ) ) &&\r\n\t\tdata === undefined && typeof name === \"string\" ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif ( !id ) {\r\n\r\n\t\t// Only DOM nodes need a new unique ID for each element since their data\r\n\t\t// ends up in the global cache\r\n\t\tif ( isNode ) {\r\n\t\t\tid = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++;\r\n\t\t} else {\r\n\t\t\tid = internalKey;\r\n\t\t}\r\n\t}\r\n\r\n\tif ( !cache[ id ] ) {\r\n\r\n\t\t// Avoid exposing jQuery metadata on plain JS objects when the object\r\n\t\t// is serialized using JSON.stringify\r\n\t\tcache[ id ] = isNode ? {} : { toJSON: jQuery.noop };\r\n\t}\r\n\r\n\t// An object can be passed to jQuery.data instead of a key/value pair; this gets\r\n\t// shallow copied over onto the existing cache\r\n\tif ( typeof name === \"object\" || typeof name === \"function\" ) {\r\n\t\tif ( pvt ) {\r\n\t\t\tcache[ id ] = jQuery.extend( cache[ id ], name );\r\n\t\t} else {\r\n\t\t\tcache[ id ].data = jQuery.extend( cache[ id ].data, name );\r\n\t\t}\r\n\t}\r\n\r\n\tthisCache = cache[ id ];\r\n\r\n\t// jQuery data() is stored in a separate object inside the object's internal data\r\n\t// cache in order to avoid key collisions between internal data and user-defined\r\n\t// data.\r\n\tif ( !pvt ) {\r\n\t\tif ( !thisCache.data ) {\r\n\t\t\tthisCache.data = {};\r\n\t\t}\r\n\r\n\t\tthisCache = thisCache.data;\r\n\t}\r\n\r\n\tif ( data !== undefined ) {\r\n\t\tthisCache[ jQuery.camelCase( name ) ] = data;\r\n\t}\r\n\r\n\t// Check for both converted-to-camel and non-converted data property names\r\n\t// If a data property was specified\r\n\tif ( typeof name === \"string\" ) {\r\n\r\n\t\t// First Try to find as-is property data\r\n\t\tret = thisCache[ name ];\r\n\r\n\t\t// Test for null|undefined property data\r\n\t\tif ( ret == null ) {\r\n\r\n\t\t\t// Try to find the camelCased property\r\n\t\t\tret = thisCache[ jQuery.camelCase( name ) ];\r\n\t\t}\r\n\t} else {\r\n\t\tret = thisCache;\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\nfunction internalRemoveData( elem, name, pvt ) {\r\n\tif ( !acceptData( elem ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar thisCache, i,\r\n\t\tisNode = elem.nodeType,\r\n\r\n\t\t// See jQuery.data for more information\r\n\t\tcache = isNode ? jQuery.cache : elem,\r\n\t\tid = isNode ? elem[ jQuery.expando ] : jQuery.expando;\r\n\r\n\t// If there is already no cache entry for this object, there is no\r\n\t// purpose in continuing\r\n\tif ( !cache[ id ] ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif ( name ) {\r\n\r\n\t\tthisCache = pvt ? cache[ id ] : cache[ id ].data;\r\n\r\n\t\tif ( thisCache ) {\r\n\r\n\t\t\t// Support array or space separated string names for data keys\r\n\t\t\tif ( !jQuery.isArray( name ) ) {\r\n\r\n\t\t\t\t// try the string as a key before any manipulation\r\n\t\t\t\tif ( name in thisCache ) {\r\n\t\t\t\t\tname = [ name ];\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// split the camel cased version by spaces unless a key with the spaces exists\r\n\t\t\t\t\tname = jQuery.camelCase( name );\r\n\t\t\t\t\tif ( name in thisCache ) {\r\n\t\t\t\t\t\tname = [ name ];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tname = name.split( \" \" );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// If \"name\" is an array of keys...\r\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\r\n\t\t\t\t// keys will be converted to camelCase.\r\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\r\n\t\t\t\t// both plain key and camelCase key. #12786\r\n\t\t\t\t// This will only penalize the array argument path.\r\n\t\t\t\tname = name.concat( jQuery.map( name, jQuery.camelCase ) );\r\n\t\t\t}\r\n\r\n\t\t\ti = name.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tdelete thisCache[ name[ i ] ];\r\n\t\t\t}\r\n\r\n\t\t\t// If there is no data left in the cache, we want to continue\r\n\t\t\t// and let the cache object itself get destroyed\r\n\t\t\tif ( pvt ? !isEmptyDataObject( thisCache ) : !jQuery.isEmptyObject( thisCache ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// See jQuery.data for more information\r\n\tif ( !pvt ) {\r\n\t\tdelete cache[ id ].data;\r\n\r\n\t\t// Don't destroy the parent cache unless the internal data object\r\n\t\t// had been the only thing left in it\r\n\t\tif ( !isEmptyDataObject( cache[ id ] ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\t// Destroy the cache\r\n\tif ( isNode ) {\r\n\t\tjQuery.cleanData( [ elem ], true );\r\n\r\n\t// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)\r\n\t/* jshint eqeqeq: false */\r\n\t} else if ( support.deleteExpando || cache != cache.window ) {\r\n\t\t/* jshint eqeqeq: true */\r\n\t\tdelete cache[ id ];\r\n\r\n\t// When all else fails, undefined\r\n\t} else {\r\n\t\tcache[ id ] = undefined;\r\n\t}\r\n}\r\n\r\njQuery.extend( {\r\n\tcache: {},\r\n\r\n\t// The following elements (space-suffixed to avoid Object.prototype collisions)\r\n\t// throw uncatchable exceptions if you attempt to set expando properties\r\n\tnoData: {\r\n\t\t\"applet \": true,\r\n\t\t\"embed \": true,\r\n\r\n\t\t// ...but Flash objects (which have this classid) *can* handle expandos\r\n\t\t\"object \": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\r\n\t},\r\n\r\n\thasData: function( elem ) {\r\n\t\telem = elem.nodeType ? jQuery.cache[ elem[ jQuery.expando ] ] : elem[ jQuery.expando ];\r\n\t\treturn !!elem && !isEmptyDataObject( elem );\r\n\t},\r\n\r\n\tdata: function( elem, name, data ) {\r\n\t\treturn internalData( elem, name, data );\r\n\t},\r\n\r\n\tremoveData: function( elem, name ) {\r\n\t\treturn internalRemoveData( elem, name );\r\n\t},\r\n\r\n\t// For internal use only.\r\n\t_data: function( elem, name, data ) {\r\n\t\treturn internalData( elem, name, data, true );\r\n\t},\r\n\r\n\t_removeData: function( elem, name ) {\r\n\t\treturn internalRemoveData( elem, name, true );\r\n\t}\r\n} );\r\n\r\njQuery.fn.extend( {\r\n\tdata: function( key, value ) {\r\n\t\tvar i, name, data,\r\n\t\t\telem = this[ 0 ],\r\n\t\t\tattrs = elem && elem.attributes;\r\n\r\n\t\t// Special expections of .data basically thwart jQuery.access,\r\n\t\t// so implement the relevant behavior ourselves\r\n\r\n\t\t// Gets all values\r\n\t\tif ( key === undefined ) {\r\n\t\t\tif ( this.length ) {\r\n\t\t\t\tdata = jQuery.data( elem );\r\n\r\n\t\t\t\tif ( elem.nodeType === 1 && !jQuery._data( elem, \"parsedAttrs\" ) ) {\r\n\t\t\t\t\ti = attrs.length;\r\n\t\t\t\t\twhile ( i-- ) {\r\n\r\n\t\t\t\t\t\t// Support: IE11+\r\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\r\n\t\t\t\t\t\tif ( attrs[ i ] ) {\r\n\t\t\t\t\t\t\tname = attrs[ i ].name;\r\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\r\n\t\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice( 5 ) );\r\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tjQuery._data( elem, \"parsedAttrs\", true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\t// Sets multiple values\r\n\t\tif ( typeof key === \"object\" ) {\r\n\t\t\treturn this.each( function() {\r\n\t\t\t\tjQuery.data( this, key );\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\treturn arguments.length > 1 ?\r\n\r\n\t\t\t// Sets one value\r\n\t\t\tthis.each( function() {\r\n\t\t\t\tjQuery.data( this, key, value );\r\n\t\t\t} ) :\r\n\r\n\t\t\t// Gets one value\r\n\t\t\t// Try to fetch any internally stored data first\r\n\t\t\telem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined;\r\n\t},\r\n\r\n\tremoveData: function( key ) {\r\n\t\treturn this.each( function() {\r\n\t\t\tjQuery.removeData( this, key );\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\n\r\njQuery.extend( {\r\n\tqueue: function( elem, type, data ) {\r\n\t\tvar queue;\r\n\r\n\t\tif ( elem ) {\r\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\r\n\t\t\tqueue = jQuery._data( elem, type );\r\n\r\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\r\n\t\t\tif ( data ) {\r\n\t\t\t\tif ( !queue || jQuery.isArray( data ) ) {\r\n\t\t\t\t\tqueue = jQuery._data( elem, type, jQuery.makeArray( data ) );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tqueue.push( data );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn queue || [];\r\n\t\t}\r\n\t},\r\n\r\n\tdequeue: function( elem, type ) {\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\tvar queue = jQuery.queue( elem, type ),\r\n\t\t\tstartLength = queue.length,\r\n\t\t\tfn = queue.shift(),\r\n\t\t\thooks = jQuery._queueHooks( elem, type ),\r\n\t\t\tnext = function() {\r\n\t\t\t\tjQuery.dequeue( elem, type );\r\n\t\t\t};\r\n\r\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\r\n\t\tif ( fn === \"inprogress\" ) {\r\n\t\t\tfn = queue.shift();\r\n\t\t\tstartLength--;\r\n\t\t}\r\n\r\n\t\tif ( fn ) {\r\n\r\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\r\n\t\t\t// automatically dequeued\r\n\t\t\tif ( type === \"fx\" ) {\r\n\t\t\t\tqueue.unshift( \"inprogress\" );\r\n\t\t\t}\r\n\r\n\t\t\t// clear up the last queue stop function\r\n\t\t\tdelete hooks.stop;\r\n\t\t\tfn.call( elem, next, hooks );\r\n\t\t}\r\n\r\n\t\tif ( !startLength && hooks ) {\r\n\t\t\thooks.empty.fire();\r\n\t\t}\r\n\t},\r\n\r\n\t// not intended for public consumption - generates a queueHooks object,\r\n\t// or returns the current one\r\n\t_queueHooks: function( elem, type ) {\r\n\t\tvar key = type + \"queueHooks\";\r\n\t\treturn jQuery._data( elem, key ) || jQuery._data( elem, key, {\r\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\r\n\t\t\t\tjQuery._removeData( elem, type + \"queue\" );\r\n\t\t\t\tjQuery._removeData( elem, key );\r\n\t\t\t} )\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\njQuery.fn.extend( {\r\n\tqueue: function( type, data ) {\r\n\t\tvar setter = 2;\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tdata = type;\r\n\t\t\ttype = \"fx\";\r\n\t\t\tsetter--;\r\n\t\t}\r\n\r\n\t\tif ( arguments.length < setter ) {\r\n\t\t\treturn jQuery.queue( this[ 0 ], type );\r\n\t\t}\r\n\r\n\t\treturn data === undefined ?\r\n\t\t\tthis :\r\n\t\t\tthis.each( function() {\r\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\r\n\r\n\t\t\t\t// ensure a hooks for this queue\r\n\t\t\t\tjQuery._queueHooks( this, type );\r\n\r\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\r\n\t\t\t\t\tjQuery.dequeue( this, type );\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\t},\r\n\tdequeue: function( type ) {\r\n\t\treturn this.each( function() {\r\n\t\t\tjQuery.dequeue( this, type );\r\n\t\t} );\r\n\t},\r\n\tclearQueue: function( type ) {\r\n\t\treturn this.queue( type || \"fx\", [] );\r\n\t},\r\n\r\n\t// Get a promise resolved when queues of a certain type\r\n\t// are emptied (fx is the type by default)\r\n\tpromise: function( type, obj ) {\r\n\t\tvar tmp,\r\n\t\t\tcount = 1,\r\n\t\t\tdefer = jQuery.Deferred(),\r\n\t\t\telements = this,\r\n\t\t\ti = this.length,\r\n\t\t\tresolve = function() {\r\n\t\t\t\tif ( !( --count ) ) {\r\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tobj = type;\r\n\t\t\ttype = undefined;\r\n\t\t}\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\twhile ( i-- ) {\r\n\t\t\ttmp = jQuery._data( elements[ i ], type + \"queueHooks\" );\r\n\t\t\tif ( tmp && tmp.empty ) {\r\n\t\t\t\tcount++;\r\n\t\t\t\ttmp.empty.add( resolve );\r\n\t\t\t}\r\n\t\t}\r\n\t\tresolve();\r\n\t\treturn defer.promise( obj );\r\n\t}\r\n} );\r\n\r\n\r\n( function() {\r\n\tvar shrinkWrapBlocksVal;\r\n\r\n\tsupport.shrinkWrapBlocks = function() {\r\n\t\tif ( shrinkWrapBlocksVal != null ) {\r\n\t\t\treturn shrinkWrapBlocksVal;\r\n\t\t}\r\n\r\n\t\t// Will be changed later if needed.\r\n\t\tshrinkWrapBlocksVal = false;\r\n\r\n\t\t// Minified: var b,c,d\r\n\t\tvar div, body, container;\r\n\r\n\t\tbody = document.getElementsByTagName( \"body\" )[ 0 ];\r\n\t\tif ( !body || !body.style ) {\r\n\r\n\t\t\t// Test fired too early or in an unsupported environment, exit.\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Setup\r\n\t\tdiv = document.createElement( \"div\" );\r\n\t\tcontainer = document.createElement( \"div\" );\r\n\t\tcontainer.style.cssText = \"position:absolute;border:0;width:0;height:0;top:0;left:-9999px\";\r\n\t\tbody.appendChild( container ).appendChild( div );\r\n\r\n\t\t// Support: IE6\r\n\t\t// Check if elements with layout shrink-wrap their children\r\n\t\tif ( typeof div.style.zoom !== \"undefined\" ) {\r\n\r\n\t\t\t// Reset CSS: box-sizing; display; margin; border\r\n\t\t\tdiv.style.cssText =\r\n\r\n\t\t\t\t// Support: Firefox<29, Android 2.3\r\n\t\t\t\t// Vendor-prefix box-sizing\r\n\t\t\t\t\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;\" +\r\n\t\t\t\t\"box-sizing:content-box;display:block;margin:0;border:0;\" +\r\n\t\t\t\t\"padding:1px;width:1px;zoom:1\";\r\n\t\t\tdiv.appendChild( document.createElement( \"div\" ) ).style.width = \"5px\";\r\n\t\t\tshrinkWrapBlocksVal = div.offsetWidth !== 3;\r\n\t\t}\r\n\r\n\t\tbody.removeChild( container );\r\n\r\n\t\treturn shrinkWrapBlocksVal;\r\n\t};\r\n\r\n} )();\r\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\r\n\r\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\r\n\r\n\r\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\r\n\r\nvar isHidden = function( elem, el ) {\r\n\r\n\t\t// isHidden might be called from jQuery#filter function;\r\n\t\t// in that case, element will be second argument\r\n\t\telem = el || elem;\r\n\t\treturn jQuery.css( elem, \"display\" ) === \"none\" ||\r\n\t\t\t!jQuery.contains( elem.ownerDocument, elem );\r\n\t};\r\n\r\n\r\n\r\nfunction adjustCSS( elem, prop, valueParts, tween ) {\r\n\tvar adjusted,\r\n\t\tscale = 1,\r\n\t\tmaxIterations = 20,\r\n\t\tcurrentValue = tween ?\r\n\t\t\tfunction() { return tween.cur(); } :\r\n\t\t\tfunction() { return jQuery.css( elem, prop, \"\" ); },\r\n\t\tinitial = currentValue(),\r\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\r\n\r\n\t\t// Starting value computation is required for potential unit mismatches\r\n\t\tinitialInUnit = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\r\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\r\n\r\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\r\n\r\n\t\t// Trust units reported by jQuery.css\r\n\t\tunit = unit || initialInUnit[ 3 ];\r\n\r\n\t\t// Make sure we update the tween properties later on\r\n\t\tvalueParts = valueParts || [];\r\n\r\n\t\t// Iteratively approximate from a nonzero starting point\r\n\t\tinitialInUnit = +initial || 1;\r\n\r\n\t\tdo {\r\n\r\n\t\t\t// If previous iteration zeroed out, double until we get *something*.\r\n\t\t\t// Use string for doubling so we don't accidentally see scale as unchanged below\r\n\t\t\tscale = scale || \".5\";\r\n\r\n\t\t\t// Adjust and apply\r\n\t\t\tinitialInUnit = initialInUnit / scale;\r\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\r\n\r\n\t\t// Update scale, tolerating zero or NaN from tween.cur()\r\n\t\t// Break the loop if scale is unchanged or perfect, or if we've just had enough.\r\n\t\t} while (\r\n\t\t\tscale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations\r\n\t\t);\r\n\t}\r\n\r\n\tif ( valueParts ) {\r\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\r\n\r\n\t\t// Apply relative offset (+=/-=) if specified\r\n\t\tadjusted = valueParts[ 1 ] ?\r\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\r\n\t\t\t+valueParts[ 2 ];\r\n\t\tif ( tween ) {\r\n\t\t\ttween.unit = unit;\r\n\t\t\ttween.start = initialInUnit;\r\n\t\t\ttween.end = adjusted;\r\n\t\t}\r\n\t}\r\n\treturn adjusted;\r\n}\r\n\r\n\r\n// Multifunctional method to get and set values of a collection\r\n// The value/s can optionally be executed if it's a function\r\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\r\n\tvar i = 0,\r\n\t\tlength = elems.length,\r\n\t\tbulk = key == null;\r\n\r\n\t// Sets many values\r\n\tif ( jQuery.type( key ) === \"object\" ) {\r\n\t\tchainable = true;\r\n\t\tfor ( i in key ) {\r\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\r\n\t\t}\r\n\r\n\t// Sets one value\r\n\t} else if ( value !== undefined ) {\r\n\t\tchainable = true;\r\n\r\n\t\tif ( !jQuery.isFunction( value ) ) {\r\n\t\t\traw = true;\r\n\t\t}\r\n\r\n\t\tif ( bulk ) {\r\n\r\n\t\t\t// Bulk operations run against the entire set\r\n\t\t\tif ( raw ) {\r\n\t\t\t\tfn.call( elems, value );\r\n\t\t\t\tfn = null;\r\n\r\n\t\t\t// ...except when executing function values\r\n\t\t\t} else {\r\n\t\t\t\tbulk = fn;\r\n\t\t\t\tfn = function( elem, key, value ) {\r\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( fn ) {\r\n\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\tfn(\r\n\t\t\t\t\telems[ i ],\r\n\t\t\t\t\tkey,\r\n\t\t\t\t\traw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) )\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn chainable ?\r\n\t\telems :\r\n\r\n\t\t// Gets\r\n\t\tbulk ?\r\n\t\t\tfn.call( elems ) :\r\n\t\t\tlength ? fn( elems[ 0 ], key ) : emptyGet;\r\n};\r\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\r\n\r\nvar rtagName = ( /<([\\w:-]+)/ );\r\n\r\nvar rscriptType = ( /^$|\\/(?:java|ecma)script/i );\r\n\r\nvar rleadingWhitespace = ( /^\\s+/ );\r\n\r\nvar nodeNames = \"abbr|article|aside|audio|bdi|canvas|data|datalist|\" +\r\n\t\t\"details|dialog|figcaption|figure|footer|header|hgroup|main|\" +\r\n\t\t\"mark|meter|nav|output|picture|progress|section|summary|template|time|video\";\r\n\r\n\r\n\r\nfunction createSafeFragment( document ) {\r\n\tvar list = nodeNames.split( \"|\" ),\r\n\t\tsafeFrag = document.createDocumentFragment();\r\n\r\n\tif ( safeFrag.createElement ) {\r\n\t\twhile ( list.length ) {\r\n\t\t\tsafeFrag.createElement(\r\n\t\t\t\tlist.pop()\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\treturn safeFrag;\r\n}\r\n\r\n\r\n( function() {\r\n\tvar div = document.createElement( \"div\" ),\r\n\t\tfragment = document.createDocumentFragment(),\r\n\t\tinput = document.createElement( \"input\" );\r\n\r\n\t// Setup\r\n\tdiv.innerHTML = \" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\";\r\n\r\n\t// IE strips leading whitespace when .innerHTML is used\r\n\tsupport.leadingWhitespace = div.firstChild.nodeType === 3;\r\n\r\n\t// Make sure that tbody elements aren't automatically inserted\r\n\t// IE will insert them into empty tables\r\n\tsupport.tbody = !div.getElementsByTagName( \"tbody\" ).length;\r\n\r\n\t// Make sure that link elements get serialized correctly by innerHTML\r\n\t// This requires a wrapper element in IE\r\n\tsupport.htmlSerialize = !!div.getElementsByTagName( \"link\" ).length;\r\n\r\n\t// Makes sure cloning an html5 element does not cause problems\r\n\t// Where outerHTML is undefined, this still works\r\n\tsupport.html5Clone =\r\n\t\tdocument.createElement( \"nav\" ).cloneNode( true ).outerHTML !== \"<:nav></:nav>\";\r\n\r\n\t// Check if a disconnected checkbox will retain its checked\r\n\t// value of true after appended to the DOM (IE6/7)\r\n\tinput.type = \"checkbox\";\r\n\tinput.checked = true;\r\n\tfragment.appendChild( input );\r\n\tsupport.appendChecked = input.checked;\r\n\r\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\r\n\t// Support: IE6-IE11+\r\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\r\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\r\n\r\n\t// #11217 - WebKit loses check when the name is after the checked attribute\r\n\tfragment.appendChild( div );\r\n\r\n\t// Support: Windows Web Apps (WWA)\r\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\r\n\tinput = document.createElement( \"input\" );\r\n\tinput.setAttribute( \"type\", \"radio\" );\r\n\tinput.setAttribute( \"checked\", \"checked\" );\r\n\tinput.setAttribute( \"name\", \"t\" );\r\n\r\n\tdiv.appendChild( input );\r\n\r\n\t// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3\r\n\t// old WebKit doesn't clone checked state correctly in fragments\r\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\r\n\r\n\t// Support: IE<9\r\n\t// Cloned elements keep attachEvent handlers, we use addEventListener on IE9+\r\n\tsupport.noCloneEvent = !!div.addEventListener;\r\n\r\n\t// Support: IE<9\r\n\t// Since attributes and properties are the same in IE,\r\n\t// cleanData must set properties to undefined rather than use removeAttribute\r\n\tdiv[ jQuery.expando ] = 1;\r\n\tsupport.attributes = !div.getAttribute( jQuery.expando );\r\n} )();\r\n\r\n\r\n// We have to close these tags to support XHTML (#13200)\r\nvar wrapMap = {\r\n\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\r\n\tlegend: [ 1, \"<fieldset>\", \"</fieldset>\" ],\r\n\tarea: [ 1, \"<map>\", \"</map>\" ],\r\n\r\n\t// Support: IE8\r\n\tparam: [ 1, \"<object>\", \"</object>\" ],\r\n\tthead: [ 1, \"<table>\", \"</table>\" ],\r\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\r\n\tcol: [ 2, \"<table><tbody></tbody><colgroup>\", \"</colgroup></table>\" ],\r\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\r\n\r\n\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\r\n\t// unless wrapped in a div with non-breaking characters in front of it.\r\n\t_default: support.htmlSerialize ? [ 0, \"\", \"\" ] : [ 1, \"X<div>\", \"</div>\" ]\r\n};\r\n\r\n// Support: IE8-IE9\r\nwrapMap.optgroup = wrapMap.option;\r\n\r\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\r\nwrapMap.th = wrapMap.td;\r\n\r\n\r\nfunction getAll( context, tag ) {\r\n\tvar elems, elem,\r\n\t\ti = 0,\r\n\t\tfound = typeof context.getElementsByTagName !== \"undefined\" ?\r\n\t\t\tcontext.getElementsByTagName( tag || \"*\" ) :\r\n\t\t\ttypeof context.querySelectorAll !== \"undefined\" ?\r\n\t\t\t\tcontext.querySelectorAll( tag || \"*\" ) :\r\n\t\t\t\tundefined;\r\n\r\n\tif ( !found ) {\r\n\t\tfor ( found = [], elems = context.childNodes || context;\r\n\t\t\t( elem = elems[ i ] ) != null;\r\n\t\t\ti++\r\n\t\t) {\r\n\t\t\tif ( !tag || jQuery.nodeName( elem, tag ) ) {\r\n\t\t\t\tfound.push( elem );\r\n\t\t\t} else {\r\n\t\t\t\tjQuery.merge( found, getAll( elem, tag ) );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\r\n\t\tjQuery.merge( [ context ], found ) :\r\n\t\tfound;\r\n}\r\n\r\n\r\n// Mark scripts as having already been evaluated\r\nfunction setGlobalEval( elems, refElements ) {\r\n\tvar elem,\r\n\t\ti = 0;\r\n\tfor ( ; ( elem = elems[ i ] ) != null; i++ ) {\r\n\t\tjQuery._data(\r\n\t\t\telem,\r\n\t\t\t\"globalEval\",\r\n\t\t\t!refElements || jQuery._data( refElements[ i ], \"globalEval\" )\r\n\t\t);\r\n\t}\r\n}\r\n\r\n\r\nvar rhtml = /<|&#?\\w+;/,\r\n\trtbody = /<tbody/i;\r\n\r\nfunction fixDefaultChecked( elem ) {\r\n\tif ( rcheckableType.test( elem.type ) ) {\r\n\t\telem.defaultChecked = elem.checked;\r\n\t}\r\n}\r\n\r\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\r\n\tvar j, elem, contains,\r\n\t\ttmp, tag, tbody, wrap,\r\n\t\tl = elems.length,\r\n\r\n\t\t// Ensure a safe fragment\r\n\t\tsafe = createSafeFragment( context ),\r\n\r\n\t\tnodes = [],\r\n\t\ti = 0;\r\n\r\n\tfor ( ; i < l; i++ ) {\r\n\t\telem = elems[ i ];\r\n\r\n\t\tif ( elem || elem === 0 ) {\r\n\r\n\t\t\t// Add nodes directly\r\n\t\t\tif ( jQuery.type( elem ) === \"object\" ) {\r\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\r\n\r\n\t\t\t// Convert non-html into a text node\r\n\t\t\t} else if ( !rhtml.test( elem ) ) {\r\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\r\n\r\n\t\t\t// Convert html into DOM nodes\r\n\t\t\t} else {\r\n\t\t\t\ttmp = tmp || safe.appendChild( context.createElement( \"div\" ) );\r\n\r\n\t\t\t\t// Deserialize a standard representation\r\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\r\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\r\n\r\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\r\n\r\n\t\t\t\t// Descend through wrappers to the right content\r\n\t\t\t\tj = wrap[ 0 ];\r\n\t\t\t\twhile ( j-- ) {\r\n\t\t\t\t\ttmp = tmp.lastChild;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Manually add leading whitespace removed by IE\r\n\t\t\t\tif ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {\r\n\t\t\t\t\tnodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[ 0 ] ) );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Remove IE's autoinserted <tbody> from table fragments\r\n\t\t\t\tif ( !support.tbody ) {\r\n\r\n\t\t\t\t\t// String was a <table>, *may* have spurious <tbody>\r\n\t\t\t\t\telem = tag === \"table\" && !rtbody.test( elem ) ?\r\n\t\t\t\t\t\ttmp.firstChild :\r\n\r\n\t\t\t\t\t\t// String was a bare <thead> or <tfoot>\r\n\t\t\t\t\t\twrap[ 1 ] === \"<table>\" && !rtbody.test( elem ) ?\r\n\t\t\t\t\t\t\ttmp :\r\n\t\t\t\t\t\t\t0;\r\n\r\n\t\t\t\t\tj = elem && elem.childNodes.length;\r\n\t\t\t\t\twhile ( j-- ) {\r\n\t\t\t\t\t\tif ( jQuery.nodeName( ( tbody = elem.childNodes[ j ] ), \"tbody\" ) &&\r\n\t\t\t\t\t\t\t!tbody.childNodes.length ) {\r\n\r\n\t\t\t\t\t\t\telem.removeChild( tbody );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\r\n\r\n\t\t\t\t// Fix #12392 for WebKit and IE > 9\r\n\t\t\t\ttmp.textContent = \"\";\r\n\r\n\t\t\t\t// Fix #12392 for oldIE\r\n\t\t\t\twhile ( tmp.firstChild ) {\r\n\t\t\t\t\ttmp.removeChild( tmp.firstChild );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Remember the top-level container for proper cleanup\r\n\t\t\t\ttmp = safe.lastChild;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Fix #11356: Clear elements from fragment\r\n\tif ( tmp ) {\r\n\t\tsafe.removeChild( tmp );\r\n\t}\r\n\r\n\t// Reset defaultChecked for any radios and checkboxes\r\n\t// about to be appended to the DOM in IE 6/7 (#8060)\r\n\tif ( !support.appendChecked ) {\r\n\t\tjQuery.grep( getAll( nodes, \"input\" ), fixDefaultChecked );\r\n\t}\r\n\r\n\ti = 0;\r\n\twhile ( ( elem = nodes[ i++ ] ) ) {\r\n\r\n\t\t// Skip elements already in the context collection (trac-4087)\r\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\r\n\t\t\tif ( ignored ) {\r\n\t\t\t\tignored.push( elem );\r\n\t\t\t}\r\n\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\r\n\r\n\t\t// Append to fragment\r\n\t\ttmp = getAll( safe.appendChild( elem ), \"script\" );\r\n\r\n\t\t// Preserve script evaluation history\r\n\t\tif ( contains ) {\r\n\t\t\tsetGlobalEval( tmp );\r\n\t\t}\r\n\r\n\t\t// Capture executables\r\n\t\tif ( scripts ) {\r\n\t\t\tj = 0;\r\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\r\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\r\n\t\t\t\t\tscripts.push( elem );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\ttmp = null;\r\n\r\n\treturn safe;\r\n}\r\n\r\n\r\n( function() {\r\n\tvar i, eventName,\r\n\t\tdiv = document.createElement( \"div\" );\r\n\r\n\t// Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events)\r\n\tfor ( i in { submit: true, change: true, focusin: true } ) {\r\n\t\teventName = \"on\" + i;\r\n\r\n\t\tif ( !( support[ i ] = eventName in window ) ) {\r\n\r\n\t\t\t// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)\r\n\t\t\tdiv.setAttribute( eventName, \"t\" );\r\n\t\t\tsupport[ i ] = div.attributes[ eventName ].expando === false;\r\n\t\t}\r\n\t}\r\n\r\n\t// Null elements to avoid leaks in IE.\r\n\tdiv = null;\r\n} )();\r\n\r\n\r\nvar rformElems = /^(?:input|select|textarea)$/i,\r\n\trkeyEvent = /^key/,\r\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\r\n\trfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\r\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\r\n\r\nfunction returnTrue() {\r\n\treturn true;\r\n}\r\n\r\nfunction returnFalse() {\r\n\treturn false;\r\n}\r\n\r\n// Support: IE9\r\n// See #13393 for more info\r\nfunction safeActiveElement() {\r\n\ttry {\r\n\t\treturn document.activeElement;\r\n\t} catch ( err ) { }\r\n}\r\n\r\nfunction on( elem, types, selector, data, fn, one ) {\r\n\tvar origFn, type;\r\n\r\n\t// Types can be a map of types/handlers\r\n\tif ( typeof types === \"object\" ) {\r\n\r\n\t\t// ( types-Object, selector, data )\r\n\t\tif ( typeof selector !== \"string\" ) {\r\n\r\n\t\t\t// ( types-Object, data )\r\n\t\t\tdata = data || selector;\r\n\t\t\tselector = undefined;\r\n\t\t}\r\n\t\tfor ( type in types ) {\r\n\t\t\ton( elem, type, selector, data, types[ type ], one );\r\n\t\t}\r\n\t\treturn elem;\r\n\t}\r\n\r\n\tif ( data == null && fn == null ) {\r\n\r\n\t\t// ( types, fn )\r\n\t\tfn = selector;\r\n\t\tdata = selector = undefined;\r\n\t} else if ( fn == null ) {\r\n\t\tif ( typeof selector === \"string\" ) {\r\n\r\n\t\t\t// ( types, selector, fn )\r\n\t\t\tfn = data;\r\n\t\t\tdata = undefined;\r\n\t\t} else {\r\n\r\n\t\t\t// ( types, data, fn )\r\n\t\t\tfn = data;\r\n\t\t\tdata = selector;\r\n\t\t\tselector = undefined;\r\n\t\t}\r\n\t}\r\n\tif ( fn === false ) {\r\n\t\tfn = returnFalse;\r\n\t} else if ( !fn ) {\r\n\t\treturn elem;\r\n\t}\r\n\r\n\tif ( one === 1 ) {\r\n\t\torigFn = fn;\r\n\t\tfn = function( event ) {\r\n\r\n\t\t\t// Can use an empty set, since event contains the info\r\n\t\t\tjQuery().off( event );\r\n\t\t\treturn origFn.apply( this, arguments );\r\n\t\t};\r\n\r\n\t\t// Use same guid so caller can remove using origFn\r\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\r\n\t}\r\n\treturn elem.each( function() {\r\n\t\tjQuery.event.add( this, types, fn, data, selector );\r\n\t} );\r\n}\r\n\r\n/*\r\n * Helper functions for managing events -- not part of the public interface.\r\n * Props to Dean Edwards' addEvent library for many of the ideas.\r\n */\r\njQuery.event = {\r\n\r\n\tglobal: {},\r\n\r\n\tadd: function( elem, types, handler, data, selector ) {\r\n\t\tvar tmp, events, t, handleObjIn,\r\n\t\t\tspecial, eventHandle, handleObj,\r\n\t\t\thandlers, type, namespaces, origType,\r\n\t\t\telemData = jQuery._data( elem );\r\n\r\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\r\n\t\tif ( !elemData ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Caller can pass in an object of custom data in lieu of the handler\r\n\t\tif ( handler.handler ) {\r\n\t\t\thandleObjIn = handler;\r\n\t\t\thandler = handleObjIn.handler;\r\n\t\t\tselector = handleObjIn.selector;\r\n\t\t}\r\n\r\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\r\n\t\tif ( !handler.guid ) {\r\n\t\t\thandler.guid = jQuery.guid++;\r\n\t\t}\r\n\r\n\t\t// Init the element's event structure and main handler, if this is the first\r\n\t\tif ( !( events = elemData.events ) ) {\r\n\t\t\tevents = elemData.events = {};\r\n\t\t}\r\n\t\tif ( !( eventHandle = elemData.handle ) ) {\r\n\t\t\teventHandle = elemData.handle = function( e ) {\r\n\r\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\r\n\t\t\t\t// when an event is called after a page has unloaded\r\n\t\t\t\treturn typeof jQuery !== \"undefined\" &&\r\n\t\t\t\t\t( !e || jQuery.event.triggered !== e.type ) ?\r\n\t\t\t\t\tjQuery.event.dispatch.apply( eventHandle.elem, arguments ) :\r\n\t\t\t\t\tundefined;\r\n\t\t\t};\r\n\r\n\t\t\t// Add elem as a property of the handle fn to prevent a memory leak\r\n\t\t\t// with IE non-native events\r\n\t\t\teventHandle.elem = elem;\r\n\t\t}\r\n\r\n\t\t// Handle multiple events separated by a space\r\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\r\n\t\tt = types.length;\r\n\t\twhile ( t-- ) {\r\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\r\n\t\t\ttype = origType = tmp[ 1 ];\r\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\r\n\r\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\r\n\t\t\tif ( !type ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// If event changes its type, use the special event handlers for the changed type\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\r\n\t\t\t// If selector defined, determine special event api type, otherwise given type\r\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\r\n\r\n\t\t\t// Update special based on newly reset type\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\r\n\t\t\t// handleObj is passed to all event handlers\r\n\t\t\thandleObj = jQuery.extend( {\r\n\t\t\t\ttype: type,\r\n\t\t\t\torigType: origType,\r\n\t\t\t\tdata: data,\r\n\t\t\t\thandler: handler,\r\n\t\t\t\tguid: handler.guid,\r\n\t\t\t\tselector: selector,\r\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\r\n\t\t\t\tnamespace: namespaces.join( \".\" )\r\n\t\t\t}, handleObjIn );\r\n\r\n\t\t\t// Init the event handler queue if we're the first\r\n\t\t\tif ( !( handlers = events[ type ] ) ) {\r\n\t\t\t\thandlers = events[ type ] = [];\r\n\t\t\t\thandlers.delegateCount = 0;\r\n\r\n\t\t\t\t// Only use addEventListener/attachEvent if the special events handler returns false\r\n\t\t\t\tif ( !special.setup ||\r\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\r\n\r\n\t\t\t\t\t// Bind the global event handler to the element\r\n\t\t\t\t\tif ( elem.addEventListener ) {\r\n\t\t\t\t\t\telem.addEventListener( type, eventHandle, false );\r\n\r\n\t\t\t\t\t} else if ( elem.attachEvent ) {\r\n\t\t\t\t\t\telem.attachEvent( \"on\" + type, eventHandle );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( special.add ) {\r\n\t\t\t\tspecial.add.call( elem, handleObj );\r\n\r\n\t\t\t\tif ( !handleObj.handler.guid ) {\r\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Add to the element's handler list, delegates in front\r\n\t\t\tif ( selector ) {\r\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\r\n\t\t\t} else {\r\n\t\t\t\thandlers.push( handleObj );\r\n\t\t\t}\r\n\r\n\t\t\t// Keep track of which events have ever been used, for event optimization\r\n\t\t\tjQuery.event.global[ type ] = true;\r\n\t\t}\r\n\r\n\t\t// Nullify elem to prevent memory leaks in IE\r\n\t\telem = null;\r\n\t},\r\n\r\n\t// Detach an event or set of events from an element\r\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\r\n\t\tvar j, handleObj, tmp,\r\n\t\t\torigCount, t, events,\r\n\t\t\tspecial, handlers, type,\r\n\t\t\tnamespaces, origType,\r\n\t\t\telemData = jQuery.hasData( elem ) && jQuery._data( elem );\r\n\r\n\t\tif ( !elemData || !( events = elemData.events ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Once for each type.namespace in types; type may be omitted\r\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\r\n\t\tt = types.length;\r\n\t\twhile ( t-- ) {\r\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\r\n\t\t\ttype = origType = tmp[ 1 ];\r\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\r\n\r\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\r\n\t\t\tif ( !type ) {\r\n\t\t\t\tfor ( type in events ) {\r\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\r\n\t\t\thandlers = events[ type ] || [];\r\n\t\t\ttmp = tmp[ 2 ] &&\r\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\r\n\r\n\t\t\t// Remove matching events\r\n\t\t\torigCount = j = handlers.length;\r\n\t\t\twhile ( j-- ) {\r\n\t\t\t\thandleObj = handlers[ j ];\r\n\r\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\r\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\r\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\r\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\r\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\r\n\t\t\t\t\thandlers.splice( j, 1 );\r\n\r\n\t\t\t\t\tif ( handleObj.selector ) {\r\n\t\t\t\t\t\thandlers.delegateCount--;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( special.remove ) {\r\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\r\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\r\n\t\t\tif ( origCount && !handlers.length ) {\r\n\t\t\t\tif ( !special.teardown ||\r\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\r\n\r\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdelete events[ type ];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Remove the expando if it's no longer used\r\n\t\tif ( jQuery.isEmptyObject( events ) ) {\r\n\t\t\tdelete elemData.handle;\r\n\r\n\t\t\t// removeData also checks for emptiness and clears the expando if empty\r\n\t\t\t// so use it instead of delete\r\n\t\t\tjQuery._removeData( elem, \"events\" );\r\n\t\t}\r\n\t},\r\n\r\n\ttrigger: function( event, data, elem, onlyHandlers ) {\r\n\t\tvar handle, ontype, cur,\r\n\t\t\tbubbleType, special, tmp, i,\r\n\t\t\teventPath = [ elem || document ],\r\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\r\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\r\n\r\n\t\tcur = tmp = elem = elem || document;\r\n\r\n\t\t// Don't do events on text and comment nodes\r\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\r\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\r\n\r\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\r\n\t\t\tnamespaces = type.split( \".\" );\r\n\t\t\ttype = namespaces.shift();\r\n\t\t\tnamespaces.sort();\r\n\t\t}\r\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\r\n\r\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\r\n\t\tevent = event[ jQuery.expando ] ?\r\n\t\t\tevent :\r\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\r\n\r\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\r\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\r\n\t\tevent.namespace = namespaces.join( \".\" );\r\n\t\tevent.rnamespace = event.namespace ?\r\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\r\n\t\t\tnull;\r\n\r\n\t\t// Clean up the event in case it is being reused\r\n\t\tevent.result = undefined;\r\n\t\tif ( !event.target ) {\r\n\t\t\tevent.target = elem;\r\n\t\t}\r\n\r\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\r\n\t\tdata = data == null ?\r\n\t\t\t[ event ] :\r\n\t\t\tjQuery.makeArray( data, [ event ] );\r\n\r\n\t\t// Allow special events to draw outside the lines\r\n\t\tspecial = jQuery.event.special[ type ] || {};\r\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\r\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\r\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\r\n\r\n\t\t\tbubbleType = special.delegateType || type;\r\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\r\n\t\t\t\tcur = cur.parentNode;\r\n\t\t\t}\r\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\r\n\t\t\t\teventPath.push( cur );\r\n\t\t\t\ttmp = cur;\r\n\t\t\t}\r\n\r\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\r\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\r\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Fire handlers on the event path\r\n\t\ti = 0;\r\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\r\n\r\n\t\t\tevent.type = i > 1 ?\r\n\t\t\t\tbubbleType :\r\n\t\t\t\tspecial.bindType || type;\r\n\r\n\t\t\t// jQuery handler\r\n\t\t\thandle = ( jQuery._data( cur, \"events\" ) || {} )[ event.type ] &&\r\n\t\t\t\tjQuery._data( cur, \"handle\" );\r\n\r\n\t\t\tif ( handle ) {\r\n\t\t\t\thandle.apply( cur, data );\r\n\t\t\t}\r\n\r\n\t\t\t// Native handler\r\n\t\t\thandle = ontype && cur[ ontype ];\r\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\r\n\t\t\t\tevent.result = handle.apply( cur, data );\r\n\t\t\t\tif ( event.result === false ) {\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tevent.type = type;\r\n\r\n\t\t// If nobody prevented the default action, do it now\r\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\r\n\r\n\t\t\tif (\r\n\t\t\t\t( !special._default ||\r\n\t\t\t\t special._default.apply( eventPath.pop(), data ) === false\r\n\t\t\t\t) && acceptData( elem )\r\n\t\t\t) {\r\n\r\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\r\n\t\t\t\t// Can't use an .isFunction() check here because IE6/7 fails that test.\r\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\r\n\t\t\t\tif ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {\r\n\r\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\r\n\t\t\t\t\ttmp = elem[ ontype ];\r\n\r\n\t\t\t\t\tif ( tmp ) {\r\n\t\t\t\t\t\telem[ ontype ] = null;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\r\n\t\t\t\t\tjQuery.event.triggered = type;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\telem[ type ]();\r\n\t\t\t\t\t} catch ( e ) {\r\n\r\n\t\t\t\t\t\t// IE<9 dies on focus/blur to hidden element (#1486,#12518)\r\n\t\t\t\t\t\t// only reproducible on winXP IE8 native, not IE9 in IE8 mode\r\n\t\t\t\t\t}\r\n\t\t\t\t\tjQuery.event.triggered = undefined;\r\n\r\n\t\t\t\t\tif ( tmp ) {\r\n\t\t\t\t\t\telem[ ontype ] = tmp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn event.result;\r\n\t},\r\n\r\n\tdispatch: function( event ) {\r\n\r\n\t\t// Make a writable jQuery.Event from the native event object\r\n\t\tevent = jQuery.event.fix( event );\r\n\r\n\t\tvar i, j, ret, matched, handleObj,\r\n\t\t\thandlerQueue = [],\r\n\t\t\targs = slice.call( arguments ),\r\n\t\t\thandlers = ( jQuery._data( this, \"events\" ) || {} )[ event.type ] || [],\r\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\r\n\r\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\r\n\t\targs[ 0 ] = event;\r\n\t\tevent.delegateTarget = this;\r\n\r\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\r\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Determine handlers\r\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\r\n\r\n\t\t// Run delegates first; they may want to stop propagation beneath us\r\n\t\ti = 0;\r\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\r\n\t\t\tevent.currentTarget = matched.elem;\r\n\r\n\t\t\tj = 0;\r\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\r\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\r\n\r\n\t\t\t\t// Triggered event must either 1) have no namespace, or 2) have namespace(s)\r\n\t\t\t\t// a subset or equal to those in the bound event (both can have no namespace).\r\n\t\t\t\tif ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {\r\n\r\n\t\t\t\t\tevent.handleObj = handleObj;\r\n\t\t\t\t\tevent.data = handleObj.data;\r\n\r\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\r\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\r\n\r\n\t\t\t\t\tif ( ret !== undefined ) {\r\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Call the postDispatch hook for the mapped type\r\n\t\tif ( special.postDispatch ) {\r\n\t\t\tspecial.postDispatch.call( this, event );\r\n\t\t}\r\n\r\n\t\treturn event.result;\r\n\t},\r\n\r\n\thandlers: function( event, handlers ) {\r\n\t\tvar i, matches, sel, handleObj,\r\n\t\t\thandlerQueue = [],\r\n\t\t\tdelegateCount = handlers.delegateCount,\r\n\t\t\tcur = event.target;\r\n\r\n\t\t// Support (at least): Chrome, IE9\r\n\t\t// Find delegate handlers\r\n\t\t// Black-hole SVG <use> instance trees (#13180)\r\n\t\t//\r\n\t\t// Support: Firefox<=42+\r\n\t\t// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)\r\n\t\tif ( delegateCount && cur.nodeType &&\r\n\t\t\t( event.type !== \"click\" || isNaN( event.button ) || event.button < 1 ) ) {\r\n\r\n\t\t\t/* jshint eqeqeq: false */\r\n\t\t\tfor ( ; cur != this; cur = cur.parentNode || this ) {\r\n\t\t\t\t/* jshint eqeqeq: true */\r\n\r\n\t\t\t\t// Don't check non-elements (#13208)\r\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\r\n\t\t\t\tif ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== \"click\" ) ) {\r\n\t\t\t\t\tmatches = [];\r\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\r\n\t\t\t\t\t\thandleObj = handlers[ i ];\r\n\r\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\r\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\r\n\r\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\r\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\r\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\r\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ( matches[ sel ] ) {\r\n\t\t\t\t\t\t\tmatches.push( handleObj );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( matches.length ) {\r\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matches } );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Add the remaining (directly-bound) handlers\r\n\t\tif ( delegateCount < handlers.length ) {\r\n\t\t\thandlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );\r\n\t\t}\r\n\r\n\t\treturn handlerQueue;\r\n\t},\r\n\r\n\tfix: function( event ) {\r\n\t\tif ( event[ jQuery.expando ] ) {\r\n\t\t\treturn event;\r\n\t\t}\r\n\r\n\t\t// Create a writable copy of the event object and normalize some properties\r\n\t\tvar i, prop, copy,\r\n\t\t\ttype = event.type,\r\n\t\t\toriginalEvent = event,\r\n\t\t\tfixHook = this.fixHooks[ type ];\r\n\r\n\t\tif ( !fixHook ) {\r\n\t\t\tthis.fixHooks[ type ] = fixHook =\r\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\r\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\r\n\t\t\t\t{};\r\n\t\t}\r\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\r\n\r\n\t\tevent = new jQuery.Event( originalEvent );\r\n\r\n\t\ti = copy.length;\r\n\t\twhile ( i-- ) {\r\n\t\t\tprop = copy[ i ];\r\n\t\t\tevent[ prop ] = originalEvent[ prop ];\r\n\t\t}\r\n\r\n\t\t// Support: IE<9\r\n\t\t// Fix target property (#1925)\r\n\t\tif ( !event.target ) {\r\n\t\t\tevent.target = originalEvent.srcElement || document;\r\n\t\t}\r\n\r\n\t\t// Support: Safari 6-8+\r\n\t\t// Target should not be a text node (#504, #13143)\r\n\t\tif ( event.target.nodeType === 3 ) {\r\n\t\t\tevent.target = event.target.parentNode;\r\n\t\t}\r\n\r\n\t\t// Support: IE<9\r\n\t\t// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)\r\n\t\tevent.metaKey = !!event.metaKey;\r\n\r\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\r\n\t},\r\n\r\n\t// Includes some event props shared by KeyEvent and MouseEvent\r\n\tprops: ( \"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase \" +\r\n\t\t\"metaKey relatedTarget shiftKey target timeStamp view which\" ).split( \" \" ),\r\n\r\n\tfixHooks: {},\r\n\r\n\tkeyHooks: {\r\n\t\tprops: \"char charCode key keyCode\".split( \" \" ),\r\n\t\tfilter: function( event, original ) {\r\n\r\n\t\t\t// Add which for key events\r\n\t\t\tif ( event.which == null ) {\r\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\r\n\t\t\t}\r\n\r\n\t\t\treturn event;\r\n\t\t}\r\n\t},\r\n\r\n\tmouseHooks: {\r\n\t\tprops: ( \"button buttons clientX clientY fromElement offsetX offsetY \" +\r\n\t\t\t\"pageX pageY screenX screenY toElement\" ).split( \" \" ),\r\n\t\tfilter: function( event, original ) {\r\n\t\t\tvar body, eventDoc, doc,\r\n\t\t\t\tbutton = original.button,\r\n\t\t\t\tfromElement = original.fromElement;\r\n\r\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\r\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\r\n\t\t\t\teventDoc = event.target.ownerDocument || document;\r\n\t\t\t\tdoc = eventDoc.documentElement;\r\n\t\t\t\tbody = eventDoc.body;\r\n\r\n\t\t\t\tevent.pageX = original.clientX +\r\n\t\t\t\t\t( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -\r\n\t\t\t\t\t( doc && doc.clientLeft || body && body.clientLeft || 0 );\r\n\t\t\t\tevent.pageY = original.clientY +\r\n\t\t\t\t\t( doc && doc.scrollTop || body && body.scrollTop || 0 ) -\r\n\t\t\t\t\t( doc && doc.clientTop || body && body.clientTop || 0 );\r\n\t\t\t}\r\n\r\n\t\t\t// Add relatedTarget, if necessary\r\n\t\t\tif ( !event.relatedTarget && fromElement ) {\r\n\t\t\t\tevent.relatedTarget = fromElement === event.target ?\r\n\t\t\t\t\toriginal.toElement :\r\n\t\t\t\t\tfromElement;\r\n\t\t\t}\r\n\r\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\r\n\t\t\t// Note: button is not normalized, so don't use it\r\n\t\t\tif ( !event.which && button !== undefined ) {\r\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\r\n\t\t\t}\r\n\r\n\t\t\treturn event;\r\n\t\t}\r\n\t},\r\n\r\n\tspecial: {\r\n\t\tload: {\r\n\r\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\r\n\t\t\tnoBubble: true\r\n\t\t},\r\n\t\tfocus: {\r\n\r\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\r\n\t\t\ttrigger: function() {\r\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tthis.focus();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t} catch ( e ) {\r\n\r\n\t\t\t\t\t\t// Support: IE<9\r\n\t\t\t\t\t\t// If we error on focus to hidden element (#1486, #12518),\r\n\t\t\t\t\t\t// let .trigger() run the handlers\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdelegateType: \"focusin\"\r\n\t\t},\r\n\t\tblur: {\r\n\t\t\ttrigger: function() {\r\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\r\n\t\t\t\t\tthis.blur();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdelegateType: \"focusout\"\r\n\t\t},\r\n\t\tclick: {\r\n\r\n\t\t\t// For checkbox, fire native event so checked state will be right\r\n\t\t\ttrigger: function() {\r\n\t\t\t\tif ( jQuery.nodeName( this, \"input\" ) && this.type === \"checkbox\" && this.click ) {\r\n\t\t\t\t\tthis.click();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\t// For cross-browser consistency, don't fire native .click() on links\r\n\t\t\t_default: function( event ) {\r\n\t\t\t\treturn jQuery.nodeName( event.target, \"a\" );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tbeforeunload: {\r\n\t\t\tpostDispatch: function( event ) {\r\n\r\n\t\t\t\t// Support: Firefox 20+\r\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\r\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\r\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// Piggyback on a donor event to simulate a different one\r\n\tsimulate: function( type, elem, event ) {\r\n\t\tvar e = jQuery.extend(\r\n\t\t\tnew jQuery.Event(),\r\n\t\t\tevent,\r\n\t\t\t{\r\n\t\t\t\ttype: type,\r\n\t\t\t\tisSimulated: true\r\n\r\n\t\t\t\t// Previously, `originalEvent: {}` was set here, so stopPropagation call\r\n\t\t\t\t// would not be triggered on donor event, since in our own\r\n\t\t\t\t// jQuery.event.stopPropagation function we had a check for existence of\r\n\t\t\t\t// originalEvent.stopPropagation method, so, consequently it would be a noop.\r\n\t\t\t\t//\r\n\t\t\t\t// Guard for simulated events was moved to jQuery.event.stopPropagation function\r\n\t\t\t\t// since `originalEvent` should point to the original event for the\r\n\t\t\t\t// constancy with other events and for more focused logic\r\n\t\t\t}\r\n\t\t);\r\n\r\n\t\tjQuery.event.trigger( e, null, elem );\r\n\r\n\t\tif ( e.isDefaultPrevented() ) {\r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\t}\r\n};\r\n\r\njQuery.removeEvent = document.removeEventListener ?\r\n\tfunction( elem, type, handle ) {\r\n\r\n\t\t// This \"if\" is needed for plain objects\r\n\t\tif ( elem.removeEventListener ) {\r\n\t\t\telem.removeEventListener( type, handle );\r\n\t\t}\r\n\t} :\r\n\tfunction( elem, type, handle ) {\r\n\t\tvar name = \"on\" + type;\r\n\r\n\t\tif ( elem.detachEvent ) {\r\n\r\n\t\t\t// #8545, #7054, preventing memory leaks for custom events in IE6-8\r\n\t\t\t// detachEvent needed property on element, by name of that event,\r\n\t\t\t// to properly expose it to GC\r\n\t\t\tif ( typeof elem[ name ] === \"undefined\" ) {\r\n\t\t\t\telem[ name ] = null;\r\n\t\t\t}\r\n\r\n\t\t\telem.detachEvent( name, handle );\r\n\t\t}\r\n\t};\r\n\r\njQuery.Event = function( src, props ) {\r\n\r\n\t// Allow instantiation without the 'new' keyword\r\n\tif ( !( this instanceof jQuery.Event ) ) {\r\n\t\treturn new jQuery.Event( src, props );\r\n\t}\r\n\r\n\t// Event object\r\n\tif ( src && src.type ) {\r\n\t\tthis.originalEvent = src;\r\n\t\tthis.type = src.type;\r\n\r\n\t\t// Events bubbling up the document may have been marked as prevented\r\n\t\t// by a handler lower down the tree; reflect the correct value.\r\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\r\n\t\t\t\tsrc.defaultPrevented === undefined &&\r\n\r\n\t\t\t\t// Support: IE < 9, Android < 4.0\r\n\t\t\t\tsrc.returnValue === false ?\r\n\t\t\treturnTrue :\r\n\t\t\treturnFalse;\r\n\r\n\t// Event type\r\n\t} else {\r\n\t\tthis.type = src;\r\n\t}\r\n\r\n\t// Put explicitly provided properties onto the event object\r\n\tif ( props ) {\r\n\t\tjQuery.extend( this, props );\r\n\t}\r\n\r\n\t// Create a timestamp if incoming event doesn't have one\r\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\r\n\r\n\t// Mark it as fixed\r\n\tthis[ jQuery.expando ] = true;\r\n};\r\n\r\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\r\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\r\njQuery.Event.prototype = {\r\n\tconstructor: jQuery.Event,\r\n\tisDefaultPrevented: returnFalse,\r\n\tisPropagationStopped: returnFalse,\r\n\tisImmediatePropagationStopped: returnFalse,\r\n\r\n\tpreventDefault: function() {\r\n\t\tvar e = this.originalEvent;\r\n\r\n\t\tthis.isDefaultPrevented = returnTrue;\r\n\t\tif ( !e ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// If preventDefault exists, run it on the original event\r\n\t\tif ( e.preventDefault ) {\r\n\t\t\te.preventDefault();\r\n\r\n\t\t// Support: IE\r\n\t\t// Otherwise set the returnValue property of the original event to false\r\n\t\t} else {\r\n\t\t\te.returnValue = false;\r\n\t\t}\r\n\t},\r\n\tstopPropagation: function() {\r\n\t\tvar e = this.originalEvent;\r\n\r\n\t\tthis.isPropagationStopped = returnTrue;\r\n\r\n\t\tif ( !e || this.isSimulated ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// If stopPropagation exists, run it on the original event\r\n\t\tif ( e.stopPropagation ) {\r\n\t\t\te.stopPropagation();\r\n\t\t}\r\n\r\n\t\t// Support: IE\r\n\t\t// Set the cancelBubble property of the original event to true\r\n\t\te.cancelBubble = true;\r\n\t},\r\n\tstopImmediatePropagation: function() {\r\n\t\tvar e = this.originalEvent;\r\n\r\n\t\tthis.isImmediatePropagationStopped = returnTrue;\r\n\r\n\t\tif ( e && e.stopImmediatePropagation ) {\r\n\t\t\te.stopImmediatePropagation();\r\n\t\t}\r\n\r\n\t\tthis.stopPropagation();\r\n\t}\r\n};\r\n\r\n// Create mouseenter/leave events using mouseover/out and event-time checks\r\n// so that event delegation works in jQuery.\r\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\r\n//\r\n// Support: Safari 7 only\r\n// Safari sends mouseenter too often; see:\r\n// https://code.google.com/p/chromium/issues/detail?id=470258\r\n// for the description of the bug (it existed in older Chrome versions as well).\r\njQuery.each( {\r\n\tmouseenter: \"mouseover\",\r\n\tmouseleave: \"mouseout\",\r\n\tpointerenter: \"pointerover\",\r\n\tpointerleave: \"pointerout\"\r\n}, function( orig, fix ) {\r\n\tjQuery.event.special[ orig ] = {\r\n\t\tdelegateType: fix,\r\n\t\tbindType: fix,\r\n\r\n\t\thandle: function( event ) {\r\n\t\t\tvar ret,\r\n\t\t\t\ttarget = this,\r\n\t\t\t\trelated = event.relatedTarget,\r\n\t\t\t\thandleObj = event.handleObj;\r\n\r\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\r\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\r\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\r\n\t\t\t\tevent.type = handleObj.origType;\r\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\r\n\t\t\t\tevent.type = fix;\r\n\t\t\t}\r\n\t\t\treturn ret;\r\n\t\t}\r\n\t};\r\n} );\r\n\r\n// IE submit delegation\r\nif ( !support.submit ) {\r\n\r\n\tjQuery.event.special.submit = {\r\n\t\tsetup: function() {\r\n\r\n\t\t\t// Only need this for delegated form submit events\r\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// Lazy-add a submit handler when a descendant form may potentially be submitted\r\n\t\t\tjQuery.event.add( this, \"click._submit keypress._submit\", function( e ) {\r\n\r\n\t\t\t\t// Node name check avoids a VML-related crash in IE (#9807)\r\n\t\t\t\tvar elem = e.target,\r\n\t\t\t\t\tform = jQuery.nodeName( elem, \"input\" ) || jQuery.nodeName( elem, \"button\" ) ?\r\n\r\n\t\t\t\t\t\t// Support: IE <=8\r\n\t\t\t\t\t\t// We use jQuery.prop instead of elem.form\r\n\t\t\t\t\t\t// to allow fixing the IE8 delegated submit issue (gh-2332)\r\n\t\t\t\t\t\t// by 3rd party polyfills/workarounds.\r\n\t\t\t\t\t\tjQuery.prop( elem, \"form\" ) :\r\n\t\t\t\t\t\tundefined;\r\n\r\n\t\t\t\tif ( form && !jQuery._data( form, \"submit\" ) ) {\r\n\t\t\t\t\tjQuery.event.add( form, \"submit._submit\", function( event ) {\r\n\t\t\t\t\t\tevent._submitBubble = true;\r\n\t\t\t\t\t} );\r\n\t\t\t\t\tjQuery._data( form, \"submit\", true );\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\r\n\t\t\t// return undefined since we don't need an event listener\r\n\t\t},\r\n\r\n\t\tpostDispatch: function( event ) {\r\n\r\n\t\t\t// If form was submitted by the user, bubble the event up the tree\r\n\t\t\tif ( event._submitBubble ) {\r\n\t\t\t\tdelete event._submitBubble;\r\n\t\t\t\tif ( this.parentNode && !event.isTrigger ) {\r\n\t\t\t\t\tjQuery.event.simulate( \"submit\", this.parentNode, event );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tteardown: function() {\r\n\r\n\t\t\t// Only need this for delegated form submit events\r\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// Remove delegated handlers; cleanData eventually reaps submit handlers attached above\r\n\t\t\tjQuery.event.remove( this, \"._submit\" );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// IE change delegation and checkbox/radio fix\r\nif ( !support.change ) {\r\n\r\n\tjQuery.event.special.change = {\r\n\r\n\t\tsetup: function() {\r\n\r\n\t\t\tif ( rformElems.test( this.nodeName ) ) {\r\n\r\n\t\t\t\t// IE doesn't fire change on a check/radio until blur; trigger it on click\r\n\t\t\t\t// after a propertychange. Eat the blur-change in special.change.handle.\r\n\t\t\t\t// This still fires onchange a second time for check/radio after blur.\r\n\t\t\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\r\n\t\t\t\t\tjQuery.event.add( this, \"propertychange._change\", function( event ) {\r\n\t\t\t\t\t\tif ( event.originalEvent.propertyName === \"checked\" ) {\r\n\t\t\t\t\t\t\tthis._justChanged = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} );\r\n\t\t\t\t\tjQuery.event.add( this, \"click._change\", function( event ) {\r\n\t\t\t\t\t\tif ( this._justChanged && !event.isTrigger ) {\r\n\t\t\t\t\t\t\tthis._justChanged = false;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Allow triggered, simulated change events (#11500)\r\n\t\t\t\t\t\tjQuery.event.simulate( \"change\", this, event );\r\n\t\t\t\t\t} );\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// Delegated event; lazy-add a change handler on descendant inputs\r\n\t\t\tjQuery.event.add( this, \"beforeactivate._change\", function( e ) {\r\n\t\t\t\tvar elem = e.target;\r\n\r\n\t\t\t\tif ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, \"change\" ) ) {\r\n\t\t\t\t\tjQuery.event.add( elem, \"change._change\", function( event ) {\r\n\t\t\t\t\t\tif ( this.parentNode && !event.isSimulated && !event.isTrigger ) {\r\n\t\t\t\t\t\t\tjQuery.event.simulate( \"change\", this.parentNode, event );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} );\r\n\t\t\t\t\tjQuery._data( elem, \"change\", true );\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\t\t},\r\n\r\n\t\thandle: function( event ) {\r\n\t\t\tvar elem = event.target;\r\n\r\n\t\t\t// Swallow native change events from checkbox/radio, we already triggered them above\r\n\t\t\tif ( this !== elem || event.isSimulated || event.isTrigger ||\r\n\t\t\t\t( elem.type !== \"radio\" && elem.type !== \"checkbox\" ) ) {\r\n\r\n\t\t\t\treturn event.handleObj.handler.apply( this, arguments );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tteardown: function() {\r\n\t\t\tjQuery.event.remove( this, \"._change\" );\r\n\r\n\t\t\treturn !rformElems.test( this.nodeName );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// Support: Firefox\r\n// Firefox doesn't have focus(in | out) events\r\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\r\n//\r\n// Support: Chrome, Safari\r\n// focus(in | out) events fire after focus & blur events,\r\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\r\n// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857\r\nif ( !support.focusin ) {\r\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\r\n\r\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\r\n\t\tvar handler = function( event ) {\r\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\r\n\t\t};\r\n\r\n\t\tjQuery.event.special[ fix ] = {\r\n\t\t\tsetup: function() {\r\n\t\t\t\tvar doc = this.ownerDocument || this,\r\n\t\t\t\t\tattaches = jQuery._data( doc, fix );\r\n\r\n\t\t\t\tif ( !attaches ) {\r\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\r\n\t\t\t\t}\r\n\t\t\t\tjQuery._data( doc, fix, ( attaches || 0 ) + 1 );\r\n\t\t\t},\r\n\t\t\tteardown: function() {\r\n\t\t\t\tvar doc = this.ownerDocument || this,\r\n\t\t\t\t\tattaches = jQuery._data( doc, fix ) - 1;\r\n\r\n\t\t\t\tif ( !attaches ) {\r\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\r\n\t\t\t\t\tjQuery._removeData( doc, fix );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tjQuery._data( doc, fix, attaches );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t} );\r\n}\r\n\r\njQuery.fn.extend( {\r\n\r\n\ton: function( types, selector, data, fn ) {\r\n\t\treturn on( this, types, selector, data, fn );\r\n\t},\r\n\tone: function( types, selector, data, fn ) {\r\n\t\treturn on( this, types, selector, data, fn, 1 );\r\n\t},\r\n\toff: function( types, selector, fn ) {\r\n\t\tvar handleObj, type;\r\n\t\tif ( types && types.preventDefault && types.handleObj ) {\r\n\r\n\t\t\t// ( event ) dispatched jQuery.Event\r\n\t\t\thandleObj = types.handleObj;\r\n\t\t\tjQuery( types.delegateTarget ).off(\r\n\t\t\t\thandleObj.namespace ?\r\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\r\n\t\t\t\t\thandleObj.origType,\r\n\t\t\t\thandleObj.selector,\r\n\t\t\t\thandleObj.handler\r\n\t\t\t);\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif ( typeof types === \"object\" ) {\r\n\r\n\t\t\t// ( types-object [, selector] )\r\n\t\t\tfor ( type in types ) {\r\n\t\t\t\tthis.off( type, selector, types[ type ] );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif ( selector === false || typeof selector === \"function\" ) {\r\n\r\n\t\t\t// ( types [, fn] )\r\n\t\t\tfn = selector;\r\n\t\t\tselector = undefined;\r\n\t\t}\r\n\t\tif ( fn === false ) {\r\n\t\t\tfn = returnFalse;\r\n\t\t}\r\n\t\treturn this.each( function() {\r\n\t\t\tjQuery.event.remove( this, types, fn, selector );\r\n\t\t} );\r\n\t},\r\n\r\n\ttrigger: function( type, data ) {\r\n\t\treturn this.each( function() {\r\n\t\t\tjQuery.event.trigger( type, data, this );\r\n\t\t} );\r\n\t},\r\n\ttriggerHandler: function( type, data ) {\r\n\t\tvar elem = this[ 0 ];\r\n\t\tif ( elem ) {\r\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\r\n\t\t}\r\n\t}\r\n} );\r\n\r\n\r\nvar rinlinejQuery = / jQuery\\d+=\"(?:null|\\d+)\"/g,\r\n\trnoshimcache = new RegExp( \"<(?:\" + nodeNames + \")[\\\\s/>]\", \"i\" ),\r\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:-]+)[^>]*)\\/>/gi,\r\n\r\n\t// Support: IE 10-11, Edge 10240+\r\n\t// In IE/Edge using regex groups here causes severe slowdowns.\r\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\r\n\trnoInnerhtml = /<script|<style|<link/i,\r\n\r\n\t// checked=\"checked\" or checked\r\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\r\n\trscriptTypeMasked = /^true\\/(.*)/,\r\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,\r\n\tsafeFragment = createSafeFragment( document ),\r\n\tfragmentDiv = safeFragment.appendChild( document.createElement( \"div\" ) );\r\n\r\n// Support: IE<8\r\n// Manipulating tables requires a tbody\r\nfunction manipulationTarget( elem, content ) {\r\n\treturn jQuery.nodeName( elem, \"table\" ) &&\r\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\r\n\r\n\t\telem.getElementsByTagName( \"tbody\" )[ 0 ] ||\r\n\t\t\telem.appendChild( elem.ownerDocument.createElement( \"tbody\" ) ) :\r\n\t\telem;\r\n}\r\n\r\n// Replace/restore the type attribute of script elements for safe DOM manipulation\r\nfunction disableScript( elem ) {\r\n\telem.type = ( jQuery.find.attr( elem, \"type\" ) !== null ) + \"/\" + elem.type;\r\n\treturn elem;\r\n}\r\nfunction restoreScript( elem ) {\r\n\tvar match = rscriptTypeMasked.exec( elem.type );\r\n\tif ( match ) {\r\n\t\telem.type = match[ 1 ];\r\n\t} else {\r\n\t\telem.removeAttribute( \"type\" );\r\n\t}\r\n\treturn elem;\r\n}\r\n\r\nfunction cloneCopyEvent( src, dest ) {\r\n\tif ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar type, i, l,\r\n\t\toldData = jQuery._data( src ),\r\n\t\tcurData = jQuery._data( dest, oldData ),\r\n\t\tevents = oldData.events;\r\n\r\n\tif ( events ) {\r\n\t\tdelete curData.handle;\r\n\t\tcurData.events = {};\r\n\r\n\t\tfor ( type in events ) {\r\n\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\r\n\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// make the cloned public data object a copy from the original\r\n\tif ( curData.data ) {\r\n\t\tcurData.data = jQuery.extend( {}, curData.data );\r\n\t}\r\n}\r\n\r\nfunction fixCloneNodeIssues( src, dest ) {\r\n\tvar nodeName, e, data;\r\n\r\n\t// We do not need to do anything for non-Elements\r\n\tif ( dest.nodeType !== 1 ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tnodeName = dest.nodeName.toLowerCase();\r\n\r\n\t// IE6-8 copies events bound via attachEvent when using cloneNode.\r\n\tif ( !support.noCloneEvent && dest[ jQuery.expando ] ) {\r\n\t\tdata = jQuery._data( dest );\r\n\r\n\t\tfor ( e in data.events ) {\r\n\t\t\tjQuery.removeEvent( dest, e, data.handle );\r\n\t\t}\r\n\r\n\t\t// Event data gets referenced instead of copied if the expando gets copied too\r\n\t\tdest.removeAttribute( jQuery.expando );\r\n\t}\r\n\r\n\t// IE blanks contents when cloning scripts, and tries to evaluate newly-set text\r\n\tif ( nodeName === \"script\" && dest.text !== src.text ) {\r\n\t\tdisableScript( dest ).text = src.text;\r\n\t\trestoreScript( dest );\r\n\r\n\t// IE6-10 improperly clones children of object elements using classid.\r\n\t// IE10 throws NoModificationAllowedError if parent is null, #12132.\r\n\t} else if ( nodeName === \"object\" ) {\r\n\t\tif ( dest.parentNode ) {\r\n\t\t\tdest.outerHTML = src.outerHTML;\r\n\t\t}\r\n\r\n\t\t// This path appears unavoidable for IE9. When cloning an object\r\n\t\t// element in IE9, the outerHTML strategy above is not sufficient.\r\n\t\t// If the src has innerHTML and the destination does not,\r\n\t\t// copy the src.innerHTML into the dest.innerHTML. #10324\r\n\t\tif ( support.html5Clone && ( src.innerHTML && !jQuery.trim( dest.innerHTML ) ) ) {\r\n\t\t\tdest.innerHTML = src.innerHTML;\r\n\t\t}\r\n\r\n\t} else if ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\r\n\r\n\t\t// IE6-8 fails to persist the checked state of a cloned checkbox\r\n\t\t// or radio button. Worse, IE6-7 fail to give the cloned element\r\n\t\t// a checked appearance if the defaultChecked value isn't also set\r\n\r\n\t\tdest.defaultChecked = dest.checked = src.checked;\r\n\r\n\t\t// IE6-7 get confused and end up setting the value of a cloned\r\n\t\t// checkbox/radio button to an empty string instead of \"on\"\r\n\t\tif ( dest.value !== src.value ) {\r\n\t\t\tdest.value = src.value;\r\n\t\t}\r\n\r\n\t// IE6-8 fails to return the selected option to the default selected\r\n\t// state when cloning options\r\n\t} else if ( nodeName === \"option\" ) {\r\n\t\tdest.defaultSelected = dest.selected = src.defaultSelected;\r\n\r\n\t// IE6-8 fails to set the defaultValue to the correct value when\r\n\t// cloning other types of input fields\r\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\r\n\t\tdest.defaultValue = src.defaultValue;\r\n\t}\r\n}\r\n\r\nfunction domManip( collection, args, callback, ignored ) {\r\n\r\n\t// Flatten any nested arrays\r\n\targs = concat.apply( [], args );\r\n\r\n\tvar first, node, hasScripts,\r\n\t\tscripts, doc, fragment,\r\n\t\ti = 0,\r\n\t\tl = collection.length,\r\n\t\tiNoClone = l - 1,\r\n\t\tvalue = args[ 0 ],\r\n\t\tisFunction = jQuery.isFunction( value );\r\n\r\n\t// We can't cloneNode fragments that contain checked, in WebKit\r\n\tif ( isFunction ||\r\n\t\t\t( l > 1 && typeof value === \"string\" &&\r\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\r\n\t\treturn collection.each( function( index ) {\r\n\t\t\tvar self = collection.eq( index );\r\n\t\t\tif ( isFunction ) {\r\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\r\n\t\t\t}\r\n\t\t\tdomManip( self, args, callback, ignored );\r\n\t\t} );\r\n\t}\r\n\r\n\tif ( l ) {\r\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\r\n\t\tfirst = fragment.firstChild;\r\n\r\n\t\tif ( fragment.childNodes.length === 1 ) {\r\n\t\t\tfragment = first;\r\n\t\t}\r\n\r\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\r\n\t\tif ( first || ignored ) {\r\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\r\n\t\t\thasScripts = scripts.length;\r\n\r\n\t\t\t// Use the original fragment for the last item\r\n\t\t\t// instead of the first because it can end up\r\n\t\t\t// being emptied incorrectly in certain situations (#8070).\r\n\t\t\tfor ( ; i < l; i++ ) {\r\n\t\t\t\tnode = fragment;\r\n\r\n\t\t\t\tif ( i !== iNoClone ) {\r\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\r\n\r\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\r\n\t\t\t\t\tif ( hasScripts ) {\r\n\r\n\t\t\t\t\t\t// Support: Android<4.1, PhantomJS<2\r\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\r\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcallback.call( collection[ i ], node, i );\r\n\t\t\t}\r\n\r\n\t\t\tif ( hasScripts ) {\r\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\r\n\r\n\t\t\t\t// Reenable scripts\r\n\t\t\t\tjQuery.map( scripts, restoreScript );\r\n\r\n\t\t\t\t// Evaluate executable scripts on first document insertion\r\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\r\n\t\t\t\t\tnode = scripts[ i ];\r\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\r\n\t\t\t\t\t\t!jQuery._data( node, \"globalEval\" ) &&\r\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\r\n\r\n\t\t\t\t\t\tif ( node.src ) {\r\n\r\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\r\n\t\t\t\t\t\t\tif ( jQuery._evalUrl ) {\r\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tjQuery.globalEval(\r\n\t\t\t\t\t\t\t\t( node.text || node.textContent || node.innerHTML || \"\" )\r\n\t\t\t\t\t\t\t\t\t.replace( rcleanScript, \"\" )\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Fix #11809: Avoid leaking memory\r\n\t\t\tfragment = first = null;\r\n\t\t}\r\n\t}\r\n\r\n\treturn collection;\r\n}\r\n\r\nfunction remove( elem, selector, keepData ) {\r\n\tvar node,\r\n\t\telems = selector ? jQuery.filter( selector, elem ) : elem,\r\n\t\ti = 0;\r\n\r\n\tfor ( ; ( node = elems[ i ] ) != null; i++ ) {\r\n\r\n\t\tif ( !keepData && node.nodeType === 1 ) {\r\n\t\t\tjQuery.cleanData( getAll( node ) );\r\n\t\t}\r\n\r\n\t\tif ( node.parentNode ) {\r\n\t\t\tif ( keepData && jQuery.contains( node.ownerDocument, node ) ) {\r\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\r\n\t\t\t}\r\n\t\t\tnode.parentNode.removeChild( node );\r\n\t\t}\r\n\t}\r\n\r\n\treturn elem;\r\n}\r\n\r\njQuery.extend( {\r\n\thtmlPrefilter: function( html ) {\r\n\t\treturn html.replace( rxhtmlTag, \"<$1></$2>\" );\r\n\t},\r\n\r\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\r\n\t\tvar destElements, node, clone, i, srcElements,\r\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\r\n\r\n\t\tif ( support.html5Clone || jQuery.isXMLDoc( elem ) ||\r\n\t\t\t!rnoshimcache.test( \"<\" + elem.nodeName + \">\" ) ) {\r\n\r\n\t\t\tclone = elem.cloneNode( true );\r\n\r\n\t\t// IE<=8 does not properly clone detached, unknown element nodes\r\n\t\t} else {\r\n\t\t\tfragmentDiv.innerHTML = elem.outerHTML;\r\n\t\t\tfragmentDiv.removeChild( clone = fragmentDiv.firstChild );\r\n\t\t}\r\n\r\n\t\tif ( ( !support.noCloneEvent || !support.noCloneChecked ) &&\r\n\t\t\t\t( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) {\r\n\r\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\r\n\t\t\tdestElements = getAll( clone );\r\n\t\t\tsrcElements = getAll( elem );\r\n\r\n\t\t\t// Fix all IE cloning issues\r\n\t\t\tfor ( i = 0; ( node = srcElements[ i ] ) != null; ++i ) {\r\n\r\n\t\t\t\t// Ensure that the destination node is not null; Fixes #9587\r\n\t\t\t\tif ( destElements[ i ] ) {\r\n\t\t\t\t\tfixCloneNodeIssues( node, destElements[ i ] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Copy the events from the original to the clone\r\n\t\tif ( dataAndEvents ) {\r\n\t\t\tif ( deepDataAndEvents ) {\r\n\t\t\t\tsrcElements = srcElements || getAll( elem );\r\n\t\t\t\tdestElements = destElements || getAll( clone );\r\n\r\n\t\t\t\tfor ( i = 0; ( node = srcElements[ i ] ) != null; i++ ) {\r\n\t\t\t\t\tcloneCopyEvent( node, destElements[ i ] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcloneCopyEvent( elem, clone );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Preserve script evaluation history\r\n\t\tdestElements = getAll( clone, \"script\" );\r\n\t\tif ( destElements.length > 0 ) {\r\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\r\n\t\t}\r\n\r\n\t\tdestElements = srcElements = node = null;\r\n\r\n\t\t// Return the cloned set\r\n\t\treturn clone;\r\n\t},\r\n\r\n\tcleanData: function( elems, /* internal */ forceAcceptData ) {\r\n\t\tvar elem, type, id, data,\r\n\t\t\ti = 0,\r\n\t\t\tinternalKey = jQuery.expando,\r\n\t\t\tcache = jQuery.cache,\r\n\t\t\tattributes = support.attributes,\r\n\t\t\tspecial = jQuery.event.special;\r\n\r\n\t\tfor ( ; ( elem = elems[ i ] ) != null; i++ ) {\r\n\t\t\tif ( forceAcceptData || acceptData( elem ) ) {\r\n\r\n\t\t\t\tid = elem[ internalKey ];\r\n\t\t\t\tdata = id && cache[ id ];\r\n\r\n\t\t\t\tif ( data ) {\r\n\t\t\t\t\tif ( data.events ) {\r\n\t\t\t\t\t\tfor ( type in data.events ) {\r\n\t\t\t\t\t\t\tif ( special[ type ] ) {\r\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\r\n\r\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Remove cache only if it was not already removed by jQuery.event.remove\r\n\t\t\t\t\tif ( cache[ id ] ) {\r\n\r\n\t\t\t\t\t\tdelete cache[ id ];\r\n\r\n\t\t\t\t\t\t// Support: IE<9\r\n\t\t\t\t\t\t// IE does not allow us to delete expando properties from nodes\r\n\t\t\t\t\t\t// IE creates expando attributes along with the property\r\n\t\t\t\t\t\t// IE does not have a removeAttribute function on Document nodes\r\n\t\t\t\t\t\tif ( !attributes && typeof elem.removeAttribute !== \"undefined\" ) {\r\n\t\t\t\t\t\t\telem.removeAttribute( internalKey );\r\n\r\n\t\t\t\t\t\t// Webkit & Blink performance suffers when deleting properties\r\n\t\t\t\t\t\t// from DOM nodes, so set to undefined instead\r\n\t\t\t\t\t\t// https://code.google.com/p/chromium/issues/detail?id=378607\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\telem[ internalKey ] = undefined;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tdeletedIds.push( id );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n} );\r\n\r\njQuery.fn.extend( {\r\n\r\n\t// Keep domManip exposed until 3.0 (gh-2225)\r\n\tdomManip: domManip,\r\n\r\n\tdetach: function( selector ) {\r\n\t\treturn remove( this, selector, true );\r\n\t},\r\n\r\n\tremove: function( selector ) {\r\n\t\treturn remove( this, selector );\r\n\t},\r\n\r\n\ttext: function( value ) {\r\n\t\treturn access( this, function( value ) {\r\n\t\t\treturn value === undefined ?\r\n\t\t\t\tjQuery.text( this ) :\r\n\t\t\t\tthis.empty().append(\r\n\t\t\t\t\t( this[ 0 ] && this[ 0 ].ownerDocument || document ).createTextNode( value )\r\n\t\t\t\t);\r\n\t\t}, null, value, arguments.length );\r\n\t},\r\n\r\n\tappend: function() {\r\n\t\treturn domManip( this, arguments, function( elem ) {\r\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\r\n\t\t\t\tvar target = manipulationTarget( this, elem );\r\n\t\t\t\ttarget.appendChild( elem );\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\tprepend: function() {\r\n\t\treturn domManip( this, arguments, function( elem ) {\r\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\r\n\t\t\t\tvar target = manipulationTarget( this, elem );\r\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\tbefore: function() {\r\n\t\treturn domManip( this, arguments, function( elem ) {\r\n\t\t\tif ( this.parentNode ) {\r\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\tafter: function() {\r\n\t\treturn domManip( this, arguments, function( elem ) {\r\n\t\t\tif ( this.parentNode ) {\r\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\tempty: function() {\r\n\t\tvar elem,\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\r\n\r\n\t\t\t// Remove element nodes and prevent memory leaks\r\n\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\r\n\t\t\t}\r\n\r\n\t\t\t// Remove any remaining nodes\r\n\t\t\twhile ( elem.firstChild ) {\r\n\t\t\t\telem.removeChild( elem.firstChild );\r\n\t\t\t}\r\n\r\n\t\t\t// If this is a select, ensure that it displays empty (#12336)\r\n\t\t\t// Support: IE<9\r\n\t\t\tif ( elem.options && jQuery.nodeName( elem, \"select\" ) ) {\r\n\t\t\t\telem.options.length = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\r\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\r\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\r\n\r\n\t\treturn this.map( function() {\r\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\r\n\t\t} );\r\n\t},\r\n\r\n\thtml: function( value ) {\r\n\t\treturn access( this, function( value ) {\r\n\t\t\tvar elem = this[ 0 ] || {},\r\n\t\t\t\ti = 0,\r\n\t\t\t\tl = this.length;\r\n\r\n\t\t\tif ( value === undefined ) {\r\n\t\t\t\treturn elem.nodeType === 1 ?\r\n\t\t\t\t\telem.innerHTML.replace( rinlinejQuery, \"\" ) :\r\n\t\t\t\t\tundefined;\r\n\t\t\t}\r\n\r\n\t\t\t// See if we can take a shortcut and just use innerHTML\r\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\r\n\t\t\t\t( support.htmlSerialize || !rnoshimcache.test( value ) ) &&\r\n\t\t\t\t( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&\r\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\r\n\r\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor ( ; i < l; i++ ) {\r\n\r\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\r\n\t\t\t\t\t\telem = this[ i ] || {};\r\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\r\n\t\t\t\t\t\t\telem.innerHTML = value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telem = 0;\r\n\r\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\r\n\t\t\t\t} catch ( e ) {}\r\n\t\t\t}\r\n\r\n\t\t\tif ( elem ) {\r\n\t\t\t\tthis.empty().append( value );\r\n\t\t\t}\r\n\t\t}, null, value, arguments.length );\r\n\t},\r\n\r\n\treplaceWith: function() {\r\n\t\tvar ignored = [];\r\n\r\n\t\t// Make the changes, replacing each non-ignored context element with the new content\r\n\t\treturn domManip( this, arguments, function( elem ) {\r\n\t\t\tvar parent = this.parentNode;\r\n\r\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\r\n\t\t\t\tjQuery.cleanData( getAll( this ) );\r\n\t\t\t\tif ( parent ) {\r\n\t\t\t\t\tparent.replaceChild( elem, this );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// Force callback invocation\r\n\t\t}, ignored );\r\n\t}\r\n} );\r\n\r\njQuery.each( {\r\n\tappendTo: \"append\",\r\n\tprependTo: \"prepend\",\r\n\tinsertBefore: \"before\",\r\n\tinsertAfter: \"after\",\r\n\treplaceAll: \"replaceWith\"\r\n}, function( name, original ) {\r\n\tjQuery.fn[ name ] = function( selector ) {\r\n\t\tvar elems,\r\n\t\t\ti = 0,\r\n\t\t\tret = [],\r\n\t\t\tinsert = jQuery( selector ),\r\n\t\t\tlast = insert.length - 1;\r\n\r\n\t\tfor ( ; i <= last; i++ ) {\r\n\t\t\telems = i === last ? this : this.clone( true );\r\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\r\n\r\n\t\t\t// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()\r\n\t\t\tpush.apply( ret, elems.get() );\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( ret );\r\n\t};\r\n} );\r\n\r\n\r\nvar iframe,\r\n\telemdisplay = {\r\n\r\n\t\t// Support: Firefox\r\n\t\t// We have to pre-define these values for FF (#10227)\r\n\t\tHTML: \"block\",\r\n\t\tBODY: \"block\"\r\n\t};\r\n\r\n/**\r\n * Retrieve the actual display of a element\r\n * @param {String} name nodeName of the element\r\n * @param {Object} doc Document object\r\n */\r\n\r\n// Called only from within defaultDisplay\r\nfunction actualDisplay( name, doc ) {\r\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\r\n\r\n\t\tdisplay = jQuery.css( elem[ 0 ], \"display\" );\r\n\r\n\t// We don't have any data stored on the element,\r\n\t// so use \"detach\" method as fast way to get rid of the element\r\n\telem.detach();\r\n\r\n\treturn display;\r\n}\r\n\r\n/**\r\n * Try to determine the default display value of an element\r\n * @param {String} nodeName\r\n */\r\nfunction defaultDisplay( nodeName ) {\r\n\tvar doc = document,\r\n\t\tdisplay = elemdisplay[ nodeName ];\r\n\r\n\tif ( !display ) {\r\n\t\tdisplay = actualDisplay( nodeName, doc );\r\n\r\n\t\t// If the simple way fails, read from inside an iframe\r\n\t\tif ( display === \"none\" || !display ) {\r\n\r\n\t\t\t// Use the already-created iframe if possible\r\n\t\t\tiframe = ( iframe || jQuery( \"<iframe frameborder='0' width='0' height='0'/>\" ) )\r\n\t\t\t\t.appendTo( doc.documentElement );\r\n\r\n\t\t\t// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse\r\n\t\t\tdoc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;\r\n\r\n\t\t\t// Support: IE\r\n\t\t\tdoc.write();\r\n\t\t\tdoc.close();\r\n\r\n\t\t\tdisplay = actualDisplay( nodeName, doc );\r\n\t\t\tiframe.detach();\r\n\t\t}\r\n\r\n\t\t// Store the correct default display\r\n\t\telemdisplay[ nodeName ] = display;\r\n\t}\r\n\r\n\treturn display;\r\n}\r\nvar rmargin = ( /^margin/ );\r\n\r\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\r\n\r\nvar swap = function( elem, options, callback, args ) {\r\n\tvar ret, name,\r\n\t\told = {};\r\n\r\n\t// Remember the old values, and insert the new ones\r\n\tfor ( name in options ) {\r\n\t\told[ name ] = elem.style[ name ];\r\n\t\telem.style[ name ] = options[ name ];\r\n\t}\r\n\r\n\tret = callback.apply( elem, args || [] );\r\n\r\n\t// Revert the old values\r\n\tfor ( name in options ) {\r\n\t\telem.style[ name ] = old[ name ];\r\n\t}\r\n\r\n\treturn ret;\r\n};\r\n\r\n\r\nvar documentElement = document.documentElement;\r\n\r\n\r\n\r\n( function() {\r\n\tvar pixelPositionVal, pixelMarginRightVal, boxSizingReliableVal,\r\n\t\treliableHiddenOffsetsVal, reliableMarginRightVal, reliableMarginLeftVal,\r\n\t\tcontainer = document.createElement( \"div\" ),\r\n\t\tdiv = document.createElement( \"div\" );\r\n\r\n\t// Finish early in limited (non-browser) environments\r\n\tif ( !div.style ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdiv.style.cssText = \"float:left;opacity:.5\";\r\n\r\n\t// Support: IE<9\r\n\t// Make sure that element opacity exists (as opposed to filter)\r\n\tsupport.opacity = div.style.opacity === \"0.5\";\r\n\r\n\t// Verify style float existence\r\n\t// (IE uses styleFloat instead of cssFloat)\r\n\tsupport.cssFloat = !!div.style.cssFloat;\r\n\r\n\tdiv.style.backgroundClip = \"content-box\";\r\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\r\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\r\n\r\n\tcontainer = document.createElement( \"div\" );\r\n\tcontainer.style.cssText = \"border:0;width:8px;height:0;top:0;left:-9999px;\" +\r\n\t\t\"padding:0;margin-top:1px;position:absolute\";\r\n\tdiv.innerHTML = \"\";\r\n\tcontainer.appendChild( div );\r\n\r\n\t// Support: Firefox<29, Android 2.3\r\n\t// Vendor-prefix box-sizing\r\n\tsupport.boxSizing = div.style.boxSizing === \"\" || div.style.MozBoxSizing === \"\" ||\r\n\t\tdiv.style.WebkitBoxSizing === \"\";\r\n\r\n\tjQuery.extend( support, {\r\n\t\treliableHiddenOffsets: function() {\r\n\t\t\tif ( pixelPositionVal == null ) {\r\n\t\t\t\tcomputeStyleTests();\r\n\t\t\t}\r\n\t\t\treturn reliableHiddenOffsetsVal;\r\n\t\t},\r\n\r\n\t\tboxSizingReliable: function() {\r\n\r\n\t\t\t// We're checking for pixelPositionVal here instead of boxSizingReliableVal\r\n\t\t\t// since that compresses better and they're computed together anyway.\r\n\t\t\tif ( pixelPositionVal == null ) {\r\n\t\t\t\tcomputeStyleTests();\r\n\t\t\t}\r\n\t\t\treturn boxSizingReliableVal;\r\n\t\t},\r\n\r\n\t\tpixelMarginRight: function() {\r\n\r\n\t\t\t// Support: Android 4.0-4.3\r\n\t\t\tif ( pixelPositionVal == null ) {\r\n\t\t\t\tcomputeStyleTests();\r\n\t\t\t}\r\n\t\t\treturn pixelMarginRightVal;\r\n\t\t},\r\n\r\n\t\tpixelPosition: function() {\r\n\t\t\tif ( pixelPositionVal == null ) {\r\n\t\t\t\tcomputeStyleTests();\r\n\t\t\t}\r\n\t\t\treturn pixelPositionVal;\r\n\t\t},\r\n\r\n\t\treliableMarginRight: function() {\r\n\r\n\t\t\t// Support: Android 2.3\r\n\t\t\tif ( pixelPositionVal == null ) {\r\n\t\t\t\tcomputeStyleTests();\r\n\t\t\t}\r\n\t\t\treturn reliableMarginRightVal;\r\n\t\t},\r\n\r\n\t\treliableMarginLeft: function() {\r\n\r\n\t\t\t// Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37\r\n\t\t\tif ( pixelPositionVal == null ) {\r\n\t\t\t\tcomputeStyleTests();\r\n\t\t\t}\r\n\t\t\treturn reliableMarginLeftVal;\r\n\t\t}\r\n\t} );\r\n\r\n\tfunction computeStyleTests() {\r\n\t\tvar contents, divStyle,\r\n\t\t\tdocumentElement = document.documentElement;\r\n\r\n\t\t// Setup\r\n\t\tdocumentElement.appendChild( container );\r\n\r\n\t\tdiv.style.cssText =\r\n\r\n\t\t\t// Support: Android 2.3\r\n\t\t\t// Vendor-prefix box-sizing\r\n\t\t\t\"-webkit-box-sizing:border-box;box-sizing:border-box;\" +\r\n\t\t\t\"position:relative;display:block;\" +\r\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\r\n\t\t\t\"top:1%;width:50%\";\r\n\r\n\t\t// Support: IE<9\r\n\t\t// Assume reasonable values in the absence of getComputedStyle\r\n\t\tpixelPositionVal = boxSizingReliableVal = reliableMarginLeftVal = false;\r\n\t\tpixelMarginRightVal = reliableMarginRightVal = true;\r\n\r\n\t\t// Check for getComputedStyle so that this code is not run in IE<9.\r\n\t\tif ( window.getComputedStyle ) {\r\n\t\t\tdivStyle = window.getComputedStyle( div );\r\n\t\t\tpixelPositionVal = ( divStyle || {} ).top !== \"1%\";\r\n\t\t\treliableMarginLeftVal = ( divStyle || {} ).marginLeft === \"2px\";\r\n\t\t\tboxSizingReliableVal = ( divStyle || { width: \"4px\" } ).width === \"4px\";\r\n\r\n\t\t\t// Support: Android 4.0 - 4.3 only\r\n\t\t\t// Some styles come back with percentage values, even though they shouldn't\r\n\t\t\tdiv.style.marginRight = \"50%\";\r\n\t\t\tpixelMarginRightVal = ( divStyle || { marginRight: \"4px\" } ).marginRight === \"4px\";\r\n\r\n\t\t\t// Support: Android 2.3 only\r\n\t\t\t// Div with explicit width and no margin-right incorrectly\r\n\t\t\t// gets computed margin-right based on width of container (#3333)\r\n\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\r\n\t\t\tcontents = div.appendChild( document.createElement( \"div\" ) );\r\n\r\n\t\t\t// Reset CSS: box-sizing; display; margin; border; padding\r\n\t\t\tcontents.style.cssText = div.style.cssText =\r\n\r\n\t\t\t\t// Support: Android 2.3\r\n\t\t\t\t// Vendor-prefix box-sizing\r\n\t\t\t\t\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;\" +\r\n\t\t\t\t\"box-sizing:content-box;display:block;margin:0;border:0;padding:0\";\r\n\t\t\tcontents.style.marginRight = contents.style.width = \"0\";\r\n\t\t\tdiv.style.width = \"1px\";\r\n\r\n\t\t\treliableMarginRightVal =\r\n\t\t\t\t!parseFloat( ( window.getComputedStyle( contents ) || {} ).marginRight );\r\n\r\n\t\t\tdiv.removeChild( contents );\r\n\t\t}\r\n\r\n\t\t// Support: IE6-8\r\n\t\t// First check that getClientRects works as expected\r\n\t\t// Check if table cells still have offsetWidth/Height when they are set\r\n\t\t// to display:none and there are still other visible table cells in a\r\n\t\t// table row; if so, offsetWidth/Height are not reliable for use when\r\n\t\t// determining if an element has been hidden directly using\r\n\t\t// display:none (it is still safe to use offsets if a parent element is\r\n\t\t// hidden; don safety goggles and see bug #4512 for more information).\r\n\t\tdiv.style.display = \"none\";\r\n\t\treliableHiddenOffsetsVal = div.getClientRects().length === 0;\r\n\t\tif ( reliableHiddenOffsetsVal ) {\r\n\t\t\tdiv.style.display = \"\";\r\n\t\t\tdiv.innerHTML = \"<table><tr><td></td><td>t</td></tr></table>\";\r\n\t\t\tdiv.childNodes[ 0 ].style.borderCollapse = \"separate\";\r\n\t\t\tcontents = div.getElementsByTagName( \"td\" );\r\n\t\t\tcontents[ 0 ].style.cssText = \"margin:0;border:0;padding:0;display:none\";\r\n\t\t\treliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;\r\n\t\t\tif ( reliableHiddenOffsetsVal ) {\r\n\t\t\t\tcontents[ 0 ].style.display = \"\";\r\n\t\t\t\tcontents[ 1 ].style.display = \"none\";\r\n\t\t\t\treliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Teardown\r\n\t\tdocumentElement.removeChild( container );\r\n\t}\r\n\r\n} )();\r\n\r\n\r\nvar getStyles, curCSS,\r\n\trposition = /^(top|right|bottom|left)$/;\r\n\r\nif ( window.getComputedStyle ) {\r\n\tgetStyles = function( elem ) {\r\n\r\n\t\t// Support: IE<=11+, Firefox<=30+ (#15098, #14150)\r\n\t\t// IE throws on elements created in popups\r\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\r\n\t\tvar view = elem.ownerDocument.defaultView;\r\n\r\n\t\tif ( !view || !view.opener ) {\r\n\t\t\tview = window;\r\n\t\t}\r\n\r\n\t\treturn view.getComputedStyle( elem );\r\n\t};\r\n\r\n\tcurCSS = function( elem, name, computed ) {\r\n\t\tvar width, minWidth, maxWidth, ret,\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\tcomputed = computed || getStyles( elem );\r\n\r\n\t\t// getPropertyValue is only needed for .css('filter') in IE9, see #12537\r\n\t\tret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;\r\n\r\n\t\t// Support: Opera 12.1x only\r\n\t\t// Fall back to style even without computed\r\n\t\t// computed is undefined for elems on document fragments\r\n\t\tif ( ( ret === \"\" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {\r\n\t\t\tret = jQuery.style( elem, name );\r\n\t\t}\r\n\r\n\t\tif ( computed ) {\r\n\r\n\t\t\t// A tribute to the \"awesome hack by Dean Edwards\"\r\n\t\t\t// Chrome < 17 and Safari 5.0 uses \"computed value\"\r\n\t\t\t// instead of \"used value\" for margin-right\r\n\t\t\t// Safari 5.1.7 (at least) returns percentage for a larger set of values,\r\n\t\t\t// but width seems to be reliably pixels\r\n\t\t\t// this is against the CSSOM draft spec:\r\n\t\t\t// http://dev.w3.org/csswg/cssom/#resolved-values\r\n\t\t\tif ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {\r\n\r\n\t\t\t\t// Remember the original values\r\n\t\t\t\twidth = style.width;\r\n\t\t\t\tminWidth = style.minWidth;\r\n\t\t\t\tmaxWidth = style.maxWidth;\r\n\r\n\t\t\t\t// Put in the new values to get a computed value out\r\n\t\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\r\n\t\t\t\tret = computed.width;\r\n\r\n\t\t\t\t// Revert the changed values\r\n\t\t\t\tstyle.width = width;\r\n\t\t\t\tstyle.minWidth = minWidth;\r\n\t\t\t\tstyle.maxWidth = maxWidth;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Support: IE\r\n\t\t// IE returns zIndex value as an integer.\r\n\t\treturn ret === undefined ?\r\n\t\t\tret :\r\n\t\t\tret + \"\";\r\n\t};\r\n} else if ( documentElement.currentStyle ) {\r\n\tgetStyles = function( elem ) {\r\n\t\treturn elem.currentStyle;\r\n\t};\r\n\r\n\tcurCSS = function( elem, name, computed ) {\r\n\t\tvar left, rs, rsLeft, ret,\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\tcomputed = computed || getStyles( elem );\r\n\t\tret = computed ? computed[ name ] : undefined;\r\n\r\n\t\t// Avoid setting ret to empty string here\r\n\t\t// so we don't default to auto\r\n\t\tif ( ret == null && style && style[ name ] ) {\r\n\t\t\tret = style[ name ];\r\n\t\t}\r\n\r\n\t\t// From the awesome hack by Dean Edwards\r\n\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\r\n\r\n\t\t// If we're not dealing with a regular pixel number\r\n\t\t// but a number that has a weird ending, we need to convert it to pixels\r\n\t\t// but not position css attributes, as those are\r\n\t\t// proportional to the parent element instead\r\n\t\t// and we can't measure the parent instead because it\r\n\t\t// might trigger a \"stacking dolls\" problem\r\n\t\tif ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {\r\n\r\n\t\t\t// Remember the original values\r\n\t\t\tleft = style.left;\r\n\t\t\trs = elem.runtimeStyle;\r\n\t\t\trsLeft = rs && rs.left;\r\n\r\n\t\t\t// Put in the new values to get a computed value out\r\n\t\t\tif ( rsLeft ) {\r\n\t\t\t\trs.left = elem.currentStyle.left;\r\n\t\t\t}\r\n\t\t\tstyle.left = name === \"fontSize\" ? \"1em\" : ret;\r\n\t\t\tret = style.pixelLeft + \"px\";\r\n\r\n\t\t\t// Revert the changed values\r\n\t\t\tstyle.left = left;\r\n\t\t\tif ( rsLeft ) {\r\n\t\t\t\trs.left = rsLeft;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Support: IE\r\n\t\t// IE returns zIndex value as an integer.\r\n\t\treturn ret === undefined ?\r\n\t\t\tret :\r\n\t\t\tret + \"\" || \"auto\";\r\n\t};\r\n}\r\n\r\n\r\n\r\n\r\nfunction addGetHookIf( conditionFn, hookFn ) {\r\n\r\n\t// Define the hook, we'll check on the first run if it's really needed.\r\n\treturn {\r\n\t\tget: function() {\r\n\t\t\tif ( conditionFn() ) {\r\n\r\n\t\t\t\t// Hook not needed (or it's not possible to use it due\r\n\t\t\t\t// to missing dependency), remove it.\r\n\t\t\t\tdelete this.get;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\r\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n\r\nvar\r\n\r\n\t\tralpha = /alpha\\([^)]*\\)/i,\r\n\tropacity = /opacity\\s*=\\s*([^)]*)/i,\r\n\r\n\t// swappable if display is none or starts with table except\r\n\t// \"table\", \"table-cell\", or \"table-caption\"\r\n\t// see here for display values:\r\n\t// https://developer.mozilla.org/en-US/docs/CSS/display\r\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\r\n\trnumsplit = new RegExp( \"^(\" + pnum + \")(.*)$\", \"i\" ),\r\n\r\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\r\n\tcssNormalTransform = {\r\n\t\tletterSpacing: \"0\",\r\n\t\tfontWeight: \"400\"\r\n\t},\r\n\r\n\tcssPrefixes = [ \"Webkit\", \"O\", \"Moz\", \"ms\" ],\r\n\temptyStyle = document.createElement( \"div\" ).style;\r\n\r\n\r\n// return a css property mapped to a potentially vendor prefixed property\r\nfunction vendorPropName( name ) {\r\n\r\n\t// shortcut for names that are not vendor prefixed\r\n\tif ( name in emptyStyle ) {\r\n\t\treturn name;\r\n\t}\r\n\r\n\t// check for vendor prefixed names\r\n\tvar capName = name.charAt( 0 ).toUpperCase() + name.slice( 1 ),\r\n\t\ti = cssPrefixes.length;\r\n\r\n\twhile ( i-- ) {\r\n\t\tname = cssPrefixes[ i ] + capName;\r\n\t\tif ( name in emptyStyle ) {\r\n\t\t\treturn name;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction showHide( elements, show ) {\r\n\tvar display, elem, hidden,\r\n\t\tvalues = [],\r\n\t\tindex = 0,\r\n\t\tlength = elements.length;\r\n\r\n\tfor ( ; index < length; index++ ) {\r\n\t\telem = elements[ index ];\r\n\t\tif ( !elem.style ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\" );\r\n\t\tdisplay = elem.style.display;\r\n\t\tif ( show ) {\r\n\r\n\t\t\t// Reset the inline display of this element to learn if it is\r\n\t\t\t// being hidden by cascaded rules or not\r\n\t\t\tif ( !values[ index ] && display === \"none\" ) {\r\n\t\t\t\telem.style.display = \"\";\r\n\t\t\t}\r\n\r\n\t\t\t// Set elements which have been overridden with display: none\r\n\t\t\t// in a stylesheet to whatever the default browser style is\r\n\t\t\t// for such an element\r\n\t\t\tif ( elem.style.display === \"\" && isHidden( elem ) ) {\r\n\t\t\t\tvalues[ index ] =\r\n\t\t\t\t\tjQuery._data( elem, \"olddisplay\", defaultDisplay( elem.nodeName ) );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\thidden = isHidden( elem );\r\n\r\n\t\t\tif ( display && display !== \"none\" || !hidden ) {\r\n\t\t\t\tjQuery._data(\r\n\t\t\t\t\telem,\r\n\t\t\t\t\t\"olddisplay\",\r\n\t\t\t\t\thidden ? display : jQuery.css( elem, \"display\" )\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Set the display of most of the elements in a second loop\r\n\t// to avoid the constant reflow\r\n\tfor ( index = 0; index < length; index++ ) {\r\n\t\telem = elements[ index ];\r\n\t\tif ( !elem.style ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif ( !show || elem.style.display === \"none\" || elem.style.display === \"\" ) {\r\n\t\t\telem.style.display = show ? values[ index ] || \"\" : \"none\";\r\n\t\t}\r\n\t}\r\n\r\n\treturn elements;\r\n}\r\n\r\nfunction setPositiveNumber( elem, value, subtract ) {\r\n\tvar matches = rnumsplit.exec( value );\r\n\treturn matches ?\r\n\r\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\r\n\t\tMath.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || \"px\" ) :\r\n\t\tvalue;\r\n}\r\n\r\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\r\n\tvar i = extra === ( isBorderBox ? \"border\" : \"content\" ) ?\r\n\r\n\t\t// If we already have the right measurement, avoid augmentation\r\n\t\t4 :\r\n\r\n\t\t// Otherwise initialize for horizontal or vertical properties\r\n\t\tname === \"width\" ? 1 : 0,\r\n\r\n\t\tval = 0;\r\n\r\n\tfor ( ; i < 4; i += 2 ) {\r\n\r\n\t\t// both box models exclude margin, so add it if we want it\r\n\t\tif ( extra === \"margin\" ) {\r\n\t\t\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\r\n\t\t}\r\n\r\n\t\tif ( isBorderBox ) {\r\n\r\n\t\t\t// border-box includes padding, so remove it if we want content\r\n\t\t\tif ( extra === \"content\" ) {\r\n\t\t\t\tval -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\r\n\t\t\t}\r\n\r\n\t\t\t// at this point, extra isn't border nor margin, so remove border\r\n\t\t\tif ( extra !== \"margin\" ) {\r\n\t\t\t\tval -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\t// at this point, extra isn't content, so add padding\r\n\t\t\tval += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\r\n\r\n\t\t\t// at this point, extra isn't content nor padding, so add border\r\n\t\t\tif ( extra !== \"padding\" ) {\r\n\t\t\t\tval += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn val;\r\n}\r\n\r\nfunction getWidthOrHeight( elem, name, extra ) {\r\n\r\n\t// Start with offset property, which is equivalent to the border-box value\r\n\tvar valueIsBorderBox = true,\r\n\t\tval = name === \"width\" ? elem.offsetWidth : elem.offsetHeight,\r\n\t\tstyles = getStyles( elem ),\r\n\t\tisBorderBox = support.boxSizing &&\r\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\r\n\r\n\t// some non-html elements return undefined for offsetWidth, so check for null/undefined\r\n\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\r\n\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\r\n\tif ( val <= 0 || val == null ) {\r\n\r\n\t\t// Fall back to computed then uncomputed css if necessary\r\n\t\tval = curCSS( elem, name, styles );\r\n\t\tif ( val < 0 || val == null ) {\r\n\t\t\tval = elem.style[ name ];\r\n\t\t}\r\n\r\n\t\t// Computed unit is not pixels. Stop here and return.\r\n\t\tif ( rnumnonpx.test( val ) ) {\r\n\t\t\treturn val;\r\n\t\t}\r\n\r\n\t\t// we need the check for style in case a browser which returns unreliable values\r\n\t\t// for getComputedStyle silently falls back to the reliable elem.style\r\n\t\tvalueIsBorderBox = isBorderBox &&\r\n\t\t\t( support.boxSizingReliable() || val === elem.style[ name ] );\r\n\r\n\t\t// Normalize \"\", auto, and prepare for extra\r\n\t\tval = parseFloat( val ) || 0;\r\n\t}\r\n\r\n\t// use the active box-sizing model to add/subtract irrelevant styles\r\n\treturn ( val +\r\n\t\taugmentWidthOrHeight(\r\n\t\t\telem,\r\n\t\t\tname,\r\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\r\n\t\t\tvalueIsBorderBox,\r\n\t\t\tstyles\r\n\t\t)\r\n\t) + \"px\";\r\n}\r\n\r\njQuery.extend( {\r\n\r\n\t// Add in style property hooks for overriding the default\r\n\t// behavior of getting and setting a style property\r\n\tcssHooks: {\r\n\t\topacity: {\r\n\t\t\tget: function( elem, computed ) {\r\n\t\t\t\tif ( computed ) {\r\n\r\n\t\t\t\t\t// We should always get a number back from opacity\r\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\r\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// Don't automatically add \"px\" to these possibly-unitless properties\r\n\tcssNumber: {\r\n\t\t\"animationIterationCount\": true,\r\n\t\t\"columnCount\": true,\r\n\t\t\"fillOpacity\": true,\r\n\t\t\"flexGrow\": true,\r\n\t\t\"flexShrink\": true,\r\n\t\t\"fontWeight\": true,\r\n\t\t\"lineHeight\": true,\r\n\t\t\"opacity\": true,\r\n\t\t\"order\": true,\r\n\t\t\"orphans\": true,\r\n\t\t\"widows\": true,\r\n\t\t\"zIndex\": true,\r\n\t\t\"zoom\": true\r\n\t},\r\n\r\n\t// Add in properties whose names you wish to fix before\r\n\t// setting or getting the value\r\n\tcssProps: {\r\n\r\n\t\t// normalize float css property\r\n\t\t\"float\": support.cssFloat ? \"cssFloat\" : \"styleFloat\"\r\n\t},\r\n\r\n\t// Get and set the style property on a DOM Node\r\n\tstyle: function( elem, name, value, extra ) {\r\n\r\n\t\t// Don't set styles on text and comment nodes\r\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Make sure that we're working with the right name\r\n\t\tvar ret, type, hooks,\r\n\t\t\torigName = jQuery.camelCase( name ),\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\tname = jQuery.cssProps[ origName ] ||\r\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\r\n\r\n\t\t// gets hook for the prefixed version\r\n\t\t// followed by the unprefixed version\r\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\r\n\r\n\t\t// Check if we're setting a value\r\n\t\tif ( value !== undefined ) {\r\n\t\t\ttype = typeof value;\r\n\r\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (#7345)\r\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\r\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\r\n\r\n\t\t\t\t// Fixes bug #9237\r\n\t\t\t\ttype = \"number\";\r\n\t\t\t}\r\n\r\n\t\t\t// Make sure that null and NaN values aren't set. See: #7116\r\n\t\t\tif ( value == null || value !== value ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\r\n\t\t\tif ( type === \"number\" ) {\r\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\r\n\t\t\t}\r\n\r\n\t\t\t// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,\r\n\t\t\t// but it would mean to define eight\r\n\t\t\t// (for every problematic property) identical functions\r\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\r\n\t\t\t\tstyle[ name ] = \"inherit\";\r\n\t\t\t}\r\n\r\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\r\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\r\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\r\n\r\n\t\t\t\t// Support: IE\r\n\t\t\t\t// Swallow errors from 'invalid' CSS values (#5509)\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstyle[ name ] = value;\r\n\t\t\t\t} catch ( e ) {}\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// If a hook was provided get the non-computed value from there\r\n\t\t\tif ( hooks && \"get\" in hooks &&\r\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\r\n\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\r\n\t\t\t// Otherwise just get the value from the style object\r\n\t\t\treturn style[ name ];\r\n\t\t}\r\n\t},\r\n\r\n\tcss: function( elem, name, extra, styles ) {\r\n\t\tvar num, val, hooks,\r\n\t\t\torigName = jQuery.camelCase( name );\r\n\r\n\t\t// Make sure that we're working with the right name\r\n\t\tname = jQuery.cssProps[ origName ] ||\r\n\t\t\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\r\n\r\n\t\t// gets hook for the prefixed version\r\n\t\t// followed by the unprefixed version\r\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\r\n\r\n\t\t// If a hook was provided get the computed value from there\r\n\t\tif ( hooks && \"get\" in hooks ) {\r\n\t\t\tval = hooks.get( elem, true, extra );\r\n\t\t}\r\n\r\n\t\t// Otherwise, if a way to get the computed value exists, use that\r\n\t\tif ( val === undefined ) {\r\n\t\t\tval = curCSS( elem, name, styles );\r\n\t\t}\r\n\r\n\t\t//convert \"normal\" to computed value\r\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\r\n\t\t\tval = cssNormalTransform[ name ];\r\n\t\t}\r\n\r\n\t\t// Return, converting to number if forced or a qualifier was provided and val looks numeric\r\n\t\tif ( extra === \"\" || extra ) {\r\n\t\t\tnum = parseFloat( val );\r\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\r\n\t\t}\r\n\t\treturn val;\r\n\t}\r\n} );\r\n\r\njQuery.each( [ \"height\", \"width\" ], function( i, name ) {\r\n\tjQuery.cssHooks[ name ] = {\r\n\t\tget: function( elem, computed, extra ) {\r\n\t\t\tif ( computed ) {\r\n\r\n\t\t\t\t// certain elements can have dimension info if we invisibly show them\r\n\t\t\t\t// however, it must have a current display style that would benefit from this\r\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\r\n\t\t\t\t\telem.offsetWidth === 0 ?\r\n\t\t\t\t\t\tswap( elem, cssShow, function() {\r\n\t\t\t\t\t\t\treturn getWidthOrHeight( elem, name, extra );\r\n\t\t\t\t\t\t} ) :\r\n\t\t\t\t\t\tgetWidthOrHeight( elem, name, extra );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tset: function( elem, value, extra ) {\r\n\t\t\tvar styles = extra && getStyles( elem );\r\n\t\t\treturn setPositiveNumber( elem, value, extra ?\r\n\t\t\t\taugmentWidthOrHeight(\r\n\t\t\t\t\telem,\r\n\t\t\t\t\tname,\r\n\t\t\t\t\textra,\r\n\t\t\t\t\tsupport.boxSizing &&\r\n\t\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\r\n\t\t\t\t\tstyles\r\n\t\t\t\t) : 0\r\n\t\t\t);\r\n\t\t}\r\n\t};\r\n} );\r\n\r\nif ( !support.opacity ) {\r\n\tjQuery.cssHooks.opacity = {\r\n\t\tget: function( elem, computed ) {\r\n\r\n\t\t\t// IE uses filters for opacity\r\n\t\t\treturn ropacity.test( ( computed && elem.currentStyle ?\r\n\t\t\t\telem.currentStyle.filter :\r\n\t\t\t\telem.style.filter ) || \"\" ) ?\r\n\t\t\t\t\t( 0.01 * parseFloat( RegExp.$1 ) ) + \"\" :\r\n\t\t\t\t\tcomputed ? \"1\" : \"\";\r\n\t\t},\r\n\r\n\t\tset: function( elem, value ) {\r\n\t\t\tvar style = elem.style,\r\n\t\t\t\tcurrentStyle = elem.currentStyle,\r\n\t\t\t\topacity = jQuery.isNumeric( value ) ? \"alpha(opacity=\" + value * 100 + \")\" : \"\",\r\n\t\t\t\tfilter = currentStyle && currentStyle.filter || style.filter || \"\";\r\n\r\n\t\t\t// IE has trouble with opacity if it does not have layout\r\n\t\t\t// Force it by setting the zoom level\r\n\t\t\tstyle.zoom = 1;\r\n\r\n\t\t\t// if setting opacity to 1, and no other filters exist -\r\n\t\t\t// attempt to remove filter attribute #6652\r\n\t\t\t// if value === \"\", then remove inline opacity #12685\r\n\t\t\tif ( ( value >= 1 || value === \"\" ) &&\r\n\t\t\t\t\tjQuery.trim( filter.replace( ralpha, \"\" ) ) === \"\" &&\r\n\t\t\t\t\tstyle.removeAttribute ) {\r\n\r\n\t\t\t\t// Setting style.filter to null, \"\" & \" \" still leave \"filter:\" in the cssText\r\n\t\t\t\t// if \"filter:\" is present at all, clearType is disabled, we want to avoid this\r\n\t\t\t\t// style.removeAttribute is IE Only, but so apparently is this code path...\r\n\t\t\t\tstyle.removeAttribute( \"filter\" );\r\n\r\n\t\t\t\t// if there is no filter style applied in a css rule\r\n\t\t\t\t// or unset inline opacity, we are done\r\n\t\t\t\tif ( value === \"\" || currentStyle && !currentStyle.filter ) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// otherwise, set new filter values\r\n\t\t\tstyle.filter = ralpha.test( filter ) ?\r\n\t\t\t\tfilter.replace( ralpha, opacity ) :\r\n\t\t\t\tfilter + \" \" + opacity;\r\n\t\t}\r\n\t};\r\n}\r\n\r\njQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,\r\n\tfunction( elem, computed ) {\r\n\t\tif ( computed ) {\r\n\t\t\treturn swap( elem, { \"display\": \"inline-block\" },\r\n\t\t\t\tcurCSS, [ elem, \"marginRight\" ] );\r\n\t\t}\r\n\t}\r\n);\r\n\r\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\r\n\tfunction( elem, computed ) {\r\n\t\tif ( computed ) {\r\n\t\t\treturn (\r\n\t\t\t\tparseFloat( curCSS( elem, \"marginLeft\" ) ) ||\r\n\r\n\t\t\t\t// Support: IE<=11+\r\n\t\t\t\t// Running getBoundingClientRect on a disconnected node in IE throws an error\r\n\t\t\t\t// Support: IE8 only\r\n\t\t\t\t// getClientRects() errors on disconnected elems\r\n\t\t\t\t( jQuery.contains( elem.ownerDocument, elem ) ?\r\n\t\t\t\t\telem.getBoundingClientRect().left -\r\n\t\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\r\n\t\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\r\n\t\t\t\t\t\t} ) :\r\n\t\t\t\t\t0\r\n\t\t\t\t)\r\n\t\t\t) + \"px\";\r\n\t\t}\r\n\t}\r\n);\r\n\r\n// These hooks are used by animate to expand properties\r\njQuery.each( {\r\n\tmargin: \"\",\r\n\tpadding: \"\",\r\n\tborder: \"Width\"\r\n}, function( prefix, suffix ) {\r\n\tjQuery.cssHooks[ prefix + suffix ] = {\r\n\t\texpand: function( value ) {\r\n\t\t\tvar i = 0,\r\n\t\t\t\texpanded = {},\r\n\r\n\t\t\t\t// assumes a single number if not a string\r\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\r\n\r\n\t\t\tfor ( ; i < 4; i++ ) {\r\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\r\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\r\n\t\t\t}\r\n\r\n\t\t\treturn expanded;\r\n\t\t}\r\n\t};\r\n\r\n\tif ( !rmargin.test( prefix ) ) {\r\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\r\n\t}\r\n} );\r\n\r\njQuery.fn.extend( {\r\n\tcss: function( name, value ) {\r\n\t\treturn access( this, function( elem, name, value ) {\r\n\t\t\tvar styles, len,\r\n\t\t\t\tmap = {},\r\n\t\t\t\ti = 0;\r\n\r\n\t\t\tif ( jQuery.isArray( name ) ) {\r\n\t\t\t\tstyles = getStyles( elem );\r\n\t\t\t\tlen = name.length;\r\n\r\n\t\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn map;\r\n\t\t\t}\r\n\r\n\t\t\treturn value !== undefined ?\r\n\t\t\t\tjQuery.style( elem, name, value ) :\r\n\t\t\t\tjQuery.css( elem, name );\r\n\t\t}, name, value, arguments.length > 1 );\r\n\t},\r\n\tshow: function() {\r\n\t\treturn showHide( this, true );\r\n\t},\r\n\thide: function() {\r\n\t\treturn showHide( this );\r\n\t},\r\n\ttoggle: function( state ) {\r\n\t\tif ( typeof state === \"boolean\" ) {\r\n\t\t\treturn state ? this.show() : this.hide();\r\n\t\t}\r\n\r\n\t\treturn this.each( function() {\r\n\t\t\tif ( isHidden( this ) ) {\r\n\t\t\t\tjQuery( this ).show();\r\n\t\t\t} else {\r\n\t\t\t\tjQuery( this ).hide();\r\n\t\t\t}\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\n\r\nfunction Tween( elem, options, prop, end, easing ) {\r\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\r\n}\r\njQuery.Tween = Tween;\r\n\r\nTween.prototype = {\r\n\tconstructor: Tween,\r\n\tinit: function( elem, options, prop, end, easing, unit ) {\r\n\t\tthis.elem = elem;\r\n\t\tthis.prop = prop;\r\n\t\tthis.easing = easing || jQuery.easing._default;\r\n\t\tthis.options = options;\r\n\t\tthis.start = this.now = this.cur();\r\n\t\tthis.end = end;\r\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\r\n\t},\r\n\tcur: function() {\r\n\t\tvar hooks = Tween.propHooks[ this.prop ];\r\n\r\n\t\treturn hooks && hooks.get ?\r\n\t\t\thooks.get( this ) :\r\n\t\t\tTween.propHooks._default.get( this );\r\n\t},\r\n\trun: function( percent ) {\r\n\t\tvar eased,\r\n\t\t\thooks = Tween.propHooks[ this.prop ];\r\n\r\n\t\tif ( this.options.duration ) {\r\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\r\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tthis.pos = eased = percent;\r\n\t\t}\r\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\r\n\r\n\t\tif ( this.options.step ) {\r\n\t\t\tthis.options.step.call( this.elem, this.now, this );\r\n\t\t}\r\n\r\n\t\tif ( hooks && hooks.set ) {\r\n\t\t\thooks.set( this );\r\n\t\t} else {\r\n\t\t\tTween.propHooks._default.set( this );\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n};\r\n\r\nTween.prototype.init.prototype = Tween.prototype;\r\n\r\nTween.propHooks = {\r\n\t_default: {\r\n\t\tget: function( tween ) {\r\n\t\t\tvar result;\r\n\r\n\t\t\t// Use a property on the element directly when it is not a DOM element,\r\n\t\t\t// or when there is no matching style property that exists.\r\n\t\t\tif ( tween.elem.nodeType !== 1 ||\r\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\r\n\t\t\t\treturn tween.elem[ tween.prop ];\r\n\t\t\t}\r\n\r\n\t\t\t// passing an empty string as a 3rd parameter to .css will automatically\r\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails\r\n\t\t\t// so, simple values such as \"10px\" are parsed to Float.\r\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as is.\r\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\r\n\r\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\r\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\r\n\t\t},\r\n\t\tset: function( tween ) {\r\n\r\n\t\t\t// use step hook for back compat - use cssHook if its there - use .style if its\r\n\t\t\t// available and use plain properties where available\r\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\r\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\r\n\t\t\t} else if ( tween.elem.nodeType === 1 &&\r\n\t\t\t\t( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||\r\n\t\t\t\t\tjQuery.cssHooks[ tween.prop ] ) ) {\r\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\r\n\t\t\t} else {\r\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// Support: IE <=9\r\n// Panic based approach to setting things on disconnected nodes\r\n\r\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\r\n\tset: function( tween ) {\r\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\r\n\t\t\ttween.elem[ tween.prop ] = tween.now;\r\n\t\t}\r\n\t}\r\n};\r\n\r\njQuery.easing = {\r\n\tlinear: function( p ) {\r\n\t\treturn p;\r\n\t},\r\n\tswing: function( p ) {\r\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\r\n\t},\r\n\t_default: \"swing\"\r\n};\r\n\r\njQuery.fx = Tween.prototype.init;\r\n\r\n// Back Compat <1.8 extension point\r\njQuery.fx.step = {};\r\n\r\n\r\n\r\n\r\nvar\r\n\tfxNow, timerId,\r\n\trfxtypes = /^(?:toggle|show|hide)$/,\r\n\trrun = /queueHooks$/;\r\n\r\n// Animations created synchronously will run synchronously\r\nfunction createFxNow() {\r\n\twindow.setTimeout( function() {\r\n\t\tfxNow = undefined;\r\n\t} );\r\n\treturn ( fxNow = jQuery.now() );\r\n}\r\n\r\n// Generate parameters to create a standard animation\r\nfunction genFx( type, includeWidth ) {\r\n\tvar which,\r\n\t\tattrs = { height: type },\r\n\t\ti = 0;\r\n\r\n\t// if we include width, step value is 1 to do all cssExpand values,\r\n\t// if we don't include width, step value is 2 to skip over Left and Right\r\n\tincludeWidth = includeWidth ? 1 : 0;\r\n\tfor ( ; i < 4 ; i += 2 - includeWidth ) {\r\n\t\twhich = cssExpand[ i ];\r\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\r\n\t}\r\n\r\n\tif ( includeWidth ) {\r\n\t\tattrs.opacity = attrs.width = type;\r\n\t}\r\n\r\n\treturn attrs;\r\n}\r\n\r\nfunction createTween( value, prop, animation ) {\r\n\tvar tween,\r\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\r\n\t\tindex = 0,\r\n\t\tlength = collection.length;\r\n\tfor ( ; index < length; index++ ) {\r\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\r\n\r\n\t\t\t// we're done with this property\r\n\t\t\treturn tween;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction defaultPrefilter( elem, props, opts ) {\r\n\t/* jshint validthis: true */\r\n\tvar prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,\r\n\t\tanim = this,\r\n\t\torig = {},\r\n\t\tstyle = elem.style,\r\n\t\thidden = elem.nodeType && isHidden( elem ),\r\n\t\tdataShow = jQuery._data( elem, \"fxshow\" );\r\n\r\n\t// handle queue: false promises\r\n\tif ( !opts.queue ) {\r\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\r\n\t\tif ( hooks.unqueued == null ) {\r\n\t\t\thooks.unqueued = 0;\r\n\t\t\toldfire = hooks.empty.fire;\r\n\t\t\thooks.empty.fire = function() {\r\n\t\t\t\tif ( !hooks.unqueued ) {\r\n\t\t\t\t\toldfire();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\t\thooks.unqueued++;\r\n\r\n\t\tanim.always( function() {\r\n\r\n\t\t\t// doing this makes sure that the complete handler will be called\r\n\t\t\t// before this completes\r\n\t\t\tanim.always( function() {\r\n\t\t\t\thooks.unqueued--;\r\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\r\n\t\t\t\t\thooks.empty.fire();\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\t\t} );\r\n\t}\r\n\r\n\t// height/width overflow pass\r\n\tif ( elem.nodeType === 1 && ( \"height\" in props || \"width\" in props ) ) {\r\n\r\n\t\t// Make sure that nothing sneaks out\r\n\t\t// Record all 3 overflow attributes because IE does not\r\n\t\t// change the overflow attribute when overflowX and\r\n\t\t// overflowY are set to the same value\r\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\r\n\r\n\t\t// Set display property to inline-block for height/width\r\n\t\t// animations on inline elements that are having width/height animated\r\n\t\tdisplay = jQuery.css( elem, \"display\" );\r\n\r\n\t\t// Test default display if display is currently \"none\"\r\n\t\tcheckDisplay = display === \"none\" ?\r\n\t\t\tjQuery._data( elem, \"olddisplay\" ) || defaultDisplay( elem.nodeName ) : display;\r\n\r\n\t\tif ( checkDisplay === \"inline\" && jQuery.css( elem, \"float\" ) === \"none\" ) {\r\n\r\n\t\t\t// inline-level elements accept inline-block;\r\n\t\t\t// block-level elements need to be inline with layout\r\n\t\t\tif ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === \"inline\" ) {\r\n\t\t\t\tstyle.display = \"inline-block\";\r\n\t\t\t} else {\r\n\t\t\t\tstyle.zoom = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif ( opts.overflow ) {\r\n\t\tstyle.overflow = \"hidden\";\r\n\t\tif ( !support.shrinkWrapBlocks() ) {\r\n\t\t\tanim.always( function() {\r\n\t\t\t\tstyle.overflow = opts.overflow[ 0 ];\r\n\t\t\t\tstyle.overflowX = opts.overflow[ 1 ];\r\n\t\t\t\tstyle.overflowY = opts.overflow[ 2 ];\r\n\t\t\t} );\r\n\t\t}\r\n\t}\r\n\r\n\t// show/hide pass\r\n\tfor ( prop in props ) {\r\n\t\tvalue = props[ prop ];\r\n\t\tif ( rfxtypes.exec( value ) ) {\r\n\t\t\tdelete props[ prop ];\r\n\t\t\ttoggle = toggle || value === \"toggle\";\r\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\r\n\r\n\t\t\t\t// If there is dataShow left over from a stopped hide or show\r\n\t\t\t\t// and we are going to proceed with show, we should pretend to be hidden\r\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\r\n\t\t\t\t\thidden = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\r\n\r\n\t\t// Any non-fx value stops us from restoring the original display value\r\n\t\t} else {\r\n\t\t\tdisplay = undefined;\r\n\t\t}\r\n\t}\r\n\r\n\tif ( !jQuery.isEmptyObject( orig ) ) {\r\n\t\tif ( dataShow ) {\r\n\t\t\tif ( \"hidden\" in dataShow ) {\r\n\t\t\t\thidden = dataShow.hidden;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tdataShow = jQuery._data( elem, \"fxshow\", {} );\r\n\t\t}\r\n\r\n\t\t// store state if its toggle - enables .stop().toggle() to \"reverse\"\r\n\t\tif ( toggle ) {\r\n\t\t\tdataShow.hidden = !hidden;\r\n\t\t}\r\n\t\tif ( hidden ) {\r\n\t\t\tjQuery( elem ).show();\r\n\t\t} else {\r\n\t\t\tanim.done( function() {\r\n\t\t\t\tjQuery( elem ).hide();\r\n\t\t\t} );\r\n\t\t}\r\n\t\tanim.done( function() {\r\n\t\t\tvar prop;\r\n\t\t\tjQuery._removeData( elem, \"fxshow\" );\r\n\t\t\tfor ( prop in orig ) {\r\n\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\r\n\t\t\t}\r\n\t\t} );\r\n\t\tfor ( prop in orig ) {\r\n\t\t\ttween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\r\n\r\n\t\t\tif ( !( prop in dataShow ) ) {\r\n\t\t\t\tdataShow[ prop ] = tween.start;\r\n\t\t\t\tif ( hidden ) {\r\n\t\t\t\t\ttween.end = tween.start;\r\n\t\t\t\t\ttween.start = prop === \"width\" || prop === \"height\" ? 1 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t// If this is a noop like .hide().hide(), restore an overwritten display value\r\n\t} else if ( ( display === \"none\" ? defaultDisplay( elem.nodeName ) : display ) === \"inline\" ) {\r\n\t\tstyle.display = display;\r\n\t}\r\n}\r\n\r\nfunction propFilter( props, specialEasing ) {\r\n\tvar index, name, easing, value, hooks;\r\n\r\n\t// camelCase, specialEasing and expand cssHook pass\r\n\tfor ( index in props ) {\r\n\t\tname = jQuery.camelCase( index );\r\n\t\teasing = specialEasing[ name ];\r\n\t\tvalue = props[ index ];\r\n\t\tif ( jQuery.isArray( value ) ) {\r\n\t\t\teasing = value[ 1 ];\r\n\t\t\tvalue = props[ index ] = value[ 0 ];\r\n\t\t}\r\n\r\n\t\tif ( index !== name ) {\r\n\t\t\tprops[ name ] = value;\r\n\t\t\tdelete props[ index ];\r\n\t\t}\r\n\r\n\t\thooks = jQuery.cssHooks[ name ];\r\n\t\tif ( hooks && \"expand\" in hooks ) {\r\n\t\t\tvalue = hooks.expand( value );\r\n\t\t\tdelete props[ name ];\r\n\r\n\t\t\t// not quite $.extend, this wont overwrite keys already present.\r\n\t\t\t// also - reusing 'index' from above because we have the correct \"name\"\r\n\t\t\tfor ( index in value ) {\r\n\t\t\t\tif ( !( index in props ) ) {\r\n\t\t\t\t\tprops[ index ] = value[ index ];\r\n\t\t\t\t\tspecialEasing[ index ] = easing;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tspecialEasing[ name ] = easing;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction Animation( elem, properties, options ) {\r\n\tvar result,\r\n\t\tstopped,\r\n\t\tindex = 0,\r\n\t\tlength = Animation.prefilters.length,\r\n\t\tdeferred = jQuery.Deferred().always( function() {\r\n\r\n\t\t\t// don't match elem in the :animated selector\r\n\t\t\tdelete tick.elem;\r\n\t\t} ),\r\n\t\ttick = function() {\r\n\t\t\tif ( stopped ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tvar currentTime = fxNow || createFxNow(),\r\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\r\n\r\n\t\t\t\t// Support: Android 2.3\r\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)\r\n\t\t\t\ttemp = remaining / animation.duration || 0,\r\n\t\t\t\tpercent = 1 - temp,\r\n\t\t\t\tindex = 0,\r\n\t\t\t\tlength = animation.tweens.length;\r\n\r\n\t\t\tfor ( ; index < length ; index++ ) {\r\n\t\t\t\tanimation.tweens[ index ].run( percent );\r\n\t\t\t}\r\n\r\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\r\n\r\n\t\t\tif ( percent < 1 && length ) {\r\n\t\t\t\treturn remaining;\r\n\t\t\t} else {\r\n\t\t\t\tdeferred.resolveWith( elem, [ animation ] );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t},\r\n\t\tanimation = deferred.promise( {\r\n\t\t\telem: elem,\r\n\t\t\tprops: jQuery.extend( {}, properties ),\r\n\t\t\topts: jQuery.extend( true, {\r\n\t\t\t\tspecialEasing: {},\r\n\t\t\t\teasing: jQuery.easing._default\r\n\t\t\t}, options ),\r\n\t\t\toriginalProperties: properties,\r\n\t\t\toriginalOptions: options,\r\n\t\t\tstartTime: fxNow || createFxNow(),\r\n\t\t\tduration: options.duration,\r\n\t\t\ttweens: [],\r\n\t\t\tcreateTween: function( prop, end ) {\r\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\r\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\r\n\t\t\t\tanimation.tweens.push( tween );\r\n\t\t\t\treturn tween;\r\n\t\t\t},\r\n\t\t\tstop: function( gotoEnd ) {\r\n\t\t\t\tvar index = 0,\r\n\r\n\t\t\t\t\t// if we are going to the end, we want to run all the tweens\r\n\t\t\t\t\t// otherwise we skip this part\r\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\r\n\t\t\t\tif ( stopped ) {\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\t\t\t\tstopped = true;\r\n\t\t\t\tfor ( ; index < length ; index++ ) {\r\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// resolve when we played the last frame\r\n\t\t\t\t// otherwise, reject\r\n\t\t\t\tif ( gotoEnd ) {\r\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\r\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t} ),\r\n\t\tprops = animation.props;\r\n\r\n\tpropFilter( props, animation.opts.specialEasing );\r\n\r\n\tfor ( ; index < length ; index++ ) {\r\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\r\n\t\tif ( result ) {\r\n\t\t\tif ( jQuery.isFunction( result.stop ) ) {\r\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\r\n\t\t\t\t\tjQuery.proxy( result.stop, result );\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}\r\n\r\n\tjQuery.map( props, createTween, animation );\r\n\r\n\tif ( jQuery.isFunction( animation.opts.start ) ) {\r\n\t\tanimation.opts.start.call( elem, animation );\r\n\t}\r\n\r\n\tjQuery.fx.timer(\r\n\t\tjQuery.extend( tick, {\r\n\t\t\telem: elem,\r\n\t\t\tanim: animation,\r\n\t\t\tqueue: animation.opts.queue\r\n\t\t} )\r\n\t);\r\n\r\n\t// attach callbacks from options\r\n\treturn animation.progress( animation.opts.progress )\r\n\t\t.done( animation.opts.done, animation.opts.complete )\r\n\t\t.fail( animation.opts.fail )\r\n\t\t.always( animation.opts.always );\r\n}\r\n\r\njQuery.Animation = jQuery.extend( Animation, {\r\n\r\n\ttweeners: {\r\n\t\t\"*\": [ function( prop, value ) {\r\n\t\t\tvar tween = this.createTween( prop, value );\r\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\r\n\t\t\treturn tween;\r\n\t\t} ]\r\n\t},\r\n\r\n\ttweener: function( props, callback ) {\r\n\t\tif ( jQuery.isFunction( props ) ) {\r\n\t\t\tcallback = props;\r\n\t\t\tprops = [ \"*\" ];\r\n\t\t} else {\r\n\t\t\tprops = props.match( rnotwhite );\r\n\t\t}\r\n\r\n\t\tvar prop,\r\n\t\t\tindex = 0,\r\n\t\t\tlength = props.length;\r\n\r\n\t\tfor ( ; index < length ; index++ ) {\r\n\t\t\tprop = props[ index ];\r\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\r\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\r\n\t\t}\r\n\t},\r\n\r\n\tprefilters: [ defaultPrefilter ],\r\n\r\n\tprefilter: function( callback, prepend ) {\r\n\t\tif ( prepend ) {\r\n\t\t\tAnimation.prefilters.unshift( callback );\r\n\t\t} else {\r\n\t\t\tAnimation.prefilters.push( callback );\r\n\t\t}\r\n\t}\r\n} );\r\n\r\njQuery.speed = function( speed, easing, fn ) {\r\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\r\n\t\tcomplete: fn || !fn && easing ||\r\n\t\t\tjQuery.isFunction( speed ) && speed,\r\n\t\tduration: speed,\r\n\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\r\n\t};\r\n\r\n\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ? opt.duration :\r\n\t\topt.duration in jQuery.fx.speeds ?\r\n\t\t\tjQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\r\n\r\n\t// normalize opt.queue - true/undefined/null -> \"fx\"\r\n\tif ( opt.queue == null || opt.queue === true ) {\r\n\t\topt.queue = \"fx\";\r\n\t}\r\n\r\n\t// Queueing\r\n\topt.old = opt.complete;\r\n\r\n\topt.complete = function() {\r\n\t\tif ( jQuery.isFunction( opt.old ) ) {\r\n\t\t\topt.old.call( this );\r\n\t\t}\r\n\r\n\t\tif ( opt.queue ) {\r\n\t\t\tjQuery.dequeue( this, opt.queue );\r\n\t\t}\r\n\t};\r\n\r\n\treturn opt;\r\n};\r\n\r\njQuery.fn.extend( {\r\n\tfadeTo: function( speed, to, easing, callback ) {\r\n\r\n\t\t// show any hidden elements after setting opacity to 0\r\n\t\treturn this.filter( isHidden ).css( \"opacity\", 0 ).show()\r\n\r\n\t\t\t// animate to the value specified\r\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\r\n\t},\r\n\tanimate: function( prop, speed, easing, callback ) {\r\n\t\tvar empty = jQuery.isEmptyObject( prop ),\r\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\r\n\t\t\tdoAnimation = function() {\r\n\r\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\r\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\r\n\r\n\t\t\t\t// Empty animations, or finishing resolves immediately\r\n\t\t\t\tif ( empty || jQuery._data( this, \"finish\" ) ) {\r\n\t\t\t\t\tanim.stop( true );\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tdoAnimation.finish = doAnimation;\r\n\r\n\t\treturn empty || optall.queue === false ?\r\n\t\t\tthis.each( doAnimation ) :\r\n\t\t\tthis.queue( optall.queue, doAnimation );\r\n\t},\r\n\tstop: function( type, clearQueue, gotoEnd ) {\r\n\t\tvar stopQueue = function( hooks ) {\r\n\t\t\tvar stop = hooks.stop;\r\n\t\t\tdelete hooks.stop;\r\n\t\t\tstop( gotoEnd );\r\n\t\t};\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tgotoEnd = clearQueue;\r\n\t\t\tclearQueue = type;\r\n\t\t\ttype = undefined;\r\n\t\t}\r\n\t\tif ( clearQueue && type !== false ) {\r\n\t\t\tthis.queue( type || \"fx\", [] );\r\n\t\t}\r\n\r\n\t\treturn this.each( function() {\r\n\t\t\tvar dequeue = true,\r\n\t\t\t\tindex = type != null && type + \"queueHooks\",\r\n\t\t\t\ttimers = jQuery.timers,\r\n\t\t\t\tdata = jQuery._data( this );\r\n\r\n\t\t\tif ( index ) {\r\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\r\n\t\t\t\t\tstopQueue( data[ index ] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor ( index in data ) {\r\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\r\n\t\t\t\t\t\tstopQueue( data[ index ] );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor ( index = timers.length; index--; ) {\r\n\t\t\t\tif ( timers[ index ].elem === this &&\r\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\r\n\r\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\r\n\t\t\t\t\tdequeue = false;\r\n\t\t\t\t\ttimers.splice( index, 1 );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// start the next in the queue if the last step wasn't forced\r\n\t\t\t// timers currently will call their complete callbacks, which will dequeue\r\n\t\t\t// but only if they were gotoEnd\r\n\t\t\tif ( dequeue || !gotoEnd ) {\r\n\t\t\t\tjQuery.dequeue( this, type );\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\tfinish: function( type ) {\r\n\t\tif ( type !== false ) {\r\n\t\t\ttype = type || \"fx\";\r\n\t\t}\r\n\t\treturn this.each( function() {\r\n\t\t\tvar index,\r\n\t\t\t\tdata = jQuery._data( this ),\r\n\t\t\t\tqueue = data[ type + \"queue\" ],\r\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\r\n\t\t\t\ttimers = jQuery.timers,\r\n\t\t\t\tlength = queue ? queue.length : 0;\r\n\r\n\t\t\t// enable finishing flag on private data\r\n\t\t\tdata.finish = true;\r\n\r\n\t\t\t// empty the queue first\r\n\t\t\tjQuery.queue( this, type, [] );\r\n\r\n\t\t\tif ( hooks && hooks.stop ) {\r\n\t\t\t\thooks.stop.call( this, true );\r\n\t\t\t}\r\n\r\n\t\t\t// look for any active animations, and finish them\r\n\t\t\tfor ( index = timers.length; index--; ) {\r\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\r\n\t\t\t\t\ttimers[ index ].anim.stop( true );\r\n\t\t\t\t\ttimers.splice( index, 1 );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// look for any animations in the old queue and finish them\r\n\t\t\tfor ( index = 0; index < length; index++ ) {\r\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\r\n\t\t\t\t\tqueue[ index ].finish.call( this );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// turn off finishing flag\r\n\t\t\tdelete data.finish;\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\r\n\tvar cssFn = jQuery.fn[ name ];\r\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\r\n\t\treturn speed == null || typeof speed === \"boolean\" ?\r\n\t\t\tcssFn.apply( this, arguments ) :\r\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\r\n\t};\r\n} );\r\n\r\n// Generate shortcuts for custom animations\r\njQuery.each( {\r\n\tslideDown: genFx( \"show\" ),\r\n\tslideUp: genFx( \"hide\" ),\r\n\tslideToggle: genFx( \"toggle\" ),\r\n\tfadeIn: { opacity: \"show\" },\r\n\tfadeOut: { opacity: \"hide\" },\r\n\tfadeToggle: { opacity: \"toggle\" }\r\n}, function( name, props ) {\r\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\r\n\t\treturn this.animate( props, speed, easing, callback );\r\n\t};\r\n} );\r\n\r\njQuery.timers = [];\r\njQuery.fx.tick = function() {\r\n\tvar timer,\r\n\t\ttimers = jQuery.timers,\r\n\t\ti = 0;\r\n\r\n\tfxNow = jQuery.now();\r\n\r\n\tfor ( ; i < timers.length; i++ ) {\r\n\t\ttimer = timers[ i ];\r\n\r\n\t\t// Checks the timer has not already been removed\r\n\t\tif ( !timer() && timers[ i ] === timer ) {\r\n\t\t\ttimers.splice( i--, 1 );\r\n\t\t}\r\n\t}\r\n\r\n\tif ( !timers.length ) {\r\n\t\tjQuery.fx.stop();\r\n\t}\r\n\tfxNow = undefined;\r\n};\r\n\r\njQuery.fx.timer = function( timer ) {\r\n\tjQuery.timers.push( timer );\r\n\tif ( timer() ) {\r\n\t\tjQuery.fx.start();\r\n\t} else {\r\n\t\tjQuery.timers.pop();\r\n\t}\r\n};\r\n\r\njQuery.fx.interval = 13;\r\n\r\njQuery.fx.start = function() {\r\n\tif ( !timerId ) {\r\n\t\ttimerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval );\r\n\t}\r\n};\r\n\r\njQuery.fx.stop = function() {\r\n\twindow.clearInterval( timerId );\r\n\ttimerId = null;\r\n};\r\n\r\njQuery.fx.speeds = {\r\n\tslow: 600,\r\n\tfast: 200,\r\n\r\n\t// Default speed\r\n\t_default: 400\r\n};\r\n\r\n\r\n// Based off of the plugin by Clint Helfers, with permission.\r\n// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\r\njQuery.fn.delay = function( time, type ) {\r\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\r\n\ttype = type || \"fx\";\r\n\r\n\treturn this.queue( type, function( next, hooks ) {\r\n\t\tvar timeout = window.setTimeout( next, time );\r\n\t\thooks.stop = function() {\r\n\t\t\twindow.clearTimeout( timeout );\r\n\t\t};\r\n\t} );\r\n};\r\n\r\n\r\n( function() {\r\n\tvar a,\r\n\t\tinput = document.createElement( \"input\" ),\r\n\t\tdiv = document.createElement( \"div\" ),\r\n\t\tselect = document.createElement( \"select\" ),\r\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\r\n\r\n\t// Setup\r\n\tdiv = document.createElement( \"div\" );\r\n\tdiv.setAttribute( \"className\", \"t\" );\r\n\tdiv.innerHTML = \" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\";\r\n\ta = div.getElementsByTagName( \"a\" )[ 0 ];\r\n\r\n\t// Support: Windows Web Apps (WWA)\r\n\t// `type` must use .setAttribute for WWA (#14901)\r\n\tinput.setAttribute( \"type\", \"checkbox\" );\r\n\tdiv.appendChild( input );\r\n\r\n\ta = div.getElementsByTagName( \"a\" )[ 0 ];\r\n\r\n\t// First batch of tests.\r\n\ta.style.cssText = \"top:1px\";\r\n\r\n\t// Test setAttribute on camelCase class.\r\n\t// If it works, we need attrFixes when doing get/setAttribute (ie6/7)\r\n\tsupport.getSetAttribute = div.className !== \"t\";\r\n\r\n\t// Get the style information from getAttribute\r\n\t// (IE uses .cssText instead)\r\n\tsupport.style = /top/.test( a.getAttribute( \"style\" ) );\r\n\r\n\t// Make sure that URLs aren't manipulated\r\n\t// (IE normalizes it by default)\r\n\tsupport.hrefNormalized = a.getAttribute( \"href\" ) === \"/a\";\r\n\r\n\t// Check the default checkbox/radio value (\"\" on WebKit; \"on\" elsewhere)\r\n\tsupport.checkOn = !!input.value;\r\n\r\n\t// Make sure that a selected-by-default option has a working selected property.\r\n\t// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)\r\n\tsupport.optSelected = opt.selected;\r\n\r\n\t// Tests for enctype support on a form (#6743)\r\n\tsupport.enctype = !!document.createElement( \"form\" ).enctype;\r\n\r\n\t// Make sure that the options inside disabled selects aren't marked as disabled\r\n\t// (WebKit marks them as disabled)\r\n\tselect.disabled = true;\r\n\tsupport.optDisabled = !opt.disabled;\r\n\r\n\t// Support: IE8 only\r\n\t// Check if we can trust getAttribute(\"value\")\r\n\tinput = document.createElement( \"input\" );\r\n\tinput.setAttribute( \"value\", \"\" );\r\n\tsupport.input = input.getAttribute( \"value\" ) === \"\";\r\n\r\n\t// Check if an input maintains its value after becoming a radio\r\n\tinput.value = \"t\";\r\n\tinput.setAttribute( \"type\", \"radio\" );\r\n\tsupport.radioValue = input.value === \"t\";\r\n} )();\r\n\r\n\r\nvar rreturn = /\\r/g,\r\n\trspaces = /[\\x20\\t\\r\\n\\f]+/g;\r\n\r\njQuery.fn.extend( {\r\n\tval: function( value ) {\r\n\t\tvar hooks, ret, isFunction,\r\n\t\t\telem = this[ 0 ];\r\n\r\n\t\tif ( !arguments.length ) {\r\n\t\t\tif ( elem ) {\r\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\r\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\r\n\r\n\t\t\t\tif (\r\n\t\t\t\t\thooks &&\r\n\t\t\t\t\t\"get\" in hooks &&\r\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\r\n\t\t\t\t) {\r\n\t\t\t\t\treturn ret;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tret = elem.value;\r\n\r\n\t\t\t\treturn typeof ret === \"string\" ?\r\n\r\n\t\t\t\t\t// handle most common string cases\r\n\t\t\t\t\tret.replace( rreturn, \"\" ) :\r\n\r\n\t\t\t\t\t// handle cases where value is null/undef or number\r\n\t\t\t\t\tret == null ? \"\" : ret;\r\n\t\t\t}\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tisFunction = jQuery.isFunction( value );\r\n\r\n\t\treturn this.each( function( i ) {\r\n\t\t\tvar val;\r\n\r\n\t\t\tif ( this.nodeType !== 1 ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif ( isFunction ) {\r\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\r\n\t\t\t} else {\r\n\t\t\t\tval = value;\r\n\t\t\t}\r\n\r\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\r\n\t\t\tif ( val == null ) {\r\n\t\t\t\tval = \"\";\r\n\t\t\t} else if ( typeof val === \"number\" ) {\r\n\t\t\t\tval += \"\";\r\n\t\t\t} else if ( jQuery.isArray( val ) ) {\r\n\t\t\t\tval = jQuery.map( val, function( value ) {\r\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\r\n\t\t\t\t} );\r\n\t\t\t}\r\n\r\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\r\n\r\n\t\t\t// If set returns undefined, fall back to normal setting\r\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\r\n\t\t\t\tthis.value = val;\r\n\t\t\t}\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\njQuery.extend( {\r\n\tvalHooks: {\r\n\t\toption: {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\r\n\t\t\t\treturn val != null ?\r\n\t\t\t\t\tval :\r\n\r\n\t\t\t\t\t// Support: IE10-11+\r\n\t\t\t\t\t// option.text throws exceptions (#14686, #14858)\r\n\t\t\t\t\t// Strip and collapse whitespace\r\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\r\n\t\t\t\t\tjQuery.trim( jQuery.text( elem ) ).replace( rspaces, \" \" );\r\n\t\t\t}\r\n\t\t},\r\n\t\tselect: {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\tvar value, option,\r\n\t\t\t\t\toptions = elem.options,\r\n\t\t\t\t\tindex = elem.selectedIndex,\r\n\t\t\t\t\tone = elem.type === \"select-one\" || index < 0,\r\n\t\t\t\t\tvalues = one ? null : [],\r\n\t\t\t\t\tmax = one ? index + 1 : options.length,\r\n\t\t\t\t\ti = index < 0 ?\r\n\t\t\t\t\t\tmax :\r\n\t\t\t\t\t\tone ? index : 0;\r\n\r\n\t\t\t\t// Loop through all the selected options\r\n\t\t\t\tfor ( ; i < max; i++ ) {\r\n\t\t\t\t\toption = options[ i ];\r\n\r\n\t\t\t\t\t// oldIE doesn't update selected after form reset (#2551)\r\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\r\n\r\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\r\n\t\t\t\t\t\t\t( support.optDisabled ?\r\n\t\t\t\t\t\t\t\t!option.disabled :\r\n\t\t\t\t\t\t\t\toption.getAttribute( \"disabled\" ) === null ) &&\r\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\r\n\t\t\t\t\t\t\t\t!jQuery.nodeName( option.parentNode, \"optgroup\" ) ) ) {\r\n\r\n\t\t\t\t\t\t// Get the specific value for the option\r\n\t\t\t\t\t\tvalue = jQuery( option ).val();\r\n\r\n\t\t\t\t\t\t// We don't need an array for one selects\r\n\t\t\t\t\t\tif ( one ) {\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Multi-Selects return an array\r\n\t\t\t\t\t\tvalues.push( value );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn values;\r\n\t\t\t},\r\n\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tvar optionSet, option,\r\n\t\t\t\t\toptions = elem.options,\r\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\r\n\t\t\t\t\ti = options.length;\r\n\r\n\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\toption = options[ i ];\r\n\r\n\t\t\t\t\tif ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 ) {\r\n\r\n\t\t\t\t\t\t// Support: IE6\r\n\t\t\t\t\t\t// When new option element is added to select box we need to\r\n\t\t\t\t\t\t// force reflow of newly added node in order to workaround delay\r\n\t\t\t\t\t\t// of initialization properties\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\toption.selected = optionSet = true;\r\n\r\n\t\t\t\t\t\t} catch ( _ ) {\r\n\r\n\t\t\t\t\t\t\t// Will be executed only in IE6\r\n\t\t\t\t\t\t\toption.scrollHeight;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\toption.selected = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\r\n\t\t\t\tif ( !optionSet ) {\r\n\t\t\t\t\telem.selectedIndex = -1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn options;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n} );\r\n\r\n// Radios and checkboxes getter/setter\r\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\r\n\tjQuery.valHooks[ this ] = {\r\n\t\tset: function( elem, value ) {\r\n\t\t\tif ( jQuery.isArray( value ) ) {\r\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tif ( !support.checkOn ) {\r\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\r\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\r\n\t\t};\r\n\t}\r\n} );\r\n\r\n\r\n\r\n\r\nvar nodeHook, boolHook,\r\n\tattrHandle = jQuery.expr.attrHandle,\r\n\truseDefault = /^(?:checked|selected)$/i,\r\n\tgetSetAttribute = support.getSetAttribute,\r\n\tgetSetInput = support.input;\r\n\r\njQuery.fn.extend( {\r\n\tattr: function( name, value ) {\r\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\r\n\t},\r\n\r\n\tremoveAttr: function( name ) {\r\n\t\treturn this.each( function() {\r\n\t\t\tjQuery.removeAttr( this, name );\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\njQuery.extend( {\r\n\tattr: function( elem, name, value ) {\r\n\t\tvar ret, hooks,\r\n\t\t\tnType = elem.nodeType;\r\n\r\n\t\t// Don't get/set attributes on text, comment and attribute nodes\r\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Fallback to prop when attributes are not supported\r\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\r\n\t\t\treturn jQuery.prop( elem, name, value );\r\n\t\t}\r\n\r\n\t\t// All attributes are lowercase\r\n\t\t// Grab necessary hook if one is defined\r\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\r\n\t\t\tname = name.toLowerCase();\r\n\t\t\thooks = jQuery.attrHooks[ name ] ||\r\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );\r\n\t\t}\r\n\r\n\t\tif ( value !== undefined ) {\r\n\t\t\tif ( value === null ) {\r\n\t\t\t\tjQuery.removeAttr( elem, name );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif ( hooks && \"set\" in hooks &&\r\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\r\n\t\t\telem.setAttribute( name, value + \"\" );\r\n\t\t\treturn value;\r\n\t\t}\r\n\r\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\r\n\t\t\treturn ret;\r\n\t\t}\r\n\r\n\t\tret = jQuery.find.attr( elem, name );\r\n\r\n\t\t// Non-existent attributes return null, we normalize to undefined\r\n\t\treturn ret == null ? undefined : ret;\r\n\t},\r\n\r\n\tattrHooks: {\r\n\t\ttype: {\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\r\n\t\t\t\t\tjQuery.nodeName( elem, \"input\" ) ) {\r\n\r\n\t\t\t\t\t// Setting the type on a radio button after the value resets the value in IE8-9\r\n\t\t\t\t\t// Reset value to default in case type is set after value during creation\r\n\t\t\t\t\tvar val = elem.value;\r\n\t\t\t\t\telem.setAttribute( \"type\", value );\r\n\t\t\t\t\tif ( val ) {\r\n\t\t\t\t\t\telem.value = val;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tremoveAttr: function( elem, value ) {\r\n\t\tvar name, propName,\r\n\t\t\ti = 0,\r\n\t\t\tattrNames = value && value.match( rnotwhite );\r\n\r\n\t\tif ( attrNames && elem.nodeType === 1 ) {\r\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\r\n\t\t\t\tpropName = jQuery.propFix[ name ] || name;\r\n\r\n\t\t\t\t// Boolean attributes get special treatment (#10870)\r\n\t\t\t\tif ( jQuery.expr.match.bool.test( name ) ) {\r\n\r\n\t\t\t\t\t// Set corresponding property to false\r\n\t\t\t\t\tif ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\r\n\t\t\t\t\t\telem[ propName ] = false;\r\n\r\n\t\t\t\t\t// Support: IE<9\r\n\t\t\t\t\t// Also clear defaultChecked/defaultSelected (if appropriate)\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] =\r\n\t\t\t\t\t\t\telem[ propName ] = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// See #9699 for explanation of this approach (setting first, then removal)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tjQuery.attr( elem, name, \"\" );\r\n\t\t\t\t}\r\n\r\n\t\t\t\telem.removeAttribute( getSetAttribute ? name : propName );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n} );\r\n\r\n// Hooks for boolean attributes\r\nboolHook = {\r\n\tset: function( elem, value, name ) {\r\n\t\tif ( value === false ) {\r\n\r\n\t\t\t// Remove boolean attributes when set to false\r\n\t\t\tjQuery.removeAttr( elem, name );\r\n\t\t} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\r\n\r\n\t\t\t// IE<8 needs the *property* name\r\n\t\t\telem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// Support: IE<9\r\n\t\t\t// Use defaultChecked and defaultSelected for oldIE\r\n\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] = elem[ name ] = true;\r\n\t\t}\r\n\t\treturn name;\r\n\t}\r\n};\r\n\r\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( i, name ) {\r\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\r\n\r\n\tif ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\r\n\t\tattrHandle[ name ] = function( elem, name, isXML ) {\r\n\t\t\tvar ret, handle;\r\n\t\t\tif ( !isXML ) {\r\n\r\n\t\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\r\n\t\t\t\thandle = attrHandle[ name ];\r\n\t\t\t\tattrHandle[ name ] = ret;\r\n\t\t\t\tret = getter( elem, name, isXML ) != null ?\r\n\t\t\t\t\tname.toLowerCase() :\r\n\t\t\t\t\tnull;\r\n\t\t\t\tattrHandle[ name ] = handle;\r\n\t\t\t}\r\n\t\t\treturn ret;\r\n\t\t};\r\n\t} else {\r\n\t\tattrHandle[ name ] = function( elem, name, isXML ) {\r\n\t\t\tif ( !isXML ) {\r\n\t\t\t\treturn elem[ jQuery.camelCase( \"default-\" + name ) ] ?\r\n\t\t\t\t\tname.toLowerCase() :\r\n\t\t\t\t\tnull;\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n} );\r\n\r\n// fix oldIE attroperties\r\nif ( !getSetInput || !getSetAttribute ) {\r\n\tjQuery.attrHooks.value = {\r\n\t\tset: function( elem, value, name ) {\r\n\t\t\tif ( jQuery.nodeName( elem, \"input\" ) ) {\r\n\r\n\t\t\t\t// Does not return so that setAttribute is also used\r\n\t\t\t\telem.defaultValue = value;\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// Use nodeHook if defined (#1954); otherwise setAttribute is fine\r\n\t\t\t\treturn nodeHook && nodeHook.set( elem, value, name );\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// IE6/7 do not support getting/setting some attributes with get/setAttribute\r\nif ( !getSetAttribute ) {\r\n\r\n\t// Use this for any attribute in IE6/7\r\n\t// This fixes almost every IE6/7 issue\r\n\tnodeHook = {\r\n\t\tset: function( elem, value, name ) {\r\n\r\n\t\t\t// Set the existing or create a new attribute node\r\n\t\t\tvar ret = elem.getAttributeNode( name );\r\n\t\t\tif ( !ret ) {\r\n\t\t\t\telem.setAttributeNode(\r\n\t\t\t\t\t( ret = elem.ownerDocument.createAttribute( name ) )\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tret.value = value += \"\";\r\n\r\n\t\t\t// Break association with cloned elements by also using setAttribute (#9646)\r\n\t\t\tif ( name === \"value\" || value === elem.getAttribute( name ) ) {\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t// Some attributes are constructed with empty-string values when not defined\r\n\tattrHandle.id = attrHandle.name = attrHandle.coords =\r\n\t\tfunction( elem, name, isXML ) {\r\n\t\t\tvar ret;\r\n\t\t\tif ( !isXML ) {\r\n\t\t\t\treturn ( ret = elem.getAttributeNode( name ) ) && ret.value !== \"\" ?\r\n\t\t\t\t\tret.value :\r\n\t\t\t\t\tnull;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t// Fixing value retrieval on a button requires this module\r\n\tjQuery.valHooks.button = {\r\n\t\tget: function( elem, name ) {\r\n\t\t\tvar ret = elem.getAttributeNode( name );\r\n\t\t\tif ( ret && ret.specified ) {\r\n\t\t\t\treturn ret.value;\r\n\t\t\t}\r\n\t\t},\r\n\t\tset: nodeHook.set\r\n\t};\r\n\r\n\t// Set contenteditable to false on removals(#10429)\r\n\t// Setting to empty string throws an error as an invalid value\r\n\tjQuery.attrHooks.contenteditable = {\r\n\t\tset: function( elem, value, name ) {\r\n\t\t\tnodeHook.set( elem, value === \"\" ? false : value, name );\r\n\t\t}\r\n\t};\r\n\r\n\t// Set width and height to auto instead of 0 on empty string( Bug #8150 )\r\n\t// This is for removals\r\n\tjQuery.each( [ \"width\", \"height\" ], function( i, name ) {\r\n\t\tjQuery.attrHooks[ name ] = {\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tif ( value === \"\" ) {\r\n\t\t\t\t\telem.setAttribute( name, \"auto\" );\r\n\t\t\t\t\treturn value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t} );\r\n}\r\n\r\nif ( !support.style ) {\r\n\tjQuery.attrHooks.style = {\r\n\t\tget: function( elem ) {\r\n\r\n\t\t\t// Return undefined in the case of empty string\r\n\t\t\t// Note: IE uppercases css property names, but if we were to .toLowerCase()\r\n\t\t\t// .cssText, that would destroy case sensitivity in URL's, like in \"background\"\r\n\t\t\treturn elem.style.cssText || undefined;\r\n\t\t},\r\n\t\tset: function( elem, value ) {\r\n\t\t\treturn ( elem.style.cssText = value + \"\" );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n\r\n\r\n\r\nvar rfocusable = /^(?:input|select|textarea|button|object)$/i,\r\n\trclickable = /^(?:a|area)$/i;\r\n\r\njQuery.fn.extend( {\r\n\tprop: function( name, value ) {\r\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\r\n\t},\r\n\r\n\tremoveProp: function( name ) {\r\n\t\tname = jQuery.propFix[ name ] || name;\r\n\t\treturn this.each( function() {\r\n\r\n\t\t\t// try/catch handles cases where IE balks (such as removing a property on window)\r\n\t\t\ttry {\r\n\t\t\t\tthis[ name ] = undefined;\r\n\t\t\t\tdelete this[ name ];\r\n\t\t\t} catch ( e ) {}\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\njQuery.extend( {\r\n\tprop: function( elem, name, value ) {\r\n\t\tvar ret, hooks,\r\n\t\t\tnType = elem.nodeType;\r\n\r\n\t\t// Don't get/set properties on text, comment and attribute nodes\r\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\r\n\r\n\t\t\t// Fix name and attach hooks\r\n\t\t\tname = jQuery.propFix[ name ] || name;\r\n\t\t\thooks = jQuery.propHooks[ name ];\r\n\t\t}\r\n\r\n\t\tif ( value !== undefined ) {\r\n\t\t\tif ( hooks && \"set\" in hooks &&\r\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\r\n\t\t\treturn ( elem[ name ] = value );\r\n\t\t}\r\n\r\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\r\n\t\t\treturn ret;\r\n\t\t}\r\n\r\n\t\treturn elem[ name ];\r\n\t},\r\n\r\n\tpropHooks: {\r\n\t\ttabIndex: {\r\n\t\t\tget: function( elem ) {\r\n\r\n\t\t\t\t// elem.tabIndex doesn't always return the\r\n\t\t\t\t// correct value when it hasn't been explicitly set\r\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\r\n\t\t\t\t// Use proper attribute retrieval(#12072)\r\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\r\n\r\n\t\t\t\treturn tabindex ?\r\n\t\t\t\t\tparseInt( tabindex, 10 ) :\r\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\r\n\t\t\t\t\t\trclickable.test( elem.nodeName ) && elem.href ?\r\n\t\t\t\t\t\t\t0 :\r\n\t\t\t\t\t\t\t-1;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tpropFix: {\r\n\t\t\"for\": \"htmlFor\",\r\n\t\t\"class\": \"className\"\r\n\t}\r\n} );\r\n\r\n// Some attributes require a special call on IE\r\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\r\nif ( !support.hrefNormalized ) {\r\n\r\n\t// href/src property should get the full normalized URL (#10299/#12915)\r\n\tjQuery.each( [ \"href\", \"src\" ], function( i, name ) {\r\n\t\tjQuery.propHooks[ name ] = {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\treturn elem.getAttribute( name, 4 );\r\n\t\t\t}\r\n\t\t};\r\n\t} );\r\n}\r\n\r\n// Support: Safari, IE9+\r\n// Accessing the selectedIndex property\r\n// forces the browser to respect setting selected\r\n// on the option\r\n// The getter ensures a default option is selected\r\n// when in an optgroup\r\nif ( !support.optSelected ) {\r\n\tjQuery.propHooks.selected = {\r\n\t\tget: function( elem ) {\r\n\t\t\tvar parent = elem.parentNode;\r\n\r\n\t\t\tif ( parent ) {\r\n\t\t\t\tparent.selectedIndex;\r\n\r\n\t\t\t\t// Make sure that it also works with optgroups, see #5701\r\n\t\t\t\tif ( parent.parentNode ) {\r\n\t\t\t\t\tparent.parentNode.selectedIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tset: function( elem ) {\r\n\t\t\tvar parent = elem.parentNode;\r\n\t\t\tif ( parent ) {\r\n\t\t\t\tparent.selectedIndex;\r\n\r\n\t\t\t\tif ( parent.parentNode ) {\r\n\t\t\t\t\tparent.parentNode.selectedIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\njQuery.each( [\r\n\t\"tabIndex\",\r\n\t\"readOnly\",\r\n\t\"maxLength\",\r\n\t\"cellSpacing\",\r\n\t\"cellPadding\",\r\n\t\"rowSpan\",\r\n\t\"colSpan\",\r\n\t\"useMap\",\r\n\t\"frameBorder\",\r\n\t\"contentEditable\"\r\n], function() {\r\n\tjQuery.propFix[ this.toLowerCase() ] = this;\r\n} );\r\n\r\n// IE6/7 call enctype encoding\r\nif ( !support.enctype ) {\r\n\tjQuery.propFix.enctype = \"encoding\";\r\n}\r\n\r\n\r\n\r\n\r\nvar rclass = /[\\t\\r\\n\\f]/g;\r\n\r\nfunction getClass( elem ) {\r\n\treturn jQuery.attr( elem, \"class\" ) || \"\";\r\n}\r\n\r\njQuery.fn.extend( {\r\n\taddClass: function( value ) {\r\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\r\n\t\t\ti = 0;\r\n\r\n\t\tif ( jQuery.isFunction( value ) ) {\r\n\t\t\treturn this.each( function( j ) {\r\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\tif ( typeof value === \"string\" && value ) {\r\n\t\t\tclasses = value.match( rnotwhite ) || [];\r\n\r\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\r\n\t\t\t\tcurValue = getClass( elem );\r\n\t\t\t\tcur = elem.nodeType === 1 &&\r\n\t\t\t\t\t( \" \" + curValue + \" \" ).replace( rclass, \" \" );\r\n\r\n\t\t\t\tif ( cur ) {\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\r\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\r\n\t\t\t\t\t\t\tcur += clazz + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// only assign if different to avoid unneeded rendering.\r\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\r\n\t\t\t\t\tif ( curValue !== finalValue ) {\r\n\t\t\t\t\t\tjQuery.attr( elem, \"class\", finalValue );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveClass: function( value ) {\r\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\r\n\t\t\ti = 0;\r\n\r\n\t\tif ( jQuery.isFunction( value ) ) {\r\n\t\t\treturn this.each( function( j ) {\r\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\tif ( !arguments.length ) {\r\n\t\t\treturn this.attr( \"class\", \"\" );\r\n\t\t}\r\n\r\n\t\tif ( typeof value === \"string\" && value ) {\r\n\t\t\tclasses = value.match( rnotwhite ) || [];\r\n\r\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\r\n\t\t\t\tcurValue = getClass( elem );\r\n\r\n\t\t\t\t// This expression is here for better compressibility (see addClass)\r\n\t\t\t\tcur = elem.nodeType === 1 &&\r\n\t\t\t\t\t( \" \" + curValue + \" \" ).replace( rclass, \" \" );\r\n\r\n\t\t\t\tif ( cur ) {\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\r\n\r\n\t\t\t\t\t\t// Remove *all* instances\r\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) > -1 ) {\r\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\r\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\r\n\t\t\t\t\tif ( curValue !== finalValue ) {\r\n\t\t\t\t\t\tjQuery.attr( elem, \"class\", finalValue );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\ttoggleClass: function( value, stateVal ) {\r\n\t\tvar type = typeof value;\r\n\r\n\t\tif ( typeof stateVal === \"boolean\" && type === \"string\" ) {\r\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\r\n\t\t}\r\n\r\n\t\tif ( jQuery.isFunction( value ) ) {\r\n\t\t\treturn this.each( function( i ) {\r\n\t\t\t\tjQuery( this ).toggleClass(\r\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\r\n\t\t\t\t\tstateVal\r\n\t\t\t\t);\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\treturn this.each( function() {\r\n\t\t\tvar className, i, self, classNames;\r\n\r\n\t\t\tif ( type === \"string\" ) {\r\n\r\n\t\t\t\t// Toggle individual class names\r\n\t\t\t\ti = 0;\r\n\t\t\t\tself = jQuery( this );\r\n\t\t\t\tclassNames = value.match( rnotwhite ) || [];\r\n\r\n\t\t\t\twhile ( ( className = classNames[ i++ ] ) ) {\r\n\r\n\t\t\t\t\t// Check each className given, space separated list\r\n\t\t\t\t\tif ( self.hasClass( className ) ) {\r\n\t\t\t\t\t\tself.removeClass( className );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tself.addClass( className );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t// Toggle whole class name\r\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\r\n\t\t\t\tclassName = getClass( this );\r\n\t\t\t\tif ( className ) {\r\n\r\n\t\t\t\t\t// store className if set\r\n\t\t\t\t\tjQuery._data( this, \"__className__\", className );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If the element has a class name or if we're passed \"false\",\r\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\r\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\r\n\t\t\t\t// falling back to the empty string if nothing was stored.\r\n\t\t\t\tjQuery.attr( this, \"class\",\r\n\t\t\t\t\tclassName || value === false ?\r\n\t\t\t\t\t\"\" :\r\n\t\t\t\t\tjQuery._data( this, \"__className__\" ) || \"\"\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\thasClass: function( selector ) {\r\n\t\tvar className, elem,\r\n\t\t\ti = 0;\r\n\r\n\t\tclassName = \" \" + selector + \" \";\r\n\t\twhile ( ( elem = this[ i++ ] ) ) {\r\n\t\t\tif ( elem.nodeType === 1 &&\r\n\t\t\t\t( \" \" + getClass( elem ) + \" \" ).replace( rclass, \" \" )\r\n\t\t\t\t\t.indexOf( className ) > -1\r\n\t\t\t) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n} );\r\n\r\n\r\n\r\n\r\n// Return jQuery for attributes-only inclusion\r\n\r\n\r\njQuery.each( ( \"blur focus focusin focusout load resize scroll unload click dblclick \" +\r\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\r\n\t\"change select submit keydown keypress keyup error contextmenu\" ).split( \" \" ),\r\n\tfunction( i, name ) {\r\n\r\n\t// Handle event binding\r\n\tjQuery.fn[ name ] = function( data, fn ) {\r\n\t\treturn arguments.length > 0 ?\r\n\t\t\tthis.on( name, null, data, fn ) :\r\n\t\t\tthis.trigger( name );\r\n\t};\r\n} );\r\n\r\njQuery.fn.extend( {\r\n\thover: function( fnOver, fnOut ) {\r\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\r\n\t}\r\n} );\r\n\r\n\r\nvar location = window.location;\r\n\r\nvar nonce = jQuery.now();\r\n\r\nvar rquery = ( /\\?/ );\r\n\r\n\r\n\r\nvar rvalidtokens = /(,)|(\\[|{)|(}|])|\"(?:[^\"\\\\\\r\\n]|\\\\[\"\\\\\\/bfnrt]|\\\\u[\\da-fA-F]{4})*\"\\s*:?|true|false|null|-?(?!0\\d)\\d+(?:\\.\\d+|)(?:[eE][+-]?\\d+|)/g;\r\n\r\njQuery.parseJSON = function( data ) {\r\n\r\n\t// Attempt to parse using the native JSON parser first\r\n\tif ( window.JSON && window.JSON.parse ) {\r\n\r\n\t\t// Support: Android 2.3\r\n\t\t// Workaround failure to string-cast null input\r\n\t\treturn window.JSON.parse( data + \"\" );\r\n\t}\r\n\r\n\tvar requireNonComma,\r\n\t\tdepth = null,\r\n\t\tstr = jQuery.trim( data + \"\" );\r\n\r\n\t// Guard against invalid (and possibly dangerous) input by ensuring that nothing remains\r\n\t// after removing valid tokens\r\n\treturn str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) {\r\n\r\n\t\t// Force termination if we see a misplaced comma\r\n\t\tif ( requireNonComma && comma ) {\r\n\t\t\tdepth = 0;\r\n\t\t}\r\n\r\n\t\t// Perform no more replacements after returning to outermost depth\r\n\t\tif ( depth === 0 ) {\r\n\t\t\treturn token;\r\n\t\t}\r\n\r\n\t\t// Commas must not follow \"[\", \"{\", or \",\"\r\n\t\trequireNonComma = open || comma;\r\n\r\n\t\t// Determine new depth\r\n\t\t// array/object open (\"[\" or \"{\"): depth += true - false (increment)\r\n\t\t// array/object close (\"]\" or \"}\"): depth += false - true (decrement)\r\n\t\t// other cases (\",\" or primitive): depth += true - true (numeric cast)\r\n\t\tdepth += !close - !open;\r\n\r\n\t\t// Remove this token\r\n\t\treturn \"\";\r\n\t} ) ) ?\r\n\t\t( Function( \"return \" + str ) )() :\r\n\t\tjQuery.error( \"Invalid JSON: \" + data );\r\n};\r\n\r\n\r\n// Cross-browser xml parsing\r\njQuery.parseXML = function( data ) {\r\n\tvar xml, tmp;\r\n\tif ( !data || typeof data !== \"string\" ) {\r\n\t\treturn null;\r\n\t}\r\n\ttry {\r\n\t\tif ( window.DOMParser ) { // Standard\r\n\t\t\ttmp = new window.DOMParser();\r\n\t\t\txml = tmp.parseFromString( data, \"text/xml\" );\r\n\t\t} else { // IE\r\n\t\t\txml = new window.ActiveXObject( \"Microsoft.XMLDOM\" );\r\n\t\t\txml.async = \"false\";\r\n\t\t\txml.loadXML( data );\r\n\t\t}\r\n\t} catch ( e ) {\r\n\t\txml = undefined;\r\n\t}\r\n\tif ( !xml || !xml.documentElement || xml.getElementsByTagName( \"parsererror\" ).length ) {\r\n\t\tjQuery.error( \"Invalid XML: \" + data );\r\n\t}\r\n\treturn xml;\r\n};\r\n\r\n\r\nvar\r\n\trhash = /#.*$/,\r\n\trts = /([?&])_=[^&]*/,\r\n\r\n\t// IE leaves an \\r character at EOL\r\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg,\r\n\r\n\t// #7653, #8125, #8152: local protocol detection\r\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\r\n\trnoContent = /^(?:GET|HEAD)$/,\r\n\trprotocol = /^\\/\\//,\r\n\trurl = /^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,\r\n\r\n\t/* Prefilters\r\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\r\n\t * 2) These are called:\r\n\t * - BEFORE asking for a transport\r\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\r\n\t * 3) key is the dataType\r\n\t * 4) the catchall symbol \"*\" can be used\r\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\r\n\t */\r\n\tprefilters = {},\r\n\r\n\t/* Transports bindings\r\n\t * 1) key is the dataType\r\n\t * 2) the catchall symbol \"*\" can be used\r\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\r\n\t */\r\n\ttransports = {},\r\n\r\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\r\n\tallTypes = \"*/\".concat( \"*\" ),\r\n\r\n\t// Document location\r\n\tajaxLocation = location.href,\r\n\r\n\t// Segment location into parts\r\n\tajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];\r\n\r\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\r\nfunction addToPrefiltersOrTransports( structure ) {\r\n\r\n\t// dataTypeExpression is optional and defaults to \"*\"\r\n\treturn function( dataTypeExpression, func ) {\r\n\r\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\r\n\t\t\tfunc = dataTypeExpression;\r\n\t\t\tdataTypeExpression = \"*\";\r\n\t\t}\r\n\r\n\t\tvar dataType,\r\n\t\t\ti = 0,\r\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];\r\n\r\n\t\tif ( jQuery.isFunction( func ) ) {\r\n\r\n\t\t\t// For each dataType in the dataTypeExpression\r\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\r\n\r\n\t\t\t\t// Prepend if requested\r\n\t\t\t\tif ( dataType.charAt( 0 ) === \"+\" ) {\r\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\r\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\r\n\r\n\t\t\t\t// Otherwise append\r\n\t\t\t\t} else {\r\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// Base inspection function for prefilters and transports\r\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\r\n\r\n\tvar inspected = {},\r\n\t\tseekingTransport = ( structure === transports );\r\n\r\n\tfunction inspect( dataType ) {\r\n\t\tvar selected;\r\n\t\tinspected[ dataType ] = true;\r\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\r\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\r\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\r\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\r\n\r\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\r\n\t\t\t\tinspect( dataTypeOrTransport );\r\n\t\t\t\treturn false;\r\n\t\t\t} else if ( seekingTransport ) {\r\n\t\t\t\treturn !( selected = dataTypeOrTransport );\r\n\t\t\t}\r\n\t\t} );\r\n\t\treturn selected;\r\n\t}\r\n\r\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\r\n}\r\n\r\n// A special extend for ajax options\r\n// that takes \"flat\" options (not to be deep extended)\r\n// Fixes #9887\r\nfunction ajaxExtend( target, src ) {\r\n\tvar deep, key,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}\r\n\r\n/* Handles responses to an ajax request:\r\n * - finds the right dataType (mediates between content-type and expected dataType)\r\n * - returns the corresponding response\r\n */\r\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\r\n\tvar firstDataType, ct, finalDataType, type,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes;\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}\r\n\r\n/* Chain conversions given the request and the original response\r\n * Also sets the responseXXX fields on the jqXHR instance\r\n */\r\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\r\n\tvar conv2, current, conv, tmp, prev,\r\n\t\tconverters = {},\r\n\r\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\r\n\t\tdataTypes = s.dataTypes.slice();\r\n\r\n\t// Create converters map with lowercased keys\r\n\tif ( dataTypes[ 1 ] ) {\r\n\t\tfor ( conv in s.converters ) {\r\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\r\n\t\t}\r\n\t}\r\n\r\n\tcurrent = dataTypes.shift();\r\n\r\n\t// Convert to each sequential dataType\r\n\twhile ( current ) {\r\n\r\n\t\tif ( s.responseFields[ current ] ) {\r\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\r\n\t\t}\r\n\r\n\t\t// Apply the dataFilter if provided\r\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\r\n\t\t\tresponse = s.dataFilter( response, s.dataType );\r\n\t\t}\r\n\r\n\t\tprev = current;\r\n\t\tcurrent = dataTypes.shift();\r\n\r\n\t\tif ( current ) {\r\n\r\n\t\t\t// There's only work to do if current dataType is non-auto\r\n\t\t\tif ( current === \"*\" ) {\r\n\r\n\t\t\t\tcurrent = prev;\r\n\r\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\r\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\r\n\r\n\t\t\t\t// Seek a direct converter\r\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\r\n\r\n\t\t\t\t// If none found, seek a pair\r\n\t\t\t\tif ( !conv ) {\r\n\t\t\t\t\tfor ( conv2 in converters ) {\r\n\r\n\t\t\t\t\t\t// If conv2 outputs current\r\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\r\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\r\n\r\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\r\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\r\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\r\n\t\t\t\t\t\t\tif ( conv ) {\r\n\r\n\t\t\t\t\t\t\t\t// Condense equivalence converters\r\n\t\t\t\t\t\t\t\tif ( conv === true ) {\r\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\r\n\r\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\r\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\r\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\r\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Apply converter (if not an equivalence)\r\n\t\t\t\tif ( conv !== true ) {\r\n\r\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\r\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) { // jscs:ignore requireDotNotation\r\n\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\r\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn { state: \"success\", data: response };\r\n}\r\n\r\njQuery.extend( {\r\n\r\n\t// Counter for holding the number of active queries\r\n\tactive: 0,\r\n\r\n\t// Last-Modified header cache for next request\r\n\tlastModified: {},\r\n\tetag: {},\r\n\r\n\tajaxSettings: {\r\n\t\turl: ajaxLocation,\r\n\t\ttype: \"GET\",\r\n\t\tisLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),\r\n\t\tglobal: true,\r\n\t\tprocessData: true,\r\n\t\tasync: true,\r\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\r\n\t\t/*\r\n\t\ttimeout: 0,\r\n\t\tdata: null,\r\n\t\tdataType: null,\r\n\t\tusername: null,\r\n\t\tpassword: null,\r\n\t\tcache: null,\r\n\t\tthrows: false,\r\n\t\ttraditional: false,\r\n\t\theaders: {},\r\n\t\t*/\r\n\r\n\t\taccepts: {\r\n\t\t\t\"*\": allTypes,\r\n\t\t\ttext: \"text/plain\",\r\n\t\t\thtml: \"text/html\",\r\n\t\t\txml: \"application/xml, text/xml\",\r\n\t\t\tjson: \"application/json, text/javascript\"\r\n\t\t},\r\n\r\n\t\tcontents: {\r\n\t\t\txml: /\\bxml\\b/,\r\n\t\t\thtml: /\\bhtml/,\r\n\t\t\tjson: /\\bjson\\b/\r\n\t\t},\r\n\r\n\t\tresponseFields: {\r\n\t\t\txml: \"responseXML\",\r\n\t\t\ttext: \"responseText\",\r\n\t\t\tjson: \"responseJSON\"\r\n\t\t},\r\n\r\n\t\t// Data converters\r\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\r\n\t\tconverters: {\r\n\r\n\t\t\t// Convert anything to text\r\n\t\t\t\"* text\": String,\r\n\r\n\t\t\t// Text to html (true = no transformation)\r\n\t\t\t\"text html\": true,\r\n\r\n\t\t\t// Evaluate text as a json expression\r\n\t\t\t\"text json\": jQuery.parseJSON,\r\n\r\n\t\t\t// Parse text as xml\r\n\t\t\t\"text xml\": jQuery.parseXML\r\n\t\t},\r\n\r\n\t\t// For options that shouldn't be deep extended:\r\n\t\t// you can add your own custom options here if\r\n\t\t// and when you create one that shouldn't be\r\n\t\t// deep extended (see ajaxExtend)\r\n\t\tflatOptions: {\r\n\t\t\turl: true,\r\n\t\t\tcontext: true\r\n\t\t}\r\n\t},\r\n\r\n\t// Creates a full fledged settings object into target\r\n\t// with both ajaxSettings and settings fields.\r\n\t// If target is omitted, writes into ajaxSettings.\r\n\tajaxSetup: function( target, settings ) {\r\n\t\treturn settings ?\r\n\r\n\t\t\t// Building a settings object\r\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\r\n\r\n\t\t\t// Extending ajaxSettings\r\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\r\n\t},\r\n\r\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\r\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\r\n\r\n\t// Main method\r\n\tajax: function( url, options ) {\r\n\r\n\t\t// If url is an object, simulate pre-1.5 signature\r\n\t\tif ( typeof url === \"object\" ) {\r\n\t\t\toptions = url;\r\n\t\t\turl = undefined;\r\n\t\t}\r\n\r\n\t\t// Force options to be an object\r\n\t\toptions = options || {};\r\n\r\n\t\tvar\r\n\r\n\t\t\t// Cross-domain detection vars\r\n\t\t\tparts,\r\n\r\n\t\t\t// Loop variable\r\n\t\t\ti,\r\n\r\n\t\t\t// URL without anti-cache param\r\n\t\t\tcacheURL,\r\n\r\n\t\t\t// Response headers as string\r\n\t\t\tresponseHeadersString,\r\n\r\n\t\t\t// timeout handle\r\n\t\t\ttimeoutTimer,\r\n\r\n\t\t\t// To know if global events are to be dispatched\r\n\t\t\tfireGlobals,\r\n\r\n\t\t\ttransport,\r\n\r\n\t\t\t// Response headers\r\n\t\t\tresponseHeaders,\r\n\r\n\t\t\t// Create the final options object\r\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\r\n\r\n\t\t\t// Callbacks context\r\n\t\t\tcallbackContext = s.context || s,\r\n\r\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\r\n\t\t\tglobalEventContext = s.context &&\r\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\r\n\t\t\t\t\tjQuery( callbackContext ) :\r\n\t\t\t\t\tjQuery.event,\r\n\r\n\t\t\t// Deferreds\r\n\t\t\tdeferred = jQuery.Deferred(),\r\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\r\n\r\n\t\t\t// Status-dependent callbacks\r\n\t\t\tstatusCode = s.statusCode || {},\r\n\r\n\t\t\t// Headers (they are sent all at once)\r\n\t\t\trequestHeaders = {},\r\n\t\t\trequestHeadersNames = {},\r\n\r\n\t\t\t// The jqXHR state\r\n\t\t\tstate = 0,\r\n\r\n\t\t\t// Default abort message\r\n\t\t\tstrAbort = \"canceled\",\r\n\r\n\t\t\t// Fake xhr\r\n\t\t\tjqXHR = {\r\n\t\t\t\treadyState: 0,\r\n\r\n\t\t\t\t// Builds headers hashtable if needed\r\n\t\t\t\tgetResponseHeader: function( key ) {\r\n\t\t\t\t\tvar match;\r\n\t\t\t\t\tif ( state === 2 ) {\r\n\t\t\t\t\t\tif ( !responseHeaders ) {\r\n\t\t\t\t\t\t\tresponseHeaders = {};\r\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\r\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn match == null ? null : match;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Raw string\r\n\t\t\t\tgetAllResponseHeaders: function() {\r\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Caches the header\r\n\t\t\t\tsetRequestHeader: function( name, value ) {\r\n\t\t\t\t\tvar lname = name.toLowerCase();\r\n\t\t\t\t\tif ( !state ) {\r\n\t\t\t\t\t\tname = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\r\n\t\t\t\t\t\trequestHeaders[ name ] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Overrides response content-type header\r\n\t\t\t\toverrideMimeType: function( type ) {\r\n\t\t\t\t\tif ( !state ) {\r\n\t\t\t\t\t\ts.mimeType = type;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Status-dependent callbacks\r\n\t\t\t\tstatusCode: function( map ) {\r\n\t\t\t\t\tvar code;\r\n\t\t\t\t\tif ( map ) {\r\n\t\t\t\t\t\tif ( state < 2 ) {\r\n\t\t\t\t\t\t\tfor ( code in map ) {\r\n\r\n\t\t\t\t\t\t\t\t// Lazy-add the new callback in a way that preserves old ones\r\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\r\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Cancel the request\r\n\t\t\t\tabort: function( statusText ) {\r\n\t\t\t\t\tvar finalText = statusText || strAbort;\r\n\t\t\t\t\tif ( transport ) {\r\n\t\t\t\t\t\ttransport.abort( finalText );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdone( 0, finalText );\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t// Attach deferreds\r\n\t\tdeferred.promise( jqXHR ).complete = completeDeferred.add;\r\n\t\tjqXHR.success = jqXHR.done;\r\n\t\tjqXHR.error = jqXHR.fail;\r\n\r\n\t\t// Remove hash character (#7531: and string promotion)\r\n\t\t// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)\r\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\r\n\t\t// We also use the url parameter if available\r\n\t\ts.url = ( ( url || s.url || ajaxLocation ) + \"\" )\r\n\t\t\t.replace( rhash, \"\" )\r\n\t\t\t.replace( rprotocol, ajaxLocParts[ 1 ] + \"//\" );\r\n\r\n\t\t// Alias method option to type as per ticket #12004\r\n\t\ts.type = options.method || options.type || s.method || s.type;\r\n\r\n\t\t// Extract dataTypes list\r\n\t\ts.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().match( rnotwhite ) || [ \"\" ];\r\n\r\n\t\t// A cross-domain request is in order when we have a protocol:host:port mismatch\r\n\t\tif ( s.crossDomain == null ) {\r\n\t\t\tparts = rurl.exec( s.url.toLowerCase() );\r\n\t\t\ts.crossDomain = !!( parts &&\r\n\t\t\t\t( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||\r\n\t\t\t\t\t( parts[ 3 ] || ( parts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) !==\r\n\t\t\t\t\t\t( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) )\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// Convert data if not already a string\r\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\r\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\r\n\t\t}\r\n\r\n\t\t// Apply prefilters\r\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\r\n\r\n\t\t// If request was aborted inside a prefilter, stop there\r\n\t\tif ( state === 2 ) {\r\n\t\t\treturn jqXHR;\r\n\t\t}\r\n\r\n\t\t// We can fire global events as of now if asked to\r\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\r\n\t\tfireGlobals = jQuery.event && s.global;\r\n\r\n\t\t// Watch for a new set of requests\r\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\r\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\r\n\t\t}\r\n\r\n\t\t// Uppercase the type\r\n\t\ts.type = s.type.toUpperCase();\r\n\r\n\t\t// Determine if request has content\r\n\t\ts.hasContent = !rnoContent.test( s.type );\r\n\r\n\t\t// Save the URL in case we're toying with the If-Modified-Since\r\n\t\t// and/or If-None-Match header later on\r\n\t\tcacheURL = s.url;\r\n\r\n\t\t// More options handling for requests with no content\r\n\t\tif ( !s.hasContent ) {\r\n\r\n\t\t\t// If data is available, append data to url\r\n\t\t\tif ( s.data ) {\r\n\t\t\t\tcacheURL = ( s.url += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data );\r\n\r\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\r\n\t\t\t\tdelete s.data;\r\n\t\t\t}\r\n\r\n\t\t\t// Add anti-cache in url if needed\r\n\t\t\tif ( s.cache === false ) {\r\n\t\t\t\ts.url = rts.test( cacheURL ) ?\r\n\r\n\t\t\t\t\t// If there is already a '_' parameter, set its value\r\n\t\t\t\t\tcacheURL.replace( rts, \"$1_=\" + nonce++ ) :\r\n\r\n\t\t\t\t\t// Otherwise add one to the end\r\n\t\t\t\t\tcacheURL + ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + nonce++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\r\n\t\tif ( s.ifModified ) {\r\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\r\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\r\n\t\t\t}\r\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\r\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Set the correct header, if data is being sent\r\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\r\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\r\n\t\t}\r\n\r\n\t\t// Set the Accepts header for the server, depending on the dataType\r\n\t\tjqXHR.setRequestHeader(\r\n\t\t\t\"Accept\",\r\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\r\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\r\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\r\n\t\t\t\ts.accepts[ \"*\" ]\r\n\t\t);\r\n\r\n\t\t// Check for headers option\r\n\t\tfor ( i in s.headers ) {\r\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\r\n\t\t}\r\n\r\n\t\t// Allow custom headers/mimetypes and early abort\r\n\t\tif ( s.beforeSend &&\r\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\r\n\r\n\t\t\t// Abort if not done already and return\r\n\t\t\treturn jqXHR.abort();\r\n\t\t}\r\n\r\n\t\t// aborting is no longer a cancellation\r\n\t\tstrAbort = \"abort\";\r\n\r\n\t\t// Install callbacks on deferreds\r\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\r\n\t\t\tjqXHR[ i ]( s[ i ] );\r\n\t\t}\r\n\r\n\t\t// Get transport\r\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\r\n\r\n\t\t// If no transport, we auto-abort\r\n\t\tif ( !transport ) {\r\n\t\t\tdone( -1, \"No Transport\" );\r\n\t\t} else {\r\n\t\t\tjqXHR.readyState = 1;\r\n\r\n\t\t\t// Send global event\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\r\n\t\t\t}\r\n\r\n\t\t\t// If request was aborted inside ajaxSend, stop there\r\n\t\t\tif ( state === 2 ) {\r\n\t\t\t\treturn jqXHR;\r\n\t\t\t}\r\n\r\n\t\t\t// Timeout\r\n\t\t\tif ( s.async && s.timeout > 0 ) {\r\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\r\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\r\n\t\t\t\t}, s.timeout );\r\n\t\t\t}\r\n\r\n\t\t\ttry {\r\n\t\t\t\tstate = 1;\r\n\t\t\t\ttransport.send( requestHeaders, done );\r\n\t\t\t} catch ( e ) {\r\n\r\n\t\t\t\t// Propagate exception as error if not done\r\n\t\t\t\tif ( state < 2 ) {\r\n\t\t\t\t\tdone( -1, e );\r\n\r\n\t\t\t\t// Simply rethrow otherwise\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow e;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Callback for when everything is done\r\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\r\n\t\t\tvar isSuccess, success, error, response, modified,\r\n\t\t\t\tstatusText = nativeStatusText;\r\n\r\n\t\t\t// Called once\r\n\t\t\tif ( state === 2 ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// State is \"done\" now\r\n\t\t\tstate = 2;\r\n\r\n\t\t\t// Clear timeout if it exists\r\n\t\t\tif ( timeoutTimer ) {\r\n\t\t\t\twindow.clearTimeout( timeoutTimer );\r\n\t\t\t}\r\n\r\n\t\t\t// Dereference transport for early garbage collection\r\n\t\t\t// (no matter how long the jqXHR object will be used)\r\n\t\t\ttransport = undefined;\r\n\r\n\t\t\t// Cache response headers\r\n\t\t\tresponseHeadersString = headers || \"\";\r\n\r\n\t\t\t// Set readyState\r\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\r\n\r\n\t\t\t// Determine if successful\r\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\r\n\r\n\t\t\t// Get response data\r\n\t\t\tif ( responses ) {\r\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\r\n\t\t\t}\r\n\r\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\r\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\r\n\r\n\t\t\t// If successful, handle type chaining\r\n\t\t\tif ( isSuccess ) {\r\n\r\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\r\n\t\t\t\tif ( s.ifModified ) {\r\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\r\n\t\t\t\t\tif ( modified ) {\r\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\r\n\t\t\t\t\tif ( modified ) {\r\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// if no content\r\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\r\n\t\t\t\t\tstatusText = \"nocontent\";\r\n\r\n\t\t\t\t// if not modified\r\n\t\t\t\t} else if ( status === 304 ) {\r\n\t\t\t\t\tstatusText = \"notmodified\";\r\n\r\n\t\t\t\t// If we have data, let's convert it\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstatusText = response.state;\r\n\t\t\t\t\tsuccess = response.data;\r\n\t\t\t\t\terror = response.error;\r\n\t\t\t\t\tisSuccess = !error;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// We extract error from statusText\r\n\t\t\t\t// then normalize statusText and status for non-aborts\r\n\t\t\t\terror = statusText;\r\n\t\t\t\tif ( status || !statusText ) {\r\n\t\t\t\t\tstatusText = \"error\";\r\n\t\t\t\t\tif ( status < 0 ) {\r\n\t\t\t\t\t\tstatus = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Set data for the fake xhr object\r\n\t\t\tjqXHR.status = status;\r\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\r\n\r\n\t\t\t// Success/Error\r\n\t\t\tif ( isSuccess ) {\r\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\r\n\t\t\t} else {\r\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\r\n\t\t\t}\r\n\r\n\t\t\t// Status-dependent callbacks\r\n\t\t\tjqXHR.statusCode( statusCode );\r\n\t\t\tstatusCode = undefined;\r\n\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\r\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\r\n\t\t\t}\r\n\r\n\t\t\t// Complete\r\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\r\n\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\r\n\r\n\t\t\t\t// Handle the global AJAX counter\r\n\t\t\t\tif ( !( --jQuery.active ) ) {\r\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn jqXHR;\r\n\t},\r\n\r\n\tgetJSON: function( url, data, callback ) {\r\n\t\treturn jQuery.get( url, data, callback, \"json\" );\r\n\t},\r\n\r\n\tgetScript: function( url, callback ) {\r\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\r\n\t}\r\n} );\r\n\r\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\r\n\tjQuery[ method ] = function( url, data, callback, type ) {\r\n\r\n\t\t// shift arguments if data argument was omitted\r\n\t\tif ( jQuery.isFunction( data ) ) {\r\n\t\t\ttype = type || callback;\r\n\t\t\tcallback = data;\r\n\t\t\tdata = undefined;\r\n\t\t}\r\n\r\n\t\t// The url can be an options object (which then must have .url)\r\n\t\treturn jQuery.ajax( jQuery.extend( {\r\n\t\t\turl: url,\r\n\t\t\ttype: method,\r\n\t\t\tdataType: type,\r\n\t\t\tdata: data,\r\n\t\t\tsuccess: callback\r\n\t\t}, jQuery.isPlainObject( url ) && url ) );\r\n\t};\r\n} );\r\n\r\n\r\njQuery._evalUrl = function( url ) {\r\n\treturn jQuery.ajax( {\r\n\t\turl: url,\r\n\r\n\t\t// Make this explicit, since user can override this through ajaxSetup (#11264)\r\n\t\ttype: \"GET\",\r\n\t\tdataType: \"script\",\r\n\t\tcache: true,\r\n\t\tasync: false,\r\n\t\tglobal: false,\r\n\t\t\"throws\": true\r\n\t} );\r\n};\r\n\r\n\r\njQuery.fn.extend( {\r\n\twrapAll: function( html ) {\r\n\t\tif ( jQuery.isFunction( html ) ) {\r\n\t\t\treturn this.each( function( i ) {\r\n\t\t\t\tjQuery( this ).wrapAll( html.call( this, i ) );\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\tif ( this[ 0 ] ) {\r\n\r\n\t\t\t// The elements to wrap the target around\r\n\t\t\tvar wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\r\n\r\n\t\t\tif ( this[ 0 ].parentNode ) {\r\n\t\t\t\twrap.insertBefore( this[ 0 ] );\r\n\t\t\t}\r\n\r\n\t\t\twrap.map( function() {\r\n\t\t\t\tvar elem = this;\r\n\r\n\t\t\t\twhile ( elem.firstChild && elem.firstChild.nodeType === 1 ) {\r\n\t\t\t\t\telem = elem.firstChild;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn elem;\r\n\t\t\t} ).append( this );\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\twrapInner: function( html ) {\r\n\t\tif ( jQuery.isFunction( html ) ) {\r\n\t\t\treturn this.each( function( i ) {\r\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\treturn this.each( function() {\r\n\t\t\tvar self = jQuery( this ),\r\n\t\t\t\tcontents = self.contents();\r\n\r\n\t\t\tif ( contents.length ) {\r\n\t\t\t\tcontents.wrapAll( html );\r\n\r\n\t\t\t} else {\r\n\t\t\t\tself.append( html );\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\twrap: function( html ) {\r\n\t\tvar isFunction = jQuery.isFunction( html );\r\n\r\n\t\treturn this.each( function( i ) {\r\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );\r\n\t\t} );\r\n\t},\r\n\r\n\tunwrap: function() {\r\n\t\treturn this.parent().each( function() {\r\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\r\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\r\n\t\t\t}\r\n\t\t} ).end();\r\n\t}\r\n} );\r\n\r\n\r\nfunction getDisplay( elem ) {\r\n\treturn elem.style && elem.style.display || jQuery.css( elem, \"display\" );\r\n}\r\n\r\nfunction filterHidden( elem ) {\r\n\r\n\t// Disconnected elements are considered hidden\r\n\tif ( !jQuery.contains( elem.ownerDocument || document, elem ) ) {\r\n\t\treturn true;\r\n\t}\r\n\twhile ( elem && elem.nodeType === 1 ) {\r\n\t\tif ( getDisplay( elem ) === \"none\" || elem.type === \"hidden\" ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telem = elem.parentNode;\r\n\t}\r\n\treturn false;\r\n}\r\n\r\njQuery.expr.filters.hidden = function( elem ) {\r\n\r\n\t// Support: Opera <= 12.12\r\n\t// Opera reports offsetWidths and offsetHeights less than zero on some elements\r\n\treturn support.reliableHiddenOffsets() ?\r\n\t\t( elem.offsetWidth <= 0 && elem.offsetHeight <= 0 &&\r\n\t\t\t!elem.getClientRects().length ) :\r\n\t\t\tfilterHidden( elem );\r\n};\r\n\r\njQuery.expr.filters.visible = function( elem ) {\r\n\treturn !jQuery.expr.filters.hidden( elem );\r\n};\r\n\r\n\r\n\r\n\r\nvar r20 = /%20/g,\r\n\trbracket = /\\[\\]$/,\r\n\trCRLF = /\\r?\\n/g,\r\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\r\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\r\n\r\nfunction buildParams( prefix, obj, traditional, add ) {\r\n\tvar name;\r\n\r\n\tif ( jQuery.isArray( obj ) ) {\r\n\r\n\t\t// Serialize array item.\r\n\t\tjQuery.each( obj, function( i, v ) {\r\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\r\n\r\n\t\t\t\t// Treat each array item as a scalar.\r\n\t\t\t\tadd( prefix, v );\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\r\n\t\t\t\tbuildParams(\r\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\r\n\t\t\t\t\tv,\r\n\t\t\t\t\ttraditional,\r\n\t\t\t\t\tadd\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t} );\r\n\r\n\t} else if ( !traditional && jQuery.type( obj ) === \"object\" ) {\r\n\r\n\t\t// Serialize object item.\r\n\t\tfor ( name in obj ) {\r\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\r\n\t\t}\r\n\r\n\t} else {\r\n\r\n\t\t// Serialize scalar item.\r\n\t\tadd( prefix, obj );\r\n\t}\r\n}\r\n\r\n// Serialize an array of form elements or a set of\r\n// key/values into a query string\r\njQuery.param = function( a, traditional ) {\r\n\tvar prefix,\r\n\t\ts = [],\r\n\t\tadd = function( key, value ) {\r\n\r\n\t\t\t// If value is a function, invoke it and return its value\r\n\t\t\tvalue = jQuery.isFunction( value ) ? value() : ( value == null ? \"\" : value );\r\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\r\n\t\t};\r\n\r\n\t// Set traditional to true for jQuery <= 1.3.2 behavior.\r\n\tif ( traditional === undefined ) {\r\n\t\ttraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;\r\n\t}\r\n\r\n\t// If an array was passed in, assume that it is an array of form elements.\r\n\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\r\n\r\n\t\t// Serialize the form elements\r\n\t\tjQuery.each( a, function() {\r\n\t\t\tadd( this.name, this.value );\r\n\t\t} );\r\n\r\n\t} else {\r\n\r\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\r\n\t\t// did it), otherwise encode params recursively.\r\n\t\tfor ( prefix in a ) {\r\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the resulting serialization\r\n\treturn s.join( \"&\" ).replace( r20, \"+\" );\r\n};\r\n\r\njQuery.fn.extend( {\r\n\tserialize: function() {\r\n\t\treturn jQuery.param( this.serializeArray() );\r\n\t},\r\n\tserializeArray: function() {\r\n\t\treturn this.map( function() {\r\n\r\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\r\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\r\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\r\n\t\t} )\r\n\t\t.filter( function() {\r\n\t\t\tvar type = this.type;\r\n\r\n\t\t\t// Use .is(\":disabled\") so that fieldset[disabled] works\r\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\r\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\r\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\r\n\t\t} )\r\n\t\t.map( function( i, elem ) {\r\n\t\t\tvar val = jQuery( this ).val();\r\n\r\n\t\t\treturn val == null ?\r\n\t\t\t\tnull :\r\n\t\t\t\tjQuery.isArray( val ) ?\r\n\t\t\t\t\tjQuery.map( val, function( val ) {\r\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\r\n\t\t\t\t\t} ) :\r\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\r\n\t\t} ).get();\r\n\t}\r\n} );\r\n\r\n\r\n// Create the request object\r\n// (This is still attached to ajaxSettings for backward compatibility)\r\njQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?\r\n\r\n\t// Support: IE6-IE8\r\n\tfunction() {\r\n\r\n\t\t// XHR cannot access local files, always use ActiveX for that case\r\n\t\tif ( this.isLocal ) {\r\n\t\t\treturn createActiveXHR();\r\n\t\t}\r\n\r\n\t\t// Support: IE 9-11\r\n\t\t// IE seems to error on cross-domain PATCH requests when ActiveX XHR\r\n\t\t// is used. In IE 9+ always use the native XHR.\r\n\t\t// Note: this condition won't catch Edge as it doesn't define\r\n\t\t// document.documentMode but it also doesn't support ActiveX so it won't\r\n\t\t// reach this code.\r\n\t\tif ( document.documentMode > 8 ) {\r\n\t\t\treturn createStandardXHR();\r\n\t\t}\r\n\r\n\t\t// Support: IE<9\r\n\t\t// oldIE XHR does not support non-RFC2616 methods (#13240)\r\n\t\t// See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx\r\n\t\t// and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9\r\n\t\t// Although this check for six methods instead of eight\r\n\t\t// since IE also does not support \"trace\" and \"connect\"\r\n\t\treturn /^(get|post|head|put|delete|options)$/i.test( this.type ) &&\r\n\t\t\tcreateStandardXHR() || createActiveXHR();\r\n\t} :\r\n\r\n\t// For all other browsers, use the standard XMLHttpRequest object\r\n\tcreateStandardXHR;\r\n\r\nvar xhrId = 0,\r\n\txhrCallbacks = {},\r\n\txhrSupported = jQuery.ajaxSettings.xhr();\r\n\r\n// Support: IE<10\r\n// Open requests must be manually aborted on unload (#5280)\r\n// See https://support.microsoft.com/kb/2856746 for more info\r\nif ( window.attachEvent ) {\r\n\twindow.attachEvent( \"onunload\", function() {\r\n\t\tfor ( var key in xhrCallbacks ) {\r\n\t\t\txhrCallbacks[ key ]( undefined, true );\r\n\t\t}\r\n\t} );\r\n}\r\n\r\n// Determine support properties\r\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\r\nxhrSupported = support.ajax = !!xhrSupported;\r\n\r\n// Create transport if the browser can provide an xhr\r\nif ( xhrSupported ) {\r\n\r\n\tjQuery.ajaxTransport( function( options ) {\r\n\r\n\t\t// Cross domain only allowed if supported through XMLHttpRequest\r\n\t\tif ( !options.crossDomain || support.cors ) {\r\n\r\n\t\t\tvar callback;\r\n\r\n\t\t\treturn {\r\n\t\t\t\tsend: function( headers, complete ) {\r\n\t\t\t\t\tvar i,\r\n\t\t\t\t\t\txhr = options.xhr(),\r\n\t\t\t\t\t\tid = ++xhrId;\r\n\r\n\t\t\t\t\t// Open the socket\r\n\t\t\t\t\txhr.open(\r\n\t\t\t\t\t\toptions.type,\r\n\t\t\t\t\t\toptions.url,\r\n\t\t\t\t\t\toptions.async,\r\n\t\t\t\t\t\toptions.username,\r\n\t\t\t\t\t\toptions.password\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\t// Apply custom fields if provided\r\n\t\t\t\t\tif ( options.xhrFields ) {\r\n\t\t\t\t\t\tfor ( i in options.xhrFields ) {\r\n\t\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Override mime type if needed\r\n\t\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\r\n\t\t\t\t\t\txhr.overrideMimeType( options.mimeType );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// X-Requested-With header\r\n\t\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\r\n\t\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\r\n\t\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\r\n\t\t\t\t\t// For same-domain requests, won't change header if already provided.\r\n\t\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\r\n\t\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Set headers\r\n\t\t\t\t\tfor ( i in headers ) {\r\n\r\n\t\t\t\t\t\t// Support: IE<9\r\n\t\t\t\t\t\t// IE's ActiveXObject throws a 'Type Mismatch' exception when setting\r\n\t\t\t\t\t\t// request header to a null-value.\r\n\t\t\t\t\t\t//\r\n\t\t\t\t\t\t// To keep consistent with other XHR implementations, cast the value\r\n\t\t\t\t\t\t// to string and ignore `undefined`.\r\n\t\t\t\t\t\tif ( headers[ i ] !== undefined ) {\r\n\t\t\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] + \"\" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Do send the request\r\n\t\t\t\t\t// This may raise an exception which is actually\r\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\r\n\t\t\t\t\txhr.send( ( options.hasContent && options.data ) || null );\r\n\r\n\t\t\t\t\t// Listener\r\n\t\t\t\t\tcallback = function( _, isAbort ) {\r\n\t\t\t\t\t\tvar status, statusText, responses;\r\n\r\n\t\t\t\t\t\t// Was never called and is aborted or complete\r\n\t\t\t\t\t\tif ( callback && ( isAbort || xhr.readyState === 4 ) ) {\r\n\r\n\t\t\t\t\t\t\t// Clean up\r\n\t\t\t\t\t\t\tdelete xhrCallbacks[ id ];\r\n\t\t\t\t\t\t\tcallback = undefined;\r\n\t\t\t\t\t\t\txhr.onreadystatechange = jQuery.noop;\r\n\r\n\t\t\t\t\t\t\t// Abort manually if needed\r\n\t\t\t\t\t\t\tif ( isAbort ) {\r\n\t\t\t\t\t\t\t\tif ( xhr.readyState !== 4 ) {\r\n\t\t\t\t\t\t\t\t\txhr.abort();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tresponses = {};\r\n\t\t\t\t\t\t\t\tstatus = xhr.status;\r\n\r\n\t\t\t\t\t\t\t\t// Support: IE<10\r\n\t\t\t\t\t\t\t\t// Accessing binary-data responseText throws an exception\r\n\t\t\t\t\t\t\t\t// (#11426)\r\n\t\t\t\t\t\t\t\tif ( typeof xhr.responseText === \"string\" ) {\r\n\t\t\t\t\t\t\t\t\tresponses.text = xhr.responseText;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t// Firefox throws an exception when accessing\r\n\t\t\t\t\t\t\t\t// statusText for faulty cross-domain requests\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tstatusText = xhr.statusText;\r\n\t\t\t\t\t\t\t\t} catch ( e ) {\r\n\r\n\t\t\t\t\t\t\t\t\t// We normalize with Webkit giving an empty statusText\r\n\t\t\t\t\t\t\t\t\tstatusText = \"\";\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t// Filter status for non standard behaviors\r\n\r\n\t\t\t\t\t\t\t\t// If the request is local and we have data: assume a success\r\n\t\t\t\t\t\t\t\t// (success with no data won't get notified, that's the best we\r\n\t\t\t\t\t\t\t\t// can do given current implementations)\r\n\t\t\t\t\t\t\t\tif ( !status && options.isLocal && !options.crossDomain ) {\r\n\t\t\t\t\t\t\t\t\tstatus = responses.text ? 200 : 404;\r\n\r\n\t\t\t\t\t\t\t\t// IE - #1450: sometimes returns 1223 when it should be 204\r\n\t\t\t\t\t\t\t\t} else if ( status === 1223 ) {\r\n\t\t\t\t\t\t\t\t\tstatus = 204;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Call complete if needed\r\n\t\t\t\t\t\tif ( responses ) {\r\n\t\t\t\t\t\t\tcomplete( status, statusText, responses, xhr.getAllResponseHeaders() );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\t// Do send the request\r\n\t\t\t\t\t// `xhr.send` may raise an exception, but it will be\r\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\r\n\t\t\t\t\tif ( !options.async ) {\r\n\r\n\t\t\t\t\t\t// If we're in sync mode we fire the callback\r\n\t\t\t\t\t\tcallback();\r\n\t\t\t\t\t} else if ( xhr.readyState === 4 ) {\r\n\r\n\t\t\t\t\t\t// (IE6 & IE7) if it's in cache and has been\r\n\t\t\t\t\t\t// retrieved directly we need to fire the callback\r\n\t\t\t\t\t\twindow.setTimeout( callback );\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t// Register the callback, but delay it in case `xhr.send` throws\r\n\t\t\t\t\t\t// Add to the list of active xhr callbacks\r\n\t\t\t\t\t\txhr.onreadystatechange = xhrCallbacks[ id ] = callback;\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tabort: function() {\r\n\t\t\t\t\tif ( callback ) {\r\n\t\t\t\t\t\tcallback( undefined, true );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\t} );\r\n}\r\n\r\n// Functions to create xhrs\r\nfunction createStandardXHR() {\r\n\ttry {\r\n\t\treturn new window.XMLHttpRequest();\r\n\t} catch ( e ) {}\r\n}\r\n\r\nfunction createActiveXHR() {\r\n\ttry {\r\n\t\treturn new window.ActiveXObject( \"Microsoft.XMLHTTP\" );\r\n\t} catch ( e ) {}\r\n}\r\n\r\n\r\n\r\n\r\n// Install script dataType\r\njQuery.ajaxSetup( {\r\n\taccepts: {\r\n\t\tscript: \"text/javascript, application/javascript, \" +\r\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\r\n\t},\r\n\tcontents: {\r\n\t\tscript: /\\b(?:java|ecma)script\\b/\r\n\t},\r\n\tconverters: {\r\n\t\t\"text script\": function( text ) {\r\n\t\t\tjQuery.globalEval( text );\r\n\t\t\treturn text;\r\n\t\t}\r\n\t}\r\n} );\r\n\r\n// Handle cache's special case and global\r\njQuery.ajaxPrefilter( \"script\", function( s ) {\r\n\tif ( s.cache === undefined ) {\r\n\t\ts.cache = false;\r\n\t}\r\n\tif ( s.crossDomain ) {\r\n\t\ts.type = \"GET\";\r\n\t\ts.global = false;\r\n\t}\r\n} );\r\n\r\n// Bind script tag hack transport\r\njQuery.ajaxTransport( \"script\", function( s ) {\r\n\r\n\t// This transport only deals with cross domain requests\r\n\tif ( s.crossDomain ) {\r\n\r\n\t\tvar script,\r\n\t\t\thead = document.head || jQuery( \"head\" )[ 0 ] || document.documentElement;\r\n\r\n\t\treturn {\r\n\r\n\t\t\tsend: function( _, callback ) {\r\n\r\n\t\t\t\tscript = document.createElement( \"script\" );\r\n\r\n\t\t\t\tscript.async = true;\r\n\r\n\t\t\t\tif ( s.scriptCharset ) {\r\n\t\t\t\t\tscript.charset = s.scriptCharset;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscript.src = s.url;\r\n\r\n\t\t\t\t// Attach handlers for all browsers\r\n\t\t\t\tscript.onload = script.onreadystatechange = function( _, isAbort ) {\r\n\r\n\t\t\t\t\tif ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {\r\n\r\n\t\t\t\t\t\t// Handle memory leak in IE\r\n\t\t\t\t\t\tscript.onload = script.onreadystatechange = null;\r\n\r\n\t\t\t\t\t\t// Remove the script\r\n\t\t\t\t\t\tif ( script.parentNode ) {\r\n\t\t\t\t\t\t\tscript.parentNode.removeChild( script );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Dereference the script\r\n\t\t\t\t\t\tscript = null;\r\n\r\n\t\t\t\t\t\t// Callback if not abort\r\n\t\t\t\t\t\tif ( !isAbort ) {\r\n\t\t\t\t\t\t\tcallback( 200, \"success\" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending\r\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\r\n\t\t\t\thead.insertBefore( script, head.firstChild );\r\n\t\t\t},\r\n\r\n\t\t\tabort: function() {\r\n\t\t\t\tif ( script ) {\r\n\t\t\t\t\tscript.onload( undefined, true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n} );\r\n\r\n\r\n\r\n\r\nvar oldCallbacks = [],\r\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\r\n\r\n// Default jsonp settings\r\njQuery.ajaxSetup( {\r\n\tjsonp: \"callback\",\r\n\tjsonpCallback: function() {\r\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce++ ) );\r\n\t\tthis[ callback ] = true;\r\n\t\treturn callback;\r\n\t}\r\n} );\r\n\r\n// Detect, normalize options and install callbacks for jsonp requests\r\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\r\n\r\n\tvar callbackName, overwritten, responseContainer,\r\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\r\n\t\t\t\"url\" :\r\n\t\t\ttypeof s.data === \"string\" &&\r\n\t\t\t\t( s.contentType || \"\" )\r\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\r\n\t\t\t\trjsonp.test( s.data ) && \"data\"\r\n\t\t);\r\n\r\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\r\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\r\n\r\n\t\t// Get callback name, remembering preexisting value associated with it\r\n\t\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\r\n\t\t\ts.jsonpCallback() :\r\n\t\t\ts.jsonpCallback;\r\n\r\n\t\t// Insert callback into url or form data\r\n\t\tif ( jsonProp ) {\r\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\r\n\t\t} else if ( s.jsonp !== false ) {\r\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\r\n\t\t}\r\n\r\n\t\t// Use data converter to retrieve json after script execution\r\n\t\ts.converters[ \"script json\" ] = function() {\r\n\t\t\tif ( !responseContainer ) {\r\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\r\n\t\t\t}\r\n\t\t\treturn responseContainer[ 0 ];\r\n\t\t};\r\n\r\n\t\t// force json dataType\r\n\t\ts.dataTypes[ 0 ] = \"json\";\r\n\r\n\t\t// Install callback\r\n\t\toverwritten = window[ callbackName ];\r\n\t\twindow[ callbackName ] = function() {\r\n\t\t\tresponseContainer = arguments;\r\n\t\t};\r\n\r\n\t\t// Clean-up function (fires after converters)\r\n\t\tjqXHR.always( function() {\r\n\r\n\t\t\t// If previous value didn't exist - remove it\r\n\t\t\tif ( overwritten === undefined ) {\r\n\t\t\t\tjQuery( window ).removeProp( callbackName );\r\n\r\n\t\t\t// Otherwise restore preexisting value\r\n\t\t\t} else {\r\n\t\t\t\twindow[ callbackName ] = overwritten;\r\n\t\t\t}\r\n\r\n\t\t\t// Save back as free\r\n\t\t\tif ( s[ callbackName ] ) {\r\n\r\n\t\t\t\t// make sure that re-using the options doesn't screw things around\r\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\r\n\r\n\t\t\t\t// save the callback name for future use\r\n\t\t\t\toldCallbacks.push( callbackName );\r\n\t\t\t}\r\n\r\n\t\t\t// Call if it was a function and we have a response\r\n\t\t\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\r\n\t\t\t\toverwritten( responseContainer[ 0 ] );\r\n\t\t\t}\r\n\r\n\t\t\tresponseContainer = overwritten = undefined;\r\n\t\t} );\r\n\r\n\t\t// Delegate to script\r\n\t\treturn \"script\";\r\n\t}\r\n} );\r\n\r\n\r\n\r\n\r\n// data: string of html\r\n// context (optional): If specified, the fragment will be created in this context,\r\n// defaults to document\r\n// keepScripts (optional): If true, will include scripts passed in the html string\r\njQuery.parseHTML = function( data, context, keepScripts ) {\r\n\tif ( !data || typeof data !== \"string\" ) {\r\n\t\treturn null;\r\n\t}\r\n\tif ( typeof context === \"boolean\" ) {\r\n\t\tkeepScripts = context;\r\n\t\tcontext = false;\r\n\t}\r\n\tcontext = context || document;\r\n\r\n\tvar parsed = rsingleTag.exec( data ),\r\n\t\tscripts = !keepScripts && [];\r\n\r\n\t// Single tag\r\n\tif ( parsed ) {\r\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\r\n\t}\r\n\r\n\tparsed = buildFragment( [ data ], context, scripts );\r\n\r\n\tif ( scripts && scripts.length ) {\r\n\t\tjQuery( scripts ).remove();\r\n\t}\r\n\r\n\treturn jQuery.merge( [], parsed.childNodes );\r\n};\r\n\r\n\r\n// Keep a copy of the old load method\r\nvar _load = jQuery.fn.load;\r\n\r\n/**\r\n * Load a url into a page\r\n */\r\njQuery.fn.load = function( url, params, callback ) {\r\n\tif ( typeof url !== \"string\" && _load ) {\r\n\t\treturn _load.apply( this, arguments );\r\n\t}\r\n\r\n\tvar selector, type, response,\r\n\t\tself = this,\r\n\t\toff = url.indexOf( \" \" );\r\n\r\n\tif ( off > -1 ) {\r\n\t\tselector = jQuery.trim( url.slice( off, url.length ) );\r\n\t\turl = url.slice( 0, off );\r\n\t}\r\n\r\n\t// If it's a function\r\n\tif ( jQuery.isFunction( params ) ) {\r\n\r\n\t\t// We assume that it's the callback\r\n\t\tcallback = params;\r\n\t\tparams = undefined;\r\n\r\n\t// Otherwise, build a param string\r\n\t} else if ( params && typeof params === \"object\" ) {\r\n\t\ttype = \"POST\";\r\n\t}\r\n\r\n\t// If we have elements to modify, make the request\r\n\tif ( self.length > 0 ) {\r\n\t\tjQuery.ajax( {\r\n\t\t\turl: url,\r\n\r\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\r\n\t\t\t// Make value of this field explicit since\r\n\t\t\t// user can override it through ajaxSetup method\r\n\t\t\ttype: type || \"GET\",\r\n\t\t\tdataType: \"html\",\r\n\t\t\tdata: params\r\n\t\t} ).done( function( responseText ) {\r\n\r\n\t\t\t// Save response for use in complete callback\r\n\t\t\tresponse = arguments;\r\n\r\n\t\t\tself.html( selector ?\r\n\r\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\r\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\r\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\r\n\r\n\t\t\t\t// Otherwise use the full result\r\n\t\t\t\tresponseText );\r\n\r\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\r\n\t\t// but they are ignored because response was set above.\r\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\r\n\t\t} ).always( callback && function( jqXHR, status ) {\r\n\t\t\tself.each( function() {\r\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\r\n\t\t\t} );\r\n\t\t} );\r\n\t}\r\n\r\n\treturn this;\r\n};\r\n\r\n\r\n\r\n\r\n// Attach a bunch of functions for handling common AJAX events\r\njQuery.each( [\r\n\t\"ajaxStart\",\r\n\t\"ajaxStop\",\r\n\t\"ajaxComplete\",\r\n\t\"ajaxError\",\r\n\t\"ajaxSuccess\",\r\n\t\"ajaxSend\"\r\n], function( i, type ) {\r\n\tjQuery.fn[ type ] = function( fn ) {\r\n\t\treturn this.on( type, fn );\r\n\t};\r\n} );\r\n\r\n\r\n\r\n\r\njQuery.expr.filters.animated = function( elem ) {\r\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\r\n\t\treturn elem === fn.elem;\r\n\t} ).length;\r\n};\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * Gets a window from an element\r\n */\r\nfunction getWindow( elem ) {\r\n\treturn jQuery.isWindow( elem ) ?\r\n\t\telem :\r\n\t\telem.nodeType === 9 ?\r\n\t\t\telem.defaultView || elem.parentWindow :\r\n\t\t\tfalse;\r\n}\r\n\r\njQuery.offset = {\r\n\tsetOffset: function( elem, options, i ) {\r\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\r\n\t\t\tposition = jQuery.css( elem, \"position\" ),\r\n\t\t\tcurElem = jQuery( elem ),\r\n\t\t\tprops = {};\r\n\r\n\t\t// set position first, in-case top/left are set even on static elem\r\n\t\tif ( position === \"static\" ) {\r\n\t\t\telem.style.position = \"relative\";\r\n\t\t}\r\n\r\n\t\tcurOffset = curElem.offset();\r\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\r\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\r\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\r\n\t\t\tjQuery.inArray( \"auto\", [ curCSSTop, curCSSLeft ] ) > -1;\r\n\r\n\t\t// need to be able to calculate position if either top or left\r\n\t\t// is auto and position is either absolute or fixed\r\n\t\tif ( calculatePosition ) {\r\n\t\t\tcurPosition = curElem.position();\r\n\t\t\tcurTop = curPosition.top;\r\n\t\t\tcurLeft = curPosition.left;\r\n\t\t} else {\r\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\r\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\r\n\t\t}\r\n\r\n\t\tif ( jQuery.isFunction( options ) ) {\r\n\r\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\r\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\r\n\t\t}\r\n\r\n\t\tif ( options.top != null ) {\r\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\r\n\t\t}\r\n\t\tif ( options.left != null ) {\r\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\r\n\t\t}\r\n\r\n\t\tif ( \"using\" in options ) {\r\n\t\t\toptions.using.call( elem, props );\r\n\t\t} else {\r\n\t\t\tcurElem.css( props );\r\n\t\t}\r\n\t}\r\n};\r\n\r\njQuery.fn.extend( {\r\n\toffset: function( options ) {\r\n\t\tif ( arguments.length ) {\r\n\t\t\treturn options === undefined ?\r\n\t\t\t\tthis :\r\n\t\t\t\tthis.each( function( i ) {\r\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\r\n\t\t\t\t} );\r\n\t\t}\r\n\r\n\t\tvar docElem, win,\r\n\t\t\tbox = { top: 0, left: 0 },\r\n\t\t\telem = this[ 0 ],\r\n\t\t\tdoc = elem && elem.ownerDocument;\r\n\r\n\t\tif ( !doc ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tdocElem = doc.documentElement;\r\n\r\n\t\t// Make sure it's not a disconnected DOM node\r\n\t\tif ( !jQuery.contains( docElem, elem ) ) {\r\n\t\t\treturn box;\r\n\t\t}\r\n\r\n\t\t// If we don't have gBCR, just use 0,0 rather than error\r\n\t\t// BlackBerry 5, iOS 3 (original iPhone)\r\n\t\tif ( typeof elem.getBoundingClientRect !== \"undefined\" ) {\r\n\t\t\tbox = elem.getBoundingClientRect();\r\n\t\t}\r\n\t\twin = getWindow( doc );\r\n\t\treturn {\r\n\t\t\ttop: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),\r\n\t\t\tleft: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )\r\n\t\t};\r\n\t},\r\n\r\n\tposition: function() {\r\n\t\tif ( !this[ 0 ] ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar offsetParent, offset,\r\n\t\t\tparentOffset = { top: 0, left: 0 },\r\n\t\t\telem = this[ 0 ];\r\n\r\n\t\t// Fixed elements are offset from window (parentOffset = {top:0, left: 0},\r\n\t\t// because it is its only offset parent\r\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\r\n\r\n\t\t\t// we assume that getBoundingClientRect is available when computed position is fixed\r\n\t\t\toffset = elem.getBoundingClientRect();\r\n\t\t} else {\r\n\r\n\t\t\t// Get *real* offsetParent\r\n\t\t\toffsetParent = this.offsetParent();\r\n\r\n\t\t\t// Get correct offsets\r\n\t\t\toffset = this.offset();\r\n\t\t\tif ( !jQuery.nodeName( offsetParent[ 0 ], \"html\" ) ) {\r\n\t\t\t\tparentOffset = offsetParent.offset();\r\n\t\t\t}\r\n\r\n\t\t\t// Add offsetParent borders\r\n\t\t\tparentOffset.top += jQuery.css( offsetParent[ 0 ], \"borderTopWidth\", true );\r\n\t\t\tparentOffset.left += jQuery.css( offsetParent[ 0 ], \"borderLeftWidth\", true );\r\n\t\t}\r\n\r\n\t\t// Subtract parent offsets and element margins\r\n\t\t// note: when an element has margin: auto the offsetLeft and marginLeft\r\n\t\t// are the same in Safari causing offset.left to incorrectly be 0\r\n\t\treturn {\r\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\r\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\r\n\t\t};\r\n\t},\r\n\r\n\toffsetParent: function() {\r\n\t\treturn this.map( function() {\r\n\t\t\tvar offsetParent = this.offsetParent;\r\n\r\n\t\t\twhile ( offsetParent && ( !jQuery.nodeName( offsetParent, \"html\" ) &&\r\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) ) {\r\n\t\t\t\toffsetParent = offsetParent.offsetParent;\r\n\t\t\t}\r\n\t\t\treturn offsetParent || documentElement;\r\n\t\t} );\r\n\t}\r\n} );\r\n\r\n// Create scrollLeft and scrollTop methods\r\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\r\n\tvar top = /Y/.test( prop );\r\n\r\n\tjQuery.fn[ method ] = function( val ) {\r\n\t\treturn access( this, function( elem, method, val ) {\r\n\t\t\tvar win = getWindow( elem );\r\n\r\n\t\t\tif ( val === undefined ) {\r\n\t\t\t\treturn win ? ( prop in win ) ? win[ prop ] :\r\n\t\t\t\t\twin.document.documentElement[ method ] :\r\n\t\t\t\t\telem[ method ];\r\n\t\t\t}\r\n\r\n\t\t\tif ( win ) {\r\n\t\t\t\twin.scrollTo(\r\n\t\t\t\t\t!top ? val : jQuery( win ).scrollLeft(),\r\n\t\t\t\t\ttop ? val : jQuery( win ).scrollTop()\r\n\t\t\t\t);\r\n\r\n\t\t\t} else {\r\n\t\t\t\telem[ method ] = val;\r\n\t\t\t}\r\n\t\t}, method, val, arguments.length, null );\r\n\t};\r\n} );\r\n\r\n// Support: Safari<7-8+, Chrome<37-44+\r\n// Add the top/left cssHooks using jQuery.fn.position\r\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\r\n// getComputedStyle returns percent when specified for top/left/bottom/right\r\n// rather than make the css module depend on the offset module, we just check for it here\r\njQuery.each( [ \"top\", \"left\" ], function( i, prop ) {\r\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\r\n\t\tfunction( elem, computed ) {\r\n\t\t\tif ( computed ) {\r\n\t\t\t\tcomputed = curCSS( elem, prop );\r\n\r\n\t\t\t\t// if curCSS returns percentage, fallback to offset\r\n\t\t\t\treturn rnumnonpx.test( computed ) ?\r\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\r\n\t\t\t\t\tcomputed;\r\n\t\t\t}\r\n\t\t}\r\n\t);\r\n} );\r\n\r\n\r\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\r\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\r\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name },\r\n\tfunction( defaultExtra, funcName ) {\r\n\r\n\t\t// margin is only for outerHeight, outerWidth\r\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\r\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\r\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\r\n\r\n\t\t\treturn access( this, function( elem, type, value ) {\r\n\t\t\t\tvar doc;\r\n\r\n\t\t\t\tif ( jQuery.isWindow( elem ) ) {\r\n\r\n\t\t\t\t\t// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there\r\n\t\t\t\t\t// isn't a whole lot we can do. See pull request at this URL for discussion:\r\n\t\t\t\t\t// https://github.com/jquery/jquery/pull/764\r\n\t\t\t\t\treturn elem.document.documentElement[ \"client\" + name ];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Get document width or height\r\n\t\t\t\tif ( elem.nodeType === 9 ) {\r\n\t\t\t\t\tdoc = elem.documentElement;\r\n\r\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\r\n\t\t\t\t\t// whichever is greatest\r\n\t\t\t\t\t// unfortunately, this causes bug #3838 in IE6/8 only,\r\n\t\t\t\t\t// but there is currently no good, small way to fix it.\r\n\t\t\t\t\treturn Math.max(\r\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\r\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\r\n\t\t\t\t\t\tdoc[ \"client\" + name ]\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn value === undefined ?\r\n\r\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\r\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\r\n\r\n\t\t\t\t\t// Set width or height on the element\r\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\r\n\t\t\t}, type, chainable ? margin : undefined, chainable, null );\r\n\t\t};\r\n\t} );\r\n} );\r\n\r\n\r\njQuery.fn.extend( {\r\n\r\n\tbind: function( types, data, fn ) {\r\n\t\treturn this.on( types, null, data, fn );\r\n\t},\r\n\tunbind: function( types, fn ) {\r\n\t\treturn this.off( types, null, fn );\r\n\t},\r\n\r\n\tdelegate: function( selector, types, data, fn ) {\r\n\t\treturn this.on( types, selector, data, fn );\r\n\t},\r\n\tundelegate: function( selector, types, fn ) {\r\n\r\n\t\t// ( namespace ) or ( selector, types [, fn] )\r\n\t\treturn arguments.length === 1 ?\r\n\t\t\tthis.off( selector, \"**\" ) :\r\n\t\t\tthis.off( types, selector || \"**\", fn );\r\n\t}\r\n} );\r\n\r\n// The number of elements contained in the matched element set\r\njQuery.fn.size = function() {\r\n\treturn this.length;\r\n};\r\n\r\njQuery.fn.andSelf = jQuery.fn.addBack;\r\n\r\n\r\n\r\n\r\n// Register as a named AMD module, since jQuery can be concatenated with other\r\n// files that may use define, but not via a proper concatenation script that\r\n// understands anonymous AMD modules. A named AMD is safest and most robust\r\n// way to register. Lowercase jquery is used because AMD module names are\r\n// derived from file names, and jQuery is normally delivered in a lowercase\r\n// file name. Do this after creating the global so that if an AMD module wants\r\n// to call noConflict to hide this version of jQuery, it will work.\r\n\r\n// Note that for maximum portability, libraries that are not jQuery should\r\n// declare themselves as anonymous modules, and avoid setting a global if an\r\n// AMD loader is present. jQuery is a special case. For more information, see\r\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\r\n\r\n\r\n\r\n//将jQuery对象局部暴露给layui\r\nlayui.define(function(exports){\r\n layui.$ = jQuery;\r\n exports('jquery', jQuery);\r\n});\r\n\r\nreturn jQuery;\r\n}));","/**\r\n * layer\r\n * 通用 Web 弹出层组件\r\n */\r\n\r\n;!function(window, undefined){\r\n\"use strict\";\r\n\r\nvar isLayui = window.layui && layui.define;\r\nvar $;\r\nvar win;\r\nvar ready = {\r\n getPath: function(){\r\n var jsPath = document.currentScript ? document.currentScript.src : function(){\r\n var js = document.scripts;\r\n var last = js.length - 1;\r\n var src;\r\n for(var i = last; i > 0; i--){\r\n if(js[i].readyState === 'interactive'){\r\n src = js[i].src;\r\n break;\r\n }\r\n }\r\n return src || js[last].src;\r\n }();\r\n var GLOBAL = window.LAYUI_GLOBAL || {};\r\n return GLOBAL.layer_dir || jsPath.substring(0, jsPath.lastIndexOf('/') + 1);\r\n }(),\r\n config: {\r\n removeFocus: true\r\n }, \r\n end: {}, \r\n events: {resize: {}}, \r\n minStackIndex: 0,\r\n minStackArr: [],\r\n btn: ['&#x786E;&#x5B9A;', '&#x53D6;&#x6D88;'],\r\n\r\n // 五种原始层模式\r\n type: ['dialog', 'page', 'iframe', 'loading', 'tips'],\r\n \r\n // 获取节点的 style 属性值\r\n getStyle: function(node, name){\r\n var style = node.currentStyle ? node.currentStyle : window.getComputedStyle(node, null);\r\n return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name);\r\n },\r\n \r\n // 载入 CSS 依赖\r\n link: function(href, fn, cssname){\r\n // 未设置路径,则不主动加载 css\r\n if(!layer.path) return;\r\n \r\n var head = document.getElementsByTagName(\"head\")[0];\r\n var link = document.createElement('link');\r\n \r\n if(typeof fn === 'string') cssname = fn;\r\n \r\n var app = (cssname || href).replace(/\\.|\\//g, '');\r\n var id = 'layuicss-'+ app;\r\n var STATUS_NAME = 'creating'\r\n var timeout = 0;\r\n \r\n link.rel = 'stylesheet';\r\n link.href = layer.path + href;\r\n link.id = id;\r\n \r\n if(!document.getElementById(id)){\r\n head.appendChild(link);\r\n }\r\n\r\n if(typeof fn !== 'function') return;\r\n\r\n // 轮询 css 是否加载完毕\r\n (function poll(status) {\r\n var delay = 100;\r\n var getLinkElem = document.getElementById(id); // 获取动态插入的 link 元素\r\n \r\n // 如果轮询超过指定秒数,则视为请求文件失败或 css 文件不符合规范\r\n if(++timeout > 10 * 1000 / delay){\r\n return window.console && console.error(app +'.css: Invalid');\r\n }\r\n \r\n // css 加载就绪\r\n if(parseInt(ready.getStyle(getLinkElem, 'width')) === 1989){\r\n // 如果参数来自于初始轮询(即未加载就绪时的),则移除 link 标签状态\r\n if(status === STATUS_NAME) getLinkElem.removeAttribute('lay-status');\r\n // 如果 link 标签的状态仍为「创建中」,则继续进入轮询,直到状态改变,则执行回调\r\n getLinkElem.getAttribute('lay-status') === STATUS_NAME ? setTimeout(poll, delay) : fn();\r\n } else {\r\n getLinkElem.setAttribute('lay-status', STATUS_NAME);\r\n setTimeout(function(){\r\n poll(STATUS_NAME);\r\n }, delay);\r\n }\r\n\r\n // parseInt(ready.getStyle(document.getElementById(id), 'width')) === 1989 ? fn() : setTimeout(poll, 1000);\r\n }());\r\n\r\n }\r\n};\r\n\r\n// 默认内置方法。\r\nvar layer = {\r\n v: '3.7.0',\r\n ie: function(){ // ie 版本\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 index: (window.layer && window.layer.v) ? 100000 : 0,\r\n path: ready.getPath,\r\n config: function(options, fn){\r\n options = options || {};\r\n layer.cache = ready.config = $.extend({}, ready.config, options);\r\n layer.path = ready.config.path || layer.path;\r\n typeof options.extend === 'string' && (options.extend = [options.extend]);\r\n \r\n // 如果设置了路径,则加载样式\r\n if(ready.config.path) layer.ready();\r\n \r\n if(!options.extend) return this;\r\n \r\n // 加载 css\r\n isLayui \r\n ? layui.addcss('modules/layer/' + options.extend)\r\n : ready.link('css/' + options.extend);\r\n \r\n return this;\r\n },\r\n\r\n // 主体 CSS 等待事件\r\n ready: function(callback){\r\n var cssname = 'layer';\r\n var ver = '';\r\n var path = (isLayui ? 'modules/' : 'css/') + 'layer.css?v='+ layer.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 alert: function(content, options, yes){\r\n var type = typeof options === 'function';\r\n if(type) yes = options;\r\n return layer.open($.extend({\r\n content: content,\r\n yes: yes\r\n }, type ? {} : options));\r\n }, \r\n \r\n confirm: function(content, options, yes, cancel){ \r\n var type = typeof options === 'function';\r\n if(type){\r\n cancel = yes;\r\n yes = options;\r\n }\r\n return layer.open($.extend({\r\n content: content,\r\n btn: ready.btn,\r\n yes: yes,\r\n btn2: cancel\r\n }, type ? {} : options));\r\n },\r\n \r\n msg: function(content, options, end){ // 最常用提示层\r\n var type = typeof options === 'function', rskin = ready.config.skin;\r\n var skin = (rskin ? rskin + ' ' + rskin + '-msg' : '')||'layui-layer-msg';\r\n var anim = doms.anim.length - 1;\r\n if(type) end = options;\r\n return layer.open($.extend({\r\n content: content,\r\n time: 3000,\r\n shade: false,\r\n skin: skin,\r\n title: false,\r\n closeBtn: false,\r\n btn: false,\r\n resize: false,\r\n end: end,\r\n removeFocus: false\r\n }, (type && !ready.config.skin) ? {\r\n skin: skin + ' layui-layer-hui',\r\n anim: anim\r\n } : function(){\r\n options = options || {};\r\n if(options.icon === -1 || options.icon === undefined && !ready.config.skin){\r\n options.skin = skin + ' ' + (options.skin||'layui-layer-hui');\r\n }\r\n return options;\r\n }())); \r\n },\r\n \r\n load: function(icon, options){\r\n return layer.open($.extend({\r\n type: 3,\r\n icon: icon || 0,\r\n resize: false,\r\n shade: 0.01,\r\n removeFocus: false\r\n }, options));\r\n }, \r\n \r\n tips: function(content, follow, options){\r\n return layer.open($.extend({\r\n type: 4,\r\n content: [content, follow],\r\n closeBtn: false,\r\n time: 3000,\r\n shade: false,\r\n resize: false,\r\n fixed: false,\r\n maxWidth: 260,\r\n removeFocus: false\r\n }, options));\r\n }\r\n};\r\n\r\nvar Class = function(setings){ \r\n var that = this, creat = function(){\r\n that.creat();\r\n };\r\n that.index = ++layer.index;\r\n that.config.maxWidth = $(win).width() - 15*2; // 初始最大宽度:当前屏幕宽,左右留 15px 边距\r\n that.config = $.extend({}, that.config, ready.config, setings);\r\n document.body ? creat() : setTimeout(function(){\r\n creat();\r\n }, 30);\r\n};\r\n\r\nClass.pt = Class.prototype;\r\n\r\n// 缓存常用字符\r\nvar doms = ['layui-layer', '.layui-layer-title', '.layui-layer-main', '.layui-layer-dialog', 'layui-layer-iframe', 'layui-layer-content', 'layui-layer-btn', 'layui-layer-close'];\r\n\r\n// 内置动画类\r\ndoms.anim = {\r\n // 旧版动画\r\n 0: 'layer-anim-00', \r\n 1: 'layer-anim-01', \r\n 2: 'layer-anim-02', \r\n 3: 'layer-anim-03', \r\n 4: 'layer-anim-04', \r\n 5: 'layer-anim-05', \r\n 6: 'layer-anim-06',\r\n\r\n // 滑出方向\r\n slideDown: 'layer-anim-slide-down',\r\n slideLeft: 'layer-anim-slide-left',\r\n slideUp: 'layer-anim-slide-up',\r\n slideRight: 'layer-anim-slide-right'\r\n};\r\n\r\ndoms.SHADE = 'layui-layer-shade';\r\ndoms.MOVE = 'layui-layer-move';\r\n\r\n// 默认配置\r\nClass.pt.config = {\r\n type: 0,\r\n shade: 0.3,\r\n fixed: true,\r\n move: doms[1],\r\n title: '&#x4FE1;&#x606F;',\r\n offset: 'auto',\r\n area: 'auto',\r\n closeBtn: 1,\r\n icon: -1,\r\n time: 0, // 0 表示不自动关闭\r\n zIndex: 19891014, \r\n maxWidth: 360,\r\n anim: 0,\r\n isOutAnim: true, // 退出动画\r\n minStack: true, // 最小化堆叠\r\n moveType: 1,\r\n resize: true,\r\n scrollbar: true, // 是否允许浏览器滚动条\r\n tips: 2\r\n};\r\n\r\n// 容器\r\nClass.pt.vessel = function(conType, callback){\r\n var that = this, times = that.index, config = that.config;\r\n var zIndex = config.zIndex + times, titype = typeof config.title === 'object';\r\n var ismax = config.maxmin && (config.type === 1 || config.type === 2);\r\n var titleHTML = (config.title ? '<div class=\"layui-layer-title\" style=\"'+ (titype ? config.title[1] : '') +'\">' \r\n + (titype ? config.title[0] : config.title) \r\n + '</div>' : '');\r\n \r\n config.zIndex = zIndex;\r\n callback([\r\n // 遮罩\r\n config.shade ? ('<div class=\"'+ doms.SHADE +'\" id=\"'+ doms.SHADE + times +'\" times=\"'+ times +'\" style=\"'+ ('z-index:'+ (zIndex-1) +'; ') +'\"></div>') : '',\r\n \r\n // 主体\r\n '<div class=\"'+ doms[0] + (' layui-layer-'+ready.type[config.type]) + (((config.type == 0 || config.type == 2) && !config.shade) ? ' layui-layer-border' : '') + ' ' + (config.skin||'') +'\" id=\"'+ doms[0] + times +'\" type=\"'+ ready.type[config.type] +'\" times=\"'+ times +'\" showtime=\"'+ config.time +'\" conType=\"'+ (conType ? 'object' : 'string') +'\" style=\"z-index: '+ zIndex +'; width:'+ config.area[0] + ';height:' + config.area[1] + ';position:'+ (config.fixed ? 'fixed;' : 'absolute;') +'\">'\r\n + (conType && config.type != 2 ? '' : titleHTML)\r\n\r\n // 内容区\r\n + '<div'+ (config.id ? ' id=\"'+ config.id +'\"' : '') +' class=\"layui-layer-content'+ ((config.type == 0 && config.icon !== -1) ? ' layui-layer-padding' : '') + (config.type == 3 ? ' layui-layer-loading'+config.icon : '') +'\">'\r\n // 表情或图标\r\n + function(){\r\n var face = [\r\n 'layui-icon-tips',\r\n 'layui-icon-success',\r\n 'layui-icon-error',\r\n 'layui-icon-question',\r\n 'layui-icon-lock',\r\n 'layui-icon-face-cry',\r\n 'layui-icon-face-smile'\r\n ];\r\n\r\n var additFaceClass;\r\n\r\n // 动画类\r\n var animClass = 'layui-anim layui-anim-rotate layui-anim-loop';\r\n\r\n // 信息框表情\r\n if(config.type == 0 && config.icon !== -1){\r\n // 加载(加载图标)\r\n if(config.icon == 16){\r\n additFaceClass = 'layui-icon layui-icon-loading '+ animClass;\r\n }\r\n return '<i class=\"layui-layer-face layui-icon '+ (\r\n additFaceClass || face[config.icon] || face[0]\r\n ) +'\"></i>';\r\n }\r\n\r\n // 加载层图标\r\n if(config.type == 3){\r\n var type = [\r\n 'layui-icon-loading', \r\n 'layui-icon-loading-1'\r\n ];\r\n // 风格 2\r\n if(config.icon == 2){\r\n return '<div class=\"layui-layer-loading-2 '+ animClass +'\"></div>';\r\n }\r\n return '<i class=\"layui-layer-loading-icon layui-icon '+ (\r\n type[config.icon] || type[0]\r\n )+' '+ animClass +'\"></i>'\r\n }\r\n\r\n return '';\r\n }()\r\n + (config.type == 1 && conType ? '' : (config.content||''))\r\n + '</div>'\r\n\r\n // 右上角按钮\r\n + '<div class=\"layui-layer-setwin\">'+ function(){\r\n var arr = [];\r\n\r\n // 最小化、最大化\r\n if(ismax){\r\n arr.push('<span class=\"layui-layer-min\"></span>');\r\n arr.push('<span class=\"layui-layer-max\"></span>');\r\n }\r\n\r\n // 关闭按钮\r\n if(config.closeBtn){\r\n arr.push('<span class=\"layui-icon layui-icon-close '+ [\r\n doms[7], \r\n doms[7] + (config.title ? config.closeBtn : (config.type == 4 ? '1' : '2'))\r\n ].join(' ') +'\"></span>')\r\n }\r\n\r\n return arr.join('');\r\n }() + '</div>'\r\n\r\n // 底部按钮\r\n + (config.btn ? function(){\r\n var button = '';\r\n typeof config.btn === 'string' && (config.btn = [config.btn]);\r\n for(var i = 0, len = config.btn.length; i < len; i++){\r\n button += '<a class=\"'+ doms[6] +''+ i +'\">'+ config.btn[i] +'</a>'\r\n }\r\n return '<div class=\"'+ function(){\r\n var className = [doms[6]];\r\n if(config.btnAlign) className.push(doms[6] + '-' + config.btnAlign);\r\n return className.join(' ');\r\n }() +'\">'+ button +'</div>'\r\n }() : '')\r\n + (config.resize ? '<span class=\"layui-layer-resize\"></span>' : '')\r\n + '</div>'\r\n ], titleHTML, $('<div class=\"'+ doms.MOVE +'\" id=\"'+ doms.MOVE +'\"></div>'));\r\n return that;\r\n};\r\n\r\n// 创建骨架\r\nClass.pt.creat = function(){\r\n var that = this;\r\n var config = that.config;\r\n var times = that.index, nodeIndex;\r\n var content = config.content;\r\n var conType = typeof content === 'object';\r\n var body = $('body');\r\n \r\n // 若 id 对应的弹层已经存在,则不重新创建\r\n if(config.id && $('.'+ doms[0]).find('#'+ config.id)[0]){\r\n return (function(){\r\n var layero = $('#'+ config.id).closest('.'+ doms[0]);\r\n var index = layero.attr('times');\r\n var options = layero.data('config');\r\n var elemShade = $('#'+ doms.SHADE + index);\r\n \r\n var maxminStatus = layero.data('maxminStatus') || {};\r\n // 若弹层为最小化状态,则点击目标元素时,自动还原\r\n if(maxminStatus === 'min'){\r\n layer.restore(index);\r\n } else if(options.hideOnClose){\r\n elemShade.show();\r\n layero.show();\r\n }\r\n })();\r\n }\r\n\r\n // 是否移除活动元素的焦点\r\n if(config.removeFocus) {\r\n document.activeElement.blur(); // 将原始的聚焦节点失焦\r\n }\r\n\r\n // 初始化 area 属性\r\n if(typeof config.area === 'string'){\r\n config.area = config.area === 'auto' ? ['', ''] : [config.area, ''];\r\n }\r\n \r\n // anim 兼容旧版 shift\r\n if(config.shift){\r\n config.anim = config.shift;\r\n }\r\n \r\n if(layer.ie == 6){\r\n config.fixed = false;\r\n }\r\n \r\n switch(config.type){\r\n case 0:\r\n config.btn = ('btn' in config) ? config.btn : ready.btn[0];\r\n layer.closeAll('dialog');\r\n break;\r\n case 2:\r\n var content = config.content = conType ? config.content : [config.content||'', 'auto'];\r\n config.content = '<iframe scrolling=\"'+ (config.content[1]||'auto') +'\" allowtransparency=\"true\" id=\"'+ doms[4] +''+ times +'\" name=\"'+ doms[4] +''+ times +'\" onload=\"this.className=\\'\\';\" class=\"layui-layer-load\" frameborder=\"0\" src=\"' + config.content[0] + '\"></iframe>';\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] + '<i class=\"layui-layer-TipsG\"></i>';\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 // 21 为箭头大小 8*2 + 箭头相对父元素的top偏移 5\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 - (goal.height * 0.75 < 21 ? 21 - goal.height * 0.5 : 0);\r\n goal.tipTop = Math.max(goal.tipTop, 0);\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 - (goal.height * 0.75 < 21 ? 21 - goal.height * 0.5 : 0);\r\n goal.tipTop = Math.max(goal.tipTop, 0);\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, callback){\r\n type = type || 'page';\r\n layer.close($('.layui-layer-'+ type +':last').attr(\"times\"), callback);\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 ? '<textarea class=\"layui-layer-input\"' + style + placeholder + '></textarea>' : function () {\r\n return '<input type=\"' + (options.formType == 1 ? 'password' : 'text') + '\" class=\"layui-layer-input\"' + placeholder + '>';\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: ['&#x786E;&#x5B9A;','&#x53D6;&#x6D88;'],\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('&#x6700;&#x591A;&#x8F93;&#x5165;'+ (options.maxlength || 500) +'&#x4E2A;&#x5B57;&#x6570;', 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 = '<span class=\"'+ THIS +'\">'+ tab[0].title +'</span>';\r\n for(; ii < len; ii++){\r\n str += '<span>'+ tab[ii].title +'</span>';\r\n }\r\n }\r\n return str;\r\n }(),\r\n content: '<ul class=\"layui-layer-tabmain\">'+ function(){\r\n var len = tab.length, ii = 1, str = '';\r\n if(len > 0){\r\n str = '<li class=\"layui-layer-tabli '+ THIS +'\">'+ (tab[0].content || 'no content') +'</li>';\r\n for(; ii < len; ii++){\r\n str += '<li class=\"layui-layer-tabli\">'+ (tab[ii].content || 'no content') +'</li>';\r\n }\r\n }\r\n return str;\r\n }() +'</ul>',\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('&#x6CA1;&#x6709;&#x56FE;&#x7247;');\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.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 e.preventDefault();\r\n });\r\n\r\n // 滑动切换图片事件,仅限 layui 中 \r\n if(window.layui || window.lay){\r\n var lay = window.layui.lay || window.lay;\r\n var touchEndCallback = function(e, state){\r\n var duration = Date.now() - state.timeStart;\r\n var speed = state.distanceX / duration;\r\n var threshold = win.width() / 3;\r\n var shouldSwipe = Math.abs(speed) > 0.25 || Math.abs(state.distanceX) > threshold;\r\n if(!shouldSwipe) return;\r\n if(state.direction === 'left'){\r\n dict.imgnext(true);\r\n }else if(state.direction === 'right'){\r\n dict.imgprev(true);\r\n }\r\n }\r\n\r\n $.each([that.shadeo, dict.main], function(i, elem){\r\n lay.touchSwipe(elem, {\r\n onTouchEnd: touchEndCallback\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: '<div class=\"layer-layer-photos-main\">'\r\n + '<img src=\"'+ data[start].src +'\" alt=\"'+ alt +'\" layer-pid=\"'+ (data[start].pid || '') +'\">'\r\n + function(){\r\n var arr = ['<div class=\"layui-layer-photos-pointer\">'];\r\n\r\n // 左右箭头翻页\r\n if (data.length > 1) {\r\n arr.push(['<div class=\"layer-layer-photos-page\">',\r\n '<span class=\"layui-icon layui-icon-left layui-layer-photos-prev\"></span>',\r\n '<span class=\"layui-icon layui-icon-right layui-layer-photos-next\"></span>',\r\n '</div>'].join(''));\r\n }\r\n\r\n // 头部工具栏\r\n if (options.toolbar) {\r\n arr.push([\r\n '<div class=\"layui-layer-photos-toolbar layui-layer-photos-header\">',\r\n '<span toolbar-event=\"rotate\" data-option=\"90\" title=\"旋转\"><i class=\"layui-icon layui-icon-refresh\"></i></span>',\r\n '<span toolbar-event=\"scalex\" title=\"变换\"><i class=\"layui-icon layui-icon-slider\"></i></span>',\r\n '<span toolbar-event=\"zoom\" data-option=\"0.1\" title=\"放大\"><i class=\"layui-icon layui-icon-add-circle\"></i></span>',\r\n '<span toolbar-event=\"zoom\" data-option=\"-0.1\" title=\"缩小\"><i class=\"layui-icon layui-icon-reduce-circle\"></i></span>',\r\n '<span toolbar-event=\"reset\" title=\"还原\"><i class=\"layui-icon layui-icon-refresh-1\"></i></span>',\r\n '<span toolbar-event=\"close\" title=\"关闭\"><i class=\"layui-icon layui-icon-close\"></i></span>',\r\n '</div>'\r\n ].join(''));\r\n }\r\n\r\n // 底部栏\r\n if (options.footer) {\r\n arr.push(['<div class=\"layui-layer-photos-toolbar layui-layer-photos-footer\">',\r\n '<h3>'+ alt +'</h3>',\r\n '<em>'+ dict.imgIndex +' / '+ data.length +'</em>',\r\n '<a href=\"'+ data[start].src +'\" target=\"_blank\">查看原图</a>',\r\n '</div>'].join(''));\r\n }\r\n\r\n arr.push('</div>');\r\n return arr.join('');\r\n }()\r\n +'</div>',\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('&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;', {\r\n time: 30000, \r\n btn: ['&#x4E0B;&#x4E00;&#x5F20;', '&#x4E0D;&#x770B;&#x4E86;'], \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','lay'], 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 = $('<ul>').addClass(ELEM);\r\n var elemTopBar;\r\n\r\n // 遍历生成 bars 节点\r\n layui.each(options.bars, function(i, item){\r\n var elemBar = $('<li class=\"layui-icon\">');\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, '&amp;')\r\n .replace(/</g, '&lt;').replace(/>/g, '&gt;')\r\n .replace(/'/g, '&#39;').replace(/\"/g, '&quot;');\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(/\\&amp;/g, '&')\r\n .replace(/\\&lt;/g, '<').replace(/\\&gt;/g, '>')\r\n .replace(/\\&#39;/g, '\\'').replace(/\\&quot;/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 * 批量事件\r\n * @param {string} [attr=\"lay-on\"] - 触发事件的元素属性名\r\n * @param {Object.<string, Function>} events - 事件集合\r\n * @param {Object} [options] - 参数的更多选项\r\n * @param {(string|HTMLElement|JQuery)} [options.elem=\"body\"] - 触发事件的委托元素\r\n * @param {string} [options.trigger=\"click\"] - 事件触发的方式\r\n * @returns {Object} 返回当前 events 参数设置的事件集合\r\n */\r\n on: function(attr, events, options) {\r\n // 若参数一为 object 类型,则为事件集,且省略 attr\r\n if (typeof attr === 'object') {\r\n options = events || {};\r\n events = attr;\r\n attr = options.attr || 'lay-on'; // 默认属性名\r\n }\r\n\r\n // 更多选项\r\n options = $.extend({\r\n elem: 'body',\r\n trigger: 'click'\r\n }, typeof options === 'object' ? options : {\r\n trigger: options // 兼容旧版\r\n });\r\n\r\n var elem = options.elem = $(options.elem);\r\n var attrSelector = '['+ attr +']';\r\n var DATANAME = 'UTIL_ON_DATA'; // 缓存在委托元素上的 data-* 属性名\r\n\r\n if (!elem[0]) return; // 若委托元素不存在\r\n\r\n // 初始化 data 默认值,以委托元素为存储单元\r\n if (!elem.data(DATANAME)) {\r\n elem.data(DATANAME, {\r\n events: {},\r\n callbacks: {}\r\n });\r\n }\r\n\r\n // 读取 data 缓存\r\n var dataCache = elem.data(DATANAME);\r\n var callbacks = dataCache.callbacks;\r\n\r\n // 根据 attr 记录事件集合\r\n events = dataCache.events[attr] = $.extend(true, dataCache.events[attr], events);\r\n\r\n // 清除事件委托,避免重复绑定\r\n elem.off(options.trigger, attrSelector, callbacks[attr]);\r\n\r\n // 绑定事件委托\r\n elem.on(\r\n options.trigger,\r\n attrSelector,\r\n callbacks[attr] = function(e) {\r\n var othis = $(this);\r\n var key = othis.attr(attr);\r\n typeof events[key] === 'function' && events[key].call(this, othis, e);\r\n }\r\n );\r\n\r\n return events;\r\n }\r\n };\r\n\r\n // 兼容旧版\r\n util.event = util.on;\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: [200, 300], // 延时显示或隐藏的毫秒数,若为 number 类型则表示显示和隐藏的延迟时间相同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 = $('<ul class=\"layui-menu layui-dropdown-menu\"></ul>');\r\n if(options.data.length > 0 ){\r\n eachItemView(elemUl, options.data)\r\n } else {\r\n elemUl.html('<li class=\"layui-menu-item-none\">No data</li>');\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 = $(['<li'+ function(){\r\n var className = {\r\n group: 'layui-menu-item-group'+ (\r\n options.isAllowSpread ? (\r\n isSpreadItem ? ' layui-menu-item-down' : ' layui-menu-item-up'\r\n ) : ''\r\n )\r\n ,parent: STR_ITEM_PARENT\r\n ,'-': 'layui-menu-item-divider'\r\n };\r\n if(isChild || type){\r\n return ' class=\"'+ className[type] +'\"';\r\n }\r\n return item.disabled ? ' class=\"'+ STR_DISABLED +'\"' : '';\r\n }() +'>'\r\n \r\n //标题区\r\n ,function(){\r\n //是否超文本\r\n var viewText = ('href' in item) ? (\r\n '<a href=\"'+ item.href +'\" target=\"'+ (item.target || '_self') +'\">'+ title +'</a>'\r\n ) : title;\r\n \r\n //是否存在子级\r\n if(isChild){\r\n return '<div class=\"'+ STR_MENU_TITLE +'\">'+ viewText + function(){\r\n if(type === 'parent'){\r\n return '<i class=\"layui-icon layui-icon-right\"></i>';\r\n } else if(type === 'group' && options.isAllowSpread){\r\n return '<i class=\"layui-icon layui-icon-'+ (isSpreadItem ? 'up' : 'down') +'\"></i>';\r\n } else {\r\n return '';\r\n }\r\n }() +'</div>'\r\n \r\n }\r\n return '<div class=\"'+ STR_MENU_TITLE +'\">'+ viewText +'</div>';\r\n }()\r\n ,'</li>'].join(''));\r\n \r\n viewLi.data('item', item);\r\n \r\n //子级区\r\n if(isChild){\r\n var elemPanel = $('<div class=\"layui-panel layui-menu-body-panel\"></div>');\r\n var elemUl = $('<ul></ul>');\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 = ['<div class=\"layui-dropdown layui-border-box layui-panel layui-anim layui-anim-downbit\" lay-id=\"' + options.id + '\">'\r\n ,'</div>'].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 ? ('<div class=\"'+ STR_ELEM_SHADE +'\" style=\"'+ ('z-index:'+ (that.elemView.css('z-index')-1) +'; background-color: ' + (options.shade[1] || '#000') + '; opacity: ' + (options.shade[0] || options.shade)) +'\"></div>') : '';\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 Class.prototype.normalizedDelay = function(){\r\n var that = this;\r\n var options = that.config;\r\n var delay = [].concat(options.delay);\r\n \r\n return {\r\n show: delay[0],\r\n hide: delay[1] !== undefined ? delay[1] : delay[0] \r\n }\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 }, that.normalizedDelay().hide);\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 var isMouseEnter = options.trigger === 'mouseenter';\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\r\n // 若为鼠标移入事件,则延迟触发\r\n isMouseEnter ? (\r\n thisModule.timer = setTimeout(function(){\r\n that.render();\r\n }, that.normalizedDelay().show)\r\n ) : that.render();\r\n \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 (isMouseEnter) {\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 var 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 var scaleSec = Math.floor((options.value[1] - options.min) / (options.max - options.min) * 100);\r\n var 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 = '<div class=\"layui-slider '+ (options.type === 'vertical' ? 'layui-slider-vertical' : '') +'\">'+ (options.tips ? '<div class=\"'+ SLIDER_TIPS +'\"></div>' : '') +\r\n '<div class=\"layui-slider-bar\" style=\"background:'+ theme +'; '+ (options.type === 'vertical' ? 'height' : 'width') +':'+ scale +';'+ (options.type === 'vertical' ? 'bottom' : 'left') +':'+ (scaleFir || 0) +';\"></div><div class=\"layui-slider-wrap\" style=\"'+ (options.type === 'vertical' ? 'bottom' : 'left') +':'+ (scaleFir || scale) +';\">' +\r\n '<div class=\"layui-slider-wrap-btn\" style=\"border: 2px solid '+ theme +';\"></div></div>'+ (options.range ? '<div class=\"layui-slider-wrap\" style=\"'+ (options.type === 'vertical' ? 'bottom' : 'left') +':'+ scaleSec +';\"><div class=\"layui-slider-wrap-btn\" style=\"border: 2px solid '+ theme +';\"></div></div>' : '') +'</div>';\r\n\r\n var othis = $(options.elem);\r\n var 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 += '<div class=\"layui-slider-step\" style=\"'+ (options.type === 'vertical' ? 'bottom' : 'left') +':'+ step +'%\"></div>'\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 = $('<div class=\"layui-slider-input\"><div class=\"layui-slider-input-txt\"><input type=\"text\" class=\"layui-input\"></div><div class=\"layui-slider-input-btn\"><i class=\"layui-icon layui-icon-up\"></i><i class=\"layui-icon layui-icon-down\"></i></div></div>');\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 var sliderWrap = that.elemTemp.find('.' + SLIDER_WRAP);\r\n var tipsLeft = options.type === 'vertical' ? (sliderWidth - $(this).parent()[0].offsetTop - sliderWrap.height()) : $(this).parent()[0].offsetLeft;\r\n var left = tipsLeft / sliderWidth * 100;\r\n var value = $(this).parent().data('value');\r\n var 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 var options = that.config;\r\n var sliderAct = that.elemTemp;\r\n var sliderWidth = function(){\r\n return options.type === 'vertical' ? options.height : sliderAct[0].offsetWidth\r\n };\r\n var sliderWrap = sliderAct.find('.' + SLIDER_WRAP);\r\n var sliderTxt = sliderAct.next('.' + SLIDER_INPUT);\r\n var inputValue = sliderTxt.children('.' + SLIDER_INPUT_TXT).children('input').val();\r\n var step = 100 / ((options.max - options.min) / Math.ceil(options.step));\r\n var 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 var 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 var valueTo = function(value){\r\n var oldLeft = value / sliderWidth() * 100 / step;\r\n var 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 var elemMove = $(['<div class=\"layui-auxiliar-moving\" id=\"LAY-slider-moving\"></div'].join(''));\r\n var createMoveElem = function(sliderBtnElem, move, up){\r\n var upCall = function(){\r\n // 移动端延时一秒关闭\r\n up && up(lay.touchEventsSupported() ? 1000 : 0);\r\n elemMove.remove();\r\n options.done && options.done(that.value);\r\n // 移动端\r\n if (lay.touchEventsSupported()) {\r\n sliderBtnElem[0].removeEventListener('touchmove', move, lay.passiveSupported ? { passive: false } : false);\r\n sliderBtnElem[0].removeEventListener('touchend', upCall);\r\n sliderBtnElem[0].removeEventListener('touchcancel', upCall);\r\n }\r\n };\r\n $('#LAY-slider-moving')[0] || $('body').append(elemMove);\r\n elemMove.on('mousemove', move);\r\n elemMove.on('mouseup', upCall).on('mouseleave', upCall);\r\n // 移动端\r\n if (lay.touchEventsSupported()) {\r\n sliderBtnElem[0].addEventListener('touchmove', move, lay.passiveSupported ? { passive: false } : false);\r\n sliderBtnElem[0].addEventListener('touchend', upCall);\r\n sliderBtnElem[0].addEventListener('touchcancel', upCall);\r\n }\r\n };\r\n\r\n //动态赋值\r\n if(setValue === 'set') return change(value - options.min, i, 'done');\r\n\r\n //滑块滑动\r\n sliderAct.find('.' + SLIDER_WRAP_BTN).each(function(index){\r\n var othis = $(this);\r\n othis.on('mousedown touchstart', function(e){\r\n e = e || window.event;\r\n if(e.type === 'touchstart'){\r\n e.clientX = e.originalEvent.touches[0].clientX;\r\n e.clientY = e.originalEvent.touches[0].clientY;\r\n }\r\n\r\n var oldleft = othis.parent()[0].offsetLeft;\r\n var oldx = e.clientX;\r\n if(options.type === 'vertical'){\r\n oldleft = sliderWidth() - othis.parent()[0].offsetTop - sliderWrap.height()\r\n oldx = e.clientY;\r\n }\r\n\r\n var move = function(e){\r\n e = e || window.event;\r\n if (e.type === 'touchmove') {\r\n e.clientX = e.touches[0].clientX;\r\n e.clientY = e.touches[0].clientY;\r\n }\r\n var left = oldleft + (options.type === 'vertical' ? (oldx - e.clientY) : (e.clientX - oldx));\r\n if(left < 0)left = 0;\r\n if(left > 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(delay){\r\n othis.removeClass(ELEM_HOVER);\r\n setTimeout(function(){\r\n sliderAct.find('.' + SLIDER_TIPS).hide();\r\n }, delay);\r\n };\r\n\r\n createMoveElem(othis, 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 var 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 = $(['<div class=\"layui-unselect layui-colorpicker\">'\r\n ,'<span '+ (options.format == 'rgb' && options.alpha\r\n ? 'class=\"layui-colorpicker-trigger-bgcolor\"'\r\n : '') +'>'\r\n ,'<span class=\"layui-colorpicker-trigger-span\" '\r\n ,'lay-type=\"'+ (options.format == 'rgb' ? (options.alpha ? 'rgba' : 'torgb') : '') +'\" '\r\n ,'style=\"'+ function(){\r\n var bgstr = '';\r\n if(options.color){\r\n bgstr = options.color;\r\n \r\n if((options.color.match(/[0-9]{1,3}/g) || []).length > 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 ,'<i class=\"layui-icon layui-colorpicker-trigger-i '+ (options.color \r\n ? ICON_PICKER_DOWN \r\n : ICON_PICKER_CLOSE) +'\"></i>'\r\n ,'</span>'\r\n ,'</span>'\r\n ,'</div>'].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 = $(['<div id=\"layui-colorpicker'+ that.index +'\" data-index=\"'+ that.index +'\" class=\"layui-anim layui-anim-downbit layui-colorpicker-main\">'\r\n //颜色面板\r\n ,'<div class=\"layui-colorpicker-main-wrapper\">'\r\n ,'<div class=\"layui-colorpicker-basis\">'\r\n ,'<div class=\"layui-colorpicker-basis-white\"></div>'\r\n ,'<div class=\"layui-colorpicker-basis-black\"></div>'\r\n ,'<div class=\"layui-colorpicker-basis-cursor\"></div>'\r\n ,'</div>'\r\n ,'<div class=\"layui-colorpicker-side\">'\r\n ,'<div class=\"layui-colorpicker-side-slider\"></div>'\r\n ,'</div>'\r\n ,'</div>'\r\n \r\n //透明度条块\r\n ,'<div class=\"layui-colorpicker-main-alpha '+ (options.alpha ? SHOW : '') +'\">'\r\n ,'<div class=\"layui-colorpicker-alpha-bgcolor\">'\r\n ,'<div class=\"layui-colorpicker-alpha-slider\"></div>'\r\n ,'</div>'\r\n ,'</div>'\r\n \r\n //预设颜色列表\r\n ,function(){\r\n if(options.predefine){\r\n var list = ['<div class=\"layui-colorpicker-main-pre\">'];\r\n layui.each(options.colors, function(i, v){\r\n list.push(['<div class=\"layui-colorpicker-pre'+ ((v.match(/[0-9]{1,3}/g) || []).length > 3 \r\n ? ' layui-colorpicker-pre-isalpha' \r\n : '') +'\">'\r\n ,'<div style=\"background:'+ v +'\"></div>'\r\n ,'</div>'].join(''));\r\n });\r\n list.push('</div>');\r\n return list.join('');\r\n } else {\r\n return '';\r\n }\r\n }()\r\n \r\n //底部表单元素区域\r\n ,'<div class=\"layui-colorpicker-main-input\">'\r\n ,'<div class=\"layui-inline\">'\r\n ,'<input type=\"text\" class=\"layui-input\">'\r\n ,'</div>'\r\n ,'<div class=\"layui-btn-container\">'\r\n ,'<button class=\"layui-btn layui-btn-primary layui-btn-sm\" colorpicker-events=\"clear\">清空</button>'\r\n ,'<button class=\"layui-btn layui-btn-sm\" colorpicker-events=\"confirm\">确定</button>'\r\n ,'</div'\r\n ,'</div>'\r\n ,'</div>'].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($.trim(that.elemPicker.find('.' + PICKER_INPUT).find('input').val()));\r\n }\r\n\r\n //拖拽元素\r\n ,elemMove = $(['<div class=\"layui-auxiliar-moving\" id=\"LAY-colorpicker-moving\"></div>'].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 if(!lay.touchEventsSupported()) return;\r\n // 触摸事件模拟\r\n layui.each([\r\n {elem: side, eventType: 'click'},\r\n {elem: alphacolor, eventType: 'click'},\r\n {elem: basis, eventType: 'mousedown'}\r\n ], function(i, obj){\r\n lay.touchSwipe(obj.elem, {\r\n onTouchMove: function(e){\r\n touchHandler(e, obj.eventType)\r\n }\r\n })\r\n })\r\n\r\n function touchHandler(event, eventType) {\r\n var pointer = event.touches[0];\r\n var simulatedEvent = document.createEvent(\"MouseEvent\");\r\n\r\n simulatedEvent.initMouseEvent(eventType, \r\n true, true, window, 1, \r\n pointer.screenX, pointer.screenY,pointer.clientX, pointer.clientY, \r\n false, false, false, false, 0, null\r\n );\r\n pointer.target.dispatchEvent(simulatedEvent);\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 = $.trim(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 = '<li'+ function(){\r\n var layAttr = [];\r\n layui.each(options, function(key, value){\r\n if(/^(title|content)$/.test(key)) return;\r\n layAttr.push('lay-'+ key +'=\"'+ value +'\"');\r\n });\r\n if(layAttr.length > 0) layAttr.unshift(''); //向前插,预留空格\r\n return layAttr.join(' ');\r\n }() +'>'+ (options.title || 'unnaming') +'</li>';\r\n \r\n barElem[0] ? barElem.before(li) : titElem.append(li);\r\n contElem.append('<div class=\"layui-tab-item\">'+ (options.content || '') +'</div>');\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 = $('<span class=\"layui-unselect layui-tab-bar\" '+ STOPE +'><i '+ STOPE +' class=\"layui-icon\">&#xe61a;</i></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 = $('<i class=\"layui-icon layui-icon-close layui-unselect '+ CLOSE +'\"></i>');\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('&#xe602;');\r\n show.removeClass(SHOW);\r\n }\r\n \r\n elemCont[isNone ? 'addClass' : 'removeClass'](SHOW);\r\n icon.html(isNone ? '&#xe61a;' : '&#xe602;');\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 = $('<span class=\"'+ NAV_BAR +'\"></span>');\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('<i class=\"layui-icon '+ NAV_DOWN +' '+ NAV_MORE +'\"></i>');\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('<span '+ ATTE_SPR +'>'+ separator +'</span>');\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('<span class=\"'+ ELEM +'-text\">'+ percent +'</span>');\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('<i class=\"layui-icon layui-colla-icon\">'+ (isNone ? '&#xe602;' : '&#xe61a;') +'</i>');\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 '<input class=\"'+ ELEM_FILE +'\" type=\"file\" accept=\"'+ options.acceptMime +'\" name=\"'+ options.field +'\"'\r\n ,(options.multiple ? ' multiple' : '') \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('<div class=\"layui-upload-wrap\"></div>');\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 = $('<iframe id=\"'+ ELEM_IFRAME +'\" class=\"'+ ELEM_IFRAME +'\" name=\"'+ ELEM_IFRAME +'\" frameborder=\"0\"></iframe>');\r\n var elemForm = $(['<form target=\"'+ ELEM_IFRAME +'\" class=\"'+ ELEM_FORM +'\" method=\"post\" key=\"set-mine\" enctype=\"multipart/form-data\" action=\"'+ options.url +'\">'\r\n ,'</form>'].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('<input type=\"hidden\" name=\"'+ key +'\" value=\"'+ value +'\">')\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' \r\n ? sets.unified ? value() : value(sets.index, sets.file)\r\n : 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('<br>'));\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 +'<br>您当前已经选择了: '+ 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('<span class=\"layui-inline '+ ELEM_CHOOSE +'\">'+ value +'</span>');\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 = $('<div class=\"'+ CLASS_AFFIX +'\">');\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('<i class=\"layui-icon layui-icon-'+ item + (\r\n opts.disabled ? (' '+ DISABLED) : ''\r\n ) +'\"></i>');\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('<div class=\"'+ CLASS_WRAP +'\"></div>');\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 }).on('paste', function(){\r\n showDown();\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('<p class=\"'+ NONE +'\">无匹配项</p>');\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 // #1449: IE10 和 11 中,带有占位符的 input 元素获得/失去焦点时,会触发 input 事件\r\n var eventsType = 'input propertychange';\r\n if(lay.ie && (lay.ie === '10' || lay.ie === '11') && input.attr('placeholder')){\r\n eventsType = 'keyup';\r\n }\r\n input.on(eventsType, 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 = $(['<div class=\"'+ (isSearch ? '' : 'layui-unselect ') + CLASS \r\n ,(disabled ? ' layui-select-disabled' : '') +'\">'\r\n ,'<div class=\"'+ TITLE +'\">'\r\n ,('<input type=\"text\" placeholder=\"'+ util.escape($.trim(placeholder)) +'\" '\r\n +('value=\"'+ util.escape($.trim(value ? selected.html() : '')) +'\"') // 默认值\r\n +((!disabled && isSearch) ? '' : ' readonly') // 是否开启搜索\r\n +' class=\"layui-input'\r\n +(isSearch ? '' : ' layui-unselect') \r\n + (disabled ? (' ' + DISABLED) : '') +'\">') // 禁用状态\r\n ,'<i class=\"layui-edge\"></i></div>'\r\n ,'<dl class=\"layui-anim layui-anim-upbit'+ (othis.find('optgroup')[0] ? ' layui-select-group' : '') +'\">'\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('<dd lay-value=\"\" class=\"layui-select-tips\">'+ $.trim(item.innerHTML || TIPS) +'</dd>');\r\n } else if(tagName === 'optgroup'){\r\n arr.push('<dt>'+ item.label +'</dt>'); \r\n } else {\r\n arr.push('<dd lay-value=\"'+ util.escape(item.value) +'\" class=\"'+ (value === item.value ? THIS : '') + (item.disabled ? (' '+DISABLED) : '') +'\">'+ $.trim(item.innerHTML) +'</dd>');\r\n }\r\n });\r\n arr.length === 0 && arr.push('<dd lay-value=\"\" class=\"'+ DISABLED +'\">没有选项</dd>');\r\n return arr.join('');\r\n }(othis.find('*')) +'</dl>'\r\n ,'</div>'].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 = $(['<div class=\"layui-unselect '+ RE_CLASS[0],\r\n (check.checked ? (' '+ RE_CLASS[1]) : ''), // 选中状态\r\n (disabled ? ' layui-checkbox-disabled '+ DISABLED : ''), // 禁用状态\r\n '\"',\r\n (skin ? ' lay-skin=\"'+ skin +'\"' : ''), // 风格\r\n '>',\r\n function(){ // 不同风格的内容\r\n var type = {\r\n // 复选框\r\n \"checkbox\": [\r\n (title[0] ? ('<div>'+ title[0] +'</div>') : (skin === 'primary' ? '' : '<div></div>')),\r\n '<i class=\"layui-icon '+(skin === 'primary' && !check.checked && othis.get(0).indeterminate ? CLASS.SUBTRA : 'layui-icon-ok')+'\"></i>'\r\n ].join(''),\r\n // 开关\r\n \"switch\": '<div>'+ ((check.checked ? title[0] : title[1]) || '') +'</div><i></i>'\r\n };\r\n return type[skin] || type['checkbox'];\r\n }(),\r\n '</div>'].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 = $(['<div class=\"layui-unselect '+ CLASS, \r\n (radio.checked ? (' '+ CLASS +'ed') : ''), // 选中状态\r\n (disabled ? ' layui-radio-disabled '+DISABLED : '') +'\">', // 禁用状态\r\n '<i class=\"layui-anim layui-icon '+ ICON[radio.checked ? 0 : 1] +'\"></i>',\r\n '<div>'+ 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 }() +'</div>',\r\n '</div>'].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 /**\r\n * 主动触发验证\r\n * @param {(string|HTMLElement|JQuery)} elem - 要验证的区域表单元素\r\n * @return {boolean} 返回结果。若验证通过,返回 `true`, 否则返回 `false`\r\n */\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 // lay 函数可以处理 SelectorHTMLElementJQuery 类型\r\n // 无效的 CSS 选择器字符串,会抛出 SyntaxError 异常,此时直接返回 laytpl 模板字符串\r\n var resolveTplStr = function(templet){\r\n try{ \r\n return lay(templet).html();\r\n }catch(err){\r\n return templet;\r\n }\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(resolveTplStr(templet) || String(content)).render($.extend({\r\n LAY_COL: item3\r\n }, obj.tplData));\r\n }\r\n\r\n // 是否只返回文本\r\n return obj.text ? $('<div>'+ content +'</div>').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 ['<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"layui-table\" '\r\n ,'{{# if(d.data.skin){ }}lay-skin=\"{{=d.data.skin}}\"{{# } }} {{# if(d.data.size){ }}lay-size=\"{{=d.data.size}}\"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>'\r\n ,'<thead>'\r\n ,'{{# layui.each(d.data.cols, function(i1, item1){ }}'\r\n ,'<tr>'\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 ,'<th data-field=\"{{= item2.field||i2 }}\" data-key=\"{{=d.index}}-{{=i1}}-{{=i2}}\" {{# if( item2.parentKey){ }}data-parentkey=\"{{= item2.parentKey }}\"{{# } }} {{# if(item2.minWidth){ }}data-minwidth=\"{{=item2.minWidth}}\"{{# } }} {{# if(item2.maxWidth){ }}data-maxwidth=\"{{=item2.maxWidth}}\"{{# } }} {{# if(item2.style){ }}style=\"{{=item2.style}}\"{{# } }} '+ rowCols +' {{# if(item2.unresize || item2.colGroup){ }}data-unresize=\"true\"{{# } }} class=\"{{# if(item2.hide){ }}layui-hide{{# } }}{{# if(isSort){ }} layui-unselect{{# } }}{{# if(!item2.field){ }} layui-table-col-special{{# } }}\"{{# if(item2.title){ }} title=\"{{ layui.$(\\'<div>\\' + item2.title + \\'</div>\\').text() }}\"{{# } }}>'\r\n ,'<div class=\"layui-table-cell laytable-cell-'\r\n ,'{{# if(item2.colGroup){ }}'\r\n ,'group'\r\n ,'{{# } else { }}'\r\n ,'{{=d.index}}-{{=i1}}-{{=i2}}'\r\n ,'{{# if(item2.type !== \"normal\"){ }}'\r\n ,' laytable-cell-{{= item2.type }}'\r\n ,'{{# } }}'\r\n ,'{{# } }}'\r\n ,'\" {{#if(item2.align){}}align=\"{{=item2.align}}\"{{#}}}>'\r\n ,'{{# if(item2.type === \"checkbox\"){ }}' //复选框\r\n ,'<input type=\"checkbox\" name=\"layTableCheckbox\" lay-skin=\"primary\" lay-filter=\"layTableAllChoose\" {{# if(item2[d.data.checkName]){ }}checked{{# }; }}>'\r\n ,'{{# } else { }}'\r\n ,'<span>{{-item2.title||\"\"}}</span>'\r\n ,'{{# if(isSort){ }}'\r\n ,'<span class=\"layui-table-sort layui-inline\"><i class=\"layui-edge layui-table-sort-asc\" title=\"升序\"></i><i class=\"layui-edge layui-table-sort-desc\" title=\"降序\"></i></span>'\r\n ,'{{# } }}'\r\n ,'{{# } }}'\r\n ,'</div>'\r\n ,'</th>'\r\n ,(options.fixed ? '{{# }; }}' : '')\r\n ,'{{# }); }}'\r\n ,'</tr>'\r\n ,'{{# }); }}'\r\n ,'</thead>'\r\n ,'</table>'].join('');\r\n };\r\n\r\n // tbody 区域模板\r\n var TPL_BODY = ['<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"layui-table\" '\r\n ,'{{# if(d.data.skin){ }}lay-skin=\"{{=d.data.skin}}\"{{# } }} {{# if(d.data.size){ }}lay-size=\"{{=d.data.size}}\"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>'\r\n ,'<tbody></tbody>'\r\n ,'</table>'].join('');\r\n\r\n // 主模板\r\n var TPL_MAIN = [\r\n ,'{{# if(d.data.toolbar){ }}'\r\n ,'<div class=\"layui-table-tool\">'\r\n ,'<div class=\"layui-table-tool-temp\"></div>'\r\n ,'<div class=\"layui-table-tool-self\"></div>'\r\n ,'</div>'\r\n ,'{{# } }}'\r\n\r\n ,'<div class=\"layui-table-box\">'\r\n ,'{{# if(d.data.loading){ }}'\r\n ,'<div class=\"layui-table-init\" style=\"background-color: #fff;\">'\r\n ,'<i class=\"layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop\"></i>'\r\n ,'</div>'\r\n ,'{{# } }}'\r\n\r\n ,'{{# var left, right; }}'\r\n ,'<div class=\"layui-table-header\">'\r\n ,TPL_HEADER()\r\n ,'</div>'\r\n ,'<div class=\"layui-table-body layui-table-main\">'\r\n ,TPL_BODY\r\n ,'</div>'\r\n\r\n ,'{{# if(left){ }}'\r\n ,'<div class=\"layui-table-fixed layui-table-fixed-l\">'\r\n ,'<div class=\"layui-table-header\">'\r\n ,TPL_HEADER({fixed: true})\r\n ,'</div>'\r\n ,'<div class=\"layui-table-body\">'\r\n ,TPL_BODY\r\n ,'</div>'\r\n ,'</div>'\r\n ,'{{# }; }}'\r\n\r\n ,'{{# if(right){ }}'\r\n ,'<div class=\"layui-table-fixed layui-table-fixed-r layui-hide\">'\r\n ,'<div class=\"layui-table-header\">'\r\n ,TPL_HEADER({fixed: 'right'})\r\n ,'<div class=\"layui-table-mend\"></div>'\r\n ,'</div>'\r\n ,'<div class=\"layui-table-body\">'\r\n ,TPL_BODY\r\n ,'</div>'\r\n ,'</div>'\r\n ,'{{# }; }}'\r\n ,'</div>'\r\n\r\n ,'{{# if(d.data.totalRow){ }}'\r\n ,'<div class=\"layui-table-total\">'\r\n ,'<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"layui-table\" '\r\n ,'{{# if(d.data.skin){ }}lay-skin=\"{{=d.data.skin}}\"{{# } }} {{# if(d.data.size){ }}lay-size=\"{{=d.data.size}}\"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>'\r\n ,'<tbody><tr><td><div class=\"layui-table-cell\" style=\"visibility: hidden;\">Total</div></td></tr></tbody>'\r\n , '</table>'\r\n ,'</div>'\r\n ,'{{# } }}'\r\n\r\n ,'<div class=\"layui-table-column layui-table-page layui-hide\">'\r\n ,'<div class=\"layui-inline layui-table-pageview\" id=\"layui-table-page{{=d.index}}\"></div>'\r\n ,'</div>'\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-.+$/.test(options.height)){\r\n that.fullHeightGap = options.height.split('-')[1];\r\n options.height = _WIN.height() - (parseFloat(that.fullHeightGap) || 0);\r\n } else if (options.height && /^#\\w+\\S*-.+$/.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() - (parseFloat(that.parentHeightGap) || 0);\r\n } else if (typeof options.height === \"function\"){\r\n that.customHeightFunc = options.height;\r\n options.height = that.customHeightFunc();\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 = $('<div></div>');\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 = ['width: ', (item2.width || options.cellMinWidth), '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 '<div class=\"layui-inline\" lay-event=\"add\"><i class=\"layui-icon layui-icon-add-1\"></i></div>',\r\n '<div class=\"layui-inline\" lay-event=\"update\"><i class=\"layui-icon layui-icon-edit\"></i></div>',\r\n '<div class=\"layui-inline\" lay-event=\"delete\"><i class=\"layui-icon layui-icon-delete\"></i></div>'\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('<div class=\"layui-inline\" title=\"'+ thisItem.title +'\" lay-event=\"'+ thisItem.layEvent +'\">'\r\n +'<i class=\"layui-icon '+ thisItem.icon +'\"></i>'\r\n +'</div>');\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 = $('<div class=\"layui-inline layui-table-pagebar\"></div>');\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 = $('<div class=\"'+ NONE +'\">'+ (html || 'Error') +'</div>');\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: typeof options.complete === 'function' ? options.complete : undefined,\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 = ['<td data-field=\"'+ field +'\" data-key=\"'+ key +'\" '+ function(){\r\n // 追加各种属性\r\n var attr = [];\r\n // 是否开启编辑。若 edit 传入函数,则根据函数的返回结果判断是否开启编辑\r\n (function(edit){\r\n if(edit) attr.push('data-edit=\"'+ edit +'\"'); // 添加单元格编辑属性标识\r\n })(typeof item3.edit === 'function' ? item3.edit(item1) : item3.edit);\r\n if(item3.templet) attr.push('data-content=\"'+ util.escape(content) +'\"'); // 自定义模板\r\n if(item3.toolbar) attr.push('data-off=\"true\"'); // 行工具列关闭单元格事件\r\n if(item3.event) attr.push('lay-event=\"'+ item3.event +'\"'); //自定义事件\r\n if(item3.minWidth) attr.push('data-minwidth=\"'+ item3.minWidth +'\"'); // 单元格最小宽度\r\n if(item3.maxWidth) attr.push('data-maxwidth=\"'+ item3.maxWidth +'\"'); // 单元格最大宽度\r\n if(item3.style) attr.push('style=\"'+ item3.style +'\"'); // 自定义单元格样式\r\n return attr.join(' ');\r\n }() +' class=\"'+ function(){ // 追加样式\r\n var classNames = [];\r\n if(item3.hide) classNames.push(HIDE); // 插入隐藏列样式\r\n if(!item3.field) classNames.push(ELEM_COL_SPECIAL); // 插入特殊列样式\r\n return classNames.join(' ');\r\n }() +'\">'\r\n ,'<div class=\"layui-table-cell laytable-cell-'+ function(){ // 返回对应的CSS类标识\r\n return item3.type === 'normal' ? key\r\n : (key + ' laytable-cell-' + item3.type);\r\n }() +'\"'\r\n + (item3.align ? ' align=\"'+ item3.align +'\"' : '')\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 '<input type=\"checkbox\" name=\"layTableCheckbox\" lay-skin=\"primary\" '+ function(){\r\n // 其他属性\r\n var arr = [];\r\n\r\n //如果是全选\r\n if(item3[checkName]){\r\n item1[checkName] = item3[checkName];\r\n if(item3[checkName]) arr[0] = 'checked';\r\n }\r\n if(tplData[checkName]) arr[0] = 'checked';\r\n\r\n // 禁选\r\n if(tplData[disabledName]) arr.push('disabled');\r\n\r\n return arr.join(' ');\r\n }() +' lay-type=\"layTableCheckbox\">';\r\n //break;\r\n case 'radio': // 单选\r\n return '<input type=\"radio\" name=\"layTableRadio_'+ options.index +'\" '\r\n + function(){\r\n var arr = [];\r\n if(tplData[checkName]) arr[0] = 'checked';\r\n if(tplData[disabledName]) arr.push('disabled');\r\n return arr.join(' ');\r\n }() +' lay-type=\"layTableRadio\">';\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 ,'</div></td>'].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('<tr '+ trAttr +'>'+ tds.join('') + '</tr>');\r\n trs_fixed.push('<tr '+ trAttr +'>'+ tds_fixed.join('') + '</tr>');\r\n trs_fixed_r.push('<tr '+ trAttr +'>'+ tds_fixed_r.join('') + '</tr>');\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: '<i class=\"layui-icon\">&#xe603;</i>',\r\n next: '<i class=\"layui-icon\">&#xe602;</i>',\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: $('<div>'+ content +'</div>').text()\r\n });\r\n\r\n // td 容器\r\n var td = ['<td data-field=\"'+ field +'\" data-key=\"'+ item3.key +'\" '+ function(){\r\n var attr = [];\r\n if(item3.minWidth) attr.push('data-minwidth=\"'+ item3.minWidth +'\"'); // 单元格最小宽度\r\n if(item3.maxWidth) attr.push('data-maxwidth=\"'+ item3.maxWidth +'\"'); // 单元格最小宽度\r\n if(item3.style) attr.push('style=\"'+ item3.style +'\"'); // 自定义单元格样式\r\n return attr.join(' ');\r\n }() +' class=\"'+ function(){ // 追加样式\r\n var classNames = [];\r\n if(item3.hide) classNames.push(HIDE); // 插入隐藏列样式\r\n if(!item3.field) classNames.push(ELEM_COL_SPECIAL); // 插入特殊列样式\r\n return classNames.join(' ');\r\n }() +'\">',\r\n '<div class=\"layui-table-cell laytable-cell-'+ function(){ // 返回对应的CSS类标识\r\n var key = item3.key;\r\n return item3.type === 'normal' ? key\r\n : (key + ' laytable-cell-' + item3.type);\r\n }() +'\"'+ function(){\r\n var attr = [];\r\n if(item3.align) attr.push('align=\"'+ item3.align +'\"'); // 对齐方式\r\n return attr.join(' ');\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 '</div></td>'].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('<tr>' + tds.join('') + (patchElem.length ? patchElem.get(0).outerHTML : '') + '</tr>');\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 isCheckAll = opts.index === 'all'; // 是否操作全部\r\n var isCheckMult = layui.type(opts.index) === 'array'; // 是否操作多个\r\n\r\n // 匹配行元素\r\n var tr = function(tr) {\r\n return isCheckAll ? tr : tr.filter(isCheckMult ? function() {\r\n var dataIndex = $(this).data('index');\r\n return opts.index.indexOf(dataIndex) !== -1;\r\n } : '[data-index=\"'+ opts.index +'\"]');\r\n }(that.layBody.find('tr'));\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\r\n // 若为单选框,则单向选中;若为复选框,则切换选中。\r\n var getChecked = function(value){\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 // 绕过空项和禁用项\r\n if(layui.type(item) === 'array' || item[options.disabledName]) return;\r\n\r\n // 匹配条件\r\n var matched = isCheckAll || (\r\n isCheckMult ? opts.index.indexOf(i) !== -1 : Number(opts.index) === i\r\n );\r\n\r\n // 设置匹配项的选中值\r\n if(matched){\r\n // 标记数据选中状态\r\n var checked = item[options.checkName] = getChecked(item[options.checkName]);\r\n\r\n // 标记当前行背景色\r\n var currTr = tr.filter('[data-index=\"'+ i +'\"]');\r\n currTr[checked ? 'addClass' : 'removeClass'](ELEM_CHECKED);\r\n\r\n // 若为 radio 类型,则取消其他行选中背景色\r\n if(opts.type === 'radio'){\r\n currTr.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 = $(['<div class=\"layui-table-init\">',\r\n '<i class=\"layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop\"></i>',\r\n '</div>'].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 var MIN_HEIGHT = 135;\r\n\r\n if(that.fullHeightGap){\r\n height = _WIN.height() - that.fullHeightGap;\r\n if(height < MIN_HEIGHT) height = MIN_HEIGHT;\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 < MIN_HEIGHT) height = MIN_HEIGHT;\r\n // that.elem.css(\"height\", height);\r\n } else if (that.customHeightFunc) {\r\n height = that.customHeightFunc();\r\n if(height < MIN_HEIGHT) height = MIN_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 = $('<th class=\"layui-table-patch\"><div class=\"layui-table-cell\"></div></th>'); // 补丁元素\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 = $('<ul class=\"' + ELEM_TOOL_PANEL + '\"></ul>');\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('<li><input type=\"checkbox\" name=\"'+ item.field +'\" data-key=\"'+ item.key +'\" data-parentkey=\"'+ (item.parentKey||'') +'\" lay-skin=\"primary\" '+ (item.hide ? '' : 'checked') +' title=\"'+ util.escape($('<div>' + (item.fieldTitle || item.title || item.field) + '</div>').text()) +'\" lay-filter=\"LAY_TABLE_TOOL_COLS\"></li>');\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 '<li data-type=\"csv\">导出 csv 格式文件</li>',\r\n '<li data-type=\"xls\">导出 xls 格式文件</li>'\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 = ['<style>',\r\n 'body{font-size: 12px; color: #5F5F5F;}',\r\n 'table{width: 100%; border-collapse: collapse; border-spacing: 0;}',\r\n 'th,td{line-height: 20px; padding: 9px 15px; border: 1px solid #ccc; text-align: left; font-size: 12px; color: #5F5F5F;}',\r\n 'a{color: #5F5F5F; text-decoration:none;}',\r\n 'img{max-height: 100%;}',\r\n '*.layui-hide{display: none}',\r\n '</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 = '<input class=\"layui-input '+ ELEM_EDIT +'\" lay-unrow>';\r\n if(editType === 'textarea') {\r\n inputElem = '<textarea class=\"layui-input ' + ELEM_EDIT + '\" lay-unrow></textarea>';\r\n }\r\n return inputElem;\r\n }());\r\n input[0].value = function(val) {\r\n return (val === undefined || val === null) ? '' : val;\r\n }(othis.data('content') || data[field]);\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('<div class=\"'+ ELEM_GRID_DOWN +'\"><i class=\"layui-icon layui-icon-down\"></i></div>');\r\n }\r\n };\r\n // 展开单元格内容\r\n var gridExpand = function(e, expandedMode){\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 = $('<i class=\"layui-icon layui-icon-up '+ ELEM_CELL_C +'\">');\r\n\r\n expandedMode = expandedMode || col.expandedMode || options.cellExpandedMode;\r\n\r\n // 展开风格\r\n if (expandedMode === 'tips') { // TIPS 展开风格\r\n that.tipsIndex = layer.tips([\r\n '<div class=\"layui-table-tips-main\" style=\"margin-top: -'+ (elemCell.height() + 23) +'px;'+ function(){\r\n if(options.size === 'sm'){\r\n return 'padding: 4px 15px; font-size: 12px;';\r\n }\r\n if(options.size === 'lg'){\r\n return 'padding: 14px 15px;';\r\n }\r\n return '';\r\n }() +'\">',\r\n elemCell.html(),\r\n '</div>',\r\n '<i class=\"layui-icon layui-table-tips-c layui-icon-close\"></i>'\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, ELEM_HOVER].join(' '), true); // 移除单元格展开样式\r\n that.cssRules(key, function(item){\r\n item.style.width = $this.data('cell-width'); // 恢复单元格展开前的宽度\r\n setTimeout(function(){\r\n that.resize(); // 滚动条补丁\r\n });\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, 'tips'); // 强制采用 tips 风格\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 that.layFixed.find(ELEM_BODY).on('mousewheel DOMMouseScroll', function(e) {\r\n var delta = e.originalEvent.wheelDelta || -e.originalEvent.detail;\r\n var scrollTop = that.layMain.scrollTop();\r\n var step = 30;\r\n\r\n e.preventDefault();\r\n that.layMain.scrollTop(scrollTop + (delta > 0 ? -step : step));\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 }else if(item3.field && item3.type !== 'normal'){\r\n // https://gitee.com/layui/layui/issues/I8PHCR\r\n if(i1 == 0) fieldsIsHide[item3.field] = true;\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: '<i class=\"layui-icon layui-icon-triangle-r\"></i>', // 关闭时候的折叠图标\r\n flexIconOpen: '<i class=\"layui-icon layui-icon-triangle-d\"></i>', // 打开时候的折叠图标\r\n showIcon: true, // 是否显示图标(节点类型图标)\r\n icon: '', // 节点图标,如果设置了这个属性或者数据中有这个字段信息,不管打开还是关闭都以这个图标的值为准\r\n iconClose: '<i class=\"layui-icon layui-icon-folder\"></i>', // 关闭时候的图标\r\n iconOpen: '<i class=\"layui-icon layui-icon-folder-open\"></i>', // 打开时候的图标\r\n iconLeaf: '<i class=\"layui-icon layui-icon-leaf\"></i>', // 叶子节点的图标\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('<i class=\"layui-icon layui-icon-loading layui-anim layui-anim-loop layui-anim-rotate\"></i>');\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('<i class=\"layui-icon layui-icon-refresh\"></i>');\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(['<div class=\"layui-inline layui-table-tree-flexIcon\" ',\r\n 'style=\"',\r\n 'margin-left: ' + (indent * trElem.attr('data-level')) + 'px;',\r\n (trData[isParentKey] || treeOptionsView.showFlexIconIfNotParent) ? '' : ' visibility: hidden;',\r\n '\">',\r\n trData[LAY_EXPAND] ? treeOptionsView.flexIconOpen : treeOptionsView.flexIconClose, // 折叠图标\r\n '</div>',\r\n treeOptionsView.showIcon ? '<div class=\"layui-inline layui-table-tree-nodeIcon' +\r\n ((trData[customName.icon] || treeOptionsView.icon) ? ' layui-table-tree-iconCustom' : '') +\r\n (trData[isParentKey] ? '' : ' layui-table-tree-iconLeaf') +\r\n '\">' +\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 '') + '</div>' : '', // 区分父子节点\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 // #1463 expandNode 中已经展开过的节点不会重新渲染\r\n debounceFn('renderTreeTable2-' + tableId, function () {\r\n form.render($('.layui-table-tree[lay-id=\"' + tableId + '\"]'));\r\n }, 0)();\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','util'], 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 var util = layui.util;\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 = $('<div class=\"layui-tree layui-border-box'+ (options.showCheckbox ? \" layui-form\" : \"\") + (options.showLine ? \" layui-tree-line\" : \"\") +'\" lay-filter=\"LAY-tree-'+ that.index +'\"></div>');\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 = $('<div class=\"layui-tree-emptyText\">'+ options.text.none +'</div>');\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 = $('<div class=\"layui-tree-pack\" '+ (item.spread ? 'style=\"display: block;\"' : '') +'></div>');\r\n var entryDiv = $(['<div data-id=\"'+ item[customName.id] +'\" class=\"layui-tree-set'+ (item.spread ? \" layui-tree-spread\" : \"\") + (item.checked ? \" layui-tree-checkedFirst\" : \"\") +'\">'\r\n ,'<div class=\"layui-tree-entry\">'\r\n ,'<div class=\"layui-tree-main\">'\r\n // 箭头\r\n ,function(){\r\n if(options.showLine){\r\n if(hasChild){\r\n return '<span class=\"layui-tree-iconClick layui-tree-icon\"><i class=\"layui-icon '+ (item.spread ? \"layui-icon-subtraction\" : \"layui-icon-addition\") +'\"></i></span>';\r\n }else{\r\n return '<span class=\"layui-tree-iconClick\"><i class=\"layui-icon layui-icon-file\"></i></span>';\r\n };\r\n }else{\r\n return '<span class=\"layui-tree-iconClick\"><i class=\"layui-tree-iconArrow '+ (hasChild ? \"\": HIDE) +'\"></i></span>';\r\n };\r\n }()\r\n \r\n // 复选框\r\n ,function(){\r\n return options.showCheckbox ? '<input type=\"checkbox\" name=\"'+ (item.field || ('layuiTreeCheck_'+ item[customName.id])) +'\" same=\"layuiTreeCheck\" lay-skin=\"primary\" '+ (item.disabled ? \"disabled\" : \"\") +' value=\"'+ item[customName.id] +'\">' : '';\r\n }()\r\n \r\n // 节点\r\n ,function(){\r\n if(options.isJump && item.href){\r\n return '<a href=\"'+ item.href +'\" target=\"_blank\" class=\"'+ ELEM_TEXT +'\">'+ (item[customName.title] || item.label || options.text.defaultNodeName) +'</a>';\r\n }else{\r\n return '<span class=\"'+ ELEM_TEXT + (item.disabled ? ' '+ DISABLED : '') +'\">'+ (item[customName.title] || item.label || options.text.defaultNodeName) +'</span>';\r\n }\r\n }()\r\n ,'</div>'\r\n \r\n // 节点操作图标\r\n ,function(){\r\n if(!options.edit) return '';\r\n \r\n var editIcon = {\r\n add: '<i class=\"layui-icon layui-icon-add-1\" data-type=\"add\"></i>'\r\n ,update: '<i class=\"layui-icon layui-icon-edit\" data-type=\"update\"></i>'\r\n ,del: '<i class=\"layui-icon layui-icon-delete\" data-type=\"del\"></i>'\r\n }, arr = ['<div class=\"layui-btn-group layui-tree-btnGroup\">'];\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('') + '</div>';\r\n }\r\n }()\r\n ,'</div></div>'].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('<div class=\"layui-tree-pack\"></div>');\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('<input type=\"text\" class=\"layui-tree-editInput\">');\r\n // 获取焦点\r\n elemMain.children('.layui-tree-editInput').val(util.unescape(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('确认删除该节点 \"<span style=\"color: #999;\">'+ (item[customName.title] || '') +'</span>\" 吗?', 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 ['<div class=\"layui-transfer-box\" data-index=\"'+ obj.index +'\">',\r\n '<div class=\"layui-transfer-header\">',\r\n '<input type=\"checkbox\" name=\"'+ obj.checkAllName +'\" lay-filter=\"layTransferCheckbox\" lay-type=\"all\" lay-skin=\"primary\" title=\"{{= d.data.title['+ obj.index +'] || \\'list'+ (obj.index + 1) +'\\' }}\">',\r\n '</div>',\r\n '{{# if(d.data.showSearch){ }}',\r\n '<div class=\"layui-transfer-search\">',\r\n '<i class=\"layui-icon layui-icon-search\"></i>',\r\n '<input type=\"text\" class=\"layui-input\" placeholder=\"关键词搜索\">',\r\n '</div>',\r\n '{{# } }}',\r\n '<ul class=\"layui-transfer-data\"></ul>',\r\n '</div>'].join('');\r\n };\r\n \r\n // 主模板\r\n var TPL_MAIN = ['<div class=\"layui-transfer layui-form layui-border-box\" lay-filter=\"LAY-transfer-{{= d.index }}\">',\r\n TPL_BOX({\r\n index: 0,\r\n checkAllName: 'layTransferLeftCheckAll'\r\n }),\r\n '<div class=\"layui-transfer-active\">',\r\n '<button type=\"button\" class=\"layui-btn layui-btn-sm layui-btn-primary layui-btn-disabled\" data-index=\"0\">',\r\n '<i class=\"layui-icon layui-icon-next\"></i>',\r\n '</button>',\r\n '<button type=\"button\" class=\"layui-btn layui-btn-sm layui-btn-primary layui-btn-disabled\" data-index=\"1\">',\r\n '<i class=\"layui-icon layui-icon-prev\"></i>',\r\n '</button>',\r\n '</div>',\r\n TPL_BOX({\r\n index: 1,\r\n checkAllName: 'layTransferRightCheckAll'\r\n }),\r\n '</div>'].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 = ['<li>',\r\n '<input type=\"checkbox\" name=\"'+ arr[_index].checkName +'\" lay-skin=\"primary\" lay-filter=\"layTransferCheckbox\" title=\"'+ item.title +'\"'+ (item.disabled ? ' disabled' : '') + (item.checked ? ' checked' : '') +' value=\"'+ item.value +'\">',\r\n '</li>'].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 var 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 var thisDataElem = othis.find('.'+ ELEM_DATA);\r\n var allElemCheckbox = othis.find('.'+ ELEM_HEADER).find('input[type=\"checkbox\"]');\r\n var listElemCheckbox = thisDataElem.find('input[type=\"checkbox\"]');\r\n \r\n // 同步复选框和按钮状态\r\n var nums = 0;\r\n var haveChecked = false;\r\n\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 = $('<p class=\"layui-none\">'+ (text || '') +'</p>');\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 var options = that.config;\r\n var arr = [];\r\n\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 var options = that.config;\r\n var 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 var options = that.config;\r\n var 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 var options = that.config;\r\n var thisBoxElem = that.layBox.eq(_index);\r\n var arr = [];\r\n\r\n if (!elem) {\r\n // 通过按钮触发找到选中的进行移动\r\n thisBoxElem.each(function(_index){\r\n var othis = $(this);\r\n var thisDataElem = othis.find('.'+ ELEM_DATA);\r\n\r\n thisDataElem.children('li').each(function(){\r\n var thisList = $(this);\r\n var thisElemCheckbox = thisList.find('input[type=\"checkbox\"]');\r\n var 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 var 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 var 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 var checked = thisElemCheckbox[0].checked;\r\n var 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 var thisElemCheckbox = elemThis.children('input[type=\"checkbox\"]');\r\n var thisDataElem = elemThis.parent();\r\n var thisBoxElem = thisDataElem.parent();\r\n var index = thisBoxElem.data('index');\r\n\r\n if(thisElemCheckbox[0].disabled) return;\r\n\r\n // 根据 dblclick 回调函数返回值决定是否执行穿梭 --- 2.9.3+\r\n var ret = typeof options.dblclick === 'function' ? options.dblclick({\r\n elem: elemThis,\r\n data: that.getData([thisElemCheckbox[0].value])[0],\r\n index: index\r\n }) : null;\r\n\r\n if(ret === false) return;\r\n\r\n that.transfer(index, elemThis);\r\n })\r\n\r\n // 穿梭按钮事件\r\n that.layBtn.on('click', function(){\r\n var othis = $(this);\r\n var _index = othis.data('index');\r\n\r\n if(othis.hasClass(DISABLED)) return;\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 '<button class=\"layui-icon '+ ELEM_ARROW +'\" lay-type=\"sub\">'+ (options.anim === 'updown' ? '&#xe619;' : '&#xe603;') +'</button>',\r\n '<button class=\"layui-icon '+ ELEM_ARROW +'\" lay-type=\"add\">'+ (options.anim === 'updown' ? '&#xe61a;' : '&#xe602;') +'</button>'\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 = $(['<div class=\"'+ ELEM_IND +'\"><ul>',\r\n function(){\r\n var li = [];\r\n layui.each(that.elemItem, function(index){\r\n li.push('<li'+ (options.index === index ? ' class=\"layui-this\"' : '') +'></li>');\r\n });\r\n return li.join('');\r\n }(),\r\n '</ul></div>'].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 touchstart', function(){\r\n if (that.config.autoplay === 'always') return;\r\n clearInterval(that.timer);\r\n }).on('mouseleave touchend', function(){\r\n if (that.config.autoplay === 'always') return;\r\n that.autoplay();\r\n });\r\n\r\n var touchEl = options.elem;\r\n var isVertical = options.anim === 'updown';\r\n lay.touchSwipe(touchEl, {\r\n onTouchEnd: function(e, state){\r\n var duration = Date.now() - state.timeStart;\r\n var distance = isVertical ? state.distanceY : state.distanceX;\r\n var speed = distance / duration;\r\n var shouldSwipe = Math.abs(speed) > 0.25 || Math.abs(distance) > touchEl[isVertical ? 'height' : 'width']() / 3;\r\n if(shouldSwipe){\r\n that.slide(distance > 0 ? '' : 'sub');\r\n }\r\n }\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 = '<ul class=\"layui-rate\" '+ (options.readonly ? 'readonly' : '') +'>';\r\n for(var i = 1;i <= options.length;i++){\r\n var item = '<li class=\"layui-inline\"><i class=\"layui-icon '\r\n + (i>Math.floor(options.value)?ICON_RATE:ICON_RATE_SOLID)\r\n + '\" '+ style +'></i></li>';\r\n\r\n if(options.half&&parseInt(options.value) !== options.value&&i == Math.ceil(options.value)){\r\n temp = temp + '<li><i class=\"layui-icon layui-icon-rate-half\" '+ style +'></i></li>';\r\n }else{\r\n temp = temp +item;\r\n }\r\n }\r\n temp += '</ul>' + (options.text ? ('<span class=\"layui-inline\">'+ options.value + '星') : '') + '</span>';\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 var liElems = _ul.children(\"li\");\r\n\r\n liElems.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 lay.touchSwipe(_ul, {\r\n onTouchMove: function(e, state){\r\n if(Date.now() - state.timeStart <= 200) return;\r\n var pageX = e.touches[0].pageX;\r\n var rateElemWidth = _ul.width();\r\n var itemElemWidth = rateElemWidth / options.length; // 单颗星的宽度\r\n var offsetX = pageX - _ul.offset().left;\r\n var num = offsetX / itemElemWidth; // 原始值\r\n var remainder = num % 1;\r\n var integer = num - remainder;\r\n\r\n // 最终值\r\n var score = remainder <= 0.5 && options.half ? integer + 0.5 : Math.ceil(num);\r\n if(score > options.length) score = options.length;\r\n if(score < 0) score = 0;\r\n\r\n liElems.each(function(index){\r\n var iconElem = $(this).children('i');\r\n var isActiveIcon = (Math.ceil(score) - index === 1);\r\n var needSelect = Math.ceil(score) > index;\r\n var shouldHalfIcon = (score - index === 0.5);\r\n\r\n if(needSelect){\r\n // 设置选中样式\r\n iconElem.addClass(ICON_RATE_SOLID).removeClass(ICON_HALF_RATE);\r\n if(options.half && shouldHalfIcon){\r\n iconElem.addClass(ICON_RATE_HALF).removeClass(ICON_RATE_SOLID);\r\n }\r\n }else{\r\n // 恢复初始样式\r\n iconElem.addClass(ICON_RATE).removeClass(ICON_SOLID_HALF);\r\n }\r\n\r\n // 设置缩放样式\r\n iconElem.toggleClass('layui-rate-hover', isActiveIcon);\r\n });\r\n\r\n // 更新最终值\r\n options.value = score;\r\n if(options.text) _ul.next(\"span\").text(options.value + \"星\");\r\n options.setText && options.setText(options.value);\r\n },\r\n onTouchEnd: function(e, state){\r\n if(Date.now() - state.timeStart <= 200) return;\r\n _ul.find('i').removeClass('layui-rate-hover');\r\n options.choose && options.choose(options.value);\r\n options.setText && options.setText(options.value);\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 = '<i class=\"layui-anim layui-anim-rotate layui-anim-loop layui-icon \">&#xe63e;</i>';\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 = '<cite>加载更多</cite>'\r\n ,more = $('<div class=\"layui-flow-more\"><a href=\"javascript:;\">'+ ELEM_TEXT +'</a></div>');\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 '<div class=\"'+ CONST.ELEM_LINE +'\">',\r\n (\r\n options.ln ? [\r\n '<div class=\"'+ CONST.ELEM_LINE_NUM +'\">',\r\n (util.digit(num + 1) + '.'),\r\n '</div>',\r\n ].join('') : ''\r\n ),\r\n '<div class=\"layui-code-line-content\">',\r\n (line || ' '),\r\n '</div>',\r\n '</div>'\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 = $('<div class=\"'+ CONST.ELEM_PREVIEW +'\">');\r\n var elemTabView = $('<div class=\"layui-tab layui-tab-brief\">');\r\n var elemHeaderView = $('<div class=\"layui-tab-title\">');\r\n var elemPreviewView = $('<div class=\"'+ [\r\n CONST.ELEM_ITEM,\r\n CONST.ELEM_ITEM +'-preview',\r\n 'layui-border'\r\n ].join(' ') +'\">');\r\n var elemToolbar = $('<div class=\"layui-code-tools\"></div>');\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 = $('<li lay-id=\"'+ v +'\">');\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 '<i class=\"layui-icon layui-icon-'+ className +'\" data-type=\"'+ type +'\" title=\"'+ title[0] +'\"></i>'\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('<iframe allowtransparency=\"true\" frameborder=\"0\"></iframe>');\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 = $('<code class=\"layui-code-wrap\"></code>'); // 此处的闭合标签是为了兼容 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('<div class=\"layui-code-ln-side\"></div>');\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 = $('<div class=\"'+ CONST.ELEM_HEADER +'\"></div>');\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 = $('<div class=\"layui-code-fixbar\"></div>');\r\n\r\n // 若开启复制,且未开启预览,则单独生成复制图标\r\n if(options.copy && !options.preview){\r\n var copyElem = $(['<span class=\"layui-code-copy\">',\r\n '<i class=\"layui-icon layui-icon-file-b\" title=\"复制\"></i>',\r\n '</span>'].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('<span class=\"layui-code-lang-marker\">' + options.lang + '</span>');\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"]}