This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(`+Vn+": "+bn+")",tn.name="ChunkLoadError",tn.type=Vn,tn.request=bn,yi[1](tn)}};__webpack_require__.l(Ji,_n,"chunk-"+vi,vi)}};var bi=function(vi,ri){var yi=ri[0],Li=ri[1],Ji=ri[2],tn,_n,In=0;if(yi.some(function(bn){return oi[bn]!==0})){for(tn in Li)__webpack_require__.o(Li,tn)&&(__webpack_require__.m[tn]=Li[tn]);if(Ji)var Vn=Ji(__webpack_require__)}for(vi&&vi(ri);In<yi.length;In++)_n=yi[In],__webpack_require__.o(oi,_n)&&oi[_n]&&oi[_n][0](),oi[_n]=0},wi=self.webpackChunk=self.webpackChunk||[];wi.forEach(bi.bind(null,0)),wi.push=bi.bind(null,wi.push.bind(wi))}();var __webpack_exports__={};(function(){"use strict";var oi=__webpack_require__("./node_modules/jquery/dist/jquery.js");window.$=window.jQuery=oi})(),function(){(function(oi,bi,wi,vi){"use strict";oi.isWindow=oi.isWindow||function(ri){return ri!=null&&ri===ri.window},bi=typeof bi<"u"&&bi.Math==Math?bi:typeof self<"u"&&self.Math==Math?self:Function("return this")(),oi.api=oi.fn.api=function(ri){var yi=oi.isFunction(this)?oi(bi):oi(this),Li=yi.selector||"",Ji=new Date().getTime(),tn=[],_n=arguments[0],In=typeof _n=="string",Vn=[].slice.call(arguments,1),bn;return yi.each(function(){var Zi=oi.isPlainObject(ri)?oi.extend(!0,{},oi.fn.api.settings,ri):oi.extend({},oi.fn.api.settings),un=Zi.namespace,ls=Zi.metadata,ks=Zi.selector,En=Zi.error,qi=Zi.className,sn="."+un,rs="module-"+un,hs=oi(this),fs=hs.closest(ks.form),yn=Zi.stateContext?oi(Zi.stateContext):hs,mn,Mn,pi,rn,dn,pn=this,Pn=yn[0],nn=hs.data(rs),Ai;Ai={initialize:function(){In||Ai.bind.events(),Ai.instantiate()},instantiate:function(){Ai.verbose("Storing instance of module",Ai),nn=Ai,hs.data(rs,nn)},destroy:function(){Ai.verbose("Destroying previous module for",pn),hs.removeData(rs).off(sn)},bind:{events:function(){var Ri=Ai.get.event();Ri?(Ai.verbose("Attaching API events to element",Ri),hs.on(Ri+sn,Ai.event.trigger)):Zi.on=="now"&&(Ai.debug("Querying API endpoint immediately"),Ai.query())}},decode:{json:function(Ri){if(Ri!==vi&&typeof Ri=="string")try{Ri=JSON.parse(Ri)}catch{}return Ri}},read:{cachedResponse:function(Ri){var ki;if(bi.Storage===vi){Ai.error(En.noStorage);return}return ki=sessionStorage.getItem(Ri),Ai.debug("Using cached response",Ri,ki),ki=Ai.decode.json(ki),ki}},write:{cachedResponse:function(Ri,ki){if(ki&&ki===""){Ai.debug("Response empty, not caching",ki);return}if(bi.Storage===vi){Ai.error(En.noStorage);return}oi.isPlainObject(ki)&&(ki=JSON.stringify(ki)),sessionStorage.setItem(Ri,ki),Ai.verbose("Storing cached response for url",Ri,ki)}},query:function(){if(Ai.is.disabled()){Ai.debug("Element is disabled API request aborted");return}if(Ai.is.loading())if(Zi.interruptRequests)Ai.debug("Interrupting previous request"),Ai.abort();else{Ai.debug("Cancelling request, previous request is still pending");return}if(Zi.defaultData&&oi.extend(!0,Zi.urlData,Ai.get.defaultData()),Zi.serializeForm&&(Zi.data=Ai.add.formData(Zi.data)),Mn=Ai.get.settings(),Mn===!1){Ai.cancelled=!0,Ai.error(En.beforeSend);return}else Ai.cancelled=!1;if(pi=Ai.get.templatedURL(),!pi&&!Ai.is.mocked()){Ai.error(En.missingURL);return}if(pi=Ai.add.urlData(pi),!(!pi&&!Ai.is.mocked())){if(Mn.url=Zi.base+pi,mn=oi.extend(!0,{},Zi,{type:Zi.method||Zi.type,data:rn,url:Zi.base+pi,beforeSend:Zi.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),Ai.debug("Querying URL",mn.url),Ai.verbose("Using AJAX settings",mn),Zi.cache==="local"&&Ai.read.cachedResponse(pi)){Ai.debug("Response returned from local cache"),Ai.request=Ai.create.request(),Ai.request.resolveWith(Pn,[Ai.read.cachedResponse(pi)]);return}Zi.throttle?!Zi.throttleFirstRequest&&!Ai.timer?(Ai.debug("Sending request",rn,mn.method),Ai.send.request(),Ai.timer=setTimeout(function(){},Zi.throttle)):(Ai.debug("Throttling request",Zi.throttle),clearTimeout(Ai.timer),Ai.timer=setTimeout(function(){Ai.timer&&delete Ai.timer,Ai.debug("Sending throttled request",rn,mn.method),Ai.send.request()},Zi.throttle)):(Ai.debug("Sending request",rn,mn.method),Ai.send.request())}},should:{removeError:function(){return Zi.hideError===!0||Zi.hideError==="auto"&&!Ai.is.form()}},is:{disabled:function(){return hs.filter(ks.disabled).length>0},expectingJSON:function(){return Zi.dataType==="json"||Zi.dataType==="jsonp"},form:function(){return hs.is("form")||yn.is("form")},mocked:function(){return Zi.mockResponse||Zi.mockResponseAsync||Zi.response||Zi.responseAsync},input:function(){return hs.is("input")},loading:function(){return Ai.request?Ai.request.state()=="pending":!1},abortedRequest:function(Ri){return Ri&&Ri.readyState!==vi&&Ri.readyState===0?(Ai.verbose("XHR request determined to be aborted"),!0):(Ai.verbose("XHR request was not aborted"),!1)},validResponse:function(Ri){return!Ai.is.expectingJSON()||!oi.isFunction(Zi.successTest)?(Ai.verbose("Response is not JSON, skipping validation",Zi.successTest,Ri),!0):(Ai.debug("Checking JSON returned success",Zi.successTest,Ri),Zi.successTest(Ri)?(Ai.debug("Response passed success test",Ri),!0):(Ai.debug("Response failed success test",Ri),!1))}},was:{cancelled:function(){return Ai.cancelled||!1},succesful:function(){return Ai.verbose('This behavior will be deleted due to typo. Use "was successful" instead.'),Ai.was.successful()},successful:function(){return Ai.request&&Ai.request.state()=="resolved"},failure:function(){return Ai.request&&Ai.request.state()=="rejected"},complete:function(){return Ai.request&&(Ai.request.state()=="resolved"||Ai.request.state()=="rejected")}},add:{urlData:function(Ri,ki){var Wi,an;return Ri&&(Wi=Ri.match(Zi.regExp.required),an=Ri.match(Zi.regExp.optional),ki=ki||Zi.urlData,Wi&&(Ai.debug("Looking for required URL variables",Wi),oi.each(Wi,function(Fn,en){var Fi=en.indexOf("$")!==-1?en.substr(2,en.length-3):en.substr(1,en.length-2),Oi=oi.isPlainObject(ki)&&ki[Fi]!==vi?ki[Fi]:hs.data(Fi)!==vi?hs.data(Fi):yn.data(Fi)!==vi?yn.data(Fi):ki[Fi];if(Oi===vi)return Ai.error(En.requiredParameter,Fi,Ri),Ri=!1,!1;Ai.verbose("Found required variable",Fi,Oi),Oi=Zi.encodeParameters?Ai.get.urlEncodedValue(Oi):Oi,Ri=Ri.replace(en,Oi)})),an&&(Ai.debug("Looking for optional URL variables",Wi),oi.each(an,function(Fn,en){var Fi=en.indexOf("$")!==-1?en.substr(3,en.length-4):en.substr(2,en.length-3),Oi=oi.isPlainObject(ki)&&ki[Fi]!==vi?ki[Fi]:hs.data(Fi)!==vi?hs.data(Fi):yn.data(Fi)!==vi?yn.data(Fi):ki[Fi];Oi!==vi?(Ai.verbose("Optional variable Found",Fi,Oi),Ri=Ri.replace(en,Oi)):(Ai.verbose("Optional variable not found",Fi),Ri.indexOf("/"+en)!==-1?Ri=Ri.replace("/"+en,""):Ri=Ri.replace(en,""))}))),Ri},formData:function(Ri){var ki=oi.fn.serializeObject!==vi,Wi=ki?fs.serializeObject():fs.serialize(),an;return Ri=Ri||Zi.data,an=oi.isPlainObject(Ri),an?ki?(Ai.debug("Extending existing data with form data",Ri,Wi),Ri=oi.extend(!0,{},Ri,Wi)):(Ai.error(En.missingSerialize),Ai.debug("Cant extend data. Replacing data with form data",Ri,Wi),Ri=Wi):(Ai.debug("Adding form data",Wi),Ri=Wi),Ri}},send:{request:function(){Ai.set.loading(),Ai.request=Ai.create.request(),Ai.is.mocked()?Ai.mockedXHR=Ai.create.mockedXHR():Ai.xhr=Ai.create.xhr(),Zi.onRequest.call(Pn,Ai.request,Ai.xhr)}},event:{trigger:function(Ri){Ai.query(),(Ri.type=="submit"||Ri.type=="click")&&Ri.preventDefault()},xhr:{always:function(){},done:function(Ri,ki,Wi){var an=this,Fn=new Date().getTime()-dn,en=Zi.loadingDuration-Fn,Fi=oi.isFunction(Zi.onResponse)?Ai.is.expectingJSON()&&!Zi.rawResponse?Zi.onResponse.call(an,oi.extend(!0,{},Ri)):Zi.onResponse.call(an,Ri):!1;en=en>0?en:0,Fi&&(Ai.debug("Modified API response in onResponse callback",Zi.onResponse,Fi,Ri),Ri=Fi),en>0&&Ai.debug("Response completed early delaying state change by",en),setTimeout(function(){Ai.is.validResponse(Ri)?Ai.request.resolveWith(an,[Ri,Wi]):Ai.request.rejectWith(an,[Wi,"invalid"])},en)},fail:function(Ri,ki,Wi){var an=this,Fn=new Date().getTime()-dn,en=Zi.loadingDuration-Fn;en=en>0?en:0,en>0&&Ai.debug("Response completed early delaying state change by",en),setTimeout(function(){Ai.is.abortedRequest(Ri)?Ai.request.rejectWith(an,[Ri,"aborted",Wi]):Ai.request.rejectWith(an,[Ri,"error",ki,Wi])},en)}},request:{done:function(Ri,ki){Ai.debug("Successful API Response",Ri),Zi.cache==="local"&&pi&&(Ai.write.cachedResponse(pi,Ri),Ai.debug("Saving server response locally",Ai.cache)),Zi.onSuccess.call(Pn,Ri,hs,ki)},complete:function(Ri,ki){var Wi,an;Ai.was.successful()?(an=Ri,Wi=ki):(Wi=Ri,an=Ai.get.responseFromXHR(Wi)),Ai.remove.loading(),Zi.onComplete.call(Pn,an,hs,Wi)},fail:function(Ri,ki,Wi){var an=Ai.get.responseFromXHR(Ri),Fn=Ai.get.errorFromRequest(an,ki,Wi);if(ki=="aborted")return Ai.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",ki,Wi),Zi.onAbort.call(Pn,ki,hs,Ri),!0;ki=="invalid"?Ai.debug("JSON did not pass success test. A server-side error has most likely occurred",an):ki=="error"&&Ri!==vi&&(Ai.debug("XHR produced a server error",ki,Wi),(Ri.status<200||Ri.status>=300)&&Wi!==vi&&Wi!==""&&Ai.error(En.statusMessage+Wi,mn.url),Zi.onError.call(Pn,Fn,hs,Ri)),Zi.errorDuration&&ki!=="aborted"&&(Ai.debug("Adding error state"),Ai.set.error(),Ai.should.removeError()&&setTimeout(Ai.remove.error,Zi.errorDuration)),Ai.debug("API Request failed",Fn,Ri),Zi.onFailure.call(Pn,an,hs,Ri)}}},create:{request:function(){return oi.Deferred().always(Ai.event.request.complete).done(Ai.event.request.done).fail(Ai.event.request.fail)},mockedXHR:function(){var Ri=!1,ki=!1,Wi=!1,an=Zi.mockResponse||Zi.response,Fn=Zi.mockResponseAsync||Zi.responseAsync,en,Fi,Oi;return Oi=oi.Deferred().always(Ai.event.xhr.complete).done(Ai.event.xhr.done).fail(Ai.event.xhr.fail),an?(oi.isFunction(an)?(Ai.debug("Using specified synchronous callback",an),Fi=an.call(Pn,Mn)):(Ai.debug("Using settings specified response",an),Fi=an),Oi.resolveWith(Pn,[Fi,Ri,{responseText:Fi}])):oi.isFunction(Fn)&&(en=function(zi){Ai.debug("Async callback returned response",zi),zi?Oi.resolveWith(Pn,[zi,Ri,{responseText:zi}]):Oi.rejectWith(Pn,[{responseText:zi},ki,Wi])},Ai.debug("Using specified async response callback",Fn),Fn.call(Pn,Mn,en)),Oi},xhr:function(){var Ri;return Ri=oi.ajax(mn).always(Ai.event.xhr.always).done(Ai.event.xhr.done).fail(Ai.event.xhr.fail),Ai.verbose("Created server request",Ri,mn),Ri}},set:{error:function(){Ai.verbose("Adding error state to element",yn),yn.addClass(qi.error)},loading:function(){Ai.verbose("Adding loading state to element",yn),yn.addClass(qi.loading),dn=new Date().getTime()}},remove:{error:function(){Ai.verbose("Removing error state from element",yn),yn.removeClass(qi.error)},loading:function(){Ai.verbose("Removing loading state from element",yn),yn.removeClass(qi.loading)}},get:{responseFromXHR:function(Ri){return oi.isPlainObject(Ri)?Ai.is.expectingJSON()?Ai.decode.json(Ri.responseText):Ri.responseText:!1},errorFromRequest:function(Ri,ki,Wi){return oi.isPlainObject(Ri)&&Ri.error!==vi?Ri.error:Zi.error[ki]!==vi?Zi.error[ki]:Wi},request:function(){return Ai.request||!1},xhr:function(){return Ai.xhr||!1},settings:function(){var Ri;return Ri=Zi.beforeSend.call(hs,Zi),Ri&&(Ri.success!==vi&&(Ai.debug("Legacy success callback detected",Ri),Ai.error(En.legacyParameters,Ri.success),Ri.onSuccess=Ri.success),Ri.failure!==vi&&(Ai.debug("Legacy failure callback detected",Ri),Ai.error(En.legacyParameters,Ri.failure),Ri.onFailure=Ri.failure),Ri.complete!==vi&&(Ai.debug("Legacy complete callback detected",Ri),Ai.error(En.legacyParameters,Ri.complete),Ri.onComplete=Ri.complete)),Ri===vi&&Ai.error(En.noReturnedValue),Ri===!1?Ri:Ri!==vi?oi.extend(!0,{},Ri):oi.extend(!0,{},Zi)},urlEncodedValue:function(Ri){var ki=bi.decodeURIComponent(Ri),Wi=bi.encodeURIComponent(Ri),an=ki!==Ri;return an?(Ai.debug("URL value is already encoded, avoiding double encoding",Ri),Ri):(Ai.verbose("Encoding value using encodeURIComponent",Ri,Wi),Wi)},defaultData:function(){var Ri={};return oi.isWindow(pn)||(Ai.is.input()?Ri.value=hs.val():Ai.is.form()||(Ri.text=hs.text())),Ri},event:function(){return oi.isWindow(pn)||Zi.on=="now"?(Ai.debug("API called without element, no events attached"),!1):Zi.on=="auto"?hs.is("input")?pn.oninput!==vi?"input":pn.onpropertychange!==vi?"propertychange":"keyup":hs.is("form")?"submit":"click":Zi.on},templatedURL:function(Ri){if(Ri=Ri||hs.data(ls.action)||Zi.action||!1,pi=hs.data(ls.url)||Zi.url||!1,pi)return Ai.debug("Using specified url",pi),pi;if(Ri){if(Ai.debug("Looking up url for action",Ri,Zi.api),Zi.api[Ri]===vi&&!Ai.is.mocked()){Ai.error(En.missingAction,Zi.action,Zi.api);return}pi=Zi.api[Ri]}else Ai.is.form()&&(pi=hs.attr("action")||yn.attr("action")||!1,Ai.debug("No url or action specified, defaulting to form action",pi));return pi}},abort:function(){var Ri=Ai.get.xhr();Ri&&Ri.state()!=="resolved"&&(Ai.debug("Cancelling API request"),Ri.abort())},reset:function(){Ai.remove.error(),Ai.remove.loading()},setting:function(Ri,ki){if(Ai.debug("Changing setting",Ri,ki),oi.isPlainObject(Ri))oi.extend(!0,Zi,Ri);else if(ki!==vi)oi.isPlainObject(Zi[Ri])?oi.extend(!0,Zi[Ri],ki):Zi[Ri]=ki;else return Zi[Ri]},internal:function(Ri,ki){if(oi.isPlainObject(Ri))oi.extend(!0,Ai,Ri);else if(ki!==vi)Ai[Ri]=ki;else return Ai[Ri]},debug:function(){!Zi.silent&&Zi.debug&&(Zi.performance?Ai.performance.log(arguments):(Ai.debug=Function.prototype.bind.call(console.info,console,Zi.name+":"),Ai.debug.apply(console,arguments)))},verbose:function(){!Zi.silent&&Zi.verbose&&Zi.debug&&(Zi.performance?Ai.performance.log(arguments):(Ai.verbose=Function.prototype.bind.call(console.info,console,Zi.name+":"),Ai.verbose.apply(console,arguments)))},error:function(){Zi.silent||(Ai.error=Function.prototype.bind.call(console.error,console,Zi.name+":"),Ai.error.apply(console,arguments))},performance:{log:function(Ri){var ki,Wi,an;Zi.performance&&(ki=new Date().getTime(),an=Ji||ki,Wi=ki-an,Ji=ki,tn.push({Name:Ri[0],Arguments:[].slice.call(Ri,1)||"","Execution Time":Wi})),clearTimeout(Ai.performance.timer),Ai.performance.timer=setTimeout(Ai.performance.display,500)},display:function(){var Ri=Zi.name+":",ki=0;Ji=!1,clearTimeout(Ai.performance.timer),oi.each(tn,function(Wi,an){ki+=an["Execution Time"]}),Ri+=" "+ki+"ms",Li&&(Ri+=" '"+Li+"'"),(console.group!==vi||console.table!==vi)&&tn.length>0&&(console.groupCollapsed(Ri),console.table?console.table(tn):oi.each(tn,function(Wi,an){console.log(an.Name+": "+an["Execution Time"]+"ms")}),console.groupEnd()),tn=[]}},invoke:function(Ri,ki,Wi){var an=nn,Fn,en,Fi;return ki=ki||Vn,Wi=pn||Wi,typeof Ri=="string"&&an!==vi&&(Ri=Ri.split(/[\. ]/),Fn=Ri.length-1,oi.each(Ri,function(Oi,zi){var Ti=Oi!=Fn?zi+Ri[Oi+1].charAt(0).toUpperCase()+Ri[Oi+1].slice(1):Ri;if(oi.isPlainObject(an[Ti])&&Oi!=Fn)an=an[Ti];else{if(an[Ti]!==vi)return en=an[Ti],!1;if(oi.isPlainObject(an[zi])&&Oi!=Fn)an=an[zi];else return an[zi]!==vi?(en=an[zi],!1):(Ai.error(En.method,Ri),!1)}})),oi.isFunction(en)?Fi=en.apply(Wi,ki):en!==vi&&(Fi=en),Array.isArray(bn)?bn.push(Fi):bn!==vi?bn=[bn,Fi]:Fi!==vi&&(bn=Fi),en}},In?(nn===vi&&Ai.initialize(),Ai.invoke(_n)):(nn!==vi&&nn.invoke("destroy"),Ai.initialize())}),bn!==vi?bn:this},oi.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!1,beforeSend:function(ri){return ri},beforeXHR:function(ri){},onRequest:function(ri,yi){},onResponse:!1,onSuccess:function(ri,yi){},onComplete:function(ri,yi){},onFailure:function(ri,yi){},onError:function(ri,yi){},onAbort:function(ri,yi){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}})(jQuery,window,document);(function(oi,bi,wi,vi){"use strict";oi.isFunction=oi.isFunction||function(ri){return typeof ri=="function"&&typeof ri.nodeType!="number"},bi=typeof bi<"u"&&bi.Math==Math?bi:typeof self<"u"&&self.Math==Math?self:Function("return this")(),oi.fn.dimmer=function(ri){var yi=oi(this),Li=new Date().getTime(),Ji=[],tn=arguments[0],_n=typeof tn=="string",In=[].slice.call(arguments,1),Vn;return yi.each(function(){var bn=oi.isPlainObject(ri)?oi.extend(!0,{},oi.fn.dimmer.settings,ri):oi.extend({},oi.fn.dimmer.settings),Zi=bn.selector,un=bn.namespace,ls=bn.className,ks=bn.error,En="."+un,qi="module-"+un,sn=yi.selector||"",rs="click",hs="ontouchstart"in wi.documentElement?"touchstart":"click",fs=oi(this),yn,mn,Mn=this,pi=fs.data(qi),rn;rn={preinitialize:function(){rn.is.dimmer()?(mn=fs.parent(),yn=fs):(mn=fs,rn.has.dimmer()?bn.dimmerName?yn=mn.find(Zi.dimmer).filter("."+bn.dimmerName):yn=mn.find(Zi.dimmer):yn=rn.create())},initialize:function(){rn.debug("Initializing dimmer",bn),rn.bind.events(),rn.set.dimmable(),rn.instantiate()},instantiate:function(){rn.verbose("Storing instance of module",rn),pi=rn,fs.data(qi,pi)},destroy:function(){rn.verbose("Destroying previous module",yn),rn.unbind.events(),rn.remove.variation(),mn.off(En)},bind:{events:function(){bn.on=="hover"?mn.on("mouseenter"+En,rn.show).on("mouseleave"+En,rn.hide):bn.on=="click"&&mn.on(rs+En,rn.toggle),rn.is.page()&&(rn.debug("Setting as a page dimmer",mn),rn.set.pageDimmer()),rn.is.closable()&&(rn.verbose("Adding dimmer close event",yn),mn.on(rs+En,Zi.dimmer,rn.event.click))}},unbind:{events:function(){fs.removeData(qi),mn.off(En)}},event:{click:function(dn){rn.verbose("Determining if event occured on dimmer",dn),(yn.find(dn.target).length===0||oi(dn.target).is(Zi.content))&&(rn.hide(),dn.stopImmediatePropagation())}},addContent:function(dn){var pn=oi(dn);rn.debug("Add content to dimmer",pn),pn.parent()[0]!==yn[0]&&pn.detach().appendTo(yn)},create:function(){var dn=oi(bn.template.dimmer(bn));return bn.dimmerName&&(rn.debug("Creating named dimmer",bn.dimmerName),dn.addClass(bn.dimmerName)),dn.appendTo(mn),dn},show:function(dn){dn=oi.isFunction(dn)?dn:function(){},rn.debug("Showing dimmer",yn,bn),rn.set.variation(),(!rn.is.dimmed()||rn.is.animating())&&rn.is.enabled()?(rn.animate.show(dn),bn.onShow.call(Mn),bn.onChange.call(Mn)):rn.debug("Dimmer is already shown or disabled")},hide:function(dn){dn=oi.isFunction(dn)?dn:function(){},rn.is.dimmed()||rn.is.animating()?(rn.debug("Hiding dimmer",yn),rn.animate.hide(dn),bn.onHide.call(Mn),bn.onChange.call(Mn)):rn.debug("Dimmer is not visible")},toggle:function(){rn.verbose("Toggling dimmer visibility",yn),rn.is.dimmed()?rn.is.closable()&&rn.hide():rn.show()},animate:{show:function(dn){dn=oi.isFunction(dn)?dn:function(){},bn.useCSS&&oi.fn.transition!==vi&&yn.transition("is supported")?(bn.useFlex?(rn.debug("Using flex dimmer"),rn.remove.legacy()):(rn.debug("Using legacy non-flex dimmer"),rn.set.legacy()),bn.opacity!=="auto"&&rn.set.opacity(),yn.transition({displayType:bn.useFlex?"flex":"block",animation:bn.transition+" in",queue:!1,duration:rn.get.duration(),useFailSafe:!0,onStart:function(){rn.set.dimmed()},onComplete:function(){rn.set.active(),dn()}})):(rn.verbose("Showing dimmer animation with javascript"),rn.set.dimmed(),bn.opacity=="auto"&&(bn.opacity=.8),yn.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(rn.get.duration(),bn.opacity,function(){yn.removeAttr("style"),rn.set.active(),dn()}))},hide:function(dn){dn=oi.isFunction(dn)?dn:function(){},bn.useCSS&&oi.fn.transition!==vi&&yn.transition("is supported")?(rn.verbose("Hiding dimmer with css"),yn.transition({displayType:bn.useFlex?"flex":"block",animation:bn.transition+" out",queue:!1,duration:rn.get.duration(),useFailSafe:!0,onComplete:function(){rn.remove.dimmed(),rn.remove.variation(),rn.remove.active(),dn()}})):(rn.verbose("Hiding dimmer with javascript"),yn.stop().fadeOut(rn.get.duration(),function(){rn.remove.dimmed(),rn.remove.active(),yn.removeAttr("style"),dn()}))}},get:{dimmer:function(){return yn},duration:function(){return typeof bn.duration=="object"?rn.is.active()?bn.duration.hide:bn.duration.show:bn.duration}},has:{dimmer:function(){return bn.dimmerName?fs.find(Zi.dimmer).filter("."+bn.dimmerName).length>0:fs.find(Zi.dimmer).length>0}},is:{active:function(){return yn.hasClass(ls.active)},animating:function(){return yn.is(":animated")||yn.hasClass(ls.animating)},closable:function(){return bn.closable=="auto"?bn.on!="hover":bn.closable},dimmer:function(){return fs.hasClass(ls.dimmer)},dimmable:function(){return fs.hasClass(ls.dimmable)},dimmed:function(){return mn.hasClass(ls.dimmed)},disabled:function(){return mn.hasClass(ls.disabled)},enabled:function(){return!rn.is.disabled()},page:function(){return mn.is("body")},pageDimmer:function(){return yn.hasClass(ls.pageDimmer)}},can:{show:function(){return!yn.hasClass(ls.disabled)}},set:{opacity:function(dn){var pn=yn.css("background-color"),Pn=pn.split(","),nn=Pn&&Pn.length>=3;dn=bn.opacity===0?0:bn.opacity||dn,nn?(Pn[2]=Pn[2].replace(")",""),Pn[3]=dn+")",pn=Pn.join(",")):pn="rgba(0, 0, 0, "+dn+")",rn.debug("Setting opacity to",dn),yn.css("background-color",pn)},legacy:function(){yn.addClass(ls.legacy)},active:function(){yn.addClass(ls.active)},dimmable:function(){mn.addClass(ls.dimmable)},dimmed:function(){mn.addClass(ls.dimmed)},pageDimmer:function(){yn.addClass(ls.pageDimmer)},disabled:function(){yn.addClass(ls.disabled)},variation:function(dn){dn=dn||bn.variation,dn&&yn.addClass(dn)}},remove:{active:function(){yn.removeClass(ls.active)},legacy:function(){yn.removeClass(ls.legacy)},dimmed:function(){mn.removeClass(ls.dimmed)},disabled:function(){yn.removeClass(ls.disabled)},variation:function(dn){dn=dn||bn.variation,dn&&yn.removeClass(dn)}},setting:function(dn,pn){if(rn.debug("Changing setting",dn,pn),oi.isPlainObject(dn))oi.extend(!0,bn,dn);else if(pn!==vi)oi.isPlainObject(bn[dn])?oi.extend(!0,bn[dn],pn):bn[dn]=pn;else return bn[dn]},internal:function(dn,pn){if(oi.isPlainObject(dn))oi.extend(!0,rn,dn);else if(pn!==vi)rn[dn]=pn;else return rn[dn]},debug:function(){!bn.silent&&bn.debug&&(bn.performance?rn.performance.log(arguments):(rn.debug=Function.prototype.bind.call(console.info,console,bn.name+":"),rn.debug.apply(console,arguments)))},verbose:function(){!bn.silent&&bn.verbose&&bn.debug&&(bn.performance?rn.performance.log(arguments):(rn.verbose=Function.prototype.bind.call(console.info,console,bn.name+":"),rn.verbose.apply(console,arguments)))},error:function(){bn.silent||(rn.error=Function.prototype.bind.call(console.error,console,bn.name+":"),rn.error.apply(console,arguments))},performance:{log:function(dn){var pn,Pn,nn;bn.performance&&(pn=new Date().getTime(),nn=Li||pn,Pn=pn-nn,Li=pn,Ji.push({Name:dn[0],Arguments:[].slice.call(dn,1)||"",Element:Mn,"Execution Time":Pn})),clearTimeout(rn.performance.timer),rn.performance.timer=setTimeout(rn.performance.display,500)},display:function(){var dn=bn.name+":",pn=0;Li=!1,clearTimeout(rn.performance.timer),oi.each(Ji,function(Pn,nn){pn+=nn["Execution Time"]}),dn+=" "+pn+"ms",sn&&(dn+=" '"+sn+"'"),yi.length>1&&(dn+=" ("+yi.length+")"),(console.group!==vi||console.table!==vi)&&Ji.length>0&&(console.groupCollapsed(dn),console.table?console.table(Ji):oi.each(Ji,function(Pn,nn){console.log(nn.Name+": "+nn["Execution Time"]+"ms")}),console.groupEnd()),Ji=[]}},invoke:function(dn,pn,Pn){var nn=pi,Ai,Ri,ki;return pn=pn||In,Pn=Mn||Pn,typeof dn=="string"&&nn!==vi&&(dn=dn.split(/[\. ]/),Ai=dn.length-1,oi.each(dn,function(Wi,an){var Fn=Wi!=Ai?an+dn[Wi+1].charAt(0).toUpperCase()+dn[Wi+1].slice(1):dn;if(oi.isPlainObject(nn[Fn])&&Wi!=Ai)nn=nn[Fn];else{if(nn[Fn]!==vi)return Ri=nn[Fn],!1;if(oi.isPlainObject(nn[an])&&Wi!=Ai)nn=nn[an];else return nn[an]!==vi?(Ri=nn[an],!1):(rn.error(ks.method,dn),!1)}})),oi.isFunction(Ri)?ki=Ri.apply(Pn,pn):Ri!==vi&&(ki=Ri),Array.isArray(Vn)?Vn.push(ki):Vn!==vi?Vn=[Vn,ki]:ki!==vi&&(Vn=ki),Ri}},rn.preinitialize(),_n?(pi===vi&&rn.initialize(),rn.invoke(tn)):(pi!==vi&&pi.invoke("destroy"),rn.initialize())}),Vn!==vi?Vn:this},oi.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",silent:!1,debug:!1,verbose:!1,performance:!0,useFlex:!0,dimmerName:!1,variation:!1,closable:"auto",useCSS:!0,transition:"fade",on:!1,opacity:"auto",duration:{show:500,hide:500},displayLoader:!1,loaderText:!1,loaderVariation:"",onChange:function(){},onShow:function(){},onHide:function(){},error:{method:"The method you called is not defined."},className:{active:"active",animating:"animating",dimmable:"dimmable",dimmed:"dimmed",dimmer:"dimmer",disabled:"disabled",hide:"hide",legacy:"legacy",pageDimmer:"page",show:"show",loader:"ui loader"},selector:{dimmer:"> .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(ri){var yi=oi("<div/>").addClass("ui dimmer"),Li;return ri.displayLoader&&(Li=oi("<div/>").addClass(ri.className.loader).addClass(ri.loaderVariation),ri.loaderText&&(Li.text(ri.loaderText),Li.addClass("text")),yi.append(Li)),yi}}}})(jQuery,window,document);(function(oi,bi,wi,vi){"use strict";oi.isFunction=oi.isFunction||function(ri){return typeof ri=="function"&&typeof ri.nodeType!="number"},bi=typeof bi<"u"&&bi.Math==Math?bi:typeof self<"u"&&self.Math==Math?self:Function("return this")(),oi.fn.dropdown=function(ri){var yi=oi(this),Li=oi(wi),Ji=yi.selector||"",tn="ontouchstart"in wi.documentElement,_n="click",In=tn?"touchstart":"click",Vn=new Date().getTime(),bn=[],Zi=arguments[0],un=typeof Zi=="string",ls=[].slice.call(arguments,1),ks;return yi.each(function(En){var qi=oi.isPlainObject(ri)?oi.extend(!0,{},oi.fn.dropdown.settings,ri):oi.extend({},oi.fn.dropdown.settings),sn=qi.className,rs=qi.message,hs=qi.fields,fs=qi.keys,yn=qi.metadata,mn=qi.namespace,Mn=qi.regExp,pi=qi.selector,rn=qi.error,dn=qi.templates,pn="."+mn,Pn="module-"+mn,nn=oi(this),Ai=oi(qi.context),Ri=nn.find(pi.text),ki=nn.find(pi.search),Wi=nn.find(pi.sizer),an=nn.find(pi.input),Fn=nn.find(pi.icon),en=nn.find(pi.clearIcon),Fi=nn.prev().find(pi.text).length>0?nn.prev().find(pi.text):nn.prev(),Oi=nn.children(pi.menu),zi=Oi.find(pi.item),Ti=qi.hideDividers?zi.parent().children(pi.divider):oi(),Yi=!1,wn=!1,Bi=!1,Qi=!1,Gi=this,On=nn.data(Pn),Xn,cs,Vs,uo,fo,go,Po,Jo,ca,gi;gi={initialize:function(){gi.debug("Initializing dropdown",qi),gi.is.alreadySetup()?gi.setup.reference():(qi.ignoreDiacritics&&!String.prototype.normalize&&(qi.ignoreDiacritics=!1,gi.error(rn.noNormalize,Gi)),gi.setup.layout(),qi.values&&(gi.set.initialLoad(),gi.change.values(qi.values),gi.remove.initialLoad()),gi.refreshData(),gi.save.defaults(),gi.restore.selected(),gi.create.id(),gi.bind.events(),gi.observeChanges(),gi.instantiate())},instantiate:function(){gi.verbose("Storing instance of dropdown",gi),On=gi,nn.data(Pn,gi)},destroy:function(){gi.verbose("Destroying previous dropdown",nn),gi.remove.tabbable(),gi.remove.active(),Oi.transition("stop all"),Oi.removeClass(sn.visible).addClass(sn.hidden),nn.off(pn).removeData(Pn),Oi.off(pn),Li.off(fo),gi.disconnect.menuObserver(),gi.disconnect.selectObserver(),gi.disconnect.classObserver()},observeChanges:function(){"MutationObserver"in bi&&(Po=new MutationObserver(gi.event.select.mutation),Jo=new MutationObserver(gi.event.menu.mutation),ca=new MutationObserver(gi.event.class.mutation),gi.debug("Setting up mutation observer",Po,Jo,ca),gi.observe.select(),gi.observe.menu(),gi.observe.class())},disconnect:{menuObserver:function(){Jo&&Jo.disconnect()},selectObserver:function(){Po&&Po.disconnect()},classObserver:function(){ca&&ca.disconnect()}},observe:{select:function(){gi.has.input()&&Po&&Po.observe(nn[0],{childList:!0,subtree:!0})},menu:function(){gi.has.menu()&&Jo&&Jo.observe(Oi[0],{childList:!0,subtree:!0})},class:function(){gi.has.search()&&ca&&ca.observe(nn[0],{attributes:!0})}},create:{id:function(){go=(Math.random().toString(16)+"000000000").substr(2,8),fo="."+go,gi.verbose("Creating unique id for element",go)},userChoice:function(Si){var $i,kn,Ln,Un;return Si=Si||gi.get.userValues(),Si?(Si=Array.isArray(Si)?Si:[Si],oi.each(Si,function(Jn,Ys){gi.get.item(Ys)===!1&&(Un=qi.templates.addition(gi.add.variables(rs.addResult,Ys)),kn=oi("<div />").html(Un).attr("data-"+yn.value,Ys).attr("data-"+yn.text,Ys).addClass(sn.addition).addClass(sn.item),qi.hideAdditions&&kn.addClass(sn.hidden),$i=$i===vi?kn:$i.add(kn),gi.verbose("Creating user choices for value",Ys,kn))}),$i):!1},userLabels:function(Si){var $i=gi.get.userValues();$i&&(gi.debug("Adding user labels",$i),oi.each($i,function(kn,Ln){gi.verbose("Adding custom user value"),gi.add.label(Ln,Ln)}))},menu:function(){Oi=oi("<div />").addClass(sn.menu).appendTo(nn)},sizer:function(){Wi=oi("<span />").addClass(sn.sizer).insertAfter(ki)}},search:function(Si){Si=Si!==vi?Si:gi.get.query(),gi.verbose("Searching for query",Si),gi.has.minCharacters(Si)?gi.filter(Si):gi.hide(null,!0)},select:{firstUnfiltered:function(){gi.verbose("Selecting first non-filtered element"),gi.remove.selectedItem(),zi.not(pi.unselectable).not(pi.addition+pi.hidden).eq(0).addClass(sn.selected)},nextAvailable:function(Si){Si=Si.eq(0);var $i=Si.nextAll(pi.item).not(pi.unselectable).eq(0),kn=Si.prevAll(pi.item).not(pi.unselectable).eq(0),Ln=$i.length>0;Ln?(gi.verbose("Moving selection to",$i),$i.addClass(sn.selected)):(gi.verbose("Moving selection to",kn),kn.addClass(sn.selected))}},setup:{api:function(){var Si={debug:qi.debug,urlData:{value:gi.get.value(),query:gi.get.query()},on:!1};gi.verbose("First request, initializing API"),nn.api(Si)},layout:function(){nn.is("select")&&(gi.setup.select(),gi.setup.returnedObject()),gi.has.menu()||gi.create.menu(),gi.is.selection()&&gi.is.clearable()&&!gi.has.clearItem()&&(gi.verbose("Adding clear icon"),en=oi("<i />").addClass("remove icon").insertBefore(Ri)),gi.is.search()&&!gi.has.search()&&(gi.verbose("Adding search input"),ki=oi("<input />").addClass(sn.search).prop("autocomplete","off").insertBefore(Ri)),gi.is.multiple()&&gi.is.searchSelection()&&!gi.has.sizer()&&gi.create.sizer(),qi.allowTab&&gi.set.tabbable()},select:function(){var Si=gi.get.selectValues();gi.debug("Dropdown initialized on a select",Si),nn.is("select")&&(an=nn),an.parent(pi.dropdown).length>0?(gi.debug("UI dropdown already exists. Creating dropdown menu only"),nn=an.closest(pi.dropdown),gi.has.menu()||gi.create.menu(),Oi=nn.children(pi.menu),gi.setup.menu(Si)):(gi.debug("Creating entire dropdown from select"),nn=oi("<div />").attr("class",an.attr("class")).addClass(sn.selection).addClass(sn.dropdown).html(dn.dropdown(Si,hs,qi.preserveHTML,qi.className)).insertBefore(an),an.hasClass(sn.multiple)&&an.prop("multiple")===!1&&(gi.error(rn.missingMultiple),an.prop("multiple",!0)),an.is("[multiple]")&&gi.set.multiple(),an.prop("disabled")&&(gi.debug("Disabling dropdown"),nn.addClass(sn.disabled)),an.removeAttr("required").removeAttr("class").detach().prependTo(nn)),gi.refresh()},menu:function(Si){Oi.html(dn.menu(Si,hs,qi.preserveHTML,qi.className)),zi=Oi.find(pi.item),Ti=qi.hideDividers?zi.parent().children(pi.divider):oi()},reference:function(){gi.debug("Dropdown behavior was called on select, replacing with closest dropdown"),nn=nn.parent(pi.dropdown),On=nn.data(Pn),Gi=nn.get(0),gi.refresh(),gi.setup.returnedObject()},returnedObject:function(){var Si=yi.slice(0,En),$i=yi.slice(En+1);yi=Si.add(nn).add($i)}},refresh:function(){gi.refreshSelectors(),gi.refreshData()},refreshItems:function(){zi=Oi.find(pi.item),Ti=qi.hideDividers?zi.parent().children(pi.divider):oi()},refreshSelectors:function(){gi.verbose("Refreshing selector cache"),Ri=nn.find(pi.text),ki=nn.find(pi.search),an=nn.find(pi.input),Fn=nn.find(pi.icon),Fi=nn.prev().find(pi.text).length>0?nn.prev().find(pi.text):nn.prev(),Oi=nn.children(pi.menu),zi=Oi.find(pi.item),Ti=qi.hideDividers?zi.parent().children(pi.divider):oi()},refreshData:function(){gi.verbose("Refreshing cached metadata"),zi.removeData(yn.text).removeData(yn.value)},clearData:function(){gi.verbose("Clearing metadata"),zi.removeData(yn.text).removeData(yn.value),nn.removeData(yn.defaultText).removeData(yn.defaultValue).removeData(yn.placeholderText)},toggle:function(){gi.verbose("Toggling menu visibility"),gi.is.active()?gi.hide():gi.show()},show:function(Si,$i){if(Si=oi.isFunction(Si)?Si:function(){},!gi.can.show()&&gi.is.remote()&&(gi.debug("No API results retrieved, searching before show"),gi.queryRemote(gi.get.query(),gi.show)),gi.can.show()&&!gi.is.active()){if(gi.debug("Showing dropdown"),gi.has.message()&&!(gi.has.maxSelections()||gi.has.allResultsFiltered())&&gi.remove.message(),gi.is.allFiltered())return!0;qi.onShow.call(Gi)!==!1&&gi.animate.show(function(){gi.can.click()&&gi.bind.intent(),gi.has.search()&&!$i&&gi.focusSearch(),gi.set.visible(),Si.call(Gi)})}},hide:function(Si,$i){Si=oi.isFunction(Si)?Si:function(){},gi.is.active()&&!gi.is.animatingOutward()?(gi.debug("Hiding dropdown"),qi.onHide.call(Gi)!==!1&&gi.animate.hide(function(){gi.remove.visible(),gi.is.focusedOnSearch()&&$i!==!0&&ki.blur(),Si.call(Gi)})):gi.can.click()&&gi.unbind.intent(),Qi=!1},hideOthers:function(){gi.verbose("Finding other dropdowns to hide"),yi.not(nn).has(pi.menu+"."+sn.visible).dropdown("hide")},hideMenu:function(){gi.verbose("Hiding menu instantaneously"),gi.remove.active(),gi.remove.visible(),Oi.transition("hide")},hideSubMenus:function(){var Si=Oi.children(pi.item).find(pi.menu);gi.verbose("Hiding sub menus",Si),Si.transition("hide")},bind:{events:function(){gi.bind.keyboardEvents(),gi.bind.inputEvents(),gi.bind.mouseEvents()},keyboardEvents:function(){gi.verbose("Binding keyboard events"),nn.on("keydown"+pn,gi.event.keydown),gi.has.search()&&nn.on(gi.get.inputEvent()+pn,pi.search,gi.event.input),gi.is.multiple()&&Li.on("keydown"+fo,gi.event.document.keydown)},inputEvents:function(){gi.verbose("Binding input change events"),nn.on("change"+pn,pi.input,gi.event.change)},mouseEvents:function(){gi.verbose("Binding mouse events"),gi.is.multiple()&&nn.on(_n+pn,pi.label,gi.event.label.click).on(_n+pn,pi.remove,gi.event.remove.click),gi.is.searchSelection()?(nn.on("mousedown"+pn,gi.event.mousedown).on("mouseup"+pn,gi.event.mouseup).on("mousedown"+pn,pi.menu,gi.event.menu.mousedown).on("mouseup"+pn,pi.menu,gi.event.menu.mouseup).on(_n+pn,pi.icon,gi.event.icon.click).on(_n+pn,pi.clearIcon,gi.event.clearIcon.click).on("focus"+pn,pi.search,gi.event.search.focus).on(_n+pn,pi.search,gi.event.search.focus).on("blur"+pn,pi.search,gi.event.search.blur).on(_n+pn,pi.text,gi.event.text.focus),gi.is.multiple()&&nn.on(_n+pn,gi.event.click)):(qi.on=="click"?nn.on(_n+pn,pi.icon,gi.event.icon.click).on(_n+pn,gi.event.test.toggle):qi.on=="hover"?nn.on("mouseenter"+pn,gi.delay.show).on("mouseleave"+pn,gi.delay.hide):nn.on(qi.on+pn,gi.toggle),nn.on("mousedown"+pn,gi.event.mousedown).on("mouseup"+pn,gi.event.mouseup).on("focus"+pn,gi.event.focus).on(_n+pn,pi.clearIcon,gi.event.clearIcon.click),gi.has.menuSearch()?nn.on("blur"+pn,pi.search,gi.event.search.blur):nn.on("blur"+pn,gi.event.blur)),Oi.on((tn?"touchstart":"mouseenter")+pn,pi.item,gi.event.item.mouseenter).on("mouseleave"+pn,pi.item,gi.event.item.mouseleave).on("click"+pn,pi.item,gi.event.item.click)},intent:function(){gi.verbose("Binding hide intent event to document"),tn&&Li.on("touchstart"+fo,gi.event.test.touch).on("touchmove"+fo,gi.event.test.touch),Li.on(_n+fo,gi.event.test.hide)}},unbind:{intent:function(){gi.verbose("Removing hide intent event from document"),tn&&Li.off("touchstart"+fo).off("touchmove"+fo),Li.off(_n+fo)}},filter:function(Si){var $i=Si!==vi?Si:gi.get.query(),kn=function(){gi.is.multiple()&&gi.filterActive(),(Si||!Si&&gi.get.activeItem().length==0)&&gi.select.firstUnfiltered(),gi.has.allResultsFiltered()?qi.onNoResults.call(Gi,$i)?qi.allowAdditions?qi.hideAdditions&&(gi.verbose("User addition with no menu, setting empty style"),gi.set.empty(),gi.hideMenu()):(gi.verbose("All items filtered, showing message",$i),gi.add.message(rs.noResults)):(gi.verbose("All items filtered, hiding dropdown",$i),gi.hideMenu()):(gi.remove.empty(),gi.remove.message()),qi.allowAdditions&&gi.add.userSuggestion(gi.escape.htmlEntities(Si)),gi.is.searchSelection()&&gi.can.show()&&gi.is.focusedOnSearch()&&gi.show()};qi.useLabels&&gi.has.maxSelections()||(qi.apiSettings?gi.can.useAPI()?gi.queryRemote($i,function(){qi.filterRemoteData&&gi.filterItems($i);var Ln=an.val();Array.isArray(Ln)||(Ln=Ln&&Ln!==""?Ln.split(qi.delimiter):[]),oi.each(Ln,function(Un,Jn){zi.filter('[data-value="'+Jn+'"]').addClass(sn.filtered)}),kn()}):gi.error(rn.noAPI):(gi.filterItems($i),kn()))},queryRemote:function(Si,$i){var kn={errorDuration:!1,cache:"local",throttle:qi.throttle,urlData:{query:Si},onError:function(){gi.add.message(rs.serverError),$i()},onFailure:function(){gi.add.message(rs.serverError),$i()},onSuccess:function(Ln){var Un=Ln[hs.remoteValues];Array.isArray(Un)||(Un=[]),gi.remove.message();var Jn={};Jn[hs.values]=Un,gi.setup.menu(Jn),Un.length===0&&!qi.allowAdditions&&gi.add.message(rs.noResults),$i()}};nn.api("get request")||gi.setup.api(),kn=oi.extend(!0,{},kn,qi.apiSettings),nn.api("setting",kn).api("query")},filterItems:function(Si){var $i=gi.remove.diacritics(Si!==vi?Si:gi.get.query()),kn=null,Ln=gi.escape.string($i),Un=(qi.ignoreSearchCase?"i":"")+"gm",Jn=new RegExp("^"+Ln,Un);gi.has.query()&&(kn=[],gi.verbose("Searching for matching values",$i),zi.each(function(){var Ys=oi(this),bo,_o;if(Ys.hasClass(sn.unfilterable))return kn.push(this),!0;if(qi.match==="both"||qi.match==="text"){if(bo=gi.remove.diacritics(String(gi.get.choiceText(Ys,!1))),bo.search(Jn)!==-1)return kn.push(this),!0;if(qi.fullTextSearch==="exact"&&gi.exactSearch($i,bo))return kn.push(this),!0;if(qi.fullTextSearch===!0&&gi.fuzzySearch($i,bo))return kn.push(this),!0}if(qi.match==="both"||qi.match==="value"){if(_o=gi.remove.diacritics(String(gi.get.choiceValue(Ys,bo))),_o.search(Jn)!==-1)return kn.push(this),!0;if(qi.fullTextSearch==="exact"&&gi.exactSearch($i,_o))return kn.push(this),!0;if(qi.fullTextSearch===!0&&gi.fuzzySearch($i,_o))return kn.push(this),!0}})),gi.debug("Showing only matched items",$i),gi.remove.filteredItem(),kn&&zi.not(kn).addClass(sn.filtered),gi.has.query()?qi.hideDividers===!0?Ti.addClass(sn.hidden):qi.hideDividers==="empty"&&Ti.removeClass(sn.hidden).filter(function(){var Ys=oi(this).nextUntil(pi.item);return(Ys.length?Ys:oi(this)).nextUntil(pi.divider).filter(pi.item+":not(."+sn.filtered+")").length===0}).addClass(sn.hidden):Ti.removeClass(sn.hidden)},fuzzySearch:function(Si,$i){var kn=$i.length,Ln=Si.length;if(Si=qi.ignoreSearchCase?Si.toLowerCase():Si,$i=qi.ignoreSearchCase?$i.toLowerCase():$i,Ln>kn)return!1;if(Ln===kn)return Si===$i;e:for(var Un=0,Jn=0;Un<Ln;Un++){for(var Ys=Si.charCodeAt(Un);Jn<kn;)if($i.charCodeAt(Jn++)===Ys)continue e;return!1}return!0},exactSearch:function(Si,$i){return Si=qi.ignoreSearchCase?Si.toLowerCase():Si,$i=qi.ignoreSearchCase?$i.toLowerCase():$i,$i.indexOf(Si)>-1},filterActive:function(){qi.useLabels&&zi.filter("."+sn.active).addClass(sn.filtered)},focusSearch:function(Si){gi.has.search()&&!gi.is.focusedOnSearch()&&(Si?(nn.off("focus"+pn,pi.search),ki.focus(),nn.on("focus"+pn,pi.search,gi.event.search.focus)):ki.focus())},blurSearch:function(){gi.has.search()&&ki.blur()},forceSelection:function(){var Si=zi.not(sn.filtered).filter("."+sn.selected).eq(0),$i=zi.not(sn.filtered).filter("."+sn.active).eq(0),kn=Si.length>0?Si:$i,Ln=kn.length>0;qi.allowAdditions||Ln&&!gi.is.multiple()?(gi.debug("Forcing partial selection to selected item",kn),gi.event.item.click.call(kn,{},!0)):gi.remove.searchTerm()},change:{values:function(Si){qi.allowAdditions||gi.clear(),gi.debug("Creating dropdown with specified values",Si);var $i={};$i[hs.values]=Si,gi.setup.menu($i),oi.each(Si,function(kn,Ln){if(Ln.selected==!0&&(gi.debug("Setting initial selection to",Ln[hs.value]),gi.set.selected(Ln[hs.value]),!gi.is.multiple()))return!1}),gi.has.selectInput()&&(gi.disconnect.selectObserver(),an.html(""),an.append("<option disabled selected value></option>"),oi.each(Si,function(kn,Ln){var Un=qi.templates.deQuote(Ln[hs.value]),Jn=qi.templates.escape(Ln[hs.name]||"",qi.preserveHTML);an.append('<option value="'+Un+'">'+Jn+"</option>")}),gi.observe.select())}},event:{change:function(){Bi||(gi.debug("Input changed, updating selection"),gi.set.selected())},focus:function(){qi.showOnFocus&&!Yi&&gi.is.hidden()&&!Vs&&gi.show()},blur:function(Si){Vs=wi.activeElement===this,!Yi&&!Vs&&(gi.remove.activeLabel(),gi.hide())},mousedown:function(){gi.is.searchSelection()?uo=!0:Yi=!0},mouseup:function(){gi.is.searchSelection()?uo=!1:Yi=!1},click:function(Si){var $i=oi(Si.target);$i.is(nn)&&(gi.is.focusedOnSearch()?gi.show():gi.focusSearch())},search:{focus:function(Si){Yi=!0,gi.is.multiple()&&gi.remove.activeLabel(),(qi.showOnFocus||Si.type!=="focus"&&Si.type!=="focusin")&&gi.search()},blur:function(Si){Vs=wi.activeElement===this,gi.is.searchSelection()&&!uo&&!wn&&!Vs&&(qi.forceSelection?gi.forceSelection():qi.allowAdditions||gi.remove.searchTerm(),gi.hide()),uo=!1}},clearIcon:{click:function(Si){gi.clear(),gi.is.searchSelection()&&gi.remove.searchTerm(),gi.hide(),Si.stopPropagation()}},icon:{click:function(Si){Qi=!0,gi.has.search()?gi.is.active()?gi.blurSearch():qi.showOnFocus?gi.focusSearch():gi.toggle():gi.toggle()}},text:{focus:function(Si){Yi=!0,gi.focusSearch()}},input:function(Si){(gi.is.multiple()||gi.is.searchSelection())&&gi.set.filtered(),clearTimeout(gi.timer),gi.timer=setTimeout(gi.search,qi.delay.search)},label:{click:function(Si){var $i=oi(this),kn=nn.find(pi.label),Ln=kn.filter("."+sn.active),Un=$i.nextAll("."+sn.active),Jn=$i.prevAll("."+sn.active),Ys=Un.length>0?$i.nextUntil(Un).add(Ln).add($i):$i.prevUntil(Jn).add(Ln).add($i);Si.shiftKey?(Ln.removeClass(sn.active),Ys.addClass(sn.active)):Si.ctrlKey?$i.toggleClass(sn.active):(Ln.removeClass(sn.active),$i.addClass(sn.active)),qi.onLabelSelect.apply(this,kn.filter("."+sn.active))}},remove:{click:function(){var Si=oi(this).parent();Si.hasClass(sn.active)?gi.remove.activeLabels():gi.remove.activeLabels(Si)}},test:{toggle:function(Si){var $i=gi.is.multiple()?gi.show:gi.toggle;gi.is.bubbledLabelClick(Si)||gi.is.bubbledIconClick(Si)||gi.determine.eventOnElement(Si,$i)&&Si.preventDefault()},touch:function(Si){gi.determine.eventOnElement(Si,function(){Si.type=="touchstart"?gi.timer=setTimeout(function(){gi.hide()},qi.delay.touch):Si.type=="touchmove"&&clearTimeout(gi.timer)}),Si.stopPropagation()},hide:function(Si){gi.determine.eventInModule(Si,gi.hide)&&Gi.id&&oi(Si.target).attr("for")===Gi.id&&Si.preventDefault()}},class:{mutation:function(Si){Si.forEach(function($i){$i.attributeName==="class"&&gi.check.disabled()})}},select:{mutation:function(Si){gi.debug("<select> modified, recreating menu"),gi.is.selectMutation(Si)&&(gi.disconnect.selectObserver(),gi.refresh(),gi.setup.select(),gi.set.selected(),gi.observe.select())}},menu:{mutation:function(Si){var $i=Si[0],kn=$i.addedNodes?oi($i.addedNodes[0]):oi(!1),Ln=$i.removedNodes?oi($i.removedNodes[0]):oi(!1),Un=kn.add(Ln),Jn=Un.is(pi.addition)||Un.closest(pi.addition).length>0,Ys=Un.is(pi.message)||Un.closest(pi.message).length>0;Jn||Ys?(gi.debug("Updating item selector cache"),gi.refreshItems()):(gi.debug("Menu modified, updating selector cache"),gi.refresh())},mousedown:function(){wn=!0},mouseup:function(){wn=!1}},item:{mouseenter:function(Si){var $i=oi(Si.target),kn=oi(this),Ln=kn.children(pi.menu),Un=kn.siblings(pi.item).children(pi.menu),Jn=Ln.length>0,Ys=Ln.find($i).length>0;!Ys&&Jn&&(clearTimeout(gi.itemTimer),gi.itemTimer=setTimeout(function(){gi.verbose("Showing sub-menu",Ln),oi.each(Un,function(){gi.animate.hide(!1,oi(this))}),gi.animate.show(!1,Ln)},qi.delay.show),Si.preventDefault())},mouseleave:function(Si){var $i=oi(this).children(pi.menu);$i.length>0&&(clearTimeout(gi.itemTimer),gi.itemTimer=setTimeout(function(){gi.verbose("Hiding sub-menu",$i),gi.animate.hide(!1,$i)},qi.delay.hide))},click:function(Si,$i){var kn=oi(this),Ln=oi(Si?Si.target:""),Un=kn.find(pi.menu),Jn=gi.get.choiceText(kn),Ys=gi.get.choiceValue(kn,Jn),bo=Un.length>0,_o=Un.find(Ln).length>0;wi.activeElement.tagName.toLowerCase()!=="input"&&oi(wi.activeElement).blur(),!_o&&(!bo||qi.allowCategorySelection)&&(gi.is.searchSelection()&&(qi.allowAdditions&&gi.remove.userAddition(),gi.remove.searchTerm(),!gi.is.focusedOnSearch()&&$i!=!0&&gi.focusSearch(!0)),qi.useLabels||(gi.remove.filteredItem(),gi.set.scrollPosition(kn)),gi.determine.selectAction.call(this,Jn,Ys))}},document:{keydown:function(Si){var $i=Si.which,kn=gi.is.inObject($i,fs);if(kn){var Ln=nn.find(pi.label),Un=Ln.filter("."+sn.active),Jn=Un.data(yn.value),Ys=Ln.index(Un),bo=Ln.length,_o=Un.length>0,pa=Un.length>1,ka=Ys===0,Aa=Ys+1==bo,ha=gi.is.searchSelection(),sa=gi.is.focusedOnSearch(),Do=gi.is.focused(),ra=sa&&gi.get.caretPosition(!1)===0,rl=ra&&gi.get.caretPosition(!0)!==0,bl;if(ha&&!_o&&!sa)return;$i==fs.leftArrow?(Do||ra)&&!_o?(gi.verbose("Selecting previous label"),Ln.last().addClass(sn.active)):_o&&(Si.shiftKey?gi.verbose("Adding previous label to selection"):(gi.verbose("Selecting previous label"),Ln.removeClass(sn.active)),ka&&!pa?Un.addClass(sn.active):Un.prev(pi.siblingLabel).addClass(sn.active).end(),Si.preventDefault()):$i==fs.rightArrow?(Do&&!_o&&Ln.first().addClass(sn.active),_o&&(Si.shiftKey?gi.verbose("Adding next label to selection"):(gi.verbose("Selecting next label"),Ln.removeClass(sn.active)),Aa?ha?sa?Ln.removeClass(sn.active):gi.focusSearch():pa?Un.next(pi.siblingLabel).addClass(sn.active):Un.addClass(sn.active):Un.next(pi.siblingLabel).addClass(sn.active),Si.preventDefault())):$i==fs.deleteKey||$i==fs.backspace?_o?(gi.verbose("Removing active labels"),Aa&&ha&&!sa&&gi.focusSearch(),Un.last().next(pi.siblingLabel).addClass(sn.active),gi.remove.activeLabels(Un),Si.preventDefault()):ra&&!rl&&!_o&&$i==fs.backspace&&(gi.verbose("Removing last label on input backspace"),Un=Ln.last().addClass(sn.active),gi.remove.activeLabels(Un)):Un.removeClass(sn.active)}}},keydown:function(Si){var $i=Si.which,kn=gi.is.inObject($i,fs);if(kn){var Ln=zi.not(pi.unselectable).filter("."+sn.selected).eq(0),Un=Oi.children("."+sn.active).eq(0),Jn=Ln.length>0?Ln:Un,Ys=Jn.length>0?Jn.siblings(":not(."+sn.filtered+")").addBack():Oi.children(":not(."+sn.filtered+")"),bo=Jn.children(pi.menu),_o=Jn.closest(pi.menu),pa=_o.hasClass(sn.visible)||_o.hasClass(sn.animating)||_o.parent(pi.menu).length>0,ka=bo.length>0,Aa=Jn.length>0,ha=Jn.not(pi.unselectable).length>0,sa=$i==fs.delimiter&&qi.allowAdditions&&gi.is.multiple(),Do=qi.allowAdditions&&qi.hideAdditions&&($i==fs.enter||sa)&&ha,ra,rl,bl;if(Do&&(gi.verbose("Selecting item from keyboard shortcut",Jn),gi.event.item.click.call(Jn,Si),gi.is.searchSelection()&&gi.remove.searchTerm(),gi.is.multiple()&&Si.preventDefault()),gi.is.visible()){if(($i==fs.enter||sa)&&($i==fs.enter&&Aa&&ka&&!qi.allowCategorySelection?(gi.verbose("Pressed enter on unselectable category, opening sub menu"),$i=fs.rightArrow):ha&&(gi.verbose("Selecting item from keyboard shortcut",Jn),gi.event.item.click.call(Jn,Si),gi.is.searchSelection()&&(gi.remove.searchTerm(),gi.is.multiple()&&ki.focus())),Si.preventDefault()),Aa&&($i==fs.leftArrow&&(rl=_o[0]!==Oi[0],rl&&(gi.verbose("Left key pressed, closing sub-menu"),gi.animate.hide(!1,_o),Jn.removeClass(sn.selected),_o.closest(pi.item).addClass(sn.selected),Si.preventDefault())),$i==fs.rightArrow&&ka&&(gi.verbose("Right key pressed, opening sub-menu"),gi.animate.show(!1,bo),Jn.removeClass(sn.selected),bo.find(pi.item).eq(0).addClass(sn.selected),Si.preventDefault())),$i==fs.upArrow){if(ra=Aa&&pa?Jn.prevAll(pi.item+":not("+pi.unselectable+")").eq(0):zi.eq(0),Ys.index(ra)<0){gi.verbose("Up key pressed but reached top of current menu"),Si.preventDefault();return}else gi.verbose("Up key pressed, changing active item"),Jn.removeClass(sn.selected),ra.addClass(sn.selected),gi.set.scrollPosition(ra),qi.selectOnKeydown&&gi.is.single()&&gi.set.selectedItem(ra);Si.preventDefault()}if($i==fs.downArrow){if(ra=Aa&&pa?ra=Jn.nextAll(pi.item+":not("+pi.unselectable+")").eq(0):zi.eq(0),ra.length===0){gi.verbose("Down key pressed but reached bottom of current menu"),Si.preventDefault();return}else gi.verbose("Down key pressed, changing active item"),zi.removeClass(sn.selected),ra.addClass(sn.selected),gi.set.scrollPosition(ra),qi.selectOnKeydown&&gi.is.single()&&gi.set.selectedItem(ra);Si.preventDefault()}$i==fs.pageUp&&(gi.scrollPage("up"),Si.preventDefault()),$i==fs.pageDown&&(gi.scrollPage("down"),Si.preventDefault()),$i==fs.escape&&(gi.verbose("Escape key pressed, closing dropdown"),gi.hide())}else sa&&Si.preventDefault(),$i==fs.downArrow&&!gi.is.visible()&&(gi.verbose("Down key pressed, showing dropdown"),gi.show(),Si.preventDefault())}else gi.has.search()||gi.set.selectedLetter(String.fromCharCode($i))}},trigger:{change:function(){var Si=an[0];if(Si){var $i=wi.createEvent("HTMLEvents");gi.verbose("Triggering native change event"),$i.initEvent("change",!0,!1),Si.dispatchEvent($i)}}},determine:{selectAction:function(Si,$i){Xn=!0,gi.verbose("Determining action",qi.action),oi.isFunction(gi.action[qi.action])?(gi.verbose("Triggering preset action",qi.action,Si,$i),gi.action[qi.action].call(Gi,Si,$i,this)):oi.isFunction(qi.action)?(gi.verbose("Triggering user action",qi.action,Si,$i),qi.action.call(Gi,Si,$i,this)):gi.error(rn.action,qi.action),Xn=!1},eventInModule:function(Si,$i){var kn=oi(Si.target),Ln=kn.closest(wi.documentElement).length>0,Un=kn.closest(nn).length>0;return $i=oi.isFunction($i)?$i:function(){},Ln&&!Un?(gi.verbose("Triggering event",$i),$i(),!0):(gi.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(Si,$i){var kn=oi(Si.target),Ln=kn.closest(pi.siblingLabel),Un=wi.body.contains(Si.target),Jn=nn.find(Ln).length===0||!(gi.is.multiple()&&qi.useLabels),Ys=kn.closest(Oi).length===0;return $i=oi.isFunction($i)?$i:function(){},Un&&Jn&&Ys?(gi.verbose("Triggering event",$i),$i(),!0):(gi.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(Si,$i,kn){$i=$i!==vi?$i:Si,gi.can.activate(oi(kn))&&(gi.set.selected($i,oi(kn)),gi.is.multiple()||gi.hideAndClear())},select:function(Si,$i,kn){$i=$i!==vi?$i:Si,gi.can.activate(oi(kn))&&(gi.set.value($i,Si,oi(kn)),gi.is.multiple()||gi.hideAndClear())},combo:function(Si,$i,kn){$i=$i!==vi?$i:Si,gi.set.selected($i,oi(kn)),gi.hideAndClear()},hide:function(Si,$i,kn){gi.set.value($i,Si,oi(kn)),gi.hideAndClear()}},get:{id:function(){return go},defaultText:function(){return nn.data(yn.defaultText)},defaultValue:function(){return nn.data(yn.defaultValue)},placeholderText:function(){return qi.placeholder!="auto"&&typeof qi.placeholder=="string"?qi.placeholder:nn.data(yn.placeholderText)||""},text:function(){return qi.preserveHTML?Ri.html():Ri.text()},query:function(){return String(ki.val()).trim()},searchWidth:function(Si){return Si=Si!==vi?Si:ki.val(),Wi.text(Si),Math.ceil(Wi.width()+1)},selectionCount:function(){var Si=gi.get.values(),$i;return $i=gi.is.multiple()?Array.isArray(Si)?Si.length:0:gi.get.value()!==""?1:0,$i},transition:function(Si){return qi.transition=="auto"?gi.is.upward(Si)?"slide up":"slide down":qi.transition},userValues:function(){var Si=gi.get.values();return Si?(Si=Array.isArray(Si)?Si:[Si],oi.grep(Si,function($i){return gi.get.item($i)===!1})):!1},uniqueArray:function(Si){return oi.grep(Si,function($i,kn){return oi.inArray($i,Si)===kn})},caretPosition:function(Si){var $i=ki.get(0),kn,Ln;if(Si&&"selectionEnd"in $i)return $i.selectionEnd;if(!Si&&"selectionStart"in $i)return $i.selectionStart;if(wi.selection)return $i.focus(),kn=wi.selection.createRange(),Ln=kn.text.length,Si?Ln:(kn.moveStart("character",-$i.value.length),kn.text.length-Ln)},value:function(){var Si=an.length>0?an.val():nn.data(yn.value),$i=Array.isArray(Si)&&Si.length===1&&Si[0]==="";return Si===vi||$i?"":Si},values:function(){var Si=gi.get.value();return Si===""?"":!gi.has.selectInput()&&gi.is.multiple()?typeof Si=="string"?gi.escape.htmlEntities(Si).split(qi.delimiter):"":Si},remoteValues:function(){var Si=gi.get.values(),$i=!1;return Si&&(typeof Si=="string"&&(Si=[Si]),oi.each(Si,function(kn,Ln){var Un=gi.read.remoteData(Ln);gi.verbose("Restoring value from session data",Un,Ln),Un&&($i||($i={}),$i[Ln]=Un)})),$i},choiceText:function(Si,$i){if($i=$i!==vi?$i:qi.preserveHTML,Si)return Si.find(pi.menu).length>0&&(gi.verbose("Retrieving text of element with sub-menu"),Si=Si.clone(),Si.find(pi.menu).remove(),Si.find(pi.menuIcon).remove()),Si.data(yn.text)!==vi?Si.data(yn.text):$i?Si.html().trim():Si.text().trim()},choiceValue:function(Si,$i){return $i=$i||gi.get.choiceText(Si),Si?Si.data(yn.value)!==vi?String(Si.data(yn.value)):typeof $i=="string"?String(qi.ignoreSearchCase?$i.toLowerCase():$i).trim():String($i):!1},inputEvent:function(){var Si=ki[0];return Si?Si.oninput!==vi?"input":Si.onpropertychange!==vi?"propertychange":"keyup":!1},selectValues:function(){var Si={},$i=[],kn=[];return nn.find("option").each(function(){var Ln=oi(this),Un=Ln.html(),Jn=Ln.attr("disabled"),Ys=Ln.attr("value")!==vi?Ln.attr("value"):Un,bo=Ln.data(yn.text)!==vi?Ln.data(yn.text):Un,_o=Ln.parent("optgroup");qi.placeholder==="auto"&&Ys===""?Si.placeholder=Un:((_o.length!==$i.length||_o[0]!==$i[0])&&(kn.push({type:"header",divider:qi.headerDivider,name:_o.attr("label")||""}),$i=_o),kn.push({name:Un,value:Ys,text:bo,disabled:Jn}))}),qi.placeholder&&qi.placeholder!=="auto"&&(gi.debug("Setting placeholder value to",qi.placeholder),Si.placeholder=qi.placeholder),qi.sortSelect?(qi.sortSelect===!0?kn.sort(function(Ln,Un){return Ln.name.localeCompare(Un.name)}):qi.sortSelect==="natural"?kn.sort(function(Ln,Un){return Ln.name.toLowerCase().localeCompare(Un.name.toLowerCase())}):oi.isFunction(qi.sortSelect)&&kn.sort(qi.sortSelect),Si[hs.values]=kn,gi.debug("Retrieved and sorted values from select",Si)):(Si[hs.values]=kn,gi.debug("Retrieved values from select",Si)),Si},activeItem:function(){return zi.filter("."+sn.active)},selectedItem:function(){var Si=zi.not(pi.unselectable).filter("."+sn.selected);return Si.length>0?Si:zi.eq(0)},itemWithAdditions:function(Si){var $i=gi.get.item(Si),kn=gi.create.userChoice(Si),Ln=kn&&kn.length>0;return Ln&&($i=$i.length>0?$i.add(kn):kn),$i},item:function(Si,$i){var kn=!1,Ln,Un;return Si=Si!==vi?Si:gi.get.values()!==vi?gi.get.values():gi.get.text(),Un=gi.is.multiple()&&Array.isArray(Si),Ln=Un?Si.length>0:Si!==vi&&Si!==null,$i=Si===""||Si===!1||Si===!0?!0:$i||!1,Ln&&zi.each(function(){var Jn=oi(this),Ys=gi.get.choiceText(Jn),bo=gi.get.choiceValue(Jn,Ys);if(!(bo===null||bo===vi)){if(Un)oi.inArray(gi.escape.htmlEntities(String(bo)),Si.map(function(_o){return String(_o)}))!==-1&&(kn=kn?kn.add(Jn):Jn);else if($i){if(gi.verbose("Ambiguous dropdown value using strict type check",Jn,Si),bo===Si)return kn=Jn,!0}else if(qi.ignoreCase&&(bo=bo.toLowerCase(),Si=Si.toLowerCase()),gi.escape.htmlEntities(String(bo))===gi.escape.htmlEntities(String(Si)))return gi.verbose("Found select item by value",bo,Si),kn=Jn,!0}}),kn}},check:{maxSelections:function(Si){return qi.maxSelections?(Si=Si!==vi?Si:gi.get.selectionCount(),Si>=qi.maxSelections?(gi.debug("Maximum selection count reached"),qi.useLabels&&(zi.addClass(sn.filtered),gi.add.message(rs.maxSelections)),!0):(gi.verbose("No longer at maximum selection count"),gi.remove.message(),gi.remove.filteredItem(),gi.is.searchSelection()&&gi.filterItems(),!1)):!0},disabled:function(){ki.attr("tabindex",gi.is.disabled()?-1:0)}},restore:{defaults:function(Si){gi.clear(Si),gi.restore.defaultText(),gi.restore.defaultValue()},defaultText:function(){var Si=gi.get.defaultText(),$i=gi.get.placeholderText;Si===$i?(gi.debug("Restoring default placeholder text",Si),gi.set.placeholderText(Si)):(gi.debug("Restoring default text",Si),gi.set.text(Si))},placeholderText:function(){gi.set.placeholderText()},defaultValue:function(){var Si=gi.get.defaultValue();Si!==vi&&(gi.debug("Restoring default value",Si),Si!==""?(gi.set.value(Si),gi.set.selected()):(gi.remove.activeItem(),gi.remove.selectedItem()))},labels:function(){qi.allowAdditions&&(qi.useLabels||(gi.error(rn.labels),qi.useLabels=!0),gi.debug("Restoring selected values"),gi.create.userLabels()),gi.check.maxSelections()},selected:function(){gi.restore.values(),gi.is.multiple()?(gi.debug("Restoring previously selected values and labels"),gi.restore.labels()):gi.debug("Restoring previously selected values")},values:function(){gi.set.initialLoad(),qi.apiSettings&&qi.saveRemoteData&&gi.get.remoteValues()?gi.restore.remoteValues():gi.set.selected();var Si=gi.get.value();Si&&Si!==""&&!(Array.isArray(Si)&&Si.length===0)?an.removeClass(sn.noselection):an.addClass(sn.noselection),gi.remove.initialLoad()},remoteValues:function(){var Si=gi.get.remoteValues();gi.debug("Recreating selected from session data",Si),Si&&(gi.is.single()?oi.each(Si,function($i,kn){gi.set.text(kn)}):oi.each(Si,function($i,kn){gi.add.label($i,kn)}))}},read:{remoteData:function(Si){var $i;if(bi.Storage===vi){gi.error(rn.noStorage);return}return $i=sessionStorage.getItem(Si),$i!==vi?$i:!1}},save:{defaults:function(){gi.save.defaultText(),gi.save.placeholderText(),gi.save.defaultValue()},defaultValue:function(){var Si=gi.get.value();gi.verbose("Saving default value as",Si),nn.data(yn.defaultValue,Si)},defaultText:function(){var Si=gi.get.text();gi.verbose("Saving default text as",Si),nn.data(yn.defaultText,Si)},placeholderText:function(){var Si;qi.placeholder!==!1&&Ri.hasClass(sn.placeholder)&&(Si=gi.get.text(),gi.verbose("Saving placeholder text as",Si),nn.data(yn.placeholderText,Si))},remoteData:function(Si,$i){if(bi.Storage===vi){gi.error(rn.noStorage);return}gi.verbose("Saving remote data to session storage",$i,Si),sessionStorage.setItem($i,Si)}},clear:function(Si){gi.is.multiple()&&qi.useLabels?gi.remove.labels():(gi.remove.activeItem(),gi.remove.selectedItem(),gi.remove.filteredItem()),gi.set.placeholderText(),gi.clearValue(Si)},clearValue:function(Si){gi.set.value("",null,null,Si)},scrollPage:function(Si,$i){var kn=$i||gi.get.selectedItem(),Ln=kn.closest(pi.menu),Un=Ln.outerHeight(),Jn=Ln.scrollTop(),Ys=zi.eq(0).outerHeight(),bo=Math.floor(Un/Ys),_o=Ln.prop("scrollHeight"),pa=Si=="up"?Jn-Ys*bo:Jn+Ys*bo,ka=zi.not(pi.unselectable),Aa,ha,sa;sa=Si=="up"?ka.index(kn)-bo:ka.index(kn)+bo,Aa=Si=="up"?sa>=0:sa<ka.length,ha=Aa?ka.eq(sa):Si=="up"?ka.first():ka.last(),ha.length>0&&(gi.debug("Scrolling page",Si,ha),kn.removeClass(sn.selected),ha.addClass(sn.selected),qi.selectOnKeydown&&gi.is.single()&&gi.set.selectedItem(ha),Ln.scrollTop(pa))},set:{filtered:function(){var Si=gi.is.multiple(),$i=gi.is.searchSelection(),kn=Si&&$i,Ln=$i?gi.get.query():"",Un=typeof Ln=="string"&&Ln.length>0,Jn=gi.get.searchWidth(),Ys=Ln!=="";Si&&Un&&(gi.verbose("Adjusting input width",Jn,qi.glyphWidth),ki.css("width",Jn)),Un||kn&&Ys?(gi.verbose("Hiding placeholder text"),Ri.addClass(sn.filtered)):(!Si||kn&&!Ys)&&(gi.verbose("Showing placeholder text"),Ri.removeClass(sn.filtered))},empty:function(){nn.addClass(sn.empty)},loading:function(){nn.addClass(sn.loading)},placeholderText:function(Si){Si=Si||gi.get.placeholderText(),gi.debug("Setting placeholder text",Si),gi.set.text(Si),Ri.addClass(sn.placeholder)},tabbable:function(){gi.is.searchSelection()?(gi.debug("Added tabindex to searchable dropdown"),ki.val(""),gi.check.disabled(),Oi.attr("tabindex",-1)):(gi.debug("Added tabindex to dropdown"),nn.attr("tabindex")===vi&&(nn.attr("tabindex",0),Oi.attr("tabindex",-1)))},initialLoad:function(){gi.verbose("Setting initial load"),cs=!0},activeItem:function(Si){qi.allowAdditions&&Si.filter(pi.addition).length>0?Si.addClass(sn.filtered):Si.addClass(sn.active)},partialSearch:function(Si){var $i=gi.get.query().length;ki.val(Si.substr(0,$i))},scrollPosition:function(Si,$i){var kn=5,Ln,Un,Jn,Ys,bo,_o,pa,ka,Aa,ha;Si=Si||gi.get.selectedItem(),Ln=Si.closest(pi.menu),Un=Si&&Si.length>0,$i=$i!==vi?$i:!1,gi.get.activeItem().length===0&&($i=!1),Si&&Ln.length>0&&Un&&(bo=Si.position().top,Ln.addClass(sn.loading),pa=Ln.scrollTop(),_o=Ln.offset().top,bo=Si.offset().top,Jn=pa-_o+bo,$i||(ka=Ln.height(),ha=pa+ka<Jn+kn,Aa=Jn-kn<pa),gi.debug("Scrolling to active item",Jn),($i||Aa||ha)&&Ln.scrollTop(Jn),Ln.removeClass(sn.loading))},text:function(Si){qi.action==="combo"?(gi.debug("Changing combo button text",Si,Fi),qi.preserveHTML?Fi.html(Si):Fi.text(Si)):qi.action==="activate"&&(Si!==gi.get.placeholderText()&&Ri.removeClass(sn.placeholder),gi.debug("Changing text",Si,Ri),Ri.removeClass(sn.filtered),qi.preserveHTML?Ri.html(Si):Ri.text(Si))},selectedItem:function(Si){var $i=gi.get.choiceValue(Si),kn=gi.get.choiceText(Si,!1),Ln=gi.get.choiceText(Si,!0);gi.debug("Setting user selection to item",Si),gi.remove.activeItem(),gi.set.partialSearch(kn),gi.set.activeItem(Si),gi.set.selected($i,Si),gi.set.text(Ln)},selectedLetter:function(Si){var $i=zi.filter("."+sn.selected),kn=$i.length>0&&gi.has.firstLetter($i,Si),Ln=!1,Un;kn&&(Un=$i.nextAll(zi).eq(0),gi.has.firstLetter(Un,Si)&&(Ln=Un)),Ln||zi.each(function(){if(gi.has.firstLetter(oi(this),Si))return Ln=oi(this),!1}),Ln&&(gi.verbose("Scrolling to next value with letter",Si),gi.set.scrollPosition(Ln),$i.removeClass(sn.selected),Ln.addClass(sn.selected),qi.selectOnKeydown&&gi.is.single()&&gi.set.selectedItem(Ln))},direction:function(Si){qi.direction=="auto"?(Si?gi.is.upward(Si)&&gi.remove.upward(Si):gi.remove.upward(),gi.can.openDownward(Si)?gi.remove.upward(Si):gi.set.upward(Si),!gi.is.leftward(Si)&&!gi.can.openRightward(Si)&&gi.set.leftward(Si)):qi.direction=="upward"&&gi.set.upward(Si)},upward:function(Si){var $i=Si||nn;$i.addClass(sn.upward)},leftward:function(Si){var $i=Si||Oi;$i.addClass(sn.leftward)},value:function(Si,$i,kn,Ln){Si!==vi&&Si!==""&&!(Array.isArray(Si)&&Si.length===0)?an.removeClass(sn.noselection):an.addClass(sn.noselection);var Un=gi.escape.value(Si),Jn=an.length>0,Ys=gi.get.values(),bo=Si!==vi?String(Si):Si,_o;if(Jn){if(!qi.allowReselection&&bo==Ys&&(gi.verbose("Skipping value update already same value",Si,Ys),!gi.is.initialLoad()))return;gi.is.single()&&gi.has.selectInput()&&gi.can.extendSelect()&&(gi.debug("Adding user option",Si),gi.add.optionValue(Si)),gi.debug("Updating input value",Un,Ys),Bi=!0,an.val(Un),qi.fireOnInit===!1&&gi.is.initialLoad()?gi.debug("Input native change event ignored on initial load"):Ln!==!0&&gi.trigger.change(),Bi=!1}else gi.verbose("Storing value in metadata",Un,an),Un!==Ys&&nn.data(yn.value,bo);qi.fireOnInit===!1&&gi.is.initialLoad()?gi.verbose("No callback on initial load",qi.onChange):Ln!==!0&&qi.onChange.call(Gi,Si,$i,kn)},active:function(){nn.addClass(sn.active)},multiple:function(){nn.addClass(sn.multiple)},visible:function(){nn.addClass(sn.visible)},exactly:function(Si,$i){gi.debug("Setting selected to exact values"),gi.clear(),gi.set.selected(Si,$i)},selected:function(Si,$i){var kn=gi.is.multiple();$i=qi.allowAdditions?$i||gi.get.itemWithAdditions(Si):$i||gi.get.item(Si),$i&&(gi.debug("Setting selected menu item to",$i),gi.is.multiple()&&gi.remove.searchWidth(),gi.is.single()?(gi.remove.activeItem(),gi.remove.selectedItem()):qi.useLabels&&gi.remove.selectedItem(),$i.each(function(){var Ln=oi(this),Un=gi.get.choiceText(Ln),Jn=gi.get.choiceValue(Ln,Un),Ys=Ln.hasClass(sn.filtered),bo=Ln.hasClass(sn.active),_o=Ln.hasClass(sn.addition),pa=kn&&$i.length==1;kn?!bo||_o?(qi.apiSettings&&qi.saveRemoteData&&gi.save.remoteData(Un,Jn),qi.useLabels?(gi.add.label(Jn,Un,pa),gi.add.value(Jn,Un,Ln),gi.set.activeItem(Ln),gi.filterActive(),gi.select.nextAvailable($i)):(gi.add.value(Jn,Un,Ln),gi.set.text(gi.add.variables(rs.count)),gi.set.activeItem(Ln))):!Ys&&(qi.useLabels||Xn)&&(gi.debug("Selected active value, removing label"),gi.remove.selected(Jn)):(qi.apiSettings&&qi.saveRemoteData&&gi.save.remoteData(Un,Jn),gi.set.text(Un),gi.set.value(Jn,Un,Ln),Ln.addClass(sn.active).addClass(sn.selected))}),gi.remove.searchTerm())}},add:{label:function(Si,$i,kn){var Ln=gi.is.searchSelection()?ki:Ri,Un=gi.escape.value(Si),Jn;if(qi.ignoreCase&&(Un=Un.toLowerCase()),Jn=oi("<a />").addClass(sn.label).attr("data-"+yn.value,Un).html(dn.label(Un,$i,qi.preserveHTML,qi.className)),Jn=qi.onLabelCreate.call(Jn,Un,$i),gi.has.label(Si)){gi.debug("User selection already exists, skipping",Un);return}qi.label.variation&&Jn.addClass(qi.label.variation),kn===!0?(gi.debug("Animating in label",Jn),Jn.addClass(sn.hidden).insertBefore(Ln).transition({animation:qi.label.transition,debug:qi.debug,verbose:qi.verbose,duration:qi.label.duration})):(gi.debug("Adding selection label",Jn),Jn.insertBefore(Ln))},message:function(Si){var $i=Oi.children(pi.message),kn=qi.templates.message(gi.add.variables(Si));$i.length>0?$i.html(kn):$i=oi("<div/>").html(kn).addClass(sn.message).appendTo(Oi)},optionValue:function(Si){var $i=gi.escape.value(Si),kn=an.find('option[value="'+gi.escape.string($i)+'"]'),Ln=kn.length>0;Ln||(gi.disconnect.selectObserver(),gi.is.single()&&(gi.verbose("Removing previous user addition"),an.find("option."+sn.addition).remove()),oi("<option/>").prop("value",$i).addClass(sn.addition).html(Si).appendTo(an),gi.verbose("Adding user addition as an <option>",Si),gi.observe.select())},userSuggestion:function(Si){var $i=Oi.children(pi.addition),kn=gi.get.item(Si),Ln=kn&&kn.not(pi.addition).length,Un=$i.length>0,Jn;if(!(qi.useLabels&&gi.has.maxSelections())){if(Si===""||Ln){$i.remove();return}Un?($i.data(yn.value,Si).data(yn.text,Si).attr("data-"+yn.value,Si).attr("data-"+yn.text,Si).removeClass(sn.filtered),qi.hideAdditions||(Jn=qi.templates.addition(gi.add.variables(rs.addResult,Si)),$i.html(Jn)),gi.verbose("Replacing user suggestion with new value",$i)):($i=gi.create.userChoice(Si),$i.prependTo(Oi),gi.verbose("Adding item choice to menu corresponding with user choice addition",$i)),(!qi.hideAdditions||gi.is.allFiltered())&&$i.addClass(sn.selected).siblings().removeClass(sn.selected),gi.refreshItems()}},variables:function(Si,$i){var kn=Si.search("{count}")!==-1,Ln=Si.search("{maxCount}")!==-1,Un=Si.search("{term}")!==-1,Jn,Ys;return gi.verbose("Adding templated variables to message",Si),kn&&(Jn=gi.get.selectionCount(),Si=Si.replace("{count}",Jn)),Ln&&(Jn=gi.get.selectionCount(),Si=Si.replace("{maxCount}",qi.maxSelections)),Un&&(Ys=$i||gi.get.query(),Si=Si.replace("{term}",Ys)),Si},value:function(Si,$i,kn){var Ln=gi.get.values(),Un;if(gi.has.value(Si)){gi.debug("Value already selected");return}if(Si===""){gi.debug("Cannot select blank values from multiselect");return}Array.isArray(Ln)?(Un=Ln.concat([Si]),Un=gi.get.uniqueArray(Un)):Un=[Si],gi.has.selectInput()?gi.can.extendSelect()&&(gi.debug("Adding value to select",Si,Un,an),gi.add.optionValue(Si)):(Un=Un.join(qi.delimiter),gi.debug("Setting hidden input to delimited value",Un,an)),qi.fireOnInit===!1&&gi.is.initialLoad()?gi.verbose("Skipping onadd callback on initial load",qi.onAdd):qi.onAdd.call(Gi,Si,$i,kn),gi.set.value(Un,$i,kn),gi.check.maxSelections()}},remove:{active:function(){nn.removeClass(sn.active)},activeLabel:function(){nn.find(pi.label).removeClass(sn.active)},empty:function(){nn.removeClass(sn.empty)},loading:function(){nn.removeClass(sn.loading)},initialLoad:function(){cs=!1},upward:function(Si){var $i=Si||nn;$i.removeClass(sn.upward)},leftward:function(Si){var $i=Si||Oi;$i.removeClass(sn.leftward)},visible:function(){nn.removeClass(sn.visible)},activeItem:function(){zi.removeClass(sn.active)},filteredItem:function(){qi.useLabels&&gi.has.maxSelections()||(qi.useLabels&&gi.is.multiple()?zi.not("."+sn.active).removeClass(sn.filtered):zi.removeClass(sn.filtered),qi.hideDividers&&Ti.removeClass(sn.hidden),gi.remove.empty())},optionValue:function(Si){var $i=gi.escape.value(Si),kn=an.find('option[value="'+gi.escape.string($i)+'"]'),Ln=kn.length>0;!Ln||!kn.hasClass(sn.addition)||(Po&&(Po.disconnect(),gi.verbose("Temporarily disconnecting mutation observer")),kn.remove(),gi.verbose("Removing user addition as an <option>",$i),Po&&Po.observe(an[0],{childList:!0,subtree:!0}))},message:function(){Oi.children(pi.message).remove()},searchWidth:function(){ki.css("width","")},searchTerm:function(){gi.verbose("Cleared search term"),ki.val(""),gi.set.filtered()},userAddition:function(){zi.filter(pi.addition).remove()},selected:function(Si,$i){if($i=qi.allowAdditions?$i||gi.get.itemWithAdditions(Si):$i||gi.get.item(Si),!$i)return!1;$i.each(function(){var kn=oi(this),Ln=gi.get.choiceText(kn),Un=gi.get.choiceValue(kn,Ln);gi.is.multiple()?qi.useLabels?(gi.remove.value(Un,Ln,kn),gi.remove.label(Un)):(gi.remove.value(Un,Ln,kn),gi.get.selectionCount()===0?gi.set.placeholderText():gi.set.text(gi.add.variables(rs.count))):gi.remove.value(Un,Ln,kn),kn.removeClass(sn.filtered).removeClass(sn.active),qi.useLabels&&kn.removeClass(sn.selected)})},selectedItem:function(){zi.removeClass(sn.selected)},value:function(Si,$i,kn){var Ln=gi.get.values(),Un;Si=gi.escape.htmlEntities(Si),gi.has.selectInput()?(gi.verbose("Input is <select> removing selected option",Si),Un=gi.remove.arrayValue(Si,Ln),gi.remove.optionValue(Si)):(gi.verbose("Removing from delimited values",Si),Un=gi.remove.arrayValue(Si,Ln),Un=Un.join(qi.delimiter)),qi.fireOnInit===!1&&gi.is.initialLoad()?gi.verbose("No callback on initial load",qi.onRemove):qi.onRemove.call(Gi,Si,$i,kn),gi.set.value(Un,$i,kn),gi.check.maxSelections()},arrayValue:function(Si,$i){return Array.isArray($i)||($i=[$i]),$i=oi.grep($i,function(kn){return Si!=kn}),gi.verbose("Removed value from delimited string",Si,$i),$i},label:function(Si,$i){var kn=nn.find(pi.label),Ln=kn.filter("[data-"+yn.value+'="'+gi.escape.string(qi.ignoreCase?Si.toLowerCase():Si)+'"]');gi.verbose("Removing label",Ln),Ln.remove()},activeLabels:function(Si){Si=Si||nn.find(pi.label).filter("."+sn.active),gi.verbose("Removing active label selections",Si),gi.remove.labels(Si)},labels:function(Si){Si=Si||nn.find(pi.label),gi.verbose("Removing labels",Si),Si.each(function(){var $i=oi(this),kn=$i.data(yn.value),Ln=kn!==vi?String(kn):kn,Un=gi.is.userValue(Ln);if(qi.onLabelRemove.call($i,kn)===!1){gi.debug("Label remove callback cancelled removal");return}gi.remove.message(),Un?(gi.remove.value(Ln),gi.remove.label(Ln)):gi.remove.selected(Ln)})},tabbable:function(){gi.is.searchSelection()?(gi.debug("Searchable dropdown initialized"),ki.removeAttr("tabindex"),Oi.removeAttr("tabindex")):(gi.debug("Simple selection dropdown initialized"),nn.removeAttr("tabindex"),Oi.removeAttr("tabindex"))},diacritics:function(Si){return qi.ignoreDiacritics?Si.normalize("NFD").replace(/[\u0300-\u036f]/g,""):Si}},has:{menuSearch:function(){return gi.has.search()&&ki.closest(Oi).length>0},clearItem:function(){return en.length>0},search:function(){return ki.length>0},sizer:function(){return Wi.length>0},selectInput:function(){return an.is("select")},minCharacters:function(Si){return qi.minCharacters&&!Qi?(Si=String(Si!==vi?Si:gi.get.query()),Si.length>=qi.minCharacters):(Qi=!1,!0)},firstLetter:function(Si,$i){var kn,Ln;return!Si||Si.length===0||typeof $i!="string"?!1:(kn=gi.get.choiceText(Si,!1),$i=$i.toLowerCase(),Ln=String(kn).charAt(0).toLowerCase(),$i==Ln)},input:function(){return an.length>0},items:function(){return zi.length>0},menu:function(){return Oi.length>0},message:function(){return Oi.children(pi.message).length!==0},label:function(Si){var $i=gi.escape.value(Si),kn=nn.find(pi.label);return qi.ignoreCase&&($i=$i.toLowerCase()),kn.filter("[data-"+yn.value+'="'+gi.escape.string($i)+'"]').length>0},maxSelections:function(){return qi.maxSelections&&gi.get.selectionCount()>=qi.maxSelections},allResultsFiltered:function(){var Si=zi.not(pi.addition);return Si.filter(pi.unselectable).length===Si.length},userSuggestion:function(){return Oi.children(pi.addition).length>0},query:function(){return gi.get.query()!==""},value:function(Si){return qi.ignoreCase?gi.has.valueIgnoringCase(Si):gi.has.valueMatchingCase(Si)},valueMatchingCase:function(Si){var $i=gi.get.values(),kn=Array.isArray($i)?$i&&oi.inArray(Si,$i)!==-1:$i==Si;return!!kn},valueIgnoringCase:function(Si){var $i=gi.get.values(),kn=!1;return Array.isArray($i)||($i=[$i]),oi.each($i,function(Ln,Un){if(String(Si).toLowerCase()==String(Un).toLowerCase())return kn=!0,!1}),kn}},is:{active:function(){return nn.hasClass(sn.active)},animatingInward:function(){return Oi.transition("is inward")},animatingOutward:function(){return Oi.transition("is outward")},bubbledLabelClick:function(Si){return oi(Si.target).is("select, input")&&nn.closest("label").length>0},bubbledIconClick:function(Si){return oi(Si.target).closest(Fn).length>0},alreadySetup:function(){return nn.is("select")&&nn.parent(pi.dropdown).data(Pn)!==vi&&nn.prev().length===0},animating:function(Si){return Si?Si.transition&&Si.transition("is animating"):Oi.transition&&Oi.transition("is animating")},leftward:function(Si){var $i=Si||Oi;return $i.hasClass(sn.leftward)},clearable:function(){return nn.hasClass(sn.clearable)||qi.clearable},disabled:function(){return nn.hasClass(sn.disabled)},focused:function(){return wi.activeElement===nn[0]},focusedOnSearch:function(){return wi.activeElement===ki[0]},allFiltered:function(){return(gi.is.multiple()||gi.has.search())&&!(qi.hideAdditions==!1&&gi.has.userSuggestion())&&!gi.has.message()&&gi.has.allResultsFiltered()},hidden:function(Si){return!gi.is.visible(Si)},initialLoad:function(){return cs},inObject:function(Si,$i){var kn=!1;return oi.each($i,function(Ln,Un){if(Un==Si)return kn=!0,!0}),kn},multiple:function(){return nn.hasClass(sn.multiple)},remote:function(){return qi.apiSettings&&gi.can.useAPI()},single:function(){return!gi.is.multiple()},selectMutation:function(Si){var $i=!1;return oi.each(Si,function(kn,Ln){if(oi(Ln.target).is("select")||oi(Ln.addedNodes).is("select"))return $i=!0,!1}),$i},search:function(){return nn.hasClass(sn.search)},searchSelection:function(){return gi.has.search()&&ki.parent(pi.dropdown).length===1},selection:function(){return nn.hasClass(sn.selection)},userValue:function(Si){return oi.inArray(Si,gi.get.userValues())!==-1},upward:function(Si){var $i=Si||nn;return $i.hasClass(sn.upward)},visible:function(Si){return Si?Si.hasClass(sn.visible):Oi.hasClass(sn.visible)},verticallyScrollableContext:function(){var Si=Ai.get(0)!==bi?Ai.css("overflow-y"):!1;return Si=="auto"||Si=="scroll"},horizontallyScrollableContext:function(){var Si=Ai.get(0)!==bi?Ai.css("overflow-X"):!1;return Si=="auto"||Si=="scroll"}},can:{activate:function(Si){return!!(qi.useLabels||!gi.has.maxSelections()||gi.has.maxSelections()&&Si.hasClass(sn.active))},openDownward:function(Si){var $i=Si||Oi,kn=!0,Ln={},Un;return $i.addClass(sn.loading),Un={context:{offset:Ai.get(0)===bi?{top:0,left:0}:Ai.offset(),scrollTop:Ai.scrollTop(),height:Ai.outerHeight()},menu:{offset:$i.offset(),height:$i.outerHeight()}},gi.is.verticallyScrollableContext()&&(Un.menu.offset.top+=Un.context.scrollTop),Ln={above:Un.context.scrollTop<=Un.menu.offset.top-Un.context.offset.top-Un.menu.height,below:Un.context.scrollTop+Un.context.height>=Un.menu.offset.top-Un.context.offset.top+Un.menu.height},Ln.below?(gi.verbose("Dropdown can fit in context downward",Ln),kn=!0):!Ln.below&&!Ln.above?(gi.verbose("Dropdown cannot fit in either direction, favoring downward",Ln),kn=!0):(gi.verbose("Dropdown cannot fit below, opening upward",Ln),kn=!1),$i.removeClass(sn.loading),kn},openRightward:function(Si){var $i=Si||Oi,kn=!0,Ln=!1,Un;return $i.addClass(sn.loading),Un={context:{offset:Ai.get(0)===bi?{top:0,left:0}:Ai.offset(),scrollLeft:Ai.scrollLeft(),width:Ai.outerWidth()},menu:{offset:$i.offset(),width:$i.outerWidth()}},gi.is.horizontallyScrollableContext()&&(Un.menu.offset.left+=Un.context.scrollLeft),Ln=Un.menu.offset.left-Un.context.offset.left+Un.menu.width>=Un.context.scrollLeft+Un.context.width,Ln&&(gi.verbose("Dropdown cannot fit in context rightward",Ln),kn=!1),$i.removeClass(sn.loading),kn},click:function(){return tn||qi.on=="click"},extendSelect:function(){return qi.allowAdditions||qi.apiSettings},show:function(){return!gi.is.disabled()&&(gi.has.items()||gi.has.message())},useAPI:function(){return oi.fn.api!==vi}},animate:{show:function(Si,$i){var kn=$i||Oi,Ln=$i?function(){}:function(){gi.hideSubMenus(),gi.hideOthers(),gi.set.active()},Un;if(Si=oi.isFunction(Si)?Si:function(){},gi.verbose("Doing menu show animation",kn),gi.set.direction($i),Un=gi.get.transition($i),gi.is.selection()&&gi.set.scrollPosition(gi.get.selectedItem(),!0),gi.is.hidden(kn)||gi.is.animating(kn)){var Jn=nn.hasClass("column")?"flex":!1;Un=="none"?(Ln(),kn.transition({displayType:Jn}).transition("show"),Si.call(Gi)):oi.fn.transition!==vi&&nn.transition("is supported")?kn.transition({animation:Un+" in",debug:qi.debug,verbose:qi.verbose,duration:qi.duration,queue:!0,onStart:Ln,displayType:Jn,onComplete:function(){Si.call(Gi)}}):gi.error(rn.noTransition,Un)}},hide:function(Si,$i){var kn=$i||Oi,Ln=$i?function(){}:function(){gi.can.click()&&gi.unbind.intent(),gi.remove.active()},Un=gi.get.transition($i);Si=oi.isFunction(Si)?Si:function(){},(gi.is.visible(kn)||gi.is.animating(kn))&&(gi.verbose("Doing menu hide animation",kn),Un=="none"?(Ln(),kn.transition("hide"),Si.call(Gi)):oi.fn.transition!==vi&&nn.transition("is supported")?kn.transition({animation:Un+" out",duration:qi.duration,debug:qi.debug,verbose:qi.verbose,queue:!1,onStart:Ln,onComplete:function(){Si.call(Gi)}}):gi.error(rn.transition))}},hideAndClear:function(){gi.remove.searchTerm(),!gi.has.maxSelections()&&(gi.has.search()?gi.hide(function(){gi.remove.filteredItem()}):gi.hide())},delay:{show:function(){gi.verbose("Delaying show event to ensure user intent"),clearTimeout(gi.timer),gi.timer=setTimeout(gi.show,qi.delay.show)},hide:function(){gi.verbose("Delaying hide event to ensure user intent"),clearTimeout(gi.timer),gi.timer=setTimeout(gi.hide,qi.delay.hide)}},escape:{value:function(Si){var $i=Array.isArray(Si),kn=typeof Si=="string",Ln=!kn&&!$i,Un=kn&&Si.search(Mn.quote)!==-1,Jn=[];return Ln||!Un?Si:(gi.debug("Encoding quote values for use in select",Si),$i?(oi.each(Si,function(Ys,bo){Jn.push(bo.replace(Mn.quote,"""))}),Jn):Si.replace(Mn.quote,"""))},string:function(Si){return Si=String(Si),Si.replace(Mn.escape,"\\$&")},htmlEntities:function(Si){var $i=/[<>"'`]/g,kn=/[&<>"'`]/,Ln={"<":"<",">":">",'"':""","'":"'","`":"`"},Un=function(Jn){return Ln[Jn]};return kn.test(Si)?(Si=Si.replace(/&(?![a-z0-9#]{1,6};)/,"&"),Si.replace($i,Un)):Si}},setting:function(Si,$i){if(gi.debug("Changing setting",Si,$i),oi.isPlainObject(Si))oi.extend(!0,qi,Si);else if($i!==vi)oi.isPlainObject(qi[Si])?oi.extend(!0,qi[Si],$i):qi[Si]=$i;else return qi[Si]},internal:function(Si,$i){if(oi.isPlainObject(Si))oi.extend(!0,gi,Si);else if($i!==vi)gi[Si]=$i;else return gi[Si]},debug:function(){!qi.silent&&qi.debug&&(qi.performance?gi.performance.log(arguments):(gi.debug=Function.prototype.bind.call(console.info,console,qi.name+":"),gi.debug.apply(console,arguments)))},verbose:function(){!qi.silent&&qi.verbose&&qi.debug&&(qi.performance?gi.performance.log(arguments):(gi.verbose=Function.prototype.bind.call(console.info,console,qi.name+":"),gi.verbose.apply(console,arguments)))},error:function(){qi.silent||(gi.error=Function.prototype.bind.call(console.error,console,qi.name+":"),gi.error.apply(console,arguments))},performance:{log:function(Si){var $i,kn,Ln;qi.performance&&($i=new Date().getTime(),Ln=Vn||$i,kn=$i-Ln,Vn=$i,bn.push({Name:Si[0],Arguments:[].slice.call(Si,1)||"",Element:Gi,"Execution Time":kn})),clearTimeout(gi.performance.timer),gi.performance.timer=setTimeout(gi.performance.display,500)},display:function(){var Si=qi.name+":",$i=0;Vn=!1,clearTimeout(gi.performance.timer),oi.each(bn,function(kn,Ln){$i+=Ln["Execution Time"]}),Si+=" "+$i+"ms",Ji&&(Si+=" '"+Ji+"'"),(console.group!==vi||console.table!==vi)&&bn.length>0&&(console.groupCollapsed(Si),console.table?console.table(bn):oi.each(bn,function(kn,Ln){console.log(Ln.Name+": "+Ln["Execution Time"]+"ms")}),console.groupEnd()),bn=[]}},invoke:function(Si,$i,kn){var Ln=On,Un,Jn,Ys;return $i=$i||ls,kn=Gi||kn,typeof Si=="string"&&Ln!==vi&&(Si=Si.split(/[\. ]/),Un=Si.length-1,oi.each(Si,function(bo,_o){var pa=bo!=Un?_o+Si[bo+1].charAt(0).toUpperCase()+Si[bo+1].slice(1):Si;if(oi.isPlainObject(Ln[pa])&&bo!=Un)Ln=Ln[pa];else{if(Ln[pa]!==vi)return Jn=Ln[pa],!1;if(oi.isPlainObject(Ln[_o])&&bo!=Un)Ln=Ln[_o];else return Ln[_o]!==vi?(Jn=Ln[_o],!1):(gi.error(rn.method,Si),!1)}})),oi.isFunction(Jn)?Ys=Jn.apply(kn,$i):Jn!==vi&&(Ys=Jn),Array.isArray(ks)?ks.push(Ys):ks!==vi?ks=[ks,Ys]:Ys!==vi&&(ks=Ys),Jn}},un?(On===vi&&gi.initialize(),gi.invoke(Zi)):(On!==vi&&On.invoke("destroy"),gi.initialize())}),ks!==vi?ks:yi},oi.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,clearable:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:bi,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,ignoreSearchCase:!0,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,headerDivider:!0,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(ri,yi,Li){},onAdd:function(ri,yi,Li){},onRemove:function(ri,yi,Li){},onLabelSelect:function(ri){},onLabelCreate:function(ri,yi){return oi(this)},onLabelRemove:function(ri){return!0},onNoResults:function(ri){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>",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},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",type:"type",image:"image",imageClass:"imageClass",icon:"icon",iconClass:"iconClass",class:"class",divider:"divider"},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",divider:".divider, .header",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:"> span.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered",clearIcon:"> .remove.icon"},className:{active:"active",addition:"addition",animating:"animating",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",icon:"icon",image:"image",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",clearable:"clearable",noselection:"noselection",delete:"delete",header:"header",divider:"divider",groupIcon:"",unfilterable:"unfilterable"}},oi.fn.dropdown.settings.templates={deQuote:function(ri){return String(ri).replace(/"/g,"")},escape:function(ri,yi){if(yi)return ri;var Li=/[<>"'`]/g,Ji=/[&<>"'`]/,tn={"<":"<",">":">",'"':""","'":"'","`":"`"},_n=function(In){return tn[In]};return Ji.test(ri)?(ri=ri.replace(/&(?![a-z0-9#]{1,6};)/,"&"),ri.replace(Li,_n)):ri},dropdown:function(ri,yi,Li,Ji){var tn=ri.placeholder||!1,_n="",In=oi.fn.dropdown.settings.templates.escape;return _n+='<i class="dropdown icon"></i>',tn?_n+='<div class="default text">'+In(tn,Li)+"</div>":_n+='<div class="text"></div>',_n+='<div class="'+Ji.menu+'">',_n+=oi.fn.dropdown.settings.templates.menu(ri,yi,Li,Ji),_n+="</div>",_n},menu:function(ri,yi,Li,Ji){var tn=ri[yi.values]||[],_n="",In=oi.fn.dropdown.settings.templates.escape,Vn=oi.fn.dropdown.settings.templates.deQuote;return oi.each(tn,function(bn,Zi){var un=Zi[yi.type]?Zi[yi.type]:"item";if(un==="item"){var ls=Zi[yi.text]?' data-text="'+Vn(Zi[yi.text])+'"':"",ks=Zi[yi.disabled]?Ji.disabled+" ":"";_n+='<div class="'+ks+(Zi[yi.class]?Vn(Zi[yi.class]):Ji.item)+'" data-value="'+Vn(Zi[yi.value])+'"'+ls+">",Zi[yi.image]&&(_n+='<img class="'+(Zi[yi.imageClass]?Vn(Zi[yi.imageClass]):Ji.image)+'" src="'+Vn(Zi[yi.image])+'">'),Zi[yi.icon]&&(_n+='<i class="'+Vn(Zi[yi.icon])+" "+(Zi[yi.iconClass]?Vn(Zi[yi.iconClass]):Ji.icon)+'"></i>'),_n+=In(Zi[yi.name]||"",Li),_n+="</div>"}else if(un==="header"){var En=In(Zi[yi.name]||"",Li),qi=Zi[yi.icon]?Vn(Zi[yi.icon]):Ji.groupIcon;(En!==""||qi!=="")&&(_n+='<div class="'+(Zi[yi.class]?Vn(Zi[yi.class]):Ji.header)+'">',qi!==""&&(_n+='<i class="'+qi+" "+(Zi[yi.iconClass]?Vn(Zi[yi.iconClass]):Ji.icon)+'"></i>'),_n+=En,_n+="</div>"),Zi[yi.divider]&&(_n+='<div class="'+Ji.divider+'"></div>')}}),_n},label:function(ri,yi,Li,Ji){var tn=oi.fn.dropdown.settings.templates.escape;return tn(yi,Li)+'<i class="'+Ji.delete+' icon"></i>'},message:function(ri){return ri},addition:function(ri){return ri}}})(jQuery,window,document);(function(oi,bi,wi,vi){"use strict";oi.isFunction=oi.isFunction||function(ri){return typeof ri=="function"&&typeof ri.nodeType!="number"},bi=typeof bi<"u"&&bi.Math==Math?bi:typeof self<"u"&&self.Math==Math?self:Function("return this")(),oi.fn.form=function(ri){var yi=oi(this),Li=yi.selector||"",Ji=new Date().getTime(),tn=[],_n=arguments[0],In=arguments[1],Vn=typeof _n=="string",bn=[].slice.call(arguments,1),Zi;return yi.each(function(){var un=oi(this),ls=this,ks=[],En=!1,qi,sn,rs,hs,fs,yn,mn,Mn,pi,rn,dn,pn,Pn,nn,Ai,Ri,ki,Wi=!1,an=!1,Fn=["clean","clean"],en,Fi;Fi={initialize:function(){Fi.get.settings(),Vn?(en===vi&&Fi.instantiate(),Fi.invoke(_n)):(en!==vi&&en.invoke("destroy"),Fi.verbose("Initializing form validation",un,Mn),Fi.bindEvents(),Fi.set.defaults(),Mn.autoCheckRequired&&Fi.set.autoCheck(),Fi.instantiate())},instantiate:function(){Fi.verbose("Storing instance of module",Fi),en=Fi,un.data(Ri,Fi)},destroy:function(){Fi.verbose("Destroying previous module",en),Fi.removeEvents(),un.removeData(Ri)},refresh:function(){Fi.verbose("Refreshing selector cache"),qi=un.find(dn.field),sn=un.find(dn.group),rs=un.find(dn.message),hs=un.find(dn.prompt),fs=un.find(dn.submit),yn=un.find(dn.clear),mn=un.find(dn.reset)},submit:function(){Fi.verbose("Submitting form",un),Wi=!0,un.submit()},attachEvents:function(Oi,zi){zi=zi||"submit",oi(Oi).on("click"+ki,function(Ti){Fi[zi](),Ti.preventDefault()})},bindEvents:function(){Fi.verbose("Attaching form events"),un.on("submit"+ki,Fi.validate.form).on("blur"+ki,dn.field,Fi.event.field.blur).on("click"+ki,dn.submit,Fi.submit).on("click"+ki,dn.reset,Fi.reset).on("click"+ki,dn.clear,Fi.clear),Mn.keyboardShortcuts&&un.on("keydown"+ki,dn.field,Fi.event.field.keydown),qi.each(function(Oi,zi){var Ti=oi(zi),Yi=Ti.prop("type"),wn=Fi.get.changeEvent(Yi,Ti);Ti.on(wn+ki,Fi.event.field.change)}),Mn.preventLeaving&&oi(bi).on("beforeunload"+ki,Fi.event.beforeUnload),qi.on("change click keyup keydown blur",function(Oi){oi(this).triggerHandler(Oi.type+".dirty")}),qi.on("change.dirty click.dirty keyup.dirty keydown.dirty blur.dirty",Fi.determine.isDirty),un.on("dirty"+ki,function(Oi){Mn.onDirty.call()}),un.on("clean"+ki,function(Oi){Mn.onClean.call()})},clear:function(){qi.each(function(Oi,zi){var Ti=oi(zi),Yi=Ti.parent(),wn=Ti.closest(sn),Bi=wn.find(dn.prompt),Qi=Ti.closest(dn.uiCalendar),Gi=Ti.data(rn.defaultValue)||"",On=Yi.is(dn.uiCheckbox),Xn=Yi.is(dn.uiDropdown)&&Fi.can.useElement("dropdown"),cs=Qi.length>0&&Fi.can.useElement("calendar"),Vs=wn.hasClass(pn.error);Vs&&(Fi.verbose("Resetting error on field",wn),wn.removeClass(pn.error),Bi.remove()),Xn?(Fi.verbose("Resetting dropdown value",Yi,Gi),Yi.dropdown("clear",!0)):On?Ti.prop("checked",!1):cs?Qi.calendar("clear"):(Fi.verbose("Resetting field value",Ti,Gi),Ti.val(""))}),Fi.remove.states()},reset:function(){qi.each(function(Oi,zi){var Ti=oi(zi),Yi=Ti.parent(),wn=Ti.closest(sn),Bi=Ti.closest(dn.uiCalendar),Qi=wn.find(dn.prompt),Gi=Ti.data(rn.defaultValue),On=Yi.is(dn.uiCheckbox),Xn=Yi.is(dn.uiDropdown)&&Fi.can.useElement("dropdown"),cs=Bi.length>0&&Fi.can.useElement("calendar"),Vs=wn.hasClass(pn.error);Gi!==vi&&(Vs&&(Fi.verbose("Resetting error on field",wn),wn.removeClass(pn.error),Qi.remove()),Xn?(Fi.verbose("Resetting dropdown value",Yi,Gi),Yi.dropdown("restore defaults",!0)):On?(Fi.verbose("Resetting checkbox value",Yi,Gi),Ti.prop("checked",Gi)):cs?Bi.calendar("set date",Gi):(Fi.verbose("Resetting field value",Ti,Gi),Ti.val(Gi)))}),Fi.remove.states()},determine:{isValid:function(){var Oi=!0;return oi.each(pi,function(zi,Ti){Fi.validate.field(Ti,zi,!0)||(Oi=!1)}),Oi},isDirty:function(Oi){var zi=!1;qi.each(function(Ti,Yi){var wn=oi(Yi),Bi=wn.filter(dn.checkbox).length>0,Qi;Bi?Qi=Fi.is.checkboxDirty(wn):Qi=Fi.is.fieldDirty(wn),wn.data(Mn.metadata.isDirty,Qi),zi|=Qi}),zi?Fi.set.dirty():Fi.set.clean(),Oi&&Oi.namespace==="dirty"&&(Oi.stopImmediatePropagation(),Oi.preventDefault())}},is:{bracketedRule:function(Oi){return Oi.type&&Oi.type.match(Mn.regExp.bracket)},shorthandFields:function(Oi){var zi=Object.keys(Oi),Ti=Oi[zi[0]];return Fi.is.shorthandRules(Ti)},shorthandRules:function(Oi){return typeof Oi=="string"||Array.isArray(Oi)},empty:function(Oi){return!Oi||Oi.length===0?!0:Oi.is(dn.checkbox)?!Oi.is(":checked"):Fi.is.blank(Oi)},blank:function(Oi){return String(Oi.val()).trim()===""},valid:function(Oi,zi){var Ti=!0;return Oi?(Fi.verbose("Checking if field is valid",Oi),Fi.validate.field(pi[Oi],Oi,!!zi)):(Fi.verbose("Checking if form is valid"),oi.each(pi,function(Yi,wn){Fi.is.valid(Yi,zi)||(Ti=!1)}),Ti)},dirty:function(){return an},clean:function(){return!an},fieldDirty:function(Oi){var zi=Oi.data(rn.defaultValue);zi==null?zi="":Array.isArray(zi)&&(zi=zi.toString());var Ti=Oi.val();Ti==null?Ti="":Array.isArray(Ti)&&(Ti=Ti.toString());var Yi=/^(true|false)$/i,wn=Yi.test(zi)&&Yi.test(Ti);if(wn){var Bi=new RegExp("^"+zi+"$","i");return!Bi.test(Ti)}return Ti!==zi},checkboxDirty:function(Oi){var zi=Oi.data(rn.defaultValue),Ti=Oi.is(":checked");return zi!==Ti},justDirty:function(){return Fn[0]==="dirty"},justClean:function(){return Fn[0]==="clean"}},removeEvents:function(){un.off(ki),qi.off(ki),fs.off(ki),qi.off(ki)},event:{field:{keydown:function(Oi){var zi=oi(this),Ti=Oi.which,Yi=zi.is(dn.input),wn=zi.is(dn.checkbox),Bi=zi.closest(dn.uiDropdown).length>0,Qi={enter:13,escape:27};Ti==Qi.escape&&(Fi.verbose("Escape key pressed blurring field"),zi.blur()),!Oi.ctrlKey&&Ti==Qi.enter&&Yi&&!Bi&&!wn&&(En||(zi.one("keyup"+ki,Fi.event.field.keyup),Fi.submit(),Fi.debug("Enter pressed on input submitting form")),En=!0)},keyup:function(){En=!1},blur:function(Oi){var zi=oi(this),Ti=zi.closest(sn),Yi=Fi.get.validation(zi);Ti.hasClass(pn.error)?(Fi.debug("Revalidating field",zi,Yi),Yi&&Fi.validate.field(Yi)):Mn.on=="blur"&&Yi&&Fi.validate.field(Yi)},change:function(Oi){var zi=oi(this),Ti=zi.closest(sn),Yi=Fi.get.validation(zi);Yi&&(Mn.on=="change"||Ti.hasClass(pn.error)&&Mn.revalidate)&&(clearTimeout(Fi.timer),Fi.timer=setTimeout(function(){Fi.debug("Revalidating field",zi,Fi.get.validation(zi)),Fi.validate.field(Yi),Mn.inline||Fi.validate.form(!1,!0)},Mn.delay))}},beforeUnload:function(Oi){if(Fi.is.dirty()&&!Wi){var Oi=Oi||bi.event;return Oi&&(Oi.returnValue=Mn.text.leavingMessage),Mn.text.leavingMessage}}},get:{ancillaryValue:function(Oi){return!Oi.type||!Oi.value&&!Fi.is.bracketedRule(Oi)?!1:Oi.value!==vi?Oi.value:Oi.type.match(Mn.regExp.bracket)[1]+""},ruleName:function(Oi){return Fi.is.bracketedRule(Oi)?Oi.type.replace(Oi.type.match(Mn.regExp.bracket)[0],""):Oi.type},changeEvent:function(Oi,zi){return Oi=="checkbox"||Oi=="radio"||Oi=="hidden"||zi.is("select")?"change":Fi.get.inputEvent()},inputEvent:function(){return wi.createElement("input").oninput!==vi?"input":wi.createElement("input").onpropertychange!==vi?"propertychange":"keyup"},fieldsFromShorthand:function(Oi){var zi={};return oi.each(Oi,function(Ti,Yi){typeof Yi=="string"&&(Yi=[Yi]),zi[Ti]={rules:[]},oi.each(Yi,function(wn,Bi){zi[Ti].rules.push({type:Bi})})}),zi},prompt:function(Oi,zi){var Ti=Fi.get.ruleName(Oi),Yi=Fi.get.ancillaryValue(Oi),wn=Fi.get.field(zi.identifier),Bi=wn.val(),Qi=oi.isFunction(Oi.prompt)?Oi.prompt(Bi):Oi.prompt||Mn.prompt[Ti]||Mn.text.unspecifiedRule,Gi=Qi.search("{value}")!==-1,On=Qi.search("{name}")!==-1,Xn,cs;return Gi&&(Qi=Qi.replace(/\{value\}/g,wn.val())),On&&(Xn=wn.closest(dn.group).find("label").eq(0),cs=Xn.length==1?Xn.text():wn.prop("placeholder")||Mn.text.unspecifiedField,Qi=Qi.replace(/\{name\}/g,cs)),Qi=Qi.replace(/\{identifier\}/g,zi.identifier),Qi=Qi.replace(/\{ruleValue\}/g,Yi),Oi.prompt||Fi.verbose("Using default validation prompt for type",Qi,Ti),Qi},settings:function(){if(oi.isPlainObject(ri)){var Oi=Object.keys(ri),zi=Oi.length>0?ri[Oi[0]].identifier!==vi&&ri[Oi[0]].rules!==vi:!1;zi?(Mn=oi.extend(!0,{},oi.fn.form.settings,In),pi=oi.extend({},oi.fn.form.settings.defaults,ri),Fi.error(Mn.error.oldSyntax,ls),Fi.verbose("Extending settings from legacy parameters",pi,Mn)):(ri.fields&&Fi.is.shorthandFields(ri.fields)&&(ri.fields=Fi.get.fieldsFromShorthand(ri.fields)),Mn=oi.extend(!0,{},oi.fn.form.settings,ri),pi=oi.extend({},oi.fn.form.settings.defaults,Mn.fields),Fi.verbose("Extending settings",pi,Mn))}else Mn=oi.fn.form.settings,pi=oi.fn.form.settings.defaults,Fi.verbose("Using default form validation",pi,Mn);Ai=Mn.namespace,rn=Mn.metadata,dn=Mn.selector,pn=Mn.className,Pn=Mn.regExp,nn=Mn.error,Ri="module-"+Ai,ki="."+Ai,en=un.data(Ri),Fi.refresh()},field:function(Oi){Fi.verbose("Finding field with identifier",Oi),Oi=Fi.escape.string(Oi);var zi;return(zi=qi.filter("#"+Oi)).length>0||(zi=qi.filter('[name="'+Oi+'"]')).length>0||(zi=qi.filter('[name="'+Oi+'[]"]')).length>0||(zi=qi.filter("[data-"+rn.validate+'="'+Oi+'"]')).length>0?zi:oi("<input/>")},fields:function(Oi){var zi=oi();return oi.each(Oi,function(Ti,Yi){zi=zi.add(Fi.get.field(Yi))}),zi},validation:function(Oi){var zi,Ti;return pi?(oi.each(pi,function(Yi,wn){Ti=wn.identifier||Yi,oi.each(Fi.get.field(Ti),function(Bi,Qi){if(Qi==Oi[0])return wn.identifier=Ti,zi=wn,!1})}),zi||!1):!1},value:function(Oi){var zi=[],Ti;return zi.push(Oi),Ti=Fi.get.values.call(ls,zi),Ti[Oi]},values:function(Oi){var zi=Array.isArray(Oi)?Fi.get.fields(Oi):qi,Ti={};return zi.each(function(Yi,wn){var Bi=oi(wn),Qi=Bi.closest(dn.uiCalendar),Gi=Bi.prop("name"),On=Bi.val(),Xn=Bi.is(dn.checkbox),cs=Bi.is(dn.radio),Vs=Gi.indexOf("[]")!==-1,uo=Qi.length>0&&Fi.can.useElement("calendar"),fo=Xn?Bi.is(":checked"):!1;if(Gi)if(Vs)Gi=Gi.replace("[]",""),Ti[Gi]||(Ti[Gi]=[]),Xn?fo?Ti[Gi].push(On||!0):Ti[Gi].push(!1):Ti[Gi].push(On);else if(cs)(Ti[Gi]===vi||Ti[Gi]===!1)&&(Ti[Gi]=fo?On||!0:!1);else if(Xn)fo?Ti[Gi]=On||!0:Ti[Gi]=!1;else if(uo){var go=Qi.calendar("get date");if(go!==null){if(Mn.dateHandling=="date")Ti[Gi]=go;else if(Mn.dateHandling=="input")Ti[Gi]=Qi.calendar("get input date");else if(Mn.dateHandling=="formatter"){var Po=Qi.calendar("setting","type");switch(Po){case"date":Ti[Gi]=Mn.formatter.date(go);break;case"datetime":Ti[Gi]=Mn.formatter.datetime(go);break;case"time":Ti[Gi]=Mn.formatter.time(go);break;case"month":Ti[Gi]=Mn.formatter.month(go);break;case"year":Ti[Gi]=Mn.formatter.year(go);break;default:Fi.debug("Wrong calendar mode",Qi,Po),Ti[Gi]=""}}}else Ti[Gi]=""}else Ti[Gi]=On}),Ti},dirtyFields:function(){return qi.filter(function(Oi,zi){return oi(zi).data(rn.isDirty)})}},has:{field:function(Oi){return Fi.verbose("Checking for existence of a field with identifier",Oi),Oi=Fi.escape.string(Oi),typeof Oi!="string"&&Fi.error(nn.identifier,Oi),qi.filter("#"+Oi).length>0||qi.filter('[name="'+Oi+'"]').length>0?!0:qi.filter("[data-"+rn.validate+'="'+Oi+'"]').length>0}},can:{useElement:function(Oi){return oi.fn[Oi]!==vi?!0:(Fi.error(nn.noElement.replace("{element}",Oi)),!1)}},escape:{string:function(Oi){return Oi=String(Oi),Oi.replace(Pn.escape,"\\$&")}},add:{rule:function(Oi,zi){Fi.add.field(Oi,zi)},field:function(Oi,zi){(pi[Oi]===vi||pi[Oi].rules===vi)&&(pi[Oi]={rules:[]});var Ti={rules:[]};Fi.is.shorthandRules(zi)?(zi=Array.isArray(zi)?zi:[zi],oi.each(zi,function(Yi,wn){Ti.rules.push({type:wn})})):Ti.rules=zi.rules,oi.each(Ti.rules,function(Yi,wn){oi.grep(pi[Oi].rules,function(Bi){return Bi.type==wn.type}).length==0&&pi[Oi].rules.push(wn)}),Fi.debug("Adding rules",Ti.rules,pi)},fields:function(Oi){var zi;Oi&&Fi.is.shorthandFields(Oi)?zi=Fi.get.fieldsFromShorthand(Oi):zi=Oi,pi=oi.extend({},pi,zi)},prompt:function(Oi,zi,Ti){var Yi=Fi.get.field(Oi),wn=Yi.closest(sn),Bi=wn.children(dn.prompt),Qi=Bi.length!==0;zi=typeof zi=="string"?[zi]:zi,Fi.verbose("Adding field error state",Oi),Ti||wn.addClass(pn.error),Mn.inline&&(Qi||(Bi=Mn.templates.prompt(zi,pn.label),Bi.appendTo(wn)),Bi.html(zi[0]),Qi?Fi.verbose("Inline errors are disabled, no inline error added",Oi):Mn.transition&&Fi.can.useElement("transition")&&un.transition("is supported")?(Fi.verbose("Displaying error with css transition",Mn.transition),Bi.transition(Mn.transition+" in",Mn.duration)):(Fi.verbose("Displaying error with fallback javascript animation"),Bi.fadeIn(Mn.duration)))},errors:function(Oi){Fi.debug("Adding form error messages",Oi),Fi.set.error(),rs.html(Mn.templates.error(Oi))}},remove:{errors:function(){Fi.debug("Removing form error messages"),rs.empty()},states:function(){un.removeClass(pn.error).removeClass(pn.success),Mn.inline||Fi.remove.errors(),Fi.determine.isDirty()},rule:function(Oi,zi){var Ti=Array.isArray(zi)?zi:[zi];if(!(pi[Oi]===vi||!Array.isArray(pi[Oi].rules))){if(zi===vi){Fi.debug("Removed all rules"),pi[Oi].rules=[];return}oi.each(pi[Oi].rules,function(Yi,wn){wn&&Ti.indexOf(wn.type)!==-1&&(Fi.debug("Removed rule",wn.type),pi[Oi].rules.splice(Yi,1))})}},field:function(Oi){var zi=Array.isArray(Oi)?Oi:[Oi];oi.each(zi,function(Ti,Yi){Fi.remove.rule(Yi)})},rules:function(Oi,zi){Array.isArray(Oi)?oi.each(Oi,function(Ti,Yi){Fi.remove.rule(Yi,zi)}):Fi.remove.rule(Oi,zi)},fields:function(Oi){Fi.remove.field(Oi)},prompt:function(Oi){var zi=Fi.get.field(Oi),Ti=zi.closest(sn),Yi=Ti.children(dn.prompt);Ti.removeClass(pn.error),Mn.inline&&Yi.is(":visible")&&(Fi.verbose("Removing prompt for field",Oi),Mn.transition&&Fi.can.useElement("transition")&&un.transition("is supported")?Yi.transition(Mn.transition+" out",Mn.duration,function(){Yi.remove()}):Yi.fadeOut(Mn.duration,function(){Yi.remove()}))}},set:{success:function(){un.removeClass(pn.error).addClass(pn.success)},defaults:function(){qi.each(function(Oi,zi){var Ti=oi(zi),Yi=Ti.parent(),wn=Ti.filter(dn.checkbox).length>0,Bi=Yi.is(dn.uiDropdown)&&Fi.can.useElement("dropdown"),Qi=Ti.closest(dn.uiCalendar),Gi=Qi.length>0&&Fi.can.useElement("calendar"),On=wn?Ti.is(":checked"):Ti.val();Bi?Yi.dropdown("save defaults"):Gi&&Qi.calendar("refresh"),Ti.data(rn.defaultValue,On),Ti.data(rn.isDirty,!1)})},error:function(){un.removeClass(pn.success).addClass(pn.error)},value:function(Oi,zi){var Ti={};return Ti[Oi]=zi,Fi.set.values.call(ls,Ti)},values:function(Oi){oi.isEmptyObject(Oi)||oi.each(Oi,function(zi,Ti){var Yi=Fi.get.field(zi),wn=Yi.parent(),Bi=Yi.closest(dn.uiCalendar),Qi=Array.isArray(Ti),Gi=wn.is(dn.uiCheckbox)&&Fi.can.useElement("checkbox"),On=wn.is(dn.uiDropdown)&&Fi.can.useElement("dropdown"),Xn=Yi.is(dn.radio)&&Gi,cs=Bi.length>0&&Fi.can.useElement("calendar"),Vs=Yi.length>0,uo;Vs&&(Qi&&Gi?(Fi.verbose("Selecting multiple",Ti,Yi),wn.checkbox("uncheck"),oi.each(Ti,function(fo,go){uo=Yi.filter('[value="'+go+'"]'),wn=uo.parent(),uo.length>0&&wn.checkbox("check")})):Xn?(Fi.verbose("Selecting radio value",Ti,Yi),Yi.filter('[value="'+Ti+'"]').parent(dn.uiCheckbox).checkbox("check")):Gi?(Fi.verbose("Setting checkbox value",Ti,wn),Ti===!0||Ti===1?wn.checkbox("check"):wn.checkbox("uncheck")):On?(Fi.verbose("Setting dropdown value",Ti,wn),wn.dropdown("set selected",Ti)):cs?Bi.calendar("set date",Ti):(Fi.verbose("Setting field value",Ti,Yi),Yi.val(Ti)))})},dirty:function(){Fi.verbose("Setting state dirty"),an=!0,Fn[0]=Fn[1],Fn[1]="dirty",Fi.is.justClean()&&un.trigger("dirty")},clean:function(){Fi.verbose("Setting state clean"),an=!1,Fn[0]=Fn[1],Fn[1]="clean",Fi.is.justDirty()&&un.trigger("clean")},asClean:function(){Fi.set.defaults(),Fi.set.clean()},asDirty:function(){Fi.set.defaults(),Fi.set.dirty()},autoCheck:function(){Fi.debug("Enabling auto check on required fields"),qi.each(function(Oi,zi){var Ti=oi(zi),Yi=oi(zi).closest(sn),wn=Ti.filter(dn.checkbox).length>0,Bi=Ti.prop("required")||Yi.hasClass(pn.required)||Yi.parent().hasClass(pn.required),Qi=Ti.is(":disabled")||Yi.hasClass(pn.disabled)||Yi.parent().hasClass(pn.disabled),Gi=Fi.get.validation(Ti),On=Gi?oi.grep(Gi.rules,function(cs){return cs.type=="empty"})!==0:!1,Xn=Gi.identifier||Ti.attr("id")||Ti.attr("name")||Ti.data(rn.validate);Bi&&!Qi&&!On&&Xn!==vi&&(wn?(Fi.verbose("Adding 'checked' rule on field",Xn),Fi.add.rule(Xn,"checked")):(Fi.verbose("Adding 'empty' rule on field",Xn),Fi.add.rule(Xn,"empty")))})}},validate:{form:function(Oi,zi){var Ti=Fi.get.values();if(En)return!1;if(ks=[],Fi.determine.isValid()){if(Fi.debug("Form has no validation errors, submitting"),Fi.set.success(),Mn.inline||Fi.remove.errors(),zi!==!0)return Mn.onSuccess.call(ls,Oi,Ti)}else if(Fi.debug("Form has errors"),Wi=!1,Fi.set.error(),Mn.inline||Fi.add.errors(ks),Oi&&un.data("moduleApi")!==vi&&Oi.stopImmediatePropagation(),zi!==!0)return Mn.onFailure.call(ls,ks,Ti)},field:function(Oi,zi,Ti){Ti=Ti!==vi?Ti:!0,typeof Oi=="string"&&(Fi.verbose("Validating field",Oi),zi=Oi,Oi=pi[Oi]);var Yi=Oi.identifier||zi,wn=Fi.get.field(Yi),Bi=Oi.depends?Fi.get.field(Oi.depends):!1,Qi=!0,Gi=[];Oi.identifier||(Fi.debug("Using field name as identifier",Yi),Oi.identifier=Yi);var On=!wn.filter(":not(:disabled)").length;if(On?Fi.debug("Field is disabled. Skipping",Yi):Oi.optional&&Fi.is.blank(wn)?Fi.debug("Field is optional and blank. Skipping",Yi):Oi.depends&&Fi.is.empty(Bi)?Fi.debug("Field depends on another value that is not present or empty. Skipping",Bi):Oi.rules!==vi&&(Ti&&wn.closest(sn).removeClass(pn.error),oi.each(Oi.rules,function(Xn,cs){if(Fi.has.field(Yi)){var Vs=Fi.validate.rule(Oi,cs,!0)||[];Vs.length>0&&(Fi.debug("Field is invalid",Yi,cs.type),Gi.push(Fi.get.prompt(cs,Oi)),Qi=!1,Ti&&oi(Vs).closest(sn).addClass(pn.error))}})),Qi)Ti&&(Fi.remove.prompt(Yi,Gi),Mn.onValid.call(wn));else return Ti&&(ks=ks.concat(Gi),Fi.add.prompt(Yi,Gi,!0),Mn.onInvalid.call(wn,Gi)),!1;return!0},rule:function(Oi,zi,Ti){var Yi=Fi.get.field(Oi.identifier),wn=Fi.get.ancillaryValue(zi),Bi=Fi.get.ruleName(zi),Qi=Mn.rules[Bi],Gi=[],On=Yi.is(dn.checkbox),Xn=function(cs){var Vs=On?oi(cs).filter(":checked").val():oi(cs).val();return Vs=Vs===vi||Vs===""||Vs===null?"":Mn.shouldTrim?(Vs+"").trim():Vs+"",Qi.call(cs,Vs,wn,un)};if(!oi.isFunction(Qi)){Fi.error(nn.noRule,Bi);return}return On?Xn(Yi)||(Gi=Yi):oi.each(Yi,function(cs,Vs){Xn(Vs)||Gi.push(Vs)}),Ti?Gi:!(Gi.length>0)}},setting:function(Oi,zi){if(oi.isPlainObject(Oi))oi.extend(!0,Mn,Oi);else if(zi!==vi)Mn[Oi]=zi;else return Mn[Oi]},internal:function(Oi,zi){if(oi.isPlainObject(Oi))oi.extend(!0,Fi,Oi);else if(zi!==vi)Fi[Oi]=zi;else return Fi[Oi]},debug:function(){!Mn.silent&&Mn.debug&&(Mn.performance?Fi.performance.log(arguments):(Fi.debug=Function.prototype.bind.call(console.info,console,Mn.name+":"),Fi.debug.apply(console,arguments)))},verbose:function(){!Mn.silent&&Mn.verbose&&Mn.debug&&(Mn.performance?Fi.performance.log(arguments):(Fi.verbose=Function.prototype.bind.call(console.info,console,Mn.name+":"),Fi.verbose.apply(console,arguments)))},error:function(){Mn.silent||(Fi.error=Function.prototype.bind.call(console.error,console,Mn.name+":"),Fi.error.apply(console,arguments))},performance:{log:function(Oi){var zi,Ti,Yi;Mn.performance&&(zi=new Date().getTime(),Yi=Ji||zi,Ti=zi-Yi,Ji=zi,tn.push({Name:Oi[0],Arguments:[].slice.call(Oi,1)||"",Element:ls,"Execution Time":Ti})),clearTimeout(Fi.performance.timer),Fi.performance.timer=setTimeout(Fi.performance.display,500)},display:function(){var Oi=Mn.name+":",zi=0;Ji=!1,clearTimeout(Fi.performance.timer),oi.each(tn,function(Ti,Yi){zi+=Yi["Execution Time"]}),Oi+=" "+zi+"ms",Li&&(Oi+=" '"+Li+"'"),yi.length>1&&(Oi+=" ("+yi.length+")"),(console.group!==vi||console.table!==vi)&&tn.length>0&&(console.groupCollapsed(Oi),console.table?console.table(tn):oi.each(tn,function(Ti,Yi){console.log(Yi.Name+": "+Yi["Execution Time"]+"ms")}),console.groupEnd()),tn=[]}},invoke:function(Oi,zi,Ti){var Yi=en,wn,Bi,Qi;return zi=zi||bn,Ti=ls||Ti,typeof Oi=="string"&&Yi!==vi&&(Oi=Oi.split(/[\. ]/),wn=Oi.length-1,oi.each(Oi,function(Gi,On){var Xn=Gi!=wn?On+Oi[Gi+1].charAt(0).toUpperCase()+Oi[Gi+1].slice(1):Oi;if(oi.isPlainObject(Yi[Xn])&&Gi!=wn)Yi=Yi[Xn];else{if(Yi[Xn]!==vi)return Bi=Yi[Xn],!1;if(oi.isPlainObject(Yi[On])&&Gi!=wn)Yi=Yi[On];else return Yi[On]!==vi&&(Bi=Yi[On]),!1}})),oi.isFunction(Bi)?Qi=Bi.apply(Ti,zi):Bi!==vi&&(Qi=Bi),Array.isArray(Zi)?Zi.push(Qi):Zi!==vi?Zi=[Zi,Qi]:Qi!==vi&&(Zi=Qi),Bi}},Fi.initialize()}),Zi!==vi?Zi:this},oi.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!1,performance:!0,fields:!1,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,shouldTrim:!0,transition:"scale",duration:200,autoCheckRequired:!1,preventLeaving:!1,dateHandling:"date",onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},onDirty:function(){},onClean:function(){},metadata:{defaultValue:"default",validate:"validate",isDirty:"isDirty"},regExp:{htmlID:/^[a-zA-Z][\w:.-]*$/g,bracket:/\[(.*)\]/i,decimal:/^\d+\.?\d*$/,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|:,=@]/g,flags:/^\/(.*)\/(.*)?/,integer:/^\-?\d+$/,number:/^\-?\d*(\.\d+)?$/,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/i},text:{unspecifiedRule:"Please enter a valid value",unspecifiedField:"This field",leavingMessage:"There are unsaved changes on this page which will be discarded if you continue."},prompt:{empty:"{name} must have a value",checked:"{name} must be checked",email:"{name} must be a valid e-mail",url:"{name} must be a valid url",regExp:"{name} is not formatted correctly",integer:"{name} must be an integer",decimal:"{name} must be a decimal number",number:"{name} must be set to a number",is:'{name} must be "{ruleValue}"',isExactly:'{name} must be exactly "{ruleValue}"',not:'{name} cannot be set to "{ruleValue}"',notExactly:'{name} cannot be set to exactly "{ruleValue}"',contain:'{name} must contain "{ruleValue}"',containExactly:'{name} must contain exactly "{ruleValue}"',doesntContain:'{name} cannot contain "{ruleValue}"',doesntContainExactly:'{name} cannot contain exactly "{ruleValue}"',minLength:"{name} must be at least {ruleValue} characters",length:"{name} must be at least {ruleValue} characters",exactLength:"{name} must be exactly {ruleValue} characters",maxLength:"{name} cannot be longer than {ruleValue} characters",match:"{name} must match {ruleValue} field",different:"{name} must have a different value than {ruleValue} field",creditCard:"{name} must be a valid credit card number",minCount:"{name} must have at least {ruleValue} choices",exactCount:"{name} must have exactly {ruleValue} choices",maxCount:"{name} must have {ruleValue} or less choices"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:"input:not(.search), textarea, select",group:".field",input:"input",message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:'.reset:not([type="reset"])',submit:'.submit:not([type="submit"])',uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown",uiCalendar:".ui.calendar"},className:{error:"error",label:"ui basic red pointing prompt label",pressed:"down",success:"success",required:"required",disabled:"disabled"},error:{identifier:"You must specify a string identifier for each field",method:"The method you called is not defined.",noRule:"There is no rule matching the one you specified",oldSyntax:"Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.",noElement:"This module requires ui {element}"},templates:{error:function(ri){var yi='<ul class="list">';return oi.each(ri,function(Li,Ji){yi+="<li>"+Ji+"</li>"}),yi+="</ul>",oi(yi)},prompt:function(ri,yi){return oi("<div/>").addClass(yi).html(ri[0])}},formatter:{date:function(ri){return Intl.DateTimeFormat("en-GB").format(ri)},datetime:function(ri){return Intl.DateTimeFormat("en-GB",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(ri)},time:function(ri){return Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(ri)},month:function(ri){return Intl.DateTimeFormat("en-GB",{month:"2-digit",year:"numeric"}).format(ri)},year:function(ri){return Intl.DateTimeFormat("en-GB",{year:"numeric"}).format(ri)}},rules:{empty:function(ri){return!(ri===vi||ri===""||Array.isArray(ri)&&ri.length===0)},checked:function(){return oi(this).filter(":checked").length>0},email:function(ri){return oi.fn.form.settings.regExp.email.test(ri)},url:function(ri){return oi.fn.form.settings.regExp.url.test(ri)},regExp:function(ri,yi){if(yi instanceof RegExp)return ri.match(yi);var Li=yi.match(oi.fn.form.settings.regExp.flags),Ji;return Li&&(yi=Li.length>=2?Li[1]:yi,Ji=Li.length>=3?Li[2]:""),ri.match(new RegExp(yi,Ji))},integer:function(ri,yi){var Li=oi.fn.form.settings.regExp.integer,Ji,tn,_n;return!yi||["",".."].indexOf(yi)!==-1||(yi.indexOf("..")==-1?Li.test(yi)&&(Ji=tn=yi-0):(_n=yi.split("..",2),Li.test(_n[0])&&(Ji=_n[0]-0),Li.test(_n[1])&&(tn=_n[1]-0))),Li.test(ri)&&(Ji===vi||ri>=Ji)&&(tn===vi||ri<=tn)},decimal:function(ri){return oi.fn.form.settings.regExp.decimal.test(ri)},number:function(ri){return oi.fn.form.settings.regExp.number.test(ri)},is:function(ri,yi){return yi=typeof yi=="string"?yi.toLowerCase():yi,ri=typeof ri=="string"?ri.toLowerCase():ri,ri==yi},isExactly:function(ri,yi){return ri==yi},not:function(ri,yi){return ri=typeof ri=="string"?ri.toLowerCase():ri,yi=typeof yi=="string"?yi.toLowerCase():yi,ri!=yi},notExactly:function(ri,yi){return ri!=yi},contains:function(ri,yi){return yi=yi.replace(oi.fn.form.settings.regExp.escape,"\\$&"),ri.search(new RegExp(yi,"i"))!==-1},containsExactly:function(ri,yi){return yi=yi.replace(oi.fn.form.settings.regExp.escape,"\\$&"),ri.search(new RegExp(yi))!==-1},doesntContain:function(ri,yi){return yi=yi.replace(oi.fn.form.settings.regExp.escape,"\\$&"),ri.search(new RegExp(yi,"i"))===-1},doesntContainExactly:function(ri,yi){return yi=yi.replace(oi.fn.form.settings.regExp.escape,"\\$&"),ri.search(new RegExp(yi))===-1},minLength:function(ri,yi){return ri!==vi?ri.length>=yi:!1},length:function(ri,yi){return ri!==vi?ri.length>=yi:!1},exactLength:function(ri,yi){return ri!==vi?ri.length==yi:!1},maxLength:function(ri,yi){return ri!==vi?ri.length<=yi:!1},match:function(ri,yi,Li){var Ji,tn;return(tn=Li.find('[data-validate="'+yi+'"]')).length>0||(tn=Li.find("#"+yi)).length>0||(tn=Li.find('[name="'+yi+'"]')).length>0?Ji=tn.val():(tn=Li.find('[name="'+yi+'[]"]')).length>0&&(Ji=tn),Ji!==vi?ri.toString()==Ji.toString():!1},different:function(ri,yi,Li){var Ji,tn;return(tn=Li.find('[data-validate="'+yi+'"]')).length>0||(tn=Li.find("#"+yi)).length>0||(tn=Li.find('[name="'+yi+'"]')).length>0?Ji=tn.val():(tn=Li.find('[name="'+yi+'[]"]')).length>0&&(Ji=tn),Ji!==vi?ri.toString()!==Ji.toString():!1},creditCard:function(ri,yi){var Li={visa:{pattern:/^4/,length:[16]},amex:{pattern:/^3[47]/,length:[15]},mastercard:{pattern:/^5[1-5]/,length:[16]},discover:{pattern:/^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,length:[16]},unionPay:{pattern:/^(62|88)/,length:[16,17,18,19]},jcb:{pattern:/^35(2[89]|[3-8][0-9])/,length:[16]},maestro:{pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,length:[12,13,14,15,16,17,18,19]},dinersClub:{pattern:/^(30[0-5]|^36)/,length:[14]},laser:{pattern:/^(6304|670[69]|6771)/,length:[16,17,18,19]},visaElectron:{pattern:/^(4026|417500|4508|4844|491(3|7))/,length:[16]}},Ji={},tn=!1,_n=typeof yi=="string"?yi.split(","):!1,In,Vn;if(!(typeof ri!="string"||ri.length===0)){if(ri=ri.replace(/[\-]/g,""),_n&&(oi.each(_n,function(ks,En){Vn=Li[En],Vn&&(Ji={length:oi.inArray(ri.length,Vn.length)!==-1,pattern:ri.search(Vn.pattern)!==-1},Ji.length&&Ji.pattern&&(tn=!0))}),!tn))return!1;if(In={number:oi.inArray(ri.length,Li.unionPay.length)!==-1,pattern:ri.search(Li.unionPay.pattern)!==-1},In.number&&In.pattern)return!0;for(var bn=ri.length,Zi=0,un=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],ls=0;bn--;)ls+=un[Zi][parseInt(ri.charAt(bn),10)],Zi^=1;return ls%10===0&&ls>0}},minCount:function(ri,yi){return yi==0?!0:yi==1?ri!=="":ri.split(",").length>=yi},exactCount:function(ri,yi){return yi==0?ri==="":yi==1?ri!==""&&ri.search(",")===-1:ri.split(",").length==yi},maxCount:function(ri,yi){return yi==0?!1:yi==1?ri.search(",")===-1:ri.split(",").length<=yi}}}})(jQuery,window,document);(function(oi,bi,wi,vi){"use strict";oi.isFunction=oi.isFunction||function(ri){return typeof ri=="function"&&typeof ri.nodeType!="number"},bi=typeof bi<"u"&&bi.Math==Math?bi:typeof self<"u"&&self.Math==Math?self:Function("return this")(),oi.fn.modal=function(ri){var yi=oi(this),Li=oi(bi),Ji=oi(wi),tn=oi("body"),_n=yi.selector||"",In=new Date().getTime(),Vn=[],bn=arguments[0],Zi=typeof bn=="string",un=[].slice.call(arguments,1),ls=bi.requestAnimationFrame||bi.mozRequestAnimationFrame||bi.webkitRequestAnimationFrame||bi.msRequestAnimationFrame||function(En){setTimeout(En,0)},ks;return yi.each(function(){var En=oi.isPlainObject(ri)?oi.extend(!0,{},oi.fn.modal.settings,ri):oi.extend({},oi.fn.modal.settings),qi=En.selector,sn=En.className,rs=En.namespace,hs=En.error,fs="."+rs,yn="module-"+rs,mn=oi(this),Mn=oi(En.context),pi=mn.find(qi.close),rn,dn,pn,Pn,nn,Ai=this,Ri=mn.data(yn),ki=!1,Wi,an,Fn="",en="",Fi,Oi,zi,Ti;Ti={initialize:function(){Ti.cache={},Ti.verbose("Initializing dimmer",Mn),Ti.create.id(),Ti.create.dimmer(),En.allowMultiple&&Ti.create.innerDimmer(),En.centered||mn.addClass("top aligned"),Ti.refreshModals(),Ti.bind.events(),En.observeChanges&&Ti.observeChanges(),Ti.instantiate()},instantiate:function(){Ti.verbose("Storing instance of modal"),Ri=Ti,mn.data(yn,Ri)},create:{dimmer:function(){var Yi={debug:En.debug,dimmerName:"modals"},wn=oi.extend(!0,Yi,En.dimmerSettings);if(oi.fn.dimmer===vi){Ti.error(hs.dimmer);return}Ti.debug("Creating dimmer"),Pn=Mn.dimmer(wn),En.detachable?(Ti.verbose("Modal is detachable, moving content into dimmer"),Pn.dimmer("add content",mn)):Ti.set.undetached(),nn=Pn.dimmer("get dimmer")},id:function(){Oi=(Math.random().toString(16)+"000000000").substr(2,8),Fi="."+Oi,Ti.verbose("Creating unique id for element",Oi)},innerDimmer:function(){mn.find(qi.dimmer).length==0&&mn.prepend('<div class="ui inverted dimmer"></div>')}},destroy:function(){zi&&zi.disconnect(),Ti.verbose("Destroying previous modal"),mn.removeData(yn).off(fs),Li.off(Fi),nn.off(Fi),pi.off(fs),Mn.dimmer("destroy")},observeChanges:function(){"MutationObserver"in bi&&(zi=new MutationObserver(function(Yi){Ti.debug("DOM tree modified, refreshing"),Ti.refresh()}),zi.observe(Ai,{childList:!0,subtree:!0}),Ti.debug("Setting up mutation observer",zi))},refresh:function(){Ti.remove.scrolling(),Ti.cacheSizes(),Ti.can.useFlex()||Ti.set.modalOffset(),Ti.set.screenHeight(),Ti.set.type()},refreshModals:function(){dn=mn.siblings(qi.modal),rn=dn.add(mn)},attachEvents:function(Yi,wn){var Bi=oi(Yi);wn=oi.isFunction(Ti[wn])?Ti[wn]:Ti.toggle,Bi.length>0?(Ti.debug("Attaching modal events to element",Yi,wn),Bi.off(fs).on("click"+fs,wn)):Ti.error(hs.notFound,Yi)},bind:{events:function(){Ti.verbose("Attaching events"),mn.on("click"+fs,qi.close,Ti.event.close).on("click"+fs,qi.approve,Ti.event.approve).on("click"+fs,qi.deny,Ti.event.deny),Li.on("resize"+Fi,Ti.event.resize)},scrollLock:function(){Pn.get(0).addEventListener("touchmove",Ti.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){Pn.get(0).removeEventListener("touchmove",Ti.event.preventScroll,{passive:!1})}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},event:{approve:function(){if(ki||En.onApprove.call(Ai,oi(this))===!1){Ti.verbose("Approve callback returned false cancelling hide");return}ki=!0,Ti.hide(function(){ki=!1})},preventScroll:function(Yi){Yi.target.className.indexOf("dimmer")!==-1&&Yi.preventDefault()},deny:function(){if(ki||En.onDeny.call(Ai,oi(this))===!1){Ti.verbose("Deny callback returned false cancelling hide");return}ki=!0,Ti.hide(function(){ki=!1})},close:function(){Ti.hide()},mousedown:function(Yi){var wn=oi(Yi.target),Bi=Ti.is.rtl();Wi=wn.closest(qi.modal).length>0,Wi&&Ti.verbose("Mouse down event registered inside the modal"),an=Ti.is.scrolling()&&(!Bi&&oi(bi).outerWidth()-En.scrollbarWidth<=Yi.clientX||Bi&&En.scrollbarWidth>=Yi.clientX),an&&Ti.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(Yi){if(!En.closable){Ti.verbose("Dimmer clicked but closable setting is disabled");return}if(Wi){Ti.debug("Dimmer clicked but mouse down was initially registered inside the modal");return}if(an){Ti.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");return}var wn=oi(Yi.target),Bi=wn.closest(qi.modal).length>0,Qi=oi.contains(wi.documentElement,Yi.target);if(!Bi&&Qi&&Ti.is.active()&&mn.hasClass(sn.front)){if(Ti.debug("Dimmer clicked, hiding all modals"),En.allowMultiple){if(!Ti.hideAll())return}else if(!Ti.hide())return;Ti.remove.clickaway()}},debounce:function(Yi,wn){clearTimeout(Ti.timer),Ti.timer=setTimeout(Yi,wn)},keyboard:function(Yi){var wn=Yi.which,Bi=27;wn==Bi&&(En.closable?(Ti.debug("Escape key pressed hiding modal"),mn.hasClass(sn.front)&&Ti.hide()):Ti.debug("Escape key pressed, but closable is set to false"),Yi.preventDefault())},resize:function(){Pn.dimmer("is active")&&(Ti.is.animating()||Ti.is.active())&&ls(Ti.refresh)}},toggle:function(){Ti.is.active()||Ti.is.animating()?Ti.hide():Ti.show()},show:function(Yi){Yi=oi.isFunction(Yi)?Yi:function(){},Ti.refreshModals(),Ti.set.dimmerSettings(),Ti.set.dimmerStyles(),Ti.showModal(Yi)},hide:function(Yi){return Yi=oi.isFunction(Yi)?Yi:function(){},Ti.refreshModals(),Ti.hideModal(Yi)},showModal:function(Yi){Yi=oi.isFunction(Yi)?Yi:function(){},Ti.is.animating()||!Ti.is.active()?(Ti.showDimmer(),Ti.cacheSizes(),Ti.set.bodyMargin(),Ti.can.useFlex()?Ti.remove.legacy():(Ti.set.legacy(),Ti.set.modalOffset(),Ti.debug("Using non-flex legacy modal positioning.")),Ti.set.screenHeight(),Ti.set.type(),Ti.set.clickaway(),!En.allowMultiple&&Ti.others.active()?Ti.hideOthers(Ti.showModal):(ki=!1,En.allowMultiple&&(Ti.others.active()&&dn.filter("."+sn.active).find(qi.dimmer).addClass("active"),En.detachable&&mn.detach().appendTo(nn)),En.onShow.call(Ai),En.transition&&oi.fn.transition!==vi&&mn.transition("is supported")?(Ti.debug("Showing modal with css animations"),mn.transition({debug:En.debug,animation:En.transition+" in",queue:En.queue,duration:En.duration,useFailSafe:!0,onComplete:function(){En.onVisible.apply(Ai),En.keyboardShortcuts&&Ti.add.keyboardShortcuts(),Ti.save.focus(),Ti.set.active(),En.autofocus&&Ti.set.autofocus(),Yi()}})):Ti.error(hs.noTransition))):Ti.debug("Modal is already visible")},hideModal:function(Yi,wn,Bi){var Qi=dn.filter("."+sn.active).last();if(Yi=oi.isFunction(Yi)?Yi:function(){},Ti.debug("Hiding modal"),En.onHide.call(Ai,oi(this))===!1)return Ti.verbose("Hide callback returned false cancelling hide"),ki=!1,!1;(Ti.is.animating()||Ti.is.active())&&(En.transition&&oi.fn.transition!==vi&&mn.transition("is supported")?(Ti.remove.active(),mn.transition({debug:En.debug,animation:En.transition+" out",queue:En.queue,duration:En.duration,useFailSafe:!0,onStart:function(){!Ti.others.active()&&!Ti.others.animating()&&!wn&&Ti.hideDimmer(),En.keyboardShortcuts&&!Ti.others.active()&&Ti.remove.keyboardShortcuts()},onComplete:function(){Ti.unbind.scrollLock(),En.allowMultiple&&(Qi.addClass(sn.front),mn.removeClass(sn.front),Bi?rn.find(qi.dimmer).removeClass("active"):Qi.find(qi.dimmer).removeClass("active")),En.onHidden.call(Ai),Ti.remove.dimmerStyles(),Ti.restore.focus(),Yi()}})):Ti.error(hs.noTransition))},showDimmer:function(){Pn.dimmer("is animating")||!Pn.dimmer("is active")?(Ti.save.bodyMargin(),Ti.debug("Showing dimmer"),Pn.dimmer("show")):Ti.debug("Dimmer already visible")},hideDimmer:function(){if(Pn.dimmer("is animating")||Pn.dimmer("is active"))Ti.unbind.scrollLock(),Pn.dimmer("hide",function(){Ti.restore.bodyMargin(),Ti.remove.clickaway(),Ti.remove.screenHeight()});else{Ti.debug("Dimmer is not visible cannot hide");return}},hideAll:function(Yi){var wn=rn.filter("."+sn.active+", ."+sn.animating);if(Yi=oi.isFunction(Yi)?Yi:function(){},wn.length>0){Ti.debug("Hiding all visible modals");var Bi=!0;return oi(wn.get().reverse()).each(function(Qi,Gi){Bi&&(Bi=oi(Gi).modal("hide modal",Yi,!1,!0))}),Bi&&Ti.hideDimmer(),Bi}},hideOthers:function(Yi){var wn=dn.filter("."+sn.active+", ."+sn.animating);Yi=oi.isFunction(Yi)?Yi:function(){},wn.length>0&&(Ti.debug("Hiding other modals",dn),wn.modal("hide modal",Yi,!0))},others:{active:function(){return dn.filter("."+sn.active).length>0},animating:function(){return dn.filter("."+sn.animating).length>0}},add:{keyboardShortcuts:function(){Ti.verbose("Adding keyboard shortcuts"),Ji.on("keyup"+fs,Ti.event.keyboard)}},save:{focus:function(){var Yi=oi(wi.activeElement),wn=Yi.closest(mn).length>0;wn||(pn=oi(wi.activeElement).blur())},bodyMargin:function(){Fn=tn.css("margin-"+(Ti.can.leftBodyScrollbar()?"left":"right"));var Yi=parseInt(Fn.replace(/[^\d.]/g,"")),wn=bi.innerWidth-wi.documentElement.clientWidth;en=Yi+wn}},restore:{focus:function(){pn&&pn.length>0&&En.restoreFocus&&pn.focus()},bodyMargin:function(){var Yi=Ti.can.leftBodyScrollbar()?"left":"right";tn.css("margin-"+Yi,Fn),tn.find(qi.bodyFixed.replace("right",Yi)).css("padding-"+Yi,Fn)}},remove:{active:function(){mn.removeClass(sn.active)},legacy:function(){mn.removeClass(sn.legacy)},clickaway:function(){En.detachable||mn.off("mousedown"+Fi),nn.off("mousedown"+Fi),nn.off("mouseup"+Fi)},dimmerStyles:function(){nn.removeClass(sn.inverted),Pn.removeClass(sn.blurring)},bodyStyle:function(){tn.attr("style")===""&&(Ti.verbose("Removing style attribute"),tn.removeAttr("style"))},screenHeight:function(){Ti.debug("Removing page height"),tn.css("height","")},keyboardShortcuts:function(){Ti.verbose("Removing keyboard shortcuts"),Ji.off("keyup"+fs)},scrolling:function(){Pn.removeClass(sn.scrolling),mn.removeClass(sn.scrolling)}},cacheSizes:function(){mn.addClass(sn.loading);var Yi=mn.prop("scrollHeight"),wn=mn.outerWidth(),Bi=mn.outerHeight();(Ti.cache.pageHeight===vi||Bi!==0)&&(oi.extend(Ti.cache,{pageHeight:oi(wi).outerHeight(),width:wn,height:Bi+En.offset,scrollHeight:Yi+En.offset,contextHeight:En.context=="body"?oi(bi).height():Pn.height()}),Ti.cache.topOffset=-(Ti.cache.height/2)),mn.removeClass(sn.loading),Ti.debug("Caching modal and container sizes",Ti.cache)},can:{leftBodyScrollbar:function(){return Ti.cache.leftBodyScrollbar===vi&&(Ti.cache.leftBodyScrollbar=Ti.is.rtl()&&(Ti.is.iframe&&!Ti.is.firefox()||Ti.is.safari()||Ti.is.edge()||Ti.is.ie())),Ti.cache.leftBodyScrollbar},useFlex:function(){return En.useFlex==="auto"?En.detachable&&!Ti.is.ie():(En.useFlex&&Ti.is.ie()?Ti.debug("useFlex true is not supported in IE"):En.useFlex&&!En.detachable&&Ti.debug("useFlex true in combination with detachable false is not supported"),En.useFlex)},fit:function(){var Yi=Ti.cache.contextHeight,wn=Ti.cache.contextHeight/2,Bi=Ti.cache.topOffset,Qi=Ti.cache.scrollHeight,Gi=Ti.cache.height,On=En.padding,Xn=wn+Bi;return Qi>Gi?Xn+Qi+On<Yi:Gi+On*2<Yi}},is:{active:function(){return mn.hasClass(sn.active)},ie:function(){if(Ti.cache.isIE===vi){var Yi=!bi.ActiveXObject&&"ActiveXObject"in bi,wn="ActiveXObject"in bi;Ti.cache.isIE=Yi||wn}return Ti.cache.isIE},animating:function(){return mn.transition("is supported")?mn.transition("is animating"):mn.is(":visible")},scrolling:function(){return Pn.hasClass(sn.scrolling)},modernBrowser:function(){return!(bi.ActiveXObject||"ActiveXObject"in bi)},rtl:function(){return Ti.cache.isRTL===vi&&(Ti.cache.isRTL=tn.attr("dir")==="rtl"||tn.css("direction")==="rtl"),Ti.cache.isRTL},safari:function(){return Ti.cache.isSafari===vi&&(Ti.cache.isSafari=/constructor/i.test(bi.HTMLElement)||!!bi.ApplePaySession),Ti.cache.isSafari},edge:function(){return Ti.cache.isEdge===vi&&(Ti.cache.isEdge=!!bi.setImmediate&&!Ti.is.ie()),Ti.cache.isEdge},firefox:function(){return Ti.cache.isFirefox===vi&&(Ti.cache.isFirefox=!!bi.InstallTrigger),Ti.cache.isFirefox},iframe:function(){return self!==top}},set:{autofocus:function(){var Yi=mn.find("[tabindex], :input").filter(":visible").filter(function(){return oi(this).closest(".disabled").length===0}),wn=Yi.filter("[autofocus]"),Bi=wn.length>0?wn.first():Yi.first();Bi.length>0&&Bi.focus()},bodyMargin:function(){var Yi=Ti.can.leftBodyScrollbar()?"left":"right";(En.detachable||Ti.can.fit())&&tn.css("margin-"+Yi,en+"px"),tn.find(qi.bodyFixed.replace("right",Yi)).css("padding-"+Yi,en+"px")},clickaway:function(){En.detachable||mn.on("mousedown"+Fi,Ti.event.mousedown),nn.on("mousedown"+Fi,Ti.event.mousedown),nn.on("mouseup"+Fi,Ti.event.mouseup)},dimmerSettings:function(){if(oi.fn.dimmer===vi){Ti.error(hs.dimmer);return}var Yi={debug:En.debug,dimmerName:"modals",closable:"auto",useFlex:Ti.can.useFlex(),duration:{show:En.duration,hide:En.duration}},wn=oi.extend(!0,Yi,En.dimmerSettings);En.inverted&&(wn.variation=wn.variation!==vi?wn.variation+" inverted":"inverted"),Mn.dimmer("setting",wn)},dimmerStyles:function(){En.inverted?nn.addClass(sn.inverted):nn.removeClass(sn.inverted),En.blurring?Pn.addClass(sn.blurring):Pn.removeClass(sn.blurring)},modalOffset:function(){if(En.detachable)mn.css({marginTop:!mn.hasClass("aligned")&&Ti.can.fit()?-(Ti.cache.height/2):En.padding/2,marginLeft:-(Ti.cache.width/2)});else{var Yi=Ti.can.fit();mn.css({top:!mn.hasClass("aligned")&&Yi?oi(wi).scrollTop()+(Ti.cache.contextHeight-Ti.cache.height)/2:!Yi||mn.hasClass("top")?oi(wi).scrollTop()+En.padding:oi(wi).scrollTop()+(Ti.cache.contextHeight-Ti.cache.height-En.padding),marginLeft:-(Ti.cache.width/2)})}Ti.verbose("Setting modal offset for legacy mode")},screenHeight:function(){Ti.can.fit()?tn.css("height",""):mn.hasClass("bottom")||(Ti.debug("Modal is taller than page content, resizing page height"),tn.css("height",Ti.cache.height+En.padding*2))},active:function(){mn.addClass(sn.active+" "+sn.front),dn.filter("."+sn.active).removeClass(sn.front)},scrolling:function(){Pn.addClass(sn.scrolling),mn.addClass(sn.scrolling),Ti.unbind.scrollLock()},legacy:function(){mn.addClass(sn.legacy)},type:function(){Ti.can.fit()?(Ti.verbose("Modal fits on screen"),!Ti.others.active()&&!Ti.others.animating()&&(Ti.remove.scrolling(),Ti.bind.scrollLock())):mn.hasClass("bottom")?Ti.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(Ti.verbose("Modal cannot fit on screen setting to scrolling"),Ti.set.scrolling())},undetached:function(){Pn.addClass(sn.undetached)}},setting:function(Yi,wn){if(Ti.debug("Changing setting",Yi,wn),oi.isPlainObject(Yi))oi.extend(!0,En,Yi);else if(wn!==vi)oi.isPlainObject(En[Yi])?oi.extend(!0,En[Yi],wn):En[Yi]=wn;else return En[Yi]},internal:function(Yi,wn){if(oi.isPlainObject(Yi))oi.extend(!0,Ti,Yi);else if(wn!==vi)Ti[Yi]=wn;else return Ti[Yi]},debug:function(){!En.silent&&En.debug&&(En.performance?Ti.performance.log(arguments):(Ti.debug=Function.prototype.bind.call(console.info,console,En.name+":"),Ti.debug.apply(console,arguments)))},verbose:function(){!En.silent&&En.verbose&&En.debug&&(En.performance?Ti.performance.log(arguments):(Ti.verbose=Function.prototype.bind.call(console.info,console,En.name+":"),Ti.verbose.apply(console,arguments)))},error:function(){En.silent||(Ti.error=Function.prototype.bind.call(console.error,console,En.name+":"),Ti.error.apply(console,arguments))},performance:{log:function(Yi){var wn,Bi,Qi;En.performance&&(wn=new Date().getTime(),Qi=In||wn,Bi=wn-Qi,In=wn,Vn.push({Name:Yi[0],Arguments:[].slice.call(Yi,1)||"",Element:Ai,"Execution Time":Bi})),clearTimeout(Ti.performance.timer),Ti.performance.timer=setTimeout(Ti.performance.display,500)},display:function(){var Yi=En.name+":",wn=0;In=!1,clearTimeout(Ti.performance.timer),oi.each(Vn,function(Bi,Qi){wn+=Qi["Execution Time"]}),Yi+=" "+wn+"ms",_n&&(Yi+=" '"+_n+"'"),(console.group!==vi||console.table!==vi)&&Vn.length>0&&(console.groupCollapsed(Yi),console.table?console.table(Vn):oi.each(Vn,function(Bi,Qi){console.log(Qi.Name+": "+Qi["Execution Time"]+"ms")}),console.groupEnd()),Vn=[]}},invoke:function(Yi,wn,Bi){var Qi=Ri,Gi,On,Xn;return wn=wn||un,Bi=Ai||Bi,typeof Yi=="string"&&Qi!==vi&&(Yi=Yi.split(/[\. ]/),Gi=Yi.length-1,oi.each(Yi,function(cs,Vs){var uo=cs!=Gi?Vs+Yi[cs+1].charAt(0).toUpperCase()+Yi[cs+1].slice(1):Yi;if(oi.isPlainObject(Qi[uo])&&cs!=Gi)Qi=Qi[uo];else{if(Qi[uo]!==vi)return On=Qi[uo],!1;if(oi.isPlainObject(Qi[Vs])&&cs!=Gi)Qi=Qi[Vs];else return Qi[Vs]!==vi&&(On=Qi[Vs]),!1}})),oi.isFunction(On)?Xn=On.apply(Bi,wn):On!==vi&&(Xn=On),Array.isArray(ks)?ks.push(Xn):ks!==vi?ks=[ks,Xn]:Xn!==vi&&(ks=Xn),On}},Zi?(Ri===vi&&Ti.initialize(),Ti.invoke(bn)):(Ri!==vi&&Ri.invoke("destroy"),Ti.initialize())}),ks!==vi?ks:this},oi.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front"}}})(jQuery,window,document);(function(oi,bi,wi,vi){"use strict";oi.isFunction=oi.isFunction||function(ri){return typeof ri=="function"&&typeof ri.nodeType!="number"},bi=typeof bi<"u"&&bi.Math==Math?bi:typeof self<"u"&&self.Math==Math?self:Function("return this")(),oi.fn.search=function(ri){var yi=oi(this),Li=yi.selector||"",Ji=new Date().getTime(),tn=[],_n=arguments[0],In=typeof _n=="string",Vn=[].slice.call(arguments,1),bn;return oi(this).each(function(){var Zi=oi.isPlainObject(ri)?oi.extend(!0,{},oi.fn.search.settings,ri):oi.extend({},oi.fn.search.settings),un=Zi.className,ls=Zi.metadata,ks=Zi.regExp,En=Zi.fields,qi=Zi.selector,sn=Zi.error,rs=Zi.namespace,hs="."+rs,fs=rs+"-module",yn=oi(this),mn=yn.find(qi.prompt),Mn=yn.find(qi.searchButton),pi=yn.find(qi.results),rn=yn.find(qi.result),dn=yn.find(qi.category),pn=this,Pn=yn.data(fs),nn=!1,Ai=!1,Ri;Ri={initialize:function(){Ri.verbose("Initializing module"),Ri.get.settings(),Ri.determine.searchFields(),Ri.bind.events(),Ri.set.type(),Ri.create.results(),Ri.instantiate()},instantiate:function(){Ri.verbose("Storing instance of module",Ri),Pn=Ri,yn.data(fs,Ri)},destroy:function(){Ri.verbose("Destroying instance"),yn.off(hs).removeData(fs)},refresh:function(){Ri.debug("Refreshing selector cache"),mn=yn.find(qi.prompt),Mn=yn.find(qi.searchButton),dn=yn.find(qi.category),pi=yn.find(qi.results),rn=yn.find(qi.result)},refreshResults:function(){pi=yn.find(qi.results),rn=yn.find(qi.result)},bind:{events:function(){Ri.verbose("Binding events to search"),Zi.automatic&&(yn.on(Ri.get.inputEvent()+hs,qi.prompt,Ri.event.input),mn.attr("autocomplete","off")),yn.on("focus"+hs,qi.prompt,Ri.event.focus).on("blur"+hs,qi.prompt,Ri.event.blur).on("keydown"+hs,qi.prompt,Ri.handleKeyboard).on("click"+hs,qi.searchButton,Ri.query).on("mousedown"+hs,qi.results,Ri.event.result.mousedown).on("mouseup"+hs,qi.results,Ri.event.result.mouseup).on("click"+hs,qi.result,Ri.event.result.click)}},determine:{searchFields:function(){ri&&ri.searchFields!==vi&&(Zi.searchFields=ri.searchFields)}},event:{input:function(){Zi.searchDelay?(clearTimeout(Ri.timer),Ri.timer=setTimeout(function(){Ri.is.focused()&&Ri.query()},Zi.searchDelay)):Ri.query()},focus:function(){Ri.set.focus(),Zi.searchOnFocus&&Ri.has.minimumCharacters()&&Ri.query(function(){Ri.can.show()&&Ri.showResults()})},blur:function(ki){var Wi=wi.activeElement===this,an=function(){Ri.cancel.query(),Ri.remove.focus(),Ri.timer=setTimeout(Ri.hideResults,Zi.hideDelay)};Wi||(Ai=!1,Ri.resultsClicked?(Ri.debug("Determining if user action caused search to close"),yn.one("click.close"+hs,qi.results,function(Fn){if(Ri.is.inMessage(Fn)||nn){mn.focus();return}nn=!1,!Ri.is.animating()&&!Ri.is.hidden()&&an()})):(Ri.debug("Input blurred without user action, closing results"),an()))},result:{mousedown:function(){Ri.resultsClicked=!0},mouseup:function(){Ri.resultsClicked=!1},click:function(ki){Ri.debug("Search result selected");var Wi=oi(this),an=Wi.find(qi.title).eq(0),Fn=Wi.is("a[href]")?Wi:Wi.find("a[href]").eq(0),en=Fn.attr("href")||!1,Fi=Fn.attr("target")||!1,Oi=an.length>0?an.text():!1,zi=Ri.get.results(),Ti=Wi.data(ls.result)||Ri.get.result(Oi,zi);if(Oi&&Ri.set.value(Oi),oi.isFunction(Zi.onSelect)&&Zi.onSelect.call(pn,Ti,zi)===!1){Ri.debug("Custom onSelect callback cancelled default select action"),nn=!0;return}Ri.hideResults(),en&&(ki.preventDefault(),Ri.verbose("Opening search link found in result",Fn),Fi=="_blank"||ki.ctrlKey?bi.open(en):bi.location.href=en)}}},ensureVisible:function(Wi){var an,Fn,en,Fi;an=Wi.position().top,Fn=an+Wi.outerHeight(!0),en=pi.scrollTop(),Fi=pi.height(),parseInt(pi.css("paddingTop"),0)+parseInt(pi.css("paddingBottom"),0),an<0?pi.scrollTop(en+an):Fi<Fn&&pi.scrollTop(en+(Fn-Fi))},handleKeyboard:function(ki){var Wi=yn.find(qi.result),an=yn.find(qi.category),Fn=Wi.filter("."+un.active),en=Wi.index(Fn),Fi=Wi.length,Oi=Fn.length>0,zi=ki.which,Ti={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40},Yi;if(zi==Ti.escape&&(Ri.verbose("Escape key pressed, blurring search field"),Ri.hideResults(),Ai=!0),Ri.is.visible())if(zi==Ti.enter){if(Ri.verbose("Enter key pressed, selecting active result"),Wi.filter("."+un.active).length>0)return Ri.event.result.click.call(Wi.filter("."+un.active),ki),ki.preventDefault(),!1}else zi==Ti.upArrow&&Oi?(Ri.verbose("Up key pressed, changing active result"),Yi=en-1<0?en:en-1,an.removeClass(un.active),Wi.removeClass(un.active).eq(Yi).addClass(un.active).closest(an).addClass(un.active),Ri.ensureVisible(Wi.eq(Yi)),ki.preventDefault()):zi==Ti.downArrow&&(Ri.verbose("Down key pressed, changing active result"),Yi=en+1>=Fi?en:en+1,an.removeClass(un.active),Wi.removeClass(un.active).eq(Yi).addClass(un.active).closest(an).addClass(un.active),Ri.ensureVisible(Wi.eq(Yi)),ki.preventDefault());else zi==Ti.enter&&(Ri.verbose("Enter key pressed, executing query"),Ri.query(),Ri.set.buttonPressed(),mn.one("keyup",Ri.remove.buttonFocus))},setup:{api:function(ki,Wi){var an={debug:Zi.debug,on:!1,cache:Zi.cache,action:"search",urlData:{query:ki},onSuccess:function(Fn){Ri.parse.response.call(pn,Fn,ki),Wi()},onFailure:function(){Ri.displayMessage(sn.serverError),Wi()},onAbort:function(Fn){},onError:Ri.error};oi.extend(!0,an,Zi.apiSettings),Ri.verbose("Setting up API request",an),yn.api(an)}},can:{useAPI:function(){return oi.fn.api!==vi},show:function(){return Ri.is.focused()&&!Ri.is.visible()&&!Ri.is.empty()},transition:function(){return Zi.transition&&oi.fn.transition!==vi&&yn.transition("is supported")}},is:{animating:function(){return pi.hasClass(un.animating)},hidden:function(){return pi.hasClass(un.hidden)},inMessage:function(ki){if(ki.target){var Wi=oi(ki.target),an=oi.contains(wi.documentElement,ki.target);return an&&Wi.closest(qi.message).length>0}},empty:function(){return pi.html()===""},visible:function(){return pi.filter(":visible").length>0},focused:function(){return mn.filter(":focus").length>0}},get:{settings:function(){oi.isPlainObject(ri)&&ri.searchFullText&&(Zi.fullTextSearch=ri.searchFullText,Ri.error(Zi.error.oldSearchSyntax,pn)),Zi.ignoreDiacritics&&!String.prototype.normalize&&(Zi.ignoreDiacritics=!1,Ri.error(sn.noNormalize,pn))},inputEvent:function(){var ki=mn[0],Wi=ki!==vi&&ki.oninput!==vi?"input":ki!==vi&&ki.onpropertychange!==vi?"propertychange":"keyup";return Wi},value:function(){return mn.val()},results:function(){var ki=yn.data(ls.results);return ki},result:function(ki,Wi){var an=!1;return ki=ki!==vi?ki:Ri.get.value(),Wi=Wi!==vi?Wi:Ri.get.results(),Zi.type==="category"?(Ri.debug("Finding result that matches",ki),oi.each(Wi,function(Fn,en){if(Array.isArray(en.results)&&(an=Ri.search.object(ki,en.results)[0],an))return!1})):(Ri.debug("Finding result in results object",ki),an=Ri.search.object(ki,Wi)[0]),an||!1}},select:{firstResult:function(){Ri.verbose("Selecting first result"),rn.first().addClass(un.active)}},set:{focus:function(){yn.addClass(un.focus)},loading:function(){yn.addClass(un.loading)},value:function(ki){Ri.verbose("Setting search input value",ki),mn.val(ki)},type:function(ki){ki=ki||Zi.type,Zi.type=="category"&&yn.addClass(Zi.type)},buttonPressed:function(){Mn.addClass(un.pressed)}},remove:{loading:function(){yn.removeClass(un.loading)},focus:function(){yn.removeClass(un.focus)},buttonPressed:function(){Mn.removeClass(un.pressed)},diacritics:function(ki){return Zi.ignoreDiacritics?ki.normalize("NFD").replace(/[\u0300-\u036f]/g,""):ki}},query:function(ki){ki=oi.isFunction(ki)?ki:function(){};var Wi=Ri.get.value(),an=Ri.read.cache(Wi);ki=ki||function(){},Ri.has.minimumCharacters()?(an?(Ri.debug("Reading result from cache",Wi),Ri.save.results(an.results),Ri.addResults(an.html),Ri.inject.id(an.results),ki()):(Ri.debug("Querying for",Wi),oi.isPlainObject(Zi.source)||Array.isArray(Zi.source)?(Ri.search.local(Wi),ki()):Ri.can.useAPI()?Ri.search.remote(Wi,ki):(Ri.error(sn.source),ki())),Zi.onSearchQuery.call(pn,Wi)):Ri.hideResults()},search:{local:function(ki){var Wi=Ri.search.object(ki,Zi.source),an;Ri.set.loading(),Ri.save.results(Wi),Ri.debug("Returned full local search results",Wi),Zi.maxResults>0&&(Ri.debug("Using specified max results",Wi),Wi=Wi.slice(0,Zi.maxResults)),Zi.type=="category"&&(Wi=Ri.create.categoryResults(Wi)),an=Ri.generateResults({results:Wi}),Ri.remove.loading(),Ri.addResults(an),Ri.inject.id(Wi),Ri.write.cache(ki,{html:an,results:Wi})},remote:function(ki,Wi){Wi=oi.isFunction(Wi)?Wi:function(){},yn.api("is loading")&&yn.api("abort"),Ri.setup.api(ki,Wi),yn.api("query")},object:function(ki,Wi,an){ki=Ri.remove.diacritics(String(ki));var Fn=[],en=[],Fi=[],Oi=ki.replace(ks.escape,"\\$&"),zi=new RegExp(ks.beginsWith+Oi,"i"),Ti=function(Yi,wn){var Bi=oi.inArray(wn,Fn)==-1,Qi=oi.inArray(wn,Fi)==-1,Gi=oi.inArray(wn,en)==-1;Bi&&Qi&&Gi&&Yi.push(wn)};return Wi=Wi||Zi.source,an=an!==vi?an:Zi.searchFields,Array.isArray(an)||(an=[an]),Wi===vi||Wi===!1?(Ri.error(sn.source),[]):(oi.each(an,function(Yi,wn){oi.each(Wi,function(Bi,Qi){var Gi=typeof Qi[wn]=="string"||typeof Qi[wn]=="number";if(Gi){var On;typeof Qi[wn]=="string"?On=Ri.remove.diacritics(Qi[wn]):On=Qi[wn].toString(),On.search(zi)!==-1?Ti(Fn,Qi):Zi.fullTextSearch==="exact"&&Ri.exactSearch(ki,On)?Ti(en,Qi):Zi.fullTextSearch==!0&&Ri.fuzzySearch(ki,On)&&Ti(Fi,Qi)}})}),oi.merge(en,Fi),oi.merge(Fn,en),Fn)}},exactSearch:function(ki,Wi){return ki=ki.toLowerCase(),Wi=Wi.toLowerCase(),Wi.indexOf(ki)>-1},fuzzySearch:function(ki,Wi){var an=Wi.length,Fn=ki.length;if(typeof ki!="string"||(ki=ki.toLowerCase(),Wi=Wi.toLowerCase(),Fn>an))return!1;if(Fn===an)return ki===Wi;e:for(var en=0,Fi=0;en<Fn;en++){for(var Oi=ki.charCodeAt(en);Fi<an;)if(Wi.charCodeAt(Fi++)===Oi)continue e;return!1}return!0},parse:{response:function(ki,Wi){if(Array.isArray(ki)){var an={};an[En.results]=ki,ki=an}var Fn=Ri.generateResults(ki);Ri.verbose("Parsing server response",ki),ki!==vi&&Wi!==vi&&ki[En.results]!==vi&&(Ri.addResults(Fn),Ri.inject.id(ki[En.results]),Ri.write.cache(Wi,{html:Fn,results:ki[En.results]}),Ri.save.results(ki[En.results]))}},cancel:{query:function(){Ri.can.useAPI()&&yn.api("abort")}},has:{minimumCharacters:function(){var ki=Ri.get.value(),Wi=ki.length;return Wi>=Zi.minCharacters},results:function(){if(pi.length===0)return!1;var ki=pi.html();return ki!=""}},clear:{cache:function(ki){var Wi=yn.data(ls.cache);ki?ki&&Wi&&Wi[ki]&&(Ri.debug("Removing value from cache",ki),delete Wi[ki],yn.data(ls.cache,Wi)):(Ri.debug("Clearing cache",ki),yn.removeData(ls.cache))}},read:{cache:function(ki){var Wi=yn.data(ls.cache);return Zi.cache?(Ri.verbose("Checking cache for generated html for query",ki),typeof Wi=="object"&&Wi[ki]!==vi?Wi[ki]:!1):!1}},create:{categoryResults:function(ki){var Wi={};return oi.each(ki,function(an,Fn){Fn.category&&(Wi[Fn.category]===vi?(Ri.verbose("Creating new category of results",Fn.category),Wi[Fn.category]={name:Fn.category,results:[Fn]}):Wi[Fn.category].results.push(Fn))}),Wi},id:function(ki,Wi){var an=ki+1,Fn,en;return Wi!==vi?(Fn=String.fromCharCode(97+Wi),en=Fn+an,Ri.verbose("Creating category result id",en)):(en=an,Ri.verbose("Creating result id",en)),en},results:function(){pi.length===0&&(pi=oi("<div />").addClass(un.results).appendTo(yn))}},inject:{result:function(ki,Wi,an){Ri.verbose("Injecting result into results");var Fn=an!==vi?pi.children().eq(an).children(qi.results).first().children(qi.result).eq(Wi):pi.children(qi.result).eq(Wi);Ri.verbose("Injecting results metadata",Fn),Fn.data(ls.result,ki)},id:function(ki){Ri.debug("Injecting unique ids into results");var Wi=0,an=0;return Zi.type==="category"?oi.each(ki,function(Fn,en){en.results.length>0&&(an=0,oi.each(en.results,function(Fi,Oi){Oi.id===vi&&(Oi.id=Ri.create.id(an,Wi)),Ri.inject.result(Oi,an,Wi),an++}),Wi++)}):oi.each(ki,function(Fn,en){en.id===vi&&(en.id=Ri.create.id(an)),Ri.inject.result(en,an),an++}),ki}},save:{results:function(ki){Ri.verbose("Saving current search results to metadata",ki),yn.data(ls.results,ki)}},write:{cache:function(ki,Wi){var an=yn.data(ls.cache)!==vi?yn.data(ls.cache):{};Zi.cache&&(Ri.verbose("Writing generated html to cache",ki,Wi),an[ki]=Wi,yn.data(ls.cache,an))}},addResults:function(ki){if(oi.isFunction(Zi.onResultsAdd)&&Zi.onResultsAdd.call(pi,ki)===!1)return Ri.debug("onResultsAdd callback cancelled default action"),!1;ki?(pi.html(ki),Ri.refreshResults(),Zi.selectFirstResult&&Ri.select.firstResult(),Ri.showResults()):Ri.hideResults(function(){pi.empty()})},showResults:function(ki){ki=oi.isFunction(ki)?ki:function(){},!Ai&&!Ri.is.visible()&&Ri.has.results()&&(Ri.can.transition()?(Ri.debug("Showing results with css animations"),pi.transition({animation:Zi.transition+" in",debug:Zi.debug,verbose:Zi.verbose,duration:Zi.duration,onShow:function(){var Wi=yn.find(qi.result).eq(0);Wi.length>0&&Ri.ensureVisible(Wi)},onComplete:function(){ki()},queue:!0})):(Ri.debug("Showing results with javascript"),pi.stop().fadeIn(Zi.duration,Zi.easing)),Zi.onResultsOpen.call(pi))},hideResults:function(ki){ki=oi.isFunction(ki)?ki:function(){},Ri.is.visible()&&(Ri.can.transition()?(Ri.debug("Hiding results with css animations"),pi.transition({animation:Zi.transition+" out",debug:Zi.debug,verbose:Zi.verbose,duration:Zi.duration,onComplete:function(){ki()},queue:!0})):(Ri.debug("Hiding results with javascript"),pi.stop().fadeOut(Zi.duration,Zi.easing)),Zi.onResultsClose.call(pi))},generateResults:function(ki){Ri.debug("Generating html from response",ki);var Wi=Zi.templates[Zi.type],an=oi.isPlainObject(ki[En.results])&&!oi.isEmptyObject(ki[En.results]),Fn=Array.isArray(ki[En.results])&&ki[En.results].length>0,en="";return an||Fn?(Zi.maxResults>0&&(an?Zi.type=="standard"&&Ri.error(sn.maxResults):ki[En.results]=ki[En.results].slice(0,Zi.maxResults)),oi.isFunction(Wi)?en=Wi(ki,En,Zi.preserveHTML):Ri.error(sn.noTemplate,!1)):Zi.showNoResults&&(en=Ri.displayMessage(sn.noResults,"empty",sn.noResultsHeader)),Zi.onResults.call(pn,ki),en},displayMessage:function(ki,Wi,an){return Wi=Wi||"standard",Ri.debug("Displaying message",ki,Wi,an),Ri.addResults(Zi.templates.message(ki,Wi,an)),Zi.templates.message(ki,Wi,an)},setting:function(ki,Wi){if(oi.isPlainObject(ki))oi.extend(!0,Zi,ki);else if(Wi!==vi)Zi[ki]=Wi;else return Zi[ki]},internal:function(ki,Wi){if(oi.isPlainObject(ki))oi.extend(!0,Ri,ki);else if(Wi!==vi)Ri[ki]=Wi;else return Ri[ki]},debug:function(){!Zi.silent&&Zi.debug&&(Zi.performance?Ri.performance.log(arguments):(Ri.debug=Function.prototype.bind.call(console.info,console,Zi.name+":"),Ri.debug.apply(console,arguments)))},verbose:function(){!Zi.silent&&Zi.verbose&&Zi.debug&&(Zi.performance?Ri.performance.log(arguments):(Ri.verbose=Function.prototype.bind.call(console.info,console,Zi.name+":"),Ri.verbose.apply(console,arguments)))},error:function(){Zi.silent||(Ri.error=Function.prototype.bind.call(console.error,console,Zi.name+":"),Ri.error.apply(console,arguments))},performance:{log:function(ki){var Wi,an,Fn;Zi.performance&&(Wi=new Date().getTime(),Fn=Ji||Wi,an=Wi-Fn,Ji=Wi,tn.push({Name:ki[0],Arguments:[].slice.call(ki,1)||"",Element:pn,"Execution Time":an})),clearTimeout(Ri.performance.timer),Ri.performance.timer=setTimeout(Ri.performance.display,500)},display:function(){var ki=Zi.name+":",Wi=0;Ji=!1,clearTimeout(Ri.performance.timer),oi.each(tn,function(an,Fn){Wi+=Fn["Execution Time"]}),ki+=" "+Wi+"ms",Li&&(ki+=" '"+Li+"'"),yi.length>1&&(ki+=" ("+yi.length+")"),(console.group!==vi||console.table!==vi)&&tn.length>0&&(console.groupCollapsed(ki),console.table?console.table(tn):oi.each(tn,function(an,Fn){console.log(Fn.Name+": "+Fn["Execution Time"]+"ms")}),console.groupEnd()),tn=[]}},invoke:function(ki,Wi,an){var Fn=Pn,en,Fi,Oi;return Wi=Wi||Vn,an=pn||an,typeof ki=="string"&&Fn!==vi&&(ki=ki.split(/[\. ]/),en=ki.length-1,oi.each(ki,function(zi,Ti){var Yi=zi!=en?Ti+ki[zi+1].charAt(0).toUpperCase()+ki[zi+1].slice(1):ki;if(oi.isPlainObject(Fn[Yi])&&zi!=en)Fn=Fn[Yi];else{if(Fn[Yi]!==vi)return Fi=Fn[Yi],!1;if(oi.isPlainObject(Fn[Ti])&&zi!=en)Fn=Fn[Ti];else return Fn[Ti]!==vi&&(Fi=Fn[Ti]),!1}})),oi.isFunction(Fi)?Oi=Fi.apply(an,Wi):Fi!==vi&&(Oi=Fi),Array.isArray(bn)?bn.push(Oi):bn!==vi?bn=[bn,Oi]:Oi!==vi&&(bn=Oi),Fi}},In?(Pn===vi&&Ri.initialize(),Ri.invoke(_n)):(Pn!==vi&&Pn.invoke("destroy"),Ri.initialize())}),bn!==vi?bn:this},oi.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchOnFocus:!0,searchFields:["id","title","description"],displayField:"",fullTextSearch:"exact",ignoreDiacritics:!1,automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,preserveHTML:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(ri){},onResults:function(ri){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResultsHeader:"No Results",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",noTemplate:"A valid template name was not specified.",oldSearchSyntax:"searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined.",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(ri,yi){if(yi)return ri;var Li=/[<>"'`]/g,Ji=/[&<>"'`]/,tn={"<":"<",">":">",'"':""","'":"'","`":"`"},_n=function(In){return tn[In]};return Ji.test(ri)?(ri=ri.replace(/&(?![a-z0-9#]{1,6};)/,"&"),ri.replace(Li,_n)):ri},message:function(ri,yi,Li){var Ji="";return ri!==vi&&yi!==vi&&(Ji+='<div class="message '+yi+'">',Li&&(Ji+='<div class="header">'+Li+"</div>"),Ji+=' <div class="description">'+ri+"</div>",Ji+="</div>"),Ji},category:function(ri,yi,Li){var Ji="",tn=oi.fn.search.settings.templates.escape;return ri[yi.categoryResults]!==vi?(oi.each(ri[yi.categoryResults],function(_n,In){In[yi.results]!==vi&&In.results.length>0&&(Ji+='<div class="category">',In[yi.categoryName]!==vi&&(Ji+='<div class="name">'+tn(In[yi.categoryName],Li)+"</div>"),Ji+='<div class="results">',oi.each(In.results,function(Vn,bn){bn[yi.url]?Ji+='<a class="result" href="'+bn[yi.url].replace(/"/g,"")+'">':Ji+='<a class="result">',bn[yi.image]!==vi&&(Ji+='<div class="image"> <img src="'+bn[yi.image].replace(/"/g,"")+'"></div>'),Ji+='<div class="content">',bn[yi.price]!==vi&&(Ji+='<div class="price">'+tn(bn[yi.price],Li)+"</div>"),bn[yi.title]!==vi&&(Ji+='<div class="title">'+tn(bn[yi.title],Li)+"</div>"),bn[yi.description]!==vi&&(Ji+='<div class="description">'+tn(bn[yi.description],Li)+"</div>"),Ji+="</div>",Ji+="</a>"}),Ji+="</div>",Ji+="</div>")}),ri[yi.action]&&(yi.actionURL===!1?Ji+='<div class="action">'+tn(ri[yi.action][yi.actionText],Li)+"</div>":Ji+='<a href="'+ri[yi.action][yi.actionURL].replace(/"/g,"")+'" class="action">'+tn(ri[yi.action][yi.actionText],Li)+"</a>"),Ji):!1},standard:function(ri,yi,Li){var Ji="",tn=oi.fn.search.settings.templates.escape;return ri[yi.results]!==vi?(oi.each(ri[yi.results],function(_n,In){In[yi.url]?Ji+='<a class="result" href="'+In[yi.url].replace(/"/g,"")+'">':Ji+='<a class="result">',In[yi.image]!==vi&&(Ji+='<div class="image"> <img src="'+In[yi.image].replace(/"/g,"")+'"></div>'),Ji+='<div class="content">',In[yi.price]!==vi&&(Ji+='<div class="price">'+tn(In[yi.price],Li)+"</div>"),In[yi.title]!==vi&&(Ji+='<div class="title">'+tn(In[yi.title],Li)+"</div>"),In[yi.description]!==vi&&(Ji+='<div class="description">'+tn(In[yi.description],Li)+"</div>"),Ji+="</div>",Ji+="</a>"}),ri[yi.action]&&(yi.actionURL===!1?Ji+='<div class="action">'+tn(ri[yi.action][yi.actionText],Li)+"</div>":Ji+='<a href="'+ri[yi.action][yi.actionURL].replace(/"/g,"")+'" class="action">'+tn(ri[yi.action][yi.actionText],Li)+"</a>"),Ji):!1}}}})(jQuery,window,document);(function(oi,bi,wi,vi){"use strict";oi.isWindow=oi.isWindow||function(ri){return ri!=null&&ri===ri.window},oi.isFunction=oi.isFunction||function(ri){return typeof ri=="function"&&typeof ri.nodeType!="number"},bi=typeof bi<"u"&&bi.Math==Math?bi:typeof self<"u"&&self.Math==Math?self:Function("return this")(),oi.fn.tab=function(ri){var yi=oi.isFunction(this)?oi(bi):oi(this),Li=yi.selector||"",Ji=new Date().getTime(),tn=[],_n=arguments[0],In=typeof _n=="string",Vn=[].slice.call(arguments,1),bn=!1,Zi;return yi.each(function(){var un=oi.isPlainObject(ri)?oi.extend(!0,{},oi.fn.tab.settings,ri):oi.extend({},oi.fn.tab.settings),ls=un.className,ks=un.metadata,En=un.selector,qi=un.error,sn=un.regExp,rs="."+un.namespace,hs="module-"+un.namespace,fs=oi(this),yn,mn,Mn={},pi=!0,rn=0,dn=this,pn=fs.data(hs),Pn,nn,Ai,Ri;Ai={initialize:function(){Ai.debug("Initializing tab menu item",fs),Ai.fix.callbacks(),Ai.determineTabs(),Ai.debug("Determining tabs",un.context,mn),un.auto&&Ai.set.auto(),Ai.bind.events(),un.history&&!bn&&(Ai.initializeHistory(),bn=!0),un.autoTabActivation&&pn===vi&&Ai.determine.activeTab()==null&&(Ai.debug("No active tab detected, setting first tab active",Ai.get.initialPath()),Ai.changeTab(un.autoTabActivation===!0?Ai.get.initialPath():un.autoTabActivation)),Ai.instantiate()},instantiate:function(){Ai.verbose("Storing instance of module",Ai),pn=Ai,fs.data(hs,Ai)},destroy:function(){Ai.debug("Destroying tabs",fs),fs.removeData(hs).off(rs)},bind:{events:function(){oi.isWindow(dn)||(Ai.debug("Attaching tab activation events to element",fs),fs.on("click"+rs,Ai.event.click))}},determineTabs:function(){var ki;un.context==="parent"?(fs.closest(En.ui).length>0?(ki=fs.closest(En.ui),Ai.verbose("Using closest UI element as parent",ki)):ki=fs,yn=ki.parent(),Ai.verbose("Determined parent element for creating context",yn)):un.context?(yn=oi(un.context),Ai.verbose("Using selector for tab context",un.context,yn)):yn=oi("body"),un.childrenOnly?(mn=yn.children(En.tabs),Ai.debug("Searching tab context children for tabs",yn,mn)):(mn=yn.find(En.tabs),Ai.debug("Searching tab context for tabs",yn,mn))},fix:{callbacks:function(){oi.isPlainObject(ri)&&(ri.onTabLoad||ri.onTabInit)&&(ri.onTabLoad&&(ri.onLoad=ri.onTabLoad,delete ri.onTabLoad,Ai.error(qi.legacyLoad,ri.onLoad)),ri.onTabInit&&(ri.onFirstLoad=ri.onTabInit,delete ri.onTabInit,Ai.error(qi.legacyInit,ri.onFirstLoad)),un=oi.extend(!0,{},oi.fn.tab.settings,ri))}},initializeHistory:function(){if(Ai.debug("Initializing page state"),oi.address===vi)return Ai.error(qi.state),!1;if(un.historyType=="state")if(Ai.debug("Using HTML5 to manage state"),un.path!==!1)oi.address.history(!0).state(un.path);else return Ai.error(qi.path),!1;oi.address.bind("change",Ai.event.history.change)},event:{click:function(ki){var Wi=oi(this).data(ks.tab);Wi!==vi?(un.history?(Ai.verbose("Updating page state",ki),oi.address.value(Wi)):(Ai.verbose("Changing tab",ki),Ai.changeTab(Wi)),ki.preventDefault()):Ai.debug("No tab specified")},history:{change:function(ki){var Wi=ki.pathNames.join("/")||Ai.get.initialPath(),an=un.templates.determineTitle(Wi)||!1;Ai.performance.display(),Ai.debug("History change event",Wi,ki),Ri=ki,Wi!==vi&&Ai.changeTab(Wi),an&&oi.address.title(an)}}},refresh:function(){Pn&&(Ai.debug("Refreshing tab",Pn),Ai.changeTab(Pn))},cache:{read:function(ki){return ki!==vi?Mn[ki]:!1},add:function(ki,Wi){ki=ki||Pn,Ai.debug("Adding cached content for",ki),Mn[ki]=Wi},remove:function(ki){ki=ki||Pn,Ai.debug("Removing cached content for",ki),delete Mn[ki]}},escape:{string:function(ki){return ki=String(ki),ki.replace(sn.escape,"\\$&")}},set:{auto:function(){var ki=typeof un.path=="string"?un.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";Ai.verbose("Setting up automatic tab retrieval from server",ki),oi.isPlainObject(un.apiSettings)?un.apiSettings.url=ki:un.apiSettings={url:ki}},loading:function(ki){var Wi=Ai.get.tabElement(ki),an=Wi.hasClass(ls.loading);an||(Ai.verbose("Setting loading state for",Wi),Wi.addClass(ls.loading).siblings(mn).removeClass(ls.active+" "+ls.loading),Wi.length>0&&un.onRequest.call(Wi[0],ki))},state:function(ki){oi.address.value(ki)}},changeTab:function(ki){var Wi=bi.history&&bi.history.pushState,an=Wi&&un.ignoreFirstLoad&&pi,Fn=un.auto||oi.isPlainObject(un.apiSettings),en=Fn&&!an?Ai.utilities.pathToArray(ki):Ai.get.defaultPathArray(ki);ki=Ai.utilities.arrayToPath(en),oi.each(en,function(Fi,Oi){var zi=en.slice(0,Fi+1),Ti=Ai.utilities.arrayToPath(zi),Yi=Ai.is.tab(Ti),wn=Fi+1==en.length,Bi=Ai.get.tabElement(Ti),Qi,Gi,On,Xn;if(Ai.verbose("Looking for tab",Oi),Yi){if(Ai.verbose("Tab was found",Oi),Pn=Ti,nn=Ai.utilities.filterArray(en,zi),wn?Xn=!0:(Gi=en.slice(0,Fi+2),On=Ai.utilities.arrayToPath(Gi),Xn=!Ai.is.tab(On),Xn&&Ai.verbose("Tab parameters found",Gi)),Xn&&Fn)return an?(Ai.debug("Ignoring remote content on first tab load",Ti),pi=!1,Ai.cache.add(ki,Bi.html()),Ai.activate.all(Ti),un.onFirstLoad.call(Bi[0],Ti,nn,Ri),un.onLoad.call(Bi[0],Ti,nn,Ri)):(Ai.activate.navigation(Ti),Ai.fetch.content(Ti,ki)),!1;Ai.debug("Opened local tab",Ti),Ai.activate.all(Ti),Ai.cache.read(Ti)||(Ai.cache.add(Ti,!0),Ai.debug("First time tab loaded calling tab init"),un.onFirstLoad.call(Bi[0],Ti,nn,Ri)),un.onLoad.call(Bi[0],Ti,nn,Ri)}else if(ki.search("/")==-1&&ki!==""){if(ki=Ai.escape.string(ki),Qi=oi("#"+ki+', a[name="'+ki+'"]'),Ti=Qi.closest("[data-tab]").data(ks.tab),Bi=Ai.get.tabElement(Ti),Qi&&Qi.length>0&&Ti)return Ai.debug("Anchor link used, opening parent tab",Bi,Qi),Bi.hasClass(ls.active)||setTimeout(function(){Ai.scrollTo(Qi)},0),Ai.activate.all(Ti),Ai.cache.read(Ti)||(Ai.cache.add(Ti,!0),Ai.debug("First time tab loaded calling tab init"),un.onFirstLoad.call(Bi[0],Ti,nn,Ri)),un.onLoad.call(Bi[0],Ti,nn,Ri),!1}else return Ai.error(qi.missingTab,fs,yn,Ti),!1})},scrollTo:function(ki){var Wi=ki&&ki.length>0?ki.offset().top:!1;Wi!==!1&&(Ai.debug("Forcing scroll to an in-page link in a hidden tab",Wi,ki),oi(wi).scrollTop(Wi))},update:{content:function(ki,Wi,an){var Fn=Ai.get.tabElement(ki),en=Fn[0];an=an!==vi?an:un.evaluateScripts,typeof un.cacheType=="string"&&un.cacheType.toLowerCase()=="dom"&&typeof Wi!="string"?Fn.empty().append(oi(Wi).clone(!0)):an?(Ai.debug("Updating HTML and evaluating inline scripts",ki,Wi),Fn.html(Wi)):(Ai.debug("Updating HTML",ki,Wi),en.innerHTML=Wi)}},fetch:{content:function(ki,Wi){var an=Ai.get.tabElement(ki),Fn={dataType:"html",encodeParameters:!1,on:"now",cache:un.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(Ti){un.cacheType=="response"&&Ai.cache.add(Wi,Ti),Ai.update.content(ki,Ti),ki==Pn?(Ai.debug("Content loaded",ki),Ai.activate.tab(ki)):Ai.debug("Content loaded in background",ki),un.onFirstLoad.call(an[0],ki,nn,Ri),un.onLoad.call(an[0],ki,nn,Ri),un.loadOnce?Ai.cache.add(Wi,!0):typeof un.cacheType=="string"&&un.cacheType.toLowerCase()=="dom"&&an.children().length>0?setTimeout(function(){var Yi=an.children().clone(!0);Yi=Yi.not("script"),Ai.cache.add(Wi,Yi)},0):Ai.cache.add(Wi,an.html())},urlData:{tab:Wi}},en=an.api("get request")||!1,Fi=en&&en.state()==="pending",Oi,zi;Wi=Wi||ki,zi=Ai.cache.read(Wi),un.cache&&zi?(Ai.activate.tab(ki),Ai.debug("Adding cached content",Wi),un.loadOnce||(un.evaluateScripts=="once"?Ai.update.content(ki,zi,!1):Ai.update.content(ki,zi)),un.onLoad.call(an[0],ki,nn,Ri)):Fi?(Ai.set.loading(ki),Ai.debug("Content is already loading",Wi)):oi.api!==vi?(Oi=oi.extend(!0,{},un.apiSettings,Fn),Ai.debug("Retrieving remote content",Wi,Oi),Ai.set.loading(ki),an.api(Oi)):Ai.error(qi.api)}},activate:{all:function(ki){Ai.activate.tab(ki),Ai.activate.navigation(ki)},tab:function(ki){var Wi=Ai.get.tabElement(ki),an=un.deactivate=="siblings"?Wi.siblings(mn):mn.not(Wi),Fn=Wi.hasClass(ls.active);Ai.verbose("Showing tab content for",Wi),Fn||(Wi.addClass(ls.active),an.removeClass(ls.active+" "+ls.loading),Wi.length>0&&un.onVisible.call(Wi[0],ki))},navigation:function(ki){var Wi=Ai.get.navElement(ki),an=un.deactivate=="siblings"?Wi.siblings(yi):yi.not(Wi),Fn=Wi.hasClass(ls.active);Ai.verbose("Activating tab navigation for",Wi,ki),Fn||(Wi.addClass(ls.active),an.removeClass(ls.active+" "+ls.loading))}},deactivate:{all:function(){Ai.deactivate.navigation(),Ai.deactivate.tabs()},navigation:function(){yi.removeClass(ls.active)},tabs:function(){mn.removeClass(ls.active+" "+ls.loading)}},is:{tab:function(ki){return ki!==vi?Ai.get.tabElement(ki).length>0:!1}},get:{initialPath:function(){return yi.eq(0).data(ks.tab)||mn.eq(0).data(ks.tab)},path:function(){return oi.address.value()},defaultPathArray:function(ki){return Ai.utilities.pathToArray(Ai.get.defaultPath(ki))},defaultPath:function(ki){var Wi=yi.filter("[data-"+ks.tab+'^="'+Ai.escape.string(ki)+'/"]').eq(0),an=Wi.data(ks.tab)||!1;if(an){if(Ai.debug("Found default tab",an),rn<un.maxDepth)return rn++,Ai.get.defaultPath(an);Ai.error(qi.recursion)}else Ai.debug("No default tabs found for",ki,mn);return rn=0,ki},navElement:function(ki){return ki=ki||Pn,yi.filter("[data-"+ks.tab+'="'+Ai.escape.string(ki)+'"]')},tabElement:function(ki){var Wi,an,Fn,en;return ki=ki||Pn,Fn=Ai.utilities.pathToArray(ki),en=Ai.utilities.last(Fn),Wi=mn.filter("[data-"+ks.tab+'="'+Ai.escape.string(ki)+'"]'),an=mn.filter("[data-"+ks.tab+'="'+Ai.escape.string(en)+'"]'),Wi.length>0?Wi:an},tab:function(){return Pn}},determine:{activeTab:function(){var ki=null;return mn.each(function(Wi,an){var Fn=oi(an);if(Fn.hasClass(ls.active)){var en=oi(this).data(ks.tab),Fi=yi.filter("[data-"+ks.tab+'="'+Ai.escape.string(en)+'"]');Fi.hasClass(ls.active)&&(ki=en)}}),ki}},utilities:{filterArray:function(ki,Wi){return oi.grep(ki,function(an){return oi.inArray(an,Wi)==-1})},last:function(ki){return Array.isArray(ki)?ki[ki.length-1]:!1},pathToArray:function(ki){return ki===vi&&(ki=Pn),typeof ki=="string"?ki.split("/"):[ki]},arrayToPath:function(ki){return Array.isArray(ki)?ki.join("/"):!1}},setting:function(ki,Wi){if(Ai.debug("Changing setting",ki,Wi),oi.isPlainObject(ki))oi.extend(!0,un,ki);else if(Wi!==vi)oi.isPlainObject(un[ki])?oi.extend(!0,un[ki],Wi):un[ki]=Wi;else return un[ki]},internal:function(ki,Wi){if(oi.isPlainObject(ki))oi.extend(!0,Ai,ki);else if(Wi!==vi)Ai[ki]=Wi;else return Ai[ki]},debug:function(){!un.silent&&un.debug&&(un.performance?Ai.performance.log(arguments):(Ai.debug=Function.prototype.bind.call(console.info,console,un.name+":"),Ai.debug.apply(console,arguments)))},verbose:function(){!un.silent&&un.verbose&&un.debug&&(un.performance?Ai.performance.log(arguments):(Ai.verbose=Function.prototype.bind.call(console.info,console,un.name+":"),Ai.verbose.apply(console,arguments)))},error:function(){un.silent||(Ai.error=Function.prototype.bind.call(console.error,console,un.name+":"),Ai.error.apply(console,arguments))},performance:{log:function(ki){var Wi,an,Fn;un.performance&&(Wi=new Date().getTime(),Fn=Ji||Wi,an=Wi-Fn,Ji=Wi,tn.push({Name:ki[0],Arguments:[].slice.call(ki,1)||"",Element:dn,"Execution Time":an})),clearTimeout(Ai.performance.timer),Ai.performance.timer=setTimeout(Ai.performance.display,500)},display:function(){var ki=un.name+":",Wi=0;Ji=!1,clearTimeout(Ai.performance.timer),oi.each(tn,function(an,Fn){Wi+=Fn["Execution Time"]}),ki+=" "+Wi+"ms",Li&&(ki+=" '"+Li+"'"),(console.group!==vi||console.table!==vi)&&tn.length>0&&(console.groupCollapsed(ki),console.table?console.table(tn):oi.each(tn,function(an,Fn){console.log(Fn.Name+": "+Fn["Execution Time"]+"ms")}),console.groupEnd()),tn=[]}},invoke:function(ki,Wi,an){var Fn=pn,en,Fi,Oi;return Wi=Wi||Vn,an=dn||an,typeof ki=="string"&&Fn!==vi&&(ki=ki.split(/[\. ]/),en=ki.length-1,oi.each(ki,function(zi,Ti){var Yi=zi!=en?Ti+ki[zi+1].charAt(0).toUpperCase()+ki[zi+1].slice(1):ki;if(oi.isPlainObject(Fn[Yi])&&zi!=en)Fn=Fn[Yi];else{if(Fn[Yi]!==vi)return Fi=Fn[Yi],!1;if(oi.isPlainObject(Fn[Ti])&&zi!=en)Fn=Fn[Ti];else return Fn[Ti]!==vi?(Fi=Fn[Ti],!1):(Ai.error(qi.method,ki),!1)}})),oi.isFunction(Fi)?Oi=Fi.apply(an,Wi):Fi!==vi&&(Oi=Fi),Array.isArray(Zi)?Zi.push(Oi):Zi!==vi?Zi=[Zi,Oi]:Oi!==vi&&(Zi=Oi),Fi}},In?(pn===vi&&Ai.initialize(),Ai.invoke(_n)):(pn!==vi&&pn.invoke("destroy"),Ai.initialize())}),Zi!==vi?Zi:this},oi.tab=function(){oi(bi).tab.apply(this,arguments)},oi.fn.tab.settings={name:"Tab",namespace:"tab",silent:!1,debug:!1,verbose:!1,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,deactivate:"siblings",alwaysRefresh:!1,cache:!0,loadOnce:!1,cacheType:"response",ignoreFirstLoad:!1,apiSettings:!1,evaluateScripts:"once",autoTabActivation:!0,onFirstLoad:function(ri,yi,Li){},onLoad:function(ri,yi,Li){},onVisible:function(ri,yi,Li){},onRequest:function(ri,yi,Li){},templates:{determineTitle:function(ri){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found. Tabs are case-sensitive.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",legacyInit:"onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.",legacyLoad:"onTabLoad has been renamed to onLoad in 2.0. Please adjust your code",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s:=@]/g},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}})(jQuery,window,document)}(),function(){"use strict";var gl,jl,af,qa,il,Df,yd,Ff,Du,wd,am,gp,Vy,lh,yp,lm,tv,vp,Uy;__webpack_require__.p=`${window.config?.assetUrlPrefix??"/assets"}/`;function oi(ei){const ti=["/assets/js/monaco."];for(const ii of ti)if(ei.stack?.includes(ii))return!0;return!1}function bi(ei,ti="error"){const ii=document.querySelector(".page-content")??document.body,ni=ei.replace(/\W/g,"").trim();let si=ii.querySelector(`.js-global-error[data-global-error-msg-compact="${ni}"]`);if(!si){const li=document.createElement("div");li.innerHTML=`<div class="ui container js-global-error tw-my-[--page-spacing]"><div class="ui ${ti} message tw-text-center tw-whitespace-pre-line"></div></div>`,si=li.childNodes[0]}const ai=Number(si.getAttribute("data-global-error-msg-count"))+1;si.setAttribute("data-global-error-msg-compact",ni),si.setAttribute("data-global-error-msg-count",ai.toString()),si.querySelector(".ui.message").textContent=ei+(ai>1?` (${ai})`:""),ii.prepend(si)}function wi({error:ei,reason:ti,message:ii,type:ni,filename:si,lineno:ai,colno:li}){const fi=ei??ti,hi=String(new URL(__webpack_require__.p,window.location.origin)),{runModeIsProd:_i}=window.config??{};if(!fi&&(ii&&console.error(new Error(ii)),_i)||fi instanceof Error&&(!fi.stack?.includes(hi)&&_i||oi(fi)))return;let ji=fi?.message??ii;ai&&(ji+=` (${si} @ ${ai}:${li})`);const Mi=ji.endsWith(".")?"":".";bi(`JavaScript ${ni==="unhandledrejection"?"promise rejection":ni}: ${ji}${Mi} Open browser console to see more details.`)}function vi(){if(window._globalHandlerErrors?._inited){bi("The global error handler has been initialized, do not initialize it again");return}window.config||bi("Gitea JavaScript code couldn't run correctly, please check your custom templates");for(const ei of window._globalHandlerErrors||[])wi(ei);window._globalHandlerErrors={_inited:!0,push:ei=>wi(ei)}}vi();var ri=__webpack_require__("./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js"),yi=__webpack_require__("./node_modules/@vue/shared/dist/shared.esm-bundler.js");const Li={class:"activity-bar-graph",ref:"style",style:{width:"0",height:"0"}},Ji={class:"activity-bar-graph-alt",ref:"altStyle",style:{width:"0",height:"0"}},tn=["href"],_n=["x","y","href"],In=["x","y","href"],Vn={key:0};function bn(ei,ti,ii,ni,si,ai){const li=(0,ri.g2)("vue-bar-graph");return(0,ri.uX)(),(0,ri.CE)("div",null,[(0,ri.Lk)("div",Li,null,512),(0,ri.Lk)("div",Ji,null,512),(0,ri.bF)(li,{points:ei.graphPoints,"show-x-axis":!0,"show-y-axis":!1,"show-values":!0,width:ei.graphWidth,"bar-color":ei.colors.barColor,"text-color":ei.colors.textColor,"text-alt-color":ei.colors.textAltColor,height:100,"label-height":20},{label:(0,ri.k6)(fi=>[((0,ri.uX)(!0),(0,ri.CE)(ri.FK,null,(0,ri.pI)(ei.graphAuthors,(hi,_i)=>((0,ri.uX)(),(0,ri.CE)("g",{key:hi.position},[fi.bar.index===_i&&hi.home_link?((0,ri.uX)(),(0,ri.CE)("a",{key:0,href:hi.home_link},[(0,ri.Lk)("image",{x:`${fi.bar.midPoint-10}px`,y:`${fi.bar.yLabel}px`,height:"20",width:"20",href:hi.avatar_link},null,8,_n)],8,tn)):fi.bar.index===_i?((0,ri.uX)(),(0,ri.CE)("image",{key:1,x:`${fi.bar.midPoint-10}px`,y:`${fi.bar.yLabel}px`,height:"20",width:"20",href:hi.avatar_link},null,8,In)):(0,ri.Q3)("v-if",!0)]))),128))]),title:(0,ri.k6)(fi=>[((0,ri.uX)(!0),(0,ri.CE)(ri.FK,null,(0,ri.pI)(ei.graphAuthors,(hi,_i)=>((0,ri.uX)(),(0,ri.CE)("tspan",{key:hi.position},[fi.bar.index===_i?((0,ri.uX)(),(0,ri.CE)("tspan",Vn,(0,yi.v_)(hi.name),1)):(0,ri.Q3)("v-if",!0)]))),128))]),_:1},8,["points","width","bar-color","text-color","text-alt-color"])])}function Zi(ei,ti){const ii=new Set(ei.split(","));return ti?ni=>ii.has(ni.toLowerCase()):ni=>ii.has(ni)}const un={},ls=[],ks=()=>{},En=()=>!1,qi=ei=>ei.charCodeAt(0)===111&&ei.charCodeAt(1)===110&&(ei.charCodeAt(2)>122||ei.charCodeAt(2)<97),sn=ei=>ei.startsWith("onUpdate:"),rs=Object.assign,hs=(ei,ti)=>{const ii=ei.indexOf(ti);ii>-1&&ei.splice(ii,1)},fs=Object.prototype.hasOwnProperty,yn=(ei,ti)=>fs.call(ei,ti),mn=Array.isArray,Mn=ei=>Wi(ei)==="[object Map]",pi=ei=>Wi(ei)==="[object Set]",rn=ei=>Wi(ei)==="[object Date]",dn=ei=>Wi(ei)==="[object RegExp]",pn=ei=>typeof ei=="function",Pn=ei=>typeof ei=="string",nn=ei=>typeof ei=="symbol",Ai=ei=>ei!==null&&typeof ei=="object",Ri=ei=>(Ai(ei)||pn(ei))&&pn(ei.then)&&pn(ei.catch),ki=Object.prototype.toString,Wi=ei=>ki.call(ei),an=ei=>Wi(ei).slice(8,-1),Fn=ei=>Wi(ei)==="[object Object]",en=ei=>Pn(ei)&&ei!=="NaN"&&ei[0]!=="-"&&""+parseInt(ei,10)===ei,Fi=Zi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Oi=null,zi=ei=>{const ti=Object.create(null);return ii=>ti[ii]||(ti[ii]=ei(ii))},Ti=/-(\w)/g,Yi=zi(ei=>ei.replace(Ti,(ti,ii)=>ii?ii.toUpperCase():"")),wn=/\B([A-Z])/g,Bi=zi(ei=>ei.replace(wn,"-$1").toLowerCase()),Qi=zi(ei=>ei.charAt(0).toUpperCase()+ei.slice(1)),Gi=zi(ei=>ei?`on${Qi(ei)}`:""),On=(ei,ti)=>!Object.is(ei,ti),Xn=(ei,...ti)=>{for(let ii=0;ii<ei.length;ii++)ei[ii](...ti)},cs=(ei,ti,ii,ni=!1)=>{Object.defineProperty(ei,ti,{configurable:!0,enumerable:!1,writable:ni,value:ii})},Vs=ei=>{const ti=parseFloat(ei);return isNaN(ti)?ei:ti},uo=ei=>{const ti=Pn(ei)?Number(ei):NaN;return isNaN(ti)?ei:ti};let fo;const go=()=>fo||(fo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof __webpack_require__.g<"u"?__webpack_require__.g:{}),Po=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;function Jo(ei){return Po.test(ei)?`__props.${ei}`:`__props[${JSON.stringify(ei)}]`}const ca={TEXT:1,1:"TEXT",CLASS:2,2:"CLASS",STYLE:4,4:"STYLE",PROPS:8,8:"PROPS",FULL_PROPS:16,16:"FULL_PROPS",NEED_HYDRATION:32,32:"NEED_HYDRATION",STABLE_FRAGMENT:64,64:"STABLE_FRAGMENT",KEYED_FRAGMENT:128,128:"KEYED_FRAGMENT",UNKEYED_FRAGMENT:256,256:"UNKEYED_FRAGMENT",NEED_PATCH:512,512:"NEED_PATCH",DYNAMIC_SLOTS:1024,1024:"DYNAMIC_SLOTS",DEV_ROOT_FRAGMENT:2048,2048:"DEV_ROOT_FRAGMENT",HOISTED:-1,"-1":"HOISTED",BAIL:-2,"-2":"BAIL"},gi={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"NEED_HYDRATION",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"HOISTED",[-2]:"BAIL"},Si={ELEMENT:1,1:"ELEMENT",FUNCTIONAL_COMPONENT:2,2:"FUNCTIONAL_COMPONENT",STATEFUL_COMPONENT:4,4:"STATEFUL_COMPONENT",TEXT_CHILDREN:8,8:"TEXT_CHILDREN",ARRAY_CHILDREN:16,16:"ARRAY_CHILDREN",SLOTS_CHILDREN:32,32:"SLOTS_CHILDREN",TELEPORT:64,64:"TELEPORT",SUSPENSE:128,128:"SUSPENSE",COMPONENT_SHOULD_KEEP_ALIVE:256,256:"COMPONENT_SHOULD_KEEP_ALIVE",COMPONENT_KEPT_ALIVE:512,512:"COMPONENT_KEPT_ALIVE",COMPONENT:6,6:"COMPONENT"},$i={STABLE:1,1:"STABLE",DYNAMIC:2,2:"DYNAMIC",FORWARDED:3,3:"FORWARDED"},kn={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},Un=Zi("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"),Jn=null,Ys=2;function bo(ei,ti=0,ii=ei.length){if(ti=Math.max(0,Math.min(ti,ei.length)),ii=Math.max(0,Math.min(ii,ei.length)),ti>ii)return"";let ni=ei.split(/(\r?\n)/);const si=ni.filter((fi,hi)=>hi%2===1);ni=ni.filter((fi,hi)=>hi%2===0);let ai=0;const li=[];for(let fi=0;fi<ni.length;fi++)if(ai+=ni[fi].length+(si[fi]&&si[fi].length||0),ai>=ti){for(let hi=fi-Ys;hi<=fi+Ys||ii>ai;hi++){if(hi<0||hi>=ni.length)continue;const _i=hi+1;li.push(`${_i}${" ".repeat(Math.max(3-String(_i).length,0))}| ${ni[hi]}`);const ji=ni[hi].length,Mi=si[hi]&&si[hi].length||0;if(hi===fi){const Ki=ti-(ai-(ji+Mi)),on=Math.max(1,ii>ai?ji-Ki:ii-ti);li.push(" | "+" ".repeat(Ki)+"^".repeat(on))}else if(hi>fi){if(ii>ai){const Ki=Math.max(Math.min(ii-ai,ji),1);li.push(" | "+"^".repeat(Ki))}ai+=ji+Mi}}break}return li.join(`
%c\u{1F477}\u200D This is a development-only message. It will be removed in production.
`)}function lb(ei){return[ej(ei),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Jh;function AR(){Jh=new Set}function tj(ei,ti){if(ei&&!Jh.has(ti)){var ii;Jh.add(ti),(ii=console).warn.apply(ii,lb(ti))}}function cb(ei,ti){if(ei&&!Jh.has(ti)){var ii;Jh.add(ti),(ii=console).error.apply(ii,lb(ti))}}function TR(ei){var ti=!ei,ii=Object.prototype.toString.call(ei)==="[object Object]"&&!ei.addEventListener;cb(ti,["tippy() was passed","`"+String(ei)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),cb(ii,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var ub={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ij={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},pc=Object.assign({appendTo:Q0,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},ub,ij),nj=Object.keys(pc),sj=function(ti){var ii=Object.keys(ti);ii.forEach(function(ni){pc[ni]=ti[ni]})};function fb(ei){var ti=ei.plugins||[],ii=ti.reduce(function(ni,si){var ai=si.name,li=si.defaultValue;if(ai){var fi;ni[ai]=ei[ai]!==void 0?ei[ai]:(fi=pc[ai])!=null?fi:li}return ni},{});return Object.assign({},ei,ii)}function rj(ei,ti){var ii=ti?Object.keys(fb(Object.assign({},pc,{plugins:ti}))):nj,ni=ii.reduce(function(si,ai){var li=(ei.getAttribute("data-tippy-"+ai)||"").trim();if(!li)return si;if(ai==="content")si[ai]=li;else try{si[ai]=JSON.parse(li)}catch{si[ai]=li}return si},{});return ni}function db(ei,ti){var ii=Object.assign({},ti,{content:Y0(ti.content,[ei])},ti.ignoreAttributes?{}:rj(ei,ti.plugins));return ii.aria=Object.assign({},pc.aria,ii.aria),ii.aria={expanded:ii.aria.expanded==="auto"?ti.interactive:ii.aria.expanded,content:ii.aria.content==="auto"?ti.interactive?null:"describedby":ii.aria.content},ii}function LR(ei,ti){ei===void 0&&(ei={}),ti===void 0&&(ti=[]);var ii=Object.keys(ei);ii.forEach(function(ni){var si=ug(pc,Object.keys(ub)),ai=!V5(si,ni);ai&&(ai=ti.filter(function(li){return li.name===ni}).length===0),tj(ai,["`"+ni+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
</div>`;ni.find(".content-history-menu").remove(),ni.append(Hi(si)),ni.find(".dropdown").dropdown({action:"hide",apiSettings:{cache:!1,url:`${ei}/content-history/list?comment_id=${ii}`},saveRemoteData:!1,onHide(){Hi(this).dropdown("change values",null)},onChange(ai,li,fi){ai&&!fi.find("[data-history-is-deleted=1]").length&&US(ei,ii,ai,li)}})}async function Kb(){const ei=Hi("#issueIndex").val();if(!ei)return;const ti=Hi(".repository.issue .timeline-item.comment.first"),ii=Hi(".repository.issue .comment-list .comment");if(!ti.length&&!ii.length)return;const ni=Hi("#repolink").val(),si=`${VS}/${ni}/issues/${ei}`;try{const li=await(await(0,so.fG)(`${si}/content-history/overview`)).json();$b=li.i18n.textEdited,Ub=li.i18n.textDeleteFromHistory,Wb=li.i18n.textDeleteFromHistoryConfirm,Vb=li.i18n.textOptions,li.editedHistoryCountMap[0]&&ti.length&&zb(si,ti,"0");for(const[fi,hi]of Object.entries(li.editedHistoryCountMap)){if(fi==="0")continue;const _i=Hi(`#issuecomment-${fi}`);zb(si,_i,fi)}}catch(ai){console.error("Error:",ai)}}const{appSubUrl:Eg,notificationSettings:ih,enableTimeTracking:WS,assetVersionEncoded:zS}=window.config;function KS(){if(!WS)return;const ei=document.querySelectorAll(".active-stopwatch"),ti=document.querySelector(".active-stopwatch-popup");if(!ei.length||!ti)return;const ii=ei[0]?.getAttribute("data-seconds");ii&&Gb(parseInt(ii));for(const ai of ei)ai.removeAttribute("href"),pd(ai,{content:ti.cloneNode(!0),placement:"bottom-end",trigger:"click",maxWidth:"none",interactive:!0,hideOnClick:!0,theme:"default"});let ni=!1;const si=ai=>{ai<=0||!Number.isFinite(ai)||(ni=!0,setTimeout(()=>XS(si,ai),ai))};if(ih.EventSourceUpdateTime>0&&window.EventSource&&window.SharedWorker){const ai=new SharedWorker(`${__webpack_require__.p}js/eventsource.sharedworker.js?v=${zS}`,"notification-worker");ai.addEventListener("error",li=>{console.error("worker error",li)}),ai.port.addEventListener("messageerror",()=>{console.error("unable to deserialize message")}),ai.port.postMessage({type:"start",url:`${window.location.origin}${Eg}/user/events`}),ai.port.addEventListener("message",li=>{if(!li.data||!li.data.type){console.error("unknown worker message event",li);return}if(li.data.type==="stopwatches")Xb(JSON.parse(li.data.data));else if(li.data.type==="no-event-source")ni||si(ih.MinTimeout);else if(li.data.type==="error")console.error("worker port event error",li.data);else if(li.data.type==="logout"){if(li.data.data!=="here")return;ai.port.postMessage({type:"close"}),ai.port.close(),Ib()}else li.data.type==="close"&&(ai.port.postMessage({type:"close"}),ai.port.close())}),ai.port.addEventListener("error",li=>{console.error("worker port error",li)}),ai.port.start(),window.addEventListener("beforeunload",()=>{ai.port.postMessage({type:"close"}),ai.port.close()});return}si(ih.MinTimeout)}async function XS(ei,ti){await GS()?ti<ih.MaxTimeout&&(ti+=ih.TimeoutStep):ti=ih.MinTimeout,ei(ti)}async function GS(){const ei=await(0,so.fG)(`${Eg}/user/stopwatches`);if(!ei.ok)return console.error("Failed to fetch stopwatch data"),!1;const ti=await ei.json();return Xb(ti)}function Xb(ei){const ti=ei[0],ii=document.querySelectorAll(".active-stopwatch");if(!ti)(0,zn.y9)(ii);else{const{repo_owner_name:ni,repo_name:si,issue_index:ai,seconds:li}=ti,fi=`${Eg}/${ni}/${si}/issues/${ai}`;document.querySelector(".stopwatch-link")?.setAttribute("href",fi),document.querySelector(".stopwatch-commit")?.setAttribute("action",`${fi}/times/stopwatch/toggle`),document.querySelector(".stopwatch-cancel")?.setAttribute("action",`${fi}/times/stopwatch/cancel`);const hi=document.querySelector(".stopwatch-issue");hi&&(hi.textContent=`${ni}/${si}#${ai}`),Gb(li),(0,zn.fi)(ii)}return!!ei.length}function Gb(ei){if(!Number.isFinite(ei))return;const ti=new Date(Date.now()-ei*1e3).toISOString();for(const ii of document.querySelectorAll(".header-stopwatch-dot")){const ni=ii.querySelector(":scope > relative-time");if(ni)ni.setAttribute("datetime",ti);else{const si=document.createElement("relative-time");si.setAttribute("format","micro"),si.setAttribute("datetime",ti),si.setAttribute("lang","en-US"),si.setAttribute("title",""),ii.append(si)}}}function Qb(ei){return ei.split("/").map(encodeURIComponent).join("/")}function Yb(ei){return ei.endsWith("/")?ei.slice(0,-1):ei}function QS(ei){try{return Yb(new URL(ei).href).trim()===Yb(ei).trim()}catch{return!1}}const Jb=50;let Zb=[],bd,kg,e_;function YS(ei,ti){const ii=[""];let ni=0,si=0;const ai=ei.toLowerCase();for(;ni<ti.length&&si<ai.length;)ti[ni]===ai[si]?(ii.length%2!==0&&ii.push(""),ii[ii.length-1]+=ei[si],si++,ni++):(ii.length%2===0&&ii.push(""),ii[ii.length-1]+=ei[si],si++);return ni!==ti.length?[ei]:(si<ei.length&&(ii.length%2===0&&ii.push(""),ii[ii.length-1]+=ei.substring(si)),ii)}function JS(ei){let ti=0;for(let ii=0;ii<ei.length;ii++)ii%2===1&&(ti+=ei[ii].length*ei[ii].length);return ti}function ZS(ei,ti){let ii=[];if(ti){const ni=ti.toLowerCase();for(let si=0;si<ei.length;si++){const ai=YS(ei[si],ni);ai.length>1&&ii.push({matchResult:ai,matchWeight:JS(ai)})}ii.sort((si,ai)=>ai.matchWeight-si.matchWeight),ii=ii.slice(0,Jb)}else for(let ni=0;ni<ei.length&&ni<Jb;ni++)ii.push({matchResult:[ei[ni]],matchWeight:0});return ii}function t_(ei){const ti=bd.getAttribute("data-url-tree-link");kg.innerHTML="";const ii=ZS(Zb,ei);(0,zn.oi)(e_,!ii.length);for(const ni of ii){const si=document.createElement("tr"),ai=document.createElement("td"),li=document.createElement("a");li.setAttribute("href",`${ti}/${Qb(ni.matchResult.join(""))}`),li.innerHTML=(0,Io.JW)("octicon-file",16,"tw-mr-2"),si.append(ai),ai.append(li);for(const[fi,hi]of ni.matchResult.entries()){const _i=document.createElement("span");_i.textContent=hi,fi%2===1&&_i.classList.add("ui","text","red"),li.append(_i)}kg.append(si)}}async function eC(){Zb=await(await(0,so.fG)(bd.getAttribute("data-url-data-link"))).json(),t_(bd.value)}function tC(){bd=document.getElementById("repo-file-find-input"),bd&&(kg=document.querySelector("#repo-find-file-table tbody"),e_=document.getElementById("repo-find-file-no-result"),bd.addEventListener("input",()=>t_(bd.value)),eC())}function i_(){const ei=document.createElement("button");return ei.classList.add("code-copy","ui","button"),ei.innerHTML=(0,Io.JW)("octicon-copy"),ei}function iC(){const ei=document.querySelectorAll(".markup .code-block code");if(ei.length)for(const ti of ei){if(!ti.textContent)continue;const ii=i_();ii.setAttribute("data-clipboard-text",ti.textContent.replace(/\r?\n$/,"")),ti.after(ii)}}function tm(ei,ti){ei.classList.remove("is-loading");const ii=document.createElement("pre");ii.setAttribute("class","ui message error markup-block-error"),ii.textContent=ti.str||ti.message||String(ti),ei.before(ii),ei.setAttribute("data-render-done","true")}const{mermaidMaxSourceCharacters:Ag}=window.config,nC=`:root {color-scheme: normal}
body {margin: 0; padding: 0; overflow: hidden}
#mermaid {display: block; margin: 0 auto}
blockquote, dd, dl, figure, h1, h2, h3, h4, h5, h6, hr, p, pre {margin: 0}`;async function sC(){const ei=document.querySelectorAll(".markup code.language-mermaid");if(!ei.length)return;const{default:ti}=await __webpack_require__.e("mermaid").then(__webpack_require__.bind(__webpack_require__,"./node_modules/mermaid/dist/mermaid.core.mjs"));ti.initialize({startOnLoad:!1,theme:(0,na.g4)()?"dark":"neutral",securityLevel:"strict"});for(const ii of ei){const ni=ii.closest("pre");if(ni.hasAttribute("data-render-done"))continue;const si=ii.textContent;if(Ag>=0&&si.length>Ag){tm(ni,new Error(`Mermaid source of ${si.length} characters exceeds the maximum allowed length of ${Ag}.`));continue}try{await ti.parse(si)}catch(ai){tm(ni,ai);continue}try{const{svg:ai}=await ti.render("mermaid",si),li=document.createElement("iframe");li.classList.add("markup-render","tw-invisible"),li.srcdoc=`<html><head><style>${nC}</style></head><body>${ai}</body></html>`;const fi=document.createElement("div");fi.classList.add("mermaid-block","is-loading","tw-hidden"),fi.append(li);const hi=i_();hi.setAttribute("data-clipboard-text",si),fi.append(hi),li.addEventListener("load",()=>{ni.replaceWith(fi),fi.classList.remove("tw-hidden"),li.style.height=`${li.contentWindow.document.body.clientHeight}px`,setTimeout(()=>{fi.classList.remove("is-loading"),li.classList.remove("tw-invisible")},0)}),document.body.append(fi)}catch(ai){tm(ni,ai)}}}function rC(ei){return ei.classList.contains("is-loading")?ei:ei.closest("pre")}async function oC(){const ei=document.querySelectorAll(".markup code.language-math");if(!ei.length)return;const[{default:ti}]=await Promise.all([Promise.all([__webpack_require__.e("katex-"),__webpack_require__.e("katex")]).then(__webpack_require__.bind(__webpack_require__,"./node_modules/katex/dist/katex.mjs")),Promise.all([__webpack_require__.e("katex-"),__webpack_require__.e("katex")]).then(__webpack_require__.bind(__webpack_require__,"./node_modules/katex/dist/katex.css"))]),ii=1e3,ni=25,si=1e3;for(const ai of ei){const li=rC(ai);if(li.hasAttribute("data-render-done"))continue;const fi=ai.textContent;if(fi.length>ii){tm(li,new Error(`Math source of ${fi.length} characters exceeds the maximum allowed length of ${ii}.`));continue}const hi=ai.classList.contains("display"),_i=hi?"p":"span";try{const ji=document.createElement(_i);ti.render(fi,ji,{maxSize:ni,maxExpand:si,displayMode:hi}),li.replaceWith(ji)}catch(ji){tm(li,ji)}}}async function aC(){const ei=document.querySelectorAll(".asciinema-player-container");if(!ei.length)return;const[ti]=await Promise.all([__webpack_require__.e("asciinema-player").then(__webpack_require__.bind(__webpack_require__,"./node_modules/asciinema-player/dist/index.js")),__webpack_require__.e("asciinema-player").then(__webpack_require__.bind(__webpack_require__,"./node_modules/asciinema-player/dist/bundle/asciinema-player.css"))]);for(const ii of ei)ti.create(ii.getAttribute("data-asciinema-player-src"),ii,{poster:"npt:1:0:0"})}const n_=ei=>ei.preventDefault();function lC(){for(const ei of document.querySelectorAll(".markup[data-can-edit=true]")||[]){const ti=ei.parentNode,ii=ei.querySelectorAll(".task-list-item input[type=checkbox]");for(const ni of ii){if(ni.hasAttribute("data-editable"))return;ni.setAttribute("data-editable","true"),ni.addEventListener("input",async()=>{const si=ni.checked?"x":" ",ai=parseInt(ni.getAttribute("data-source-position"))+1,li=ti.querySelector(".raw-content"),fi=li.textContent,hi=new TextEncoder,_i=hi.encode(fi);if(_i[ai-1]!=="[".codePointAt(0)||_i[ai]!==" ".codePointAt(0)&&_i[ai]!=="x".codePointAt(0)||_i[ai+1]!=="]".codePointAt(0))throw ni.checked=!ni.checked,new Error(`Expected position to be space or x and surrounded by brackets, but it's not: position=${ai}`);_i.set(hi.encode(si),ai);const ji=new TextDecoder().decode(_i);if(ji!==fi){for(const Mi of ii)Mi.addEventListener("click",n_);try{const Mi=ti.querySelector(".edit-content-zone"),Ki=Mi.getAttribute("data-update-url"),on=Mi.getAttribute("data-context"),hn=new FormData;hn.append("ignore_attachments","true"),hn.append("content",ji),hn.append("context",on),await(0,so.LO)(Ki,{data:hn}),li.textContent=ji}catch(Mi){ni.checked=!ni.checked,console.error(Mi)}for(const Mi of ii)Mi.removeEventListener("click",n_)}})}for(const ni of ii)ni.disabled=!1}}function Zm(){sC(),oC(),iC(),aC()}function s_(){lC()}async function cC(){const ei=document.querySelectorAll(".pdf-content");if(!ei.length)return;const ti=await __webpack_require__.e("pdfobject").then(__webpack_require__.t.bind(__webpack_require__,"./node_modules/pdfobject/pdfobject.js",19));for(const ii of ei){const ni=ii.getAttribute("data-src"),si=ii.getAttribute("data-fallback-button-text");ti.embed(ni,ii,{fallbackLink:Ua`
_Originally posted by @${ni} in ${si}_`),ai.modal("show"),ei.preventDefault()})}function BE(){Hi(".toggle-wip a, .toggle-wip button").on("click",async ei=>{ei.preventDefault();const ti=ei.currentTarget.closest(".toggle-wip"),ii=ti.getAttribute("data-title"),ni=ti.getAttribute("data-wip-prefix"),si=ti.getAttribute("data-update-url");try{const ai=new URLSearchParams;if(ai.append("title",ii?.startsWith(ni)?ii.slice(ni.length).trim():`${ni.trim()} ${ii}`),!(await(0,so.LO)(si,{data:ai})).ok)throw new Error("Failed to toggle WIP status");window.location.reload()}catch(ai){console.error(ai)}})}function HE(){const ei=document.querySelector("#issue-title-display"),ti=document.querySelector("#issue-title-editor");if(!ti)return;const ii=ti.querySelector("input"),ni=ii.getAttribute("data-old-title");ei.querySelector("#issue-title-edit-show").addEventListener("click",()=>{(0,zn.y9)(ei),(0,zn.y9)("#pull-desc-display"),(0,zn.fi)(ti),(0,zn.fi)("#pull-desc-editor"),ii.value.trim()||(ii.value=ni),ii.focus()}),ti.querySelector(".ui.cancel.button").addEventListener("click",()=>{(0,zn.y9)(ti),(0,zn.y9)("#pull-desc-editor"),(0,zn.fi)(ei),(0,zn.fi)("#pull-desc-display")});const ai=document.querySelector("#pull-desc-editor")?.getAttribute("data-target-update-url"),li=ti.querySelector(".ui.primary.button");li.addEventListener("click",async()=>{const fi=ii.value.trim();try{if(fi&&fi!==ni){const hi=await(0,so.LO)(li.getAttribute("data-update-url"),{data:new URLSearchParams({title:fi})});if(!hi.ok)throw new Error(`Failed to update issue title: ${hi.statusText}`)}if(ai){const hi=document.querySelector("#pull-target-branch").getAttribute("data-branch"),_i=document.querySelector("#branch_target").textContent;if(hi!==_i){const ji=await(0,so.LO)(ai,{data:new URLSearchParams({target_branch:hi})});if(!ji.ok)throw new Error(`Failed to update PR target branch: ${ji.statusText}`)}}window.location.reload()}catch(hi){console.error(hi),pl(hi.message)}})}function $E(){document.querySelector("#branch-select")?.addEventListener("click",ei=>{const ti=ei.target.closest(".item[data-branch]");if(!ti)return;const ii=document.querySelector("#pull-target-branch"),ni=ii.getAttribute("data-basename"),si=ti.getAttribute("data-branch"),ai=ii.getAttribute("data-branch");ii.textContent=ii.textContent.replace(`${ni}:${ai}`,`${ni}:${si}`),ii.setAttribute("data-branch",si)})}function VE(ei){const ti={},ii=document.getElementById("status-button");ii&&(ti.onContentChanged=ni=>{const si=ii.getAttribute(ni.value().trim()?"data-status-and-comment":"data-status");ii.textContent=si}),Of(ei.find(".combo-markdown-editor"),ti)}function UE(ei){const ti=ei.find(".combo-editor-dropzone"),ii=async ni=>{const si=ni.find(".form-field-dropzone"),ai=ni.find(".form-field-real"),li=ni.find(".combo-markdown-editor"),fi=await Of(li,{onContentChanged:hi=>{ai.val(hi.value())}});ai.on("focus",async()=>{(0,zn.fi)(ei.find(".combo-editor-dropzone .form-field-real")),(0,zn.y9)(ei.find(".combo-editor-dropzone .combo-markdown-editor")),(0,zn.y9)(ei.find(".combo-editor-dropzone .form-field-dropzone")),(0,zn.y9)(ai),(0,zn.fi)(li),(0,zn.fi)(si),await fi.switchToUserPreference(),fi.focus()})};for(const ni of ti)ii(Hi(ni))}function WE(){if(document.querySelector(".archived-label-hint"))for(const ei of document.querySelectorAll("[data-is-archived]"))(0,zn.oi)(ei,ei.classList.contains("checked"))}function zE(){for(const ei of document.querySelectorAll(".js-toggle-commit-body"))ei.addEventListener("click",function(ti){ti.preventDefault();const ii=this.getAttribute("aria-expanded")==="true";(0,zn.oi)(this.parentElement.querySelector(".commit-body")),this.setAttribute("aria-expanded",String(!ii))})}function KE(){for(const ei of document.querySelectorAll('[data-tippy="commit-statuses"]')){const ti=document.querySelector(".repository.file.list")||document.querySelector(".repository.diff");pd(ei,{content:ei.nextElementSibling,placement:ti?"top-start":"bottom-start",interactive:!0,role:"dialog",theme:"box-with-header"})}}const{appSubUrl:ny}=window.config;function XE(){const ei=document.getElementById("manage_topic");if(!ei)return;const ti=document.getElementById("topic_edit"),ii=document.getElementById("repo-topics"),ni=ti.querySelector(".ui.dropdown");let si;ei.addEventListener("click",()=>{(0,zn.y9)(ii),(0,zn.fi)(ti),ni.querySelector("input.search").focus()}),document.querySelector("#cancel_topic_edit").addEventListener("click",()=>{si?.hideToast(),(0,zn.y9)(ti),(0,zn.fi)(ii),ei.focus()}),document.getElementById("save_topic").addEventListener("click",async ai=>{si?.hideToast();const li=ti.querySelector("input[name=topics]").value,fi=new FormData;fi.append("topics",li);const hi=await(0,so.LO)(ai.target.getAttribute("data-link"),{data:fi});if(hi.ok){if((await hi.json()).status==="ok"){if((0,zn.xP)(ii,".repo-topic",ji=>ji.remove()),li.length){const ji=li.split(",");ji.sort();for(const Mi of ji){const Ki=document.createElement("a");Ki.classList.add("repo-topic","ui","large","label"),Ki.href=`${ny}/explore/repos?q=${encodeURIComponent(Mi)}&topic=1`,Ki.textContent=Mi,ei.parentNode.insertBefore(Ki,ei)}}(0,zn.y9)(ti),(0,zn.fi)(ii)}}else if(hi.status===422){const _i=await hi.json();if(si=pl(_i.message,{duration:5e3}),_i.invalidTopics&&_i.invalidTopics.length>0){const{invalidTopics:ji}=_i,Mi=(0,zn.xP)(ni,"a.ui.label");for(const[Ki,on]of li.split(",").entries())ji.includes(on)&&(Mi[Ki].classList.remove("green"),Mi[Ki].classList.add("red"))}}}),Hi(ni).dropdown({allowAdditions:!0,forceSelection:!1,fullTextSearch:"exact",fields:{name:"description",value:"data-value"},saveRemoteData:!1,label:{transition:"horizontal flip",duration:200,variation:!1},apiSettings:{url:`${ny}/explore/topics/search?q={query}`,throttle:500,cache:!1,onResponse(ai){const li={success:!1,results:[]},fi=(0,na.Kq)(this.urlData.query.trim());let hi=!1;const _i=[];for(const ji of(0,zn.xP)(ni,"a.ui.label.visible"))_i.push(ji.getAttribute("data-value"));if(ai.topics){let ji=!1;for(let Mi=0;Mi<ai.topics.length;Mi++)_i.includes(ai.topics[Mi].topic_name)||(ai.topics[Mi].topic_name.toLowerCase()===fi.toLowerCase()&&(hi=!0),li.results.push({description:ai.topics[Mi].topic_name,"data-value":ai.topics[Mi].topic_name}),ji=!0);li.success=ji}return fi.length>0&&!hi?(li.success=!0,li.results.unshift({description:fi,"data-value":fi})):fi.length>0&&hi&&li.results.sort((ji,Mi)=>ji.description.toLowerCase()===fi.toLowerCase()?-1:Mi.description.toLowerCase()===fi.toLowerCase()?1:ji.description>Mi.description?-1:ji.description<Mi.description?1:0),li}},onLabelCreate(ai){return ai=ai.toLowerCase().trim(),this.attr("data-value",ai).contents().first().replaceWith(ai),Hi(this)},onAdd(ai,li,fi){ai=ai.toLowerCase().trim(),fi[0].setAttribute("data-value",ai),fi[0].setAttribute("data-text",ai)}})}function GE(){function ei(ti){const ii=Hi(this);Hi("#form-uid").val(ii.data("uid")),Hi("#form-email").val(ii.data("email")),Hi("#form-primary").val(ii.data("primary")),Hi("#form-activate").val(ii.data("activate")),Hi("#change-email-modal").modal("show"),ti.preventDefault()}Hi(".link-email-action").on("click",ei)}const{appSubUrl:QE}=window.config;function Hg(){Number(document.getElementById("security_protocol")?.value)>0?(0,zn.fi)(".has-tls"):(0,zn.y9)(".has-tls")}function YE(){if(!document.querySelector(".page-content.admin"))return;u_(),(Hi(".admin.new.user").length>0||Hi(".admin.edit.user").length>0)&&document.getElementById("login_type")?.addEventListener("change",function(){this.value?.substring(0,1)==="0"?(document.getElementById("user_name")?.removeAttribute("disabled"),document.getElementById("login_name")?.removeAttribute("required"),(0,zn.y9)(".non-local"),(0,zn.fi)(".local"),document.getElementById("user_name")?.focus(),this.getAttribute("data-password")==="required"&&document.getElementById("password")?.setAttribute("required","required")):(document.querySelector(".admin.edit.user")&&document.getElementById("user_name")?.setAttribute("disabled","disabled"),document.getElementById("login_name")?.setAttribute("required","required"),(0,zn.fi)(".non-local"),(0,zn.y9)(".local"),document.getElementById("login_name")?.focus(),document.getElementById("password")?.removeAttribute("required"))});function ei(){const si=document.querySelectorAll(".search-page-size");if(document.getElementById("use_paged_search").checked){(0,zn.fi)(".search-page-size");for(const ai of si)ai.querySelector("input")?.setAttribute("required","required")}else{(0,zn.y9)(".search-page-size");for(const ai of si)ai.querySelector("input")?.removeAttribute("required")}}function ti(si){(0,zn.y9)(".open_id_connect_auto_discovery_url, .oauth2_use_custom_url");for(const li of document.querySelectorAll(".open_id_connect_auto_discovery_url input[required]"))li.removeAttribute("required");const ai=document.getElementById("oauth2_provider").value;switch(ai){case"openidConnect":document.querySelector(".open_id_connect_auto_discovery_url input").setAttribute("required","required"),(0,zn.fi)(".open_id_connect_auto_discovery_url");break;default:{const li=document.querySelector(`#${ai}_customURLSettings`);if(!li)break;const fi=li.getAttribute("data-available")==="true",hi=li.getAttribute("data-required")==="true";fi&&(0,zn.fi)(".oauth2_use_custom_url"),hi&&(document.querySelector("#oauth2_use_custom_url").checked=!0);break}}ii(si)}function ii(si){const ai=document.getElementById("oauth2_provider").value;(0,zn.y9)(".oauth2_use_custom_url_field");for(const fi of document.querySelectorAll(".oauth2_use_custom_url_field input[required]"))fi.removeAttribute("required");if(document.querySelector(`#${ai}_customURLSettings`)&&document.getElementById("oauth2_use_custom_url").checked)for(const fi of["token_url","auth_url","profile_url","email_url","tenant"]){si&&(document.getElementById(`oauth2_${fi}`).value=document.getElementById(`${ai}_${fi}`).value);const hi=document.getElementById(`${ai}_${fi}`);if(hi&&hi.getAttribute("data-available")==="true"){for(const _i of document.querySelectorAll(`.oauth2_${fi} input`))_i.setAttribute("required","required");(0,zn.fi)(`.oauth2_${fi}`)}}}function ni(){(0,zn.oi)(document.getElementById("ldap-group-options"),Hi(".js-ldap-group-toggle")[0].checked)}if(document.querySelector(".admin.new.authentication")&&(document.getElementById("auth_type")?.addEventListener("change",function(){(0,zn.y9)(".ldap, .dldap, .smtp, .pam, .oauth2, .has-tls, .search-page-size, .sspi");for(const ai of document.querySelectorAll(".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]"))ai.removeAttribute("required");document.querySelector(".binddnrequired")?.classList.remove("required");const si=this.value;switch(si){case"2":(0,zn.fi)(".ldap");for(const ai of document.querySelectorAll(".binddnrequired input, .ldap div.required:not(.dldap) input"))ai.setAttribute("required","required");document.querySelector(".binddnrequired")?.classList.add("required");break;case"3":(0,zn.fi)(".smtp"),(0,zn.fi)(".has-tls");for(const ai of document.querySelectorAll(".smtp div.required input, .has-tls"))ai.setAttribute("required","required");break;case"4":(0,zn.fi)(".pam");for(const ai of document.querySelectorAll(".pam input"))ai.setAttribute("required","required");break;case"5":(0,zn.fi)(".dldap");for(const ai of document.querySelectorAll(".dldap div.required:not(.ldap) input"))ai.setAttribute("required","required");break;case"6":(0,zn.fi)(".oauth2");for(const ai of document.querySelectorAll(".oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input"))ai.setAttribute("required","required");ti(!0);break;case"7":(0,zn.fi)(".sspi");for(const ai of document.querySelectorAll(".sspi div.required input"))ai.setAttribute("required","required");break}(si==="2"||si==="5")&&(Hg(),ni()),si==="2"&&ei()}),Hi("#auth_type").trigger("change"),document.getElementById("security_protocol")?.addEventListener("change",Hg),document.getElementById("use_paged_search")?.addEventListener("change",ei),document.getElementById("oauth2_provider")?.addEventListener("change",()=>ti(!0)),document.getElementById("oauth2_use_custom_url")?.addEventListener("change",()=>ii(!0)),Hi(".js-ldap-group-toggle").on("change",ni)),document.querySelector(".admin.edit.authentication")){const si=document.getElementById("auth_type")?.value;si==="2"||si==="5"?(document.getElementById("security_protocol")?.addEventListener("change",Hg),Hi(".js-ldap-group-toggle").on("change",ni),ni(),si==="2"&&document.getElementById("use_paged_search")?.addEventListener("change",ei)):si==="6"&&(document.getElementById("oauth2_provider")?.addEventListener("change",()=>ti(!0)),document.getElementById("oauth2_use_custom_url")?.addEventListener("change",()=>ii(!1)),ti(!1))}if(document.querySelector(".admin.authentication")&&Hi("#auth_name").on("input",function(){document.getElementById("oauth2-callback-url").textContent=`${window.location.origin}${QE}/user/oauth2/${encodeURIComponent(this.value)}/callback`}).trigger("input"),document.querySelector(".admin.notice")){const si=document.getElementById("detail-modal");Hi(".view-detail").on("click",function(){const li=this.closest("tr").querySelector(".notice-description").textContent;return si.querySelector(".content pre").textContent=li,Hi(si).modal("show"),!1});const ai=document.querySelectorAll(".select.table .ui.checkbox input");Hi(".select.action").on("click",function(){switch(Hi(this).data("action")){case"select-all":for(const li of ai)li.checked=!0;break;case"deselect-all":for(const li of ai)li.checked=!1;break;case"inverse":for(const li of ai)li.checked=!li.checked;break}}),document.getElementById("delete-selection")?.addEventListener("click",async function(li){li.preventDefault(),this.classList.add("is-loading","disabled");const fi=new FormData;for(const hi of ai)hi.checked&&fi.append("ids[]",hi.closest(".ui.checkbox").getAttribute("data-id"));await(0,so.LO)(this.getAttribute("data-link"),{data:fi}),window.location.href=this.getAttribute("data-redirect")})}}const{appSubUrl:JE}=window.config;function ZE(){const ei=Hi("#repo_template"),ti=function(){const ni=Hi("#template_units"),si=Hi("#non_template");ei.val()!==""&&ei.val()!=="0"?((0,zn.fi)(ni),(0,zn.y9)(si)):((0,zn.y9)(ni),(0,zn.fi)(si))};ei.on("change",ti),ti();const ii=function(){Hi("#repo_template_search").dropdown({apiSettings:{url:`${JE}/repo/search?q={query}&template=true&priority_owner_id=${Hi("#uid").val()}`,onResponse(ni){const si={success:!0,results:[]};return si.results.push({name:"",value:""}),Hi.each(ni.data,(ai,li)=>{si.results.push({name:Ua(li.repository.full_name),value:li.repository.id})}),si},cache:!1},fullTextSearch:!0})};Hi("#uid").on("change",ii),ii()}const ek=/^#(L|n)([1-9][0-9]*)$/,tk=/^#(L[1-9][0-9]*)-(L[1-9][0-9]*)$/;function sy(ei){window.history.pushState?window.history.pushState(null,null,ei):window.location.hash=ei}function $g(){return!!document.querySelector("div.blame")}function ry(){return document.querySelectorAll(`.code-view td.lines-code${$g()?".blame-code":""}`)}function Vg(ei,ti,ii){for(const _i of ei)_i.closest("tr").classList.remove("active");const ni=document.querySelector("a.ref-in-new-issue"),si=document.querySelector("a.copy-line-permalink"),ai=document.querySelector("a.view_git_blame"),li=function(_i){if(!ni)return;const ji=ni.getAttribute("data-url-issue-new"),Mi=ni.getAttribute("data-url-param-body-link"),Ki=`${(0,na.oK)(Mi)}#${_i}`;ni.setAttribute("href",`${ji}?body=${encodeURIComponent(Ki)}`)},fi=function(_i){if(!ai)return;let ji=ai.getAttribute("href");ji=`${ji.replace(/#L\d+$|#L\d+-L\d+$/,"")}`,_i.length!==0&&(ji=`${ji}#${_i}`),ai.setAttribute("href",ji)},hi=function(_i){if(!si)return;let ji=si.getAttribute("data-url");ji=`${ji.replace(/#L\d+$|#L\d+-L\d+$/,"")}#${_i}`,si.setAttribute("data-url",ji)};if(ii){let _i=parseInt(ti[0].getAttribute("rel").slice(1)),ji=parseInt(ii[0].getAttribute("rel").slice(1)),Mi;if(_i!==ji){_i>ji&&(Mi=_i,_i=ji,ji=Mi);const Ki=[];for(let on=_i;on<=ji;on++)Ki.push(`[rel=L${on}]`);ei.filter(Ki.join(",")).each(function(){this.closest("tr").classList.add("active")}),sy(`#L${_i}-L${ji}`),li(`L${_i}-L${ji}`),fi(`L${_i}-L${ji}`),hi(`L${_i}-L${ji}`);return}}ti[0].closest("tr").classList.add("active"),sy(`#${ti[0].getAttribute("rel")}`),li(ti[0].getAttribute("rel")),fi(ti[0].getAttribute("rel")),hi(ti[0].getAttribute("rel"))}function Ug(){const ei=document.querySelector(".code-line-menu");if(!ei)return;for(const si of document.querySelectorAll(".code-line-button"))si.remove();const ii=document.querySelector(".code-view tr.active").querySelector("td.lines-num"),ni=document.createElement("button");ni.classList.add("code-line-button","ui","basic","button"),ni.innerHTML=(0,Io.JW)("octicon-kebab-horizontal"),ii.prepend(ni),ni.closest(".code-view").append(ei.cloneNode(!0)),pd(ni,{theme:"menu",trigger:"click",hideOnClick:!0,content:ei,placement:"right-start",interactive:!0,onShow:si=>{si.popper.addEventListener("click",()=>{si.hide()},{once:!0})}})}function ik(){Hi(".code-view .lines-num").length>0&&(Hi(document).on("click",".lines-num span",function(ei){const ti=ry(),ii=Array.from(ti).filter(si=>si.matches(`[rel=${this.getAttribute("id")}]`));let ni;ei.shiftKey&&(ni=Array.from(ti).filter(si=>si.closest("tr").classList.contains("active"))),Vg(Hi(ti),Hi(ii),ni?Hi(ni):null),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty(),Ug()}),Hi(window).on("hashchange",()=>{let ei=window.location.hash.match(tk);const ti=Hi(ry());let ii;if(ei&&(ii=ti.filter(`[rel=${ei[1]}]`),ii.length)){Vg(ti,ii,ti.filter(`[rel=${ei[2]}]`)),$g()||Ug(),Hi("html, body").scrollTop(ii.offset().top-200);return}ei=window.location.hash.match(ek),ei&&(ii=ti.filter(`[rel=L${ei[2]}]`),ii.length&&(Vg(ti,ii),$g()||Ug(),Hi("html, body").scrollTop(ii.offset().top-200)))}).trigger("hashchange")),Hi(document).on("click",".fold-file",({currentTarget:ei})=>{EC(ei.closest(".file-content"),ei)}),Hi(document).on("click",".copy-line-permalink",async({currentTarget:ei})=>{await Zh((0,na.oK)(ei.getAttribute("data-url")))})}function nk(){document.getElementById("ssh-key-content")?.addEventListener("input",function(){const ei=this.value.split(" "),ti=document.getElementById("ssh-key-title");!ti.value&&ei.length===3&&ei[2]!==""&&(ti.value=ei[2])})}function sk(){if(!document.querySelectorAll(".user.settings.profile").length)return;const ei=document.getElementById("username");ei&&ei.addEventListener("input",function(){const ti=document.getElementById("name-change-prompt"),ii=document.getElementById("name-change-redirect-prompt");this.value.toLowerCase()!==this.getAttribute("data-name").toLowerCase()?((0,zn.fi)(ti),(0,zn.fi)(ii)):((0,zn.y9)(ti),(0,zn.y9)(ii))})}async function rk(ei){ei.preventDefault();const ti=ei.target.closest("a.archive-link[href]"),ii=ti.closest(".ui.dropdown")??ti;ii.classList.add("is-loading","loading-icon-2px");try{for(let ni=0;;ni++){const si=await(0,so.LO)(ti.href);if(!si.ok)throw new Error(`Invalid server response: ${si.status}`);if((await si.json()).complete)break;await(0,na.yy)(Math.min((ni+1)*750,2e3))}window.location.href=ti.href}catch(ni){console.error(ni),pl(`Failed to download the archive: ${ni}`,{duration:2500})}finally{ii.classList.remove("is-loading","loading-icon-2px")}}function ok(){(0,zn.jB)("a.archive-link[href]",ei=>ei.addEventListener("click",rk))}function ak(){const ei=Hi("#repo-clone-ssh"),ti=Hi("#repo-clone-https"),ii=Hi("#repo-clone-url");!ei.length&&!ti.length||!ii.length||(ei.on("click",()=>{localStorage.setItem("repo-clone-protocol","ssh"),window.updateCloneStates()}),ti.on("click",()=>{localStorage.setItem("repo-clone-protocol","https"),window.updateCloneStates()}),ii.on("focus",()=>{ii.trigger("select")}))}function lk(ei){Hi(ei).each(function(){const ti=Hi(this);ti.find(".reference.column").on("click",function(){return(0,zn.y9)(ti.find(".scrolling.reference-list-menu")),(0,zn.fi)(Hi(Hi(this).data("target"))),!1})})}function ck(ei){const ti=Hi(ei);ti.length&&ti.dropdown({fullTextSearch:"exact",selectOnKeydown:!1,onChange(ii,ni,si){si[0].getAttribute("data-url")&&(window.location.href=si[0].getAttribute("data-url"))},message:{noResults:ti[0].getAttribute("data-no-results")}})}function uk(){const ei=document.getElementById("repo_migrating");if(!ei)return;document.getElementById("repo_migrating_retry")?.addEventListener("click",fk);const ti=ei.getAttribute("data-migrating-repo-link"),ii=async()=>{const si=await(0,so.fG)(`${ti}/-/migrate/status`);if(si.status!==200)return!0;const ai=await si.json();return ai.message&&(document.getElementById("repo_migrating_progress_message").textContent=ai.message),ai.status===4?(window.location.reload(),!1):ai.status===3?((0,zn.y9)("#repo_migrating_progress"),(0,zn.y9)("#repo_migrating"),(0,zn.fi)("#repo_migrating_retry"),(0,zn.fi)("#repo_migrating_failed"),(0,zn.fi)("#repo_migrating_failed_image"),document.getElementById("repo_migrating_failed_error").textContent=ai.message,!1):!0},ni=async()=>{let si=!0;try{si=await ii()}finally{si&&setTimeout(ni,2e3)}};ni()}async function fk(ei){await(0,so.LO)(ei.target.getAttribute("data-migrating-task-retry-url")),window.location.reload()}var dk=__webpack_require__("./node_modules/brace-expansion/index.js");const hk=1024*64,op=ei=>{if(typeof ei!="string")throw new TypeError("invalid pattern");if(ei.length>hk)throw new TypeError("pattern is too long")},mk={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},nm=ei=>ei.replace(/[[\]\\-]/g,"\\$&"),pk=ei=>ei.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),oy=ei=>ei.join(""),gk=(ei,ti)=>{const ii=ti;if(ei.charAt(ii)!=="[")throw new Error("not in a brace expression");const ni=[],si=[];let ai=ii+1,li=!1,fi=!1,hi=!1,_i=!1,ji=ii,Mi="";e:for(;ai<ei.length;){const gn=ei.charAt(ai);if((gn==="!"||gn==="^")&&ai===ii+1){_i=!0,ai++;continue}if(gn==="]"&&li&&!hi){ji=ai+1;break}if(li=!0,gn==="\\"&&!hi){hi=!0,ai++;continue}if(gn==="["&&!hi){for(const[es,[Wn,Gn,Dn]]of Object.entries(mk))if(ei.startsWith(es,ai)){if(Mi)return["$.",!1,ei.length-ii,!0];ai+=es.length,Dn?si.push(Wn):ni.push(Wn),fi=fi||Gn;continue e}}if(hi=!1,Mi){gn>Mi?ni.push(nm(Mi)+"-"+nm(gn)):gn===Mi&&ni.push(nm(gn)),Mi="",ai++;continue}if(ei.startsWith("-]",ai+1)){ni.push(nm(gn+"-")),ai+=2;continue}if(ei.startsWith("-",ai+1)){Mi=gn,ai+=2;continue}ni.push(nm(gn)),ai++}if(ji<ai)return["",!1,0,!1];if(!ni.length&&!si.length)return["$.",!1,ei.length-ii,!0];if(si.length===0&&ni.length===1&&/^\\?.$/.test(ni[0])&&!_i){const gn=ni[0].length===2?ni[0].slice(-1):ni[0];return[pk(gn),!1,ji-ii,!1]}const Ki="["+(_i?"^":"")+oy(ni)+"]",on="["+(_i?"":"^")+oy(si)+"]";return[ni.length&&si.length?"("+Ki+"|"+on+")":ni.length?Ki:on,fi,ji-ii,!0]},sm=(ei,{windowsPathsNoEscape:ti=!1}={})=>ti?ei.replace(/\[([^\/\\])\]/g,"$1"):ei.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),vk=new Set(["!","?","+","*","@"]),ay=ei=>vk.has(ei),bk="(?!(?:^|/)\\.\\.?(?:$|/))",ap="(?!\\.)",_k=new Set(["[","."]),yk=new Set(["..","."]),wk=new Set("().*{}+?[]^$\\!"),xk=ei=>ei.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Wg="[^/]",ly=Wg+"*?",cy=Wg+"+?",$l=class $l{constructor(ti,ii,ni={}){Vl(this,gp);Vl(this,lm);vl(this,"type");Vl(this,gl,void 0);Vl(this,jl,void 0);Vl(this,af,!1);Vl(this,qa,[]);Vl(this,il,void 0);Vl(this,Df,void 0);Vl(this,yd,void 0);Vl(this,Ff,!1);Vl(this,Du,void 0);Vl(this,wd,void 0);Vl(this,am,!1);this.type=ti,ti&&Qa(this,jl,!0),Qa(this,il,ii),Qa(this,gl,Wr(this,il)?Wr(Wr(this,il),gl):this),Qa(this,Du,Wr(this,gl)===this?ni:Wr(Wr(this,gl),Du)),Qa(this,yd,Wr(this,gl)===this?[]:Wr(Wr(this,gl),yd)),ti==="!"&&!Wr(Wr(this,gl),Ff)&&Wr(this,yd).push(this),Qa(this,Df,Wr(this,il)?Wr(Wr(this,il),qa).length:0)}get hasMagic(){if(Wr(this,jl)!==void 0)return Wr(this,jl);for(const ti of Wr(this,qa))if(typeof ti!="string"&&(ti.type||ti.hasMagic))return Qa(this,jl,!0);return Wr(this,jl)}toString(){return Wr(this,wd)!==void 0?Wr(this,wd):this.type?Qa(this,wd,this.type+"("+Wr(this,qa).map(ti=>String(ti)).join("|")+")"):Qa(this,wd,Wr(this,qa).map(ti=>String(ti)).join(""))}push(...ti){for(const ii of ti)if(ii!==""){if(typeof ii!="string"&&!(ii instanceof $l&&Wr(ii,il)===this))throw new Error("invalid part: "+ii);Wr(this,qa).push(ii)}}toJSON(){const ti=this.type===null?Wr(this,qa).slice().map(ii=>typeof ii=="string"?ii:ii.toJSON()):[this.type,...Wr(this,qa).map(ii=>ii.toJSON())];return this.isStart()&&!this.type&&ti.unshift([]),this.isEnd()&&(this===Wr(this,gl)||Wr(Wr(this,gl),Ff)&&Wr(this,il)?.type==="!")&&ti.push({}),ti}isStart(){if(Wr(this,gl)===this)return!0;if(!Wr(this,il)?.isStart())return!1;if(Wr(this,Df)===0)return!0;const ti=Wr(this,il);for(let ii=0;ii<Wr(this,Df);ii++){const ni=Wr(ti,qa)[ii];if(!(ni instanceof $l&&ni.type==="!"))return!1}return!0}isEnd(){if(Wr(this,gl)===this||Wr(this,il)?.type==="!")return!0;if(!Wr(this,il)?.isEnd())return!1;if(!this.type)return Wr(this,il)?.isEnd();const ti=Wr(this,il)?Wr(Wr(this,il),qa).length:0;return Wr(this,Df)===ti-1}copyIn(ti){typeof ti=="string"?this.push(ti):this.push(ti.clone(this))}clone(ti){const ii=new $l(this.type,ti);for(const ni of Wr(this,qa))ii.copyIn(ni);return ii}static fromGlob(ti,ii={}){var si;const ni=new $l(null,void 0,ii);return qf(si=$l,lh,yp).call(si,ti,ni,0,ii),ni}toMMPattern(){if(this!==Wr(this,gl))return Wr(this,gl).toMMPattern();const ti=this.toString(),[ii,ni,si,ai]=this.toRegExpSource();if(!(si||Wr(this,jl)||Wr(this,Du).nocase&&!Wr(this,Du).nocaseMagicOnly&&ti.toUpperCase()!==ti.toLowerCase()))return ni;const fi=(Wr(this,Du).nocase?"i":"")+(ai?"u":"");return Object.assign(new RegExp(`^${ii}$`,fi),{_src:ii,_glob:ti})}get options(){return Wr(this,Du)}toRegExpSource(ti){const ii=ti??!!Wr(this,Du).dot;if(Wr(this,gl)===this&&qf(this,gp,Vy).call(this),!this.type){const hi=this.isStart()&&this.isEnd(),_i=Wr(this,qa).map(on=>{var Gn;const[hn,gn,es,Wn]=typeof on=="string"?qf(Gn=$l,vp,Uy).call(Gn,on,Wr(this,jl),hi):on.toRegExpSource(ti);return Qa(this,jl,Wr(this,jl)||es),Qa(this,af,Wr(this,af)||Wn),hn}).join("");let ji="";if(this.isStart()&&typeof Wr(this,qa)[0]=="string"&&!(Wr(this,qa).length===1&&yk.has(Wr(this,qa)[0]))){const hn=_k,gn=ii&&hn.has(_i.charAt(0))||_i.startsWith("\\.")&&hn.has(_i.charAt(2))||_i.startsWith("\\.\\.")&&hn.has(_i.charAt(4)),es=!ii&&!ti&&hn.has(_i.charAt(0));ji=gn?bk:es?ap:""}let Mi="";return this.isEnd()&&Wr(Wr(this,gl),Ff)&&Wr(this,il)?.type==="!"&&(Mi="(?:$|\\/)"),[ji+_i+Mi,sm(_i),Qa(this,jl,!!Wr(this,jl)),Wr(this,af)]}const ni=this.type==="*"||this.type==="+",si=this.type==="!"?"(?:(?!(?:":"(?:";let ai=qf(this,lm,tv).call(this,ii);if(this.isStart()&&this.isEnd()&&!ai&&this.type!=="!"){const hi=this.toString();return Qa(this,qa,[hi]),this.type=null,Qa(this,jl,void 0),[hi,sm(this.toString()),!1,!1]}let li=!ni||ti||ii||!ap?"":qf(this,lm,tv).call(this,!0);li===ai&&(li=""),li&&(ai=`(?:${ai})(?:${li})*?`);let fi="";if(this.type==="!"&&Wr(this,am))fi=(this.isStart()&&!ii?ap:"")+cy;else{const hi=this.type==="!"?"))"+(this.isStart()&&!ii&&!ti?ap:"")+ly+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&li?")":this.type==="*"&&li?")?":`)${this.type}`;fi=si+ai+hi}return[fi,sm(ai),Qa(this,jl,!!Wr(this,jl)),Wr(this,af)]}};gl=new WeakMap,jl=new WeakMap,af=new WeakMap,qa=new WeakMap,il=new WeakMap,Df=new WeakMap,yd=new WeakMap,Ff=new WeakMap,Du=new WeakMap,wd=new WeakMap,am=new WeakMap,gp=new WeakSet,Vy=function(){if(this!==Wr(this,gl))throw new Error("should only call on root");if(Wr(this,Ff))return this;this.toString(),Qa(this,Ff,!0);let ti;for(;ti=Wr(this,yd).pop();){if(ti.type!=="!")continue;let ii=ti,ni=Wr(ii,il);for(;ni;){for(let si=Wr(ii,Df)+1;!ni.type&&si<Wr(ni,qa).length;si++)for(const ai of Wr(ti,qa)){if(typeof ai=="string")throw new Error("string part in extglob AST??");ai.copyIn(Wr(ni,qa)[si])}ii=ni,ni=Wr(ii,il)}}return this},lh=new WeakSet,yp=function(ti,ii,ni,si){var on,hn;let ai=!1,li=!1,fi=-1,hi=!1;if(ii.type===null){let gn=ni,es="";for(;gn<ti.length;){const Wn=ti.charAt(gn++);if(ai||Wn==="\\"){ai=!ai,es+=Wn;continue}if(li){gn===fi+1?(Wn==="^"||Wn==="!")&&(hi=!0):Wn==="]"&&!(gn===fi+2&&hi)&&(li=!1),es+=Wn;continue}else if(Wn==="["){li=!0,fi=gn,hi=!1,es+=Wn;continue}if(!si.noext&&ay(Wn)&&ti.charAt(gn)==="("){ii.push(es),es="";const Gn=new $l(Wn,ii);gn=qf(on=$l,lh,yp).call(on,ti,Gn,gn,si),ii.push(Gn);continue}es+=Wn}return ii.push(es),gn}let _i=ni+1,ji=new $l(null,ii);const Mi=[];let Ki="";for(;_i<ti.length;){const gn=ti.charAt(_i++);if(ai||gn==="\\"){ai=!ai,Ki+=gn;continue}if(li){_i===fi+1?(gn==="^"||gn==="!")&&(hi=!0):gn==="]"&&!(_i===fi+2&&hi)&&(li=!1),Ki+=gn;continue}else if(gn==="["){li=!0,fi=_i,hi=!1,Ki+=gn;continue}if(ay(gn)&&ti.charAt(_i)==="("){ji.push(Ki),Ki="";const es=new $l(gn,ji);ji.push(es),_i=qf(hn=$l,lh,yp).call(hn,ti,es,_i,si);continue}if(gn==="|"){ji.push(Ki),Ki="",Mi.push(ji),ji=new $l(null,ii);continue}if(gn===")")return Ki===""&&Wr(ii,qa).length===0&&Qa(ii,am,!0),ji.push(Ki),Ki="",ii.push(...Mi,ji),_i;Ki+=gn}return ii.type=null,Qa(ii,jl,void 0),Qa(ii,qa,[ti.substring(ni-1)]),_i},lm=new WeakSet,tv=function(ti){return Wr(this,qa).map(ii=>{if(typeof ii=="string")throw new Error("string type in extglob ast??");const[ni,si,ai,li]=ii.toRegExpSource(ti);return Qa(this,af,Wr(this,af)||li),ni}).filter(ii=>!(this.isStart()&&this.isEnd())||!!ii).join("|")},vp=new WeakSet,Uy=function(ti,ii,ni=!1){let si=!1,ai="",li=!1;for(let fi=0;fi<ti.length;fi++){const hi=ti.charAt(fi);if(si){si=!1,ai+=(wk.has(hi)?"\\":"")+hi;continue}if(hi==="\\"){fi===ti.length-1?ai+="\\\\":si=!0;continue}if(hi==="["){const[_i,ji,Mi,Ki]=gk(ti,fi);if(Mi){ai+=_i,li=li||ji,fi+=Mi-1,ii=ii||Ki;continue}}if(hi==="*"){ni&&ti==="*"?ai+=cy:ai+=ly,ii=!0;continue}if(hi==="?"){ai+=Wg,ii=!0;continue}ai+=xk(hi)}return[ai,sm(ti),!!ii,li]},Vl($l,lh),Vl($l,vp);let lp=$l;const jk=(ei,{windowsPathsNoEscape:ti=!1}={})=>ti?ei.replace(/[?*()[\]]/g,"[$&]"):ei.replace(/[?*()[\]\\]/g,"\\$&"),Hl=(ei,ti,ii={})=>(op(ti),!ii.nocomment&&ti.charAt(0)==="#"?!1:new cp(ti,ii).match(ei)),Sk=/^\*+([^+@!?\*\[\(]*)$/,Ck=ei=>ti=>!ti.startsWith(".")&&ti.endsWith(ei),Ek=ei=>ti=>ti.endsWith(ei),kk=ei=>(ei=ei.toLowerCase(),ti=>!ti.startsWith(".")&&ti.toLowerCase().endsWith(ei)),Ak=ei=>(ei=ei.toLowerCase(),ti=>ti.toLowerCase().endsWith(ei)),Tk=/^\*+\.\*+$/,Lk=ei=>!ei.startsWith(".")&&ei.includes("."),Rk=ei=>ei!=="."&&ei!==".."&&ei.includes("."),Mk=/^\.\*+$/,Ok=ei=>ei!=="."&&ei!==".."&&ei.startsWith("."),Dk=/^\*+$/,Fk=ei=>ei.length!==0&&!ei.startsWith("."),Ik=ei=>ei.length!==0&&ei!=="."&&ei!=="..",Pk=/^\?+([^+@!?\*\[\(]*)?$/,qk=([ei,ti=""])=>{const ii=uy([ei]);return ti?(ti=ti.toLowerCase(),ni=>ii(ni)&&ni.toLowerCase().endsWith(ti)):ii},Nk=([ei,ti=""])=>{const ii=fy([ei]);return ti?(ti=ti.toLowerCase(),ni=>ii(ni)&&ni.toLowerCase().endsWith(ti)):ii},Bk=([ei,ti=""])=>{const ii=fy([ei]);return ti?ni=>ii(ni)&&ni.endsWith(ti):ii},Hk=([ei,ti=""])=>{const ii=uy([ei]);return ti?ni=>ii(ni)&&ni.endsWith(ti):ii},uy=([ei])=>{const ti=ei.length;return ii=>ii.length===ti&&!ii.startsWith(".")},fy=([ei])=>{const ti=ei.length;return ii=>ii.length===ti&&ii!=="."&&ii!==".."},dy=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",hy={win32:{sep:"\\"},posix:{sep:"/"}},$k=dy==="win32"?hy.win32.sep:hy.posix.sep;Hl.sep=$k;const Qc=Symbol("globstar **");Hl.GLOBSTAR=Qc;const Vk="[^/]"+"*?",Uk="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Wk="(?:(?!(?:\\/|^)\\.).)*?",zk=(ei,ti={})=>ii=>Hl(ii,ei,ti);Hl.filter=zk;const Yc=(ei,ti={})=>Object.assign({},ei,ti),Kk=ei=>{if(!ei||typeof ei!="object"||!Object.keys(ei).length)return Hl;const ti=Hl;return Object.assign((ni,si,ai={})=>ti(ni,si,Yc(ei,ai)),{Minimatch:class extends ti.Minimatch{constructor(si,ai={}){super(si,Yc(ei,ai))}static defaults(si){return ti.defaults(Yc(ei,si)).Minimatch}},AST:class extends ti.AST{constructor(si,ai,li={}){super(si,ai,Yc(ei,li))}static fromGlob(si,ai={}){return ti.AST.fromGlob(si,Yc(ei,ai))}},unescape:(ni,si={})=>ti.unescape(ni,Yc(ei,si)),escape:(ni,si={})=>ti.escape(ni,Yc(ei,si)),filter:(ni,si={})=>ti.filter(ni,Yc(ei,si)),defaults:ni=>ti.defaults(Yc(ei,ni)),makeRe:(ni,si={})=>ti.makeRe(ni,Yc(ei,si)),braceExpand:(ni,si={})=>ti.braceExpand(ni,Yc(ei,si)),match:(ni,si,ai={})=>ti.match(ni,si,Yc(ei,ai)),sep:ti.sep,GLOBSTAR:Qc})};Hl.defaults=Kk;const my=(ei,ti={})=>(op(ei),ti.nobrace||!/\{(?:(?!\{).)*\}/.test(ei)?[ei]:dk(ei));Hl.braceExpand=my;const Xk=(ei,ti={})=>new cp(ei,ti).makeRe();Hl.makeRe=Xk;const Gk=(ei,ti,ii={})=>{const ni=new cp(ti,ii);return ei=ei.filter(si=>ni.match(si)),ni.options.nonull&&!ei.length&&ei.push(ti),ei};Hl.match=Gk;const py=/[?*]|[+@!]\(.*?\)|\[|\]/,Qk=ei=>ei.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class cp{constructor(ti,ii={}){vl(this,"options");vl(this,"set");vl(this,"pattern");vl(this,"windowsPathsNoEscape");vl(this,"nonegate");vl(this,"negate");vl(this,"comment");vl(this,"empty");vl(this,"preserveMultipleSlashes");vl(this,"partial");vl(this,"globSet");vl(this,"globParts");vl(this,"nocase");vl(this,"isWindows");vl(this,"platform");vl(this,"windowsNoMagicRoot");vl(this,"regexp");op(ti),ii=ii||{},this.options=ii,this.pattern=ti,this.platform=ii.platform||dy,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!ii.windowsPathsNoEscape||ii.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!ii.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!ii.nonegate,this.comment=!1,this.empty=!1,this.partial=!!ii.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=ii.windowsNoMagicRoot!==void 0?ii.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const ti of this.set)for(const ii of ti)if(typeof ii!="string")return!0;return!1}debug(...ti){}make(){const ti=this.pattern,ii=this.options;if(!ii.nocomment&&ti.charAt(0)==="#"){this.comment=!0;return}if(!ti){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],ii.debug&&(this.debug=(...ai)=>console.error(...ai)),this.debug(this.pattern,this.globSet);const ni=this.globSet.map(ai=>this.slashSplit(ai));this.globParts=this.preprocess(ni),this.debug(this.pattern,this.globParts);let si=this.globParts.map((ai,li,fi)=>{if(this.isWindows&&this.windowsNoMagicRoot){const hi=ai[0]===""&&ai[1]===""&&(ai[2]==="?"||!py.test(ai[2]))&&!py.test(ai[3]),_i=/^[a-z]:/i.test(ai[0]);if(hi)return[...ai.slice(0,4),...ai.slice(4).map(ji=>this.parse(ji))];if(_i)return[ai[0],...ai.slice(1).map(ji=>this.parse(ji))]}return ai.map(hi=>this.parse(hi))});if(this.debug(this.pattern,si),this.set=si.filter(ai=>ai.indexOf(!1)===-1),this.isWindows)for(let ai=0;ai<this.set.length;ai++){const li=this.set[ai];li[0]===""&&li[1]===""&&this.globParts[ai][2]==="?"&&typeof li[3]=="string"&&/^[a-z]:$/i.test(li[3])&&(li[2]="?")}this.debug(this.pattern,this.set)}preprocess(ti){if(this.options.noglobstar)for(let ni=0;ni<ti.length;ni++)for(let si=0;si<ti[ni].length;si++)ti[ni][si]==="**"&&(ti[ni][si]="*");const{optimizationLevel:ii=1}=this.options;return ii>=2?(ti=this.firstPhasePreProcess(ti),ti=this.secondPhasePreProcess(ti)):ii>=1?ti=this.levelOneOptimize(ti):ti=this.adjascentGlobstarOptimize(ti),ti}adjascentGlobstarOptimize(ti){return ti.map(ii=>{let ni=-1;for(;(ni=ii.indexOf("**",ni+1))!==-1;){let si=ni;for(;ii[si+1]==="**";)si++;si!==ni&&ii.splice(ni,si-ni)}return ii})}levelOneOptimize(ti){return ti.map(ii=>(ii=ii.reduce((ni,si)=>{const ai=ni[ni.length-1];return si==="**"&&ai==="**"?ni:si===".."&&ai&&ai!==".."&&ai!=="."&&ai!=="**"?(ni.pop(),ni):(ni.push(si),ni)},[]),ii.length===0?[""]:ii))}levelTwoFileOptimize(ti){Array.isArray(ti)||(ti=this.slashSplit(ti));let ii=!1;do{if(ii=!1,!this.preserveMultipleSlashes){for(let si=1;si<ti.length-1;si++){const ai=ti[si];si===1&&ai===""&&ti[0]===""||(ai==="."||ai==="")&&(ii=!0,ti.splice(si,1),si--)}ti[0]==="."&&ti.length===2&&(ti[1]==="."||ti[1]==="")&&(ii=!0,ti.pop())}let ni=0;for(;(ni=ti.indexOf("..",ni+1))!==-1;){const si=ti[ni-1];si&&si!=="."&&si!==".."&&si!=="**"&&(ii=!0,ti.splice(ni-1,2),ni-=2)}}while(ii);return ti.length===0?[""]:ti}firstPhasePreProcess(ti){let ii=!1;do{ii=!1;for(let ni of ti){let si=-1;for(;(si=ni.indexOf("**",si+1))!==-1;){let li=si;for(;ni[li+1]==="**";)li++;li>si&&ni.splice(si+1,li-si);let fi=ni[si+1];const hi=ni[si+2],_i=ni[si+3];if(fi!==".."||!hi||hi==="."||hi===".."||!_i||_i==="."||_i==="..")continue;ii=!0,ni.splice(si,1);const ji=ni.slice(0);ji[si]="**",ti.push(ji),si--}if(!this.preserveMultipleSlashes){for(let li=1;li<ni.length-1;li++){const fi=ni[li];li===1&&fi===""&&ni[0]===""||(fi==="."||fi==="")&&(ii=!0,ni.splice(li,1),li--)}ni[0]==="."&&ni.length===2&&(ni[1]==="."||ni[1]==="")&&(ii=!0,ni.pop())}let ai=0;for(;(ai=ni.indexOf("..",ai+1))!==-1;){const li=ni[ai-1];if(li&&li!=="."&&li!==".."&&li!=="**"){ii=!0;const hi=ai===1&&ni[ai+1]==="**"?["."]:[];ni.splice(ai-1,2,...hi),ni.length===0&&ni.push(""),ai-=2}}}}while(ii);return ti}secondPhasePreProcess(ti){for(let ii=0;ii<ti.length-1;ii++)for(let ni=ii+1;ni<ti.length;ni++){const si=this.partsMatch(ti[ii],ti[ni],!this.preserveMultipleSlashes);si&&(ti[ii]=si,ti[ni]=[])}return ti.filter(ii=>ii.length)}partsMatch(ti,ii,ni=!1){let si=0,ai=0,li=[],fi="";for(;si<ti.length&&ai<ii.length;)if(ti[si]===ii[ai])li.push(fi==="b"?ii[ai]:ti[si]),si++,ai++;else if(ni&&ti[si]==="**"&&ii[ai]===ti[si+1])li.push(ti[si]),si++;else if(ni&&ii[ai]==="**"&&ti[si]===ii[ai+1])li.push(ii[ai]),ai++;else if(ti[si]==="*"&&ii[ai]&&(this.options.dot||!ii[ai].startsWith("."))&&ii[ai]!=="**"){if(fi==="b")return!1;fi="a",li.push(ti[si]),si++,ai++}else if(ii[ai]==="*"&&ti[si]&&(this.options.dot||!ti[si].startsWith("."))&&ti[si]!=="**"){if(fi==="a")return!1;fi="b",li.push(ii[ai]),si++,ai++}else return!1;return ti.length===ii.length&&li}parseNegate(){if(this.nonegate)return;const ti=this.pattern;let ii=!1,ni=0;for(let si=0;si<ti.length&&ti.charAt(si)==="!";si++)ii=!ii,ni++;ni&&(this.pattern=ti.slice(ni)),this.negate=ii}matchOne(ti,ii,ni=!1){const si=this.options;if(this.isWindows){const gn=typeof ti[0]=="string"&&/^[a-z]:$/i.test(ti[0]),es=!gn&&ti[0]===""&&ti[1]===""&&ti[2]==="?"&&/^[a-z]:$/i.test(ti[3]),Wn=typeof ii[0]=="string"&&/^[a-z]:$/i.test(ii[0]),Gn=!Wn&&ii[0]===""&&ii[1]===""&&ii[2]==="?"&&typeof ii[3]=="string"&&/^[a-z]:$/i.test(ii[3]),Dn=es?3:gn?0:void 0,Xi=Gn?3:Wn?0:void 0;if(typeof Dn=="number"&&typeof Xi=="number"){const[Bn,Kn]=[ti[Dn],ii[Xi]];Bn.toLowerCase()===Kn.toLowerCase()&&(ii[Xi]=Bn,Xi>Dn?ii=ii.slice(Xi):Dn>Xi&&(ti=ti.slice(Dn)))}}const{optimizationLevel:ai=1}=this.options;ai>=2&&(ti=this.levelTwoFileOptimize(ti)),this.debug("matchOne",this,{file:ti,pattern:ii}),this.debug("matchOne",ti.length,ii.length);for(var li=0,fi=0,hi=ti.length,_i=ii.length;li<hi&&fi<_i;li++,fi++){this.debug("matchOne loop");var ji=ii[fi],Mi=ti[li];if(this.debug(ii,ji,Mi),ji===!1)return!1;if(ji===Qc){this.debug("GLOBSTAR",[ii,ji,Mi]);var Ki=li,on=fi+1;if(on===_i){for(this.debug("** at the end");li<hi;li++)if(ti[li]==="."||ti[li]===".."||!si.dot&&ti[li].charAt(0)===".")return!1;return!0}for(;Ki<hi;){var hn=ti[Ki];if(this.debug(`
globstar while`,ti,Ki,ii,on,hn),this.matchOne(ti.slice(Ki),ii.slice(on),ni))return this.debug("globstar found match!",Ki,hi,hn),!0;if(hn==="."||hn===".."||!si.dot&&hn.charAt(0)==="."){this.debug("dot detected!",ti,Ki,ii,on);break}this.debug("globstar swallow a segment, and continue"),Ki++}return!!(ni&&(this.debug(`
>>> no match, partial?`,ti,Ki,ii,on),Ki===hi))}let gn;if(typeof ji=="string"?(gn=Mi===ji,this.debug("string match",ji,Mi,gn)):(gn=ji.test(Mi),this.debug("pattern match",ji,Mi,gn)),!gn)return!1}if(li===hi&&fi===_i)return!0;if(li===hi)return ni;if(fi===_i)return li===hi-1&&ti[li]==="";throw new Error("wtf?")}braceExpand(){return my(this.pattern,this.options)}parse(ti){op(ti);const ii=this.options;if(ti==="**")return Qc;if(ti==="")return"";let ni,si=null;(ni=ti.match(Dk))?si=ii.dot?Ik:Fk:(ni=ti.match(Sk))?si=(ii.nocase?ii.dot?Ak:kk:ii.dot?Ek:Ck)(ni[1]):(ni=ti.match(Pk))?si=(ii.nocase?ii.dot?Nk:qk:ii.dot?Bk:Hk)(ni):(ni=ti.match(Tk))?si=ii.dot?Rk:Lk:(ni=ti.match(Mk))&&(si=Ok);const ai=lp.fromGlob(ti,this.options).toMMPattern();return si&&typeof ai=="object"&&Reflect.defineProperty(ai,"test",{value:si}),ai}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const ti=this.set;if(!ti.length)return this.regexp=!1,this.regexp;const ii=this.options,ni=ii.noglobstar?Vk:ii.dot?Uk:Wk,si=new Set(ii.nocase?["i"]:[]);let ai=ti.map(hi=>{const _i=hi.map(ji=>{if(ji instanceof RegExp)for(const Mi of ji.flags.split(""))si.add(Mi);return typeof ji=="string"?Qk(ji):ji===Qc?Qc:ji._src});return _i.forEach((ji,Mi)=>{const Ki=_i[Mi+1],on=_i[Mi-1];ji!==Qc||on===Qc||(on===void 0?Ki!==void 0&&Ki!==Qc?_i[Mi+1]="(?:\\/|"+ni+"\\/)?"+Ki:_i[Mi]=ni:Ki===void 0?_i[Mi-1]=on+"(?:\\/|"+ni+")?":Ki!==Qc&&(_i[Mi-1]=on+"(?:\\/|\\/"+ni+"\\/)"+Ki,_i[Mi+1]=Qc))}),_i.filter(ji=>ji!==Qc).join("/")}).join("|");const[li,fi]=ti.length>1?["(?:",")"]:["",""];ai="^"+li+ai+fi+"$",this.negate&&(ai="^(?!"+ai+").+$");try{this.regexp=new RegExp(ai,[...si].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(ti){return this.preserveMultipleSlashes?ti.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(ti)?["",...ti.split(/\/+/)]:ti.split(/\/+/)}match(ti,ii=this.partial){if(this.debug("match",ti,this.pattern),this.comment)return!1;if(this.empty)return ti==="";if(ti==="/"&&ii)return!0;const ni=this.options;this.isWindows&&(ti=ti.split("\\").join("/"));const si=this.slashSplit(ti);this.debug(this.pattern,"split",si);const ai=this.set;this.debug(this.pattern,"set",ai);let li=si[si.length-1];if(!li)for(let fi=si.length-2;!li&&fi>=0;fi--)li=si[fi];for(let fi=0;fi<ai.length;fi++){const hi=ai[fi];let _i=si;if(ni.matchBase&&hi.length===1&&(_i=[li]),this.matchOne(_i,hi,ii))return ni.flipNegate?!0:!this.negate}return ni.flipNegate?!1:this.negate}static defaults(ti){return Hl.defaults(ti).Minimatch}}Hl.AST=lp,Hl.Minimatch=cp,Hl.escape=jk,Hl.unescape=sm;const{appSubUrl:Yk,csrfToken:Jk}=window.config;function Zk(){Hi(".page-content.repository .ui.dropdown.access-mode").each((ei,ti)=>{const ii=Hi(ti),ni=ii.find("> .text");ii.dropdown({async action(si,ai){const li=ti.getAttribute("data-last-value");try{ti.setAttribute("data-last-value",ai),ii.dropdown("hide");const fi=new FormData;fi.append("uid",ti.getAttribute("data-uid")),fi.append("mode",ai),await(0,so.LO)(ti.getAttribute("data-url"),{data:fi})}catch{ni.text("(error)"),ti.setAttribute("data-last-value",li)}},onChange(si,ai,li){ni.text(ai)},onHide(){setTimeout(()=>{ii.dropdown("get item",ti.getAttribute("data-last-value"))?ii.dropdown("set selected",ti.getAttribute("data-last-value")):ni.text("(none)")},0)}})})}function eA(){const ei=document.getElementById("search-team-box");ei&&Hi(ei).search({minCharacters:2,apiSettings:{url:`${Yk}/org/${ei.getAttribute("data-org-name")}/teams/-/search?q={query}`,headers:{"X-Csrf-Token":Jk},onResponse(ti){const ii=[];return Hi.each(ti.data,(ni,si)=>{ii.push({title:si.name,description:`${si.permission} access`})}),{results:ii}}},searchFields:["name","description"],showNoResults:!1})}function tA(){if(!Hi(".edit.githook").length)return;const ei=document.querySelector(".hook-filename").textContent,ti=K_(Hi("#content")[0],ei,{language:"shell"})}function iA(){if(!document.querySelector(".repository.settings.branches"))return;for(const ti of document.getElementsByClassName("toggle-target-enabled"))ti.addEventListener("change",function(){document.querySelector(this.getAttribute("data-target"))?.classList.toggle("disabled",!this.checked)});for(const ti of document.getElementsByClassName("toggle-target-disabled"))ti.addEventListener("change",function(){const ii=document.querySelector(this.getAttribute("data-target"));this.checked&&ii?.classList.add("disabled")});document.getElementById("dismiss_stale_approvals")?.addEventListener("change",function(){document.getElementById("ignore_stale_approvals_box")?.classList.toggle("disabled",this.checked)});const ei=()=>{const ii=(document.getElementById("status_check_contexts").value||"").split(/[\r\n]+/).map(si=>si.trim()).filter(Boolean),ni=document.getElementsByClassName("status-check-matched-mark");for(const si of ni){let ai=!1;const li=si.getAttribute("data-status-check");for(const fi of ii)if(Hl(li,fi)){ai=!0;break}(0,zn.oi)(si,ai)}};ei(),document.getElementById("status_check_contexts").addEventListener("input",(0,zn.nm)(ei))}function gy(){for(const ei of document.querySelectorAll(".issue-content, .diff-file-body"))ei.addEventListener("click",async ti=>{const ii=ti.target.closest(".comment-reaction-button");if(!ii||(ti.preventDefault(),ii.classList.contains("disabled")))return;const ni=ii.closest("[data-action-url]").getAttribute("data-action-url"),si=ii.getAttribute("data-reaction-content"),ai=ii.closest(".comment-container"),li=ai.querySelector(".bottom-reactions"),hi=li?.querySelector(`a[data-reaction-content="${CSS.escape(si)}"]`)?.getAttribute("data-has-reacted")==="true",ji=await(await(0,so.LO)(`${ni}/${hi?"unreact":"react"}`,{data:new URLSearchParams({content:si})})).json();if(li?.remove(),ji.html){ai.insertAdjacentHTML("beforeend",ji.html);const Mi=ai.querySelectorAll(".bottom-reactions .dropdown.select-reaction");Hi(Mi).dropdown()}})}const zR=ei=>(_pushScopeId("data-v-3385ef54"),ei=ei(),_popScopeId(),ei),nA={key:0,class:"diff-file-tree-items"},sA={key:0,class:"tw-pt-1"};function rA(ei,ti,ii,ni,si,ai){const li=(0,ri.g2)("DiffFileTreeItem");return ei.store.fileTreeIsVisible?((0,ri.uX)(),(0,ri.CE)("div",nA,[(0,ri.Q3)(" only render the tree if we're visible. in many cases this is something that doesn't change very often "),((0,ri.uX)(!0),(0,ri.CE)(ri.FK,null,(0,ri.pI)(ai.fileTree,fi=>((0,ri.uX)(),(0,ri.Wv)(li,{key:fi.name,item:fi},null,8,["item"]))),128)),ei.store.isIncomplete?((0,ri.uX)(),(0,ri.CE)("div",sA,[(0,ri.Lk)("a",{class:(0,yi.C4)(["ui","basic","tiny","button",ei.store.isLoadingNewData?"disabled":""]),onClick:ti[0]||(ti[0]=ml((...fi)=>ai.loadMoreData&&ai.loadMoreData(...fi),["stop"]))},(0,yi.v_)(ei.store.showMoreMessage),3)])):(0,ri.Q3)("v-if",!0)])):(0,ri.Q3)("v-if",!0)}const KR=ei=>(_pushScopeId("data-v-9574f84c"),ei=ei(),_popScopeId(),ei),oA=["title","href"],aA={class:"gt-ellipsis tw-flex-1"},lA=["title"],cA={class:"gt-ellipsis"},uA={key:2,class:"sub-items"};function fA(ei,ti,ii,ni,si,ai){const li=(0,ri.g2)("SvgIcon"),fi=(0,ri.g2)("DiffFileTreeItem",!0);return(0,ri.uX)(),(0,ri.CE)(ri.FK,null,[(0,ri.Q3)('title instead of tooltip above as the tooltip needs too much work with the current methods, i.e. not being loaded or staying open for "too long"'),ii.item.isFile?((0,ri.uX)(),(0,ri.CE)("a",{key:0,class:(0,yi.C4)(["item-file",{selected:ei.store.selectedItem==="#diff-"+ii.item.file.NameHash,viewed:ii.item.file.IsViewed}]),title:ii.item.name,href:"#diff-"+ii.item.file.NameHash},[(0,ri.Q3)(" file "),(0,ri.bF)(li,{name:"octicon-file"}),(0,ri.Lk)("span",aA,(0,yi.v_)(ii.item.name),1),(0,ri.bF)(li,{name:ai.getIconForDiffType(ii.item.file.Type).name,class:(0,yi.C4)(ai.getIconForDiffType(ii.item.file.Type).classes)},null,8,["name","class"])],10,oA)):((0,ri.uX)(),(0,ri.CE)("div",{key:1,class:"item-directory",title:ii.item.name,onClick:ti[0]||(ti[0]=ml(hi=>ei.collapsed=!ei.collapsed,["stop"]))},[(0,ri.Q3)(" directory "),(0,ri.bF)(li,{name:ei.collapsed?"octicon-chevron-right":"octicon-chevron-down"},null,8,["name"]),(0,ri.bF)(li,{class:"text primary",name:"octicon-file-directory-fill"}),(0,ri.Lk)("span",cA,(0,yi.v_)(ii.item.name),1)],8,lA)),ii.item.children?.length?(0,ri.bo)(((0,ri.uX)(),(0,ri.CE)("div",uA,[((0,ri.uX)(!0),(0,ri.CE)(ri.FK,null,(0,ri.pI)(ii.item.children,hi=>((0,ri.uX)(),(0,ri.Wv)(fi,{key:hi.name,item:hi},null,8,["item"]))),128))],512)),[[Jl,!ei.collapsed]]):(0,ri.Q3)("v-if",!0)],64)}let up;function fp(){return up||(up=(0,Rl.Kh)(window.config.pageData.diffFileInfo),window.config.pageData.diffFileInfo=up),up}var dA={components:{SvgIcon:Io.Ah},props:{item:{type:Object,required:!0}},data:()=>({store:fp(),collapsed:!1}),methods:{getIconForDiffType(ei){return{1:{name:"octicon-diff-added",classes:["text","green"]},2:{name:"octicon-diff-modified",classes:["text","yellow"]},3:{name:"octicon-diff-removed",classes:["text","red"]},4:{name:"octicon-diff-renamed",classes:["text","teal"]},5:{name:"octicon-diff-renamed",classes:["text","green"]}}[ei]}}},hA=(0,zc.A)(dA,[["render",fA],["__scopeId","data-v-9574f84c"]]);const vy="diff_file_tree_visible";var mA={components:{DiffFileTreeItem:hA},data:()=>({store:fp()}),computed:{fileTree(){const ei=[];for(const ii of this.store.files){const ni=ii.Name.split("/");let si=0,ai=null,li=!1;for(const fi of ni){si+=1,si===ni.length&&(li=!0);let hi={name:fi,children:[],isFile:li};if(li===!0&&(hi.file=ii),ai){const _i=ai.children.find(ji=>ji.name===fi);_i?hi=_i:ai.children.push(hi)}else{const _i=ei.find(ji=>ji.name===fi);_i?hi=_i:ei.push(hi)}ai=hi}}const ti=ii=>{for(const ni of ii)ni.children&&ti(ni.children),ni.children.length===1&&ni.children[0].isFile===!1&&(ni.name=`${ni.name}/${ni.children[0].name}`,ni.children=ni.children[0].children)};return ti(ei),ei}},mounted(){this.store.fileTreeIsVisible=localStorage.getItem(vy)!=="false",document.querySelector(".diff-toggle-file-tree-button").addEventListener("click",this.toggleVisibility),this.hashChangeListener=()=>{this.store.selectedItem=window.location.hash,this.expandSelectedFile()},this.hashChangeListener(),window.addEventListener("hashchange",this.hashChangeListener)},unmounted(){document.querySelector(".diff-toggle-file-tree-button").removeEventListener("click",this.toggleVisibility),window.removeEventListener("hashchange",this.hashChangeListener)},methods:{expandSelectedFile(){if(this.store.selectedItem){const ei=document.querySelector(this.store.selectedItem);ei?.getAttribute("data-folded")==="true"&&nh(ei,ei.querySelector(".fold-file"),!1)}},toggleVisibility(){this.updateVisibility(!this.store.fileTreeIsVisible)},updateVisibility(ei){this.store.fileTreeIsVisible=ei,localStorage.setItem(vy,this.store.fileTreeIsVisible),this.updateState(this.store.fileTreeIsVisible)},updateState(ei){const ti=document.querySelector(".diff-toggle-file-tree-button"),[ii,ni]=ti.querySelectorAll(".icon"),si=document.getElementById("diff-file-tree"),ai=ti.getAttribute(ei?"data-hide-text":"data-show-text");ti.setAttribute("data-tooltip-content",ai),(0,zn.oi)(si,ei),(0,zn.oi)(ii,!ei),(0,zn.oi)(ni,ei)},loadMoreData(){Kg(this.store.linkLoadMore)}}},pA=(0,zc.A)(mA,[["render",rA],["__scopeId","data-v-3385ef54"]]);const gA={key:0,class:"diff-stats tw-m-0",ref:"root"},vA={class:"tw-font-semibold tw-flex tw-items-center pull-right"},bA={key:0,class:"tw-ml-0.5 tw-mr-2"},_A=["data-tooltip-content"],yA=["data-tooltip-content"],wA=["href"],xA={key:0,class:"tw-pt-1"},jA={class:"file tw-flex tw-items-center tw-justify-between"};function SA(ei,ti,ii,ni,si,ai){return ei.store.fileListIsVisible?((0,ri.uX)(),(0,ri.CE)("ol",gA,[((0,ri.uX)(!0),(0,ri.CE)(ri.FK,null,(0,ri.pI)(ei.store.files,li=>((0,ri.uX)(),(0,ri.CE)("li",{key:li.NameHash},[(0,ri.Lk)("div",vA,[li.IsBin?((0,ri.uX)(),(0,ri.CE)("span",bA,(0,yi.v_)(ei.store.binaryFileMessage),1)):(0,ri.Q3)("v-if",!0),(0,ri.eW)(" "+(0,yi.v_)(li.IsBin?"":li.Addition+li.Deletion)+" ",1),li.IsBin?(0,ri.Q3)("v-if",!0):((0,ri.uX)(),(0,ri.CE)("span",{key:1,class:"diff-stats-bar tw-mx-2","data-tooltip-content":ei.store.statisticsMessage.replace("%d",li.Addition+li.Deletion).replace("%d",li.Addition).replace("%d",li.Deletion)},[(0,ri.Lk)("div",{class:"diff-stats-add-bar",style:(0,yi.Tr)({width:ai.diffStatsWidth(li.Addition,li.Deletion)})},null,4)],8,_A))]),(0,ri.Q3)(" todo finish all file status, now modify, add, delete and rename "),(0,ri.Lk)("span",{class:(0,yi.C4)(["status",ai.diffTypeToString(li.Type)]),"data-tooltip-content":ai.diffTypeToString(li.Type)},"\xA0",10,yA),(0,ri.Lk)("a",{class:"file tw-font-mono",href:"#diff-"+li.NameHash},(0,yi.v_)(li.Name),9,wA)]))),128)),ei.store.isIncomplete?((0,ri.uX)(),(0,ri.CE)("li",xA,[(0,ri.Lk)("span",jA,[(0,ri.eW)((0,yi.v_)(ei.store.tooManyFilesMessage)+" ",1),(0,ri.Lk)("a",{class:(0,yi.C4)(["ui","basic","tiny","button",ei.store.isLoadingNewData?"disabled":""]),onClick:ti[0]||(ti[0]=ml((...li)=>ai.loadMoreData&&ai.loadMoreData(...li),["stop"]))},(0,yi.v_)(ei.store.showMoreMessage),3)])])):(0,ri.Q3)("v-if",!0)],512)):(0,ri.Q3)("v-if",!0)}var CA={data:()=>({store:fp()}),mounted(){document.getElementById("show-file-list-btn").addEventListener("click",this.toggleFileList)},unmounted(){document.getElementById("show-file-list-btn").removeEventListener("click",this.toggleFileList)},methods:{toggleFileList(){this.store.fileListIsVisible=!this.store.fileListIsVisible},diffTypeToString(ei){return{1:"add",2:"modify",3:"del",4:"rename",5:"copy"}[ei]},diffStatsWidth(ei,ti){return`${ei/(ei+ti)*100}%`},loadMoreData(){Kg(this.store.linkLoadMore)}}},EA=(0,zc.A)(CA,[["render",SA]]);function kA(){const ei=document.getElementById("diff-file-tree");if(!ei)return;dc(pA).mount(ei);const ii=document.getElementById("diff-file-list");if(!ii)return;dc(EA).mount(ii)}const YR=ei=>(_pushScopeId("data-v-37badef1"),ei=ei(),_popScopeId(),ei),AA={class:"ui scrolling dropdown custom"},TA=["data-tooltip-content","aria-label"],LA=["aria-expanded"],RA={key:0,class:"loading-indicator is-loading"},MA={class:"gt-ellipsis"},OA={class:"gt-ellipsis text light-2 tw-mb-0"},DA={class:"gt-ellipsis"},FA={class:"gt-ellipsis text light-2"},IA={key:3,class:"info text light-2"},PA=["onKeydown","onMouseover","onClick"],qA={class:"tw-flex-1 tw-flex tw-flex-col tw-gap-1"},NA={class:"gt-ellipsis commit-list-summary"},BA={class:"gt-ellipsis text light-2"},HA={class:"text right"},$A=["datetime"],VA={class:"tw-font-mono"};function UA(ei,ti,ii,ni,si,ai){const li=(0,ri.g2)("svg-icon");return(0,ri.uX)(),(0,ri.CE)("div",AA,[(0,ri.Lk)("button",{class:"ui basic button",id:"diff-commit-list-expand",onClick:ti[0]||(ti[0]=ml(fi=>ai.toggleMenu(),["stop"])),"data-tooltip-content":ei.locale.filter_changes_by_commit,"aria-haspopup":"true","aria-controls":"diff-commit-selector-menu","aria-label":ei.locale.filter_changes_by_commit,"aria-activedescendant":"diff-commit-list-show-all"},[(0,ri.bF)(li,{name:"octicon-git-commit"})],8,TA),(0,ri.bo)((0,ri.Lk)("div",{class:(0,yi.C4)(["left menu transition",{visible:ei.menuVisible}]),id:"diff-commit-selector-menu","aria-expanded":ei.menuVisible?"true":"false"},[ei.isLoading?((0,ri.uX)(),(0,ri.CE)("div",RA)):(0,ri.Q3)("v-if",!0),ei.isLoading?(0,ri.Q3)("v-if",!0):((0,ri.uX)(),(0,ri.CE)("div",{key:1,class:"vertical item",id:"diff-commit-list-show-all",role:"menuitem",onKeydown:ti[1]||(ti[1]=Qd(fi=>ai.showAllChanges(),["enter"])),onClick:ti[2]||(ti[2]=fi=>ai.showAllChanges())},[(0,ri.Lk)("div",MA,(0,yi.v_)(ei.locale.show_all_commits),1),(0,ri.Lk)("div",OA,(0,yi.v_)(ei.locale.stats_num_commits),1)],32)),(0,ri.Q3)(" only show the show changes since last review if there is a review AND we are commits ahead of the last review "),ei.lastReviewCommitSha!=null?((0,ri.uX)(),(0,ri.CE)("div",{key:2,role:"menuitem",class:(0,yi.C4)(["vertical item",{disabled:!ai.commitsSinceLastReview}]),onKeydown:ti[3]||(ti[3]=Qd(fi=>ai.changesSinceLastReviewClick(),["enter"])),onClick:ti[4]||(ti[4]=fi=>ai.changesSinceLastReviewClick())},[(0,ri.Lk)("div",DA,(0,yi.v_)(ei.locale.show_changes_since_your_last_review),1),(0,ri.Lk)("div",FA,(0,yi.v_)(ai.commitsSinceLastReview)+" commits ",1)],34)):(0,ri.Q3)("v-if",!0),ei.isLoading?(0,ri.Q3)("v-if",!0):((0,ri.uX)(),(0,ri.CE)("span",IA,(0,yi.v_)(ei.locale.select_commit_hold_shift_for_range),1)),((0,ri.uX)(!0),(0,ri.CE)(ri.FK,null,(0,ri.pI)(ei.commits,fi=>((0,ri.uX)(),(0,ri.CE)("div",{key:fi.id,class:(0,yi.C4)(["vertical item",{selection:fi.selected,hovered:fi.hovered}]),role:"menuitem",onKeydown:[Qd(ml(hi=>ai.commitClicked(fi.id),["exact"]),["enter"]),Qd(ml(hi=>ai.commitClickedShift(fi),["shift","exact"]),["enter"])],onMouseover:ml(hi=>ai.highlight(fi),["shift"]),onClick:[ml(hi=>ai.commitClicked(fi.id),["exact"]),ml(hi=>ai.commitClicked(fi.id,!0),["ctrl","exact"]),ml(hi=>ai.commitClicked(fi.id,!0),["meta","exact"]),ml(hi=>ai.commitClickedShift(fi),["shift","exact","stop","prevent"])]},[(0,ri.Lk)("div",qA,[(0,ri.Lk)("div",NA,(0,yi.v_)(fi.summary),1),(0,ri.Lk)("div",BA,[(0,ri.eW)((0,yi.v_)(fi.committer_or_author_name)+" ",1),(0,ri.Lk)("span",HA,[(0,ri.Q3)(" TODO: make this respect the PreferredTimestampTense setting "),(0,ri.Lk)("relative-time",{prefix:"",datetime:fi.time,"data-tooltip-content":"","data-tooltip-interactive":"true"},(0,yi.v_)(fi.time),9,$A)])])]),(0,ri.Lk)("div",VA,(0,yi.v_)(fi.short_sha),1)],42,PA))),128))],10,LA),[[Jl,ei.menuVisible]])])}var WA={components:{SvgIcon:Io.Ah},data:()=>({menuVisible:!1,isLoading:!1,locale:{filter_changes_by_commit:document.getElementById("diff-commit-select").getAttribute("data-filter_changes_by_commit")},commits:[],hoverActivated:!1,lastReviewCommitSha:null}),computed:{commitsSinceLastReview(){return this.lastReviewCommitSha?this.commits.length-this.commits.findIndex(ei=>ei.id===this.lastReviewCommitSha)-1:0},queryParams(){return this.$el.parentNode.getAttribute("data-queryparams")},issueLink(){return this.$el.parentNode.getAttribute("data-issuelink")}},mounted(){document.body.addEventListener("click",this.onBodyClick),this.$el.addEventListener("keydown",this.onKeyDown),this.$el.addEventListener("keyup",this.onKeyUp)},unmounted(){document.body.removeEventListener("click",this.onBodyClick),this.$el.removeEventListener("keydown",this.onKeyDown),this.$el.removeEventListener("keyup",this.onKeyUp)},methods:{onBodyClick(ei){this.$el.contains(ei.target)||this.menuVisible&&this.toggleMenu()},onKeyDown(ei){if(!this.menuVisible)return;const ti=document.activeElement;if(this.$el.contains(ti))switch(ei.key){case"ArrowDown":ei.preventDefault(),this.focusElem(ti.nextElementSibling,ti);break;case"ArrowUp":ei.preventDefault(),this.focusElem(ti.previousElementSibling,ti);break;case"Escape":ei.preventDefault(),ti.tabIndex=-1,this.toggleMenu();break}},onKeyUp(ei){if(!this.menuVisible)return;const ti=document.activeElement;if(this.$el.contains(ti)&&ei.key==="Shift"&&this.hoverActivated){this.hoverActivated=!1;for(const ii of this.commits)ii.hovered=!1,ii.selected=!1}},highlight(ei){if(!this.hoverActivated)return;const ti=this.commits.findIndex(ni=>ni.selected),ii=this.commits.findIndex(ni=>ni.id===ei.id);for(const[ni,si]of this.commits.entries())si.hovered=Math.min(ti,ii)<=ni&&ni<=Math.max(ti,ii)},focusElem(ei,ti){ei&&(ei.tabIndex=0,ti&&(ti.tabIndex=-1),ei.focus())},async toggleMenu(){if(this.menuVisible=!this.menuVisible,!this.commits.length&&this.menuVisible&&!this.isLoading){this.isLoading=!0;try{await this.fetchCommits()}finally{this.isLoading=!1}}this.$nextTick(()=>{const ei=this.$el.querySelector("#diff-commit-list-expand"),ti=this.$el.querySelector("#diff-commit-list-show-all");this.menuVisible?this.focusElem(ti,ei):this.focusElem(ei,ti)})},async fetchCommits(){const ti=await(await(0,so.fG)(`${this.issueLink}/commits/list`)).json();this.commits.push(...ti.commits.map(ii=>(ii.hovered=!1,ii))),this.commits.reverse(),this.lastReviewCommitSha=ti.last_review_commit_sha||null,this.lastReviewCommitSha&&this.commits.findIndex(ii=>ii.id===this.lastReviewCommitSha)===-1&&(this.lastReviewCommitSha=null),Object.assign(this.locale,ti.locale)},showAllChanges(){window.location=`${this.issueLink}/files${this.queryParams}`},changesSinceLastReviewClick(){window.location=`${this.issueLink}/files/${this.lastReviewCommitSha}..${this.commits.at(-1).id}${this.queryParams}`},commitClicked(ei,ti=!1){const ii=`${this.issueLink}/commits/${ei}${this.queryParams}`;ti?window.open(ii):window.location=ii},commitClickedShift(ei){if(this.hoverActivated=!this.hoverActivated,ei.selected=!0,!this.hoverActivated)if(this.commits[0].selected){const ti=this.commits.findLastIndex(ii=>ii.selected);ti===this.commits.length-1?window.location=`${this.issueLink}/files${this.queryParams}`:window.location=`${this.issueLink}/files/${this.commits[ti].id}${this.queryParams}`}else{const ti=this.commits[this.commits.findIndex(ni=>ni.selected)-1].id,ii=this.commits.findLast(ni=>ni.selected).id;window.location=`${this.issueLink}/files/${ti}..${ii}${this.queryParams}`}}}},zA=(0,zc.A)(WA,[["render",UA],["__scopeId","data-v-37badef1"]]);function KA(){const ei=document.getElementById("diff-commit-select");if(!ei)return;dc(zA).mount(ei)}const{pageData:XA}=window.config,oh=XA.prReview||{},by="viewed-file-checked-form",_y=".viewed-file-form",GA="#expand-files-btn",QA="#collapse-files-btn";function yy(){document.getElementById("viewed-files-summary")?.setAttribute("value",oh.numberOfViewedFiles);const ti=document.getElementById("viewed-files-summary-label");ti&&(ti.innerHTML=ti.getAttribute("data-text-changed-template").replace("%[1]d",oh.numberOfViewedFiles).replace("%[2]d",oh.numberOfFiles))}function YA(){oh.numberOfViewedFiles=document.querySelectorAll(`${_y} > input[type=checkbox][checked]`).length,yy()}function wy(){for(const ei of document.querySelectorAll(`${_y}:not([data-has-viewed-checkbox-listener="true"])`)){ei.setAttribute("data-has-viewed-checkbox-listener",!0);const ti=ei.querySelector("input[type=checkbox]");ti.addEventListener("input",function(){this.checked?(ei.classList.add(by),ti.setAttribute("checked",""),oh.numberOfViewedFiles++):(ei.classList.remove(by),ti.removeAttribute("checked"),oh.numberOfViewedFiles--),yy(),ei.parentNode.querySelector(".changed-since-last-review")?.remove();const ni=ti.getAttribute("name"),si=fp().files.find(_i=>_i.Name===ni);si&&(si.IsViewed=this.checked);const ai={};ai[ni]=this.checked;const li={files:ai},fi=ei.getAttribute("data-headcommit");fi&&(li.headCommitSHA=fi),(0,so.LO)(ei.getAttribute("data-link"),{data:li});const hi=ei.closest(".diff-file-header");nh(hi.closest(".file-content"),hi.querySelector(".fold-file"),this.checked)})}}function JA(){document.querySelector(GA)?.addEventListener("click",()=>{for(const ei of document.querySelectorAll('.file-content[data-folded="true"]'))nh(ei,ei.querySelector(".fold-file"),!1)}),document.querySelector(QA)?.addEventListener("click",()=>{for(const ei of document.querySelectorAll('.file-content:not([data-folded="true"])'))ei.getAttribute("id")!=="diff-incomplete"&&nh(ei,ei.querySelector(".fold-file"),!0)})}const{pageData:zg,i18n:ZA}=window.config;function eT(){const ei=document.getElementById("review-box");if(!ei)return;const ti=ei.querySelector(".review-comments-counter");ti&&Hi(document).on("click",'button[name="pending_review"]',ii=>{Hi(ii.target).closest("form").on("submit",()=>{const si=parseInt(ti.getAttribute("data-pending-comment-number"))+1||1;ti.setAttribute("data-pending-comment-number",si),ti.textContent=si,ei.classList.remove("pulse"),requestAnimationFrame(()=>{ei.classList.add("pulse")})})})}function tT(){Hi(".file-view-toggle").on("click",function(){for(const ti of(0,zn.D6)(this))ti.classList.remove("active");this.classList.add("active");const ei=document.querySelector(this.getAttribute("data-toggle-selector"));ei&&((0,zn.y9)((0,zn.D6)(ei)),(0,zn.fi)(ei))})}function iT(){Hi(document).on("submit",".conversation-holder form",async ei=>{ei.preventDefault();const ti=Hi(ei.target),ii=ei.target.querySelector("textarea");if(Z_(ii)&&!ei.target.classList.contains("is-loading"))try{ei.target.classList.add("is-loading");const ni=new FormData(ti[0]),si=(0,zn.IU)(ei);(si?.nodeName==="BUTTON"||si?.nodeName==="INPUT"&&si.type==="submit")&&si.name&&ni.append(si.name,si.value);const li=await(0,so.LO)(ei.target.getAttribute("action"),{data:ni}),fi=Hi(await li.text()),{path:hi,side:_i,idx:ji}=fi.data();ti.closest(".conversation-holder").replaceWith(fi);let Mi;ti.closest("tr").data("line-type")==="same"?Mi=`[data-path="${hi}"] .add-code-comment[data-idx="${ji}"]`:Mi=`[data-path="${hi}"] .add-code-comment[data-side="${_i}"][data-idx="${ji}"]`;for(const Ki of document.querySelectorAll(Mi))Ki.classList.add("tw-invisible");fi.find(".dropdown").dropdown()}catch(ni){console.error("Error:",ni),pl(ZA.network_error)}finally{ei.target.classList.remove("is-loading")}}),Hi(document).on("click",".resolve-conversation",async function(ei){ei.preventDefault();const ti=Hi(this).data("comment-id"),ii=Hi(this).data("origin"),ni=Hi(this).data("action"),si=Hi(this).data("update-url");try{const li=await(await(0,so.LO)(si,{data:new URLSearchParams({origin:ii,action:ni,comment_id:ti})})).text();if(Hi(this).closest(".conversation-holder").length){const fi=Hi(li);Hi(this).closest(".conversation-holder").replaceWith(fi),fi.find(".dropdown").dropdown(),gy(fi)}else window.location.reload()}catch(ai){console.error("Error:",ai)}})}function nT(){Hi(document).on("click",".previous-conversation",ei=>{const ti=Hi(ei.currentTarget).closest(".comment-code-cloud"),ii=Hi(".comment-code-cloud:not(.tw-hidden)"),ni=ii.index(ti),si=ni>0?ni-1:ii.length-1,li=ii.eq(si).find(".comment").first()[0].getAttribute("id");window.location.href=`#${li}`}),Hi(document).on("click",".next-conversation",ei=>{const ti=Hi(ei.currentTarget).closest(".comment-code-cloud"),ii=Hi(".comment-code-cloud:not(.tw-hidden)"),ni=ii.index(ti),si=ni<ii.length-1?ni+1:0,li=ii.eq(si).find(".comment").first()[0].getAttribute("id");window.location.href=`#${li}`})}function xy(){Kb(),wy(),YA(),Sb()}async function Kg(ei){const ti=document.querySelector("a#diff-show-more-files");if(!(ti?.classList.contains("disabled")||zg.diffFileInfo.isLoadingNewData)){zg.diffFileInfo.isLoadingNewData=!0,ti?.classList.add("disabled");try{const ni=await(await(0,so.fG)(ei)).text(),si=Hi(ni);Hi("#diff-incomplete").replaceWith(si.find("#diff-file-boxes").children()),Hi("body").append(si.find("script#diff-data-script")),xy()}catch(ii){console.error("Error:",ii),pl("An error occurred while loading more files.")}finally{ti?.classList.remove("disabled"),zg.diffFileInfo.isLoadingNewData=!1}}}function sT(){Hi(document).on("click","a#diff-show-more-files",ei=>{ei.preventDefault();const ti=ei.target.getAttribute("data-href");Kg(ti)}),Hi(document).on("click","a.diff-load-button",async ei=>{ei.preventDefault();const ti=Hi(ei.target);if(ei.target.classList.contains("disabled"))return;ei.target.classList.add("disabled");const ii=ti.data("href");try{const si=await(await(0,so.fG)(ii)).text();if(!si)return;ti.parent().replaceWith(Hi(si).find("#diff-file-boxes .diff-file-body .file-body").children()),xy()}catch(ni){console.error("Error:",ni)}finally{ei.target.classList.remove("disabled")}})}function rT(){iT(),Hi("#diff-file-list").length&&(kA(),KA(),sT(),eT(),tT(),wy(),JA())}const{appSubUrl:oT}=window.config;function aT(){Hi(".organization.new.team input[name=permission]").on("change",()=>{Hi("input[name=permission]:checked",".organization.new.team").val()==="admin"?(0,zn.y9)(".organization.new.team .team-units"):(0,zn.fi)(".organization.new.team .team-units")})}function lT(){const ei=Hi("#search-repo-box");ei.search({minCharacters:2,apiSettings:{url:`${oT}/repo/search?q={query}&uid=${ei.data("uid")}`,onResponse(ti){const ii=[];return Hi.each(ti.data,(ni,si)=>{ii.push({title:si.repository.full_name.split("/")[1],description:si.repository.full_name})}),{results:ii}}},searchFields:["full_name"],showNoResults:!1})}const{appSubUrl:rm}=window.config;async function cT(){if(!document.querySelector(".user.signin.webauthn-prompt")||!Sy())return;const ti=await(0,so.fG)(`${rm}/user/webauthn/assertion`);if(ti.status!==200){Jc("unknown");return}const ii=await ti.json();ii.publicKey.challenge=(0,na.vd)(ii.publicKey.challenge);for(const ni of ii.publicKey.allowCredentials)ni.id=(0,na.vd)(ni.id);try{const ni=await navigator.credentials.get({publicKey:ii.publicKey});await jy(ni)}catch(ni){if(!ii.publicKey.extensions?.appid){Jc("general",ni.message);return}delete ii.publicKey.extensions.appid;try{const si=await navigator.credentials.get({publicKey:ii.publicKey});await jy(si)}catch(si){Jc("general",si.message)}}}async function jy(ei){const ti=new Uint8Array(ei.response.authenticatorData),ii=new Uint8Array(ei.response.clientDataJSON),ni=new Uint8Array(ei.rawId),si=new Uint8Array(ei.response.signature),ai=new Uint8Array(ei.response.userHandle),li=await(0,so.LO)(`${rm}/user/webauthn/assertion`,{data:{id:ei.id,rawId:(0,na.vh)(ni),type:ei.type,clientExtensionResults:ei.getClientExtensionResults(),response:{authenticatorData:(0,na.vh)(ti),clientDataJSON:(0,na.vh)(ii),signature:(0,na.vh)(si),userHandle:(0,na.vh)(ai)}}});if(li.status===500){Jc("unknown");return}else if(li.status!==200){Jc("unable-to-process");return}const fi=await li.json();window.location.href=fi?.redirect??`${rm}/`}async function uT(ei){const ti=new Uint8Array(ei.response.attestationObject),ii=new Uint8Array(ei.response.clientDataJSON),ni=new Uint8Array(ei.rawId),si=await(0,so.LO)(`${rm}/user/settings/security/webauthn/register`,{data:{id:ei.id,rawId:(0,na.vh)(ni),type:ei.type,response:{attestationObject:(0,na.vh)(ti),clientDataJSON:(0,na.vh)(ii)}}});if(si.status===409){Jc("duplicated");return}else if(si.status!==201){Jc("unknown");return}window.location.reload()}function Jc(ei,ti){const ii=document.getElementById("webauthn-error-msg");if(ei==="general")ii.textContent=ti||"unknown error";else{const ni=document.querySelector(`#webauthn-error [data-webauthn-error-msg=${ei}]`);ni?ii.textContent=`${ni.textContent}${ti?` ${ti}`:""}`:ii.textContent=`unknown error type: ${ei}${ti?` ${ti}`:""}`}(0,zn.fi)("#webauthn-error")}function Sy(){return window.isSecureContext?typeof window.PublicKeyCredential!="function"?(Jc("browser"),!1):!0:(Jc("insecure"),!1)}function fT(){const ei=document.getElementById("register-webauthn");if(ei){if(!Sy()){ei.disabled=!0;return}ei.addEventListener("click",async ti=>{ti.preventDefault(),await dT()})}}async function dT(){const ei=document.getElementById("nickname"),ti=new FormData;ti.append("name",ei.value);const ii=await(0,so.LO)(`${rm}/user/settings/security/webauthn/request_register`,{data:ti});if(ii.status===409){Jc("duplicated");return}else if(ii.status!==200){Jc("unknown");return}const ni=await ii.json();if(ei.closest("div.field").classList.remove("error"),ni.publicKey.challenge=(0,na.vd)(ni.publicKey.challenge),ni.publicKey.user.id=(0,na.vd)(ni.publicKey.user.id),ni.publicKey.excludeCredentials)for(const si of ni.publicKey.excludeCredentials)si.id=(0,na.vd)(si.id);try{const si=await navigator.credentials.create({publicKey:ni.publicKey});await uT(si)}catch(si){Jc("unknown",si)}}function hT(){document.addEventListener("click",ei=>{if(ei.target.matches(".remove-rel-attach")){const ti=ei.target.getAttribute("data-uuid"),ii=ei.target.getAttribute("data-id");document.querySelector(`input[name='attachment-del-${ti}']`).value="true",(0,zn.y9)(`#attachment-${ii}`)}})}function mT(){document.querySelector(".repository.new.release")&&(pT(),gT())}function pT(){const ei=document.getElementById("tag-name-editor");if(!ei)return;const ti=JSON.parse(ei.getAttribute("data-existing-tags"));if(!Array.isArray(ti))return;const ii=ei.getAttribute("data-tag-helper"),ni=ei.getAttribute("data-tag-helper-new"),si=ei.getAttribute("data-tag-helper-existing"),ai=document.getElementById("tag-name"),li=function(fi){const hi=fi.value,_i=document.getElementById("tag-helper");ti.includes(hi)?((0,zn.y9)("#tag-target-selector"),_i.textContent=si):((0,zn.fi)("#tag-target-selector"),_i.textContent=hi?ni:ii)};li(ai),ai.addEventListener("input",fi=>{li(fi.target)})}function gT(){const ei=document.querySelector(".repository.new.release .combo-markdown-editor");ei&&Of(ei)}const{appSubUrl:vT}=window.config,bT=/^\S+@\S+$/;function _T(){const ei=document.getElementById("search-user-box");if(!ei)return;const ti=Hi(ei),ii=ei.getAttribute("data-allow-email")==="true",ni=ei.getAttribute("data-allow-email-description")??void 0;ti.search({minCharacters:2,apiSettings:{url:`${vT}/user/search?active=1&q={query}`,onResponse(si){const ai=[],li=ti.find("input").val(),fi=li.toUpperCase();if(Hi.each(si.data,(hi,_i)=>{const ji={title:_i.login,image:_i.avatar_url};_i.full_name&&(ji.description=Ua(_i.full_name)),fi===_i.login.toUpperCase()?ai.unshift(ji):ai.push(ji)}),ii&&!ai.length&&bT.test(li)){const hi={title:li,description:ni};ai.push(hi)}return{results:ai}}},searchFields:["login","full_name"],showNoResults:!1})}function yT(){const ei=document.querySelector(".page-content.install");ei&&(ei.classList.contains("post-install")?xT():wT())}function wT(){const ei="gitea",ti="gitea",ii={mysql:"127.0.0.1:3306",postgres:"127.0.0.1:5432",mssql:"127.0.0.1:1433"},ni=document.getElementById("db_host"),si=document.getElementById("db_user"),ai=document.getElementById("db_name");document.getElementById("db_type").addEventListener("change",function(){const hi=this.value;if((0,zn.y9)("div[data-db-setting-for]"),(0,zn.fi)(`div[data-db-setting-for=${hi}]`),hi!=="sqlite3"){(0,zn.fi)("div[data-db-setting-for=common-host]");const _i=ni.value;(!_i||Object.values(ii).includes(_i))&&(ni.value=ii[hi]??""),!si.value&&!ai.value&&(si.value=ei,ai.value=ti)}}),document.getElementById("db_type").dispatchEvent(new Event("change"));const li=document.getElementById("app_url");li.value.includes("://localhost")&&(li.value=window.location.href);const fi=document.getElementById("domain");fi.value.trim()==="localhost"&&(fi.value=window.location.hostname),document.querySelector("#offline-mode input").addEventListener("change",function(){this.checked&&(document.querySelector("#disable-gravatar input").checked=!0,document.querySelector("#federated-avatar-lookup input").checked=!1)}),document.querySelector("#disable-gravatar input").addEventListener("change",function(){this.checked?document.querySelector("#federated-avatar-lookup input").checked=!1:document.querySelector("#offline-mode input").checked=!1}),document.querySelector("#federated-avatar-lookup input").addEventListener("change",function(){this.checked&&(document.querySelector("#disable-gravatar input").checked=!1,document.querySelector("#offline-mode input").checked=!1)}),document.querySelector("#enable-openid-signin input").addEventListener("change",function(){this.checked?document.querySelector("#disable-registration input").checked||(document.querySelector("#enable-openid-signup input").checked=!0):document.querySelector("#enable-openid-signup input").checked=!1}),document.querySelector("#disable-registration input").addEventListener("change",function(){this.checked?(document.querySelector("#enable-captcha input").checked=!1,document.querySelector("#enable-openid-signup input").checked=!1):document.querySelector("#enable-openid-signup input").checked=!0}),document.querySelector("#enable-captcha input").addEventListener("change",function(){this.checked&&(document.querySelector("#disable-registration input").checked=!1)})}function xT(){const ei=document.getElementById("goto-user-login");if(!ei)return;const ti=ei.getAttribute("href");let ii=setInterval(async()=>{try{const ni=await(0,so.fG)(ti);ii&&ni.status===200&&(clearInterval(ii),ii=null,window.location.href=ti)}catch{}},1e3)}function jT(){if(!document.querySelectorAll(".new.webhook").length)return;for(const ti of document.querySelectorAll(".events.checkbox input"))ti.addEventListener("change",function(){this.checked&&(0,zn.fi)(".events.fields")});for(const ti of document.querySelectorAll(".non-events.checkbox input"))ti.addEventListener("change",function(){this.checked&&(0,zn.y9)(".events.fields")});const ei=document.getElementById("http_method");if(ei){const ti=function(){const ii=ei.value==="POST";(0,zn.oi)(document.getElementById("content_type").closest(".field"),ii)};ti(),ei.addEventListener("change",ti)}document.getElementById("test-delivery")?.addEventListener("click",async function(){this.classList.add("is-loading","disabled"),await(0,so.LO)(this.getAttribute("data-link")),setTimeout(()=>{window.location.href=this.getAttribute("data-redirect")},5e3)})}function ST(){CT(),ET()}function CT(){for(const ei of document.querySelectorAll(".show-create-branch-modal"))ei.addEventListener("click",()=>{const ti=ei.getAttribute("data-modal-form")||"#create-branch-form",ii=document.querySelector(ti);if(!ii)return;ii.action=`${ii.getAttribute("data-base-action")}${ei.getAttribute("data-branch-from-urlcomponent")}`;const ni=ei.getAttribute("data-modal-from-span")||"#modal-create-branch-from-span";document.querySelector(ni).textContent=ei.getAttribute("data-branch-from"),Hi(ei.getAttribute("data-modal")).modal("show")})}function ET(){for(const ei of document.querySelectorAll(".show-rename-branch-modal"))ei.addEventListener("click",()=>{const ti=ei.getAttribute("data-modal"),ii=document.querySelector(ti),ni=ei.getAttribute("data-old-branch-name");ii.querySelector("input[name=from]").value=ni;const si=ii.querySelector(".default-branch-warning");(0,zn.oi)(si,ei.getAttribute("data-is-default-branch")==="true");const ai=ii.querySelector("[data-rename-branch-to]");ai.textContent=ai.getAttribute("data-rename-branch-to").replace("%s",ni)})}function Cy(ei){return/.*[^/]\/[^/].*/.test(ei)}function ah(ei){const ti=document.querySelector(`${ei} .label-name-input`),ii=document.querySelector(`${ei} .label-exclusive-input-field`),ni=document.querySelector(`${ei} .label-exclusive-input`),si=document.querySelector(`${ei} .label-exclusive-warning`);Cy(ti.value)?(ii?.classList.remove("muted"),ii?.removeAttribute("aria-disabled"),ni.checked&&ni.getAttribute("data-exclusive-warn")?si?.classList.remove("tw-hidden"):si?.classList.add("tw-hidden")):(ii?.classList.add("muted"),ii?.setAttribute("aria-disabled","true"),si?.classList.add("tw-hidden"))}function Ey(ei){Hi(ei).length&&(Hi(".new-label.button").on("click",()=>(ah(".new-label"),Hi(".new-label.modal").modal({onApprove(){const ti=document.querySelector(".new-label.form");if(!ti.checkValidity())return ti.reportValidity(),!1;Hi(".new-label.form").trigger("submit")}}).modal("show"),!1)),Hi(".edit-label-button").on("click",function(){Hi("#label-modal-id").val(Hi(this).data("id"));const ti=Hi(".edit-label .label-name-input");ti.val(Hi(this).data("title"));const ii=Hi(".edit-label .label-is-archived-input");ii[0].checked=this.hasAttribute("data-is-archived");const ni=Hi(".edit-label .label-exclusive-input");ni[0].checked=this.hasAttribute("data-exclusive"),ni.data("exclusive-warn",Hi(this).data("num-issues")>0&&(!this.hasAttribute("data-exclusive")||!Cy(ti.val()))),ah(".edit-label"),Hi(".edit-label .label-desc-input").val(this.getAttribute("data-description"));const si=document.querySelector(".edit-label .js-color-picker-input input");return si.value=this.getAttribute("data-color"),si.dispatchEvent(new Event("input",{bubbles:!0})),Hi(".edit-label.modal").modal({onApprove(){const ai=document.querySelector(".edit-label.form");if(!ai.checkValidity())return ai.reportValidity(),!1;Hi(".edit-label.form").trigger("submit")}}).modal("show"),!1}),Hi(".new-label .label-name-input").on("input",()=>{ah(".new-label")}),Hi(".new-label .label-exclusive-input").on("change",()=>{ah(".new-label")}),Hi(".edit-label .label-name-input").on("input",()=>{ah(".edit-label")}),Hi(".edit-label .label-exclusive-input").on("change",()=>{ah(".edit-label")}))}function kT(){document.querySelectorAll(".organization").length&&(document.querySelector(".organization.settings.options #org_name")?.addEventListener("input",function(){const ei=this.value.toLowerCase()!==this.getAttribute("data-org-name").toLowerCase();(0,zn.oi)("#org-name-change-prompt",ei)}),Ey(".organization.settings.labels"))}function AT(){const ei="_giteaFomanticApiPatch",ti=Hi.api;Hi.api=Hi.fn.api=function(...ii){const ni=ti.bind(this),si=ti.apply(this,ii);if(typeof ii[0]!="string"){const ai=ni("internal","get");if(!ai.urlEncodedValue[ei]){const li=ai.urlEncodedValue;ai.urlEncodedValue=function(fi){try{return li(fi)}catch{return encodeURIComponent(fi)}},ai.urlEncodedValue[ei]=!0}}return si},Hi.api.settings=ti.settings}let TT=0;function dp(){return`_aria_auto_id_${TT++}`}function ky(ei,ti){const ii=ei.getAttribute("for"),ni=ti.getAttribute("id");if(ni&&!ii)ei.setAttribute("for",ni);else if(!ni&&!ii){const si=dp();ti.setAttribute("id",si),ei.setAttribute("for",si)}}function LT(){for(const ei of document.querySelectorAll(".ui.checkbox")){if(ei.hasAttribute("data-checkbox-patched"))continue;const ti=ei.querySelector("label"),ii=ei.querySelector("input");!ti||!ii||(ky(ti,ii),ei.setAttribute("data-checkbox-patched","true"))}}function RT(){for(const ei of document.querySelectorAll(".ui.form .field")){if(ei.hasAttribute("data-field-patched"))continue;const ti=ei.querySelector(":scope > label"),ii=ei.querySelector(":scope > input");!ti||!ii||(ky(ti,ii),ei.setAttribute("data-field-patched","true"))}}const Zc="_giteaAriaPatchDropdown",hp=Hi.fn.dropdown;function MT(){if(Hi.fn.dropdown===Xg)throw new Error("initAriaDropdownPatch could only be called once");Hi.fn.dropdown=Xg,Xg.settings=hp.settings}function Xg(...ei){const ti=hp.apply(this,ei),ii=!ei.length||typeof ei[0]!="string";for(const ni of this)ni[Zc]||FT(ni),ii&&OT(Hi(ni));return ti}function Ay(ei,ti){ti.id||(ti.id=dp()),ti.setAttribute("role",ei[Zc].listItemRole),ti.setAttribute("tabindex","-1");for(const ii of ti.querySelectorAll("a, input, button"))ii.setAttribute("tabindex","-1")}function Ty(ei){ei.id||(ei.id=dp()),ei.tabIndex=-1;const ti=ei.querySelector(".delete.icon");ti&&(ti.setAttribute("aria-hidden","false"),ti.setAttribute("aria-label",window.config.i18n.remove_label_str.replace("%s",ei.getAttribute("data-value"))),ti.setAttribute("role","button"))}function OT(ei){const ti=hp.bind(ei),ii=ti("internal","focusSearch"),ni=ti("internal","blurSearch");ti("internal","focusSearch",function(){ti("show"),ii.call(this)}),ti("internal","blurSearch",function(){ni.call(this),ti("hide")});const si={...ti("setting","templates"),t:performance.now()},ai=si.menu;si.menu=function(_i,ji,Mi,Ki){const on=ai(_i,ji,Mi,Ki),hn=document.createElement("div");hn.innerHTML=on;const gn=Hi(hn);return gn.find("> .item").each((Wn,Gn)=>Ay(ei[0],Gn)),ei[0][Zc].deferredRefreshAriaActiveItem(),gn.html()},ti("setting","templates",si);const li=ti("setting","onLabelCreate");ti("setting","onLabelCreate",function(_i,ji){const Mi=li.call(this,_i,ji);return Ty(Mi[0]),Mi});const fi=ti("internal","set"),hi=fi.direction;fi.direction=function(_i){hi.call(this,_i);const ji=ti("setting","className");_i=_i||ei.find("> .menu");const Mi=_i[0];Mi.classList.add(ji.loading),Mi.getBoundingClientRect().right>document.documentElement.clientWidth&&Mi.classList.add(ji.leftward),Mi.classList.remove(ji.loading)}}function DT(ei,ti,ii){ii.id||(ii.id=dp()),Hi(ii).find("> .item").each((si,ai)=>Ay(ei,ai)),ii.setAttribute("role",ei[Zc].listPopupRole);for(const si of ei.querySelectorAll(".ui.label"))Ty(si);ti.setAttribute("role",ti.getAttribute("role")??ei[Zc].focusableRole),ti.setAttribute("aria-haspopup",ei[Zc].listPopupRole),ti.setAttribute("aria-controls",ii.id),ti.setAttribute("aria-expanded","false");const ni=ei.getAttribute("data-tooltip-content");ni&&!ei.getAttribute("aria-label")&&ei.setAttribute("aria-label",ni)}function FT(ei){if(ei[Zc]={},ei.classList.contains("custom"))return;const ti=ei.querySelector("input.search"),ii=ti||ei;if(!ii)return;ti&&!ti.getAttribute("autocomplete")&&ti.setAttribute("autocomplete","off");let ni=Hi(ei).find("> .menu")[0];ni||(ni=document.createElement("div"),ni.classList.add("menu"),ei.append(ni));const si=ei.querySelectorAll("input").length>0;ei[Zc].focusableRole=si?"combobox":"menu",ei[Zc].listPopupRole=si?"listbox":"",ei[Zc].listItemRole=si?"option":"menuitem",IT(ei,ii,ni),DT(ei,ii,ni)}function IT(ei,ti,ii){const ni=()=>ii.classList.contains("visible")&&!ii.classList.contains("out")||ii.classList.contains("in"),si=()=>{const hi=ni();ti.setAttribute("aria-expanded",hi?"true":"false");const _i=Hi(ii).find("> .item.active, > .item.selected")[0];_i&&(hi?ti.setAttribute("aria-activedescendant",_i.id):ei[Zc].listPopupRole==="menu"&&(ti.removeAttribute("aria-activedescendant"),_i.classList.remove("active","selected")))};ei.addEventListener("keydown",hi=>{if(hi.key==="Enter"){const _i=hp.bind(Hi(ei));let ji=_i("get item",_i("get value"));ji||(ji=Hi(ii).find("> .item.selected")),ji?.[0]?.matches("a, .js-aria-clickable")&&ji[0].click()}});const ai=(hi=0)=>{setTimeout(si,hi)};ei[Zc].deferredRefreshAriaActiveItem=ai,ei.addEventListener("keyup",hi=>{hi.key.startsWith("Arrow")&&ai()});let li=0,fi=0;ei.addEventListener("mousedown",()=>{fi+=ni()?1:0,li++},!0),ei.addEventListener("focus",()=>{fi+=ni()?1:0,li++,ai()},!0),ei.addEventListener("blur",()=>{fi=li=0,ai(100)},!0),ei.addEventListener("mouseup",()=>{setTimeout(()=>{fi=li=0,ai(100)},0)},!0),ei.addEventListener("click",hi=>{ni()&&fi!==2&&li===2&&hi.stopPropagation(),li=fi=0},!0)}const Ly=Hi.fn.modal;function PT(){if(Hi.fn.modal===Gg)throw new Error("initAriaModalPatch could only be called once");Hi.fn.modal=Gg,Gg.settings=Ly.settings}function Gg(...ei){const ti=Ly.apply(this,ei);if(ei[0]==="show"||ei[0]?.autoShow)for(const ii of this)for(const ni of ii.querySelectorAll("form button.cancel:not([type])"))ni.setAttribute("type","button");return ti}function qT(){const ei=new Set(["clear queue","stop","stop all","destroy","force repaint","repaint","reset","looping","remove looping","disable","enable","set duration","save conditions","restore conditions"]);Hi.fn.transition=function(ti,ii,ni){if(ti==="is supported")return!0;if(ti==="is animating"||ti==="is inward"||ti==="is outward")return!1;let si;if(typeof ti=="string"){if(ei.has(ti))return this;si={animation:ti,...ii&&{duration:ii},...ni&&{onComplete:ni}}}else if(typeof ti=="object")si=ti;else throw new Error(`invalid argument: ${ti}`);const ai=si.animation?.startsWith("show")||si.animation?.endsWith(" in"),li=si.animation?.startsWith("hide")||si.animation?.endsWith(" out");return this.each((fi,hi)=>{let _i=ai;!ai&&!li&&(_i=this.hasClass("hidden")),si.onStart?.call(hi),_i?(hi.classList.remove("hidden"),hi.classList.add("visible","transition"),si.displayType&&hi.style.setProperty("display",si.displayType,"important"),si.onShow?.call(hi)):(hi.classList.add("hidden"),hi.classList.remove("visible"),hi.style.removeProperty("display"),si.onHidden?.call(hi)),si.onComplete?.call(hi)}),this}}const Ry=window.matchMedia("only screen and (max-width: 767.98px)");function NT(){Hi.fn.tab.settings.silent=!0,Hi.fn.dropdown.settings.fullTextSearch="exact",Hi.fn.dropdown.settings.className.label+=" tw-cursor-default",Hi.fn.dropdown.settings.templates.label=function(ei,ti,ii,ni){const si=Hi.fn.dropdown.settings.templates.escape;return si(ti,ii)+(0,Io.JW)("octicon-x",16,`${ni.delete} icon`)},qT(),AT(),LT(),RT(),MT(),PT()}async function BT(){const ei=document.querySelector(".repository.wiki .combo-markdown-editor textarea");if(!ei)return;const ti=document.querySelector(".repository.wiki.new .ui.form"),ii=ti.querySelector(".combo-markdown-editor");let ni,si=!1,ai;const li=async function(){if(si)return;const fi=ii.querySelector(".EasyMDEContainer .editor-preview-active"),_i=ii.querySelector(".EasyMDEContainer .editor-preview-active-side")||fi,ji=ei.value;if(ni&&_i&&ai!==ji){si=!0;const Mi=new FormData;Mi.append("mode",ni.previewMode),Mi.append("context",ni.previewContext),Mi.append("text",ji),Mi.append("wiki",ni.previewWiki);try{const on=await(await(0,so.LO)(ni.previewUrl,{data:Mi})).text();ai=ji,_i.innerHTML=`<div class="markup ui segment">${on}</div>`,Zm()}catch(Ki){console.error("Error rendering preview:",Ki)}finally{si=!1,setTimeout(li,1e3)}}else setTimeout(li,1e3)};li(),ni=await Of(ii,{useScene:"wiki",editorHeights:{minHeight:"300px",height:"calc(100vh - 600px)"},previewMode:"gfm",previewWiki:!0,easyMDEOptions:{previewRender:(fi,hi)=>hi.innerHTML,toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|","gitea-code-inline","code","quote","|","gitea-checkbox-empty","gitea-checkbox-checked","|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","preview","fullscreen","side-by-side","|","gitea-switch-to-textarea"]}}),ti.addEventListener("submit",fi=>{Z_(ei)||(fi.preventDefault(),fi.stopPropagation())})}function My(ei){ei&&document.querySelector(".wiki-content-toc details")?.removeAttribute("open")}function HT(){document.querySelector(".page-content.repository.wiki")&&(Ry.addEventListener("change",ei=>My(ei.matches)),My(Ry.matches),BT())}function $T(){document.addEventListener("click",ei=>{const ti=ei.target.closest(".escape-button, .unescape-button, .toggle-escape-button");if(!ti)return;ei.preventDefault();const ii=ti.closest(".file-content, .non-diff-file-content"),ni=ii?.querySelectorAll(".file-code, .file-view");if(ti.matches(".escape-button")){for(const si of ni)si.classList.add("unicode-escaped");(0,zn.y9)(ti),(0,zn.fi)((0,zn.D6)(ti,".unescape-button"))}else if(ti.matches(".unescape-button")){for(const si of ni)si.classList.remove("unicode-escaped");(0,zn.y9)(ti),(0,zn.fi)((0,zn.D6)(ti,".escape-button"))}else if(ti.matches(".toggle-escape-button")){const si=ni[0]?.classList.contains("unicode-escaped");for(const ai of ni)ai.classList.toggle("unicode-escaped",!si);(0,zn.oi)(ii.querySelectorAll(".unescape-button"),!si),(0,zn.oi)(ii.querySelectorAll(".escape-button"),si)}})}const VT={class:"ui dropdown custom branch-selector-dropdown ellipsis-items-nowrap"},UT={class:"flex-text-block gt-ellipsis"},WT={class:"ui icon search input"},zT={class:"icon"},KT=["placeholder"],XT={key:0,class:"branch-tag-tab"},GT=(0,ri.Lk)("div",{class:"branch-tag-divider"},null,-1),QT={class:"scrolling menu",ref:"scrollContainer"},YT={key:0,class:"loading-indicator is-loading"},JT=["onClick"],ZT={key:0,class:"ui label"},e2=["href"],t2=(0,ri.Lk)("svg",{width:"14",height:"14",class:"svg octicon-rss"},[(0,ri.Lk)("use",{href:"#svg-symbol-octicon-rss"})],-1),i2=(0,ri.Lk)("i",{class:"reference tags icon"},null,-1),n2=["textContent"],s2=["textContent"],r2={class:"text small"},o2={key:0},a2={key:1},l2={key:2},c2=["action"],u2=["value"],f2={key:1,class:"message"};function d2(ei,ti,ii,ni,si,ai){const li=(0,ri.g2)("svg-icon");return(0,ri.uX)(),(0,ri.CE)("div",VT,[(0,ri.Lk)("div",{class:"ui button branch-dropdown-button",onClick:ti[0]||(ti[0]=fi=>ei.menuVisible=!ei.menuVisible),onKeyup:ti[1]||(ti[1]=Qd(fi=>ei.menuVisible=!ei.menuVisible,["enter"]))},[(0,ri.Lk)("span",UT,[ei.release?((0,ri.uX)(),(0,ri.CE)(ri.FK,{key:0},[(0,ri.eW)((0,yi.v_)(ei.textReleaseCompare),1)],64)):((0,ri.uX)(),(0,ri.CE)(ri.FK,{key:1},[ei.isViewTag?((0,ri.uX)(),(0,ri.Wv)(li,{key:0,name:"octicon-tag"})):((0,ri.uX)(),(0,ri.Wv)(li,{key:1,name:"octicon-git-branch"})),(0,ri.Lk)("strong",{ref:"dropdownRefName",class:"tw-ml-2 tw-inline-block gt-ellipsis"},(0,yi.v_)(ei.refNameText),513)],64))]),(0,ri.bF)(li,{name:"octicon-triangle-down",size:14,"class-name":"dropdown icon"})],32),(0,ri.bo)((0,ri.Lk)("div",{class:(0,yi.C4)(["menu transition",{visible:ei.menuVisible}])},[(0,ri.Lk)("div",WT,[(0,ri.Lk)("i",zT,[(0,ri.bF)(li,{name:"octicon-filter",size:16})]),(0,ri.bo)((0,ri.Lk)("input",{name:"search",ref:"searchField",autocomplete:"off","onUpdate:modelValue":ti[2]||(ti[2]=fi=>ei.searchTerm=fi),onKeydown:ti[3]||(ti[3]=fi=>ei.keydown(fi)),placeholder:ei.searchFieldPlaceholder},null,40,KT),[[Cc,ei.searchTerm]])]),ei.showBranchesInDropdown?((0,ri.uX)(),(0,ri.CE)("div",XT,[(0,ri.Lk)("a",{class:(0,yi.C4)(["branch-tag-item muted",{active:ei.mode==="branches"}]),href:"#",onClick:ti[4]||(ti[4]=fi=>ei.handleTabSwitch("branches"))},[(0,ri.bF)(li,{name:"octicon-git-branch",size:16,"class-name":"tw-mr-1"}),(0,ri.eW)((0,yi.v_)(ei.textBranches),1)],2),ei.noTag?(0,ri.Q3)("v-if",!0):((0,ri.uX)(),(0,ri.CE)("a",{key:0,class:(0,yi.C4)(["branch-tag-item muted",{active:ei.mode==="tags"}]),href:"#",onClick:ti[5]||(ti[5]=fi=>ei.handleTabSwitch("tags"))},[(0,ri.bF)(li,{name:"octicon-tag",size:16,"class-name":"tw-mr-1"}),(0,ri.eW)((0,yi.v_)(ei.textTags),1)],2))])):(0,ri.Q3)("v-if",!0),GT,(0,ri.Lk)("div",QT,[(0,ri.bF)(li,{name:"octicon-rss","symbol-id":"svg-symbol-octicon-rss"}),ei.isLoading?((0,ri.uX)(),(0,ri.CE)("div",YT)):(0,ri.Q3)("v-if",!0),((0,ri.uX)(!0),(0,ri.CE)(ri.FK,null,(0,ri.pI)(ei.filteredItems,(fi,hi)=>((0,ri.uX)(),(0,ri.CE)("div",{key:fi.name,class:(0,yi.C4)(["item",{selected:fi.selected,active:ei.active===hi}]),onClick:_i=>ei.selectItem(fi),ref_for:!0,ref:"listItem"+hi},[(0,ri.eW)((0,yi.v_)(fi.name)+" ",1),fi.name===ei.repoDefaultBranch&&ei.mode==="branches"?((0,ri.uX)(),(0,ri.CE)("div",ZT,(0,yi.v_)(ei.textDefaultBranchLabel),1)):(0,ri.Q3)("v-if",!0),(0,ri.bo)((0,ri.Lk)("a",{role:"button",class:"rss-icon",href:ei.rssURLPrefix+fi.url,target:"_blank",onClick:ti[6]||(ti[6]=ml(()=>{},["stop"]))},[(0,ri.Q3)(" creating a lot of Vue component is pretty slow, so we use a static SVG here "),t2],8,e2),[[Jl,ei.enableFeed&&ei.mode==="branches"]])],10,JT))),128)),ei.showCreateNewBranch?((0,ri.uX)(),(0,ri.CE)("div",{key:1,class:(0,yi.C4)(["item",{active:ei.active===ei.filteredItems.length}]),ref:"listItem"+ei.filteredItems.length},[(0,ri.Lk)("a",{href:"#",onClick:ti[7]||(ti[7]=fi=>ei.createNewBranch())},[(0,ri.bo)((0,ri.Lk)("div",null,[i2,(0,ri.Lk)("span",{textContent:(0,yi.v_)(ei.textCreateTag.replace("%s",ei.searchTerm))},null,8,n2)],512),[[Jl,ei.shouldCreateTag]]),(0,ri.bo)((0,ri.Lk)("div",null,[(0,ri.bF)(li,{name:"octicon-git-branch"}),(0,ri.Lk)("span",{textContent:(0,yi.v_)(ei.textCreateBranch.replace("%s",ei.searchTerm))},null,8,s2)],512),[[Jl,!ei.shouldCreateTag]]),(0,ri.Lk)("div",r2,[ei.isViewBranch||ei.release?((0,ri.uX)(),(0,ri.CE)("span",o2,(0,yi.v_)(ei.textCreateBranchFrom.replace("%s",ei.branchName)),1)):ei.isViewTag?((0,ri.uX)(),(0,ri.CE)("span",a2,(0,yi.v_)(ei.textCreateBranchFrom.replace("%s",ei.tagName)),1)):((0,ri.uX)(),(0,ri.CE)("span",l2,(0,yi.v_)(ei.textCreateBranchFrom.replace("%s",ei.commitIdShort)),1))])]),(0,ri.Lk)("form",{ref:"newBranchForm",action:ei.formActionUrl,method:"post"},[(0,ri.Lk)("input",{type:"hidden",name:"_csrf",value:ei.csrfToken},null,8,u2),(0,ri.bo)((0,ri.Lk)("input",{type:"hidden",name:"new_branch_name","onUpdate:modelValue":ti[8]||(ti[8]=fi=>ei.searchTerm=fi)},null,512),[[Cc,ei.searchTerm]]),(0,ri.bo)((0,ri.Lk)("input",{type:"hidden",name:"create_tag","onUpdate:modelValue":ti[9]||(ti[9]=fi=>ei.shouldCreateTag=fi)},null,512),[[Cc,ei.shouldCreateTag]]),ei.treePath?(0,ri.bo)(((0,ri.uX)(),(0,ri.CE)("input",{key:0,type:"hidden",name:"current_path","onUpdate:modelValue":ti[10]||(ti[10]=fi=>ei.treePath=fi)},null,512)),[[Cc,ei.treePath]]):(0,ri.Q3)("v-if",!0)],8,c2)],2)):(0,ri.Q3)("v-if",!0)],512),ei.showNoResults&&!ei.isLoading?((0,ri.uX)(),(0,ri.CE)("div",f2,(0,yi.v_)(ei.noResults),1)):(0,ri.Q3)("v-if",!0)],2),[[Jl,ei.menuVisible]])])}const Oy={components:{SvgIcon:Io.Ah},computed:{filteredItems(){const ei=this.items.filter(ti=>(this.mode==="branches"&&ti.branch||this.mode==="tags"&&ti.tag)&&(!this.searchTerm||ti.name.toLowerCase().includes(this.searchTerm.toLowerCase())));return this.active=!ei.length&&this.showCreateNewBranch?0:-1,ei},showNoResults(){return!this.filteredItems.length&&!this.showCreateNewBranch},showCreateNewBranch(){return this.disableCreateBranch||!this.searchTerm?!1:!this.items.filter(ei=>ei.name.toLowerCase()===this.searchTerm.toLowerCase()).length},formActionUrl(){return`${this.repoLink}/branches/_new/${this.branchNameSubURL}`},shouldCreateTag(){return this.mode==="tags"}},watch:{menuVisible(ei){ei&&(this.focusSearchField(),this.fetchBranchesOrTags())}},beforeMount(){this.viewType==="tree"?(this.isViewTree=!0,this.refNameText=this.commitIdShort):this.viewType==="tag"?(this.isViewTag=!0,this.refNameText=this.tagName):(this.isViewBranch=!0,this.refNameText=this.branchName),document.body.addEventListener("click",ei=>{this.$el.contains(ei.target)||this.menuVisible&&(this.menuVisible=!1)})},methods:{selectItem(ei){const ti=this.getSelected();ti!==null&&(ti.selected=!1),ei.selected=!0;const ii=ei.tag?this.tagURLPrefix+ei.url+this.tagURLSuffix:this.branchURLPrefix+ei.url+this.branchURLSuffix;this.branchForm?(this.isViewTree=!1,this.isViewTag=!1,this.isViewBranch=!1,this.$refs.dropdownRefName.textContent=ei.name,this.setAction?document.getElementById(this.branchForm)?.setAttribute("action",ii):fd()(`#${this.branchForm} input[name="refURL"]`).val(ii),fd()(`#${this.branchForm} input[name="ref"]`).val(ei.name),ei.tag?(this.isViewTag=!0,fd()(`#${this.branchForm} input[name="refType"]`).val("tag")):(this.isViewBranch=!0,fd()(`#${this.branchForm} input[name="refType"]`).val("branch")),this.submitForm&&fd()(`#${this.branchForm}`).trigger("submit"),this.menuVisible=!1):window.location.href=ii},createNewBranch(){this.showCreateNewBranch&&fd()(this.$refs.newBranchForm).trigger("submit")},focusSearchField(){(0,ri.dY)(()=>{this.$refs.searchField.focus()})},getSelected(){for(let ei=0,ti=this.items.length;ei<ti;++ei)if(this.items[ei].selected)return this.items[ei];return null},getSelectedIndexInFiltered(){for(let ei=0,ti=this.filteredItems.length;ei<ti;++ei)if(this.filteredItems[ei].selected)return ei;return-1},scrollToActive(){let ei=this.$refs[`listItem${this.active}`];if(!ei||!ei.length)return;Array.isArray(ei)&&(ei=ei[0]);const ti=this.$refs.scrollContainer;ei.offsetTop<ti.scrollTop?ti.scrollTop=ei.offsetTop:ei.offsetTop+ei.clientHeight>ti.scrollTop+ti.clientHeight&&(ti.scrollTop=ei.offsetTop+ei.clientHeight-ti.clientHeight)},keydown(ei){if(ei.keyCode===40){if(ei.preventDefault(),this.active===-1&&(this.active=this.getSelectedIndexInFiltered()),this.active+(this.showCreateNewBranch?0:1)>=this.filteredItems.length)return;this.active++,this.scrollToActive()}else if(ei.keyCode===38){if(ei.preventDefault(),this.active===-1&&(this.active=this.getSelectedIndexInFiltered()),this.active<=0)return;this.active--,this.scrollToActive()}else ei.keyCode===13?(ei.preventDefault(),this.active>=this.filteredItems.length?this.createNewBranch():this.active>=0&&this.selectItem(this.filteredItems[this.active])):ei.keyCode===27&&(ei.preventDefault(),this.menuVisible=!1)},handleTabSwitch(ei){this.isLoading||(this.mode=ei,this.focusSearchField(),this.fetchBranchesOrTags())},async fetchBranchesOrTags(){if(!(!["branches","tags"].includes(this.mode)||this.isLoading)&&!(this.hasListInitialized[this.mode]||this.mode==="branches"&&!this.showBranchesInDropdown||this.mode==="tags"&&this.noTag)){this.isLoading=!0;try{const ei=await(0,so.fG)(`${this.repoLink}/${this.mode}/list`),{results:ti}=await ei.json();for(const ii of ti){let ni=!1;this.mode==="branches"?ni=ii===this.defaultSelectedRefName:ni=ii===(this.release?this.release.tagName:this.defaultSelectedRefName),this.items.push({name:ii,url:Qb(ii),branch:this.mode==="branches",tag:this.mode==="tags",selected:ni})}this.hasListInitialized[this.mode]=!0}catch(ei){pl(`Network error when fetching ${this.mode}, error: ${ei}`)}finally{this.isLoading=!1}}}}};function h2(ei){for(const[ti,ii]of document.querySelectorAll(ei).entries()){const ni={csrfToken:window.config.csrfToken,items:[],searchTerm:"",refNameText:"",menuVisible:!1,release:null,isViewTag:!1,isViewBranch:!1,isViewTree:!1,active:0,isLoading:!1,hasListInitialized:{branches:!1,tags:!1},...window.config.pageData.branchDropdownDataList[ti]},si={...Oy,data(){return ni}};dc(si).mount(ii)}}var m2=Oy;const ZR=(0,zc.A)(m2,[["render",d2]]);var eM=null;const{pageData:Dy}=window.config;async function p2(ei,ti){const[{Cite:ii,plugins:ni}]=await Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl").then(__webpack_require__.bind(__webpack_require__,"./node_modules/@citation-js/core/lib-mjs/index.js")),Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl"),__webpack_require__.e("citation-js-formats")]).then(__webpack_require__.t.bind(__webpack_require__,"./node_modules/@citation-js/plugin-software-formats/lib/index.js",19)),Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl"),__webpack_require__.e("citation-js-bibtex")]).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@citation-js/plugin-bibtex/lib-mjs/index.js")),Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl"),__webpack_require__.e("citation-js-csl")]).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@citation-js/plugin-csl/lib-mjs/index.js"))]),{citationFileContent:si}=Dy,ai=ni.config.get("@bibtex");ai.constants.fieldTypes.doi=["field","literal"],ai.constants.fieldTypes.version=["field","literal"];const li=new ii(si),fi=(0,na.kk)()||"en-US",hi=li.format("bibliography",{template:"apa",lang:fi}),_i=li.format("bibtex",{lang:fi});ti.setAttribute("data-text",_i),ei.setAttribute("data-text",hi)}async function g2(){const ei="apa";if(!Dy.citationFileContent)return;const ti=document.getElementById("citation-copy-apa"),ii=document.getElementById("citation-copy-bibtex"),ni=document.getElementById("citation-copy-content");if(!ti&&!ii||!ni)return;const si=()=>{const ai=(localStorage.getItem("citation-copy-format")||ei)==="bibtex",li=(ai?ii:ti).getAttribute("data-text");ni.value=li,ii.classList.toggle("primary",ai),ti.classList.toggle("primary",!ai)};document.getElementById("cite-repo-button")?.addEventListener("click",async ai=>{const li=ai.target.closest(".ui.dropdown.button");li.classList.add("is-loading");try{try{await p2(ti,ii)}catch(fi){console.error(`initCitationFileCopyContent error: ${fi}`,fi);return}si(),ti.addEventListener("click",()=>{localStorage.setItem("citation-copy-format","apa"),si()}),ii.addEventListener("click",()=>{localStorage.setItem("citation-copy-format","bibtex"),si()}),ni.addEventListener("click",()=>{ni.select()})}finally{li.classList.remove("is-loading")}Hi("#cite-repo-modal").modal("show")})}const tM=ei=>(_pushScopeId("data-v-4cc25658"),ei=ei(),_popScopeId(),ei),v2=["innerHTML"],b2=["action"],_2=["value"],y2={class:"field"},w2={class:"field"},x2=["placeholder"],j2=["data-tooltip-content"],S2={key:1,class:"field"},C2=["placeholder"],E2=["value"],k2={key:2,class:"ui checkbox tw-ml-1"},A2={for:"delete-branch-after-merge"},T2={key:2,class:"tw-flex"},L2={class:"ui button"},R2={class:"button-text"},M2=["onClick"],O2={class:"action-text"},D2=["onClick"],F2={class:"auto-merge-tip"},I2=["onClick"],P2={class:"action-text"},q2=["action"],N2=["value"],B2={class:"ui button"};function H2(ei,ti,ii,ni,si,ai){const li=(0,ri.g2)("svg-icon");return(0,ri.uX)(),(0,ri.CE)(ri.FK,null,[(0,ri.Q3)(`
if this component is shown, either the user is an admin (can do a merge without checks), or they are a writer who has the permission to do a merge
if the user is a writer and can't do a merge now (canMergeNow==false), then only show the Auto Merge for them
How to test the UI manually:
* Method 1: manually set some variables in pull.tmpl, eg: {{$notAllOverridableChecksOk = true}} {{$canMergeNow = false}}
* Method 2: make a protected branch, then set state=pending/success :
curl -X POST \${root_url}/api/v1/repos/\${owner}/\${repo}/statuses/\${sha} \\
`),(0,ri.Lk)("div",null,[(0,ri.Q3)(" eslint-disable-next-line vue/no-v-html "),ei.mergeForm.hasPendingPullRequestMerge?((0,ri.uX)(),(0,ri.CE)("div",{key:0,innerHTML:ei.mergeForm.hasPendingPullRequestMergeTip,class:"ui info message"},null,8,v2)):(0,ri.Q3)("v-if",!0),(0,ri.Q3)(" another similar form is in pull.tmpl (manual merge)"),ei.showActionForm?((0,ri.uX)(),(0,ri.CE)("form",{key:1,class:"ui form form-fetch-action",action:ei.mergeForm.baseLink+"/merge",method:"post"},[(0,ri.Lk)("input",{type:"hidden",name:"_csrf",value:ei.csrfToken},null,8,_2),(0,ri.bo)((0,ri.Lk)("input",{type:"hidden",name:"head_commit_id","onUpdate:modelValue":ti[0]||(ti[0]=fi=>ei.mergeForm.pullHeadCommitID=fi)},null,512),[[Cc,ei.mergeForm.pullHeadCommitID]]),(0,ri.bo)((0,ri.Lk)("input",{type:"hidden",name:"merge_when_checks_succeed","onUpdate:modelValue":ti[1]||(ti[1]=fi=>ei.autoMergeWhenSucceed=fi)},null,512),[[Cc,ei.autoMergeWhenSucceed]]),(0,ri.bo)((0,ri.Lk)("input",{type:"hidden",name:"force_merge","onUpdate:modelValue":ti[2]||(ti[2]=fi=>ai.forceMerge=fi)},null,512),[[Cc,ai.forceMerge]]),ei.mergeStyleDetail.hideMergeMessageTexts?(0,ri.Q3)("v-if",!0):((0,ri.uX)(),(0,ri.CE)(ri.FK,{key:0},[(0,ri.Lk)("div",y2,[(0,ri.bo)((0,ri.Lk)("input",{type:"text",name:"merge_title_field","onUpdate:modelValue":ti[3]||(ti[3]=fi=>ei.mergeTitleFieldValue=fi)},null,512),[[Cc,ei.mergeTitleFieldValue]])]),(0,ri.Lk)("div",w2,[(0,ri.bo)((0,ri.Lk)("textarea",{name:"merge_message_field",rows:"5",placeholder:ei.mergeForm.mergeMessageFieldPlaceHolder,"onUpdate:modelValue":ti[4]||(ti[4]=fi=>ei.mergeMessageFieldValue=fi)},null,8,x2),[[Cc,ei.mergeMessageFieldValue]]),ei.mergeMessageFieldValue!==ei.mergeForm.defaultMergeMessage?((0,ri.uX)(),(0,ri.CE)("button",{key:0,onClick:ti[5]||(ti[5]=ml((...fi)=>ai.clearMergeMessage&&ai.clearMergeMessage(...fi),["prevent"])),class:"btn tw-mt-1 tw-p-1 interact-fg","data-tooltip-content":ei.mergeForm.textClearMergeMessageHint},(0,yi.v_)(ei.mergeForm.textClearMergeMessage),9,j2)):(0,ri.Q3)("v-if",!0)])],64)),ei.mergeStyle==="manually-merged"?((0,ri.uX)(),(0,ri.CE)("div",S2,[(0,ri.Lk)("input",{type:"text",name:"merge_commit_id",placeholder:ei.mergeForm.textMergeCommitId},null,8,C2)])):(0,ri.Q3)("v-if",!0),(0,ri.Lk)("button",{class:(0,yi.C4)(["ui button",ai.mergeButtonStyleClass]),type:"submit",name:"do",value:ei.mergeStyle},[(0,ri.eW)((0,yi.v_)(ei.mergeStyleDetail.textDoMerge)+" ",1),ei.autoMergeWhenSucceed?((0,ri.uX)(),(0,ri.CE)(ri.FK,{key:0},[(0,ri.eW)((0,yi.v_)(ei.mergeForm.textAutoMergeButtonWhenSucceed),1)],64)):(0,ri.Q3)("v-if",!0)],10,E2),(0,ri.Lk)("button",{class:"ui button merge-cancel",onClick:ti[6]||(ti[6]=fi=>ai.toggleActionForm(!1))},(0,yi.v_)(ei.mergeForm.textCancel),1),ei.mergeForm.isPullBranchDeletable&&!ei.autoMergeWhenSucceed?((0,ri.uX)(),(0,ri.CE)("div",k2,[(0,ri.bo)((0,ri.Lk)("input",{name:"delete_branch_after_merge",type:"checkbox","onUpdate:modelValue":ti[7]||(ti[7]=fi=>ei.deleteBranchAfterMerge=fi),id:"delete-branch-after-merge"},null,512),[[Jp,ei.deleteBranchAfterMerge]]),(0,ri.Lk)("label",A2,(0,yi.v_)(ei.mergeForm.textDeleteBranch),1)])):(0,ri.Q3)("v-if",!0)],8,b2)):(0,ri.Q3)("v-if",!0),ei.showActionForm?(0,ri.Q3)("v-if",!0):((0,ri.uX)(),(0,ri.CE)("div",T2,[(0,ri.Q3)(" the merge button "),(0,ri.Lk)("div",{class:(0,yi.C4)(["ui buttons merge-button",[ei.mergeForm.emptyCommit?"":ei.mergeForm.allOverridableChecksOk?"primary":"red"]]),onClick:ti[9]||(ti[9]=fi=>ai.toggleActionForm(!0))},[(0,ri.Lk)("button",L2,[(0,ri.bF)(li,{name:"octicon-git-merge"}),(0,ri.Lk)("span",R2,[(0,ri.eW)((0,yi.v_)(ei.mergeStyleDetail.textDoMerge)+" ",1),ei.autoMergeWhenSucceed?((0,ri.uX)(),(0,ri.CE)(ri.FK,{key:0},[(0,ri.eW)((0,yi.v_)(ei.mergeForm.textAutoMergeButtonWhenSucceed),1)],64)):(0,ri.Q3)("v-if",!0)])]),ei.mergeStyleAllowedCount>1?((0,ri.uX)(),(0,ri.CE)("div",{key:0,class:"ui dropdown icon button",onClick:ti[8]||(ti[8]=ml(fi=>ei.showMergeStyleMenu=!ei.showMergeStyleMenu,["stop"]))},[(0,ri.bF)(li,{name:"octicon-triangle-down",size:14}),(0,ri.Lk)("div",{class:(0,yi.C4)(["menu",{show:ei.showMergeStyleMenu}])},[((0,ri.uX)(!0),(0,ri.CE)(ri.FK,null,(0,ri.pI)(ei.mergeForm.mergeStyles,fi=>((0,ri.uX)(),(0,ri.CE)(ri.FK,null,[(0,ri.Q3)(' if can merge now, show one action "merge now", and an action "auto merge when succeed" '),fi.allowed&&ei.mergeForm.canMergeNow?((0,ri.uX)(),(0,ri.CE)("div",{class:"item",key:fi.name,onClick:ml(hi=>ai.switchMergeStyle(fi.name),["stop"])},[(0,ri.Lk)("div",O2,(0,yi.v_)(fi.textDoMerge),1),fi.hideAutoMerge?(0,ri.Q3)("v-if",!0):((0,ri.uX)(),(0,ri.CE)("div",{key:0,class:"auto-merge-small",onClick:ml(hi=>ai.switchMergeStyle(fi.name,!0),["stop"])},[(0,ri.bF)(li,{name:"octicon-clock",size:14}),(0,ri.Lk)("div",F2,(0,yi.v_)(ei.mergeForm.textAutoMergeWhenSucceed),1)],8,D2))],8,M2)):(0,ri.Q3)("v-if",!0),(0,ri.Q3)(' if can NOT merge now, only show one action "auto merge when succeed" '),fi.allowed&&!ei.mergeForm.canMergeNow&&!fi.hideAutoMerge?((0,ri.uX)(),(0,ri.CE)("div",{class:"item",key:fi.name,onClick:ml(hi=>ai.switchMergeStyle(fi.name,!0),["stop"])},[(0,ri.Lk)("div",P2,(0,yi.v_)(fi.textDoMerge)+" "+(0,yi.v_)(ei.mergeForm.textAutoMergeButtonWhenSucceed),1)],8,I2)):(0,ri.Q3)("v-if",!0)],64))),256))],2)])):(0,ri.Q3)("v-if",!0)],2),(0,ri.Q3)(" the cancel auto merge button "),ei.mergeForm.hasPendingPullRequestMerge?((0,ri.uX)(),(0,ri.CE)("form",{key:0,action:ei.mergeForm.baseLink+"/cancel_auto_merge",method:"post",class:"tw-ml-4"},[(0,ri.Lk)("input",{type:"hidden",name:"_csrf",value:ei.csrfToken},null,8,N2),(0,ri.Lk)("button",B2,(0,yi.v_)(ei.mergeForm.textAutoMergeCancelSchedule),1)],8,q2)):(0,ri.Q3)("v-if",!0)]))])],2112)}const{csrfToken:$2,pageData:V2}=window.config;var U2={components:{SvgIcon:Io.Ah},data:()=>({csrfToken:$2,mergeForm:V2.pullRequestMergeForm,mergeTitleFieldValue:"",mergeMessageFieldValue:"",deleteBranchAfterMerge:!1,autoMergeWhenSucceed:!1,mergeStyle:"",mergeStyleDetail:{hideMergeMessageTexts:!1,textDoMerge:"",mergeTitleFieldText:"",mergeMessageFieldText:"",hideAutoMerge:!1},mergeStyleAllowedCount:0,showMergeStyleMenu:!1,showActionForm:!1}),computed:{mergeButtonStyleClass(){return this.mergeForm.allOverridableChecksOk||this.autoMergeWhenSucceed?"primary":"red"},forceMerge(){return this.mergeForm.canMergeNow&&!this.mergeForm.allOverridableChecksOk}},watch:{mergeStyle(ei){this.mergeStyleDetail=this.mergeForm.mergeStyles.find(ti=>ti.name===ei);for(const ti of document.querySelectorAll("[data-pull-merge-style]"))(0,zn.oi)(ti,ti.getAttribute("data-pull-merge-style")===ei)}},created(){this.mergeStyleAllowedCount=this.mergeForm.mergeStyles.reduce((ti,ii)=>ti+(ii.allowed?1:0),0);let ei=this.mergeForm.mergeStyles.find(ti=>ti.allowed&&ti.name===this.mergeForm.defaultMergeStyle)?.name;ei||(ei=this.mergeForm.mergeStyles.find(ti=>ti.allowed)?.name),this.switchMergeStyle(ei,!this.mergeForm.canMergeNow)},mounted(){document.addEventListener("mouseup",this.hideMergeStyleMenu)},unmounted(){document.removeEventListener("mouseup",this.hideMergeStyleMenu)},methods:{hideMergeStyleMenu(){this.showMergeStyleMenu=!1},toggleActionForm(ei){this.showActionForm=ei,ei&&(this.deleteBranchAfterMerge=this.mergeForm.defaultDeleteBranchAfterMerge,this.mergeTitleFieldValue=this.mergeStyleDetail.mergeTitleFieldText,this.mergeMessageFieldValue=this.mergeStyleDetail.mergeMessageFieldText)},switchMergeStyle(ei,ti=!1){this.mergeStyle=ei,this.autoMergeWhenSucceed=ti},clearMergeMessage(){this.mergeMessageFieldValue=this.mergeForm.defaultMergeMessage}}},W2=(0,zc.A)(U2,[["render",H2],["__scopeId","data-v-4cc25658"]]);function z2(){const ei=document.getElementById("pull-request-merge-form");if(!ei)return;dc(W2).mount(ei)}function K2(){for(const ei of document.querySelectorAll(".commit-status-hide-checks")){const ii=ei.closest(".commit-status-panel").querySelector(".commit-status-list");ei.addEventListener("click",()=>{ii.style.maxHeight=ii.style.maxHeight?"":"0px",ei.textContent=ei.getAttribute(ii.style.maxHeight?"data-show-all":"data-hide-all")})}}const{csrfToken:X2}=window.config;async function G2(ei){ei.preventDefault();const ti=this.closest(".header").nextElementSibling,ii=ti.querySelector(".edit-content-zone"),ni=ti.querySelector(".render-content"),si=ti.querySelector(".raw-content");let ai;const li=async _i=>{if(!_i)return null;let ji=!1,Mi={};const Ki=await r_(_i,{url:_i.getAttribute("data-upload-url"),headers:{"X-Csrf-Token":X2},maxFiles:_i.getAttribute("data-max-file"),maxFilesize:_i.getAttribute("data-max-size"),acceptedFiles:["*/*",""].includes(_i.getAttribute("data-accepts"))?null:_i.getAttribute("data-accepts"),addRemoveLinks:!0,dictDefaultMessage:_i.getAttribute("data-default-message"),dictInvalidFileType:_i.getAttribute("data-invalid-input-type"),dictFileTooBig:_i.getAttribute("data-file-too-big"),dictRemoveFile:_i.getAttribute("data-remove-file"),timeout:0,thumbnailMethod:"contain",thumbnailWidth:480,thumbnailHeight:480,init(){this.on("success",(on,hn)=>{on.uuid=hn.uuid,Mi[on.uuid]={submitted:!1};const gn=document.createElement("input");gn.id=hn.uuid,gn.name="files",gn.type="hidden",gn.value=hn.uuid,_i.querySelector(".files").append(gn)}),this.on("removedfile",async on=>{if(document.getElementById(on.uuid)?.remove(),!ji&&_i.getAttribute("data-remove-url")&&!Mi[on.uuid].submitted)try{await(0,so.LO)(_i.getAttribute("data-remove-url"),{data:new URLSearchParams({file:on.uuid})})}catch(hn){console.error(hn)}}),this.on("submit",()=>{for(const on of Object.keys(Mi))Mi[on].submitted=!0}),this.on("reload",async()=>{try{const hn=await(await(0,so.fG)(ii.getAttribute("data-attachment-url"))).json();ji=!0,Ki.removeAllFiles(!0),_i.querySelector(".files").innerHTML="";for(const gn of _i.querySelectorAll(".dz-preview"))gn.remove();Mi={},ji=!1;for(const gn of hn){const es=`${_i.getAttribute("data-link-url")}/${gn.uuid}`;Ki.emit("addedfile",gn),Ki.emit("thumbnail",gn,es),Ki.emit("complete",gn),Mi[gn.uuid]={submitted:!0},_i.querySelector(`img[src='${es}']`).style.maxWidth="100%";const Wn=document.createElement("input");Wn.id=gn.uuid,Wn.name="files",Wn.type="hidden",Wn.value=gn.uuid,_i.querySelector(".files").append(Wn)}_i.querySelector(".dz-preview")||_i.classList.remove("dz-started")}catch(on){console.error(on)}})}});return Ki.emit("reload"),Ki},fi=_i=>{_i.preventDefault(),(0,zn.fi)(ni),(0,zn.y9)(ii),ai.attachedDropzoneInst?.emit("reload")},hi=async _i=>{_i.preventDefault(),(0,zn.fi)(ni),(0,zn.y9)(ii);const ji=ai.attachedDropzoneInst;try{const Mi=new URLSearchParams({content:ai.value(),context:ii.getAttribute("data-context")});for(const gn of ji?.element.querySelectorAll(".files [name=files]")??[])Mi.append("files[]",gn.value);const on=await(await(0,so.LO)(ii.getAttribute("data-update-url"),{data:Mi})).json();if(!on.content)ni.innerHTML=document.getElementById("no-content").innerHTML,si.textContent="";else{ni.innerHTML=on.content,si.textContent=ai.value();const gn=ni.querySelectorAll("p .ref-issue");vg(gn)}const hn=ti;hn.querySelector(".dropzone-attachments")?on.attachments===""?hn.querySelector(".dropzone-attachments").remove():hn.querySelector(".dropzone-attachments").outerHTML=on.attachments:on.attachments!==""&&hn.insertAdjacentHTML("beforeend",on.attachments),ji?.emit("submit"),ji?.emit("reload"),Zm(),s_()}catch(Mi){console.error(Mi)}};ai=Bg(ii.querySelector(".combo-markdown-editor")),ai||(ii.innerHTML=document.getElementById("issue-comment-editor-template").innerHTML,ai=await Of(ii.querySelector(".combo-markdown-editor")),ai.attachedDropzoneInst=await li(ii.querySelector(".dropzone")),ii.querySelector(".ui.cancel.button").addEventListener("click",fi),ii.querySelector(".ui.primary.button").addEventListener("click",hi)),(0,zn.fi)(ii),(0,zn.y9)(ni),ai.value()||ai.value(si.textContent),ai.switchTabToEditor(),ai.focus()}function Q2(){Hi(document).on("click",".edit-content",G2),Hi(document).on("click",".quote-reply",async function(ei){ei.preventDefault();const ti=Hi(this).data("target"),ni=`> ${Hi(`#${ti}`).text().replace(/\n/g,`
`),Hi(`.ui${si}.list .no-select`).addClass("tw-hidden"),Hi(ai).val(Hi(this).data("id"))}),li.find(".no-select.item").on("click",function(){Hi(this).parent().find(".item:not(.no-select)").each(function(){Hi(this).removeClass("selected active")}),hi&&(async()=>(await rh(li.data("update-url"),"",li.data("issue-id"),Hi(this).data("id")),mp()))(),fi.find(".selected").html(""),fi.find(".no-select").removeClass("tw-hidden"),Hi(ai).val("")})}ni(".select-project","#project_id"),ni(".select-milestone","#milestone_id"),ni(".select-assignee","#assignee_id")}function J2(){if(!Hi(".page-content.repository").length)return;if(h2(".js-branch-tag-selector"),Hi(".repository.settings.options").length>0){Hi(".enable-system").on("change",function(){this.checked?(Hi(Hi(this).data("target")).removeClass("disabled"),Hi(this).data("context")||Hi(Hi(this).data("context")).addClass("disabled")):(Hi(Hi(this).data("target")).addClass("disabled"),Hi(this).data("context")||Hi(Hi(this).data("context")).removeClass("disabled"))}),Hi(".enable-system-radio").on("change",function(){this.value==="false"?(Hi(Hi(this).data("target")).addClass("disabled"),Hi(this).data("context")!==void 0&&Hi(Hi(this).data("context")).removeClass("disabled")):this.value==="true"&&(Hi(Hi(this).data("target")).removeClass("disabled"),Hi(this).data("context")!==void 0&&Hi(Hi(this).data("context")).addClass("disabled"))});const ii=Hi(".js-tracker-issue-style");ii.on("change input",()=>{const ni=ii.filter(":checked").val();Hi("#tracker-issue-style-regex-box").toggleClass("disabled",ni!=="regexp")})}Ey(".repository.labels"),Hi(".repository.new.milestone").length>0&&Hi("#clear-date").on("click",()=>(Hi("#deadline").val(""),!1)),Hi(".repository.new.repo").length>0&&Hi('input[name="gitignores"], input[name="license"]').on("change",()=>{const ii=Hi('input[name="gitignores"]').val(),ni=Hi('input[name="license"]').val();(ii||ni)&&(document.querySelector('input[name="auto_init"]').checked=!0)}),Hi(".repository.diff").length&&(lk(".choose.branch .dropdown"),ck(".choose.branch .dropdown")),ak(),g2(),iA(),Hi(".repository.view.issue").length>0&&(Q2(),$E(),HE(),BE(),PE(),nT(),NE(),TE(),LE(),RE(),ME(),gy(),z2(),K2());const ti=Hi(".repository.compare.pull");ti.length>0&&ti.find("button.show-form").on("click",function(ii){ii.preventDefault(),(0,zn.y9)(Hi(this).parent());const ni=ti.find(".pullrequest-form");(0,zn.fi)(ni)}),$T()}const{i18n:om}=window.config;function Z2(){const ei=document.getElementById("copy-content");!ei||ei.classList.contains("disabled")||ei.addEventListener("click",async()=>{if(ei.classList.contains("is-loading"))return;let ti,ii=!1;const ni=ei.getAttribute("data-link");if(ni){ei.classList.add("is-loading","loading-icon-2px");try{const ai=await(0,so.fG)(ni,{credentials:"include",redirect:"follow"}),li=ai.headers.get("content-type");li.startsWith("image/")&&!li.startsWith("image/svg")?(ii=!0,ti=await ai.blob()):ti=await ai.text()}catch{return Mf(ei,om.copy_error)}finally{ei.classList.remove("is-loading","loading-icon-2px")}}else{const ai=document.querySelectorAll(".file-view .lines-code");ti=Array.from(ai,li=>li.textContent).join("")}if(await Zh(ti))Mf(ei,om.copy_success);else if(ii){const ai=await Zh(await(0,na.hC)(ti,"image/png"));Mf(ei,ai?om.copy_success:om.copy_error)}else Mf(ei,om.copy_error)})}async function eL(){const ei=document.querySelector("#captcha");if(!ei)return;const ti=ei.getAttribute("data-sitekey"),ii=(0,na.g4)(),ni={sitekey:ti,theme:ii?"dark":"light"};switch(ei.getAttribute("data-captcha-type")){case"g-recaptcha":{window.grecaptcha&&window.grecaptcha.ready(()=>{window.grecaptcha.render(ei,ni)});break}case"cf-turnstile":{window.turnstile&&window.turnstile.render(ei,ni);break}case"h-captcha":{window.hcaptcha&&window.hcaptcha.render(ei,ni);break}case"m-captcha":{const{default:si}=await __webpack_require__.e("mcaptcha-vanilla-glue").then(__webpack_require__.t.bind(__webpack_require__,"./node_modules/@mcaptcha/vanilla-glue/dist/index.js",19));si.INPUT_NAME="m-captcha-response";const ai=ei.getAttribute("data-instance-url");si.default({siteKey:{instanceUrl:new URL(ai),key:ti}});break}default:}}const tL=ei=>((0,ri.Qi)("data-v-2e3e6354"),ei=ei(),(0,ri.jt)(),ei),iL={class:"ui container action-view-container"},nL={class:"action-view-header"},sL={class:"action-info-summary"},rL={class:"action-info-summary-title"},oL={class:"action-info-summary-title-text"},aL=["data-url"],lL={class:"action-commit-summary"},cL=["href"],uL=["href"],fL=["href"],dL={key:2,class:"ui label tw-max-w-full"},hL=["href"],mL={class:"action-view-body"},pL={class:"action-view-left"},gL={class:"job-group-section"},vL={class:"job-brief-list"},bL=["href","onMouseenter"],_L={class:"job-brief-item-left"},yL={class:"job-brief-name tw-mx-2 gt-ellipsis"},wL={class:"job-brief-item-right"},xL={class:"step-summary-duration"},jL={key:0,class:"job-artifacts"},SL={class:"job-artifacts-title"},CL={class:"job-artifacts-list"},EL=["href"],kL=["onClick"],AL={class:"action-view-right"},TL={class:"job-info-header"},LL={class:"job-info-header-left gt-ellipsis"},RL={class:"job-info-header-title gt-ellipsis"},ML={class:"job-info-header-detail"},OL={class:"job-info-header-right"},DL={class:"btn gt-interact-bg tw-p-2"},FL={class:"icon"},IL={class:"icon"},PL={class:"icon"},qL=tL(()=>(0,ri.Lk)("div",{class:"divider"},null,-1)),NL=["href"],BL={class:"icon"},HL={key:0,class:"job-step-container",ref:"steps"},$L=["onClick"],VL={class:"step-summary-msg gt-ellipsis"},UL={class:"step-summary-duration"};function WL(ei,ti,ii,ni,si,ai){const li=(0,ri.g2)("ActionRunStatus"),fi=(0,ri.g2)("SvgIcon");return(0,ri.uX)(),(0,ri.CE)("div",iL,[(0,ri.Lk)("div",nL,[(0,ri.Lk)("div",sL,[(0,ri.Lk)("div",rL,[(0,ri.bF)(li,{"locale-status":ei.locale.status[ei.run.status],status:ei.run.status,size:20},null,8,["locale-status","status"]),(0,ri.Lk)("h2",oL,(0,yi.v_)(ei.run.title),1)]),ei.run.canApprove?((0,ri.uX)(),(0,ri.CE)("button",{key:0,class:"ui basic small compact button primary",onClick:ti[0]||(ti[0]=hi=>ei.approveRun())},(0,yi.v_)(ei.locale.approve),1)):ei.run.canCancel?((0,ri.uX)(),(0,ri.CE)("button",{key:1,class:"ui basic small compact button red",onClick:ti[1]||(ti[1]=hi=>ei.cancelRun())},(0,yi.v_)(ei.locale.cancel),1)):ei.run.canRerun?((0,ri.uX)(),(0,ri.CE)("button",{key:2,class:"ui basic small compact button tw-mr-0 tw-whitespace-nowrap link-action","data-url":`${ei.run.link}/rerun`},(0,yi.v_)(ei.locale.rerun_all),9,aL)):(0,ri.Q3)("v-if",!0)]),(0,ri.Lk)("div",lL,[(0,ri.Lk)("span",null,[(0,ri.Lk)("a",{class:"muted",href:ei.run.workflowLink},[(0,ri.Lk)("b",null,(0,yi.v_)(ei.run.workflowID),1)],8,cL),(0,ri.eW)(":")]),ei.run.isSchedule?((0,ri.uX)(),(0,ri.CE)(ri.FK,{key:0},[(0,ri.eW)((0,yi.v_)(ei.locale.scheduled),1)],64)):((0,ri.uX)(),(0,ri.CE)(ri.FK,{key:1},[(0,ri.eW)((0,yi.v_)(ei.locale.commit)+" ",1),(0,ri.Lk)("a",{class:"muted",href:ei.run.commit.link},(0,yi.v_)(ei.run.commit.shortSHA),9,uL),(0,ri.eW)(" "+(0,yi.v_)(ei.locale.pushedBy)+" ",1),(0,ri.Lk)("a",{class:"muted",href:ei.run.commit.pusher.link},(0,yi.v_)(ei.run.commit.pusher.displayName),9,fL)],64)),ei.run.commit.shortSHA?((0,ri.uX)(),(0,ri.CE)("span",dL,[(0,ri.Lk)("a",{class:"gt-ellipsis",href:ei.run.commit.branch.link},(0,yi.v_)(ei.run.commit.branch.name),9,hL)])):(0,ri.Q3)("v-if",!0)])]),(0,ri.Lk)("div",mL,[(0,ri.Lk)("div",pL,[(0,ri.Lk)("div",gL,[(0,ri.Lk)("div",vL,[((0,ri.uX)(!0),(0,ri.CE)(ri.FK,null,(0,ri.pI)(ei.run.jobs,(hi,_i)=>((0,ri.uX)(),(0,ri.CE)("a",{class:(0,yi.C4)(["job-brief-item",parseInt(ei.jobIndex)===_i?"selected":""]),href:ei.run.link+"/jobs/"+_i,key:hi.id,onMouseenter:ji=>ei.onHoverRerunIndex=hi.id,onMouseleave:ti[2]||(ti[2]=ji=>ei.onHoverRerunIndex=-1)},[(0,ri.Lk)("div",_L,[(0,ri.bF)(li,{"locale-status":ei.locale.status[hi.status],status:hi.status},null,8,["locale-status","status"]),(0,ri.Lk)("span",yL,(0,yi.v_)(hi.name),1)]),(0,ri.Lk)("span",wL,[hi.canRerun&&ei.onHoverRerunIndex===hi.id?((0,ri.uX)(),(0,ri.Wv)(fi,{key:0,name:"octicon-sync",role:"button","data-tooltip-content":ei.locale.rerun,class:"job-brief-rerun tw-mx-2 link-action","data-url":`${ei.run.link}/jobs/${_i}/rerun`},null,8,["data-tooltip-content","data-url"])):(0,ri.Q3)("v-if",!0),(0,ri.Lk)("span",xL,(0,yi.v_)(hi.duration),1)])],42,bL))),128))])]),ei.artifacts.length>0?((0,ri.uX)(),(0,ri.CE)("div",jL,[(0,ri.Lk)("div",SL,(0,yi.v_)(ei.locale.artifactsTitle),1),(0,ri.Lk)("ul",CL,[((0,ri.uX)(!0),(0,ri.CE)(ri.FK,null,(0,ri.pI)(ei.artifacts,hi=>((0,ri.uX)(),(0,ri.CE)("li",{class:"job-artifacts-item",key:hi.name},[(0,ri.Lk)("a",{class:"job-artifacts-link",target:"_blank",href:ei.run.link+"/artifacts/"+hi.name},[(0,ri.bF)(fi,{name:"octicon-file",class:"ui text black job-artifacts-icon"}),(0,ri.eW)((0,yi.v_)(hi.name),1)],8,EL),ei.run.canDeleteArtifact?((0,ri.uX)(),(0,ri.CE)("a",{key:0,onClick:_i=>ei.deleteArtifact(hi.name),class:"job-artifacts-delete"},[(0,ri.bF)(fi,{name:"octicon-trash",class:"ui text black job-artifacts-icon"})],8,kL)):(0,ri.Q3)("v-if",!0)]))),128))])])):(0,ri.Q3)("v-if",!0)]),(0,ri.Lk)("div",AL,[(0,ri.Lk)("div",TL,[(0,ri.Lk)("div",LL,[(0,ri.Lk)("h3",RL,(0,yi.v_)(ei.currentJob.title),1),(0,ri.Lk)("p",ML,(0,yi.v_)(ei.currentJob.detail),1)]),(0,ri.Lk)("div",OL,[(0,ri.Lk)("div",{class:"ui top right pointing dropdown custom jump item",onClick:ti[6]||(ti[6]=ml(hi=>ei.menuVisible=!ei.menuVisible,["stop"])),onKeyup:ti[7]||(ti[7]=Qd(hi=>ei.menuVisible=!ei.menuVisible,["enter"]))},[(0,ri.Lk)("button",DL,[(0,ri.bF)(fi,{name:"octicon-gear",size:18})]),ei.menuVisible?((0,ri.uX)(),(0,ri.CE)("div",{key:0,class:(0,yi.C4)(["menu transition action-job-menu",{visible:ei.menuVisible}])},[(0,ri.Lk)("a",{class:"item",onClick:ti[3]||(ti[3]=hi=>ei.toggleTimeDisplay("seconds"))},[(0,ri.Lk)("i",FL,[(0,ri.bF)(fi,{name:ei.timeVisible["log-time-seconds"]?"octicon-check":"gitea-empty-checkbox"},null,8,["name"])]),(0,ri.eW)(" "+(0,yi.v_)(ei.locale.showLogSeconds),1)]),(0,ri.Lk)("a",{class:"item",onClick:ti[4]||(ti[4]=hi=>ei.toggleTimeDisplay("stamp"))},[(0,ri.Lk)("i",IL,[(0,ri.bF)(fi,{name:ei.timeVisible["log-time-stamp"]?"octicon-check":"gitea-empty-checkbox"},null,8,["name"])]),(0,ri.eW)(" "+(0,yi.v_)(ei.locale.showTimeStamps),1)]),(0,ri.Lk)("a",{class:"item",onClick:ti[5]||(ti[5]=hi=>ei.toggleFullScreen())},[(0,ri.Lk)("i",PL,[(0,ri.bF)(fi,{name:ei.isFullScreen?"octicon-check":"gitea-empty-checkbox"},null,8,["name"])]),(0,ri.eW)(" "+(0,yi.v_)(ei.locale.showFullScreen),1)]),qL,(0,ri.Lk)("a",{class:(0,yi.C4)(["item",ei.currentJob.steps.length?"":"disabled"]),href:ei.run.link+"/jobs/"+ei.jobIndex+"/logs",target:"_blank"},[(0,ri.Lk)("i",BL,[(0,ri.bF)(fi,{name:"octicon-download"})]),(0,ri.eW)(" "+(0,yi.v_)(ei.locale.downloadLogs),1)],10,NL)],2)):(0,ri.Q3)("v-if",!0)],32)])]),ei.currentJob.steps.length?((0,ri.uX)(),(0,ri.CE)("div",HL,[((0,ri.uX)(!0),(0,ri.CE)(ri.FK,null,(0,ri.pI)(ei.currentJob.steps,(hi,_i)=>((0,ri.uX)(),(0,ri.CE)("div",{class:"job-step-section",key:_i},[(0,ri.Lk)("div",{class:(0,yi.C4)(["job-step-summary",[ei.currentJobStepsStates[_i].expanded?"selected":"",ei.isExpandable(hi.status)&&"step-expandable"]]),onClick:ml(ji=>ei.isExpandable(hi.status)&&ei.toggleStepLogs(_i),["stop"])},[(0,ri.Q3)(` If the job is done and the job step log is loaded for the first time, show the loading icon
currentJobStepsStates[i].cursor === null means the log is loaded for the first time
`),ei.isDone(ei.run.status)&&ei.currentJobStepsStates[_i].expanded&&ei.currentJobStepsStates[_i].cursor===null?((0,ri.uX)(),(0,ri.Wv)(fi,{key:0,name:"octicon-sync",class:"tw-mr-2 job-status-rotate"})):((0,ri.uX)(),(0,ri.Wv)(fi,{key:1,name:ei.currentJobStepsStates[_i].expanded?"octicon-chevron-down":"octicon-chevron-right",class:(0,yi.C4)(["tw-mr-2",!ei.isExpandable(hi.status)&&"tw-invisible"])},null,8,["name","class"])),(0,ri.bF)(li,{status:hi.status,class:"tw-mr-2"},null,8,["status"]),(0,ri.Lk)("span",VL,(0,yi.v_)(hi.summary),1),(0,ri.Lk)("span",UL,(0,yi.v_)(hi.duration),1)],10,$L),(0,ri.Q3)(` the log elements could be a lot, do not use v-if to destroy/reconstruct the DOM,
use native DOM elements for "log line" to improve performance, Vue is not suitable for managing so many reactive elements. `),(0,ri.bo)((0,ri.Lk)("div",{class:"job-step-logs",ref_for:!0,ref:"logs"},null,512),[[Jl,ei.currentJobStepsStates[_i].expanded]])]))),128))],512)):(0,ri.Q3)("v-if",!0)])])])}const zL=["data-tooltip-content"];function KL(ei,ti,ii,ni,si,ai){const li=(0,ri.g2)("SvgIcon");return ii.status?((0,ri.uX)(),(0,ri.CE)("span",{key:0,class:"tw-flex tw-items-center","data-tooltip-content":ii.localeStatus},[ii.status==="success"?((0,ri.uX)(),(0,ri.Wv)(li,{key:0,name:"octicon-check-circle-fill",class:"text green",size:ii.size,"class-name":ii.className},null,8,["size","class-name"])):ii.status==="skipped"?((0,ri.uX)(),(0,ri.Wv)(li,{key:1,name:"octicon-skip",class:"text grey",size:ii.size,"class-name":ii.className},null,8,["size","class-name"])):ii.status==="waiting"?((0,ri.uX)(),(0,ri.Wv)(li,{key:2,name:"octicon-clock",class:"text yellow",size:ii.size,"class-name":ii.className},null,8,["size","class-name"])):ii.status==="blocked"?((0,ri.uX)(),(0,ri.Wv)(li,{key:3,name:"octicon-blocked",class:"text yellow",size:ii.size,"class-name":ii.className},null,8,["size","class-name"])):ii.status==="running"?((0,ri.uX)(),(0,ri.Wv)(li,{key:4,name:"octicon-meter",class:"text yellow",size:ii.size,"class-name":"job-status-rotate "+ii.className},null,8,["size","class-name"])):["failure","cancelled","unknown"].includes(ii.status)?((0,ri.uX)(),(0,ri.Wv)(li,{key:5,name:"octicon-x-circle-fill",class:"text red",size:ii.size},null,8,["size"])):(0,ri.Q3)("v-if",!0)],8,zL)):(0,ri.Q3)("v-if",!0)}var XL={components:{SvgIcon:Io.Ah},props:{status:{type:String,required:!0},size:{type:Number,default:16},className:{type:String,default:""},localeStatus:{type:String,default:""}}},GL=(0,zc.A)(XL,[["render",KL]]),Qg=function(ei,ti){return Object.defineProperty?Object.defineProperty(ei,"raw",{value:ti}):ei.raw=ti,ei},ya;(function(ei){ei[ei.EOS=0]="EOS",ei[ei.Text=1]="Text",ei[ei.Incomplete=2]="Incomplete",ei[ei.ESC=3]="ESC",ei[ei.Unknown=4]="Unknown",ei[ei.SGR=5]="SGR",ei[ei.OSCURL=6]="OSCURL"})(ya||(ya={}));class QL{constructor(){this.VERSION="6.0.2",this.setup_palettes(),this._use_classes=!1,this.bold=!1,this.faint=!1,this.italic=!1,this.underline=!1,this.fg=this.bg=null,this._buffer="",this._url_allowlist={http:1,https:1},this._escape_html=!0,this.boldStyle="font-weight:bold",this.faintStyle="opacity:0.7",this.italicStyle="font-style:italic",this.underlineStyle="text-decoration:underline"}set use_classes(ti){this._use_classes=ti}get use_classes(){return this._use_classes}set url_allowlist(ti){this._url_allowlist=ti}get url_allowlist(){return this._url_allowlist}set escape_html(ti){this._escape_html=ti}get escape_html(){return this._escape_html}set boldStyle(ti){this._boldStyle=ti}get boldStyle(){return this._boldStyle}set faintStyle(ti){this._faintStyle=ti}get faintStyle(){return this._faintStyle}set italicStyle(ti){this._italicStyle=ti}get italicStyle(){return this._italicStyle}set underlineStyle(ti){this._underlineStyle=ti}get underlineStyle(){return this._underlineStyle}setup_palettes(){this.ansi_colors=[[{rgb:[0,0,0],class_name:"ansi-black"},{rgb:[187,0,0],class_name:"ansi-red"},{rgb:[0,187,0],class_name:"ansi-green"},{rgb:[187,187,0],class_name:"ansi-yellow"},{rgb:[0,0,187],class_name:"ansi-blue"},{rgb:[187,0,187],class_name:"ansi-magenta"},{rgb:[0,187,187],class_name:"ansi-cyan"},{rgb:[255,255,255],class_name:"ansi-white"}],[{rgb:[85,85,85],class_name:"ansi-bright-black"},{rgb:[255,85,85],class_name:"ansi-bright-red"},{rgb:[0,255,0],class_name:"ansi-bright-green"},{rgb:[255,255,85],class_name:"ansi-bright-yellow"},{rgb:[85,85,255],class_name:"ansi-bright-blue"},{rgb:[255,85,255],class_name:"ansi-bright-magenta"},{rgb:[85,255,255],class_name:"ansi-bright-cyan"},{rgb:[255,255,255],class_name:"ansi-bright-white"}]],this.palette_256=[],this.ansi_colors.forEach(ni=>{ni.forEach(si=>{this.palette_256.push(si)})});let ti=[0,95,135,175,215,255];for(let ni=0;ni<6;++ni)for(let si=0;si<6;++si)for(let ai=0;ai<6;++ai){let li={rgb:[ti[ni],ti[si],ti[ai]],class_name:"truecolor"};this.palette_256.push(li)}let ii=8;for(let ni=0;ni<24;++ni,ii+=10){let si={rgb:[ii,ii,ii],class_name:"truecolor"};this.palette_256.push(si)}}escape_txt_for_html(ti){return this._escape_html?ti.replace(/[&<>"']/gm,ii=>{if(ii==="&")return"&";if(ii==="<")return"<";if(ii===">")return">";if(ii==='"')return""";if(ii==="'")return"'"}):ti}append_buffer(ti){var ii=this._buffer+ti;this._buffer=ii}get_next_packet(){var ti={kind:ya.EOS,text:"",url:""},ii=this._buffer.length;if(ii==0)return ti;var ni=this._buffer.indexOf("\x1B");if(ni==-1)return ti.kind=ya.Text,ti.text=this._buffer,this._buffer="",ti;if(ni>0)return ti.kind=ya.Text,ti.text=this._buffer.slice(0,ni),this._buffer=this._buffer.slice(ni),ti;if(ni==0){if(ii<3)return ti.kind=ya.Incomplete,ti;var si=this._buffer.charAt(1);if(si!="["&&si!="]"&&si!="(")return ti.kind=ya.ESC,ti.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),ti;if(si=="["){this._csi_regex||(this._csi_regex=Fy(Iy||(Iy=Qg([`
`)&&(ei=ei.substring(0,ei.length-1)),ei.includes("\x1B"))for(const[ni,si]of JL)ei=ei.replace(ni,si);if(!ei.includes("\r"))return ti.ansi_to_html(ei);const ii=[];for(const ni of ei.split("\r")){if(ni==="")continue;const si=ti.ansi_to_html(ni);si!==""&&ii.push(si)}return ii.join(`
`)}const Ny={name:"RepoActionView",components:{SvgIcon:Io.Ah,ActionRunStatus:GL},props:{runIndex:String,jobIndex:String,actionsURL:String,locale:Object},data(){return{loading:!1,intervalID:null,currentJobStepsStates:[],artifacts:[],onHoverRerunIndex:-1,menuVisible:!1,isFullScreen:!1,timeVisible:{"log-time-stamp":!1,"log-time-seconds":!1},run:{link:"",title:"",status:"",canCancel:!1,canApprove:!1,canRerun:!1,done:!1,workflowID:"",workflowLink:"",isSchedule:!1,jobs:[],commit:{localeCommit:"",localePushedBy:"",shortSHA:"",link:"",pusher:{displayName:"",link:""},branch:{name:"",link:""}}},currentJob:{title:"",detail:"",steps:[]}}},async mounted(){await this.loadJob(),this.intervalID=setInterval(this.loadJob,1e3),document.body.addEventListener("click",this.closeDropdown),this.hashChangeListener(),window.addEventListener("hashchange",this.hashChangeListener)},beforeUnmount(){document.body.removeEventListener("click",this.closeDropdown),window.removeEventListener("hashchange",this.hashChangeListener)},unmounted(){this.intervalID&&(clearInterval(this.intervalID),this.intervalID=null)},methods:{getLogsContainer(ei){const ti=this.$refs.logs[ei];return ti._stepLogsActiveContainer??ti},beginLogGroup(ei){const ti=this.$refs.logs[ei],ii=document.createElement("div");ii.classList.add("job-log-group");const ni=document.createElement("div");ni.classList.add("job-log-group-summary");const si=document.createElement("div");si.classList.add("job-log-list"),ii.append(ni),ii.append(si),ti._stepLogsActiveContainer=si},endLogGroup(ei){const ti=this.$refs.logs[ei];ti._stepLogsActiveContainer=null},toggleStepLogs(ei){this.currentJobStepsStates[ei].expanded=!this.currentJobStepsStates[ei].expanded,this.currentJobStepsStates[ei].expanded&&this.loadJob()},cancelRun(){(0,so.LO)(`${this.run.link}/cancel`)},approveRun(){(0,so.LO)(`${this.run.link}/approve`)},createLogLine(ei,ti,ii){const ni=document.createElement("div");ni.classList.add("job-log-line"),ni.setAttribute("id",`jobstep-${ii}-${ei.index}`),ni._jobLogTime=ei.timestamp;const si=document.createElement("a");si.classList.add("line-num","muted"),si.textContent=ei.index,si.setAttribute("href",`#jobstep-${ii}-${ei.index}`),ni.append(si);const ai=document.createElement("span");ai.className="log-time-stamp";const li=new Date(parseFloat(ei.timestamp*1e3)),fi=(0,_b.Rt)(li);ai.textContent=fi,(0,zn.oi)(ai,this.timeVisible["log-time-stamp"]);const hi=document.createElement("span");hi.className="log-time-seconds";const _i=Math.floor(parseFloat(ei.timestamp)-parseFloat(ti));hi.textContent=`${_i}s`,(0,zn.oi)(hi,this.timeVisible["log-time-seconds"]);const ji=document.createElement("span");return ji.className="log-msg",ji.innerHTML=ZL(ei.message),ni.append(ai),ni.append(ji),ni.append(hi),ni},appendLogs(ei,ti,ii){for(const ni of ti)this.getLogsContainer(ei).append(this.createLogLine(ni,ii,ei))},async fetchArtifacts(){return await(await(0,so.fG)(`${this.actionsURL}/runs/${this.runIndex}/artifacts`)).json()},async deleteArtifact(ei){window.confirm(this.locale.confirmDeleteArtifact.replace("%s",ei))&&(await(0,so.SJ)(`${this.run.link}/artifacts/${ei}`),await this.loadJob())},async fetchJob(){const ei=this.currentJobStepsStates.map((ii,ni)=>({step:ni,cursor:ii.cursor,expanded:ii.expanded}));return await(await(0,so.LO)(`${this.actionsURL}/runs/${this.runIndex}/jobs/${this.jobIndex}`,{data:{logCursors:ei}})).json()},async loadJob(){if(!this.loading)try{this.loading=!0;let ei,ti;try{[ei,ti]=await Promise.all([this.fetchJob(),this.fetchArtifacts()])}catch(ii){if(ii instanceof TypeError)return;throw ii}this.artifacts=ti.artifacts||[],this.run=ei.state.run,this.currentJob=ei.state.currentJob;for(let ii=0;ii<this.currentJob.steps.length;ii++)this.currentJobStepsStates[ii]||(this.currentJobStepsStates[ii]={cursor:null,expanded:!1});for(const ii of ei.logs.stepsLog)this.currentJobStepsStates[ii.step].cursor=ii.cursor,this.appendLogs(ii.step,ii.lines,ii.started);this.run.done&&this.intervalID&&(clearInterval(this.intervalID),this.intervalID=null)}finally{this.loading=!1}},isDone(ei){return["success","skipped","failure","cancelled"].includes(ei)},isExpandable(ei){return["success","running","failure","cancelled"].includes(ei)},closeDropdown(){this.menuVisible&&(this.menuVisible=!1)},toggleTimeDisplay(ei){this.timeVisible[`log-time-${ei}`]=!this.timeVisible[`log-time-${ei}`];for(const ti of this.$refs.steps.querySelectorAll(`.log-time-${ei}`))(0,zn.oi)(ti,this.timeVisible[`log-time-${ei}`])},toggleFullScreen(){this.isFullScreen=!this.isFullScreen;const ei=document.querySelector(".action-view-right"),ti=document.querySelector(".full.height"),ii=document.querySelector(".action-view-body"),ni=document.querySelector("#navbar"),si=document.querySelector(".page-content.repository"),ai=document.querySelector(".page-footer");(0,zn.oi)(ni,!this.isFullScreen),(0,zn.oi)(si,!this.isFullScreen),(0,zn.oi)(ai,!this.isFullScreen),this.isFullScreen?ti.append(ei):ii.append(ei)},async hashChangeListener(){const ei=window.location.hash;if(!ei)return;const[ti,ii,ni]=ei.split("-");if(!this.currentJobStepsStates[ii])return;!this.currentJobStepsStates[ii].expanded&&this.currentJobStepsStates[ii].cursor===null&&(this.currentJobStepsStates[ii].expanded=!0,await this.loadJob());const si=this.$refs.steps.querySelector(ei);si&&si.querySelector(".line-num").click()}}};var e7=Ny;function t7(){const ei=document.getElementById("repo-action-view");if(!ei)return;const ti=document.querySelector("body > div.full.height");ti&&(ti.style.paddingBottom="0"),dc(Ny,{runIndex:ei.getAttribute("data-run-index"),jobIndex:ei.getAttribute("data-job-index"),actionsURL:ei.getAttribute("data-actions-url"),locale:{approve:ei.getAttribute("data-locale-approve"),cancel:ei.getAttribute("data-locale-cancel"),rerun:ei.getAttribute("data-locale-rerun"),rerun_all:ei.getAttribute("data-locale-rerun-all"),scheduled:ei.getAttribute("data-locale-runs-scheduled"),commit:ei.getAttribute("data-locale-runs-commit"),pushedBy:ei.getAttribute("data-locale-runs-pushed-by"),artifactsTitle:ei.getAttribute("data-locale-artifacts-title"),areYouSure:ei.getAttribute("data-locale-are-you-sure"),confirmDeleteArtifact:ei.getAttribute("data-locale-confirm-delete-artifact"),showTimeStamps:ei.getAttribute("data-locale-show-timestamps"),showLogSeconds:ei.getAttribute("data-locale-show-log-seconds"),showFullScreen:ei.getAttribute("data-locale-show-full-screen"),downloadLogs:ei.getAttribute("data-locale-download-logs"),status:{unknown:ei.getAttribute("data-locale-status-unknown"),waiting:ei.getAttribute("data-locale-status-waiting"),running:ei.getAttribute("data-locale-status-running"),success:ei.getAttribute("data-locale-status-success"),failure:ei.getAttribute("data-locale-status-failure"),cancelled:ei.getAttribute("data-locale-status-cancelled"),skipped:ei.getAttribute("data-locale-status-skipped"),blocked:ei.getAttribute("data-locale-status-blocked")}}}).mount(ei)}const sM=(0,zc.A)(e7,[["render",WL],["__scopeId","data-v-2e3e6354"]]);var rM=null;function i7(){const ei=document.querySelector(".issue-checkbox-all");if(!ei)return;const ti=document.querySelectorAll(".issue-checkbox"),ii=()=>{const ni=Array.from(ti).filter(_i=>_i.checked),si=!!ni.length;si&&ni.length===ti.length?(ei.checked=!0,ei.indeterminate=!1):si?(ei.checked=!1,ei.indeterminate=!0):(ei.checked=!1,ei.indeterminate=!1),(0,zn.oi)(Hi("#issue-filters"),!si),(0,zn.oi)(Hi("#issue-actions"),si);const li=document.querySelectorAll("#issue-filters, #issue-actions");Array.from(li).find(_i=>!(0,zn.WP)(_i)).querySelector(".issue-list-toolbar-left").prepend(ei)};for(const ni of ti)ni.addEventListener("change",ii);ei.addEventListener("change",()=>{for(const ni of ti)ni.checked=ei.checked;ii()}),Hi(".issue-action").on("click",async function(ni){ni.preventDefault();const si=this.getAttribute("data-url");let ai=this.getAttribute("data-action"),li=this.getAttribute("data-element-id"),fi=[];for(const hi of document.querySelectorAll(".issue-checkbox:checked"))fi.push(hi.getAttribute("data-issue-id"));if(fi=fi.join(","),!!fi){if(li==="0"&&si.endsWith("/assignee")&&(li="",ai="clear"),ai==="toggle"&&ni.altKey&&(ai="toggle-alt"),ai==="delete"){const hi=ni.target.getAttribute("data-action-delete-confirm");if(!await a_(hi,{confirmButtonColor:"red"}))return}try{await rh(si,ai,fi,li),window.location.reload()}catch(hi){pl(hi.responseJSON?.error??hi.message)}}})}function n7(){const ei=Hi(".user-remote-search");if(!ei.length)return;let ti=ei[0].getAttribute("data-search-url");const ii=ei[0].getAttribute("data-action-jump-url"),ni=ei[0].getAttribute("data-selected-user-id");ti.includes("?")||(ti+="?"),ei.dropdown("setting",{fullTextSearch:!0,selectOnKeydown:!1,apiSettings:{cache:!1,url:`${ti}&q={query}`,onResponse(li){const fi=[];for(const hi of li.results){let _i=`<img class="ui avatar tw-align-middle" src="${Ua(hi.avatar_link)}" aria-hidden="true" alt="" width="20" height="20"><span class="gt-ellipsis">${Ua(hi.username)}</span>`;hi.full_name&&(_i+=`<span class="search-fullname tw-ml-2">${Ua(hi.full_name)}</span>`),fi.push({value:hi.user_id,name:_i})}return li.results=fi,li}},action:(li,fi)=>{window.location.href=ii.replace("{user_id}",encodeURIComponent(fi))},onShow:()=>{ei.dropdown("filter"," ")}});const si={...ei.dropdown("internal","setup")},ai=ei.dropdown("setting","templates");ei.dropdown("internal","setup",si),si.menu=function(li){const fi=ei.find("> .menu")[0];for(const _i of fi.querySelectorAll(":scope > .dynamic-item"))_i.remove();const hi=ai.menu(li,ei.dropdown("setting","fields"),!0,ei.dropdown("setting","className"));if(hi){const _i=(0,na.a8)(hi,"text/html").querySelectorAll("body > div");for(const Mi of _i)Mi.classList.add("dynamic-item");const ji=document.createElement("div");ji.classList.add("divider","dynamic-item"),fi.append(ji,..._i)}ei.dropdown("refresh"),setTimeout(()=>{for(const _i of fi.querySelectorAll(".item.active, .item.selected"))_i.classList.remove("active","selected");fi.querySelector(`.item[data-value="${ni}"]`)?.classList.add("selected")},0)}}function s7(){for(const ei of document.getElementsByClassName("issue-card-unpin"))ei.addEventListener("click",async ti=>{const ii=ti.currentTarget,ni=Number(ii.getAttribute("data-issue-id"));(await(0,so.SJ)(ii.getAttribute("data-unpin-url"))).ok&&(ii._tippy.destroy(),ii.closest(`div.issue-card[data-issue-id="${ni}"]`).remove())})}async function r7(ei){const ti=ei.item.getAttribute("data-move-url"),ii=Number(ei.item.getAttribute("data-issue-id"));await(0,so.LO)(ti,{data:{id:ii,position:ei.newIndex+1}})}async function o7(){const ei=document.getElementById("issue-pins");ei!==null&&ei.hasAttribute("data-is-repo-admin")&&(s7(),!(ei.children.length<2)&&jg(ei,{group:"shared",onEnd:r7}))}function a7(){const ei=document.querySelector("#archived-filter-checkbox");if(!ei)return;const ti=new URL(window.location.href),ii=document.querySelectorAll("[data-is-archived]");if(!ii.length){(0,zn.y9)(".archived-label-filter");return}const ni=(ti.searchParams.get("labels")||"").split(",").map(ai=>ai<0?`${~ai+1}`:ai),si=()=>{for(const ai of ii){const li=ai.getAttribute("data-label-id");(0,zn.oi)(ai,ei.checked||ni.includes(li))}};si(),ei.addEventListener("change",()=>{si(),ei.checked?ti.searchParams.set("archived","true"):ti.searchParams.delete("archived"),window.location.href=ti.href})}function l7(){document.querySelectorAll(".page-content.repository.issue-list, .page-content.repository.milestone-issue-list").length&&(i7(),n7(),o7(),a7())}const{appSubUrl:c7}=window.config,u7=/^(\d+)$/,f7=/^#(\d+)$/,d7=/^([-.\w]+)\/([-.\w]+)#(\d+)$/;function h7(ei,ti){ti=ti.trim();let ii="";if(ei)u7.test(ti)?ii=`${ei}/issues/${ti}`:f7.test(ti)&&(ii=`${ei}/issues/${ti.substr(1)}`);else{const ni=ti.match(d7);if(ni){const[si,ai,li,fi]=ni;ii=`${c7}/${ai}/${li}/issues/${fi}`}}return ii}function m7(){const ei=document.getElementById("issue-list-quick-goto");if(!ei)return;const ti=ei.closest("form"),ii=ti.querySelector("input[name=q]"),ni=ei.getAttribute("data-repo-link");ti.addEventListener("submit",ai=>{let li=!(0,zn.WP)(ei);const fi=(0,zn.IU)(ai);fi!==ti&&fi!==ii&&fi!==ei&&(li=!1),li&&(ai.preventDefault(),window.location.href=ei.getAttribute("data-issue-goto-link"))});const si=async()=>{const ai=ii.value;let li=h7(ni,ai);li&&(await(0,so.fG)(`${li}/info`)).status!==200&&(li=""),ii.value===ai&&((0,zn.oi)(ei,!!li),ei.setAttribute("data-issue-goto-link",li))};ii.addEventListener("input",(0,zn.nm)(si)),si()}async function p7(){const ei=document.getElementById("repo-contributors-chart");if(!ei)return;const{default:ti}=await Promise.all([__webpack_require__.e("contributors-graph-code-frequency-graph-recent-commits-graph"),__webpack_require__.e("contributors-graph")]).then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/RepoContributors.vue"));try{dc(ti,{repoLink:ei.getAttribute("data-repo-link"),locale:{filterLabel:ei.getAttribute("data-locale-filter-label"),contributionType:{commits:ei.getAttribute("data-locale-contribution-type-commits"),additions:ei.getAttribute("data-locale-contribution-type-additions"),deletions:ei.getAttribute("data-locale-contribution-type-deletions")},loadingTitle:ei.getAttribute("data-locale-loading-title"),loadingTitleFailed:ei.getAttribute("data-locale-loading-title-failed"),loadingInfo:ei.getAttribute("data-locale-loading-info")}}).mount(ei)}catch(ii){console.error("RepoContributors failed to load",ii),ei.textContent=ei.getAttribute("data-locale-component-failed-to-load")}}async function g7(){const ei=document.getElementById("repo-code-frequency-chart");if(!ei)return;const{default:ti}=await Promise.all([__webpack_require__.e("contributors-graph-code-frequency-graph-recent-commits-graph"),__webpack_require__.e("code-frequency-graph")]).then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/RepoCodeFrequency.vue"));try{dc(ti,{locale:{loadingTitle:ei.getAttribute("data-locale-loading-title"),loadingTitleFailed:ei.getAttribute("data-locale-loading-title-failed"),loadingInfo:ei.getAttribute("data-locale-loading-info")}}).mount(ei)}catch(ii){console.error("RepoCodeFrequency failed to load",ii),ei.textContent=ei.getAttribute("data-locale-component-failed-to-load")}}async function v7(){const ei=document.getElementById("repo-recent-commits-chart");if(!ei)return;const{default:ti}=await Promise.all([__webpack_require__.e("contributors-graph-code-frequency-graph-recent-commits-graph"),__webpack_require__.e("recent-commits-graph")]).then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/RepoRecentCommits.vue"));try{dc(ti,{locale:{loadingTitle:ei.getAttribute("data-locale-loading-title"),loadingTitleFailed:ei.getAttribute("data-locale-loading-title-failed"),loadingInfo:ei.getAttribute("data-locale-loading-info")}}).mount(ei)}catch(ii){console.error("RepoRecentCommits failed to load",ii),ei.textContent=ei.getAttribute("data-locale-component-failed-to-load")}}async function b7(ei,ti){ti.classList.add("disabled");try{const ni=await(await(0,so.fG)(ti.getAttribute("data-fetch-url"))).json();(0,zn.y9)(ti),_7(ei,ni.tags),y7(ei,ni.branches,ni.default_branch),(0,zn.fi)(ei.querySelectorAll(".branch-and-tag-detail"))}finally{ti.classList.remove("disabled")}}function _7(ei,ti){const ii=ei.querySelector(".tag-area");(0,zn.oi)(ii.parentElement,ti.length>0);for(const ni of ti)By(ii,ni.web_link,ni.name)}function y7(ei,ti,ii){const ni=ei.getAttribute("data-text-default-branch-tooltip"),si=ei.querySelector(".branch-area");(0,zn.oi)(si.parentElement,ti.length>0);for(const ai of ti){const li=ii===ai.name?ni:null;By(si,ai.web_link,ai.name,li)}}function By(ei,ti,ii,ni){const si=document.createElement("a");si.classList.add("muted","tw-px-1"),si.href=ti,si.textContent=ii,ni&&(si.classList.add("tw-border","tw-border-secondary","tw-rounded"),si.setAttribute("data-tooltip-content",ni)),ei.append(si)}function w7(){for(const ei of document.querySelectorAll(".branch-and-tag-area")){const ti=ei.querySelector(".load-branches-and-tags");ti.addEventListener("click",()=>b7(ei,ti))}}function Yg(ei){ei.type!=="hidden"&&ei.type!=="checkbox"&&ei.type!=="radio"&&ei.type!=="range"&&ei.type!=="color"&&(ei.dir="auto")}function x7(){const ei=new MutationObserver(ni=>{const si=ni.length;for(let ai=0;ai<si;ai++){const li=ni[ai],fi=li.addedNodes.length;for(let hi=0;hi<fi;hi++){const _i=li.addedNodes[hi];if(!(0,zn.NF)(_i))continue;(_i.nodeName==="INPUT"||_i.nodeName==="TEXTAREA")&&Yg(_i);const ji=_i.querySelectorAll("input, textarea"),Mi=ji.length;for(let Ki=0;Ki<Mi;Ki++)Yg(ji[Ki])}}}),ti=document.querySelectorAll("input, textarea"),ii=ti.length;for(let ni=0;ni<ii;ni++)Yg(ti[ni]);ei.observe(document,{subtree:!0,childList:!0})}function j7(){const ei=document.querySelector("#repo-search-form");ei&&ei.addEventListener("change",ti=>{ti.preventDefault();const ii=new FormData(ei),ni=new URLSearchParams(ii);ti.target.name==="clear-filter"&&(ni.delete("archived"),ni.delete("fork"),ni.delete("mirror"),ni.delete("template"),ni.delete("private")),ni.delete("clear-filter"),window.location.search=ni.toString()})}async function S7(){const ei=document.getElementsByClassName("js-color-picker-input");if(ei.length){await Promise.all([__webpack_require__.e("colorpicker").then(__webpack_require__.bind(__webpack_require__,"./node_modules/vanilla-colorful/hex-color-picker.js")),__webpack_require__.e("colorpicker").then(__webpack_require__.bind(__webpack_require__,"./web_src/css/features/colorpicker.css"))]);for(const ti of ei)C7(ti)}}function pp(ei,ti){ei.style.color=/#[0-9a-f]{6}/i.test(ti)?ti:"transparent"}function Hy(ei,ti){ei.setAttribute("color",ti)}function C7(ei){const ti=ei.querySelector("input"),ii=document.createElement("div");ii.classList.add("preview-square"),pp(ii,ti.value),ei.append(ii);const ni=document.createElement("hex-color-picker");ni.addEventListener("color-changed",si=>{ti.value=si.detail.value,ti.focus(),pp(ii,si.detail.value)}),ti.addEventListener("input",si=>{pp(ii,si.target.value),Hy(ni,si.target.value)}),pd(ti,{trigger:"focus click",theme:"bare",hideOnClick:!0,content:ni,placement:"bottom-start",interactive:!0,onShow(){Hy(ni,ti.value)}});for(const si of ei.querySelectorAll(".precolors .color"))si.addEventListener("click",ai=>{const li=ai.target.getAttribute("data-color-hex");ti.value=li,ti.dispatchEvent(new Event("input",{bubbles:!0})),pp(ii,li)})}const{appSubUrl:E7}=window.config;async function k7(){const ei=document.querySelector("#self-check-by-frontend");if(!ei)return;const ti=document.querySelector(".page-content.admin .admin-setting-content"),ni=await(await(0,so.LO)(`${E7}/admin/self_check`,{data:new URLSearchParams({location_origin:window.location.origin,now:Date.now()})})).json();(0,zn.oi)(ei,!!ni.problems?.length);for(const ai of ni.problems??[]){const li=document.createElement("div");li.classList.add("ui","warning","message"),li.textContent=ai,ei.append(li)}const si=!!ti.querySelectorAll(".self-check-problem:not(.tw-hidden)").length;(0,zn.oi)(ti.querySelector(".self-check-no-problem"),!si)}async function A7(){const ei=document.querySelector("#scoped-access-token-selector");if(!ei)return;const{default:ti}=await __webpack_require__.e("scoped-access-token-selector").then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/ScopedAccessTokenSelector.vue"));try{dc(ti,{isAdmin:JSON.parse(ei.getAttribute("data-is-admin")),noAccessLabel:ei.getAttribute("data-no-access-label"),readLabel:ei.getAttribute("data-read-label"),writeLabel:ei.getAttribute("data-write-label")}).mount(ei)}catch(ii){console.error("ScopedAccessTokenSelector failed to load",ii),ei.textContent=ei.getAttribute("data-locale-component-failed-to-load")}}NT(),x7(),(0,zn.Pm)(()=>{_C(),yj(),gC(),SC(),jj(),yC(),pC(),dC(),xC(),kT(),m7(),_T(),jT(),yT(),hC(),mC(),s_(),Nj(),bS(),Sb(),DS(),Zm(),nk(),KS(),kS(),TS(),tC(),Z2(),YE(),GE(),LS(),MS(),k7(),Fx(),qS(),qb(),lT(),aT(),$1(),ok(),ST(),ik(),Y2(),zE(),w7(),yE(),Bj(),Kb(),kE(),l7(),AE(),WE(),FE(),EE(),IE(),wS(),uk(),ES(),OE(),DE(),qE(),hT(),mT(),tA(),eA(),Zk(),ZE(),XE(),HT(),J2(),t7(),j7(),p7(),g7(),v7(),KE(),eL(),CC(),cT(),fT(),sk(),rT(),cC(),A7(),S7()})}(),function(){"use strict"}(),function(){"use strict"}(),function(){"use strict"}()})();