gitea/public/js/index.js.map
Alexey 〒erentyev 2fc3eb1d15 Fixed topic regex pattern and added search by topic links after save (#9219)
Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
2019-12-02 11:13:19 +02:00

1 line
No EOL
427 KiB
Text

{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@babel/runtime/regenerator/index.js","webpack:///./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack:///./web_src/js/publicPath.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack:///./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack:///./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack:///./web_src/js/semanticDropdown.js","webpack:///./web_src/js/gitGraphLoader.js","webpack:///./web_src/js/index.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","installedModules","1","__webpack_require__","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","window","oldJsonpFunction","slice","s","arrayWithHoles","iterableToArrayLimit","nonIterableRest","arr","currentScript","url","URL","__webpack_public_path__","pathname","replace","querySelector","getAttribute","runtime","Op","hasOwn","$Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","done","GenStateSuspendedYield","makeInvokeMethod","fn","obj","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","previousPromise","callInvokeWithMethodAndArg","invoke","result","__await","then","unwrapped","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","constructor","displayName","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","async","iter","toString","keys","reverse","pop","skipTempReset","prev","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","Function","Array","isArray","_arr","_n","_d","_e","_s","_i","$","Math","dropdown","parameters","returnedValue","$allModules","$document","moduleSelector","selector","hasTouch","documentElement","time","Date","getTime","performance","query","arguments","methodInvoked","queryArguments","lastAriaID","each","elementIndex","initialLoad","pageLostFocus","willRefocus","elementNamespace","id","selectObserver","menuObserver","settings","isPlainObject","extend","className","fields","metadata","namespace","regExp","templates","eventNamespace","moduleNamespace","$module","$context","$text","find","text","$search","search","$sizer","sizer","$input","input","$icon","icon","$combo","$menu","children","menu","$item","item","activated","itemActivated","internalChange","element","instance","initialize","debug","is","alreadySetup","setup","reference","layout","change","refreshData","save","defaults","restore","selected","events","observeChanges","instantiate","aria","verbose","destroy","remove","tabbable","off","removeData","disconnect","MutationObserver","select","mutation","observe","has","childList","subtree","random","substr","userChoice","$userChoices","$userChoice","html","userValues","index","addition","add","variables","addResult","attr","addClass","hideAdditions","hidden","userLabels","label","appendTo","insertAfter","minCharacters","filter","hide","firstUnfiltered","selectedItem","not","unselectable","eq","nextAvailable","$selected","$nextAvailable","nextAll","$prevAvailable","prevAll","guessRole","nextID","prefix","getElementById","setExpanded","expanded","refreshDescendant","$currentlySelected","$activeItem","active","$selectedItem","removeDescendant","removeAttr","isIcon","hasClass","hasSearch","hasInput","isMultiple","multiple","api","apiSettings","urlData","on","returnedObject","prop","insertBefore","searchSelection","allowTab","set","selectValues","parent","closest","selection","missingMultiple","disabled","detach","prependTo","refresh","$firstModules","$lastModules","refreshSelectors","refreshItems","clearData","defaultText","defaultValue","placeholderText","toggle","show","callback","isFunction","can","remote","queryRemote","maxSelections","allResultsFiltered","allFiltered","onShow","animate","click","intent","menuSearch","focusSearch","visible","animatingOutward","onHide","hideOthers","hideMenu","transition","hideSubMenus","$subMenus","touchEvents","keyboardEvents","inputEvents","mouseEvents","single","test","mouseenter","keydown","inputEvent","mousedown","mouseup","focus","blur","delay","mouseleave","touch","unbind","searchTerm","afterFiltered","filterActive","activeItem","onNoResults","allowAdditions","empty","noResults","userSuggestion","focusedOnSearch","useLabels","useAPI","filterRemoteData","filterItems","noAPI","errorDuration","cache","throttle","onError","serverError","onFailure","onSuccess","response","remoteValues","results","escapedTerm","escape","string","beginsWithRegExp","RegExp","$choice","match","String","choiceText","fullTextSearch","exactSearch","fuzzySearch","choiceValue","filteredItem","filtered","term","termLength","queryLength","toLowerCase","characterIndex","nextCharacterIndex","queryCharacter","charCodeAt","indexOf","skipHandler","forceSelection","clear","showOnFocus","activeElement","activeLabel","timer","$label","$labels","$activeLabels","$nextActive","$prevActive","$range","nextUntil","prevUntil","shiftKey","removeClass","ctrlKey","toggleClass","onLabelSelect","apply","activeLabels","toggleBehavior","bubbledLabelClick","bubbledIconClick","determine","eventOnElement","preventDefault","stopPropagation","eventInModule","mutations","isSelectMutation","addedNodes","$addedNode","$removedNode","removedNodes","$changedNodes","isUserAddition","isMessage","$target","$subMenu","$otherMenus","siblings","hasSubMenu","itemTimer","skipRefocus","isBubbledEvent","allowCategorySelection","userAddition","scrollPosition","selectAction","pressedKey","which","inObject","$activeLabel","labelIndex","labelCount","hasActiveLabel","hasMultipleActive","isFirstLabel","isLastLabel","isSearch","isFocusedOnSearch","isFocused","focused","caretAtStart","caretPosition","leftArrow","siblingLabel","end","last","rightArrow","first","deleteKey","backspace","$nextItem","$visibleItems","addBack","$parentMenu","inVisibleMenu","animating","hasSelectedItem","selectedIsSelectable","delimiterPressed","delimiter","enter","upArrow","selectOnKeydown","downArrow","pageUp","scrollPage","pageDown","selectedLetter","fromCharCode","trigger","createEvent","inputElement","initEvent","dispatchEvent","action","inDocument","inModule","inVisibleDOM","body","contains","notOnLabel","notInMenu","nothing","activate","hideAndClear","combo","placeholder","trim","val","searchWidth","ceil","width","selectionCount","upward","grep","uniqueArray","array","inArray","range","rangeLength","selectionStart","createRange","moveStart","isEmptyMultiselect","selectInput","split","read","remoteData","preserveHTML","clone","menuIcon","oninput","onpropertychange","$option","sortSelect","sort","a","b","itemWithAdditions","$items","$userItems","strict","shouldSearch","optionText","optionValue","check","labels","saveRemoteData","Storage","sessionStorage","getItem","noStorage","setItem","clearValue","direction","$nextSelectedItem","$currentItem","menuHeight","outerHeight","currentScroll","scrollTop","itemHeight","itemsPerPage","floor","newScroll","$selectableItem","isSearchMultiple","searchValue","hasSearchValue","valueIsSet","glyphWidth","css","loading","partialSearch","forceScroll","hasActive","offset","menuScroll","abovePage","belowPage","position","top","height","searchText","letter","alreadySelectedLetter","firstLetter","$nextValue","openDownward","leftward","openRightward","$currentMenu","escapedValue","currentValue","stringValue","allowReselection","extendSelect","fireOnInit","onChange","exactly","selectedText","selectedValue","isFiltered","isActive","isUserValue","shouldAnimate","count","$next","ignoreCase","onLabelCreate","variation","duration","$message","$addition","$existingItem","alreadyHasValue","hasUserSuggestion","hasCount","hasMaxCount","hasTerm","addedValue","addedText","newValue","concat","join","onAdd","removedValue","removedText","$removedItem","arrayValue","onRemove","$removedLabel","userValue","onLabelRemove","items","$normalResults","valueIgnoringCase","valueMatchingCase","hasValue","existingValue","animatingInward","needle","found","selectMutation","selectChanged","verticallyScrollableContext","overflowY","horizontallyScrollableContext","overflowX","onScreen","calculations","canOpenDownward","left","above","below","isOffscreenRight","canOpenRightward","scrollLeft","outerWidth","start","animation","queue","onStart","onComplete","noTransition","multipleValues","isUnparsable","hasQuotes","quote","setting","internal","silent","log","currentTime","executionTime","display","title","totalTime","group","table","groupCollapsed","groupEnd","passedArguments","maxDepth","depth","camelCaseValue","toUpperCase","keepOnScreen","$selectedLabels","option","maybeText","maybeDisabled","choice","jQuery","graphCanvas","gitGraph","default","graphList","csrf","suburl","previewFileModes","simpleMDEditor","codeMirrorEditor","htmlEncode","initCommentPreviewTab","$form","$tabMenu","tab","$this","post","_csrf","$previewPanel","emojify","run","hljs","highlightBlock","buttonsClickOnEnter","initEditForm","$previewTab","initEditPreviewTab","content","$diffPreviewPanel","updateIssuesMeta","issueIds","elementId","ajax","issue_ids","success","reload","location","initImagePaste","field","addEventListener","pasteEvent","clipboardData","blob","getAsFile","retrieveImageFromClipboardAsBlob","img","lastIndexOf","startPos","endPos","selectionEnd","substring","insertAtCursor","file","xhr","XMLHttpRequest","status","responseText","open","setRequestHeader","formData","FormData","append","send","uploadFile","res","JSON","parse","oldval","newval","replaceAndKeepCursor","uuid","initCommentForm","$selectBranch","initListSubmits","selectItem","outerSelector","$list","$noSelect","$listMenu","hasLabelUpdateAction","listIds","select_id","input_id","hasUpdateAction","initRepository","$data","canCreateBranch","menuVisible","branch","tag","Vue","delimiters","el","beforeMount","vm","$el","watch","focusSearchField","computed","filteredItems","showCreateNewBranch","showNoResults","methods","getSelected","href","createNewBranch","$refs","newBranchForm","submit","nextTick","searchField","j","getSelectedIndexInFiltered","scrollToActive","cont","scrollContainer","offsetTop","clientHeight","keyCode","initFilterSearchDropdown","keyup","$prompt","checked","$newLabelPanel","minicolors","color_hex","modal","onApprove","$datepicker","datetimepicker","lang","inline","timepicker","startDate","formatDate","onSelectDate","ct","dateFormat","$issueTitle","$editInput","editTitleToggle","urlTarget","urlTargetId","hash","history","pushState","$content","$parent","$textarea","$segment","$editContentZone","$renderContent","$rawContent","issuesTribute","attach","emojiTribute","$dropzone","$files","filenameDict","dropzone","headers","maxFiles","maxFilesize","acceptedFiles","addRemoveLinks","dictDefaultMessage","dictInvalidFileType","dictFileTooBig","dictRemoveFile","init","submitted","getJSON","drop","removeAllFiles","imgSrc","emit","files","$editContentForm","$attachments","map","attachments","confirm","$statusButton","$mergeButton","_text","_value","initReactionSelector","reactions","popup","actionURL","resp","react","hasEmoji","addLine","delLine","addPercent","parseFloat","localStorage","$repoComparePull","$dropdown","assingMenuAttributes","initRepositoryCollaboration","uid","initEditor","$editFilename","parts","$section","$divider","getCursorPosition","setSelectionRange","$editArea","markdownFileExts","lineWrapExtensions","spec","extension","extWithDot","dataUrl","apiCall","exec","CodeMirror","findModeByExtension","previewLink","mime","toTextArea","SimpleMDE","autoDownloadFontAwesome","forceSync","renderingConfig","singleLineBreaks","indentWithTabs","tabSize","spellChecker","previewRender","plainText","preview","innerHTML","toolbar","setSimpleMDE","fromTextArea","lineNumbers","cm","_change","getValue","setCodeMirror","setOption","autoLoadMode","editorconfig","indent_style","Tab","spaces","parseInt","getOption","replaceSelection","indent_size","tab_width","$commitButton","$editForm","areYouSure","dirtyClass","fieldSelector","dirty","initUserSettings","keypress","initCodeView","$select","selectRange","getSelection","removeAllRanges","$first","$foldButton","slideUp","slideDown","insertBlobExcerpt","$blob","$row","replaceWith","u2fSigned","stringify","contentType","fail","u2fError","u2fRegistered","errorCode","checkError","u2fErrors","browser","2","3","4","5","u2fRegisterRequest","req","registeredKeys","u2fApi","register","appId","registerRequests","catch","reason","metaData","code","changeHash","$from","classes","showDeletePopup","dialog","closable","redirect","showAddAllPopup","Dropzone","autoDiscover","pos","Sel","SelLength","ready","accordion","checkbox","progress","showActivity","slideToggle","nodes","querySelectorAll","setConfig","img_dir","ignore_emoticons","getElementsByClassName","childNodes","nodeName","$searchTeamBox","$searchRepoBox","toggleMigrations","isExpanded","mgrBtn","editDiv","viewDiv","saveBtn","topicDropdown","topicForm","topicPrompts","hidePrompt","prompts","clipboard","Clipboard","clearSelection","node","encodeURIComponent","dataset","issueIDs","issueId","_","onResponse","login","full_name","image","avatar_url","searchFields","permission","description","dbType","dbDefaults","MySQL","PostgreSQL","MSSQL","_type","defaultHost","authUserName","cloneAddr","startsWith","sideBySideChanges","sideBySideTimeout","simplemde","render","isSideBySideActive","codemirror","cursorPos","getCursor","setCursor","line","ch","getInputField","$bEdit","$bPrev","$toolbar","$bPreview","$bSideBySide","initWikiForm","updateContentType","initWebhook","authType","onOAuth2Change","onSecurityProtocolChange","onUsePagedSearchChange","onOAuth2UseCustomURLChange","$detailModal","$checkboxes","ids","provider","initAdmin","component","props","searchLimit","Number","required","organizations","isOrganization","Boolean","canCreateOrganization","organizationsTotalCount","moreReposLink","repos","reposTotalCount","reposFilter","searchQuery","isLoading","repoTypes","searchMode","forks","mirrors","sources","collaborative","showMoreReposLink","searchURL","repoTypeCount","mounted","searchRepos","changeTab","changeReposFilter","showRepo","repo","owner","mirror","fork","searchedMode","searchedURL","searchedQuery","_textStatus","getResponseHeader","always","repoClass","private","initVueApp","altKey","metaKey","countPrompt","formatPrompt","topics","_data","responseJSON","topicArray","invalidTopics","topicLables","form","blue","basic","formattedResponse","found_query","current_topics","topic_name","unshift","contents","_addedText","$addedChoice","rules","validateTopic","_values","identifier","prompt","ensureSupport","sign","challenge","allowMultiple","repolink","repoId","crossRepoSearch","issueSearchUrl","filteredResponse","currIssueId","issue","number","repository","regStr","selectedItems","initIssueList","wipPrefixes","sticky","isSplit","side","idx","path","tr","ntr","after","td","commentCloud","initRepoStatusChecker","migrating","repo_name","$repoTemplate","checkTemplate","$templateUnits","$nonTemplate","changeOwner","_r","initTemplateSearch","routes","$cloneAddr","$repoName","arrays","$title","timeAddManual","toggleStopwatch","cancelStopwatch","initHeatmap","appElementId","heatmapUser","locale","contributions","no_contributions","vueDelimeters","user","colorRange","endDate","totalContributions","getColor","loadHeatmap","userName","chartRawData","chartData","date","timestamp","color","getComputedStyle","backgroundColor","removeChild","template","toggleDeadlineForm","fadeToggle","setDeadline","deadline","updateDeadline","deadlineString","realDeadline","newDate","due_date","deleteDependencyModal","cancelCodeComment","btn","onOAuthLoginClick","oauthLoader","oauthNav"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GAKAK,EAAI,EAAGC,EAAW,GACpCD,EAAIF,EAASI,OAAQF,IACzBH,EAAUC,EAASE,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBV,IAAYU,EAAgBV,IACpFI,EAASO,KAAKD,EAAgBV,GAAS,IAExCU,EAAgBV,GAAW,EAE5B,IAAID,KAAYG,EACZI,OAAOC,UAAUC,eAAeC,KAAKP,EAAaH,KACpDa,EAAQb,GAAYG,EAAYH,IAKlC,IAFGc,GAAqBA,EAAoBf,GAEtCM,EAASC,QACdD,EAASU,OAATV,GAOF,IAAIW,EAAmB,GAKnBL,EAAkB,CACrBM,EAAG,GAWJ,SAASC,EAAoBlB,GAG5B,GAAGgB,EAAiBhB,GACnB,OAAOgB,EAAiBhB,GAAUmB,QAGnC,IAAIC,EAASJ,EAAiBhB,GAAY,CACzCI,EAAGJ,EACHqB,GAAG,EACHF,QAAS,IAUV,OANAN,EAAQb,GAAUU,KAAKU,EAAOD,QAASC,EAAQA,EAAOD,QAASD,GAG/DE,EAAOC,GAAI,EAGJD,EAAOD,QAKfD,EAAoBI,EAAI,SAAuBrB,GAC9C,IAAIsB,EAAW,GAKXC,EAAqBb,EAAgBV,GACzC,GAA0B,IAAvBuB,EAGF,GAAGA,EACFD,EAASX,KAAKY,EAAmB,QAC3B,CAEN,IAAIC,EAAU,IAAIC,SAAQ,SAASC,EAASC,GAC3CJ,EAAqBb,EAAgBV,GAAW,CAAC0B,EAASC,MAE3DL,EAASX,KAAKY,EAAmB,GAAKC,GAGtC,IACII,EADAC,EAASC,SAASC,cAAc,UAGpCF,EAAOG,QAAU,QACjBH,EAAOI,QAAU,IACbhB,EAAoBiB,IACvBL,EAAOM,aAAa,QAASlB,EAAoBiB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hD,aAAsE,CACpE5U,KAAMq1B,KAAKoN,UAAU,CACnB0Q,SAAUF,IAEZ7X,QAAS,CACP,eAAgB3J,EAChB,YAAY,GAEdiR,YAAa,mBACbz/B,KAAM,OACNqwB,QAVoE,WAWlEC,KAEF9wB,MAboE,WAclEwL,EAAE,oBAAoByR,YAAY,WAClCzR,EAAE,8BAA8BgL,WAKtC3T,OAAO8tC,sBAAwB,SAAUzjC,EAAI1M,GAC3CgL,EAAE,sBACCirB,MAAM,CACLoL,UAAU,EACVpY,SAAU,IACViN,UAHK,WAIHlrB,EAAE,uBAAuB0X,IAAIhW,GAC7B1B,EAAE,mBAAmB0X,IAAI1iB,GACzBgL,EAAE,yBAAyB+pB,YAE5BkB,MAAM,SAwEb5zB,OAAO+tC,kBAAoB,SAAUC,GACnC,IAAM/F,EAAOt/B,EAAEqlC,GAAKr7B,QAAQ,QACxBs1B,EAAKhtC,OAAS,GAAKgtC,EAAKv2B,SAAS,iBACnCu2B,EAAK14B,SAAS,QACd04B,EAAKv1B,SAASpH,KAAK,6BAA6BqI,QAEhDs0B,EAAKt1B,QAAQ,uBAAuB7E,UAGxC9N,OAAOiuC,kBAAoB,WACzB,IAAMC,EAAcvlC,EAAE,wBAChBwlC,EAAWxlC,EAAE,2BAEnBwlC,EAASn+B,OACTk+B,EAAY9zB,YAAY,YAExBlc,YAAW,WAGTgwC,EAAY3+B,SAAS,YACrB4+B,EAASx6B,SACR","file":"index.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"\" + ({\"0\":\"gitgraph\"}[chunkId]||chunkId) + \".js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","module.exports = require(\"regenerator-runtime\");\n","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","/* This sets up webpack's chunk loading to load resources from the same\n directory where it loaded index.js from. This file must be imported\n before any lazy-loading is being attempted. */\n\nif (document.currentScript && document.currentScript.src) {\n const url = new URL(document.currentScript.src);\n __webpack_public_path__ = `${url.pathname.replace(/\\/[^/]*$/, '')}/`;\n} else {\n // compat: IE11\n const script = document.querySelector('script[src*=\"/index.js\"]');\n __webpack_public_path__ = `${script.getAttribute('src').replace(/\\/[^/]*$/, '')}/`;\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return Promise.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new Promise(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArrayLimit(arr, i) {\n if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) {\n return;\n }\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nmodule.exports = _nonIterableRest;","/* This is a patched version of semantic.dropdown which includes a11y changes, see\n https://github.com/go-gitea/gitea/pull/8638#issuecomment-549175290 */\n\n/*!\n * # Semantic UI 2.3.1 - Dropdown\n * http://github.com/semantic-org/semantic-ui/\n *\n *\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n *\n */\n\n/*\n * Copyright 2019 The Gitea Authors\n * Released under the MIT license\n * http://opensource.org/licenses/MIT\n * This version has been modified by Gitea to improve accessibility.\n */\n\n;(function ($, window, document, undefined) {\n\n'use strict';\n\nwindow = (typeof window != 'undefined' && window.Math == Math)\n ? window\n : (typeof self != 'undefined' && self.Math == Math)\n ? self\n : Function('return this')()\n;\n\n$.fn.dropdown = function(parameters) {\n var\n $allModules = $(this),\n $document = $(document),\n\n moduleSelector = $allModules.selector || '',\n\n hasTouch = ('ontouchstart' in document.documentElement),\n time = new Date().getTime(),\n performance = [],\n\n query = arguments[0],\n methodInvoked = (typeof query == 'string'),\n queryArguments = [].slice.call(arguments, 1),\n lastAriaID = 1,\n returnedValue\n ;\n\n $allModules\n .each(function(elementIndex) {\n var\n settings = ( $.isPlainObject(parameters) )\n ? $.extend(true, {}, $.fn.dropdown.settings, parameters)\n : $.extend({}, $.fn.dropdown.settings),\n\n className = settings.className,\n message = settings.message,\n fields = settings.fields,\n keys = settings.keys,\n metadata = settings.metadata,\n namespace = settings.namespace,\n regExp = settings.regExp,\n selector = settings.selector,\n error = settings.error,\n templates = settings.templates,\n\n eventNamespace = '.' + namespace,\n moduleNamespace = 'module-' + namespace,\n\n $module = $(this),\n $context = $(settings.context),\n $text = $module.find(selector.text),\n $search = $module.find(selector.search),\n $sizer = $module.find(selector.sizer),\n $input = $module.find(selector.input),\n $icon = $module.find(selector.icon),\n\n $combo = ($module.prev().find(selector.text).length > 0)\n ? $module.prev().find(selector.text)\n : $module.prev(),\n\n $menu = $module.children(selector.menu),\n $item = $menu.find(selector.item),\n\n activated = false,\n itemActivated = false,\n internalChange = false,\n element = this,\n instance = $module.data(moduleNamespace),\n\n initialLoad,\n pageLostFocus,\n willRefocus,\n elementNamespace,\n id,\n selectObserver,\n menuObserver,\n module\n ;\n\n module = {\n\n initialize: function() {\n module.debug('Initializing dropdown', settings);\n\n if( module.is.alreadySetup() ) {\n module.setup.reference();\n }\n else {\n\n module.setup.layout();\n\n if(settings.values) {\n module.change.values(settings.values);\n }\n\n module.refreshData();\n\n module.save.defaults();\n module.restore.selected();\n\n module.create.id();\n module.bind.events();\n\n module.observeChanges();\n module.instantiate();\n\n module.aria.setup();\n }\n\n },\n\n instantiate: function() {\n module.verbose('Storing instance of dropdown', module);\n instance = module;\n $module\n .data(moduleNamespace, module)\n ;\n },\n\n destroy: function() {\n module.verbose('Destroying previous dropdown', $module);\n module.remove.tabbable();\n $module\n .off(eventNamespace)\n .removeData(moduleNamespace)\n ;\n $menu\n .off(eventNamespace)\n ;\n $document\n .off(elementNamespace)\n ;\n module.disconnect.menuObserver();\n module.disconnect.selectObserver();\n },\n\n observeChanges: function() {\n if('MutationObserver' in window) {\n selectObserver = new MutationObserver(module.event.select.mutation);\n menuObserver = new MutationObserver(module.event.menu.mutation);\n module.debug('Setting up mutation observer', selectObserver, menuObserver);\n module.observe.select();\n module.observe.menu();\n }\n },\n\n disconnect: {\n menuObserver: function() {\n if(menuObserver) {\n menuObserver.disconnect();\n }\n },\n selectObserver: function() {\n if(selectObserver) {\n selectObserver.disconnect();\n }\n }\n },\n observe: {\n select: function() {\n if(module.has.input()) {\n selectObserver.observe($module[0], {\n childList : true,\n subtree : true\n });\n }\n },\n menu: function() {\n if(module.has.menu()) {\n menuObserver.observe($menu[0], {\n childList : true,\n subtree : true\n });\n }\n }\n },\n\n create: {\n id: function() {\n id = (Math.random().toString(16) + '000000000').substr(2, 8);\n elementNamespace = '.' + id;\n module.verbose('Creating unique id for element', id);\n },\n userChoice: function(values) {\n var\n $userChoices,\n $userChoice,\n isUserValue,\n html\n ;\n values = values || module.get.userValues();\n if(!values) {\n return false;\n }\n values = $.isArray(values)\n ? values\n : [values]\n ;\n $.each(values, function(index, value) {\n if(module.get.item(value) === false) {\n html = settings.templates.addition( module.add.variables(message.addResult, value) );\n $userChoice = $('<div />')\n .html(html)\n .attr('data-' + metadata.value, value)\n .attr('data-' + metadata.text, value)\n .addClass(className.addition)\n .addClass(className.item)\n ;\n if(settings.hideAdditions) {\n $userChoice.addClass(className.hidden);\n }\n $userChoices = ($userChoices === undefined)\n ? $userChoice\n : $userChoices.add($userChoice)\n ;\n module.verbose('Creating user choices for value', value, $userChoice);\n }\n });\n return $userChoices;\n },\n userLabels: function(value) {\n var\n userValues = module.get.userValues()\n ;\n if(userValues) {\n module.debug('Adding user labels', userValues);\n $.each(userValues, function(index, value) {\n module.verbose('Adding custom user value');\n module.add.label(value, value);\n });\n }\n },\n menu: function() {\n $menu = $('<div />')\n .addClass(className.menu)\n .appendTo($module)\n ;\n },\n sizer: function() {\n $sizer = $('<span />')\n .addClass(className.sizer)\n .insertAfter($search)\n ;\n }\n },\n\n search: function(query) {\n query = (query !== undefined)\n ? query\n : module.get.query()\n ;\n module.verbose('Searching for query', query);\n if(module.has.minCharacters(query)) {\n module.filter(query);\n }\n else {\n module.hide();\n }\n },\n\n select: {\n firstUnfiltered: function() {\n module.verbose('Selecting first non-filtered element');\n module.remove.selectedItem();\n $item\n .not(selector.unselectable)\n .not(selector.addition + selector.hidden)\n .eq(0)\n .addClass(className.selected)\n ;\n },\n nextAvailable: function($selected) {\n $selected = $selected.eq(0);\n var\n $nextAvailable = $selected.nextAll(selector.item).not(selector.unselectable).eq(0),\n $prevAvailable = $selected.prevAll(selector.item).not(selector.unselectable).eq(0),\n hasNext = ($nextAvailable.length > 0)\n ;\n if(hasNext) {\n module.verbose('Moving selection to', $nextAvailable);\n $nextAvailable.addClass(className.selected);\n }\n else {\n module.verbose('Moving selection to', $prevAvailable);\n $prevAvailable.addClass(className.selected);\n }\n }\n },\n\n aria: {\n setup: function() {\n var role = module.aria.guessRole();\n if( role !== 'menu' ) {\n return;\n }\n $module.attr('aria-busy', 'true');\n $module.attr('role', 'menu');\n $module.attr('aria-haspopup', 'menu');\n $module.attr('aria-expanded', 'false');\n $menu.find('.divider').attr('role', 'separator');\n $item.attr('role', 'menuitem');\n $item.each(function (index, item) {\n if( !item.id ) {\n item.id = module.aria.nextID('menuitem');\n }\n });\n $text = $module\n .find('> .text')\n .eq(0)\n ;\n if( $module.data('content') ) {\n $text.attr('aria-hidden');\n $module.attr('aria-label', $module.data('content'));\n }\n else {\n $text.attr('id', module.aria.nextID('menutext'));\n $module.attr('aria-labelledby', $text.attr('id'));\n }\n $module.attr('aria-busy', 'false');\n },\n nextID: function(prefix) {\n var nextID;\n do {\n nextID = prefix + '_' + lastAriaID++;\n } while( document.getElementById(nextID) );\n return nextID;\n },\n setExpanded: function(expanded) {\n if( $module.attr('aria-haspopup') ) {\n $module.attr('aria-expanded', expanded);\n }\n },\n refreshDescendant: function() {\n if( $module.attr('aria-haspopup') !== 'menu' ) {\n return;\n }\n var\n $currentlySelected = $item.not(selector.unselectable).filter('.' + className.selected).eq(0),\n $activeItem = $menu.children('.' + className.active).eq(0),\n $selectedItem = ($currentlySelected.length > 0)\n ? $currentlySelected\n : $activeItem\n ;\n if( $selectedItem ) {\n $module.attr('aria-activedescendant', $selectedItem.attr('id'));\n }\n else {\n module.aria.removeDescendant();\n }\n },\n removeDescendant: function() {\n if( $module.attr('aria-haspopup') == 'menu' ) {\n $module.removeAttr('aria-activedescendant');\n }\n },\n guessRole: function() {\n var\n isIcon = $module.hasClass('icon'),\n hasSearch = module.has.search(),\n hasInput = ($input.length > 0),\n isMultiple = module.is.multiple()\n ;\n if ( !isIcon && !hasSearch && !hasInput && !isMultiple ) {\n return 'menu';\n }\n return 'unknown';\n }\n },\n\n setup: {\n api: function() {\n var\n apiSettings = {\n debug : settings.debug,\n urlData : {\n value : module.get.value(),\n query : module.get.query()\n },\n on : false\n }\n ;\n module.verbose('First request, initializing API');\n $module\n .api(apiSettings)\n ;\n },\n layout: function() {\n if( $module.is('select') ) {\n module.setup.select();\n module.setup.returnedObject();\n }\n if( !module.has.menu() ) {\n module.create.menu();\n }\n if( module.is.search() && !module.has.search() ) {\n module.verbose('Adding search input');\n $search = $('<input />')\n .addClass(className.search)\n .prop('autocomplete', 'off')\n .insertBefore($text)\n ;\n }\n if( module.is.multiple() && module.is.searchSelection() && !module.has.sizer()) {\n module.create.sizer();\n }\n if(settings.allowTab) {\n module.set.tabbable();\n }\n $item.attr('tabindex', '-1');\n },\n select: function() {\n var\n selectValues = module.get.selectValues()\n ;\n module.debug('Dropdown initialized on a select', selectValues);\n if( $module.is('select') ) {\n $input = $module;\n }\n // see if select is placed correctly already\n if($input.parent(selector.dropdown).length > 0) {\n module.debug('UI dropdown already exists. Creating dropdown menu only');\n $module = $input.closest(selector.dropdown);\n if( !module.has.menu() ) {\n module.create.menu();\n }\n $menu = $module.children(selector.menu);\n module.setup.menu(selectValues);\n }\n else {\n module.debug('Creating entire dropdown from select');\n $module = $('<div />')\n .attr('class', $input.attr('class') )\n .addClass(className.selection)\n .addClass(className.dropdown)\n .html( templates.dropdown(selectValues) )\n .insertBefore($input)\n ;\n if($input.hasClass(className.multiple) && $input.prop('multiple') === false) {\n module.error(error.missingMultiple);\n $input.prop('multiple', true);\n }\n if($input.is('[multiple]')) {\n module.set.multiple();\n }\n if ($input.prop('disabled')) {\n module.debug('Disabling dropdown');\n $module.addClass(className.disabled);\n }\n $input\n .removeAttr('class')\n .detach()\n .prependTo($module)\n ;\n }\n module.refresh();\n },\n menu: function(values) {\n $menu.html( templates.menu(values, fields));\n $item = $menu.find(selector.item);\n },\n reference: function() {\n module.debug('Dropdown behavior was called on select, replacing with closest dropdown');\n // replace module reference\n $module = $module.parent(selector.dropdown);\n instance = $module.data(moduleNamespace);\n element = $module.get(0);\n module.refresh();\n module.setup.returnedObject();\n },\n returnedObject: function() {\n var\n $firstModules = $allModules.slice(0, elementIndex),\n $lastModules = $allModules.slice(elementIndex + 1)\n ;\n // adjust all modules to use correct reference\n $allModules = $firstModules.add($module).add($lastModules);\n }\n },\n\n refresh: function() {\n module.refreshSelectors();\n module.refreshData();\n },\n\n refreshItems: function() {\n $item = $menu.find(selector.item);\n },\n\n refreshSelectors: function() {\n module.verbose('Refreshing selector cache');\n $text = $module.find(selector.text);\n $search = $module.find(selector.search);\n $input = $module.find(selector.input);\n $icon = $module.find(selector.icon);\n $combo = ($module.prev().find(selector.text).length > 0)\n ? $module.prev().find(selector.text)\n : $module.prev()\n ;\n $menu = $module.children(selector.menu);\n $item = $menu.find(selector.item);\n },\n\n refreshData: function() {\n module.verbose('Refreshing cached metadata');\n $item\n .removeData(metadata.text)\n .removeData(metadata.value)\n ;\n },\n\n clearData: function() {\n module.verbose('Clearing metadata');\n $item\n .removeData(metadata.text)\n .removeData(metadata.value)\n ;\n $module\n .removeData(metadata.defaultText)\n .removeData(metadata.defaultValue)\n .removeData(metadata.placeholderText)\n ;\n },\n\n toggle: function() {\n module.verbose('Toggling menu visibility');\n if( !module.is.active() ) {\n module.show();\n }\n else {\n module.hide();\n }\n },\n\n show: function(callback) {\n callback = $.isFunction(callback)\n ? callback\n : function(){}\n ;\n if(!module.can.show() && module.is.remote()) {\n module.debug('No API results retrieved, searching before show');\n module.queryRemote(module.get.query(), module.show);\n }\n if( module.can.show() && !module.is.active() ) {\n module.debug('Showing dropdown');\n if(module.has.message() && !(module.has.maxSelections() || module.has.allResultsFiltered()) ) {\n module.remove.message();\n }\n if(module.is.allFiltered()) {\n return true;\n }\n if(settings.onShow.call(element) !== false) {\n module.aria.setExpanded(true);\n module.aria.refreshDescendant();\n module.animate.show(function() {\n if( module.can.click() ) {\n module.bind.intent();\n }\n if(module.has.menuSearch()) {\n module.focusSearch();\n }\n module.set.visible();\n callback.call(element);\n });\n }\n }\n },\n\n hide: function(callback) {\n callback = $.isFunction(callback)\n ? callback\n : function(){}\n ;\n if( module.is.active() && !module.is.animatingOutward() ) {\n module.debug('Hiding dropdown');\n if(settings.onHide.call(element) !== false) {\n module.aria.setExpanded(false);\n module.aria.removeDescendant();\n module.animate.hide(function() {\n module.remove.visible();\n callback.call(element);\n });\n }\n }\n },\n\n hideOthers: function() {\n module.verbose('Finding other dropdowns to hide');\n $allModules\n .not($module)\n .has(selector.menu + '.' + className.visible)\n .dropdown('hide')\n ;\n },\n\n hideMenu: function() {\n module.verbose('Hiding menu instantaneously');\n module.remove.active();\n module.remove.visible();\n $menu.transition('hide');\n },\n\n hideSubMenus: function() {\n var\n $subMenus = $menu.children(selector.item).find(selector.menu)\n ;\n module.verbose('Hiding sub menus', $subMenus);\n $subMenus.transition('hide');\n },\n\n bind: {\n events: function() {\n if(hasTouch) {\n module.bind.touchEvents();\n }\n module.bind.keyboardEvents();\n module.bind.inputEvents();\n module.bind.mouseEvents();\n },\n touchEvents: function() {\n module.debug('Touch device detected binding additional touch events');\n if( module.is.searchSelection() ) {\n // do nothing special yet\n }\n else if( module.is.single() ) {\n $module\n .on('touchstart' + eventNamespace, module.event.test.toggle)\n ;\n }\n $menu\n .on('touchstart' + eventNamespace, selector.item, module.event.item.mouseenter)\n ;\n },\n keyboardEvents: function() {\n module.verbose('Binding keyboard events');\n $module\n .on('keydown' + eventNamespace, module.event.keydown)\n ;\n if( module.has.search() ) {\n $module\n .on(module.get.inputEvent() + eventNamespace, selector.search, module.event.input)\n ;\n }\n if( module.is.multiple() ) {\n $document\n .on('keydown' + elementNamespace, module.event.document.keydown)\n ;\n }\n },\n inputEvents: function() {\n module.verbose('Binding input change events');\n $module\n .on('change' + eventNamespace, selector.input, module.event.change)\n ;\n },\n mouseEvents: function() {\n module.verbose('Binding mouse events');\n if(module.is.multiple()) {\n $module\n .on('click' + eventNamespace, selector.label, module.event.label.click)\n .on('click' + eventNamespace, selector.remove, module.event.remove.click)\n ;\n }\n if( module.is.searchSelection() ) {\n $module\n .on('mousedown' + eventNamespace, module.event.mousedown)\n .on('mouseup' + eventNamespace, module.event.mouseup)\n .on('mousedown' + eventNamespace, selector.menu, module.event.menu.mousedown)\n .on('mouseup' + eventNamespace, selector.menu, module.event.menu.mouseup)\n .on('click' + eventNamespace, selector.icon, module.event.icon.click)\n .on('focus' + eventNamespace, selector.search, module.event.search.focus)\n .on('click' + eventNamespace, selector.search, module.event.search.focus)\n .on('blur' + eventNamespace, selector.search, module.event.search.blur)\n .on('click' + eventNamespace, selector.text, module.event.text.focus)\n ;\n if(module.is.multiple()) {\n $module\n .on('click' + eventNamespace, module.event.click)\n ;\n }\n }\n else {\n if(settings.on == 'click') {\n $module\n .on('click' + eventNamespace, selector.icon, module.event.icon.click)\n .on('click' + eventNamespace, module.event.test.toggle)\n ;\n }\n else if(settings.on == 'hover') {\n $module\n .on('mouseenter' + eventNamespace, module.delay.show)\n .on('mouseleave' + eventNamespace, module.delay.hide)\n ;\n }\n else {\n $module\n .on(settings.on + eventNamespace, module.toggle)\n ;\n }\n $module\n .on('mousedown' + eventNamespace, module.event.mousedown)\n .on('mouseup' + eventNamespace, module.event.mouseup)\n .on('focus' + eventNamespace, module.event.focus)\n ;\n if(module.has.menuSearch() ) {\n $module\n .on('blur' + eventNamespace, selector.search, module.event.search.blur)\n ;\n }\n else {\n $module\n .on('blur' + eventNamespace, module.event.blur)\n ;\n }\n }\n $menu\n .on('mouseenter' + eventNamespace, selector.item, module.event.item.mouseenter)\n .on('mouseleave' + eventNamespace, selector.item, module.event.item.mouseleave)\n .on('click' + eventNamespace, selector.item, module.event.item.click)\n ;\n },\n intent: function() {\n module.verbose('Binding hide intent event to document');\n if(hasTouch) {\n $document\n .on('touchstart' + elementNamespace, module.event.test.touch)\n .on('touchmove' + elementNamespace, module.event.test.touch)\n ;\n }\n $document\n .on('click' + elementNamespace, module.event.test.hide)\n ;\n }\n },\n\n unbind: {\n intent: function() {\n module.verbose('Removing hide intent event from document');\n if(hasTouch) {\n $document\n .off('touchstart' + elementNamespace)\n .off('touchmove' + elementNamespace)\n ;\n }\n $document\n .off('click' + elementNamespace)\n ;\n }\n },\n\n filter: function(query) {\n var\n searchTerm = (query !== undefined)\n ? query\n : module.get.query(),\n afterFiltered = function() {\n if(module.is.multiple()) {\n module.filterActive();\n }\n if(query || (!query && module.get.activeItem().length == 0)) {\n module.select.firstUnfiltered();\n }\n if( module.has.allResultsFiltered() ) {\n if( settings.onNoResults.call(element, searchTerm) ) {\n if(settings.allowAdditions) {\n if(settings.hideAdditions) {\n module.verbose('User addition with no menu, setting empty style');\n module.set.empty();\n module.hideMenu();\n }\n }\n else {\n module.verbose('All items filtered, showing message', searchTerm);\n module.add.message(message.noResults);\n }\n }\n else {\n module.verbose('All items filtered, hiding dropdown', searchTerm);\n module.hideMenu();\n }\n }\n else {\n module.remove.empty();\n module.remove.message();\n }\n if(settings.allowAdditions) {\n module.add.userSuggestion(query);\n }\n if(module.is.searchSelection() && module.can.show() && module.is.focusedOnSearch() ) {\n module.show();\n }\n }\n ;\n if(settings.useLabels && module.has.maxSelections()) {\n return;\n }\n if(settings.apiSettings) {\n if( module.can.useAPI() ) {\n module.queryRemote(searchTerm, function() {\n if(settings.filterRemoteData) {\n module.filterItems(searchTerm);\n }\n afterFiltered();\n });\n }\n else {\n module.error(error.noAPI);\n }\n }\n else {\n module.filterItems(searchTerm);\n afterFiltered();\n }\n },\n\n queryRemote: function(query, callback) {\n var\n apiSettings = {\n errorDuration : false,\n cache : 'local',\n throttle : settings.throttle,\n urlData : {\n query: query\n },\n onError: function() {\n module.add.message(message.serverError);\n callback();\n },\n onFailure: function() {\n module.add.message(message.serverError);\n callback();\n },\n onSuccess : function(response) {\n module.remove.message();\n module.setup.menu({\n values: response[fields.remoteValues]\n });\n callback();\n }\n }\n ;\n if( !$module.api('get request') ) {\n module.setup.api();\n }\n apiSettings = $.extend(true, {}, apiSettings, settings.apiSettings);\n $module\n .api('setting', apiSettings)\n .api('query')\n ;\n },\n\n filterItems: function(query) {\n var\n searchTerm = (query !== undefined)\n ? query\n : module.get.query(),\n results = null,\n escapedTerm = module.escape.string(searchTerm),\n beginsWithRegExp = new RegExp('^' + escapedTerm, 'igm')\n ;\n // avoid loop if we're matching nothing\n if( module.has.query() ) {\n results = [];\n\n module.verbose('Searching for matching values', searchTerm);\n $item\n .each(function(){\n var\n $choice = $(this),\n text,\n value\n ;\n if(settings.match == 'both' || settings.match == 'text') {\n text = String(module.get.choiceText($choice, false));\n if(text.search(beginsWithRegExp) !== -1) {\n results.push(this);\n return true;\n }\n else if (settings.fullTextSearch === 'exact' && module.exactSearch(searchTerm, text)) {\n results.push(this);\n return true;\n }\n else if (settings.fullTextSearch === true && module.fuzzySearch(searchTerm, text)) {\n results.push(this);\n return true;\n }\n }\n if(settings.match == 'both' || settings.match == 'value') {\n value = String(module.get.choiceValue($choice, text));\n if(value.search(beginsWithRegExp) !== -1) {\n results.push(this);\n return true;\n }\n else if (settings.fullTextSearch === 'exact' && module.exactSearch(searchTerm, value)) {\n results.push(this);\n return true;\n }\n else if (settings.fullTextSearch === true && module.fuzzySearch(searchTerm, value)) {\n results.push(this);\n return true;\n }\n }\n })\n ;\n }\n module.debug('Showing only matched items', searchTerm);\n module.remove.filteredItem();\n if(results) {\n $item\n .not(results)\n .addClass(className.filtered)\n ;\n }\n },\n\n fuzzySearch: function(query, term) {\n var\n termLength = term.length,\n queryLength = query.length\n ;\n query = query.toLowerCase();\n term = term.toLowerCase();\n if(queryLength > termLength) {\n return false;\n }\n if(queryLength === termLength) {\n return (query === term);\n }\n search: for (var characterIndex = 0, nextCharacterIndex = 0; characterIndex < queryLength; characterIndex++) {\n var\n queryCharacter = query.charCodeAt(characterIndex)\n ;\n while(nextCharacterIndex < termLength) {\n if(term.charCodeAt(nextCharacterIndex++) === queryCharacter) {\n continue search;\n }\n }\n return false;\n }\n return true;\n },\n exactSearch: function (query, term) {\n query = query.toLowerCase();\n term = term.toLowerCase();\n if(term.indexOf(query) > -1) {\n return true;\n }\n return false;\n },\n filterActive: function() {\n if(settings.useLabels) {\n $item.filter('.' + className.active)\n .addClass(className.filtered)\n ;\n }\n },\n\n focusSearch: function(skipHandler) {\n if( module.has.search() && !module.is.focusedOnSearch() ) {\n if(skipHandler) {\n $module.off('focus' + eventNamespace, selector.search);\n $search.focus();\n $module.on('focus' + eventNamespace, selector.search, module.event.search.focus);\n }\n else {\n $search.focus();\n }\n }\n },\n\n forceSelection: function() {\n var\n $currentlySelected = $item.not(className.filtered).filter('.' + className.selected).eq(0),\n $activeItem = $item.not(className.filtered).filter('.' + className.active).eq(0),\n $selectedItem = ($currentlySelected.length > 0)\n ? $currentlySelected\n : $activeItem,\n hasSelected = ($selectedItem.length > 0)\n ;\n if(hasSelected && !module.is.multiple()) {\n module.debug('Forcing partial selection to selected item', $selectedItem);\n module.event.item.click.call($selectedItem, {}, true);\n return;\n }\n else {\n if(settings.allowAdditions) {\n module.set.selected(module.get.query());\n module.remove.searchTerm();\n }\n else {\n module.remove.searchTerm();\n }\n }\n },\n\n change: {\n values: function(values) {\n if(!settings.allowAdditions) {\n module.clear();\n }\n module.debug('Creating dropdown with specified values', values);\n module.setup.menu({values: values});\n $.each(values, function(index, item) {\n if(item.selected == true) {\n module.debug('Setting initial selection to', item.value);\n module.set.selected(item.value);\n return true;\n }\n });\n }\n },\n\n event: {\n change: function() {\n if(!internalChange) {\n module.debug('Input changed, updating selection');\n module.set.selected();\n }\n },\n focus: function() {\n if(settings.showOnFocus && !activated && module.is.hidden() && !pageLostFocus) {\n module.show();\n }\n },\n blur: function(event) {\n pageLostFocus = (document.activeElement === this);\n if(!activated && !pageLostFocus) {\n module.remove.activeLabel();\n module.hide();\n }\n },\n mousedown: function() {\n if(module.is.searchSelection()) {\n // prevent menu hiding on immediate re-focus\n willRefocus = true;\n }\n else {\n // prevents focus callback from occurring on mousedown\n activated = true;\n }\n },\n mouseup: function() {\n if(module.is.searchSelection()) {\n // prevent menu hiding on immediate re-focus\n willRefocus = false;\n }\n else {\n activated = false;\n }\n },\n click: function(event) {\n var\n $target = $(event.target)\n ;\n // focus search\n if($target.is($module)) {\n if(!module.is.focusedOnSearch()) {\n module.focusSearch();\n }\n else {\n module.show();\n }\n }\n },\n search: {\n focus: function() {\n activated = true;\n if(module.is.multiple()) {\n module.remove.activeLabel();\n }\n if(settings.showOnFocus) {\n module.search();\n }\n },\n blur: function(event) {\n pageLostFocus = (document.activeElement === this);\n if(module.is.searchSelection() && !willRefocus) {\n if(!itemActivated && !pageLostFocus) {\n if(settings.forceSelection) {\n module.forceSelection();\n }\n module.hide();\n }\n }\n willRefocus = false;\n }\n },\n icon: {\n click: function(event) {\n module.toggle();\n }\n },\n text: {\n focus: function(event) {\n activated = true;\n module.focusSearch();\n }\n },\n input: function(event) {\n if(module.is.multiple() || module.is.searchSelection()) {\n module.set.filtered();\n }\n clearTimeout(module.timer);\n module.timer = setTimeout(module.search, settings.delay.search);\n },\n label: {\n click: function(event) {\n var\n $label = $(this),\n $labels = $module.find(selector.label),\n $activeLabels = $labels.filter('.' + className.active),\n $nextActive = $label.nextAll('.' + className.active),\n $prevActive = $label.prevAll('.' + className.active),\n $range = ($nextActive.length > 0)\n ? $label.nextUntil($nextActive).add($activeLabels).add($label)\n : $label.prevUntil($prevActive).add($activeLabels).add($label)\n ;\n if(event.shiftKey) {\n $activeLabels.removeClass(className.active);\n $range.addClass(className.active);\n }\n else if(event.ctrlKey) {\n $label.toggleClass(className.active);\n }\n else {\n $activeLabels.removeClass(className.active);\n $label.addClass(className.active);\n }\n settings.onLabelSelect.apply(this, $labels.filter('.' + className.active));\n }\n },\n remove: {\n click: function() {\n var\n $label = $(this).parent()\n ;\n if( $label.hasClass(className.active) ) {\n // remove all selected labels\n module.remove.activeLabels();\n }\n else {\n // remove this label only\n module.remove.activeLabels( $label );\n }\n }\n },\n test: {\n toggle: function(event) {\n var\n toggleBehavior = (module.is.multiple())\n ? module.show\n : module.toggle\n ;\n if(module.is.bubbledLabelClick(event) || module.is.bubbledIconClick(event)) {\n return;\n }\n if( module.determine.eventOnElement(event, toggleBehavior) ) {\n event.preventDefault();\n }\n },\n touch: function(event) {\n module.determine.eventOnElement(event, function() {\n if(event.type == 'touchstart') {\n module.timer = setTimeout(function() {\n module.hide();\n }, settings.delay.touch);\n }\n else if(event.type == 'touchmove') {\n clearTimeout(module.timer);\n }\n });\n event.stopPropagation();\n },\n hide: function(event) {\n module.determine.eventInModule(event, module.hide);\n }\n },\n select: {\n mutation: function(mutations) {\n module.debug('<select> modified, recreating menu');\n var\n isSelectMutation = false\n ;\n $.each(mutations, function(index, mutation) {\n if($(mutation.target).is('select') || $(mutation.addedNodes).is('select')) {\n isSelectMutation = true;\n return true;\n }\n });\n if(isSelectMutation) {\n module.disconnect.selectObserver();\n module.refresh();\n module.setup.select();\n module.set.selected();\n module.observe.select();\n }\n }\n },\n menu: {\n mutation: function(mutations) {\n var\n mutation = mutations[0],\n $addedNode = mutation.addedNodes\n ? $(mutation.addedNodes[0])\n : $(false),\n $removedNode = mutation.removedNodes\n ? $(mutation.removedNodes[0])\n : $(false),\n $changedNodes = $addedNode.add($removedNode),\n isUserAddition = $changedNodes.is(selector.addition) || $changedNodes.closest(selector.addition).length > 0,\n isMessage = $changedNodes.is(selector.message) || $changedNodes.closest(selector.message).length > 0\n ;\n if(isUserAddition || isMessage) {\n module.debug('Updating item selector cache');\n module.refreshItems();\n }\n else {\n module.debug('Menu modified, updating selector cache');\n module.refresh();\n }\n },\n mousedown: function() {\n itemActivated = true;\n },\n mouseup: function() {\n itemActivated = false;\n }\n },\n item: {\n mouseenter: function(event) {\n var\n $target = $(event.target),\n $item = $(this),\n $subMenu = $item.children(selector.menu),\n $otherMenus = $item.siblings(selector.item).children(selector.menu),\n hasSubMenu = ($subMenu.length > 0),\n isBubbledEvent = ($subMenu.find($target).length > 0)\n ;\n if( !isBubbledEvent && hasSubMenu ) {\n clearTimeout(module.itemTimer);\n module.itemTimer = setTimeout(function() {\n module.verbose('Showing sub-menu', $subMenu);\n $.each($otherMenus, function() {\n module.animate.hide(false, $(this));\n });\n module.animate.show(false, $subMenu);\n }, settings.delay.show);\n event.preventDefault();\n }\n },\n mouseleave: function(event) {\n var\n $subMenu = $(this).children(selector.menu)\n ;\n if($subMenu.length > 0) {\n clearTimeout(module.itemTimer);\n module.itemTimer = setTimeout(function() {\n module.verbose('Hiding sub-menu', $subMenu);\n module.animate.hide(false, $subMenu);\n }, settings.delay.hide);\n }\n },\n click: function (event, skipRefocus) {\n var\n $choice = $(this),\n $target = (event)\n ? $(event.target)\n : $(''),\n $subMenu = $choice.find(selector.menu),\n text = module.get.choiceText($choice),\n value = module.get.choiceValue($choice, text),\n hasSubMenu = ($subMenu.length > 0),\n isBubbledEvent = ($subMenu.find($target).length > 0)\n ;\n // prevents IE11 bug where menu receives focus even though `tabindex=-1`\n if(module.has.menuSearch()) {\n $(document.activeElement).blur();\n }\n if(!isBubbledEvent && (!hasSubMenu || settings.allowCategorySelection)) {\n if(module.is.searchSelection()) {\n if(settings.allowAdditions) {\n module.remove.userAddition();\n }\n module.remove.searchTerm();\n if(!module.is.focusedOnSearch() && !(skipRefocus == true)) {\n module.focusSearch(true);\n }\n }\n if(!settings.useLabels) {\n module.remove.filteredItem();\n module.set.scrollPosition($choice);\n }\n module.determine.selectAction.call(this, text, value);\n }\n }\n },\n\n document: {\n // label selection should occur even when element has no focus\n keydown: function(event) {\n var\n pressedKey = event.which,\n isShortcutKey = module.is.inObject(pressedKey, keys)\n ;\n if(isShortcutKey) {\n var\n $label = $module.find(selector.label),\n $activeLabel = $label.filter('.' + className.active),\n activeValue = $activeLabel.data(metadata.value),\n labelIndex = $label.index($activeLabel),\n labelCount = $label.length,\n hasActiveLabel = ($activeLabel.length > 0),\n hasMultipleActive = ($activeLabel.length > 1),\n isFirstLabel = (labelIndex === 0),\n isLastLabel = (labelIndex + 1 == labelCount),\n isSearch = module.is.searchSelection(),\n isFocusedOnSearch = module.is.focusedOnSearch(),\n isFocused = module.is.focused(),\n caretAtStart = (isFocusedOnSearch && module.get.caretPosition() === 0),\n $nextLabel\n ;\n if(isSearch && !hasActiveLabel && !isFocusedOnSearch) {\n return;\n }\n\n if(pressedKey == keys.leftArrow) {\n // activate previous label\n if((isFocused || caretAtStart) && !hasActiveLabel) {\n module.verbose('Selecting previous label');\n $label.last().addClass(className.active);\n }\n else if(hasActiveLabel) {\n if(!event.shiftKey) {\n module.verbose('Selecting previous label');\n $label.removeClass(className.active);\n }\n else {\n module.verbose('Adding previous label to selection');\n }\n if(isFirstLabel && !hasMultipleActive) {\n $activeLabel.addClass(className.active);\n }\n else {\n $activeLabel.prev(selector.siblingLabel)\n .addClass(className.active)\n .end()\n ;\n }\n event.preventDefault();\n }\n }\n else if(pressedKey == keys.rightArrow) {\n // activate first label\n if(isFocused && !hasActiveLabel) {\n $label.first().addClass(className.active);\n }\n // activate next label\n if(hasActiveLabel) {\n if(!event.shiftKey) {\n module.verbose('Selecting next label');\n $label.removeClass(className.active);\n }\n else {\n module.verbose('Adding next label to selection');\n }\n if(isLastLabel) {\n if(isSearch) {\n if(!isFocusedOnSearch) {\n module.focusSearch();\n }\n else {\n $label.removeClass(className.active);\n }\n }\n else if(hasMultipleActive) {\n $activeLabel.next(selector.siblingLabel).addClass(className.active);\n }\n else {\n $activeLabel.addClass(className.active);\n }\n }\n else {\n $activeLabel.next(selector.siblingLabel).addClass(className.active);\n }\n event.preventDefault();\n }\n }\n else if(pressedKey == keys.deleteKey || pressedKey == keys.backspace) {\n if(hasActiveLabel) {\n module.verbose('Removing active labels');\n if(isLastLabel) {\n if(isSearch && !isFocusedOnSearch) {\n module.focusSearch();\n }\n }\n $activeLabel.last().next(selector.siblingLabel).addClass(className.active);\n module.remove.activeLabels($activeLabel);\n event.preventDefault();\n }\n else if(caretAtStart && !hasActiveLabel && pressedKey == keys.backspace) {\n module.verbose('Removing last label on input backspace');\n $activeLabel = $label.last().addClass(className.active);\n module.remove.activeLabels($activeLabel);\n }\n }\n else {\n $activeLabel.removeClass(className.active);\n }\n }\n }\n },\n\n keydown: function(event) {\n var\n pressedKey = event.which,\n isShortcutKey = module.is.inObject(pressedKey, keys)\n ;\n if(isShortcutKey) {\n var\n $currentlySelected = $item.not(selector.unselectable).filter('.' + className.selected).eq(0),\n $activeItem = $menu.children('.' + className.active).eq(0),\n $selectedItem = ($currentlySelected.length > 0)\n ? $currentlySelected\n : $activeItem,\n $visibleItems = ($selectedItem.length > 0)\n ? $selectedItem.siblings(':not(.' + className.filtered +')').addBack()\n : $menu.children(':not(.' + className.filtered +')'),\n $subMenu = $selectedItem.children(selector.menu),\n $parentMenu = $selectedItem.closest(selector.menu),\n inVisibleMenu = ($parentMenu.hasClass(className.visible) || $parentMenu.hasClass(className.animating) || $parentMenu.parent(selector.menu).length > 0),\n hasSubMenu = ($subMenu.length> 0),\n hasSelectedItem = ($selectedItem.length > 0),\n selectedIsSelectable = ($selectedItem.not(selector.unselectable).length > 0),\n delimiterPressed = (pressedKey == keys.delimiter && settings.allowAdditions && module.is.multiple()),\n isAdditionWithoutMenu = (settings.allowAdditions && settings.hideAdditions && (pressedKey == keys.enter || delimiterPressed) && selectedIsSelectable),\n $nextItem,\n isSubMenuItem,\n newIndex\n ;\n // allow selection with menu closed\n if(isAdditionWithoutMenu) {\n module.verbose('Selecting item from keyboard shortcut', $selectedItem);\n $selectedItem[0].click();\n if(module.is.searchSelection()) {\n module.remove.searchTerm();\n }\n }\n\n // visible menu keyboard shortcuts\n if( module.is.visible() ) {\n\n // enter (select or open sub-menu)\n if(pressedKey == keys.enter || delimiterPressed) {\n if(pressedKey == keys.enter && hasSelectedItem && hasSubMenu && !settings.allowCategorySelection) {\n module.verbose('Pressed enter on unselectable category, opening sub menu');\n pressedKey = keys.rightArrow;\n }\n else if(selectedIsSelectable) {\n module.verbose('Selecting item from keyboard shortcut', $selectedItem);\n $selectedItem[0].click();\n if(module.is.searchSelection()) {\n module.remove.searchTerm();\n }\n }\n event.preventDefault();\n }\n\n // sub-menu actions\n if(hasSelectedItem) {\n\n if(pressedKey == keys.leftArrow) {\n\n isSubMenuItem = ($parentMenu[0] !== $menu[0]);\n\n if(isSubMenuItem) {\n module.verbose('Left key pressed, closing sub-menu');\n module.animate.hide(false, $parentMenu);\n $selectedItem\n .removeClass(className.selected)\n ;\n $parentMenu\n .closest(selector.item)\n .addClass(className.selected)\n ;\n module.aria.refreshDescendant();\n event.preventDefault();\n }\n }\n\n // right arrow (show sub-menu)\n if(pressedKey == keys.rightArrow) {\n if(hasSubMenu) {\n module.verbose('Right key pressed, opening sub-menu');\n module.animate.show(false, $subMenu);\n $selectedItem\n .removeClass(className.selected)\n ;\n $subMenu\n .find(selector.item).eq(0)\n .addClass(className.selected)\n ;\n module.aria.refreshDescendant();\n event.preventDefault();\n }\n }\n }\n\n // up arrow (traverse menu up)\n if(pressedKey == keys.upArrow) {\n $nextItem = (hasSelectedItem && inVisibleMenu)\n ? $selectedItem.prevAll(selector.item + ':not(' + selector.unselectable + ')').eq(0)\n : $item.eq(0)\n ;\n if($visibleItems.index( $nextItem ) < 0) {\n module.verbose('Up key pressed but reached top of current menu');\n event.preventDefault();\n return;\n }\n else {\n module.verbose('Up key pressed, changing active item');\n $selectedItem\n .removeClass(className.selected)\n ;\n $nextItem\n .addClass(className.selected)\n ;\n module.aria.refreshDescendant();\n module.set.scrollPosition($nextItem);\n if(settings.selectOnKeydown && module.is.single()) {\n module.set.selectedItem($nextItem);\n }\n }\n event.preventDefault();\n }\n\n // down arrow (traverse menu down)\n if(pressedKey == keys.downArrow) {\n $nextItem = (hasSelectedItem && inVisibleMenu)\n ? $nextItem = $selectedItem.nextAll(selector.item + ':not(' + selector.unselectable + ')').eq(0)\n : $item.eq(0)\n ;\n if($nextItem.length === 0) {\n module.verbose('Down key pressed but reached bottom of current menu');\n event.preventDefault();\n return;\n }\n else {\n module.verbose('Down key pressed, changing active item');\n $item\n .removeClass(className.selected)\n ;\n $nextItem\n .addClass(className.selected)\n ;\n module.aria.refreshDescendant();\n module.set.scrollPosition($nextItem);\n if(settings.selectOnKeydown && module.is.single()) {\n module.set.selectedItem($nextItem);\n }\n }\n event.preventDefault();\n }\n\n // page down (show next page)\n if(pressedKey == keys.pageUp) {\n module.scrollPage('up');\n event.preventDefault();\n }\n if(pressedKey == keys.pageDown) {\n module.scrollPage('down');\n event.preventDefault();\n }\n\n // escape (close menu)\n if(pressedKey == keys.escape) {\n module.verbose('Escape key pressed, closing dropdown');\n module.hide();\n }\n\n }\n else {\n // delimiter key\n if(delimiterPressed) {\n event.preventDefault();\n }\n // down arrow (open menu)\n if(pressedKey == keys.downArrow && !module.is.visible()) {\n module.verbose('Down key pressed, showing dropdown');\n module.show();\n event.preventDefault();\n }\n }\n }\n else {\n if( !module.has.search() ) {\n module.set.selectedLetter( String.fromCharCode(pressedKey) );\n }\n }\n }\n },\n\n trigger: {\n change: function() {\n var\n events = document.createEvent('HTMLEvents'),\n inputElement = $input[0]\n ;\n if(inputElement) {\n module.verbose('Triggering native change event');\n events.initEvent('change', true, false);\n inputElement.dispatchEvent(events);\n }\n }\n },\n\n determine: {\n selectAction: function(text, value) {\n module.verbose('Determining action', settings.action);\n if( $.isFunction( module.action[settings.action] ) ) {\n module.verbose('Triggering preset action', settings.action, text, value);\n module.action[ settings.action ].call(element, text, value, this);\n }\n else if( $.isFunction(settings.action) ) {\n module.verbose('Triggering user action', settings.action, text, value);\n settings.action.call(element, text, value, this);\n }\n else {\n module.error(error.action, settings.action);\n }\n },\n eventInModule: function(event, callback) {\n var\n $target = $(event.target),\n inDocument = ($target.closest(document.documentElement).length > 0),\n inModule = ($target.closest($module).length > 0)\n ;\n callback = $.isFunction(callback)\n ? callback\n : function(){}\n ;\n if(inDocument && !inModule) {\n module.verbose('Triggering event', callback);\n callback();\n return true;\n }\n else {\n module.verbose('Event occurred in dropdown, canceling callback');\n return false;\n }\n },\n eventOnElement: function(event, callback) {\n var\n $target = $(event.target),\n $label = $target.closest(selector.siblingLabel),\n inVisibleDOM = document.body.contains(event.target),\n notOnLabel = ($module.find($label).length === 0),\n notInMenu = ($target.closest($menu).length === 0)\n ;\n callback = $.isFunction(callback)\n ? callback\n : function(){}\n ;\n if(inVisibleDOM && notOnLabel && notInMenu) {\n module.verbose('Triggering event', callback);\n callback();\n return true;\n }\n else {\n module.verbose('Event occurred in dropdown menu, canceling callback');\n return false;\n }\n }\n },\n\n action: {\n\n nothing: function() {},\n\n activate: function(text, value, element) {\n value = (value !== undefined)\n ? value\n : text\n ;\n if( module.can.activate( $(element) ) ) {\n module.set.selected(value, $(element));\n if(module.is.multiple() && !module.is.allFiltered()) {\n return;\n }\n else {\n module.hideAndClear();\n }\n }\n },\n\n select: function(text, value, element) {\n value = (value !== undefined)\n ? value\n : text\n ;\n if( module.can.activate( $(element) ) ) {\n module.set.value(value, text, $(element));\n if(module.is.multiple() && !module.is.allFiltered()) {\n return;\n }\n else {\n module.hideAndClear();\n }\n }\n },\n\n combo: function(text, value, element) {\n value = (value !== undefined)\n ? value\n : text\n ;\n module.set.selected(value, $(element));\n module.hideAndClear();\n },\n\n hide: function(text, value, element) {\n module.set.value(value, text);\n module.hideAndClear();\n }\n\n },\n\n get: {\n id: function() {\n return id;\n },\n defaultText: function() {\n return $module.data(metadata.defaultText);\n },\n defaultValue: function() {\n return $module.data(metadata.defaultValue);\n },\n placeholderText: function() {\n if(settings.placeholder != 'auto' && typeof settings.placeholder == 'string') {\n return settings.placeholder;\n }\n return $module.data(metadata.placeholderText) || '';\n },\n text: function() {\n return $text.text();\n },\n query: function() {\n return $.trim($search.val());\n },\n searchWidth: function(value) {\n value = (value !== undefined)\n ? value\n : $search.val()\n ;\n $sizer.text(value);\n // prevent rounding issues\n return Math.ceil( $sizer.width() + 1);\n },\n selectionCount: function() {\n var\n values = module.get.values(),\n count\n ;\n count = ( module.is.multiple() )\n ? $.isArray(values)\n ? values.length\n : 0\n : (module.get.value() !== '')\n ? 1\n : 0\n ;\n return count;\n },\n transition: function($subMenu) {\n return (settings.transition == 'auto')\n ? module.is.upward($subMenu)\n ? 'slide up'\n : 'slide down'\n : settings.transition\n ;\n },\n userValues: function() {\n var\n values = module.get.values()\n ;\n if(!values) {\n return false;\n }\n values = $.isArray(values)\n ? values\n : [values]\n ;\n return $.grep(values, function(value) {\n return (module.get.item(value) === false);\n });\n },\n uniqueArray: function(array) {\n return $.grep(array, function (value, index) {\n return $.inArray(value, array) === index;\n });\n },\n caretPosition: function() {\n var\n input = $search.get(0),\n range,\n rangeLength\n ;\n if('selectionStart' in input) {\n return input.selectionStart;\n }\n else if (document.selection) {\n input.focus();\n range = document.selection.createRange();\n rangeLength = range.text.length;\n range.moveStart('character', -input.value.length);\n return range.text.length - rangeLength;\n }\n },\n value: function() {\n var\n value = ($input.length > 0)\n ? $input.val()\n : $module.data(metadata.value),\n isEmptyMultiselect = ($.isArray(value) && value.length === 1 && value[0] === '')\n ;\n // prevents placeholder element from being selected when multiple\n return (value === undefined || isEmptyMultiselect)\n ? ''\n : value\n ;\n },\n values: function() {\n var\n value = module.get.value()\n ;\n if(value === '') {\n return '';\n }\n return ( !module.has.selectInput() && module.is.multiple() )\n ? (typeof value == 'string') // delimited string\n ? value.split(settings.delimiter)\n : ''\n : value\n ;\n },\n remoteValues: function() {\n var\n values = module.get.values(),\n remoteValues = false\n ;\n if(values) {\n if(typeof values == 'string') {\n values = [values];\n }\n $.each(values, function(index, value) {\n var\n name = module.read.remoteData(value)\n ;\n module.verbose('Restoring value from session data', name, value);\n if(name) {\n if(!remoteValues) {\n remoteValues = {};\n }\n remoteValues[value] = name;\n }\n });\n }\n return remoteValues;\n },\n choiceText: function($choice, preserveHTML) {\n preserveHTML = (preserveHTML !== undefined)\n ? preserveHTML\n : settings.preserveHTML\n ;\n if($choice) {\n if($choice.find(selector.menu).length > 0) {\n module.verbose('Retrieving text of element with sub-menu');\n $choice = $choice.clone();\n $choice.find(selector.menu).remove();\n $choice.find(selector.menuIcon).remove();\n }\n return ($choice.data(metadata.text) !== undefined)\n ? $choice.data(metadata.text)\n : (preserveHTML)\n ? $.trim($choice.html())\n : $.trim($choice.text())\n ;\n }\n },\n choiceValue: function($choice, choiceText) {\n choiceText = choiceText || module.get.choiceText($choice);\n if(!$choice) {\n return false;\n }\n return ($choice.data(metadata.value) !== undefined)\n ? String( $choice.data(metadata.value) )\n : (typeof choiceText === 'string')\n ? $.trim(choiceText.toLowerCase())\n : String(choiceText)\n ;\n },\n inputEvent: function() {\n var\n input = $search[0]\n ;\n if(input) {\n return (input.oninput !== undefined)\n ? 'input'\n : (input.onpropertychange !== undefined)\n ? 'propertychange'\n : 'keyup'\n ;\n }\n return false;\n },\n selectValues: function() {\n var\n select = {}\n ;\n select.values = [];\n $module\n .find('option')\n .each(function() {\n var\n $option = $(this),\n name = $option.html(),\n disabled = $option.attr('disabled'),\n value = ( $option.attr('value') !== undefined )\n ? $option.attr('value')\n : name\n ;\n if(settings.placeholder === 'auto' && value === '') {\n select.placeholder = name;\n }\n else {\n select.values.push({\n name : name,\n value : value,\n disabled : disabled\n });\n }\n })\n ;\n if(settings.placeholder && settings.placeholder !== 'auto') {\n module.debug('Setting placeholder value to', settings.placeholder);\n select.placeholder = settings.placeholder;\n }\n if(settings.sortSelect) {\n select.values.sort(function(a, b) {\n return (a.name > b.name)\n ? 1\n : -1\n ;\n });\n module.debug('Retrieved and sorted values from select', select);\n }\n else {\n module.debug('Retrieved values from select', select);\n }\n return select;\n },\n activeItem: function() {\n return $item.filter('.' + className.active);\n },\n selectedItem: function() {\n var\n $selectedItem = $item.not(selector.unselectable).filter('.' + className.selected)\n ;\n return ($selectedItem.length > 0)\n ? $selectedItem\n : $item.eq(0)\n ;\n },\n itemWithAdditions: function(value) {\n var\n $items = module.get.item(value),\n $userItems = module.create.userChoice(value),\n hasUserItems = ($userItems && $userItems.length > 0)\n ;\n if(hasUserItems) {\n $items = ($items.length > 0)\n ? $items.add($userItems)\n : $userItems\n ;\n }\n return $items;\n },\n item: function(value, strict) {\n var\n $selectedItem = false,\n shouldSearch,\n isMultiple\n ;\n value = (value !== undefined)\n ? value\n : ( module.get.values() !== undefined)\n ? module.get.values()\n : module.get.text()\n ;\n shouldSearch = (isMultiple)\n ? (value.length > 0)\n : (value !== undefined && value !== null)\n ;\n isMultiple = (module.is.multiple() && $.isArray(value));\n strict = (value === '' || value === 0)\n ? true\n : strict || false\n ;\n if(shouldSearch) {\n $item\n .each(function() {\n var\n $choice = $(this),\n optionText = module.get.choiceText($choice),\n optionValue = module.get.choiceValue($choice, optionText)\n ;\n // safe early exit\n if(optionValue === null || optionValue === undefined) {\n return;\n }\n if(isMultiple) {\n if($.inArray( String(optionValue), value) !== -1 || $.inArray(optionText, value) !== -1) {\n $selectedItem = ($selectedItem)\n ? $selectedItem.add($choice)\n : $choice\n ;\n }\n }\n else if(strict) {\n module.verbose('Ambiguous dropdown value using strict type check', $choice, value);\n if( optionValue === value || optionText === value) {\n $selectedItem = $choice;\n return true;\n }\n }\n else {\n if( String(optionValue) == String(value) || optionText == value) {\n module.verbose('Found select item by value', optionValue, value);\n $selectedItem = $choice;\n return true;\n }\n }\n })\n ;\n }\n return $selectedItem;\n }\n },\n\n check: {\n maxSelections: function(selectionCount) {\n if(settings.maxSelections) {\n selectionCount = (selectionCount !== undefined)\n ? selectionCount\n : module.get.selectionCount()\n ;\n if(selectionCount >= settings.maxSelections) {\n module.debug('Maximum selection count reached');\n if(settings.useLabels) {\n $item.addClass(className.filtered);\n module.add.message(message.maxSelections);\n }\n return true;\n }\n else {\n module.verbose('No longer at maximum selection count');\n module.remove.message();\n module.remove.filteredItem();\n if(module.is.searchSelection()) {\n module.filterItems();\n }\n return false;\n }\n }\n return true;\n }\n },\n\n restore: {\n defaults: function() {\n module.clear();\n module.restore.defaultText();\n module.restore.defaultValue();\n },\n defaultText: function() {\n var\n defaultText = module.get.defaultText(),\n placeholderText = module.get.placeholderText\n ;\n if(defaultText === placeholderText) {\n module.debug('Restoring default placeholder text', defaultText);\n module.set.placeholderText(defaultText);\n }\n else {\n module.debug('Restoring default text', defaultText);\n module.set.text(defaultText);\n }\n },\n placeholderText: function() {\n module.set.placeholderText();\n },\n defaultValue: function() {\n var\n defaultValue = module.get.defaultValue()\n ;\n if(defaultValue !== undefined) {\n module.debug('Restoring default value', defaultValue);\n if(defaultValue !== '') {\n module.set.value(defaultValue);\n module.set.selected();\n }\n else {\n module.remove.activeItem();\n module.remove.selectedItem();\n }\n }\n },\n labels: function() {\n if(settings.allowAdditions) {\n if(!settings.useLabels) {\n module.error(error.labels);\n settings.useLabels = true;\n }\n module.debug('Restoring selected values');\n module.create.userLabels();\n }\n module.check.maxSelections();\n },\n selected: function() {\n module.restore.values();\n if(module.is.multiple()) {\n module.debug('Restoring previously selected values and labels');\n module.restore.labels();\n }\n else {\n module.debug('Restoring previously selected values');\n }\n },\n values: function() {\n // prevents callbacks from occurring on initial load\n module.set.initialLoad();\n if(settings.apiSettings && settings.saveRemoteData && module.get.remoteValues()) {\n module.restore.remoteValues();\n }\n else {\n module.set.selected();\n }\n module.remove.initialLoad();\n },\n remoteValues: function() {\n var\n values = module.get.remoteValues()\n ;\n module.debug('Recreating selected from session data', values);\n if(values) {\n if( module.is.single() ) {\n $.each(values, function(value, name) {\n module.set.text(name);\n });\n }\n else {\n $.each(values, function(value, name) {\n module.add.label(value, name);\n });\n }\n }\n }\n },\n\n read: {\n remoteData: function(value) {\n var\n name\n ;\n if(window.Storage === undefined) {\n module.error(error.noStorage);\n return;\n }\n name = sessionStorage.getItem(value);\n return (name !== undefined)\n ? name\n : false\n ;\n }\n },\n\n save: {\n defaults: function() {\n module.save.defaultText();\n module.save.placeholderText();\n module.save.defaultValue();\n },\n defaultValue: function() {\n var\n value = module.get.value()\n ;\n module.verbose('Saving default value as', value);\n $module.data(metadata.defaultValue, value);\n },\n defaultText: function() {\n var\n text = module.get.text()\n ;\n module.verbose('Saving default text as', text);\n $module.data(metadata.defaultText, text);\n },\n placeholderText: function() {\n var\n text\n ;\n if(settings.placeholder !== false && $text.hasClass(className.placeholder)) {\n text = module.get.text();\n module.verbose('Saving placeholder text as', text);\n $module.data(metadata.placeholderText, text);\n }\n },\n remoteData: function(name, value) {\n if(window.Storage === undefined) {\n module.error(error.noStorage);\n return;\n }\n module.verbose('Saving remote data to session storage', value, name);\n sessionStorage.setItem(value, name);\n }\n },\n\n clear: function() {\n if(module.is.multiple() && settings.useLabels) {\n module.remove.labels();\n }\n else {\n module.remove.activeItem();\n module.remove.selectedItem();\n }\n module.set.placeholderText();\n module.clearValue();\n },\n\n clearValue: function() {\n module.set.value('');\n },\n\n scrollPage: function(direction, $selectedItem) {\n var\n $currentItem = $selectedItem || module.get.selectedItem(),\n $menu = $currentItem.closest(selector.menu),\n menuHeight = $menu.outerHeight(),\n currentScroll = $menu.scrollTop(),\n itemHeight = $item.eq(0).outerHeight(),\n itemsPerPage = Math.floor(menuHeight / itemHeight),\n maxScroll = $menu.prop('scrollHeight'),\n newScroll = (direction == 'up')\n ? currentScroll - (itemHeight * itemsPerPage)\n : currentScroll + (itemHeight * itemsPerPage),\n $selectableItem = $item.not(selector.unselectable),\n isWithinRange,\n $nextSelectedItem,\n elementIndex\n ;\n elementIndex = (direction == 'up')\n ? $selectableItem.index($currentItem) - itemsPerPage\n : $selectableItem.index($currentItem) + itemsPerPage\n ;\n isWithinRange = (direction == 'up')\n ? (elementIndex >= 0)\n : (elementIndex < $selectableItem.length)\n ;\n $nextSelectedItem = (isWithinRange)\n ? $selectableItem.eq(elementIndex)\n : (direction == 'up')\n ? $selectableItem.first()\n : $selectableItem.last()\n ;\n if($nextSelectedItem.length > 0) {\n module.debug('Scrolling page', direction, $nextSelectedItem);\n $currentItem\n .removeClass(className.selected)\n ;\n $nextSelectedItem\n .addClass(className.selected)\n ;\n if(settings.selectOnKeydown && module.is.single()) {\n module.set.selectedItem($nextSelectedItem);\n }\n $menu\n .scrollTop(newScroll)\n ;\n }\n },\n\n set: {\n filtered: function() {\n var\n isMultiple = module.is.multiple(),\n isSearch = module.is.searchSelection(),\n isSearchMultiple = (isMultiple && isSearch),\n searchValue = (isSearch)\n ? module.get.query()\n : '',\n hasSearchValue = (typeof searchValue === 'string' && searchValue.length > 0),\n searchWidth = module.get.searchWidth(),\n valueIsSet = searchValue !== ''\n ;\n if(isMultiple && hasSearchValue) {\n module.verbose('Adjusting input width', searchWidth, settings.glyphWidth);\n $search.css('width', searchWidth);\n }\n if(hasSearchValue || (isSearchMultiple && valueIsSet)) {\n module.verbose('Hiding placeholder text');\n $text.addClass(className.filtered);\n }\n else if(!isMultiple || (isSearchMultiple && !valueIsSet)) {\n module.verbose('Showing placeholder text');\n $text.removeClass(className.filtered);\n }\n },\n empty: function() {\n $module.addClass(className.empty);\n },\n loading: function() {\n $module.addClass(className.loading);\n },\n placeholderText: function(text) {\n text = text || module.get.placeholderText();\n module.debug('Setting placeholder text', text);\n module.set.text(text);\n $text.addClass(className.placeholder);\n },\n tabbable: function() {\n if( module.is.searchSelection() ) {\n module.debug('Added tabindex to searchable dropdown');\n $search\n .val('')\n .attr('tabindex', 0)\n ;\n $menu\n .attr('tabindex', -1)\n ;\n }\n else {\n module.debug('Added tabindex to dropdown');\n if( $module.attr('tabindex') === undefined) {\n $module\n .attr('tabindex', 0)\n ;\n $menu\n .attr('tabindex', -1)\n ;\n }\n }\n },\n initialLoad: function() {\n module.verbose('Setting initial load');\n initialLoad = true;\n },\n activeItem: function($item) {\n if( settings.allowAdditions && $item.filter(selector.addition).length > 0 ) {\n $item.addClass(className.filtered);\n }\n else {\n $item.addClass(className.active);\n }\n },\n partialSearch: function(text) {\n var\n length = module.get.query().length\n ;\n $search.val( text.substr(0, length));\n },\n scrollPosition: function($item, forceScroll) {\n var\n edgeTolerance = 5,\n $menu,\n hasActive,\n offset,\n itemHeight,\n itemOffset,\n menuOffset,\n menuScroll,\n menuHeight,\n abovePage,\n belowPage\n ;\n\n $item = $item || module.get.selectedItem();\n $menu = $item.closest(selector.menu);\n hasActive = ($item && $item.length > 0);\n forceScroll = (forceScroll !== undefined)\n ? forceScroll\n : false\n ;\n if($item && $menu.length > 0 && hasActive) {\n itemOffset = $item.position().top;\n\n $menu.addClass(className.loading);\n menuScroll = $menu.scrollTop();\n menuOffset = $menu.offset().top;\n itemOffset = $item.offset().top;\n offset = menuScroll - menuOffset + itemOffset;\n if(!forceScroll) {\n menuHeight = $menu.height();\n belowPage = menuScroll + menuHeight < (offset + edgeTolerance);\n abovePage = ((offset - edgeTolerance) < menuScroll);\n }\n module.debug('Scrolling to active item', offset);\n if(forceScroll || abovePage || belowPage) {\n $menu.scrollTop(offset);\n }\n $menu.removeClass(className.loading);\n }\n },\n text: function(text) {\n if(settings.action !== 'select') {\n if(settings.action == 'combo') {\n module.debug('Changing combo button text', text, $combo);\n if(settings.preserveHTML) {\n $combo.html(text);\n }\n else {\n $combo.text(text);\n }\n }\n else {\n if(text !== module.get.placeholderText()) {\n $text.removeClass(className.placeholder);\n }\n module.debug('Changing text', text, $text);\n $text\n .removeClass(className.filtered)\n ;\n if(settings.preserveHTML) {\n $text.html(text);\n }\n else {\n $text.text(text);\n }\n }\n }\n },\n selectedItem: function($item) {\n var\n value = module.get.choiceValue($item),\n searchText = module.get.choiceText($item, false),\n text = module.get.choiceText($item, true)\n ;\n module.debug('Setting user selection to item', $item);\n module.remove.activeItem();\n module.set.partialSearch(searchText);\n module.set.activeItem($item);\n module.set.selected(value, $item);\n module.set.text(text);\n },\n selectedLetter: function(letter) {\n var\n $selectedItem = $item.filter('.' + className.selected),\n alreadySelectedLetter = $selectedItem.length > 0 && module.has.firstLetter($selectedItem, letter),\n $nextValue = false,\n $nextItem\n ;\n // check next of same letter\n if(alreadySelectedLetter) {\n $nextItem = $selectedItem.nextAll($item).eq(0);\n if( module.has.firstLetter($nextItem, letter) ) {\n $nextValue = $nextItem;\n }\n }\n // check all values\n if(!$nextValue) {\n $item\n .each(function(){\n if(module.has.firstLetter($(this), letter)) {\n $nextValue = $(this);\n return false;\n }\n })\n ;\n }\n // set next value\n if($nextValue) {\n module.verbose('Scrolling to next value with letter', letter);\n module.set.scrollPosition($nextValue);\n $selectedItem.removeClass(className.selected);\n $nextValue.addClass(className.selected);\n module.aria.refreshDescendant();\n if(settings.selectOnKeydown && module.is.single()) {\n module.set.selectedItem($nextValue);\n }\n }\n },\n direction: function($menu) {\n if(settings.direction == 'auto') {\n // reset position\n module.remove.upward();\n\n if(module.can.openDownward($menu)) {\n module.remove.upward($menu);\n }\n else {\n module.set.upward($menu);\n }\n if(!module.is.leftward($menu) && !module.can.openRightward($menu)) {\n module.set.leftward($menu);\n }\n }\n else if(settings.direction == 'upward') {\n module.set.upward($menu);\n }\n },\n upward: function($currentMenu) {\n var $element = $currentMenu || $module;\n $element.addClass(className.upward);\n },\n leftward: function($currentMenu) {\n var $element = $currentMenu || $menu;\n $element.addClass(className.leftward);\n },\n value: function(value, text, $selected) {\n var\n escapedValue = module.escape.value(value),\n hasInput = ($input.length > 0),\n currentValue = module.get.values(),\n stringValue = (value !== undefined)\n ? String(value)\n : value,\n newValue\n ;\n if(hasInput) {\n if(!settings.allowReselection && stringValue == currentValue) {\n module.verbose('Skipping value update already same value', value, currentValue);\n if(!module.is.initialLoad()) {\n return;\n }\n }\n\n if( module.is.single() && module.has.selectInput() && module.can.extendSelect() ) {\n module.debug('Adding user option', value);\n module.add.optionValue(value);\n }\n module.debug('Updating input value', escapedValue, currentValue);\n internalChange = true;\n $input\n .val(escapedValue)\n ;\n if(settings.fireOnInit === false && module.is.initialLoad()) {\n module.debug('Input native change event ignored on initial load');\n }\n else {\n module.trigger.change();\n }\n internalChange = false;\n }\n else {\n module.verbose('Storing value in metadata', escapedValue, $input);\n if(escapedValue !== currentValue) {\n $module.data(metadata.value, stringValue);\n }\n }\n if(settings.fireOnInit === false && module.is.initialLoad()) {\n module.verbose('No callback on initial load', settings.onChange);\n }\n else {\n settings.onChange.call(element, value, text, $selected);\n }\n },\n active: function() {\n $module\n .addClass(className.active)\n ;\n },\n multiple: function() {\n $module.addClass(className.multiple);\n },\n visible: function() {\n $module.addClass(className.visible);\n },\n exactly: function(value, $selectedItem) {\n module.debug('Setting selected to exact values');\n module.clear();\n module.set.selected(value, $selectedItem);\n },\n selected: function(value, $selectedItem) {\n var\n isMultiple = module.is.multiple(),\n $userSelectedItem\n ;\n $selectedItem = (settings.allowAdditions)\n ? $selectedItem || module.get.itemWithAdditions(value)\n : $selectedItem || module.get.item(value)\n ;\n if(!$selectedItem) {\n return;\n }\n module.debug('Setting selected menu item to', $selectedItem);\n if(module.is.multiple()) {\n module.remove.searchWidth();\n }\n if(module.is.single()) {\n module.remove.activeItem();\n module.remove.selectedItem();\n }\n else if(settings.useLabels) {\n module.remove.selectedItem();\n }\n // select each item\n $selectedItem\n .each(function() {\n var\n $selected = $(this),\n selectedText = module.get.choiceText($selected),\n selectedValue = module.get.choiceValue($selected, selectedText),\n\n isFiltered = $selected.hasClass(className.filtered),\n isActive = $selected.hasClass(className.active),\n isUserValue = $selected.hasClass(className.addition),\n shouldAnimate = (isMultiple && $selectedItem.length == 1)\n ;\n if(isMultiple) {\n if(!isActive || isUserValue) {\n if(settings.apiSettings && settings.saveRemoteData) {\n module.save.remoteData(selectedText, selectedValue);\n }\n if(settings.useLabels) {\n module.add.label(selectedValue, selectedText, shouldAnimate);\n module.add.value(selectedValue, selectedText, $selected);\n module.set.activeItem($selected);\n module.filterActive();\n module.select.nextAvailable($selectedItem);\n }\n else {\n module.add.value(selectedValue, selectedText, $selected);\n module.set.text(module.add.variables(message.count));\n module.set.activeItem($selected);\n }\n }\n else if(!isFiltered) {\n module.debug('Selected active value, removing label');\n module.remove.selected(selectedValue);\n }\n }\n else {\n if(settings.apiSettings && settings.saveRemoteData) {\n module.save.remoteData(selectedText, selectedValue);\n }\n module.set.text(selectedText);\n module.set.value(selectedValue, selectedText, $selected);\n $selected\n .addClass(className.active)\n .addClass(className.selected)\n ;\n }\n })\n ;\n }\n },\n\n add: {\n label: function(value, text, shouldAnimate) {\n var\n $next = module.is.searchSelection()\n ? $search\n : $text,\n escapedValue = module.escape.value(value),\n $label\n ;\n if(settings.ignoreCase) {\n escapedValue = escapedValue.toLowerCase();\n }\n $label = $('<a />')\n .addClass(className.label)\n .attr('data-' + metadata.value, escapedValue)\n .html(templates.label(escapedValue, text))\n ;\n $label = settings.onLabelCreate.call($label, escapedValue, text);\n\n if(module.has.label(value)) {\n module.debug('User selection already exists, skipping', escapedValue);\n return;\n }\n if(settings.label.variation) {\n $label.addClass(settings.label.variation);\n }\n if(shouldAnimate === true) {\n module.debug('Animating in label', $label);\n $label\n .addClass(className.hidden)\n .insertBefore($next)\n .transition(settings.label.transition, settings.label.duration)\n ;\n }\n else {\n module.debug('Adding selection label', $label);\n $label\n .insertBefore($next)\n ;\n }\n },\n message: function(message) {\n var\n $message = $menu.children(selector.message),\n html = settings.templates.message(module.add.variables(message))\n ;\n if($message.length > 0) {\n $message\n .html(html)\n ;\n }\n else {\n $message = $('<div/>')\n .html(html)\n .addClass(className.message)\n .appendTo($menu)\n ;\n }\n },\n optionValue: function(value) {\n var\n escapedValue = module.escape.value(value),\n $option = $input.find('option[value=\"' + module.escape.string(escapedValue) + '\"]'),\n hasOption = ($option.length > 0)\n ;\n if(hasOption) {\n return;\n }\n // temporarily disconnect observer\n module.disconnect.selectObserver();\n if( module.is.single() ) {\n module.verbose('Removing previous user addition');\n $input.find('option.' + className.addition).remove();\n }\n $('<option/>')\n .prop('value', escapedValue)\n .addClass(className.addition)\n .html(value)\n .appendTo($input)\n ;\n module.verbose('Adding user addition as an <option>', value);\n module.observe.select();\n },\n userSuggestion: function(value) {\n var\n $addition = $menu.children(selector.addition),\n $existingItem = module.get.item(value),\n alreadyHasValue = $existingItem && $existingItem.not(selector.addition).length,\n hasUserSuggestion = $addition.length > 0,\n html\n ;\n if(settings.useLabels && module.has.maxSelections()) {\n return;\n }\n if(value === '' || alreadyHasValue) {\n $addition.remove();\n return;\n }\n if(hasUserSuggestion) {\n $addition\n .data(metadata.value, value)\n .data(metadata.text, value)\n .attr('data-' + metadata.value, value)\n .attr('data-' + metadata.text, value)\n .removeClass(className.filtered)\n ;\n if(!settings.hideAdditions) {\n html = settings.templates.addition( module.add.variables(message.addResult, value) );\n $addition\n .html(html)\n ;\n }\n module.verbose('Replacing user suggestion with new value', $addition);\n }\n else {\n $addition = module.create.userChoice(value);\n $addition\n .prependTo($menu)\n ;\n module.verbose('Adding item choice to menu corresponding with user choice addition', $addition);\n }\n if(!settings.hideAdditions || module.is.allFiltered()) {\n $addition\n .addClass(className.selected)\n .siblings()\n .removeClass(className.selected)\n ;\n }\n module.refreshItems();\n },\n variables: function(message, term) {\n var\n hasCount = (message.search('{count}') !== -1),\n hasMaxCount = (message.search('{maxCount}') !== -1),\n hasTerm = (message.search('{term}') !== -1),\n values,\n count,\n query\n ;\n module.verbose('Adding templated variables to message', message);\n if(hasCount) {\n count = module.get.selectionCount();\n message = message.replace('{count}', count);\n }\n if(hasMaxCount) {\n count = module.get.selectionCount();\n message = message.replace('{maxCount}', settings.maxSelections);\n }\n if(hasTerm) {\n query = term || module.get.query();\n message = message.replace('{term}', query);\n }\n return message;\n },\n value: function(addedValue, addedText, $selectedItem) {\n var\n currentValue = module.get.values(),\n newValue\n ;\n if(module.has.value(addedValue)) {\n module.debug('Value already selected');\n return;\n }\n if(addedValue === '') {\n module.debug('Cannot select blank values from multiselect');\n return;\n }\n // extend current array\n if($.isArray(currentValue)) {\n newValue = currentValue.concat([addedValue]);\n newValue = module.get.uniqueArray(newValue);\n }\n else {\n newValue = [addedValue];\n }\n // add values\n if( module.has.selectInput() ) {\n if(module.can.extendSelect()) {\n module.debug('Adding value to select', addedValue, newValue, $input);\n module.add.optionValue(addedValue);\n }\n }\n else {\n newValue = newValue.join(settings.delimiter);\n module.debug('Setting hidden input to delimited value', newValue, $input);\n }\n\n if(settings.fireOnInit === false && module.is.initialLoad()) {\n module.verbose('Skipping onadd callback on initial load', settings.onAdd);\n }\n else {\n settings.onAdd.call(element, addedValue, addedText, $selectedItem);\n }\n module.set.value(newValue, addedValue, addedText, $selectedItem);\n module.check.maxSelections();\n }\n },\n\n remove: {\n active: function() {\n $module.removeClass(className.active);\n },\n activeLabel: function() {\n $module.find(selector.label).removeClass(className.active);\n },\n empty: function() {\n $module.removeClass(className.empty);\n },\n loading: function() {\n $module.removeClass(className.loading);\n },\n initialLoad: function() {\n initialLoad = false;\n },\n upward: function($currentMenu) {\n var $element = $currentMenu || $module;\n $element.removeClass(className.upward);\n },\n leftward: function($currentMenu) {\n var $element = $currentMenu || $menu;\n $element.removeClass(className.leftward);\n },\n visible: function() {\n $module.removeClass(className.visible);\n },\n activeItem: function() {\n $item.removeClass(className.active);\n },\n filteredItem: function() {\n if(settings.useLabels && module.has.maxSelections() ) {\n return;\n }\n if(settings.useLabels && module.is.multiple()) {\n $item.not('.' + className.active).removeClass(className.filtered);\n }\n else {\n $item.removeClass(className.filtered);\n }\n module.remove.empty();\n },\n optionValue: function(value) {\n var\n escapedValue = module.escape.value(value),\n $option = $input.find('option[value=\"' + module.escape.string(escapedValue) + '\"]'),\n hasOption = ($option.length > 0)\n ;\n if(!hasOption || !$option.hasClass(className.addition)) {\n return;\n }\n // temporarily disconnect observer\n if(selectObserver) {\n selectObserver.disconnect();\n module.verbose('Temporarily disconnecting mutation observer');\n }\n $option.remove();\n module.verbose('Removing user addition as an <option>', escapedValue);\n if(selectObserver) {\n selectObserver.observe($input[0], {\n childList : true,\n subtree : true\n });\n }\n },\n message: function() {\n $menu.children(selector.message).remove();\n },\n searchWidth: function() {\n $search.css('width', '');\n },\n searchTerm: function() {\n module.verbose('Cleared search term');\n $search.val('');\n module.set.filtered();\n },\n userAddition: function() {\n $item.filter(selector.addition).remove();\n },\n selected: function(value, $selectedItem) {\n $selectedItem = (settings.allowAdditions)\n ? $selectedItem || module.get.itemWithAdditions(value)\n : $selectedItem || module.get.item(value)\n ;\n\n if(!$selectedItem) {\n return false;\n }\n\n $selectedItem\n .each(function() {\n var\n $selected = $(this),\n selectedText = module.get.choiceText($selected),\n selectedValue = module.get.choiceValue($selected, selectedText)\n ;\n if(module.is.multiple()) {\n if(settings.useLabels) {\n module.remove.value(selectedValue, selectedText, $selected);\n module.remove.label(selectedValue);\n }\n else {\n module.remove.value(selectedValue, selectedText, $selected);\n if(module.get.selectionCount() === 0) {\n module.set.placeholderText();\n }\n else {\n module.set.text(module.add.variables(message.count));\n }\n }\n }\n else {\n module.remove.value(selectedValue, selectedText, $selected);\n }\n $selected\n .removeClass(className.filtered)\n .removeClass(className.active)\n ;\n if(settings.useLabels) {\n $selected.removeClass(className.selected);\n }\n })\n ;\n },\n selectedItem: function() {\n $item.removeClass(className.selected);\n },\n value: function(removedValue, removedText, $removedItem) {\n var\n values = module.get.values(),\n newValue\n ;\n if( module.has.selectInput() ) {\n module.verbose('Input is <select> removing selected option', removedValue);\n newValue = module.remove.arrayValue(removedValue, values);\n module.remove.optionValue(removedValue);\n }\n else {\n module.verbose('Removing from delimited values', removedValue);\n newValue = module.remove.arrayValue(removedValue, values);\n newValue = newValue.join(settings.delimiter);\n }\n if(settings.fireOnInit === false && module.is.initialLoad()) {\n module.verbose('No callback on initial load', settings.onRemove);\n }\n else {\n settings.onRemove.call(element, removedValue, removedText, $removedItem);\n }\n module.set.value(newValue, removedText, $removedItem);\n module.check.maxSelections();\n },\n arrayValue: function(removedValue, values) {\n if( !$.isArray(values) ) {\n values = [values];\n }\n values = $.grep(values, function(value){\n return (removedValue != value);\n });\n module.verbose('Removed value from delimited string', removedValue, values);\n return values;\n },\n label: function(value, shouldAnimate) {\n var\n $labels = $module.find(selector.label),\n $removedLabel = $labels.filter('[data-' + metadata.value + '=\"' + module.escape.string(value) +'\"]')\n ;\n module.verbose('Removing label', $removedLabel);\n $removedLabel.remove();\n },\n activeLabels: function($activeLabels) {\n $activeLabels = $activeLabels || $module.find(selector.label).filter('.' + className.active);\n module.verbose('Removing active label selections', $activeLabels);\n module.remove.labels($activeLabels);\n },\n labels: function($labels) {\n $labels = $labels || $module.find(selector.label);\n module.verbose('Removing labels', $labels);\n $labels\n .each(function(){\n var\n $label = $(this),\n value = $label.data(metadata.value),\n stringValue = (value !== undefined)\n ? String(value)\n : value,\n isUserValue = module.is.userValue(stringValue)\n ;\n if(settings.onLabelRemove.call($label, value) === false) {\n module.debug('Label remove callback cancelled removal');\n return;\n }\n module.remove.message();\n if(isUserValue) {\n module.remove.value(stringValue);\n module.remove.label(stringValue);\n }\n else {\n // selected will also remove label\n module.remove.selected(stringValue);\n }\n })\n ;\n },\n tabbable: function() {\n if( module.is.searchSelection() ) {\n module.debug('Searchable dropdown initialized');\n $search\n .removeAttr('tabindex')\n ;\n $menu\n .removeAttr('tabindex')\n ;\n }\n else {\n module.debug('Simple selection dropdown initialized');\n $module\n .removeAttr('tabindex')\n ;\n $menu\n .removeAttr('tabindex')\n ;\n }\n }\n },\n\n has: {\n menuSearch: function() {\n return (module.has.search() && $search.closest($menu).length > 0);\n },\n search: function() {\n return ($search.length > 0);\n },\n sizer: function() {\n return ($sizer.length > 0);\n },\n selectInput: function() {\n return ( $input.is('select') );\n },\n minCharacters: function(searchTerm) {\n if(settings.minCharacters) {\n searchTerm = (searchTerm !== undefined)\n ? String(searchTerm)\n : String(module.get.query())\n ;\n return (searchTerm.length >= settings.minCharacters);\n }\n return true;\n },\n firstLetter: function($item, letter) {\n var\n text,\n firstLetter\n ;\n if(!$item || $item.length === 0 || typeof letter !== 'string') {\n return false;\n }\n text = module.get.choiceText($item, false);\n letter = letter.toLowerCase();\n firstLetter = String(text).charAt(0).toLowerCase();\n return (letter == firstLetter);\n },\n input: function() {\n return ($input.length > 0);\n },\n items: function() {\n return ($item.length > 0);\n },\n menu: function() {\n return ($menu.length > 0);\n },\n message: function() {\n return ($menu.children(selector.message).length !== 0);\n },\n label: function(value) {\n var\n escapedValue = module.escape.value(value),\n $labels = $module.find(selector.label)\n ;\n if(settings.ignoreCase) {\n escapedValue = escapedValue.toLowerCase();\n }\n return ($labels.filter('[data-' + metadata.value + '=\"' + module.escape.string(escapedValue) +'\"]').length > 0);\n },\n maxSelections: function() {\n return (settings.maxSelections && module.get.selectionCount() >= settings.maxSelections);\n },\n allResultsFiltered: function() {\n var\n $normalResults = $item.not(selector.addition)\n ;\n return ($normalResults.filter(selector.unselectable).length === $normalResults.length);\n },\n userSuggestion: function() {\n return ($menu.children(selector.addition).length > 0);\n },\n query: function() {\n return (module.get.query() !== '');\n },\n value: function(value) {\n return (settings.ignoreCase)\n ? module.has.valueIgnoringCase(value)\n : module.has.valueMatchingCase(value)\n ;\n },\n valueMatchingCase: function(value) {\n var\n values = module.get.values(),\n hasValue = $.isArray(values)\n ? values && ($.inArray(value, values) !== -1)\n : (values == value)\n ;\n return (hasValue)\n ? true\n : false\n ;\n },\n valueIgnoringCase: function(value) {\n var\n values = module.get.values(),\n hasValue = false\n ;\n if(!$.isArray(values)) {\n values = [values];\n }\n $.each(values, function(index, existingValue) {\n if(String(value).toLowerCase() == String(existingValue).toLowerCase()) {\n hasValue = true;\n return false;\n }\n });\n return hasValue;\n }\n },\n\n is: {\n active: function() {\n return $module.hasClass(className.active);\n },\n animatingInward: function() {\n return $menu.transition('is inward');\n },\n animatingOutward: function() {\n return $menu.transition('is outward');\n },\n bubbledLabelClick: function(event) {\n return $(event.target).is('select, input') && $module.closest('label').length > 0;\n },\n bubbledIconClick: function(event) {\n return $(event.target).closest($icon).length > 0;\n },\n alreadySetup: function() {\n return ($module.is('select') && $module.parent(selector.dropdown).data(moduleNamespace) !== undefined && $module.prev().length === 0);\n },\n animating: function($subMenu) {\n return ($subMenu)\n ? $subMenu.transition && $subMenu.transition('is animating')\n : $menu.transition && $menu.transition('is animating')\n ;\n },\n leftward: function($subMenu) {\n var $selectedMenu = $subMenu || $menu;\n return $selectedMenu.hasClass(className.leftward);\n },\n disabled: function() {\n return $module.hasClass(className.disabled);\n },\n focused: function() {\n return (document.activeElement === $module[0]);\n },\n focusedOnSearch: function() {\n return (document.activeElement === $search[0]);\n },\n allFiltered: function() {\n return( (module.is.multiple() || module.has.search()) && !(settings.hideAdditions == false && module.has.userSuggestion()) && !module.has.message() && module.has.allResultsFiltered() );\n },\n hidden: function($subMenu) {\n return !module.is.visible($subMenu);\n },\n initialLoad: function() {\n return initialLoad;\n },\n inObject: function(needle, object) {\n var\n found = false\n ;\n $.each(object, function(index, property) {\n if(property == needle) {\n found = true;\n return true;\n }\n });\n return found;\n },\n multiple: function() {\n return $module.hasClass(className.multiple);\n },\n remote: function() {\n return settings.apiSettings && module.can.useAPI();\n },\n single: function() {\n return !module.is.multiple();\n },\n selectMutation: function(mutations) {\n var\n selectChanged = false\n ;\n $.each(mutations, function(index, mutation) {\n if(mutation.target && $(mutation.target).is('select')) {\n selectChanged = true;\n return true;\n }\n });\n return selectChanged;\n },\n search: function() {\n return $module.hasClass(className.search);\n },\n searchSelection: function() {\n return ( module.has.search() && $search.parent(selector.dropdown).length === 1 );\n },\n selection: function() {\n return $module.hasClass(className.selection);\n },\n userValue: function(value) {\n return ($.inArray(value, module.get.userValues()) !== -1);\n },\n upward: function($menu) {\n var $element = $menu || $module;\n return $element.hasClass(className.upward);\n },\n visible: function($subMenu) {\n return ($subMenu)\n ? $subMenu.hasClass(className.visible)\n : $menu.hasClass(className.visible)\n ;\n },\n verticallyScrollableContext: function() {\n var\n overflowY = ($context.get(0) !== window)\n ? $context.css('overflow-y')\n : false\n ;\n return (overflowY == 'auto' || overflowY == 'scroll');\n },\n horizontallyScrollableContext: function() {\n var\n overflowX = ($context.get(0) !== window)\n ? $context.css('overflow-X')\n : false\n ;\n return (overflowX == 'auto' || overflowX == 'scroll');\n }\n },\n\n can: {\n activate: function($item) {\n if(settings.useLabels) {\n return true;\n }\n if(!module.has.maxSelections()) {\n return true;\n }\n if(module.has.maxSelections() && $item.hasClass(className.active)) {\n return true;\n }\n return false;\n },\n openDownward: function($subMenu) {\n var\n $currentMenu = $subMenu || $menu,\n canOpenDownward = true,\n onScreen = {},\n calculations\n ;\n $currentMenu\n .addClass(className.loading)\n ;\n calculations = {\n context: {\n offset : ($context.get(0) === window)\n ? { top: 0, left: 0}\n : $context.offset(),\n scrollTop : $context.scrollTop(),\n height : $context.outerHeight()\n },\n menu : {\n offset: $currentMenu.offset(),\n height: $currentMenu.outerHeight()\n }\n };\n if(module.is.verticallyScrollableContext()) {\n calculations.menu.offset.top += calculations.context.scrollTop;\n }\n onScreen = {\n above : (calculations.context.scrollTop) <= calculations.menu.offset.top - calculations.context.offset.top - calculations.menu.height,\n below : (calculations.context.scrollTop + calculations.context.height) >= calculations.menu.offset.top - calculations.context.offset.top + calculations.menu.height\n };\n if(onScreen.below) {\n module.verbose('Dropdown can fit in context downward', onScreen);\n canOpenDownward = true;\n }\n else if(!onScreen.below && !onScreen.above) {\n module.verbose('Dropdown cannot fit in either direction, favoring downward', onScreen);\n canOpenDownward = true;\n }\n else {\n module.verbose('Dropdown cannot fit below, opening upward', onScreen);\n canOpenDownward = false;\n }\n $currentMenu.removeClass(className.loading);\n return canOpenDownward;\n },\n openRightward: function($subMenu) {\n var\n $currentMenu = $subMenu || $menu,\n canOpenRightward = true,\n isOffscreenRight = false,\n calculations\n ;\n $currentMenu\n .addClass(className.loading)\n ;\n calculations = {\n context: {\n offset : ($context.get(0) === window)\n ? { top: 0, left: 0}\n : $context.offset(),\n scrollLeft : $context.scrollLeft(),\n width : $context.outerWidth()\n },\n menu: {\n offset : $currentMenu.offset(),\n width : $currentMenu.outerWidth()\n }\n };\n if(module.is.horizontallyScrollableContext()) {\n calculations.menu.offset.left += calculations.context.scrollLeft;\n }\n isOffscreenRight = (calculations.menu.offset.left - calculations.context.offset.left + calculations.menu.width >= calculations.context.scrollLeft + calculations.context.width);\n if(isOffscreenRight) {\n module.verbose('Dropdown cannot fit in context rightward', isOffscreenRight);\n canOpenRightward = false;\n }\n $currentMenu.removeClass(className.loading);\n return canOpenRightward;\n },\n click: function() {\n return (hasTouch || settings.on == 'click');\n },\n extendSelect: function() {\n return settings.allowAdditions || settings.apiSettings;\n },\n show: function() {\n return !module.is.disabled() && (module.has.items() || module.has.message());\n },\n useAPI: function() {\n return $.fn.api !== undefined;\n }\n },\n\n animate: {\n show: function(callback, $subMenu) {\n var\n $currentMenu = $subMenu || $menu,\n start = ($subMenu)\n ? function() {}\n : function() {\n module.hideSubMenus();\n module.hideOthers();\n module.set.active();\n },\n transition\n ;\n callback = $.isFunction(callback)\n ? callback\n : function(){}\n ;\n module.verbose('Doing menu show animation', $currentMenu);\n module.set.direction($subMenu);\n transition = module.get.transition($subMenu);\n if( module.is.selection() ) {\n module.set.scrollPosition(module.get.selectedItem(), true);\n }\n if( module.is.hidden($currentMenu) || module.is.animating($currentMenu) ) {\n if(transition == 'none') {\n start();\n $currentMenu.transition('show');\n callback.call(element);\n }\n else if($.fn.transition !== undefined && $module.transition('is supported')) {\n $currentMenu\n .transition({\n animation : transition + ' in',\n debug : settings.debug,\n verbose : settings.verbose,\n duration : settings.duration,\n queue : true,\n onStart : start,\n onComplete : function() {\n callback.call(element);\n }\n })\n ;\n }\n else {\n module.error(error.noTransition, transition);\n }\n }\n },\n hide: function(callback, $subMenu) {\n var\n $currentMenu = $subMenu || $menu,\n duration = ($subMenu)\n ? (settings.duration * 0.9)\n : settings.duration,\n start = ($subMenu)\n ? function() {}\n : function() {\n if( module.can.click() ) {\n module.unbind.intent();\n }\n module.remove.active();\n },\n transition = module.get.transition($subMenu)\n ;\n callback = $.isFunction(callback)\n ? callback\n : function(){}\n ;\n if( module.is.visible($currentMenu) || module.is.animating($currentMenu) ) {\n module.verbose('Doing menu hide animation', $currentMenu);\n\n if(transition == 'none') {\n start();\n $currentMenu.transition('hide');\n callback.call(element);\n }\n else if($.fn.transition !== undefined && $module.transition('is supported')) {\n $currentMenu\n .transition({\n animation : transition + ' out',\n duration : settings.duration,\n debug : settings.debug,\n verbose : settings.verbose,\n queue : false,\n onStart : start,\n onComplete : function() {\n callback.call(element);\n }\n })\n ;\n }\n else {\n module.error(error.transition);\n }\n }\n }\n },\n\n hideAndClear: function() {\n module.remove.searchTerm();\n if( module.has.maxSelections() ) {\n return;\n }\n if(module.has.search()) {\n module.hide(function() {\n module.remove.filteredItem();\n });\n }\n else {\n module.hide();\n }\n },\n\n delay: {\n show: function() {\n module.verbose('Delaying show event to ensure user intent');\n clearTimeout(module.timer);\n module.timer = setTimeout(module.show, settings.delay.show);\n },\n hide: function() {\n module.verbose('Delaying hide event to ensure user intent');\n clearTimeout(module.timer);\n module.timer = setTimeout(module.hide, settings.delay.hide);\n }\n },\n\n escape: {\n value: function(value) {\n var\n multipleValues = $.isArray(value),\n stringValue = (typeof value === 'string'),\n isUnparsable = (!stringValue && !multipleValues),\n hasQuotes = (stringValue && value.search(regExp.quote) !== -1),\n values = []\n ;\n if(isUnparsable || !hasQuotes) {\n return value;\n }\n module.debug('Encoding quote values for use in select', value);\n if(multipleValues) {\n $.each(value, function(index, value){\n values.push(value.replace(regExp.quote, '&quot;'));\n });\n return values;\n }\n return value.replace(regExp.quote, '&quot;');\n },\n string: function(text) {\n text = String(text);\n return text.replace(regExp.escape, '\\\\$&');\n }\n },\n\n setting: function(name, value) {\n module.debug('Changing setting', name, value);\n if( $.isPlainObject(name) ) {\n $.extend(true, settings, name);\n }\n else if(value !== undefined) {\n if($.isPlainObject(settings[name])) {\n $.extend(true, settings[name], value);\n }\n else {\n settings[name] = value;\n }\n }\n else {\n return settings[name];\n }\n },\n internal: function(name, value) {\n if( $.isPlainObject(name) ) {\n $.extend(true, module, name);\n }\n else if(value !== undefined) {\n module[name] = value;\n }\n else {\n return module[name];\n }\n },\n debug: function() {\n if(!settings.silent && settings.debug) {\n if(settings.performance) {\n module.performance.log(arguments);\n }\n else {\n module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\n module.debug.apply(console, arguments);\n }\n }\n },\n verbose: function() {\n if(!settings.silent && settings.verbose && settings.debug) {\n if(settings.performance) {\n module.performance.log(arguments);\n }\n else {\n module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\n module.verbose.apply(console, arguments);\n }\n }\n },\n error: function() {\n if(!settings.silent) {\n module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\n module.error.apply(console, arguments);\n }\n },\n performance: {\n log: function(message) {\n var\n currentTime,\n executionTime,\n previousTime\n ;\n if(settings.performance) {\n currentTime = new Date().getTime();\n previousTime = time || currentTime;\n executionTime = currentTime - previousTime;\n time = currentTime;\n performance.push({\n 'Name' : message[0],\n 'Arguments' : [].slice.call(message, 1) || '',\n 'Element' : element,\n 'Execution Time' : executionTime\n });\n }\n clearTimeout(module.performance.timer);\n module.performance.timer = setTimeout(module.performance.display, 500);\n },\n display: function() {\n var\n title = settings.name + ':',\n totalTime = 0\n ;\n time = false;\n clearTimeout(module.performance.timer);\n $.each(performance, function(index, data) {\n totalTime += data['Execution Time'];\n });\n title += ' ' + totalTime + 'ms';\n if(moduleSelector) {\n title += ' \\'' + moduleSelector + '\\'';\n }\n if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\n console.groupCollapsed(title);\n if(console.table) {\n console.table(performance);\n }\n else {\n $.each(performance, function(index, data) {\n console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\n });\n }\n console.groupEnd();\n }\n performance = [];\n }\n },\n invoke: function(query, passedArguments, context) {\n var\n object = instance,\n maxDepth,\n found,\n response\n ;\n passedArguments = passedArguments || queryArguments;\n context = element || context;\n if(typeof query == 'string' && object !== undefined) {\n query = query.split(/[\\. ]/);\n maxDepth = query.length - 1;\n $.each(query, function(depth, value) {\n var camelCaseValue = (depth != maxDepth)\n ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\n : query\n ;\n if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\n object = object[camelCaseValue];\n }\n else if( object[camelCaseValue] !== undefined ) {\n found = object[camelCaseValue];\n return false;\n }\n else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\n object = object[value];\n }\n else if( object[value] !== undefined ) {\n found = object[value];\n return false;\n }\n else {\n module.error(error.method, query);\n return false;\n }\n });\n }\n if ( $.isFunction( found ) ) {\n response = found.apply(context, passedArguments);\n }\n else if(found !== undefined) {\n response = found;\n }\n if($.isArray(returnedValue)) {\n returnedValue.push(response);\n }\n else if(returnedValue !== undefined) {\n returnedValue = [returnedValue, response];\n }\n else if(response !== undefined) {\n returnedValue = response;\n }\n return found;\n }\n };\n\n if(methodInvoked) {\n if(instance === undefined) {\n module.initialize();\n }\n module.invoke(query);\n }\n else {\n if(instance !== undefined) {\n instance.invoke('destroy');\n }\n module.initialize();\n }\n })\n ;\n return (returnedValue !== undefined)\n ? returnedValue\n : $allModules\n ;\n};\n\n$.fn.dropdown.settings = {\n\n silent : false,\n debug : false,\n verbose : false,\n performance : true,\n\n on : 'click', // what event should show menu action on item selection\n action : 'activate', // action on item selection (nothing, activate, select, combo, hide, function(){})\n\n values : false, // specify values to use for dropdown\n\n apiSettings : false,\n selectOnKeydown : true, // Whether selection should occur automatically when keyboard shortcuts used\n minCharacters : 0, // Minimum characters required to trigger API call\n\n filterRemoteData : false, // Whether API results should be filtered after being returned for query term\n saveRemoteData : true, // Whether remote name/value pairs should be stored in sessionStorage to allow remote data to be restored on page refresh\n\n throttle : 200, // How long to wait after last user input to search remotely\n\n context : window, // Context to use when determining if on screen\n direction : 'auto', // Whether dropdown should always open in one direction\n keepOnScreen : true, // Whether dropdown should check whether it is on screen before showing\n\n match : 'both', // what to match against with search selection (both, text, or label)\n fullTextSearch : false, // search anywhere in value (set to 'exact' to require exact matches)\n\n placeholder : 'auto', // whether to convert blank <select> values to placeholder text\n preserveHTML : true, // preserve html when selecting value\n sortSelect : false, // sort selection on init\n\n forceSelection : true, // force a choice on blur with search selection\n\n allowAdditions : false, // whether multiple select should allow user added values\n ignoreCase : false, // whether to consider values not matching in case to be the same\n hideAdditions : true, // whether or not to hide special message prompting a user they can enter a value\n\n maxSelections : false, // When set to a number limits the number of selections to this count\n useLabels : true, // whether multiple select should filter currently active selections from choices\n delimiter : ',', // when multiselect uses normal <input> the values will be delimited with this character\n\n showOnFocus : true, // show menu on focus\n allowReselection : false, // whether current value should trigger callbacks when reselected\n allowTab : true, // add tabindex to element\n allowCategorySelection : false, // allow elements with sub-menus to be selected\n\n fireOnInit : false, // Whether callbacks should fire when initializing dropdown values\n\n transition : 'auto', // auto transition will slide down or up based on direction\n duration : 200, // duration of transition\n\n glyphWidth : 1.037, // widest glyph width in em (W is 1.037 em) used to calculate multiselect input width\n\n // label settings on multi-select\n label: {\n transition : 'scale',\n duration : 200,\n variation : false\n },\n\n // delay before event\n delay : {\n hide : 300,\n show : 200,\n search : 20,\n touch : 50\n },\n\n /* Callbacks */\n onChange : function(value, text, $selected){},\n onAdd : function(value, text, $selected){},\n onRemove : function(value, text, $selected){},\n\n onLabelSelect : function($selectedLabels){},\n onLabelCreate : function(value, text) { return $(this); },\n onLabelRemove : function(value) { return true; },\n onNoResults : function(searchTerm) { return true; },\n onShow : function(){},\n onHide : function(){},\n\n /* Component */\n name : 'Dropdown',\n namespace : 'dropdown',\n\n message: {\n addResult : 'Add <b>{term}</b>',\n count : '{count} selected',\n maxSelections : 'Max {maxCount} selections',\n noResults : 'No results found.',\n serverError : 'There was an error contacting the server'\n },\n\n error : {\n action : 'You called a dropdown action that was not defined',\n alreadySetup : 'Once a select has been initialized behaviors must be called on the created ui dropdown',\n labels : 'Allowing user additions currently requires the use of labels.',\n missingMultiple : '<select> requires multiple property to be set to correctly preserve multiple values',\n method : 'The method you called is not defined.',\n noAPI : 'The API module is required to load resources remotely',\n noStorage : 'Saving remote data requires session storage',\n noTransition : 'This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>'\n },\n\n regExp : {\n escape : /[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\n quote : /\"/g\n },\n\n metadata : {\n defaultText : 'defaultText',\n defaultValue : 'defaultValue',\n placeholderText : 'placeholder',\n text : 'text',\n value : 'value'\n },\n\n // property names for remote query\n fields: {\n remoteValues : 'results', // grouping for api results\n values : 'values', // grouping for all dropdown values\n disabled : 'disabled', // whether value should be disabled\n name : 'name', // displayed dropdown text\n value : 'value', // actual dropdown value\n text : 'text' // displayed text when selected\n },\n\n keys : {\n backspace : 8,\n delimiter : 188, // comma\n deleteKey : 46,\n enter : 13,\n escape : 27,\n pageUp : 33,\n pageDown : 34,\n leftArrow : 37,\n upArrow : 38,\n rightArrow : 39,\n downArrow : 40\n },\n\n selector : {\n addition : '.addition',\n dropdown : '.ui.dropdown',\n hidden : '.hidden',\n icon : '> .dropdown.icon',\n input : '> input[type=\"hidden\"], > select',\n item : '.item',\n label : '> .label',\n remove : '> .label > .delete.icon',\n siblingLabel : '.label',\n menu : '.menu',\n message : '.message',\n menuIcon : '.dropdown.icon',\n search : 'input.search, .menu > .search > input, .menu input.search',\n sizer : '> input.sizer',\n text : '> .text:not(.icon)',\n unselectable : '.disabled, .filtered'\n },\n\n className : {\n active : 'active',\n addition : 'addition',\n animating : 'animating',\n disabled : 'disabled',\n empty : 'empty',\n dropdown : 'ui dropdown',\n filtered : 'filtered',\n hidden : 'hidden transition',\n item : 'item',\n label : 'ui label',\n loading : 'loading',\n menu : 'menu',\n message : 'message',\n multiple : 'multiple',\n placeholder : 'default',\n sizer : 'sizer',\n search : 'search',\n selected : 'selected',\n selection : 'selection',\n upward : 'upward',\n leftward : 'left',\n visible : 'visible'\n }\n\n};\n\n/* Templates */\n$.fn.dropdown.settings.templates = {\n\n // generates dropdown from select values\n dropdown: function(select) {\n var\n placeholder = select.placeholder || false,\n values = select.values || {},\n html = ''\n ;\n html += '<i class=\"dropdown icon\"></i>';\n if(select.placeholder) {\n html += '<div class=\"default text\">' + placeholder + '</div>';\n }\n else {\n html += '<div class=\"text\"></div>';\n }\n html += '<div class=\"menu\">';\n $.each(select.values, function(index, option) {\n html += (option.disabled)\n ? '<div class=\"disabled item\" data-value=\"' + option.value + '\">' + option.name + '</div>'\n : '<div class=\"item\" data-value=\"' + option.value + '\">' + option.name + '</div>'\n ;\n });\n html += '</div>';\n return html;\n },\n\n // generates just menu from select\n menu: function(response, fields) {\n var\n values = response[fields.values] || {},\n html = ''\n ;\n $.each(values, function(index, option) {\n var\n maybeText = (option[fields.text])\n ? 'data-text=\"' + option[fields.text] + '\"'\n : '',\n maybeDisabled = (option[fields.disabled])\n ? 'disabled '\n : ''\n ;\n html += '<div class=\"'+ maybeDisabled +'item\" data-value=\"' + option[fields.value] + '\"' + maybeText + '>';\n html += option[fields.name];\n html += '</div>';\n });\n return html;\n },\n\n // generates label for multiselect\n label: function(value, text) {\n return text + '<i class=\"delete icon\"></i>';\n },\n\n\n // generates messages like \"No results\"\n message: function(message) {\n return message;\n },\n\n // generates user addition to selection menu\n addition: function(choice) {\n return choice;\n }\n\n};\n\n})( jQuery, window, document );\n","$(async () => {\n const graphCanvas = document.getElementById('graph-canvas');\n if (!graphCanvas) return;\n\n const [{ default: gitGraph }] = await Promise.all([\n import(/* webpackChunkName: \"gitgraph\" */'./gitGraph.js'),\n import(/* webpackChunkName: \"gitgraph\" */'../css/gitGraph.css'),\n ]);\n\n const graphList = [];\n $('#graph-raw-list li span.node-relation').each(function () {\n graphList.push($(this).text());\n });\n\n gitGraph(graphCanvas, graphList);\n});\n","/* globals wipPrefixes, issuesTribute, emojiTribute */\n/* exported timeAddManual, toggleStopwatch, cancelStopwatch, initHeatmap */\n/* exported toggleDeadlineForm, setDeadline, updateDeadline, deleteDependencyModal, cancelCodeComment, onOAuthLoginClick */\n\nimport './publicPath.js';\nimport './gitGraphLoader.js';\nimport './semanticDropdown.js';\n\nfunction htmlEncode(text) {\n return jQuery('<div />').text(text).html();\n}\n\nlet csrf;\nlet suburl;\nlet previewFileModes;\nlet simpleMDEditor;\nlet codeMirrorEditor;\n\n// Disable Dropzone auto-discover because it's manually initialized\nif (typeof (Dropzone) !== 'undefined') {\n Dropzone.autoDiscover = false;\n}\n\nfunction initCommentPreviewTab($form) {\n const $tabMenu = $form.find('.tabular.menu');\n $tabMenu.find('.item').tab();\n $tabMenu.find(`.item[data-tab=\"${$tabMenu.data('preview')}\"]`).click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $this.data('context'),\n text: $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('write')}\"] textarea`).val()\n }, (data) => {\n const $previewPanel = $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('preview')}\"]`);\n $previewPanel.html(data);\n emojify.run($previewPanel[0]);\n $('pre code', $previewPanel[0]).each(function () {\n hljs.highlightBlock(this);\n });\n });\n });\n\n buttonsClickOnEnter();\n}\n\nfunction initEditPreviewTab($form) {\n const $tabMenu = $form.find('.tabular.menu');\n $tabMenu.find('.item').tab();\n const $previewTab = $tabMenu.find(`.item[data-tab=\"${$tabMenu.data('preview')}\"]`);\n if ($previewTab.length) {\n previewFileModes = $previewTab.data('preview-file-modes').split(',');\n $previewTab.click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $this.data('context'),\n text: $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('write')}\"] textarea`).val()\n }, (data) => {\n const $previewPanel = $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('preview')}\"]`);\n $previewPanel.html(data);\n emojify.run($previewPanel[0]);\n $('pre code', $previewPanel[0]).each(function () {\n hljs.highlightBlock(this);\n });\n });\n });\n }\n}\n\nfunction initEditDiffTab($form) {\n const $tabMenu = $form.find('.tabular.menu');\n $tabMenu.find('.item').tab();\n $tabMenu.find(`.item[data-tab=\"${$tabMenu.data('diff')}\"]`).click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n context: $this.data('context'),\n content: $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('write')}\"] textarea`).val()\n }, (data) => {\n const $diffPreviewPanel = $form.find(`.tab.segment[data-tab=\"${$tabMenu.data('diff')}\"]`);\n $diffPreviewPanel.html(data);\n emojify.run($diffPreviewPanel[0]);\n });\n });\n}\n\n\nfunction initEditForm() {\n if ($('.edit.form').length === 0) {\n return;\n }\n\n initEditPreviewTab($('.edit.form'));\n initEditDiffTab($('.edit.form'));\n}\n\nfunction initBranchSelector() {\n const $selectBranch = $('.ui.select-branch');\n const $branchMenu = $selectBranch.find('.reference-list-menu');\n $branchMenu.find('.item:not(.no-select)').click(function () {\n const selectedValue = $(this).data('id');\n $($(this).data('id-selector')).val(selectedValue);\n $selectBranch.find('.ui .branch-name').text(selectedValue);\n });\n $selectBranch.find('.reference.column').click(function () {\n $selectBranch.find('.scrolling.reference-list-menu').css('display', 'none');\n $selectBranch.find('.reference .text').removeClass('black');\n $($(this).data('target')).css('display', 'block');\n $(this).find('.text').addClass('black');\n return false;\n });\n}\n\nfunction updateIssuesMeta(url, action, issueIds, elementId) {\n return new Promise(((resolve) => {\n $.ajax({\n type: 'POST',\n url,\n data: {\n _csrf: csrf,\n action,\n issue_ids: issueIds,\n id: elementId\n },\n success: resolve\n });\n }));\n}\n\nfunction initRepoStatusChecker() {\n const migrating = $('#repo_migrating');\n $('#repo_migrating_failed').hide();\n if (migrating) {\n const repo_name = migrating.attr('repo');\n if (typeof repo_name === 'undefined') {\n return;\n }\n $.ajax({\n type: 'GET',\n url: `${suburl}/${repo_name}/status`,\n data: {\n _csrf: csrf,\n },\n complete(xhr) {\n if (xhr.status === 200) {\n if (xhr.responseJSON) {\n if (xhr.responseJSON.status === 0) {\n window.location.reload();\n return;\n }\n\n setTimeout(() => {\n initRepoStatusChecker();\n }, 2000);\n return;\n }\n }\n $('#repo_migrating_progress').hide();\n $('#repo_migrating_failed').show();\n }\n });\n }\n}\n\nfunction initReactionSelector(parent) {\n let reactions = '';\n if (!parent) {\n parent = $(document);\n reactions = '.reactions > ';\n }\n\n parent.find(`${reactions}a.label`).popup({ position: 'bottom left', metadata: { content: 'title', title: 'none' } });\n\n parent.find(`.select-reaction > .menu > .item, ${reactions}a.label`).on('click', function (e) {\n const vm = this;\n e.preventDefault();\n\n if ($(this).hasClass('disabled')) return;\n\n const actionURL = $(this).hasClass('item')\n ? $(this).closest('.select-reaction').data('action-url')\n : $(this).data('action-url');\n const url = `${actionURL}/${$(this).hasClass('blue') ? 'unreact' : 'react'}`;\n $.ajax({\n type: 'POST',\n url,\n data: {\n _csrf: csrf,\n content: $(this).data('content')\n }\n }).done((resp) => {\n if (resp && (resp.html || resp.empty)) {\n const content = $(vm).closest('.content');\n let react = content.find('.segment.reactions');\n if (!resp.empty && react.length > 0) {\n react.remove();\n }\n if (!resp.empty) {\n react = $('<div class=\"ui attached segment reactions\"></div>');\n const attachments = content.find('.segment.bottom:first');\n if (attachments.length > 0) {\n react.insertBefore(attachments);\n } else {\n react.appendTo(content);\n }\n react.html(resp.html);\n const hasEmoji = react.find('.has-emoji');\n for (let i = 0; i < hasEmoji.length; i++) {\n emojify.run(hasEmoji.get(i));\n }\n react.find('.dropdown').dropdown();\n initReactionSelector(react);\n }\n }\n });\n });\n}\n\nfunction insertAtCursor(field, value) {\n if (field.selectionStart || field.selectionStart === 0) {\n const startPos = field.selectionStart;\n const endPos = field.selectionEnd;\n field.value = field.value.substring(0, startPos)\n + value\n + field.value.substring(endPos, field.value.length);\n field.selectionStart = startPos + value.length;\n field.selectionEnd = startPos + value.length;\n } else {\n field.value += value;\n }\n}\n\nfunction replaceAndKeepCursor(field, oldval, newval) {\n if (field.selectionStart || field.selectionStart === 0) {\n const startPos = field.selectionStart;\n const endPos = field.selectionEnd;\n field.value = field.value.replace(oldval, newval);\n field.selectionStart = startPos + newval.length - oldval.length;\n field.selectionEnd = endPos + newval.length - oldval.length;\n } else {\n field.value = field.value.replace(oldval, newval);\n }\n}\n\nfunction retrieveImageFromClipboardAsBlob(pasteEvent, callback) {\n if (!pasteEvent.clipboardData) {\n return;\n }\n\n const { items } = pasteEvent.clipboardData;\n if (typeof items === 'undefined') {\n return;\n }\n\n for (let i = 0; i < items.length; i++) {\n if (items[i].type.indexOf('image') === -1) continue;\n const blob = items[i].getAsFile();\n\n if (typeof (callback) === 'function') {\n pasteEvent.preventDefault();\n pasteEvent.stopPropagation();\n callback(blob);\n }\n }\n}\n\nfunction uploadFile(file, callback) {\n const xhr = new XMLHttpRequest();\n\n xhr.onload = function () {\n if (xhr.status === 200) {\n callback(xhr.responseText);\n }\n };\n\n xhr.open('post', `${suburl}/attachments`, true);\n xhr.setRequestHeader('X-Csrf-Token', csrf);\n const formData = new FormData();\n formData.append('file', file, file.name);\n xhr.send(formData);\n}\n\nfunction reload() {\n window.location.reload();\n}\n\nfunction initImagePaste(target) {\n target.each(function () {\n const field = this;\n field.addEventListener('paste', (event) => {\n retrieveImageFromClipboardAsBlob(event, (img) => {\n const name = img.name.substr(0, img.name.lastIndexOf('.'));\n insertAtCursor(field, `![${name}]()`);\n uploadFile(img, (res) => {\n const data = JSON.parse(res);\n replaceAndKeepCursor(field, `![${name}]()`, `![${name}](${suburl}/attachments/${data.uuid})`);\n const input = $(`<input id=\"${data.uuid}\" name=\"files\" type=\"hidden\">`).val(data.uuid);\n $('.files').append(input);\n });\n });\n }, false);\n });\n}\n\nfunction initCommentForm() {\n if ($('.comment.form').length === 0) {\n return;\n }\n\n initBranchSelector();\n initCommentPreviewTab($('.comment.form'));\n initImagePaste($('.comment.form textarea'));\n\n // Listsubmit\n function initListSubmits(selector, outerSelector) {\n const $list = $(`.ui.${outerSelector}.list`);\n const $noSelect = $list.find('.no-select');\n const $listMenu = $(`.${selector} .menu`);\n let hasLabelUpdateAction = $listMenu.data('action') === 'update';\n const labels = {};\n\n $(`.${selector}`).dropdown('setting', 'onHide', () => {\n hasLabelUpdateAction = $listMenu.data('action') === 'update'; // Update the var\n if (hasLabelUpdateAction) {\n const promises = [];\n Object.keys(labels).forEach((elementId) => {\n const label = labels[elementId];\n const promise = updateIssuesMeta(\n label['update-url'],\n label.action,\n label['issue-id'],\n elementId\n );\n promises.push(promise);\n });\n Promise.all(promises).then(reload);\n }\n });\n\n $listMenu.find('.item:not(.no-select)').click(function () {\n // we don't need the action attribute when updating assignees\n if (selector === 'select-assignees-modify') {\n // UI magic. We need to do this here, otherwise it would destroy the functionality of\n // adding/removing labels\n if ($(this).hasClass('checked')) {\n $(this).removeClass('checked');\n $(this).find('.octicon').removeClass('octicon-check');\n } else {\n $(this).addClass('checked');\n $(this).find('.octicon').addClass('octicon-check');\n }\n\n updateIssuesMeta(\n $listMenu.data('update-url'),\n '',\n $listMenu.data('issue-id'),\n $(this).data('id')\n );\n $listMenu.data('action', 'update'); // Update to reload the page when we updated items\n return false;\n }\n\n if ($(this).hasClass('checked')) {\n $(this).removeClass('checked');\n $(this).find('.octicon').removeClass('octicon-check');\n if (hasLabelUpdateAction) {\n if (!($(this).data('id') in labels)) {\n labels[$(this).data('id')] = {\n 'update-url': $listMenu.data('update-url'),\n action: 'detach',\n 'issue-id': $listMenu.data('issue-id'),\n };\n } else {\n delete labels[$(this).data('id')];\n }\n }\n } else {\n $(this).addClass('checked');\n $(this).find('.octicon').addClass('octicon-check');\n if (hasLabelUpdateAction) {\n if (!($(this).data('id') in labels)) {\n labels[$(this).data('id')] = {\n 'update-url': $listMenu.data('update-url'),\n action: 'attach',\n 'issue-id': $listMenu.data('issue-id'),\n };\n } else {\n delete labels[$(this).data('id')];\n }\n }\n }\n\n const listIds = [];\n $(this).parent().find('.item').each(function () {\n if ($(this).hasClass('checked')) {\n listIds.push($(this).data('id'));\n $($(this).data('id-selector')).removeClass('hide');\n } else {\n $($(this).data('id-selector')).addClass('hide');\n }\n });\n if (listIds.length === 0) {\n $noSelect.removeClass('hide');\n } else {\n $noSelect.addClass('hide');\n }\n $($(this).parent().data('id')).val(listIds.join(','));\n return false;\n });\n $listMenu.find('.no-select.item').click(function () {\n if (hasLabelUpdateAction || selector === 'select-assignees-modify') {\n updateIssuesMeta(\n $listMenu.data('update-url'),\n 'clear',\n $listMenu.data('issue-id'),\n ''\n ).then(reload);\n }\n\n $(this).parent().find('.item').each(function () {\n $(this).removeClass('checked');\n $(this).find('.octicon').removeClass('octicon-check');\n });\n\n $list.find('.item').each(function () {\n $(this).addClass('hide');\n });\n $noSelect.removeClass('hide');\n $($(this).parent().data('id')).val('');\n });\n }\n\n // Init labels and assignees\n initListSubmits('select-label', 'labels');\n initListSubmits('select-assignees', 'assignees');\n initListSubmits('select-assignees-modify', 'assignees');\n\n function selectItem(select_id, input_id) {\n const $menu = $(`${select_id} .menu`);\n const $list = $(`.ui${select_id}.list`);\n const hasUpdateAction = $menu.data('action') === 'update';\n\n $menu.find('.item:not(.no-select)').click(function () {\n $(this).parent().find('.item').each(function () {\n $(this).removeClass('selected active');\n });\n\n $(this).addClass('selected active');\n if (hasUpdateAction) {\n updateIssuesMeta(\n $menu.data('update-url'),\n '',\n $menu.data('issue-id'),\n $(this).data('id')\n ).then(reload);\n }\n switch (input_id) {\n case '#milestone_id':\n $list.find('.selected').html(`<a class=\"item\" href=${$(this).data('href')}>${\n htmlEncode($(this).text())}</a>`);\n break;\n case '#assignee_id':\n $list.find('.selected').html(`<a class=\"item\" href=${$(this).data('href')}>`\n + `<img class=\"ui avatar image\" src=${$(this).data('avatar')}>${\n htmlEncode($(this).text())}</a>`);\n }\n $(`.ui${select_id}.list .no-select`).addClass('hide');\n $(input_id).val($(this).data('id'));\n });\n $menu.find('.no-select.item').click(function () {\n $(this).parent().find('.item:not(.no-select)').each(function () {\n $(this).removeClass('selected active');\n });\n\n if (hasUpdateAction) {\n updateIssuesMeta(\n $menu.data('update-url'),\n '',\n $menu.data('issue-id'),\n $(this).data('id')\n ).then(reload);\n }\n\n $list.find('.selected').html('');\n $list.find('.no-select').removeClass('hide');\n $(input_id).val('');\n });\n }\n\n // Milestone and assignee\n selectItem('.select-milestone', '#milestone_id');\n selectItem('.select-assignee', '#assignee_id');\n}\n\nfunction initInstall() {\n if ($('.install').length === 0) {\n return;\n }\n\n if ($('#db_host').val() === '') {\n $('#db_host').val('127.0.0.1:3306');\n $('#db_user').val('gitea');\n $('#db_name').val('gitea');\n }\n\n // Database type change detection.\n $('#db_type').change(function () {\n const sqliteDefault = 'data/gitea.db';\n const tidbDefault = 'data/gitea_tidb';\n\n const dbType = $(this).val();\n if (dbType === 'SQLite3') {\n $('#sql_settings').hide();\n $('#pgsql_settings').hide();\n $('#mysql_settings').hide();\n $('#sqlite_settings').show();\n\n if (dbType === 'SQLite3' && $('#db_path').val() === tidbDefault) {\n $('#db_path').val(sqliteDefault);\n }\n return;\n }\n\n const dbDefaults = {\n MySQL: '127.0.0.1:3306',\n PostgreSQL: '127.0.0.1:5432',\n MSSQL: '127.0.0.1:1433'\n };\n\n $('#sqlite_settings').hide();\n $('#sql_settings').show();\n\n $('#pgsql_settings').toggle(dbType === 'PostgreSQL');\n $('#mysql_settings').toggle(dbType === 'MySQL');\n $.each(dbDefaults, (_type, defaultHost) => {\n if ($('#db_host').val() === defaultHost) {\n $('#db_host').val(dbDefaults[dbType]);\n return false;\n }\n });\n });\n\n // TODO: better handling of exclusive relations.\n $('#offline-mode input').change(function () {\n if ($(this).is(':checked')) {\n $('#disable-gravatar').checkbox('check');\n $('#federated-avatar-lookup').checkbox('uncheck');\n }\n });\n $('#disable-gravatar input').change(function () {\n if ($(this).is(':checked')) {\n $('#federated-avatar-lookup').checkbox('uncheck');\n } else {\n $('#offline-mode').checkbox('uncheck');\n }\n });\n $('#federated-avatar-lookup input').change(function () {\n if ($(this).is(':checked')) {\n $('#disable-gravatar').checkbox('uncheck');\n $('#offline-mode').checkbox('uncheck');\n }\n });\n $('#enable-openid-signin input').change(function () {\n if ($(this).is(':checked')) {\n if (!$('#disable-registration input').is(':checked')) {\n $('#enable-openid-signup').checkbox('check');\n }\n } else {\n $('#enable-openid-signup').checkbox('uncheck');\n }\n });\n $('#disable-registration input').change(function () {\n if ($(this).is(':checked')) {\n $('#enable-captcha').checkbox('uncheck');\n $('#enable-openid-signup').checkbox('uncheck');\n } else {\n $('#enable-openid-signup').checkbox('check');\n }\n });\n $('#enable-captcha input').change(function () {\n if ($(this).is(':checked')) {\n $('#disable-registration').checkbox('uncheck');\n }\n });\n}\n\nfunction initIssueComments() {\n if ($('.repository.view.issue .comments').length === 0) return;\n\n $(document).click((event) => {\n const urlTarget = $(':target');\n if (urlTarget.length === 0) return;\n\n const urlTargetId = urlTarget.attr('id');\n if (!urlTargetId) return;\n if (!/^(issue|pull)(comment)?-\\d+$/.test(urlTargetId)) return;\n\n const $target = $(event.target);\n\n if ($target.closest(`#${urlTargetId}`).length === 0) {\n const scrollPosition = $(window).scrollTop();\n window.location.hash = '';\n $(window).scrollTop(scrollPosition);\n window.history.pushState(null, null, ' ');\n }\n });\n}\n\nfunction initRepository() {\n if ($('.repository').length === 0) {\n return;\n }\n\n function initFilterSearchDropdown(selector) {\n const $dropdown = $(selector);\n $dropdown.dropdown({\n fullTextSearch: true,\n selectOnKeydown: false,\n onChange(_text, _value, $choice) {\n if ($choice.data('url')) {\n window.location.href = $choice.data('url');\n }\n },\n message: { noResults: $dropdown.data('no-results') }\n });\n }\n\n // File list and commits\n if ($('.repository.file.list').length > 0 || ('.repository.commits').length > 0) {\n initFilterBranchTagDropdown('.choose.reference .dropdown');\n }\n\n // Wiki\n if ($('.repository.wiki.view').length > 0) {\n initFilterSearchDropdown('.choose.page .dropdown');\n }\n\n // Options\n if ($('.repository.settings.options').length > 0) {\n $('#repo_name').keyup(function () {\n const $prompt = $('#repo-name-change-prompt');\n if ($(this).val().toString().toLowerCase() !== $(this).data('name').toString().toLowerCase()) {\n $prompt.show();\n } else {\n $prompt.hide();\n }\n });\n\n // Enable or select internal/external wiki system and issue tracker.\n $('.enable-system').change(function () {\n if (this.checked) {\n $($(this).data('target')).removeClass('disabled');\n if (!$(this).data('context')) $($(this).data('context')).addClass('disabled');\n } else {\n $($(this).data('target')).addClass('disabled');\n if (!$(this).data('context')) $($(this).data('context')).removeClass('disabled');\n }\n });\n $('.enable-system-radio').change(function () {\n if (this.value === 'false') {\n $($(this).data('target')).addClass('disabled');\n if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).removeClass('disabled');\n } else if (this.value === 'true') {\n $($(this).data('target')).removeClass('disabled');\n if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).addClass('disabled');\n }\n });\n }\n\n // Labels\n if ($('.repository.labels').length > 0) {\n // Create label\n const $newLabelPanel = $('.new-label.segment');\n $('.new-label.button').click(() => {\n $newLabelPanel.show();\n });\n $('.new-label.segment .cancel').click(() => {\n $newLabelPanel.hide();\n });\n\n $('.color-picker').each(function () {\n $(this).minicolors();\n });\n $('.precolors .color').click(function () {\n const color_hex = $(this).data('color-hex');\n $('.color-picker').val(color_hex);\n $('.minicolors-swatch-color').css('background-color', color_hex);\n });\n $('.edit-label-button').click(function () {\n $('#label-modal-id').val($(this).data('id'));\n $('.edit-label .new-label-input').val($(this).data('title'));\n $('.edit-label .new-label-desc-input').val($(this).data('description'));\n $('.edit-label .color-picker').val($(this).data('color'));\n $('.minicolors-swatch-color').css('background-color', $(this).data('color'));\n $('.edit-label.modal').modal({\n onApprove() {\n $('.edit-label.form').submit();\n }\n }).modal('show');\n return false;\n });\n }\n\n // Milestones\n if ($('.repository.new.milestone').length > 0) {\n const $datepicker = $('.milestone.datepicker');\n $datepicker.datetimepicker({\n lang: $datepicker.data('lang'),\n inline: true,\n timepicker: false,\n startDate: $datepicker.data('start-date'),\n formatDate: 'Y-m-d',\n onSelectDate(ct) {\n $('#deadline').val(ct.dateFormat('Y-m-d'));\n }\n });\n $('#clear-date').click(() => {\n $('#deadline').val('');\n return false;\n });\n }\n\n // Issues\n if ($('.repository.view.issue').length > 0) {\n // Edit issue title\n const $issueTitle = $('#issue-title');\n const $editInput = $('#edit-title-input input');\n const editTitleToggle = function () {\n $issueTitle.toggle();\n $('.not-in-edit').toggle();\n $('#edit-title-input').toggle();\n $('.in-edit').toggle();\n $editInput.focus();\n return false;\n };\n $('#edit-title').click(editTitleToggle);\n $('#cancel-edit-title').click(editTitleToggle);\n $('#save-edit-title').click(editTitleToggle).click(function () {\n if ($editInput.val().length === 0 || $editInput.val() === $issueTitle.text()) {\n $editInput.val($issueTitle.text());\n return false;\n }\n\n $.post($(this).data('update-url'), {\n _csrf: csrf,\n title: $editInput.val()\n },\n (data) => {\n $editInput.val(data.title);\n $issueTitle.text(data.title);\n reload();\n });\n return false;\n });\n\n // Issue Comments\n initIssueComments();\n\n // Issue/PR Context Menus\n $('.context-dropdown').dropdown({\n action: 'hide'\n });\n\n // Quote reply\n $('.quote-reply').click(function (event) {\n $(this).closest('.dropdown').find('.menu').toggle('visible');\n const target = $(this).data('target');\n\n let $content;\n if ($(this).hasClass('quote-reply-diff')) {\n const $parent = $(this).closest('.comment-code-cloud');\n $parent.find('button.comment-form-reply').click();\n $content = $parent.find('[name=\"content\"]');\n } else {\n $content = $('#content');\n }\n\n const quote = $(`#comment-${target}`).text().replace(/\\n/g, '\\n> ');\n const content = `> ${quote}\\n\\n`;\n\n if ($content.val() !== '') {\n $content.val(`${$content.val()}\\n\\n${content}`);\n } else {\n $content.val(`${content}`);\n }\n $content.focus();\n event.preventDefault();\n });\n\n // Edit issue or comment content\n $('.edit-content').click(function (event) {\n $(this).closest('.dropdown').find('.menu').toggle('visible');\n const $segment = $(this).closest('.header').next();\n const $editContentZone = $segment.find('.edit-content-zone');\n const $renderContent = $segment.find('.render-content');\n const $rawContent = $segment.find('.raw-content');\n let $textarea;\n\n // Setup new form\n if ($editContentZone.html().length === 0) {\n $editContentZone.html($('#edit-content-form').html());\n $textarea = $editContentZone.find('textarea');\n issuesTribute.attach($textarea.get());\n emojiTribute.attach($textarea.get());\n\n const $dropzone = $editContentZone.find('.dropzone');\n $dropzone.data('saved', false);\n const $files = $editContentZone.find('.comment-files');\n if ($dropzone.length > 0) {\n const filenameDict = {};\n $dropzone.dropzone({\n url: $dropzone.data('upload-url'),\n headers: { 'X-Csrf-Token': csrf },\n maxFiles: $dropzone.data('max-file'),\n maxFilesize: $dropzone.data('max-size'),\n acceptedFiles: ($dropzone.data('accepts') === '*/*') ? null : $dropzone.data('accepts'),\n addRemoveLinks: true,\n dictDefaultMessage: $dropzone.data('default-message'),\n dictInvalidFileType: $dropzone.data('invalid-input-type'),\n dictFileTooBig: $dropzone.data('file-too-big'),\n dictRemoveFile: $dropzone.data('remove-file'),\n init() {\n this.on('success', (file, data) => {\n filenameDict[file.name] = {\n uuid: data.uuid,\n submitted: false\n };\n const input = $(`<input id=\"${data.uuid}\" name=\"files\" type=\"hidden\">`).val(data.uuid);\n $files.append(input);\n });\n this.on('removedfile', (file) => {\n if (!(file.name in filenameDict)) {\n return;\n }\n $(`#${filenameDict[file.name].uuid}`).remove();\n if ($dropzone.data('remove-url') && $dropzone.data('csrf') && !filenameDict[file.name].submitted) {\n $.post($dropzone.data('remove-url'), {\n file: filenameDict[file.name].uuid,\n _csrf: $dropzone.data('csrf')\n });\n }\n });\n this.on('submit', () => {\n $.each(filenameDict, (name) => {\n filenameDict[name].submitted = true;\n });\n });\n this.on('reload', () => {\n $.getJSON($editContentZone.data('attachment-url'), (data) => {\n const drop = $dropzone.get(0).dropzone;\n drop.removeAllFiles(true);\n $files.empty();\n $.each(data, function () {\n const imgSrc = `${$dropzone.data('upload-url')}/${this.uuid}`;\n drop.emit('addedfile', this);\n drop.emit('thumbnail', this, imgSrc);\n drop.emit('complete', this);\n drop.files.push(this);\n filenameDict[this.name] = {\n submitted: true,\n uuid: this.uuid\n };\n $dropzone.find(`img[src='${imgSrc}']`).css('max-width', '100%');\n const input = $(`<input id=\"${this.uuid}\" name=\"files\" type=\"hidden\">`).val(this.uuid);\n $files.append(input);\n });\n });\n });\n }\n });\n $dropzone.get(0).dropzone.emit('reload');\n }\n // Give new write/preview data-tab name to distinguish from others\n const $editContentForm = $editContentZone.find('.ui.comment.form');\n const $tabMenu = $editContentForm.find('.tabular.menu');\n $tabMenu.attr('data-write', $editContentZone.data('write'));\n $tabMenu.attr('data-preview', $editContentZone.data('preview'));\n $tabMenu.find('.write.item').attr('data-tab', $editContentZone.data('write'));\n $tabMenu.find('.preview.item').attr('data-tab', $editContentZone.data('preview'));\n $editContentForm.find('.write.segment').attr('data-tab', $editContentZone.data('write'));\n $editContentForm.find('.preview.segment').attr('data-tab', $editContentZone.data('preview'));\n\n initCommentPreviewTab($editContentForm);\n\n $editContentZone.find('.cancel.button').click(() => {\n $renderContent.show();\n $editContentZone.hide();\n $dropzone.get(0).dropzone.emit('reload');\n });\n $editContentZone.find('.save.button').click(() => {\n $renderContent.show();\n $editContentZone.hide();\n const $attachments = $files.find('[name=files]').map(function () {\n return $(this).val();\n }).get();\n $.post($editContentZone.data('update-url'), {\n _csrf: csrf,\n content: $textarea.val(),\n context: $editContentZone.data('context'),\n files: $attachments\n }, (data) => {\n if (data.length === 0) {\n $renderContent.html($('#no-content').html());\n } else {\n $renderContent.html(data.content);\n emojify.run($renderContent[0]);\n $('pre code', $renderContent[0]).each(function () {\n hljs.highlightBlock(this);\n });\n }\n const $content = $segment.parent();\n if (!$content.find('.ui.small.images').length) {\n if (data.attachments !== '') {\n $content.append(\n '<div class=\"ui bottom attached segment\"><div class=\"ui small images\"></div></div>'\n );\n $content.find('.ui.small.images').html(data.attachments);\n }\n } else if (data.attachments === '') {\n $content.find('.ui.small.images').parent().remove();\n } else {\n $content.find('.ui.small.images').html(data.attachments);\n }\n $dropzone.get(0).dropzone.emit('submit');\n $dropzone.get(0).dropzone.emit('reload');\n });\n });\n } else {\n $textarea = $segment.find('textarea');\n }\n\n // Show write/preview tab and copy raw content as needed\n $editContentZone.show();\n $renderContent.hide();\n if ($textarea.val().length === 0) {\n $textarea.val($rawContent.text());\n }\n $textarea.focus();\n event.preventDefault();\n });\n\n // Delete comment\n $('.delete-comment').click(function () {\n const $this = $(this);\n if (window.confirm($this.data('locale'))) {\n $.post($this.data('url'), {\n _csrf: csrf\n }).success(() => {\n $(`#${$this.data('comment-id')}`).remove();\n });\n }\n return false;\n });\n\n // Change status\n const $statusButton = $('#status-button');\n $('#comment-form .edit_area').keyup(function () {\n if ($(this).val().length === 0) {\n $statusButton.text($statusButton.data('status'));\n } else {\n $statusButton.text($statusButton.data('status-and-comment'));\n }\n });\n $statusButton.click(() => {\n $('#status').val($statusButton.data('status-val'));\n $('#comment-form').submit();\n });\n\n // Pull Request merge button\n const $mergeButton = $('.merge-button > button');\n $mergeButton.on('click', function (e) {\n e.preventDefault();\n $(`.${$(this).data('do')}-fields`).show();\n $(this).parent().hide();\n });\n $('.merge-button > .dropdown').dropdown({\n onChange(_text, _value, $choice) {\n if ($choice.data('do')) {\n $mergeButton.find('.button-text').text($choice.text());\n $mergeButton.data('do', $choice.data('do'));\n }\n }\n });\n $('.merge-cancel').on('click', function (e) {\n e.preventDefault();\n $(this).closest('.form').hide();\n $mergeButton.parent().show();\n });\n initReactionSelector();\n }\n\n // Diff\n if ($('.repository.diff').length > 0) {\n $('.diff-counter').each(function () {\n const $item = $(this);\n const addLine = $item.find('span[data-line].add').data('line');\n const delLine = $item.find('span[data-line].del').data('line');\n const addPercent = parseFloat(addLine) / (parseFloat(addLine) + parseFloat(delLine)) * 100;\n $item.find('.bar .add').css('width', `${addPercent}%`);\n });\n }\n\n // Quick start and repository home\n $('#repo-clone-ssh').click(function () {\n $('.clone-url').text($(this).data('link'));\n $('#repo-clone-url').val($(this).data('link'));\n $(this).addClass('blue');\n $('#repo-clone-https').removeClass('blue');\n localStorage.setItem('repo-clone-protocol', 'ssh');\n });\n $('#repo-clone-https').click(function () {\n $('.clone-url').text($(this).data('link'));\n $('#repo-clone-url').val($(this).data('link'));\n $(this).addClass('blue');\n $('#repo-clone-ssh').removeClass('blue');\n localStorage.setItem('repo-clone-protocol', 'https');\n });\n $('#repo-clone-url').click(function () {\n $(this).select();\n });\n\n // Pull request\n const $repoComparePull = $('.repository.compare.pull');\n if ($repoComparePull.length > 0) {\n initFilterSearchDropdown('.choose.branch .dropdown');\n // show pull request form\n $repoComparePull.find('button.show-form').on('click', function (e) {\n e.preventDefault();\n $repoComparePull.find('.pullrequest-form').show();\n $(this).parent().hide();\n });\n }\n\n // Branches\n if ($('.repository.settings.branches').length > 0) {\n initFilterSearchDropdown('.protected-branches .dropdown');\n $('.enable-protection, .enable-whitelist').change(function () {\n if (this.checked) {\n $($(this).data('target')).removeClass('disabled');\n } else {\n $($(this).data('target')).addClass('disabled');\n }\n });\n }\n}\n\nfunction initMigration() {\n const toggleMigrations = function () {\n const authUserName = $('#auth_username').val();\n const cloneAddr = $('#clone_addr').val();\n if (!$('#mirror').is(':checked') && (authUserName && authUserName.length > 0)\n && (cloneAddr !== undefined && (cloneAddr.startsWith('https://github.com') || cloneAddr.startsWith('http://github.com')))) {\n $('#migrate_items').show();\n } else {\n $('#migrate_items').hide();\n }\n };\n\n toggleMigrations();\n\n $('#clone_addr').on('input', toggleMigrations);\n $('#auth_username').on('input', toggleMigrations);\n $('#mirror').on('change', toggleMigrations);\n}\n\nfunction initPullRequestReview() {\n $('.show-outdated').on('click', function (e) {\n e.preventDefault();\n const id = $(this).data('comment');\n $(this).addClass('hide');\n $(`#code-comments-${id}`).removeClass('hide');\n $(`#code-preview-${id}`).removeClass('hide');\n $(`#hide-outdated-${id}`).removeClass('hide');\n });\n\n $('.hide-outdated').on('click', function (e) {\n e.preventDefault();\n const id = $(this).data('comment');\n $(this).addClass('hide');\n $(`#code-comments-${id}`).addClass('hide');\n $(`#code-preview-${id}`).addClass('hide');\n $(`#show-outdated-${id}`).removeClass('hide');\n });\n\n $('button.comment-form-reply').on('click', function (e) {\n e.preventDefault();\n $(this).hide();\n const form = $(this).parent().find('.comment-form');\n form.removeClass('hide');\n assingMenuAttributes(form.find('.menu'));\n });\n // The following part is only for diff views\n if ($('.repository.pull.diff').length === 0) {\n return;\n }\n\n $('.diff-detail-box.ui.sticky').sticky();\n\n $('.btn-review').on('click', function (e) {\n e.preventDefault();\n $(this).closest('.dropdown').find('.menu').toggle('visible');\n }).closest('.dropdown').find('.link.close')\n .on('click', function (e) {\n e.preventDefault();\n $(this).closest('.menu').toggle('visible');\n });\n\n $('.code-view .lines-code,.code-view .lines-num')\n .on('mouseenter', function () {\n const parent = $(this).closest('td');\n $(this).closest('tr').addClass(\n parent.hasClass('lines-num-old') || parent.hasClass('lines-code-old')\n ? 'focus-lines-old' : 'focus-lines-new'\n );\n })\n .on('mouseleave', function () {\n $(this).closest('tr').removeClass('focus-lines-new focus-lines-old');\n });\n $('.add-code-comment').on('click', function (e) {\n // https://github.com/go-gitea/gitea/issues/4745\n if ($(e.target).hasClass('btn-add-single')) {\n return;\n }\n e.preventDefault();\n const isSplit = $(this).closest('.code-diff').hasClass('code-diff-split');\n const side = $(this).data('side');\n const idx = $(this).data('idx');\n const path = $(this).data('path');\n const form = $('#pull_review_add_comment').html();\n const tr = $(this).closest('tr');\n let ntr = tr.next();\n if (!ntr.hasClass('add-comment')) {\n ntr = $(`<tr class=\"add-comment\">${\n isSplit ? '<td class=\"lines-num\"></td><td class=\"lines-type-marker\"></td><td class=\"add-comment-left\"></td><td class=\"lines-num\"></td><td class=\"lines-type-marker\"></td><td class=\"add-comment-right\"></td>'\n : '<td class=\"lines-num\"></td><td class=\"lines-num\"></td><td class=\"lines-type-marker\"></td><td class=\"add-comment-left add-comment-right\"></td>'\n }</tr>`);\n tr.after(ntr);\n }\n const td = ntr.find(`.add-comment-${side}`);\n let commentCloud = td.find('.comment-code-cloud');\n if (commentCloud.length === 0) {\n td.html(form);\n commentCloud = td.find('.comment-code-cloud');\n assingMenuAttributes(commentCloud.find('.menu'));\n\n td.find(\"input[name='line']\").val(idx);\n td.find(\"input[name='side']\").val(side === 'left' ? 'previous' : 'proposed');\n td.find(\"input[name='path']\").val(path);\n }\n commentCloud.find('textarea').focus();\n });\n}\n\nfunction assingMenuAttributes(menu) {\n const id = Math.floor(Math.random() * Math.floor(1000000));\n menu.attr('data-write', menu.attr('data-write') + id);\n menu.attr('data-preview', menu.attr('data-preview') + id);\n menu.find('.item').each(function () {\n const tab = $(this).attr('data-tab') + id;\n $(this).attr('data-tab', tab);\n });\n menu.parent().find(\"*[data-tab='write']\").attr('data-tab', `write${id}`);\n menu.parent().find(\"*[data-tab='preview']\").attr('data-tab', `preview${id}`);\n initCommentPreviewTab(menu.parent('.form'));\n return id;\n}\n\nfunction initRepositoryCollaboration() {\n // Change collaborator access mode\n $('.access-mode.menu .item').click(function () {\n const $menu = $(this).parent();\n $.post($menu.data('url'), {\n _csrf: csrf,\n uid: $menu.data('uid'),\n mode: $(this).data('value')\n });\n });\n}\n\nfunction initTeamSettings() {\n // Change team access mode\n $('.organization.new.team input[name=permission]').change(() => {\n const val = $('input[name=permission]:checked', '.organization.new.team').val();\n if (val === 'admin') {\n $('.organization.new.team .team-units').hide();\n } else {\n $('.organization.new.team .team-units').show();\n }\n });\n}\n\nfunction initWikiForm() {\n const $editArea = $('.repository.wiki textarea#edit_area');\n let sideBySideChanges = 0;\n let sideBySideTimeout = null;\n if ($editArea.length > 0) {\n const simplemde = new SimpleMDE({\n autoDownloadFontAwesome: false,\n element: $editArea[0],\n forceSync: true,\n previewRender(plainText, preview) { // Async method\n setTimeout(() => {\n // FIXME: still send render request when return back to edit mode\n const render = function () {\n sideBySideChanges = 0;\n if (sideBySideTimeout != null) {\n clearTimeout(sideBySideTimeout);\n sideBySideTimeout = null;\n }\n $.post($editArea.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $editArea.data('context'),\n text: plainText\n },\n (data) => {\n preview.innerHTML = `<div class=\"markdown ui segment\">${data}</div>`;\n emojify.run($('.editor-preview')[0]);\n $(preview).find('pre code').each((_, e) => {\n hljs.highlightBlock(e);\n });\n });\n };\n if (!simplemde.isSideBySideActive()) {\n render();\n } else {\n // delay preview by keystroke counting\n sideBySideChanges++;\n if (sideBySideChanges > 10) {\n render();\n }\n // or delay preview by timeout\n if (sideBySideTimeout != null) {\n clearTimeout(sideBySideTimeout);\n sideBySideTimeout = null;\n }\n sideBySideTimeout = setTimeout(render, 600);\n }\n }, 0);\n if (!simplemde.isSideBySideActive()) {\n return 'Loading...';\n }\n return preview.innerHTML;\n },\n renderingConfig: {\n singleLineBreaks: false\n },\n indentWithTabs: false,\n tabSize: 4,\n spellChecker: false,\n toolbar: ['bold', 'italic', 'strikethrough', '|',\n 'heading-1', 'heading-2', 'heading-3', 'heading-bigger', 'heading-smaller', '|',\n {\n name: 'code-inline',\n action(e) {\n const cm = e.codemirror;\n const selection = cm.getSelection();\n cm.replaceSelection(`\\`${selection}\\``);\n if (!selection) {\n const cursorPos = cm.getCursor();\n cm.setCursor(cursorPos.line, cursorPos.ch - 1);\n }\n cm.focus();\n },\n className: 'fa fa-angle-right',\n title: 'Add Inline Code',\n }, 'code', 'quote', '|', {\n name: 'checkbox-empty',\n action(e) {\n const cm = e.codemirror;\n cm.replaceSelection(`\\n- [ ] ${cm.getSelection()}`);\n cm.focus();\n },\n className: 'fa fa-square-o',\n title: 'Add Checkbox (empty)',\n },\n {\n name: 'checkbox-checked',\n action(e) {\n const cm = e.codemirror;\n cm.replaceSelection(`\\n- [x] ${cm.getSelection()}`);\n cm.focus();\n },\n className: 'fa fa-check-square-o',\n title: 'Add Checkbox (checked)',\n }, '|',\n 'unordered-list', 'ordered-list', '|',\n 'link', 'image', 'table', 'horizontal-rule', '|',\n 'clean-block', 'preview', 'fullscreen', 'side-by-side']\n });\n $(simplemde.codemirror.getInputField()).addClass('js-quick-submit');\n\n setTimeout(() => {\n const $bEdit = $('.repository.wiki.new .previewtabs a[data-tab=\"write\"]');\n const $bPrev = $('.repository.wiki.new .previewtabs a[data-tab=\"preview\"]');\n const $toolbar = $('.editor-toolbar');\n const $bPreview = $('.editor-toolbar a.fa-eye');\n const $bSideBySide = $('.editor-toolbar a.fa-columns');\n $bEdit.on('click', () => {\n if ($toolbar.hasClass('disabled-for-preview')) {\n $bPreview.click();\n }\n });\n $bPrev.on('click', () => {\n if (!$toolbar.hasClass('disabled-for-preview')) {\n $bPreview.click();\n }\n });\n $bPreview.on('click', () => {\n setTimeout(() => {\n if ($toolbar.hasClass('disabled-for-preview')) {\n if ($bEdit.hasClass('active')) {\n $bEdit.removeClass('active');\n }\n if (!$bPrev.hasClass('active')) {\n $bPrev.addClass('active');\n }\n } else {\n if (!$bEdit.hasClass('active')) {\n $bEdit.addClass('active');\n }\n if ($bPrev.hasClass('active')) {\n $bPrev.removeClass('active');\n }\n }\n }, 0);\n });\n $bSideBySide.on('click', () => {\n sideBySideChanges = 10;\n });\n }, 0);\n }\n}\n\n// Adding function to get the cursor position in a text field to jQuery object.\n$.fn.getCursorPosition = function () {\n const el = $(this).get(0);\n let pos = 0;\n if ('selectionStart' in el) {\n pos = el.selectionStart;\n } else if ('selection' in document) {\n el.focus();\n const Sel = document.selection.createRange();\n const SelLength = document.selection.createRange().text.length;\n Sel.moveStart('character', -el.value.length);\n pos = Sel.text.length - SelLength;\n }\n return pos;\n};\n\nfunction setSimpleMDE($editArea) {\n if (codeMirrorEditor) {\n codeMirrorEditor.toTextArea();\n codeMirrorEditor = null;\n }\n\n if (simpleMDEditor) {\n return true;\n }\n\n simpleMDEditor = new SimpleMDE({\n autoDownloadFontAwesome: false,\n element: $editArea[0],\n forceSync: true,\n renderingConfig: {\n singleLineBreaks: false\n },\n indentWithTabs: false,\n tabSize: 4,\n spellChecker: false,\n previewRender(plainText, preview) { // Async method\n setTimeout(() => {\n // FIXME: still send render request when return back to edit mode\n $.post($editArea.data('url'), {\n _csrf: csrf,\n mode: 'gfm',\n context: $editArea.data('context'),\n text: plainText\n },\n (data) => {\n preview.innerHTML = `<div class=\"markdown ui segment\">${data}</div>`;\n emojify.run($('.editor-preview')[0]);\n });\n }, 0);\n\n return 'Loading...';\n },\n toolbar: ['bold', 'italic', 'strikethrough', '|',\n 'heading-1', 'heading-2', 'heading-3', 'heading-bigger', 'heading-smaller', '|',\n 'code', 'quote', '|',\n 'unordered-list', 'ordered-list', '|',\n 'link', 'image', 'table', 'horizontal-rule', '|',\n 'clean-block', 'preview', 'fullscreen', 'side-by-side']\n });\n\n return true;\n}\n\nfunction setCodeMirror($editArea) {\n if (simpleMDEditor) {\n simpleMDEditor.toTextArea();\n simpleMDEditor = null;\n }\n\n if (codeMirrorEditor) {\n return true;\n }\n\n codeMirrorEditor = CodeMirror.fromTextArea($editArea[0], {\n lineNumbers: true\n });\n codeMirrorEditor.on('change', (cm, _change) => {\n $editArea.val(cm.getValue());\n });\n\n return true;\n}\n\nfunction initEditor() {\n $('.js-quick-pull-choice-option').change(function () {\n if ($(this).val() === 'commit-to-new-branch') {\n $('.quick-pull-branch-name').show();\n $('.quick-pull-branch-name input').prop('required', true);\n } else {\n $('.quick-pull-branch-name').hide();\n $('.quick-pull-branch-name input').prop('required', false);\n }\n $('#commit-button').text($(this).attr('button_text'));\n });\n\n const $editFilename = $('#file-name');\n $editFilename.keyup(function (e) {\n const $section = $('.breadcrumb span.section');\n const $divider = $('.breadcrumb div.divider');\n let value;\n let parts;\n\n if (e.keyCode === 8) {\n if ($(this).getCursorPosition() === 0) {\n if ($section.length > 0) {\n value = $section.last().find('a').text();\n $(this).val(value + $(this).val());\n $(this)[0].setSelectionRange(value.length, value.length);\n $section.last().remove();\n $divider.last().remove();\n }\n }\n }\n if (e.keyCode === 191) {\n parts = $(this).val().split('/');\n for (let i = 0; i < parts.length; ++i) {\n value = parts[i];\n if (i < parts.length - 1) {\n if (value.length) {\n $(`<span class=\"section\"><a href=\"#\">${value}</a></span>`).insertBefore($(this));\n $('<div class=\"divider\"> / </div>').insertBefore($(this));\n }\n } else {\n $(this).val(value);\n }\n $(this)[0].setSelectionRange(0, 0);\n }\n }\n parts = [];\n $('.breadcrumb span.section').each(function () {\n const element = $(this);\n if (element.find('a').length) {\n parts.push(element.find('a').text());\n } else {\n parts.push(element.text());\n }\n });\n if ($(this).val()) parts.push($(this).val());\n $('#tree_path').val(parts.join('/'));\n }).trigger('keyup');\n\n const $editArea = $('.repository.editor textarea#edit_area');\n if (!$editArea.length) return;\n\n const markdownFileExts = $editArea.data('markdown-file-exts').split(',');\n const lineWrapExtensions = $editArea.data('line-wrap-extensions').split(',');\n\n $editFilename.on('keyup', () => {\n const val = $editFilename.val();\n let mode, spec, extension, extWithDot, dataUrl, apiCall;\n\n extension = extWithDot = '';\n const m = /.+\\.([^.]+)$/.exec(val);\n if (m) {\n extension = m[1];\n extWithDot = `.${extension}`;\n }\n\n const info = CodeMirror.findModeByExtension(extension);\n const previewLink = $('a[data-tab=preview]');\n if (info) {\n mode = info.mode;\n spec = info.mime;\n apiCall = mode;\n } else {\n apiCall = extension;\n }\n\n if (previewLink.length && apiCall && previewFileModes && previewFileModes.length && previewFileModes.indexOf(apiCall) >= 0) {\n dataUrl = previewLink.data('url');\n previewLink.data('url', dataUrl.replace(/(.*)\\/.*/i, `$1/${mode}`));\n previewLink.show();\n } else {\n previewLink.hide();\n }\n\n // If this file is a Markdown extensions, we will load that editor and return\n if (markdownFileExts.indexOf(extWithDot) >= 0) {\n if (setSimpleMDE($editArea)) {\n return;\n }\n }\n\n // Else we are going to use CodeMirror\n if (!codeMirrorEditor && !setCodeMirror($editArea)) {\n return;\n }\n\n if (mode) {\n codeMirrorEditor.setOption('mode', spec);\n CodeMirror.autoLoadMode(codeMirrorEditor, mode);\n }\n\n if (lineWrapExtensions.indexOf(extWithDot) >= 0) {\n codeMirrorEditor.setOption('lineWrapping', true);\n } else {\n codeMirrorEditor.setOption('lineWrapping', false);\n }\n\n // get the filename without any folder\n let value = $editFilename.val();\n if (value.length === 0) {\n return;\n }\n value = value.split('/');\n value = value[value.length - 1];\n\n $.getJSON($editFilename.data('ec-url-prefix') + value, (editorconfig) => {\n if (editorconfig.indent_style === 'tab') {\n codeMirrorEditor.setOption('indentWithTabs', true);\n codeMirrorEditor.setOption('extraKeys', {});\n } else {\n codeMirrorEditor.setOption('indentWithTabs', false);\n // required because CodeMirror doesn't seems to use spaces correctly for {\"indentWithTabs\": false}:\n // - https://github.com/codemirror/CodeMirror/issues/988\n // - https://codemirror.net/doc/manual.html#keymaps\n codeMirrorEditor.setOption('extraKeys', {\n Tab(cm) {\n const spaces = Array(parseInt(cm.getOption('indentUnit')) + 1).join(' ');\n cm.replaceSelection(spaces);\n }\n });\n }\n codeMirrorEditor.setOption('indentUnit', editorconfig.indent_size || 4);\n codeMirrorEditor.setOption('tabSize', editorconfig.tab_width || 4);\n });\n }).trigger('keyup');\n\n // Using events from https://github.com/codedance/jquery.AreYouSure#advanced-usage\n // to enable or disable the commit button\n const $commitButton = $('#commit-button');\n const $editForm = $('.ui.edit.form');\n const dirtyFileClass = 'dirty-file';\n\n // Disabling the button at the start\n $commitButton.prop('disabled', true);\n\n // Registering a custom listener for the file path and the file content\n $editForm.areYouSure({\n silent: true,\n dirtyClass: dirtyFileClass,\n fieldSelector: ':input:not(.commit-form-wrapper :input)',\n change() {\n const dirty = $(this).hasClass(dirtyFileClass);\n $commitButton.prop('disabled', !dirty);\n }\n });\n\n $commitButton.click((event) => {\n // A modal which asks if an empty file should be committed\n if ($editArea.val().length === 0) {\n $('#edit-empty-content-modal').modal({\n onApprove() {\n $('.edit.form').submit();\n }\n }).modal('show');\n event.preventDefault();\n }\n });\n}\n\nfunction initOrganization() {\n if ($('.organization').length === 0) {\n return;\n }\n\n // Options\n if ($('.organization.settings.options').length > 0) {\n $('#org_name').keyup(function () {\n const $prompt = $('#org-name-change-prompt');\n if ($(this).val().toString().toLowerCase() !== $(this).data('org-name').toString().toLowerCase()) {\n $prompt.show();\n } else {\n $prompt.hide();\n }\n });\n }\n}\n\nfunction initUserSettings() {\n // Options\n if ($('.user.settings.profile').length > 0) {\n $('#username').keyup(function () {\n const $prompt = $('#name-change-prompt');\n if ($(this).val().toString().toLowerCase() !== $(this).data('name').toString().toLowerCase()) {\n $prompt.show();\n } else {\n $prompt.hide();\n }\n });\n }\n}\n\nfunction initGithook() {\n if ($('.edit.githook').length === 0) {\n return;\n }\n\n CodeMirror.autoLoadMode(CodeMirror.fromTextArea($('#content')[0], {\n lineNumbers: true,\n mode: 'shell'\n }), 'shell');\n}\n\nfunction initWebhook() {\n if ($('.new.webhook').length === 0) {\n return;\n }\n\n $('.events.checkbox input').change(function () {\n if ($(this).is(':checked')) {\n $('.events.fields').show();\n }\n });\n $('.non-events.checkbox input').change(function () {\n if ($(this).is(':checked')) {\n $('.events.fields').hide();\n }\n });\n\n const updateContentType = function () {\n const visible = $('#http_method').val() === 'POST';\n $('#content_type').parent().parent()[visible ? 'show' : 'hide']();\n };\n updateContentType();\n $('#http_method').change(() => {\n updateContentType();\n });\n\n // Test delivery\n $('#test-delivery').click(function () {\n const $this = $(this);\n $this.addClass('loading disabled');\n $.post($this.data('link'), {\n _csrf: csrf\n }).done(\n setTimeout(() => {\n window.location.href = $this.data('redirect');\n }, 5000)\n );\n });\n}\n\nfunction initAdmin() {\n if ($('.admin').length === 0) {\n return;\n }\n\n // New user\n if ($('.admin.new.user').length > 0 || $('.admin.edit.user').length > 0) {\n $('#login_type').change(function () {\n if ($(this).val().substring(0, 1) === '0') {\n $('#login_name').removeAttr('required');\n $('.non-local').hide();\n $('.local').show();\n $('#user_name').focus();\n\n if ($(this).data('password') === 'required') {\n $('#password').attr('required', 'required');\n }\n } else {\n $('#login_name').attr('required', 'required');\n $('.non-local').show();\n $('.local').hide();\n $('#login_name').focus();\n\n $('#password').removeAttr('required');\n }\n });\n }\n\n function onSecurityProtocolChange() {\n if ($('#security_protocol').val() > 0) {\n $('.has-tls').show();\n } else {\n $('.has-tls').hide();\n }\n }\n\n function onUsePagedSearchChange() {\n if ($('#use_paged_search').prop('checked')) {\n $('.search-page-size').show()\n .find('input').attr('required', 'required');\n } else {\n $('.search-page-size').hide()\n .find('input').removeAttr('required');\n }\n }\n\n function onOAuth2Change() {\n $('.open_id_connect_auto_discovery_url, .oauth2_use_custom_url').hide();\n $('.open_id_connect_auto_discovery_url input[required]').removeAttr('required');\n\n const provider = $('#oauth2_provider').val();\n switch (provider) {\n case 'github':\n case 'gitlab':\n case 'gitea':\n $('.oauth2_use_custom_url').show();\n break;\n case 'openidConnect':\n $('.open_id_connect_auto_discovery_url input').attr('required', 'required');\n $('.open_id_connect_auto_discovery_url').show();\n break;\n }\n onOAuth2UseCustomURLChange();\n }\n\n function onOAuth2UseCustomURLChange() {\n const provider = $('#oauth2_provider').val();\n $('.oauth2_use_custom_url_field').hide();\n $('.oauth2_use_custom_url_field input[required]').removeAttr('required');\n\n if ($('#oauth2_use_custom_url').is(':checked')) {\n if (!$('#oauth2_token_url').val()) {\n $('#oauth2_token_url').val($(`#${provider}_token_url`).val());\n }\n if (!$('#oauth2_auth_url').val()) {\n $('#oauth2_auth_url').val($(`#${provider}_auth_url`).val());\n }\n if (!$('#oauth2_profile_url').val()) {\n $('#oauth2_profile_url').val($(`#${provider}_profile_url`).val());\n }\n if (!$('#oauth2_email_url').val()) {\n $('#oauth2_email_url').val($(`#${provider}_email_url`).val());\n }\n switch (provider) {\n case 'github':\n $('.oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input, .oauth2_email_url input').attr('required', 'required');\n $('.oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url, .oauth2_email_url').show();\n break;\n case 'gitea':\n case 'gitlab':\n $('.oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input').attr('required', 'required');\n $('.oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url').show();\n $('#oauth2_email_url').val('');\n break;\n }\n }\n }\n\n // New authentication\n if ($('.admin.new.authentication').length > 0) {\n $('#auth_type').change(function () {\n $('.ldap, .dldap, .smtp, .pam, .oauth2, .has-tls .search-page-size .sspi').hide();\n\n $('.ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required], .sspi input[required]').removeAttr('required');\n $('.binddnrequired').removeClass('required');\n\n const authType = $(this).val();\n switch (authType) {\n case '2': // LDAP\n $('.ldap').show();\n $('.binddnrequired input, .ldap div.required:not(.dldap) input').attr('required', 'required');\n $('.binddnrequired').addClass('required');\n break;\n case '3': // SMTP\n $('.smtp').show();\n $('.has-tls').show();\n $('.smtp div.required input, .has-tls').attr('required', 'required');\n break;\n case '4': // PAM\n $('.pam').show();\n $('.pam input').attr('required', 'required');\n break;\n case '5': // LDAP\n $('.dldap').show();\n $('.dldap div.required:not(.ldap) input').attr('required', 'required');\n break;\n case '6': // OAuth2\n $('.oauth2').show();\n $('.oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input').attr('required', 'required');\n onOAuth2Change();\n break;\n case '7': // SSPI\n $('.sspi').show();\n $('.sspi div.required input').attr('required', 'required');\n break;\n }\n if (authType === '2' || authType === '5') {\n onSecurityProtocolChange();\n }\n if (authType === '2') {\n onUsePagedSearchChange();\n }\n });\n $('#auth_type').change();\n $('#security_protocol').change(onSecurityProtocolChange);\n $('#use_paged_search').change(onUsePagedSearchChange);\n $('#oauth2_provider').change(onOAuth2Change);\n $('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange);\n }\n // Edit authentication\n if ($('.admin.edit.authentication').length > 0) {\n const authType = $('#auth_type').val();\n if (authType === '2' || authType === '5') {\n $('#security_protocol').change(onSecurityProtocolChange);\n if (authType === '2') {\n $('#use_paged_search').change(onUsePagedSearchChange);\n }\n } else if (authType === '6') {\n $('#oauth2_provider').change(onOAuth2Change);\n $('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange);\n onOAuth2Change();\n }\n }\n\n // Notice\n if ($('.admin.notice')) {\n const $detailModal = $('#detail-modal');\n\n // Attach view detail modals\n $('.view-detail').click(function () {\n $detailModal.find('.content p').text($(this).data('content'));\n $detailModal.modal('show');\n return false;\n });\n\n // Select actions\n const $checkboxes = $('.select.table .ui.checkbox');\n $('.select.action').click(function () {\n switch ($(this).data('action')) {\n case 'select-all':\n $checkboxes.checkbox('check');\n break;\n case 'deselect-all':\n $checkboxes.checkbox('uncheck');\n break;\n case 'inverse':\n $checkboxes.checkbox('toggle');\n break;\n }\n });\n $('#delete-selection').click(function () {\n const $this = $(this);\n $this.addClass('loading disabled');\n const ids = [];\n $checkboxes.each(function () {\n if ($(this).checkbox('is checked')) {\n ids.push($(this).data('id'));\n }\n });\n $.post($this.data('link'), {\n _csrf: csrf,\n ids\n }).done(() => {\n window.location.href = $this.data('redirect');\n });\n });\n }\n}\n\nfunction buttonsClickOnEnter() {\n $('.ui.button').keypress(function (e) {\n if (e.keyCode === 13 || e.keyCode === 32) { // enter key or space bar\n $(this).click();\n }\n });\n}\n\nfunction searchUsers() {\n const $searchUserBox = $('#search-user-box');\n $searchUserBox.search({\n minCharacters: 2,\n apiSettings: {\n url: `${suburl}/api/v1/users/search?q={query}`,\n onResponse(response) {\n const items = [];\n $.each(response.data, (_i, item) => {\n let title = item.login;\n if (item.full_name && item.full_name.length > 0) {\n title += ` (${htmlEncode(item.full_name)})`;\n }\n items.push({\n title,\n image: item.avatar_url\n });\n });\n\n return { results: items };\n }\n },\n searchFields: ['login', 'full_name'],\n showNoResults: false\n });\n}\n\nfunction searchTeams() {\n const $searchTeamBox = $('#search-team-box');\n $searchTeamBox.search({\n minCharacters: 2,\n apiSettings: {\n url: `${suburl}/api/v1/orgs/${$searchTeamBox.data('org')}/teams/search?q={query}`,\n headers: { 'X-Csrf-Token': csrf },\n onResponse(response) {\n const items = [];\n $.each(response.data, (_i, item) => {\n const title = `${item.name} (${item.permission} access)`;\n items.push({\n title,\n });\n });\n\n return { results: items };\n }\n },\n searchFields: ['name', 'description'],\n showNoResults: false\n });\n}\n\nfunction searchRepositories() {\n const $searchRepoBox = $('#search-repo-box');\n $searchRepoBox.search({\n minCharacters: 2,\n apiSettings: {\n url: `${suburl}/api/v1/repos/search?q={query}&uid=${$searchRepoBox.data('uid')}`,\n onResponse(response) {\n const items = [];\n $.each(response.data, (_i, item) => {\n items.push({\n title: item.full_name.split('/')[1],\n description: item.full_name\n });\n });\n\n return { results: items };\n }\n },\n searchFields: ['full_name'],\n showNoResults: false\n });\n}\n\nfunction initCodeView() {\n if ($('.code-view .linenums').length > 0) {\n $(document).on('click', '.lines-num span', function (e) {\n const $select = $(this);\n const $list = $select.parent().siblings('.lines-code').find('ol.linenums > li');\n selectRange($list, $list.filter(`[rel=${$select.attr('id')}]`), (e.shiftKey ? $list.filter('.active').eq(0) : null));\n deSelect();\n });\n\n $(window).on('hashchange', () => {\n let m = window.location.hash.match(/^#(L\\d+)-(L\\d+)$/);\n const $list = $('.code-view ol.linenums > li');\n let $first;\n if (m) {\n $first = $list.filter(`.${m[1]}`);\n selectRange($list, $first, $list.filter(`.${m[2]}`));\n $('html, body').scrollTop($first.offset().top - 200);\n return;\n }\n m = window.location.hash.match(/^#(L|n)(\\d+)$/);\n if (m) {\n $first = $list.filter(`.L${m[2]}`);\n selectRange($list, $first);\n $('html, body').scrollTop($first.offset().top - 200);\n }\n }).trigger('hashchange');\n }\n $('.ui.fold-code').on('click', (e) => {\n const $foldButton = $(e.target);\n if ($foldButton.hasClass('fa-chevron-down')) {\n $(e.target).parent().next().slideUp('fast', () => {\n $foldButton.removeClass('fa-chevron-down').addClass('fa-chevron-right');\n });\n } else {\n $(e.target).parent().next().slideDown('fast', () => {\n $foldButton.removeClass('fa-chevron-right').addClass('fa-chevron-down');\n });\n }\n });\n function insertBlobExcerpt(e) {\n const $blob = $(e.target);\n const $row = $blob.parent().parent();\n $.get(`${$blob.data('url')}?${$blob.data('query')}&anchor=${$blob.data('anchor')}`, (blob) => {\n $row.replaceWith(blob);\n $(`[data-anchor=\"${$blob.data('anchor')}\"]`).on('click', (e) => { insertBlobExcerpt(e); });\n });\n }\n $('.ui.blob-excerpt').on('click', (e) => { insertBlobExcerpt(e); });\n}\n\nfunction initU2FAuth() {\n if ($('#wait-for-key').length === 0) {\n return;\n }\n u2fApi.ensureSupport()\n .then(() => {\n $.getJSON(`${suburl}/user/u2f/challenge`).success((req) => {\n u2fApi.sign(req.appId, req.challenge, req.registeredKeys, 30)\n .then(u2fSigned)\n .catch((err) => {\n if (err === undefined) {\n u2fError(1);\n return;\n }\n u2fError(err.metaData.code);\n });\n });\n }).catch(() => {\n // Fallback in case browser do not support U2F\n window.location.href = `${suburl}/user/two_factor`;\n });\n}\nfunction u2fSigned(resp) {\n $.ajax({\n url: `${suburl}/user/u2f/sign`,\n type: 'POST',\n headers: { 'X-Csrf-Token': csrf },\n data: JSON.stringify(resp),\n contentType: 'application/json; charset=utf-8',\n }).done((res) => {\n window.location.replace(res);\n }).fail(() => {\n u2fError(1);\n });\n}\n\nfunction u2fRegistered(resp) {\n if (checkError(resp)) {\n return;\n }\n $.ajax({\n url: `${suburl}/user/settings/security/u2f/register`,\n type: 'POST',\n headers: { 'X-Csrf-Token': csrf },\n data: JSON.stringify(resp),\n contentType: 'application/json; charset=utf-8',\n success() {\n reload();\n },\n fail() {\n u2fError(1);\n }\n });\n}\n\nfunction checkError(resp) {\n if (!('errorCode' in resp)) {\n return false;\n }\n if (resp.errorCode === 0) {\n return false;\n }\n u2fError(resp.errorCode);\n return true;\n}\n\n\nfunction u2fError(errorType) {\n const u2fErrors = {\n browser: $('#unsupported-browser'),\n 1: $('#u2f-error-1'),\n 2: $('#u2f-error-2'),\n 3: $('#u2f-error-3'),\n 4: $('#u2f-error-4'),\n 5: $('.u2f-error-5')\n };\n u2fErrors[errorType].removeClass('hide');\n\n Object.keys(u2fErrors).forEach((type) => {\n if (type !== errorType) {\n u2fErrors[type].addClass('hide');\n }\n });\n $('#u2f-error').modal('show');\n}\n\nfunction initU2FRegister() {\n $('#register-device').modal({ allowMultiple: false });\n $('#u2f-error').modal({ allowMultiple: false });\n $('#register-security-key').on('click', (e) => {\n e.preventDefault();\n u2fApi.ensureSupport()\n .then(u2fRegisterRequest)\n .catch(() => {\n u2fError('browser');\n });\n });\n}\n\nfunction u2fRegisterRequest() {\n $.post(`${suburl}/user/settings/security/u2f/request_register`, {\n _csrf: csrf,\n name: $('#nickname').val()\n }).success((req) => {\n $('#nickname').closest('div.field').removeClass('error');\n $('#register-device').modal('show');\n if (req.registeredKeys === null) {\n req.registeredKeys = [];\n }\n u2fApi.register(req.appId, req.registerRequests, req.registeredKeys, 30)\n .then(u2fRegistered)\n .catch((reason) => {\n if (reason === undefined) {\n u2fError(1);\n return;\n }\n u2fError(reason.metaData.code);\n });\n }).fail((xhr) => {\n if (xhr.status === 409) {\n $('#nickname').closest('div.field').addClass('error');\n }\n });\n}\n\nfunction initWipTitle() {\n $('.title_wip_desc > a').click((e) => {\n e.preventDefault();\n\n const $issueTitle = $('#issue_title');\n $issueTitle.focus();\n const value = $issueTitle.val().trim().toUpperCase();\n\n for (const i in wipPrefixes) {\n if (value.startsWith(wipPrefixes[i].toUpperCase())) {\n return;\n }\n }\n\n $issueTitle.val(`${wipPrefixes[0]} ${$issueTitle.val()}`);\n });\n}\n\nfunction initTemplateSearch() {\n const $repoTemplate = $('#repo_template');\n const checkTemplate = function () {\n const $templateUnits = $('#template_units');\n const $nonTemplate = $('#non_template');\n if ($repoTemplate.val() !== '') {\n $templateUnits.show();\n $nonTemplate.hide();\n } else {\n $templateUnits.hide();\n $nonTemplate.show();\n }\n };\n $repoTemplate.change(checkTemplate);\n checkTemplate();\n\n const changeOwner = function () {\n $('#repo_template_search')\n .dropdown({\n apiSettings: {\n url: `${suburl}/api/v1/repos/search?q={query}&template=true&priority_owner_id=${$('#uid').val()}`,\n onResponse(response) {\n const filteredResponse = { success: true, results: [] };\n filteredResponse.results.push({\n name: '',\n value: ''\n });\n // Parse the response from the api to work with our dropdown\n $.each(response.data, (_r, repo) => {\n filteredResponse.results.push({\n name: htmlEncode(repo.full_name),\n value: repo.id\n });\n });\n return filteredResponse;\n },\n cache: false,\n },\n\n fullTextSearch: true\n });\n };\n $('#uid').change(changeOwner);\n changeOwner();\n}\n\n$(document).ready(() => {\n csrf = $('meta[name=_csrf]').attr('content');\n suburl = $('meta[name=_suburl]').attr('content');\n\n // Show exact time\n $('.time-since').each(function () {\n $(this)\n .addClass('poping up')\n .attr('data-content', $(this).attr('title'))\n .attr('data-variation', 'inverted tiny')\n .attr('title', '');\n });\n\n // Semantic UI modules.\n $('.dropdown:not(.custom)').dropdown();\n $('.jump.dropdown').dropdown({\n action: 'hide',\n onShow() {\n $('.poping.up').popup('hide');\n }\n });\n $('.slide.up.dropdown').dropdown({\n transition: 'slide up'\n });\n $('.upward.dropdown').dropdown({\n direction: 'upward'\n });\n $('.ui.accordion').accordion();\n $('.ui.checkbox').checkbox();\n $('.ui.progress').progress({\n showActivity: false\n });\n $('.poping.up').popup();\n $('.top.menu .poping.up').popup({\n onShow() {\n if ($('.top.menu .menu.transition').hasClass('visible')) {\n return false;\n }\n }\n });\n $('.tabular.menu .item').tab();\n $('.tabable.menu .item').tab();\n\n $('.toggle.button').click(function () {\n $($(this).data('target')).slideToggle(100);\n });\n\n // make table <tr> element clickable like a link\n $('tr[data-href]').click(function () {\n window.location = $(this).data('href');\n });\n\n // Highlight JS\n if (typeof hljs !== 'undefined') {\n const nodes = [].slice.call(document.querySelectorAll('pre code') || []);\n for (let i = 0; i < nodes.length; i++) {\n hljs.highlightBlock(nodes[i]);\n }\n }\n\n // Dropzone\n const $dropzone = $('#dropzone');\n if ($dropzone.length > 0) {\n const filenameDict = {};\n\n new Dropzone('#dropzone', {\n url: $dropzone.data('upload-url'),\n headers: { 'X-Csrf-Token': csrf },\n maxFiles: $dropzone.data('max-file'),\n maxFilesize: $dropzone.data('max-size'),\n acceptedFiles: ($dropzone.data('accepts') === '*/*') ? null : $dropzone.data('accepts'),\n addRemoveLinks: true,\n dictDefaultMessage: $dropzone.data('default-message'),\n dictInvalidFileType: $dropzone.data('invalid-input-type'),\n dictFileTooBig: $dropzone.data('file-too-big'),\n dictRemoveFile: $dropzone.data('remove-file'),\n init() {\n this.on('success', (file, data) => {\n filenameDict[file.name] = data.uuid;\n const input = $(`<input id=\"${data.uuid}\" name=\"files\" type=\"hidden\">`).val(data.uuid);\n $('.files').append(input);\n });\n this.on('removedfile', (file) => {\n if (file.name in filenameDict) {\n $(`#${filenameDict[file.name]}`).remove();\n }\n if ($dropzone.data('remove-url') && $dropzone.data('csrf')) {\n $.post($dropzone.data('remove-url'), {\n file: filenameDict[file.name],\n _csrf: $dropzone.data('csrf')\n });\n }\n });\n },\n });\n }\n\n // Emojify\n emojify.setConfig({\n img_dir: `${suburl}/vendor/plugins/emojify/images`,\n ignore_emoticons: true\n });\n const hasEmoji = document.getElementsByClassName('has-emoji');\n for (let i = 0; i < hasEmoji.length; i++) {\n emojify.run(hasEmoji[i]);\n for (let j = 0; j < hasEmoji[i].childNodes.length; j++) {\n if (hasEmoji[i].childNodes[j].nodeName === 'A') {\n emojify.run(hasEmoji[i].childNodes[j]);\n }\n }\n }\n\n // Clipboard JS\n const clipboard = new Clipboard('.clipboard');\n clipboard.on('success', (e) => {\n e.clearSelection();\n\n $(`#${e.trigger.getAttribute('id')}`).popup('destroy');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-success'));\n $(`#${e.trigger.getAttribute('id')}`).popup('show');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original'));\n });\n\n clipboard.on('error', (e) => {\n $(`#${e.trigger.getAttribute('id')}`).popup('destroy');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-error'));\n $(`#${e.trigger.getAttribute('id')}`).popup('show');\n e.trigger.setAttribute('data-content', e.trigger.getAttribute('data-original'));\n });\n\n // Helpers.\n $('.delete-button').click(showDeletePopup);\n $('.add-all-button').click(showAddAllPopup);\n\n $('.delete-branch-button').click(showDeletePopup);\n\n $('.undo-button').click(function () {\n const $this = $(this);\n $.post($this.data('url'), {\n _csrf: csrf,\n id: $this.data('id')\n }).done((data) => {\n window.location.href = data.redirect;\n });\n });\n $('.show-panel.button').click(function () {\n $($(this).data('panel')).show();\n });\n $('.show-modal.button').click(function () {\n $($(this).data('modal')).modal('show');\n });\n $('.delete-post.button').click(function () {\n const $this = $(this);\n $.post($this.data('request-url'), {\n _csrf: csrf\n }).done(() => {\n window.location.href = $this.data('done-url');\n });\n });\n\n // Set anchor.\n $('.markdown').each(function () {\n const headers = {};\n $(this).find('h1, h2, h3, h4, h5, h6').each(function () {\n let node = $(this);\n const val = encodeURIComponent(node.text().toLowerCase().replace(/[^\\u00C0-\\u1FFF\\u2C00-\\uD7FF\\w\\- ]/g, '').replace(/[ ]/g, '-'));\n let name = val;\n if (headers[val] > 0) {\n name = `${val}-${headers[val]}`;\n }\n if (headers[val] === undefined) {\n headers[val] = 1;\n } else {\n headers[val] += 1;\n }\n node = node.wrap(`<div id=\"${name}\" class=\"anchor-wrap\" ></div>`);\n node.append(`<a class=\"anchor\" href=\"#${name}\"><span class=\"octicon octicon-link\"></span></a>`);\n });\n });\n\n $('.issue-checkbox').click(() => {\n const numChecked = $('.issue-checkbox').children('input:checked').length;\n if (numChecked > 0) {\n $('#issue-filters').addClass('hide');\n $('#issue-actions').removeClass('hide');\n } else {\n $('#issue-filters').removeClass('hide');\n $('#issue-actions').addClass('hide');\n }\n });\n\n $('.issue-action').click(function () {\n let { action } = this.dataset;\n let { elementId } = this.dataset;\n const issueIDs = $('.issue-checkbox').children('input:checked').map(function () {\n return this.dataset.issueId;\n }).get().join();\n const { url } = this.dataset;\n if (elementId === '0' && url.substr(-9) === '/assignee') {\n elementId = '';\n action = 'clear';\n }\n updateIssuesMeta(url, action, issueIDs, elementId).then(() => {\n // NOTICE: This reset of checkbox state targets Firefox caching behaviour, as the checkboxes stay checked after reload\n if (action === 'close' || action === 'open') {\n // uncheck all checkboxes\n $('.issue-checkbox input[type=\"checkbox\"]').each((_, e) => { e.checked = false; });\n }\n reload();\n });\n });\n\n // NOTICE: This event trigger targets Firefox caching behaviour, as the checkboxes stay checked after reload\n // trigger ckecked event, if checkboxes are checked on load\n $('.issue-checkbox input[type=\"checkbox\"]:checked').first().each((_, e) => {\n e.checked = false;\n $(e).click();\n });\n\n buttonsClickOnEnter();\n searchUsers();\n searchTeams();\n searchRepositories();\n\n initCommentForm();\n initInstall();\n initRepository();\n initMigration();\n initWikiForm();\n initEditForm();\n initEditor();\n initOrganization();\n initGithook();\n initWebhook();\n initAdmin();\n initCodeView();\n initVueApp();\n initTeamSettings();\n initCtrlEnterSubmit();\n initNavbarContentToggle();\n initTopicbar();\n initU2FAuth();\n initU2FRegister();\n initIssueList();\n initWipTitle();\n initPullRequestReview();\n initRepoStatusChecker();\n initTemplateSearch();\n\n // Repo clone url.\n if ($('#repo-clone-url').length > 0) {\n switch (localStorage.getItem('repo-clone-protocol')) {\n case 'ssh':\n if ($('#repo-clone-ssh').click().length === 0) {\n $('#repo-clone-https').click();\n }\n break;\n default:\n $('#repo-clone-https').click();\n break;\n }\n }\n\n const routes = {\n 'div.user.settings': initUserSettings,\n 'div.repository.settings.collaboration': initRepositoryCollaboration\n };\n\n let selector;\n for (selector in routes) {\n if ($(selector).length > 0) {\n routes[selector]();\n break;\n }\n }\n\n const $cloneAddr = $('#clone_addr');\n $cloneAddr.change(() => {\n const $repoName = $('#repo_name');\n if ($cloneAddr.val().length > 0 && $repoName.val().length === 0) { // Only modify if repo_name input is blank\n $repoName.val($cloneAddr.val().match(/^(.*\\/)?((.+?)(\\.git)?)$/)[3]);\n }\n });\n});\n\nfunction changeHash(hash) {\n if (window.history.pushState) {\n window.history.pushState(null, null, hash);\n } else {\n window.location.hash = hash;\n }\n}\n\nfunction deSelect() {\n if (window.getSelection) {\n window.getSelection().removeAllRanges();\n } else {\n document.selection.empty();\n }\n}\n\nfunction selectRange($list, $select, $from) {\n $list.removeClass('active');\n if ($from) {\n let a = parseInt($select.attr('rel').substr(1));\n let b = parseInt($from.attr('rel').substr(1));\n let c;\n if (a !== b) {\n if (a > b) {\n c = a;\n a = b;\n b = c;\n }\n const classes = [];\n for (let i = a; i <= b; i++) {\n classes.push(`.L${i}`);\n }\n $list.filter(classes.join(',')).addClass('active');\n changeHash(`#L${a}-L${b}`);\n return;\n }\n }\n $select.addClass('active');\n changeHash(`#${$select.attr('rel')}`);\n}\n\n$(() => {\n // Warn users that try to leave a page after entering data into a form.\n // Except on sign-in pages, and for forms marked as 'ignore-dirty'.\n if ($('.user.signin').length === 0) {\n $('form:not(.ignore-dirty)').areYouSure();\n }\n\n // Parse SSH Key\n $('#ssh-key-content').on('change paste keyup', function () {\n const arrays = $(this).val().split(' ');\n const $title = $('#ssh-key-title');\n if ($title.val() === '' && arrays.length === 3 && arrays[2] !== '') {\n $title.val(arrays[2]);\n }\n });\n});\n\nfunction showDeletePopup() {\n const $this = $(this);\n let filter = '';\n if ($this.attr('id')) {\n filter += `#${$this.attr('id')}`;\n }\n\n const dialog = $(`.delete.modal${filter}`);\n dialog.find('.name').text($this.data('name'));\n\n dialog.modal({\n closable: false,\n onApprove() {\n if ($this.data('type') === 'form') {\n $($this.data('form')).submit();\n return;\n }\n\n $.post($this.data('url'), {\n _csrf: csrf,\n id: $this.data('id')\n }).done((data) => {\n window.location.href = data.redirect;\n });\n }\n }).modal('show');\n return false;\n}\n\nfunction showAddAllPopup() {\n const $this = $(this);\n let filter = '';\n if ($this.attr('id')) {\n filter += `#${$this.attr('id')}`;\n }\n\n const dialog = $(`.addall.modal${filter}`);\n dialog.find('.name').text($this.data('name'));\n\n dialog.modal({\n closable: false,\n onApprove() {\n if ($this.data('type') === 'form') {\n $($this.data('form')).submit();\n return;\n }\n\n $.post($this.data('url'), {\n _csrf: csrf,\n id: $this.data('id')\n }).done((data) => {\n window.location.href = data.redirect;\n });\n }\n }).modal('show');\n return false;\n}\n\nfunction initVueComponents() {\n const vueDelimeters = ['${', '}'];\n\n Vue.component('repo-search', {\n delimiters: vueDelimeters,\n\n props: {\n searchLimit: {\n type: Number,\n default: 10\n },\n suburl: {\n type: String,\n required: true\n },\n uid: {\n type: Number,\n required: true\n },\n organizations: {\n type: Array,\n default: []\n },\n isOrganization: {\n type: Boolean,\n default: true\n },\n canCreateOrganization: {\n type: Boolean,\n default: false\n },\n organizationsTotalCount: {\n type: Number,\n default: 0\n },\n moreReposLink: {\n type: String,\n default: ''\n }\n },\n\n data() {\n return {\n tab: 'repos',\n repos: [],\n reposTotalCount: 0,\n reposFilter: 'all',\n searchQuery: '',\n isLoading: false,\n repoTypes: {\n all: {\n count: 0,\n searchMode: '',\n },\n forks: {\n count: 0,\n searchMode: 'fork',\n },\n mirrors: {\n count: 0,\n searchMode: 'mirror',\n },\n sources: {\n count: 0,\n searchMode: 'source',\n },\n collaborative: {\n count: 0,\n searchMode: 'collaborative',\n },\n }\n };\n },\n\n computed: {\n showMoreReposLink() {\n return this.repos.length > 0 && this.repos.length < this.repoTypes[this.reposFilter].count;\n },\n searchURL() {\n return `${this.suburl}/api/v1/repos/search?sort=updated&order=desc&uid=${this.uid}&q=${this.searchQuery\n }&limit=${this.searchLimit}&mode=${this.repoTypes[this.reposFilter].searchMode\n }${this.reposFilter !== 'all' ? '&exclusive=1' : ''}`;\n },\n repoTypeCount() {\n return this.repoTypes[this.reposFilter].count;\n }\n },\n\n mounted() {\n this.searchRepos(this.reposFilter);\n\n const self = this;\n Vue.nextTick(() => {\n self.$refs.search.focus();\n });\n },\n\n methods: {\n changeTab(t) {\n this.tab = t;\n },\n\n changeReposFilter(filter) {\n this.reposFilter = filter;\n this.repos = [];\n this.repoTypes[filter].count = 0;\n this.searchRepos(filter);\n },\n\n showRepo(repo, filter) {\n switch (filter) {\n case 'sources':\n return repo.owner.id === this.uid && !repo.mirror && !repo.fork;\n case 'forks':\n return repo.owner.id === this.uid && !repo.mirror && repo.fork;\n case 'mirrors':\n return repo.mirror;\n case 'collaborative':\n return repo.owner.id !== this.uid && !repo.mirror;\n default:\n return true;\n }\n },\n\n searchRepos(reposFilter) {\n const self = this;\n\n this.isLoading = true;\n\n const searchedMode = this.repoTypes[reposFilter].searchMode;\n const searchedURL = this.searchURL;\n const searchedQuery = this.searchQuery;\n\n $.getJSON(searchedURL, (result, _textStatus, request) => {\n if (searchedURL === self.searchURL) {\n self.repos = result.data;\n const count = request.getResponseHeader('X-Total-Count');\n if (searchedQuery === '' && searchedMode === '') {\n self.reposTotalCount = count;\n }\n self.repoTypes[reposFilter].count = count;\n }\n }).always(() => {\n if (searchedURL === self.searchURL) {\n self.isLoading = false;\n }\n });\n },\n\n repoClass(repo) {\n if (repo.fork) {\n return 'octicon octicon-repo-forked';\n } if (repo.mirror) {\n return 'octicon octicon-repo-clone';\n } if (repo.private) {\n return 'octicon octicon-lock';\n }\n return 'octicon octicon-repo';\n }\n }\n });\n}\n\nfunction initCtrlEnterSubmit() {\n $('.js-quick-submit').keydown(function (e) {\n if (((e.ctrlKey && !e.altKey) || e.metaKey) && (e.keyCode === 13 || e.keyCode === 10)) {\n $(this).closest('form').submit();\n }\n });\n}\n\nfunction initVueApp() {\n const el = document.getElementById('app');\n if (!el) {\n return;\n }\n\n initVueComponents();\n\n new Vue({\n delimiters: ['${', '}'],\n el,\n data: {\n searchLimit: document.querySelector('meta[name=_search_limit]').content,\n suburl: document.querySelector('meta[name=_suburl]').content,\n uid: document.querySelector('meta[name=_context_uid]').content,\n },\n });\n}\n\nwindow.timeAddManual = function () {\n $('.mini.modal')\n .modal({\n duration: 200,\n onApprove() {\n $('#add_time_manual_form').submit();\n }\n }).modal('show');\n};\n\nwindow.toggleStopwatch = function () {\n $('#toggle_stopwatch_form').submit();\n};\nwindow.cancelStopwatch = function () {\n $('#cancel_stopwatch_form').submit();\n};\n\nwindow.initHeatmap = function (appElementId, heatmapUser, locale) {\n const el = document.getElementById(appElementId);\n if (!el) {\n return;\n }\n\n locale = locale || {};\n\n locale.contributions = locale.contributions || 'contributions';\n locale.no_contributions = locale.no_contributions || 'No contributions';\n\n const vueDelimeters = ['${', '}'];\n\n Vue.component('activity-heatmap', {\n delimiters: vueDelimeters,\n\n props: {\n user: {\n type: String,\n required: true\n },\n suburl: {\n type: String,\n required: true\n },\n locale: {\n type: Object,\n required: true\n }\n },\n\n data() {\n return {\n isLoading: true,\n colorRange: [],\n endDate: null,\n values: [],\n totalContributions: 0,\n };\n },\n\n mounted() {\n this.colorRange = [\n this.getColor(0),\n this.getColor(1),\n this.getColor(2),\n this.getColor(3),\n this.getColor(4),\n this.getColor(5)\n ];\n this.endDate = new Date();\n this.loadHeatmap(this.user);\n },\n\n methods: {\n loadHeatmap(userName) {\n const self = this;\n $.get(`${this.suburl}/api/v1/users/${userName}/heatmap`, (chartRawData) => {\n const chartData = [];\n for (let i = 0; i < chartRawData.length; i++) {\n self.totalContributions += chartRawData[i].contributions;\n chartData[i] = { date: new Date(chartRawData[i].timestamp * 1000), count: chartRawData[i].contributions };\n }\n self.values = chartData;\n self.isLoading = false;\n });\n },\n\n getColor(idx) {\n const el = document.createElement('div');\n el.className = `heatmap-color-${idx}`;\n document.body.appendChild(el);\n\n const color = getComputedStyle(el).backgroundColor;\n\n document.body.removeChild(el);\n\n return color;\n }\n },\n\n template: '<div><div v-show=\"isLoading\"><slot name=\"loading\"></slot></div><h4 class=\"total-contributions\" v-if=\"!isLoading\"><span v-html=\"totalContributions\"></span> total contributions in the last 12 months</h4><calendar-heatmap v-show=\"!isLoading\" :locale=\"locale\" :no-data-text=\"locale.no_contributions\" :tooltip-unit=\"locale.contributions\" :end-date=\"endDate\" :values=\"values\" :range-color=\"colorRange\" />'\n });\n\n new Vue({\n delimiters: vueDelimeters,\n el,\n\n data: {\n suburl: document.querySelector('meta[name=_suburl]').content,\n heatmapUser,\n locale\n },\n });\n};\n\nfunction initFilterBranchTagDropdown(selector) {\n $(selector).each(function () {\n const $dropdown = $(this);\n const $data = $dropdown.find('.data');\n const data = {\n items: [],\n mode: $data.data('mode'),\n searchTerm: '',\n noResults: '',\n canCreateBranch: false,\n menuVisible: false,\n active: 0\n };\n $data.find('.item').each(function () {\n data.items.push({\n name: $(this).text(),\n url: $(this).data('url'),\n branch: $(this).hasClass('branch'),\n tag: $(this).hasClass('tag'),\n selected: $(this).hasClass('selected')\n });\n });\n $data.remove();\n new Vue({\n delimiters: ['${', '}'],\n el: this,\n data,\n\n beforeMount() {\n const vm = this;\n\n this.noResults = vm.$el.getAttribute('data-no-results');\n this.canCreateBranch = vm.$el.getAttribute('data-can-create-branch') === 'true';\n\n document.body.addEventListener('click', (event) => {\n if (vm.$el.contains(event.target)) {\n return;\n }\n if (vm.menuVisible) {\n Vue.set(vm, 'menuVisible', false);\n }\n });\n },\n\n watch: {\n menuVisible(visible) {\n if (visible) {\n this.focusSearchField();\n }\n }\n },\n\n computed: {\n filteredItems() {\n const vm = this;\n\n const items = vm.items.filter((item) => {\n return ((vm.mode === 'branches' && item.branch) || (vm.mode === 'tags' && item.tag))\n && (!vm.searchTerm || item.name.toLowerCase().indexOf(vm.searchTerm.toLowerCase()) >= 0);\n });\n\n vm.active = (items.length === 0 && vm.showCreateNewBranch ? 0 : -1);\n\n return items;\n },\n showNoResults() {\n return this.filteredItems.length === 0 && !this.showCreateNewBranch;\n },\n showCreateNewBranch() {\n const vm = this;\n if (!this.canCreateBranch || !vm.searchTerm || vm.mode === 'tags') {\n return false;\n }\n\n return vm.items.filter((item) => item.name.toLowerCase() === vm.searchTerm.toLowerCase()).length === 0;\n }\n },\n\n methods: {\n selectItem(item) {\n const prev = this.getSelected();\n if (prev !== null) {\n prev.selected = false;\n }\n item.selected = true;\n window.location.href = item.url;\n },\n createNewBranch() {\n if (!this.showCreateNewBranch) {\n return;\n }\n this.$refs.newBranchForm.submit();\n },\n focusSearchField() {\n const vm = this;\n Vue.nextTick(() => {\n vm.$refs.searchField.focus();\n });\n },\n getSelected() {\n for (let i = 0, j = this.items.length; i < j; ++i) {\n if (this.items[i].selected) return this.items[i];\n }\n return null;\n },\n getSelectedIndexInFiltered() {\n for (let i = 0, j = this.filteredItems.length; i < j; ++i) {\n if (this.filteredItems[i].selected) return i;\n }\n return -1;\n },\n scrollToActive() {\n let el = this.$refs[`listItem${this.active}`];\n if (!el || el.length === 0) {\n return;\n }\n if (Array.isArray(el)) {\n el = el[0];\n }\n\n const cont = this.$refs.scrollContainer;\n\n if (el.offsetTop < cont.scrollTop) {\n cont.scrollTop = el.offsetTop;\n } else if (el.offsetTop + el.clientHeight > cont.scrollTop + cont.clientHeight) {\n cont.scrollTop = el.offsetTop + el.clientHeight - cont.clientHeight;\n }\n },\n keydown(event) {\n const vm = this;\n if (event.keyCode === 40) {\n // arrow down\n event.preventDefault();\n\n if (vm.active === -1) {\n vm.active = vm.getSelectedIndexInFiltered();\n }\n\n if (vm.active + (vm.showCreateNewBranch ? 0 : 1) >= vm.filteredItems.length) {\n return;\n }\n vm.active++;\n vm.scrollToActive();\n }\n if (event.keyCode === 38) {\n // arrow up\n event.preventDefault();\n\n if (vm.active === -1) {\n vm.active = vm.getSelectedIndexInFiltered();\n }\n\n if (vm.active <= 0) {\n return;\n }\n vm.active--;\n vm.scrollToActive();\n }\n if (event.keyCode === 13) {\n // enter\n event.preventDefault();\n\n if (vm.active >= vm.filteredItems.length) {\n vm.createNewBranch();\n } else if (vm.active >= 0) {\n vm.selectItem(vm.filteredItems[vm.active]);\n }\n }\n if (event.keyCode === 27) {\n // escape\n event.preventDefault();\n vm.menuVisible = false;\n }\n }\n }\n });\n });\n}\n\n$('.commit-button').click(function (e) {\n e.preventDefault();\n $(this).parent().find('.commit-body').toggle();\n});\n\nfunction initNavbarContentToggle() {\n const content = $('#navbar');\n const toggle = $('#navbar-expand-toggle');\n let isExpanded = false;\n toggle.click(() => {\n isExpanded = !isExpanded;\n if (isExpanded) {\n content.addClass('shown');\n toggle.addClass('active');\n } else {\n content.removeClass('shown');\n toggle.removeClass('active');\n }\n });\n}\n\nfunction initTopicbar() {\n const mgrBtn = $('#manage_topic');\n const editDiv = $('#topic_edit');\n const viewDiv = $('#repo-topics');\n const saveBtn = $('#save_topic');\n const topicDropdown = $('#topic_edit .dropdown');\n const topicForm = $('#topic_edit.ui.form');\n const topicPrompts = getPrompts();\n\n mgrBtn.click(() => {\n viewDiv.hide();\n editDiv.css('display', ''); // show Semantic UI Grid\n });\n\n function getPrompts() {\n const hidePrompt = $('div.hide#validate_prompt');\n const prompts = {\n countPrompt: hidePrompt.children('#count_prompt').text(),\n formatPrompt: hidePrompt.children('#format_prompt').text()\n };\n hidePrompt.remove();\n return prompts;\n }\n\n saveBtn.click(() => {\n const topics = $('input[name=topics]').val();\n\n $.post(saveBtn.data('link'), {\n _csrf: csrf,\n topics\n }, (_data, _textStatus, xhr) => {\n if (xhr.responseJSON.status === 'ok') {\n viewDiv.children('.topic').remove();\n if (topics.length) {\n const topicArray = topics.split(',');\n\n const last = viewDiv.children('a').last();\n for (let i = 0; i < topicArray.length; i++) {\n $(`<a class=\"ui repo-topic small label topic\" href=\"${suburl}/explore/repos?q=${topicArray[i]}&topic=1\">${topicArray[i]}</a>`).insertBefore(last);\n }\n }\n editDiv.css('display', 'none');\n viewDiv.show();\n }\n }).fail((xhr) => {\n if (xhr.status === 422) {\n if (xhr.responseJSON.invalidTopics.length > 0) {\n topicPrompts.formatPrompt = xhr.responseJSON.message;\n\n const { invalidTopics } = xhr.responseJSON;\n const topicLables = topicDropdown.children('a.ui.label');\n\n topics.split(',').forEach((value, index) => {\n for (let i = 0; i < invalidTopics.length; i++) {\n if (invalidTopics[i] === value) {\n topicLables.eq(index).removeClass('green').addClass('red');\n }\n }\n });\n } else {\n topicPrompts.countPrompt = xhr.responseJSON.message;\n }\n }\n }).always(() => {\n topicForm.form('validate form');\n });\n });\n\n topicDropdown.dropdown({\n allowAdditions: true,\n forceSelection: false,\n fields: { name: 'description', value: 'data-value' },\n saveRemoteData: false,\n label: {\n transition: 'horizontal flip',\n duration: 200,\n variation: false,\n blue: true,\n basic: true,\n },\n className: {\n label: 'ui small label'\n },\n apiSettings: {\n url: `${suburl}/api/v1/topics/search?q={query}`,\n throttle: 500,\n cache: false,\n onResponse(res) {\n const formattedResponse = {\n success: false,\n results: [],\n };\n const stripTags = function (text) {\n return text.replace(/<[^>]*>?/gm, '');\n };\n\n const query = stripTags(this.urlData.query.trim());\n let found_query = false;\n const current_topics = [];\n topicDropdown.find('div.label.visible.topic,a.label.visible').each((_, e) => { current_topics.push(e.dataset.value); });\n\n if (res.topics) {\n let found = false;\n for (let i = 0; i < res.topics.length; i++) {\n // skip currently added tags\n if (current_topics.indexOf(res.topics[i].topic_name) !== -1) {\n continue;\n }\n\n if (res.topics[i].topic_name.toLowerCase() === query.toLowerCase()) {\n found_query = true;\n }\n formattedResponse.results.push({ description: res.topics[i].topic_name, 'data-value': res.topics[i].topic_name });\n found = true;\n }\n formattedResponse.success = found;\n }\n\n if (query.length > 0 && !found_query) {\n formattedResponse.success = true;\n formattedResponse.results.unshift({ description: query, 'data-value': query });\n } else if (query.length > 0 && found_query) {\n formattedResponse.results.sort((a, b) => {\n if (a.description.toLowerCase() === query.toLowerCase()) return -1;\n if (b.description.toLowerCase() === query.toLowerCase()) return 1;\n if (a.description > b.description) return -1;\n if (a.description < b.description) return 1;\n return 0;\n });\n }\n\n\n return formattedResponse;\n },\n },\n onLabelCreate(value) {\n value = value.toLowerCase().trim();\n this.attr('data-value', value).contents().first().replaceWith(value);\n return $(this);\n },\n onAdd(addedValue, _addedText, $addedChoice) {\n addedValue = addedValue.toLowerCase().trim();\n $($addedChoice).attr('data-value', addedValue);\n $($addedChoice).attr('data-text', addedValue);\n }\n });\n\n $.fn.form.settings.rules.validateTopic = function (_values, regExp) {\n const topics = topicDropdown.children('a.ui.label');\n const status = topics.length === 0 || topics.last().attr('data-value').match(regExp);\n if (!status) {\n topics.last().removeClass('green').addClass('red');\n }\n return status && topicDropdown.children('a.ui.label.red').length === 0;\n };\n\n topicForm.form({\n on: 'change',\n inline: true,\n fields: {\n topics: {\n identifier: 'topics',\n rules: [\n {\n type: 'validateTopic',\n value: /^[a-z0-9][a-z0-9-]{0,35}$/,\n prompt: topicPrompts.formatPrompt\n },\n {\n type: 'maxCount[25]',\n prompt: topicPrompts.countPrompt\n }\n ]\n },\n }\n });\n}\n\nwindow.toggleDeadlineForm = function () {\n $('#deadlineForm').fadeToggle(150);\n};\n\nwindow.setDeadline = function () {\n const deadline = $('#deadlineDate').val();\n window.updateDeadline(deadline);\n};\n\nwindow.updateDeadline = function (deadlineString) {\n $('#deadline-err-invalid-date').hide();\n $('#deadline-loader').addClass('loading');\n\n let realDeadline = null;\n if (deadlineString !== '') {\n const newDate = Date.parse(deadlineString);\n\n if (Number.isNaN(newDate)) {\n $('#deadline-loader').removeClass('loading');\n $('#deadline-err-invalid-date').show();\n return false;\n }\n realDeadline = new Date(newDate);\n }\n\n $.ajax(`${$('#update-issue-deadline-form').attr('action')}/deadline`, {\n data: JSON.stringify({\n due_date: realDeadline,\n }),\n headers: {\n 'X-Csrf-Token': csrf,\n 'X-Remote': true,\n },\n contentType: 'application/json',\n type: 'POST',\n success() {\n reload();\n },\n error() {\n $('#deadline-loader').removeClass('loading');\n $('#deadline-err-invalid-date').show();\n }\n });\n};\n\nwindow.deleteDependencyModal = function (id, type) {\n $('.remove-dependency')\n .modal({\n closable: false,\n duration: 200,\n onApprove() {\n $('#removeDependencyID').val(id);\n $('#dependencyType').val(type);\n $('#removeDependencyForm').submit();\n }\n }).modal('show');\n};\n\nfunction initIssueList() {\n const repolink = $('#repolink').val();\n const repoId = $('#repoId').val();\n const crossRepoSearch = $('#crossRepoSearch').val();\n let issueSearchUrl = `${suburl}/api/v1/repos/${repolink}/issues?q={query}`;\n if (crossRepoSearch === 'true') {\n issueSearchUrl = `${suburl}/api/v1/repos/issues/search?q={query}&priority_repo_id=${repoId}`;\n }\n $('#new-dependency-drop-list')\n .dropdown({\n apiSettings: {\n url: issueSearchUrl,\n onResponse(response) {\n const filteredResponse = { success: true, results: [] };\n const currIssueId = $('#new-dependency-drop-list').data('issue-id');\n // Parse the response from the api to work with our dropdown\n $.each(response, (_i, issue) => {\n // Don't list current issue in the dependency list.\n if (issue.id === currIssueId) {\n return;\n }\n filteredResponse.results.push({\n name: `#${issue.number} ${htmlEncode(issue.title)\n }<div class=\"text small dont-break-out\">${htmlEncode(issue.repository.full_name)}</div>`,\n value: issue.id\n });\n });\n return filteredResponse;\n },\n cache: false,\n },\n\n fullTextSearch: true\n });\n\n $('.menu a.label-filter-item').each(function () {\n $(this).click(function (e) {\n if (e.altKey) {\n e.preventDefault();\n\n const href = $(this).attr('href');\n const id = $(this).data('label-id');\n\n const regStr = `labels=(-?[0-9]+%2c)*(${id})(%2c-?[0-9]+)*&`;\n const newStr = 'labels=$1-$2$3&';\n\n window.location = href.replace(new RegExp(regStr), newStr);\n }\n });\n });\n\n $('.menu .ui.dropdown.label-filter').keydown((e) => {\n if (e.altKey && e.keyCode === 13) {\n const selectedItems = $('.menu .ui.dropdown.label-filter .menu .item.selected');\n\n if (selectedItems.length > 0) {\n const item = $(selectedItems[0]);\n\n const href = item.attr('href');\n const id = item.data('label-id');\n\n const regStr = `labels=(-?[0-9]+%2c)*(${id})(%2c-?[0-9]+)*&`;\n const newStr = 'labels=$1-$2$3&';\n\n window.location = href.replace(new RegExp(regStr), newStr);\n }\n }\n });\n}\nwindow.cancelCodeComment = function (btn) {\n const form = $(btn).closest('form');\n if (form.length > 0 && form.hasClass('comment-form')) {\n form.addClass('hide');\n form.parent().find('button.comment-form-reply').show();\n } else {\n form.closest('.comment-code-cloud').remove();\n }\n};\nwindow.onOAuthLoginClick = function () {\n const oauthLoader = $('#oauth2-login-loader');\n const oauthNav = $('#oauth2-login-navigator');\n\n oauthNav.hide();\n oauthLoader.removeClass('disabled');\n\n setTimeout(() => {\n // recover previous content to let user try again\n // usually redirection will be performed before this action\n oauthLoader.addClass('disabled');\n oauthNav.show();\n }, 5000);\n};\n"],"sourceRoot":""}