mirror of
https://gitee.com/layui/layui.git
synced 2025-04-05 17:38:02 +08:00
1 line
1.6 MiB
1 line
1.6 MiB
{"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/component.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/tabs.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","tagName","toUpperCase","src","js","getElementsByTagName","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","tabs","element","rate","colorpicker","slider","carousel","flow","util","code","jquery","component","all","layui.all","EV_REMOVE","prototype","cache","define","deps","factory","use","setApp","app","exports","layui","callback","apps","from","node","url","that","head","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","getAttribute","_","c","link","href","cssname","id","STAUTS_NAME","debug","rel","media","getElementById","getLinkElem","parseInt","removeAttribute","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","hasOwnProperty","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","top","offsetX","offsetY","rect1","clickType","rect","left","clientX","clientY","right","bottom","getBoundingClientRect","elemWidth","offsetWidth","elemHeight","offsetHeight","align","allowBottomOut","offset","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_","addEvent","eventsCacheName","listener","include","_rawFn","removeEvent","newEvents","detachEvent","onClickOutside","handler","eventType","scopeTarget","scope","ignore","useCapture","capture","el","eventTarget","eventPath","composedPath","undefined","concat","getParents","memo","parentNode","shouldIgnore","targetElements","j","targetEl","hasOwn","prop","addStr","new_str","ii","removeStr","isObject","children","contains","child","addClass","className","removeClass","hasClass","has","css","parseValue","thisKey","thisValue","width","height","removeAttr","html","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","markerOfChineseFestivals","0-1-1","0-2-14","0-3-8","0-3-12","0-4-1","0-5-1","0-5-4","0-6-1","0-9-10","0-10-1","0-12-25","isStatic","date","datetime","eventElem","fullPanel","rangeStr","rangeLinked","autoCalendarModel","startDate","endDate","auto","rangeElem","EXP_IF","EXP_SPLIT","EXP","EXP_IF_ONE","isInput","ymd","hms","day","tDate","newDate","getFullYear","getMonth","getDate","hours","minutes","seconds","thisDate","getHours","getMinutes","getSeconds","elemID","formatToDisplay","setValue","systemDate","themeStr","shortcutBtns","colorTheme","class","elemMain","elemHeader","elemCont","elemTable","divFooter","footer","divShortcut","shortcut","divHeader","headerChild","divContent","thead","theadTr","tr","insertRow","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","markRender","tdElem","YMD","markers","markText","keys","td","holidaysRender","insertHtml","idx","dayStr","ymdStr2","ymd1","ymd2","ymdStr1","cellRender","dateObj","panelMode","originElem","startOfYear","setFullYear","setHours","endOfYear","startOfMonth","setDate","endOfMonth","addDays","amount","isDisabledYearOrMonth","startDay","endDay","numOfDays","disabledCount","disabledDate","isDisabledDate","rangeType","disabledType","normalizedDate","isDisabledTime","isDisabledItem","disabledTime","compareVal","rangeFn","rangeFnParam","isDisabledDateTime","timestamp","isOut","thisDateTime","startWeek","prevMaxDate","isAlone","tds","elemYM","firstDate","getDay","index_","st","panelYM","list","setBtnStatus","timeParams","stampRange","yearNum","setTimeStatus","showHour","liElem","hideCount","scroll","haveSpan","ul","haveList","isCN","startY","li","lay-ym","ol","childUL","showMinute","showSecond","isShow","isYearOrMonth","isChangeMonth","ym","closeList","choose","span","scrollTop","olElem","overflowY","touchAction","tips","elemBtn","displayValueCallback","props","getOwnPropertyDescriptor","HTMLInputElement","displayValue","elemPreview","color","thisTime","param","checkPanelDate","panelMonth","startPanel","firstRenderIndex","needFullRender","panelIndex","isChange","dateTimeTemp","renderMode","checkState","panelIdx","active","addSubYear","isYear","isMonth","prevYear","prevMonth","YM","nextMonth","nextYear","header","layYM","layType","toLocaleLowerCase","showEvent","eventHandler","unbind","run","closeStop","getInst","one","amd","global","module","w","Error","noGlobal","getProto","getPrototypeOf","flat","array","class2type","fnToString","ObjectFunctionString","support","isFunction","nodeType","isWindow","preservedScriptAttributes","nonce","noModule","DOMEval","script","toType","rhtmlSuffix","isArrayLike","toArray","pushStack","elems","ret","merge","prevObject","map","eq","grep","_elem","odd","copy","copyIsArray","deep","isPlainObject","expando","random","isReady","noop","proto","Ctor","isEmptyObject","globalEval","textContent","nodeValue","makeArray","results","inArray","isXMLDoc","namespace","namespaceURI","docElem","ownerDocument","second","invert","matches","callbackExpect","arg","guid","Symbol","iterator","pop","whitespace","rtrimCSS","rcssescape","a","b","bup","compareDocumentPosition","fcssescape","ch","asCodePoint","charCodeAt","escapeSelector","sel","Expr","outermostContext","sortInput","hasDuplicate","documentIsHTML","rbuggyQSA","preferredDoc","pushNative","dirruns","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","booleans","identifier","attributes","pseudos","rwhitespace","rcomma","rleadingCombinator","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rinputs","rheader","rquickExpr","rsibling","runescape","funescape","nonHex","high","fromCharCode","unloadHandler","setDocument","inDisabledFieldset","addCombinator","disabled","childNodes","els","seed","m","nid","newSelector","newContext","exec","getElementsByClassName","testContext","tokenize","toSelector","qsaError","cacheLength","shift","markFunction","assert","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","webkitMatchesSelector","msMatchesSelector","subWindow","defaultView","getById","getElementsByName","disconnectedMatch","cssHas","querySelector","attrId","getAttributeNode","compare","sortDetached","expr","elements","matchesSelector","attrHandle","uniqueSort","duplicates","sortStable","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","expectedNodeName","pattern","operator","check","what","_argument","simple","forward","ofType","_context","xml","outerCache","nodeIndex","parent","useCache","diff","firstChild","lastChild","pseudo","setFilters","not","matcher","compile","unmatched","elemLang","root","focus","activeElement","hasFocus","tabIndex","enabled","checked","selected","selectedIndex","empty","nextSibling","button","_matchIndexes","lt","gt","nth","radio","checkbox","file","password","image","submit","reset","parseOnly","tokens","soFar","preFilters","cached","combinator","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","matcherOut","preMap","postMap","preexisting","contexts","matcherIn","elementMatchers","setMatchers","bySet","byElement","superMatcher","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","filters","unique","getText","isXML","selectors","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","rparentsprev","parseHTML","guaranteedUnique","contents","sibling","cur","targets","l","closest","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","rnothtmlwhite","Identity","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","Callbacks","object","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","disable","lock","fireWith","Deferred","tuples","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","rejectWith","getErrorHook","getStackHook","stateString","when","singleValue","remaining","resolveContexts","resolveValues","primary","updateFunc","rerrorNames","readyList","asyncError","warn","message","stack","readyException","completed","readyWait","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","camelCase","string","acceptData","owner","Data","uid","configurable","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","removeData","_data","_removeData","attrs","dequeue","startLength","hooks","_queueHooks","unshift","stop","setter","clearQueue","tmp","defer","pnum","rcssNum","cssExpand","isAttached","composed","isHiddenWithinTree","getRootNode","display","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","values","hide","toggle","rcheckableType","rtagName","rscriptType","wrapMap","createDocumentFragment","checkClone","cloneNode","noCloneChecked","defaultValue","option","col","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","optgroup","rhtml","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rtypenamespace","returnTrue","returnFalse","types","origFn","leverageNative","isSetup","saved","isTrigger","delegateType","stopImmediatePropagation","isImmediatePropagationStopped","handleObjIn","eventHandle","t","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","handleObj","delegateCount","setup","mappedTypes","origCount","teardown","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","Event","enumerable","originalEvent","writable","noBubble","beforeunload","returnValue","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","char","charCode","buttons","pointerId","pointerType","screenX","screenY","targetTouches","toElement","which","blur","focusMappedHandler","documentMode","simulate","attaches","dataHolder","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","prepend","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","pixelPositionVal","boxSizingReliableVal","scrollboxSizeVal","pixelBoxStylesVal","reliableTrDimensionsVal","reliableMarginLeftVal","container","rnumnonpx","rcustomProp","getStyles","opener","swap","old","rboxStyle","computeStyleTests","divStyle","roundPixelMeasures","marginLeft","measure","round","curCSS","computed","isCustomProp","pixelBoxStyles","minWidth","maxWidth","addGetHookIf","conditionFn","hookFn","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","trStyle","trChild","borderTopWidth","borderBottomWidth","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","rdisplayswap","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","marginDelta","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","animationIterationCount","aspectRatio","borderImageSlice","columnCount","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zoom","fillOpacity","floodOpacity","stopOpacity","strokeMiterlimit","strokeOpacity","origName","setProperty","isFinite","scrollboxSizeBuggy","padding","border","prefix","suffix","expand","expanded","parts","propHooks","percent","eased","duration","pos","step","fx","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","tweens","specialEasing","originalProperties","originalOptions","gotoEnd","bind","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","prefilter","speed","opt","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","checkOn","optSelected","radioValue","boolHook","rfocusable","nType","attrHooks","attrNames","getter","lowercaseName","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","classNames","curValue","finalValue","toggleClass","stateVal","isValidValue","rreturn","valHooks","optionSet","rquery","rfocusMorph","parseXML","parserErrorElem","DOMParser","parseFromString","stopPropagationCallback","rbracket","onlyHandlers","bubbleType","ontype","lastElement","parentWindow","triggerHandler","rCRLF","rsubmitterTypes","rsubmittable","traditional","s","valueOrFunction","encodeURIComponent","buildParams","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","ajaxConvert","response","isSuccess","conv2","current","conv","converters","responseFields","dataFilter","throws","lastModified","etag","isLocal","protocol","processData","contentType","accepts","json","* text","text html","text json","text xml","ajaxSetup","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","fireGlobals","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","abort","statusText","finalText","crossDomain","urlAnchor","hasContent","uncached","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","ct","finalDataType","firstDataType","modified","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","oldCallbacks","cors","errorCallback","username","xhrFields","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","scriptCharset","evt","rjsonp","rtrim","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","animated","setOffset","curCSSTop","curTop","curOffset","curCSSLeft","curElem","curLeft","curPosition","using","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","trim","isRenderWithoutElem","isRenderOnEvent","isDeepReload","CONST","CLASS_THIS","CLASS_SHOW","CLASS_HIDE","CLASS_HIDEV","CLASS_DISABLED","CLASS_NONE","instance","extendsInstance","beforeInit","rerender","layOptions","beforeRender","MOD_CACHE_NAME","removeCache","layer_dir","removeFocus","beforeEnd","resize","minStackIndex","minStackArr","STATUS_NAME","alert","yes","cancel","btn2","rskin","skin","doms","closeBtn","icon","follow","fixed","setings","creat","pt","SHADE_KEY","1","2","3","4","5","6","slideLeft","slideRight","SHADE","MOVE","RECORD_HEIGHT_KEY","move","area","isOutAnim","minStack","moveType","scrollbar","vessel","conType","times","titype","ismax","maxmin","titleHTML","face","animClass","additFaceClass","btnAlign","layero","elemShade","setAnim","restore","hideOnClose","closeAll","tipsMore","moveElem","shadeo","setScrollbar","background-color","transition","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","btnLoading","btnElem","isLoading","openLayer","IE6","btnCallback","btnAsync","loading","promiseLikeResolve","reason","shadeClose","full","reselect","sthis","setTop","record","contentElem","contentRecordHeightElem","restScrollbar","getChildFrame","getFrameIndex","iframeAuto","heg","iframeSrc","elemMin","hasMinLeft","maxminStatus","minLeft","edgeIndex","contentRecordHeight","isfix","executor","closeAnim","WRAP","iframe","contentWindow","write","domsElem","closeLast","layerIndexMax","layerIndexList","isArrayType","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","wheelDelta","zoomElem","threshold","loadi","loadImage","winarea","imgarea","wh","_$","isMobile","_win","propSuffix","propName","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","REGEX_PARSE","years","days","milliseconds","meridiem","getMilliseconds","customMeridiem","hm","yy","yyyy","MM","dd","H","HH","hh","A","mm","ss","SSS","$1","unescape","openWin","specs","toVisibleArea","scrollElem","SCROLL_NAME","OFFSET_NAME","scrollValue","size","scrollOffset","thisOffset","thisElem","vertical","attrSelector","DATANAME","dataCache","_WIN","ELEM_LI","clickOrMousedown","MOD_INDEX_OPENED","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","closeOnClick","mainElem","eachItemView","elemUl","isChild","templet","group","-","viewLi","viewText","elemPanel","TPL_MAIN","mainElemExisted","findMainElem","delayRemove","isClickAllScope","clickScope","elemGroup","spread","normalizedDelay","isMouseEnter","thisEventElem","opened","isAccordion","needSpread","groupSibs","isCtxMenu","isTriggerTarget","isPanelTarget","ELEM_LI_PAR","dataParams","SLIDER_BAR","SLIDER_WRAP","SLIDER_WRAP_BTN","SLIDER_TIPS","SLIDER_INPUT_TXT","ELEM_HOVER","showstep","tipsAlways","precision","precisions","decimalArr","minValue","maxValue","scaleFir","scaleSec","hasRender","elemTemp","number","setSliderTipsTxt","sliderWrapBtnElem","tipsTxt","setTips","calcSliderTipsLeft","sliderWidth","sliderWrap","setSliderTipsLeft","margin-bottom","elemInput","slide","sliderAct","sliderTxt","inputValue","offsetValue","arrValue","firLeft","valueTo","secLeft","wrapWidth","selfValue","toFixed","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","needTrigger","needStopPropagation","triggerEvent","oldtop","oldy","maxh","maxw","simulatedEvent","pointer","createEvent","initMouseEvent","dispatchEvent","sidetop","basisElem","elemColorBoxSpan","colorValue","attrEvent","SHOW","TITLE","Element","NAV_ELEM","tabAdd","layAttr","tabElem","titElem","barElem","contElem","tabChange","tabAuto","tabDelete","layid","force","tabClick","dom","headerElem","NAV_ITEM","NAV_BAR","NAV_TREE","NAV_CHILD","NAV_MORE","NAV_ANIM","bodyElem","elemA","isJump","unselect","hasId","liThis","MORE","BAR","CLOSE","STOPE","allowclose","isSpread","hideTabMore","tsbTitle","clickThis","NAV_ITEMED","needExpand","parentSibs","collapse","isNone","elemFilter","items","nav","timerMore","timeEnd","NAV_TITLE","bar","itemElem","hasBarElem","thisA","breadcrumb","ATTE_SPR","separator","aNode","elemTitle","files","ELEM_FILE","ELEM_FORM","ELEM_IFRAME","ELEM_CHOOSE","UPLOADING","accept","exts","bindAction","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","clearInterval","setInterval","iframeBody","forceConvert","convert","thisFile","pushFile","resetFile","filename","newFile","File","getChooseFiles","typeName","images","video","audio","setChooseFile","setChooseText","checkFile","extendInfo","extInfo","ext","sizes","parseSize","FileList","dataTransfer","formatSize","log","needCheckboxFallback","HIDE","BAD_INPUT","Form","verify","required","phone","email","identity","autocomplete","getFormElem","itemForm","getValue","nameIndex","fieldElem","init_name","inputs","handleInputNumber","rawValue","noAction","isInit","isBadInput","isStepStrictly","decimals","controlBtn","increment","decrement","affix","CLASS_WRAP","CLASS_SUFFIX","CLASS_AFFIX","showAffix","renderAffix","affixOptions","elemAffix","elemIcon","hasElemAffix","hasElemSuffix","inputFilter","eye","SHOW_NAME","ns","skipCheck","isComposition","isReadonly","isMouseWheel","tempMatched","tempNumber","propertyName","specialCode","deltaX","deltaY","TIPS","NONE","CREATE_OPTION","PANEL_ELEM_DATA","selects","reElem","titleElem","isSearch","isCreatable","isAppendTo","removeClickOutsideEvent","laySearch","appendTarget","appendPosition","needPlaceholderPatch","showDown","hideDown","followScroll","notOption","dl","dts","initValue","caseSensitive","updatePosition","dlHeight","dds","__ieph","none","posTop","thisDd","ddHeight","setThisDd","prevNext","lastIndex","allDisplayedElem","nextIndex","origin","fuzzyMatchRE","hasEquals","fuzzy","keyword","wordMap","regexPattern","wordArr","isCreateOption","thisDds","firstOptionELem","hasTips","createOptionElem","ddElem","optionElem","optionsFirst","contentWrapElem","triggerElem","panelWrapElem","switch","SUBTRA","checks","RE_CLASS","titleTplAttrs","titleTplElem","toggleAttribute","indeterminate","isSwitch","isPrimary","syncAppearanceOnPropChanged","ICON","radios","ANIM","sameRadios","radioEl","renderItem","itemType","originProps","newValue","validate","intercept","DANGER","vers","verType","thisVer","rule","verst","isForm2Elem","layFilter","verifyElem","forceOn","forceOff","$dom","checkName","indexName","initIndexName","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","DISABLED_TRANSITION","DATA_MOVE_NAME","TPL_HEADER","TPL_BODY","eachChildCols","cellMinWidth","cellMaxWidth","MAX_VALUE","editTrigger","defaultToolbar","defaultContextmenu","autoSort","cols","pageName","limitName","statusName","msgName","dataName","totalRowName","countName","pullData","setInit","fullHeightGap","parentDiv","parentHeightGap","customHeightFunc","lay-filter","renderStyle","layTool","layBox","layHeader","layMain","layBody","layFixed","layFixLeft","layFixRight","layTotal","layPage","renderToolbar","renderPagebar","fullSize","initOpts","space","unresize","numbers","getWidth","clientWidth","getContentWidth","parentElem","initChildCols","i1","item1","i2","item2","indexChild","childIndex","colspan","rowspan","colGroup","i22","item22","HAS_PARENT","parentKey","lineStyle","trClassName","cellMaxHeight","iconElem","leftDefaultTemp","elemToolTemp","defaultConfig","toolbarHtml","layEvent","onClick","lis","openPanel","eachCols","fieldTitle","setParentCol","panel","exportFile","print","printWin","thElem","edg","onafterprint","itemIsName","thisItem","pagebarHtml","layPagebar","pagebar","parentTh","parentColspan","arrParentKey","getThisCol","colspan2","nextParentKey","setColsPatch","setGroupWidth","lastSpreadCol","colNums","autoColNums","autoWidth","countWidth","cntrWidth","borderWidth","headerTableElem","mainTableElem","isEmptyTable","getAutoWidth","getScrollWidth","back","pixelsForLastCol","i3","newWidth","isConnected","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","tdContent","TOTAL_ROW","patchElem","outerHTML","getColElem","renderFormByElem","checkAllElem","checkStatus","isAll","setRowActive","setRowChecked","makeMap","thisData","existChecked","getChecked","radioCheckedIndex","fixRElem","isCheckAll","isCheckMult","isCheckAllOrMult","dataIndex","checkedSameElem","checkedElem","_field","elemSort","fromEvent","selectorText","headerMain","thIndex","bodyHeight","layMainTable","scrollWidth","outWidth","addPatch","fixHeight","updateRow","ELEM_CELL","row","cell","_BODY","commonMember","oLeft","pLeft","allowResize","ruleWidth","thatTable","setWidth","nowType","clearCacheKey","del","update","fields","setRowEvent","getCol","UNROW","renderGridEdit","editType","ELEM_GRID_DOWN","oldValue","reedit","showGridExpandIcon","elemCell","gridExpand","expandedMode","ELEM_CELL_C","elemCellClose","cellExpandedMode","expandedWidth","cellExpandedWidth","$this","toolFn","rAF","cb","getElementSize","borderRightWidth","borderLeftWidth","paddingTop","paddingRight","paddingBottom","paddingLeft","marginTop","marginRight","marginBottom","boxSizing","errorTips","tdIndex","attrData","tableData","trElem","itemData","tableIns","CHILD_COLS","PARENT_COL_INDEX","arrs","eachArrs","invalidNum","getData","textType","csv","xls","alink","dataTitle","dataMain","fieldsIsHide","isTreeTable","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","HTML_TAG_RE","ICON_PROPS","updateCache","childrenKey","tableCache","itemDataIndex","updateOptions","thatOptionsTemp","treeOptions","idKey","hasNumberCol","hasChecboxCol","hasRadioCol","scrollTopCache","mod","parseDataThat","retData","isSimpleData","enable","flatToTree","updateStatus","initData","renderType","isRenderData","tableView","isExpandAll","layTableAllChooseElem","renderTreeTable","iconProp","normalizedIcon","cascade","isParent","indent","flexIconClose","flexIconOpen","showIcon","iconClose","iconOpen","iconLeaf","showFlexIconIfNotParent","dblClickExpand","expandAllDefault","rootPid","autoParam","beforeExpand","onExpand","iconStr","pIdKey","idTemp","pidTemp","rootNodes","tableId","flatArr","tempObj","treeToFlat","parentId","parentIndex","dataNew","getTreeNode","getParentNode","getNodeByIndex","treeNode","treeNodeData","getNodeDataByIndex","updateNode","removeNode","expandNode","setChecked","getNodeById","tableDataFlat","dataRet","indexArr","getTableData","isParentKey","debounceFn","expandFlag","sonSign","callbackFlag","tableViewElem","treeTableThat","trData","isToggle","trExpand","retValue","trExpanded","trsElem","flexIconElem","trDataId","updateNodeIcon","scopeEl","isExpand","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","nodeIconElem","nodeIcon","level","treeOptionsView","existsData","dataExpand","layDataIndex","nameKey","htmlTemp","itemCell","trIndex","trDefaultExpand","trMain","trFixedL","trFixedR","statusObj","notCascade","dataUpdated","updateObjParams","rowIndex","tableThat","updateFn","checkNode","newNode","trLevel","newNodeTemp","trNew","_keepParent","delNode","nodeP","delNodesFlat","updateCheckStatus","delNodeDataIndex","i4","item4","trEl","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","trDataP","radioElem","collectNeedExpandNodeIndex","needExpandIndex","nodeData","checkAllNodes","reloadAsyncNode","dataId","getNodesByFilter","isSingle","nodesResult","headerMode","HEADER","BODY","ITEM","CARD","getContainer","documentElem","elemView","elemHeaderItem","renderHeaderItem","elemBodyItem","renderBodyItem","renderClose","findHeaderItem","roll","afterRender","delegatedElement","onresize","bodyItem","mode","newHeaderItem","newBodyItem","headerItem","hasOwnIndex","thisHeaderItem","findBodyItem","closeMult","nextHeader","bodys","DISABLED_CLOSE_SELECTOR","FILTER","closableAttr","prevHeader","thatA","isLink","appendClose","closable","headerItems","tabsLeft","scrollMode","CLASS_SCROLL","CLASS_BAR","CLASS_BAR_ICON","rollElem","prevLeft","elemScroll","thisItemElem","thisLeft","thisBodyItem","getHeaderItem","getBodyItem","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","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","nums","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","addIndex","subIndex","itemsCount","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","isAuto","moreText","isTop","notDocument","more","mb","_cleanup","over","scrollHeightStart","scrollTopStart","scrollHeightEnd","isLazyimg","elemTop","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","rawCode","finalCode","isIframePreview","elemHeaderView","elemToolbar","runPreview","codeElem","createCodeRst","lines","setCodeLayout","elemFixbar","copyElem","reloadCode","obverse","codeRender","createCode","line","codeParse","hasDataClass","hasOnCopy","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":"8BAMC,CAAC,SAASA,GACT,aAEA,IAiBMC,EAjBFC,EAAMF,EAAIG,SACVC,EAAS,CACXC,QAAS,GACTC,OAAQ,GACRC,QAAS,GACTC,MAAO,EACT,EAEIC,EAAQ,WACVC,KAAKC,EAAI,QACX,EAGIC,EAASZ,EAAIa,cAAgB,GAG7BC,GACEb,EAAUC,EAAIa,eAA6D,WAA5Cb,EAAIa,cAAcC,QAAQC,YAAY,EAAkBf,EAAIa,cAAcG,IAAM,WAIjH,IAHA,IAEIA,EAFAC,EAAKjB,EAAIkB,q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AAqBt6C,EAAMq3C,eAAdprF,GACfjW,IAAI6N,cAAcS,EAAW,SAAS3L,EAAMxD,GAC1C,IACE8O,EAAS9O,GAAGohB,SAAS5d,EAAMsT,CAAK,CACrB,CAAX,MAAM7S,IACV,CAAC,EAIEP,CACR,EAAE,EAGCoE,EAAQ6kB,UACN65C,EAAaziE,EAAE,eAAgB8mD,EAAM0sB,YAAa,UAAU,GACrDtgE,KAAKnP,EAAQ+a,OAAS/a,EAAQkH,KAAK/M,IAAI,EAClD8O,EAAM4gC,QAAQ60B,CAAU,GAItB48B,EAAar/F,EAAE,uCAAuC,EAGvD+D,EAAQ4nB,MAAQ,CAAC5nB,EAAQsW,WACtBilF,EAAWt/F,EAAE,CAAC,iCAChB,oEACF,WAAWsN,KAAK,EAAE,CAAC,GAGV1N,GAAG,QAAS,WACnBoa,EAAM2R,KAAKzwB,MAAM,CACnB,CAAC,EAEDmkG,EAAW/zF,OAAOg0F,CAAQ,GAIxBv7F,EAAQ06F,YACVY,EAAW/zF,OAAO,wCAA0CvH,EAAQiV,KAAO,SAAS,EAIlFjV,EAAQq6F,OACViB,EAAW/zF,OAAOvH,EAAQq6F,KAAK,EAIjCpxF,EAAM1B,OAAO+zF,CAAU,EAGlBt7F,EAAQsW,SACXzZ,WAAW,WACe,YAAxB,OAAOmD,EAAQiK,MAAuBjK,EAAQiK,KAAK,EAAE,CACvD,EAAE,CAAC,EAIFjK,EAAQoF,KAAKnN,SAAmB,EAAR8D,GACE,YAA3B,OAAOiE,EAAQmjE,SAA0BnjE,EAAQmjE,QAAQ,IAGpD/7C,CACT,CAAC,CACH,CAAC,EAGGlsB,MAAM,cACRA,MAAMsE,OAAO,uBAAwB,aAAa","file":"layui.js","sourcesContent":["/**\n * Layui\n * Classic modular front-end UI library\n * MIT Licensed\n */\n\n;!function(win){\n \"use strict\";\n\n var doc = win.document;\n var config = {\n modules: {}, // 模块物理路径\n status: {}, // 模块加载状态\n timeout: 10, // 符合规范的模块请求最长等待秒数\n event: {} // 模块自定义事件\n };\n\n var Layui = function(){\n this.v = '2.10.1'; // Layui 版本号\n };\n\n // 识别预先可能定义的指定全局对象\n var GLOBAL = win.LAYUI_GLOBAL || {};\n\n // 获取 layui 所在目录\n var getPath = function(){\n var jsPath = (doc.currentScript && doc.currentScript.tagName.toUpperCase() === 'SCRIPT') ? doc.currentScript.src : function(){\n var js = doc.getElementsByTagName('script');\n var last = js.length - 1;\n var src;\n for(var i = last; i > 0; i--){\n if(js[i].readyState === 'interactive'){\n src = js[i].src;\n break;\n }\n }\n return src || js[last].src;\n }();\n\n return config.dir = GLOBAL.dir || jsPath.substring(0, jsPath.lastIndexOf('/') + 1);\n }();\n\n // 异常提示\n var error = function(msg, type){\n type = type || 'log';\n win.console && console[type] && console[type]('layui error hint: ' + msg);\n };\n\n var isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]';\n\n // 内置模块\n var modules = config.builtin = {\n lay: 'lay', // 基础 DOM 操作\n layer: 'layer', // 弹层\n laydate: 'laydate', // 日期\n laypage: 'laypage', // 分页\n laytpl: 'laytpl', // 模板引擎\n form: 'form', // 表单集\n upload: 'upload', // 上传\n dropdown: 'dropdown', // 下拉菜单\n transfer: 'transfer', // 穿梭框\n tree: 'tree', // 树结构\n table: 'table', // 表格\n treeTable: 'treeTable', // 树表\n tabs: 'tabs', // 标签页\n element: 'element', // 常用元素操作\n rate: 'rate', // 评分组件\n colorpicker: 'colorpicker', // 颜色选择器\n slider: 'slider', // 滑块\n carousel: 'carousel', // 轮播\n flow: 'flow', // 流加载\n util: 'util', // 工具块\n code: 'code', // 代码修饰器\n jquery: 'jquery', // DOM 库(第三方)\n component: 'component', // 组件构建器\n\n all: 'all',\n 'layui.all': 'layui.all' // 聚合标识(功能性的,非真实模块)\n };\n\n // 记录基础数据\n Layui.prototype.cache = config;\n\n // 定义模块\n Layui.prototype.define = function(deps, factory){\n var that = this;\n var type = typeof deps === 'function';\n var callback = function(){\n var setApp = function(app, exports){\n layui[app] = exports;\n config.status[app] = true;\n };\n typeof factory === 'function' && factory(function(app, exports){\n setApp(app, exports);\n config.callback[app] = function(){\n factory(setApp);\n }\n });\n return this;\n };\n\n type && (\n factory = deps,\n deps = []\n );\n\n that.use(deps, callback, null, 'define');\n return that;\n };\n\n // 使用特定模块\n Layui.prototype.use = function(apps, callback, exports, from){\n var that = this;\n var dir = config.dir = config.dir ? config.dir : getPath;\n var head = doc.getElementsByTagName('head')[0];\n\n apps = function(){\n if(typeof apps === 'string'){\n return [apps];\n }\n // 当第一个参数为 function 时,则自动加载所有内置模块,且执行的回调即为该 function 参数;\n else if(typeof apps === 'function'){\n callback = apps;\n return ['all'];\n }\n return apps;\n }();\n\n // 如果页面已经存在 jQuery 1.7+ 库且所定义的模块依赖 jQuery,则不加载内部 jquery 模块\n if(win.jQuery && jQuery.fn.on){\n that.each(apps, function(index, item){\n if(item === 'jquery'){\n apps.splice(index, 1);\n }\n });\n layui.jquery = layui.$ = jQuery;\n }\n\n var item = apps[0];\n var timeout = 0;\n\n exports = exports || [];\n\n // 静态资源host\n config.host = config.host || (dir.match(/\\/\\/([\\s\\S]+?)\\//)||['//'+ location.host +'/'])[0];\n\n // 加载完毕\n function onScriptLoad(e, url){\n var readyRegExp = navigator.platform === 'PLaySTATION 3' ? /^complete$/ : /^(complete|loaded)$/\n if (e.type === 'load' || (readyRegExp.test((e.currentTarget || e.srcElement).readyState))) {\n config.modules[item] = url;\n head.removeChild(node);\n (function poll() {\n if(++timeout > config.timeout * 1000 / 4){\n return error(item + ' is not a valid module', 'error');\n }\n config.status[item] ? onCallback() : setTimeout(poll, 4);\n }());\n }\n }\n\n // 回调\n function onCallback(){\n exports.push(layui[item]);\n apps.length > 1 ?\n that.use(apps.slice(1), callback, exports, from)\n : ( typeof callback === 'function' && function(){\n // 保证文档加载完毕再执行回调\n if(layui.jquery && typeof layui.jquery === 'function' && from !== 'define'){\n return layui.jquery(function(){\n callback.apply(layui, exports);\n });\n }\n callback.apply(layui, exports);\n }() );\n }\n\n // 如果引入了聚合板,内置的模块则不必重复加载\n if( apps.length === 0 || (layui['layui.all'] && modules[item]) ){\n return onCallback(), that;\n }\n\n /*\n * 获取加载的模块 URL\n * 如果是内置模块,则按照 dir 参数拼接模块路径\n * 如果是扩展模块,则判断模块路径值是否为 {/} 开头,\n * 如果路径值是 {/} 开头,则模块路径即为后面紧跟的字符。\n * 否则,则按照 base 参数拼接模块路径\n */\n\n var url = ( modules[item] ? (dir + 'modules/')\n : (/^\\{\\/\\}/.test(that.modules[item]) ? '' : (config.base || ''))\n ) + (that.modules[item] || item) + '.js';\n url = url.replace(/^\\{\\/\\}/, '');\n\n // 如果扩展模块(即:非内置模块)对象已经存在,则不必再加载\n if(!config.modules[item] && layui[item]){\n config.modules[item] = url; // 并记录起该扩展模块的 url\n }\n\n // 首次加载模块\n if(!config.modules[item]){\n var node = doc.createElement('script');\n\n node.async = true;\n node.charset = 'utf-8';\n node.src = url + function(){\n var version = config.version === true\n ? (config.v || (new Date()).getTime())\n : (config.version||'');\n return version ? ('?v=' + version) : '';\n }();\n\n head.appendChild(node);\n\n if(node.attachEvent && !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && !isOpera){\n node.attachEvent('onreadystatechange', function(e){\n onScriptLoad(e, url);\n });\n } else {\n node.addEventListener('load', function(e){\n onScriptLoad(e, url);\n }, false);\n }\n\n config.modules[item] = url;\n } else { // 缓存\n (function poll() {\n if(++timeout > config.timeout * 1000 / 4){\n return error(item + ' is not a valid module', 'error');\n }\n (typeof config.modules[item] === 'string' && config.status[item])\n ? onCallback()\n : setTimeout(poll, 4);\n }());\n }\n\n return that;\n };\n\n // 弃用原有的指定模块,以便重新扩展新的同名模块\n Layui.prototype.disuse = function(apps){\n var that = this;\n apps = that.isArray(apps) ? apps : [apps];\n that.each(apps, function (index, item) {\n if (!config.status[item]) {\n // return error('module ' + item + ' is not exist');\n }\n delete that[item];\n delete modules[item];\n delete that.modules[item];\n delete config.status[item];\n delete config.modules[item];\n });\n return that;\n };\n\n // 获取节点的 style 属性值\n // currentStyle.getAttribute 参数为 camelCase 形式的字符串\n Layui.prototype.getStyle = function(node, name){\n var style = node.currentStyle ? node.currentStyle : win.getComputedStyle(node, null);\n return style.getPropertyValue\n ? style.getPropertyValue(name)\n : style.getAttribute(name.replace(/-(\\w)/g, function(_, c){ return c ? c.toUpperCase() : '';}));\n };\n\n // css 外部加载器\n Layui.prototype.link = function(href, fn, cssname){\n var that = this;\n var head = doc.getElementsByTagName('head')[0];\n var link = doc.createElement('link');\n\n if(typeof fn === 'string') cssname = fn;\n\n var app = (cssname || href).replace(/\\.|\\//g, '');\n var id = 'layuicss-'+ app;\n var STAUTS_NAME = 'creating';\n var timeout = 0;\n\n link.href = href + (config.debug ? '?v='+new Date().getTime() : '');\n link.rel = 'stylesheet';\n link.id = id;\n link.media = 'all';\n\n if(!doc.getElementById(id)){\n head.appendChild(link);\n }\n\n if(typeof fn !== 'function') return that;\n\n // 轮询 css 是否加载完毕\n (function poll(status) {\n var delay = 100;\n var getLinkElem = doc.getElementById(id); // 获取动态插入的 link 元素\n\n // 如果轮询超过指定秒数,则视为请求文件失败或 css 文件不符合规范\n if(++timeout > config.timeout * 1000 / delay){\n return error(href + ' timeout');\n }\n\n // css 加载就绪\n if(parseInt(that.getStyle(getLinkElem, 'width')) === 1989){\n // 如果参数来自于初始轮询(即未加载就绪时的),则移除 link 标签状态\n if(status === STAUTS_NAME) getLinkElem.removeAttribute('lay-status');\n // 如果 link 标签的状态仍为「创建中」,则继续进入轮询,直到状态改变,则执行回调\n getLinkElem.getAttribute('lay-status') === STAUTS_NAME ? setTimeout(poll, delay) : fn();\n } else {\n getLinkElem.setAttribute('lay-status', STAUTS_NAME);\n setTimeout(function(){\n poll(STAUTS_NAME);\n }, delay);\n }\n }());\n\n // 轮询css是否加载完毕\n /*\n (function poll() {\n if(++timeout > config.timeout * 1000 / 100){\n return error(href + ' timeout');\n };\n parseInt(that.getStyle(doc.getElementById(id), 'width')) === 1989 ? function(){\n fn();\n }() : setTimeout(poll, 100);\n }());\n */\n\n return that;\n };\n\n // css 内部加载器\n Layui.prototype.addcss = function(firename, fn, cssname){\n return layui.link(config.dir + 'css/' + firename, fn, cssname);\n };\n\n // 存储模块的回调\n config.callback = {};\n\n // 重新执行模块的工厂函数\n Layui.prototype.factory = function(modName){\n if(layui[modName]){\n return typeof config.callback[modName] === 'function'\n ? config.callback[modName]\n : null;\n }\n };\n\n // 图片预加载\n Layui.prototype.img = function(url, callback, error) {\n var img = new Image();\n img.src = url;\n if(img.complete){\n return callback(img);\n }\n img.onload = function(){\n img.onload = null;\n typeof callback === 'function' && callback(img);\n };\n img.onerror = function(e){\n img.onerror = null;\n typeof error === 'function' && error(e);\n };\n };\n\n // 全局配置\n Layui.prototype.config = function(options){\n options = options || {};\n for(var key in options){\n config[key] = options[key];\n }\n return this;\n };\n\n // 记录全部模块\n Layui.prototype.modules = function(){\n var clone = {};\n for(var o in modules){\n clone[o] = modules[o];\n }\n return clone;\n }();\n\n // 拓展模块\n Layui.prototype.extend = function(options){\n var that = this;\n\n // 验证模块是否被占用\n options = options || {};\n for(var o in options){\n if(that[o] || that.modules[o]){\n error(o+ ' Module already exists', 'error');\n } else {\n that.modules[o] = options[o];\n }\n }\n\n return that;\n };\n\n // location.hash 路由解析\n Layui.prototype.router = Layui.prototype.hash = function(hash){\n var that = this;\n var hash = hash || location.hash;\n var data = {\n path: [],\n search: {},\n hash: (hash.match(/[^#](#.*$)/) || [])[1] || '',\n href: ''\n };\n\n if (!/^#/.test(hash)) return data; // 禁止非路由规范\n\n hash = hash.replace(/^#/, '');\n data.href = hash;\n hash = hash.replace(/([^#])(#.*$)/, '$1').split('/') || [];\n\n // 提取 Hash 结构\n that.each(hash, function(index, item){\n /^\\w+=/.test(item) ? function(){\n item = item.split('=');\n data.search[item[0]] = item[1];\n }() : data.path.push(item);\n });\n\n return data;\n };\n\n // URL 解析\n Layui.prototype.url = function(href){\n var that = this;\n var data = {\n // 提取 url 路径\n pathname: function(){\n var pathname = href\n ? function(){\n var str = (href.match(/\\.[^.]+?\\/.+/) || [])[0] || '';\n return str.replace(/^[^\\/]+/, '').replace(/\\?.+/, '');\n }()\n : location.pathname;\n return pathname.replace(/^\\//, '').split('/');\n }(),\n\n // 提取 url 参数\n search: function(){\n var obj = {};\n var search = (href\n ? function(){\n var str = (href.match(/\\?.+/) || [])[0] || '';\n return str.replace(/\\#.+/, '');\n }()\n : location.search\n ).replace(/^\\?+/, '').split('&'); // 去除 ?,按 & 分割参数\n\n // 遍历分割后的参数\n that.each(search, function(index, item){\n var _index = item.indexOf('=')\n ,key = function(){ // 提取 key\n if(_index < 0){\n return item.substr(0, item.length);\n } else if(_index === 0){\n return false;\n } else {\n return item.substr(0, _index);\n }\n }();\n // 提取 value\n if(key){\n obj[key] = _index > 0 ? item.substr(_index + 1) : null;\n }\n });\n\n return obj;\n }(),\n\n // 提取 Hash\n hash: that.router(function(){\n return href\n ? ((href.match(/#.+/) || [])[0] || '/')\n : location.hash;\n }())\n };\n\n return data;\n };\n\n // 本地持久存储\n Layui.prototype.data = function(table, settings, storage){\n table = table || 'layui';\n storage = storage || localStorage;\n\n if(!win.JSON || !win.JSON.parse) return;\n\n // 如果 settings 为 null,则删除表\n if(settings === null){\n return delete storage[table];\n }\n\n settings = typeof settings === 'object'\n ? settings\n : {key: settings};\n\n try {\n var data = JSON.parse(storage[table]);\n } catch(e) {\n var data = {};\n }\n\n if('value' in settings) data[settings.key] = settings.value;\n if(settings.remove) delete data[settings.key];\n storage[table] = JSON.stringify(data);\n\n return settings.key ? data[settings.key] : data;\n };\n\n // 本地临时存储\n Layui.prototype.sessionData = function(table, settings){\n return this.data(table, settings, sessionStorage);\n }\n\n // 设备信息\n Layui.prototype.device = function(key){\n var agent = navigator.userAgent.toLowerCase();\n\n // 获取版本号\n var getVersion = function(label){\n var exp = new RegExp(label + '/([^\\\\s\\\\_\\\\-]+)');\n label = (agent.match(exp)||[])[1];\n return label || false;\n };\n\n // 返回结果集\n var result = {\n os: function(){ // 底层操作系统\n if(/windows/.test(agent)){\n return 'windows';\n } else if(/linux/.test(agent)){\n return 'linux';\n } else if(/iphone|ipod|ipad|ios/.test(agent)){\n return 'ios';\n } else if(/mac/.test(agent)){\n return 'mac';\n }\n }(),\n ie: function(){ // ie 版本\n return (!!win.ActiveXObject || \"ActiveXObject\" in win) ? (\n (agent.match(/msie\\s(\\d+)/) || [])[1] || '11' // 由于 ie11 并没有 msie 的标识\n ) : false;\n }(),\n weixin: getVersion('micromessenger') // 是否微信\n };\n\n // 任意的 key\n if(key && !result[key]){\n result[key] = getVersion(key);\n }\n\n // 移动设备\n result.android = /android/.test(agent);\n result.ios = result.os === 'ios';\n result.mobile = (result.android || result.ios);\n\n return result;\n };\n\n // 提示\n Layui.prototype.hint = function(){\n return {\n error: error\n };\n };\n\n // typeof 类型细分 -> string/number/boolean/undefined/null、object/array/function/…\n Layui.prototype._typeof = Layui.prototype.type = function(operand){\n if(operand === null) return String(operand);\n\n // 细分引用类型\n return (typeof operand === 'object' || typeof operand === 'function') ? function(){\n var type = Object.prototype.toString.call(operand).match(/\\s(.+)\\]$/) || []; // 匹配类型字符\n var classType = 'Function|Array|Date|RegExp|Object|Error|Symbol'; // 常见类型字符\n\n type = type[1] || 'Object';\n\n // 除匹配到的类型外,其他对象均返回 object\n return new RegExp('\\\\b('+ classType + ')\\\\b').test(type)\n ? type.toLowerCase()\n : 'object';\n }() : typeof operand;\n };\n\n // 对象是否具备数组结构(此处为兼容 jQuery 对象)\n Layui.prototype._isArray = Layui.prototype.isArray = function(obj){\n var that = this;\n var len;\n var type = that.type(obj);\n\n if(!obj || (typeof obj !== 'object') || obj === win) return false;\n\n len = 'length' in obj && obj.length; // 兼容 ie\n return type === 'array' || len === 0 || (\n typeof len === 'number' && len > 0 && (len - 1) in obj // 兼容 jQuery 对象\n );\n };\n\n // 遍历\n Layui.prototype.each = function(obj, fn){\n var key;\n var that = this;\n var callFn = function(key, obj){ // 回调\n return fn.call(obj[key], key, obj[key])\n };\n\n if(typeof fn !== 'function') return that;\n obj = obj || [];\n\n // 优先处理数组结构\n if(that.isArray(obj)){\n for(key = 0; key < obj.length; key++){\n if(callFn(key, obj)) break;\n }\n } else {\n for(key in obj){\n if(callFn(key, obj)) break;\n }\n }\n\n return that;\n };\n\n // 将数组中的成员对象按照某个 key 的 value 值进行排序\n Layui.prototype.sort = function(arr, key, desc, notClone){\n var that = this;\n var clone = notClone ? (arr || []) : JSON.parse(\n JSON.stringify(arr || [])\n );\n\n // 若未传入 key,则直接返回原对象\n if(that.type(arr) === 'object' && !key){\n return clone;\n } else if(typeof arr !== 'object'){ // 若 arr 非对象\n return [clone];\n }\n\n // 开始排序\n clone.sort(function(o1, o2){\n var v1 = o1[key];\n var v2 = o2[key];\n\n /*\n * 特殊数据\n * 若比较的成员均非对象\n */\n\n // 若比较的成员均为数字\n if(!isNaN(o1) && !isNaN(o2)) return o1 - o2;\n // 若比较的成员只存在某一个非对象\n if(!isNaN(o1) && isNaN(o2)){\n if(key && typeof o2 === 'object'){\n v1 = o1;\n } else {\n return -1;\n }\n } else if (isNaN(o1) && !isNaN(o2)){\n if(key && typeof o1 === 'object'){\n v2 = o2;\n } else {\n return 1;\n }\n }\n\n /*\n * 正常数据\n * 即成员均为对象,也传入了对比依据: key\n * 若 value 为数字,按「大小」排序;若 value 非数字,则按「字典序」排序\n */\n\n // value 是否为数字\n var isNum = [!isNaN(v1), !isNaN(v2)];\n\n // 若为数字比较\n if(isNum[0] && isNum[1]){\n if(v1 && (!v2 && v2 !== 0)){ // 数字 vs 空\n return 1;\n } else if((!v1 && v1 !== 0) && v2){ // 空 vs 数字\n return -1;\n } else { // 数字 vs 数字\n return v1 - v2;\n }\n }\n\n /**\n * 字典序排序\n */\n\n // 若为非数字比较\n if(!isNum[0] && !isNum[1]){\n // 字典序比较\n if(v1 > v2){\n return 1;\n } else if (v1 < v2) {\n return -1;\n } else {\n return 0;\n }\n }\n\n // 若为混合比较\n if(isNum[0] || !isNum[1]){ // 数字 vs 非数字\n return -1;\n } else if(!isNum[0] || isNum[1]) { // 非数字 vs 数字\n return 1;\n }\n\n });\n\n desc && clone.reverse(); // 倒序\n return clone;\n };\n\n // 阻止事件冒泡\n Layui.prototype.stope = function(thisEvent){\n thisEvent = thisEvent || win.event;\n try { thisEvent.stopPropagation() } catch(e){\n thisEvent.cancelBubble = true;\n }\n };\n\n // 字符常理\n var EV_REMOVE = 'LAYUI-EVENT-REMOVE';\n\n // 自定义模块事件\n Layui.prototype.onevent = function(modName, events, callback){\n if(typeof modName !== 'string'\n || typeof callback !== 'function') return this;\n\n return Layui.event(modName, events, null, callback);\n };\n\n // 执行自定义模块事件\n Layui.prototype.event = Layui.event = function(modName, events, params, fn){\n var that = this;\n var result = null;\n var filter = (events || '').match(/\\((.*)\\)$/)||[]; // 提取事件过滤器字符结构,如:select(xxx)\n var eventName = (modName + '.'+ events).replace(filter[0], ''); // 获取事件名称,如:form.select\n var filterName = filter[1] || ''; // 获取过滤器名称,,如:xxx\n var callback = function(_, item){\n var res = item && item.call(that, params);\n res === false && result === null && (result = false);\n };\n\n // 如果参数传入特定字符,则执行移除事件\n if(params === EV_REMOVE){\n delete (that.cache.event[eventName] || {})[filterName];\n return that;\n }\n\n // 添加事件\n if(fn){\n config.event[eventName] = config.event[eventName] || {};\n\n if (filterName) {\n // 带filter不支持重复事件\n config.event[eventName][filterName] = [fn];\n } else {\n // 不带filter处理的是所有的同类事件,应该支持重复事件\n config.event[eventName][filterName] = config.event[eventName][filterName] || [];\n config.event[eventName][filterName].push(fn);\n }\n return this;\n }\n\n // 执行事件回调\n layui.each(config.event[eventName], function(key, item){\n // 执行当前模块的全部事件\n if(filterName === '{*}'){\n layui.each(item, callback);\n return;\n }\n\n // 执行指定事件\n key === '' && layui.each(item, callback);\n (filterName && key === filterName) && layui.each(item, callback);\n });\n\n return result;\n };\n\n // 新增模块事件\n Layui.prototype.on = function(events, modName, callback){\n var that = this;\n return that.onevent.call(that, modName, events, callback);\n }\n\n // 移除模块事件\n Layui.prototype.off = function(events, modName){\n var that = this;\n return that.event.call(that, modName, events, EV_REMOVE);\n };\n\n // 防抖\n Layui.prototype.debounce = function (func, wait) {\n var timeout;\n return function () {\n var context = this;\n var args = arguments;\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n func.apply(context, args);\n }, wait);\n }\n };\n\n // 节流\n Layui.prototype.throttle = function (func, wait) {\n var cooldown = false;\n return function () {\n var context = this;\n var args = arguments;\n if (!cooldown) {\n func.apply(context, args);\n cooldown = true;\n setTimeout(function () {\n cooldown = false;\n }, wait);\n }\n }\n };\n\n // exports layui\n win.layui = new Layui();\n\n}(window); // gulp build: layui-footer\n\n","/**\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 * @param {[offsetX:number, offsetY:number]} [opts.offset] - 相对于触发元素的额外偏移量[x,y]\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 var offsetX = opts.offset ? opts.offset[0] : 0;\r\n var offsetY = opts.offset ? opts.offset[1] : 0;\r\n\r\n // 设置坐标\r\n elem.style.left = left + (position === 'fixed' ? 0 : scrollArea(1)) + offsetX + 'px';\r\n elem.style.top = top + (position === 'fixed' ? 0 : scrollArea()) + offsetY + '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 /** @type {(elem: Element|Document|Window,eventName: string,fn:EventListenerOrEventListenerObject,options: boolean | AddEventListenerOptions) => any}*/\r\n lay.addEvent = function(){\r\n if(document.addEventListener){\r\n return function(elem, eventName, fn, options){\r\n elem.addEventListener(eventName, fn, options);\r\n }\r\n }else{\r\n return function(elem, eventName, fn){\r\n var prefix = '_lay_on_';\r\n var eventsCacheName = prefix + eventName;\r\n var listener = function(e){\r\n e.target = e.srcElement;\r\n fn.call(elem, e);\r\n }\r\n listener._rawFn = fn;\r\n if(!elem[eventsCacheName]){\r\n elem[eventsCacheName] = [];\r\n }\r\n var include = false;\r\n lay.each(elem[eventsCacheName], function(_, listener){\r\n if(listener._rawFn === fn){\r\n include = true;\r\n return true;\r\n }\r\n })\r\n if(!include){\r\n elem[eventsCacheName].push(listener);\r\n elem.attachEvent('on' + eventName, listener);\r\n }\r\n }\r\n }\r\n }();\r\n\r\n /** @type {(elem: Element|Document|Window,eventName: string,fn:EventListenerOrEventListenerObject,options: boolean | EventListenerOptions) => any}*/\r\n lay.removeEvent = function(){\r\n if(document.removeEventListener){\r\n return function(elem, eventName, fn, options){\r\n elem.removeEventListener(eventName, fn, options);\r\n }\r\n }else{\r\n return function(elem, eventName, fn){\r\n var prefix = '_lay_on_';\r\n var eventsCacheName = prefix + eventName;\r\n var events = elem[eventsCacheName];\r\n if(layui.isArray(events)){\r\n var newEvents = [];\r\n lay.each(events, function(_, listener){\r\n if(listener._rawFn === fn){\r\n elem.detachEvent('on'+ eventName, listener);\r\n }else{\r\n newEvents.push(listener);\r\n }\r\n })\r\n elem[eventsCacheName] = newEvents;\r\n } \r\n } \r\n }\r\n }();\r\n\r\n /**\r\n * 监听指定元素外部的点击\r\n * @param {HTMLElement} target - 被监听的元素\r\n * @param {(e: Event) => void} handler - 事件触发时执行的函数\r\n * @param {object} [options] - 选项\r\n * @param {string} [options.event=\"pointerdown\"] - 监听的事件类型\r\n * @param {HTMLElement | Window} [options.scope=document] - 监听范围\r\n * @param {Array<HTMLElement | string>} [options.ignore] - 忽略监听的元素或选择器字符串\r\n * @param {boolean} [options.capture=true] - 对内部事件侦听器使用捕获阶段\r\n * @returns {() => void} - 返回一个停止事件监听的函数\r\n */\r\n lay.onClickOutside = function(target, handler, options){\r\n options = options || {};\r\n var eventType = options.event || ('onpointerdown' in window ? 'pointerdown' : 'mousedown');\r\n var scopeTarget = options.scope || document;\r\n var ignore = options.ignore || [];\r\n var useCapture = 'capture' in options ? options.capture : true;\r\n\r\n var listener = function(event){\r\n var el = target;\r\n var eventTarget = event.target || event.srcElement;\r\n var eventPath = getEventPath(event);\r\n\r\n if (!el || el === eventTarget || eventPath.indexOf(el) !== -1){\r\n return;\r\n }\r\n if(shouldIgnore(event, eventPath)){\r\n return;\r\n }\r\n\r\n handler(event);\r\n };\r\n\r\n function shouldIgnore(event, eventPath){\r\n var eventTarget = event.target || event.srcElement;\r\n for(var i = 0; i < ignore.length; i++){\r\n var target = ignore[i];\r\n if(typeof target === 'string'){\r\n var targetElements = document.querySelectorAll(target);\r\n for(var j = 0; j < targetElements.length; j++){\r\n var targetEl = targetElements[i];\r\n if(targetEl === eventTarget || eventPath.indexOf(targetEl) !== -1){\r\n return true;\r\n }\r\n }\r\n }else{\r\n if(target && (target === eventTarget || eventPath.indexOf(target) !== -1)){\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n function getEventPath(event){\r\n var path = (event.composedPath && event.composedPath()) || event.path;\r\n var eventTarget = event.target || event.srcElement;\r\n\r\n if (path !== null && path !== undefined){\r\n return path;\r\n }\r\n\r\n function getParents(node, memo){\r\n memo = memo || [];\r\n var parentNode = node.parentNode;\r\n\r\n return parentNode\r\n ? getParents(parentNode, memo.concat([parentNode]))\r\n : memo;\r\n }\r\n\r\n return [eventTarget].concat(getParents(eventTarget));\r\n }\r\n\r\n function bindEventListener(elem, eventName, handler, opts){\r\n elem.addEventListener\r\n ? elem.addEventListener(eventName, handler, opts)\r\n : elem.attachEvent('on' + eventName, handler);\r\n\r\n return function(){\r\n elem.removeEventListener\r\n ? elem.removeEventListener(eventName, handler, opts)\r\n : elem.detachEvent('on' + eventName, handler);\r\n }\r\n }\r\n\r\n return bindEventListener(\r\n scopeTarget, \r\n eventType, \r\n listener, \r\n lay.passiveSupported ? { passive: true, capture: useCapture } : useCapture\r\n );\r\n }\r\n\r\n var hasOwnProperty = Object.prototype.hasOwnProperty;\r\n lay.hasOwn = function(obj, prop){\r\n return hasOwnProperty.call(obj, prop);\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, options){\r\n return this.each(function(index, item){\r\n lay.addEvent(item, eventName, fn, options)\r\n });\r\n };\r\n\r\n // 解除事件\r\n Class.fn.off = function(eventName, fn, options){\r\n return this.each(function(index, item){\r\n lay.removeEvent(item, eventName, fn, options)\r\n });\r\n };\r\n\r\n // export\r\n window.lay = lay;\r\n\r\n // 输出为 layui 模块\r\n if(window.layui && layui.define){\r\n layui.define(function(exports){\r\n exports(MOD_NAME, lay);\r\n });\r\n }\r\n\r\n}(window, window.document); // gulp build: lay-footer\r\n","/**\r\n * laytpl 轻量模板引擎\r\n */\r\n\r\nlayui.define(function(exports){\r\n \"use strict\";\r\n\r\n // 默认属性\r\n var config = {\r\n open: '{{', // 标签符前缀\r\n close: '}}' // 标签符后缀\r\n };\r\n\r\n // 模板工具\r\n var tool = {\r\n escape: function(html){\r\n var exp = /[<\"'>]|&(?=#[a-zA-Z0-9]+)/g;\r\n if(html === undefined || html === null) return '';\r\n\r\n html += '';\r\n if(!exp.test(html)) return html;\r\n\r\n return html.replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&')\r\n .replace(/</g, '<').replace(/>/g, '>')\r\n .replace(/'/g, ''').replace(/\"/g, '"');\r\n }\r\n };\r\n\r\n // 内部方法\r\n var inner = {\r\n exp: function(str){\r\n return new RegExp(str, 'g');\r\n },\r\n // 错误提示\r\n error: function(e, source){\r\n var error = 'Laytpl Error: ';\r\n typeof console === 'object' && console.error(error + e + '\\n'+ (source || ''));\r\n return error + e;\r\n }\r\n };\r\n\r\n // constructor\r\n var Class = function(template, options){\r\n var that = this;\r\n that.config = that.config || {};\r\n that.template = template;\r\n\r\n // 简单属性合并\r\n var extend = function(obj){\r\n for(var i in obj){\r\n that.config[i] = obj[i];\r\n }\r\n };\r\n\r\n extend(config);\r\n extend(options);\r\n };\r\n\r\n // 标签正则\r\n Class.prototype.tagExp = function(type, _, __){\r\n var options = this.config;\r\n var types = [\r\n '#([\\\\s\\\\S])+?', // js 语句\r\n '([^{#}])*?' // 普通字段\r\n ][type || 0];\r\n\r\n return inner.exp((_||'') + options.open + types + options.close + (__||''));\r\n };\r\n\r\n // 模版解析\r\n Class.prototype.parse = function(template, data){\r\n var that = this;\r\n var options = that.config;\r\n var source = template;\r\n var jss = inner.exp('^'+ options.open +'#', '');\r\n var jsse = inner.exp(options.close +'$', '');\r\n\r\n // 模板必须为 string 类型\r\n if(typeof template !== 'string') return template;\r\n\r\n // 正则解析\r\n template = template.replace(/\\s+|\\r|\\t|\\n/g, ' ')\r\n .replace(inner.exp(options.open +'#'), options.open +'# ')\r\n .replace(inner.exp(options.close +'}'), '} '+ options.close).replace(/\\\\/g, '\\\\\\\\')\r\n\r\n // 不匹配指定区域的内容\r\n .replace(inner.exp(options.open + '!(.+?)!' + options.close), function(str){\r\n str = str.replace(inner.exp('^'+ options.open + '!'), '')\r\n .replace(inner.exp('!'+ options.close), '')\r\n .replace(inner.exp(options.open + '|' + options.close), function(tag){\r\n return tag.replace(/(.)/g, '\\\\$1')\r\n });\r\n return str\r\n })\r\n\r\n // 匹配 JS 语法\r\n .replace(/(?=\"|')/g, '\\\\').replace(that.tagExp(), function(str){\r\n str = str.replace(jss, '').replace(jsse, '');\r\n return '\";' + str.replace(/\\\\(.)/g, '$1') + ';view+=\"';\r\n })\r\n\r\n // 匹配普通输出语句\r\n .replace(that.tagExp(1), function(str){\r\n var start = '\"+laytpl.escape(';\r\n if(str.replace(/\\s/g, '') === options.open + options.close){\r\n return '';\r\n }\r\n str = str.replace(inner.exp(options.open + '|' + options.close), '');\r\n if(/^=/.test(str)){\r\n str = str.replace(/^=/, '');\r\n } else if(/^-/.test(str)){\r\n str = str.replace(/^-/, '');\r\n start = '\"+(';\r\n }\r\n return start + str.replace(/\\\\(.)/g, '$1') + ')+\"';\r\n });\r\n\r\n template = '\"use strict\";var view = \"' + template + '\";return view;';\r\n\r\n try {\r\n /**\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 : '上一页'; // 上一页文本\r\n config.next = 'next' in config ? config.next : '下一页'; // 下一页文本\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=\"首页\">'+ (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\">...</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\">...</span>');\r\n }\r\n if(groups !== 0){\r\n pager.push('<a class=\"layui-laypage-last\" title=\"尾页\" 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 '到第',\r\n '页',\r\n '确定'\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// @ts-expect-error\r\n;!function(window, document){ // gulp build: laydate-header\r\n \"use strict\";\r\n\r\n var isLayui = window.layui && layui.define;\r\n var ready = {\r\n getPath: window.lay && lay.getPath ? lay.getPath : '',\r\n\r\n // 载入 CSS 依赖\r\n link: function (href, fn, cssname) {\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 = 'lay-' + MOD_NAME + '-id'; // 已渲染过的索引标记名\r\n\r\n // 外部调用\r\n var laydate = {\r\n v: '5.6.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 Class.prototype.markerOfChineseFestivals = {\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 }\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 //获取限制内日期\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 // 重定义 input 元素的 get set\r\n if(typeof options.formatToDisplay === 'function'){\r\n if(that.isInput(options.elem[0])){\r\n that.formatToDisplay(options.elem[0], options.formatToDisplay);\r\n } else {\r\n var rangeElem = that.rangeElem;\r\n if(rangeElem){\r\n that.formatToDisplay(rangeElem[0][0], options.formatToDisplay);\r\n that.formatToDisplay(rangeElem[1][0], options.formatToDisplay);\r\n }\r\n }\r\n }\r\n\r\n //默认赋值\r\n if(options.value && options.isInitValue){\r\n if(layui.type(options.value) === 'date'){\r\n that.setValue(that.parse(0, that.systemDate(options.value)));\r\n } else {\r\n that.setValue(options.value);\r\n }\r\n }\r\n };\r\n\r\n //控件主体渲染\r\n Class.prototype.render = function(){\r\n var that = this\r\n ,options = that.config\r\n ,lang = that.lang()\r\n ,isStatic = options.position === 'static'\r\n\r\n //主面板\r\n ,elem = that.elem = lay.elem('div', {\r\n id: that.elemID\r\n ,\"class\": [\r\n 'layui-laydate'\r\n ,options.range ? ' layui-laydate-range' : ''\r\n ,that.rangeLinked ? ' layui-laydate-linkage' : ''\r\n ,isStatic ? (' '+ ELEM_STATIC) : ''\r\n ,options.fullPanel ? ' laydate-theme-fullpanel' : '' // 全面版\r\n // ,options.theme && options.theme !== 'default' && !/^#/.test(options.theme) ? (' laydate-theme-' + options.theme) : ''\r\n ,(function () {\r\n var themeStr = '';\r\n lay.each(options.theme, function (index, theme) {\r\n if (theme !== 'default' && !/^#/.test(theme)) {\r\n themeStr += ' laydate-theme-' + theme;\r\n }\r\n })\r\n return themeStr;\r\n })()\r\n ].join('')\r\n })\r\n\r\n //主区域\r\n ,elemMain = that.elemMain = []\r\n ,elemHeader = that.elemHeader = []\r\n ,elemCont = that.elemCont = []\r\n ,elemTable = that.table = []\r\n\r\n //底部区域\r\n ,divFooter = that.footer = lay.elem('div', {\r\n \"class\": ELEM_FOOTER\r\n })\r\n\r\n //快捷栏\r\n ,divShortcut = that.shortcut = lay.elem('ul', {\r\n \"class\": ELEM_SHORTCUT\r\n });\r\n\r\n if(options.zIndex) elem.style.zIndex = options.zIndex;\r\n\r\n //单双日历区域\r\n lay.each(new Array(2), function(i){\r\n if(!options.range && i > 0){\r\n return true;\r\n }\r\n\r\n //头部区域\r\n var divHeader = lay.elem('div', {\r\n \"class\": 'layui-laydate-header'\r\n })\r\n\r\n //左右切换\r\n ,headerChild = [function(){ //上一年\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-prev-y'\r\n });\r\n elem.innerHTML = '';\r\n return elem;\r\n }(), function(){ //上一月\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-prev-m'\r\n });\r\n elem.innerHTML = '';\r\n return elem;\r\n }(), function(){ //年月选择\r\n var elem = lay.elem('div', {\r\n \"class\": 'laydate-set-ym'\r\n });\r\n elem.appendChild(lay.elem('span'));\r\n elem.appendChild(lay.elem('span'));\r\n return elem;\r\n }(), function(){ //下一月\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-next-m'\r\n });\r\n elem.innerHTML = '';\r\n return elem;\r\n }(), function(){ //下一年\r\n var elem = lay.elem('i', {\r\n \"class\": 'layui-icon laydate-icon laydate-next-y'\r\n });\r\n elem.innerHTML = '';\r\n return elem;\r\n }()]\r\n\r\n //日历内容区域\r\n ,divContent = lay.elem('div', {\r\n \"class\": 'layui-laydate-content'\r\n })\r\n ,table = lay.elem('table')\r\n ,thead = lay.elem('thead'), theadTr = lay.elem('tr');\r\n\r\n //生成年月选择\r\n lay.each(headerChild, function(i, item){\r\n divHeader.appendChild(item);\r\n });\r\n\r\n //生成表格\r\n thead.appendChild(theadTr);\r\n lay.each(new Array(6), function(i){ //表体\r\n var tr = table.insertRow(0);\r\n lay.each(new Array(7), function(j){\r\n if(i === 0){\r\n var th = lay.elem('th');\r\n th.innerHTML = lang.weeks[(j + options.weekStart) % 7];\r\n theadTr.appendChild(th);\r\n }\r\n tr.insertCell(j);\r\n });\r\n });\r\n table.insertBefore(thead, table.children[0]); //表头\r\n divContent.appendChild(table);\r\n\r\n elemMain[i] = lay.elem('div', {\r\n \"class\": ELEM_MAIN + ' laydate-main-list-'+ i\r\n });\r\n\r\n elemMain[i].appendChild(divHeader);\r\n elemMain[i].appendChild(divContent);\r\n\r\n elemHeader.push(headerChild);\r\n elemCont.push(divContent);\r\n elemTable.push(table);\r\n });\r\n\r\n //生成底部栏\r\n lay(divFooter).html(function(){\r\n var html = [], btns = [];\r\n if(options.type === 'datetime'){\r\n html.push('<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 * 渲染备注\r\n * @param {JQuery} tdElem td 元素\r\n * @param {[number, number, number]} YMD 年月日\r\n * @param {object | string} markers 备注信息\r\n */\r\n Class.prototype.markRender = function(tdElem, YMD, markers){\r\n var markText;\r\n\r\n if(typeof markers === 'object'){\r\n lay.each(markers || {}, 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 markText = title || YMD[2];\r\n }\r\n });\r\n }else if(typeof markers === 'string'){\r\n markText = markers || YMD[2];\r\n }\r\n\r\n markText && tdElem.find('div').html('<span class=\"laydate-day-mark\">'+ markText +'</span>');\r\n }\r\n\r\n /**\r\n * 公历重要日期与自定义备注\r\n * @param {JQuery} td \r\n * @param {[number, number, number]} YMD \r\n * @returns Class\r\n */\r\n Class.prototype.mark = function(td, YMD){\r\n var that = this;\r\n var options = that.config;\r\n\r\n var render = function(markers){\r\n that.markRender(td, YMD, markers);\r\n }\r\n\r\n if(options.calendar && options.lang === 'cn'){\r\n render(that.markerOfChineseFestivals);\r\n } \r\n\r\n if(typeof options.mark === 'function'){\r\n options.mark({year: YMD[0], month: YMD[1], date: YMD[2]}, render);\r\n }else if(typeof options.mark === 'object'){\r\n render(options.mark);\r\n }\r\n\r\n return that;\r\n };\r\n\r\n /**\r\n * 渲染法定节假日或补假上班标记\r\n * @param {JQuery} tdElem td 元素\r\n * @param {[number, number, number]} YMD 年月日\r\n * @param {[Array<string>, Array<string>] | string} markers 标记信息\r\n */\r\n Class.prototype.holidaysRender = function(tdElem, YMD, markers){\r\n var type = ['holidays', 'workdays'];\r\n\r\n var isEquals = function(ymdStr1, ymdStr2){\r\n var ymd1 = ymdStr1.split('-');\r\n var ymd2 = ymdStr2.split('-');\r\n\r\n lay.each(ymd1, function(i,v){\r\n ymd1[i] = parseInt(v, 10);\r\n })\r\n lay.each(ymd2, function(i,v){\r\n ymd2[i] = parseInt(v, 10);\r\n })\r\n \r\n return ymd1.join('-') === ymd2.join('-');\r\n }\r\n\r\n var insertHtml = function(el, type, text){\r\n el.find('div').html([\r\n '<span',\r\n ' class=\"laydate-day-holidays\"',\r\n ' type=\"'+ type +'\"',\r\n '>',\r\n text,\r\n '</span>'\r\n ].join(''));\r\n }\r\n \r\n if(layui.type(markers) === 'array'){\r\n lay.each(markers, function(idx, item) {\r\n lay.each(item, function(i, dayStr) {\r\n if(isEquals(dayStr, tdElem.attr('lay-ymd'))){\r\n insertHtml(tdElem, type[idx], YMD[2])\r\n }\r\n });\r\n });\r\n }else if(typeof markers === 'string'){\r\n if(type.indexOf(markers) !== -1){\r\n insertHtml(tdElem, markers, YMD[2])\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * 标注法定节假日或补假上班\r\n * @param {JQuery} td \r\n * @param {[number, number, number]} YMD \r\n * @returns Class\r\n */\r\n Class.prototype.holidays = function(td, YMD) {\r\n var that = this;\r\n var options = that.config;\r\n\r\n var render = function(markers){\r\n that.holidaysRender(td, YMD, markers);\r\n }\r\n\r\n if(typeof options.holidays === 'function'){\r\n options.holidays({year: YMD[0], month: YMD[1], date: YMD[2]}, render);\r\n }else if(layui.type(options.holidays) === 'array'){\r\n render(options.holidays);\r\n }\r\n\r\n return that;\r\n };\r\n\r\n /**\r\n * 自定义单元格\r\n * @param {HTMLElement|Array<HTMLElement>} el - 单元格元素\r\n * @param {{year:number, month:number, date:number}} dateObj - 当前单元格对应的日期信息\r\n * @param {'year' | 'month' | 'date'} panelMode - 面板模式\r\n * @returns \r\n */\r\n Class.prototype.cellRender = function(el, dateObj, panelMode){\r\n var that = this;\r\n var options = that.config;\r\n\r\n if(typeof options.cellRender === 'function'){\r\n var render = function(content){\r\n if(typeof content === 'string'){\r\n lay(el).html(content);\r\n }else if(typeof content === 'object'){\r\n lay(el).html('').append(lay(content)[0]);\r\n }\r\n }\r\n options.cellRender(dateObj, render, {originElem: el, type: panelMode})\r\n }\r\n\r\n return that;\r\n }\r\n\r\n /**\r\n * 给定年份的开始日期\r\n * @param {Date} date \r\n */\r\n Class.prototype.startOfYear = function(date){\r\n var newDate = new Date(date);\r\n newDate.setFullYear(newDate.getFullYear(), 0, 1);\r\n newDate.setHours(0, 0, 0, 0);\r\n return newDate;\r\n }\r\n\r\n /**\r\n * 给定年份的结束日期\r\n * @param {Date} date\r\n */\r\n Class.prototype.endOfYear = function(date){\r\n var newDate = new Date(date);\r\n var year = newDate.getFullYear();\r\n newDate.setFullYear(year + 1, 0, 0);\r\n newDate.setHours(23, 59, 59, 999);\r\n return newDate;\r\n }\r\n\r\n /**\r\n * 给定月份的开始日期\r\n * @param {Date} date \r\n */\r\n Class.prototype.startOfMonth = function(date){\r\n var newDate = new Date(date);\r\n newDate.setDate(1);\r\n newDate.setHours(0, 0, 0, 0);\r\n return newDate;\r\n }\r\n\r\n /**\r\n * 给定月份的结束日期\r\n * @param {Date} date \r\n */\r\n Class.prototype.endOfMonth = function(date){\r\n var newDate = new Date(date);\r\n var month = newDate.getMonth();\r\n newDate.setFullYear(newDate.getFullYear(), month + 1, 0);\r\n newDate.setHours(23, 59, 59, 999);\r\n return newDate;\r\n }\r\n\r\n /**\r\n * 将指定的天数添加到给定日期\r\n * @param {Date} date 要更改的日期\r\n * @param {number} amount 天数\r\n */\r\n Class.prototype.addDays = function(date, amount){\r\n var newDate = new Date(date);\r\n if(!amount) return newDate;\r\n newDate.setDate(newDate.getDate() + amount);\r\n return newDate;\r\n }\r\n\r\n /**\r\n * 不可选取的年或月。年或月中的所有日期都禁用时,才判定为不可选取。\r\n * @param {Date} date 要检测的年或月\r\n * @param {'year' | 'month'} type 面板类型\r\n * @param {'start' | 'end'} position 面板位置\r\n */\r\n Class.prototype.isDisabledYearOrMonth = function(date, type, position){\r\n var that = this;\r\n var options = that.config;\r\n var millisecondsInDay = 24 * 60 * 60 * 1000;\r\n\r\n var startDay = type === 'year' ? that.startOfYear(date) : that.startOfMonth(date);\r\n var endDay = type === 'year' ? that.endOfYear(date) : that.endOfMonth(date);\r\n var numOfDays = Math.floor((endDay.getTime() - startDay.getTime()) / millisecondsInDay) + 1;\r\n var disabledCount = 0;\r\n \r\n for(var i = 0; i < numOfDays; i++){\r\n var day = that.addDays(startDay, i);\r\n if(options.disabledDate.call(options, day, position)){\r\n disabledCount++;\r\n }\r\n }\r\n\r\n return disabledCount === numOfDays;\r\n }\r\n\r\n /**\r\n * @typedef limitOptions\r\n * @prop {JQuery} [elem] - 检测的元素, 例如面板中年月日时分秒元素,“现在”,“确认” 按钮等\r\n * @prop {number} [index] - 元素集合中,当前检测元素的索引,years:0,month:0,date:0-41,hms:0\r\n * @prop {['hours', 'minutes', 'seconds'] | ['hours', 'minutes'] | ['hours']} [time] - 是否比较时分秒\r\n * @prop {'year'|'month'|string} [type] - 面板类型?\r\n * @prop {0 | 1} [rangeType] - 面板索引, 0 表示 start, 1 表示 end\r\n * @prop {Partial<{year:number,month: number,date:number,hours:number,minutes:number,seconds:number}>} [date] - 检测的日期时间对象\r\n * @prop {'date' | 'time' | 'datetime'} disabledType - 禁用类型,按钮应使用 datetime\r\n */\r\n /**\r\n * 不可选取的日期\r\n * @param {number} date 当前检测的日期的时间戳\r\n * @param {limitOptions} opts\r\n * @returns {boolean}\r\n */\r\n Class.prototype.isDisabledDate = function(date, opts){\r\n opts = opts || {};\r\n\r\n var that = this;\r\n var options = that.config;\r\n var position = options.range ? (opts.rangeType === 0 ? 'start' : 'end') : 'start';\r\n \r\n if(!options.disabledDate) return false;\r\n if(options.type === 'time') return false;\r\n if(!(opts.disabledType === 'date' || opts.disabledType === 'datetime')) return false;\r\n\r\n // 不需要时分秒\r\n var normalizedDate = new Date(date);\r\n normalizedDate.setHours(0, 0, 0, 0);\r\n \r\n return opts.type === 'year' || opts.type === 'month'\r\n ? that.isDisabledYearOrMonth(normalizedDate, opts.type, position)\r\n : options.disabledDate.call(options, normalizedDate, position);\r\n }\r\n\r\n /**\r\n * 不可选取的时间\r\n * @param {number} date 当前检测的日期的时间戳\r\n * @param {limitOptions} opts\r\n * @returns {boolean}\r\n */\r\n Class.prototype.isDisabledTime = function(date, opts){\r\n opts = opts || {};\r\n\r\n var that = this;\r\n var options = that.config;\r\n var position = options.range ? (opts.rangeType === 0 ? 'start' : 'end') : 'start';\r\n \r\n if(!options.disabledTime) return false;\r\n if(!(options.type === \"time\" || options.type === \"datetime\")) return false;\r\n if(!(opts.disabledType === 'time' || opts.disabledType === 'datetime')) return false;\r\n\r\n var isDisabledItem = function(compareVal, rangeFn, rangeFnParam){\r\n return function(){\r\n return (typeof rangeFn === 'function' && rangeFn.apply(options, rangeFnParam) || []).indexOf(compareVal) !== -1;\r\n } \r\n }\r\n\r\n var dateObj = that.systemDate(new Date(date));\r\n var disabledTime = options.disabledTime.call(options, that.newDate(dateObj), position) || {};\r\n\r\n // 面板中的时分秒 HTML 元素需要分别检测是否禁用\r\n // 按钮检测任意一项是否禁用即可\r\n return opts.disabledType === 'datetime'\r\n ? isDisabledItem(dateObj.hours, disabledTime.hours)()\r\n || isDisabledItem(dateObj.minutes, disabledTime.minutes, [dateObj.hours])()\r\n || isDisabledItem(dateObj.seconds, disabledTime.seconds, [dateObj.hours, dateObj.minutes])()\r\n : [isDisabledItem(dateObj.hours, disabledTime.hours),\r\n isDisabledItem(dateObj.minutes, disabledTime.minutes, [dateObj.hours]),\r\n isDisabledItem(dateObj.seconds, disabledTime.seconds, [dateObj.hours, dateObj.minutes])][opts.time.length - 1]();\r\n }\r\n\r\n /**\r\n * 不可选取的日期时间\r\n * @param {number} timestamp 当前检测的日期的时间戳\r\n * @param {limitOptions} opts \r\n * @returns \r\n */\r\n Class.prototype.isDisabledDateTime = function(timestamp, opts){\r\n opts = opts || {};\r\n\r\n var that = this;\r\n var options = that.config;\r\n\r\n return that.isDisabledDate(timestamp, opts) || that.isDisabledTime(timestamp, opts);\r\n }\r\n\r\n\r\n /**\r\n * 无效日期范围的标记\r\n * @param {limitOptions} opts \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 || that.isDisabledDateTime(timestamp.now, opts);\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 rangeType: index,\r\n disabledType: 'date' // 日面板,检测当前日期是否禁用\r\n });\r\n that.cellRender(item, {year: YMD[0], month: YMD[1], date: YMD[2]}, 'date');\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 if(!that.panelYM) that.panelYM = {};\r\n that.panelYM[index] = {year: dateTime.year, month: dateTime.month};\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 disabledType: 'datetime' // 按钮,检测日期和时间\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 disabledType: 'datetime' // 按钮,检测日期和时间\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 rangeType: index,\r\n disabledType: 'date' // 年面板,检测当前年份中的所有日期是否禁用\r\n });\r\n that.cellRender(li, {year: yearNum, month: 1, date: 1}, 'year');\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 rangeType: index,\r\n disabledType: 'date' // 月面板,检测当前月份中的所有日期是否禁用\r\n });\r\n that.cellRender(li, {year: listYM[0], month: i + 1, date: 1}, 'month');\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 rangeType: index,\r\n disabledType: 'time', // 时间面板,分别检测时分秒列表是否禁用\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 disabledType: 'datetime' // 确认按钮,检测时分秒列表任意一项是否禁用\r\n });\r\n }\r\n };\r\n\r\n var setTimeListVisibility = function(){\r\n var showHour = options.format.indexOf('H') !== -1;\r\n var showMinute = options.format.indexOf('m') !== -1;\r\n var showSecond = options.format.indexOf('s') !== -1;\r\n var liElem = ul.children;\r\n var hideCount = 0;\r\n\r\n lay.each([showHour, showMinute, showSecond], function(i, isShow){\r\n if(!isShow){\r\n liElem[i].className += ' layui-hide';\r\n hideCount++;\r\n }\r\n })\r\n ul.className += (' laydate-time-list-hide-' + hideCount);\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 setTimeListVisibility();\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 = ['year', 'month'].indexOf(options.type) !== -1;\r\n var isChangeMonth = type === 'year' && ['date', 'datetime'].indexOf(options.type) !== -1;\r\n if (isYearOrMonth || isChangeMonth) {\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') || isChangeMonth) {\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') && that.done(null, 'change');\r\n\r\n //同步按钮可点状态\r\n that.setBtnStatus();\r\n });\r\n });\r\n\r\n if(layui.device().mobile){\r\n olElem.css({\r\n overflowY: 'auto',\r\n touchAction: 'pan-y'\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\r\n ,elemBtn = lay(that.footer).find(ELEM_CONFIRM)\r\n ,timeParams = options.type === 'datetime' || options.type === 'time' ? ['hours', 'minutes', 'seconds'] : undefined;\r\n if(options.range){\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 disabledType: 'datetime', // 按钮,检测日期和时间\r\n time: timeParams,\r\n rangeType: 0\r\n }) || that.limit({\r\n date: end,\r\n disabledType: 'datetime', // 按钮,检测日期和时间\r\n time: timeParams,\r\n rangeType: 1\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 * 格式化输入框显示值\r\n * @param {HTMLInputElement} elem HTML input 元素\r\n * @param {(value: string) => string} displayValueCallback \r\n */\r\n Class.prototype.formatToDisplay = function (elem, displayValueCallback) {\r\n var that = this;\r\n var props = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,'value');\r\n \r\n Object.defineProperty(\r\n elem,\r\n 'value',\r\n lay.extend({}, props, {\r\n get: function () {\r\n return this.getAttribute('lay-date');\r\n },\r\n set: function (value) {\r\n props.set.call(this, displayValueCallback.call(that, value));\r\n this.setAttribute('lay-date', value);\r\n },\r\n })\r\n );\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 var displayValue = typeof options.formatToDisplay === 'function' ? options.formatToDisplay(value) : value;\r\n lay(elem).html(displayValue);\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 * 判断日期是否存在面板,用于处理日期范围选择的一些边缘情况\r\n * @param {object} datetime 日期时间对象\r\n * @param {number} index - 面板索引\r\n * @returns \r\n */\r\n Class.prototype.checkPanelDate = function(datetime, index){\r\n var that = this;\r\n var options = that.config;\r\n // 年月范围选择不需要处理\r\n if(options.type !== 'date' && options.type !== 'datetime') return;\r\n\r\n var startPanel = index === 0;\r\n var month = datetime.month + 1; // 点击的日期所在月份\r\n var panelMonth = that.panelYM[index].month + 1; // 当前面板头部月份\r\n\r\n // 边缘日期的处理\r\n var firstRenderIndex = that.endState\r\n // 二次点击(一般为结束日期)任意一侧面板时:\r\n // 1. 左侧面板中,点击的月份属于下一个月时,应渲染右侧面板而不是左侧面板;\r\n // 2. 左侧面板中,点击的月份属于上一个月时,应将两个面板都重新渲染(等效点击 prevMonth);\r\n // 3. 右侧面板同理。\r\n ? function() {\r\n return (startPanel && month > panelMonth) || (!startPanel && month < panelMonth)\r\n ? 1 - index\r\n : index;\r\n }()\r\n // 初次点击(一般为开始日期)任意一侧面板时:\r\n // 1. 让该面板自行切换,以保持日期的「选中状态」在该侧;\r\n // 2. 另一侧面板则根据点击的面板进行响应式切换,以保持左右面板始终为连续月份。\r\n : index;\r\n\r\n // 为简化实现,只要点击的月份不等于当前面板顶部显示的月份时,就重新渲染两侧面板\r\n return {\r\n needFullRender: month !== panelMonth,\r\n index: firstRenderIndex\r\n }\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 // 此处为范围选择的日期面板点击选中处理,所以 disabledType 为 date\r\n if (that.endState && !that.limit({date: that.rangeLinked ? that.startDate : that.thisDateTime(1 - index), disabledType:'date'})) {\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 // 处理日期范围选择的一些边缘情况\r\n var checkState = that.checkPanelDate(dateTime, panelIndex);\r\n var dateTimeTemp = lay.extend({}, dateTime);\r\n var renderMode = (isChange || (checkState && checkState.needFullRender)) ? 'init' : null;\r\n var panelIdx = checkState ? checkState.index : panelIndex;\r\n that.calendar(dateTimeTemp, panelIdx, renderMode);\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)){\r\n var isTimeout = options.type === 'time'\r\n ? that.startTime && that.endTime && that.newDate(that.startTime) > that.newDate(that.endTime)\r\n : that.startDate && that.endDate && that.newDate(lay.extend({},that.startDate, that.startTime || {})) > that.newDate(lay.extend({},that.endDate, that.endTime || {}));\r\n\r\n return isTimeout \r\n ? that.hint(options.type === 'time' ? lang.timeout.replace(/日期/g, '时间') : lang.timeout)\r\n : that.hint(lang.invalidDate);\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 disabledType: 'datetime' // 按钮,检测日期和时间\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 // rangeLinked 模式非实时选择日期,不需要同步 options.dateTime,应根据面板显示日期切换\r\n if(that.rangeLinked){\r\n var panelYM = that.panelYM[0];\r\n var YM = that.getAsYM(panelYM.year, panelYM.month, 'sub');\r\n var dateTimeTemp = lay.extend({}, options.dateTime, that.panelYM[0], {year: YM[0], month: YM[1]});\r\n that.checkDate('limit').calendar(dateTimeTemp, null, 'init');\r\n }else{\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 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 var panelYM = that.panelYM[0];\r\n var YM = that.getAsYM(panelYM.year, panelYM.month);\r\n var dateTimeTemp = lay.extend({}, options.dateTime, that.panelYM[0], {year: YM[0],month: YM[1]});\r\n that.checkDate('limit').calendar(dateTimeTemp, null, 'init');\r\n }else{\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 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 * jQuery JavaScript Library v3.7.1\r\n * https://jquery.com/\r\n *\r\n * Copyright OpenJS Foundation and other contributors\r\n * Released under the MIT license\r\n * https://jquery.org/license\r\n *\r\n * Date: 2023-08-28T13:37Z\r\n */\r\n( function( global, factory ) {\r\n\r\n\t\"use strict\";\r\n\r\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\r\n\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 trac-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// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\r\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\r\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\r\n// enough that all such attempts are guarded in a try block.\r\n\"use strict\";\r\n\r\nvar arr = [];\r\n\r\nvar getProto = Object.getPrototypeOf;\r\n\r\nvar slice = arr.slice;\r\n\r\nvar flat = arr.flat ? function( array ) {\r\n\treturn arr.flat.call( array );\r\n} : function( array ) {\r\n\treturn arr.concat.apply( [], array );\r\n};\r\n\r\n\r\nvar push = arr.push;\r\n\r\nvar indexOf = arr.indexOf;\r\n\r\nvar class2type = {};\r\n\r\nvar toString = class2type.toString;\r\n\r\nvar hasOwn = class2type.hasOwnProperty;\r\n\r\nvar fnToString = hasOwn.toString;\r\n\r\nvar ObjectFunctionString = fnToString.call( Object );\r\n\r\nvar support = {};\r\n\r\nvar isFunction = function isFunction( obj ) {\r\n\r\n\t\t// Support: Chrome <=57, Firefox <=52\r\n\t\t// In some browsers, typeof returns \"function\" for HTML <object> elements\r\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\r\n\t\t// We don't want to classify *any* DOM node as a function.\r\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\r\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\r\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\r\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\r\n\t\t\ttypeof obj.item !== \"function\";\r\n\t};\r\n\r\n\r\nvar isWindow = function isWindow( obj ) {\r\n\t\treturn obj != null && obj === obj.window;\r\n\t};\r\n\r\n\r\nvar document = window.document;\r\n\r\n\r\n\r\n\tvar preservedScriptAttributes = {\r\n\t\ttype: true,\r\n\t\tsrc: true,\r\n\t\tnonce: true,\r\n\t\tnoModule: true\r\n\t};\r\n\r\n\tfunction DOMEval( code, node, doc ) {\r\n\t\tdoc = doc || document;\r\n\r\n\t\tvar i, val,\r\n\t\t\tscript = doc.createElement( \"script\" );\r\n\r\n\t\tscript.text = code;\r\n\t\tif ( node ) {\r\n\t\t\tfor ( i in preservedScriptAttributes ) {\r\n\r\n\t\t\t\t// Support: Firefox 64+, Edge 18+\r\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\r\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\r\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\r\n\t\t\t\t// becomes browsing-context connected.\r\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\r\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\r\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\r\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\r\n\t\t\t\t// via an object.\r\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\r\n\t\t\t\tif ( val ) {\r\n\t\t\t\t\tscript.setAttribute( i, val );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\r\n\t}\r\n\r\n\r\nfunction toType( obj ) {\r\n\tif ( obj == null ) {\r\n\t\treturn obj + \"\";\r\n\t}\r\n\r\n\t// Support: Android <=2.3 only (functionish RegExp)\r\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\r\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\r\n\t\ttypeof obj;\r\n}\r\n/* global Symbol */\r\n// Defining this global in .eslintrc.json would create a danger of using the global\r\n// unguarded in another place, it seems safer to define global only for this module\r\n\r\n\r\n\r\nvar version = \"3.7.1\",\r\n\r\n\trhtmlSuffix = /HTML$/i,\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\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// 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\r\n\t\t// Return all the elements in a clean array\r\n\t\tif ( num == null ) {\r\n\t\t\treturn slice.call( this );\r\n\t\t}\r\n\r\n\t\t// Return just the one element from the set\r\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\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\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\teven: function() {\r\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\r\n\t\t\treturn ( i + 1 ) % 2;\r\n\t\t} ) );\r\n\t},\r\n\r\n\todd: function() {\r\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\r\n\t\t\treturn i % 2;\r\n\t\t} ) );\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: arr.sort,\r\n\tsplice: arr.splice\r\n};\r\n\r\njQuery.extend = jQuery.fn.extend = function() {\r\n\tvar options, name, src, copy, copyIsArray, 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\" && !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\tcopy = options[ name ];\r\n\r\n\t\t\t\t// Prevent Object.prototype pollution\r\n\t\t\t\t// Prevent never-ending loop\r\n\t\t\t\tif ( name === \"__proto__\" || 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 = Array.isArray( copy ) ) ) ) {\r\n\t\t\t\t\tsrc = target[ name ];\r\n\r\n\t\t\t\t\t// Ensure proper type for the source value\r\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\r\n\t\t\t\t\t\tclone = [];\r\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\r\n\t\t\t\t\t\tclone = {};\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tclone = src;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcopyIsArray = false;\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\tisPlainObject: function( obj ) {\r\n\t\tvar proto, Ctor;\r\n\r\n\t\t// Detect obvious negatives\r\n\t\t// Use toString instead of jQuery.type to catch host objects\r\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tproto = getProto( obj );\r\n\r\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\r\n\t\tif ( !proto ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\r\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\r\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\r\n\t},\r\n\r\n\tisEmptyObject: function( obj ) {\r\n\t\tvar name;\r\n\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\t// Evaluates a script in a provided context; falls back to the global one\r\n\t// if not specified.\r\n\tglobalEval: function( code, options, doc ) {\r\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\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\r\n\t// Retrieve the text value of an array of DOM nodes\r\n\ttext: function( elem ) {\r\n\t\tvar node,\r\n\t\t\tret = \"\",\r\n\t\t\ti = 0,\r\n\t\t\tnodeType = elem.nodeType;\r\n\r\n\t\tif ( !nodeType ) {\r\n\r\n\t\t\t// If no nodeType, this is expected to be an array\r\n\t\t\twhile ( ( node = elem[ i++ ] ) ) {\r\n\r\n\t\t\t\t// Do not traverse comment nodes\r\n\t\t\t\tret += jQuery.text( node );\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( nodeType === 1 || nodeType === 11 ) {\r\n\t\t\treturn elem.textContent;\r\n\t\t}\r\n\t\tif ( nodeType === 9 ) {\r\n\t\t\treturn elem.documentElement.textContent;\r\n\t\t}\r\n\t\tif ( nodeType === 3 || nodeType === 4 ) {\r\n\t\t\treturn elem.nodeValue;\r\n\t\t}\r\n\r\n\t\t// Do not include comment or processing instruction nodes\r\n\r\n\t\treturn ret;\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\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\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\r\n\t},\r\n\r\n\tisXMLDoc: function( elem ) {\r\n\t\tvar namespace = elem && elem.namespaceURI,\r\n\t\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\r\n\r\n\t\t// Assume HTML when documentElement doesn't yet exist, such as inside\r\n\t\t// document fragments.\r\n\t\treturn !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || \"HTML\" );\r\n\t},\r\n\r\n\t// Support: Android <=4.0 only, PhantomJS 1 only\r\n\t// push.apply(_, arraylike) throws on ancient WebKit\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\tfor ( ; j < len; j++ ) {\r\n\t\t\tfirst[ i++ ] = second[ j ];\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 flat( ret );\r\n\t},\r\n\r\n\t// A global GUID counter for objects\r\n\tguid: 1,\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\nif ( typeof Symbol === \"function\" ) {\r\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\r\n}\r\n\r\n// Populate the class2type map\r\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\r\n\tfunction( _i, name ) {\r\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\r\n\t} );\r\n\r\nfunction isArrayLike( obj ) {\r\n\r\n\t// Support: real iOS 8.2 only (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 = toType( obj );\r\n\r\n\tif ( isFunction( obj ) || 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\n\r\n\r\nfunction nodeName( elem, name ) {\r\n\r\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\r\n\r\n}\r\nvar pop = arr.pop;\r\n\r\n\r\nvar sort = arr.sort;\r\n\r\n\r\nvar splice = arr.splice;\r\n\r\n\r\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\r\n\r\n\r\nvar rtrimCSS = new RegExp(\r\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\r\n\t\"g\"\r\n);\r\n\r\n\r\n\r\n\r\n// Note: an element does not contain itself\r\njQuery.contains = function( a, b ) {\r\n\tvar bup = b && b.parentNode;\r\n\r\n\treturn a === bup || !!( bup && bup.nodeType === 1 && (\r\n\r\n\t\t// Support: IE 9 - 11+\r\n\t\t// IE doesn't have `contains` on SVG.\r\n\t\ta.contains ?\r\n\t\t\ta.contains( bup ) :\r\n\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\r\n\t) );\r\n};\r\n\r\n\r\n\r\n\r\n// CSS string/identifier serialization\r\n// https://drafts.csswg.org/cssom/#common-serializing-idioms\r\nvar rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g;\r\n\r\nfunction fcssescape( ch, asCodePoint ) {\r\n\tif ( asCodePoint ) {\r\n\r\n\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\r\n\t\tif ( ch === \"\\0\" ) {\r\n\t\t\treturn \"\\uFFFD\";\r\n\t\t}\r\n\r\n\t\t// Control characters and (dependent upon position) numbers get escaped as code points\r\n\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\r\n\t}\r\n\r\n\t// Other potentially-special ASCII characters get backslash-escaped\r\n\treturn \"\\\\\" + ch;\r\n}\r\n\r\njQuery.escapeSelector = function( sel ) {\r\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\r\n};\r\n\r\n\r\n\r\n\r\nvar preferredDoc = document,\r\n\tpushNative = push;\r\n\r\n( function() {\r\n\r\nvar i,\r\n\tExpr,\r\n\toutermostContext,\r\n\tsortInput,\r\n\thasDuplicate,\r\n\tpush = pushNative,\r\n\r\n\t// Local document vars\r\n\tdocument,\r\n\tdocumentElement,\r\n\tdocumentIsHTML,\r\n\trbuggyQSA,\r\n\tmatches,\r\n\r\n\t// Instance-specific data\r\n\texpando = jQuery.expando,\r\n\tdirruns = 0,\r\n\tdone = 0,\r\n\tclassCache = createCache(),\r\n\ttokenCache = createCache(),\r\n\tcompilerCache = createCache(),\r\n\tnonnativeSelectorCache = 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\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|\" +\r\n\t\t\"loop|multiple|open|readonly|required|scoped\",\r\n\r\n\t// Regular expressions\r\n\r\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\r\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\r\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\r\n\r\n\t// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors\r\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\r\n\r\n\t\t// Operator (capture 2)\r\n\t\t\"*([*^$|!~]?=)\" + whitespace +\r\n\r\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\r\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\r\n\t\twhitespace + \"*\\\\]\",\r\n\r\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\r\n\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\r\n\t\t// 2. simple (capture 6)\r\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\r\n\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\r\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\r\n\trleadingCombinator = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" +\r\n\t\twhitespace + \"*\" ),\r\n\trdescend = new RegExp( whitespace + \"|>\" ),\r\n\r\n\trpseudo = new RegExp( pseudos ),\r\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\r\n\r\n\tmatchExpr = {\r\n\t\tID: new RegExp( \"^#(\" + identifier + \")\" ),\r\n\t\tCLASS: new RegExp( \"^\\\\.(\" + identifier + \")\" ),\r\n\t\tTAG: new RegExp( \"^(\" + identifier + \"|[*])\" ),\r\n\t\tATTR: new RegExp( \"^\" + attributes ),\r\n\t\tPSEUDO: new RegExp( \"^\" + pseudos ),\r\n\t\tCHILD: new RegExp(\r\n\t\t\t\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\r\n\t\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\r\n\t\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\r\n\t\tbool: new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\r\n\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\tneedsContext: new RegExp( \"^\" + whitespace +\r\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\r\n\t\t\t\"*((?:-\\\\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\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\r\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\r\n\r\n\trsibling = /[+~]/,\r\n\r\n\t// CSS escapes\r\n\t// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters\r\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\r\n\t\t\"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\r\n\tfunescape = function( escape, nonHex ) {\r\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\r\n\r\n\t\tif ( nonHex ) {\r\n\r\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\r\n\t\t\treturn nonHex;\r\n\t\t}\r\n\r\n\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\r\n\t\t// Support: IE <=11+\r\n\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\r\n\t\t// surrogate pair\r\n\t\treturn high < 0 ?\r\n\t\t\tString.fromCharCode( high + 0x10000 ) :\r\n\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\r\n\t},\r\n\r\n\t// Used for iframes; see `setDocument`.\r\n\t// Support: IE 9 - 11+, Edge 12 - 18+\r\n\t// Removing the function wrapper causes a \"Permission Denied\"\r\n\t// error in IE/Edge.\r\n\tunloadHandler = function() {\r\n\t\tsetDocument();\r\n\t},\r\n\r\n\tinDisabledFieldset = addCombinator(\r\n\t\tfunction( elem ) {\r\n\t\t\treturn elem.disabled === true && nodeName( elem, \"fieldset\" );\r\n\t\t},\r\n\t\t{ dir: \"parentNode\", next: \"legend\" }\r\n\t);\r\n\r\n// Support: IE <=9 only\r\n// Accessing document.activeElement can throw unexpectedly\r\n// https://bugs.jquery.com/ticket/13393\r\nfunction safeActiveElement() {\r\n\ttry {\r\n\t\treturn document.activeElement;\r\n\t} catch ( err ) { }\r\n}\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\r\n\t// Support: Android <=4.0\r\n\t// Detect silently failing push.apply\r\n\t// eslint-disable-next-line no-unused-expressions\r\n\tarr[ preferredDoc.childNodes.length ].nodeType;\r\n} catch ( e ) {\r\n\tpush = {\r\n\t\tapply: function( target, els ) {\r\n\t\t\tpushNative.apply( target, slice.call( els ) );\r\n\t\t},\r\n\t\tcall: function( target ) {\r\n\t\t\tpushNative.apply( target, slice.call( arguments, 1 ) );\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction find( selector, context, results, seed ) {\r\n\tvar m, i, elem, nid, 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\t\tsetDocument( context );\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 9 only\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\tpush.call( results, 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 9 only\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\tfind.contains( context, elem ) &&\r\n\t\t\t\t\t\t\telem.id === m ) {\r\n\r\n\t\t\t\t\t\t\tpush.call( results, 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 ] ) && context.getElementsByClassName ) {\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 ( !nonnativeSelectorCache[ selector + \" \" ] &&\r\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {\r\n\r\n\t\t\t\tnewSelector = selector;\r\n\t\t\t\tnewContext = context;\r\n\r\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\r\n\t\t\t\t// descendant combinators, which is not what we want.\r\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\r\n\t\t\t\t// list with an ID selector referencing the scope context.\r\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\r\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\r\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\r\n\t\t\t\tif ( nodeType === 1 &&\r\n\t\t\t\t\t( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {\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\r\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\r\n\t\t\t\t\t// supports it & if we're not changing the context.\r\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when\r\n\t\t\t\t\t// strict-comparing two documents; shallow comparisons work.\r\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\r\n\t\t\t\t\tif ( newContext != context || !support.scope ) {\r\n\r\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\r\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\r\n\t\t\t\t\t\t\tnid = jQuery.escapeSelector( nid );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\r\n\t\t\t\t\t\t}\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\twhile ( i-- ) {\r\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\r\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tnewSelector = groups.join( \",\" );\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpush.apply( results,\r\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\r\n\t\t\t\t\t);\r\n\t\t\t\t\treturn results;\r\n\t\t\t\t} catch ( qsaError ) {\r\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tif ( nid === expando ) {\r\n\t\t\t\t\t\tcontext.removeAttribute( \"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\t// All others\r\n\treturn select( selector.replace( rtrimCSS, \"$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\r\n\t\t// Use (key + \" \") to avoid collision with native prototype properties\r\n\t\t// (see https://github.com/jquery/sizzle/issues/157)\r\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\r\n\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 jQuery selector module\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 element and returns a boolean result\r\n */\r\nfunction assert( fn ) {\r\n\tvar el = document.createElement( \"fieldset\" );\r\n\r\n\ttry {\r\n\t\treturn !!fn( el );\r\n\t} catch ( e ) {\r\n\t\treturn false;\r\n\t} finally {\r\n\r\n\t\t// Remove from its parent by default\r\n\t\tif ( el.parentNode ) {\r\n\t\t\tel.parentNode.removeChild( el );\r\n\t\t}\r\n\r\n\t\t// release memory in IE\r\n\t\tel = null;\r\n\t}\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\treturn nodeName( elem, \"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\treturn ( nodeName( elem, \"input\" ) || nodeName( elem, \"button\" ) ) &&\r\n\t\t\telem.type === type;\r\n\t};\r\n}\r\n\r\n/**\r\n * Returns a function to use in pseudos for :enabled/:disabled\r\n * @param {Boolean} disabled true for :disabled; false for :enabled\r\n */\r\nfunction createDisabledPseudo( disabled ) {\r\n\r\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\r\n\treturn function( elem ) {\r\n\r\n\t\t// Only certain elements can match :enabled or :disabled\r\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\r\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\r\n\t\tif ( \"form\" in elem ) {\r\n\r\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\r\n\t\t\t// * listed form-associated elements in a disabled fieldset\r\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#category-listed\r\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\r\n\t\t\t// * option elements in a disabled optgroup\r\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\r\n\t\t\t// All such elements have a \"form\" property.\r\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\r\n\r\n\t\t\t\t// Option elements defer to a parent optgroup if present\r\n\t\t\t\tif ( \"label\" in elem ) {\r\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\r\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn elem.disabled === disabled;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Support: IE 6 - 11+\r\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\r\n\t\t\t\treturn elem.isDisabled === disabled ||\r\n\r\n\t\t\t\t\t// Where there is no isDisabled, check manually\r\n\t\t\t\t\telem.isDisabled !== !disabled &&\r\n\t\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\r\n\t\t\t}\r\n\r\n\t\t\treturn elem.disabled === disabled;\r\n\r\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\r\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\r\n\t\t// even exist on them, let alone have a boolean value.\r\n\t\t} else if ( \"label\" in elem ) {\r\n\t\t\treturn elem.disabled === disabled;\r\n\t\t}\r\n\r\n\t\t// Remaining elements are neither :enabled nor :disabled\r\n\t\treturn false;\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 jQuery selector 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/**\r\n * Sets document-related variables once based on the current document\r\n * @param {Element|Object} [node] An element or document object to use to set the document\r\n * @returns {Object} Returns the current document\r\n */\r\nfunction setDocument( node ) {\r\n\tvar subWindow,\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\t// Support: IE 11+, Edge 17 - 18+\r\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t// two documents; shallow comparisons work.\r\n\t// eslint-disable-next-line eqeqeq\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\tdocumentElement = document.documentElement;\r\n\tdocumentIsHTML = !jQuery.isXMLDoc( document );\r\n\r\n\t// Support: iOS 7 only, IE 9 - 11+\r\n\t// Older browsers didn't support unprefixed `matches`.\r\n\tmatches = documentElement.matches ||\r\n\t\tdocumentElement.webkitMatchesSelector ||\r\n\t\tdocumentElement.msMatchesSelector;\r\n\r\n\t// Support: IE 9 - 11+, Edge 12 - 18+\r\n\t// Accessing iframe documents after unload throws \"permission denied\" errors\r\n\t// (see trac-13936).\r\n\t// Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,\r\n\t// all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.\r\n\tif ( documentElement.msMatchesSelector &&\r\n\r\n\t\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t\t// two documents; shallow comparisons work.\r\n\t\t// eslint-disable-next-line eqeqeq\r\n\t\tpreferredDoc != document &&\r\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\r\n\r\n\t\t// Support: IE 9 - 11+, Edge 12 - 18+\r\n\t\tsubWindow.addEventListener( \"unload\", unloadHandler );\r\n\t}\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 programmatically-set names,\r\n\t// so use a roundabout getElementsByName test\r\n\tsupport.getById = assert( function( el ) {\r\n\t\tdocumentElement.appendChild( el ).id = jQuery.expando;\r\n\t\treturn !document.getElementsByName ||\r\n\t\t\t!document.getElementsByName( jQuery.expando ).length;\r\n\t} );\r\n\r\n\t// Support: IE 9 only\r\n\t// Check to see if it's possible to do matchesSelector\r\n\t// on a disconnected node.\r\n\tsupport.disconnectedMatch = assert( function( el ) {\r\n\t\treturn matches.call( el, \"*\" );\r\n\t} );\r\n\r\n\t// Support: IE 9 - 11+, Edge 12 - 18+\r\n\t// IE/Edge don't support the :scope pseudo-class.\r\n\tsupport.scope = assert( function() {\r\n\t\treturn document.querySelectorAll( \":scope\" );\r\n\t} );\r\n\r\n\t// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only\r\n\t// Make sure the `:has()` argument is parsed unforgivingly.\r\n\t// We include `*` in the test to detect buggy implementations that are\r\n\t// _selectively_ forgiving (specifically when the list includes at least\r\n\t// one valid selector).\r\n\t// Note that we treat complete lack of support for `:has()` as if it were\r\n\t// spec-compliant support, which is fine because use of `:has()` in such\r\n\t// environments will fail in the qSA path and fall back to jQuery traversal\r\n\t// anyway.\r\n\tsupport.cssHas = assert( function() {\r\n\t\ttry {\r\n\t\t\tdocument.querySelector( \":has(*,:jqfake)\" );\r\n\t\t\treturn false;\r\n\t\t} catch ( e ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t} );\r\n\r\n\t// ID filter and find\r\n\tif ( support.getById ) {\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\tExpr.find.ID = function( id, context ) {\r\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\r\n\t\t\t\tvar elem = context.getElementById( id );\r\n\t\t\t\treturn elem ? [ elem ] : [];\r\n\t\t\t}\r\n\t\t};\r\n\t} else {\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\r\n\t\t// Support: IE 6 - 7 only\r\n\t\t// getElementById is not reliable as a find shortcut\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 node, i, elems,\r\n\t\t\t\t\telem = context.getElementById( id );\r\n\r\n\t\t\t\tif ( elem ) {\r\n\r\n\t\t\t\t\t// Verify the id attribute\r\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\r\n\t\t\t\t\tif ( node && node.value === id ) {\r\n\t\t\t\t\t\treturn [ elem ];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Fall back on getElementsByName\r\n\t\t\t\t\telems = context.getElementsByName( id );\r\n\t\t\t\t\ti = 0;\r\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\r\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\r\n\t\t\t\t\t\tif ( node && node.value === id ) {\r\n\t\t\t\t\t\t\treturn [ elem ];\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\treturn [];\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t// Tag\r\n\tExpr.find.TAG = function( tag, context ) {\r\n\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\r\n\t\t\treturn context.getElementsByTagName( tag );\r\n\r\n\t\t// DocumentFragment nodes don't have gEBTN\r\n\t\t} else {\r\n\t\t\treturn context.querySelectorAll( tag );\r\n\t\t}\r\n\t};\r\n\r\n\t// Class\r\n\tExpr.find.CLASS = 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\trbuggyQSA = [];\r\n\r\n\t// Build QSA regex\r\n\t// Regex strategy adopted from Diego Perini\r\n\tassert( function( el ) {\r\n\r\n\t\tvar input;\r\n\r\n\t\tdocumentElement.appendChild( el ).innerHTML =\r\n\t\t\t\"<a id='\" + expando + \"' href='' disabled='disabled'></a>\" +\r\n\t\t\t\"<select id='\" + expando + \"-\\r\\\\' disabled='disabled'>\" +\r\n\t\t\t\"<option selected=''></option></select>\";\r\n\r\n\t\t// Support: iOS <=7 - 8 only\r\n\t\t// Boolean attributes and \"value\" are not treated correctly in some XML documents\r\n\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\r\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\r\n\t\t}\r\n\r\n\t\t// Support: iOS <=7 - 8 only\r\n\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\r\n\t\t\trbuggyQSA.push( \"~=\" );\r\n\t\t}\r\n\r\n\t\t// Support: iOS 8 only\r\n\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\r\n\t\t// In-page `selector#id sibling-combinator selector` fails\r\n\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\r\n\t\t\trbuggyQSA.push( \".#.+[+~]\" );\r\n\t\t}\r\n\r\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\r\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\r\n\t\t// This is probably OK but for backwards compatibility we want to maintain\r\n\t\t// handling them through jQuery traversal in jQuery 3.x.\r\n\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\r\n\t\t\trbuggyQSA.push( \":checked\" );\r\n\t\t}\r\n\r\n\t\t// Support: Windows 8 Native Apps\r\n\t\t// The type and name attributes are restricted during .innerHTML assignment\r\n\t\tinput = document.createElement( \"input\" );\r\n\t\tinput.setAttribute( \"type\", \"hidden\" );\r\n\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\r\n\r\n\t\t// Support: IE 9 - 11+\r\n\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\r\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\r\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\r\n\t\t// This is probably OK but for backwards compatibility we want to maintain\r\n\t\t// handling them through jQuery traversal in jQuery 3.x.\r\n\t\tdocumentElement.appendChild( el ).disabled = true;\r\n\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\r\n\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\r\n\t\t}\r\n\r\n\t\t// Support: IE 11+, Edge 15 - 18+\r\n\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\r\n\t\t// Adding a temporary attribute to the document before the selection works\r\n\t\t// around the issue.\r\n\t\t// Interestingly, IE 10 & older don't seem to have the issue.\r\n\t\tinput = document.createElement( \"input\" );\r\n\t\tinput.setAttribute( \"name\", \"\" );\r\n\t\tel.appendChild( input );\r\n\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\r\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\r\n\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\r\n\t\t}\r\n\t} );\r\n\r\n\tif ( !support.cssHas ) {\r\n\r\n\t\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\r\n\t\t// Our regular `try-catch` mechanism fails to detect natively-unsupported\r\n\t\t// pseudo-classes inside `:has()` (such as `:has(:contains(\"Foo\"))`)\r\n\t\t// in browsers that parse the `:has()` argument as a forgiving selector list.\r\n\t\t// https://drafts.csswg.org/selectors/#relational now requires the argument\r\n\t\t// to be parsed unforgivingly, but browsers have not yet fully adjusted.\r\n\t\trbuggyQSA.push( \":has\" );\r\n\t}\r\n\r\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\r\n\r\n\t/* Sorting\r\n\t---------------------------------------------------------------------- */\r\n\r\n\t// Document order sorting\r\n\tsortOrder = function( 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\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t\t// two documents; shallow comparisons work.\r\n\t\t// eslint-disable-next-line eqeqeq\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\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t\t\t// two documents; shallow comparisons work.\r\n\t\t\t// eslint-disable-next-line eqeqeq\r\n\t\t\tif ( a === document || a.ownerDocument == preferredDoc &&\r\n\t\t\t\tfind.contains( preferredDoc, a ) ) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\r\n\t\t\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t\t\t// two documents; shallow comparisons work.\r\n\t\t\t// eslint-disable-next-line eqeqeq\r\n\t\t\tif ( b === document || b.ownerDocument == preferredDoc &&\r\n\t\t\t\tfind.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.call( sortInput, a ) - indexOf.call( 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\r\n\treturn document;\r\n}\r\n\r\nfind.matches = function( expr, elements ) {\r\n\treturn find( expr, null, null, elements );\r\n};\r\n\r\nfind.matchesSelector = function( elem, expr ) {\r\n\tsetDocument( elem );\r\n\r\n\tif ( documentIsHTML &&\r\n\t\t!nonnativeSelectorCache[ 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\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\t\tnonnativeSelectorCache( expr, true );\r\n\t\t}\r\n\t}\r\n\r\n\treturn find( expr, document, null, [ elem ] ).length > 0;\r\n};\r\n\r\nfind.contains = function( context, elem ) {\r\n\r\n\t// Set document vars if needed\r\n\t// Support: IE 11+, Edge 17 - 18+\r\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t// two documents; shallow comparisons work.\r\n\t// eslint-disable-next-line eqeqeq\r\n\tif ( ( context.ownerDocument || context ) != document ) {\r\n\t\tsetDocument( context );\r\n\t}\r\n\treturn jQuery.contains( context, elem );\r\n};\r\n\r\n\r\nfind.attr = function( elem, name ) {\r\n\r\n\t// Set document vars if needed\r\n\t// Support: IE 11+, Edge 17 - 18+\r\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t// two documents; shallow comparisons work.\r\n\t// eslint-disable-next-line eqeqeq\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\r\n\t\t// Don't get fooled by Object.prototype properties (see trac-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\tif ( val !== undefined ) {\r\n\t\treturn val;\r\n\t}\r\n\r\n\treturn elem.getAttribute( name );\r\n};\r\n\r\nfind.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\njQuery.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\t//\r\n\t// Support: Android <=4.0+\r\n\t// Testing for detecting duplicates is unpredictable so instead assume we can't\r\n\t// depend on duplicate detection in all browsers without a stable sort.\r\n\thasDuplicate = !support.sortStable;\r\n\tsortInput = !support.sortStable && slice.call( results, 0 );\r\n\tsort.call( results, 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\tsplice.call( results, 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\njQuery.fn.uniqueSort = function() {\r\n\treturn this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );\r\n};\r\n\r\nExpr = jQuery.expr = {\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\tATTR: 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 ] || \"\" )\r\n\t\t\t\t.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\tCHILD: function( match ) {\r\n\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\r\n\t\t\t\t// nth-* requires argument\r\n\t\t\t\tif ( !match[ 3 ] ) {\r\n\t\t\t\t\tfind.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 ] ?\r\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\r\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" )\r\n\t\t\t\t);\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\tfind.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\tPSEUDO: 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\r\n\t\t\t\t// Get excess from tokenize (recursively)\r\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\r\n\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\tTAG: function( nodeNameSelector ) {\r\n\t\t\tvar expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\r\n\t\t\treturn nodeNameSelector === \"*\" ?\r\n\t\t\t\tfunction() {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} :\r\n\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\treturn nodeName( elem, expectedNodeName );\r\n\t\t\t\t};\r\n\t\t},\r\n\r\n\t\tCLASS: 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 +\r\n\t\t\t\t\t\"(\" + whitespace + \"|$)\" ) ) &&\r\n\t\t\t\tclassCache( className, function( elem ) {\r\n\t\t\t\t\treturn pattern.test(\r\n\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\r\n\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\r\n\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\r\n\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t);\r\n\t\t\t\t} );\r\n\t\t},\r\n\r\n\t\tATTR: function( name, operator, check ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar result = find.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\tif ( operator === \"=\" ) {\r\n\t\t\t\t\treturn result === check;\r\n\t\t\t\t}\r\n\t\t\t\tif ( operator === \"!=\" ) {\r\n\t\t\t\t\treturn result !== check;\r\n\t\t\t\t}\r\n\t\t\t\tif ( operator === \"^=\" ) {\r\n\t\t\t\t\treturn check && result.indexOf( check ) === 0;\r\n\t\t\t\t}\r\n\t\t\t\tif ( operator === \"*=\" ) {\r\n\t\t\t\t\treturn check && result.indexOf( check ) > -1;\r\n\t\t\t\t}\r\n\t\t\t\tif ( operator === \"$=\" ) {\r\n\t\t\t\t\treturn check && result.slice( -check.length ) === check;\r\n\t\t\t\t}\r\n\t\t\t\tif ( operator === \"~=\" ) {\r\n\t\t\t\t\treturn ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" )\r\n\t\t\t\t\t\t.indexOf( check ) > -1;\r\n\t\t\t\t}\r\n\t\t\t\tif ( operator === \"|=\" ) {\r\n\t\t\t\t\treturn result === check || result.slice( 0, check.length + 1 ) === check + \"-\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t};\r\n\t\t},\r\n\r\n\t\tCHILD: 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, 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\tnodeName( node, 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\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\t\t\t\t\t\t\touterCache = parent[ expando ] || ( parent[ expando ] = {} );\r\n\t\t\t\t\t\t\tcache = outerCache[ 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\touterCache[ 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\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\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\r\n\t\t\t\t\t\t\t\tcache = outerCache[ 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\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\tnodeName( node, 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 ] ||\r\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\r\n\t\t\t\t\t\t\t\t\t\t\touterCache[ 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\tPSEUDO: function( pseudo, argument ) {\r\n\r\n\t\t\t// pseudo-class names are case-insensitive\r\n\t\t\t// https://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\tfind.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 jQuery 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.call( 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\r\n\t\t// Potentially complex pseudos\r\n\t\tnot: markFunction( function( selector ) {\r\n\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( rtrimCSS, \"$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\r\n\t\t\t\t\t// Don't keep the element\r\n\t\t\t\t\t// (see https://github.com/jquery/sizzle/issues/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\thas: markFunction( function( selector ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn find( selector, elem ).length > 0;\r\n\t\t\t};\r\n\t\t} ),\r\n\r\n\t\tcontains: 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 || jQuery.text( 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// https://www.w3.org/TR/selectors/#lang-pseudo\r\n\t\tlang: markFunction( function( lang ) {\r\n\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\tfind.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\ttarget: 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\troot: function( elem ) {\r\n\t\t\treturn elem === documentElement;\r\n\t\t},\r\n\r\n\t\tfocus: function( elem ) {\r\n\t\t\treturn elem === safeActiveElement() &&\r\n\t\t\t\tdocument.hasFocus() &&\r\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\r\n\t\t},\r\n\r\n\t\t// Boolean properties\r\n\t\tenabled: createDisabledPseudo( false ),\r\n\t\tdisabled: createDisabledPseudo( true ),\r\n\r\n\t\tchecked: function( elem ) {\r\n\r\n\t\t\t// In CSS3, :checked should return both checked and selected elements\r\n\t\t\t// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\r\n\t\t\treturn ( nodeName( elem, \"input\" ) && !!elem.checked ) ||\r\n\t\t\t\t( nodeName( elem, \"option\" ) && !!elem.selected );\r\n\t\t},\r\n\r\n\t\tselected: function( elem ) {\r\n\r\n\t\t\t// Support: IE <=11+\r\n\t\t\t// Accessing the selectedIndex property\r\n\t\t\t// forces the browser to treat the default option as\r\n\t\t\t// selected when in an optgroup.\r\n\t\t\tif ( elem.parentNode ) {\r\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\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\tempty: function( elem ) {\r\n\r\n\t\t\t// https://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\tparent: 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\theader: function( elem ) {\r\n\t\t\treturn rheader.test( elem.nodeName );\r\n\t\t},\r\n\r\n\t\tinput: function( elem ) {\r\n\t\t\treturn rinputs.test( elem.nodeName );\r\n\t\t},\r\n\r\n\t\tbutton: function( elem ) {\r\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"button\" ||\r\n\t\t\t\tnodeName( elem, \"button\" );\r\n\t\t},\r\n\r\n\t\ttext: function( elem ) {\r\n\t\t\tvar attr;\r\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"text\" &&\r\n\r\n\t\t\t\t// Support: IE <10 only\r\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear\r\n\t\t\t\t// with elem.type === \"text\"\r\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\r\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\r\n\t\t},\r\n\r\n\t\t// Position-in-collection\r\n\t\tfirst: createPositionalPseudo( function() {\r\n\t\t\treturn [ 0 ];\r\n\t\t} ),\r\n\r\n\t\tlast: createPositionalPseudo( function( _matchIndexes, length ) {\r\n\t\t\treturn [ length - 1 ];\r\n\t\t} ),\r\n\r\n\t\teq: createPositionalPseudo( function( _matchIndexes, length, argument ) {\r\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\r\n\t\t} ),\r\n\r\n\t\teven: 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\todd: 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\tlt: createPositionalPseudo( function( matchIndexes, length, argument ) {\r\n\t\t\tvar i;\r\n\r\n\t\t\tif ( argument < 0 ) {\r\n\t\t\t\ti = argument + length;\r\n\t\t\t} else if ( argument > length ) {\r\n\t\t\t\ti = length;\r\n\t\t\t} else {\r\n\t\t\t\ti = argument;\r\n\t\t\t}\r\n\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\tgt: 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\nfunction tokenize( 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\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 = rleadingCombinator.exec( soFar ) ) ) {\r\n\t\t\tmatched = match.shift();\r\n\t\t\ttokens.push( {\r\n\t\t\t\tvalue: matched,\r\n\r\n\t\t\t\t// Cast descendant combinators to space\r\n\t\t\t\ttype: match[ 0 ].replace( rtrimCSS, \" \" )\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\tif ( parseOnly ) {\r\n\t\treturn soFar.length;\r\n\t}\r\n\r\n\treturn soFar ?\r\n\t\tfind.error( selector ) :\r\n\r\n\t\t// Cache the tokens\r\n\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\tskip = combinator.next,\r\n\t\tkey = skip || dir,\r\n\t\tcheckNonElements = base && key === \"parentNode\",\r\n\t\tdoneName = done++;\r\n\r\n\treturn combinator.first ?\r\n\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\treturn false;\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, 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\tif ( skip && nodeName( elem, skip ) ) {\r\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\r\n\t\t\t\t\t\t} else if ( ( oldCache = outerCache[ key ] ) &&\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\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\touterCache[ key ] = 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\treturn false;\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\tfind( 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, matcherOut,\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 ||\r\n\t\t\t\tmultipleContexts( selector || \"*\",\r\n\t\t\t\t\tcontext.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\tif ( matcher ) {\r\n\r\n\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter\r\n\t\t\t// or preexisting results,\r\n\t\t\tmatcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?\r\n\r\n\t\t\t\t// ...intermediate processing is necessary\r\n\t\t\t\t[] :\r\n\r\n\t\t\t\t// ...otherwise use results directly\r\n\t\t\t\tresults;\r\n\r\n\t\t\t// Find primary matches\r\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\r\n\t\t} else {\r\n\t\t\tmatcherOut = matcherIn;\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\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\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.call( 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.call( checkContext, elem ) > -1;\r\n\t\t}, implicitRelative, true ),\r\n\t\tmatchers = [ function( elem, context, xml ) {\r\n\r\n\t\t\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t\t\t// two documents; shallow comparisons work.\r\n\t\t\t// eslint-disable-next-line eqeqeq\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\r\n\t\t\t// Avoid hanging onto element\r\n\t\t\t// (see https://github.com/jquery/sizzle/issues/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\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\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 )\r\n\t\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\r\n\t\t\t\t\t).replace( rtrimCSS, \"$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\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\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\r\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t\t\t\t// two documents; shallow comparisons work.\r\n\t\t\t\t// eslint-disable-next-line eqeqeq\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: iOS <=7 - 9 only\r\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching\r\n\t\t\t// elements by id. (see trac-14142)\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\r\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\r\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\r\n\t\t\t\t\t// two documents; shallow comparisons work.\r\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\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\tpush.call( results, 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\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\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\tjQuery.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\nfunction compile( 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\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,\r\n\t\t\tmatcherFromGroupMatchers( 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 jQuery's compiled\r\n * selector functions\r\n * @param {String|Function} selector A selector or a pre-compiled\r\n * selector function built with jQuery selector 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\nfunction select( 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\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\r\n\r\n\t\t\tcontext = ( Expr.find.ID(\r\n\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\r\n\t\t\t\tcontext\r\n\t\t\t) || [] )[ 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\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 ) &&\r\n\t\t\t\t\t\ttestContext( 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// Support: Android <=4.0 - 4.1+\r\n// Sort stability\r\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\r\n\r\n// Initialize against the default document\r\nsetDocument();\r\n\r\n// Support: Android <=4.0 - 4.1+\r\n// Detached nodes confoundingly follow *each other*\r\nsupport.sortDetached = assert( function( el ) {\r\n\r\n\t// Should return 1, but returns 4 (following)\r\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\r\n} );\r\n\r\njQuery.find = find;\r\n\r\n// Deprecated\r\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\r\njQuery.unique = jQuery.uniqueSort;\r\n\r\n// These have always been private, but they used to be documented as part of\r\n// Sizzle so let's maintain them for now for backwards compatibility purposes.\r\nfind.compile = compile;\r\nfind.select = select;\r\nfind.setDocument = setDocument;\r\nfind.tokenize = tokenize;\r\n\r\nfind.escape = jQuery.escapeSelector;\r\nfind.getText = jQuery.text;\r\nfind.isXML = jQuery.isXMLDoc;\r\nfind.selectors = jQuery.expr;\r\nfind.support = jQuery.support;\r\nfind.uniqueSort = jQuery.uniqueSort;\r\n\r\n\t/* eslint-enable */\r\n\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 = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\r\n\r\n\r\n\r\n// Implement the identical functionality for filter and not\r\nfunction winnow( elements, qualifier, not ) {\r\n\tif ( isFunction( qualifier ) ) {\r\n\t\treturn jQuery.grep( elements, function( elem, i ) {\r\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\r\n\t\t} );\r\n\t}\r\n\r\n\t// Single element\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\t}\r\n\r\n\t// Arraylike of elements (jQuery, arguments, Array)\r\n\tif ( typeof qualifier !== \"string\" ) {\r\n\t\treturn jQuery.grep( elements, function( elem ) {\r\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\r\n\t\t} );\r\n\t}\r\n\r\n\t// Filtered directly for both simple and complex selectors\r\n\treturn jQuery.filter( qualifier, elements, not );\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\tif ( elems.length === 1 && elem.nodeType === 1 ) {\r\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\r\n\t}\r\n\r\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\r\n\t\treturn elem.nodeType === 1;\r\n\t} ) );\r\n};\r\n\r\njQuery.fn.extend( {\r\n\tfind: function( selector ) {\r\n\t\tvar i, ret,\r\n\t\t\tlen = this.length,\r\n\t\t\tself = this;\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\tret = this.pushStack( [] );\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\treturn len > 1 ? jQuery.uniqueSort( ret ) : 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 (trac-9521)\r\n\t// Strict HTML recognition (trac-11290: must start with <)\r\n\t// Shortcut simple #id case for speed\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// Method 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[ 0 ] === \"<\" &&\r\n\t\t\t\tselector[ 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// Option to run 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 ( 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\tif ( elem ) {\r\n\r\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\r\n\t\t\t\t\t\tthis[ 0 ] = elem;\r\n\t\t\t\t\t\tthis.length = 1;\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// 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[ 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 ( isFunction( selector ) ) {\r\n\t\t\treturn 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\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 targets = jQuery( target, this ),\r\n\t\t\tl = targets.length;\r\n\r\n\t\treturn this.filter( function() {\r\n\t\t\tvar i = 0;\r\n\t\t\tfor ( ; i < l; 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\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\r\n\r\n\t\t// Positional selectors never match, since there's no _selection_ context\r\n\t\tif ( !rneedsContext.test( selectors ) ) {\r\n\t\t\tfor ( ; i < l; i++ ) {\r\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\r\n\r\n\t\t\t\t\t// Always skip document fragments\r\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\r\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\r\n\r\n\t\t\t\t\t\t// Don't pass non-elements to jQuery#find\r\n\t\t\t\t\t\tcur.nodeType === 1 &&\r\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\r\n\r\n\t\t\t\t\t\tmatched.push( cur );\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}\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 the set\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 indexOf.call( jQuery( elem ), this[ 0 ] );\r\n\t\t}\r\n\r\n\t\t// Locate the position of the desired element\r\n\t\treturn indexOf.call( this,\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\r\n\t\t);\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\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\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\tif ( elem.contentDocument != null &&\r\n\r\n\t\t\t// Support: IE 11+\r\n\t\t\t// <object> elements with no `data` attribute has an object\r\n\t\t\t// `contentDocument` with a `null` prototype.\r\n\t\t\tgetProto( elem.contentDocument ) ) {\r\n\r\n\t\t\treturn elem.contentDocument;\r\n\t\t}\r\n\r\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\r\n\t\t// Treat the template element as a regular one in browsers that\r\n\t\t// don't support it.\r\n\t\tif ( nodeName( elem, \"template\" ) ) {\r\n\t\t\telem = elem.content || elem;\r\n\t\t}\r\n\r\n\t\treturn jQuery.merge( [], elem.childNodes );\r\n\t}\r\n}, function( name, fn ) {\r\n\tjQuery.fn[ name ] = function( until, selector ) {\r\n\t\tvar matched = 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\tmatched = jQuery.filter( selector, matched );\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\tjQuery.uniqueSort( matched );\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\tmatched.reverse();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( matched );\r\n\t};\r\n} );\r\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/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( rnothtmlwhite ) || [], 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 = locked || 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 ( 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 && toType( 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 = queue = [];\r\n\t\t\t\tif ( !memory && !firing ) {\r\n\t\t\t\t\tlist = memory = \"\";\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\nfunction Identity( v ) {\r\n\treturn v;\r\n}\r\nfunction Thrower( ex ) {\r\n\tthrow ex;\r\n}\r\n\r\nfunction adoptValue( value, resolve, reject, noValue ) {\r\n\tvar method;\r\n\r\n\ttry {\r\n\r\n\t\t// Check for promise aspect first to privilege synchronous behavior\r\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\r\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\r\n\r\n\t\t// Other thenables\r\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\r\n\t\t\tmethod.call( value, resolve, reject );\r\n\r\n\t\t// Other non-thenables\r\n\t\t} else {\r\n\r\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\r\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\r\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\r\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\r\n\t\t}\r\n\r\n\t// For Promises/A+, convert exceptions into rejections\r\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\r\n\t// Deferred#then to conditionally suppress rejection.\r\n\t} catch ( value ) {\r\n\r\n\t\t// Support: Android 4.0 only\r\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\r\n\t\treject.apply( undefined, [ value ] );\r\n\t}\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, callbacks,\r\n\t\t\t\t// ... .then handlers, argument index, [final state]\r\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\r\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\r\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\r\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\r\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\r\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\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\t\"catch\": function( fn ) {\r\n\t\t\t\t\treturn promise.then( null, fn );\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Keep pipe for back-compat\r\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\r\n\t\t\t\t\tvar fns = arguments;\r\n\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\r\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\r\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\r\n\r\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\r\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\r\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\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 && 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,\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\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\r\n\t\t\t\t\tvar maxDepth = 0;\r\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\r\n\t\t\t\t\t\treturn function() {\r\n\t\t\t\t\t\t\tvar that = this,\r\n\t\t\t\t\t\t\t\targs = arguments,\r\n\t\t\t\t\t\t\t\tmightThrow = function() {\r\n\t\t\t\t\t\t\t\t\tvar returned, then;\r\n\r\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\r\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\r\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\r\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\r\n\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\r\n\r\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\r\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\r\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\r\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\r\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\r\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\r\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\r\n\t\t\t\t\t\t\t\t\tthen = returned &&\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\r\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\r\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\r\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\r\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\r\n\t\t\t\t\t\t\t\t\t\treturned.then;\r\n\r\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\r\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\r\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\r\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\r\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\r\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\r\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\r\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\r\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\r\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\r\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\r\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\r\n\t\t\t\t\t\t\t\t\t\t\t);\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// Handle all other returned values\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\r\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\r\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\r\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\r\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\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\t// Process the value(s)\r\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\r\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t},\r\n\r\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\r\n\t\t\t\t\t\t\t\tprocess = special ?\r\n\t\t\t\t\t\t\t\t\tmightThrow :\r\n\t\t\t\t\t\t\t\t\tfunction() {\r\n\t\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\r\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.error );\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\r\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\r\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\r\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\r\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\r\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\r\n\t\t\t\t\t\t\t\t\t\t\t}\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\r\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\r\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\r\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\r\n\t\t\t\t\t\t\t// subsequent errors\r\n\t\t\t\t\t\t\tif ( depth ) {\r\n\t\t\t\t\t\t\t\tprocess();\r\n\t\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t\t// Call an optional hook to record the error, in case of exception\r\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\r\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getErrorHook ) {\r\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getErrorHook();\r\n\r\n\t\t\t\t\t\t\t\t// The deprecated alias of the above. While the name suggests\r\n\t\t\t\t\t\t\t\t// returning the stack, not an error instance, jQuery just passes\r\n\t\t\t\t\t\t\t\t// it directly to `console.warn` so both will work; an instance\r\n\t\t\t\t\t\t\t\t// just better cooperates with source maps.\r\n\t\t\t\t\t\t\t\t} else if ( jQuery.Deferred.getStackHook ) {\r\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getStackHook();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\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 jQuery.Deferred( function( newDefer ) {\r\n\r\n\t\t\t\t\t\t// progress_handlers.add( ... )\r\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\r\n\t\t\t\t\t\t\tresolve(\r\n\t\t\t\t\t\t\t\t0,\r\n\t\t\t\t\t\t\t\tnewDefer,\r\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\r\n\t\t\t\t\t\t\t\t\tonProgress :\r\n\t\t\t\t\t\t\t\t\tIdentity,\r\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\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// fulfilled_handlers.add( ... )\r\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\r\n\t\t\t\t\t\t\tresolve(\r\n\t\t\t\t\t\t\t\t0,\r\n\t\t\t\t\t\t\t\tnewDefer,\r\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\r\n\t\t\t\t\t\t\t\t\tonFulfilled :\r\n\t\t\t\t\t\t\t\t\tIdentity\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// rejected_handlers.add( ... )\r\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\r\n\t\t\t\t\t\t\tresolve(\r\n\t\t\t\t\t\t\t\t0,\r\n\t\t\t\t\t\t\t\tnewDefer,\r\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\r\n\t\t\t\t\t\t\t\t\tonRejected :\r\n\t\t\t\t\t\t\t\t\tThrower\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\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// 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[ 5 ];\r\n\r\n\t\t\t// promise.progress = list.add\r\n\t\t\t// promise.done = list.add\r\n\t\t\t// promise.fail = 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(\r\n\t\t\t\t\tfunction() {\r\n\r\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\r\n\t\t\t\t\t\t// state = \"rejected\"\r\n\t\t\t\t\t\tstate = stateString;\r\n\t\t\t\t\t},\r\n\r\n\t\t\t\t\t// rejected_callbacks.disable\r\n\t\t\t\t\t// fulfilled_callbacks.disable\r\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\r\n\r\n\t\t\t\t\t// rejected_handlers.disable\r\n\t\t\t\t\t// fulfilled_handlers.disable\r\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\r\n\r\n\t\t\t\t\t// progress_callbacks.lock\r\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\r\n\r\n\t\t\t\t\t// progress_handlers.lock\r\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\t// progress_handlers.fire\r\n\t\t\t// fulfilled_handlers.fire\r\n\t\t\t// rejected_handlers.fire\r\n\t\t\tlist.add( tuple[ 3 ].fire );\r\n\r\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\r\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\r\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\r\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\r\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\r\n\t\t\t\treturn this;\r\n\t\t\t};\r\n\r\n\t\t\t// deferred.notifyWith = list.fireWith\r\n\t\t\t// deferred.resolveWith = list.fireWith\r\n\t\t\t// deferred.rejectWith = list.fireWith\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( singleValue ) {\r\n\t\tvar\r\n\r\n\t\t\t// count of uncompleted subordinates\r\n\t\t\tremaining = arguments.length,\r\n\r\n\t\t\t// count of unprocessed arguments\r\n\t\t\ti = remaining,\r\n\r\n\t\t\t// subordinate fulfillment data\r\n\t\t\tresolveContexts = Array( i ),\r\n\t\t\tresolveValues = slice.call( arguments ),\r\n\r\n\t\t\t// the primary Deferred\r\n\t\t\tprimary = jQuery.Deferred(),\r\n\r\n\t\t\t// subordinate callback factory\r\n\t\t\tupdateFunc = function( i ) {\r\n\t\t\t\treturn function( value ) {\r\n\t\t\t\t\tresolveContexts[ i ] = this;\r\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\r\n\t\t\t\t\tif ( !( --remaining ) ) {\r\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t};\r\n\r\n\t\t// Single- and empty arguments are adopted like Promise.resolve\r\n\t\tif ( remaining <= 1 ) {\r\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\r\n\t\t\t\t!remaining );\r\n\r\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\r\n\t\t\tif ( primary.state() === \"pending\" ||\r\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\r\n\r\n\t\t\t\treturn primary.then();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Multiple arguments are aggregated like Promise.all array elements\r\n\t\twhile ( i-- ) {\r\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\r\n\t\t}\r\n\r\n\t\treturn primary.promise();\r\n\t}\r\n} );\r\n\r\n\r\n// These usually indicate a programmer mistake during development,\r\n// warn about them ASAP rather than swallowing them by default.\r\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\r\n\r\n// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error\r\n// captured before the async barrier to get the original error cause\r\n// which may otherwise be hidden.\r\njQuery.Deferred.exceptionHook = function( error, asyncError ) {\r\n\r\n\t// Support: IE 8 - 9 only\r\n\t// Console exists when dev tools are open, which can happen at any time\r\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\r\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message,\r\n\t\t\terror.stack, asyncError );\r\n\t}\r\n};\r\n\r\n\r\n\r\n\r\njQuery.readyException = function( error ) {\r\n\twindow.setTimeout( function() {\r\n\t\tthrow error;\r\n\t} );\r\n};\r\n\r\n\r\n\r\n\r\n// The deferred used on DOM ready\r\nvar readyList = jQuery.Deferred();\r\n\r\njQuery.fn.ready = function( fn ) {\r\n\r\n\treadyList\r\n\t\t.then( fn )\r\n\r\n\t\t// Wrap jQuery.readyException in a function so that the lookup\r\n\t\t// happens at the time of error handling instead of callback\r\n\t\t// registration.\r\n\t\t.catch( function( error ) {\r\n\t\t\tjQuery.readyException( error );\r\n\t\t} );\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 trac-6781\r\n\treadyWait: 1,\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\t}\r\n} );\r\n\r\njQuery.ready.then = readyList.then;\r\n\r\n// The ready event handler and self cleanup method\r\nfunction completed() {\r\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\r\n\twindow.removeEventListener( \"load\", completed );\r\n\tjQuery.ready();\r\n}\r\n\r\n// Catch cases where $(document).ready() is called\r\n// after the browser event has already occurred.\r\n// Support: IE <=9 - 10 only\r\n// Older IE sometimes signals \"interactive\" too soon\r\nif ( document.readyState === \"complete\" ||\r\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\r\n\r\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\r\n\twindow.setTimeout( jQuery.ready );\r\n\r\n} else {\r\n\r\n\t// Use the handy event callback\r\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\r\n\r\n\t// A fallback to window.onload, that will always work\r\n\twindow.addEventListener( \"load\", completed );\r\n}\r\n\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\tlen = elems.length,\r\n\t\tbulk = key == null;\r\n\r\n\t// Sets many values\r\n\tif ( toType( 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 ( !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 < len; i++ ) {\r\n\t\t\t\tfn(\r\n\t\t\t\t\telems[ i ], key, raw ?\r\n\t\t\t\t\t\tvalue :\r\n\t\t\t\t\t\tvalue.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\tif ( chainable ) {\r\n\t\treturn elems;\r\n\t}\r\n\r\n\t// Gets\r\n\tif ( bulk ) {\r\n\t\treturn fn.call( elems );\r\n\t}\r\n\r\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\r\n};\r\n\r\n\r\n// Matches dashed string for camelizing\r\nvar rmsPrefix = /^-ms-/,\r\n\trdashAlpha = /-([a-z])/g;\r\n\r\n// Used by camelCase as callback to replace()\r\nfunction fcamelCase( _all, letter ) {\r\n\treturn letter.toUpperCase();\r\n}\r\n\r\n// Convert dashed to camelCase; used by the css and data modules\r\n// Support: IE <=9 - 11, Edge 12 - 15\r\n// Microsoft forgot to hump their vendor prefix (trac-9572)\r\nfunction camelCase( string ) {\r\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\r\n}\r\nvar acceptData = function( owner ) {\r\n\r\n\t// Accepts only:\r\n\t// - Node\r\n\t// - Node.ELEMENT_NODE\r\n\t// - Node.DOCUMENT_NODE\r\n\t// - Object\r\n\t// - Any\r\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\r\n};\r\n\r\n\r\n\r\n\r\nfunction Data() {\r\n\tthis.expando = jQuery.expando + Data.uid++;\r\n}\r\n\r\nData.uid = 1;\r\n\r\nData.prototype = {\r\n\r\n\tcache: function( owner ) {\r\n\r\n\t\t// Check if the owner object already has a cache\r\n\t\tvar value = owner[ this.expando ];\r\n\r\n\t\t// If not, create one\r\n\t\tif ( !value ) {\r\n\t\t\tvalue = {};\r\n\r\n\t\t\t// We can accept data for non-element nodes in modern browsers,\r\n\t\t\t// but we should not, see trac-8335.\r\n\t\t\t// Always return an empty object.\r\n\t\t\tif ( acceptData( owner ) ) {\r\n\r\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\r\n\t\t\t\t// use plain assignment\r\n\t\t\t\tif ( owner.nodeType ) {\r\n\t\t\t\t\towner[ this.expando ] = value;\r\n\r\n\t\t\t\t// Otherwise secure it in a non-enumerable property\r\n\t\t\t\t// configurable must be true to allow the property to be\r\n\t\t\t\t// deleted when data is removed\r\n\t\t\t\t} else {\r\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\r\n\t\t\t\t\t\tvalue: value,\r\n\t\t\t\t\t\tconfigurable: 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\treturn value;\r\n\t},\r\n\tset: function( owner, data, value ) {\r\n\t\tvar prop,\r\n\t\t\tcache = this.cache( owner );\r\n\r\n\t\t// Handle: [ owner, key, value ] args\r\n\t\t// Always use camelCase key (gh-2257)\r\n\t\tif ( typeof data === \"string\" ) {\r\n\t\t\tcache[ camelCase( data ) ] = value;\r\n\r\n\t\t// Handle: [ owner, { properties } ] args\r\n\t\t} else {\r\n\r\n\t\t\t// Copy the properties one-by-one to the cache object\r\n\t\t\tfor ( prop in data ) {\r\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cache;\r\n\t},\r\n\tget: function( owner, key ) {\r\n\t\treturn key === undefined ?\r\n\t\t\tthis.cache( owner ) :\r\n\r\n\t\t\t// Always use camelCase key (gh-2257)\r\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\r\n\t},\r\n\taccess: function( owner, key, value ) {\r\n\r\n\t\t// In cases where either:\r\n\t\t//\r\n\t\t// 1. No key was specified\r\n\t\t// 2. A string key was specified, but no value provided\r\n\t\t//\r\n\t\t// Take the \"read\" path and allow the get method to determine\r\n\t\t// which value to return, respectively either:\r\n\t\t//\r\n\t\t// 1. The entire cache object\r\n\t\t// 2. The data stored at the key\r\n\t\t//\r\n\t\tif ( key === undefined ||\r\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\r\n\r\n\t\t\treturn this.get( owner, key );\r\n\t\t}\r\n\r\n\t\t// When the key is not a string, or both a key and value\r\n\t\t// are specified, set or extend (existing objects) with either:\r\n\t\t//\r\n\t\t// 1. An object of properties\r\n\t\t// 2. A key and value\r\n\t\t//\r\n\t\tthis.set( owner, key, value );\r\n\r\n\t\t// Since the \"set\" path can have two possible entry points\r\n\t\t// return the expected data based on which path was taken[*]\r\n\t\treturn value !== undefined ? value : key;\r\n\t},\r\n\tremove: function( owner, key ) {\r\n\t\tvar i,\r\n\t\t\tcache = owner[ this.expando ];\r\n\r\n\t\tif ( cache === undefined ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ( key !== undefined ) {\r\n\r\n\t\t\t// Support array or space separated string of keys\r\n\t\t\tif ( Array.isArray( key ) ) {\r\n\r\n\t\t\t\t// If key is an array of keys...\r\n\t\t\t\t// We always set camelCase keys, so remove that.\r\n\t\t\t\tkey = key.map( camelCase );\r\n\t\t\t} else {\r\n\t\t\t\tkey = camelCase( key );\r\n\r\n\t\t\t\t// If a key with the spaces exists, use it.\r\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\r\n\t\t\t\tkey = key in cache ?\r\n\t\t\t\t\t[ key ] :\r\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\r\n\t\t\t}\r\n\r\n\t\t\ti = key.length;\r\n\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tdelete cache[ key[ i ] ];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Remove the expando if there's no more data\r\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\r\n\r\n\t\t\t// Support: Chrome <=35 - 45\r\n\t\t\t// Webkit & Blink performance suffers when deleting properties\r\n\t\t\t// from DOM nodes, so set to undefined instead\r\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\r\n\t\t\tif ( owner.nodeType ) {\r\n\t\t\t\towner[ this.expando ] = undefined;\r\n\t\t\t} else {\r\n\t\t\t\tdelete owner[ this.expando ];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\thasData: function( owner ) {\r\n\t\tvar cache = owner[ this.expando ];\r\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\r\n\t}\r\n};\r\nvar dataPriv = new Data();\r\n\r\nvar dataUser = new Data();\r\n\r\n\r\n\r\n//\tImplementation Summary\r\n//\r\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\r\n//\t2. Improve the module's maintainability by reducing the storage\r\n//\t\tpaths to a single mechanism.\r\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\r\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\r\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\r\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\r\n\r\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\r\n\trmultiDash = /[A-Z]/g;\r\n\r\nfunction getData( data ) {\r\n\tif ( data === \"true\" ) {\r\n\t\treturn true;\r\n\t}\r\n\r\n\tif ( data === \"false\" ) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif ( data === \"null\" ) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\t// Only convert to a number if it doesn't change the string\r\n\tif ( data === +data + \"\" ) {\r\n\t\treturn +data;\r\n\t}\r\n\r\n\tif ( rbrace.test( data ) ) {\r\n\t\treturn JSON.parse( data );\r\n\t}\r\n\r\n\treturn data;\r\n}\r\n\r\nfunction dataAttr( elem, key, data ) {\r\n\tvar name;\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\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\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 = getData( data );\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\tdataUser.set( elem, key, data );\r\n\t\t} else {\r\n\t\t\tdata = undefined;\r\n\t\t}\r\n\t}\r\n\treturn data;\r\n}\r\n\r\njQuery.extend( {\r\n\thasData: function( elem ) {\r\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\r\n\t},\r\n\r\n\tdata: function( elem, name, data ) {\r\n\t\treturn dataUser.access( elem, name, data );\r\n\t},\r\n\r\n\tremoveData: function( elem, name ) {\r\n\t\tdataUser.remove( elem, name );\r\n\t},\r\n\r\n\t// TODO: Now that all calls to _data and _removeData have been replaced\r\n\t// with direct calls to dataPriv methods, these can be deprecated.\r\n\t_data: function( elem, name, data ) {\r\n\t\treturn dataPriv.access( elem, name, data );\r\n\t},\r\n\r\n\t_removeData: function( elem, name ) {\r\n\t\tdataPriv.remove( elem, name );\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// Gets all values\r\n\t\tif ( key === undefined ) {\r\n\t\t\tif ( this.length ) {\r\n\t\t\t\tdata = dataUser.get( elem );\r\n\r\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\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: IE 11 only\r\n\t\t\t\t\t\t// The attrs elements can be null (trac-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 = 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\tdataPriv.set( elem, \"hasDataAttrs\", 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\tdataUser.set( this, key );\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\treturn access( this, function( value ) {\r\n\t\t\tvar data;\r\n\r\n\t\t\t// The calling jQuery object (element matches) is not empty\r\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\r\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\r\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\r\n\t\t\t// throw an exception if an attempt to read a data cache is made.\r\n\t\t\tif ( elem && value === undefined ) {\r\n\r\n\t\t\t\t// Attempt to get data from the cache\r\n\t\t\t\t// The key will always be camelCased in Data\r\n\t\t\t\tdata = dataUser.get( elem, key );\r\n\t\t\t\tif ( data !== undefined ) {\r\n\t\t\t\t\treturn data;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Attempt to \"discover\" the data in\r\n\t\t\t\t// HTML5 custom data-* attrs\r\n\t\t\t\tdata = dataAttr( elem, key );\r\n\t\t\t\tif ( data !== undefined ) {\r\n\t\t\t\t\treturn data;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// We tried really hard, but the data doesn't exist.\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Set the data...\r\n\t\t\tthis.each( function() {\r\n\r\n\t\t\t\t// We always store the camelCased key\r\n\t\t\t\tdataUser.set( this, key, value );\r\n\t\t\t} );\r\n\t\t}, null, value, arguments.length > 1, null, true );\r\n\t},\r\n\r\n\tremoveData: function( key ) {\r\n\t\treturn this.each( function() {\r\n\t\t\tdataUser.remove( 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 = dataPriv.get( 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 || Array.isArray( data ) ) {\r\n\t\t\t\t\tqueue = dataPriv.access( 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 public - generate a queueHooks object, or return the current one\r\n\t_queueHooks: function( elem, type ) {\r\n\t\tvar key = type + \"queueHooks\";\r\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\r\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\r\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", 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 = dataPriv.get( 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\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 documentElement = document.documentElement;\r\n\r\n\r\n\r\n\tvar isAttached = function( elem ) {\r\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\r\n\t\t},\r\n\t\tcomposed = { composed: true };\r\n\r\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\r\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\r\n\t// Support: iOS 10.0-10.2 only\r\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\r\n\t// leading to errors. We need to check for `getRootNode`.\r\n\tif ( documentElement.getRootNode ) {\r\n\t\tisAttached = function( elem ) {\r\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\r\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\r\n\t\t};\r\n\t}\r\nvar isHiddenWithinTree = function( elem, el ) {\r\n\r\n\t\t// isHiddenWithinTree 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\r\n\t\t// Inline style trumps all\r\n\t\treturn elem.style.display === \"none\" ||\r\n\t\t\telem.style.display === \"\" &&\r\n\r\n\t\t\t// Otherwise, check computed style\r\n\t\t\t// Support: Firefox <=43 - 45\r\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\r\n\t\t\t// in the document.\r\n\t\t\tisAttached( elem ) &&\r\n\r\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\r\n\t};\r\n\r\n\r\n\r\nfunction adjustCSS( elem, prop, valueParts, tween ) {\r\n\tvar adjusted, scale,\r\n\t\tmaxIterations = 20,\r\n\t\tcurrentValue = tween ?\r\n\t\t\tfunction() {\r\n\t\t\t\treturn tween.cur();\r\n\t\t\t} :\r\n\t\t\tfunction() {\r\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\r\n\t\t\t},\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 = elem.nodeType &&\r\n\t\t\t( 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// Support: Firefox <=54\r\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\r\n\t\tinitial = initial / 2;\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// Iteratively approximate from a nonzero starting point\r\n\t\tinitialInUnit = +initial || 1;\r\n\r\n\t\twhile ( maxIterations-- ) {\r\n\r\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\r\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\r\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\r\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\r\n\t\t\t\tmaxIterations = 0;\r\n\t\t\t}\r\n\t\t\tinitialInUnit = initialInUnit / scale;\r\n\r\n\t\t}\r\n\r\n\t\tinitialInUnit = initialInUnit * 2;\r\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\r\n\r\n\t\t// Make sure we update the tween properties later on\r\n\t\tvalueParts = valueParts || [];\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\nvar defaultDisplayMap = {};\r\n\r\nfunction getDefaultDisplay( elem ) {\r\n\tvar temp,\r\n\t\tdoc = elem.ownerDocument,\r\n\t\tnodeName = elem.nodeName,\r\n\t\tdisplay = defaultDisplayMap[ nodeName ];\r\n\r\n\tif ( display ) {\r\n\t\treturn display;\r\n\t}\r\n\r\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\r\n\tdisplay = jQuery.css( temp, \"display\" );\r\n\r\n\ttemp.parentNode.removeChild( temp );\r\n\r\n\tif ( display === \"none\" ) {\r\n\t\tdisplay = \"block\";\r\n\t}\r\n\tdefaultDisplayMap[ nodeName ] = display;\r\n\r\n\treturn display;\r\n}\r\n\r\nfunction showHide( elements, show ) {\r\n\tvar display, elem,\r\n\t\tvalues = [],\r\n\t\tindex = 0,\r\n\t\tlength = elements.length;\r\n\r\n\t// Determine new display value for elements that need to change\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\tdisplay = elem.style.display;\r\n\t\tif ( show ) {\r\n\r\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\r\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\r\n\t\t\t// inline or about-to-be-restored)\r\n\t\t\tif ( display === \"none\" ) {\r\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\r\n\t\t\t\tif ( !values[ index ] ) {\r\n\t\t\t\t\telem.style.display = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\r\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ( display !== \"none\" ) {\r\n\t\t\t\tvalues[ index ] = \"none\";\r\n\r\n\t\t\t\t// Remember what we're overwriting\r\n\t\t\t\tdataPriv.set( elem, \"display\", display );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Set the display of the elements in a second loop to avoid constant reflow\r\n\tfor ( index = 0; index < length; index++ ) {\r\n\t\tif ( values[ index ] != null ) {\r\n\t\t\telements[ index ].style.display = values[ index ];\r\n\t\t}\r\n\t}\r\n\r\n\treturn elements;\r\n}\r\n\r\njQuery.fn.extend( {\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 ( isHiddenWithinTree( 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\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\r\n\r\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\r\n\r\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\r\n\r\n\r\n\r\n( function() {\r\n\tvar fragment = document.createDocumentFragment(),\r\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\r\n\t\tinput = document.createElement( \"input\" );\r\n\r\n\t// Support: Android 4.0 - 4.3 only\r\n\t// Check state lost if the name is set (trac-11217)\r\n\t// Support: Windows Web Apps (WWA)\r\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\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: Android <=4.1 only\r\n\t// Older 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 <=11 only\r\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\r\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\r\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\r\n\r\n\t// Support: IE <=9 only\r\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\r\n\t// the select element.\r\n\tdiv.innerHTML = \"<option></option>\";\r\n\tsupport.option = !!div.lastChild;\r\n} )();\r\n\r\n\r\n// We have to close these tags to support XHTML (trac-13200)\r\nvar wrapMap = {\r\n\r\n\t// XHTML parsers do not magically insert elements in the\r\n\t// same way that tag soup parsers do. So we cannot shorten\r\n\t// this by omitting <tbody> or other required elements.\r\n\tthead: [ 1, \"<table>\", \"</table>\" ],\r\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\r\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\r\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\r\n\r\n\t_default: [ 0, \"\", \"\" ]\r\n};\r\n\r\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\r\nwrapMap.th = wrapMap.td;\r\n\r\n// Support: IE <=9 only\r\nif ( !support.option ) {\r\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\r\n}\r\n\r\n\r\nfunction getAll( context, tag ) {\r\n\r\n\t// Support: IE <=9 - 11 only\r\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\r\n\tvar ret;\r\n\r\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\r\n\t\tret = context.getElementsByTagName( tag || \"*\" );\r\n\r\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\r\n\t\tret = context.querySelectorAll( tag || \"*\" );\r\n\r\n\t} else {\r\n\t\tret = [];\r\n\t}\r\n\r\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\r\n\t\treturn jQuery.merge( [ context ], ret );\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\n\r\n// Mark scripts as having already been evaluated\r\nfunction setGlobalEval( elems, refElements ) {\r\n\tvar i = 0,\r\n\t\tl = elems.length;\r\n\r\n\tfor ( ; i < l; i++ ) {\r\n\t\tdataPriv.set(\r\n\t\t\telems[ i ],\r\n\t\t\t\"globalEval\",\r\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\r\n\t\t);\r\n\t}\r\n}\r\n\r\n\r\nvar rhtml = /<|&#?\\w+;/;\r\n\r\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\r\n\tvar elem, tmp, tag, wrap, attached, j,\r\n\t\tfragment = context.createDocumentFragment(),\r\n\t\tnodes = [],\r\n\t\ti = 0,\r\n\t\tl = elems.length;\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 ( toType( elem ) === \"object\" ) {\r\n\r\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\r\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\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 || fragment.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\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// Support: Android <=4.0 only, PhantomJS 1 only\r\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\r\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\r\n\r\n\t\t\t\t// Remember the top-level container\r\n\t\t\t\ttmp = fragment.firstChild;\r\n\r\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\r\n\t\t\t\ttmp.textContent = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Remove wrapper from fragment\r\n\tfragment.textContent = \"\";\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\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tattached = isAttached( elem );\r\n\r\n\t\t// Append to fragment\r\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\r\n\r\n\t\t// Preserve script evaluation history\r\n\t\tif ( attached ) {\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\treturn fragment;\r\n}\r\n\r\n\r\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\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\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\r\n\t\tvar handleObjIn, eventHandle, tmp,\r\n\t\t\tevents, t, handleObj,\r\n\t\t\tspecial, handlers, type, namespaces, origType,\r\n\t\t\telemData = dataPriv.get( elem );\r\n\r\n\t\t// Only attach events to objects that accept data\r\n\t\tif ( !acceptData( elem ) ) {\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// Ensure that invalid selectors throw exceptions at attach time\r\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\r\n\t\tif ( selector ) {\r\n\t\t\tjQuery.find.matchesSelector( documentElement, 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 = Object.create( null );\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\" && jQuery.event.triggered !== e.type ?\r\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\t// Handle multiple events separated by a space\r\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\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 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\tif ( elem.addEventListener ) {\r\n\t\t\t\t\t\telem.addEventListener( 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},\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\r\n\t\tvar j, origCount, tmp,\r\n\t\t\tevents, t, handleObj,\r\n\t\t\tspecial, handlers, type, namespaces, origType,\r\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( 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( rnothtmlwhite ) || [ \"\" ];\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 data and the expando if it's no longer used\r\n\t\tif ( jQuery.isEmptyObject( events ) ) {\r\n\t\t\tdataPriv.remove( elem, \"handle events\" );\r\n\t\t}\r\n\t},\r\n\r\n\tdispatch: function( nativeEvent ) {\r\n\r\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\r\n\t\t\targs = new Array( arguments.length ),\r\n\r\n\t\t\t// Make a writable jQuery.Event from the native event object\r\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\r\n\r\n\t\t\thandlers = (\r\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\r\n\t\t\t)[ 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\r\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\r\n\t\t\targs[ i ] = arguments[ i ];\r\n\t\t}\r\n\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// If the event is namespaced, then each handler is only invoked if it is\r\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\r\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\r\n\t\t\t\t\tevent.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, handleObj, sel, matchedHandlers, matchedSelectors,\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// Find delegate handlers\r\n\t\tif ( delegateCount &&\r\n\r\n\t\t\t// Support: IE <=9\r\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\r\n\t\t\tcur.nodeType &&\r\n\r\n\t\t\t// Support: Firefox <=42\r\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\r\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\r\n\t\t\t// Support: IE 11 only\r\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\r\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\r\n\r\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\r\n\r\n\t\t\t\t// Don't check non-elements (trac-13208)\r\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\r\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\r\n\t\t\t\t\tmatchedHandlers = [];\r\n\t\t\t\t\tmatchedSelectors = {};\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 (trac-13203)\r\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\r\n\r\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\r\n\t\t\t\t\t\t\tmatchedSelectors[ 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 ( matchedSelectors[ sel ] ) {\r\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( matchedHandlers.length ) {\r\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\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\tcur = this;\r\n\t\tif ( delegateCount < handlers.length ) {\r\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\r\n\t\t}\r\n\r\n\t\treturn handlerQueue;\r\n\t},\r\n\r\n\taddProp: function( name, hook ) {\r\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\r\n\t\t\tenumerable: true,\r\n\t\t\tconfigurable: true,\r\n\r\n\t\t\tget: isFunction( hook ) ?\r\n\t\t\t\tfunction() {\r\n\t\t\t\t\tif ( this.originalEvent ) {\r\n\t\t\t\t\t\treturn hook( this.originalEvent );\r\n\t\t\t\t\t}\r\n\t\t\t\t} :\r\n\t\t\t\tfunction() {\r\n\t\t\t\t\tif ( this.originalEvent ) {\r\n\t\t\t\t\t\treturn this.originalEvent[ name ];\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\tset: function( value ) {\r\n\t\t\t\tObject.defineProperty( this, name, {\r\n\t\t\t\t\tenumerable: true,\r\n\t\t\t\t\tconfigurable: true,\r\n\t\t\t\t\twritable: true,\r\n\t\t\t\t\tvalue: value\r\n\t\t\t\t} );\r\n\t\t\t}\r\n\t\t} );\r\n\t},\r\n\r\n\tfix: function( originalEvent ) {\r\n\t\treturn originalEvent[ jQuery.expando ] ?\r\n\t\t\toriginalEvent :\r\n\t\t\tnew jQuery.Event( originalEvent );\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\tclick: {\r\n\r\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\r\n\t\t\tsetup: function( data ) {\r\n\r\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\r\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\r\n\t\t\t\tvar el = this || data;\r\n\r\n\t\t\t\t// Claim the first handler\r\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\r\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\r\n\r\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\r\n\t\t\t\t\tleverageNative( el, \"click\", true );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Return false to allow normal processing in the caller\r\n\t\t\t\treturn false;\r\n\t\t\t},\r\n\t\t\ttrigger: function( data ) {\r\n\r\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\r\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\r\n\t\t\t\tvar el = this || data;\r\n\r\n\t\t\t\t// Force setup before triggering a click\r\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\r\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\r\n\r\n\t\t\t\t\tleverageNative( el, \"click\" );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Return non-false to allow normal event-path propagation\r\n\t\t\t\treturn true;\r\n\t\t\t},\r\n\r\n\t\t\t// For cross-browser consistency, suppress native .click() on links\r\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\r\n\t\t\t_default: function( event ) {\r\n\t\t\t\tvar target = event.target;\r\n\t\t\t\treturn rcheckableType.test( target.type ) &&\r\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\r\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\r\n\t\t\t\t\tnodeName( 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\r\n// Ensure the presence of an event listener that handles manually-triggered\r\n// synthetic events by interrupting progress until reinvoked in response to\r\n// *native* events that it fires directly, ensuring that state changes have\r\n// already occurred before other listeners are invoked.\r\nfunction leverageNative( el, type, isSetup ) {\r\n\r\n\t// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add\r\n\tif ( !isSetup ) {\r\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\r\n\t\t\tjQuery.event.add( el, type, returnTrue );\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Register the controller as a special universal handler for all event namespaces\r\n\tdataPriv.set( el, type, false );\r\n\tjQuery.event.add( el, type, {\r\n\t\tnamespace: false,\r\n\t\thandler: function( event ) {\r\n\t\t\tvar result,\r\n\t\t\t\tsaved = dataPriv.get( this, type );\r\n\r\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\r\n\r\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\r\n\t\t\t\tif ( !saved ) {\r\n\r\n\t\t\t\t\t// Store arguments for use when handling the inner native event\r\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\r\n\t\t\t\t\t// will not be confused with a leftover capture object.\r\n\t\t\t\t\tsaved = slice.call( arguments );\r\n\t\t\t\t\tdataPriv.set( this, type, saved );\r\n\r\n\t\t\t\t\t// Trigger the native event and capture its result\r\n\t\t\t\t\tthis[ type ]();\r\n\t\t\t\t\tresult = dataPriv.get( this, type );\r\n\t\t\t\t\tdataPriv.set( this, type, false );\r\n\r\n\t\t\t\t\tif ( saved !== result ) {\r\n\r\n\t\t\t\t\t\t// Cancel the outer synthetic event\r\n\t\t\t\t\t\tevent.stopImmediatePropagation();\r\n\t\t\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\r\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering\r\n\t\t\t\t// the native event and prevent that from happening again here.\r\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\r\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\r\n\t\t\t\t// less bad than duplication.\r\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\r\n\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t}\r\n\r\n\t\t\t// If this is a native event triggered above, everything is now in order\r\n\t\t\t// Fire an inner synthetic event with the original arguments\r\n\t\t\t} else if ( saved ) {\r\n\r\n\t\t\t\t// ...and capture the result\r\n\t\t\t\tdataPriv.set( this, type, jQuery.event.trigger(\r\n\t\t\t\t\tsaved[ 0 ],\r\n\t\t\t\t\tsaved.slice( 1 ),\r\n\t\t\t\t\tthis\r\n\t\t\t\t) );\r\n\r\n\t\t\t\t// Abort handling of the native event by all jQuery handlers while allowing\r\n\t\t\t\t// native handlers on the same element to run. On target, this is achieved\r\n\t\t\t\t// by stopping immediate propagation just on the jQuery event. However,\r\n\t\t\t\t// the native event is re-wrapped by a jQuery one on each level of the\r\n\t\t\t\t// propagation so the only way to stop it for jQuery is to stop it for\r\n\t\t\t\t// everyone via native `stopPropagation()`. This is not a problem for\r\n\t\t\t\t// focus/blur which don't bubble, but it does also stop click on checkboxes\r\n\t\t\t\t// and radios. We accept this limitation.\r\n\t\t\t\tevent.stopPropagation();\r\n\t\t\t\tevent.isImmediatePropagationStopped = returnTrue;\r\n\t\t\t}\r\n\t\t}\r\n\t} );\r\n}\r\n\r\njQuery.removeEvent = function( elem, type, handle ) {\r\n\r\n\t// This \"if\" is needed for plain objects\r\n\tif ( elem.removeEventListener ) {\r\n\t\telem.removeEventListener( type, handle );\r\n\t}\r\n};\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: Android <=2.3 only\r\n\t\t\t\tsrc.returnValue === false ?\r\n\t\t\treturnTrue :\r\n\t\t\treturnFalse;\r\n\r\n\t\t// Create target properties\r\n\t\t// Support: Safari <=6 - 7 only\r\n\t\t// Target should not be a text node (trac-504, trac-13143)\r\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\r\n\t\t\tsrc.target.parentNode :\r\n\t\t\tsrc.target;\r\n\r\n\t\tthis.currentTarget = src.currentTarget;\r\n\t\tthis.relatedTarget = src.relatedTarget;\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 || Date.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// https://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\tisSimulated: false,\r\n\r\n\tpreventDefault: function() {\r\n\t\tvar e = this.originalEvent;\r\n\r\n\t\tthis.isDefaultPrevented = returnTrue;\r\n\r\n\t\tif ( e && !this.isSimulated ) {\r\n\t\t\te.preventDefault();\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\te.stopPropagation();\r\n\t\t}\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 && !this.isSimulated ) {\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// Includes all common event props including KeyEvent and MouseEvent specific props\r\njQuery.each( {\r\n\taltKey: true,\r\n\tbubbles: true,\r\n\tcancelable: true,\r\n\tchangedTouches: true,\r\n\tctrlKey: true,\r\n\tdetail: true,\r\n\teventPhase: true,\r\n\tmetaKey: true,\r\n\tpageX: true,\r\n\tpageY: true,\r\n\tshiftKey: true,\r\n\tview: true,\r\n\t\"char\": true,\r\n\tcode: true,\r\n\tcharCode: true,\r\n\tkey: true,\r\n\tkeyCode: true,\r\n\tbutton: true,\r\n\tbuttons: true,\r\n\tclientX: true,\r\n\tclientY: true,\r\n\toffsetX: true,\r\n\toffsetY: true,\r\n\tpointerId: true,\r\n\tpointerType: true,\r\n\tscreenX: true,\r\n\tscreenY: true,\r\n\ttargetTouches: true,\r\n\ttoElement: true,\r\n\ttouches: true,\r\n\twhich: true\r\n}, jQuery.event.addProp );\r\n\r\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\r\n\r\n\tfunction focusMappedHandler( nativeEvent ) {\r\n\t\tif ( document.documentMode ) {\r\n\r\n\t\t\t// Support: IE 11+\r\n\t\t\t// Attach a single focusin/focusout handler on the document while someone wants\r\n\t\t\t// focus/blur. This is because the former are synchronous in IE while the latter\r\n\t\t\t// are async. In other browsers, all those handlers are invoked synchronously.\r\n\r\n\t\t\t// `handle` from private data would already wrap the event, but we need\r\n\t\t\t// to change the `type` here.\r\n\t\t\tvar handle = dataPriv.get( this, \"handle\" ),\r\n\t\t\t\tevent = jQuery.event.fix( nativeEvent );\r\n\t\t\tevent.type = nativeEvent.type === \"focusin\" ? \"focus\" : \"blur\";\r\n\t\t\tevent.isSimulated = true;\r\n\r\n\t\t\t// First, handle focusin/focusout\r\n\t\t\thandle( nativeEvent );\r\n\r\n\t\t\t// ...then, handle focus/blur\r\n\t\t\t//\r\n\t\t\t// focus/blur don't bubble while focusin/focusout do; simulate the former by only\r\n\t\t\t// invoking the handler at the lower level.\r\n\t\t\tif ( event.target === event.currentTarget ) {\r\n\r\n\t\t\t\t// The setup part calls `leverageNative`, which, in turn, calls\r\n\t\t\t\t// `jQuery.event.add`, so event handle will already have been set\r\n\t\t\t\t// by this point.\r\n\t\t\t\thandle( event );\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\t// For non-IE browsers, attach a single capturing handler on the document\r\n\t\t\t// while someone wants focusin/focusout.\r\n\t\t\tjQuery.event.simulate( delegateType, nativeEvent.target,\r\n\t\t\t\tjQuery.event.fix( nativeEvent ) );\r\n\t\t}\r\n\t}\r\n\r\n\tjQuery.event.special[ type ] = {\r\n\r\n\t\t// Utilize native event if possible so blur/focus sequence is correct\r\n\t\tsetup: function() {\r\n\r\n\t\t\tvar attaches;\r\n\r\n\t\t\t// Claim the first handler\r\n\t\t\t// dataPriv.set( this, \"focus\", ... )\r\n\t\t\t// dataPriv.set( this, \"blur\", ... )\r\n\t\t\tleverageNative( this, type, true );\r\n\r\n\t\t\tif ( document.documentMode ) {\r\n\r\n\t\t\t\t// Support: IE 9 - 11+\r\n\t\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\r\n\t\t\t\t// so we need to coordinate setup & teardown parts between those events.\r\n\t\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\r\n\t\t\t\tattaches = dataPriv.get( this, delegateType );\r\n\t\t\t\tif ( !attaches ) {\r\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\r\n\t\t\t\t}\r\n\t\t\t\tdataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// Return false to allow normal processing in the caller\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t},\r\n\t\ttrigger: function() {\r\n\r\n\t\t\t// Force setup before trigger\r\n\t\t\tleverageNative( this, type );\r\n\r\n\t\t\t// Return non-false to allow normal event-path propagation\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tteardown: function() {\r\n\t\t\tvar attaches;\r\n\r\n\t\t\tif ( document.documentMode ) {\r\n\t\t\t\tattaches = dataPriv.get( this, delegateType ) - 1;\r\n\t\t\t\tif ( !attaches ) {\r\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\r\n\t\t\t\t\tdataPriv.remove( this, delegateType );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdataPriv.set( this, delegateType, attaches );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// Return false to indicate standard teardown should be applied\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t// Suppress native focus or blur if we're currently inside\r\n\t\t// a leveraged native-event stack\r\n\t\t_default: function( event ) {\r\n\t\t\treturn dataPriv.get( event.target, type );\r\n\t\t},\r\n\r\n\t\tdelegateType: delegateType\r\n\t};\r\n\r\n\t// Support: Firefox <=44\r\n\t// Firefox doesn't have focus(in | out) events\r\n\t// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\r\n\t//\r\n\t// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\r\n\t// focus(in | out) events fire after focus & blur events,\r\n\t// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\r\n\t// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\r\n\t//\r\n\t// Support: IE 9 - 11+\r\n\t// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,\r\n\t// attach a single handler for both events in IE.\r\n\tjQuery.event.special[ delegateType ] = {\r\n\t\tsetup: function() {\r\n\r\n\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\r\n\t\t\t// (via `this.document`) & document (via `this`).\r\n\t\t\tvar doc = this.ownerDocument || this.document || this,\r\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\r\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType );\r\n\r\n\t\t\t// Support: IE 9 - 11+\r\n\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\r\n\t\t\t// so we need to coordinate setup & teardown parts between those events.\r\n\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\r\n\t\t\tif ( !attaches ) {\r\n\t\t\t\tif ( document.documentMode ) {\r\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdoc.addEventListener( type, focusMappedHandler, true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );\r\n\t\t},\r\n\t\tteardown: function() {\r\n\t\t\tvar doc = this.ownerDocument || this.document || this,\r\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\r\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType ) - 1;\r\n\r\n\t\t\tif ( !attaches ) {\r\n\t\t\t\tif ( document.documentMode ) {\r\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdoc.removeEventListener( type, focusMappedHandler, true );\r\n\t\t\t\t}\r\n\t\t\t\tdataPriv.remove( dataHolder, delegateType );\r\n\t\t\t} else {\r\n\t\t\t\tdataPriv.set( dataHolder, delegateType, attaches );\r\n\t\t\t}\r\n\t\t}\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://bugs.chromium.org/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\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\r\n\r\nvar\r\n\r\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\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\r\n\trcleanScript = /^\\s*<!\\[CDATA\\[|\\]\\]>\\s*$/g;\r\n\r\n// Prefer a tbody over its parent table for containing new rows\r\nfunction manipulationTarget( elem, content ) {\r\n\tif ( nodeName( elem, \"table\" ) &&\r\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\r\n\r\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\r\n\t}\r\n\r\n\treturn elem;\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 = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\r\n\treturn elem;\r\n}\r\nfunction restoreScript( elem ) {\r\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\r\n\t\telem.type = elem.type.slice( 5 );\r\n\t} else {\r\n\t\telem.removeAttribute( \"type\" );\r\n\t}\r\n\r\n\treturn elem;\r\n}\r\n\r\nfunction cloneCopyEvent( src, dest ) {\r\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\r\n\r\n\tif ( dest.nodeType !== 1 ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t// 1. Copy private data: events, handlers, etc.\r\n\tif ( dataPriv.hasData( src ) ) {\r\n\t\tpdataOld = dataPriv.get( src );\r\n\t\tevents = pdataOld.events;\r\n\r\n\t\tif ( events ) {\r\n\t\t\tdataPriv.remove( dest, \"handle events\" );\r\n\r\n\t\t\tfor ( type in events ) {\r\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\r\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// 2. Copy user data\r\n\tif ( dataUser.hasData( src ) ) {\r\n\t\tudataOld = dataUser.access( src );\r\n\t\tudataCur = jQuery.extend( {}, udataOld );\r\n\r\n\t\tdataUser.set( dest, udataCur );\r\n\t}\r\n}\r\n\r\n// Fix IE bugs, see support tests\r\nfunction fixInput( src, dest ) {\r\n\tvar nodeName = dest.nodeName.toLowerCase();\r\n\r\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\r\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\r\n\t\tdest.checked = src.checked;\r\n\r\n\t// Fails to return the selected option to the default selected state when cloning options\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 = flat( args );\r\n\r\n\tvar fragment, first, scripts, hasScripts, node, doc,\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\tvalueIsFunction = isFunction( value );\r\n\r\n\t// We can't cloneNode fragments that contain checked, in WebKit\r\n\tif ( valueIsFunction ||\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 ( valueIsFunction ) {\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 (trac-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.0 only, PhantomJS 1 only\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// Re-enable 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!dataPriv.access( 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 && ( node.type || \"\" ).toLowerCase() !== \"module\" ) {\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 && !node.noModule ) {\r\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\r\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\r\n\t\t\t\t\t\t\t\t}, doc );\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// Unwrap a CDATA section containing script contents. This shouldn't be\r\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\r\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\r\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\r\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\r\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\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 collection;\r\n}\r\n\r\nfunction remove( elem, selector, keepData ) {\r\n\tvar node,\r\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\r\n\t\ti = 0;\r\n\r\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\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 && isAttached( 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;\r\n\t},\r\n\r\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\r\n\t\tvar i, l, srcElements, destElements,\r\n\t\t\tclone = elem.cloneNode( true ),\r\n\t\t\tinPage = isAttached( elem );\r\n\r\n\t\t// Fix IE cloning issues\r\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\r\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\r\n\r\n\t\t\t// We eschew jQuery#find here for performance reasons:\r\n\t\t\t// https://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\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\r\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\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, l = srcElements.length; i < l; i++ ) {\r\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], 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\t// Return the cloned set\r\n\t\treturn clone;\r\n\t},\r\n\r\n\tcleanData: function( elems ) {\r\n\t\tvar data, elem, type,\r\n\t\t\tspecial = jQuery.event.special,\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\r\n\t\t\tif ( acceptData( elem ) ) {\r\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\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// Support: Chrome <=35 - 45+\r\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\r\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\r\n\t\t\t\t}\r\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\r\n\r\n\t\t\t\t\t// Support: Chrome <=35 - 45+\r\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\r\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\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\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().each( function() {\r\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\r\n\t\t\t\t\t\tthis.textContent = value;\r\n\t\t\t\t\t}\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\t\t\tif ( elem.nodeType === 1 ) {\r\n\r\n\t\t\t\t// Prevent memory leaks\r\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\r\n\r\n\t\t\t\t// Remove any remaining nodes\r\n\t\t\t\telem.textContent = \"\";\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 && elem.nodeType === 1 ) {\r\n\t\t\t\treturn elem.innerHTML;\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!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\t\t\t\t\t\telem = this[ 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\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\tret = [],\r\n\t\t\tinsert = jQuery( selector ),\r\n\t\t\tlast = insert.length - 1,\r\n\t\t\ti = 0;\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// Support: Android <=4.0 only, PhantomJS 1 only\r\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\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\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\r\n\r\nvar rcustomProp = /^--/;\r\n\r\n\r\nvar getStyles = function( elem ) {\r\n\r\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-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\nvar swap = function( elem, options, callback ) {\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.call( elem );\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 rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\r\n\r\n\r\n\r\n( function() {\r\n\r\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\r\n\t// so they're executed at the same time to save the second computation.\r\n\tfunction computeStyleTests() {\r\n\r\n\t\t// This is a singleton, we need to execute it only once\r\n\t\tif ( !div ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\r\n\t\t\t\"margin-top:1px;padding:0;border:0\";\r\n\t\tdiv.style.cssText =\r\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\r\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\r\n\t\t\t\"width:60%;top:1%\";\r\n\t\tdocumentElement.appendChild( container ).appendChild( div );\r\n\r\n\t\tvar divStyle = window.getComputedStyle( div );\r\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\r\n\r\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\r\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\r\n\r\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\r\n\t\t// Some styles come back with percentage values, even though they shouldn't\r\n\t\tdiv.style.right = \"60%\";\r\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\r\n\r\n\t\t// Support: IE 9 - 11 only\r\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\r\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\r\n\r\n\t\t// Support: IE 9 only\r\n\t\t// Detect overflow:scroll screwiness (gh-3699)\r\n\t\t// Support: Chrome <=64\r\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\r\n\t\tdiv.style.position = \"absolute\";\r\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\r\n\r\n\t\tdocumentElement.removeChild( container );\r\n\r\n\t\t// Nullify the div so it wouldn't be stored in the memory and\r\n\t\t// it will also be a sign that checks already performed\r\n\t\tdiv = null;\r\n\t}\r\n\r\n\tfunction roundPixelMeasures( measure ) {\r\n\t\treturn Math.round( parseFloat( measure ) );\r\n\t}\r\n\r\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\r\n\t\treliableTrDimensionsVal, 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\t// Support: IE <=9 - 11 only\r\n\t// Style of cloned element affects source element cloned (trac-8908)\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\tjQuery.extend( support, {\r\n\t\tboxSizingReliable: function() {\r\n\t\t\tcomputeStyleTests();\r\n\t\t\treturn boxSizingReliableVal;\r\n\t\t},\r\n\t\tpixelBoxStyles: function() {\r\n\t\t\tcomputeStyleTests();\r\n\t\t\treturn pixelBoxStylesVal;\r\n\t\t},\r\n\t\tpixelPosition: function() {\r\n\t\t\tcomputeStyleTests();\r\n\t\t\treturn pixelPositionVal;\r\n\t\t},\r\n\t\treliableMarginLeft: function() {\r\n\t\t\tcomputeStyleTests();\r\n\t\t\treturn reliableMarginLeftVal;\r\n\t\t},\r\n\t\tscrollboxSize: function() {\r\n\t\t\tcomputeStyleTests();\r\n\t\t\treturn scrollboxSizeVal;\r\n\t\t},\r\n\r\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\r\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\r\n\t\t// set in CSS while `offset*` properties report correct values.\r\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\r\n\t\t// some versions of this test; make sure not to make it pass there!\r\n\t\t//\r\n\t\t// Support: Firefox 70+\r\n\t\t// Only Firefox includes border widths\r\n\t\t// in computed dimensions. (gh-4529)\r\n\t\treliableTrDimensions: function() {\r\n\t\t\tvar table, tr, trChild, trStyle;\r\n\t\t\tif ( reliableTrDimensionsVal == null ) {\r\n\t\t\t\ttable = document.createElement( \"table\" );\r\n\t\t\t\ttr = document.createElement( \"tr\" );\r\n\t\t\t\ttrChild = document.createElement( \"div\" );\r\n\r\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\r\n\t\t\t\ttr.style.cssText = \"box-sizing:content-box;border:1px solid\";\r\n\r\n\t\t\t\t// Support: Chrome 86+\r\n\t\t\t\t// Height set through cssText does not get applied.\r\n\t\t\t\t// Computed height then comes back as 0.\r\n\t\t\t\ttr.style.height = \"1px\";\r\n\t\t\t\ttrChild.style.height = \"9px\";\r\n\r\n\t\t\t\t// Support: Android 8 Chrome 86+\r\n\t\t\t\t// In our bodyBackground.html iframe,\r\n\t\t\t\t// display for all div elements is set to \"inline\",\r\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\r\n\t\t\t\t// Ensuring the div is `display: block`\r\n\t\t\t\t// gets around this issue.\r\n\t\t\t\ttrChild.style.display = \"block\";\r\n\r\n\t\t\t\tdocumentElement\r\n\t\t\t\t\t.appendChild( table )\r\n\t\t\t\t\t.appendChild( tr )\r\n\t\t\t\t\t.appendChild( trChild );\r\n\r\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\r\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\r\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\r\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\r\n\r\n\t\t\t\tdocumentElement.removeChild( table );\r\n\t\t\t}\r\n\t\t\treturn reliableTrDimensionsVal;\r\n\t\t}\r\n\t} );\r\n} )();\r\n\r\n\r\nfunction curCSS( elem, name, computed ) {\r\n\tvar width, minWidth, maxWidth, ret,\r\n\t\tisCustomProp = rcustomProp.test( name ),\r\n\r\n\t\t// Support: Firefox 51+\r\n\t\t// Retrieving style before computed somehow\r\n\t\t// fixes an issue with getting wrong values\r\n\t\t// on detached elements\r\n\t\tstyle = elem.style;\r\n\r\n\tcomputed = computed || getStyles( elem );\r\n\r\n\t// getPropertyValue is needed for:\r\n\t// .css('filter') (IE 9 only, trac-12537)\r\n\t// .css('--customProperty) (gh-3144)\r\n\tif ( computed ) {\r\n\r\n\t\t// Support: IE <=9 - 11+\r\n\t\t// IE only supports `\"float\"` in `getPropertyValue`; in computed styles\r\n\t\t// it's only available as `\"cssFloat\"`. We no longer modify properties\r\n\t\t// sent to `.css()` apart from camelCasing, so we need to check both.\r\n\t\t// Normally, this would create difference in behavior: if\r\n\t\t// `getPropertyValue` returns an empty string, the value returned\r\n\t\t// by `.css()` would be `undefined`. This is usually the case for\r\n\t\t// disconnected elements. However, in IE even disconnected elements\r\n\t\t// with no styles return `\"none\"` for `getPropertyValue( \"float\" )`\r\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\r\n\r\n\t\tif ( isCustomProp && ret ) {\r\n\r\n\t\t\t// Support: Firefox 105+, Chrome <=105+\r\n\t\t\t// Spec requires trimming whitespace for custom properties (gh-4926).\r\n\t\t\t// Firefox only trims leading whitespace. Chrome just collapses\r\n\t\t\t// both leading & trailing whitespace to a single space.\r\n\t\t\t//\r\n\t\t\t// Fall back to `undefined` if empty string returned.\r\n\t\t\t// This collapses a missing definition with property defined\r\n\t\t\t// and set to an empty string but there's no standard API\r\n\t\t\t// allowing us to differentiate them without a performance penalty\r\n\t\t\t// and returning `undefined` aligns with older jQuery.\r\n\t\t\t//\r\n\t\t\t// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED\r\n\t\t\t// as whitespace while CSS does not, but this is not a problem\r\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\r\n\t\t\t// (which *is* CSS whitespace)\r\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\r\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" ) || undefined;\r\n\t\t}\r\n\r\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\r\n\t\t\tret = jQuery.style( elem, name );\r\n\t\t}\r\n\r\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\r\n\t\t// Android Browser returns percentage for some values,\r\n\t\t// but width seems to be reliably pixels.\r\n\t\t// This is against the CSSOM draft spec:\r\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\r\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\r\n\r\n\t\t\t// Remember the original values\r\n\t\t\twidth = style.width;\r\n\t\t\tminWidth = style.minWidth;\r\n\t\t\tmaxWidth = style.maxWidth;\r\n\r\n\t\t\t// Put in the new values to get a computed value out\r\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\r\n\t\t\tret = computed.width;\r\n\r\n\t\t\t// Revert the changed values\r\n\t\t\tstyle.width = width;\r\n\t\t\tstyle.minWidth = minWidth;\r\n\t\t\tstyle.maxWidth = maxWidth;\r\n\t\t}\r\n\t}\r\n\r\n\treturn ret !== undefined ?\r\n\r\n\t\t// Support: IE <=9 - 11 only\r\n\t\t// IE returns zIndex value as an integer.\r\n\t\tret + \"\" :\r\n\t\tret;\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 cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\r\n\temptyStyle = document.createElement( \"div\" ).style,\r\n\tvendorProps = {};\r\n\r\n// Return a vendor-prefixed property or undefined\r\nfunction vendorPropName( name ) {\r\n\r\n\t// Check for vendor prefixed names\r\n\tvar capName = name[ 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\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\r\nfunction finalPropName( name ) {\r\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\r\n\r\n\tif ( final ) {\r\n\t\treturn final;\r\n\t}\r\n\tif ( name in emptyStyle ) {\r\n\t\treturn name;\r\n\t}\r\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\r\n}\r\n\r\n\r\nvar\r\n\r\n\t// Swappable if display is none or starts with table\r\n\t// except \"table\", \"table-cell\", or \"table-caption\"\r\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\r\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\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\nfunction setPositiveNumber( _elem, value, subtract ) {\r\n\r\n\t// Any relative (+/-) values have already been\r\n\t// normalized at this point\r\n\tvar matches = rcssNum.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[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\r\n\t\tvalue;\r\n}\r\n\r\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\r\n\tvar i = dimension === \"width\" ? 1 : 0,\r\n\t\textra = 0,\r\n\t\tdelta = 0,\r\n\t\tmarginDelta = 0;\r\n\r\n\t// Adjustment may not be necessary\r\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\tfor ( ; i < 4; i += 2 ) {\r\n\r\n\t\t// Both box models exclude margin\r\n\t\t// Count margin delta separately to only add it after scroll gutter adjustment.\r\n\t\t// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).\r\n\t\tif ( box === \"margin\" ) {\r\n\t\t\tmarginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\r\n\t\t}\r\n\r\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\r\n\t\tif ( !isBorderBox ) {\r\n\r\n\t\t\t// Add padding\r\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\r\n\r\n\t\t\t// For \"border\" or \"margin\", add border\r\n\t\t\tif ( box !== \"padding\" ) {\r\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\r\n\r\n\t\t\t// But still keep track of it otherwise\r\n\t\t\t} else {\r\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\r\n\t\t\t}\r\n\r\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\r\n\t\t// \"padding\" or \"margin\"\r\n\t\t} else {\r\n\r\n\t\t\t// For \"content\", subtract padding\r\n\t\t\tif ( box === \"content\" ) {\r\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\r\n\t\t\t}\r\n\r\n\t\t\t// For \"content\" or \"padding\", subtract border\r\n\t\t\tif ( box !== \"margin\" ) {\r\n\t\t\t\tdelta -= 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\t// Account for positive content-box scroll gutter when requested by providing computedVal\r\n\tif ( !isBorderBox && computedVal >= 0 ) {\r\n\r\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\r\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\r\n\t\tdelta += Math.max( 0, Math.ceil(\r\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\r\n\t\t\tcomputedVal -\r\n\t\t\tdelta -\r\n\t\t\textra -\r\n\t\t\t0.5\r\n\r\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\r\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\r\n\t\t) ) || 0;\r\n\t}\r\n\r\n\treturn delta + marginDelta;\r\n}\r\n\r\nfunction getWidthOrHeight( elem, dimension, extra ) {\r\n\r\n\t// Start with computed style\r\n\tvar styles = getStyles( elem ),\r\n\r\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\r\n\t\t// Fake content-box until we know it's needed to know the true value.\r\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\r\n\t\tisBorderBox = boxSizingNeeded &&\r\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\r\n\t\tvalueIsBorderBox = isBorderBox,\r\n\r\n\t\tval = curCSS( elem, dimension, styles ),\r\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\r\n\r\n\t// Support: Firefox <=54\r\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\r\n\tif ( rnumnonpx.test( val ) ) {\r\n\t\tif ( !extra ) {\r\n\t\t\treturn val;\r\n\t\t}\r\n\t\tval = \"auto\";\r\n\t}\r\n\r\n\r\n\t// Support: IE 9 - 11 only\r\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\r\n\t// In those cases, the computed value can be trusted to be border-box.\r\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\r\n\r\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\r\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\r\n\t\t// set in CSS while `offset*` properties report correct values.\r\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\r\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\r\n\r\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\r\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\r\n\t\tval === \"auto\" ||\r\n\r\n\t\t// Support: Android <=4.1 - 4.3 only\r\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\r\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\r\n\r\n\t\t// Make sure the element is visible & connected\r\n\t\telem.getClientRects().length ) {\r\n\r\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\r\n\r\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\r\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\r\n\t\t// retrieved value as a content box dimension.\r\n\t\tvalueIsBorderBox = offsetProp in elem;\r\n\t\tif ( valueIsBorderBox ) {\r\n\t\t\tval = elem[ offsetProp ];\r\n\t\t}\r\n\t}\r\n\r\n\t// Normalize \"\" and auto\r\n\tval = parseFloat( val ) || 0;\r\n\r\n\t// Adjust for the element's box model\r\n\treturn ( val +\r\n\t\tboxModelAdjustment(\r\n\t\t\telem,\r\n\t\t\tdimension,\r\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\r\n\t\t\tvalueIsBorderBox,\r\n\t\t\tstyles,\r\n\r\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\r\n\t\t\tval\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\tanimationIterationCount: true,\r\n\t\taspectRatio: true,\r\n\t\tborderImageSlice: true,\r\n\t\tcolumnCount: true,\r\n\t\tflexGrow: true,\r\n\t\tflexShrink: true,\r\n\t\tfontWeight: true,\r\n\t\tgridArea: true,\r\n\t\tgridColumn: true,\r\n\t\tgridColumnEnd: true,\r\n\t\tgridColumnStart: true,\r\n\t\tgridRow: true,\r\n\t\tgridRowEnd: true,\r\n\t\tgridRowStart: true,\r\n\t\tlineHeight: true,\r\n\t\topacity: true,\r\n\t\torder: true,\r\n\t\torphans: true,\r\n\t\tscale: true,\r\n\t\twidows: true,\r\n\t\tzIndex: true,\r\n\t\tzoom: true,\r\n\r\n\t\t// SVG-related\r\n\t\tfillOpacity: true,\r\n\t\tfloodOpacity: true,\r\n\t\tstopOpacity: true,\r\n\t\tstrokeMiterlimit: true,\r\n\t\tstrokeOpacity: 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// 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 = camelCase( name ),\r\n\t\t\tisCustomProp = rcustomProp.test( name ),\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\t// Make sure that we're working with the right name. We don't\r\n\t\t// want to query the value if it is a CSS custom property\r\n\t\t// since they are user-defined.\r\n\t\tif ( !isCustomProp ) {\r\n\t\t\tname = finalPropName( origName );\r\n\t\t}\r\n\r\n\t\t// Gets hook for the prefixed version, then 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 (trac-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 trac-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 (trac-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\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\r\n\t\t\t// \"px\" to a few hardcoded values.\r\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\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// background-* props affect original clone's values\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\tif ( isCustomProp ) {\r\n\t\t\t\t\tstyle.setProperty( name, value );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstyle[ name ] = value;\r\n\t\t\t\t}\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 val, num, hooks,\r\n\t\t\torigName = camelCase( name ),\r\n\t\t\tisCustomProp = rcustomProp.test( name );\r\n\r\n\t\t// Make sure that we're working with the right name. We don't\r\n\t\t// want to modify the value if it is a CSS custom property\r\n\t\t// since they are user-defined.\r\n\t\tif ( !isCustomProp ) {\r\n\t\t\tname = finalPropName( origName );\r\n\t\t}\r\n\r\n\t\t// Try prefixed name followed by the unprefixed name\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// Make numeric 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\r\n\t\treturn val;\r\n\t}\r\n} );\r\n\r\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\r\n\tjQuery.cssHooks[ dimension ] = {\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// but it must have a current display style that would benefit\r\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\r\n\r\n\t\t\t\t\t// Support: Safari 8+\r\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\r\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\r\n\t\t\t\t\t// Support: IE <=11 only\r\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\r\n\t\t\t\t\t// in IE throws an error.\r\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\r\n\t\t\t\t\tswap( elem, cssShow, function() {\r\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\r\n\t\t\t\t\t} ) :\r\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, 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 matches,\r\n\t\t\t\tstyles = getStyles( elem ),\r\n\r\n\t\t\t\t// Only read styles.position if the test has a chance to fail\r\n\t\t\t\t// to avoid forcing a reflow.\r\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\r\n\t\t\t\t\tstyles.position === \"absolute\",\r\n\r\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\r\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\r\n\t\t\t\tisBorderBox = boxSizingNeeded &&\r\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\r\n\t\t\t\tsubtract = extra ?\r\n\t\t\t\t\tboxModelAdjustment(\r\n\t\t\t\t\t\telem,\r\n\t\t\t\t\t\tdimension,\r\n\t\t\t\t\t\textra,\r\n\t\t\t\t\t\tisBorderBox,\r\n\t\t\t\t\t\tstyles\r\n\t\t\t\t\t) :\r\n\t\t\t\t\t0;\r\n\r\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\r\n\t\t\t// faking a content-box to get border and padding (gh-3699)\r\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\r\n\t\t\t\tsubtract -= Math.ceil(\r\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\r\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\r\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\r\n\t\t\t\t\t0.5\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\t// Convert to pixels if value adjustment is needed\r\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\r\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\r\n\r\n\t\t\t\telem.style[ dimension ] = value;\r\n\t\t\t\tvalue = jQuery.css( elem, dimension );\r\n\t\t\t}\r\n\r\n\t\t\treturn setPositiveNumber( elem, value, subtract );\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 ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\r\n\t\t\t\telem.getBoundingClientRect().left -\r\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\r\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\r\n\t\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 ( prefix !== \"margin\" ) {\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 ( Array.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} );\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// 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.\r\n\t\t\t// Use cssHook if its there.\r\n\t\t\t// Use .style if 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\tjQuery.cssHooks[ tween.prop ] ||\r\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\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 only\r\n// Panic based approach to setting things on disconnected nodes\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, inProgress,\r\n\trfxtypes = /^(?:toggle|show|hide)$/,\r\n\trrun = /queueHooks$/;\r\n\r\nfunction schedule() {\r\n\tif ( inProgress ) {\r\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\r\n\t\t\twindow.requestAnimationFrame( schedule );\r\n\t\t} else {\r\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\r\n\t\t}\r\n\r\n\t\tjQuery.fx.tick();\r\n\t}\r\n}\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 = Date.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\ti = 0,\r\n\t\tattrs = { height: type };\r\n\r\n\t// If we include width, step value is 1 to do all cssExpand values,\r\n\t// otherwise 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\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\r\n\t\tisBox = \"width\" in props || \"height\" in props,\r\n\t\tanim = this,\r\n\t\torig = {},\r\n\t\tstyle = elem.style,\r\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\r\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\r\n\r\n\t// Queue-skipping animations hijack the fx hooks\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// Ensure the complete handler is called 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// Detect show/hide animations\r\n\tfor ( prop in props ) {\r\n\t\tvalue = props[ prop ];\r\n\t\tif ( rfxtypes.test( 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// Pretend to be hidden if this is a \"show\" and\r\n\t\t\t\t// there is still data from a stopped show/hide\r\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\r\n\t\t\t\t\thidden = true;\r\n\r\n\t\t\t\t// Ignore all other no-op show/hide data\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\t\t}\r\n\t}\r\n\r\n\t// Bail out if this is a no-op like .hide().hide()\r\n\tpropTween = !jQuery.isEmptyObject( props );\r\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Restrict \"overflow\" and \"display\" styles during box animations\r\n\tif ( isBox && elem.nodeType === 1 ) {\r\n\r\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\r\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\r\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\r\n\t\t// the overflowX value there.\r\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\r\n\r\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\r\n\t\trestoreDisplay = dataShow && dataShow.display;\r\n\t\tif ( restoreDisplay == null ) {\r\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\r\n\t\t}\r\n\t\tdisplay = jQuery.css( elem, \"display\" );\r\n\t\tif ( display === \"none\" ) {\r\n\t\t\tif ( restoreDisplay ) {\r\n\t\t\t\tdisplay = restoreDisplay;\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\r\n\t\t\t\tshowHide( [ elem ], true );\r\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\r\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\r\n\t\t\t\tshowHide( [ elem ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Animate inline elements as inline-block\r\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\r\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\r\n\r\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\r\n\t\t\t\tif ( !propTween ) {\r\n\t\t\t\t\tanim.done( function() {\r\n\t\t\t\t\t\tstyle.display = restoreDisplay;\r\n\t\t\t\t\t} );\r\n\t\t\t\t\tif ( restoreDisplay == null ) {\r\n\t\t\t\t\t\tdisplay = style.display;\r\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tstyle.display = \"inline-block\";\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\tanim.always( function() {\r\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\r\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\r\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\r\n\t\t} );\r\n\t}\r\n\r\n\t// Implement show/hide animations\r\n\tpropTween = false;\r\n\tfor ( prop in orig ) {\r\n\r\n\t\t// General show/hide setup for this element animation\r\n\t\tif ( !propTween ) {\r\n\t\t\tif ( dataShow ) {\r\n\t\t\t\tif ( \"hidden\" in dataShow ) {\r\n\t\t\t\t\thidden = dataShow.hidden;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\r\n\t\t\t}\r\n\r\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\r\n\t\t\tif ( toggle ) {\r\n\t\t\t\tdataShow.hidden = !hidden;\r\n\t\t\t}\r\n\r\n\t\t\t// Show elements before animating them\r\n\t\t\tif ( hidden ) {\r\n\t\t\t\tshowHide( [ elem ], true );\r\n\t\t\t}\r\n\r\n\t\t\t/* eslint-disable no-loop-func */\r\n\r\n\t\t\tanim.done( function() {\r\n\r\n\t\t\t\t/* eslint-enable no-loop-func */\r\n\r\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\r\n\t\t\t\tif ( !hidden ) {\r\n\t\t\t\t\tshowHide( [ elem ] );\r\n\t\t\t\t}\r\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\r\n\t\t\t\tfor ( prop in orig ) {\r\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\t// Per-property setup\r\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\r\n\t\tif ( !( prop in dataShow ) ) {\r\n\t\t\tdataShow[ prop ] = propTween.start;\r\n\t\t\tif ( hidden ) {\r\n\t\t\t\tpropTween.end = propTween.start;\r\n\t\t\t\tpropTween.start = 0;\r\n\t\t\t}\r\n\t\t}\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 = camelCase( index );\r\n\t\teasing = specialEasing[ name ];\r\n\t\tvalue = props[ index ];\r\n\t\tif ( Array.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 won't overwrite existing keys.\r\n\t\t\t// Reusing 'index' 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 only\r\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-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\t// If there's more to do, yield\r\n\t\t\tif ( percent < 1 && length ) {\r\n\t\t\t\treturn remaining;\r\n\t\t\t}\r\n\r\n\t\t\t// If this was an empty animation, synthesize a final progress notification\r\n\t\t\tif ( !length ) {\r\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\r\n\t\t\t}\r\n\r\n\t\t\t// Resolve the animation and report its conclusion\r\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\r\n\t\t\treturn false;\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\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; 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 ( isFunction( result.stop ) ) {\r\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\r\n\t\t\t\t\tresult.stop.bind( 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 ( isFunction( animation.opts.start ) ) {\r\n\t\tanimation.opts.start.call( elem, animation );\r\n\t}\r\n\r\n\t// Attach callbacks from options\r\n\tanimation\r\n\t\t.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\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\treturn animation;\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 ( 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( rnothtmlwhite );\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\tisFunction( speed ) && speed,\r\n\t\tduration: speed,\r\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\r\n\t};\r\n\r\n\t// Go to the end state if fx are off\r\n\tif ( jQuery.fx.off ) {\r\n\t\topt.duration = 0;\r\n\r\n\t} else {\r\n\t\tif ( typeof opt.duration !== \"number\" ) {\r\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\r\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\r\n\r\n\t\t\t} else {\r\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\r\n\t\t\t}\r\n\t\t}\r\n\t}\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 ( 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( isHiddenWithinTree ).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 || dataPriv.get( this, \"finish\" ) ) {\r\n\t\t\t\t\tanim.stop( true );\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\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 ) {\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 = dataPriv.get( 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\r\n\t\t\t// will dequeue 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 = dataPriv.get( 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\ti = 0,\r\n\t\ttimers = jQuery.timers;\r\n\r\n\tfxNow = Date.now();\r\n\r\n\tfor ( ; i < timers.length; i++ ) {\r\n\t\ttimer = timers[ i ];\r\n\r\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\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\tjQuery.fx.start();\r\n};\r\n\r\njQuery.fx.interval = 13;\r\njQuery.fx.start = function() {\r\n\tif ( inProgress ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tinProgress = true;\r\n\tschedule();\r\n};\r\n\r\njQuery.fx.stop = function() {\r\n\tinProgress = 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\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 input = document.createElement( \"input\" ),\r\n\t\tselect = document.createElement( \"select\" ),\r\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\r\n\r\n\tinput.type = \"checkbox\";\r\n\r\n\t// Support: Android <=4.3 only\r\n\t// Default value for a checkbox should be \"on\"\r\n\tsupport.checkOn = input.value !== \"\";\r\n\r\n\t// Support: IE <=11 only\r\n\t// Must access selectedIndex to make default options select\r\n\tsupport.optSelected = opt.selected;\r\n\r\n\t// Support: IE <=11 only\r\n\t// An input loses its value after becoming a radio\r\n\tinput = document.createElement( \"input\" );\r\n\tinput.value = \"t\";\r\n\tinput.type = \"radio\";\r\n\tsupport.radioValue = input.value === \"t\";\r\n} )();\r\n\r\n\r\nvar boolHook,\r\n\tattrHandle = jQuery.expr.attrHandle;\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// Attribute hooks are determined by the lowercase version\r\n\t\t// Grab necessary hook if one is defined\r\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\r\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\r\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\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\tnodeName( elem, \"input\" ) ) {\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,\r\n\t\t\ti = 0,\r\n\r\n\t\t\t// Attribute names can contain non-HTML whitespace characters\r\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\r\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\r\n\r\n\t\tif ( attrNames && elem.nodeType === 1 ) {\r\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\r\n\t\t\t\telem.removeAttribute( name );\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 {\r\n\t\t\telem.setAttribute( name, name );\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\tattrHandle[ name ] = function( elem, name, isXML ) {\r\n\t\tvar ret, handle,\r\n\t\t\tlowercaseName = name.toLowerCase();\r\n\r\n\t\tif ( !isXML ) {\r\n\r\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\r\n\t\t\thandle = attrHandle[ lowercaseName ];\r\n\t\t\tattrHandle[ lowercaseName ] = ret;\r\n\t\t\tret = getter( elem, name, isXML ) != null ?\r\n\t\t\t\tlowercaseName :\r\n\t\t\t\tnull;\r\n\t\t\tattrHandle[ lowercaseName ] = handle;\r\n\t\t}\r\n\t\treturn ret;\r\n\t};\r\n} );\r\n\r\n\r\n\r\n\r\nvar rfocusable = /^(?:input|select|textarea|button)$/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\treturn this.each( function() {\r\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\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// Support: IE <=9 - 11 only\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// Use proper attribute retrieval (trac-12072)\r\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\r\n\r\n\t\t\t\tif ( tabindex ) {\r\n\t\t\t\t\treturn parseInt( tabindex, 10 );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (\r\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\r\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\r\n\t\t\t\t\telem.href\r\n\t\t\t\t) {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn -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// Support: IE <=11 only\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\n// eslint rule \"no-unused-expressions\" is disabled for this code\r\n// since it considers such accessions noop\r\nif ( !support.optSelected ) {\r\n\tjQuery.propHooks.selected = {\r\n\t\tget: function( elem ) {\r\n\r\n\t\t\t/* eslint no-unused-expressions: \"off\" */\r\n\r\n\t\t\tvar parent = elem.parentNode;\r\n\t\t\tif ( parent && parent.parentNode ) {\r\n\t\t\t\tparent.parentNode.selectedIndex;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tset: function( elem ) {\r\n\r\n\t\t\t/* eslint no-unused-expressions: \"off\" */\r\n\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\r\n\r\n\r\n\t// Strip and collapse whitespace according to HTML spec\r\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\r\n\tfunction stripAndCollapse( value ) {\r\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\r\n\t\treturn tokens.join( \" \" );\r\n\t}\r\n\r\n\r\nfunction getClass( elem ) {\r\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\r\n}\r\n\r\nfunction classesToArray( value ) {\r\n\tif ( Array.isArray( value ) ) {\r\n\t\treturn value;\r\n\t}\r\n\tif ( typeof value === \"string\" ) {\r\n\t\treturn value.match( rnothtmlwhite ) || [];\r\n\t}\r\n\treturn [];\r\n}\r\n\r\njQuery.fn.extend( {\r\n\taddClass: function( value ) {\r\n\t\tvar classNames, cur, curValue, className, i, finalValue;\r\n\r\n\t\tif ( 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\tclassNames = classesToArray( value );\r\n\r\n\t\tif ( classNames.length ) {\r\n\t\t\treturn this.each( function() {\r\n\t\t\t\tcurValue = getClass( this );\r\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\r\n\r\n\t\t\t\tif ( cur ) {\r\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\r\n\t\t\t\t\t\tclassName = classNames[ i ];\r\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\r\n\t\t\t\t\t\t\tcur += className + \" \";\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 = stripAndCollapse( cur );\r\n\t\t\t\t\tif ( curValue !== finalValue ) {\r\n\t\t\t\t\t\tthis.setAttribute( \"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 classNames, cur, curValue, className, i, finalValue;\r\n\r\n\t\tif ( 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\tclassNames = classesToArray( value );\r\n\r\n\t\tif ( classNames.length ) {\r\n\t\t\treturn this.each( function() {\r\n\t\t\t\tcurValue = getClass( this );\r\n\r\n\t\t\t\t// This expression is here for better compressibility (see addClass)\r\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\r\n\r\n\t\t\t\tif ( cur ) {\r\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\r\n\t\t\t\t\t\tclassName = classNames[ i ];\r\n\r\n\t\t\t\t\t\t// Remove *all* instances\r\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\r\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\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 = stripAndCollapse( cur );\r\n\t\t\t\t\tif ( curValue !== finalValue ) {\r\n\t\t\t\t\t\tthis.setAttribute( \"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 classNames, className, i, self,\r\n\t\t\ttype = typeof value,\r\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\r\n\r\n\t\tif ( 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\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\r\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\r\n\t\t}\r\n\r\n\t\tclassNames = classesToArray( value );\r\n\r\n\t\treturn this.each( function() {\r\n\t\t\tif ( isValidValue ) {\r\n\r\n\t\t\t\t// Toggle individual class names\r\n\t\t\t\tself = jQuery( this );\r\n\r\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\r\n\t\t\t\t\tclassName = 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\tdataPriv.set( 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\tif ( this.setAttribute ) {\r\n\t\t\t\t\tthis.setAttribute( \"class\",\r\n\t\t\t\t\t\tclassName || value === false ?\r\n\t\t\t\t\t\t\t\"\" :\r\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\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\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( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\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\nvar rreturn = /\\r/g;\r\n\r\njQuery.fn.extend( {\r\n\tval: function( value ) {\r\n\t\tvar hooks, ret, valueIsFunction,\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 ( hooks &&\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\t// Handle most common string cases\r\n\t\t\t\tif ( typeof ret === \"string\" ) {\r\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Handle cases where value is null/undef or number\r\n\t\t\t\treturn ret == null ? \"\" : ret;\r\n\t\t\t}\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvalueIsFunction = 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 ( valueIsFunction ) {\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\r\n\t\t\t} else if ( typeof val === \"number\" ) {\r\n\t\t\t\tval += \"\";\r\n\r\n\t\t\t} else if ( Array.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\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: IE <=10 - 11 only\r\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-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\tstripAndCollapse( jQuery.text( elem ) );\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, i,\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\",\r\n\t\t\t\t\tvalues = one ? null : [],\r\n\t\t\t\t\tmax = one ? index + 1 : options.length;\r\n\r\n\t\t\t\tif ( index < 0 ) {\r\n\t\t\t\t\ti = max;\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\ti = one ? index : 0;\r\n\t\t\t\t}\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// Support: IE <=9 only\r\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-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!option.disabled &&\r\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\r\n\t\t\t\t\t\t\t\t!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\t/* eslint-disable no-cond-assign */\r\n\r\n\t\t\t\t\tif ( option.selected =\r\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\toptionSet = true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* eslint-enable no-cond-assign */\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\t\t\t\treturn values;\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 ( Array.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\n// Return jQuery for attributes-only inclusion\r\nvar location = window.location;\r\n\r\nvar nonce = { guid: Date.now() };\r\n\r\nvar rquery = ( /\\?/ );\r\n\r\n\r\n\r\n// Cross-browser xml parsing\r\njQuery.parseXML = function( data ) {\r\n\tvar xml, parserErrorElem;\r\n\tif ( !data || typeof data !== \"string\" ) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\t// Support: IE 9 - 11 only\r\n\t// IE throws on parseFromString with invalid input.\r\n\ttry {\r\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\r\n\t} catch ( e ) {}\r\n\r\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\r\n\tif ( !xml || parserErrorElem ) {\r\n\t\tjQuery.error( \"Invalid XML: \" + (\r\n\t\t\tparserErrorElem ?\r\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\r\n\t\t\t\t\treturn el.textContent;\r\n\t\t\t\t} ).join( \"\\n\" ) :\r\n\t\t\t\tdata\r\n\t\t) );\r\n\t}\r\n\treturn xml;\r\n};\r\n\r\n\r\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\r\n\tstopPropagationCallback = function( e ) {\r\n\t\te.stopPropagation();\r\n\t};\r\n\r\njQuery.extend( jQuery.event, {\r\n\r\n\ttrigger: function( event, data, elem, onlyHandlers ) {\r\n\r\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\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 = lastElement = 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 (trac-9951)\r\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\r\n\t\tif ( !onlyHandlers && !special.noBubble && !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\t\t\tlastElement = cur;\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 = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\r\n\t\t\t\tdataPriv.get( cur, \"handle\" );\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 ( ( !special._default ||\r\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\r\n\t\t\t\tacceptData( elem ) ) {\r\n\r\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\r\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\r\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !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\r\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\r\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telem[ type ]();\r\n\r\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\r\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\r\n\t\t\t\t\t}\r\n\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\t// Piggyback on a donor event to simulate a different one\r\n\t// Used only for `focus(in | out)` events\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\t\t\t}\r\n\t\t);\r\n\r\n\t\tjQuery.event.trigger( e, null, elem );\r\n\t}\r\n\r\n} );\r\n\r\njQuery.fn.extend( {\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\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 ( Array.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 && toType( 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, valueOrFunction ) {\r\n\r\n\t\t\t// If value is a function, invoke it and use its return value\r\n\t\t\tvar value = isFunction( valueOrFunction ) ?\r\n\t\t\t\tvalueOrFunction() :\r\n\t\t\t\tvalueOrFunction;\r\n\r\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\r\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\r\n\t\t};\r\n\r\n\tif ( a == null ) {\r\n\t\treturn \"\";\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 ( Array.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( \"&\" );\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} ).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} ).map( function( _i, elem ) {\r\n\t\t\tvar val = jQuery( this ).val();\r\n\r\n\t\t\tif ( val == null ) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tif ( Array.isArray( val ) ) {\r\n\t\t\t\treturn jQuery.map( val, function( val ) {\r\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\r\n\t\t\t\t} );\r\n\t\t\t}\r\n\r\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\r\n\t\t} ).get();\r\n\t}\r\n} );\r\n\r\n\r\nvar\r\n\tr20 = /%20/g,\r\n\trhash = /#.*$/,\r\n\trantiCache = /([?&])_=[^&]*/,\r\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\r\n\r\n\t// trac-7653, trac-8125, trac-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\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 (trac-10098); must appease lint and evade compression\r\n\tallTypes = \"*/\".concat( \"*\" ),\r\n\r\n\t// Anchor tag for parsing the document origin\r\n\toriginAnchor = document.createElement( \"a\" );\r\n\r\noriginAnchor.href = location.href;\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( rnothtmlwhite ) || [];\r\n\r\n\t\tif ( 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[ 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 trac-9887\r\nfunction ajaxExtend( target, src ) {\r\n\tvar key, deep,\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\r\n\tvar ct, type, finalDataType, firstDataType,\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 ) {\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: location.href,\r\n\t\ttype: \"GET\",\r\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\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\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\": JSON.parse,\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 transport,\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\r\n\t\t\tresponseHeadersString,\r\n\t\t\tresponseHeaders,\r\n\r\n\t\t\t// timeout handle\r\n\t\t\ttimeoutTimer,\r\n\r\n\t\t\t// Url cleanup var\r\n\t\t\turlAnchor,\r\n\r\n\t\t\t// Request state (becomes false upon send and true upon completion)\r\n\t\t\tcompleted,\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\t// Loop variable\r\n\t\t\ti,\r\n\r\n\t\t\t// uncached part of the url\r\n\t\t\tuncached,\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\tjQuery( callbackContext ) :\r\n\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// 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 ( completed ) {\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() + \" \" ] =\r\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\r\n\t\t\t\t\t\t\t\t\t\t.concat( 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.join( \", \" );\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 completed ? 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\tif ( completed == null ) {\r\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\r\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || 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 ( completed == null ) {\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 ( completed ) {\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} else {\r\n\r\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\r\n\t\t\t\t\t\t\tfor ( code in map ) {\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}\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 );\r\n\r\n\t\t// Add protocol if not provided (prefilters might expect it)\r\n\t\t// Handle falsy url in the settings object (trac-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 || location.href ) + \"\" )\r\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\r\n\r\n\t\t// Alias method option to type as per ticket trac-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 = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\r\n\r\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\r\n\t\tif ( s.crossDomain == null ) {\r\n\t\t\turlAnchor = document.createElement( \"a\" );\r\n\r\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\r\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\r\n\t\t\t// e.g. http://example.com:80x/\r\n\t\t\ttry {\r\n\t\t\t\turlAnchor.href = s.url;\r\n\r\n\t\t\t\t// Support: IE <=8 - 11 only\r\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\r\n\t\t\t\turlAnchor.href = urlAnchor.href;\r\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\r\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\r\n\t\t\t} catch ( e ) {\r\n\r\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\r\n\t\t\t\t// it can be rejected by the transport if it is invalid\r\n\t\t\t\ts.crossDomain = true;\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 ( completed ) {\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 (trac-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\t// Remove hash to simplify url manipulation\r\n\t\tcacheURL = s.url.replace( rhash, \"\" );\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// Remember the hash so we can put it back\r\n\t\t\tuncached = s.url.slice( cacheURL.length );\r\n\r\n\t\t\t// If data is available and should be processed, append data to url\r\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\r\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\r\n\r\n\t\t\t\t// trac-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 or update anti-cache param if needed\r\n\t\t\tif ( s.cache === false ) {\r\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\r\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\r\n\t\t\t\t\tuncached;\r\n\t\t\t}\r\n\r\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\r\n\t\t\ts.url = cacheURL + uncached;\r\n\r\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\r\n\t\t} else if ( s.data && s.processData &&\r\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\r\n\t\t\ts.data = s.data.replace( r20, \"+\" );\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 || completed ) ) {\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\tcompleteDeferred.add( s.complete );\r\n\t\tjqXHR.done( s.success );\r\n\t\tjqXHR.fail( s.error );\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 ( completed ) {\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\tcompleted = false;\r\n\t\t\t\ttransport.send( requestHeaders, done );\r\n\t\t\t} catch ( e ) {\r\n\r\n\t\t\t\t// Rethrow post-completion exceptions\r\n\t\t\t\tif ( completed ) {\r\n\t\t\t\t\tthrow e;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Propagate others as results\r\n\t\t\t\tdone( -1, e );\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// Ignore repeat invocations\r\n\t\t\tif ( completed ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tcompleted = true;\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// Use a noop converter for missing script but not if jsonp\r\n\t\t\tif ( !isSuccess &&\r\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\r\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\r\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\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// Extract error from statusText and normalize 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 ( 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\njQuery.ajaxPrefilter( function( s ) {\r\n\tvar i;\r\n\tfor ( i in s.headers ) {\r\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\r\n\t\t\ts.contentType = s.headers[ i ] || \"\";\r\n\t\t}\r\n\t}\r\n} );\r\n\r\n\r\njQuery._evalUrl = function( url, options, doc ) {\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 (trac-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\r\n\t\t// Only evaluate the response if it is successful (gh-4126)\r\n\t\t// dataFilter is not invoked for failure responses, so using it instead\r\n\t\t// of the default converter is kludgy but it works.\r\n\t\tconverters: {\r\n\t\t\t\"text script\": function() {}\r\n\t\t},\r\n\t\tdataFilter: function( response ) {\r\n\t\t\tjQuery.globalEval( response, options, doc );\r\n\t\t}\r\n\t} );\r\n};\r\n\r\n\r\njQuery.fn.extend( {\r\n\twrapAll: function( html ) {\r\n\t\tvar wrap;\r\n\r\n\t\tif ( this[ 0 ] ) {\r\n\t\t\tif ( isFunction( html ) ) {\r\n\t\t\t\thtml = html.call( this[ 0 ] );\r\n\t\t\t}\r\n\r\n\t\t\t// The elements to wrap the target around\r\n\t\t\twrap = 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.firstElementChild ) {\r\n\t\t\t\t\telem = elem.firstElementChild;\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 ( 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 htmlIsFunction = isFunction( html );\r\n\r\n\t\treturn this.each( function( i ) {\r\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\r\n\t\t} );\r\n\t},\r\n\r\n\tunwrap: function( selector ) {\r\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\r\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\r\n\t\t} );\r\n\t\treturn this;\r\n\t}\r\n} );\r\n\r\n\r\njQuery.expr.pseudos.hidden = function( elem ) {\r\n\treturn !jQuery.expr.pseudos.visible( elem );\r\n};\r\njQuery.expr.pseudos.visible = function( elem ) {\r\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\r\n};\r\n\r\n\r\n\r\n\r\njQuery.ajaxSettings.xhr = function() {\r\n\ttry {\r\n\t\treturn new window.XMLHttpRequest();\r\n\t} catch ( e ) {}\r\n};\r\n\r\nvar xhrSuccessStatus = {\r\n\r\n\t\t// File protocol always yields status code 0, assume 200\r\n\t\t0: 200,\r\n\r\n\t\t// Support: IE <=9 only\r\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\r\n\t\t1223: 204\r\n\t},\r\n\txhrSupported = jQuery.ajaxSettings.xhr();\r\n\r\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\r\nsupport.ajax = xhrSupported = !!xhrSupported;\r\n\r\njQuery.ajaxTransport( function( options ) {\r\n\tvar callback, errorCallback;\r\n\r\n\t// Cross domain only allowed if supported through XMLHttpRequest\r\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\r\n\t\treturn {\r\n\t\t\tsend: function( headers, complete ) {\r\n\t\t\t\tvar i,\r\n\t\t\t\t\txhr = options.xhr();\r\n\r\n\t\t\t\txhr.open(\r\n\t\t\t\t\toptions.type,\r\n\t\t\t\t\toptions.url,\r\n\t\t\t\t\toptions.async,\r\n\t\t\t\t\toptions.username,\r\n\t\t\t\t\toptions.password\r\n\t\t\t\t);\r\n\r\n\t\t\t\t// Apply custom fields if provided\r\n\t\t\t\tif ( options.xhrFields ) {\r\n\t\t\t\t\tfor ( i in options.xhrFields ) {\r\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Override mime type if needed\r\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\r\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// X-Requested-With header\r\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\r\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\r\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\r\n\t\t\t\t// For same-domain requests, won't change header if already provided.\r\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\r\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Set headers\r\n\t\t\t\tfor ( i in headers ) {\r\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Callback\r\n\t\t\t\tcallback = function( type ) {\r\n\t\t\t\t\treturn function() {\r\n\t\t\t\t\t\tif ( callback ) {\r\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\r\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\r\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\r\n\r\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\r\n\t\t\t\t\t\t\t\txhr.abort();\r\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\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// On a manual native abort, IE9 throws\r\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\r\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\r\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tcomplete(\r\n\r\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\r\n\t\t\t\t\t\t\t\t\t\txhr.status,\r\n\t\t\t\t\t\t\t\t\t\txhr.statusText\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} else {\r\n\t\t\t\t\t\t\t\tcomplete(\r\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\r\n\t\t\t\t\t\t\t\t\txhr.statusText,\r\n\r\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\r\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\r\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\r\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\" ||\r\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\r\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\r\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\r\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\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};\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// Listen to events\r\n\t\t\t\txhr.onload = callback();\r\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\r\n\r\n\t\t\t\t// Support: IE 9 only\r\n\t\t\t\t// Use onreadystatechange to replace onabort\r\n\t\t\t\t// to handle uncaught aborts\r\n\t\t\t\tif ( xhr.onabort !== undefined ) {\r\n\t\t\t\t\txhr.onabort = errorCallback;\r\n\t\t\t\t} else {\r\n\t\t\t\t\txhr.onreadystatechange = function() {\r\n\r\n\t\t\t\t\t\t// Check readyState before timeout as it changes\r\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\r\n\r\n\t\t\t\t\t\t\t// Allow onerror to be called first,\r\n\t\t\t\t\t\t\t// but that will not handle a native abort\r\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\r\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\r\n\t\t\t\t\t\t\twindow.setTimeout( function() {\r\n\t\t\t\t\t\t\t\tif ( callback ) {\r\n\t\t\t\t\t\t\t\t\terrorCallback();\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};\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Create the abort callback\r\n\t\t\t\tcallback = callback( \"abort\" );\r\n\r\n\t\t\t\ttry {\r\n\r\n\t\t\t\t\t// Do send the request (this may raise an exception)\r\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\r\n\t\t\t\t} catch ( e ) {\r\n\r\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\r\n\t\t\t\t\tif ( callback ) {\r\n\t\t\t\t\t\tthrow e;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tabort: function() {\r\n\t\t\t\tif ( callback ) {\r\n\t\t\t\t\tcallback();\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\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\r\njQuery.ajaxPrefilter( function( s ) {\r\n\tif ( s.crossDomain ) {\r\n\t\ts.contents.script = false;\r\n\t}\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 crossDomain\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}\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 or forced-by-attrs requests\r\n\tif ( s.crossDomain || s.scriptAttrs ) {\r\n\t\tvar script, callback;\r\n\t\treturn {\r\n\t\t\tsend: function( _, complete ) {\r\n\t\t\t\tscript = jQuery( \"<script>\" )\r\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\r\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\r\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\r\n\t\t\t\t\t\tscript.remove();\r\n\t\t\t\t\t\tcallback = null;\r\n\t\t\t\t\t\tif ( evt ) {\r\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} );\r\n\r\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\r\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\r\n\t\t\t},\r\n\t\t\tabort: function() {\r\n\t\t\t\tif ( callback ) {\r\n\t\t\t\t\tcallback();\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.guid++ ) );\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 = 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 && 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// Support: Safari 8 only\r\n// In Safari 8 documents created via document.implementation.createHTMLDocument\r\n// collapse sibling forms: the second one becomes a child of the first one.\r\n// Because of that, this security measure has to be disabled in Safari 8.\r\n// https://bugs.webkit.org/show_bug.cgi?id=137337\r\nsupport.createHTMLDocument = ( function() {\r\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\r\n\tbody.innerHTML = \"<form></form><form></form>\";\r\n\treturn body.childNodes.length === 2;\r\n} )();\r\n\r\n\r\n// Argument \"data\" should be 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 ( typeof data !== \"string\" ) {\r\n\t\treturn [];\r\n\t}\r\n\tif ( typeof context === \"boolean\" ) {\r\n\t\tkeepScripts = context;\r\n\t\tcontext = false;\r\n\t}\r\n\r\n\tvar base, parsed, scripts;\r\n\r\n\tif ( !context ) {\r\n\r\n\t\t// Stop scripts or inline event handlers from being executed immediately\r\n\t\t// by using document.implementation\r\n\t\tif ( support.createHTMLDocument ) {\r\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\r\n\r\n\t\t\t// Set the base href for the created document\r\n\t\t\t// so any parsed elements with URLs\r\n\t\t\t// are based on the document's URL (gh-2965)\r\n\t\t\tbase = context.createElement( \"base\" );\r\n\t\t\tbase.href = document.location.href;\r\n\t\t\tcontext.head.appendChild( base );\r\n\t\t} else {\r\n\t\t\tcontext = document;\r\n\t\t}\r\n\t}\r\n\r\n\tparsed = rsingleTag.exec( data );\r\n\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/**\r\n * Load a url into a page\r\n */\r\njQuery.fn.load = function( url, params, callback ) {\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 = stripAndCollapse( url.slice( off ) );\r\n\t\turl = url.slice( 0, off );\r\n\t}\r\n\r\n\t// If it's a function\r\n\tif ( 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\njQuery.expr.pseudos.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\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\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\r\n\r\n\t\t// Need to be able to calculate position if either\r\n\t\t// top or left 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\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 ( 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\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\r\n\t// offset() relates an element's border box to the document origin\r\n\toffset: function( options ) {\r\n\r\n\t\t// Preserve chaining for setter\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 rect, win,\r\n\t\t\telem = this[ 0 ];\r\n\r\n\t\tif ( !elem ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\r\n\t\t// Support: IE <=11 only\r\n\t\t// Running getBoundingClientRect on a\r\n\t\t// disconnected node in IE throws an error\r\n\t\tif ( !elem.getClientRects().length ) {\r\n\t\t\treturn { top: 0, left: 0 };\r\n\t\t}\r\n\r\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\r\n\t\trect = elem.getBoundingClientRect();\r\n\t\twin = elem.ownerDocument.defaultView;\r\n\t\treturn {\r\n\t\t\ttop: rect.top + win.pageYOffset,\r\n\t\t\tleft: rect.left + win.pageXOffset\r\n\t\t};\r\n\t},\r\n\r\n\t// position() relates an element's margin box to its offset parent's padding box\r\n\t// This corresponds to the behavior of CSS absolute positioning\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, doc,\r\n\t\t\telem = this[ 0 ],\r\n\t\t\tparentOffset = { top: 0, left: 0 };\r\n\r\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\r\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\r\n\r\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\r\n\t\t\toffset = elem.getBoundingClientRect();\r\n\r\n\t\t} else {\r\n\t\t\toffset = this.offset();\r\n\r\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\r\n\t\t\t// when a statically positioned element is identified\r\n\t\t\tdoc = elem.ownerDocument;\r\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\r\n\t\t\twhile ( offsetParent &&\r\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\r\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\r\n\r\n\t\t\t\toffsetParent = offsetParent.parentNode;\r\n\t\t\t}\r\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\r\n\r\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\r\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\r\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\r\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Subtract parent offsets and element margins\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\t// This method will return documentElement in the following cases:\r\n\t// 1) For the element inside the iframe without offsetParent, this method will return\r\n\t// documentElement of the parent window\r\n\t// 2) For the hidden or detached element\r\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\r\n\t//\r\n\t// but those exceptions were never presented as a real life use-cases\r\n\t// and might be considered as more preferable results.\r\n\t//\r\n\t// This logic, however, is not guaranteed and can change at any point in the future\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.css( offsetParent, \"position\" ) === \"static\" ) {\r\n\t\t\t\toffsetParent = offsetParent.offsetParent;\r\n\t\t\t}\r\n\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 = \"pageYOffset\" === prop;\r\n\r\n\tjQuery.fn[ method ] = function( val ) {\r\n\t\treturn access( this, function( elem, method, val ) {\r\n\r\n\t\t\t// Coalesce documents and windows\r\n\t\t\tvar win;\r\n\t\t\tif ( isWindow( elem ) ) {\r\n\t\t\t\twin = elem;\r\n\t\t\t} else if ( elem.nodeType === 9 ) {\r\n\t\t\t\twin = elem.defaultView;\r\n\t\t\t}\r\n\r\n\t\t\tif ( val === undefined ) {\r\n\t\t\t\treturn win ? win[ prop ] : elem[ 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 : win.pageXOffset,\r\n\t\t\t\t\ttop ? val : win.pageYOffset\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 );\r\n\t};\r\n} );\r\n\r\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\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// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\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, 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( {\r\n\t\tpadding: \"inner\" + name,\r\n\t\tcontent: type,\r\n\t\t\"\": \"outer\" + name\r\n\t}, function( 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 ( isWindow( elem ) ) {\r\n\r\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\r\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\r\n\t\t\t\t\t\telem[ \"inner\" + name ] :\r\n\t\t\t\t\t\telem.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\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 );\r\n\t\t};\r\n\t} );\r\n} );\r\n\r\n\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.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\thover: function( fnOver, fnOut ) {\r\n\t\treturn this\r\n\t\t\t.on( \"mouseenter\", fnOver )\r\n\t\t\t.on( \"mouseleave\", fnOut || fnOver );\r\n\t}\r\n} );\r\n\r\njQuery.each(\r\n\t( \"blur focus focusin focusout resize scroll click dblclick \" +\r\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\r\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\r\n\tfunction( _i, name ) {\r\n\r\n\t\t// Handle event binding\r\n\t\tjQuery.fn[ name ] = function( data, fn ) {\r\n\t\t\treturn arguments.length > 0 ?\r\n\t\t\t\tthis.on( name, null, data, fn ) :\r\n\t\t\t\tthis.trigger( name );\r\n\t\t};\r\n\t}\r\n);\r\n\r\n\r\n\r\n\r\n// Support: Android <=4.0 only\r\n// Make sure we trim BOM and NBSP\r\n// Require that the \"whitespace run\" starts from a non-whitespace\r\n// to avoid O(N^2) behavior when the engine would try matching \"\\s+$\" at each space position.\r\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|([^\\s\\uFEFF\\xA0])[\\s\\uFEFF\\xA0]+$/g;\r\n\r\n// Bind a function to a context, optionally partially applying any\r\n// arguments.\r\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\r\n// However, it is not slated for removal any time soon\r\njQuery.proxy = function( fn, context ) {\r\n\tvar tmp, args, proxy;\r\n\r\n\tif ( typeof context === \"string\" ) {\r\n\t\ttmp = fn[ context ];\r\n\t\tcontext = fn;\r\n\t\tfn = tmp;\r\n\t}\r\n\r\n\t// Quick check to determine if target is callable, in the spec\r\n\t// this throws a TypeError, but we will just return undefined.\r\n\tif ( !isFunction( fn ) ) {\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t// Simulated bind\r\n\targs = slice.call( arguments, 2 );\r\n\tproxy = function() {\r\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\r\n\t};\r\n\r\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\r\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\r\n\r\n\treturn proxy;\r\n};\r\n\r\njQuery.holdReady = function( hold ) {\r\n\tif ( hold ) {\r\n\t\tjQuery.readyWait++;\r\n\t} else {\r\n\t\tjQuery.ready( true );\r\n\t}\r\n};\r\njQuery.isArray = Array.isArray;\r\njQuery.parseJSON = JSON.parse;\r\njQuery.nodeName = nodeName;\r\njQuery.isFunction = isFunction;\r\njQuery.isWindow = isWindow;\r\njQuery.camelCase = camelCase;\r\njQuery.type = toType;\r\n\r\njQuery.now = Date.now;\r\n\r\njQuery.isNumeric = function( obj ) {\r\n\r\n\t// As of jQuery 3.0, isNumeric is limited to\r\n\t// strings and numbers (primitives or objects)\r\n\t// that can be coerced to finite numbers (gh-2662)\r\n\tvar type = jQuery.type( obj );\r\n\treturn ( type === \"number\" || type === \"string\" ) &&\r\n\r\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\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!isNaN( obj - parseFloat( obj ) );\r\n};\r\n\r\njQuery.trim = function( text ) {\r\n\treturn text == null ?\r\n\t\t\"\" :\r\n\t\t( text + \"\" ).replace( rtrim, \"$1\" );\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/* if ( typeof define === \"function\" && define.amd ) {\r\n\tdefine( \"jquery\", [], function() {\r\n\t\treturn jQuery;\r\n\t} );\r\n}\r\n\r\n\r\n\r\n\r\nvar\r\n\r\n\t// Map over jQuery in case of overwrite\r\n\t_jQuery = window.jQuery,\r\n\r\n\t// Map over the $ in case of overwrite\r\n\t_$ = window.$;\r\n\r\njQuery.noConflict = function( deep ) {\r\n\tif ( window.$ === jQuery ) {\r\n\t\twindow.$ = _$;\r\n\t}\r\n\r\n\tif ( deep && window.jQuery === jQuery ) {\r\n\t\twindow.jQuery = _jQuery;\r\n\t}\r\n\r\n\treturn jQuery;\r\n};\r\n\r\n// Expose jQuery and $ identifiers, even in AMD\r\n// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)\r\n// and CommonJS for browser emulators (trac-13566)\r\nif ( typeof noGlobal === \"undefined\" ) {\r\n\twindow.jQuery = window.$ = jQuery;\r\n} */\r\n\r\n// Define jQuery as a Layui module\r\ntypeof layui === 'object' && layui.define(function(exports) {\r\n layui.$ = jQuery;\r\n exports('jquery', jQuery);\r\n});\r\n\r\n\r\n\r\nreturn jQuery;\r\n} );\r\n","/**\r\n * component\r\n * Layui 2 组件构建器\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 // export\r\n exports('component', function(settings) {\r\n // 默认设置\r\n settings = $.extend(true, {\r\n isRenderWithoutElem: false, // 渲染是否无需指定目标元素\r\n isRenderOnEvent: true, // 渲染是否仅由事件触发。--- 推荐根据组件类型始终显式设置对应值\r\n isDeepReload: false // 是否默认为深度重载\r\n }, settings);\r\n\r\n // 组件名\r\n var MOD_NAME = settings.name;\r\n var MOD_ID = 'lay-' + MOD_NAME + '-id'; // 用于记录组件实例 id 的属性名\r\n\r\n // 组件基础对外接口\r\n var component = {\r\n config: {}, // 全局配置项,一般通过 component.set() 设置\r\n index: layui[MOD_NAME] ? (layui[MOD_NAME].index + 10000) : 0, // 组件索引\r\n\r\n // 通用常量集,一般存放固定字符,如类名等\r\n CONST: $.extend(true, {\r\n MOD_NAME: MOD_NAME,\r\n MOD_ID: MOD_ID,\r\n\r\n CLASS_THIS: 'layui-this',\r\n CLASS_SHOW: 'layui-show',\r\n CLASS_HIDE: 'layui-hide',\r\n CLASS_HIDEV: 'layui-hide-v',\r\n CLASS_DISABLED: 'layui-disabled',\r\n CLASS_NONE: 'layui-none'\r\n }, settings.CONST),\r\n\r\n // 设置全局项\r\n 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 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 instance = function() {\r\n var that = this;\r\n var options = that.config;\r\n var id = options.id;\r\n\r\n // 实例对象\r\n var inst = {\r\n config: options,\r\n id: id,\r\n\r\n // 重置实例\r\n reload: function(options) {\r\n that.reload.call(that, options);\r\n }\r\n };\r\n\r\n // 扩展实例对象的回调\r\n if (typeof settings.extendsInstance === 'function') {\r\n $.extend(true, inst, settings.extendsInstance.call(that));\r\n }\r\n\r\n // 返回实例对象\r\n return inst;\r\n };\r\n\r\n // 构造器\r\n var Class = function(options) {\r\n var that = this;\r\n that.index = ++component.index; // 每创建一个实例,下标自增\r\n\r\n // 扩展配置项:传入选项 -> 全局选项 -> 默认选项 = 当前选项\r\n that.config = $.extend(true, {}, that.config, component.config, options);\r\n\r\n // 初始化之前的回调\r\n if (typeof settings.beforeInit === 'function') {\r\n settings.beforeInit.call(that, that.config);\r\n }\r\n\r\n // 初始化\r\n that.init();\r\n };\r\n\r\n // 默认配置\r\n Class.prototype.config = settings.config;\r\n\r\n // 重载实例\r\n Class.prototype.reload = function(options, type) {\r\n var that = this;\r\n that.config = $.extend(settings.isDeepReload, {}, 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 var elem = $(options.elem);\r\n\r\n // 若 elem 非唯一,则拆分为多个实例\r\n if (elem.length > 1) {\r\n layui.each(elem, function() {\r\n component.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 var layOptions = lay.options(elem[0]);\r\n if (rerender) {\r\n // 若重载渲染,则重载传入的 options 配置优先\r\n options = that.config = $.extend(layOptions, options);\r\n } else {\r\n $.extend(options, layOptions); // 若首次渲染,则 lay-options 配置优先\r\n }\r\n\r\n // 若重复执行 render,则视为 reload 处理\r\n if (!rerender && elem.attr(MOD_ID)) {\r\n var newThat = instance.getThis(elem.attr(MOD_ID));\r\n if (!newThat) return;\r\n return newThat.reload(options, type);\r\n }\r\n\r\n options.elem = $(options.elem);\r\n\r\n // 初始化 id 属性 - 优先取 options.id > 元素 id > 自增索引\r\n options.id = lay.hasOwn(options, 'id') ? options.id : (\r\n elem.attr('id') || that.index\r\n );\r\n\r\n // 记录当前实例对象\r\n instance.that[options.id] = that;\r\n\r\n // 渲染之前的回调\r\n if (typeof settings.beforeRender === 'function') {\r\n settings.beforeRender.call(that, options);\r\n }\r\n\r\n // 执行渲染\r\n var render = function() {\r\n component.cache.id[options.id] = null; // 记录所有实例 id,用于批量操作(如 resize)\r\n elem.attr(MOD_ID, options.id); // 目标元素已渲染过的标记\r\n that.render(rerender); // 渲染核心\r\n };\r\n\r\n // 若绑定元素不存在\r\n if (!elem[0]) {\r\n return settings.isRenderWithoutElem ? render() : null; // 渲染是否无需指定目标元素\r\n };\r\n\r\n // 执行渲染 - 是否初始即渲染组件\r\n if((settings.isRenderOnEvent && options.show) || !settings.isRenderOnEvent) {\r\n render();\r\n }\r\n\r\n // 事件\r\n typeof settings.events === 'function' && that.events();\r\n };\r\n\r\n // 组件必传项\r\n Class.prototype.render = settings.render; // 渲染\r\n Class.prototype.events = settings.events; // 事件\r\n\r\n /**\r\n * 元素缓存操作\r\n * @param {string} key - 缓存键\r\n * @param {*} value - 缓存值\r\n * @param {boolean} remove - 是否删除缓存\r\n * @returns {*} - 若 value 未传,则返回缓存值\r\n */\r\n Class.prototype.cache = function(key, value, remove) {\r\n var that = this;\r\n var options = that.config;\r\n var elem = options.elem;\r\n var MOD_CACHE_NAME = MOD_ID + '-cache';\r\n if (!elem) return;\r\n\r\n var cache = elem.data(MOD_CACHE_NAME) || {};\r\n\r\n // value 未传则获取缓存值\r\n if (value === undefined) {\r\n return cache[key];\r\n }\r\n\r\n if (remove) {\r\n delete cache[key]; // 删除缓存\r\n } else {\r\n cache[key] = value; // 设置缓存\r\n }\r\n\r\n elem.data(MOD_CACHE_NAME, cache);\r\n };\r\n\r\n // 清除缓存\r\n Class.prototype.removeCache = function(key) {\r\n this.cache(key, null, true);\r\n };\r\n\r\n // 缓存所有实例对象\r\n instance.that = {};\r\n\r\n // 获取当前实例对象\r\n instance.getThis = component.getThis = function(id) {\r\n if (id === undefined) {\r\n throw new Error('ID argument required');\r\n }\r\n return instance.that[id];\r\n };\r\n\r\n // 组件缓存\r\n component.cache = {\r\n id: {}\r\n };\r\n\r\n // 用于扩展原型\r\n component.Class = Class;\r\n\r\n /**\r\n * 组件完整重载\r\n * @param {string} id - 实例 id\r\n * @param {Object} options - 配置项\r\n * @returns\r\n */\r\n component.reload = function(id, options) {\r\n var that = instance.getThis(id);\r\n if (!that) return;\r\n\r\n that.reload(options);\r\n return instance.call(that);\r\n };\r\n\r\n /**\r\n * 组件渲染\r\n * @param {Object} options - 配置项\r\n * @returns\r\n */\r\n component.render = function(options) {\r\n var inst = new Class(options);\r\n return instance.call(inst);\r\n };\r\n\r\n return component;\r\n });\r\n});\r\n","/**\r\n * layer\r\n * 通用 Web 弹出层组件\r\n */\r\n//@ts-ignore\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.tagName.toUpperCase() === 'SCRIPT') ? document.currentScript.src : function(){\r\n var js = document.getElementsByTagName('script');\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 beforeEnd: {},\r\n events: {resize: {}}, \r\n minStackIndex: 0,\r\n minStackArr: [],\r\n btn: ['确定', '取消'],\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\nvar SHADE_KEY = 'LAYUI-LAYER-SHADE-KEY';\r\nvar RECORD_HEIGHT_KEY = 'LAYUI_LAYER_CONTENT_RECORD_HEIGHT';\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: '信息',\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 var setAnim = function(layero){\r\n // anim 兼容旧版 shift\r\n if(config.shift){\r\n config.anim = config.shift;\r\n }\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 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 // 若 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 setAnim(layero);\r\n setTimeout(function(){\r\n elemShade.css({opacity: elemShade.data(SHADE_KEY)});\r\n }, 10);\r\n }\r\n })();\r\n }\r\n\r\n // 是否移除活动元素的焦点\r\n if(config.removeFocus && document.activeElement) {\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 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 ,'transition': config.shade[2] || ''\r\n });\r\n that.shadeo.data(SHADE_KEY, config.shade[0] || config.shade);\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 // 记录配置信息\r\n that.layero.data('config', config);\r\n \r\n // 自动关闭\r\n config.time <= 0 || setTimeout(function(){\r\n layer.close(that.index);\r\n }, config.time);\r\n\r\n\r\n that.move().callback();\r\n setAnim(that.layero);\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.area[0] === 'auto') && 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] === '' || config.area[1] === 'auto'){\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.btnLoading = function(btnElem, isLoading){\r\n if(isLoading){\r\n var loadingTpl = '<i class=\"layui-layer-btn-loading-icon layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop\"></i>';\r\n if(btnElem.find('.layui-layer-btn-loading-icon')[0]) return;\r\n btnElem.addClass('layui-layer-btn-is-loading').attr({disabled: ''}).prepend(loadingTpl);\r\n }else{\r\n btnElem.removeClass('layui-layer-btn-is-loading').removeAttr('disabled').find('.layui-layer-btn-loading-icon').remove();\r\n }\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 btnElem = $(this);\r\n var index = btnElem.index();\r\n if(btnElem.attr('disabled')) return;\r\n\r\n // 若为异步按钮\r\n if(config.btnAsync){\r\n var btnCallback = index === 0 ? (config.yes || config['btn1']) : config['btn'+(index+1)];\r\n that.loading = function(isLoading){\r\n that.btnLoading(btnElem, isLoading);\r\n }\r\n\r\n if(btnCallback){\r\n ready.promiseLikeResolve(btnCallback.call(config, that.index, layero, that))\r\n .then(function(result){\r\n if(result !== false){\r\n layer.close(that.index)\r\n }\r\n }, function(reason){\r\n reason !== undefined && window.console && window.console.error('layer error hint: ' + reason);\r\n });\r\n }else{\r\n layer.close(that.index);\r\n }\r\n } else { // 普通按钮\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 // 取消\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 config.beforeEnd && (ready.beforeEnd[that.index] = $.proxy(config.beforeEnd, config, layero, that.index, that));\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 type = layero.attr('type');\r\n var contentElem = layero.find('.layui-layer-content');\r\n var contentRecordHeightElem = type === ready.type[2] ? contentElem.children('iframe') : contentElem;\r\n var area = [\r\n layero[0].style.width || ready.getStyle(layero[0], 'width'),\r\n layero[0].style.height || ready.getStyle(layero[0], '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 contentElem.data(RECORD_HEIGHT_KEY, ready.getStyle(contentRecordHeightElem[0], 'height'));\r\n};\r\n\r\n// 设置页面滚动条\r\nready.setScrollbar = function(index){\r\n doms.html.css('overflow', 'hidden');\r\n};\r\n\r\n// 恢复页面滚动条\r\nready.restScrollbar = function(index) {\r\n if(!doms.html.css('overflow')) return;\r\n \r\n // 关闭和大小化, layer-full 处理\r\n var targetEl = $('.'+ doms[0]).filter(function(){ \r\n var layero = $(this);\r\n var options = layero.data('config') || {};\r\n return options.scrollbar === false\r\n && layero.data('maxminStatus') !== 'min'\r\n && layero.attr('times') !== String(index);\r\n });\r\n if(targetEl.length === 0){\r\n doms.html.css('overflow', '');\r\n }\r\n};\r\n\r\n// 类似 Promise.resolve\r\nready.promiseLikeResolve = function(value){\r\n var deferred = $.Deferred();\r\n\r\n if(value && typeof value.then === 'function'){\r\n value.then(deferred.resolve, deferred.reject);\r\n }else{\r\n deferred.resolve(value);\r\n }\r\n return deferred.promise();\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 contentElem = 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 contentElem.css({\r\n height: (typeof options.height === 'number' ? options.height : layero.height()) - titHeight - btnHeight\r\n - parseFloat(contentElem.css('padding-top'))\r\n - parseFloat(contentElem.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 contentElem = layero.find('.layui-layer-content');\r\n var area = layero.attr('area').split(',');\r\n var type = layero.attr('type');\r\n var options = layero.data('config') || {};\r\n var contentRecordHeight = contentElem.data(RECORD_HEIGHT_KEY);\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 // #1604\r\n if(contentRecordHeight !== undefined){\r\n contentElem.removeData(RECORD_HEIGHT_KEY);\r\n var contentRecordHeightElem = type === ready.type[2] ? contentElem.children('iframe') : contentElem;\r\n contentRecordHeightElem.css({height: contentRecordHeight});\r\n }\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 ready.setScrollbar(index);\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 var executor = function(){\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 shadeo = $('#'+ doms.SHADE + index);\r\n if((layer.ie && layer.ie < 10) || !options.isOutAnim){\r\n shadeo[hideOnClose ? 'hide' : 'remove']();\r\n }else{\r\n shadeo.css({opacity: 0});\r\n setTimeout(function(){\r\n shadeo[hideOnClose ? 'hide' : 'remove']();\r\n }, 350);\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 if(!hideOnClose && typeof ready.beforeEnd[index] === 'function'){\r\n ready.promiseLikeResolve(ready.beforeEnd[index]())\r\n .then(function(result){\r\n if(result !== false){\r\n delete ready.beforeEnd[index];\r\n executor();\r\n }\r\n }, function(reason){\r\n reason !== undefined && window.console && window.console.error('layer error hint: ' + reason);\r\n });\r\n }else{\r\n delete ready.beforeEnd[index];\r\n executor();\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 var layerIndexList = [];\r\n var isArrayType = $.isArray(type);\r\n $(typeof type === 'string' ? '.layui-layer-' + type : '.layui-layer').each(function(i, el){\r\n var layero = $(el);\r\n var shouldSkip = (isArrayType && type.indexOf(layero.attr('type')) === -1) || layero.css('display') === 'none';\r\n if(shouldSkip) return true;\r\n layerIndexList.push(Number(layero.attr('times')));\r\n });\r\n if(layerIndexList.length > 0){\r\n var layerIndexMax = Math.max.apply(null, layerIndexList);\r\n layer.close(layerIndexMax, callback);\r\n }\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: ['确定','取消'],\r\n content: content,\r\n skin: 'layui-layer-prompt' + skin('prompt'),\r\n maxWidth: win.width(),\r\n success: function(layero){\r\n prompt = layero.find('.layui-layer-input');\r\n prompt.val(options.value || '').focus();\r\n typeof success === 'function' && success(layero);\r\n },\r\n resize: false,\r\n yes: function(index){\r\n var value = prompt.val();\r\n if(value.length > (options.maxlength||500)) {\r\n layer.tips('最多输入'+ (options.maxlength || 500) +'个字符', prompt, {tips: 1});\r\n } else {\r\n yes && yes(value, index, prompt);\r\n }\r\n }\r\n }, options));\r\n};\r\n\r\n// tab 层\r\nlayer.tab = function(options){\r\n options = options || {};\r\n \r\n var tab = options.tab || {};\r\n var THIS = 'layui-this';\r\n var success = options.success;\r\n \r\n delete options.success;\r\n \r\n return layer.open($.extend({\r\n type: 1,\r\n skin: 'layui-layer-tab' + skin('tab'),\r\n resize: false,\r\n title: function(){\r\n var len = tab.length, ii = 1, str = '';\r\n if(len > 0){\r\n str = '<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('没有图片');\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, undefined, 'unset'],\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, undefined, 'unset'],\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('当前图片地址异常,<br>是否继续查看下一张?', {\r\n time: 30000, \r\n btn: ['下一张', '不看了'], \r\n yes: function(){\r\n data.length > 1 && dict.imgnext(true,true);\r\n }\r\n });\r\n });\r\n};\r\n\r\n// 主入口\r\nready.run = function(_$){\r\n $ = _$;\r\n win = $(window);\r\n \r\n // 移动端兼容性处理\r\n // https://gitee.com/layui/layui/issues/I81WGC\r\n // https://github.com/jquery/jquery/issues/1729\r\n var agent = navigator.userAgent.toLowerCase();\r\n var isMobile = /android|iphone|ipod|ipad|ios/.test(agent)\r\n var _win = $(window);\r\n if(isMobile){\r\n $.each({Height: \"height\", Width: \"width\"}, function(propSuffix, funcName){\r\n var propName = 'inner' + propSuffix;\r\n win[funcName] = function(){\r\n return propName in window \r\n ? window[propName]\r\n : _win[funcName]()\r\n }\r\n })\r\n }\r\n doms.html = $('html');\r\n layer.open = function(deliver){\r\n var o = new Class(deliver);\r\n return o.index;\r\n };\r\n};\r\n\r\n// 加载方式\r\nwindow.layui && layui.define ? (\r\n layer.ready(),\r\n layui.define(['jquery','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 REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[T\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/i;\r\n var that = this;\r\n\r\n var normalizeDate = function(date) {\r\n if(typeof date === 'undefined'){\r\n return new Date();\r\n }\r\n if(!isNaN(date)){\r\n return new Date(typeof date === 'string' ? parseInt(date) : date);\r\n }\r\n if(typeof date === 'string' && !/Z$/i.test(date)){\r\n var d = date.match(REGEX_PARSE);\r\n if(d){\r\n var m = d[2] - 1 || 0;\r\n var ms = (d[7] || '0').substring(0, 3);\r\n return new Date(\r\n d[1],\r\n m,\r\n d[3] || 1,\r\n d[4] || 0,\r\n d[5] || 0,\r\n d[6] || 0,\r\n ms\r\n );\r\n }\r\n }\r\n \r\n return new Date(date)\r\n }\r\n var date = normalizeDate(time);\r\n\r\n if(!date.getDate()) return hint.error('Invalid millisecond for \"util.toDateString(millisecond)\"'), '';\r\n\r\n var years = date.getFullYear();\r\n var month = date.getMonth();\r\n var days = date.getDate();\r\n var hours = date.getHours();\r\n var minutes = date.getMinutes();\r\n var seconds = date.getSeconds();\r\n var milliseconds = date.getMilliseconds();\r\n\r\n var defaultMeridiem = function(hours, minutes){\r\n var hm = hours * 100 + minutes;\r\n if (hm < 600) {\r\n return '凌晨';\r\n } else if (hm < 900) {\r\n return '早上';\r\n } else if (hm < 1100) {\r\n return '上午';\r\n } else if (hm < 1300) {\r\n return '中午';\r\n } else if (hm < 1800) {\r\n return '下午';\r\n }\r\n return '晚上';\r\n };\r\n\r\n var meridiem = (options && options.customMeridiem) || defaultMeridiem;\r\n\r\n var matches = {\r\n yy: function(){return String(years).slice(-2);},\r\n yyyy: function(){return that.digit(years, 4);},\r\n M: function(){return String(month + 1);},\r\n MM: function(){return that.digit(month + 1);},\r\n d: function(){return String(days);},\r\n dd: function(){return that.digit(days);},\r\n H: function(){return String(hours);},\r\n HH: function(){return that.digit(hours);},\r\n h: function(){return String(hours % 12 || 12);},\r\n hh: function(){return that.digit(hours % 12 || 12);},\r\n A: function(){return meridiem(hours, minutes);},\r\n m: function(){return String(minutes);},\r\n mm: function(){return that.digit(minutes);},\r\n s: function(){return String(seconds);},\r\n ss: function(){return that.digit(seconds);},\r\n SSS: function(){return that.digit(milliseconds, 3);}\r\n }\r\n\r\n format = format || 'yyyy-MM-dd HH:mm:ss';\r\n\r\n return format.replace(REGEX_FORMAT, function(match, $1) {\r\n return $1 || (matches[match] && matches[match]()) || match;\r\n });\r\n },\r\n\r\n // 转义 html\r\n escape: function(html){\r\n var exp = /[<\"'>]|&(?=#[a-zA-Z0-9]+)/g;\r\n if(html === undefined || html === null) return '';\r\n\r\n html += '';\r\n if(!exp.test(html)) return html;\r\n\r\n return html.replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&')\r\n .replace(/</g, '<').replace(/>/g, '>')\r\n .replace(/'/g, ''').replace(/\"/g, '"');\r\n },\r\n\r\n // 还原转义的 html\r\n unescape: function(html){\r\n if(html === undefined || html === null) html = '';\r\n html += '';\r\n\r\n return html.replace(/\\&/g, '&')\r\n .replace(/\\</g, '<').replace(/\\>/g, '>')\r\n .replace(/\\'/g, '\\'').replace(/\\"/g, '\"');\r\n },\r\n\r\n // 打开新窗口\r\n openWin: function(options){\r\n var win;\r\n options = options || {};\r\n win = options.window || window.open((options.url || ''), options.target, options.specs);\r\n if(options.url) return;\r\n win.document.open('text/html', 'replace');\r\n win.document.write(options.content || '');\r\n win.document.close();\r\n },\r\n\r\n // 让指定的元素保持在可视区域\r\n toVisibleArea: function(options){\r\n options = $.extend({\r\n margin: 160, // 触发动作的边界值\r\n duration: 200, // 动画持续毫秒数\r\n type: 'y' // 触发方向,x 水平、y 垂直\r\n }, options);\r\n\r\n if(!options.scrollElem[0] || !options.thisElem[0]) return;\r\n\r\n var scrollElem = options.scrollElem // 滚动元素\r\n var thisElem = options.thisElem // 目标元素\r\n var vertical = options.type === 'y' // 是否垂直方向\r\n var SCROLL_NAME = vertical ? 'scrollTop' : 'scrollLeft' // 滚动方法\r\n var OFFSET_NAME = vertical ? 'top' : 'left' // 坐标方式\r\n var scrollValue = scrollElem[SCROLL_NAME]() // 当前滚动距离\r\n var size = scrollElem[vertical ? 'height' : 'width']() // 滚动元素的尺寸\r\n var scrollOffset = scrollElem.offset()[OFFSET_NAME] // 滚动元素所处位置\r\n var thisOffset = thisElem.offset()[OFFSET_NAME] - scrollOffset // 目标元素当前的所在位置\r\n var obj = {};\r\n\r\n // 边界满足条件\r\n if(thisOffset > size - options.margin || thisOffset < options.margin){\r\n obj[SCROLL_NAME] = thisOffset - size/2 + scrollValue\r\n scrollElem.animate(obj, options.duration);\r\n }\r\n },\r\n\r\n /**\r\n * 批量事件\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 });\r\n }\r\n\r\n // 读取 data 缓存\r\n var dataCache = elem.data(DATANAME);\r\n\r\n // 根据 attr 和 trigger 的组合作为 key\r\n var key = attr + '_' + options.trigger;\r\n\r\n // 根据 key 记录事件集合\r\n events = dataCache.events[key] = $.extend(true, dataCache.events[key], events);\r\n\r\n\r\n // 清除事件委托,避免重复绑定\r\n var trigger = options.trigger + '.lay_util_on';\r\n elem.off(trigger, attrSelector);\r\n\r\n // 绑定事件委托\r\n elem.on(trigger, attrSelector, function(e) {\r\n var othis = $(this);\r\n var attrValue = othis.attr(attr);\r\n typeof events[attrValue] === 'function' && events[attrValue].call(this, othis, e);\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 var MOD_INDEX_OPENED = MOD_INDEX + '_opened';\r\n var MOD_ID = 'lay-' + MOD_NAME + '-id';\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 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 open: function () {\r\n that.render()\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 closeOnClick: true // 面板打开后,再次点击目标元素时是否关闭面板。行为取决于所使用的触发事件类型\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.attr(MOD_ID)){\r\n var newThat = thisModule.getThis(elem.attr(MOD_ID));\r\n if(!newThat) return;\r\n return newThat.reload(options, type);\r\n }\r\n\r\n options.elem = $(options.elem);\r\n options.target = $('body'); // 后续考虑开放 target 元素\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 thisModule.that[options.id] = that; // 记录当前实例对象\r\n elem.attr(MOD_ID, options.id); // 目标元素已渲染过的标记\r\n\r\n // 初始化自定义字段名\r\n options.customName = $.extend({}, dropdown.config.customName, options.customName);\r\n\r\n // 若传入 hover,则解析为 mouseenter\r\n if (options.trigger === 'hover') {\r\n options.trigger = 'mouseenter';\r\n }\r\n\r\n // 初始即显示或者面板弹出之后执行了刷新数据\r\n if(options.show || (type === 'reloadData' && that.mainElem && options.target.find(that.mainElem.get(0)).length)) that.render(type);\r\n\r\n // 事件\r\n that.events();\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 var customName = options.customName;\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\">暂无数据</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 = [\r\n '<div class=\"layui-dropdown layui-border-box layui-panel layui-anim layui-anim-downbit\" ' + MOD_ID + '=\"' + options.id + '\">',\r\n '</div>'\r\n ].join('');\r\n\r\n // 重载或插入面板内容\r\n var content = options.content || getDefaultView();\r\n var mainElemExisted = thisModule.findMainElem(options.id);\r\n if (type === 'reloadData' && mainElemExisted.length) { // 是否仅重载数据\r\n var mainElem = that.mainElem = mainElemExisted;\r\n mainElemExisted.html(content);\r\n } else { // 常规渲染\r\n var mainElem = that.mainElem = $(TPL_MAIN);\r\n mainElem.append(content);\r\n\r\n // 初始化某些属性\r\n mainElem.addClass(options.className);\r\n mainElem.attr('style', options.style);\r\n\r\n // 辞旧迎新\r\n that.remove(dropdown.thisId);\r\n options.target.append(mainElem);\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:'+ (mainElem.css('z-index')-1) +'; background-color: ' + (options.shade[1] || '#000') + '; opacity: ' + (options.shade[0] || options.shade)) +'\"></div>') : '';\r\n mainElem.before(shade);\r\n\r\n // 如果是鼠标移入事件,则鼠标移出时自动关闭\r\n if(options.trigger === 'mouseenter'){\r\n mainElem.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 that.position(); // 定位坐标\r\n dropdown.thisId = options.id; // 当前打开的面板 id\r\n\r\n // 阻止全局事件\r\n mainElem.find('.layui-menu').on(clickOrMousedown, function(e){\r\n layui.stope(e);\r\n });\r\n\r\n // 触发菜单列表事件\r\n mainElem.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, e) \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 mainElem.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(mainElem, options.elem);\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.mainElem[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(id) {\r\n id = id || this.config.id;\r\n var that = thisModule.getThis(id); // 根据 id 查找对应的实例\r\n if (!that) return;\r\n\r\n var options = that.config;\r\n var mainElem = thisModule.findMainElem(id);\r\n\r\n // 若存在已打开的面板元素,则移除\r\n if (mainElem[0]) {\r\n mainElem.prev('.' + STR_ELEM_SHADE).remove(); // 先移除遮罩\r\n mainElem.remove();\r\n options.elem.removeData(MOD_INDEX_OPENED);\r\n delete dropdown.thisId;\r\n typeof options.close === 'function' && options.close(options.elem);\r\n }\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 // 是否鼠标移入时触发\r\n var isMouseEnter = options.trigger === 'mouseenter';\r\n var trigger = options.trigger + '.lay_dropdown_render';\r\n\r\n // 始终先解除上一个触发元素的事件(如重载时改变 elem 的情况)\r\n if (that.thisEventElem) that.thisEventElem.off(trigger);\r\n that.thisEventElem = options.elem;\r\n\r\n // 触发元素事件\r\n options.elem.off(trigger).on(trigger, function(e) {\r\n clearTimeout(thisModule.timer);\r\n that.e = e;\r\n\r\n // 主面板是否已打开\r\n var opened = options.elem.data(MOD_INDEX_OPENED);\r\n\r\n // 若为鼠标移入事件,则延迟触发\r\n if (isMouseEnter) {\r\n if (!opened) {\r\n thisModule.timer = setTimeout(function(){\r\n that.render();\r\n }, that.normalizedDelay().show);\r\n }\r\n } else {\r\n // 若为 click 事件,则根据主面板状态,自动切换打开与关闭\r\n if (options.closeOnClick && opened && options.trigger === 'click') {\r\n that.remove();\r\n } else {\r\n that.render();\r\n }\r\n }\r\n\r\n e.preventDefault();\r\n });\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 if (id === undefined) {\r\n throw new Error('ID argument required');\r\n }\r\n return thisModule.that[id];\r\n };\r\n\r\n // 根据 id 从页面查找组件主面板元素\r\n thisModule.findMainElem = function(id) {\r\n return $('.' + STR_ELEM + '[' + MOD_ID + '=\"' + id + '\"]');\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.mainElem && !that.mainElem[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 lay(_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 var isTopElem = lay.isTopElem(options.elem[0]);\r\n var isCtxMenu = options.trigger === 'contextmenu';\r\n \r\n // 若触发的是绑定的元素,或者属于绑定元素的子元素,则不关闭\r\n // 满足条件:当前绑定的元素是 body document,或者是鼠标右键事件时,忽略绑定元素\r\n var isTriggerTarget = !(isTopElem || isCtxMenu) && (options.elem[0] === e.target || options.elem.find(e.target)[0]);\r\n var isPanelTarget = that.mainElem && (e.target === that.mainElem[0] || that.mainElem.find(e.target)[0]);\r\n if(isTriggerTarget || isPanelTarget) return;\r\n // 处理移动端点击穿透问题\r\n if(e.type === 'touchstart' && options.elem.data(MOD_INDEX_OPENED)){\r\n $(e.target).hasClass(STR_ELEM_SHADE) && e.preventDefault();\r\n }\r\n\r\n // 点击 dropdown 外部时的回调\r\n if(typeof options.onClickOutside === 'function'){\r\n var shouldClose = options.onClickOutside(e);\r\n if(shouldClose === false) return;\r\n }\r\n \r\n that.remove();\r\n }, {passive: false});\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.open = function(id){\r\n var that = thisModule.getThis(id);\r\n if(!that) return this;\r\n \r\n that.render();\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 tipsAlways: false, //文字提示,始终开启\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.precision = function(){\r\n var that = this;\r\n var options = that.config;\r\n var precisions = $.map([options.min, options.max, options.step], function(v, i){\r\n var decimalArr = String(v).split('.');\r\n return decimalArr[1] ? decimalArr[1].length : 0;\r\n })\r\n return Math.max.apply(null, precisions);\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 //间隔值不能小于等于 0\r\n if(options.step <= 0) 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 = (options.value[0] - options.min) / (options.max - options.min) * 100;\r\n var scaleSec = (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 = (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 +'\" '+ (options.tipsAlways ? '' : 'style=\"display:none;\"') +'></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 * @description 设置提示文本内容\r\n * @param {Element} sliderWrapBtnElem 提示文本节点元素\r\n */\r\n function setSliderTipsTxt(sliderWrapBtnElem) {\r\n var value = sliderWrapBtnElem.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\r\n /**\r\n * @description 计算提示文本元素的 position left\r\n * @param {Element} sliderWrapBtnElem 提示文本节点元素\r\n */\r\n function calcSliderTipsLeft(sliderWrapBtnElem){\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 - sliderWrapBtnElem.parent()[0].offsetTop - sliderWrap.height()) : sliderWrapBtnElem.parent()[0].offsetLeft;\r\n var left = tipsLeft / sliderWidth * 100;\r\n return left\r\n }\r\n\r\n /**\r\n * @description 设置提示文本元素的 position left\r\n * @param {number} left 要设置的 left 的大小\r\n */\r\n function setSliderTipsLeft(left) {\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 }\r\n\r\n //判断是否要始终显示提示文本\r\n if(options.tips){\r\n if(options.tipsAlways){\r\n var sliderWrapBtnElem = that.elemTemp.find('.' + SLIDER_WRAP_BTN);\r\n setSliderTipsTxt(sliderWrapBtnElem)\r\n var left = calcSliderTipsLeft(sliderWrapBtnElem);\r\n setSliderTipsLeft(left)\r\n }else{\r\n //划过滑块显示数值\r\n var timer;\r\n that.elemTemp.find('.' + SLIDER_WRAP_BTN).on('mouseover', function(){\r\n setSliderTipsTxt($(this))\r\n var left = calcSliderTipsLeft($(this));\r\n clearTimeout(timer);\r\n timer = setTimeout(function(){\r\n setSliderTipsLeft(left)\r\n }, 300);\r\n }).on('mouseout', function(){\r\n clearTimeout(timer);\r\n if(!options.tipsAlways){\r\n that.elemTemp.find('.' + SLIDER_TIPS).css(\"display\", \"none\");\r\n }\r\n });\r\n }\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) / options.step);\r\n var precision = that.precision();\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 + (options.max - options.min) * offsetValue / 100;\r\n selfValue = Number(parseFloat(selfValue).toFixed(precision));\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'){\r\n return change((value - options.min) / (options.max - options.min) * 100 / step, i, 'done');\r\n } \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 if(!options.tipsAlways){\r\n setTimeout(function(){\r\n sliderAct.find('.' + SLIDER_TIPS).hide();\r\n }, delay);\r\n }\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)/180*100\r\n ,_s = (choose[0].offsetLeft)/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 // 1. 不触发游标上绑定的事件,以提高性能,使滑动更流畅\r\n // 2. 游标上的事件需要冒泡到颜色拾取区域,用来模拟拖动游标的效果\r\n var needTrigger = true;\r\n var needStopPropagation = true;\r\n\r\n //右侧主色选择\r\n slider.on('mousedown', function(e, triggerEvent){\r\n var oldtop = this.offsetTop;\r\n var oldy = e.clientY === undefined ? triggerEvent.clientY : 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 needStopPropagation && layui.stope(e);\r\n createMoveElem(move);\r\n e.preventDefault();\r\n });\r\n \r\n side.on('mousedown', 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 needTrigger && slider.trigger('mousedown', e);\r\n });\r\n \r\n //中间小圆点颜色选择\r\n choose.on('mousedown', function(e, triggerEvent){\r\n var oldtop = this.offsetTop;\r\n var oldleft = this.offsetLeft;\r\n var oldy = e.clientY === undefined ? triggerEvent.clientY : e.clientY;\r\n var oldx = e.clientX === undefined ? triggerEvent.clientX : 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\r\n ,maxw = basis[0].offsetWidth;\r\n if(top < 0)top = 0;\r\n if(top > maxh)top = maxh;\r\n if(left < 0)left = 0;\r\n if(left > maxw)left = maxw;\r\n var s = left/260*100\r\n ,b = 100 - top/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 needStopPropagation && 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 + $win.scrollTop()\r\n ,left = e.clientX - $(this).offset().left + $win.scrollLeft()\r\n if(top < 0)top = 0;\r\n if(top > this.offsetHeight)top = this.offsetHeight;\r\n if(left < 0)left = 0;\r\n if(left > this.offsetWidth)left = this.offsetWidth;\r\n var s = left/260*100\r\n ,b = 100 - top/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 needTrigger && choose.trigger('mousedown', e);\r\n });\r\n \r\n //底部透明度选择\r\n alphaslider.on('mousedown', function(e, triggerEvent){\r\n var oldleft = this.offsetLeft;\r\n var oldx = e.clientX === undefined ? triggerEvent.clientX : 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 needStopPropagation && layui.stope(e);\r\n createMoveElem(move);\r\n e.preventDefault();\r\n });\r\n alphacolor.on('mousedown', 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 needTrigger && alphaslider.trigger('mousedown', e);\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: 'mousedown'},\r\n {elem: alphacolor, eventType: 'mousedown'},\r\n {elem: basis, eventType: 'mousedown'}\r\n ], function(i, obj){\r\n lay.touchSwipe(obj.elem, {\r\n onTouchStart: function(){\r\n needTrigger = false;\r\n needStopPropagation = false;\r\n },\r\n onTouchMove: function(e){\r\n touchHandler(e, obj.eventType)\r\n },\r\n onTouchEnd: function(){\r\n elemMove.remove();\r\n needTrigger = true;\r\n needStopPropagation = true;\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;\r\n var left = s/100*260;\r\n var basisElem = that.elemPicker.find('.' + PICKER_BASIS)[0];\r\n \r\n that.elemPicker.find('.' + PICKER_SIDE_SLIDER).css(\"top\", sidetop); //滑块的top\r\n basisElem.style.background = '#' + hex; //颜色选择器的背景\r\n \r\n //选择器的top left\r\n that.elemPicker.find('.' + PICKER_BASIS_CUR).css({\r\n \"top\": top / basisElem.offsetHeight * 100 + '%',\r\n \"left\": left / basisElem.offsetWidth * 100 + '%' \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.id ? 'lay-id=\"' + options.id + '\"' : '') + '>'+ (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, tabElem);\r\n return this;\r\n };\r\n \r\n /**\r\n * 外部 Tab 删除\r\n * @param {string} filter - 标签主容器 lay-filter 值\r\n * @param {string} layid - 标签头 lay-id 值\r\n * @param {boolean} force - 是否强制删除\r\n * @returns {this}\r\n */\r\n Element.prototype.tabDelete = function(filter, layid, force){\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.call(liElem[0], {\r\n liElem: liElem,\r\n force: force\r\n });\r\n return this;\r\n };\r\n \r\n /**\r\n * 外部 Tab 切换\r\n * @param {string} filter - 标签主容器 lay-filter 值\r\n * @param {string} layid - 标签头 lay-id 值\r\n * @param {boolean} force - 是否强制切换\r\n * @returns {this}\r\n */\r\n Element.prototype.tabChange = function(filter, layid, force){\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 force: force\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 = $(options.headerElem).index($(this));\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 var hasId = othis.attr('lay-id');\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 // 若非强制切换,则根据 tabBeforeChange 事件的返回结果决定是否切换\r\n if (!obj.force) {\r\n var liThis = othis.siblings('.' + THIS);\r\n var shouldChange = layui.event.call(this, MOD_NAME, 'tabBeforeChange('+ filter +')', {\r\n elem: parents,\r\n from: {\r\n index: othis.parent().children('li').index(liThis),\r\n id: liThis.attr('lay-id')\r\n },\r\n to: {\r\n index: index,\r\n id: hasId\r\n },\r\n });\r\n if(shouldChange === false) return;\r\n }\r\n \r\n // 执行切换\r\n if(!(isJump || unselect)){\r\n othis.addClass(THIS).siblings().removeClass(THIS);\r\n if(hasId){\r\n var contentElem = item.filter('[lay-id=\"' + hasId + '\"]');\r\n contentElem = contentElem.length ? contentElem : item.eq(index);\r\n contentElem.addClass(SHOW).siblings().removeClass(SHOW);\r\n }else{\r\n item.eq(index).addClass(SHOW).siblings().removeClass(SHOW);\r\n }\r\n }\r\n \r\n layui.event.call(this, MOD_NAME, 'tab('+ filter +')', {\r\n elem: parents,\r\n index: index,\r\n id: hasId\r\n });\r\n }\r\n \r\n // Tab 删除\r\n ,tabDelete: function(obj){\r\n obj = obj || {};\r\n\r\n var li = obj.liElem || $(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 var hasId = li.attr('lay-id');\r\n\r\n // 若非强制删除,则根据 tabBeforeDelete 事件的返回结果决定是否删除\r\n if (!obj.force) {\r\n var shouldClose = layui.event.call(li[0], MOD_NAME, 'tabBeforeDelete('+ filter +')', {\r\n elem: tabElem,\r\n index: index,\r\n id: hasId\r\n });\r\n if(shouldClose === false) return;\r\n }\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 if(hasId){\r\n var contentElem = item.filter('[lay-id=\"' + hasId + '\"]');\r\n contentElem = contentElem.length ? contentElem : item.eq(index)\r\n contentElem.remove()\r\n }else{\r\n item.eq(index).remove();\r\n }\r\n setTimeout(function(){\r\n call.tabAuto(null, tabElem);\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 id: hasId\r\n });\r\n }\r\n \r\n // Tab 自适应\r\n ,tabAuto: function(spread, elem){\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 var targetElem = elem || $('.layui-tab');\r\n \r\n targetElem.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\"></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 var allowclose = othis.attr('lay-allowclose');\r\n if(allowclose && allowclose !== 'false'){\r\n title.find('li').each(function(){\r\n var li = $(this);\r\n if(!li.find('.'+CLOSE)[0] && li.attr('lay-allowclose') !== 'false'){\r\n var close = $('<i class=\"layui-icon layui-icon-close layui-unselect '+ CLOSE +'\"></i>');\r\n close.on('click', function(e) {\r\n call.tabDelete.call(this, {\r\n e: e\r\n });\r\n });\r\n li.append(close);\r\n }\r\n });\r\n }\r\n \r\n if(typeof othis.attr('lay-unauto') === 'string') return;\r\n \r\n // 响应式\r\n if(\r\n title.prop('scrollWidth') > title.outerWidth() + 1 || (\r\n title.find('li').length && title.height() > function(height){\r\n return height + height/2;\r\n }(title.find('li').eq(0).height())\r\n )\r\n ){\r\n // 若执行是来自于切换,则自动展开\r\n (\r\n spread === 'change' && title.data('LAY_TAB_CHANGE')\r\n ) && title.addClass(MORE);\r\n \r\n if(title.find('.'+BAR)[0]) return;\r\n title.append(span);\r\n othis.attr('overflow', '');\r\n\r\n // 展开图标事件\r\n span.on('click', function(e){\r\n var isSpread = title.hasClass(MORE);\r\n title[isSpread ? 'removeClass' : 'addClass'](MORE);\r\n });\r\n } else {\r\n title.find('.'+ BAR).remove();\r\n othis.removeAttr('overflow');\r\n }\r\n });\r\n }\r\n // 隐藏更多 Tab\r\n ,hideTabMore: function(e){\r\n var tsbTitle = $('.layui-tab-title');\r\n if(e === true || $(e.target).attr('lay-stope') !== 'tabmore'){\r\n tsbTitle.removeClass('layui-tab-more');\r\n tsbTitle.find('.layui-tab-bar').attr('title','');\r\n }\r\n }\r\n \r\n //点击一级菜单\r\n /*\r\n ,clickThis: function(){\r\n var othis = $(this), parents = othis.parents(NAV_ELEM)\r\n ,filter = parents.attr('lay-filter')\r\n ,elemA = othis.find('a')\r\n ,unselect = typeof othis.attr('lay-unselect') === 'string';\r\n\r\n if(othis.find('.'+NAV_CHILD)[0]) return;\r\n \r\n if(!(elemA.attr('href') !== 'javascript:;' && elemA.attr('target') === '_blank') && !unselect){\r\n parents.find('.'+THIS).removeClass(THIS);\r\n othis.addClass(THIS);\r\n }\r\n \r\n layui.event.call(this, MOD_NAME, 'nav('+ filter +')', othis);\r\n }\r\n )\r\n */\r\n \r\n // 点击菜单 - a 标签触发\r\n ,clickThis: function() {\r\n var othis = $(this);\r\n var parents = othis.closest(NAV_ELEM);\r\n var filter = parents.attr('lay-filter');\r\n var parent = othis.parent() ;\r\n var child = othis.siblings('.'+ NAV_CHILD);\r\n var unselect = typeof parent.attr('lay-unselect') === 'string'; // 是否禁用选中\r\n \r\n // 满足点击选中的条件\r\n if (!(othis.attr('href') !== 'javascript:;' && othis.attr('target') === '_blank') && !unselect) {\r\n if (!child[0]) {\r\n parents.find('.'+ THIS).removeClass(THIS);\r\n parent.addClass(THIS);\r\n }\r\n }\r\n \r\n // 若为垂直菜单\r\n if (parents.hasClass(NAV_TREE)) {\r\n var NAV_ITEMED = NAV_ITEM + 'ed'; // 用于标注展开状态\r\n var needExpand = !parent.hasClass(NAV_ITEMED); // 是否执行展开\r\n var ANIM_MS = 200; // 动画过渡毫秒数\r\n\r\n // 动画执行完成后的操作\r\n var complete = function() {\r\n $(this).css({\r\n \"display\": \"\" // 剔除动画生成的 style display,以适配外部样式的状态重置\r\n });\r\n // 避免导航滑块错位\r\n parents.children('.'+ NAV_BAR).css({\r\n opacity: 0\r\n })\r\n };\r\n\r\n // 是否正处于动画中的状态\r\n if (child.is(':animated')) return;\r\n\r\n // 剔除可能存在的 CSS3 动画类\r\n child.removeClass(NAV_ANIM);\r\n\r\n // 若有子菜单,则对其执行展开或收缩\r\n if (child[0]) {\r\n if (needExpand) {\r\n // 先执行 slideDown 动画,再标注展开状态样式,避免元素 `block` 状态导致动画无效\r\n child.slideDown(ANIM_MS, complete);\r\n parent.addClass(NAV_ITEMED);\r\n } else {\r\n // 先取消展开状态样式,再将元素临时显示,避免 `none` 状态导致 slideUp 动画无效\r\n parent.removeClass(NAV_ITEMED);\r\n child.show().slideUp(ANIM_MS, complete);\r\n }\r\n\r\n // 手风琴 --- 收缩兄弟展开项\r\n if (typeof parents.attr('lay-accordion') === 'string' || parents.attr('lay-shrink') === 'all') {\r\n var parentSibs = parent.siblings('.'+ NAV_ITEMED);\r\n parentSibs.removeClass(NAV_ITEMED);\r\n parentSibs.children('.'+ NAV_CHILD).show().stop().slideUp(ANIM_MS, complete);\r\n }\r\n }\r\n }\r\n \r\n layui.event.call(this, MOD_NAME, 'nav('+ filter +')', othis);\r\n }\r\n \r\n // 折叠面板\r\n ,collapse: function(){\r\n var othis = $(this);\r\n var icon = othis.find('.layui-colla-icon');\r\n var elemCont = othis.siblings('.layui-colla-content');\r\n var parents = othis.parents('.layui-collapse').eq(0);\r\n var filter = parents.attr('lay-filter');\r\n var isNone = elemCont.css('display') === 'none';\r\n \r\n // 是否手风琴\r\n if(typeof parents.attr('lay-accordion') === 'string'){\r\n var show = parents.children('.layui-colla-item').children('.'+SHOW);\r\n show.siblings('.layui-colla-title').children('.layui-colla-icon').html('');\r\n show.removeClass(SHOW);\r\n }\r\n \r\n elemCont[isNone ? 'addClass' : 'removeClass'](SHOW);\r\n icon.html(isNone ? '' : '');\r\n \r\n layui.event.call(this, MOD_NAME, 'collapse('+ filter +')', {\r\n title: othis\r\n ,content: elemCont\r\n ,show: isNone\r\n });\r\n }\r\n };\r\n \r\n // 初始化元素操作\r\n Element.prototype.init = function(type, filter){\r\n var that = this, elemFilter = function(){\r\n return (typeof filter === 'string' && filter) ? ('[lay-filter=\"' + filter +'\"]') : '';\r\n }(), items = {\r\n \r\n // Tab 选项卡\r\n tab: function(elem){\r\n var TAB_ELEM = '.layui-tab';\r\n var targetElem = elem || $(TAB_ELEM + elemFilter);\r\n call.tabAuto.call({}, null, targetElem);\r\n }\r\n \r\n // 导航菜单\r\n ,nav: function(elem){\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 var targetElem = elem || $(NAV_ELEM + elemFilter);\r\n targetElem.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 var hasBarElem = othis.find('.'+NAV_BAR);\r\n if (hasBarElem[0]) hasBarElem.remove();\r\n othis.append(bar);\r\n ( othis.hasClass(NAV_TREE)\r\n ? itemElem.find('dd,>.'+ NAV_TITLE) \r\n : itemElem\r\n ).off('mouseenter.lay_nav').on('mouseenter.lay_nav', function() {\r\n follow.call(this, bar, othis, index);\r\n }).off('mouseleave.lay_nav').on('mouseleave.lay_nav', 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.off('mouseleave.lay_nav').on('mouseleave.lay_nav', 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 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(elem){\r\n var ELEM = '.layui-breadcrumb';\r\n var targetElem = elem || $(ELEM + elemFilter);\r\n\r\n targetElem.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(elem){\r\n var ELEM = 'layui-progress';\r\n var targetElem = elem || $('.' + ELEM + elemFilter);\r\n\r\n targetElem.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(elem){\r\n var ELEM = 'layui-collapse';\r\n var targetElem = elem || $('.' + ELEM + elemFilter);\r\n \r\n targetElem.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 ? '' : '') +'</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 if(type && typeof filter === 'object' && filter instanceof $){\r\n var targetElem = filter;\r\n return items[type](targetElem);\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, e.responseText, e);\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 forceConvert = function(src) {\r\n if(options.force === 'json'){\r\n if(typeof src !== 'object'){\r\n try {\r\n return {\r\n status: \"CONVERTED\",\r\n data: JSON.parse(src)\r\n };\r\n } catch(e){\r\n that.msg(text['data-format-error']);\r\n return {\r\n status: \"FORMAT_ERROR\",\r\n data: {}\r\n };\r\n }\r\n }\r\n }\r\n return { status: \"DO_NOTHING\", data: {} }\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 var convert = forceConvert(res);\r\n\r\n switch(convert.status) {\r\n case \"CONVERTED\":\r\n res = convert.data;\r\n break;\r\n case \"FORMAT_ERROR\":\r\n return;\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, res, xhr){\r\n if(options.auto){\r\n elemFile.value = '';\r\n }\r\n\r\n var convert = forceConvert(res);\r\n\r\n switch(convert.status) {\r\n case \"CONVERTED\":\r\n res = convert.data;\r\n break;\r\n case \"FORMAT_ERROR\":\r\n return;\r\n }\r\n\r\n typeof options.error === 'function' && options.error(index || 0, function(files){\r\n that.upload(files);\r\n }, res, xhr);\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 getChooseFiles: function(){\r\n return that.chooseFiles;\r\n }\r\n };\r\n \r\n // 提交上传\r\n var send = function(){\r\n var ready = function(){\r\n // IE 兼容处理\r\n if(device.ie){\r\n return device.ie > 9 ? ajaxSend() : iframeSend();\r\n }\r\n ajaxSend();\r\n }\r\n // 上传前的回调 - 如果回调函数明确返回 false 或 Promise.reject,则停止上传\r\n if(typeof options.before === 'function'){\r\n upload.util.promiseLikeResolve(options.before(args))\r\n .then(function(result){\r\n if(result !== false){\r\n ready();\r\n } else {\r\n if(options.auto){\r\n elemFile.value = '';\r\n }\r\n }\r\n }, function(error){\r\n if(options.auto){\r\n elemFile.value = '';\r\n }\r\n error !== undefined && layui.hint().error(error);\r\n })\r\n }else{\r\n ready();\r\n }\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|webp') +')$', '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 * 判断文件是否加入排队\r\n * @param {File} file\r\n * @return {boolean}\r\n */\r\n var checkFile = function (file) {\r\n var result = true;\r\n layui.each(that.files, function (index, item) {\r\n result = !(item.name === file.name);\r\n if(!result) return true;\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * 扩展文件信息\r\n * @template {File | FileList} T\r\n * @param {T} obj\r\n * @return {T}\r\n */\r\n var extendInfo = function (obj) {\r\n\r\n var extInfo = function (file) {\r\n //文件扩展名\r\n file.ext = file.name.substr(file.name.lastIndexOf('.') + 1).toLowerCase();\r\n // 文件大小\r\n file.sizes = upload.util.parseSize(file.size);\r\n // 可以继续扩展\r\n }\r\n\r\n //FileList对象\r\n if (obj instanceof FileList) {\r\n layui.each(obj, function (index, item) {\r\n extInfo(item);\r\n });\r\n } else {\r\n extInfo(obj);\r\n }\r\n\r\n return obj;\r\n }\r\n \r\n /**\r\n * 检查获取文件\r\n * @param {FileList} files\r\n * @return {Array<File>|FileList}\r\n */\r\n var getFiles = function (files) {\r\n files = files || [];\r\n if (!files.length) return [];\r\n if (!that.files) return extendInfo(files);\r\n var result = [];\r\n layui.each(files, function (index, item) {\r\n if (checkFile(item)) {\r\n result.push(extendInfo(item));\r\n }\r\n });\r\n return result;\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 = getFiles(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 = getFiles(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 * 上传组件辅助方法\r\n */\r\n upload.util = {\r\n /**\r\n * 文件大小处理\r\n * @param {number | string} size -文件大小\r\n * @param {number} [precision] - 数值精度\r\n * @return {string}\r\n */\r\n parseSize: function (size, precision) {\r\n precision = precision || 2;\r\n if (null == size || !size) {\r\n return '0';\r\n }\r\n var unitArr = [\"Bytes\", \"Kb\", \"Mb\", \"Gb\", \"Tb\", \"Pb\", \"Eb\", \"Zb\", \"Yb\"];\r\n var index;\r\n var formatSize = typeof size === 'string' ? parseFloat(size) : size;\r\n index = Math.floor(Math.log(formatSize) / Math.log(1024));\r\n size = formatSize / Math.pow(1024, index);\r\n size = size % 1 === 0 ? size : parseFloat(size.toFixed(precision));//保留的小数位数\r\n return size + unitArr[index];\r\n },\r\n /**\r\n * 将给定的值转换为一个 JQueryDeferred 对象\r\n */\r\n promiseLikeResolve:function(value){\r\n var deferred = $.Deferred();\r\n\r\n if(value && typeof value.then === 'function'){\r\n value.then(deferred.resolve, deferred.reject);\r\n }else{\r\n deferred.resolve(value);\r\n }\r\n return deferred.promise();\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 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 var needCheckboxFallback = lay.ie && parseFloat(lay.ie) === 8;\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 var BAD_INPUT = 'layui-input-number-invalid';\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) || value === undefined || value === null) {\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 for(var key in object){\r\n if(!lay.hasOwn(object, key)) continue;\r\n\r\n var type;\r\n var value = object[key];\r\n var itemElem = itemForm.find('[name=\"'+ key +'\"]');\r\n \r\n // 如果对应的表单不存在,则不执行\r\n if(!itemElem[0]) continue;\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 // select 多选用 jQuery 方式取值,未选中 option 时,\r\n // jQuery v2.2.4 及以下版本返回 null,以上(3.x) 返回 []。\r\n // 统一规范化为 [],参考 https://github.com/jquery/jquery/issues/2562\r\n field[init_name || item.name] = (this.tagName === 'SELECT' && typeof this.getAttribute('multiple') === 'string') \r\n ? othis.val() || []\r\n : this.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 var isBadInput = isNaN(value);\r\n var isStepStrictly = typeof elem.attr('lay-step-strictly') === 'string';\r\n\r\n elem.toggleClass(BAD_INPUT, isBadInput);\r\n if(isBadInput) return; // 若非数字,则不作处理\r\n\r\n if(eventType === 'click'){\r\n // 兼容旧版行为,2.10 以前 readonly 不禁用控制按钮\r\n if(elem[0].type === 'text' && typeof elem.attr('readonly') === 'string') return;\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 // 赋值\r\n if (!noAction) {\r\n // 初始渲染时只处理数字精度\r\n if (!isInit) {\r\n if(isStepStrictly){\r\n value = Math.round(value / step) * step;\r\n }\r\n if(value <= min) value = min;\r\n if(value >= max) value = max;\r\n }\r\n // 若 `lay-precision` 为 0, 则表示只保留整数\r\n if (precision === 0) {\r\n value = parseInt(value);\r\n } else if(precision > 0) { // 小数位精度\r\n value = value.toFixed(precision);\r\n }\r\n\r\n elem.val(value);\r\n elem.attr('lay-input-mirror', elem.val())\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 // 旧版浏览器不支持更改 input 元素的 type 属性,需要主动设置 text\r\n if(elem.attr('type') === 'text' || elem[0].type === 'text'){\r\n var ns = '.lay_input_number';\r\n var skipCheck = false;\r\n var isComposition = false;\r\n var isReadonly = typeof elem.attr('readonly') === 'string';\r\n var isMouseWheel = typeof elem.attr('lay-wheel') === 'string';\r\n var btnElem = elem.next('.layui-input-number').children('i');\r\n // 旧版浏览器不支持 beforeInput 事件,需要设置一个 attr 存储输入前的值\r\n elem.attr('lay-input-mirror', elem.val());\r\n elem.off(ns);\r\n // 旧版浏览器不支持 event.inputType 属性,需要用 keydown 事件来判断是否跳过输入检查\r\n elem.on('keydown' + ns, function (e) {\r\n skipCheck = false;\r\n if (e.keyCode === 8 || e.keyCode === 46) { // Backspace || Delete\r\n skipCheck = true;\r\n }\r\n // Up & Down 键盘事件处理\r\n if(!isReadonly && btnElem.length === 2 && (e.keyCode === 38 || e.keyCode === 40)){\r\n e.preventDefault();\r\n btnElem.eq(e.keyCode === 38 ? 0 : 1).click();\r\n }\r\n })\r\n elem.on('input' + ns + ' propertychange' + ns, function (e) {\r\n if (isComposition || (e.type === 'propertychange' && e.originalEvent.propertyName !== 'value')) return;\r\n if (skipCheck || canInputNumber(this.value)) {\r\n elem.attr('lay-input-mirror', this.value);\r\n } else {\r\n // 恢复输入前的值\r\n this.value = elem.attr('lay-input-mirror');\r\n }\r\n elem.toggleClass(BAD_INPUT, isNaN(Number(this.value)));\r\n });\r\n elem.on('compositionstart' + ns, function () {\r\n isComposition = true;\r\n });\r\n elem.on('compositionend' + ns, function () {\r\n isComposition = false;\r\n elem.trigger('input');\r\n })\r\n // 响应鼠标滚轮或触摸板\r\n if(isMouseWheel){\r\n elem.on(['wheel','mousewheel','DOMMouseScroll'].join(ns + ' ') + ns, function (e) {\r\n if(!btnElem.length) return;\r\n if(!$(this).is(':focus')) return;\r\n var direction = 0;\r\n e.preventDefault();\r\n // IE9+,chrome 和 firefox 同时添加 'wheel' 和 'mousewheel' 事件时,只执行 'wheel' 事件\r\n if(e.type === 'wheel'){\r\n e.deltaX = e.originalEvent.deltaX;\r\n e.deltaY = e.originalEvent.deltaY;\r\n direction = Math.abs(e.deltaX) >= Math.abs(e.deltaY) ? e.deltaX : e.deltaY;\r\n }else if(e.type === 'mousewheel' ){\r\n direction = -e.originalEvent.wheelDelta;\r\n }else if(e.type === 'DOMMouseScroll'){\r\n direction = e.originalEvent.detail;\r\n }\r\n btnElem.eq(direction > 0 ? 1 : 0).click();\r\n })\r\n }\r\n\r\n if(isReadonly){\r\n btnElem.addClass(DISABLED);\r\n }\r\n }\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 CREATE_OPTION = 'layui-select-create-option';\r\n var PANEL_WRAP = 'layui-select-panel-wrap'\r\n var PANEL_ELEM_DATA = 'layui-select-panel-elem-data';\r\n var selects = elem || elemForm.find('select');\r\n\r\n // 各种事件\r\n var events = function(reElem, titleElem, disabled, isSearch, isCreatable, isAppendTo){\r\n var select = $(this);\r\n var title = titleElem;\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 initValue = '';\r\n var removeClickOutsideEvent;\r\n \r\n if(disabled) return;\r\n\r\n /**\r\n * 搜索项 \r\n * @typedef searchOption\r\n * @prop {boolean} [caseSensitive=false] 是否区分大小写\r\n * @prop {boolean} [fuzzy=false] 是否开启模糊匹配,开启后将会忽略模式出现在字符串中的位置。\r\n */\r\n /** @type {searchOption} */\r\n var laySearch = select.attr('lay-search') === 'cs' ? {caseSensitive:true} : lay.options(select, {attr:'lay-search'});\r\n // 目前只支持 body\r\n var appendTarget = select.attr('lay-append-to') || 'body';\r\n var appendPosition = select.attr('lay-append-position');\r\n\r\n // #1449\r\n // IE10 和 11 中,带有占位符的 input 元素获得/失去焦点时,会触发 input 事件\r\n // 当鼠标按下时,根据 input 元素上的 __ieph 标识忽略 input 事件\r\n var needPlaceholderPatch = !!(lay.ie && (lay.ie === '10' || lay.ie === '11') && input.attr('placeholder'));\r\n \r\n // 展开下拉\r\n var showDown = function(){\r\n if(isAppendTo){\r\n // 如果追加面板元素后出现滚动条,触发元素宽度可能会有变化,所以先追加面板元素\r\n reElem.appendTo(appendTarget).css({width: title.width() + 'px'});\r\n\r\n var updatePosition = function(){\r\n lay.position(title[0], reElem[0], {\r\n position: appendPosition,\r\n allowBottomOut: true,\r\n offset: [0, 5]\r\n });\r\n }\r\n\r\n updatePosition();\r\n $(window).on('resize.lay_select_resize', updatePosition);\r\n }\r\n var top = reElem.offset().top + reElem.outerHeight() + 5 - $win.scrollTop();\r\n var dlHeight = dl.outerHeight();\r\n var dds = dl.children('dd');\r\n \r\n index = select[0].selectedIndex; // 获取最新的 selectedIndex\r\n title.parent().addClass(CLASS+'ed');\r\n dds.removeClass(HIDE);\r\n dts.removeClass(HIDE);\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 if(needPlaceholderPatch){\r\n dl.off('mousedown.lay_select_ieph').on('mousedown.lay_select_ieph', function(){\r\n input[0].__ieph = true;\r\n setTimeout(function(){\r\n input[0].__ieph = false;\r\n }, 60)\r\n });\r\n }\r\n\r\n removeClickOutsideEvent = lay.onClickOutside(\r\n isAppendTo ? reElem[0] : dl[0],\r\n function(){\r\n hideDown();\r\n initValue && input.val(initValue);\r\n },\r\n {ignore: title}\r\n );\r\n };\r\n \r\n // 隐藏下拉\r\n var hideDown = function(choose){\r\n title.parent().removeClass(CLASS+'ed ' + CLASS+'up');\r\n input.blur();\r\n isCreatable && dl.children('.' + CREATE_OPTION).remove();\r\n removeClickOutsideEvent && removeClickOutsideEvent();\r\n if(isAppendTo){\r\n reElem.detach();\r\n $(window).off('resize.lay_select_resize');\r\n }\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 title.parent().hasClass(CLASS+'ed') ? (\r\n hideDown()\r\n ) : (\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){\r\n e.preventDefault();\r\n var allDisplayedElem = dl.children('dd:not(.'+ HIDE +',.'+ DISABLED +')');\r\n if(!allDisplayedElem.length) return;\r\n var firstIndex = 0;\r\n var lastIndex = allDisplayedElem.length - 1;\r\n var selectedIndex = -1;\r\n\r\n layui.each(allDisplayedElem, function(index, el){\r\n if($(el).hasClass(THIS)){\r\n selectedIndex = index;\r\n return true;\r\n }\r\n })\r\n \r\n var nextIndex = prevNext === 'prev'\r\n ? (selectedIndex - 1 < firstIndex ? lastIndex : selectedIndex - 1)\r\n : (selectedIndex + 1 > lastIndex ? firstIndex : selectedIndex + 1)\r\n\r\n var selectedElem = allDisplayedElem.eq(nextIndex);\r\n selectedElem.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 var dds = dl.children('dd');\r\n var hasEquals = false;\r\n var rawValue = value;\r\n var fuzzyMatchRE;\r\n if(!laySearch.caseSensitive){\r\n value = value.toLowerCase();\r\n }\r\n if(laySearch.fuzzy){\r\n fuzzyMatchRE = fuzzyMatchRegExp(value, laySearch.caseSensitive);\r\n }\r\n layui.each(dds, function(){\r\n var othis = $(this);\r\n var text = othis.text();\r\n var isCreateOption = isCreatable && othis.hasClass(CREATE_OPTION);\r\n\r\n // 需要区分大小写\r\n if(isCreatable && !isCreateOption && text === rawValue){\r\n hasEquals = true;\r\n }\r\n\r\n // 是否区分大小写\r\n if(!laySearch.caseSensitive){\r\n text = text.toLowerCase();\r\n }\r\n \r\n // 匹配\r\n var not = laySearch.fuzzy ? !fuzzyMatchRE.test(text) : text.indexOf(value) === -1;\r\n \r\n if(value === '' || (origin === 'blur') ? value !== text : not) num++;\r\n origin === 'keyup' && othis[(isCreatable ? (not && !isCreateOption) : not) ? 'addClass' : 'removeClass'](HIDE);\r\n });\r\n // 处理 select 分组元素\r\n origin === 'keyup' && layui.each(dts, function(){\r\n var othis = $(this);\r\n var thisDds = othis.nextUntil('dt').filter('dd'); // 当前分组下的dd元素\r\n if(isCreatable) thisDds = thisDds.not('.' + CREATE_OPTION);\r\n var 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, hasEquals), 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 if(needPlaceholderPatch && e.target.__ieph){\r\n e.target.__ieph = false;\r\n return false;\r\n }\r\n \r\n notOption(value, function(none, hasEquals){\r\n if(isCreatable){\r\n if(hasEquals){\r\n dl.children('.' + CREATE_OPTION).remove();\r\n }else{\r\n var createOptionElem = dl.children('.' + CREATE_OPTION);\r\n if(createOptionElem[0]){\r\n createOptionElem.attr('lay-value', value).html(util.escape(value));\r\n }else{\r\n // 临时显示在顶部\r\n var ddElem = $('<dd>').addClass(CREATE_OPTION).attr('lay-value', value).html(util.escape(value));\r\n var firstOptionELem = dl.children().eq(0);\r\n var hasTips = firstOptionELem.hasClass('layui-select-tips');\r\n firstOptionELem[hasTips ? 'after' : 'before'](ddElem);\r\n }\r\n }\r\n }else{\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 }\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 isCreatable && dl.children('.' + CREATE_OPTION).remove();\r\n }\r\n \r\n followScroll(); // 定位滚动条\r\n };\r\n \r\n if(isSearch){\r\n input.on('input propertychange', layui.debounce(search, 50)).on('blur', function(e){\r\n var selectedIndex = select[0].selectedIndex;\r\n \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 dl.on('click', 'dd', 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 // 将新增的 option 元素添加到末尾\r\n if(isCreatable && othis.hasClass(CREATE_OPTION)){\r\n dl.append(othis.removeClass(CREATE_OPTION));\r\n var optionElem = $('<option>').attr('value', value).text(othis.text());\r\n select.append(optionElem);\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 // 用于开启 lay-append-to 时兼容 dropdown\r\n dl.on('mousedown pointerdown touchstart', function(e){\r\n layui.stope(e);\r\n })\r\n \r\n reElem.find('dl>dt').on('click', function(e){\r\n return false;\r\n });\r\n\r\n if(isAppendTo){\r\n titleElem.on('_lay-select-destroy', function(){\r\n reElem.remove();\r\n })\r\n }\r\n }\r\n\r\n // 仅 appendTo 使用,移除触发元素时,自动移除面板元素\r\n $.event.special['_lay-select-destroy'] = {\r\n remove: function( handleObj ) {\r\n handleObj.handler();\r\n }\r\n };\r\n \r\n // 初始渲染 select 组件选项\r\n selects.each(function(index, select){\r\n var othis = $(this);\r\n var hasRender = othis.next('.'+CLASS);\r\n var disabled = this.disabled;\r\n var value = select.value;\r\n var selected = $(select.options[select.selectedIndex]); // 获取当前选中项\r\n var 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 var isCreatable = typeof othis.attr('lay-creatable') === 'string' && isSearch\r\n var isAppendTo = typeof othis.attr('lay-append-to') === 'string'\r\n var 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' : '') + '\"></div>'].join(''));\r\n\r\n var triggerElem = $([\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>'\r\n ,'</div>'].join(''));\r\n\r\n var contentElem = $(['<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 ].join(''));\r\n \r\n // 如果已经渲染,则Rerender\r\n if(hasRender[0]){\r\n if(isAppendTo){\r\n var panelWrapElem = hasRender.data(PANEL_ELEM_DATA);\r\n panelWrapElem && panelWrapElem.remove();\r\n }\r\n hasRender.remove();\r\n }\r\n if(isAppendTo){\r\n reElem.append(triggerElem);\r\n othis.after(reElem);\r\n var contentWrapElem = $('<div class=\"'+ CLASS + ' ' + PANEL_WRAP +'\"></div>').append(contentElem);\r\n reElem.data(PANEL_ELEM_DATA, contentWrapElem); // 将面板元素对象记录在触发元素 data 中,重新渲染时需要清理旧面板元素\r\n events.call(this, contentWrapElem, triggerElem, disabled, isSearch, isCreatable, isAppendTo);\r\n }else{\r\n reElem.append(triggerElem).append(contentElem);\r\n othis.after(reElem);\r\n events.call(this, reElem, triggerElem, disabled, isSearch, isCreatable, isAppendTo);\r\n }\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 var skin = check.attr('lay-skin') || 'primary';\r\n var isSwitch = skin === 'switch';\r\n var isPrimary = skin === 'primary';\r\n \r\n // 勾选\r\n reElem.on('click', function(){\r\n var filter = check.attr('lay-filter') // 获取过滤器\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 }\r\n\r\n // 开关\r\n check[0].checked = !check[0].checked\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 that.syncAppearanceOnPropChanged(this, 'checked', function(){\r\n if(isSwitch){\r\n var title = (reElem.next('*[lay-checkbox]')[0] \r\n ? reElem.next().html()\r\n : check.attr('title') || ''\r\n ).split('|');\r\n reElem.children('div').html(this.checked ? title[0] : title[1] || title[0]);\r\n }\r\n reElem.toggleClass(RE_CLASS[1], this.checked);\r\n });\r\n\r\n if(isPrimary){\r\n that.syncAppearanceOnPropChanged(this, 'indeterminate', function(){\r\n if(this.indeterminate){\r\n reElem.children('.layui-icon-ok').removeClass('layui-icon-ok').addClass(CLASS.SUBTRA);\r\n }else{\r\n reElem.children('.'+ CLASS.SUBTRA).removeClass(CLASS.SUBTRA).addClass('layui-icon-ok');\r\n }\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 var titleTplAttrs = [];\r\n if(othis.next('[lay-checkbox]')[0]){\r\n var titleTplElem = othis.next();\r\n title = titleTplElem.html() || '';\r\n if(titleTplElem[0].attributes.length > 1){\r\n layui.each(titleTplElem[0].attributes, function(i, attr){\r\n if(attr.name !== 'lay-checkbox'){\r\n titleTplAttrs.push(attr.name + '=\"' + attr.value + '\"')\r\n }\r\n })\r\n }\r\n }\r\n titleTplAttrs = titleTplAttrs.join(' ');\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 // 处理 IE8 indeterminate 属性重新定义 get set 后无法设置值的问题\r\n if(needCheckboxFallback){\r\n toggleAttribute.call(check, 'lay-form-sync-checked', check.checked);\r\n !check.checked && toggleAttribute.call(check, 'lay-form-sync-indeterminate', check.indeterminate);\r\n }\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 ' + titleTplAttrs +'>'+ 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] || title[0])) || '') +'</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 filter = radio.attr('lay-filter'); // 获取过滤器\r\n \r\n if(radio[0].disabled) return;\r\n \r\n radio[0].checked = true;\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 that.syncAppearanceOnPropChanged(this, 'checked', function(){\r\n var radioEl = this;\r\n if(radioEl.checked){\r\n reElem.addClass(CLASS + 'ed');\r\n reElem.children('.layui-icon').addClass(ANIM + ' ' + ICON[0]);\r\n var forms = radio.parents(ELEM);\r\n var sameRadios = forms.find('input[name='+ radioEl.name.replace(/(\\.|#|\\[|\\])/g, '\\\\$1') +']'); // 找到相同name的兄弟\r\n layui.each(sameRadios, function(){\r\n if(radioEl === this)return;\r\n this.checked = false;\r\n });\r\n }else{\r\n reElem.removeClass(CLASS + 'ed');\r\n reElem.children('.layui-icon').removeClass(ANIM + ' ' + ICON[0]).addClass(ICON[1]);\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 var skin = othis.attr('lay-skin');\r\n \r\n if(typeof othis.attr('lay-ignore') === 'string') return othis.show();\r\n\r\n if(needCheckboxFallback){\r\n toggleAttribute.call(radio, 'lay-form-sync-checked', radio.checked);\r\n }\r\n\r\n hasRender[0] && hasRender.remove(); // 如果已经渲染,则Rerender\r\n\r\n var title = util.escape(radio.title || '');\r\n var titleTplAttrs = [];\r\n if(othis.next('[lay-radio]')[0]){\r\n var titleTplElem = othis.next();\r\n title = titleTplElem.html() || '';\r\n if(titleTplElem[0].attributes.length > 1){\r\n layui.each(titleTplElem[0].attributes, function(i, attr){\r\n if(attr.name !== 'lay-radio'){\r\n titleTplAttrs.push(attr.name + '=\"' + attr.value + '\"')\r\n }\r\n })\r\n }\r\n }\r\n titleTplAttrs = titleTplAttrs.join(' ');\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 (skin ? ' lay-skin=\"'+ skin +'\"' : ''),\r\n '>',\r\n '<i class=\"layui-anim layui-icon '+ ICON[radio.checked ? 0 : 1] +'\"></i>',\r\n '<div ' + titleTplAttrs +'>'+ title +'</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 * checkbox 和 radio 指定属性变化时自动更新 UI\r\n * 只能用于 boolean 属性\r\n * @param {HTMLInputElement} elem - HTMLInput 元素\r\n * @param {'checked' | 'indeterminate'} propName - 属性名\r\n * @param {() => void} handler - 属性值改变时执行的回调\r\n * @see https://learn.microsoft.com/zh-cn/previous-versions//ff382725(v=vs.85)?redirectedfrom=MSDN\r\n */\r\n Form.prototype.syncAppearanceOnPropChanged = function(){\r\n // 处理 IE8 indeterminate 属性重新定义 get set 后无法设置值的问题\r\n // 此处性能敏感,不希望每次赋值取值时都判断是否需要 fallback\r\n if (needCheckboxFallback) {\r\n return function(elem, propName, handler) {\r\n var originProps = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, propName);\r\n\r\n Object.defineProperty(elem, propName,\r\n lay.extend({}, originProps, {\r\n // 此处的 get 是为了兼容 IE<9\r\n get: function(){\r\n return typeof this.getAttribute('lay-form-sync-' + propName) === 'string';\r\n },\r\n set: function (newValue) {\r\n toggleAttribute.call(this, 'lay-form-sync-' + propName, newValue);\r\n handler.call(this);\r\n }\r\n })\r\n ); \r\n }\r\n }\r\n return function(elem, propName, handler){\r\n var originProps = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, propName);\r\n \r\n Object.defineProperty(elem, propName,\r\n lay.extend({}, originProps, {\r\n // 此处的 get 是为了兼容 IE<9\r\n get: function(){\r\n return originProps.get.call(this);\r\n },\r\n set: function (newValue) {\r\n originProps.set.call(this, newValue);\r\n handler.call(this);\r\n }\r\n })\r\n );\r\n }\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 = othis.val();\r\n value = typeof value === 'string' ? $.trim(value) : value;\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 function fuzzyMatchRegExp(keyword, caseSensitive) {\r\n var wordMap = {};\r\n var regexPattern = ['^'];\r\n var escapeRegExp = function(str){\r\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\r\n }\r\n\r\n if(!caseSensitive)keyword = keyword.toLowerCase();\r\n\r\n // 统计关键字中各字符出现次数\r\n var wordArr = keyword.trim().split('');\r\n for (var i = 0; i < wordArr.length; i++) {\r\n var c = wordArr[i];\r\n wordMap[c] = (wordMap[c] || 0) + 1;\r\n }\r\n\r\n // 构建正则表达式模式\r\n for (c in wordMap) {\r\n regexPattern.push('(?=.*');\r\n for (var i = 0; i < wordMap[c]; i++) {\r\n regexPattern.push(escapeRegExp(c));\r\n if (i !== wordMap[c] - 1) {\r\n regexPattern.push('.*'); // 在字符之间添加任意字符匹配\r\n }\r\n }\r\n regexPattern.push(')');\r\n }\r\n regexPattern.push('.*');\r\n\r\n return new RegExp(regexPattern.join(''), !caseSensitive ? 'i' : undefined);\r\n }\r\n\r\n // 引用自 https://github.com/msn0/mdn-polyfills/blob/master/src/Element.prototype.toggleAttribute/toggleattribute.js\r\n function toggleAttribute(name, force) {\r\n var forcePassed = arguments.length === 2;\r\n var forceOn = !!force;\r\n var forceOff = forcePassed && !force;\r\n\r\n if (this.getAttribute(name) !== null) {\r\n if (forceOn) return true;\r\n\r\n this.removeAttribute(name);\r\n return false;\r\n } else {\r\n if (forceOff) return false;\r\n\r\n this.setAttribute(name, '');\r\n return true;\r\n }\r\n }\r\n\r\n // 修改自 https://github.com/Tencent/tdesign-common/blob/53786c58752401e648cc45918f2a4dbb9e8cecfa/js/input-number/number.ts#L209\r\n var specialCode = ['-', '.', 'e', 'E', '+'];\r\n function canInputNumber(number) {\r\n if (number === '') return true;\r\n // 数字最前方不允许出现连续的两个 0\r\n if (number.slice(0, 2) === '00') return false;\r\n // 不能出现空格\r\n if (number.match(/\\s/g)) return false;\r\n // 只能出现一个点(.)\r\n var tempMatched = number.match(/\\./g);\r\n if (tempMatched && tempMatched.length > 1) return false;\r\n // 只能出现一个e(e)\r\n tempMatched = number.match(/e/g);\r\n if (tempMatched && tempMatched.length > 1) return false;\r\n // 只能出现一个负号(-)或 一个正号(+),并且在第一个位置;但允许 3e+10 这种形式\r\n var tempNumber = number.slice(1);\r\n tempMatched = tempNumber.match(/(\\+|-)/g);\r\n if (tempMatched && (!/e(\\+|-)/i.test(tempNumber) || tempMatched.length > 1)) return false;\r\n // 允许输入数字字符\r\n var isNumber = !isNaN(Number(number));\r\n if (!isNumber && !(specialCode.indexOf(number.slice(-1)) !== -1)) return false;\r\n if (/e/i.test(number) && (!/\\de/i.test(number) || /e\\./.test(number))) return false;\r\n return true;\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 initIndexName: 'LAY_INDEX_INIT', // 初始下标索引名,仅用于内部恢复当前页表格排序\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 函数可以处理 Selector,HTMLElement,JQuery 类型\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 MOD_ID = 'lay-' + MOD_NAME + '-id';\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 var DISABLED_TRANSITION = 'layui-table-disabled-transition';\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\">'\r\n ,'<div class=\"layui-table-loading-icon\">'\r\n ,'{{# if(typeof d.data.loading === \"string\"){ }}'\r\n ,'{{- d.data.loading}}'\r\n ,'{{# } else{ }}'\r\n ,'<i class=\"layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop\"></i>'\r\n ,'{{# } }}'\r\n ,'</div>'\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(function(){\r\n var obj = {\r\n 'lay-filter': 'LAY-TABLE-FORM-DF-'+ that.index,\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 }\r\n obj[MOD_ID] = options.id;\r\n return obj;\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 that.setColsWidth({isInit: true});\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;\r\n var isNone;\r\n parent = parent || options.elem.parent();\r\n\r\n width = that.getContentWidth(parent);\r\n\r\n try {\r\n isNone = parent.css('display') === 'none';\r\n } catch(e){}\r\n var parentElem = parent.parent();\r\n if(parent[0] && parentElem && parentElem[0] && (!width || isNone)) return getWidth(parentElem);\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 var filter = options.elem.attr('lay-filter');\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 defaultConfig = {\r\n filter: {\r\n title: '筛选列',\r\n layEvent: 'LAYTABLE_COLS',\r\n icon: 'layui-icon-cols',\r\n onClick: function(obj) {\r\n var options = obj.config;\r\n var openPanel = obj.openPanel;\r\n\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 }\r\n },\r\n exports: {\r\n title: '导出',\r\n layEvent: 'LAYTABLE_EXPORT',\r\n icon: 'layui-icon-export',\r\n onClick: function(obj) { // 自带导出\r\n var data = obj.data;\r\n var options = obj.config;\r\n var openPanel = obj.openPanel;\r\n var elem = obj.elem;\r\n\r\n if (!data.length) return layer.tips('当前表格无数据', elem, {tips: 3});\r\n if(device.ie){\r\n layer.tips('导出功能不支持 IE,请用 Chrome 等高级浏览器导出', elem, {\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 ].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 }\r\n },\r\n print: {\r\n title: '打印',\r\n layEvent: 'LAYTABLE_PRINT',\r\n icon: 'layui-icon-print',\r\n onClick: function(obj) {\r\n var data = obj.data;\r\n var options = obj.config;\r\n var elem = obj.elem;\r\n\r\n if (!data.length) return layer.tips('当前表格无数据', elem, {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 }\r\n }\r\n };\r\n\r\n // 若开启 defaultToolbar\r\n if (typeof options.defaultToolbar === 'object') {\r\n var iconElem = [];\r\n options.defaultToolbar = $.map(options.defaultToolbar, function(item, i) {\r\n var itemIsName = typeof item === 'string';\r\n var thisItem = itemIsName ? defaultConfig[item] : item;\r\n if (thisItem) {\r\n // 根据 name 匹配默认工具并合并\r\n if (thisItem.name && defaultConfig[thisItem.name]) {\r\n thisItem = $.extend({}, defaultConfig[thisItem.name], thisItem);\r\n }\r\n // 初始化默认工具 name\r\n if (!thisItem.name && itemIsName) {\r\n thisItem.name = item;\r\n }\r\n // 图标列表\r\n iconElem.push(\r\n '<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 return thisItem;\r\n });\r\n that.layTool.find('.layui-table-tool-self').html(iconElem.join(''));\r\n }\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(opt){\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 var borderWidth = parseFloat(layui.getStyle(that.elem[0], 'border-left-width'));\r\n var lastSpreadCol;\r\n var headerTableElem = that.layHeader.first().children('table');\r\n var mainTableElem = that.layMain.find('table');\r\n var isEmptyTable = that.layMain.find('tbody').is(\":empty\");\r\n var isInit = opt && opt.isInit;\r\n\r\n // 统计列个数和最后一个分配宽度的列\r\n that.eachCols(function(i, item){\r\n if(!item.hide){\r\n colNums++;\r\n if(!(item.width || item.type !== 'normal')){\r\n lastSpreadCol = item;\r\n }\r\n }\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 }() * borderWidth - that.getScrollWidth(that.layMain[0]);\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 = (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 var pixelsForLastCol = cntrWidth;\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 || (lastSpreadCol && lastSpreadCol.key === item3.key)) return;\r\n\r\n // 给未分配宽的列平均分配宽\r\n if(item3.width === 0){\r\n that.cssRules(item3.key, function(item){\r\n var newWidth = Math.round(function(){\r\n if(autoWidth < minWidth) return minWidth;\r\n if(autoWidth > maxWidth) return maxWidth;\r\n return autoWidth;\r\n }());\r\n item.style.width = newWidth + 'px';\r\n pixelsForLastCol = pixelsForLastCol - newWidth;\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.round((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 pixelsForLastCol = pixelsForLastCol - width;\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 pixelsForLastCol = pixelsForLastCol - item3.width;\r\n });\r\n }\r\n });\r\n // 最后一列获取剩余的空间,避免舍入导致的布局问题\r\n if(lastSpreadCol){\r\n that.cssRules(lastSpreadCol.key, function(item){\r\n var minWidth = lastSpreadCol.minWidth || options.cellMinWidth;\r\n var maxWidth = lastSpreadCol.maxWidth || options.cellMaxWidth;\r\n var newWidth = Math.max(Math.min(pixelsForLastCol, maxWidth), minWidth);\r\n item.style.width = newWidth + 'px';\r\n\r\n if (!isInit && isEmptyTable){\r\n // 将表格宽度设置为跟表头一样的宽度,使之可以出现底部滚动条,以便滚动查看所有字段\r\n mainTableElem.width(that.getContentWidth(headerTableElem));\r\n }\r\n // 二次校验,如果仍然出现横向滚动条(通常是 1px 的误差导致)\r\n // 不同屏幕分辨率、缩放水平以及浏览器渲染差异,可能会触发这个问题 \r\n if(that.layMain.prop('offsetHeight') > that.layMain.prop('clientHeight')){\r\n item.style.width = (parseFloat(item.style.width) - borderWidth) + 'px';\r\n }\r\n });\r\n }\r\n\r\n if (!isInit && isEmptyTable) {\r\n // 将表格宽度设置为跟表头一样的宽度,使之可以出现底部滚动条,以便滚动查看所有字段\r\n mainTableElem.width(that.getContentWidth(headerTableElem));\r\n } else {\r\n mainTableElem.width('auto');\r\n }\r\n\r\n that.setGroupWidth();\r\n\r\n };\r\n\r\n // 重置表格尺寸/结构\r\n Class.prototype.resize = function(){\r\n var that = this;\r\n\r\n var tableElemIsConnected = that.layMain && ('isConnected' in that.layMain[0]\r\n ? that.layMain[0].isConnected \r\n : $.contains(document.body, that.layMain[0]));\r\n\r\n if(!tableElemIsConnected) 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 that.loading(false);\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 that.loading(false);\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(true);\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 // 当前页不能超过总页数\r\n var count = res[response.countName];\r\n var pages = Math.ceil(count / options.limit) || 1;\r\n if(curr > pages){\r\n curr = pages;\r\n }\r\n that.totalRow = res[response.totalRowName];\r\n that.renderData({\r\n res: res,\r\n curr: curr,\r\n count: count,\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, opts.type);\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, opts.type);\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 item1[table.config.indexName] = i1;\r\n if(!sort) item1[table.config.initIndexName] = 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\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\"></i>',\r\n next: '<i class=\"layui-icon\"></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 // 合计内容\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 // td 显示内容\r\n var tdContent = 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\r\n return content;\r\n }();\r\n\r\n // 合计原始结果\r\n item3.field && that.dataTotal.push({\r\n field: item3.field,\r\n total: $('<div>'+ tdContent +'</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 }() +'>' + tdContent,\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.renderFormByElem = function(elem){\r\n layui.each(['input', 'select'], function(i, formType){\r\n form.render(elem.find(formType));\r\n })\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 };\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 var isCheckAllOrMult = isCheckAll || isCheckMult; // 是否全选或多选\r\n\r\n // treeTable 内部已处理选中,此处不再处理\r\n if(options.tree && options.tree.view) return;\r\n\r\n // 全选或多选时\r\n if (isCheckAllOrMult) {\r\n that.layBox.addClass(DISABLED_TRANSITION); // 减少回流\r\n if (opts.type === 'radio') return; // radio 不允许全选或多选\r\n }\r\n\r\n if(isCheckMult){\r\n var makeMap = {}\r\n layui.each(opts.index, function(i,v){\r\n makeMap[v] = true;\r\n })\r\n opts.index = makeMap;\r\n }\r\n\r\n // 匹配行元素\r\n var tbody = that.layBody.children('.layui-table').children('tbody');\r\n var selector = isCheckAllOrMult ? 'tr' : 'tr[data-index=\"'+ opts.index +'\"]';\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[dataIndex];\r\n } : '[data-index=\"'+ opts.index +'\"]');\r\n }(tbody.children(selector));\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 var radioCheckedIndex;\r\n\r\n // 给匹配行设置选中状态\r\n tr.each(function() {\r\n var el = $(this);\r\n var i = el.attr('data-index');\r\n var item = thisData[i];\r\n\r\n if (!i) return; // 此时 el 通常为静态表格嵌套时的原始模板\r\n\r\n // 绕过空项和禁用项\r\n if (layui.type(item) === 'array' || item[options.disabledName]) {\r\n return;\r\n }\r\n\r\n // 标记数据选中状态\r\n var checked = item[options.checkName] = getChecked(el.hasClass(ELEM_CHECKED));\r\n\r\n // 标记当前行背景色\r\n el.toggleClass(ELEM_CHECKED, !!checked);\r\n\r\n // 若为 radio 类型,则取消其他行选中背景色\r\n if (opts.type === 'radio') {\r\n radioCheckedIndex = i;\r\n el.siblings().removeClass(ELEM_CHECKED);\r\n }\r\n });\r\n\r\n // 若为 radio 类型,移除其他行数据选中状态\r\n if (radioCheckedIndex) {\r\n layui.each(thisData, function(i, item) {\r\n if (Number(radioCheckedIndex) !== Number(i)) {\r\n delete item[options.checkName];\r\n }\r\n });\r\n }\r\n\r\n // 若存在复选框或单选框,则标注选中状态样式\r\n var td = tr.children('td').children('.layui-table-cell');\r\n var checkedElem = td.children('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\r\n if(isCheckAllOrMult){\r\n setTimeout(function(){\r\n that.layBox.removeClass(DISABLED_TRANSITION);\r\n }, 100)\r\n }\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.initIndexName, 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(show){\r\n var that = this;\r\n var options = that.config;\r\n\r\n if(options.loading){\r\n that.layBox.find(ELEM_INIT).toggleClass(HIDE, !show); \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 callback(item);\r\n return 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);\r\n };\r\n\r\n /**\r\n * @typedef updateRowOptions\r\n * @prop {number} index - 行索引\r\n * @prop {Object.<string, any>} data - 行数据\r\n * @prop {boolean | ((field, index) => boolean)} [related] - 更新其他包含自定义模板且可能有所关联的列视图\r\n */\r\n /**\r\n * 更新指定行\r\n * @param {updateRowOptions | updateRowOptions[]} opts \r\n * @param {(field: string, value: any) => void} [callback] - 更新每个字段时的回调函数\r\n */\r\n Class.prototype.updateRow = function(opts, callback){\r\n var that = this;\r\n var ELEM_CELL = '.layui-table-cell';\r\n var opts = layui.type(opts) === 'array' ? opts : [opts];\r\n var dataCache = table.cache[that.key] || [];\r\n\r\n var update = function(opt){\r\n var index = opt.index;\r\n var row = opt.data;\r\n var related = opt.related;\r\n\r\n var data = dataCache[index] || {};\r\n var tr = that.layBody.find('tr[data-index=\"' + index + '\"]');\r\n\r\n // 更新缓存中的数据\r\n layui.each(row, function (key, value) {\r\n data[key] = value;\r\n callback && callback(key, value);\r\n });\r\n\r\n // 更新单元格\r\n that.eachCols(function (i, item3) {\r\n var field = String(item3.field || i);\r\n var shouldUpdate = field in row || ((typeof related === 'function' ? related(field, i) : related) && (item3.templet || item3.toolbar));\r\n if(shouldUpdate){\r\n var td = tr.children('td[data-field=\"' + field + '\"]');\r\n var cell = td.children(ELEM_CELL);\r\n var content = data[item3.field];\r\n 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 td.data(\"content\", content);\r\n that.renderFormByElem(cell);\r\n }\r\n });\r\n }\r\n\r\n layui.each(opts, function(i, opt){\r\n update(opt);\r\n });\r\n };\r\n\r\n /**\r\n * 更新指定行\r\n * @param {string} id - table ID\r\n * @param {updateRowOptions | updateRowOptions[]} options \r\n */\r\n table.updateRow = function (id, options){\r\n var that = getThisTable(id);\r\n return that.updateRow(options);\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\r\n // 弹出工具下拉面板\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 // 头部工具栏右侧图标\r\n layui.each(options.defaultToolbar, function(index, item) {\r\n if (item.layEvent === events) {\r\n typeof item.onClick === 'function' && item.onClick({\r\n data: data,\r\n config: options,\r\n openPanel: openPanel,\r\n elem: othis\r\n });\r\n return true;\r\n }\r\n });\r\n\r\n // table toolbar 事件\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 dict.allowResize = false;\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(MOD_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(MOD_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 that.updateRow({\r\n index: index,\r\n data: fields,\r\n related: related\r\n }, function(key, value){\r\n obj.data[key] = value;\r\n });\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 }\r\n\r\n layui.stope(e);\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 setRowEvent.call(this, 'row', e);\r\n }).on('dblclick', 'tr', function(e){ // 双击行\r\n setRowEvent.call(this, 'rowDouble', e);\r\n }).on('contextmenu', 'tr', function(e){ // 菜单\r\n if (!options.defaultContextmenu) e.preventDefault();\r\n setRowEvent.call(this, 'rowContextmenu', e);\r\n });\r\n\r\n // 创建行单击、双击、菜单事件\r\n var setRowEvent = function(eventType, e){\r\n var othis = $(this);\r\n if(othis.data('off')) return; // 不触发事件\r\n\r\n // 不触发「行单/双击事件」的子元素\r\n if (eventType !== 'rowContextmenu') {\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\r\n if($(e.target).is(UNROW) || $(e.target).closest(UNROW)[0]){\r\n return;\r\n }\r\n }\r\n\r\n layui.event.call(\r\n this,\r\n MOD_NAME, eventType + '('+ filter +')',\r\n commonMember.call(othis.children('td')[0], {\r\n e: e\r\n })\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.prop('clientWidth') ||\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 elemCell.scrollTop(0);\r\n elemCell.scrollLeft(0); \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 var rAF = window.requestAnimationFrame || function(fn){return setTimeout(fn, 1000 / 60)};\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 = 100;\r\n var rAFStep = 10;\r\n\r\n e.preventDefault();\r\n var cb = function(){\r\n if(step > 0){\r\n step -= rAFStep;\r\n scrollTop += (delta > 0 ? -rAFStep : rAFStep);\r\n that.layMain.scrollTop(scrollTop);\r\n rAF(cb);\r\n }\r\n }\r\n rAF(cb);\r\n });\r\n }\r\n\r\n /**\r\n * 获取元素的大小\r\n * @param {HTMLElement} elem - HTML 元素\r\n */\r\n Class.prototype.getElementSize = function(elem){\r\n if(!window.getComputedStyle) return;\r\n\r\n var style = window.getComputedStyle(elem, null);\r\n return {\r\n height: parseFloat(style.height || '0'),\r\n width: parseFloat(style.width || '0'),\r\n borderTopWidth: parseFloat(style.borderTopWidth || '0'),\r\n borderRightWidth: parseFloat(style.borderRightWidth || '0'),\r\n borderBottomWidth: parseFloat(style.borderBottomWidth || '0'),\r\n borderLeftWidth: parseFloat(style.borderLeftWidth || '0'),\r\n paddingTop: parseFloat(style.paddingTop || '0'),\r\n paddingRight: parseFloat(style.paddingRight || '0'),\r\n paddingBottom: parseFloat(style.paddingBottom || '0'),\r\n paddingLeft: parseFloat(style.paddingLeft || '0'),\r\n marginTop: parseFloat(style.marginTop || '0'),\r\n marginRight: parseFloat(style.marginRight || '0'),\r\n marginBottom: parseFloat(style.marginBottom || '0'),\r\n marginLeft: parseFloat(style.marginLeft || '0'),\r\n boxSizing: style.boxSizing\r\n }\r\n }\r\n\r\n /**\r\n * 获取元素 content 区域宽度值\r\n * \r\n * layui 内置 jQuery v1.12.4 中的 jQuery.fn.width 始终对值四舍五入(3.x 已修复),\r\n * 在支持 subpixel Rendering 的浏览器中渲染表格,由于列宽分配时计算值精度不足,\r\n * 可能会导致一些小问题(#1726)\r\n * \r\n * 这个方法使用 getComputedStyle 获取精确的宽度值进行计算,为了尽可能和以前的行为\r\n * 保持一致(主要是隐藏元素内渲染 table 递归获取父元素宽度 https://github.com/layui/layui/discussions/2398),\r\n * 任何非预期的值,都回退到 jQuery.fn.width。未来的版本使用 ResizeObserver 时,可以直接获取表格视图元素的宽度,\r\n * 并移除兼容性代码\r\n * \r\n * @param {JQuery} elem - 元素的 jQuery 对象\r\n * \r\n * @see {@link https://learn.microsoft.com/zh-cn/archive/blogs/ie_cn/css-3}\r\n */\r\n Class.prototype.getContentWidth = function(elem){\r\n var that = this;\r\n\r\n if(\r\n // document\r\n elem[0].nodeType === 9 ||\r\n // IE 中 border-box 盒模型,getComputedStyle 得到的 width/height 是按照 content-box 计算出来的\r\n (lay.ie && elem.css('box-sizing') === 'border-box') ||\r\n elem.css('display') === 'none'\r\n ){\r\n return elem.width();\r\n }\r\n\r\n var size = that.getElementSize(elem[0]);\r\n\r\n // display: none|inline 元素,getComputedStyle 无法得到准确的 width/height\r\n if(typeof size === 'undefined' || !size.width){\r\n return elem.width();\r\n }else{\r\n return size.boxSizing === 'border-box'\r\n ? size.width - size.paddingLeft - size.paddingRight - size.borderLeftWidth - size.borderRightWidth\r\n : size.width\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 invalidNum = 0;\r\n var arr = [];\r\n var dataCache = [];\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 arr.push(table.clearCacheKey(item));\r\n dataCache.push(item);\r\n }\r\n });\r\n\r\n return {\r\n data: arr, // 选中的数据\r\n dataCache: dataCache, // 选中的原始缓存数据,包含内部特定字段\r\n isAll: (data.length && arr.length) ? (arr.length === (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 var isTreeTable = config.tree && config.tree.view;\r\n if (isTreeTable) {\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 if (isTreeTable) i1 = item1['LAY_DATA_INDEX']; // 兼容 treeTable 索引\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.initIndexName];\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 * 获取当前实例\r\n * @param {string} id 表格id\r\n * @returns {Class}\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 MOD_ID = 'lay-table-id';\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 var HTML_TAG_RE = /<[^>]+?>/;\r\n var ICON_PROPS = ['flexIconClose', 'flexIconOpen', 'iconClose', 'iconOpen', 'iconLeaf', 'icon']\r\n\r\n /**\r\n * 构造器\r\n * @class\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 // treeTable重载数据时,会先加载显示顶层节点,然后根据重载数据前的子节点展开状态,展开相应的子节点,\r\n // 那么如果重载数据前有滚动条滚动在某个位子,重新加载时顶层节点如果比较少,只显示顶层节点时没有滚动条的情况下,\r\n // 自动展开子节点后,滚动条就会显示在顶部,无法保持在重载数据之前的位置。\r\n // 处理保持滚动条的问题,重载数据前记录滚动条的位置\r\n if(reload === 'reloadData' && thatOptionsTemp.scrollPos === 'fixed'){\r\n that.scrollTopCache = that.config.elem.next().find(ELEM_BODY).scrollTop();\r\n }\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 if(options.data !== undefined){\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\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 // undefined: 初始 render 或 reload,两者本质没有区别可以不做区分\r\n // 'reloadData': 重载数据\r\n // 'renderData': 重新渲染数据\r\n var renderType = args[3];\r\n var isRenderData = renderType === '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 // 恢复滚动条位置\r\n if(renderType === 'reloadData' && doneThat.scrollPos === 'fixed'){\r\n tableView.find(ELEM_BODY).scrollTop(that.scrollTopCache);\r\n }\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 if(options && options.tree && options.tree.view){\r\n layui.each(ICON_PROPS, function(i, iconProp){\r\n if(options.tree.view[iconProp] !== undefined){\r\n options.tree.view[iconProp] = that.normalizedIcon(options.tree.view[iconProp]);\r\n }\r\n })\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.normalizedIcon = function(iconStr){\r\n return iconStr\r\n ? HTML_TAG_RE.test(iconStr) ? iconStr : '<i class=\"' + iconStr +'\"></i>'\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 // 创建一个空的 map 对象,用于保存所有的节点\r\n var map = {};\r\n var rootNodes = [];\r\n\r\n var idTemp = '';\r\n var pidTemp = '';\r\n layui.each(flatArr, function(index, item){\r\n idTemp = idKey + item[idKey];\r\n pidTemp = idKey + item[pIdKey];\r\n\r\n // 将节点存入 map 对象\r\n if(!map[idTemp]){\r\n map[idTemp] = {};\r\n map[idTemp][childrenKey] = [];\r\n }\r\n\r\n // 合并节点\r\n var tempObj = {};\r\n tempObj[childrenKey] = map[idTemp][childrenKey];\r\n map[idTemp] = $.extend({}, item, tempObj);\r\n\r\n var isRootNode = (rootPid ? map[idTemp][pIdKey] === rootPid : !map[idTemp][pIdKey]);\r\n if(isRootNode){\r\n rootNodes.push(map[idTemp]);\r\n }else{\r\n if(!map[pidTemp]){\r\n map[pidTemp] = {};\r\n map[pidTemp][childrenKey] = [];\r\n }\r\n map[pidTemp][childrenKey].push(map[idTemp]);\r\n }\r\n });\r\n\r\n return rootNodes;\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 \r\n dataNew[pIdKey] = typeof item1[pIdKey] !== 'undefined' ? 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 var update = function(data, parentIndex){\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 update(item1[childrenKey] || [], dataIndex);\r\n });\r\n }\r\n\r\n update(data, parentIndex);\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(MOD_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 var flexIconElem = trsElem.find('.layui-table-tree-flexIcon');\r\n treeTableThat.updateNodeIcon({\r\n scopeEl: trsElem,\r\n isExpand: trExpand,\r\n isParent: trData[isParentKey]\r\n });\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] || trData[LAY_ASYNC_STATUS] === 'error')) {\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 trData[LAY_EXPAND] = false;\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 trData[LAY_EXPAND] = false;\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 }).data('index', childItem[LAY_DATA_INDEX]);\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 }).data('index', childItem[LAY_DATA_INDEX]);\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 }).data('index', childItem[LAY_DATA_INDEX]);\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).data('index', dataItem[LAY_DATA_INDEX]);\r\n trAllObj.trs_fixed.eq(dataIndex).attr(props).data('index', dataItem[LAY_DATA_INDEX]);\r\n trAllObj.trs_fixed_r.eq(dataIndex).attr(props).data('index', dataItem[LAY_DATA_INDEX]);\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 /**\r\n * @typedef updateNodeIconOptions\r\n * @prop {JQuery} scopeEl - tr 元素\r\n * @prop {boolean} isExpand - 是否是展开图标\r\n * @prop {boolean} isParent - 是否是父节点图标\r\n */\r\n /**\r\n * 更新节点图标\r\n * @param {updateNodeIconOptions} opts\r\n */\r\n Class.prototype.updateNodeIcon = function(opts){\r\n var that = this;\r\n var options = that.getOptions();\r\n var treeOptions = options.tree || {};\r\n var scopeEl = opts.scopeEl;\r\n var isExpand = opts.isExpand;\r\n var isParent = opts.isParent;\r\n\r\n // 处理折叠按钮图标\r\n var flexIconElem = scopeEl.find('.layui-table-tree-flexIcon');\r\n\r\n flexIconElem\r\n .css('visibility', isParent || treeOptions.view.showFlexIconIfNotParent ? 'visible' : 'hidden')\r\n .html(isExpand ? treeOptions.view.flexIconOpen : treeOptions.view.flexIconClose);\r\n // 处理节点图标\r\n if(treeOptions.view.showIcon){\r\n var nodeIconElem = scopeEl.find('.layui-table-tree-nodeIcon:not(.layui-table-tree-iconCustom)');\r\n var nodeIcon = isParent \r\n ? (isExpand ? treeOptions.view.iconOpen : treeOptions.view.iconClose)\r\n : treeOptions.view.iconLeaf;\r\n\r\n nodeIconElem\r\n .toggleClass('layui-table-tree-iconLeaf', !isParent)\r\n .html(nodeIcon);\r\n }\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 existsData = options.data.length; // 是否直接赋值 data\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 // fix: 修正直接赋值 data 时顶层节点 LAY_DATA_INDEX 值的异常问题\r\n if (existsData) {\r\n dataItem[LAY_DATA_INDEX] = String(dataIndex);\r\n }\r\n var layDataIndex = dataItem[LAY_DATA_INDEX];\r\n tableViewElem.find('.layui-table-main tbody tr[data-level=\"0\"]:eq(' + dataIndex + ')').attr('lay-data-index', layDataIndex);\r\n tableViewElem.find('.layui-table-fixed-l tbody tr[data-level=\"0\"]:eq(' + dataIndex + ')').attr('lay-data-index', layDataIndex);\r\n tableViewElem.find('.layui-table-fixed-r tbody tr[data-level=\"0\"]:eq(' + dataIndex + ')').attr('lay-data-index', layDataIndex);\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 (that.normalizedIcon(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[' + MOD_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[' + MOD_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 var treeOptions = options.tree;\r\n\r\n var tableData = treeTable.getData(id);\r\n var customName = treeOptions.customName;\r\n var childrenKey = customName.children;\r\n\r\n // 只和同级节点排序\r\n var sort = function(data, field, type){\r\n layui.sort(data, field, type, true);\r\n layui.each(data, function(rowIndex, trData){\r\n sort(trData[childrenKey] || [], field, type);\r\n })\r\n }\r\n\r\n if (options.autoSort) {\r\n var initSort = options.initSort;\r\n if (initSort.type) {\r\n sort(tableData, initSort.field, initSort.type === 'desc');\r\n } else {\r\n // 恢复默认\r\n sort(tableData, table.config.indexName, null);\r\n }\r\n // 更新缓存中数据的顺序\r\n table.cache[id] = tableData;\r\n // 重新初始化缓存数据\r\n that.initData(tableData);\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 }).data('index', trIndex));\r\n });\r\n that.renderTreeTable(tableView.find('tr[lay-data-index=\"' + index + '\"]'), trLevel);\r\n }\r\n\r\n // 删除数据\r\n // _keepParent 暂时为私有参数,仅供内部使用\r\n treeTable.removeNode = function (id, node, _keepParent) {\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 isParentKey = treeOptions.customName.isParent;\r\n var childrenKey = treeOptions.customName.children;\r\n var tableView = options.elem.next();\r\n var delNode;\r\n var indexArr = [];\r\n var tableCache = table.cache[id];\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, delNode) {\r\n var delNodeDataIndex = delNode[LAY_DATA_INDEX];\r\n indexArr.push('tr[lay-data-index=\"' + delNodeDataIndex + '\"]');\r\n // 删除临时 key\r\n if(delNodeDataIndex.indexOf('-') !== -1){\r\n delete tableCache[delNodeDataIndex]; \r\n }\r\n })\r\n\r\n tableView.find(indexArr.join(',')).remove(); // 删除行\r\n\r\n var deleteCacheKey = function(){\r\n for (var key in tableCache) {\r\n // 根节点 getNodeDataByIndex 内部已处理\r\n if(key.indexOf('-') !== -1){\r\n // L93 updateCache() 中,cacheKey 取自 rowData 中的 LAY_DATA_INDEX,\r\n // 两者不同说明当前 cacheKey 引用的 rowData 已被更新\r\n if(key !== tableCache[key][LAY_DATA_INDEX]){\r\n delete tableCache[key]\r\n }\r\n }\r\n }\r\n }\r\n\r\n // 重新整理数据\r\n var tableData = that.initData();\r\n deleteCacheKey();\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 }).data('index', item3[LAY_DATA_INDEX]);\r\n // item3[LAY_DATA_INDEX_HISTORY] = item3[LAY_DATA_INDEX]\r\n }\r\n });\r\n // 重新更新顶层节点的data-index;\r\n layui.each(tableCache, function (i4, item4) {\r\n tableView.find('tr[data-level=\"0\"][lay-data-index=\"' + item4[LAY_DATA_INDEX] + '\"]')\r\n .attr('data-index', i4)\r\n .data('index', i4);\r\n })\r\n options.hasNumberCol && formatNumber(that);\r\n // 更新父节点状态\r\n if(nodeP){\r\n var trEl = tableView.find('tr[lay-data-index=\"' + nodeP[LAY_DATA_INDEX] + '\"]');\r\n\r\n if(!_keepParent){\r\n nodeP[isParentKey] = !!(nodeP[childrenKey] && nodeP[childrenKey].length);\r\n }\r\n\r\n that.updateNodeIcon({\r\n scopeEl: trEl,\r\n isExpand: nodeP[LAY_EXPAND],\r\n isParent: nodeP[isParentKey],\r\n }); \r\n }\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).data('index', newNodeItem[LAY_DATA_INDEX]);\r\n newNodesHtmlObj.trs_fixed.eq(newNodeIndex).attr(attrs).data('index', newNodeItem[LAY_DATA_INDEX]);\r\n newNodesHtmlObj.trs_fixed_r.eq(newNodeIndex).attr(attrs).data('index', newNodeItem[LAY_DATA_INDEX]);\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 var hasTr = tableViewElemMAIN.find('tr[data-level=\"0\"][data-index=\"0\"]')[0];\r\n if(hasTr){\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 tableViewElemMAIN.find('tbody').prepend(newNodesHtmlObj.trs);\r\n tableViewElemFIXL.find('tbody').prepend(newNodesHtmlObj.trs_fixed);\r\n tableViewElemFIXR.find('tbody').prepend(newNodesHtmlObj.trs_fixed_r);\r\n }\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] + '\"]')\r\n .attr('data-index', i4)\r\n .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 // 更新父节点图标状态\r\n if(parentNode){\r\n var trEl = tableViewElem.find('tr[lay-data-index=\"' + parentNode[LAY_DATA_INDEX] + '\"]');\r\n that.updateNodeIcon({\r\n scopeEl: trEl,\r\n isExpand: parentNode[LAY_EXPAND],\r\n isParent: parentNode[isParentKey],\r\n }); \r\n }\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 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\r\n if(data.length > 0){\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 }else{\r\n isAll = false;\r\n }\r\n \r\n isIndeterminate = isIndeterminate && !isAll;\r\n 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 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 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 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], true);\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 * tabs\r\n * 标签页组件\r\n */\r\n\r\nlayui.define('component', function(exports) {\r\n 'use strict';\r\n\r\n var $ = layui.$;\r\n\r\n // 创建组件\r\n var component = layui.component({\r\n name: 'tabs', // 组件名\r\n\r\n // 默认配置\r\n config: {\r\n elem: '.layui-tabs',\r\n trigger: 'click', // 标签切换的触发事件\r\n headerMode: 'auto' // 标签头部的显示模式 auto | scroll | normal\r\n },\r\n\r\n CONST: {\r\n ELEM: 'layui-tabs',\r\n HEADER: 'layui-tabs-header',\r\n CLOSE: 'layui-tabs-close',\r\n BODY: 'layui-tabs-body',\r\n ITEM: 'layui-tabs-item',\r\n CARD: 'layui-tabs-card'\r\n },\r\n\r\n isRenderOnEvent: false,\r\n\r\n // 渲染\r\n render: function() {\r\n var that = this;\r\n var options = that.config;\r\n\r\n // 标签页元素项\r\n that.headerElem = ['.'+ component.CONST.HEADER + ':eq(0)', '>li'];\r\n that.bodyElem = ['.'+ component.CONST.BODY + ':eq(0)', '>.'+ component.CONST.ITEM];\r\n\r\n // 获取标签容器中的 header body 相关元素\r\n that.getContainer = function() {\r\n var elem = that.documentElem || options.elem;\r\n return {\r\n header: {\r\n elem: elem.find(that.headerElem[0]),\r\n items: elem.find(that.headerElem.join(''))\r\n },\r\n body: {\r\n elem: elem.find(that.bodyElem[0]),\r\n items: elem.find(that.bodyElem.join(''))\r\n }\r\n };\r\n };\r\n\r\n // 若 header 选项类型为数组\r\n if (layui.type(options.header) === 'array') {\r\n if (options.header.length === 0) return;\r\n\r\n // 给任意元素绑定 tabs 切换功能\r\n if (typeof options.header[0] === 'string') {\r\n that.headerElem = options.header.concat();\r\n that.documentElem = $(document);\r\n } else { // 方法传值渲染\r\n that.elemView = $('<div class=\"layui-tabs\"></div>');\r\n if (options.className) that.elemView.addClass(options.className);\r\n\r\n var headerElem = $('<ul class=\"layui-tabs-header\"></ul>');\r\n var bodyElem = $('<div class=\"layui-tabs-body\"></div>');\r\n\r\n // 生成标签项\r\n layui.each(options.header, function(i, item){\r\n var elemHeaderItem = that.renderHeaderItem(item);\r\n headerElem.append(elemHeaderItem);\r\n });\r\n layui.each(options.body, function(i, item){\r\n var elemBodyItem = that.renderBodyItem(item);\r\n bodyElem.append(elemBodyItem);\r\n });\r\n\r\n that.elemView.append(headerElem).append(bodyElem);\r\n options.elem.html(that.elemView);\r\n }\r\n } else {\r\n that.renderClose(); // 初始化标签关闭结构\r\n }\r\n\r\n // 若 body 选项类型为数组\r\n if (layui.type(options.body) === 'array') {\r\n if (typeof options.body[0] === 'string') {\r\n that.documentElem = $(document);\r\n that.bodyElem = options.body.concat();\r\n }\r\n }\r\n\r\n // 初始选中项\r\n var data = that.data();\r\n if ('index' in options && data.index != options.index) {\r\n that.change(that.findHeaderItem(options.index), true);\r\n } else if (data.index === -1) { // 初始选中项为空时,默认选中第一个\r\n that.change(that.findHeaderItem(0), true);\r\n }\r\n\r\n // 初始化滚动结构\r\n that.roll('auto');\r\n\r\n // 清除隐藏占位\r\n if (options.elem.hasClass(component.CONST.CLASS_HIDEV)) {\r\n options.elem.removeClass(component.CONST.CLASS_HIDEV);\r\n }\r\n\r\n // 回调\r\n typeof options.afterRender === 'function' && options.afterRender(data);\r\n\r\n // 渲染成功后的事件\r\n layui.event.call(\r\n options.elem[0],\r\n component.CONST.MOD_NAME,\r\n 'afterRender('+ options.id +')',\r\n data\r\n );\r\n },\r\n\r\n // 事件\r\n events: function() {\r\n var that = this;\r\n var options = that.config;\r\n var container = that.getContainer();\r\n var MOD_NAME = component.CONST.MOD_NAME;\r\n var TRIGGER_NAMESPACE = '.lay_'+ MOD_NAME + '_trigger';\r\n var delegatedElement = that.documentElem ? container.header.elem : options.elem;\r\n\r\n // 标签头部事件\r\n var trigger = options.trigger + TRIGGER_NAMESPACE;\r\n var elemHeaderItem = that.documentElem ? that.headerElem[1] : that.headerElem.join('');\r\n delegatedElement.off(trigger).on(trigger, elemHeaderItem, function() {\r\n that.change($(this));\r\n });\r\n\r\n // 窗口 resize 事件\r\n if (!inner.onresize) {\r\n var timer;\r\n $(window).on('resize', function() {\r\n clearTimeout(timer);\r\n timer = setTimeout(function(){\r\n layui.each(component.cache.id, function(key) {\r\n var that = component.getThis(key);\r\n if(!that) return;\r\n that.roll('init');\r\n });\r\n }, 50);\r\n });\r\n inner.onresize = true;\r\n }\r\n }\r\n });\r\n\r\n // 内部变量集\r\n var inner = {};\r\n\r\n /**\r\n * 扩展组件原型方法\r\n */\r\n\r\n var Class = component.Class;\r\n\r\n /**\r\n * 增加标签\r\n * @param {Object} opts\r\n * @param {string} opts.title - 标签标题\r\n * @param {string} opts.content - 标签内容\r\n * @param {string} opts.id - 标签的 lay-id 属性值\r\n * @param {string} [opts.index] - 活动标签索引,默认取当前选中标签的索引\r\n * @param {('append'|'prepend'|'after'|'before')} [opts.mode='append'] - 标签插入方式\r\n * @param {string} [opts.closable] - 标签是否可关闭。初始值取决于 options.closable\r\n * @param {string} [opts.headerItem] - 自定义标签头部元素\r\n * @param {string} [opts.bodyItem] - 自定义标签内容元素\r\n * @param {Function} [opts.done] - 标签添加成功后执行的回调函数\r\n */\r\n Class.prototype.add = function(opts) {\r\n var that = this;\r\n var options = that.config;\r\n var container = that.getContainer();\r\n var newHeaderItem = that.renderHeaderItem(opts);\r\n var newBodyItem = that.renderBodyItem(opts);\r\n\r\n // 插入方式\r\n if (/(before|after)/.test(opts.mode)) { // 在活动标签前后插入\r\n var data = that.data();\r\n var hasOwnIndex = opts.hasOwnProperty('index');\r\n var headerItem = hasOwnIndex ? that.findHeaderItem(opts.index) : data.thisHeaderItem;\r\n var bodyItem = hasOwnIndex ? that.findBodyItem(opts.index) : data.thisHeaderItem;\r\n headerItem[opts.mode](newHeaderItem);\r\n bodyItem[opts.mode](newBodyItem);\r\n } else { // 在标签最前后插入\r\n var mode = ({\r\n prepend: 'prepend', // 插入标签到最前\r\n append: 'append' // 插入标签到最后\r\n })[opts.mode || 'append'] || 'append';\r\n container.header.elem[mode](newHeaderItem);\r\n container.body.elem[mode](newBodyItem);\r\n }\r\n\r\n // 将插入项切换为当前标签\r\n that.change(newHeaderItem, true);\r\n\r\n // 回调\r\n var params = that.data();\r\n typeof opts.done === 'function' && opts.done(params);\r\n };\r\n\r\n /**\r\n * 关闭指定标签\r\n * @param {Object} thisHeaderItem - 当前标签头部项元素\r\n * @param {boolean} force - 是否强制删除\r\n */\r\n Class.prototype.close = function(thisHeaderItem, force) {\r\n if(!thisHeaderItem || !thisHeaderItem[0]) return;\r\n\r\n var that = this;\r\n var options = that.config;\r\n var index = thisHeaderItem.index();\r\n\r\n if (!thisHeaderItem[0]) return;\r\n\r\n // 标签是否不可关闭\r\n if (thisHeaderItem.attr('lay-closable') === 'false') {\r\n return;\r\n }\r\n\r\n // 当前标签相关数据\r\n var params = that.data();\r\n\r\n // 标签关闭前的事件。若非强制关闭,可则根据事件的返回结果决定是否关闭\r\n if (!force) {\r\n var closable = layui.event.call(\r\n thisHeaderItem[0],\r\n component.CONST.MOD_NAME,\r\n 'beforeClose('+ options.id +')',\r\n $.extend(params, {\r\n index: thisHeaderItem.index()\r\n })\r\n );\r\n\r\n // 是否阻止关闭\r\n if (closable === false) {\r\n return;\r\n }\r\n }\r\n\r\n // 如果关闭的是当前标签,则更换当前标签索引\r\n if (thisHeaderItem.hasClass(component.CONST.CLASS_THIS)) {\r\n if (thisHeaderItem.next()[0]) {\r\n that.change(thisHeaderItem.next(), true);\r\n } else if(thisHeaderItem.prev()[0]) {\r\n that.change(thisHeaderItem.prev(), true);\r\n }\r\n }\r\n\r\n // 移除元素\r\n thisHeaderItem.remove();\r\n that.findBodyItem(index).remove();\r\n\r\n that.roll('auto', index);\r\n\r\n // 获取当前标签相关数据\r\n var params = that.data();\r\n\r\n // 标签关闭后的事件\r\n layui.event.call(\r\n params.thisHeaderItem[0],\r\n component.CONST.MOD_NAME,\r\n 'afterClose('+ options.id +')',\r\n params\r\n );\r\n };\r\n\r\n /**\r\n * 批量关闭标签\r\n * @see tabs.close\r\n */\r\n Class.prototype.closeMult = function(mode, index) {\r\n var that = this;\r\n var options = that.config;\r\n var container = that.getContainer();\r\n var data = that.data();\r\n var headers = container.header.items;\r\n var bodys = container.body.items;\r\n var DISABLED_CLOSE_SELECTOR = '[lay-closable=\"false\"]'; // 不可关闭标签选择器\r\n var FILTER = ':not('+ DISABLED_CLOSE_SELECTOR +')'; // 不可关闭标签过滤器\r\n\r\n index = index === undefined ? data.index : index;\r\n\r\n // 将标签头 lay-closable 属性值同步到 body 项\r\n headers.each(function(i) {\r\n var othis = $(this);\r\n var closableAttr = othis.attr('lay-closable');\r\n if (closableAttr) {\r\n bodys.eq(i).attr('lay-closable', closableAttr);\r\n }\r\n });\r\n\r\n // 若当前选中标签也允许关闭,则尝试寻找不可关闭的标签并将其选中\r\n if (data.thisHeaderItem.attr('lay-closable') !== 'false') {\r\n if(mode === 'all' || !mode){\r\n var nextHeader = headers.filter(':gt('+ data.index +')'+ DISABLED_CLOSE_SELECTOR).eq(0);\r\n var prevHeader = $(headers.filter(':lt('+ data.index +')'+ DISABLED_CLOSE_SELECTOR).get().reverse()).eq(0);\r\n if (nextHeader[0]) {\r\n that.change(nextHeader, true);\r\n } else if(prevHeader[0]) {\r\n that.change(prevHeader, true);\r\n }\r\n } else if(index !== data.index) { // 自动切换到活动标签(功能可取消)\r\n that.change(that.findHeaderItem(index), true);\r\n }\r\n }\r\n\r\n // 执行批量关闭标签\r\n if (mode === 'other') { // 关闭其他标签\r\n headers.eq(index).siblings(FILTER).remove();\r\n bodys.eq(index).siblings(FILTER).remove();\r\n } else if(mode === 'right') { // 关闭右侧标签\r\n headers.filter(':gt('+ index +')'+ FILTER).remove();\r\n bodys.filter(':gt('+ index +')'+ FILTER).remove();\r\n } else { // 关闭所有标签\r\n headers.filter(FILTER).remove();\r\n bodys.filter(FILTER).remove();\r\n }\r\n\r\n that.roll('auto');\r\n\r\n // 回调\r\n var params = that.data();\r\n\r\n // 标签关闭后的事件\r\n layui.event.call(\r\n params.thisHeaderItem[0],\r\n component.CONST.MOD_NAME,\r\n 'afterClose('+ options.id +')',\r\n params\r\n );\r\n };\r\n\r\n /**\r\n * 切换标签\r\n * @param {Object} thisHeaderItem - 当前标签头部项元素\r\n * @param {boolean} [force=false] - 是否强制切换\r\n * @returns\r\n */\r\n Class.prototype.change = function(thisHeaderItem, force) {\r\n if (!thisHeaderItem || !thisHeaderItem[0]) return;\r\n\r\n var that = this;\r\n var options = that.config;\r\n var index = thisHeaderItem.index();\r\n var thatA = thisHeaderItem.find('a');\r\n // 是否存在跳转链接\r\n var isLink = typeof thatA.attr('href') === 'string' && thatA.attr('target') === '_blank';\r\n // 是否不允许选中\r\n var unselect = typeof thisHeaderItem.attr('lay-unselect') === 'string';\r\n\r\n // 不满足切换的条件\r\n if (isLink || unselect) {\r\n return;\r\n }\r\n\r\n // 当前标签相关数据\r\n var params = that.data();\r\n\r\n // 标签关闭前的事件。若非强制关闭,可则根据事件的返回结果决定是否关闭\r\n if (!force) {\r\n var enable = layui.event.call(\r\n thisHeaderItem[0],\r\n component.CONST.MOD_NAME,\r\n 'beforeChange('+ options.id +')',\r\n $.extend(params, {\r\n from: {\r\n index: params.index,\r\n headerItem: params.thisHeaderItem\r\n },\r\n to: {\r\n index: thisHeaderItem.index(),\r\n headerItem: thisHeaderItem\r\n }\r\n })\r\n );\r\n\r\n // 是否阻止切换\r\n if (enable === false) {\r\n return;\r\n }\r\n }\r\n\r\n // 执行标签头部切换\r\n thisHeaderItem.addClass(component.CONST.CLASS_THIS).siblings()\r\n .removeClass(component.CONST.CLASS_THIS);\r\n\r\n // 执行标签内容切换\r\n that.findBodyItem(index).addClass(component.CONST.CLASS_SHOW)\r\n .siblings().removeClass(component.CONST.CLASS_SHOW);\r\n\r\n that.roll('auto', index);\r\n\r\n // 重新获取标签相关数据\r\n var params = that.data();\r\n\r\n // 标签切换后的事件\r\n layui.event.call(\r\n params.thisHeaderItem[0],\r\n component.CONST.MOD_NAME,\r\n 'afterChange('+ options.id +')',\r\n params\r\n );\r\n };\r\n\r\n /**\r\n * 渲染标签头部项\r\n * @param {Object} opts - 标签项配置信息\r\n */\r\n Class.prototype.renderHeaderItem = function(opts) {\r\n var that = this;\r\n var options = that.config;\r\n var headerItem = $(opts.headerItem || options.headerItem || '<li></li>');\r\n\r\n headerItem.html(opts.title || 'New Tab');\r\n\r\n // 追加属性\r\n layui.each(opts, function(key, value){\r\n if(/^(title|content|mode|done)$/.test(key)) return;\r\n headerItem.attr('lay-'+ key, value);\r\n });\r\n\r\n // 追加标签关闭元素\r\n that.appendClose(headerItem, opts);\r\n\r\n return headerItem;\r\n };\r\n\r\n /**\r\n * 渲染标签内容项\r\n * @param {Object} opts - 标签项配置信息\r\n */\r\n Class.prototype.renderBodyItem = function(opts) {\r\n var that = this\r\n var options = that.config\r\n var bodyItem = $(opts.bodyItem || options.bodyItem || '<div class=\"'+ component.CONST.ITEM +'\"></div>');\r\n\r\n bodyItem.html(opts.content || '');\r\n return bodyItem;\r\n };\r\n\r\n /**\r\n * 给某一个标签项追加可关闭元素\r\n * @param {Object} headerItem - 标签项元素\r\n * @param {Object} opts - 标签项配置信息\r\n */\r\n Class.prototype.appendClose = function(headerItem, opts) {\r\n var that = this\r\n var options = that.config;\r\n\r\n if (!options.closable) return;\r\n\r\n opts = opts || {};\r\n\r\n // 不可关闭项\r\n if (opts.closable === 'false' || headerItem.attr('lay-closable') === 'false') {\r\n return;\r\n }\r\n\r\n // 可关闭项追加关闭按钮\r\n if (!headerItem.find('.'+ component.CONST.CLOSE)[0]) {\r\n var close = $('<i class=\"layui-icon layui-icon-close layui-unselect '+ component.CONST.CLOSE +'\"></i>');\r\n close.on('click', function(){\r\n that.close($(this).parent());\r\n return false;\r\n });\r\n headerItem.append(close);\r\n }\r\n };\r\n\r\n // 渲染标签可关闭元素\r\n Class.prototype.renderClose = function() {\r\n var that = this;\r\n var options = that.config;\r\n var container = that.getContainer();\r\n\r\n // 是否开启关闭\r\n if (options.closable) {\r\n container.header.items.each(function() {\r\n that.appendClose($(this));\r\n });\r\n } else {\r\n container.header.items.each(function() {\r\n $(this).find('.'+ component.CONST.CLOSE).remove();\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * 标签头滚动\r\n * @param {('auto'|'prev'|'next'|'init')} [mode='next'] - 滚动方式\r\n * @param {number} index - 标签索引。默认取当前选中标签的索引值\r\n * @returns\r\n */\r\n Class.prototype.roll = function(mode, index) {\r\n var that = this;\r\n var options = that.config;\r\n var container = that.getContainer();\r\n var headerElem = container.header.elem;\r\n var headerItems = container.header.items;\r\n var scrollWidth = headerElem.prop('scrollWidth'); // 实际总长度\r\n var outerWidth = Math.ceil(headerElem.outerWidth()); // 可视区域的长度\r\n var tabsLeft = headerElem.data('left') || 0;\r\n var scrollMode = options.headerMode === 'scroll'; // 标签头部是否始终保持滚动模式\r\n\r\n // 让选中标签始终保持在可视区域\r\n var rollToVisibleArea = function() {\r\n index = isNaN(index) ? that.data().index : index;\r\n\r\n var thisItemElem = headerItems.eq(index);\r\n if (!thisItemElem[0]) return;\r\n\r\n // 当前标签的相对水平坐标值\r\n var thisLeft = Math.ceil(thisItemElem.position().left);\r\n var padding = 1; // 让边界额外保持一定间距\r\n\r\n // 当选中标签溢出在可视区域「左侧」时\r\n var countWidth = thisLeft - (thisItemElem.prev().outerWidth() || 0); // 始终空出上一个标签\r\n if (countWidth > 0) countWidth = countWidth - padding;\r\n\r\n // 左侧临界值\r\n if (tabsLeft + countWidth < 0) {\r\n tabsLeft = countWidth >= 0 ? countWidth : 0; // 标签的复原位移不能超出 0\r\n return headerElem.css('left', -tabsLeft).data('left', -tabsLeft);\r\n }\r\n\r\n // 当选中标签溢出在可视区域「右侧」时,\r\n var countWidth = thisLeft + thisItemElem.outerWidth()\r\n + (thisItemElem.next().outerWidth() || 0) + padding; // 始终空出下一个标签\r\n\r\n // 右侧临界值\r\n if (tabsLeft + countWidth - outerWidth > 0) {\r\n tabsLeft = countWidth - outerWidth;\r\n headerElem.css('left', -tabsLeft).data('left', -tabsLeft);\r\n }\r\n };\r\n\r\n // css 类名\r\n var CLASS_SCROLL = 'layui-tabs-scroll';\r\n var CLASS_BAR = 'layui-tabs-bar';\r\n var CLASS_BAR_ICON = ['layui-icon-prev', 'layui-icon-next'];\r\n\r\n // 滚动结构\r\n var rollElem = {\r\n elem: $('<div class=\"'+ CLASS_SCROLL +' layui-unselect\"></div>'),\r\n bar: $([\r\n '<div class=\"'+ CLASS_BAR +'\">',\r\n '<i class=\"layui-icon '+ CLASS_BAR_ICON[0] +'\" lay-mode=\"prev\"></i>',\r\n '<i class=\"layui-icon '+ CLASS_BAR_ICON[1] +'\" lay-mode=\"next\"></i>',\r\n '</div>'\r\n ].join(''))\r\n };\r\n\r\n // 不渲染头部滚动结构\r\n if (options.headerMode === 'normal') return;\r\n\r\n // 是否渲染滚动结构\r\n var elemScroll = headerElem.parent('.'+ CLASS_SCROLL);\r\n if (scrollMode || (!scrollMode && scrollWidth > outerWidth)) {\r\n if (!elemScroll[0]) {\r\n if (options.elem.hasClass(component.CONST.CARD)) {\r\n rollElem.elem.addClass(component.CONST.CARD);\r\n }\r\n headerElem.wrap(rollElem.elem);\r\n headerElem.after(rollElem.bar);\r\n\r\n // 点击左右箭头\r\n rollElem.bar.children().on('click', function(){\r\n var othis = $(this);\r\n var mode = othis.attr('lay-mode');\r\n if ($(this).hasClass(component.CONST.CLASS_DISABLED)) return;\r\n mode && that.roll(mode);\r\n });\r\n }\r\n } else if(!scrollMode) {\r\n if (elemScroll[0]) {\r\n elemScroll.find('.'+ CLASS_BAR).remove();\r\n headerElem.unwrap().css('left', 0).data('left', 0);\r\n } else {\r\n return;\r\n }\r\n }\r\n\r\n // 初始化滚动模式\r\n if (mode === 'init') return;\r\n\r\n // 重新获取\r\n scrollWidth = headerElem.prop('scrollWidth') // 实际总长度\r\n outerWidth = headerElem.outerWidth() // 可视区域的长度\r\n elemScroll = headerElem.parent('.'+ CLASS_SCROLL);\r\n\r\n // 左箭头(往右滚动)\r\n if (mode === 'prev') {\r\n // 当前的 left 减去可视宽度,用于与上一轮的页签比较\r\n var prevLeft = -tabsLeft - outerWidth;\r\n if(prevLeft < 0) prevLeft = 0;\r\n headerItems.each(function(i, item){\r\n var li = $(item);\r\n var left = Math.ceil(li.position().left);\r\n\r\n if (left >= prevLeft) {\r\n headerElem.css('left', -left).data('left', -left);\r\n return false;\r\n }\r\n });\r\n } else if(mode === 'auto') { // 自动识别滚动\r\n rollToVisibleArea();\r\n } else { // 右箭头(往左滚动) 默认 next\r\n headerItems.each(function(i, item){\r\n var li = $(item);\r\n var left = Math.ceil(li.position().left);\r\n\r\n if (left + li.outerWidth() >= outerWidth - tabsLeft) {\r\n headerElem.css('left', -left).data('left', -left);\r\n return false;\r\n }\r\n });\r\n }\r\n\r\n // 同步箭头状态\r\n tabsLeft = headerElem.data('left') || 0;\r\n\r\n // 左\r\n elemScroll.find('.'+ CLASS_BAR_ICON[0])[\r\n tabsLeft < 0 ? 'removeClass' : 'addClass'\r\n ](component.CONST.CLASS_DISABLED);\r\n // 右\r\n elemScroll.find('.'+ CLASS_BAR_ICON[1])[\r\n parseFloat(tabsLeft + scrollWidth) - outerWidth > 0\r\n ? 'removeClass'\r\n : 'addClass'\r\n ](component.CONST.CLASS_DISABLED);\r\n };\r\n\r\n /**\r\n * 根据 id 或 index 获取相关标签头部项\r\n * @param {number|string} index - 标签索引或 id\r\n */\r\n Class.prototype.findHeaderItem = function(index) {\r\n if(!(\r\n typeof index === 'number'\r\n || (typeof index === 'string' && index)\r\n )) return;\r\n var headerItems = this.getContainer().header.items;\r\n var item = headerItems.filter('[lay-id=\"'+ index +'\"]');\r\n return item[0] ? item : headerItems.eq(index);\r\n };\r\n\r\n /**\r\n * 根据 index 获取相关标签内容项\r\n * @param {number} index - 标签索引\r\n */\r\n Class.prototype.findBodyItem = function(index) {\r\n return this.getContainer().body.items.eq(index);\r\n };\r\n\r\n /**\r\n * 返回给回调的公共信息\r\n * @returns\r\n */\r\n Class.prototype.data = function() {\r\n var that = this;\r\n var options = that.config;\r\n var container = that.getContainer();\r\n var thisHeaderItem = container.header.items.filter('.'+ component.CONST.CLASS_THIS);\r\n var index = thisHeaderItem.index();\r\n\r\n return {\r\n options: options, // 标签配置信息\r\n container: container, // 标签容器的相关元素\r\n thisHeaderItem: thisHeaderItem, // 当前标签头部项\r\n thisBodyItem: that.findBodyItem(index), // 当前标签内容项\r\n index: index, // 当前标签索引\r\n length: container.header.items.length // 当前标签数\r\n }\r\n };\r\n\r\n // 扩展组件接口\r\n $.extend(component, {\r\n /**\r\n * 添加标签\r\n * @param {string} id - 渲染时的实例 ID\r\n * @param {Object} opts - 添加标签的配置项,详见 Class.prototype.add\r\n */\r\n add: function(id, opts) {\r\n var that = component.getThis(id);\r\n if(!that) return;\r\n that.add(opts);\r\n },\r\n\r\n /**\r\n * 关闭标签\r\n * @param {string} id - 渲染时的实例 ID\r\n * @param {number} index - 标签索引\r\n * @param {boolean} [force=false] - 是否强制关闭\r\n */\r\n close: function(id, index, force) {\r\n var that = component.getThis(id);\r\n if(!that) return;\r\n if(index === undefined) index = that.data().index; // index 若不传,则表示关闭当前标签\r\n that.close(that.findHeaderItem(index), force);\r\n },\r\n\r\n /**\r\n * 关闭多个标签\r\n * @param {string} id - 渲染时的实例 ID\r\n * @param {('other'|'right'|'all')} [mode=\"all\"] - 关闭方式\r\n * @param {number} index - 活动标签的索引,默认取当前选中标签的索引。一般用于标签右键事件\r\n */\r\n closeMult: function(id, mode, index, force) {\r\n var that = component.getThis(id);\r\n if(!that) return;\r\n that.closeMult(mode, index, force);\r\n },\r\n\r\n /**\r\n * 切换标签\r\n * @param {string} id - 渲染时的实例 ID\r\n * @param {number} index - 标签索引\r\n */\r\n change: function(id, index, force) {\r\n var that = component.getThis(id);\r\n if(!that) return;\r\n that.change(that.findHeaderItem(index), force);\r\n },\r\n\r\n /**\r\n * 获取标签信息\r\n * @param {string} id - 渲染时的实例 ID\r\n */\r\n data: function(id) {\r\n var that = component.getThis(id);\r\n return that ? that.data() : {};\r\n },\r\n\r\n /**\r\n * 获取标签指定头部项\r\n * @param {string} id - 渲染时的实例 ID\r\n * @param {number} index - 标签索引\r\n * @returns\r\n */\r\n getHeaderItem: function(id, index) {\r\n var that = component.getThis(id);\r\n if(!that) return;\r\n return that.findHeaderItem(index);\r\n },\r\n\r\n /**\r\n * 获取标签指定内容项\r\n * @param {string} id - 渲染时的实例 ID\r\n * @param {number} index - 标签索引\r\n * @returns\r\n */\r\n getBodyItem: function(id, index) {\r\n var that = component.getThis(id);\r\n if(!that) return;\r\n return that.findBodyItem(index);\r\n },\r\n\r\n /**\r\n * 刷新标签视图结构\r\n * @param {string} id - 渲染时的实例 ID\r\n */\r\n refresh: function(id) {\r\n var that = component.getThis(id);\r\n if (!that) return;\r\n that.roll('auto');\r\n }\r\n });\r\n\r\n // 初始化渲染\r\n $(function() {\r\n component.render();\r\n });\r\n\r\n exports(component.CONST.MOD_NAME, component);\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 = util.escape(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","/**\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 that.indicator();\r\n that.arrow();\r\n that.autoplay();\r\n\r\n if (that.elemItem.length > 1) {\r\n that.events();\r\n }\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 var itemsCount = that.elemItem.length;\r\n \r\n if(!options.autoplay) return;\r\n clearInterval(that.timer);\r\n \r\n if (itemsCount > 1) {\r\n that.timer = setInterval(function(){\r\n that.slide();\r\n }, options.interval);\r\n }\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 var itemsCount = that.elemItem.length;\r\n \r\n // 模板\r\n var tplArrow = $([\r\n '<button type=\"button\" class=\"layui-icon '+ (options.anim === 'updown' ? 'layui-icon-up' : 'layui-icon-left') + ' ' + ELEM_ARROW +'\" lay-type=\"sub\"></button>',\r\n '<button type=\"button\" class=\"layui-icon '+ (options.anim === 'updown' ? 'layui-icon-down' : 'layui-icon-right') + ' ' + ELEM_ARROW +'\" lay-type=\"add\"></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 itemsCount > 1 ? options.elem.append(tplArrow) : tplArrow.remove();\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 var itemsCount = that.elemItem.length;\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\r\n itemsCount > 1 ? options.elem.append(tplInd) : tplInd.remove();\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 itemsCount = elemItem.length;\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 || itemsCount <= 1) 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 // 移入移出容器\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 \"></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 threshold = 'mb' in options ? options.mb : 50; // 临界距离\r\n var isAuto = 'isAuto' in options ? options.isAuto : true; // 否自动滚动加载\r\n var moreText = options.moreText || \"加载更多\"; // 手动加载时,加载更多按钮文案\r\n var end = options.end || '没有更多了'; // “末页”显示文案\r\n var direction = options.direction || 'bottom';\r\n var isTop = direction === 'top';\r\n\r\n // 重复执行时清理旧的事件绑定\r\n that._cleanup(elem, scrollElem);\r\n\r\n //滚动条所在元素是否为document\r\n var notDocument = options.scrollElem && options.scrollElem !== document;\r\n\r\n //加载更多\r\n var ELEM_TEXT = '<cite>' + moreText + '</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[isTop ? 'prepend' : 'append'](more);\r\n }\r\n\r\n //加载下一个元素\r\n var next = function(html, over){\r\n var scrollHeightStart = notDocument ? scrollElem.prop('scrollHeight') : document.documentElement.scrollHeight;\r\n var scrollTopStart = scrollElem.scrollTop();\r\n html = $(html);\r\n more[isTop ? 'after' : '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 if(isTop){\r\n var scrollHeightEnd = notDocument ? scrollElem.prop('scrollHeight') : document.documentElement.scrollHeight;\r\n if(page === 1){\r\n // 首次渲染后滑动到底部\r\n scrollElem.scrollTop(scrollHeightEnd);\r\n }else if(page > 1){\r\n var nextElementHeight = scrollHeightEnd - scrollHeightStart;\r\n scrollElem.scrollTop(scrollTopStart + nextElementHeight);\r\n }\r\n }\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.flow', 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 ,direction: options.direction\r\n });\r\n }\r\n\r\n if(!isAuto) return that;\r\n\r\n scrollElem.on('scroll.flow', 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(!isTop ? scrollHeight - top - height <= threshold : top <= threshold){\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 var direction = options.direction || 'bottom';\r\n var isTop = direction === 'top';\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((isTop ? elemTop + item.height() : 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.lazyimg' , 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 Flow.prototype._cleanup = function(elem, scrollElem){\r\n scrollElem.off('scroll.flow').off('scroll.lazyimg');\r\n elem.find('.layui-flow-more').find('a').off('click.flow');\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', 'tabs', '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 tabs = layui.tabs;\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 var hasOnCopy = typeof options.onCopy === 'function';\r\n\r\n // 写入剪切板\r\n lay.clipboard.writeText({\r\n text: code,\r\n done: function() {\r\n if(hasOnCopy){\r\n var ret = options.onCopy(code, true);\r\n if(ret === false) return;\r\n }\r\n\r\n layer.msg('已复制', {icon: 1});\r\n },\r\n error: function() {\r\n if(hasOnCopy){\r\n var ret = options.onCopy(code, false);\r\n if(ret === false) return;\r\n }\r\n layer.msg('复制失败', {icon: 2});\r\n }\r\n });\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 tabs.render({\r\n elem: ['.'+ CONST.ELEM_PREVIEW, '.layui-tabs'].join(' ')\r\n });\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"]} |