]> source.dussan.org Git - gitea.git/commitdiff
Add comment highlight when target from url (#9047)
authorjaqra <48099350+jaqra@users.noreply.github.com>
Mon, 25 Nov 2019 11:50:46 +0000 (14:50 +0300)
committerzeripath <art27@cantab.net>
Mon, 25 Nov 2019 11:50:46 +0000 (11:50 +0000)
* Add comment highlight css

* Add js to remove highlight on click outside

* Improve refresh page on click outside

* Use location.hash property to remove target

* Handle click ONLY clicked outside of 'targetted comment' (not other comment)

* Remove unnecessary checks and simply code

* Combine hash and setState to remove target path

public/css/index.css
public/js/index.js
public/js/index.js.map
web_src/js/index.js
web_src/less/_repository.less

index 52c5604a2dcd569364e91657b21858b67c0d7cca..dd87c2f133dd9acf6846158dc352121ed46913fc 100644 (file)
@@ -593,6 +593,7 @@ i.icon.centerlock{top:1.5em}
 .repository.view.issue .comment-list .comment .content>.bottom.segment .ui.image{max-height:100%;width:auto;margin:0;vertical-align:middle}
 .repository.view.issue .comment-list .comment .content>.bottom.segment span.ui.image{font-size:128px;color:#000}
 .repository.view.issue .comment-list .comment .content>.bottom.segment span.ui.image:hover{color:#000}
+.repository.view.issue .comment-list .comment:target>.content{box-shadow:0 0 10px #8c8c8c}
 .repository.view.issue .comment-list .comment .ui.form .field:first-child{clear:none}
 .repository.view.issue .comment-list .comment .ui.form .tab.segment{border:0;padding:10px 0 0}
 .repository.view.issue .comment-list .comment .ui.form textarea{height:200px;font-family:'SF Mono',Consolas,Menlo,'Liberation Mono',Monaco,'Lucida Console',monospace}
index 9ddedff2416f478e867b75ba7aa6d21dd042ecf6..9a92a654a3b63658103ff48e4933b412289220a1 100644 (file)
@@ -1,2 +1,2 @@
-!function(e){function t(t){for(var n,a,o=t[0],r=t[1],s=0,l=[];s<o.length;s++)a=o[s],Object.prototype.hasOwnProperty.call(i,a)&&i[a]&&l.push(i[a][0]),i[a]=0;for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);for(c&&c(t);l.length;)l.shift()()}var n={},i={1:0};function a(t){if(n[t])return n[t].exports;var i=n[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,a),i.l=!0,i.exports}a.e=function(e){var t=[],n=i[e];if(0!==n)if(n)t.push(n[2]);else{var o=new Promise((function(t,a){n=i[e]=[t,a]}));t.push(n[2]=o);var r,s=document.createElement("script");s.charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.src=function(e){return a.p+""+({0:"gitgraph"}[e]||e)+".js"}(e);var c=new Error;r=function(t){s.onerror=s.onload=null,clearTimeout(l);var n=i[e];if(0!==n){if(n){var a=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+a+": "+o+")",c.name="ChunkLoadError",c.type=a,c.request=o,n[1](c)}i[e]=void 0}};var l=setTimeout((function(){r({type:"timeout",target:s})}),12e4);s.onerror=s.onload=r,document.head.appendChild(s)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)a.d(n,i,function(t){return e[t]}.bind(null,i));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var o=window.webpackJsonp=window.webpackJsonp||[],r=o.push.bind(o);o.push=t,o=o.slice();for(var s=0;s<o.length;s++)t(o[s]);var c=r;a(a.s=2)}([function(e,t,n){e.exports=n(4)},function(e,t,n){var i=n(5),a=n(6),o=n(7);e.exports=function(e,t){return i(e)||a(e,t)||o()}},function(e,t,n){e.exports=n(9)},function(e,t,n){if(document.currentScript&&document.currentScript.src){var i=new URL(document.currentScript.src);n.p="".concat(i.pathname.replace(/\/[^/]*$/,""),"/")}else{var a=document.querySelector('script[src*="/index.js"]');n.p="".concat(a.getAttribute("src").replace(/\/[^/]*$/,""),"/")}},function(e,t,n){var i=function(e){"use strict";var t,n=Object.prototype,i=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",r=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,n,i){var a=t&&t.prototype instanceof v?t:v,o=Object.create(a.prototype),r=new T(i||[]);return o._invoke=function(e,t,n){var i=d;return function(a,o){if(i===h)throw new Error("Generator is already running");if(i===f){if("throw"===a)throw o;return L()}for(n.method=a,n.arg=o;;){var r=n.delegate;if(r){var s=k(r,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=h;var c=l(e,t,n);if("normal"===c.type){if(i=n.done?f:u,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=f,n.method="throw",n.arg=c.arg)}}}(e,n,r),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",u="suspendedYield",h="executing",f="completed",m={};function v(){}function p(){}function g(){}var b={};b[o]=function(){return this};var $=Object.getPrototypeOf,w=$&&$($(A([])));w&&w!==n&&i.call(w,o)&&(b=w);var y=g.prototype=v.prototype=Object.create(b);function x(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function C(e){var t;this._invoke=function(n,a){function o(){return new Promise((function(t,o){!function t(n,a,o,r){var s=l(e[n],e,a);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&i.call(d,"__await")?Promise.resolve(d.__await).then((function(e){t("next",e,o,r)}),(function(e){t("throw",e,o,r)})):Promise.resolve(d).then((function(e){c.value=e,o(c)}),(function(e){return t("throw",e,o,r)}))}r(s.arg)}(n,a,t,o)}))}return t=t?t.then(o,o):o()}}function k(e,n){var i=e.iterator[n.method];if(i===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,k(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var a=l(i,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var o=a.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function A(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function n(){for(;++a<e.length;)if(i.call(e,a))return n.value=e[a],n.done=!1,n;return n.value=t,n.done=!0,n};return r.next=r}}return{next:L}}function L(){return{value:t,done:!0}}return p.prototype=y.constructor=g,g.constructor=p,g[s]=p.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(C.prototype),C.prototype[r]=function(){return this},e.AsyncIterator=C,e.async=function(t,n,i,a){var o=new C(c(t,n,i,a));return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(y),y[s]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},e.values=A,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function a(i,a){return s.type="throw",s.arg=e,n.next=i,a&&(n.method="next",n.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o],s=r.completion;if("root"===r.tryLoc)return a("end");if(r.tryLoc<=this.prev){var c=i.call(r,"catchLoc"),l=i.call(r,"finallyLoc");if(c&&l){if(this.prev<r.catchLoc)return a(r.catchLoc,!0);if(this.prev<r.finallyLoc)return a(r.finallyLoc)}else if(c){if(this.prev<r.catchLoc)return a(r.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return a(r.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&i.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var r=o?o.completion:{};return r.type=e,r.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(r)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var a=i.arg;_(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:A(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=i}catch(e){Function("r","regeneratorRuntime = r")(i)}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],i=!0,a=!1,o=void 0;try{for(var r,s=e[Symbol.iterator]();!(i=(r=s.next()).done)&&(n.push(r.value),!t||n.length!==t);i=!0);}catch(e){a=!0,o=e}finally{try{i||null==s.return||s.return()}finally{if(a)throw o}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){!function(e,t,n,i){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.dropdown=function(i){var a,o=e(this),r=e(n),s=o.selector||"",c="ontouchstart"in n.documentElement,l=(new Date).getTime(),d=[],u=arguments[0],h="string"==typeof u,f=[].slice.call(arguments,1),m=1;return o.each((function(v){var p,g,b,$,w,y,x,C,k=e.isPlainObject(i)?e.extend(!0,{},e.fn.dropdown.settings,i):e.extend({},e.fn.dropdown.settings),S=k.className,_=k.message,T=k.fields,A=k.keys,L=k.metadata,q=k.namespace,D=k.regExp,O=k.selector,I=k.error,R=k.templates,E="."+q,F="module-"+q,j=e(this),M=e(k.context),N=j.find(O.text),z=j.find(O.search),P=j.find(O.sizer),V=j.find(O.input),B=j.find(O.icon),H=j.prev().find(O.text).length>0?j.prev().find(O.text):j.prev(),U=j.children(O.menu),K=U.find(O.item),W=!1,J=!1,Q=!1,X=this,G=j.data(F);C={initialize:function(){C.debug("Initializing dropdown",k),C.is.alreadySetup()?C.setup.reference():(C.setup.layout(),k.values&&C.change.values(k.values),C.refreshData(),C.save.defaults(),C.restore.selected(),C.create.id(),C.bind.events(),C.observeChanges(),C.instantiate(),C.aria.setup())},instantiate:function(){C.verbose("Storing instance of dropdown",C),G=C,j.data(F,C)},destroy:function(){C.verbose("Destroying previous dropdown",j),C.remove.tabbable(),j.off(E).removeData(F),U.off(E),r.off($),C.disconnect.menuObserver(),C.disconnect.selectObserver()},observeChanges:function(){"MutationObserver"in t&&(y=new MutationObserver(C.event.select.mutation),x=new MutationObserver(C.event.menu.mutation),C.debug("Setting up mutation observer",y,x),C.observe.select(),C.observe.menu())},disconnect:{menuObserver:function(){x&&x.disconnect()},selectObserver:function(){y&&y.disconnect()}},observe:{select:function(){C.has.input()&&y.observe(j[0],{childList:!0,subtree:!0})},menu:function(){C.has.menu()&&x.observe(U[0],{childList:!0,subtree:!0})}},create:{id:function(){w=(Math.random().toString(16)+"000000000").substr(2,8),$="."+w,C.verbose("Creating unique id for element",w)},userChoice:function(t){var n,i,a;return!!(t=t||C.get.userValues())&&(t=e.isArray(t)?t:[t],e.each(t,(function(t,o){!1===C.get.item(o)&&(a=k.templates.addition(C.add.variables(_.addResult,o)),i=e("<div />").html(a).attr("data-"+L.value,o).attr("data-"+L.text,o).addClass(S.addition).addClass(S.item),k.hideAdditions&&i.addClass(S.hidden),n=void 0===n?i:n.add(i),C.verbose("Creating user choices for value",o,i))})),n)},userLabels:function(t){var n=C.get.userValues();n&&(C.debug("Adding user labels",n),e.each(n,(function(e,t){C.verbose("Adding custom user value"),C.add.label(t,t)})))},menu:function(){U=e("<div />").addClass(S.menu).appendTo(j)},sizer:function(){P=e("<span />").addClass(S.sizer).insertAfter(z)}},search:function(e){e=void 0!==e?e:C.get.query(),C.verbose("Searching for query",e),C.has.minCharacters(e)?C.filter(e):C.hide()},select:{firstUnfiltered:function(){C.verbose("Selecting first non-filtered element"),C.remove.selectedItem(),K.not(O.unselectable).not(O.addition+O.hidden).eq(0).addClass(S.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(O.item).not(O.unselectable).eq(0),n=e.prevAll(O.item).not(O.unselectable).eq(0);t.length>0?(C.verbose("Moving selection to",t),t.addClass(S.selected)):(C.verbose("Moving selection to",n),n.addClass(S.selected))}},aria:{setup:function(){"menu"===C.aria.guessRole()&&(j.attr("aria-busy","true"),j.attr("role","menu"),j.attr("aria-haspopup","menu"),j.attr("aria-expanded","false"),U.find(".divider").attr("role","separator"),K.attr("role","menuitem"),K.each((function(e,t){t.id||(t.id=C.aria.nextID("menuitem"))})),N=j.find("> .text").eq(0),j.data("content")?(N.attr("aria-hidden"),j.attr("aria-label",j.data("content"))):(N.attr("id",C.aria.nextID("menutext")),j.attr("aria-labelledby",N.attr("id"))),j.attr("aria-busy","false"))},nextID:function(e){var t;do{t=e+"_"+m++}while(n.getElementById(t));return t},setExpanded:function(e){j.attr("aria-haspopup")&&j.attr("aria-expanded",e)},refreshDescendant:function(){if("menu"===j.attr("aria-haspopup")){var e=K.not(O.unselectable).filter("."+S.selected).eq(0),t=U.children("."+S.active).eq(0),n=e.length>0?e:t;n?j.attr("aria-activedescendant",n.attr("id")):C.aria.removeDescendant()}},removeDescendant:function(){"menu"==j.attr("aria-haspopup")&&j.removeAttr("aria-activedescendant")},guessRole:function(){var e=j.hasClass("icon"),t=C.has.search(),n=V.length>0,i=C.is.multiple();return e||t||n||i?"unknown":"menu"}},setup:{api:function(){var e={debug:k.debug,urlData:{value:C.get.value(),query:C.get.query()},on:!1};C.verbose("First request, initializing API"),j.api(e)},layout:function(){j.is("select")&&(C.setup.select(),C.setup.returnedObject()),C.has.menu()||C.create.menu(),C.is.search()&&!C.has.search()&&(C.verbose("Adding search input"),z=e("<input />").addClass(S.search).prop("autocomplete","off").insertBefore(N)),C.is.multiple()&&C.is.searchSelection()&&!C.has.sizer()&&C.create.sizer(),k.allowTab&&C.set.tabbable(),K.attr("tabindex","-1")},select:function(){var t=C.get.selectValues();C.debug("Dropdown initialized on a select",t),j.is("select")&&(V=j),V.parent(O.dropdown).length>0?(C.debug("UI dropdown already exists. Creating dropdown menu only"),j=V.closest(O.dropdown),C.has.menu()||C.create.menu(),U=j.children(O.menu),C.setup.menu(t)):(C.debug("Creating entire dropdown from select"),j=e("<div />").attr("class",V.attr("class")).addClass(S.selection).addClass(S.dropdown).html(R.dropdown(t)).insertBefore(V),V.hasClass(S.multiple)&&!1===V.prop("multiple")&&(C.error(I.missingMultiple),V.prop("multiple",!0)),V.is("[multiple]")&&C.set.multiple(),V.prop("disabled")&&(C.debug("Disabling dropdown"),j.addClass(S.disabled)),V.removeAttr("class").detach().prependTo(j)),C.refresh()},menu:function(e){U.html(R.menu(e,T)),K=U.find(O.item)},reference:function(){C.debug("Dropdown behavior was called on select, replacing with closest dropdown"),j=j.parent(O.dropdown),G=j.data(F),X=j.get(0),C.refresh(),C.setup.returnedObject()},returnedObject:function(){var e=o.slice(0,v),t=o.slice(v+1);o=e.add(j).add(t)}},refresh:function(){C.refreshSelectors(),C.refreshData()},refreshItems:function(){K=U.find(O.item)},refreshSelectors:function(){C.verbose("Refreshing selector cache"),N=j.find(O.text),z=j.find(O.search),V=j.find(O.input),B=j.find(O.icon),H=j.prev().find(O.text).length>0?j.prev().find(O.text):j.prev(),U=j.children(O.menu),K=U.find(O.item)},refreshData:function(){C.verbose("Refreshing cached metadata"),K.removeData(L.text).removeData(L.value)},clearData:function(){C.verbose("Clearing metadata"),K.removeData(L.text).removeData(L.value),j.removeData(L.defaultText).removeData(L.defaultValue).removeData(L.placeholderText)},toggle:function(){C.verbose("Toggling menu visibility"),C.is.active()?C.hide():C.show()},show:function(t){if(t=e.isFunction(t)?t:function(){},!C.can.show()&&C.is.remote()&&(C.debug("No API results retrieved, searching before show"),C.queryRemote(C.get.query(),C.show)),C.can.show()&&!C.is.active()){if(C.debug("Showing dropdown"),!C.has.message()||C.has.maxSelections()||C.has.allResultsFiltered()||C.remove.message(),C.is.allFiltered())return!0;!1!==k.onShow.call(X)&&(C.aria.setExpanded(!0),C.aria.refreshDescendant(),C.animate.show((function(){C.can.click()&&C.bind.intent(),C.has.menuSearch()&&C.focusSearch(),C.set.visible(),t.call(X)})))}},hide:function(t){t=e.isFunction(t)?t:function(){},C.is.active()&&!C.is.animatingOutward()&&(C.debug("Hiding dropdown"),!1!==k.onHide.call(X)&&(C.aria.setExpanded(!1),C.aria.removeDescendant(),C.animate.hide((function(){C.remove.visible(),t.call(X)}))))},hideOthers:function(){C.verbose("Finding other dropdowns to hide"),o.not(j).has(O.menu+"."+S.visible).dropdown("hide")},hideMenu:function(){C.verbose("Hiding menu  instantaneously"),C.remove.active(),C.remove.visible(),U.transition("hide")},hideSubMenus:function(){var e=U.children(O.item).find(O.menu);C.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){c&&C.bind.touchEvents(),C.bind.keyboardEvents(),C.bind.inputEvents(),C.bind.mouseEvents()},touchEvents:function(){C.debug("Touch device detected binding additional touch events"),C.is.searchSelection()||C.is.single()&&j.on("touchstart"+E,C.event.test.toggle),U.on("touchstart"+E,O.item,C.event.item.mouseenter)},keyboardEvents:function(){C.verbose("Binding keyboard events"),j.on("keydown"+E,C.event.keydown),C.has.search()&&j.on(C.get.inputEvent()+E,O.search,C.event.input),C.is.multiple()&&r.on("keydown"+$,C.event.document.keydown)},inputEvents:function(){C.verbose("Binding input change events"),j.on("change"+E,O.input,C.event.change)},mouseEvents:function(){C.verbose("Binding mouse events"),C.is.multiple()&&j.on("click"+E,O.label,C.event.label.click).on("click"+E,O.remove,C.event.remove.click),C.is.searchSelection()?(j.on("mousedown"+E,C.event.mousedown).on("mouseup"+E,C.event.mouseup).on("mousedown"+E,O.menu,C.event.menu.mousedown).on("mouseup"+E,O.menu,C.event.menu.mouseup).on("click"+E,O.icon,C.event.icon.click).on("focus"+E,O.search,C.event.search.focus).on("click"+E,O.search,C.event.search.focus).on("blur"+E,O.search,C.event.search.blur).on("click"+E,O.text,C.event.text.focus),C.is.multiple()&&j.on("click"+E,C.event.click)):("click"==k.on?j.on("click"+E,O.icon,C.event.icon.click).on("click"+E,C.event.test.toggle):"hover"==k.on?j.on("mouseenter"+E,C.delay.show).on("mouseleave"+E,C.delay.hide):j.on(k.on+E,C.toggle),j.on("mousedown"+E,C.event.mousedown).on("mouseup"+E,C.event.mouseup).on("focus"+E,C.event.focus),C.has.menuSearch()?j.on("blur"+E,O.search,C.event.search.blur):j.on("blur"+E,C.event.blur)),U.on("mouseenter"+E,O.item,C.event.item.mouseenter).on("mouseleave"+E,O.item,C.event.item.mouseleave).on("click"+E,O.item,C.event.item.click)},intent:function(){C.verbose("Binding hide intent event to document"),c&&r.on("touchstart"+$,C.event.test.touch).on("touchmove"+$,C.event.test.touch),r.on("click"+$,C.event.test.hide)}},unbind:{intent:function(){C.verbose("Removing hide intent event from document"),c&&r.off("touchstart"+$).off("touchmove"+$),r.off("click"+$)}},filter:function(e){var t=void 0!==e?e:C.get.query(),n=function(){C.is.multiple()&&C.filterActive(),(e||!e&&0==C.get.activeItem().length)&&C.select.firstUnfiltered(),C.has.allResultsFiltered()?k.onNoResults.call(X,t)?k.allowAdditions?k.hideAdditions&&(C.verbose("User addition with no menu, setting empty style"),C.set.empty(),C.hideMenu()):(C.verbose("All items filtered, showing message",t),C.add.message(_.noResults)):(C.verbose("All items filtered, hiding dropdown",t),C.hideMenu()):(C.remove.empty(),C.remove.message()),k.allowAdditions&&C.add.userSuggestion(e),C.is.searchSelection()&&C.can.show()&&C.is.focusedOnSearch()&&C.show()};k.useLabels&&C.has.maxSelections()||(k.apiSettings?C.can.useAPI()?C.queryRemote(t,(function(){k.filterRemoteData&&C.filterItems(t),n()})):C.error(I.noAPI):(C.filterItems(t),n()))},queryRemote:function(t,n){var i={errorDuration:!1,cache:"local",throttle:k.throttle,urlData:{query:t},onError:function(){C.add.message(_.serverError),n()},onFailure:function(){C.add.message(_.serverError),n()},onSuccess:function(e){C.remove.message(),C.setup.menu({values:e[T.remoteValues]}),n()}};j.api("get request")||C.setup.api(),i=e.extend(!0,{},i,k.apiSettings),j.api("setting",i).api("query")},filterItems:function(t){var n=void 0!==t?t:C.get.query(),i=null,a=C.escape.string(n),o=new RegExp("^"+a,"igm");C.has.query()&&(i=[],C.verbose("Searching for matching values",n),K.each((function(){var t,a,r=e(this);if("both"==k.match||"text"==k.match){if(-1!==(t=String(C.get.choiceText(r,!1))).search(o))return i.push(this),!0;if("exact"===k.fullTextSearch&&C.exactSearch(n,t))return i.push(this),!0;if(!0===k.fullTextSearch&&C.fuzzySearch(n,t))return i.push(this),!0}if("both"==k.match||"value"==k.match){if(-1!==(a=String(C.get.choiceValue(r,t))).search(o))return i.push(this),!0;if("exact"===k.fullTextSearch&&C.exactSearch(n,a))return i.push(this),!0;if(!0===k.fullTextSearch&&C.fuzzySearch(n,a))return i.push(this),!0}}))),C.debug("Showing only matched items",n),C.remove.filteredItem(),i&&K.not(i).addClass(S.filtered)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=e.toLowerCase(),t=t.toLowerCase(),i>n)return!1;if(i===n)return e===t;e:for(var a=0,o=0;a<i;a++){for(var r=e.charCodeAt(a);o<n;)if(t.charCodeAt(o++)===r)continue e;return!1}return!0},exactSearch:function(e,t){return e=e.toLowerCase(),(t=t.toLowerCase()).indexOf(e)>-1},filterActive:function(){k.useLabels&&K.filter("."+S.active).addClass(S.filtered)},focusSearch:function(e){C.has.search()&&!C.is.focusedOnSearch()&&(e?(j.off("focus"+E,O.search),z.focus(),j.on("focus"+E,O.search,C.event.search.focus)):z.focus())},forceSelection:function(){var e=K.not(S.filtered).filter("."+S.selected).eq(0),t=K.not(S.filtered).filter("."+S.active).eq(0),n=e.length>0?e:t;if(n.length>0&&!C.is.multiple())return C.debug("Forcing partial selection to selected item",n),void C.event.item.click.call(n,{},!0);k.allowAdditions?(C.set.selected(C.get.query()),C.remove.searchTerm()):C.remove.searchTerm()},change:{values:function(t){k.allowAdditions||C.clear(),C.debug("Creating dropdown with specified values",t),C.setup.menu({values:t}),e.each(t,(function(e,t){if(1==t.selected)return C.debug("Setting initial selection to",t.value),C.set.selected(t.value),!0}))}},event:{change:function(){Q||(C.debug("Input changed, updating selection"),C.set.selected())},focus:function(){k.showOnFocus&&!W&&C.is.hidden()&&!g&&C.show()},blur:function(e){g=n.activeElement===this,W||g||(C.remove.activeLabel(),C.hide())},mousedown:function(){C.is.searchSelection()?b=!0:W=!0},mouseup:function(){C.is.searchSelection()?b=!1:W=!1},click:function(t){e(t.target).is(j)&&(C.is.focusedOnSearch()?C.show():C.focusSearch())},search:{focus:function(){W=!0,C.is.multiple()&&C.remove.activeLabel(),k.showOnFocus&&C.search()},blur:function(e){g=n.activeElement===this,C.is.searchSelection()&&!b&&(J||g||(k.forceSelection&&C.forceSelection(),C.hide())),b=!1}},icon:{click:function(e){C.toggle()}},text:{focus:function(e){W=!0,C.focusSearch()}},input:function(e){(C.is.multiple()||C.is.searchSelection())&&C.set.filtered(),clearTimeout(C.timer),C.timer=setTimeout(C.search,k.delay.search)},label:{click:function(t){var n=e(this),i=j.find(O.label),a=i.filter("."+S.active),o=n.nextAll("."+S.active),r=n.prevAll("."+S.active),s=o.length>0?n.nextUntil(o).add(a).add(n):n.prevUntil(r).add(a).add(n);t.shiftKey?(a.removeClass(S.active),s.addClass(S.active)):t.ctrlKey?n.toggleClass(S.active):(a.removeClass(S.active),n.addClass(S.active)),k.onLabelSelect.apply(this,i.filter("."+S.active))}},remove:{click:function(){var t=e(this).parent();t.hasClass(S.active)?C.remove.activeLabels():C.remove.activeLabels(t)}},test:{toggle:function(e){var t=C.is.multiple()?C.show:C.toggle;C.is.bubbledLabelClick(e)||C.is.bubbledIconClick(e)||C.determine.eventOnElement(e,t)&&e.preventDefault()},touch:function(e){C.determine.eventOnElement(e,(function(){"touchstart"==e.type?C.timer=setTimeout((function(){C.hide()}),k.delay.touch):"touchmove"==e.type&&clearTimeout(C.timer)})),e.stopPropagation()},hide:function(e){C.determine.eventInModule(e,C.hide)}},select:{mutation:function(t){C.debug("<select> modified, recreating menu");var n=!1;e.each(t,(function(t,i){if(e(i.target).is("select")||e(i.addedNodes).is("select"))return n=!0,!0})),n&&(C.disconnect.selectObserver(),C.refresh(),C.setup.select(),C.set.selected(),C.observe.select())}},menu:{mutation:function(t){var n=t[0],i=n.addedNodes?e(n.addedNodes[0]):e(!1),a=n.removedNodes?e(n.removedNodes[0]):e(!1),o=i.add(a),r=o.is(O.addition)||o.closest(O.addition).length>0,s=o.is(O.message)||o.closest(O.message).length>0;r||s?(C.debug("Updating item selector cache"),C.refreshItems()):(C.debug("Menu modified, updating selector cache"),C.refresh())},mousedown:function(){J=!0},mouseup:function(){J=!1}},item:{mouseenter:function(t){var n=e(t.target),i=e(this),a=i.children(O.menu),o=i.siblings(O.item).children(O.menu),r=a.length>0;!(a.find(n).length>0)&&r&&(clearTimeout(C.itemTimer),C.itemTimer=setTimeout((function(){C.verbose("Showing sub-menu",a),e.each(o,(function(){C.animate.hide(!1,e(this))})),C.animate.show(!1,a)}),k.delay.show),t.preventDefault())},mouseleave:function(t){var n=e(this).children(O.menu);n.length>0&&(clearTimeout(C.itemTimer),C.itemTimer=setTimeout((function(){C.verbose("Hiding sub-menu",n),C.animate.hide(!1,n)}),k.delay.hide))},click:function(t,i){var a=e(this),o=e(t?t.target:""),r=a.find(O.menu),s=C.get.choiceText(a),c=C.get.choiceValue(a,s),l=r.length>0,d=r.find(o).length>0;C.has.menuSearch()&&e(n.activeElement).blur(),d||l&&!k.allowCategorySelection||(C.is.searchSelection()&&(k.allowAdditions&&C.remove.userAddition(),C.remove.searchTerm(),C.is.focusedOnSearch()||1==i||C.focusSearch(!0)),k.useLabels||(C.remove.filteredItem(),C.set.scrollPosition(a)),C.determine.selectAction.call(this,s,c))}},document:{keydown:function(e){var t=e.which;if(C.is.inObject(t,A)){var n=j.find(O.label),i=n.filter("."+S.active),a=(i.data(L.value),n.index(i)),o=n.length,r=i.length>0,s=i.length>1,c=0===a,l=a+1==o,d=C.is.searchSelection(),u=C.is.focusedOnSearch(),h=C.is.focused(),f=u&&0===C.get.caretPosition();if(d&&!r&&!u)return;t==A.leftArrow?!h&&!f||r?r&&(e.shiftKey?C.verbose("Adding previous label to selection"):(C.verbose("Selecting previous label"),n.removeClass(S.active)),c&&!s?i.addClass(S.active):i.prev(O.siblingLabel).addClass(S.active).end(),e.preventDefault()):(C.verbose("Selecting previous label"),n.last().addClass(S.active)):t==A.rightArrow?(h&&!r&&n.first().addClass(S.active),r&&(e.shiftKey?C.verbose("Adding next label to selection"):(C.verbose("Selecting next label"),n.removeClass(S.active)),l?d?u?n.removeClass(S.active):C.focusSearch():s?i.next(O.siblingLabel).addClass(S.active):i.addClass(S.active):i.next(O.siblingLabel).addClass(S.active),e.preventDefault())):t==A.deleteKey||t==A.backspace?r?(C.verbose("Removing active labels"),l&&d&&!u&&C.focusSearch(),i.last().next(O.siblingLabel).addClass(S.active),C.remove.activeLabels(i),e.preventDefault()):f&&!r&&t==A.backspace&&(C.verbose("Removing last label on input backspace"),i=n.last().addClass(S.active),C.remove.activeLabels(i)):i.removeClass(S.active)}}},keydown:function(e){var t=e.which;if(C.is.inObject(t,A)){var n,i=K.not(O.unselectable).filter("."+S.selected).eq(0),a=U.children("."+S.active).eq(0),o=i.length>0?i:a,r=o.length>0?o.siblings(":not(."+S.filtered+")").addBack():U.children(":not(."+S.filtered+")"),s=o.children(O.menu),c=o.closest(O.menu),l=c.hasClass(S.visible)||c.hasClass(S.animating)||c.parent(O.menu).length>0,d=s.length>0,u=o.length>0,h=o.not(O.unselectable).length>0,f=t==A.delimiter&&k.allowAdditions&&C.is.multiple();if(k.allowAdditions&&k.hideAdditions&&(t==A.enter||f)&&h&&(C.verbose("Selecting item from keyboard shortcut",o),o[0].click(),C.is.searchSelection()&&C.remove.searchTerm()),C.is.visible()){if((t==A.enter||f)&&(t==A.enter&&u&&d&&!k.allowCategorySelection?(C.verbose("Pressed enter on unselectable category, opening sub menu"),t=A.rightArrow):h&&(C.verbose("Selecting item from keyboard shortcut",o),o[0].click(),C.is.searchSelection()&&C.remove.searchTerm()),e.preventDefault()),u&&(t==A.leftArrow&&c[0]!==U[0]&&(C.verbose("Left key pressed, closing sub-menu"),C.animate.hide(!1,c),o.removeClass(S.selected),c.closest(O.item).addClass(S.selected),C.aria.refreshDescendant(),e.preventDefault()),t==A.rightArrow&&d&&(C.verbose("Right key pressed, opening sub-menu"),C.animate.show(!1,s),o.removeClass(S.selected),s.find(O.item).eq(0).addClass(S.selected),C.aria.refreshDescendant(),e.preventDefault())),t==A.upArrow){if(n=u&&l?o.prevAll(O.item+":not("+O.unselectable+")").eq(0):K.eq(0),r.index(n)<0)return C.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();C.verbose("Up key pressed, changing active item"),o.removeClass(S.selected),n.addClass(S.selected),C.aria.refreshDescendant(),C.set.scrollPosition(n),k.selectOnKeydown&&C.is.single()&&C.set.selectedItem(n),e.preventDefault()}if(t==A.downArrow){if(0===(n=u&&l?n=o.nextAll(O.item+":not("+O.unselectable+")").eq(0):K.eq(0)).length)return C.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();C.verbose("Down key pressed, changing active item"),K.removeClass(S.selected),n.addClass(S.selected),C.aria.refreshDescendant(),C.set.scrollPosition(n),k.selectOnKeydown&&C.is.single()&&C.set.selectedItem(n),e.preventDefault()}t==A.pageUp&&(C.scrollPage("up"),e.preventDefault()),t==A.pageDown&&(C.scrollPage("down"),e.preventDefault()),t==A.escape&&(C.verbose("Escape key pressed, closing dropdown"),C.hide())}else f&&e.preventDefault(),t!=A.downArrow||C.is.visible()||(C.verbose("Down key pressed, showing dropdown"),C.show(),e.preventDefault())}else C.has.search()||C.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e=n.createEvent("HTMLEvents"),t=V[0];t&&(C.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(t,n){C.verbose("Determining action",k.action),e.isFunction(C.action[k.action])?(C.verbose("Triggering preset action",k.action,t,n),C.action[k.action].call(X,t,n,this)):e.isFunction(k.action)?(C.verbose("Triggering user action",k.action,t,n),k.action.call(X,t,n,this)):C.error(I.action,k.action)},eventInModule:function(t,i){var a=e(t.target),o=a.closest(n.documentElement).length>0,r=a.closest(j).length>0;return i=e.isFunction(i)?i:function(){},o&&!r?(C.verbose("Triggering event",i),i(),!0):(C.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(t,i){var a=e(t.target),o=a.closest(O.siblingLabel),r=n.body.contains(t.target),s=0===j.find(o).length,c=0===a.closest(U).length;return i=e.isFunction(i)?i:function(){},r&&s&&c?(C.verbose("Triggering event",i),i(),!0):(C.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(t,n,i){if(n=void 0!==n?n:t,C.can.activate(e(i))){if(C.set.selected(n,e(i)),C.is.multiple()&&!C.is.allFiltered())return;C.hideAndClear()}},select:function(t,n,i){if(n=void 0!==n?n:t,C.can.activate(e(i))){if(C.set.value(n,t,e(i)),C.is.multiple()&&!C.is.allFiltered())return;C.hideAndClear()}},combo:function(t,n,i){n=void 0!==n?n:t,C.set.selected(n,e(i)),C.hideAndClear()},hide:function(e,t,n){C.set.value(t,e),C.hideAndClear()}},get:{id:function(){return w},defaultText:function(){return j.data(L.defaultText)},defaultValue:function(){return j.data(L.defaultValue)},placeholderText:function(){return"auto"!=k.placeholder&&"string"==typeof k.placeholder?k.placeholder:j.data(L.placeholderText)||""},text:function(){return N.text()},query:function(){return e.trim(z.val())},searchWidth:function(e){return e=void 0!==e?e:z.val(),P.text(e),Math.ceil(P.width()+1)},selectionCount:function(){var t=C.get.values();return C.is.multiple()?e.isArray(t)?t.length:0:""!==C.get.value()?1:0},transition:function(e){return"auto"==k.transition?C.is.upward(e)?"slide up":"slide down":k.transition},userValues:function(){var t=C.get.values();return!!t&&(t=e.isArray(t)?t:[t],e.grep(t,(function(e){return!1===C.get.item(e)})))},uniqueArray:function(t){return e.grep(t,(function(n,i){return e.inArray(n,t)===i}))},caretPosition:function(){var e,t,i=z.get(0);return"selectionStart"in i?i.selectionStart:n.selection?(i.focus(),t=(e=n.selection.createRange()).text.length,e.moveStart("character",-i.value.length),e.text.length-t):void 0},value:function(){var t=V.length>0?V.val():j.data(L.value),n=e.isArray(t)&&1===t.length&&""===t[0];return void 0===t||n?"":t},values:function(){var e=C.get.value();return""===e?"":!C.has.selectInput()&&C.is.multiple()?"string"==typeof e?e.split(k.delimiter):"":e},remoteValues:function(){var t=C.get.values(),n=!1;return t&&("string"==typeof t&&(t=[t]),e.each(t,(function(e,t){var i=C.read.remoteData(t);C.verbose("Restoring value from session data",i,t),i&&(n||(n={}),n[t]=i)}))),n},choiceText:function(t,n){if(n=void 0!==n?n:k.preserveHTML,t)return t.find(O.menu).length>0&&(C.verbose("Retrieving text of element with sub-menu"),(t=t.clone()).find(O.menu).remove(),t.find(O.menuIcon).remove()),void 0!==t.data(L.text)?t.data(L.text):n?e.trim(t.html()):e.trim(t.text())},choiceValue:function(t,n){return n=n||C.get.choiceText(t),!!t&&(void 0!==t.data(L.value)?String(t.data(L.value)):"string"==typeof n?e.trim(n.toLowerCase()):String(n))},inputEvent:function(){var e=z[0];return!!e&&(void 0!==e.oninput?"input":void 0!==e.onpropertychange?"propertychange":"keyup")},selectValues:function(){var t={values:[]};return j.find("option").each((function(){var n=e(this),i=n.html(),a=n.attr("disabled"),o=void 0!==n.attr("value")?n.attr("value"):i;"auto"===k.placeholder&&""===o?t.placeholder=i:t.values.push({name:i,value:o,disabled:a})})),k.placeholder&&"auto"!==k.placeholder&&(C.debug("Setting placeholder value to",k.placeholder),t.placeholder=k.placeholder),k.sortSelect?(t.values.sort((function(e,t){return e.name>t.name?1:-1})),C.debug("Retrieved and sorted values from select",t)):C.debug("Retrieved values from select",t),t},activeItem:function(){return K.filter("."+S.active)},selectedItem:function(){var e=K.not(O.unselectable).filter("."+S.selected);return e.length>0?e:K.eq(0)},itemWithAdditions:function(e){var t=C.get.item(e),n=C.create.userChoice(e);return n&&n.length>0&&(t=t.length>0?t.add(n):n),t},item:function(t,n){var i,a,o=!1;return t=void 0!==t?t:void 0!==C.get.values()?C.get.values():C.get.text(),i=a?t.length>0:null!=t,a=C.is.multiple()&&e.isArray(t),n=""===t||0===t||(n||!1),i&&K.each((function(){var i=e(this),r=C.get.choiceText(i),s=C.get.choiceValue(i,r);if(null!=s)if(a)-1===e.inArray(String(s),t)&&-1===e.inArray(r,t)||(o=o?o.add(i):i);else if(n){if(C.verbose("Ambiguous dropdown value using strict type check",i,t),s===t||r===t)return o=i,!0}else if(String(s)==String(t)||r==t)return C.verbose("Found select item by value",s,t),o=i,!0})),o}},check:{maxSelections:function(e){return!k.maxSelections||((e=void 0!==e?e:C.get.selectionCount())>=k.maxSelections?(C.debug("Maximum selection count reached"),k.useLabels&&(K.addClass(S.filtered),C.add.message(_.maxSelections)),!0):(C.verbose("No longer at maximum selection count"),C.remove.message(),C.remove.filteredItem(),C.is.searchSelection()&&C.filterItems(),!1))}},restore:{defaults:function(){C.clear(),C.restore.defaultText(),C.restore.defaultValue()},defaultText:function(){var e=C.get.defaultText();e===C.get.placeholderText?(C.debug("Restoring default placeholder text",e),C.set.placeholderText(e)):(C.debug("Restoring default text",e),C.set.text(e))},placeholderText:function(){C.set.placeholderText()},defaultValue:function(){var e=C.get.defaultValue();void 0!==e&&(C.debug("Restoring default value",e),""!==e?(C.set.value(e),C.set.selected()):(C.remove.activeItem(),C.remove.selectedItem()))},labels:function(){k.allowAdditions&&(k.useLabels||(C.error(I.labels),k.useLabels=!0),C.debug("Restoring selected values"),C.create.userLabels()),C.check.maxSelections()},selected:function(){C.restore.values(),C.is.multiple()?(C.debug("Restoring previously selected values and labels"),C.restore.labels()):C.debug("Restoring previously selected values")},values:function(){C.set.initialLoad(),k.apiSettings&&k.saveRemoteData&&C.get.remoteValues()?C.restore.remoteValues():C.set.selected(),C.remove.initialLoad()},remoteValues:function(){var t=C.get.remoteValues();C.debug("Recreating selected from session data",t),t&&(C.is.single()?e.each(t,(function(e,t){C.set.text(t)})):e.each(t,(function(e,t){C.add.label(e,t)})))}},read:{remoteData:function(e){var n;if(void 0!==t.Storage)return void 0!==(n=sessionStorage.getItem(e))&&n;C.error(I.noStorage)}},save:{defaults:function(){C.save.defaultText(),C.save.placeholderText(),C.save.defaultValue()},defaultValue:function(){var e=C.get.value();C.verbose("Saving default value as",e),j.data(L.defaultValue,e)},defaultText:function(){var e=C.get.text();C.verbose("Saving default text as",e),j.data(L.defaultText,e)},placeholderText:function(){var e;!1!==k.placeholder&&N.hasClass(S.placeholder)&&(e=C.get.text(),C.verbose("Saving placeholder text as",e),j.data(L.placeholderText,e))},remoteData:function(e,n){void 0!==t.Storage?(C.verbose("Saving remote data to session storage",n,e),sessionStorage.setItem(n,e)):C.error(I.noStorage)}},clear:function(){C.is.multiple()&&k.useLabels?C.remove.labels():(C.remove.activeItem(),C.remove.selectedItem()),C.set.placeholderText(),C.clearValue()},clearValue:function(){C.set.value("")},scrollPage:function(e,t){var n,i,a=t||C.get.selectedItem(),o=a.closest(O.menu),r=o.outerHeight(),s=o.scrollTop(),c=K.eq(0).outerHeight(),l=Math.floor(r/c),d=(o.prop("scrollHeight"),"up"==e?s-c*l:s+c*l),u=K.not(O.unselectable);i="up"==e?u.index(a)-l:u.index(a)+l,(n=("up"==e?i>=0:i<u.length)?u.eq(i):"up"==e?u.first():u.last()).length>0&&(C.debug("Scrolling page",e,n),a.removeClass(S.selected),n.addClass(S.selected),k.selectOnKeydown&&C.is.single()&&C.set.selectedItem(n),o.scrollTop(d))},set:{filtered:function(){var e=C.is.multiple(),t=C.is.searchSelection(),n=e&&t,i=t?C.get.query():"",a="string"==typeof i&&i.length>0,o=C.get.searchWidth(),r=""!==i;e&&a&&(C.verbose("Adjusting input width",o,k.glyphWidth),z.css("width",o)),a||n&&r?(C.verbose("Hiding placeholder text"),N.addClass(S.filtered)):(!e||n&&!r)&&(C.verbose("Showing placeholder text"),N.removeClass(S.filtered))},empty:function(){j.addClass(S.empty)},loading:function(){j.addClass(S.loading)},placeholderText:function(e){e=e||C.get.placeholderText(),C.debug("Setting placeholder text",e),C.set.text(e),N.addClass(S.placeholder)},tabbable:function(){C.is.searchSelection()?(C.debug("Added tabindex to searchable dropdown"),z.val("").attr("tabindex",0),U.attr("tabindex",-1)):(C.debug("Added tabindex to dropdown"),void 0===j.attr("tabindex")&&(j.attr("tabindex",0),U.attr("tabindex",-1)))},initialLoad:function(){C.verbose("Setting initial load"),p=!0},activeItem:function(e){k.allowAdditions&&e.filter(O.addition).length>0?e.addClass(S.filtered):e.addClass(S.active)},partialSearch:function(e){var t=C.get.query().length;z.val(e.substr(0,t))},scrollPosition:function(e,t){var n,i,a,o,r,s;n=(e=e||C.get.selectedItem()).closest(O.menu),i=e&&e.length>0,t=void 0!==t&&t,e&&n.length>0&&i&&(e.position().top,n.addClass(S.loading),a=(o=n.scrollTop())-n.offset().top+e.offset().top,t||(s=o+n.height()<a+5,r=a-5<o),C.debug("Scrolling to active item",a),(t||r||s)&&n.scrollTop(a),n.removeClass(S.loading))},text:function(e){"select"!==k.action&&("combo"==k.action?(C.debug("Changing combo button text",e,H),k.preserveHTML?H.html(e):H.text(e)):(e!==C.get.placeholderText()&&N.removeClass(S.placeholder),C.debug("Changing text",e,N),N.removeClass(S.filtered),k.preserveHTML?N.html(e):N.text(e)))},selectedItem:function(e){var t=C.get.choiceValue(e),n=C.get.choiceText(e,!1),i=C.get.choiceText(e,!0);C.debug("Setting user selection to item",e),C.remove.activeItem(),C.set.partialSearch(n),C.set.activeItem(e),C.set.selected(t,e),C.set.text(i)},selectedLetter:function(t){var n,i=K.filter("."+S.selected),a=i.length>0&&C.has.firstLetter(i,t),o=!1;a&&(n=i.nextAll(K).eq(0),C.has.firstLetter(n,t)&&(o=n)),o||K.each((function(){if(C.has.firstLetter(e(this),t))return o=e(this),!1})),o&&(C.verbose("Scrolling to next value with letter",t),C.set.scrollPosition(o),i.removeClass(S.selected),o.addClass(S.selected),C.aria.refreshDescendant(),k.selectOnKeydown&&C.is.single()&&C.set.selectedItem(o))},direction:function(e){"auto"==k.direction?(C.remove.upward(),C.can.openDownward(e)?C.remove.upward(e):C.set.upward(e),C.is.leftward(e)||C.can.openRightward(e)||C.set.leftward(e)):"upward"==k.direction&&C.set.upward(e)},upward:function(e){(e||j).addClass(S.upward)},leftward:function(e){(e||U).addClass(S.leftward)},value:function(e,t,n){var i=C.escape.value(e),a=V.length>0,o=C.get.values(),r=void 0!==e?String(e):e;if(a){if(!k.allowReselection&&r==o&&(C.verbose("Skipping value update already same value",e,o),!C.is.initialLoad()))return;C.is.single()&&C.has.selectInput()&&C.can.extendSelect()&&(C.debug("Adding user option",e),C.add.optionValue(e)),C.debug("Updating input value",i,o),Q=!0,V.val(i),!1===k.fireOnInit&&C.is.initialLoad()?C.debug("Input native change event ignored on initial load"):C.trigger.change(),Q=!1}else C.verbose("Storing value in metadata",i,V),i!==o&&j.data(L.value,r);!1===k.fireOnInit&&C.is.initialLoad()?C.verbose("No callback on initial load",k.onChange):k.onChange.call(X,e,t,n)},active:function(){j.addClass(S.active)},multiple:function(){j.addClass(S.multiple)},visible:function(){j.addClass(S.visible)},exactly:function(e,t){C.debug("Setting selected to exact values"),C.clear(),C.set.selected(e,t)},selected:function(t,n){var i=C.is.multiple();(n=k.allowAdditions?n||C.get.itemWithAdditions(t):n||C.get.item(t))&&(C.debug("Setting selected menu item to",n),C.is.multiple()&&C.remove.searchWidth(),C.is.single()?(C.remove.activeItem(),C.remove.selectedItem()):k.useLabels&&C.remove.selectedItem(),n.each((function(){var t=e(this),a=C.get.choiceText(t),o=C.get.choiceValue(t,a),r=t.hasClass(S.filtered),s=t.hasClass(S.active),c=t.hasClass(S.addition),l=i&&1==n.length;i?!s||c?(k.apiSettings&&k.saveRemoteData&&C.save.remoteData(a,o),k.useLabels?(C.add.label(o,a,l),C.add.value(o,a,t),C.set.activeItem(t),C.filterActive(),C.select.nextAvailable(n)):(C.add.value(o,a,t),C.set.text(C.add.variables(_.count)),C.set.activeItem(t))):r||(C.debug("Selected active value, removing label"),C.remove.selected(o)):(k.apiSettings&&k.saveRemoteData&&C.save.remoteData(a,o),C.set.text(a),C.set.value(o,a,t),t.addClass(S.active).addClass(S.selected))})))}},add:{label:function(t,n,i){var a,o=C.is.searchSelection()?z:N,r=C.escape.value(t);k.ignoreCase&&(r=r.toLowerCase()),a=e("<a />").addClass(S.label).attr("data-"+L.value,r).html(R.label(r,n)),a=k.onLabelCreate.call(a,r,n),C.has.label(t)?C.debug("User selection already exists, skipping",r):(k.label.variation&&a.addClass(k.label.variation),!0===i?(C.debug("Animating in label",a),a.addClass(S.hidden).insertBefore(o).transition(k.label.transition,k.label.duration)):(C.debug("Adding selection label",a),a.insertBefore(o)))},message:function(t){var n=U.children(O.message),i=k.templates.message(C.add.variables(t));n.length>0?n.html(i):n=e("<div/>").html(i).addClass(S.message).appendTo(U)},optionValue:function(t){var n=C.escape.value(t);V.find('option[value="'+C.escape.string(n)+'"]').length>0||(C.disconnect.selectObserver(),C.is.single()&&(C.verbose("Removing previous user addition"),V.find("option."+S.addition).remove()),e("<option/>").prop("value",n).addClass(S.addition).html(t).appendTo(V),C.verbose("Adding user addition as an <option>",t),C.observe.select())},userSuggestion:function(e){var t,n=U.children(O.addition),i=C.get.item(e),a=i&&i.not(O.addition).length,o=n.length>0;k.useLabels&&C.has.maxSelections()||(""===e||a?n.remove():(o?(n.data(L.value,e).data(L.text,e).attr("data-"+L.value,e).attr("data-"+L.text,e).removeClass(S.filtered),k.hideAdditions||(t=k.templates.addition(C.add.variables(_.addResult,e)),n.html(t)),C.verbose("Replacing user suggestion with new value",n)):((n=C.create.userChoice(e)).prependTo(U),C.verbose("Adding item choice to menu corresponding with user choice addition",n)),k.hideAdditions&&!C.is.allFiltered()||n.addClass(S.selected).siblings().removeClass(S.selected),C.refreshItems()))},variables:function(e,t){var n,i,a=-1!==e.search("{count}"),o=-1!==e.search("{maxCount}"),r=-1!==e.search("{term}");return C.verbose("Adding templated variables to message",e),a&&(n=C.get.selectionCount(),e=e.replace("{count}",n)),o&&(n=C.get.selectionCount(),e=e.replace("{maxCount}",k.maxSelections)),r&&(i=t||C.get.query(),e=e.replace("{term}",i)),e},value:function(t,n,i){var a,o=C.get.values();C.has.value(t)?C.debug("Value already selected"):""!==t?(e.isArray(o)?(a=o.concat([t]),a=C.get.uniqueArray(a)):a=[t],C.has.selectInput()?C.can.extendSelect()&&(C.debug("Adding value to select",t,a,V),C.add.optionValue(t)):(a=a.join(k.delimiter),C.debug("Setting hidden input to delimited value",a,V)),!1===k.fireOnInit&&C.is.initialLoad()?C.verbose("Skipping onadd callback on initial load",k.onAdd):k.onAdd.call(X,t,n,i),C.set.value(a,t,n,i),C.check.maxSelections()):C.debug("Cannot select blank values from multiselect")}},remove:{active:function(){j.removeClass(S.active)},activeLabel:function(){j.find(O.label).removeClass(S.active)},empty:function(){j.removeClass(S.empty)},loading:function(){j.removeClass(S.loading)},initialLoad:function(){p=!1},upward:function(e){(e||j).removeClass(S.upward)},leftward:function(e){(e||U).removeClass(S.leftward)},visible:function(){j.removeClass(S.visible)},activeItem:function(){K.removeClass(S.active)},filteredItem:function(){k.useLabels&&C.has.maxSelections()||(k.useLabels&&C.is.multiple()?K.not("."+S.active).removeClass(S.filtered):K.removeClass(S.filtered),C.remove.empty())},optionValue:function(e){var t=C.escape.value(e),n=V.find('option[value="'+C.escape.string(t)+'"]');n.length>0&&n.hasClass(S.addition)&&(y&&(y.disconnect(),C.verbose("Temporarily disconnecting mutation observer")),n.remove(),C.verbose("Removing user addition as an <option>",t),y&&y.observe(V[0],{childList:!0,subtree:!0}))},message:function(){U.children(O.message).remove()},searchWidth:function(){z.css("width","")},searchTerm:function(){C.verbose("Cleared search term"),z.val(""),C.set.filtered()},userAddition:function(){K.filter(O.addition).remove()},selected:function(t,n){if(!(n=k.allowAdditions?n||C.get.itemWithAdditions(t):n||C.get.item(t)))return!1;n.each((function(){var t=e(this),n=C.get.choiceText(t),i=C.get.choiceValue(t,n);C.is.multiple()?k.useLabels?(C.remove.value(i,n,t),C.remove.label(i)):(C.remove.value(i,n,t),0===C.get.selectionCount()?C.set.placeholderText():C.set.text(C.add.variables(_.count))):C.remove.value(i,n,t),t.removeClass(S.filtered).removeClass(S.active),k.useLabels&&t.removeClass(S.selected)}))},selectedItem:function(){K.removeClass(S.selected)},value:function(e,t,n){var i,a=C.get.values();C.has.selectInput()?(C.verbose("Input is <select> removing selected option",e),i=C.remove.arrayValue(e,a),C.remove.optionValue(e)):(C.verbose("Removing from delimited values",e),i=(i=C.remove.arrayValue(e,a)).join(k.delimiter)),!1===k.fireOnInit&&C.is.initialLoad()?C.verbose("No callback on initial load",k.onRemove):k.onRemove.call(X,e,t,n),C.set.value(i,t,n),C.check.maxSelections()},arrayValue:function(t,n){return e.isArray(n)||(n=[n]),n=e.grep(n,(function(e){return t!=e})),C.verbose("Removed value from delimited string",t,n),n},label:function(e,t){var n=j.find(O.label).filter("[data-"+L.value+'="'+C.escape.string(e)+'"]');C.verbose("Removing label",n),n.remove()},activeLabels:function(e){e=e||j.find(O.label).filter("."+S.active),C.verbose("Removing active label selections",e),C.remove.labels(e)},labels:function(t){t=t||j.find(O.label),C.verbose("Removing labels",t),t.each((function(){var t=e(this),n=t.data(L.value),i=void 0!==n?String(n):n,a=C.is.userValue(i);!1!==k.onLabelRemove.call(t,n)?(C.remove.message(),a?(C.remove.value(i),C.remove.label(i)):C.remove.selected(i)):C.debug("Label remove callback cancelled removal")}))},tabbable:function(){C.is.searchSelection()?(C.debug("Searchable dropdown initialized"),z.removeAttr("tabindex"),U.removeAttr("tabindex")):(C.debug("Simple selection dropdown initialized"),j.removeAttr("tabindex"),U.removeAttr("tabindex"))}},has:{menuSearch:function(){return C.has.search()&&z.closest(U).length>0},search:function(){return z.length>0},sizer:function(){return P.length>0},selectInput:function(){return V.is("select")},minCharacters:function(e){return!k.minCharacters||(e=String(void 0!==e?e:C.get.query())).length>=k.minCharacters},firstLetter:function(e,t){var n,i;return!(!e||0===e.length||"string"!=typeof t)&&(n=C.get.choiceText(e,!1),t=t.toLowerCase(),i=String(n).charAt(0).toLowerCase(),t==i)},input:function(){return V.length>0},items:function(){return K.length>0},menu:function(){return U.length>0},message:function(){return 0!==U.children(O.message).length},label:function(e){var t=C.escape.value(e),n=j.find(O.label);return k.ignoreCase&&(t=t.toLowerCase()),n.filter("[data-"+L.value+'="'+C.escape.string(t)+'"]').length>0},maxSelections:function(){return k.maxSelections&&C.get.selectionCount()>=k.maxSelections},allResultsFiltered:function(){var e=K.not(O.addition);return e.filter(O.unselectable).length===e.length},userSuggestion:function(){return U.children(O.addition).length>0},query:function(){return""!==C.get.query()},value:function(e){return k.ignoreCase?C.has.valueIgnoringCase(e):C.has.valueMatchingCase(e)},valueMatchingCase:function(t){var n=C.get.values();return!!(e.isArray(n)?n&&-1!==e.inArray(t,n):n==t)},valueIgnoringCase:function(t){var n=C.get.values(),i=!1;return e.isArray(n)||(n=[n]),e.each(n,(function(e,n){if(String(t).toLowerCase()==String(n).toLowerCase())return i=!0,!1})),i}},is:{active:function(){return j.hasClass(S.active)},animatingInward:function(){return U.transition("is inward")},animatingOutward:function(){return U.transition("is outward")},bubbledLabelClick:function(t){return e(t.target).is("select, input")&&j.closest("label").length>0},bubbledIconClick:function(t){return e(t.target).closest(B).length>0},alreadySetup:function(){return j.is("select")&&void 0!==j.parent(O.dropdown).data(F)&&0===j.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):U.transition&&U.transition("is animating")},leftward:function(e){return(e||U).hasClass(S.leftward)},disabled:function(){return j.hasClass(S.disabled)},focused:function(){return n.activeElement===j[0]},focusedOnSearch:function(){return n.activeElement===z[0]},allFiltered:function(){return(C.is.multiple()||C.has.search())&&!(0==k.hideAdditions&&C.has.userSuggestion())&&!C.has.message()&&C.has.allResultsFiltered()},hidden:function(e){return!C.is.visible(e)},initialLoad:function(){return p},inObject:function(t,n){var i=!1;return e.each(n,(function(e,n){if(n==t)return i=!0,!0})),i},multiple:function(){return j.hasClass(S.multiple)},remote:function(){return k.apiSettings&&C.can.useAPI()},single:function(){return!C.is.multiple()},selectMutation:function(t){var n=!1;return e.each(t,(function(t,i){if(i.target&&e(i.target).is("select"))return n=!0,!0})),n},search:function(){return j.hasClass(S.search)},searchSelection:function(){return C.has.search()&&1===z.parent(O.dropdown).length},selection:function(){return j.hasClass(S.selection)},userValue:function(t){return-1!==e.inArray(t,C.get.userValues())},upward:function(e){return(e||j).hasClass(S.upward)},visible:function(e){return e?e.hasClass(S.visible):U.hasClass(S.visible)},verticallyScrollableContext:function(){var e=M.get(0)!==t&&M.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=M.get(0)!==t&&M.css("overflow-X");return"auto"==e||"scroll"==e}},can:{activate:function(e){return!!k.useLabels||(!C.has.maxSelections()||!(!C.has.maxSelections()||!e.hasClass(S.active)))},openDownward:function(e){var n,i,a=e||U,o=!0;return a.addClass(S.loading),i={context:{offset:M.get(0)===t?{top:0,left:0}:M.offset(),scrollTop:M.scrollTop(),height:M.outerHeight()},menu:{offset:a.offset(),height:a.outerHeight()}},C.is.verticallyScrollableContext()&&(i.menu.offset.top+=i.context.scrollTop),(n={above:i.context.scrollTop<=i.menu.offset.top-i.context.offset.top-i.menu.height,below:i.context.scrollTop+i.context.height>=i.menu.offset.top-i.context.offset.top+i.menu.height}).below?(C.verbose("Dropdown can fit in context downward",n),o=!0):n.below||n.above?(C.verbose("Dropdown cannot fit below, opening upward",n),o=!1):(C.verbose("Dropdown cannot fit in either direction, favoring downward",n),o=!0),a.removeClass(S.loading),o},openRightward:function(e){var n,i,a=e||U,o=!0;return a.addClass(S.loading),i={context:{offset:M.get(0)===t?{top:0,left:0}:M.offset(),scrollLeft:M.scrollLeft(),width:M.outerWidth()},menu:{offset:a.offset(),width:a.outerWidth()}},C.is.horizontallyScrollableContext()&&(i.menu.offset.left+=i.context.scrollLeft),(n=i.menu.offset.left-i.context.offset.left+i.menu.width>=i.context.scrollLeft+i.context.width)&&(C.verbose("Dropdown cannot fit in context rightward",n),o=!1),a.removeClass(S.loading),o},click:function(){return c||"click"==k.on},extendSelect:function(){return k.allowAdditions||k.apiSettings},show:function(){return!C.is.disabled()&&(C.has.items()||C.has.message())},useAPI:function(){return void 0!==e.fn.api}},animate:{show:function(t,n){var i,a=n||U,o=n?function(){}:function(){C.hideSubMenus(),C.hideOthers(),C.set.active()};t=e.isFunction(t)?t:function(){},C.verbose("Doing menu show animation",a),C.set.direction(n),i=C.get.transition(n),C.is.selection()&&C.set.scrollPosition(C.get.selectedItem(),!0),(C.is.hidden(a)||C.is.animating(a))&&("none"==i?(o(),a.transition("show"),t.call(X)):void 0!==e.fn.transition&&j.transition("is supported")?a.transition({animation:i+" in",debug:k.debug,verbose:k.verbose,duration:k.duration,queue:!0,onStart:o,onComplete:function(){t.call(X)}}):C.error(I.noTransition,i))},hide:function(t,n){var i=n||U,a=(n?k.duration:k.duration,n?function(){}:function(){C.can.click()&&C.unbind.intent(),C.remove.active()}),o=C.get.transition(n);t=e.isFunction(t)?t:function(){},(C.is.visible(i)||C.is.animating(i))&&(C.verbose("Doing menu hide animation",i),"none"==o?(a(),i.transition("hide"),t.call(X)):void 0!==e.fn.transition&&j.transition("is supported")?i.transition({animation:o+" out",duration:k.duration,debug:k.debug,verbose:k.verbose,queue:!1,onStart:a,onComplete:function(){t.call(X)}}):C.error(I.transition))}},hideAndClear:function(){C.remove.searchTerm(),C.has.maxSelections()||(C.has.search()?C.hide((function(){C.remove.filteredItem()})):C.hide())},delay:{show:function(){C.verbose("Delaying show event to ensure user intent"),clearTimeout(C.timer),C.timer=setTimeout(C.show,k.delay.show)},hide:function(){C.verbose("Delaying hide event to ensure user intent"),clearTimeout(C.timer),C.timer=setTimeout(C.hide,k.delay.hide)}},escape:{value:function(t){var n=e.isArray(t),i="string"==typeof t,a=!i&&!n,o=i&&-1!==t.search(D.quote),r=[];return a||!o?t:(C.debug("Encoding quote values for use in select",t),n?(e.each(t,(function(e,t){r.push(t.replace(D.quote,"&quot;"))})),r):t.replace(D.quote,"&quot;"))},string:function(e){return(e=String(e)).replace(D.escape,"\\$&")}},setting:function(t,n){if(C.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,k,t);else{if(void 0===n)return k[t];e.isPlainObject(k[t])?e.extend(!0,k[t],n):k[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,C,t);else{if(void 0===n)return C[t];C[t]=n}},debug:function(){!k.silent&&k.debug&&(k.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,k.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!k.silent&&k.verbose&&k.debug&&(k.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,k.name+":"),C.verbose.apply(console,arguments)))},error:function(){k.silent||(C.error=Function.prototype.bind.call(console.error,console,k.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var t,n;k.performance&&(n=(t=(new Date).getTime())-(l||t),l=t,d.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:X,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){var t=k.name+":",n=0;l=!1,clearTimeout(C.performance.timer),e.each(d,(function(e,t){n+=t["Execution Time"]})),t+=" "+n+"ms",s&&(t+=" '"+s+"'"),(void 0!==console.group||void 0!==console.table)&&d.length>0&&(console.groupCollapsed(t),console.table?console.table(d):e.each(d,(function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")})),console.groupEnd()),d=[]}},invoke:function(t,n,i){var o,r,s,c=G;return n=n||f,i=X||i,"string"==typeof t&&void 0!==c&&(t=t.split(/[\. ]/),o=t.length-1,e.each(t,(function(n,i){var a=n!=o?i+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=o)c=c[a];else{if(void 0!==c[a])return r=c[a],!1;if(!e.isPlainObject(c[i])||n==o)return void 0!==c[i]?(r=c[i],!1):(C.error(I.method,t),!1);c=c[i]}}))),e.isFunction(r)?s=r.apply(i,n):void 0!==r&&(s=r),e.isArray(a)?a.push(s):void 0!==a?a=[a,s]:void 0!==s&&(a=s),r}},h?(void 0===G&&C.initialize(),C.invoke(u)):(void 0!==G&&G.invoke("destroy"),C.initialize())})),void 0!==a?a:o},e.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:t,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onLabelSelect:function(e){},onLabelCreate:function(t,n){return e(this)},onLabelRemove:function(e){return!0},onNoResults:function(e){return!0},onShow:function(){},onHide:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>"},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",value:"value",text:"text"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> input.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered"},className:{active:"active",addition:"addition",animating:"animating",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",upward:"upward",leftward:"left",visible:"visible"}},e.fn.dropdown.settings.templates={dropdown:function(t){var n=t.placeholder||!1,i=(t.values,"");return i+='<i class="dropdown icon"></i>',t.placeholder?i+='<div class="default text">'+n+"</div>":i+='<div class="text"></div>',i+='<div class="menu">',e.each(t.values,(function(e,t){i+=t.disabled?'<div class="disabled item" data-value="'+t.value+'">'+t.name+"</div>":'<div class="item" data-value="'+t.value+'">'+t.name+"</div>"})),i+="</div>"},menu:function(t,n){var i=t[n.values]||{},a="";return e.each(i,(function(e,t){var i=t[n.text]?'data-text="'+t[n.text]+'"':"",o=t[n.disabled]?"disabled ":"";a+='<div class="'+o+'item" data-value="'+t[n.value]+'"'+i+">",a+=t[n.name],a+="</div>"})),a},label:function(e,t){return t+'<i class="delete icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document)},function(e,t,n){"use strict";n.r(t);n(3);var i=n(0),a=n.n(i),o=n(1),r=n.n(o);$((function(){var e,t,i,o,s;return a.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:if(e=document.getElementById("graph-canvas")){c.next=3;break}return c.abrupt("return");case 3:return c.next=5,a.a.awrap(Promise.all([n.e(0).then(n.bind(null,13)),n.e(0).then(n.t.bind(null,14,7))]));case 5:t=c.sent,i=r()(t,1),o=i[0].default,s=[],$("#graph-raw-list li span.node-relation").each((function(){s.push($(this).text())})),o(e,s);case 11:case"end":return c.stop()}}))}));var s,c,l,d,u;n(8);function h(e){return jQuery("<div />").text(e).html()}function f(e){var t=e.find(".tabular.menu");t.find(".item").tab(),t.find('.item[data-tab="'.concat(t.data("preview"),'"]')).click((function(){var n=$(this);$.post(n.data("url"),{_csrf:s,mode:"gfm",context:n.data("context"),text:e.find('.tab.segment[data-tab="'.concat(t.data("write"),'"] textarea')).val()},(function(n){var i=e.find('.tab.segment[data-tab="'.concat(t.data("preview"),'"]'));i.html(n),emojify.run(i[0]),$("pre code",i[0]).each((function(){hljs.highlightBlock(this)}))}))})),S()}function m(){var e,t;0!==$(".edit.form").length&&(!function(e){var t=e.find(".tabular.menu");t.find(".item").tab();var n=t.find('.item[data-tab="'.concat(t.data("preview"),'"]'));n.length&&(l=n.data("preview-file-modes").split(","),n.click((function(){var n=$(this);$.post(n.data("url"),{_csrf:s,mode:"gfm",context:n.data("context"),text:e.find('.tab.segment[data-tab="'.concat(t.data("write"),'"] textarea')).val()},(function(n){var i=e.find('.tab.segment[data-tab="'.concat(t.data("preview"),'"]'));i.html(n),emojify.run(i[0]),$("pre code",i[0]).each((function(){hljs.highlightBlock(this)}))}))})))}($(".edit.form")),e=$(".edit.form"),(t=e.find(".tabular.menu")).find(".item").tab(),t.find('.item[data-tab="'.concat(t.data("diff"),'"]')).click((function(){var n=$(this);$.post(n.data("url"),{_csrf:s,context:n.data("context"),content:e.find('.tab.segment[data-tab="'.concat(t.data("write"),'"] textarea')).val()},(function(n){var i=e.find('.tab.segment[data-tab="'.concat(t.data("diff"),'"]'));i.html(n),emojify.run(i[0])}))})))}function v(e,t,n,i){return new Promise((function(a){$.ajax({type:"POST",url:e,data:{_csrf:s,action:t,issue_ids:n,id:i},success:a})}))}function p(){window.location.reload()}function g(e){e.each((function(){var e=this;e.addEventListener("paste",(function(t){!function(e,t){if(e.clipboardData){var n=e.clipboardData.items;if(void 0!==n)for(var i=0;i<n.length;i++)if(-1!==n[i].type.indexOf("image")){var a=n[i].getAsFile();"function"==typeof t&&(e.preventDefault(),e.stopPropagation(),t(a))}}}(t,(function(t){var n=t.name.substr(0,t.name.lastIndexOf("."));!function(e,t){if(e.selectionStart||0===e.selectionStart){var n=e.selectionStart,i=e.selectionEnd;e.value=e.value.substring(0,n)+t+e.value.substring(i,e.value.length),e.selectionStart=n+t.length,e.selectionEnd=n+t.length}else e.value+=t}(e,"![".concat(n,"]()")),function(e,t){var n=new XMLHttpRequest;n.onload=function(){200===n.status&&t(n.responseText)},n.open("post","".concat(c,"/attachments"),!0),n.setRequestHeader("X-Csrf-Token",s);var i=new FormData;i.append("file",e,e.name),n.send(i)}(t,(function(t){var i=JSON.parse(t);!function(e,t,n){if(e.selectionStart||0===e.selectionStart){var i=e.selectionStart,a=e.selectionEnd;e.value=e.value.replace(t,n),e.selectionStart=i+n.length-t.length,e.selectionEnd=a+n.length-t.length}else e.value=e.value.replace(t,n)}(e,"![".concat(n,"]()"),"![".concat(n,"](").concat(c,"/attachments/").concat(i.uuid,")"));var a=$('<input id="'.concat(i.uuid,'" name="files" type="hidden">')).val(i.uuid);$(".files").append(a)}))}))}),!1)}))}function b(){var e;0!==$(".comment.form").length&&((e=$(".ui.select-branch")).find(".reference-list-menu").find(".item:not(.no-select)").click((function(){var t=$(this).data("id");$($(this).data("id-selector")).val(t),e.find(".ui .branch-name").text(t)})),e.find(".reference.column").click((function(){return e.find(".scrolling.reference-list-menu").css("display","none"),e.find(".reference .text").removeClass("black"),$($(this).data("target")).css("display","block"),$(this).find(".text").addClass("black"),!1})),f($(".comment.form")),g($(".comment.form textarea")),t("select-label","labels"),t("select-assignees","assignees"),t("select-assignees-modify","assignees"),n(".select-milestone","#milestone_id"),n(".select-assignee","#assignee_id"));function t(e,t){var n=$(".ui.".concat(t,".list")),i=n.find(".no-select"),a=$(".".concat(e," .menu")),o="update"===a.data("action"),r={};$(".".concat(e)).dropdown("setting","onHide",(function(){if(o="update"===a.data("action")){var e=[];Object.keys(r).forEach((function(t){var n=r[t],i=v(n["update-url"],n.action,n["issue-id"],t);e.push(i)})),Promise.all(e).then(p)}})),a.find(".item:not(.no-select)").click((function(){if("select-assignees-modify"===e)return $(this).hasClass("checked")?($(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check")):($(this).addClass("checked"),$(this).find(".octicon").addClass("octicon-check")),v(a.data("update-url"),"",a.data("issue-id"),$(this).data("id")),a.data("action","update"),!1;$(this).hasClass("checked")?($(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check"),o&&($(this).data("id")in r?delete r[$(this).data("id")]:r[$(this).data("id")]={"update-url":a.data("update-url"),action:"detach","issue-id":a.data("issue-id")})):($(this).addClass("checked"),$(this).find(".octicon").addClass("octicon-check"),o&&($(this).data("id")in r?delete r[$(this).data("id")]:r[$(this).data("id")]={"update-url":a.data("update-url"),action:"attach","issue-id":a.data("issue-id")}));var t=[];return $(this).parent().find(".item").each((function(){$(this).hasClass("checked")?(t.push($(this).data("id")),$($(this).data("id-selector")).removeClass("hide")):$($(this).data("id-selector")).addClass("hide")})),0===t.length?i.removeClass("hide"):i.addClass("hide"),$($(this).parent().data("id")).val(t.join(",")),!1})),a.find(".no-select.item").click((function(){(o||"select-assignees-modify"===e)&&v(a.data("update-url"),"clear",a.data("issue-id"),"").then(p),$(this).parent().find(".item").each((function(){$(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check")})),n.find(".item").each((function(){$(this).addClass("hide")})),i.removeClass("hide"),$($(this).parent().data("id")).val("")}))}function n(e,t){var n=$("".concat(e," .menu")),i=$(".ui".concat(e,".list")),a="update"===n.data("action");n.find(".item:not(.no-select)").click((function(){switch($(this).parent().find(".item").each((function(){$(this).removeClass("selected active")})),$(this).addClass("selected active"),a&&v(n.data("update-url"),"",n.data("issue-id"),$(this).data("id")).then(p),t){case"#milestone_id":i.find(".selected").html('<a class="item" href='.concat($(this).data("href"),">").concat(h($(this).text()),"</a>"));break;case"#assignee_id":i.find(".selected").html('<a class="item" href='.concat($(this).data("href"),">")+'<img class="ui avatar image" src='.concat($(this).data("avatar"),">").concat(h($(this).text()),"</a>"))}$(".ui".concat(e,".list .no-select")).addClass("hide"),$(t).val($(this).data("id"))})),n.find(".no-select.item").click((function(){$(this).parent().find(".item:not(.no-select)").each((function(){$(this).removeClass("selected active")})),a&&v(n.data("update-url"),"",n.data("issue-id"),$(this).data("id")).then(p),i.find(".selected").html(""),i.find(".no-select").removeClass("hide"),$(t).val("")}))}}function w(){if(0!==$(".repository").length){if(($(".repository.file.list").length>0||".repository.commits".length>0)&&$(".choose.reference .dropdown").each((function(){var e=$(this).find(".data"),t={items:[],mode:e.data("mode"),searchTerm:"",noResults:"",canCreateBranch:!1,menuVisible:!1,active:0};e.find(".item").each((function(){t.items.push({name:$(this).text(),url:$(this).data("url"),branch:$(this).hasClass("branch"),tag:$(this).hasClass("tag"),selected:$(this).hasClass("selected")})})),e.remove(),new Vue({delimiters:["${","}"],el:this,data:t,beforeMount:function(){var e=this;this.noResults=e.$el.getAttribute("data-no-results"),this.canCreateBranch="true"===e.$el.getAttribute("data-can-create-branch"),document.body.addEventListener("click",(function(t){e.$el.contains(t.target)||e.menuVisible&&Vue.set(e,"menuVisible",!1)}))},watch:{menuVisible:function(e){e&&this.focusSearchField()}},computed:{filteredItems:function(){var e=this,t=e.items.filter((function(t){return("branches"===e.mode&&t.branch||"tags"===e.mode&&t.tag)&&(!e.searchTerm||t.name.toLowerCase().indexOf(e.searchTerm.toLowerCase())>=0)}));return e.active=0===t.length&&e.showCreateNewBranch?0:-1,t},showNoResults:function(){return 0===this.filteredItems.length&&!this.showCreateNewBranch},showCreateNewBranch:function(){var e=this;return!(!this.canCreateBranch||!e.searchTerm||"tags"===e.mode)&&0===e.items.filter((function(t){return t.name.toLowerCase()===e.searchTerm.toLowerCase()})).length}},methods:{selectItem:function(e){var t=this.getSelected();null!==t&&(t.selected=!1),e.selected=!0,window.location.href=e.url},createNewBranch:function(){this.showCreateNewBranch&&this.$refs.newBranchForm.submit()},focusSearchField:function(){var e=this;Vue.nextTick((function(){e.$refs.searchField.focus()}))},getSelected:function(){for(var e=0,t=this.items.length;e<t;++e)if(this.items[e].selected)return this.items[e];return null},getSelectedIndexInFiltered:function(){for(var e=0,t=this.filteredItems.length;e<t;++e)if(this.filteredItems[e].selected)return e;return-1},scrollToActive:function(){var e=this.$refs["listItem".concat(this.active)];if(e&&0!==e.length){Array.isArray(e)&&(e=e[0]);var t=this.$refs.scrollContainer;e.offsetTop<t.scrollTop?t.scrollTop=e.offsetTop:e.offsetTop+e.clientHeight>t.scrollTop+t.clientHeight&&(t.scrollTop=e.offsetTop+e.clientHeight-t.clientHeight)}},keydown:function(e){var t=this;if(40===e.keyCode){if(e.preventDefault(),-1===t.active&&(t.active=t.getSelectedIndexInFiltered()),t.active+(t.showCreateNewBranch?0:1)>=t.filteredItems.length)return;t.active++,t.scrollToActive()}if(38===e.keyCode){if(e.preventDefault(),-1===t.active&&(t.active=t.getSelectedIndexInFiltered()),t.active<=0)return;t.active--,t.scrollToActive()}13===e.keyCode&&(e.preventDefault(),t.active>=t.filteredItems.length?t.createNewBranch():t.active>=0&&t.selectItem(t.filteredItems[t.active])),27===e.keyCode&&(e.preventDefault(),t.menuVisible=!1)}}})})),$(".repository.wiki.view").length>0&&l(".choose.page .dropdown"),$(".repository.settings.options").length>0&&($("#repo_name").keyup((function(){var e=$("#repo-name-change-prompt");$(this).val().toString().toLowerCase()!==$(this).data("name").toString().toLowerCase()?e.show():e.hide()})),$(".enable-system").change((function(){this.checked?($($(this).data("target")).removeClass("disabled"),$(this).data("context")||$($(this).data("context")).addClass("disabled")):($($(this).data("target")).addClass("disabled"),$(this).data("context")||$($(this).data("context")).removeClass("disabled"))})),$(".enable-system-radio").change((function(){"false"===this.value?($($(this).data("target")).addClass("disabled"),void 0!==$(this).data("context")&&$($(this).data("context")).removeClass("disabled")):"true"===this.value&&($($(this).data("target")).removeClass("disabled"),void 0!==$(this).data("context")&&$($(this).data("context")).addClass("disabled"))}))),$(".repository.labels").length>0){var e=$(".new-label.segment");$(".new-label.button").click((function(){e.show()})),$(".new-label.segment .cancel").click((function(){e.hide()})),$(".color-picker").each((function(){$(this).minicolors()})),$(".precolors .color").click((function(){var e=$(this).data("color-hex");$(".color-picker").val(e),$(".minicolors-swatch-color").css("background-color",e)})),$(".edit-label-button").click((function(){return $("#label-modal-id").val($(this).data("id")),$(".edit-label .new-label-input").val($(this).data("title")),$(".edit-label .new-label-desc-input").val($(this).data("description")),$(".edit-label .color-picker").val($(this).data("color")),$(".minicolors-swatch-color").css("background-color",$(this).data("color")),$(".edit-label.modal").modal({onApprove:function(){$(".edit-label.form").submit()}}).modal("show"),!1}))}if($(".repository.new.milestone").length>0){var t=$(".milestone.datepicker");t.datetimepicker({lang:t.data("lang"),inline:!0,timepicker:!1,startDate:t.data("start-date"),formatDate:"Y-m-d",onSelectDate:function(e){$("#deadline").val(e.dateFormat("Y-m-d"))}}),$("#clear-date").click((function(){return $("#deadline").val(""),!1}))}if($(".repository.view.issue").length>0){var n=$("#issue-title"),i=$("#edit-title-input input"),a=function(){return n.toggle(),$(".not-in-edit").toggle(),$("#edit-title-input").toggle(),$(".in-edit").toggle(),i.focus(),!1};$("#edit-title").click(a),$("#cancel-edit-title").click(a),$("#save-edit-title").click(a).click((function(){return 0===i.val().length||i.val()===n.text()?(i.val(n.text()),!1):($.post($(this).data("update-url"),{_csrf:s,title:i.val()},(function(e){i.val(e.title),n.text(e.title),p()})),!1)})),$(".context-dropdown").dropdown({action:"hide"}),$(".quote-reply").click((function(e){$(this).closest(".dropdown").find(".menu").toggle("visible");var t,n=$(this).data("target");if($(this).hasClass("quote-reply-diff")){var i=$(this).closest(".comment-code-cloud");i.find("button.comment-form-reply").click(),t=i.find('[name="content"]')}else t=$("#content");var a=$("#comment-".concat(n)).text().replace(/\n/g,"\n> "),o="> ".concat(a,"\n\n");""!==t.val()?t.val("".concat(t.val(),"\n\n").concat(o)):t.val("".concat(o)),t.focus(),e.preventDefault()})),$(".edit-content").click((function(e){$(this).closest(".dropdown").find(".menu").toggle("visible");var t,n=$(this).closest(".header").next(),i=n.find(".edit-content-zone"),a=n.find(".render-content"),o=n.find(".raw-content");if(0===i.html().length){i.html($("#edit-content-form").html()),t=i.find("textarea"),issuesTribute.attach(t.get()),emojiTribute.attach(t.get());var r=i.find(".dropzone");r.data("saved",!1);var c=i.find(".comment-files");if(r.length>0){var l={};r.dropzone({url:r.data("upload-url"),headers:{"X-Csrf-Token":s},maxFiles:r.data("max-file"),maxFilesize:r.data("max-size"),acceptedFiles:"*/*"===r.data("accepts")?null:r.data("accepts"),addRemoveLinks:!0,dictDefaultMessage:r.data("default-message"),dictInvalidFileType:r.data("invalid-input-type"),dictFileTooBig:r.data("file-too-big"),dictRemoveFile:r.data("remove-file"),init:function(){this.on("success",(function(e,t){l[e.name]={uuid:t.uuid,submitted:!1};var n=$('<input id="'.concat(t.uuid,'" name="files" type="hidden">')).val(t.uuid);c.append(n)})),this.on("removedfile",(function(e){e.name in l&&($("#".concat(l[e.name].uuid)).remove(),r.data("remove-url")&&r.data("csrf")&&!l[e.name].submitted&&$.post(r.data("remove-url"),{file:l[e.name].uuid,_csrf:r.data("csrf")}))})),this.on("submit",(function(){$.each(l,(function(e){l[e].submitted=!0}))})),this.on("reload",(function(){$.getJSON(i.data("attachment-url"),(function(e){var t=r.get(0).dropzone;t.removeAllFiles(!0),c.empty(),$.each(e,(function(){var e="".concat(r.data("upload-url"),"/").concat(this.uuid);t.emit("addedfile",this),t.emit("thumbnail",this,e),t.emit("complete",this),t.files.push(this),l[this.name]={submitted:!0,uuid:this.uuid},r.find("img[src='".concat(e,"']")).css("max-width","100%");var n=$('<input id="'.concat(this.uuid,'" name="files" type="hidden">')).val(this.uuid);c.append(n)}))}))}))}}),r.get(0).dropzone.emit("reload")}var d=i.find(".ui.comment.form"),u=d.find(".tabular.menu");u.attr("data-write",i.data("write")),u.attr("data-preview",i.data("preview")),u.find(".write.item").attr("data-tab",i.data("write")),u.find(".preview.item").attr("data-tab",i.data("preview")),d.find(".write.segment").attr("data-tab",i.data("write")),d.find(".preview.segment").attr("data-tab",i.data("preview")),f(d),i.find(".cancel.button").click((function(){a.show(),i.hide(),r.get(0).dropzone.emit("reload")})),i.find(".save.button").click((function(){a.show(),i.hide();var e=c.find("[name=files]").map((function(){return $(this).val()})).get();$.post(i.data("update-url"),{_csrf:s,content:t.val(),context:i.data("context"),files:e},(function(e){0===e.length?a.html($("#no-content").html()):(a.html(e.content),emojify.run(a[0]),$("pre code",a[0]).each((function(){hljs.highlightBlock(this)})));var t=n.parent();t.find(".ui.small.images").length?""===e.attachments?t.find(".ui.small.images").parent().remove():t.find(".ui.small.images").html(e.attachments):""!==e.attachments&&(t.append('<div class="ui bottom attached segment"><div class="ui small images"></div></div>'),t.find(".ui.small.images").html(e.attachments)),r.get(0).dropzone.emit("submit"),r.get(0).dropzone.emit("reload")}))}))}else t=n.find("textarea");i.show(),a.hide(),0===t.val().length&&t.val(o.text()),t.focus(),e.preventDefault()})),$(".delete-comment").click((function(){var e=$(this);return window.confirm(e.data("locale"))&&$.post(e.data("url"),{_csrf:s}).success((function(){$("#".concat(e.data("comment-id"))).remove()})),!1}));var o=$("#status-button");$("#comment-form .edit_area").keyup((function(){0===$(this).val().length?o.text(o.data("status")):o.text(o.data("status-and-comment"))})),o.click((function(){$("#status").val(o.data("status-val")),$("#comment-form").submit()}));var r=$(".merge-button > button");r.on("click",(function(e){e.preventDefault(),$(".".concat($(this).data("do"),"-fields")).show(),$(this).parent().hide()})),$(".merge-button > .dropdown").dropdown({onChange:function(e,t,n){n.data("do")&&(r.find(".button-text").text(n.text()),r.data("do",n.data("do")))}}),$(".merge-cancel").on("click",(function(e){e.preventDefault(),$(this).closest(".form").hide(),r.parent().show()})),function e(t){var n="";t||(t=$(document),n=".reactions > "),t.find("".concat(n,"a.label")).popup({position:"bottom left",metadata:{content:"title",title:"none"}}),t.find(".select-reaction > .menu > .item, ".concat(n,"a.label")).on("click",(function(t){var n=this;if(t.preventDefault(),!$(this).hasClass("disabled")){var i=$(this).hasClass("item")?$(this).closest(".select-reaction").data("action-url"):$(this).data("action-url"),a="".concat(i,"/").concat($(this).hasClass("blue")?"unreact":"react");$.ajax({type:"POST",url:a,data:{_csrf:s,content:$(this).data("content")}}).done((function(t){if(t&&(t.html||t.empty)){var i=$(n).closest(".content"),a=i.find(".segment.reactions");if(!t.empty&&a.length>0&&a.remove(),!t.empty){a=$('<div class="ui attached segment reactions"></div>');var o=i.find(".segment.bottom:first");o.length>0?a.insertBefore(o):a.appendTo(i),a.html(t.html);for(var r=a.find(".has-emoji"),s=0;s<r.length;s++)emojify.run(r.get(s));a.find(".dropdown").dropdown(),e(a)}}}))}}))}()}$(".repository.diff").length>0&&$(".diff-counter").each((function(){var e=$(this),t=e.find("span[data-line].add").data("line"),n=e.find("span[data-line].del").data("line"),i=parseFloat(t)/(parseFloat(t)+parseFloat(n))*100;e.find(".bar .add").css("width","".concat(i,"%"))})),$("#repo-clone-ssh").click((function(){$(".clone-url").text($(this).data("link")),$("#repo-clone-url").val($(this).data("link")),$(this).addClass("blue"),$("#repo-clone-https").removeClass("blue"),localStorage.setItem("repo-clone-protocol","ssh")})),$("#repo-clone-https").click((function(){$(".clone-url").text($(this).data("link")),$("#repo-clone-url").val($(this).data("link")),$(this).addClass("blue"),$("#repo-clone-ssh").removeClass("blue"),localStorage.setItem("repo-clone-protocol","https")})),$("#repo-clone-url").click((function(){$(this).select()}));var c=$(".repository.compare.pull");c.length>0&&(l(".choose.branch .dropdown"),c.find("button.show-form").on("click",(function(e){e.preventDefault(),c.find(".pullrequest-form").show(),$(this).parent().hide()}))),$(".repository.settings.branches").length>0&&(l(".protected-branches .dropdown"),$(".enable-protection, .enable-whitelist").change((function(){this.checked?$($(this).data("target")).removeClass("disabled"):$($(this).data("target")).addClass("disabled")})))}function l(e){var t=$(e);t.dropdown({fullTextSearch:!0,selectOnKeydown:!1,onChange:function(e,t,n){n.data("url")&&(window.location.href=n.data("url"))},message:{noResults:t.data("no-results")}})}}function y(e){var t=Math.floor(Math.random()*Math.floor(1e6));return e.attr("data-write",e.attr("data-write")+t),e.attr("data-preview",e.attr("data-preview")+t),e.find(".item").each((function(){var e=$(this).attr("data-tab")+t;$(this).attr("data-tab",e)})),e.parent().find("*[data-tab='write']").attr("data-tab","write".concat(t)),e.parent().find("*[data-tab='preview']").attr("data-tab","preview".concat(t)),f(e.parent(".form")),t}function x(){$(".access-mode.menu .item").click((function(){var e=$(this).parent();$.post(e.data("url"),{_csrf:s,uid:e.data("uid"),mode:$(this).data("value")})}))}function C(){$(".js-quick-pull-choice-option").change((function(){"commit-to-new-branch"===$(this).val()?($(".quick-pull-branch-name").show(),$(".quick-pull-branch-name input").prop("required",!0)):($(".quick-pull-branch-name").hide(),$(".quick-pull-branch-name input").prop("required",!1)),$("#commit-button").text($(this).attr("button_text"))}));var e=$("#file-name");e.keyup((function(e){var t,n,i=$(".breadcrumb span.section"),a=$(".breadcrumb div.divider");if(8===e.keyCode&&0===$(this).getCursorPosition()&&i.length>0&&(t=i.last().find("a").text(),$(this).val(t+$(this).val()),$(this)[0].setSelectionRange(t.length,t.length),i.last().remove(),a.last().remove()),191===e.keyCode){n=$(this).val().split("/");for(var o=0;o<n.length;++o)t=n[o],o<n.length-1?t.length&&($('<span class="section"><a href="#">'.concat(t,"</a></span>")).insertBefore($(this)),$('<div class="divider"> / </div>').insertBefore($(this))):$(this).val(t),$(this)[0].setSelectionRange(0,0)}n=[],$(".breadcrumb span.section").each((function(){var e=$(this);e.find("a").length?n.push(e.find("a").text()):n.push(e.text())})),$(this).val()&&n.push($(this).val()),$("#tree_path").val(n.join("/"))})).trigger("keyup");var t=$(".repository.editor textarea#edit_area");if(t.length){var n=t.data("markdown-file-exts").split(","),i=t.data("line-wrap-extensions").split(",");e.on("keyup",(function(){var a,o,r,c,h,f,m=e.val();r=c="";var v=/.+\.([^.]+)$/.exec(m);v&&(r=v[1],c=".".concat(r));var p=CodeMirror.findModeByExtension(r),g=$("a[data-tab=preview]");if(p?(a=p.mode,o=p.mime,f=a):f=r,g.length&&f&&l&&l.length&&l.indexOf(f)>=0?(h=g.data("url"),g.data("url",h.replace(/(.*)\/.*/i,"$1/".concat(a))),g.show()):g.hide(),!(n.indexOf(c)>=0&&function(e){return u&&(u.toTextArea(),u=null),!!d||(d=new SimpleMDE({autoDownloadFontAwesome:!1,element:e[0],forceSync:!0,renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,previewRender:function(t,n){return setTimeout((function(){$.post(e.data("url"),{_csrf:s,mode:"gfm",context:e.data("context"),text:t},(function(e){n.innerHTML='<div class="markdown ui segment">'.concat(e,"</div>"),emojify.run($(".editor-preview")[0])}))}),0),"Loading..."},toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|","code","quote","|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","clean-block","preview","fullscreen","side-by-side"]}),!0)}(t))&&(u||function(e){return d&&(d.toTextArea(),d=null),!!u||((u=CodeMirror.fromTextArea(e[0],{lineNumbers:!0})).on("change",(function(t,n){e.val(t.getValue())})),!0)}(t))){a&&(u.setOption("mode",o),CodeMirror.autoLoadMode(u,a)),i.indexOf(c)>=0?u.setOption("lineWrapping",!0):u.setOption("lineWrapping",!1);var b=e.val();0!==b.length&&(b=(b=b.split("/"))[b.length-1],$.getJSON(e.data("ec-url-prefix")+b,(function(e){"tab"===e.indent_style?(u.setOption("indentWithTabs",!0),u.setOption("extraKeys",{})):(u.setOption("indentWithTabs",!1),u.setOption("extraKeys",{Tab:function(e){var t=Array(parseInt(e.getOption("indentUnit"))+1).join(" ");e.replaceSelection(t)}})),u.setOption("indentUnit",e.indent_size||4),u.setOption("tabSize",e.tab_width||4)})))}})).trigger("keyup");var a=$("#commit-button"),o=$(".ui.edit.form");a.prop("disabled",!0),o.areYouSure({silent:!0,dirtyClass:"dirty-file",fieldSelector:":input:not(.commit-form-wrapper :input)",change:function(){var e=$(this).hasClass("dirty-file");a.prop("disabled",!e)}}),a.click((function(e){0===t.val().length&&($("#edit-empty-content-modal").modal({onApprove:function(){$(".edit.form").submit()}}).modal("show"),e.preventDefault())}))}}function k(){$(".user.settings.profile").length>0&&$("#username").keyup((function(){var e=$("#name-change-prompt");$(this).val().toString().toLowerCase()!==$(this).data("name").toString().toLowerCase()?e.show():e.hide()}))}function S(){$(".ui.button").keypress((function(e){13!==e.keyCode&&32!==e.keyCode||$(this).click()}))}function _(){$(".code-view .linenums").length>0&&($(document).on("click",".lines-num span",(function(e){var t=$(this),n=t.parent().siblings(".lines-code").find("ol.linenums > li");O(n,n.filter("[rel=".concat(t.attr("id"),"]")),e.shiftKey?n.filter(".active").eq(0):null),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()})),$(window).on("hashchange",(function(){var e,t=window.location.hash.match(/^#(L\d+)-(L\d+)$/),n=$(".code-view ol.linenums > li");if(t)return e=n.filter(".".concat(t[1])),O(n,e,n.filter(".".concat(t[2]))),void $("html, body").scrollTop(e.offset().top-200);(t=window.location.hash.match(/^#(L|n)(\d+)$/))&&(e=n.filter(".L".concat(t[2])),O(n,e),$("html, body").scrollTop(e.offset().top-200))})).trigger("hashchange")),$(".ui.fold-code").on("click",(function(e){var t=$(e.target);t.hasClass("fa-chevron-down")?$(e.target).parent().next().slideUp("fast",(function(){t.removeClass("fa-chevron-down").addClass("fa-chevron-right")})):$(e.target).parent().next().slideDown("fast",(function(){t.removeClass("fa-chevron-right").addClass("fa-chevron-down")}))})),$(".ui.blob-excerpt").on("click",(function(e){!function e(t){var n=$(t.target),i=n.parent().parent();$.get("".concat(n.data("url"),"?").concat(n.data("query"),"&anchor=").concat(n.data("anchor")),(function(t){i.replaceWith(t),$('[data-anchor="'.concat(n.data("anchor"),'"]')).on("click",(function(t){e(t)}))}))}(e)}))}function T(e){$.ajax({url:"".concat(c,"/user/u2f/sign"),type:"POST",headers:{"X-Csrf-Token":s},data:JSON.stringify(e),contentType:"application/json; charset=utf-8"}).done((function(e){window.location.replace(e)})).fail((function(){L(1)}))}function A(e){(function(e){if(!("errorCode"in e))return!1;if(0===e.errorCode)return!1;return L(e.errorCode),!0})(e)||$.ajax({url:"".concat(c,"/user/settings/security/u2f/register"),type:"POST",headers:{"X-Csrf-Token":s},data:JSON.stringify(e),contentType:"application/json; charset=utf-8",success:function(){p()},fail:function(){L(1)}})}function L(e){var t={browser:$("#unsupported-browser"),1:$("#u2f-error-1"),2:$("#u2f-error-2"),3:$("#u2f-error-3"),4:$("#u2f-error-4"),5:$(".u2f-error-5")};t[e].removeClass("hide"),Object.keys(t).forEach((function(n){n!==e&&t[n].addClass("hide")})),$("#u2f-error").modal("show")}function q(){$.post("".concat(c,"/user/settings/security/u2f/request_register"),{_csrf:s,name:$("#nickname").val()}).success((function(e){$("#nickname").closest("div.field").removeClass("error"),$("#register-device").modal("show"),null===e.registeredKeys&&(e.registeredKeys=[]),u2fApi.register(e.appId,e.registerRequests,e.registeredKeys,30).then(A).catch((function(e){L(void 0!==e?e.metaData.code:1)}))})).fail((function(e){409===e.status&&$("#nickname").closest("div.field").addClass("error")}))}function D(e){window.history.pushState?window.history.pushState(null,null,e):window.location.hash=e}function O(e,t,n){if(e.removeClass("active"),n){var i,a=parseInt(t.attr("rel").substr(1)),o=parseInt(n.attr("rel").substr(1));if(a!==o){a>o&&(i=a,a=o,o=i);for(var r=[],s=a;s<=o;s++)r.push(".L".concat(s));return e.filter(r.join(",")).addClass("active"),void D("#L".concat(a,"-L").concat(o))}}t.addClass("active"),D("#".concat(t.attr("rel")))}function I(){var e=$(this),t="";e.attr("id")&&(t+="#".concat(e.attr("id")));var n=$(".delete.modal".concat(t));return n.find(".name").text(e.data("name")),n.modal({closable:!1,onApprove:function(){"form"!==e.data("type")?$.post(e.data("url"),{_csrf:s,id:e.data("id")}).done((function(e){window.location.href=e.redirect})):$(e.data("form")).submit()}}).modal("show"),!1}function R(){var e=$(this),t="";e.attr("id")&&(t+="#".concat(e.attr("id")));var n=$(".addall.modal".concat(t));return n.find(".name").text(e.data("name")),n.modal({closable:!1,onApprove:function(){"form"!==e.data("type")?$.post(e.data("url"),{_csrf:s,id:e.data("id")}).done((function(e){window.location.href=e.redirect})):$(e.data("form")).submit()}}).modal("show"),!1}"undefined"!=typeof Dropzone&&(Dropzone.autoDiscover=!1),$.fn.getCursorPosition=function(){var e=$(this).get(0),t=0;if("selectionStart"in e)t=e.selectionStart;else if("selection"in document){e.focus();var n=document.selection.createRange(),i=document.selection.createRange().text.length;n.moveStart("character",-e.value.length),t=n.text.length-i}return t},$(document).ready((function(){if(s=$("meta[name=_csrf]").attr("content"),c=$("meta[name=_suburl]").attr("content"),$(".time-since").each((function(){$(this).addClass("poping up").attr("data-content",$(this).attr("title")).attr("data-variation","inverted tiny").attr("title","")})),$(".dropdown:not(.custom)").dropdown(),$(".jump.dropdown").dropdown({action:"hide",onShow:function(){$(".poping.up").popup("hide")}}),$(".slide.up.dropdown").dropdown({transition:"slide up"}),$(".upward.dropdown").dropdown({direction:"upward"}),$(".ui.accordion").accordion(),$(".ui.checkbox").checkbox(),$(".ui.progress").progress({showActivity:!1}),$(".poping.up").popup(),$(".top.menu .poping.up").popup({onShow:function(){if($(".top.menu .menu.transition").hasClass("visible"))return!1}}),$(".tabular.menu .item").tab(),$(".tabable.menu .item").tab(),$(".toggle.button").click((function(){$($(this).data("target")).slideToggle(100)})),$("tr[data-href]").click((function(){window.location=$(this).data("href")})),"undefined"!=typeof hljs)for(var e=[].slice.call(document.querySelectorAll("pre code")||[]),t=0;t<e.length;t++)hljs.highlightBlock(e[t]);var n=$("#dropzone");if(n.length>0){var i={};new Dropzone("#dropzone",{url:n.data("upload-url"),headers:{"X-Csrf-Token":s},maxFiles:n.data("max-file"),maxFilesize:n.data("max-size"),acceptedFiles:"*/*"===n.data("accepts")?null:n.data("accepts"),addRemoveLinks:!0,dictDefaultMessage:n.data("default-message"),dictInvalidFileType:n.data("invalid-input-type"),dictFileTooBig:n.data("file-too-big"),dictRemoveFile:n.data("remove-file"),init:function(){this.on("success",(function(e,t){i[e.name]=t.uuid;var n=$('<input id="'.concat(t.uuid,'" name="files" type="hidden">')).val(t.uuid);$(".files").append(n)})),this.on("removedfile",(function(e){e.name in i&&$("#".concat(i[e.name])).remove(),n.data("remove-url")&&n.data("csrf")&&$.post(n.data("remove-url"),{file:i[e.name],_csrf:n.data("csrf")})}))}})}emojify.setConfig({img_dir:"".concat(c,"/vendor/plugins/emojify/images"),ignore_emoticons:!0});for(var a=document.getElementsByClassName("has-emoji"),o=0;o<a.length;o++){emojify.run(a[o]);for(var r=0;r<a[o].childNodes.length;r++)"A"===a[o].childNodes[r].nodeName&&emojify.run(a[o].childNodes[r])}var l,d,u,f,g,A,D,O,E,F,j,M,N,z,P,V=new Clipboard(".clipboard");if(V.on("success",(function(e){e.clearSelection(),$("#".concat(e.trigger.getAttribute("id"))).popup("destroy"),e.trigger.setAttribute("data-content",e.trigger.getAttribute("data-success")),$("#".concat(e.trigger.getAttribute("id"))).popup("show"),e.trigger.setAttribute("data-content",e.trigger.getAttribute("data-original"))})),V.on("error",(function(e){$("#".concat(e.trigger.getAttribute("id"))).popup("destroy"),e.trigger.setAttribute("data-content",e.trigger.getAttribute("data-error")),$("#".concat(e.trigger.getAttribute("id"))).popup("show"),e.trigger.setAttribute("data-content",e.trigger.getAttribute("data-original"))})),$(".delete-button").click(I),$(".add-all-button").click(R),$(".delete-branch-button").click(I),$(".undo-button").click((function(){var e=$(this);$.post(e.data("url"),{_csrf:s,id:e.data("id")}).done((function(e){window.location.href=e.redirect}))})),$(".show-panel.button").click((function(){$($(this).data("panel")).show()})),$(".show-modal.button").click((function(){$($(this).data("modal")).modal("show")})),$(".delete-post.button").click((function(){var e=$(this);$.post(e.data("request-url"),{_csrf:s}).done((function(){window.location.href=e.data("done-url")}))})),$(".markdown").each((function(){var e={};$(this).find("h1, h2, h3, h4, h5, h6").each((function(){var t=$(this),n=encodeURIComponent(t.text().toLowerCase().replace(/[^\u00C0-\u1FFF\u2C00-\uD7FF\w\- ]/g,"").replace(/[ ]/g,"-")),i=n;e[n]>0&&(i="".concat(n,"-").concat(e[n])),void 0===e[n]?e[n]=1:e[n]+=1,(t=t.wrap('<div id="'.concat(i,'" class="anchor-wrap" ></div>'))).append('<a class="anchor" href="#'.concat(i,'"><span class="octicon octicon-link"></span></a>'))}))})),$(".issue-checkbox").click((function(){$(".issue-checkbox").children("input:checked").length>0?($("#issue-filters").addClass("hide"),$("#issue-actions").removeClass("hide")):($("#issue-filters").removeClass("hide"),$("#issue-actions").addClass("hide"))})),$(".issue-action").click((function(){var e=this.dataset.action,t=this.dataset.elementId,n=$(".issue-checkbox").children("input:checked").map((function(){return this.dataset.issueId})).get().join(),i=this.dataset.url;"0"===t&&"/assignee"===i.substr(-9)&&(t="",e="clear"),v(i,e,n,t).then((function(){"close"!==e&&"open"!==e||$('.issue-checkbox input[type="checkbox"]').each((function(e,t){t.checked=!1})),p()}))})),$('.issue-checkbox input[type="checkbox"]:checked').first().each((function(e,t){t.checked=!1,$(t).click()})),S(),$("#search-user-box").search({minCharacters:2,apiSettings:{url:"".concat(c,"/api/v1/users/search?q={query}"),onResponse:function(e){var t=[];return $.each(e.data,(function(e,n){var i=n.login;n.full_name&&n.full_name.length>0&&(i+=" (".concat(h(n.full_name),")")),t.push({title:i,image:n.avatar_url})})),{results:t}}},searchFields:["login","full_name"],showNoResults:!1}),(l=$("#search-team-box")).search({minCharacters:2,apiSettings:{url:"".concat(c,"/api/v1/orgs/").concat(l.data("org"),"/teams/search?q={query}"),headers:{"X-Csrf-Token":s},onResponse:function(e){var t=[];return $.each(e.data,(function(e,n){var i="".concat(n.name," (").concat(n.permission," access)");t.push({title:i})})),{results:t}}},searchFields:["name","description"],showNoResults:!1}),(d=$("#search-repo-box")).search({minCharacters:2,apiSettings:{url:"".concat(c,"/api/v1/repos/search?q={query}&uid=").concat(d.data("uid")),onResponse:function(e){var t=[];return $.each(e.data,(function(e,n){t.push({title:n.full_name.split("/")[1],description:n.full_name})})),{results:t}}},searchFields:["full_name"],showNoResults:!1}),b(),0!==$(".install").length&&(""===$("#db_host").val()&&($("#db_host").val("127.0.0.1:3306"),$("#db_user").val("gitea"),$("#db_name").val("gitea")),$("#db_type").change((function(){var e=$(this).val();if("SQLite3"===e)return $("#sql_settings").hide(),$("#pgsql_settings").hide(),$("#mysql_settings").hide(),$("#sqlite_settings").show(),void("SQLite3"===e&&"data/gitea_tidb"===$("#db_path").val()&&$("#db_path").val("data/gitea.db"));var t={MySQL:"127.0.0.1:3306",PostgreSQL:"127.0.0.1:5432",MSSQL:"127.0.0.1:1433"};$("#sqlite_settings").hide(),$("#sql_settings").show(),$("#pgsql_settings").toggle("PostgreSQL"===e),$("#mysql_settings").toggle("MySQL"===e),$.each(t,(function(n,i){if($("#db_host").val()===i)return $("#db_host").val(t[e]),!1}))})),$("#offline-mode input").change((function(){$(this).is(":checked")&&($("#disable-gravatar").checkbox("check"),$("#federated-avatar-lookup").checkbox("uncheck"))})),$("#disable-gravatar input").change((function(){$(this).is(":checked")?$("#federated-avatar-lookup").checkbox("uncheck"):$("#offline-mode").checkbox("uncheck")})),$("#federated-avatar-lookup input").change((function(){$(this).is(":checked")&&($("#disable-gravatar").checkbox("uncheck"),$("#offline-mode").checkbox("uncheck"))})),$("#enable-openid-signin input").change((function(){$(this).is(":checked")?$("#disable-registration input").is(":checked")||$("#enable-openid-signup").checkbox("check"):$("#enable-openid-signup").checkbox("uncheck")})),$("#disable-registration input").change((function(){$(this).is(":checked")?($("#enable-captcha").checkbox("uncheck"),$("#enable-openid-signup").checkbox("uncheck")):$("#enable-openid-signup").checkbox("check")})),$("#enable-captcha input").change((function(){$(this).is(":checked")&&$("#disable-registration").checkbox("uncheck")}))),w(),(u=function(){var e=$("#auth_username").val(),t=$("#clone_addr").val();!$("#mirror").is(":checked")&&e&&e.length>0&&void 0!==t&&(t.startsWith("https://github.com")||t.startsWith("http://github.com"))?$("#migrate_items").show():$("#migrate_items").hide()})(),$("#clone_addr").on("input",u),$("#auth_username").on("input",u),$("#mirror").on("change",u),function(){var e=$(".repository.wiki textarea#edit_area"),t=0,n=null;if(e.length>0){var i=new SimpleMDE({autoDownloadFontAwesome:!1,element:e[0],forceSync:!0,previewRender:function(a,o){return setTimeout((function(){var r=function(){t=0,null!=n&&(clearTimeout(n),n=null),$.post(e.data("url"),{_csrf:s,mode:"gfm",context:e.data("context"),text:a},(function(e){o.innerHTML='<div class="markdown ui segment">'.concat(e,"</div>"),emojify.run($(".editor-preview")[0]),$(o).find("pre code").each((function(e,t){hljs.highlightBlock(t)}))}))};i.isSideBySideActive()?(++t>10&&r(),null!=n&&(clearTimeout(n),n=null),n=setTimeout(r,600)):r()}),0),i.isSideBySideActive()?o.innerHTML:"Loading..."},renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|",{name:"code-inline",action:function(e){var t=e.codemirror,n=t.getSelection();if(t.replaceSelection("`".concat(n,"`")),!n){var i=t.getCursor();t.setCursor(i.line,i.ch-1)}t.focus()},className:"fa fa-angle-right",title:"Add Inline Code"},"code","quote","|",{name:"checkbox-empty",action:function(e){var t=e.codemirror;t.replaceSelection("\n- [ ] ".concat(t.getSelection())),t.focus()},className:"fa fa-square-o",title:"Add Checkbox (empty)"},{name:"checkbox-checked",action:function(e){var t=e.codemirror;t.replaceSelection("\n- [x] ".concat(t.getSelection())),t.focus()},className:"fa fa-check-square-o",title:"Add Checkbox (checked)"},"|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","clean-block","preview","fullscreen","side-by-side"]});$(i.codemirror.getInputField()).addClass("js-quick-submit"),setTimeout((function(){var e=$('.repository.wiki.new .previewtabs a[data-tab="write"]'),n=$('.repository.wiki.new .previewtabs a[data-tab="preview"]'),i=$(".editor-toolbar"),a=$(".editor-toolbar a.fa-eye"),o=$(".editor-toolbar a.fa-columns");e.on("click",(function(){i.hasClass("disabled-for-preview")&&a.click()})),n.on("click",(function(){i.hasClass("disabled-for-preview")||a.click()})),a.on("click",(function(){setTimeout((function(){i.hasClass("disabled-for-preview")?(e.hasClass("active")&&e.removeClass("active"),n.hasClass("active")||n.addClass("active")):(e.hasClass("active")||e.addClass("active"),n.hasClass("active")&&n.removeClass("active"))}),0)})),o.on("click",(function(){t=10}))}),0)}}(),m(),C(),0!==$(".organization").length&&$(".organization.settings.options").length>0&&$("#org_name").keyup((function(){var e=$("#org-name-change-prompt");$(this).val().toString().toLowerCase()!==$(this).data("org-name").toString().toLowerCase()?e.show():e.hide()})),0!==$(".edit.githook").length&&CodeMirror.autoLoadMode(CodeMirror.fromTextArea($("#content")[0],{lineNumbers:!0,mode:"shell"}),"shell"),function(){if(0!==$(".new.webhook").length){$(".events.checkbox input").change((function(){$(this).is(":checked")&&$(".events.fields").show()})),$(".non-events.checkbox input").change((function(){$(this).is(":checked")&&$(".events.fields").hide()}));var e=function(){var e="POST"===$("#http_method").val();$("#content_type").parent().parent()[e?"show":"hide"]()};e(),$("#http_method").change((function(){e()})),$("#test-delivery").click((function(){var e=$(this);e.addClass("loading disabled"),$.post(e.data("link"),{_csrf:s}).done(setTimeout((function(){window.location.href=e.data("redirect")}),5e3))}))}}(),function(){if(0!==$(".admin").length){if(($(".admin.new.user").length>0||$(".admin.edit.user").length>0)&&$("#login_type").change((function(){"0"===$(this).val().substring(0,1)?($("#login_name").removeAttr("required"),$(".non-local").hide(),$(".local").show(),$("#user_name").focus(),"required"===$(this).data("password")&&$("#password").attr("required","required")):($("#login_name").attr("required","required"),$(".non-local").show(),$(".local").hide(),$("#login_name").focus(),$("#password").removeAttr("required"))})),$(".admin.new.authentication").length>0&&($("#auth_type").change((function(){$(".ldap, .dldap, .smtp, .pam, .oauth2, .has-tls .search-page-size .sspi").hide(),$(".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"),$(".binddnrequired").removeClass("required");var e=$(this).val();switch(e){case"2":$(".ldap").show(),$(".binddnrequired input, .ldap div.required:not(.dldap) input").attr("required","required"),$(".binddnrequired").addClass("required");break;case"3":$(".smtp").show(),$(".has-tls").show(),$(".smtp div.required input, .has-tls").attr("required","required");break;case"4":$(".pam").show(),$(".pam input").attr("required","required");break;case"5":$(".dldap").show(),$(".dldap div.required:not(.ldap) input").attr("required","required");break;case"6":$(".oauth2").show(),$(".oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input").attr("required","required"),o();break;case"7":$(".sspi").show(),$(".sspi div.required input").attr("required","required")}"2"!==e&&"5"!==e||i(),"2"===e&&a()})),$("#auth_type").change(),$("#security_protocol").change(i),$("#use_paged_search").change(a),$("#oauth2_provider").change(o),$("#oauth2_use_custom_url").change(r)),$(".admin.edit.authentication").length>0){var e=$("#auth_type").val();"2"===e||"5"===e?($("#security_protocol").change(i),"2"===e&&$("#use_paged_search").change(a)):"6"===e&&($("#oauth2_provider").change(o),$("#oauth2_use_custom_url").change(r),o())}if($(".admin.notice")){var t=$("#detail-modal");$(".view-detail").click((function(){return t.find(".content p").text($(this).data("content")),t.modal("show"),!1}));var n=$(".select.table .ui.checkbox");$(".select.action").click((function(){switch($(this).data("action")){case"select-all":n.checkbox("check");break;case"deselect-all":n.checkbox("uncheck");break;case"inverse":n.checkbox("toggle")}})),$("#delete-selection").click((function(){var e=$(this);e.addClass("loading disabled");var t=[];n.each((function(){$(this).checkbox("is checked")&&t.push($(this).data("id"))})),$.post(e.data("link"),{_csrf:s,ids:t}).done((function(){window.location.href=e.data("redirect")}))}))}}function i(){$("#security_protocol").val()>0?$(".has-tls").show():$(".has-tls").hide()}function a(){$("#use_paged_search").prop("checked")?$(".search-page-size").show().find("input").attr("required","required"):$(".search-page-size").hide().find("input").removeAttr("required")}function o(){switch($(".open_id_connect_auto_discovery_url, .oauth2_use_custom_url").hide(),$(".open_id_connect_auto_discovery_url input[required]").removeAttr("required"),$("#oauth2_provider").val()){case"github":case"gitlab":case"gitea":$(".oauth2_use_custom_url").show();break;case"openidConnect":$(".open_id_connect_auto_discovery_url input").attr("required","required"),$(".open_id_connect_auto_discovery_url").show()}r()}function r(){var e=$("#oauth2_provider").val();if($(".oauth2_use_custom_url_field").hide(),$(".oauth2_use_custom_url_field input[required]").removeAttr("required"),$("#oauth2_use_custom_url").is(":checked"))switch($("#oauth2_token_url").val()||$("#oauth2_token_url").val($("#".concat(e,"_token_url")).val()),$("#oauth2_auth_url").val()||$("#oauth2_auth_url").val($("#".concat(e,"_auth_url")).val()),$("#oauth2_profile_url").val()||$("#oauth2_profile_url").val($("#".concat(e,"_profile_url")).val()),$("#oauth2_email_url").val()||$("#oauth2_email_url").val($("#".concat(e,"_email_url")).val()),e){case"github":$(".oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input, .oauth2_email_url input").attr("required","required"),$(".oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url, .oauth2_email_url").show();break;case"gitea":case"gitlab":$(".oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input").attr("required","required"),$(".oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url").show(),$("#oauth2_email_url").val("")}}}(),_(),function(){var e=document.getElementById("app");if(!e)return;Vue.component("repo-search",{delimiters:["${","}"],props:{searchLimit:{type:Number,default:10},suburl:{type:String,required:!0},uid:{type:Number,required:!0},organizations:{type:Array,default:[]},isOrganization:{type:Boolean,default:!0},canCreateOrganization:{type:Boolean,default:!1},organizationsTotalCount:{type:Number,default:0},moreReposLink:{type:String,default:""}},data:function(){return{tab:"repos",repos:[],reposTotalCount:0,reposFilter:"all",searchQuery:"",isLoading:!1,repoTypes:{all:{count:0,searchMode:""},forks:{count:0,searchMode:"fork"},mirrors:{count:0,searchMode:"mirror"},sources:{count:0,searchMode:"source"},collaborative:{count:0,searchMode:"collaborative"}}}},computed:{showMoreReposLink:function(){return this.repos.length>0&&this.repos.length<this.repoTypes[this.reposFilter].count},searchURL:function(){return"".concat(this.suburl,"/api/v1/repos/search?sort=updated&order=desc&uid=").concat(this.uid,"&q=").concat(this.searchQuery,"&limit=").concat(this.searchLimit,"&mode=").concat(this.repoTypes[this.reposFilter].searchMode).concat("all"!==this.reposFilter?"&exclusive=1":"")},repoTypeCount:function(){return this.repoTypes[this.reposFilter].count}},mounted:function(){this.searchRepos(this.reposFilter);var e=this;Vue.nextTick((function(){e.$refs.search.focus()}))},methods:{changeTab:function(e){this.tab=e},changeReposFilter:function(e){this.reposFilter=e,this.repos=[],this.repoTypes[e].count=0,this.searchRepos(e)},showRepo:function(e,t){switch(t){case"sources":return e.owner.id===this.uid&&!e.mirror&&!e.fork;case"forks":return e.owner.id===this.uid&&!e.mirror&&e.fork;case"mirrors":return e.mirror;case"collaborative":return e.owner.id!==this.uid&&!e.mirror;default:return!0}},searchRepos:function(e){var t=this;this.isLoading=!0;var n=this.repoTypes[e].searchMode,i=this.searchURL,a=this.searchQuery;$.getJSON(i,(function(o,r,s){if(i===t.searchURL){t.repos=o.data;var c=s.getResponseHeader("X-Total-Count");""===a&&""===n&&(t.reposTotalCount=c),t.repoTypes[e].count=c}})).always((function(){i===t.searchURL&&(t.isLoading=!1)}))},repoClass:function(e){return e.fork?"octicon octicon-repo-forked":e.mirror?"octicon octicon-repo-clone":e.private?"octicon octicon-lock":"octicon octicon-repo"}}}),new Vue({delimiters:["${","}"],el:e,data:{searchLimit:document.querySelector("meta[name=_search_limit]").content,suburl:document.querySelector("meta[name=_suburl]").content,uid:document.querySelector("meta[name=_context_uid]").content}})}(),$(".organization.new.team input[name=permission]").change((function(){"admin"===$("input[name=permission]:checked",".organization.new.team").val()?$(".organization.new.team .team-units").hide():$(".organization.new.team .team-units").show()})),$(".js-quick-submit").keydown((function(e){!(e.ctrlKey&&!e.altKey||e.metaKey)||13!==e.keyCode&&10!==e.keyCode||$(this).closest("form").submit()})),f=$("#navbar"),g=$("#navbar-expand-toggle"),A=!1,g.click((function(){(A=!A)?(f.addClass("shown"),g.addClass("active")):(f.removeClass("shown"),g.removeClass("active"))})),D=$("#manage_topic"),O=$("#topic_edit"),E=$("#repo-topics"),F=$("#save_topic"),j=$("#topic_edit .dropdown"),M=$("#topic_edit.ui.form"),z=$("div.hide#validate_prompt"),P={countPrompt:z.children("#count_prompt").text(),formatPrompt:z.children("#format_prompt").text()},z.remove(),N=P,D.click((function(){E.hide(),O.css("display","")})),F.click((function(){var e=$("input[name=topics]").val();$.post(F.data("link"),{_csrf:s,topics:e},(function(t,n,i){if("ok"===i.responseJSON.status){if(E.children(".topic").remove(),e.length)for(var a=e.split(","),o=E.children("a").last(),r=0;r<a.length;r++)$('<div class="ui small label topic" style="cursor:pointer;">'.concat(a[r],"</div>")).insertBefore(o);O.css("display","none"),E.show()}})).fail((function(t){if(422===t.status)if(t.responseJSON.invalidTopics.length>0){N.formatPrompt=t.responseJSON.message;var n=t.responseJSON.invalidTopics,i=j.children("a.ui.label");e.split(",").forEach((function(e,t){for(var a=0;a<n.length;a++)n[a]===e&&i.eq(t).removeClass("green").addClass("red")}))}else N.countPrompt=t.responseJSON.message})).always((function(){M.form("validate form")}))})),j.dropdown({allowAdditions:!0,forceSelection:!1,fields:{name:"description",value:"data-value"},saveRemoteData:!1,label:{transition:"horizontal flip",duration:200,variation:!1,blue:!0,basic:!0},className:{label:"ui small label"},apiSettings:{url:"".concat(c,"/api/v1/topics/search?q={query}"),throttle:500,cache:!1,onResponse:function(e){var t={success:!1,results:[]},n=this.urlData.query.trim().replace(/<[^>]*>?/gm,""),i=!1,a=[];if(j.find("div.label.visible.topic,a.label.visible").each((function(e,t){a.push(t.dataset.value)})),e.topics){for(var o=!1,r=0;r<e.topics.length;r++)-1===a.indexOf(e.topics[r].topic_name)&&(e.topics[r].topic_name.toLowerCase()===n.toLowerCase()&&(i=!0),t.results.push({description:e.topics[r].topic_name,"data-value":e.topics[r].topic_name}),o=!0);t.success=o}return n.length>0&&!i?(t.success=!0,t.results.unshift({description:n,"data-value":n})):n.length>0&&i&&t.results.sort((function(e,t){return e.description.toLowerCase()===n.toLowerCase()?-1:t.description.toLowerCase()===n.toLowerCase()?1:e.description>t.description?-1:e.description<t.description?1:0})),t}},onLabelCreate:function(e){return e=e.toLowerCase().trim(),this.attr("data-value",e).contents().first().replaceWith(e),$(this)},onAdd:function(e,t,n){e=e.toLowerCase().trim(),$(n).attr("data-value",e),$(n).attr("data-text",e)}}),$.fn.form.settings.rules.validateTopic=function(e,t){var n=j.children("a.ui.label"),i=0===n.length||n.last().attr("data-value").match(t);return i||n.last().removeClass("green").addClass("red"),i&&0===j.children("a.ui.label.red").length},M.form({on:"change",inline:!0,fields:{topics:{identifier:"topics",rules:[{type:"validateTopic",value:/^[a-z0-9][a-z0-9-]{1,35}$/,prompt:N.formatPrompt},{type:"maxCount[25]",prompt:N.countPrompt}]}}}),0!==$("#wait-for-key").length&&u2fApi.ensureSupport().then((function(){$.getJSON("".concat(c,"/user/u2f/challenge")).success((function(e){u2fApi.sign(e.appId,e.challenge,e.registeredKeys,30).then(T).catch((function(e){L(void 0!==e?e.metaData.code:1)}))}))})).catch((function(){window.location.href="".concat(c,"/user/two_factor")})),$("#register-device").modal({allowMultiple:!1}),$("#u2f-error").modal({allowMultiple:!1}),$("#register-security-key").on("click",(function(e){e.preventDefault(),u2fApi.ensureSupport().then(q).catch((function(){L("browser")}))})),function(){var e=$("#repolink").val(),t=$("#repoId").val(),n=$("#crossRepoSearch").val(),i="".concat(c,"/api/v1/repos/").concat(e,"/issues?q={query}");"true"===n&&(i="".concat(c,"/api/v1/repos/issues/search?q={query}&priority_repo_id=").concat(t));$("#new-dependency-drop-list").dropdown({apiSettings:{url:i,onResponse:function(e){var t={success:!0,results:[]},n=$("#new-dependency-drop-list").data("issue-id");return $.each(e,(function(e,i){i.id!==n&&t.results.push({name:"#".concat(i.number," ").concat(h(i.title),'<div class="text small dont-break-out">').concat(h(i.repository.full_name),"</div>"),value:i.id})})),t},cache:!1},fullTextSearch:!0}),$(".menu a.label-filter-item").each((function(){$(this).click((function(e){if(e.altKey){e.preventDefault();var t=$(this).attr("href"),n=$(this).data("label-id"),i="labels=(-?[0-9]+%2c)*(".concat(n,")(%2c-?[0-9]+)*&");window.location=t.replace(new RegExp(i),"labels=$1-$2$3&")}}))})),$(".menu .ui.dropdown.label-filter").keydown((function(e){if(e.altKey&&13===e.keyCode){var t=$(".menu .ui.dropdown.label-filter .menu .item.selected");if(t.length>0){var n=$(t[0]),i=n.attr("href"),a=n.data("label-id"),o="labels=(-?[0-9]+%2c)*(".concat(a,")(%2c-?[0-9]+)*&");window.location=i.replace(new RegExp(o),"labels=$1-$2$3&")}}}))}(),$(".title_wip_desc > a").click((function(e){e.preventDefault();var t=$("#issue_title");t.focus();var n=t.val().trim().toUpperCase();for(var i in wipPrefixes)if(n.startsWith(wipPrefixes[i].toUpperCase()))return;t.val("".concat(wipPrefixes[0]," ").concat(t.val()))})),$(".show-outdated").on("click",(function(e){e.preventDefault();var t=$(this).data("comment");$(this).addClass("hide"),$("#code-comments-".concat(t)).removeClass("hide"),$("#code-preview-".concat(t)).removeClass("hide"),$("#hide-outdated-".concat(t)).removeClass("hide")})),$(".hide-outdated").on("click",(function(e){e.preventDefault();var t=$(this).data("comment");$(this).addClass("hide"),$("#code-comments-".concat(t)).addClass("hide"),$("#code-preview-".concat(t)).addClass("hide"),$("#show-outdated-".concat(t)).removeClass("hide")})),$("button.comment-form-reply").on("click",(function(e){e.preventDefault(),$(this).hide();var t=$(this).parent().find(".comment-form");t.removeClass("hide"),y(t.find(".menu"))})),0!==$(".repository.pull.diff").length&&($(".diff-detail-box.ui.sticky").sticky(),$(".btn-review").on("click",(function(e){e.preventDefault(),$(this).closest(".dropdown").find(".menu").toggle("visible")})).closest(".dropdown").find(".link.close").on("click",(function(e){e.preventDefault(),$(this).closest(".menu").toggle("visible")})),$(".code-view .lines-code,.code-view .lines-num").on("mouseenter",(function(){var e=$(this).closest("td");$(this).closest("tr").addClass(e.hasClass("lines-num-old")||e.hasClass("lines-code-old")?"focus-lines-old":"focus-lines-new")})).on("mouseleave",(function(){$(this).closest("tr").removeClass("focus-lines-new focus-lines-old")})),$(".add-code-comment").on("click",(function(e){if(!$(e.target).hasClass("btn-add-single")){e.preventDefault();var t=$(this).closest(".code-diff").hasClass("code-diff-split"),n=$(this).data("side"),i=$(this).data("idx"),a=$(this).data("path"),o=$("#pull_review_add_comment").html(),r=$(this).closest("tr"),s=r.next();s.hasClass("add-comment")||(s=$('<tr class="add-comment">'.concat(t?'<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>':'<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>',"</tr>")),r.after(s));var c=s.find(".add-comment-".concat(n)),l=c.find(".comment-code-cloud");0===l.length&&(c.html(o),y((l=c.find(".comment-code-cloud")).find(".menu")),c.find("input[name='line']").val(i),c.find("input[name='side']").val("left"===n?"previous":"proposed"),c.find("input[name='path']").val(a)),l.find("textarea").focus()}}))),function e(){var t=$("#repo_migrating");if($("#repo_migrating_failed").hide(),t){var n=t.attr("repo");if(void 0===n)return;$.ajax({type:"GET",url:"".concat(c,"/").concat(n,"/status"),data:{_csrf:s},complete:function(t){if(200===t.status&&t.responseJSON)return 0===t.responseJSON.status?void window.location.reload():void setTimeout((function(){e()}),2e3);$("#repo_migrating_progress").hide(),$("#repo_migrating_failed").show()}})}}(),function(){var e=$("#repo_template"),t=function(){var t=$("#template_units"),n=$("#non_template");""!==e.val()?(t.show(),n.hide()):(t.hide(),n.show())};e.change(t),t();var n=function(){$("#repo_template_search").dropdown({apiSettings:{url:"".concat(c,"/api/v1/repos/search?q={query}&template=true&priority_owner_id=").concat($("#uid").val()),onResponse:function(e){var t={success:!0,results:[]};return t.results.push({name:"",value:""}),$.each(e.data,(function(e,n){t.results.push({name:h(n.full_name),value:n.id})})),t},cache:!1},fullTextSearch:!0})};$("#uid").change(n),n()}(),$("#repo-clone-url").length>0)switch(localStorage.getItem("repo-clone-protocol")){case"ssh":0===$("#repo-clone-ssh").click().length&&$("#repo-clone-https").click();break;default:$("#repo-clone-https").click()}var B,H={"div.user.settings":k,"div.repository.settings.collaboration":x};for(B in H)if($(B).length>0){H[B]();break}var U=$("#clone_addr");U.change((function(){var e=$("#repo_name");U.val().length>0&&0===e.val().length&&e.val(U.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3])}))})),$((function(){0===$(".user.signin").length&&$("form:not(.ignore-dirty)").areYouSure(),$("#ssh-key-content").on("change paste keyup",(function(){var e=$(this).val().split(" "),t=$("#ssh-key-title");""===t.val()&&3===e.length&&""!==e[2]&&t.val(e[2])}))})),window.timeAddManual=function(){$(".mini.modal").modal({duration:200,onApprove:function(){$("#add_time_manual_form").submit()}}).modal("show")},window.toggleStopwatch=function(){$("#toggle_stopwatch_form").submit()},window.cancelStopwatch=function(){$("#cancel_stopwatch_form").submit()},window.initHeatmap=function(e,t,n){var i=document.getElementById(e);if(i){(n=n||{}).contributions=n.contributions||"contributions",n.no_contributions=n.no_contributions||"No contributions";var a=["${","}"];Vue.component("activity-heatmap",{delimiters:a,props:{user:{type:String,required:!0},suburl:{type:String,required:!0},locale:{type:Object,required:!0}},data:function(){return{isLoading:!0,colorRange:[],endDate:null,values:[],totalContributions:0}},mounted:function(){this.colorRange=[this.getColor(0),this.getColor(1),this.getColor(2),this.getColor(3),this.getColor(4),this.getColor(5)],this.endDate=new Date,this.loadHeatmap(this.user)},methods:{loadHeatmap:function(e){var t=this;$.get("".concat(this.suburl,"/api/v1/users/").concat(e,"/heatmap"),(function(e){for(var n=[],i=0;i<e.length;i++)t.totalContributions+=e[i].contributions,n[i]={date:new Date(1e3*e[i].timestamp),count:e[i].contributions};t.values=n,t.isLoading=!1}))},getColor:function(e){var t=document.createElement("div");t.className="heatmap-color-".concat(e),document.body.appendChild(t);var n=getComputedStyle(t).backgroundColor;return document.body.removeChild(t),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" />'}),new Vue({delimiters:a,el:i,data:{suburl:document.querySelector("meta[name=_suburl]").content,heatmapUser:t,locale:n}})}},$(".commit-button").click((function(e){e.preventDefault(),$(this).parent().find(".commit-body").toggle()})),window.toggleDeadlineForm=function(){$("#deadlineForm").fadeToggle(150)},window.setDeadline=function(){var e=$("#deadlineDate").val();window.updateDeadline(e)},window.updateDeadline=function(e){$("#deadline-err-invalid-date").hide(),$("#deadline-loader").addClass("loading");var t=null;if(""!==e){var n=Date.parse(e);if(Number.isNaN(n))return $("#deadline-loader").removeClass("loading"),$("#deadline-err-invalid-date").show(),!1;t=new Date(n)}$.ajax("".concat($("#update-issue-deadline-form").attr("action"),"/deadline"),{data:JSON.stringify({due_date:t}),headers:{"X-Csrf-Token":s,"X-Remote":!0},contentType:"application/json",type:"POST",success:function(){p()},error:function(){$("#deadline-loader").removeClass("loading"),$("#deadline-err-invalid-date").show()}})},window.deleteDependencyModal=function(e,t){$(".remove-dependency").modal({closable:!1,duration:200,onApprove:function(){$("#removeDependencyID").val(e),$("#dependencyType").val(t),$("#removeDependencyForm").submit()}}).modal("show")},window.cancelCodeComment=function(e){var t=$(e).closest("form");t.length>0&&t.hasClass("comment-form")?(t.addClass("hide"),t.parent().find("button.comment-form-reply").show()):t.closest(".comment-code-cloud").remove()},window.onOAuthLoginClick=function(){var e=$("#oauth2-login-loader"),t=$("#oauth2-login-navigator");t.hide(),e.removeClass("disabled"),setTimeout((function(){e.addClass("disabled"),t.show()}),5e3)}}]);
+!function(e){function t(t){for(var n,a,o=t[0],r=t[1],s=0,l=[];s<o.length;s++)a=o[s],Object.prototype.hasOwnProperty.call(i,a)&&i[a]&&l.push(i[a][0]),i[a]=0;for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);for(c&&c(t);l.length;)l.shift()()}var n={},i={1:0};function a(t){if(n[t])return n[t].exports;var i=n[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,a),i.l=!0,i.exports}a.e=function(e){var t=[],n=i[e];if(0!==n)if(n)t.push(n[2]);else{var o=new Promise((function(t,a){n=i[e]=[t,a]}));t.push(n[2]=o);var r,s=document.createElement("script");s.charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.src=function(e){return a.p+""+({0:"gitgraph"}[e]||e)+".js"}(e);var c=new Error;r=function(t){s.onerror=s.onload=null,clearTimeout(l);var n=i[e];if(0!==n){if(n){var a=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+a+": "+o+")",c.name="ChunkLoadError",c.type=a,c.request=o,n[1](c)}i[e]=void 0}};var l=setTimeout((function(){r({type:"timeout",target:s})}),12e4);s.onerror=s.onload=r,document.head.appendChild(s)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)a.d(n,i,function(t){return e[t]}.bind(null,i));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var o=window.webpackJsonp=window.webpackJsonp||[],r=o.push.bind(o);o.push=t,o=o.slice();for(var s=0;s<o.length;s++)t(o[s]);var c=r;a(a.s=2)}([function(e,t,n){e.exports=n(4)},function(e,t,n){var i=n(5),a=n(6),o=n(7);e.exports=function(e,t){return i(e)||a(e,t)||o()}},function(e,t,n){e.exports=n(9)},function(e,t,n){if(document.currentScript&&document.currentScript.src){var i=new URL(document.currentScript.src);n.p="".concat(i.pathname.replace(/\/[^/]*$/,""),"/")}else{var a=document.querySelector('script[src*="/index.js"]');n.p="".concat(a.getAttribute("src").replace(/\/[^/]*$/,""),"/")}},function(e,t,n){var i=function(e){"use strict";var t,n=Object.prototype,i=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",r=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,n,i){var a=t&&t.prototype instanceof v?t:v,o=Object.create(a.prototype),r=new T(i||[]);return o._invoke=function(e,t,n){var i=d;return function(a,o){if(i===h)throw new Error("Generator is already running");if(i===f){if("throw"===a)throw o;return L()}for(n.method=a,n.arg=o;;){var r=n.delegate;if(r){var s=k(r,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=h;var c=l(e,t,n);if("normal"===c.type){if(i=n.done?f:u,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=f,n.method="throw",n.arg=c.arg)}}}(e,n,r),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",u="suspendedYield",h="executing",f="completed",m={};function v(){}function p(){}function g(){}var b={};b[o]=function(){return this};var $=Object.getPrototypeOf,w=$&&$($(A([])));w&&w!==n&&i.call(w,o)&&(b=w);var y=g.prototype=v.prototype=Object.create(b);function x(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function C(e){var t;this._invoke=function(n,a){function o(){return new Promise((function(t,o){!function t(n,a,o,r){var s=l(e[n],e,a);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&i.call(d,"__await")?Promise.resolve(d.__await).then((function(e){t("next",e,o,r)}),(function(e){t("throw",e,o,r)})):Promise.resolve(d).then((function(e){c.value=e,o(c)}),(function(e){return t("throw",e,o,r)}))}r(s.arg)}(n,a,t,o)}))}return t=t?t.then(o,o):o()}}function k(e,n){var i=e.iterator[n.method];if(i===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,k(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var a=l(i,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var o=a.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function A(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function n(){for(;++a<e.length;)if(i.call(e,a))return n.value=e[a],n.done=!1,n;return n.value=t,n.done=!0,n};return r.next=r}}return{next:L}}function L(){return{value:t,done:!0}}return p.prototype=y.constructor=g,g.constructor=p,g[s]=p.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},x(C.prototype),C.prototype[r]=function(){return this},e.AsyncIterator=C,e.async=function(t,n,i,a){var o=new C(c(t,n,i,a));return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(y),y[s]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},e.values=A,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function a(i,a){return s.type="throw",s.arg=e,n.next=i,a&&(n.method="next",n.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o],s=r.completion;if("root"===r.tryLoc)return a("end");if(r.tryLoc<=this.prev){var c=i.call(r,"catchLoc"),l=i.call(r,"finallyLoc");if(c&&l){if(this.prev<r.catchLoc)return a(r.catchLoc,!0);if(this.prev<r.finallyLoc)return a(r.finallyLoc)}else if(c){if(this.prev<r.catchLoc)return a(r.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return a(r.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&i.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var r=o?o.completion:{};return r.type=e,r.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(r)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var a=i.arg;_(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:A(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=i}catch(e){Function("r","regeneratorRuntime = r")(i)}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],i=!0,a=!1,o=void 0;try{for(var r,s=e[Symbol.iterator]();!(i=(r=s.next()).done)&&(n.push(r.value),!t||n.length!==t);i=!0);}catch(e){a=!0,o=e}finally{try{i||null==s.return||s.return()}finally{if(a)throw o}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){!function(e,t,n,i){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.dropdown=function(i){var a,o=e(this),r=e(n),s=o.selector||"",c="ontouchstart"in n.documentElement,l=(new Date).getTime(),d=[],u=arguments[0],h="string"==typeof u,f=[].slice.call(arguments,1),m=1;return o.each((function(v){var p,g,b,$,w,y,x,C,k=e.isPlainObject(i)?e.extend(!0,{},e.fn.dropdown.settings,i):e.extend({},e.fn.dropdown.settings),S=k.className,_=k.message,T=k.fields,A=k.keys,L=k.metadata,q=k.namespace,D=k.regExp,O=k.selector,I=k.error,R=k.templates,E="."+q,F="module-"+q,j=e(this),M=e(k.context),N=j.find(O.text),z=j.find(O.search),P=j.find(O.sizer),V=j.find(O.input),B=j.find(O.icon),H=j.prev().find(O.text).length>0?j.prev().find(O.text):j.prev(),U=j.children(O.menu),K=U.find(O.item),W=!1,J=!1,Q=!1,X=this,G=j.data(F);C={initialize:function(){C.debug("Initializing dropdown",k),C.is.alreadySetup()?C.setup.reference():(C.setup.layout(),k.values&&C.change.values(k.values),C.refreshData(),C.save.defaults(),C.restore.selected(),C.create.id(),C.bind.events(),C.observeChanges(),C.instantiate(),C.aria.setup())},instantiate:function(){C.verbose("Storing instance of dropdown",C),G=C,j.data(F,C)},destroy:function(){C.verbose("Destroying previous dropdown",j),C.remove.tabbable(),j.off(E).removeData(F),U.off(E),r.off($),C.disconnect.menuObserver(),C.disconnect.selectObserver()},observeChanges:function(){"MutationObserver"in t&&(y=new MutationObserver(C.event.select.mutation),x=new MutationObserver(C.event.menu.mutation),C.debug("Setting up mutation observer",y,x),C.observe.select(),C.observe.menu())},disconnect:{menuObserver:function(){x&&x.disconnect()},selectObserver:function(){y&&y.disconnect()}},observe:{select:function(){C.has.input()&&y.observe(j[0],{childList:!0,subtree:!0})},menu:function(){C.has.menu()&&x.observe(U[0],{childList:!0,subtree:!0})}},create:{id:function(){w=(Math.random().toString(16)+"000000000").substr(2,8),$="."+w,C.verbose("Creating unique id for element",w)},userChoice:function(t){var n,i,a;return!!(t=t||C.get.userValues())&&(t=e.isArray(t)?t:[t],e.each(t,(function(t,o){!1===C.get.item(o)&&(a=k.templates.addition(C.add.variables(_.addResult,o)),i=e("<div />").html(a).attr("data-"+L.value,o).attr("data-"+L.text,o).addClass(S.addition).addClass(S.item),k.hideAdditions&&i.addClass(S.hidden),n=void 0===n?i:n.add(i),C.verbose("Creating user choices for value",o,i))})),n)},userLabels:function(t){var n=C.get.userValues();n&&(C.debug("Adding user labels",n),e.each(n,(function(e,t){C.verbose("Adding custom user value"),C.add.label(t,t)})))},menu:function(){U=e("<div />").addClass(S.menu).appendTo(j)},sizer:function(){P=e("<span />").addClass(S.sizer).insertAfter(z)}},search:function(e){e=void 0!==e?e:C.get.query(),C.verbose("Searching for query",e),C.has.minCharacters(e)?C.filter(e):C.hide()},select:{firstUnfiltered:function(){C.verbose("Selecting first non-filtered element"),C.remove.selectedItem(),K.not(O.unselectable).not(O.addition+O.hidden).eq(0).addClass(S.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(O.item).not(O.unselectable).eq(0),n=e.prevAll(O.item).not(O.unselectable).eq(0);t.length>0?(C.verbose("Moving selection to",t),t.addClass(S.selected)):(C.verbose("Moving selection to",n),n.addClass(S.selected))}},aria:{setup:function(){"menu"===C.aria.guessRole()&&(j.attr("aria-busy","true"),j.attr("role","menu"),j.attr("aria-haspopup","menu"),j.attr("aria-expanded","false"),U.find(".divider").attr("role","separator"),K.attr("role","menuitem"),K.each((function(e,t){t.id||(t.id=C.aria.nextID("menuitem"))})),N=j.find("> .text").eq(0),j.data("content")?(N.attr("aria-hidden"),j.attr("aria-label",j.data("content"))):(N.attr("id",C.aria.nextID("menutext")),j.attr("aria-labelledby",N.attr("id"))),j.attr("aria-busy","false"))},nextID:function(e){var t;do{t=e+"_"+m++}while(n.getElementById(t));return t},setExpanded:function(e){j.attr("aria-haspopup")&&j.attr("aria-expanded",e)},refreshDescendant:function(){if("menu"===j.attr("aria-haspopup")){var e=K.not(O.unselectable).filter("."+S.selected).eq(0),t=U.children("."+S.active).eq(0),n=e.length>0?e:t;n?j.attr("aria-activedescendant",n.attr("id")):C.aria.removeDescendant()}},removeDescendant:function(){"menu"==j.attr("aria-haspopup")&&j.removeAttr("aria-activedescendant")},guessRole:function(){var e=j.hasClass("icon"),t=C.has.search(),n=V.length>0,i=C.is.multiple();return e||t||n||i?"unknown":"menu"}},setup:{api:function(){var e={debug:k.debug,urlData:{value:C.get.value(),query:C.get.query()},on:!1};C.verbose("First request, initializing API"),j.api(e)},layout:function(){j.is("select")&&(C.setup.select(),C.setup.returnedObject()),C.has.menu()||C.create.menu(),C.is.search()&&!C.has.search()&&(C.verbose("Adding search input"),z=e("<input />").addClass(S.search).prop("autocomplete","off").insertBefore(N)),C.is.multiple()&&C.is.searchSelection()&&!C.has.sizer()&&C.create.sizer(),k.allowTab&&C.set.tabbable(),K.attr("tabindex","-1")},select:function(){var t=C.get.selectValues();C.debug("Dropdown initialized on a select",t),j.is("select")&&(V=j),V.parent(O.dropdown).length>0?(C.debug("UI dropdown already exists. Creating dropdown menu only"),j=V.closest(O.dropdown),C.has.menu()||C.create.menu(),U=j.children(O.menu),C.setup.menu(t)):(C.debug("Creating entire dropdown from select"),j=e("<div />").attr("class",V.attr("class")).addClass(S.selection).addClass(S.dropdown).html(R.dropdown(t)).insertBefore(V),V.hasClass(S.multiple)&&!1===V.prop("multiple")&&(C.error(I.missingMultiple),V.prop("multiple",!0)),V.is("[multiple]")&&C.set.multiple(),V.prop("disabled")&&(C.debug("Disabling dropdown"),j.addClass(S.disabled)),V.removeAttr("class").detach().prependTo(j)),C.refresh()},menu:function(e){U.html(R.menu(e,T)),K=U.find(O.item)},reference:function(){C.debug("Dropdown behavior was called on select, replacing with closest dropdown"),j=j.parent(O.dropdown),G=j.data(F),X=j.get(0),C.refresh(),C.setup.returnedObject()},returnedObject:function(){var e=o.slice(0,v),t=o.slice(v+1);o=e.add(j).add(t)}},refresh:function(){C.refreshSelectors(),C.refreshData()},refreshItems:function(){K=U.find(O.item)},refreshSelectors:function(){C.verbose("Refreshing selector cache"),N=j.find(O.text),z=j.find(O.search),V=j.find(O.input),B=j.find(O.icon),H=j.prev().find(O.text).length>0?j.prev().find(O.text):j.prev(),U=j.children(O.menu),K=U.find(O.item)},refreshData:function(){C.verbose("Refreshing cached metadata"),K.removeData(L.text).removeData(L.value)},clearData:function(){C.verbose("Clearing metadata"),K.removeData(L.text).removeData(L.value),j.removeData(L.defaultText).removeData(L.defaultValue).removeData(L.placeholderText)},toggle:function(){C.verbose("Toggling menu visibility"),C.is.active()?C.hide():C.show()},show:function(t){if(t=e.isFunction(t)?t:function(){},!C.can.show()&&C.is.remote()&&(C.debug("No API results retrieved, searching before show"),C.queryRemote(C.get.query(),C.show)),C.can.show()&&!C.is.active()){if(C.debug("Showing dropdown"),!C.has.message()||C.has.maxSelections()||C.has.allResultsFiltered()||C.remove.message(),C.is.allFiltered())return!0;!1!==k.onShow.call(X)&&(C.aria.setExpanded(!0),C.aria.refreshDescendant(),C.animate.show((function(){C.can.click()&&C.bind.intent(),C.has.menuSearch()&&C.focusSearch(),C.set.visible(),t.call(X)})))}},hide:function(t){t=e.isFunction(t)?t:function(){},C.is.active()&&!C.is.animatingOutward()&&(C.debug("Hiding dropdown"),!1!==k.onHide.call(X)&&(C.aria.setExpanded(!1),C.aria.removeDescendant(),C.animate.hide((function(){C.remove.visible(),t.call(X)}))))},hideOthers:function(){C.verbose("Finding other dropdowns to hide"),o.not(j).has(O.menu+"."+S.visible).dropdown("hide")},hideMenu:function(){C.verbose("Hiding menu  instantaneously"),C.remove.active(),C.remove.visible(),U.transition("hide")},hideSubMenus:function(){var e=U.children(O.item).find(O.menu);C.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){c&&C.bind.touchEvents(),C.bind.keyboardEvents(),C.bind.inputEvents(),C.bind.mouseEvents()},touchEvents:function(){C.debug("Touch device detected binding additional touch events"),C.is.searchSelection()||C.is.single()&&j.on("touchstart"+E,C.event.test.toggle),U.on("touchstart"+E,O.item,C.event.item.mouseenter)},keyboardEvents:function(){C.verbose("Binding keyboard events"),j.on("keydown"+E,C.event.keydown),C.has.search()&&j.on(C.get.inputEvent()+E,O.search,C.event.input),C.is.multiple()&&r.on("keydown"+$,C.event.document.keydown)},inputEvents:function(){C.verbose("Binding input change events"),j.on("change"+E,O.input,C.event.change)},mouseEvents:function(){C.verbose("Binding mouse events"),C.is.multiple()&&j.on("click"+E,O.label,C.event.label.click).on("click"+E,O.remove,C.event.remove.click),C.is.searchSelection()?(j.on("mousedown"+E,C.event.mousedown).on("mouseup"+E,C.event.mouseup).on("mousedown"+E,O.menu,C.event.menu.mousedown).on("mouseup"+E,O.menu,C.event.menu.mouseup).on("click"+E,O.icon,C.event.icon.click).on("focus"+E,O.search,C.event.search.focus).on("click"+E,O.search,C.event.search.focus).on("blur"+E,O.search,C.event.search.blur).on("click"+E,O.text,C.event.text.focus),C.is.multiple()&&j.on("click"+E,C.event.click)):("click"==k.on?j.on("click"+E,O.icon,C.event.icon.click).on("click"+E,C.event.test.toggle):"hover"==k.on?j.on("mouseenter"+E,C.delay.show).on("mouseleave"+E,C.delay.hide):j.on(k.on+E,C.toggle),j.on("mousedown"+E,C.event.mousedown).on("mouseup"+E,C.event.mouseup).on("focus"+E,C.event.focus),C.has.menuSearch()?j.on("blur"+E,O.search,C.event.search.blur):j.on("blur"+E,C.event.blur)),U.on("mouseenter"+E,O.item,C.event.item.mouseenter).on("mouseleave"+E,O.item,C.event.item.mouseleave).on("click"+E,O.item,C.event.item.click)},intent:function(){C.verbose("Binding hide intent event to document"),c&&r.on("touchstart"+$,C.event.test.touch).on("touchmove"+$,C.event.test.touch),r.on("click"+$,C.event.test.hide)}},unbind:{intent:function(){C.verbose("Removing hide intent event from document"),c&&r.off("touchstart"+$).off("touchmove"+$),r.off("click"+$)}},filter:function(e){var t=void 0!==e?e:C.get.query(),n=function(){C.is.multiple()&&C.filterActive(),(e||!e&&0==C.get.activeItem().length)&&C.select.firstUnfiltered(),C.has.allResultsFiltered()?k.onNoResults.call(X,t)?k.allowAdditions?k.hideAdditions&&(C.verbose("User addition with no menu, setting empty style"),C.set.empty(),C.hideMenu()):(C.verbose("All items filtered, showing message",t),C.add.message(_.noResults)):(C.verbose("All items filtered, hiding dropdown",t),C.hideMenu()):(C.remove.empty(),C.remove.message()),k.allowAdditions&&C.add.userSuggestion(e),C.is.searchSelection()&&C.can.show()&&C.is.focusedOnSearch()&&C.show()};k.useLabels&&C.has.maxSelections()||(k.apiSettings?C.can.useAPI()?C.queryRemote(t,(function(){k.filterRemoteData&&C.filterItems(t),n()})):C.error(I.noAPI):(C.filterItems(t),n()))},queryRemote:function(t,n){var i={errorDuration:!1,cache:"local",throttle:k.throttle,urlData:{query:t},onError:function(){C.add.message(_.serverError),n()},onFailure:function(){C.add.message(_.serverError),n()},onSuccess:function(e){C.remove.message(),C.setup.menu({values:e[T.remoteValues]}),n()}};j.api("get request")||C.setup.api(),i=e.extend(!0,{},i,k.apiSettings),j.api("setting",i).api("query")},filterItems:function(t){var n=void 0!==t?t:C.get.query(),i=null,a=C.escape.string(n),o=new RegExp("^"+a,"igm");C.has.query()&&(i=[],C.verbose("Searching for matching values",n),K.each((function(){var t,a,r=e(this);if("both"==k.match||"text"==k.match){if(-1!==(t=String(C.get.choiceText(r,!1))).search(o))return i.push(this),!0;if("exact"===k.fullTextSearch&&C.exactSearch(n,t))return i.push(this),!0;if(!0===k.fullTextSearch&&C.fuzzySearch(n,t))return i.push(this),!0}if("both"==k.match||"value"==k.match){if(-1!==(a=String(C.get.choiceValue(r,t))).search(o))return i.push(this),!0;if("exact"===k.fullTextSearch&&C.exactSearch(n,a))return i.push(this),!0;if(!0===k.fullTextSearch&&C.fuzzySearch(n,a))return i.push(this),!0}}))),C.debug("Showing only matched items",n),C.remove.filteredItem(),i&&K.not(i).addClass(S.filtered)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=e.toLowerCase(),t=t.toLowerCase(),i>n)return!1;if(i===n)return e===t;e:for(var a=0,o=0;a<i;a++){for(var r=e.charCodeAt(a);o<n;)if(t.charCodeAt(o++)===r)continue e;return!1}return!0},exactSearch:function(e,t){return e=e.toLowerCase(),(t=t.toLowerCase()).indexOf(e)>-1},filterActive:function(){k.useLabels&&K.filter("."+S.active).addClass(S.filtered)},focusSearch:function(e){C.has.search()&&!C.is.focusedOnSearch()&&(e?(j.off("focus"+E,O.search),z.focus(),j.on("focus"+E,O.search,C.event.search.focus)):z.focus())},forceSelection:function(){var e=K.not(S.filtered).filter("."+S.selected).eq(0),t=K.not(S.filtered).filter("."+S.active).eq(0),n=e.length>0?e:t;if(n.length>0&&!C.is.multiple())return C.debug("Forcing partial selection to selected item",n),void C.event.item.click.call(n,{},!0);k.allowAdditions?(C.set.selected(C.get.query()),C.remove.searchTerm()):C.remove.searchTerm()},change:{values:function(t){k.allowAdditions||C.clear(),C.debug("Creating dropdown with specified values",t),C.setup.menu({values:t}),e.each(t,(function(e,t){if(1==t.selected)return C.debug("Setting initial selection to",t.value),C.set.selected(t.value),!0}))}},event:{change:function(){Q||(C.debug("Input changed, updating selection"),C.set.selected())},focus:function(){k.showOnFocus&&!W&&C.is.hidden()&&!g&&C.show()},blur:function(e){g=n.activeElement===this,W||g||(C.remove.activeLabel(),C.hide())},mousedown:function(){C.is.searchSelection()?b=!0:W=!0},mouseup:function(){C.is.searchSelection()?b=!1:W=!1},click:function(t){e(t.target).is(j)&&(C.is.focusedOnSearch()?C.show():C.focusSearch())},search:{focus:function(){W=!0,C.is.multiple()&&C.remove.activeLabel(),k.showOnFocus&&C.search()},blur:function(e){g=n.activeElement===this,C.is.searchSelection()&&!b&&(J||g||(k.forceSelection&&C.forceSelection(),C.hide())),b=!1}},icon:{click:function(e){C.toggle()}},text:{focus:function(e){W=!0,C.focusSearch()}},input:function(e){(C.is.multiple()||C.is.searchSelection())&&C.set.filtered(),clearTimeout(C.timer),C.timer=setTimeout(C.search,k.delay.search)},label:{click:function(t){var n=e(this),i=j.find(O.label),a=i.filter("."+S.active),o=n.nextAll("."+S.active),r=n.prevAll("."+S.active),s=o.length>0?n.nextUntil(o).add(a).add(n):n.prevUntil(r).add(a).add(n);t.shiftKey?(a.removeClass(S.active),s.addClass(S.active)):t.ctrlKey?n.toggleClass(S.active):(a.removeClass(S.active),n.addClass(S.active)),k.onLabelSelect.apply(this,i.filter("."+S.active))}},remove:{click:function(){var t=e(this).parent();t.hasClass(S.active)?C.remove.activeLabels():C.remove.activeLabels(t)}},test:{toggle:function(e){var t=C.is.multiple()?C.show:C.toggle;C.is.bubbledLabelClick(e)||C.is.bubbledIconClick(e)||C.determine.eventOnElement(e,t)&&e.preventDefault()},touch:function(e){C.determine.eventOnElement(e,(function(){"touchstart"==e.type?C.timer=setTimeout((function(){C.hide()}),k.delay.touch):"touchmove"==e.type&&clearTimeout(C.timer)})),e.stopPropagation()},hide:function(e){C.determine.eventInModule(e,C.hide)}},select:{mutation:function(t){C.debug("<select> modified, recreating menu");var n=!1;e.each(t,(function(t,i){if(e(i.target).is("select")||e(i.addedNodes).is("select"))return n=!0,!0})),n&&(C.disconnect.selectObserver(),C.refresh(),C.setup.select(),C.set.selected(),C.observe.select())}},menu:{mutation:function(t){var n=t[0],i=n.addedNodes?e(n.addedNodes[0]):e(!1),a=n.removedNodes?e(n.removedNodes[0]):e(!1),o=i.add(a),r=o.is(O.addition)||o.closest(O.addition).length>0,s=o.is(O.message)||o.closest(O.message).length>0;r||s?(C.debug("Updating item selector cache"),C.refreshItems()):(C.debug("Menu modified, updating selector cache"),C.refresh())},mousedown:function(){J=!0},mouseup:function(){J=!1}},item:{mouseenter:function(t){var n=e(t.target),i=e(this),a=i.children(O.menu),o=i.siblings(O.item).children(O.menu),r=a.length>0;!(a.find(n).length>0)&&r&&(clearTimeout(C.itemTimer),C.itemTimer=setTimeout((function(){C.verbose("Showing sub-menu",a),e.each(o,(function(){C.animate.hide(!1,e(this))})),C.animate.show(!1,a)}),k.delay.show),t.preventDefault())},mouseleave:function(t){var n=e(this).children(O.menu);n.length>0&&(clearTimeout(C.itemTimer),C.itemTimer=setTimeout((function(){C.verbose("Hiding sub-menu",n),C.animate.hide(!1,n)}),k.delay.hide))},click:function(t,i){var a=e(this),o=e(t?t.target:""),r=a.find(O.menu),s=C.get.choiceText(a),c=C.get.choiceValue(a,s),l=r.length>0,d=r.find(o).length>0;C.has.menuSearch()&&e(n.activeElement).blur(),d||l&&!k.allowCategorySelection||(C.is.searchSelection()&&(k.allowAdditions&&C.remove.userAddition(),C.remove.searchTerm(),C.is.focusedOnSearch()||1==i||C.focusSearch(!0)),k.useLabels||(C.remove.filteredItem(),C.set.scrollPosition(a)),C.determine.selectAction.call(this,s,c))}},document:{keydown:function(e){var t=e.which;if(C.is.inObject(t,A)){var n=j.find(O.label),i=n.filter("."+S.active),a=(i.data(L.value),n.index(i)),o=n.length,r=i.length>0,s=i.length>1,c=0===a,l=a+1==o,d=C.is.searchSelection(),u=C.is.focusedOnSearch(),h=C.is.focused(),f=u&&0===C.get.caretPosition();if(d&&!r&&!u)return;t==A.leftArrow?!h&&!f||r?r&&(e.shiftKey?C.verbose("Adding previous label to selection"):(C.verbose("Selecting previous label"),n.removeClass(S.active)),c&&!s?i.addClass(S.active):i.prev(O.siblingLabel).addClass(S.active).end(),e.preventDefault()):(C.verbose("Selecting previous label"),n.last().addClass(S.active)):t==A.rightArrow?(h&&!r&&n.first().addClass(S.active),r&&(e.shiftKey?C.verbose("Adding next label to selection"):(C.verbose("Selecting next label"),n.removeClass(S.active)),l?d?u?n.removeClass(S.active):C.focusSearch():s?i.next(O.siblingLabel).addClass(S.active):i.addClass(S.active):i.next(O.siblingLabel).addClass(S.active),e.preventDefault())):t==A.deleteKey||t==A.backspace?r?(C.verbose("Removing active labels"),l&&d&&!u&&C.focusSearch(),i.last().next(O.siblingLabel).addClass(S.active),C.remove.activeLabels(i),e.preventDefault()):f&&!r&&t==A.backspace&&(C.verbose("Removing last label on input backspace"),i=n.last().addClass(S.active),C.remove.activeLabels(i)):i.removeClass(S.active)}}},keydown:function(e){var t=e.which;if(C.is.inObject(t,A)){var n,i=K.not(O.unselectable).filter("."+S.selected).eq(0),a=U.children("."+S.active).eq(0),o=i.length>0?i:a,r=o.length>0?o.siblings(":not(."+S.filtered+")").addBack():U.children(":not(."+S.filtered+")"),s=o.children(O.menu),c=o.closest(O.menu),l=c.hasClass(S.visible)||c.hasClass(S.animating)||c.parent(O.menu).length>0,d=s.length>0,u=o.length>0,h=o.not(O.unselectable).length>0,f=t==A.delimiter&&k.allowAdditions&&C.is.multiple();if(k.allowAdditions&&k.hideAdditions&&(t==A.enter||f)&&h&&(C.verbose("Selecting item from keyboard shortcut",o),o[0].click(),C.is.searchSelection()&&C.remove.searchTerm()),C.is.visible()){if((t==A.enter||f)&&(t==A.enter&&u&&d&&!k.allowCategorySelection?(C.verbose("Pressed enter on unselectable category, opening sub menu"),t=A.rightArrow):h&&(C.verbose("Selecting item from keyboard shortcut",o),o[0].click(),C.is.searchSelection()&&C.remove.searchTerm()),e.preventDefault()),u&&(t==A.leftArrow&&c[0]!==U[0]&&(C.verbose("Left key pressed, closing sub-menu"),C.animate.hide(!1,c),o.removeClass(S.selected),c.closest(O.item).addClass(S.selected),C.aria.refreshDescendant(),e.preventDefault()),t==A.rightArrow&&d&&(C.verbose("Right key pressed, opening sub-menu"),C.animate.show(!1,s),o.removeClass(S.selected),s.find(O.item).eq(0).addClass(S.selected),C.aria.refreshDescendant(),e.preventDefault())),t==A.upArrow){if(n=u&&l?o.prevAll(O.item+":not("+O.unselectable+")").eq(0):K.eq(0),r.index(n)<0)return C.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();C.verbose("Up key pressed, changing active item"),o.removeClass(S.selected),n.addClass(S.selected),C.aria.refreshDescendant(),C.set.scrollPosition(n),k.selectOnKeydown&&C.is.single()&&C.set.selectedItem(n),e.preventDefault()}if(t==A.downArrow){if(0===(n=u&&l?n=o.nextAll(O.item+":not("+O.unselectable+")").eq(0):K.eq(0)).length)return C.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();C.verbose("Down key pressed, changing active item"),K.removeClass(S.selected),n.addClass(S.selected),C.aria.refreshDescendant(),C.set.scrollPosition(n),k.selectOnKeydown&&C.is.single()&&C.set.selectedItem(n),e.preventDefault()}t==A.pageUp&&(C.scrollPage("up"),e.preventDefault()),t==A.pageDown&&(C.scrollPage("down"),e.preventDefault()),t==A.escape&&(C.verbose("Escape key pressed, closing dropdown"),C.hide())}else f&&e.preventDefault(),t!=A.downArrow||C.is.visible()||(C.verbose("Down key pressed, showing dropdown"),C.show(),e.preventDefault())}else C.has.search()||C.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e=n.createEvent("HTMLEvents"),t=V[0];t&&(C.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(t,n){C.verbose("Determining action",k.action),e.isFunction(C.action[k.action])?(C.verbose("Triggering preset action",k.action,t,n),C.action[k.action].call(X,t,n,this)):e.isFunction(k.action)?(C.verbose("Triggering user action",k.action,t,n),k.action.call(X,t,n,this)):C.error(I.action,k.action)},eventInModule:function(t,i){var a=e(t.target),o=a.closest(n.documentElement).length>0,r=a.closest(j).length>0;return i=e.isFunction(i)?i:function(){},o&&!r?(C.verbose("Triggering event",i),i(),!0):(C.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(t,i){var a=e(t.target),o=a.closest(O.siblingLabel),r=n.body.contains(t.target),s=0===j.find(o).length,c=0===a.closest(U).length;return i=e.isFunction(i)?i:function(){},r&&s&&c?(C.verbose("Triggering event",i),i(),!0):(C.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(t,n,i){if(n=void 0!==n?n:t,C.can.activate(e(i))){if(C.set.selected(n,e(i)),C.is.multiple()&&!C.is.allFiltered())return;C.hideAndClear()}},select:function(t,n,i){if(n=void 0!==n?n:t,C.can.activate(e(i))){if(C.set.value(n,t,e(i)),C.is.multiple()&&!C.is.allFiltered())return;C.hideAndClear()}},combo:function(t,n,i){n=void 0!==n?n:t,C.set.selected(n,e(i)),C.hideAndClear()},hide:function(e,t,n){C.set.value(t,e),C.hideAndClear()}},get:{id:function(){return w},defaultText:function(){return j.data(L.defaultText)},defaultValue:function(){return j.data(L.defaultValue)},placeholderText:function(){return"auto"!=k.placeholder&&"string"==typeof k.placeholder?k.placeholder:j.data(L.placeholderText)||""},text:function(){return N.text()},query:function(){return e.trim(z.val())},searchWidth:function(e){return e=void 0!==e?e:z.val(),P.text(e),Math.ceil(P.width()+1)},selectionCount:function(){var t=C.get.values();return C.is.multiple()?e.isArray(t)?t.length:0:""!==C.get.value()?1:0},transition:function(e){return"auto"==k.transition?C.is.upward(e)?"slide up":"slide down":k.transition},userValues:function(){var t=C.get.values();return!!t&&(t=e.isArray(t)?t:[t],e.grep(t,(function(e){return!1===C.get.item(e)})))},uniqueArray:function(t){return e.grep(t,(function(n,i){return e.inArray(n,t)===i}))},caretPosition:function(){var e,t,i=z.get(0);return"selectionStart"in i?i.selectionStart:n.selection?(i.focus(),t=(e=n.selection.createRange()).text.length,e.moveStart("character",-i.value.length),e.text.length-t):void 0},value:function(){var t=V.length>0?V.val():j.data(L.value),n=e.isArray(t)&&1===t.length&&""===t[0];return void 0===t||n?"":t},values:function(){var e=C.get.value();return""===e?"":!C.has.selectInput()&&C.is.multiple()?"string"==typeof e?e.split(k.delimiter):"":e},remoteValues:function(){var t=C.get.values(),n=!1;return t&&("string"==typeof t&&(t=[t]),e.each(t,(function(e,t){var i=C.read.remoteData(t);C.verbose("Restoring value from session data",i,t),i&&(n||(n={}),n[t]=i)}))),n},choiceText:function(t,n){if(n=void 0!==n?n:k.preserveHTML,t)return t.find(O.menu).length>0&&(C.verbose("Retrieving text of element with sub-menu"),(t=t.clone()).find(O.menu).remove(),t.find(O.menuIcon).remove()),void 0!==t.data(L.text)?t.data(L.text):n?e.trim(t.html()):e.trim(t.text())},choiceValue:function(t,n){return n=n||C.get.choiceText(t),!!t&&(void 0!==t.data(L.value)?String(t.data(L.value)):"string"==typeof n?e.trim(n.toLowerCase()):String(n))},inputEvent:function(){var e=z[0];return!!e&&(void 0!==e.oninput?"input":void 0!==e.onpropertychange?"propertychange":"keyup")},selectValues:function(){var t={values:[]};return j.find("option").each((function(){var n=e(this),i=n.html(),a=n.attr("disabled"),o=void 0!==n.attr("value")?n.attr("value"):i;"auto"===k.placeholder&&""===o?t.placeholder=i:t.values.push({name:i,value:o,disabled:a})})),k.placeholder&&"auto"!==k.placeholder&&(C.debug("Setting placeholder value to",k.placeholder),t.placeholder=k.placeholder),k.sortSelect?(t.values.sort((function(e,t){return e.name>t.name?1:-1})),C.debug("Retrieved and sorted values from select",t)):C.debug("Retrieved values from select",t),t},activeItem:function(){return K.filter("."+S.active)},selectedItem:function(){var e=K.not(O.unselectable).filter("."+S.selected);return e.length>0?e:K.eq(0)},itemWithAdditions:function(e){var t=C.get.item(e),n=C.create.userChoice(e);return n&&n.length>0&&(t=t.length>0?t.add(n):n),t},item:function(t,n){var i,a,o=!1;return t=void 0!==t?t:void 0!==C.get.values()?C.get.values():C.get.text(),i=a?t.length>0:null!=t,a=C.is.multiple()&&e.isArray(t),n=""===t||0===t||(n||!1),i&&K.each((function(){var i=e(this),r=C.get.choiceText(i),s=C.get.choiceValue(i,r);if(null!=s)if(a)-1===e.inArray(String(s),t)&&-1===e.inArray(r,t)||(o=o?o.add(i):i);else if(n){if(C.verbose("Ambiguous dropdown value using strict type check",i,t),s===t||r===t)return o=i,!0}else if(String(s)==String(t)||r==t)return C.verbose("Found select item by value",s,t),o=i,!0})),o}},check:{maxSelections:function(e){return!k.maxSelections||((e=void 0!==e?e:C.get.selectionCount())>=k.maxSelections?(C.debug("Maximum selection count reached"),k.useLabels&&(K.addClass(S.filtered),C.add.message(_.maxSelections)),!0):(C.verbose("No longer at maximum selection count"),C.remove.message(),C.remove.filteredItem(),C.is.searchSelection()&&C.filterItems(),!1))}},restore:{defaults:function(){C.clear(),C.restore.defaultText(),C.restore.defaultValue()},defaultText:function(){var e=C.get.defaultText();e===C.get.placeholderText?(C.debug("Restoring default placeholder text",e),C.set.placeholderText(e)):(C.debug("Restoring default text",e),C.set.text(e))},placeholderText:function(){C.set.placeholderText()},defaultValue:function(){var e=C.get.defaultValue();void 0!==e&&(C.debug("Restoring default value",e),""!==e?(C.set.value(e),C.set.selected()):(C.remove.activeItem(),C.remove.selectedItem()))},labels:function(){k.allowAdditions&&(k.useLabels||(C.error(I.labels),k.useLabels=!0),C.debug("Restoring selected values"),C.create.userLabels()),C.check.maxSelections()},selected:function(){C.restore.values(),C.is.multiple()?(C.debug("Restoring previously selected values and labels"),C.restore.labels()):C.debug("Restoring previously selected values")},values:function(){C.set.initialLoad(),k.apiSettings&&k.saveRemoteData&&C.get.remoteValues()?C.restore.remoteValues():C.set.selected(),C.remove.initialLoad()},remoteValues:function(){var t=C.get.remoteValues();C.debug("Recreating selected from session data",t),t&&(C.is.single()?e.each(t,(function(e,t){C.set.text(t)})):e.each(t,(function(e,t){C.add.label(e,t)})))}},read:{remoteData:function(e){var n;if(void 0!==t.Storage)return void 0!==(n=sessionStorage.getItem(e))&&n;C.error(I.noStorage)}},save:{defaults:function(){C.save.defaultText(),C.save.placeholderText(),C.save.defaultValue()},defaultValue:function(){var e=C.get.value();C.verbose("Saving default value as",e),j.data(L.defaultValue,e)},defaultText:function(){var e=C.get.text();C.verbose("Saving default text as",e),j.data(L.defaultText,e)},placeholderText:function(){var e;!1!==k.placeholder&&N.hasClass(S.placeholder)&&(e=C.get.text(),C.verbose("Saving placeholder text as",e),j.data(L.placeholderText,e))},remoteData:function(e,n){void 0!==t.Storage?(C.verbose("Saving remote data to session storage",n,e),sessionStorage.setItem(n,e)):C.error(I.noStorage)}},clear:function(){C.is.multiple()&&k.useLabels?C.remove.labels():(C.remove.activeItem(),C.remove.selectedItem()),C.set.placeholderText(),C.clearValue()},clearValue:function(){C.set.value("")},scrollPage:function(e,t){var n,i,a=t||C.get.selectedItem(),o=a.closest(O.menu),r=o.outerHeight(),s=o.scrollTop(),c=K.eq(0).outerHeight(),l=Math.floor(r/c),d=(o.prop("scrollHeight"),"up"==e?s-c*l:s+c*l),u=K.not(O.unselectable);i="up"==e?u.index(a)-l:u.index(a)+l,(n=("up"==e?i>=0:i<u.length)?u.eq(i):"up"==e?u.first():u.last()).length>0&&(C.debug("Scrolling page",e,n),a.removeClass(S.selected),n.addClass(S.selected),k.selectOnKeydown&&C.is.single()&&C.set.selectedItem(n),o.scrollTop(d))},set:{filtered:function(){var e=C.is.multiple(),t=C.is.searchSelection(),n=e&&t,i=t?C.get.query():"",a="string"==typeof i&&i.length>0,o=C.get.searchWidth(),r=""!==i;e&&a&&(C.verbose("Adjusting input width",o,k.glyphWidth),z.css("width",o)),a||n&&r?(C.verbose("Hiding placeholder text"),N.addClass(S.filtered)):(!e||n&&!r)&&(C.verbose("Showing placeholder text"),N.removeClass(S.filtered))},empty:function(){j.addClass(S.empty)},loading:function(){j.addClass(S.loading)},placeholderText:function(e){e=e||C.get.placeholderText(),C.debug("Setting placeholder text",e),C.set.text(e),N.addClass(S.placeholder)},tabbable:function(){C.is.searchSelection()?(C.debug("Added tabindex to searchable dropdown"),z.val("").attr("tabindex",0),U.attr("tabindex",-1)):(C.debug("Added tabindex to dropdown"),void 0===j.attr("tabindex")&&(j.attr("tabindex",0),U.attr("tabindex",-1)))},initialLoad:function(){C.verbose("Setting initial load"),p=!0},activeItem:function(e){k.allowAdditions&&e.filter(O.addition).length>0?e.addClass(S.filtered):e.addClass(S.active)},partialSearch:function(e){var t=C.get.query().length;z.val(e.substr(0,t))},scrollPosition:function(e,t){var n,i,a,o,r,s;n=(e=e||C.get.selectedItem()).closest(O.menu),i=e&&e.length>0,t=void 0!==t&&t,e&&n.length>0&&i&&(e.position().top,n.addClass(S.loading),a=(o=n.scrollTop())-n.offset().top+e.offset().top,t||(s=o+n.height()<a+5,r=a-5<o),C.debug("Scrolling to active item",a),(t||r||s)&&n.scrollTop(a),n.removeClass(S.loading))},text:function(e){"select"!==k.action&&("combo"==k.action?(C.debug("Changing combo button text",e,H),k.preserveHTML?H.html(e):H.text(e)):(e!==C.get.placeholderText()&&N.removeClass(S.placeholder),C.debug("Changing text",e,N),N.removeClass(S.filtered),k.preserveHTML?N.html(e):N.text(e)))},selectedItem:function(e){var t=C.get.choiceValue(e),n=C.get.choiceText(e,!1),i=C.get.choiceText(e,!0);C.debug("Setting user selection to item",e),C.remove.activeItem(),C.set.partialSearch(n),C.set.activeItem(e),C.set.selected(t,e),C.set.text(i)},selectedLetter:function(t){var n,i=K.filter("."+S.selected),a=i.length>0&&C.has.firstLetter(i,t),o=!1;a&&(n=i.nextAll(K).eq(0),C.has.firstLetter(n,t)&&(o=n)),o||K.each((function(){if(C.has.firstLetter(e(this),t))return o=e(this),!1})),o&&(C.verbose("Scrolling to next value with letter",t),C.set.scrollPosition(o),i.removeClass(S.selected),o.addClass(S.selected),C.aria.refreshDescendant(),k.selectOnKeydown&&C.is.single()&&C.set.selectedItem(o))},direction:function(e){"auto"==k.direction?(C.remove.upward(),C.can.openDownward(e)?C.remove.upward(e):C.set.upward(e),C.is.leftward(e)||C.can.openRightward(e)||C.set.leftward(e)):"upward"==k.direction&&C.set.upward(e)},upward:function(e){(e||j).addClass(S.upward)},leftward:function(e){(e||U).addClass(S.leftward)},value:function(e,t,n){var i=C.escape.value(e),a=V.length>0,o=C.get.values(),r=void 0!==e?String(e):e;if(a){if(!k.allowReselection&&r==o&&(C.verbose("Skipping value update already same value",e,o),!C.is.initialLoad()))return;C.is.single()&&C.has.selectInput()&&C.can.extendSelect()&&(C.debug("Adding user option",e),C.add.optionValue(e)),C.debug("Updating input value",i,o),Q=!0,V.val(i),!1===k.fireOnInit&&C.is.initialLoad()?C.debug("Input native change event ignored on initial load"):C.trigger.change(),Q=!1}else C.verbose("Storing value in metadata",i,V),i!==o&&j.data(L.value,r);!1===k.fireOnInit&&C.is.initialLoad()?C.verbose("No callback on initial load",k.onChange):k.onChange.call(X,e,t,n)},active:function(){j.addClass(S.active)},multiple:function(){j.addClass(S.multiple)},visible:function(){j.addClass(S.visible)},exactly:function(e,t){C.debug("Setting selected to exact values"),C.clear(),C.set.selected(e,t)},selected:function(t,n){var i=C.is.multiple();(n=k.allowAdditions?n||C.get.itemWithAdditions(t):n||C.get.item(t))&&(C.debug("Setting selected menu item to",n),C.is.multiple()&&C.remove.searchWidth(),C.is.single()?(C.remove.activeItem(),C.remove.selectedItem()):k.useLabels&&C.remove.selectedItem(),n.each((function(){var t=e(this),a=C.get.choiceText(t),o=C.get.choiceValue(t,a),r=t.hasClass(S.filtered),s=t.hasClass(S.active),c=t.hasClass(S.addition),l=i&&1==n.length;i?!s||c?(k.apiSettings&&k.saveRemoteData&&C.save.remoteData(a,o),k.useLabels?(C.add.label(o,a,l),C.add.value(o,a,t),C.set.activeItem(t),C.filterActive(),C.select.nextAvailable(n)):(C.add.value(o,a,t),C.set.text(C.add.variables(_.count)),C.set.activeItem(t))):r||(C.debug("Selected active value, removing label"),C.remove.selected(o)):(k.apiSettings&&k.saveRemoteData&&C.save.remoteData(a,o),C.set.text(a),C.set.value(o,a,t),t.addClass(S.active).addClass(S.selected))})))}},add:{label:function(t,n,i){var a,o=C.is.searchSelection()?z:N,r=C.escape.value(t);k.ignoreCase&&(r=r.toLowerCase()),a=e("<a />").addClass(S.label).attr("data-"+L.value,r).html(R.label(r,n)),a=k.onLabelCreate.call(a,r,n),C.has.label(t)?C.debug("User selection already exists, skipping",r):(k.label.variation&&a.addClass(k.label.variation),!0===i?(C.debug("Animating in label",a),a.addClass(S.hidden).insertBefore(o).transition(k.label.transition,k.label.duration)):(C.debug("Adding selection label",a),a.insertBefore(o)))},message:function(t){var n=U.children(O.message),i=k.templates.message(C.add.variables(t));n.length>0?n.html(i):n=e("<div/>").html(i).addClass(S.message).appendTo(U)},optionValue:function(t){var n=C.escape.value(t);V.find('option[value="'+C.escape.string(n)+'"]').length>0||(C.disconnect.selectObserver(),C.is.single()&&(C.verbose("Removing previous user addition"),V.find("option."+S.addition).remove()),e("<option/>").prop("value",n).addClass(S.addition).html(t).appendTo(V),C.verbose("Adding user addition as an <option>",t),C.observe.select())},userSuggestion:function(e){var t,n=U.children(O.addition),i=C.get.item(e),a=i&&i.not(O.addition).length,o=n.length>0;k.useLabels&&C.has.maxSelections()||(""===e||a?n.remove():(o?(n.data(L.value,e).data(L.text,e).attr("data-"+L.value,e).attr("data-"+L.text,e).removeClass(S.filtered),k.hideAdditions||(t=k.templates.addition(C.add.variables(_.addResult,e)),n.html(t)),C.verbose("Replacing user suggestion with new value",n)):((n=C.create.userChoice(e)).prependTo(U),C.verbose("Adding item choice to menu corresponding with user choice addition",n)),k.hideAdditions&&!C.is.allFiltered()||n.addClass(S.selected).siblings().removeClass(S.selected),C.refreshItems()))},variables:function(e,t){var n,i,a=-1!==e.search("{count}"),o=-1!==e.search("{maxCount}"),r=-1!==e.search("{term}");return C.verbose("Adding templated variables to message",e),a&&(n=C.get.selectionCount(),e=e.replace("{count}",n)),o&&(n=C.get.selectionCount(),e=e.replace("{maxCount}",k.maxSelections)),r&&(i=t||C.get.query(),e=e.replace("{term}",i)),e},value:function(t,n,i){var a,o=C.get.values();C.has.value(t)?C.debug("Value already selected"):""!==t?(e.isArray(o)?(a=o.concat([t]),a=C.get.uniqueArray(a)):a=[t],C.has.selectInput()?C.can.extendSelect()&&(C.debug("Adding value to select",t,a,V),C.add.optionValue(t)):(a=a.join(k.delimiter),C.debug("Setting hidden input to delimited value",a,V)),!1===k.fireOnInit&&C.is.initialLoad()?C.verbose("Skipping onadd callback on initial load",k.onAdd):k.onAdd.call(X,t,n,i),C.set.value(a,t,n,i),C.check.maxSelections()):C.debug("Cannot select blank values from multiselect")}},remove:{active:function(){j.removeClass(S.active)},activeLabel:function(){j.find(O.label).removeClass(S.active)},empty:function(){j.removeClass(S.empty)},loading:function(){j.removeClass(S.loading)},initialLoad:function(){p=!1},upward:function(e){(e||j).removeClass(S.upward)},leftward:function(e){(e||U).removeClass(S.leftward)},visible:function(){j.removeClass(S.visible)},activeItem:function(){K.removeClass(S.active)},filteredItem:function(){k.useLabels&&C.has.maxSelections()||(k.useLabels&&C.is.multiple()?K.not("."+S.active).removeClass(S.filtered):K.removeClass(S.filtered),C.remove.empty())},optionValue:function(e){var t=C.escape.value(e),n=V.find('option[value="'+C.escape.string(t)+'"]');n.length>0&&n.hasClass(S.addition)&&(y&&(y.disconnect(),C.verbose("Temporarily disconnecting mutation observer")),n.remove(),C.verbose("Removing user addition as an <option>",t),y&&y.observe(V[0],{childList:!0,subtree:!0}))},message:function(){U.children(O.message).remove()},searchWidth:function(){z.css("width","")},searchTerm:function(){C.verbose("Cleared search term"),z.val(""),C.set.filtered()},userAddition:function(){K.filter(O.addition).remove()},selected:function(t,n){if(!(n=k.allowAdditions?n||C.get.itemWithAdditions(t):n||C.get.item(t)))return!1;n.each((function(){var t=e(this),n=C.get.choiceText(t),i=C.get.choiceValue(t,n);C.is.multiple()?k.useLabels?(C.remove.value(i,n,t),C.remove.label(i)):(C.remove.value(i,n,t),0===C.get.selectionCount()?C.set.placeholderText():C.set.text(C.add.variables(_.count))):C.remove.value(i,n,t),t.removeClass(S.filtered).removeClass(S.active),k.useLabels&&t.removeClass(S.selected)}))},selectedItem:function(){K.removeClass(S.selected)},value:function(e,t,n){var i,a=C.get.values();C.has.selectInput()?(C.verbose("Input is <select> removing selected option",e),i=C.remove.arrayValue(e,a),C.remove.optionValue(e)):(C.verbose("Removing from delimited values",e),i=(i=C.remove.arrayValue(e,a)).join(k.delimiter)),!1===k.fireOnInit&&C.is.initialLoad()?C.verbose("No callback on initial load",k.onRemove):k.onRemove.call(X,e,t,n),C.set.value(i,t,n),C.check.maxSelections()},arrayValue:function(t,n){return e.isArray(n)||(n=[n]),n=e.grep(n,(function(e){return t!=e})),C.verbose("Removed value from delimited string",t,n),n},label:function(e,t){var n=j.find(O.label).filter("[data-"+L.value+'="'+C.escape.string(e)+'"]');C.verbose("Removing label",n),n.remove()},activeLabels:function(e){e=e||j.find(O.label).filter("."+S.active),C.verbose("Removing active label selections",e),C.remove.labels(e)},labels:function(t){t=t||j.find(O.label),C.verbose("Removing labels",t),t.each((function(){var t=e(this),n=t.data(L.value),i=void 0!==n?String(n):n,a=C.is.userValue(i);!1!==k.onLabelRemove.call(t,n)?(C.remove.message(),a?(C.remove.value(i),C.remove.label(i)):C.remove.selected(i)):C.debug("Label remove callback cancelled removal")}))},tabbable:function(){C.is.searchSelection()?(C.debug("Searchable dropdown initialized"),z.removeAttr("tabindex"),U.removeAttr("tabindex")):(C.debug("Simple selection dropdown initialized"),j.removeAttr("tabindex"),U.removeAttr("tabindex"))}},has:{menuSearch:function(){return C.has.search()&&z.closest(U).length>0},search:function(){return z.length>0},sizer:function(){return P.length>0},selectInput:function(){return V.is("select")},minCharacters:function(e){return!k.minCharacters||(e=String(void 0!==e?e:C.get.query())).length>=k.minCharacters},firstLetter:function(e,t){var n,i;return!(!e||0===e.length||"string"!=typeof t)&&(n=C.get.choiceText(e,!1),t=t.toLowerCase(),i=String(n).charAt(0).toLowerCase(),t==i)},input:function(){return V.length>0},items:function(){return K.length>0},menu:function(){return U.length>0},message:function(){return 0!==U.children(O.message).length},label:function(e){var t=C.escape.value(e),n=j.find(O.label);return k.ignoreCase&&(t=t.toLowerCase()),n.filter("[data-"+L.value+'="'+C.escape.string(t)+'"]').length>0},maxSelections:function(){return k.maxSelections&&C.get.selectionCount()>=k.maxSelections},allResultsFiltered:function(){var e=K.not(O.addition);return e.filter(O.unselectable).length===e.length},userSuggestion:function(){return U.children(O.addition).length>0},query:function(){return""!==C.get.query()},value:function(e){return k.ignoreCase?C.has.valueIgnoringCase(e):C.has.valueMatchingCase(e)},valueMatchingCase:function(t){var n=C.get.values();return!!(e.isArray(n)?n&&-1!==e.inArray(t,n):n==t)},valueIgnoringCase:function(t){var n=C.get.values(),i=!1;return e.isArray(n)||(n=[n]),e.each(n,(function(e,n){if(String(t).toLowerCase()==String(n).toLowerCase())return i=!0,!1})),i}},is:{active:function(){return j.hasClass(S.active)},animatingInward:function(){return U.transition("is inward")},animatingOutward:function(){return U.transition("is outward")},bubbledLabelClick:function(t){return e(t.target).is("select, input")&&j.closest("label").length>0},bubbledIconClick:function(t){return e(t.target).closest(B).length>0},alreadySetup:function(){return j.is("select")&&void 0!==j.parent(O.dropdown).data(F)&&0===j.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):U.transition&&U.transition("is animating")},leftward:function(e){return(e||U).hasClass(S.leftward)},disabled:function(){return j.hasClass(S.disabled)},focused:function(){return n.activeElement===j[0]},focusedOnSearch:function(){return n.activeElement===z[0]},allFiltered:function(){return(C.is.multiple()||C.has.search())&&!(0==k.hideAdditions&&C.has.userSuggestion())&&!C.has.message()&&C.has.allResultsFiltered()},hidden:function(e){return!C.is.visible(e)},initialLoad:function(){return p},inObject:function(t,n){var i=!1;return e.each(n,(function(e,n){if(n==t)return i=!0,!0})),i},multiple:function(){return j.hasClass(S.multiple)},remote:function(){return k.apiSettings&&C.can.useAPI()},single:function(){return!C.is.multiple()},selectMutation:function(t){var n=!1;return e.each(t,(function(t,i){if(i.target&&e(i.target).is("select"))return n=!0,!0})),n},search:function(){return j.hasClass(S.search)},searchSelection:function(){return C.has.search()&&1===z.parent(O.dropdown).length},selection:function(){return j.hasClass(S.selection)},userValue:function(t){return-1!==e.inArray(t,C.get.userValues())},upward:function(e){return(e||j).hasClass(S.upward)},visible:function(e){return e?e.hasClass(S.visible):U.hasClass(S.visible)},verticallyScrollableContext:function(){var e=M.get(0)!==t&&M.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=M.get(0)!==t&&M.css("overflow-X");return"auto"==e||"scroll"==e}},can:{activate:function(e){return!!k.useLabels||(!C.has.maxSelections()||!(!C.has.maxSelections()||!e.hasClass(S.active)))},openDownward:function(e){var n,i,a=e||U,o=!0;return a.addClass(S.loading),i={context:{offset:M.get(0)===t?{top:0,left:0}:M.offset(),scrollTop:M.scrollTop(),height:M.outerHeight()},menu:{offset:a.offset(),height:a.outerHeight()}},C.is.verticallyScrollableContext()&&(i.menu.offset.top+=i.context.scrollTop),(n={above:i.context.scrollTop<=i.menu.offset.top-i.context.offset.top-i.menu.height,below:i.context.scrollTop+i.context.height>=i.menu.offset.top-i.context.offset.top+i.menu.height}).below?(C.verbose("Dropdown can fit in context downward",n),o=!0):n.below||n.above?(C.verbose("Dropdown cannot fit below, opening upward",n),o=!1):(C.verbose("Dropdown cannot fit in either direction, favoring downward",n),o=!0),a.removeClass(S.loading),o},openRightward:function(e){var n,i,a=e||U,o=!0;return a.addClass(S.loading),i={context:{offset:M.get(0)===t?{top:0,left:0}:M.offset(),scrollLeft:M.scrollLeft(),width:M.outerWidth()},menu:{offset:a.offset(),width:a.outerWidth()}},C.is.horizontallyScrollableContext()&&(i.menu.offset.left+=i.context.scrollLeft),(n=i.menu.offset.left-i.context.offset.left+i.menu.width>=i.context.scrollLeft+i.context.width)&&(C.verbose("Dropdown cannot fit in context rightward",n),o=!1),a.removeClass(S.loading),o},click:function(){return c||"click"==k.on},extendSelect:function(){return k.allowAdditions||k.apiSettings},show:function(){return!C.is.disabled()&&(C.has.items()||C.has.message())},useAPI:function(){return void 0!==e.fn.api}},animate:{show:function(t,n){var i,a=n||U,o=n?function(){}:function(){C.hideSubMenus(),C.hideOthers(),C.set.active()};t=e.isFunction(t)?t:function(){},C.verbose("Doing menu show animation",a),C.set.direction(n),i=C.get.transition(n),C.is.selection()&&C.set.scrollPosition(C.get.selectedItem(),!0),(C.is.hidden(a)||C.is.animating(a))&&("none"==i?(o(),a.transition("show"),t.call(X)):void 0!==e.fn.transition&&j.transition("is supported")?a.transition({animation:i+" in",debug:k.debug,verbose:k.verbose,duration:k.duration,queue:!0,onStart:o,onComplete:function(){t.call(X)}}):C.error(I.noTransition,i))},hide:function(t,n){var i=n||U,a=(n?k.duration:k.duration,n?function(){}:function(){C.can.click()&&C.unbind.intent(),C.remove.active()}),o=C.get.transition(n);t=e.isFunction(t)?t:function(){},(C.is.visible(i)||C.is.animating(i))&&(C.verbose("Doing menu hide animation",i),"none"==o?(a(),i.transition("hide"),t.call(X)):void 0!==e.fn.transition&&j.transition("is supported")?i.transition({animation:o+" out",duration:k.duration,debug:k.debug,verbose:k.verbose,queue:!1,onStart:a,onComplete:function(){t.call(X)}}):C.error(I.transition))}},hideAndClear:function(){C.remove.searchTerm(),C.has.maxSelections()||(C.has.search()?C.hide((function(){C.remove.filteredItem()})):C.hide())},delay:{show:function(){C.verbose("Delaying show event to ensure user intent"),clearTimeout(C.timer),C.timer=setTimeout(C.show,k.delay.show)},hide:function(){C.verbose("Delaying hide event to ensure user intent"),clearTimeout(C.timer),C.timer=setTimeout(C.hide,k.delay.hide)}},escape:{value:function(t){var n=e.isArray(t),i="string"==typeof t,a=!i&&!n,o=i&&-1!==t.search(D.quote),r=[];return a||!o?t:(C.debug("Encoding quote values for use in select",t),n?(e.each(t,(function(e,t){r.push(t.replace(D.quote,"&quot;"))})),r):t.replace(D.quote,"&quot;"))},string:function(e){return(e=String(e)).replace(D.escape,"\\$&")}},setting:function(t,n){if(C.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,k,t);else{if(void 0===n)return k[t];e.isPlainObject(k[t])?e.extend(!0,k[t],n):k[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,C,t);else{if(void 0===n)return C[t];C[t]=n}},debug:function(){!k.silent&&k.debug&&(k.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,k.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!k.silent&&k.verbose&&k.debug&&(k.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,k.name+":"),C.verbose.apply(console,arguments)))},error:function(){k.silent||(C.error=Function.prototype.bind.call(console.error,console,k.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var t,n;k.performance&&(n=(t=(new Date).getTime())-(l||t),l=t,d.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:X,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){var t=k.name+":",n=0;l=!1,clearTimeout(C.performance.timer),e.each(d,(function(e,t){n+=t["Execution Time"]})),t+=" "+n+"ms",s&&(t+=" '"+s+"'"),(void 0!==console.group||void 0!==console.table)&&d.length>0&&(console.groupCollapsed(t),console.table?console.table(d):e.each(d,(function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")})),console.groupEnd()),d=[]}},invoke:function(t,n,i){var o,r,s,c=G;return n=n||f,i=X||i,"string"==typeof t&&void 0!==c&&(t=t.split(/[\. ]/),o=t.length-1,e.each(t,(function(n,i){var a=n!=o?i+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[a])&&n!=o)c=c[a];else{if(void 0!==c[a])return r=c[a],!1;if(!e.isPlainObject(c[i])||n==o)return void 0!==c[i]?(r=c[i],!1):(C.error(I.method,t),!1);c=c[i]}}))),e.isFunction(r)?s=r.apply(i,n):void 0!==r&&(s=r),e.isArray(a)?a.push(s):void 0!==a?a=[a,s]:void 0!==s&&(a=s),r}},h?(void 0===G&&C.initialize(),C.invoke(u)):(void 0!==G&&G.invoke("destroy"),C.initialize())})),void 0!==a?a:o},e.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:t,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onLabelSelect:function(e){},onLabelCreate:function(t,n){return e(this)},onLabelRemove:function(e){return!0},onNoResults:function(e){return!0},onShow:function(){},onHide:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>"},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",value:"value",text:"text"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> input.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered"},className:{active:"active",addition:"addition",animating:"animating",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",upward:"upward",leftward:"left",visible:"visible"}},e.fn.dropdown.settings.templates={dropdown:function(t){var n=t.placeholder||!1,i=(t.values,"");return i+='<i class="dropdown icon"></i>',t.placeholder?i+='<div class="default text">'+n+"</div>":i+='<div class="text"></div>',i+='<div class="menu">',e.each(t.values,(function(e,t){i+=t.disabled?'<div class="disabled item" data-value="'+t.value+'">'+t.name+"</div>":'<div class="item" data-value="'+t.value+'">'+t.name+"</div>"})),i+="</div>"},menu:function(t,n){var i=t[n.values]||{},a="";return e.each(i,(function(e,t){var i=t[n.text]?'data-text="'+t[n.text]+'"':"",o=t[n.disabled]?"disabled ":"";a+='<div class="'+o+'item" data-value="'+t[n.value]+'"'+i+">",a+=t[n.name],a+="</div>"})),a},label:function(e,t){return t+'<i class="delete icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document)},function(e,t,n){"use strict";n.r(t);n(3);var i=n(0),a=n.n(i),o=n(1),r=n.n(o);$((function(){var e,t,i,o,s;return a.a.async((function(c){for(;;)switch(c.prev=c.next){case 0:if(e=document.getElementById("graph-canvas")){c.next=3;break}return c.abrupt("return");case 3:return c.next=5,a.a.awrap(Promise.all([n.e(0).then(n.bind(null,13)),n.e(0).then(n.t.bind(null,14,7))]));case 5:t=c.sent,i=r()(t,1),o=i[0].default,s=[],$("#graph-raw-list li span.node-relation").each((function(){s.push($(this).text())})),o(e,s);case 11:case"end":return c.stop()}}))}));var s,c,l,d,u;n(8);function h(e){return jQuery("<div />").text(e).html()}function f(e){var t=e.find(".tabular.menu");t.find(".item").tab(),t.find('.item[data-tab="'.concat(t.data("preview"),'"]')).click((function(){var n=$(this);$.post(n.data("url"),{_csrf:s,mode:"gfm",context:n.data("context"),text:e.find('.tab.segment[data-tab="'.concat(t.data("write"),'"] textarea')).val()},(function(n){var i=e.find('.tab.segment[data-tab="'.concat(t.data("preview"),'"]'));i.html(n),emojify.run(i[0]),$("pre code",i[0]).each((function(){hljs.highlightBlock(this)}))}))})),S()}function m(){var e,t;0!==$(".edit.form").length&&(!function(e){var t=e.find(".tabular.menu");t.find(".item").tab();var n=t.find('.item[data-tab="'.concat(t.data("preview"),'"]'));n.length&&(l=n.data("preview-file-modes").split(","),n.click((function(){var n=$(this);$.post(n.data("url"),{_csrf:s,mode:"gfm",context:n.data("context"),text:e.find('.tab.segment[data-tab="'.concat(t.data("write"),'"] textarea')).val()},(function(n){var i=e.find('.tab.segment[data-tab="'.concat(t.data("preview"),'"]'));i.html(n),emojify.run(i[0]),$("pre code",i[0]).each((function(){hljs.highlightBlock(this)}))}))})))}($(".edit.form")),e=$(".edit.form"),(t=e.find(".tabular.menu")).find(".item").tab(),t.find('.item[data-tab="'.concat(t.data("diff"),'"]')).click((function(){var n=$(this);$.post(n.data("url"),{_csrf:s,context:n.data("context"),content:e.find('.tab.segment[data-tab="'.concat(t.data("write"),'"] textarea')).val()},(function(n){var i=e.find('.tab.segment[data-tab="'.concat(t.data("diff"),'"]'));i.html(n),emojify.run(i[0])}))})))}function v(e,t,n,i){return new Promise((function(a){$.ajax({type:"POST",url:e,data:{_csrf:s,action:t,issue_ids:n,id:i},success:a})}))}function p(){window.location.reload()}function g(e){e.each((function(){var e=this;e.addEventListener("paste",(function(t){!function(e,t){if(e.clipboardData){var n=e.clipboardData.items;if(void 0!==n)for(var i=0;i<n.length;i++)if(-1!==n[i].type.indexOf("image")){var a=n[i].getAsFile();"function"==typeof t&&(e.preventDefault(),e.stopPropagation(),t(a))}}}(t,(function(t){var n=t.name.substr(0,t.name.lastIndexOf("."));!function(e,t){if(e.selectionStart||0===e.selectionStart){var n=e.selectionStart,i=e.selectionEnd;e.value=e.value.substring(0,n)+t+e.value.substring(i,e.value.length),e.selectionStart=n+t.length,e.selectionEnd=n+t.length}else e.value+=t}(e,"![".concat(n,"]()")),function(e,t){var n=new XMLHttpRequest;n.onload=function(){200===n.status&&t(n.responseText)},n.open("post","".concat(c,"/attachments"),!0),n.setRequestHeader("X-Csrf-Token",s);var i=new FormData;i.append("file",e,e.name),n.send(i)}(t,(function(t){var i=JSON.parse(t);!function(e,t,n){if(e.selectionStart||0===e.selectionStart){var i=e.selectionStart,a=e.selectionEnd;e.value=e.value.replace(t,n),e.selectionStart=i+n.length-t.length,e.selectionEnd=a+n.length-t.length}else e.value=e.value.replace(t,n)}(e,"![".concat(n,"]()"),"![".concat(n,"](").concat(c,"/attachments/").concat(i.uuid,")"));var a=$('<input id="'.concat(i.uuid,'" name="files" type="hidden">')).val(i.uuid);$(".files").append(a)}))}))}),!1)}))}function b(){var e;0!==$(".comment.form").length&&((e=$(".ui.select-branch")).find(".reference-list-menu").find(".item:not(.no-select)").click((function(){var t=$(this).data("id");$($(this).data("id-selector")).val(t),e.find(".ui .branch-name").text(t)})),e.find(".reference.column").click((function(){return e.find(".scrolling.reference-list-menu").css("display","none"),e.find(".reference .text").removeClass("black"),$($(this).data("target")).css("display","block"),$(this).find(".text").addClass("black"),!1})),f($(".comment.form")),g($(".comment.form textarea")),t("select-label","labels"),t("select-assignees","assignees"),t("select-assignees-modify","assignees"),n(".select-milestone","#milestone_id"),n(".select-assignee","#assignee_id"));function t(e,t){var n=$(".ui.".concat(t,".list")),i=n.find(".no-select"),a=$(".".concat(e," .menu")),o="update"===a.data("action"),r={};$(".".concat(e)).dropdown("setting","onHide",(function(){if(o="update"===a.data("action")){var e=[];Object.keys(r).forEach((function(t){var n=r[t],i=v(n["update-url"],n.action,n["issue-id"],t);e.push(i)})),Promise.all(e).then(p)}})),a.find(".item:not(.no-select)").click((function(){if("select-assignees-modify"===e)return $(this).hasClass("checked")?($(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check")):($(this).addClass("checked"),$(this).find(".octicon").addClass("octicon-check")),v(a.data("update-url"),"",a.data("issue-id"),$(this).data("id")),a.data("action","update"),!1;$(this).hasClass("checked")?($(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check"),o&&($(this).data("id")in r?delete r[$(this).data("id")]:r[$(this).data("id")]={"update-url":a.data("update-url"),action:"detach","issue-id":a.data("issue-id")})):($(this).addClass("checked"),$(this).find(".octicon").addClass("octicon-check"),o&&($(this).data("id")in r?delete r[$(this).data("id")]:r[$(this).data("id")]={"update-url":a.data("update-url"),action:"attach","issue-id":a.data("issue-id")}));var t=[];return $(this).parent().find(".item").each((function(){$(this).hasClass("checked")?(t.push($(this).data("id")),$($(this).data("id-selector")).removeClass("hide")):$($(this).data("id-selector")).addClass("hide")})),0===t.length?i.removeClass("hide"):i.addClass("hide"),$($(this).parent().data("id")).val(t.join(",")),!1})),a.find(".no-select.item").click((function(){(o||"select-assignees-modify"===e)&&v(a.data("update-url"),"clear",a.data("issue-id"),"").then(p),$(this).parent().find(".item").each((function(){$(this).removeClass("checked"),$(this).find(".octicon").removeClass("octicon-check")})),n.find(".item").each((function(){$(this).addClass("hide")})),i.removeClass("hide"),$($(this).parent().data("id")).val("")}))}function n(e,t){var n=$("".concat(e," .menu")),i=$(".ui".concat(e,".list")),a="update"===n.data("action");n.find(".item:not(.no-select)").click((function(){switch($(this).parent().find(".item").each((function(){$(this).removeClass("selected active")})),$(this).addClass("selected active"),a&&v(n.data("update-url"),"",n.data("issue-id"),$(this).data("id")).then(p),t){case"#milestone_id":i.find(".selected").html('<a class="item" href='.concat($(this).data("href"),">").concat(h($(this).text()),"</a>"));break;case"#assignee_id":i.find(".selected").html('<a class="item" href='.concat($(this).data("href"),">")+'<img class="ui avatar image" src='.concat($(this).data("avatar"),">").concat(h($(this).text()),"</a>"))}$(".ui".concat(e,".list .no-select")).addClass("hide"),$(t).val($(this).data("id"))})),n.find(".no-select.item").click((function(){$(this).parent().find(".item:not(.no-select)").each((function(){$(this).removeClass("selected active")})),a&&v(n.data("update-url"),"",n.data("issue-id"),$(this).data("id")).then(p),i.find(".selected").html(""),i.find(".no-select").removeClass("hide"),$(t).val("")}))}}function w(){if(0!==$(".repository").length){if(($(".repository.file.list").length>0||".repository.commits".length>0)&&$(".choose.reference .dropdown").each((function(){var e=$(this).find(".data"),t={items:[],mode:e.data("mode"),searchTerm:"",noResults:"",canCreateBranch:!1,menuVisible:!1,active:0};e.find(".item").each((function(){t.items.push({name:$(this).text(),url:$(this).data("url"),branch:$(this).hasClass("branch"),tag:$(this).hasClass("tag"),selected:$(this).hasClass("selected")})})),e.remove(),new Vue({delimiters:["${","}"],el:this,data:t,beforeMount:function(){var e=this;this.noResults=e.$el.getAttribute("data-no-results"),this.canCreateBranch="true"===e.$el.getAttribute("data-can-create-branch"),document.body.addEventListener("click",(function(t){e.$el.contains(t.target)||e.menuVisible&&Vue.set(e,"menuVisible",!1)}))},watch:{menuVisible:function(e){e&&this.focusSearchField()}},computed:{filteredItems:function(){var e=this,t=e.items.filter((function(t){return("branches"===e.mode&&t.branch||"tags"===e.mode&&t.tag)&&(!e.searchTerm||t.name.toLowerCase().indexOf(e.searchTerm.toLowerCase())>=0)}));return e.active=0===t.length&&e.showCreateNewBranch?0:-1,t},showNoResults:function(){return 0===this.filteredItems.length&&!this.showCreateNewBranch},showCreateNewBranch:function(){var e=this;return!(!this.canCreateBranch||!e.searchTerm||"tags"===e.mode)&&0===e.items.filter((function(t){return t.name.toLowerCase()===e.searchTerm.toLowerCase()})).length}},methods:{selectItem:function(e){var t=this.getSelected();null!==t&&(t.selected=!1),e.selected=!0,window.location.href=e.url},createNewBranch:function(){this.showCreateNewBranch&&this.$refs.newBranchForm.submit()},focusSearchField:function(){var e=this;Vue.nextTick((function(){e.$refs.searchField.focus()}))},getSelected:function(){for(var e=0,t=this.items.length;e<t;++e)if(this.items[e].selected)return this.items[e];return null},getSelectedIndexInFiltered:function(){for(var e=0,t=this.filteredItems.length;e<t;++e)if(this.filteredItems[e].selected)return e;return-1},scrollToActive:function(){var e=this.$refs["listItem".concat(this.active)];if(e&&0!==e.length){Array.isArray(e)&&(e=e[0]);var t=this.$refs.scrollContainer;e.offsetTop<t.scrollTop?t.scrollTop=e.offsetTop:e.offsetTop+e.clientHeight>t.scrollTop+t.clientHeight&&(t.scrollTop=e.offsetTop+e.clientHeight-t.clientHeight)}},keydown:function(e){var t=this;if(40===e.keyCode){if(e.preventDefault(),-1===t.active&&(t.active=t.getSelectedIndexInFiltered()),t.active+(t.showCreateNewBranch?0:1)>=t.filteredItems.length)return;t.active++,t.scrollToActive()}if(38===e.keyCode){if(e.preventDefault(),-1===t.active&&(t.active=t.getSelectedIndexInFiltered()),t.active<=0)return;t.active--,t.scrollToActive()}13===e.keyCode&&(e.preventDefault(),t.active>=t.filteredItems.length?t.createNewBranch():t.active>=0&&t.selectItem(t.filteredItems[t.active])),27===e.keyCode&&(e.preventDefault(),t.menuVisible=!1)}}})})),$(".repository.wiki.view").length>0&&l(".choose.page .dropdown"),$(".repository.settings.options").length>0&&($("#repo_name").keyup((function(){var e=$("#repo-name-change-prompt");$(this).val().toString().toLowerCase()!==$(this).data("name").toString().toLowerCase()?e.show():e.hide()})),$(".enable-system").change((function(){this.checked?($($(this).data("target")).removeClass("disabled"),$(this).data("context")||$($(this).data("context")).addClass("disabled")):($($(this).data("target")).addClass("disabled"),$(this).data("context")||$($(this).data("context")).removeClass("disabled"))})),$(".enable-system-radio").change((function(){"false"===this.value?($($(this).data("target")).addClass("disabled"),void 0!==$(this).data("context")&&$($(this).data("context")).removeClass("disabled")):"true"===this.value&&($($(this).data("target")).removeClass("disabled"),void 0!==$(this).data("context")&&$($(this).data("context")).addClass("disabled"))}))),$(".repository.labels").length>0){var e=$(".new-label.segment");$(".new-label.button").click((function(){e.show()})),$(".new-label.segment .cancel").click((function(){e.hide()})),$(".color-picker").each((function(){$(this).minicolors()})),$(".precolors .color").click((function(){var e=$(this).data("color-hex");$(".color-picker").val(e),$(".minicolors-swatch-color").css("background-color",e)})),$(".edit-label-button").click((function(){return $("#label-modal-id").val($(this).data("id")),$(".edit-label .new-label-input").val($(this).data("title")),$(".edit-label .new-label-desc-input").val($(this).data("description")),$(".edit-label .color-picker").val($(this).data("color")),$(".minicolors-swatch-color").css("background-color",$(this).data("color")),$(".edit-label.modal").modal({onApprove:function(){$(".edit-label.form").submit()}}).modal("show"),!1}))}if($(".repository.new.milestone").length>0){var t=$(".milestone.datepicker");t.datetimepicker({lang:t.data("lang"),inline:!0,timepicker:!1,startDate:t.data("start-date"),formatDate:"Y-m-d",onSelectDate:function(e){$("#deadline").val(e.dateFormat("Y-m-d"))}}),$("#clear-date").click((function(){return $("#deadline").val(""),!1}))}if($(".repository.view.issue").length>0){var n=$("#issue-title"),i=$("#edit-title-input input"),a=function(){return n.toggle(),$(".not-in-edit").toggle(),$("#edit-title-input").toggle(),$(".in-edit").toggle(),i.focus(),!1};$("#edit-title").click(a),$("#cancel-edit-title").click(a),$("#save-edit-title").click(a).click((function(){return 0===i.val().length||i.val()===n.text()?(i.val(n.text()),!1):($.post($(this).data("update-url"),{_csrf:s,title:i.val()},(function(e){i.val(e.title),n.text(e.title),p()})),!1)})),0!==$(".repository.view.issue .comments").length&&$(document).click((function(e){var t=$(":target");if(0!==t.length){var n=t.attr("id");if(n&&/^(issue|pull)(comment)?-\d+$/.test(n)&&0===$(e.target).closest("#".concat(n)).length){var i=$(window).scrollTop();window.location.hash="",$(window).scrollTop(i),window.history.pushState(null,null," ")}}})),$(".context-dropdown").dropdown({action:"hide"}),$(".quote-reply").click((function(e){$(this).closest(".dropdown").find(".menu").toggle("visible");var t,n=$(this).data("target");if($(this).hasClass("quote-reply-diff")){var i=$(this).closest(".comment-code-cloud");i.find("button.comment-form-reply").click(),t=i.find('[name="content"]')}else t=$("#content");var a=$("#comment-".concat(n)).text().replace(/\n/g,"\n> "),o="> ".concat(a,"\n\n");""!==t.val()?t.val("".concat(t.val(),"\n\n").concat(o)):t.val("".concat(o)),t.focus(),e.preventDefault()})),$(".edit-content").click((function(e){$(this).closest(".dropdown").find(".menu").toggle("visible");var t,n=$(this).closest(".header").next(),i=n.find(".edit-content-zone"),a=n.find(".render-content"),o=n.find(".raw-content");if(0===i.html().length){i.html($("#edit-content-form").html()),t=i.find("textarea"),issuesTribute.attach(t.get()),emojiTribute.attach(t.get());var r=i.find(".dropzone");r.data("saved",!1);var c=i.find(".comment-files");if(r.length>0){var l={};r.dropzone({url:r.data("upload-url"),headers:{"X-Csrf-Token":s},maxFiles:r.data("max-file"),maxFilesize:r.data("max-size"),acceptedFiles:"*/*"===r.data("accepts")?null:r.data("accepts"),addRemoveLinks:!0,dictDefaultMessage:r.data("default-message"),dictInvalidFileType:r.data("invalid-input-type"),dictFileTooBig:r.data("file-too-big"),dictRemoveFile:r.data("remove-file"),init:function(){this.on("success",(function(e,t){l[e.name]={uuid:t.uuid,submitted:!1};var n=$('<input id="'.concat(t.uuid,'" name="files" type="hidden">')).val(t.uuid);c.append(n)})),this.on("removedfile",(function(e){e.name in l&&($("#".concat(l[e.name].uuid)).remove(),r.data("remove-url")&&r.data("csrf")&&!l[e.name].submitted&&$.post(r.data("remove-url"),{file:l[e.name].uuid,_csrf:r.data("csrf")}))})),this.on("submit",(function(){$.each(l,(function(e){l[e].submitted=!0}))})),this.on("reload",(function(){$.getJSON(i.data("attachment-url"),(function(e){var t=r.get(0).dropzone;t.removeAllFiles(!0),c.empty(),$.each(e,(function(){var e="".concat(r.data("upload-url"),"/").concat(this.uuid);t.emit("addedfile",this),t.emit("thumbnail",this,e),t.emit("complete",this),t.files.push(this),l[this.name]={submitted:!0,uuid:this.uuid},r.find("img[src='".concat(e,"']")).css("max-width","100%");var n=$('<input id="'.concat(this.uuid,'" name="files" type="hidden">')).val(this.uuid);c.append(n)}))}))}))}}),r.get(0).dropzone.emit("reload")}var d=i.find(".ui.comment.form"),u=d.find(".tabular.menu");u.attr("data-write",i.data("write")),u.attr("data-preview",i.data("preview")),u.find(".write.item").attr("data-tab",i.data("write")),u.find(".preview.item").attr("data-tab",i.data("preview")),d.find(".write.segment").attr("data-tab",i.data("write")),d.find(".preview.segment").attr("data-tab",i.data("preview")),f(d),i.find(".cancel.button").click((function(){a.show(),i.hide(),r.get(0).dropzone.emit("reload")})),i.find(".save.button").click((function(){a.show(),i.hide();var e=c.find("[name=files]").map((function(){return $(this).val()})).get();$.post(i.data("update-url"),{_csrf:s,content:t.val(),context:i.data("context"),files:e},(function(e){0===e.length?a.html($("#no-content").html()):(a.html(e.content),emojify.run(a[0]),$("pre code",a[0]).each((function(){hljs.highlightBlock(this)})));var t=n.parent();t.find(".ui.small.images").length?""===e.attachments?t.find(".ui.small.images").parent().remove():t.find(".ui.small.images").html(e.attachments):""!==e.attachments&&(t.append('<div class="ui bottom attached segment"><div class="ui small images"></div></div>'),t.find(".ui.small.images").html(e.attachments)),r.get(0).dropzone.emit("submit"),r.get(0).dropzone.emit("reload")}))}))}else t=n.find("textarea");i.show(),a.hide(),0===t.val().length&&t.val(o.text()),t.focus(),e.preventDefault()})),$(".delete-comment").click((function(){var e=$(this);return window.confirm(e.data("locale"))&&$.post(e.data("url"),{_csrf:s}).success((function(){$("#".concat(e.data("comment-id"))).remove()})),!1}));var o=$("#status-button");$("#comment-form .edit_area").keyup((function(){0===$(this).val().length?o.text(o.data("status")):o.text(o.data("status-and-comment"))})),o.click((function(){$("#status").val(o.data("status-val")),$("#comment-form").submit()}));var r=$(".merge-button > button");r.on("click",(function(e){e.preventDefault(),$(".".concat($(this).data("do"),"-fields")).show(),$(this).parent().hide()})),$(".merge-button > .dropdown").dropdown({onChange:function(e,t,n){n.data("do")&&(r.find(".button-text").text(n.text()),r.data("do",n.data("do")))}}),$(".merge-cancel").on("click",(function(e){e.preventDefault(),$(this).closest(".form").hide(),r.parent().show()})),function e(t){var n="";t||(t=$(document),n=".reactions > "),t.find("".concat(n,"a.label")).popup({position:"bottom left",metadata:{content:"title",title:"none"}}),t.find(".select-reaction > .menu > .item, ".concat(n,"a.label")).on("click",(function(t){var n=this;if(t.preventDefault(),!$(this).hasClass("disabled")){var i=$(this).hasClass("item")?$(this).closest(".select-reaction").data("action-url"):$(this).data("action-url"),a="".concat(i,"/").concat($(this).hasClass("blue")?"unreact":"react");$.ajax({type:"POST",url:a,data:{_csrf:s,content:$(this).data("content")}}).done((function(t){if(t&&(t.html||t.empty)){var i=$(n).closest(".content"),a=i.find(".segment.reactions");if(!t.empty&&a.length>0&&a.remove(),!t.empty){a=$('<div class="ui attached segment reactions"></div>');var o=i.find(".segment.bottom:first");o.length>0?a.insertBefore(o):a.appendTo(i),a.html(t.html);for(var r=a.find(".has-emoji"),s=0;s<r.length;s++)emojify.run(r.get(s));a.find(".dropdown").dropdown(),e(a)}}}))}}))}()}$(".repository.diff").length>0&&$(".diff-counter").each((function(){var e=$(this),t=e.find("span[data-line].add").data("line"),n=e.find("span[data-line].del").data("line"),i=parseFloat(t)/(parseFloat(t)+parseFloat(n))*100;e.find(".bar .add").css("width","".concat(i,"%"))})),$("#repo-clone-ssh").click((function(){$(".clone-url").text($(this).data("link")),$("#repo-clone-url").val($(this).data("link")),$(this).addClass("blue"),$("#repo-clone-https").removeClass("blue"),localStorage.setItem("repo-clone-protocol","ssh")})),$("#repo-clone-https").click((function(){$(".clone-url").text($(this).data("link")),$("#repo-clone-url").val($(this).data("link")),$(this).addClass("blue"),$("#repo-clone-ssh").removeClass("blue"),localStorage.setItem("repo-clone-protocol","https")})),$("#repo-clone-url").click((function(){$(this).select()}));var c=$(".repository.compare.pull");c.length>0&&(l(".choose.branch .dropdown"),c.find("button.show-form").on("click",(function(e){e.preventDefault(),c.find(".pullrequest-form").show(),$(this).parent().hide()}))),$(".repository.settings.branches").length>0&&(l(".protected-branches .dropdown"),$(".enable-protection, .enable-whitelist").change((function(){this.checked?$($(this).data("target")).removeClass("disabled"):$($(this).data("target")).addClass("disabled")})))}function l(e){var t=$(e);t.dropdown({fullTextSearch:!0,selectOnKeydown:!1,onChange:function(e,t,n){n.data("url")&&(window.location.href=n.data("url"))},message:{noResults:t.data("no-results")}})}}function y(e){var t=Math.floor(Math.random()*Math.floor(1e6));return e.attr("data-write",e.attr("data-write")+t),e.attr("data-preview",e.attr("data-preview")+t),e.find(".item").each((function(){var e=$(this).attr("data-tab")+t;$(this).attr("data-tab",e)})),e.parent().find("*[data-tab='write']").attr("data-tab","write".concat(t)),e.parent().find("*[data-tab='preview']").attr("data-tab","preview".concat(t)),f(e.parent(".form")),t}function x(){$(".access-mode.menu .item").click((function(){var e=$(this).parent();$.post(e.data("url"),{_csrf:s,uid:e.data("uid"),mode:$(this).data("value")})}))}function C(){$(".js-quick-pull-choice-option").change((function(){"commit-to-new-branch"===$(this).val()?($(".quick-pull-branch-name").show(),$(".quick-pull-branch-name input").prop("required",!0)):($(".quick-pull-branch-name").hide(),$(".quick-pull-branch-name input").prop("required",!1)),$("#commit-button").text($(this).attr("button_text"))}));var e=$("#file-name");e.keyup((function(e){var t,n,i=$(".breadcrumb span.section"),a=$(".breadcrumb div.divider");if(8===e.keyCode&&0===$(this).getCursorPosition()&&i.length>0&&(t=i.last().find("a").text(),$(this).val(t+$(this).val()),$(this)[0].setSelectionRange(t.length,t.length),i.last().remove(),a.last().remove()),191===e.keyCode){n=$(this).val().split("/");for(var o=0;o<n.length;++o)t=n[o],o<n.length-1?t.length&&($('<span class="section"><a href="#">'.concat(t,"</a></span>")).insertBefore($(this)),$('<div class="divider"> / </div>').insertBefore($(this))):$(this).val(t),$(this)[0].setSelectionRange(0,0)}n=[],$(".breadcrumb span.section").each((function(){var e=$(this);e.find("a").length?n.push(e.find("a").text()):n.push(e.text())})),$(this).val()&&n.push($(this).val()),$("#tree_path").val(n.join("/"))})).trigger("keyup");var t=$(".repository.editor textarea#edit_area");if(t.length){var n=t.data("markdown-file-exts").split(","),i=t.data("line-wrap-extensions").split(",");e.on("keyup",(function(){var a,o,r,c,h,f,m=e.val();r=c="";var v=/.+\.([^.]+)$/.exec(m);v&&(r=v[1],c=".".concat(r));var p=CodeMirror.findModeByExtension(r),g=$("a[data-tab=preview]");if(p?(a=p.mode,o=p.mime,f=a):f=r,g.length&&f&&l&&l.length&&l.indexOf(f)>=0?(h=g.data("url"),g.data("url",h.replace(/(.*)\/.*/i,"$1/".concat(a))),g.show()):g.hide(),!(n.indexOf(c)>=0&&function(e){return u&&(u.toTextArea(),u=null),!!d||(d=new SimpleMDE({autoDownloadFontAwesome:!1,element:e[0],forceSync:!0,renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,previewRender:function(t,n){return setTimeout((function(){$.post(e.data("url"),{_csrf:s,mode:"gfm",context:e.data("context"),text:t},(function(e){n.innerHTML='<div class="markdown ui segment">'.concat(e,"</div>"),emojify.run($(".editor-preview")[0])}))}),0),"Loading..."},toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|","code","quote","|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","clean-block","preview","fullscreen","side-by-side"]}),!0)}(t))&&(u||function(e){return d&&(d.toTextArea(),d=null),!!u||((u=CodeMirror.fromTextArea(e[0],{lineNumbers:!0})).on("change",(function(t,n){e.val(t.getValue())})),!0)}(t))){a&&(u.setOption("mode",o),CodeMirror.autoLoadMode(u,a)),i.indexOf(c)>=0?u.setOption("lineWrapping",!0):u.setOption("lineWrapping",!1);var b=e.val();0!==b.length&&(b=(b=b.split("/"))[b.length-1],$.getJSON(e.data("ec-url-prefix")+b,(function(e){"tab"===e.indent_style?(u.setOption("indentWithTabs",!0),u.setOption("extraKeys",{})):(u.setOption("indentWithTabs",!1),u.setOption("extraKeys",{Tab:function(e){var t=Array(parseInt(e.getOption("indentUnit"))+1).join(" ");e.replaceSelection(t)}})),u.setOption("indentUnit",e.indent_size||4),u.setOption("tabSize",e.tab_width||4)})))}})).trigger("keyup");var a=$("#commit-button"),o=$(".ui.edit.form");a.prop("disabled",!0),o.areYouSure({silent:!0,dirtyClass:"dirty-file",fieldSelector:":input:not(.commit-form-wrapper :input)",change:function(){var e=$(this).hasClass("dirty-file");a.prop("disabled",!e)}}),a.click((function(e){0===t.val().length&&($("#edit-empty-content-modal").modal({onApprove:function(){$(".edit.form").submit()}}).modal("show"),e.preventDefault())}))}}function k(){$(".user.settings.profile").length>0&&$("#username").keyup((function(){var e=$("#name-change-prompt");$(this).val().toString().toLowerCase()!==$(this).data("name").toString().toLowerCase()?e.show():e.hide()}))}function S(){$(".ui.button").keypress((function(e){13!==e.keyCode&&32!==e.keyCode||$(this).click()}))}function _(){$(".code-view .linenums").length>0&&($(document).on("click",".lines-num span",(function(e){var t=$(this),n=t.parent().siblings(".lines-code").find("ol.linenums > li");O(n,n.filter("[rel=".concat(t.attr("id"),"]")),e.shiftKey?n.filter(".active").eq(0):null),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()})),$(window).on("hashchange",(function(){var e,t=window.location.hash.match(/^#(L\d+)-(L\d+)$/),n=$(".code-view ol.linenums > li");if(t)return e=n.filter(".".concat(t[1])),O(n,e,n.filter(".".concat(t[2]))),void $("html, body").scrollTop(e.offset().top-200);(t=window.location.hash.match(/^#(L|n)(\d+)$/))&&(e=n.filter(".L".concat(t[2])),O(n,e),$("html, body").scrollTop(e.offset().top-200))})).trigger("hashchange")),$(".ui.fold-code").on("click",(function(e){var t=$(e.target);t.hasClass("fa-chevron-down")?$(e.target).parent().next().slideUp("fast",(function(){t.removeClass("fa-chevron-down").addClass("fa-chevron-right")})):$(e.target).parent().next().slideDown("fast",(function(){t.removeClass("fa-chevron-right").addClass("fa-chevron-down")}))})),$(".ui.blob-excerpt").on("click",(function(e){!function e(t){var n=$(t.target),i=n.parent().parent();$.get("".concat(n.data("url"),"?").concat(n.data("query"),"&anchor=").concat(n.data("anchor")),(function(t){i.replaceWith(t),$('[data-anchor="'.concat(n.data("anchor"),'"]')).on("click",(function(t){e(t)}))}))}(e)}))}function T(e){$.ajax({url:"".concat(c,"/user/u2f/sign"),type:"POST",headers:{"X-Csrf-Token":s},data:JSON.stringify(e),contentType:"application/json; charset=utf-8"}).done((function(e){window.location.replace(e)})).fail((function(){L(1)}))}function A(e){(function(e){if(!("errorCode"in e))return!1;if(0===e.errorCode)return!1;return L(e.errorCode),!0})(e)||$.ajax({url:"".concat(c,"/user/settings/security/u2f/register"),type:"POST",headers:{"X-Csrf-Token":s},data:JSON.stringify(e),contentType:"application/json; charset=utf-8",success:function(){p()},fail:function(){L(1)}})}function L(e){var t={browser:$("#unsupported-browser"),1:$("#u2f-error-1"),2:$("#u2f-error-2"),3:$("#u2f-error-3"),4:$("#u2f-error-4"),5:$(".u2f-error-5")};t[e].removeClass("hide"),Object.keys(t).forEach((function(n){n!==e&&t[n].addClass("hide")})),$("#u2f-error").modal("show")}function q(){$.post("".concat(c,"/user/settings/security/u2f/request_register"),{_csrf:s,name:$("#nickname").val()}).success((function(e){$("#nickname").closest("div.field").removeClass("error"),$("#register-device").modal("show"),null===e.registeredKeys&&(e.registeredKeys=[]),u2fApi.register(e.appId,e.registerRequests,e.registeredKeys,30).then(A).catch((function(e){L(void 0!==e?e.metaData.code:1)}))})).fail((function(e){409===e.status&&$("#nickname").closest("div.field").addClass("error")}))}function D(e){window.history.pushState?window.history.pushState(null,null,e):window.location.hash=e}function O(e,t,n){if(e.removeClass("active"),n){var i,a=parseInt(t.attr("rel").substr(1)),o=parseInt(n.attr("rel").substr(1));if(a!==o){a>o&&(i=a,a=o,o=i);for(var r=[],s=a;s<=o;s++)r.push(".L".concat(s));return e.filter(r.join(",")).addClass("active"),void D("#L".concat(a,"-L").concat(o))}}t.addClass("active"),D("#".concat(t.attr("rel")))}function I(){var e=$(this),t="";e.attr("id")&&(t+="#".concat(e.attr("id")));var n=$(".delete.modal".concat(t));return n.find(".name").text(e.data("name")),n.modal({closable:!1,onApprove:function(){"form"!==e.data("type")?$.post(e.data("url"),{_csrf:s,id:e.data("id")}).done((function(e){window.location.href=e.redirect})):$(e.data("form")).submit()}}).modal("show"),!1}function R(){var e=$(this),t="";e.attr("id")&&(t+="#".concat(e.attr("id")));var n=$(".addall.modal".concat(t));return n.find(".name").text(e.data("name")),n.modal({closable:!1,onApprove:function(){"form"!==e.data("type")?$.post(e.data("url"),{_csrf:s,id:e.data("id")}).done((function(e){window.location.href=e.redirect})):$(e.data("form")).submit()}}).modal("show"),!1}"undefined"!=typeof Dropzone&&(Dropzone.autoDiscover=!1),$.fn.getCursorPosition=function(){var e=$(this).get(0),t=0;if("selectionStart"in e)t=e.selectionStart;else if("selection"in document){e.focus();var n=document.selection.createRange(),i=document.selection.createRange().text.length;n.moveStart("character",-e.value.length),t=n.text.length-i}return t},$(document).ready((function(){if(s=$("meta[name=_csrf]").attr("content"),c=$("meta[name=_suburl]").attr("content"),$(".time-since").each((function(){$(this).addClass("poping up").attr("data-content",$(this).attr("title")).attr("data-variation","inverted tiny").attr("title","")})),$(".dropdown:not(.custom)").dropdown(),$(".jump.dropdown").dropdown({action:"hide",onShow:function(){$(".poping.up").popup("hide")}}),$(".slide.up.dropdown").dropdown({transition:"slide up"}),$(".upward.dropdown").dropdown({direction:"upward"}),$(".ui.accordion").accordion(),$(".ui.checkbox").checkbox(),$(".ui.progress").progress({showActivity:!1}),$(".poping.up").popup(),$(".top.menu .poping.up").popup({onShow:function(){if($(".top.menu .menu.transition").hasClass("visible"))return!1}}),$(".tabular.menu .item").tab(),$(".tabable.menu .item").tab(),$(".toggle.button").click((function(){$($(this).data("target")).slideToggle(100)})),$("tr[data-href]").click((function(){window.location=$(this).data("href")})),"undefined"!=typeof hljs)for(var e=[].slice.call(document.querySelectorAll("pre code")||[]),t=0;t<e.length;t++)hljs.highlightBlock(e[t]);var n=$("#dropzone");if(n.length>0){var i={};new Dropzone("#dropzone",{url:n.data("upload-url"),headers:{"X-Csrf-Token":s},maxFiles:n.data("max-file"),maxFilesize:n.data("max-size"),acceptedFiles:"*/*"===n.data("accepts")?null:n.data("accepts"),addRemoveLinks:!0,dictDefaultMessage:n.data("default-message"),dictInvalidFileType:n.data("invalid-input-type"),dictFileTooBig:n.data("file-too-big"),dictRemoveFile:n.data("remove-file"),init:function(){this.on("success",(function(e,t){i[e.name]=t.uuid;var n=$('<input id="'.concat(t.uuid,'" name="files" type="hidden">')).val(t.uuid);$(".files").append(n)})),this.on("removedfile",(function(e){e.name in i&&$("#".concat(i[e.name])).remove(),n.data("remove-url")&&n.data("csrf")&&$.post(n.data("remove-url"),{file:i[e.name],_csrf:n.data("csrf")})}))}})}emojify.setConfig({img_dir:"".concat(c,"/vendor/plugins/emojify/images"),ignore_emoticons:!0});for(var a=document.getElementsByClassName("has-emoji"),o=0;o<a.length;o++){emojify.run(a[o]);for(var r=0;r<a[o].childNodes.length;r++)"A"===a[o].childNodes[r].nodeName&&emojify.run(a[o].childNodes[r])}var l,d,u,f,g,A,D,O,E,F,j,M,N,z,P,V=new Clipboard(".clipboard");if(V.on("success",(function(e){e.clearSelection(),$("#".concat(e.trigger.getAttribute("id"))).popup("destroy"),e.trigger.setAttribute("data-content",e.trigger.getAttribute("data-success")),$("#".concat(e.trigger.getAttribute("id"))).popup("show"),e.trigger.setAttribute("data-content",e.trigger.getAttribute("data-original"))})),V.on("error",(function(e){$("#".concat(e.trigger.getAttribute("id"))).popup("destroy"),e.trigger.setAttribute("data-content",e.trigger.getAttribute("data-error")),$("#".concat(e.trigger.getAttribute("id"))).popup("show"),e.trigger.setAttribute("data-content",e.trigger.getAttribute("data-original"))})),$(".delete-button").click(I),$(".add-all-button").click(R),$(".delete-branch-button").click(I),$(".undo-button").click((function(){var e=$(this);$.post(e.data("url"),{_csrf:s,id:e.data("id")}).done((function(e){window.location.href=e.redirect}))})),$(".show-panel.button").click((function(){$($(this).data("panel")).show()})),$(".show-modal.button").click((function(){$($(this).data("modal")).modal("show")})),$(".delete-post.button").click((function(){var e=$(this);$.post(e.data("request-url"),{_csrf:s}).done((function(){window.location.href=e.data("done-url")}))})),$(".markdown").each((function(){var e={};$(this).find("h1, h2, h3, h4, h5, h6").each((function(){var t=$(this),n=encodeURIComponent(t.text().toLowerCase().replace(/[^\u00C0-\u1FFF\u2C00-\uD7FF\w\- ]/g,"").replace(/[ ]/g,"-")),i=n;e[n]>0&&(i="".concat(n,"-").concat(e[n])),void 0===e[n]?e[n]=1:e[n]+=1,(t=t.wrap('<div id="'.concat(i,'" class="anchor-wrap" ></div>'))).append('<a class="anchor" href="#'.concat(i,'"><span class="octicon octicon-link"></span></a>'))}))})),$(".issue-checkbox").click((function(){$(".issue-checkbox").children("input:checked").length>0?($("#issue-filters").addClass("hide"),$("#issue-actions").removeClass("hide")):($("#issue-filters").removeClass("hide"),$("#issue-actions").addClass("hide"))})),$(".issue-action").click((function(){var e=this.dataset.action,t=this.dataset.elementId,n=$(".issue-checkbox").children("input:checked").map((function(){return this.dataset.issueId})).get().join(),i=this.dataset.url;"0"===t&&"/assignee"===i.substr(-9)&&(t="",e="clear"),v(i,e,n,t).then((function(){"close"!==e&&"open"!==e||$('.issue-checkbox input[type="checkbox"]').each((function(e,t){t.checked=!1})),p()}))})),$('.issue-checkbox input[type="checkbox"]:checked').first().each((function(e,t){t.checked=!1,$(t).click()})),S(),$("#search-user-box").search({minCharacters:2,apiSettings:{url:"".concat(c,"/api/v1/users/search?q={query}"),onResponse:function(e){var t=[];return $.each(e.data,(function(e,n){var i=n.login;n.full_name&&n.full_name.length>0&&(i+=" (".concat(h(n.full_name),")")),t.push({title:i,image:n.avatar_url})})),{results:t}}},searchFields:["login","full_name"],showNoResults:!1}),(l=$("#search-team-box")).search({minCharacters:2,apiSettings:{url:"".concat(c,"/api/v1/orgs/").concat(l.data("org"),"/teams/search?q={query}"),headers:{"X-Csrf-Token":s},onResponse:function(e){var t=[];return $.each(e.data,(function(e,n){var i="".concat(n.name," (").concat(n.permission," access)");t.push({title:i})})),{results:t}}},searchFields:["name","description"],showNoResults:!1}),(d=$("#search-repo-box")).search({minCharacters:2,apiSettings:{url:"".concat(c,"/api/v1/repos/search?q={query}&uid=").concat(d.data("uid")),onResponse:function(e){var t=[];return $.each(e.data,(function(e,n){t.push({title:n.full_name.split("/")[1],description:n.full_name})})),{results:t}}},searchFields:["full_name"],showNoResults:!1}),b(),0!==$(".install").length&&(""===$("#db_host").val()&&($("#db_host").val("127.0.0.1:3306"),$("#db_user").val("gitea"),$("#db_name").val("gitea")),$("#db_type").change((function(){var e=$(this).val();if("SQLite3"===e)return $("#sql_settings").hide(),$("#pgsql_settings").hide(),$("#mysql_settings").hide(),$("#sqlite_settings").show(),void("SQLite3"===e&&"data/gitea_tidb"===$("#db_path").val()&&$("#db_path").val("data/gitea.db"));var t={MySQL:"127.0.0.1:3306",PostgreSQL:"127.0.0.1:5432",MSSQL:"127.0.0.1:1433"};$("#sqlite_settings").hide(),$("#sql_settings").show(),$("#pgsql_settings").toggle("PostgreSQL"===e),$("#mysql_settings").toggle("MySQL"===e),$.each(t,(function(n,i){if($("#db_host").val()===i)return $("#db_host").val(t[e]),!1}))})),$("#offline-mode input").change((function(){$(this).is(":checked")&&($("#disable-gravatar").checkbox("check"),$("#federated-avatar-lookup").checkbox("uncheck"))})),$("#disable-gravatar input").change((function(){$(this).is(":checked")?$("#federated-avatar-lookup").checkbox("uncheck"):$("#offline-mode").checkbox("uncheck")})),$("#federated-avatar-lookup input").change((function(){$(this).is(":checked")&&($("#disable-gravatar").checkbox("uncheck"),$("#offline-mode").checkbox("uncheck"))})),$("#enable-openid-signin input").change((function(){$(this).is(":checked")?$("#disable-registration input").is(":checked")||$("#enable-openid-signup").checkbox("check"):$("#enable-openid-signup").checkbox("uncheck")})),$("#disable-registration input").change((function(){$(this).is(":checked")?($("#enable-captcha").checkbox("uncheck"),$("#enable-openid-signup").checkbox("uncheck")):$("#enable-openid-signup").checkbox("check")})),$("#enable-captcha input").change((function(){$(this).is(":checked")&&$("#disable-registration").checkbox("uncheck")}))),w(),(u=function(){var e=$("#auth_username").val(),t=$("#clone_addr").val();!$("#mirror").is(":checked")&&e&&e.length>0&&void 0!==t&&(t.startsWith("https://github.com")||t.startsWith("http://github.com"))?$("#migrate_items").show():$("#migrate_items").hide()})(),$("#clone_addr").on("input",u),$("#auth_username").on("input",u),$("#mirror").on("change",u),function(){var e=$(".repository.wiki textarea#edit_area"),t=0,n=null;if(e.length>0){var i=new SimpleMDE({autoDownloadFontAwesome:!1,element:e[0],forceSync:!0,previewRender:function(a,o){return setTimeout((function(){var r=function(){t=0,null!=n&&(clearTimeout(n),n=null),$.post(e.data("url"),{_csrf:s,mode:"gfm",context:e.data("context"),text:a},(function(e){o.innerHTML='<div class="markdown ui segment">'.concat(e,"</div>"),emojify.run($(".editor-preview")[0]),$(o).find("pre code").each((function(e,t){hljs.highlightBlock(t)}))}))};i.isSideBySideActive()?(++t>10&&r(),null!=n&&(clearTimeout(n),n=null),n=setTimeout(r,600)):r()}),0),i.isSideBySideActive()?o.innerHTML:"Loading..."},renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|",{name:"code-inline",action:function(e){var t=e.codemirror,n=t.getSelection();if(t.replaceSelection("`".concat(n,"`")),!n){var i=t.getCursor();t.setCursor(i.line,i.ch-1)}t.focus()},className:"fa fa-angle-right",title:"Add Inline Code"},"code","quote","|",{name:"checkbox-empty",action:function(e){var t=e.codemirror;t.replaceSelection("\n- [ ] ".concat(t.getSelection())),t.focus()},className:"fa fa-square-o",title:"Add Checkbox (empty)"},{name:"checkbox-checked",action:function(e){var t=e.codemirror;t.replaceSelection("\n- [x] ".concat(t.getSelection())),t.focus()},className:"fa fa-check-square-o",title:"Add Checkbox (checked)"},"|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","clean-block","preview","fullscreen","side-by-side"]});$(i.codemirror.getInputField()).addClass("js-quick-submit"),setTimeout((function(){var e=$('.repository.wiki.new .previewtabs a[data-tab="write"]'),n=$('.repository.wiki.new .previewtabs a[data-tab="preview"]'),i=$(".editor-toolbar"),a=$(".editor-toolbar a.fa-eye"),o=$(".editor-toolbar a.fa-columns");e.on("click",(function(){i.hasClass("disabled-for-preview")&&a.click()})),n.on("click",(function(){i.hasClass("disabled-for-preview")||a.click()})),a.on("click",(function(){setTimeout((function(){i.hasClass("disabled-for-preview")?(e.hasClass("active")&&e.removeClass("active"),n.hasClass("active")||n.addClass("active")):(e.hasClass("active")||e.addClass("active"),n.hasClass("active")&&n.removeClass("active"))}),0)})),o.on("click",(function(){t=10}))}),0)}}(),m(),C(),0!==$(".organization").length&&$(".organization.settings.options").length>0&&$("#org_name").keyup((function(){var e=$("#org-name-change-prompt");$(this).val().toString().toLowerCase()!==$(this).data("org-name").toString().toLowerCase()?e.show():e.hide()})),0!==$(".edit.githook").length&&CodeMirror.autoLoadMode(CodeMirror.fromTextArea($("#content")[0],{lineNumbers:!0,mode:"shell"}),"shell"),function(){if(0!==$(".new.webhook").length){$(".events.checkbox input").change((function(){$(this).is(":checked")&&$(".events.fields").show()})),$(".non-events.checkbox input").change((function(){$(this).is(":checked")&&$(".events.fields").hide()}));var e=function(){var e="POST"===$("#http_method").val();$("#content_type").parent().parent()[e?"show":"hide"]()};e(),$("#http_method").change((function(){e()})),$("#test-delivery").click((function(){var e=$(this);e.addClass("loading disabled"),$.post(e.data("link"),{_csrf:s}).done(setTimeout((function(){window.location.href=e.data("redirect")}),5e3))}))}}(),function(){if(0!==$(".admin").length){if(($(".admin.new.user").length>0||$(".admin.edit.user").length>0)&&$("#login_type").change((function(){"0"===$(this).val().substring(0,1)?($("#login_name").removeAttr("required"),$(".non-local").hide(),$(".local").show(),$("#user_name").focus(),"required"===$(this).data("password")&&$("#password").attr("required","required")):($("#login_name").attr("required","required"),$(".non-local").show(),$(".local").hide(),$("#login_name").focus(),$("#password").removeAttr("required"))})),$(".admin.new.authentication").length>0&&($("#auth_type").change((function(){$(".ldap, .dldap, .smtp, .pam, .oauth2, .has-tls .search-page-size .sspi").hide(),$(".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"),$(".binddnrequired").removeClass("required");var e=$(this).val();switch(e){case"2":$(".ldap").show(),$(".binddnrequired input, .ldap div.required:not(.dldap) input").attr("required","required"),$(".binddnrequired").addClass("required");break;case"3":$(".smtp").show(),$(".has-tls").show(),$(".smtp div.required input, .has-tls").attr("required","required");break;case"4":$(".pam").show(),$(".pam input").attr("required","required");break;case"5":$(".dldap").show(),$(".dldap div.required:not(.ldap) input").attr("required","required");break;case"6":$(".oauth2").show(),$(".oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input").attr("required","required"),o();break;case"7":$(".sspi").show(),$(".sspi div.required input").attr("required","required")}"2"!==e&&"5"!==e||i(),"2"===e&&a()})),$("#auth_type").change(),$("#security_protocol").change(i),$("#use_paged_search").change(a),$("#oauth2_provider").change(o),$("#oauth2_use_custom_url").change(r)),$(".admin.edit.authentication").length>0){var e=$("#auth_type").val();"2"===e||"5"===e?($("#security_protocol").change(i),"2"===e&&$("#use_paged_search").change(a)):"6"===e&&($("#oauth2_provider").change(o),$("#oauth2_use_custom_url").change(r),o())}if($(".admin.notice")){var t=$("#detail-modal");$(".view-detail").click((function(){return t.find(".content p").text($(this).data("content")),t.modal("show"),!1}));var n=$(".select.table .ui.checkbox");$(".select.action").click((function(){switch($(this).data("action")){case"select-all":n.checkbox("check");break;case"deselect-all":n.checkbox("uncheck");break;case"inverse":n.checkbox("toggle")}})),$("#delete-selection").click((function(){var e=$(this);e.addClass("loading disabled");var t=[];n.each((function(){$(this).checkbox("is checked")&&t.push($(this).data("id"))})),$.post(e.data("link"),{_csrf:s,ids:t}).done((function(){window.location.href=e.data("redirect")}))}))}}function i(){$("#security_protocol").val()>0?$(".has-tls").show():$(".has-tls").hide()}function a(){$("#use_paged_search").prop("checked")?$(".search-page-size").show().find("input").attr("required","required"):$(".search-page-size").hide().find("input").removeAttr("required")}function o(){switch($(".open_id_connect_auto_discovery_url, .oauth2_use_custom_url").hide(),$(".open_id_connect_auto_discovery_url input[required]").removeAttr("required"),$("#oauth2_provider").val()){case"github":case"gitlab":case"gitea":$(".oauth2_use_custom_url").show();break;case"openidConnect":$(".open_id_connect_auto_discovery_url input").attr("required","required"),$(".open_id_connect_auto_discovery_url").show()}r()}function r(){var e=$("#oauth2_provider").val();if($(".oauth2_use_custom_url_field").hide(),$(".oauth2_use_custom_url_field input[required]").removeAttr("required"),$("#oauth2_use_custom_url").is(":checked"))switch($("#oauth2_token_url").val()||$("#oauth2_token_url").val($("#".concat(e,"_token_url")).val()),$("#oauth2_auth_url").val()||$("#oauth2_auth_url").val($("#".concat(e,"_auth_url")).val()),$("#oauth2_profile_url").val()||$("#oauth2_profile_url").val($("#".concat(e,"_profile_url")).val()),$("#oauth2_email_url").val()||$("#oauth2_email_url").val($("#".concat(e,"_email_url")).val()),e){case"github":$(".oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input, .oauth2_email_url input").attr("required","required"),$(".oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url, .oauth2_email_url").show();break;case"gitea":case"gitlab":$(".oauth2_token_url input, .oauth2_auth_url input, .oauth2_profile_url input").attr("required","required"),$(".oauth2_token_url, .oauth2_auth_url, .oauth2_profile_url").show(),$("#oauth2_email_url").val("")}}}(),_(),function(){var e=document.getElementById("app");if(!e)return;Vue.component("repo-search",{delimiters:["${","}"],props:{searchLimit:{type:Number,default:10},suburl:{type:String,required:!0},uid:{type:Number,required:!0},organizations:{type:Array,default:[]},isOrganization:{type:Boolean,default:!0},canCreateOrganization:{type:Boolean,default:!1},organizationsTotalCount:{type:Number,default:0},moreReposLink:{type:String,default:""}},data:function(){return{tab:"repos",repos:[],reposTotalCount:0,reposFilter:"all",searchQuery:"",isLoading:!1,repoTypes:{all:{count:0,searchMode:""},forks:{count:0,searchMode:"fork"},mirrors:{count:0,searchMode:"mirror"},sources:{count:0,searchMode:"source"},collaborative:{count:0,searchMode:"collaborative"}}}},computed:{showMoreReposLink:function(){return this.repos.length>0&&this.repos.length<this.repoTypes[this.reposFilter].count},searchURL:function(){return"".concat(this.suburl,"/api/v1/repos/search?sort=updated&order=desc&uid=").concat(this.uid,"&q=").concat(this.searchQuery,"&limit=").concat(this.searchLimit,"&mode=").concat(this.repoTypes[this.reposFilter].searchMode).concat("all"!==this.reposFilter?"&exclusive=1":"")},repoTypeCount:function(){return this.repoTypes[this.reposFilter].count}},mounted:function(){this.searchRepos(this.reposFilter);var e=this;Vue.nextTick((function(){e.$refs.search.focus()}))},methods:{changeTab:function(e){this.tab=e},changeReposFilter:function(e){this.reposFilter=e,this.repos=[],this.repoTypes[e].count=0,this.searchRepos(e)},showRepo:function(e,t){switch(t){case"sources":return e.owner.id===this.uid&&!e.mirror&&!e.fork;case"forks":return e.owner.id===this.uid&&!e.mirror&&e.fork;case"mirrors":return e.mirror;case"collaborative":return e.owner.id!==this.uid&&!e.mirror;default:return!0}},searchRepos:function(e){var t=this;this.isLoading=!0;var n=this.repoTypes[e].searchMode,i=this.searchURL,a=this.searchQuery;$.getJSON(i,(function(o,r,s){if(i===t.searchURL){t.repos=o.data;var c=s.getResponseHeader("X-Total-Count");""===a&&""===n&&(t.reposTotalCount=c),t.repoTypes[e].count=c}})).always((function(){i===t.searchURL&&(t.isLoading=!1)}))},repoClass:function(e){return e.fork?"octicon octicon-repo-forked":e.mirror?"octicon octicon-repo-clone":e.private?"octicon octicon-lock":"octicon octicon-repo"}}}),new Vue({delimiters:["${","}"],el:e,data:{searchLimit:document.querySelector("meta[name=_search_limit]").content,suburl:document.querySelector("meta[name=_suburl]").content,uid:document.querySelector("meta[name=_context_uid]").content}})}(),$(".organization.new.team input[name=permission]").change((function(){"admin"===$("input[name=permission]:checked",".organization.new.team").val()?$(".organization.new.team .team-units").hide():$(".organization.new.team .team-units").show()})),$(".js-quick-submit").keydown((function(e){!(e.ctrlKey&&!e.altKey||e.metaKey)||13!==e.keyCode&&10!==e.keyCode||$(this).closest("form").submit()})),f=$("#navbar"),g=$("#navbar-expand-toggle"),A=!1,g.click((function(){(A=!A)?(f.addClass("shown"),g.addClass("active")):(f.removeClass("shown"),g.removeClass("active"))})),D=$("#manage_topic"),O=$("#topic_edit"),E=$("#repo-topics"),F=$("#save_topic"),j=$("#topic_edit .dropdown"),M=$("#topic_edit.ui.form"),z=$("div.hide#validate_prompt"),P={countPrompt:z.children("#count_prompt").text(),formatPrompt:z.children("#format_prompt").text()},z.remove(),N=P,D.click((function(){E.hide(),O.css("display","")})),F.click((function(){var e=$("input[name=topics]").val();$.post(F.data("link"),{_csrf:s,topics:e},(function(t,n,i){if("ok"===i.responseJSON.status){if(E.children(".topic").remove(),e.length)for(var a=e.split(","),o=E.children("a").last(),r=0;r<a.length;r++)$('<div class="ui small label topic" style="cursor:pointer;">'.concat(a[r],"</div>")).insertBefore(o);O.css("display","none"),E.show()}})).fail((function(t){if(422===t.status)if(t.responseJSON.invalidTopics.length>0){N.formatPrompt=t.responseJSON.message;var n=t.responseJSON.invalidTopics,i=j.children("a.ui.label");e.split(",").forEach((function(e,t){for(var a=0;a<n.length;a++)n[a]===e&&i.eq(t).removeClass("green").addClass("red")}))}else N.countPrompt=t.responseJSON.message})).always((function(){M.form("validate form")}))})),j.dropdown({allowAdditions:!0,forceSelection:!1,fields:{name:"description",value:"data-value"},saveRemoteData:!1,label:{transition:"horizontal flip",duration:200,variation:!1,blue:!0,basic:!0},className:{label:"ui small label"},apiSettings:{url:"".concat(c,"/api/v1/topics/search?q={query}"),throttle:500,cache:!1,onResponse:function(e){var t={success:!1,results:[]},n=this.urlData.query.trim().replace(/<[^>]*>?/gm,""),i=!1,a=[];if(j.find("div.label.visible.topic,a.label.visible").each((function(e,t){a.push(t.dataset.value)})),e.topics){for(var o=!1,r=0;r<e.topics.length;r++)-1===a.indexOf(e.topics[r].topic_name)&&(e.topics[r].topic_name.toLowerCase()===n.toLowerCase()&&(i=!0),t.results.push({description:e.topics[r].topic_name,"data-value":e.topics[r].topic_name}),o=!0);t.success=o}return n.length>0&&!i?(t.success=!0,t.results.unshift({description:n,"data-value":n})):n.length>0&&i&&t.results.sort((function(e,t){return e.description.toLowerCase()===n.toLowerCase()?-1:t.description.toLowerCase()===n.toLowerCase()?1:e.description>t.description?-1:e.description<t.description?1:0})),t}},onLabelCreate:function(e){return e=e.toLowerCase().trim(),this.attr("data-value",e).contents().first().replaceWith(e),$(this)},onAdd:function(e,t,n){e=e.toLowerCase().trim(),$(n).attr("data-value",e),$(n).attr("data-text",e)}}),$.fn.form.settings.rules.validateTopic=function(e,t){var n=j.children("a.ui.label"),i=0===n.length||n.last().attr("data-value").match(t);return i||n.last().removeClass("green").addClass("red"),i&&0===j.children("a.ui.label.red").length},M.form({on:"change",inline:!0,fields:{topics:{identifier:"topics",rules:[{type:"validateTopic",value:/^[a-z0-9][a-z0-9-]{1,35}$/,prompt:N.formatPrompt},{type:"maxCount[25]",prompt:N.countPrompt}]}}}),0!==$("#wait-for-key").length&&u2fApi.ensureSupport().then((function(){$.getJSON("".concat(c,"/user/u2f/challenge")).success((function(e){u2fApi.sign(e.appId,e.challenge,e.registeredKeys,30).then(T).catch((function(e){L(void 0!==e?e.metaData.code:1)}))}))})).catch((function(){window.location.href="".concat(c,"/user/two_factor")})),$("#register-device").modal({allowMultiple:!1}),$("#u2f-error").modal({allowMultiple:!1}),$("#register-security-key").on("click",(function(e){e.preventDefault(),u2fApi.ensureSupport().then(q).catch((function(){L("browser")}))})),function(){var e=$("#repolink").val(),t=$("#repoId").val(),n=$("#crossRepoSearch").val(),i="".concat(c,"/api/v1/repos/").concat(e,"/issues?q={query}");"true"===n&&(i="".concat(c,"/api/v1/repos/issues/search?q={query}&priority_repo_id=").concat(t));$("#new-dependency-drop-list").dropdown({apiSettings:{url:i,onResponse:function(e){var t={success:!0,results:[]},n=$("#new-dependency-drop-list").data("issue-id");return $.each(e,(function(e,i){i.id!==n&&t.results.push({name:"#".concat(i.number," ").concat(h(i.title),'<div class="text small dont-break-out">').concat(h(i.repository.full_name),"</div>"),value:i.id})})),t},cache:!1},fullTextSearch:!0}),$(".menu a.label-filter-item").each((function(){$(this).click((function(e){if(e.altKey){e.preventDefault();var t=$(this).attr("href"),n=$(this).data("label-id"),i="labels=(-?[0-9]+%2c)*(".concat(n,")(%2c-?[0-9]+)*&");window.location=t.replace(new RegExp(i),"labels=$1-$2$3&")}}))})),$(".menu .ui.dropdown.label-filter").keydown((function(e){if(e.altKey&&13===e.keyCode){var t=$(".menu .ui.dropdown.label-filter .menu .item.selected");if(t.length>0){var n=$(t[0]),i=n.attr("href"),a=n.data("label-id"),o="labels=(-?[0-9]+%2c)*(".concat(a,")(%2c-?[0-9]+)*&");window.location=i.replace(new RegExp(o),"labels=$1-$2$3&")}}}))}(),$(".title_wip_desc > a").click((function(e){e.preventDefault();var t=$("#issue_title");t.focus();var n=t.val().trim().toUpperCase();for(var i in wipPrefixes)if(n.startsWith(wipPrefixes[i].toUpperCase()))return;t.val("".concat(wipPrefixes[0]," ").concat(t.val()))})),$(".show-outdated").on("click",(function(e){e.preventDefault();var t=$(this).data("comment");$(this).addClass("hide"),$("#code-comments-".concat(t)).removeClass("hide"),$("#code-preview-".concat(t)).removeClass("hide"),$("#hide-outdated-".concat(t)).removeClass("hide")})),$(".hide-outdated").on("click",(function(e){e.preventDefault();var t=$(this).data("comment");$(this).addClass("hide"),$("#code-comments-".concat(t)).addClass("hide"),$("#code-preview-".concat(t)).addClass("hide"),$("#show-outdated-".concat(t)).removeClass("hide")})),$("button.comment-form-reply").on("click",(function(e){e.preventDefault(),$(this).hide();var t=$(this).parent().find(".comment-form");t.removeClass("hide"),y(t.find(".menu"))})),0!==$(".repository.pull.diff").length&&($(".diff-detail-box.ui.sticky").sticky(),$(".btn-review").on("click",(function(e){e.preventDefault(),$(this).closest(".dropdown").find(".menu").toggle("visible")})).closest(".dropdown").find(".link.close").on("click",(function(e){e.preventDefault(),$(this).closest(".menu").toggle("visible")})),$(".code-view .lines-code,.code-view .lines-num").on("mouseenter",(function(){var e=$(this).closest("td");$(this).closest("tr").addClass(e.hasClass("lines-num-old")||e.hasClass("lines-code-old")?"focus-lines-old":"focus-lines-new")})).on("mouseleave",(function(){$(this).closest("tr").removeClass("focus-lines-new focus-lines-old")})),$(".add-code-comment").on("click",(function(e){if(!$(e.target).hasClass("btn-add-single")){e.preventDefault();var t=$(this).closest(".code-diff").hasClass("code-diff-split"),n=$(this).data("side"),i=$(this).data("idx"),a=$(this).data("path"),o=$("#pull_review_add_comment").html(),r=$(this).closest("tr"),s=r.next();s.hasClass("add-comment")||(s=$('<tr class="add-comment">'.concat(t?'<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>':'<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>',"</tr>")),r.after(s));var c=s.find(".add-comment-".concat(n)),l=c.find(".comment-code-cloud");0===l.length&&(c.html(o),y((l=c.find(".comment-code-cloud")).find(".menu")),c.find("input[name='line']").val(i),c.find("input[name='side']").val("left"===n?"previous":"proposed"),c.find("input[name='path']").val(a)),l.find("textarea").focus()}}))),function e(){var t=$("#repo_migrating");if($("#repo_migrating_failed").hide(),t){var n=t.attr("repo");if(void 0===n)return;$.ajax({type:"GET",url:"".concat(c,"/").concat(n,"/status"),data:{_csrf:s},complete:function(t){if(200===t.status&&t.responseJSON)return 0===t.responseJSON.status?void window.location.reload():void setTimeout((function(){e()}),2e3);$("#repo_migrating_progress").hide(),$("#repo_migrating_failed").show()}})}}(),function(){var e=$("#repo_template"),t=function(){var t=$("#template_units"),n=$("#non_template");""!==e.val()?(t.show(),n.hide()):(t.hide(),n.show())};e.change(t),t();var n=function(){$("#repo_template_search").dropdown({apiSettings:{url:"".concat(c,"/api/v1/repos/search?q={query}&template=true&priority_owner_id=").concat($("#uid").val()),onResponse:function(e){var t={success:!0,results:[]};return t.results.push({name:"",value:""}),$.each(e.data,(function(e,n){t.results.push({name:h(n.full_name),value:n.id})})),t},cache:!1},fullTextSearch:!0})};$("#uid").change(n),n()}(),$("#repo-clone-url").length>0)switch(localStorage.getItem("repo-clone-protocol")){case"ssh":0===$("#repo-clone-ssh").click().length&&$("#repo-clone-https").click();break;default:$("#repo-clone-https").click()}var B,H={"div.user.settings":k,"div.repository.settings.collaboration":x};for(B in H)if($(B).length>0){H[B]();break}var U=$("#clone_addr");U.change((function(){var e=$("#repo_name");U.val().length>0&&0===e.val().length&&e.val(U.val().match(/^(.*\/)?((.+?)(\.git)?)$/)[3])}))})),$((function(){0===$(".user.signin").length&&$("form:not(.ignore-dirty)").areYouSure(),$("#ssh-key-content").on("change paste keyup",(function(){var e=$(this).val().split(" "),t=$("#ssh-key-title");""===t.val()&&3===e.length&&""!==e[2]&&t.val(e[2])}))})),window.timeAddManual=function(){$(".mini.modal").modal({duration:200,onApprove:function(){$("#add_time_manual_form").submit()}}).modal("show")},window.toggleStopwatch=function(){$("#toggle_stopwatch_form").submit()},window.cancelStopwatch=function(){$("#cancel_stopwatch_form").submit()},window.initHeatmap=function(e,t,n){var i=document.getElementById(e);if(i){(n=n||{}).contributions=n.contributions||"contributions",n.no_contributions=n.no_contributions||"No contributions";var a=["${","}"];Vue.component("activity-heatmap",{delimiters:a,props:{user:{type:String,required:!0},suburl:{type:String,required:!0},locale:{type:Object,required:!0}},data:function(){return{isLoading:!0,colorRange:[],endDate:null,values:[],totalContributions:0}},mounted:function(){this.colorRange=[this.getColor(0),this.getColor(1),this.getColor(2),this.getColor(3),this.getColor(4),this.getColor(5)],this.endDate=new Date,this.loadHeatmap(this.user)},methods:{loadHeatmap:function(e){var t=this;$.get("".concat(this.suburl,"/api/v1/users/").concat(e,"/heatmap"),(function(e){for(var n=[],i=0;i<e.length;i++)t.totalContributions+=e[i].contributions,n[i]={date:new Date(1e3*e[i].timestamp),count:e[i].contributions};t.values=n,t.isLoading=!1}))},getColor:function(e){var t=document.createElement("div");t.className="heatmap-color-".concat(e),document.body.appendChild(t);var n=getComputedStyle(t).backgroundColor;return document.body.removeChild(t),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" />'}),new Vue({delimiters:a,el:i,data:{suburl:document.querySelector("meta[name=_suburl]").content,heatmapUser:t,locale:n}})}},$(".commit-button").click((function(e){e.preventDefault(),$(this).parent().find(".commit-body").toggle()})),window.toggleDeadlineForm=function(){$("#deadlineForm").fadeToggle(150)},window.setDeadline=function(){var e=$("#deadlineDate").val();window.updateDeadline(e)},window.updateDeadline=function(e){$("#deadline-err-invalid-date").hide(),$("#deadline-loader").addClass("loading");var t=null;if(""!==e){var n=Date.parse(e);if(Number.isNaN(n))return $("#deadline-loader").removeClass("loading"),$("#deadline-err-invalid-date").show(),!1;t=new Date(n)}$.ajax("".concat($("#update-issue-deadline-form").attr("action"),"/deadline"),{data:JSON.stringify({due_date:t}),headers:{"X-Csrf-Token":s,"X-Remote":!0},contentType:"application/json",type:"POST",success:function(){p()},error:function(){$("#deadline-loader").removeClass("loading"),$("#deadline-err-invalid-date").show()}})},window.deleteDependencyModal=function(e,t){$(".remove-dependency").modal({closable:!1,duration:200,onApprove:function(){$("#removeDependencyID").val(e),$("#dependencyType").val(t),$("#removeDependencyForm").submit()}}).modal("show")},window.cancelCodeComment=function(e){var t=$(e).closest("form");t.length>0&&t.hasClass("comment-form")?(t.addClass("hide"),t.parent().find("button.comment-form-reply").show()):t.closest(".comment-code-cloud").remove()},window.onOAuthLoginClick=function(){var e=$("#oauth2-login-loader"),t=$("#oauth2-login-navigator");t.hide(),e.removeClass("disabled"),setTimeout((function(){e.addClass("disabled"),t.show()}),5e3)}}]);
 //# sourceMappingURL=index.js.map
\ No newline at end of file
index 2ea5bdea940eacaec27c8620ada82f553312868f..c302cad3ee19ac1f392dd5576918a75c1925d584 100644 (file)
@@ -1 +1 @@
-{"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","$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","hash","$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","history","pushState","$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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,KAAF,UAAUnlB,EAAE,+BAA+B2G,KAAK,UAAhD,aAAsE,CACpE5U,KAAMq1B,KAAKgN,UAAU,CACnB4Q,SAAUF,IAEZhY,QAAS,CACP,eAAgBtJ,EAChB,YAAY,GAEd6Q,YAAa,mBACbr/B,KAAM,OACNqwB,QAVoE,WAWlEC,KAEF9wB,MAboE,WAclEwL,EAAE,oBAAoByR,YAAY,WAClCzR,EAAE,8BAA8BgL,WAKtC3T,OAAO4tC,sBAAwB,SAAUvjC,EAAI1M,GAC3CgL,EAAE,sBACCirB,MAAM,CACLkL,UAAU,EACVlY,SAAU,IACViN,UAHK,WAIHlrB,EAAE,uBAAuB0X,IAAIhW,GAC7B1B,EAAE,mBAAmB0X,IAAI1iB,GACzBgL,EAAE,yBAAyB+pB,YAE5BkB,MAAM,SAwEb5zB,OAAO6tC,kBAAoB,SAAUC,GACnC,IAAM/F,EAAOp/B,EAAEmlC,GAAKn7B,QAAQ,QACxBo1B,EAAK9sC,OAAS,GAAK8sC,EAAKr2B,SAAS,iBACnCq2B,EAAKx4B,SAAS,QACdw4B,EAAKr1B,SAASpH,KAAK,6BAA6BqI,QAEhDo0B,EAAKp1B,QAAQ,uBAAuB7E,UAGxC9N,OAAO+tC,kBAAoB,WACzB,IAAMC,EAAcrlC,EAAE,wBAChBslC,EAAWtlC,EAAE,2BAEnBslC,EAASj+B,OACTg+B,EAAY5zB,YAAY,YAExBlc,YAAW,WAGT8vC,EAAYz+B,SAAS,YACrB0+B,EAASt6B,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 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/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            $(`<div class=\"ui small label topic\" style=\"cursor:pointer;\">${topicArray[i]}</div>`).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-]{1,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":""}
\ No newline at end of file
+{"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,EAA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8BgL,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            $(`<div class=\"ui small label topic\" style=\"cursor:pointer;\">${topicArray[i]}</div>`).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-]{1,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":""}
\ No newline at end of file
index bae1a51731ebb438d68ccde6edd59cd651adb753..b8cf81972b6ff3a4def3803f743b512fb744dea8 100644 (file)
@@ -586,6 +586,28 @@ function initInstall() {
   });
 }
 
+function initIssueComments() {
+  if ($('.repository.view.issue .comments').length === 0) return;
+
+  $(document).click((event) => {
+    const urlTarget = $(':target');
+    if (urlTarget.length === 0) return;
+
+    const urlTargetId = urlTarget.attr('id');
+    if (!urlTargetId) return;
+    if (!/^(issue|pull)(comment)?-\d+$/.test(urlTargetId)) return;
+
+    const $target = $(event.target);
+
+    if ($target.closest(`#${urlTargetId}`).length === 0) {
+      const scrollPosition = $(window).scrollTop();
+      window.location.hash = '';
+      $(window).scrollTop(scrollPosition);
+      window.history.pushState(null, null, ' ');
+    }
+  });
+}
+
 function initRepository() {
   if ($('.repository').length === 0) {
     return;
@@ -733,6 +755,9 @@ function initRepository() {
       return false;
     });
 
+    // Issue Comments
+    initIssueComments();
+
     // Issue/PR Context Menus
     $('.context-dropdown').dropdown({
       action: 'hide'
index e0537245efff3514b11d946a9eaed815940b5a5b..1b47de8a1bad5d4a7b315ce4685dc0e875b1bec9 100644 (file)
                     }
                 }
 
+                &:target > .content {
+                    box-shadow: 0 0 10px #8c8c8c;
+                }
+
                 .ui.form {
                     .field:first-child {
                         clear: none;