netbox/netbox/project-static/dist/netbox.js
2025-01-06 16:13:24 -05:00

36 lines
382 KiB
JavaScript

"use strict";(()=>{var Xh=Object.create;var Aa=Object.defineProperty,Jh=Object.defineProperties,Zh=Object.getOwnPropertyDescriptor,ep=Object.getOwnPropertyDescriptors,tp=Object.getOwnPropertyNames,ou=Object.getOwnPropertySymbols,ip=Object.getPrototypeOf,su=Object.prototype.hasOwnProperty,np=Object.prototype.propertyIsEnumerable;var Fl=(ii,ei,ti)=>ei in ii?Aa(ii,ei,{enumerable:!0,configurable:!0,writable:!0,value:ti}):ii[ei]=ti,Di=(ii,ei)=>{for(var ti in ei||(ei={}))su.call(ei,ti)&&Fl(ii,ti,ei[ti]);if(ou)for(var ti of ou(ei))np.call(ei,ti)&&Fl(ii,ti,ei[ti]);return ii},sn=(ii,ei)=>Jh(ii,ep(ei));var au=(ii,ei)=>()=>(ei||ii((ei={exports:{}}).exports,ei),ei.exports),lu=(ii,ei)=>{for(var ti in ei)Aa(ii,ti,{get:ei[ti],enumerable:!0})},rp=(ii,ei,ti,ni)=>{if(ei&&typeof ei=="object"||typeof ei=="function")for(let ri of tp(ei))!su.call(ii,ri)&&ri!==ti&&Aa(ii,ri,{get:()=>ei[ri],enumerable:!(ni=Zh(ei,ri))||ni.enumerable});return ii};var cu=(ii,ei,ti)=>(ti=ii!=null?Xh(ip(ii)):{},rp(ei||!ii||!ii.__esModule?Aa(ti,"default",{value:ii,enumerable:!0}):ti,ii));var en=(ii,ei,ti)=>Fl(ii,typeof ei!="symbol"?ei+"":ei,ti);var co=(ii,ei,ti)=>new Promise((ni,ri)=>{var oi=li=>{try{ai(ti.next(li))}catch(ui){ri(ui)}},si=li=>{try{ai(ti.throw(li))}catch(ui){ri(ui)}},ai=li=>li.done?ni(li.value):Promise.resolve(li.value).then(oi,si);ai((ti=ti.apply(ii,ei)).next())});var Ld=au((exports,module)=>{(function(ii,ei){typeof define=="function"&&define.amd?define([],ei):typeof module=="object"&&module.exports?module.exports=ei():ii.htmx=ii.htmx||ei()})(typeof self!="undefined"?self:exports,function(){return function(){"use strict";var Q={onLoad:F,process:zt,on:de,off:ge,trigger:ce,ajax:Nr,find:C,findAll:f,closest:v,values:function(ii,ei){var ti=dr(ii,ei||"post");return ti.values},remove:_,addClass:z,removeClass:n,toggleClass:$,takeClass:W,defineExtension:Ur,removeExtension:Br,logAll:V,logNone:j,logger:null,config:{historyEnabled:!0,historyCacheSize:10,refreshOnHistoryMiss:!1,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:!0,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:!0,allowScriptTags:!0,inlineScriptNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:!1,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",useTemplateFragments:!1,scrollBehavior:"smooth",defaultFocusScroll:!1,getCacheBusterParam:!1,globalViewTransitions:!1,methodsThatUseUrlParams:["get"],selfRequestsOnly:!1,ignoreTitle:!1,scrollIntoViewOnBoost:!0,triggerSpecsCache:null},parseInterval:d,_:t,createEventSource:function(ii){return new EventSource(ii,{withCredentials:!0})},createWebSocket:function(ii){var ei=new WebSocket(ii,[]);return ei.binaryType=Q.config.wsBinaryType,ei},version:"1.9.12"},r={addTriggerHandler:Lt,bodyContains:se,canAccessLocalStorage:U,findThisElement:xe,filterValues:yr,hasAttribute:o,getAttributeValue:te,getClosestAttributeValue:ne,getClosestMatch:c,getExpressionVars:Hr,getHeaders:xr,getInputValues:dr,getInternalData:ae,getSwapSpecification:wr,getTriggerSpecs:it,getTarget:ye,makeFragment:l,mergeObjects:le,makeSettleInfo:T,oobSwap:Ee,querySelectorExt:ue,selectAndSwap:je,settleImmediately:nr,shouldCancel:ut,triggerEvent:ce,triggerErrorEvent:fe,withExtensions:R},w=["get","post","put","delete","patch"],i=w.map(function(ii){return"[hx-"+ii+"], [data-hx-"+ii+"]"}).join(", "),S=e("head"),q=e("title"),H=e("svg",!0);function e(ii,ei){return new RegExp("<"+ii+"(\\s[^>]*>|>)([\\s\\S]*?)<\\/"+ii+">",ei?"gim":"im")}function d(ii){if(ii==null)return;let ei=NaN;return ii.slice(-2)=="ms"?ei=parseFloat(ii.slice(0,-2)):ii.slice(-1)=="s"?ei=parseFloat(ii.slice(0,-1))*1e3:ii.slice(-1)=="m"?ei=parseFloat(ii.slice(0,-1))*1e3*60:ei=parseFloat(ii),isNaN(ei)?void 0:ei}function ee(ii,ei){return ii.getAttribute&&ii.getAttribute(ei)}function o(ii,ei){return ii.hasAttribute&&(ii.hasAttribute(ei)||ii.hasAttribute("data-"+ei))}function te(ii,ei){return ee(ii,ei)||ee(ii,"data-"+ei)}function u(ii){return ii.parentElement}function re(){return document}function c(ii,ei){for(;ii&&!ei(ii);)ii=u(ii);return ii||null}function L(ii,ei,ti){var ni=te(ei,ti),ri=te(ei,"hx-disinherit");return ii!==ei&&ri&&(ri==="*"||ri.split(" ").indexOf(ti)>=0)?"unset":ni}function ne(ii,ei){var ti=null;if(c(ii,function(ni){return ti=L(ii,ni,ei)}),ti!=="unset")return ti}function h(ii,ei){var ti=ii.matches||ii.matchesSelector||ii.msMatchesSelector||ii.mozMatchesSelector||ii.webkitMatchesSelector||ii.oMatchesSelector;return ti&&ti.call(ii,ei)}function A(ii){var ei=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ti=ei.exec(ii);return ti?ti[1].toLowerCase():""}function s(ii,ei){for(var ti=new DOMParser,ni=ti.parseFromString(ii,"text/html"),ri=ni.body;ei>0;)ei--,ri=ri.firstChild;return ri==null&&(ri=re().createDocumentFragment()),ri}function N(ii){return/<body/.test(ii)}function l(ii){var ei=!N(ii),ti=A(ii),ni=ii;if(ti==="head"&&(ni=ni.replace(S,"")),Q.config.useTemplateFragments&&ei){var ri=s("<body><template>"+ni+"</template></body>",0),oi=ri.querySelector("template").content;return Q.config.allowScriptTags?oe(oi.querySelectorAll("script"),function(si){Q.config.inlineScriptNonce&&(si.nonce=Q.config.inlineScriptNonce),si.htmxExecuted=navigator.userAgent.indexOf("Firefox")===-1}):oe(oi.querySelectorAll("script"),function(si){_(si)}),oi}switch(ti){case"thead":case"tbody":case"tfoot":case"colgroup":case"caption":return s("<table>"+ni+"</table>",1);case"col":return s("<table><colgroup>"+ni+"</colgroup></table>",2);case"tr":return s("<table><tbody>"+ni+"</tbody></table>",2);case"td":case"th":return s("<table><tbody><tr>"+ni+"</tr></tbody></table>",3);case"script":case"style":return s("<div>"+ni+"</div>",1);default:return s(ni,0)}}function ie(ii){ii&&ii()}function I(ii,ei){return Object.prototype.toString.call(ii)==="[object "+ei+"]"}function k(ii){return I(ii,"Function")}function P(ii){return I(ii,"Object")}function ae(ii){var ei="htmx-internal-data",ti=ii[ei];return ti||(ti=ii[ei]={}),ti}function M(ii){var ei=[];if(ii)for(var ti=0;ti<ii.length;ti++)ei.push(ii[ti]);return ei}function oe(ii,ei){if(ii)for(var ti=0;ti<ii.length;ti++)ei(ii[ti])}function X(ii){var ei=ii.getBoundingClientRect(),ti=ei.top,ni=ei.bottom;return ti<window.innerHeight&&ni>=0}function se(ii){return ii.getRootNode&&ii.getRootNode()instanceof window.ShadowRoot?re().body.contains(ii.getRootNode().host):re().body.contains(ii)}function D(ii){return ii.trim().split(/\s+/)}function le(ii,ei){for(var ti in ei)ei.hasOwnProperty(ti)&&(ii[ti]=ei[ti]);return ii}function E(ii){try{return JSON.parse(ii)}catch(ei){return b(ei),null}}function U(){var ii="htmx:localStorageTest";try{return localStorage.setItem(ii,ii),localStorage.removeItem(ii),!0}catch(ei){return!1}}function B(ii){try{var ei=new URL(ii);return ei&&(ii=ei.pathname+ei.search),/^\/$/.test(ii)||(ii=ii.replace(/\/+$/,"")),ii}catch(ti){return ii}}function t(e){return Tr(re().body,function(){return eval(e)})}function F(ii){var ei=Q.on("htmx:load",function(ti){ii(ti.detail.elt)});return ei}function V(){Q.logger=function(ii,ei,ti){console&&console.log(ei,ii,ti)}}function j(){Q.logger=null}function C(ii,ei){return ei?ii.querySelector(ei):C(re(),ii)}function f(ii,ei){return ei?ii.querySelectorAll(ei):f(re(),ii)}function _(ii,ei){ii=p(ii),ei?setTimeout(function(){_(ii),ii=null},ei):ii.parentElement.removeChild(ii)}function z(ii,ei,ti){ii=p(ii),ti?setTimeout(function(){z(ii,ei),ii=null},ti):ii.classList&&ii.classList.add(ei)}function n(ii,ei,ti){ii=p(ii),ti?setTimeout(function(){n(ii,ei),ii=null},ti):ii.classList&&(ii.classList.remove(ei),ii.classList.length===0&&ii.removeAttribute("class"))}function $(ii,ei){ii=p(ii),ii.classList.toggle(ei)}function W(ii,ei){ii=p(ii),oe(ii.parentElement.children,function(ti){n(ti,ei)}),z(ii,ei)}function v(ii,ei){if(ii=p(ii),ii.closest)return ii.closest(ei);do if(ii==null||h(ii,ei))return ii;while(ii=ii&&u(ii));return null}function g(ii,ei){return ii.substring(0,ei.length)===ei}function G(ii,ei){return ii.substring(ii.length-ei.length)===ei}function J(ii){var ei=ii.trim();return g(ei,"<")&&G(ei,"/>")?ei.substring(1,ei.length-2):ei}function Z(ii,ei){return ei.indexOf("closest ")===0?[v(ii,J(ei.substr(8)))]:ei.indexOf("find ")===0?[C(ii,J(ei.substr(5)))]:ei==="next"?[ii.nextElementSibling]:ei.indexOf("next ")===0?[K(ii,J(ei.substr(5)))]:ei==="previous"?[ii.previousElementSibling]:ei.indexOf("previous ")===0?[Y(ii,J(ei.substr(9)))]:ei==="document"?[document]:ei==="window"?[window]:ei==="body"?[document.body]:re().querySelectorAll(J(ei))}var K=function(ii,ei){for(var ti=re().querySelectorAll(ei),ni=0;ni<ti.length;ni++){var ri=ti[ni];if(ri.compareDocumentPosition(ii)===Node.DOCUMENT_POSITION_PRECEDING)return ri}},Y=function(ii,ei){for(var ti=re().querySelectorAll(ei),ni=ti.length-1;ni>=0;ni--){var ri=ti[ni];if(ri.compareDocumentPosition(ii)===Node.DOCUMENT_POSITION_FOLLOWING)return ri}};function ue(ii,ei){return ei?Z(ii,ei)[0]:Z(re().body,ii)[0]}function p(ii){return I(ii,"String")?C(ii):ii}function ve(ii,ei,ti){return k(ei)?{target:re().body,event:ii,listener:ei}:{target:p(ii),event:ei,listener:ti}}function de(ii,ei,ti){jr(function(){var ri=ve(ii,ei,ti);ri.target.addEventListener(ri.event,ri.listener)});var ni=k(ei);return ni?ei:ti}function ge(ii,ei,ti){return jr(function(){var ni=ve(ii,ei,ti);ni.target.removeEventListener(ni.event,ni.listener)}),k(ei)?ei:ti}var pe=re().createElement("output");function me(ii,ei){var ti=ne(ii,ei);if(ti){if(ti==="this")return[xe(ii,ei)];var ni=Z(ii,ti);return ni.length===0?(b('The selector "'+ti+'" on '+ei+" returned no matches!"),[pe]):ni}}function xe(ii,ei){return c(ii,function(ti){return te(ti,ei)!=null})}function ye(ii){var ei=ne(ii,"hx-target");if(ei)return ei==="this"?xe(ii,"hx-target"):ue(ii,ei);var ti=ae(ii);return ti.boosted?re().body:ii}function be(ii){for(var ei=Q.config.attributesToSettle,ti=0;ti<ei.length;ti++)if(ii===ei[ti])return!0;return!1}function we(ii,ei){oe(ii.attributes,function(ti){!ei.hasAttribute(ti.name)&&be(ti.name)&&ii.removeAttribute(ti.name)}),oe(ei.attributes,function(ti){be(ti.name)&&ii.setAttribute(ti.name,ti.value)})}function Se(ii,ei){for(var ti=Fr(ei),ni=0;ni<ti.length;ni++){var ri=ti[ni];try{if(ri.isInlineSwap(ii))return!0}catch(oi){b(oi)}}return ii==="outerHTML"}function Ee(ii,ei,ti){var ni="#"+ee(ei,"id"),ri="outerHTML";ii==="true"||(ii.indexOf(":")>0?(ri=ii.substr(0,ii.indexOf(":")),ni=ii.substr(ii.indexOf(":")+1,ii.length)):ri=ii);var oi=re().querySelectorAll(ni);return oi?(oe(oi,function(si){var ai,li=ei.cloneNode(!0);ai=re().createDocumentFragment(),ai.appendChild(li),Se(ri,si)||(ai=li);var ui={shouldSwap:!0,target:si,fragment:ai};ce(si,"htmx:oobBeforeSwap",ui)&&(si=ui.target,ui.shouldSwap&&Fe(ri,si,si,ai,ti),oe(ti.elts,function(ci){ce(ci,"htmx:oobAfterSwap",ui)}))}),ei.parentNode.removeChild(ei)):(ei.parentNode.removeChild(ei),fe(re().body,"htmx:oobErrorNoTarget",{content:ei})),ii}function Ce(ii,ei,ti){var ni=ne(ii,"hx-select-oob");if(ni)for(var ri=ni.split(","),oi=0;oi<ri.length;oi++){var si=ri[oi].split(":",2),ai=si[0].trim();ai.indexOf("#")===0&&(ai=ai.substring(1));var li=si[1]||"true",ui=ei.querySelector("#"+ai);ui&&Ee(li,ui,ti)}oe(f(ei,"[hx-swap-oob], [data-hx-swap-oob]"),function(ci){var di=te(ci,"hx-swap-oob");di!=null&&Ee(di,ci,ti)})}function Re(ii){oe(f(ii,"[hx-preserve], [data-hx-preserve]"),function(ei){var ti=te(ei,"id"),ni=re().getElementById(ti);ni!=null&&ei.parentNode.replaceChild(ni,ei)})}function Te(ii,ei,ti){oe(ei.querySelectorAll("[id]"),function(ni){var ri=ee(ni,"id");if(ri&&ri.length>0){var oi=ri.replace("'","\\'"),si=ni.tagName.replace(":","\\:"),ai=ii.querySelector(si+"[id='"+oi+"']");if(ai&&ai!==ii){var li=ni.cloneNode();we(ni,ai),ti.tasks.push(function(){we(ni,li)})}}})}function Oe(ii){return function(){n(ii,Q.config.addedClass),zt(ii),Nt(ii),qe(ii),ce(ii,"htmx:load")}}function qe(ii){var ei="[autofocus]",ti=h(ii,ei)?ii:ii.querySelector(ei);ti!=null&&ti.focus()}function a(ii,ei,ti,ni){for(Te(ii,ti,ni);ti.childNodes.length>0;){var ri=ti.firstChild;z(ri,Q.config.addedClass),ii.insertBefore(ri,ei),ri.nodeType!==Node.TEXT_NODE&&ri.nodeType!==Node.COMMENT_NODE&&ni.tasks.push(Oe(ri))}}function He(ii,ei){for(var ti=0;ti<ii.length;)ei=(ei<<5)-ei+ii.charCodeAt(ti++)|0;return ei}function Le(ii){var ei=0;if(ii.attributes)for(var ti=0;ti<ii.attributes.length;ti++){var ni=ii.attributes[ti];ni.value&&(ei=He(ni.name,ei),ei=He(ni.value,ei))}return ei}function Ae(ii){var ei=ae(ii);if(ei.onHandlers){for(var ti=0;ti<ei.onHandlers.length;ti++){let ni=ei.onHandlers[ti];ii.removeEventListener(ni.event,ni.listener)}delete ei.onHandlers}}function Ne(ii){var ei=ae(ii);ei.timeout&&clearTimeout(ei.timeout),ei.webSocket&&ei.webSocket.close(),ei.sseEventSource&&ei.sseEventSource.close(),ei.listenerInfos&&oe(ei.listenerInfos,function(ti){ti.on&&ti.on.removeEventListener(ti.trigger,ti.listener)}),Ae(ii),oe(Object.keys(ei),function(ti){delete ei[ti]})}function m(ii){ce(ii,"htmx:beforeCleanupElement"),Ne(ii),ii.children&&oe(ii.children,function(ei){m(ei)})}function Ie(ii,ei,ti){if(ii.tagName==="BODY")return Ue(ii,ei,ti);var ni,ri=ii.previousSibling;for(a(u(ii),ii,ei,ti),ri==null?ni=u(ii).firstChild:ni=ri.nextSibling,ti.elts=ti.elts.filter(function(oi){return oi!=ii});ni&&ni!==ii;)ni.nodeType===Node.ELEMENT_NODE&&ti.elts.push(ni),ni=ni.nextElementSibling;m(ii),u(ii).removeChild(ii)}function ke(ii,ei,ti){return a(ii,ii.firstChild,ei,ti)}function Pe(ii,ei,ti){return a(u(ii),ii,ei,ti)}function Me(ii,ei,ti){return a(ii,null,ei,ti)}function Xe(ii,ei,ti){return a(u(ii),ii.nextSibling,ei,ti)}function De(ii,ei,ti){return m(ii),u(ii).removeChild(ii)}function Ue(ii,ei,ti){var ni=ii.firstChild;if(a(ii,ni,ei,ti),ni){for(;ni.nextSibling;)m(ni.nextSibling),ii.removeChild(ni.nextSibling);m(ni),ii.removeChild(ni)}}function Be(ii,ei,ti){var ni=ti||ne(ii,"hx-select");if(ni){var ri=re().createDocumentFragment();oe(ei.querySelectorAll(ni),function(oi){ri.appendChild(oi)}),ei=ri}return ei}function Fe(ii,ei,ti,ni,ri){switch(ii){case"none":return;case"outerHTML":Ie(ti,ni,ri);return;case"afterbegin":ke(ti,ni,ri);return;case"beforebegin":Pe(ti,ni,ri);return;case"beforeend":Me(ti,ni,ri);return;case"afterend":Xe(ti,ni,ri);return;case"delete":De(ti,ni,ri);return;default:for(var oi=Fr(ei),si=0;si<oi.length;si++){var ai=oi[si];try{var li=ai.handleSwap(ii,ti,ni,ri);if(li){if(typeof li.length!="undefined")for(var ui=0;ui<li.length;ui++){var ci=li[ui];ci.nodeType!==Node.TEXT_NODE&&ci.nodeType!==Node.COMMENT_NODE&&ri.tasks.push(Oe(ci))}return}}catch(di){b(di)}}ii==="innerHTML"?Ue(ti,ni,ri):Fe(Q.config.defaultSwapStyle,ei,ti,ni,ri)}}function Ve(ii){if(ii.indexOf("<title")>-1){var ei=ii.replace(H,""),ti=ei.match(q);if(ti)return ti[2]}}function je(ii,ei,ti,ni,ri,oi){ri.title=Ve(ni);var si=l(ni);if(si)return Ce(ti,si,ri),si=Be(ti,si,oi),Re(si),Fe(ii,ti,ei,si,ri)}function _e(ii,ei,ti){var ni=ii.getResponseHeader(ei);if(ni.indexOf("{")===0){var ri=E(ni);for(var oi in ri)if(ri.hasOwnProperty(oi)){var si=ri[oi];P(si)||(si={value:si}),ce(ti,oi,si)}}else for(var ai=ni.split(","),li=0;li<ai.length;li++)ce(ti,ai[li].trim(),[])}var ze=/\s/,x=/[\s,]/,$e=/[_$a-zA-Z]/,We=/[_$a-zA-Z0-9]/,Ge=['"',"'","/"],Je=/[^\s]/,Ze=/[{(]/,Ke=/[})]/;function Ye(ii){for(var ei=[],ti=0;ti<ii.length;){if($e.exec(ii.charAt(ti))){for(var ni=ti;We.exec(ii.charAt(ti+1));)ti++;ei.push(ii.substr(ni,ti-ni+1))}else if(Ge.indexOf(ii.charAt(ti))!==-1){var ri=ii.charAt(ti),ni=ti;for(ti++;ti<ii.length&&ii.charAt(ti)!==ri;)ii.charAt(ti)==="\\"&&ti++,ti++;ei.push(ii.substr(ni,ti-ni+1))}else{var oi=ii.charAt(ti);ei.push(oi)}ti++}return ei}function Qe(ii,ei,ti){return $e.exec(ii.charAt(0))&&ii!=="true"&&ii!=="false"&&ii!=="this"&&ii!==ti&&ei!=="."}function et(ii,ei,ti){if(ei[0]==="["){ei.shift();for(var ni=1,ri=" return (function("+ti+"){ return (",oi=null;ei.length>0;){var si=ei[0];if(si==="]"){if(ni--,ni===0){oi===null&&(ri=ri+"true"),ei.shift(),ri+=")})";try{var ai=Tr(ii,function(){return Function(ri)()},function(){return!0});return ai.source=ri,ai}catch(li){return fe(re().body,"htmx:syntax:error",{error:li,source:ri}),null}}}else si==="["&&ni++;Qe(si,oi,ti)?ri+="(("+ti+"."+si+") ? ("+ti+"."+si+") : (window."+si+"))":ri=ri+si,oi=ei.shift()}}}function y(ii,ei){for(var ti="";ii.length>0&&!ei.test(ii[0]);)ti+=ii.shift();return ti}function tt(ii){var ei;return ii.length>0&&Ze.test(ii[0])?(ii.shift(),ei=y(ii,Ke).trim(),ii.shift()):ei=y(ii,x),ei}var rt="input, textarea, select";function nt(ii,ei,ti){var ni=[],ri=Ye(ei);do{y(ri,Je);var oi=ri.length,si=y(ri,/[,\[\s]/);if(si!=="")if(si==="every"){var ai={trigger:"every"};y(ri,Je),ai.pollInterval=d(y(ri,/[,\[\s]/)),y(ri,Je);var li=et(ii,ri,"event");li&&(ai.eventFilter=li),ni.push(ai)}else if(si.indexOf("sse:")===0)ni.push({trigger:"sse",sseEvent:si.substr(4)});else{var ui={trigger:si},li=et(ii,ri,"event");for(li&&(ui.eventFilter=li);ri.length>0&&ri[0]!==",";){y(ri,Je);var ci=ri.shift();if(ci==="changed")ui.changed=!0;else if(ci==="once")ui.once=!0;else if(ci==="consume")ui.consume=!0;else if(ci==="delay"&&ri[0]===":")ri.shift(),ui.delay=d(y(ri,x));else if(ci==="from"&&ri[0]===":"){if(ri.shift(),Ze.test(ri[0]))var di=tt(ri);else{var di=y(ri,x);if(di==="closest"||di==="find"||di==="next"||di==="previous"){ri.shift();var pi=tt(ri);pi.length>0&&(di+=" "+pi)}}ui.from=di}else ci==="target"&&ri[0]===":"?(ri.shift(),ui.target=tt(ri)):ci==="throttle"&&ri[0]===":"?(ri.shift(),ui.throttle=d(y(ri,x))):ci==="queue"&&ri[0]===":"?(ri.shift(),ui.queue=y(ri,x)):ci==="root"&&ri[0]===":"?(ri.shift(),ui[ci]=tt(ri)):ci==="threshold"&&ri[0]===":"?(ri.shift(),ui[ci]=y(ri,x)):fe(ii,"htmx:syntax:error",{token:ri.shift()})}ni.push(ui)}ri.length===oi&&fe(ii,"htmx:syntax:error",{token:ri.shift()}),y(ri,Je)}while(ri[0]===","&&ri.shift());return ti&&(ti[ei]=ni),ni}function it(ii){var ei=te(ii,"hx-trigger"),ti=[];if(ei){var ni=Q.config.triggerSpecsCache;ti=ni&&ni[ei]||nt(ii,ei,ni)}return ti.length>0?ti:h(ii,"form")?[{trigger:"submit"}]:h(ii,'input[type="button"], input[type="submit"]')?[{trigger:"click"}]:h(ii,rt)?[{trigger:"change"}]:[{trigger:"click"}]}function at(ii){ae(ii).cancelled=!0}function ot(ii,ei,ti){var ni=ae(ii);ni.timeout=setTimeout(function(){se(ii)&&ni.cancelled!==!0&&(ct(ti,ii,Wt("hx:poll:trigger",{triggerSpec:ti,target:ii}))||ei(ii),ot(ii,ei,ti))},ti.pollInterval)}function st(ii){return location.hostname===ii.hostname&&ee(ii,"href")&&ee(ii,"href").indexOf("#")!==0}function lt(ii,ei,ti){if(ii.tagName==="A"&&st(ii)&&(ii.target===""||ii.target==="_self")||ii.tagName==="FORM"){ei.boosted=!0;var ni,ri;if(ii.tagName==="A")ni="get",ri=ee(ii,"href");else{var oi=ee(ii,"method");ni=oi?oi.toLowerCase():"get",ri=ee(ii,"action")}ti.forEach(function(si){ht(ii,function(ai,li){if(v(ai,Q.config.disableSelector)){m(ai);return}he(ni,ri,ai,li)},ei,si,!0)})}}function ut(ii,ei){return!!((ii.type==="submit"||ii.type==="click")&&(ei.tagName==="FORM"||h(ei,'input[type="submit"], button')&&v(ei,"form")!==null||ei.tagName==="A"&&ei.href&&(ei.getAttribute("href")==="#"||ei.getAttribute("href").indexOf("#")!==0)))}function ft(ii,ei){return ae(ii).boosted&&ii.tagName==="A"&&ei.type==="click"&&(ei.ctrlKey||ei.metaKey)}function ct(ii,ei,ti){var ni=ii.eventFilter;if(ni)try{return ni.call(ei,ti)!==!0}catch(ri){return fe(re().body,"htmx:eventFilter:error",{error:ri,source:ni.source}),!0}return!1}function ht(ii,ei,ti,ni,ri){var oi=ae(ii),si;ni.from?si=Z(ii,ni.from):si=[ii],ni.changed&&si.forEach(function(ai){var li=ae(ai);li.lastValue=ai.value}),oe(si,function(ai){var li=function(ui){if(!se(ii)){ai.removeEventListener(ni.trigger,li);return}if(!ft(ii,ui)&&((ri||ut(ui,ii))&&ui.preventDefault(),!ct(ni,ii,ui))){var ci=ae(ui);if(ci.triggerSpec=ni,ci.handledFor==null&&(ci.handledFor=[]),ci.handledFor.indexOf(ii)<0){if(ci.handledFor.push(ii),ni.consume&&ui.stopPropagation(),ni.target&&ui.target&&!h(ui.target,ni.target))return;if(ni.once){if(oi.triggeredOnce)return;oi.triggeredOnce=!0}if(ni.changed){var di=ae(ai);if(di.lastValue===ai.value)return;di.lastValue=ai.value}if(oi.delayed&&clearTimeout(oi.delayed),oi.throttle)return;ni.throttle>0?oi.throttle||(ei(ii,ui),oi.throttle=setTimeout(function(){oi.throttle=null},ni.throttle)):ni.delay>0?oi.delayed=setTimeout(function(){ei(ii,ui)},ni.delay):(ce(ii,"htmx:trigger"),ei(ii,ui))}}};ti.listenerInfos==null&&(ti.listenerInfos=[]),ti.listenerInfos.push({trigger:ni.trigger,listener:li,on:ai}),ai.addEventListener(ni.trigger,li)})}var vt=!1,dt=null;function gt(){dt||(dt=function(){vt=!0},window.addEventListener("scroll",dt),setInterval(function(){vt&&(vt=!1,oe(re().querySelectorAll("[hx-trigger='revealed'],[data-hx-trigger='revealed']"),function(ii){pt(ii)}))},200))}function pt(ii){if(!o(ii,"data-hx-revealed")&&X(ii)){ii.setAttribute("data-hx-revealed","true");var ei=ae(ii);ei.initHash?ce(ii,"revealed"):ii.addEventListener("htmx:afterProcessNode",function(ti){ce(ii,"revealed")},{once:!0})}}function mt(ii,ei,ti){for(var ni=D(ti),ri=0;ri<ni.length;ri++){var oi=ni[ri].split(/:(.+)/);oi[0]==="connect"&&xt(ii,oi[1],0),oi[0]==="send"&&bt(ii)}}function xt(ii,ei,ti){if(se(ii)){if(ei.indexOf("/")==0){var ni=location.hostname+(location.port?":"+location.port:"");location.protocol=="https:"?ei="wss://"+ni+ei:location.protocol=="http:"&&(ei="ws://"+ni+ei)}var ri=Q.createWebSocket(ei);ri.onerror=function(oi){fe(ii,"htmx:wsError",{error:oi,socket:ri}),yt(ii)},ri.onclose=function(oi){if([1006,1012,1013].indexOf(oi.code)>=0){var si=wt(ti);setTimeout(function(){xt(ii,ei,ti+1)},si)}},ri.onopen=function(oi){ti=0},ae(ii).webSocket=ri,ri.addEventListener("message",function(oi){if(!yt(ii)){var si=oi.data;R(ii,function(pi){si=pi.transformResponse(si,null,ii)});for(var ai=T(ii),li=l(si),ui=M(li.children),ci=0;ci<ui.length;ci++){var di=ui[ci];Ee(te(di,"hx-swap-oob")||"true",di,ai)}nr(ai.tasks)}})}}function yt(ii){if(!se(ii))return ae(ii).webSocket.close(),!0}function bt(ii){var ei=c(ii,function(ti){return ae(ti).webSocket!=null});ei?ii.addEventListener(it(ii)[0].trigger,function(ti){var ni=ae(ei).webSocket,ri=xr(ii,ei),oi=dr(ii,"post"),si=oi.errors,ai=oi.values,li=Hr(ii),ui=le(ai,li),ci=yr(ui,ii);if(ci.HEADERS=ri,si&&si.length>0){ce(ii,"htmx:validation:halted",si);return}ni.send(JSON.stringify(ci)),ut(ti,ii)&&ti.preventDefault()}):fe(ii,"htmx:noWebSocketSourceError")}function wt(ii){var ei=Q.config.wsReconnectDelay;if(typeof ei=="function")return ei(ii);if(ei==="full-jitter"){var ti=Math.min(ii,6),ni=1e3*Math.pow(2,ti);return ni*Math.random()}b('htmx.config.wsReconnectDelay must either be a function or the string "full-jitter"')}function St(ii,ei,ti){for(var ni=D(ti),ri=0;ri<ni.length;ri++){var oi=ni[ri].split(/:(.+)/);oi[0]==="connect"&&Et(ii,oi[1]),oi[0]==="swap"&&Ct(ii,oi[1])}}function Et(ii,ei){var ti=Q.createEventSource(ei);ti.onerror=function(ni){fe(ii,"htmx:sseError",{error:ni,source:ti}),Tt(ii)},ae(ii).sseEventSource=ti}function Ct(ii,ei){var ti=c(ii,Ot);if(ti){var ni=ae(ti).sseEventSource,ri=function(oi){if(!Tt(ti)){if(!se(ii)){ni.removeEventListener(ei,ri);return}var si=oi.data;R(ii,function(ci){si=ci.transformResponse(si,null,ii)});var ai=wr(ii),li=ye(ii),ui=T(ii);je(ai.swapStyle,li,ii,si,ui),nr(ui.tasks),ce(ii,"htmx:sseMessage",oi)}};ae(ii).sseListener=ri,ni.addEventListener(ei,ri)}else fe(ii,"htmx:noSSESourceError")}function Rt(ii,ei,ti){var ni=c(ii,Ot);if(ni){var ri=ae(ni).sseEventSource,oi=function(){Tt(ni)||(se(ii)?ei(ii):ri.removeEventListener(ti,oi))};ae(ii).sseListener=oi,ri.addEventListener(ti,oi)}else fe(ii,"htmx:noSSESourceError")}function Tt(ii){if(!se(ii))return ae(ii).sseEventSource.close(),!0}function Ot(ii){return ae(ii).sseEventSource!=null}function qt(ii,ei,ti,ni){var ri=function(){ti.loaded||(ti.loaded=!0,ei(ii))};ni>0?setTimeout(ri,ni):ri()}function Ht(ii,ei,ti){var ni=!1;return oe(w,function(ri){if(o(ii,"hx-"+ri)){var oi=te(ii,"hx-"+ri);ni=!0,ei.path=oi,ei.verb=ri,ti.forEach(function(si){Lt(ii,si,ei,function(ai,li){if(v(ai,Q.config.disableSelector)){m(ai);return}he(ri,oi,ai,li)})})}}),ni}function Lt(ii,ei,ti,ni){if(ei.sseEvent)Rt(ii,ni,ei.sseEvent);else if(ei.trigger==="revealed")gt(),ht(ii,ni,ti,ei),pt(ii);else if(ei.trigger==="intersect"){var ri={};ei.root&&(ri.root=ue(ii,ei.root)),ei.threshold&&(ri.threshold=parseFloat(ei.threshold));var oi=new IntersectionObserver(function(si){for(var ai=0;ai<si.length;ai++){var li=si[ai];if(li.isIntersecting){ce(ii,"intersect");break}}},ri);oi.observe(ii),ht(ii,ni,ti,ei)}else ei.trigger==="load"?ct(ei,ii,Wt("load",{elt:ii}))||qt(ii,ni,ti,ei.delay):ei.pollInterval>0?(ti.polling=!0,ot(ii,ni,ei)):ht(ii,ni,ti,ei)}function At(ii){if(!ii.htmxExecuted&&Q.config.allowScriptTags&&(ii.type==="text/javascript"||ii.type==="module"||ii.type==="")){var ei=re().createElement("script");oe(ii.attributes,function(ni){ei.setAttribute(ni.name,ni.value)}),ei.textContent=ii.textContent,ei.async=!1,Q.config.inlineScriptNonce&&(ei.nonce=Q.config.inlineScriptNonce);var ti=ii.parentElement;try{ti.insertBefore(ei,ii)}catch(ni){b(ni)}finally{ii.parentElement&&ii.parentElement.removeChild(ii)}}}function Nt(ii){h(ii,"script")&&At(ii),oe(f(ii,"script"),function(ei){At(ei)})}function It(ii){var ei=ii.attributes;if(!ei)return!1;for(var ti=0;ti<ei.length;ti++){var ni=ei[ti].name;if(g(ni,"hx-on:")||g(ni,"data-hx-on:")||g(ni,"hx-on-")||g(ni,"data-hx-on-"))return!0}return!1}function kt(ii){var ei=null,ti=[];if(It(ii)&&ti.push(ii),document.evaluate)for(var ni=document.evaluate('.//*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]',ii);ei=ni.iterateNext();)ti.push(ei);else if(typeof ii.getElementsByTagName=="function")for(var ri=ii.getElementsByTagName("*"),oi=0;oi<ri.length;oi++)It(ri[oi])&&ti.push(ri[oi]);return ti}function Pt(ii){if(ii.querySelectorAll){var ei=", [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost]",ti=ii.querySelectorAll(i+ei+", form, [type='submit'], [hx-sse], [data-hx-sse], [hx-ws], [data-hx-ws], [hx-ext], [data-hx-ext], [hx-trigger], [data-hx-trigger], [hx-on], [data-hx-on]");return ti}else return[]}function Mt(ii){var ei=v(ii.target,"button, input[type='submit']"),ti=Dt(ii);ti&&(ti.lastButtonClicked=ei)}function Xt(ii){var ei=Dt(ii);ei&&(ei.lastButtonClicked=null)}function Dt(ii){var ei=v(ii.target,"button, input[type='submit']");if(ei){var ti=p("#"+ee(ei,"form"))||v(ei,"form");if(ti)return ae(ti)}}function Ut(ii){ii.addEventListener("click",Mt),ii.addEventListener("focusin",Mt),ii.addEventListener("focusout",Xt)}function Bt(ii){for(var ei=Ye(ii),ti=0,ni=0;ni<ei.length;ni++){let ri=ei[ni];ri==="{"?ti++:ri==="}"&&ti--}return ti}function Ft(ii,ei,ti){var ni=ae(ii);Array.isArray(ni.onHandlers)||(ni.onHandlers=[]);var ri,oi=function(si){return Tr(ii,function(){ri||(ri=new Function("event",ti)),ri.call(ii,si)})};ii.addEventListener(ei,oi),ni.onHandlers.push({event:ei,listener:oi})}function Vt(ii){var ei=te(ii,"hx-on");if(ei){for(var ti={},ni=ei.split(`
`),ri=null,oi=0;ni.length>0;){var si=ni.shift(),ai=si.match(/^\s*([a-zA-Z:\-\.]+:)(.*)/);oi===0&&ai?(si.split(":"),ri=ai[1].slice(0,-1),ti[ri]=ai[2]):ti[ri]+=si,oi+=Bt(si)}for(var li in ti)Ft(ii,li,ti[li])}}function jt(ii){Ae(ii);for(var ei=0;ei<ii.attributes.length;ei++){var ti=ii.attributes[ei].name,ni=ii.attributes[ei].value;if(g(ti,"hx-on")||g(ti,"data-hx-on")){var ri=ti.indexOf("-on")+3,oi=ti.slice(ri,ri+1);if(oi==="-"||oi===":"){var si=ti.slice(ri+1);g(si,":")?si="htmx"+si:g(si,"-")?si="htmx:"+si.slice(1):g(si,"htmx-")&&(si="htmx:"+si.slice(5)),Ft(ii,si,ni)}}}}function _t(ii){if(v(ii,Q.config.disableSelector)){m(ii);return}var ei=ae(ii);if(ei.initHash!==Le(ii)){Ne(ii),ei.initHash=Le(ii),Vt(ii),ce(ii,"htmx:beforeProcessNode"),ii.value&&(ei.lastValue=ii.value);var ti=it(ii),ni=Ht(ii,ei,ti);ni||(ne(ii,"hx-boost")==="true"?lt(ii,ei,ti):o(ii,"hx-trigger")&&ti.forEach(function(si){Lt(ii,si,ei,function(){})})),(ii.tagName==="FORM"||ee(ii,"type")==="submit"&&o(ii,"form"))&&Ut(ii);var ri=te(ii,"hx-sse");ri&&St(ii,ei,ri);var oi=te(ii,"hx-ws");oi&&mt(ii,ei,oi),ce(ii,"htmx:afterProcessNode")}}function zt(ii){if(ii=p(ii),v(ii,Q.config.disableSelector)){m(ii);return}_t(ii),oe(Pt(ii),function(ei){_t(ei)}),oe(kt(ii),jt)}function $t(ii){return ii.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Wt(ii,ei){var ti;return window.CustomEvent&&typeof window.CustomEvent=="function"?ti=new CustomEvent(ii,{bubbles:!0,cancelable:!0,detail:ei}):(ti=re().createEvent("CustomEvent"),ti.initCustomEvent(ii,!0,!0,ei)),ti}function fe(ii,ei,ti){ce(ii,ei,le({error:ei},ti))}function Gt(ii){return ii==="htmx:afterProcessNode"}function R(ii,ei){oe(Fr(ii),function(ti){try{ei(ti)}catch(ni){b(ni)}})}function b(ii){console.error?console.error(ii):console.log&&console.log("ERROR: ",ii)}function ce(ii,ei,ti){ii=p(ii),ti==null&&(ti={}),ti.elt=ii;var ni=Wt(ei,ti);Q.logger&&!Gt(ei)&&Q.logger(ii,ei,ti),ti.error&&(b(ti.error),ce(ii,"htmx:error",{errorInfo:ti}));var ri=ii.dispatchEvent(ni),oi=$t(ei);if(ri&&oi!==ei){var si=Wt(oi,ni.detail);ri=ri&&ii.dispatchEvent(si)}return R(ii,function(ai){ri=ri&&ai.onEvent(ei,ni)!==!1&&!ni.defaultPrevented}),ri}var Jt=location.pathname+location.search;function Zt(){var ii=re().querySelector("[hx-history-elt],[data-hx-history-elt]");return ii||re().body}function Kt(ii,ei,ti,ni){if(U()){if(Q.config.historyCacheSize<=0){localStorage.removeItem("htmx-history-cache");return}ii=B(ii);for(var ri=E(localStorage.getItem("htmx-history-cache"))||[],oi=0;oi<ri.length;oi++)if(ri[oi].url===ii){ri.splice(oi,1);break}var si={url:ii,content:ei,title:ti,scroll:ni};for(ce(re().body,"htmx:historyItemCreated",{item:si,cache:ri}),ri.push(si);ri.length>Q.config.historyCacheSize;)ri.shift();for(;ri.length>0;)try{localStorage.setItem("htmx-history-cache",JSON.stringify(ri));break}catch(ai){fe(re().body,"htmx:historyCacheError",{cause:ai,cache:ri}),ri.shift()}}}function Yt(ii){if(!U())return null;ii=B(ii);for(var ei=E(localStorage.getItem("htmx-history-cache"))||[],ti=0;ti<ei.length;ti++)if(ei[ti].url===ii)return ei[ti];return null}function Qt(ii){var ei=Q.config.requestClass,ti=ii.cloneNode(!0);return oe(f(ti,"."+ei),function(ni){n(ni,ei)}),ti.innerHTML}function er(){var ii=Zt(),ei=Jt||location.pathname+location.search,ti;try{ti=re().querySelector('[hx-history="false" i],[data-hx-history="false" i]')}catch(ni){ti=re().querySelector('[hx-history="false"],[data-hx-history="false"]')}ti||(ce(re().body,"htmx:beforeHistorySave",{path:ei,historyElt:ii}),Kt(ei,Qt(ii),re().title,window.scrollY)),Q.config.historyEnabled&&history.replaceState({htmx:!0},re().title,window.location.href)}function tr(ii){Q.config.getCacheBusterParam&&(ii=ii.replace(/org\.htmx\.cache-buster=[^&]*&?/,""),(G(ii,"&")||G(ii,"?"))&&(ii=ii.slice(0,-1))),Q.config.historyEnabled&&history.pushState({htmx:!0},"",ii),Jt=ii}function rr(ii){Q.config.historyEnabled&&history.replaceState({htmx:!0},"",ii),Jt=ii}function nr(ii){oe(ii,function(ei){ei.call()})}function ir(ii){var ei=new XMLHttpRequest,ti={path:ii,xhr:ei};ce(re().body,"htmx:historyCacheMiss",ti),ei.open("GET",ii,!0),ei.setRequestHeader("HX-Request","true"),ei.setRequestHeader("HX-History-Restore-Request","true"),ei.setRequestHeader("HX-Current-URL",re().location.href),ei.onload=function(){if(this.status>=200&&this.status<400){ce(re().body,"htmx:historyCacheMissLoad",ti);var ni=l(this.response);ni=ni.querySelector("[hx-history-elt],[data-hx-history-elt]")||ni;var ri=Zt(),oi=T(ri),si=Ve(this.response);if(si){var ai=C("title");ai?ai.innerHTML=si:window.document.title=si}Ue(ri,ni,oi),nr(oi.tasks),Jt=ii,ce(re().body,"htmx:historyRestore",{path:ii,cacheMiss:!0,serverResponse:this.response})}else fe(re().body,"htmx:historyCacheMissLoadError",ti)},ei.send()}function ar(ii){er(),ii=ii||location.pathname+location.search;var ei=Yt(ii);if(ei){var ti=l(ei.content),ni=Zt(),ri=T(ni);Ue(ni,ti,ri),nr(ri.tasks),document.title=ei.title,setTimeout(function(){window.scrollTo(0,ei.scroll)},0),Jt=ii,ce(re().body,"htmx:historyRestore",{path:ii,item:ei})}else Q.config.refreshOnHistoryMiss?window.location.reload(!0):ir(ii)}function or(ii){var ei=me(ii,"hx-indicator");return ei==null&&(ei=[ii]),oe(ei,function(ti){var ni=ae(ti);ni.requestCount=(ni.requestCount||0)+1,ti.classList.add.call(ti.classList,Q.config.requestClass)}),ei}function sr(ii){var ei=me(ii,"hx-disabled-elt");return ei==null&&(ei=[]),oe(ei,function(ti){var ni=ae(ti);ni.requestCount=(ni.requestCount||0)+1,ti.setAttribute("disabled","")}),ei}function lr(ii,ei){oe(ii,function(ti){var ni=ae(ti);ni.requestCount=(ni.requestCount||0)-1,ni.requestCount===0&&ti.classList.remove.call(ti.classList,Q.config.requestClass)}),oe(ei,function(ti){var ni=ae(ti);ni.requestCount=(ni.requestCount||0)-1,ni.requestCount===0&&ti.removeAttribute("disabled")})}function ur(ii,ei){for(var ti=0;ti<ii.length;ti++){var ni=ii[ti];if(ni.isSameNode(ei))return!0}return!1}function fr(ii){return ii.name===""||ii.name==null||ii.disabled||v(ii,"fieldset[disabled]")||ii.type==="button"||ii.type==="submit"||ii.tagName==="image"||ii.tagName==="reset"||ii.tagName==="file"?!1:ii.type==="checkbox"||ii.type==="radio"?ii.checked:!0}function cr(ii,ei,ti){if(ii!=null&&ei!=null){var ni=ti[ii];ni===void 0?ti[ii]=ei:Array.isArray(ni)?Array.isArray(ei)?ti[ii]=ni.concat(ei):ni.push(ei):Array.isArray(ei)?ti[ii]=[ni].concat(ei):ti[ii]=[ni,ei]}}function hr(ii,ei,ti,ni,ri){if(!(ni==null||ur(ii,ni))){if(ii.push(ni),fr(ni)){var oi=ee(ni,"name"),si=ni.value;ni.multiple&&ni.tagName==="SELECT"&&(si=M(ni.querySelectorAll("option:checked")).map(function(li){return li.value})),ni.files&&(si=M(ni.files)),cr(oi,si,ei),ri&&vr(ni,ti)}if(h(ni,"form")){var ai=ni.elements;oe(ai,function(li){hr(ii,ei,ti,li,ri)})}}}function vr(ii,ei){ii.willValidate&&(ce(ii,"htmx:validation:validate"),ii.checkValidity()||(ei.push({elt:ii,message:ii.validationMessage,validity:ii.validity}),ce(ii,"htmx:validation:failed",{message:ii.validationMessage,validity:ii.validity})))}function dr(ii,ei){var ti=[],ni={},ri={},oi=[],si=ae(ii);si.lastButtonClicked&&!se(si.lastButtonClicked)&&(si.lastButtonClicked=null);var ai=h(ii,"form")&&ii.noValidate!==!0||te(ii,"hx-validate")==="true";if(si.lastButtonClicked&&(ai=ai&&si.lastButtonClicked.formNoValidate!==!0),ei!=="get"&&hr(ti,ri,oi,v(ii,"form"),ai),hr(ti,ni,oi,ii,ai),si.lastButtonClicked||ii.tagName==="BUTTON"||ii.tagName==="INPUT"&&ee(ii,"type")==="submit"){var li=si.lastButtonClicked||ii,ui=ee(li,"name");cr(ui,li.value,ri)}var ci=me(ii,"hx-include");return oe(ci,function(di){hr(ti,ni,oi,di,ai),h(di,"form")||oe(di.querySelectorAll(rt),function(pi){hr(ti,ni,oi,pi,ai)})}),ni=le(ni,ri),{errors:oi,values:ni}}function gr(ii,ei,ti){ii!==""&&(ii+="&"),String(ti)==="[object Object]"&&(ti=JSON.stringify(ti));var ni=encodeURIComponent(ti);return ii+=encodeURIComponent(ei)+"="+ni,ii}function pr(ii){var ei="";for(var ti in ii)if(ii.hasOwnProperty(ti)){var ni=ii[ti];Array.isArray(ni)?oe(ni,function(ri){ei=gr(ei,ti,ri)}):ei=gr(ei,ti,ni)}return ei}function mr(ii){var ei=new FormData;for(var ti in ii)if(ii.hasOwnProperty(ti)){var ni=ii[ti];Array.isArray(ni)?oe(ni,function(ri){ei.append(ti,ri)}):ei.append(ti,ni)}return ei}function xr(ii,ei,ti){var ni={"HX-Request":"true","HX-Trigger":ee(ii,"id"),"HX-Trigger-Name":ee(ii,"name"),"HX-Target":te(ei,"id"),"HX-Current-URL":re().location.href};return Rr(ii,"hx-headers",!1,ni),ti!==void 0&&(ni["HX-Prompt"]=ti),ae(ii).boosted&&(ni["HX-Boosted"]="true"),ni}function yr(ii,ei){var ti=ne(ei,"hx-params");if(ti){if(ti==="none")return{};if(ti==="*")return ii;if(ti.indexOf("not ")===0)return oe(ti.substr(4).split(","),function(ri){ri=ri.trim(),delete ii[ri]}),ii;var ni={};return oe(ti.split(","),function(ri){ri=ri.trim(),ni[ri]=ii[ri]}),ni}else return ii}function br(ii){return ee(ii,"href")&&ee(ii,"href").indexOf("#")>=0}function wr(ii,ei){var ti=ei||ne(ii,"hx-swap"),ni={swapStyle:ae(ii).boosted?"innerHTML":Q.config.defaultSwapStyle,swapDelay:Q.config.defaultSwapDelay,settleDelay:Q.config.defaultSettleDelay};if(Q.config.scrollIntoViewOnBoost&&ae(ii).boosted&&!br(ii)&&(ni.show="top"),ti){var ri=D(ti);if(ri.length>0)for(var oi=0;oi<ri.length;oi++){var si=ri[oi];if(si.indexOf("swap:")===0)ni.swapDelay=d(si.substr(5));else if(si.indexOf("settle:")===0)ni.settleDelay=d(si.substr(7));else if(si.indexOf("transition:")===0)ni.transition=si.substr(11)==="true";else if(si.indexOf("ignoreTitle:")===0)ni.ignoreTitle=si.substr(12)==="true";else if(si.indexOf("scroll:")===0){var ai=si.substr(7),li=ai.split(":"),ui=li.pop(),ci=li.length>0?li.join(":"):null;ni.scroll=ui,ni.scrollTarget=ci}else if(si.indexOf("show:")===0){var di=si.substr(5),li=di.split(":"),pi=li.pop(),ci=li.length>0?li.join(":"):null;ni.show=pi,ni.showTarget=ci}else if(si.indexOf("focus-scroll:")===0){var yi=si.substr(13);ni.focusScroll=yi=="true"}else oi==0?ni.swapStyle=si:b("Unknown modifier in hx-swap: "+si)}}return ni}function Sr(ii){return ne(ii,"hx-encoding")==="multipart/form-data"||h(ii,"form")&&ee(ii,"enctype")==="multipart/form-data"}function Er(ii,ei,ti){var ni=null;return R(ei,function(ri){ni==null&&(ni=ri.encodeParameters(ii,ti,ei))}),ni!=null?ni:Sr(ei)?mr(ti):pr(ti)}function T(ii){return{tasks:[],elts:[ii]}}function Cr(ii,ei){var ti=ii[0],ni=ii[ii.length-1];if(ei.scroll){var ri=null;ei.scrollTarget&&(ri=ue(ti,ei.scrollTarget)),ei.scroll==="top"&&(ti||ri)&&(ri=ri||ti,ri.scrollTop=0),ei.scroll==="bottom"&&(ni||ri)&&(ri=ri||ni,ri.scrollTop=ri.scrollHeight)}if(ei.show){var ri=null;if(ei.showTarget){var oi=ei.showTarget;ei.showTarget==="window"&&(oi="body"),ri=ue(ti,oi)}ei.show==="top"&&(ti||ri)&&(ri=ri||ti,ri.scrollIntoView({block:"start",behavior:Q.config.scrollBehavior})),ei.show==="bottom"&&(ni||ri)&&(ri=ri||ni,ri.scrollIntoView({block:"end",behavior:Q.config.scrollBehavior}))}}function Rr(ii,ei,ti,ni){if(ni==null&&(ni={}),ii==null)return ni;var ri=te(ii,ei);if(ri){var oi=ri.trim(),si=ti;if(oi==="unset")return null;oi.indexOf("javascript:")===0?(oi=oi.substr(11),si=!0):oi.indexOf("js:")===0&&(oi=oi.substr(3),si=!0),oi.indexOf("{")!==0&&(oi="{"+oi+"}");var ai;si?ai=Tr(ii,function(){return Function("return ("+oi+")")()},{}):ai=E(oi);for(var li in ai)ai.hasOwnProperty(li)&&ni[li]==null&&(ni[li]=ai[li])}return Rr(u(ii),ei,ti,ni)}function Tr(ii,ei,ti){return Q.config.allowEval?ei():(fe(ii,"htmx:evalDisallowedError"),ti)}function Or(ii,ei){return Rr(ii,"hx-vars",!0,ei)}function qr(ii,ei){return Rr(ii,"hx-vals",!1,ei)}function Hr(ii){return le(Or(ii),qr(ii))}function Lr(ii,ei,ti){if(ti!==null)try{ii.setRequestHeader(ei,ti)}catch(ni){ii.setRequestHeader(ei,encodeURIComponent(ti)),ii.setRequestHeader(ei+"-URI-AutoEncoded","true")}}function Ar(ii){if(ii.responseURL&&typeof URL!="undefined")try{var ei=new URL(ii.responseURL);return ei.pathname+ei.search}catch(ti){fe(re().body,"htmx:badResponseUrl",{url:ii.responseURL})}}function O(ii,ei){return ei.test(ii.getAllResponseHeaders())}function Nr(ii,ei,ti){return ii=ii.toLowerCase(),ti?ti instanceof Element||I(ti,"String")?he(ii,ei,null,null,{targetOverride:p(ti),returnPromise:!0}):he(ii,ei,p(ti.source),ti.event,{handler:ti.handler,headers:ti.headers,values:ti.values,targetOverride:p(ti.target),swapOverride:ti.swap,select:ti.select,returnPromise:!0}):he(ii,ei,null,null,{returnPromise:!0})}function Ir(ii){for(var ei=[];ii;)ei.push(ii),ii=ii.parentElement;return ei}function kr(ii,ei,ti){var ni,ri;if(typeof URL=="function"){ri=new URL(ei,document.location.href);var oi=document.location.origin;ni=oi===ri.origin}else ri=ei,ni=g(ei,document.location.origin);return Q.config.selfRequestsOnly&&!ni?!1:ce(ii,"htmx:validateUrl",le({url:ri,sameHost:ni},ti))}function he(ii,ei,ti,ni,ri,oi){var si=null,ai=null;if(ri=ri!=null?ri:{},ri.returnPromise&&typeof Promise!="undefined")var li=new Promise(function(On,zn){si=On,ai=zn});ti==null&&(ti=re().body);var ui=ri.handler||Mr,ci=ri.select||null;if(!se(ti))return ie(si),li;var di=ri.targetOverride||ye(ti);if(di==null||di==pe)return fe(ti,"htmx:targetError",{target:te(ti,"hx-target")}),ie(ai),li;var pi=ae(ti),yi=pi.lastButtonClicked;if(yi){var gi=ee(yi,"formaction");gi!=null&&(ei=gi);var vi=ee(yi,"formmethod");vi!=null&&vi.toLowerCase()!=="dialog"&&(ii=vi)}var Ei=ne(ti,"hx-confirm");if(oi===void 0){var Ci=function(On){return he(ii,ei,ti,ni,ri,!!On)},xi={target:di,elt:ti,path:ei,verb:ii,triggeringEvent:ni,etc:ri,issueRequest:Ci,question:Ei};if(ce(ti,"htmx:confirm",xi)===!1)return ie(si),li}var Li=ti,Oi=ne(ti,"hx-sync"),zi=null,Vi=!1;if(Oi){var ki=Oi.split(":"),Mi=ki[0].trim();if(Mi==="this"?Li=xe(ti,"hx-sync"):Li=ue(ti,Mi),Oi=(ki[1]||"drop").trim(),pi=ae(Li),Oi==="drop"&&pi.xhr&&pi.abortable!==!0)return ie(si),li;if(Oi==="abort"){if(pi.xhr)return ie(si),li;Vi=!0}else if(Oi==="replace")ce(Li,"htmx:abort");else if(Oi.indexOf("queue")===0){var Ai=Oi.split(" ");zi=(Ai[1]||"last").trim()}}if(pi.xhr)if(pi.abortable)ce(Li,"htmx:abort");else{if(zi==null){if(ni){var qi=ae(ni);qi&&qi.triggerSpec&&qi.triggerSpec.queue&&(zi=qi.triggerSpec.queue)}zi==null&&(zi="last")}return pi.queuedRequests==null&&(pi.queuedRequests=[]),zi==="first"&&pi.queuedRequests.length===0?pi.queuedRequests.push(function(){he(ii,ei,ti,ni,ri)}):zi==="all"?pi.queuedRequests.push(function(){he(ii,ei,ti,ni,ri)}):zi==="last"&&(pi.queuedRequests=[],pi.queuedRequests.push(function(){he(ii,ei,ti,ni,ri)})),ie(si),li}var Si=new XMLHttpRequest;pi.xhr=Si,pi.abortable=Vi;var Qi=function(){if(pi.xhr=null,pi.abortable=!1,pi.queuedRequests!=null&&pi.queuedRequests.length>0){var On=pi.queuedRequests.shift();On()}},Ji=ne(ti,"hx-prompt");if(Ji){var gn=prompt(Ji);if(gn===null||!ce(ti,"htmx:prompt",{prompt:gn,target:di}))return ie(si),Qi(),li}if(Ei&&!oi&&!confirm(Ei))return ie(si),Qi(),li;var rn=xr(ti,di,gn);ii!=="get"&&!Sr(ti)&&(rn["Content-Type"]="application/x-www-form-urlencoded"),ri.headers&&(rn=le(rn,ri.headers));var Zi=dr(ti,ii),on=Zi.errors,Mn=Zi.values;ri.values&&(Mn=le(Mn,ri.values));var vn=Hr(ti),Yi=le(Mn,vn),Ri=yr(Yi,ti);Q.config.getCacheBusterParam&&ii==="get"&&(Ri["org.htmx.cache-buster"]=ee(di,"id")||"true"),(ei==null||ei==="")&&(ei=re().location.href);var Ii=Rr(ti,"hx-request"),Ui=ae(ti).boosted,ji=Q.config.methodsThatUseUrlParams.indexOf(ii)>=0,Pi={boosted:Ui,useUrlParams:ji,parameters:Ri,unfilteredParameters:Yi,headers:rn,target:di,verb:ii,errors:on,withCredentials:ri.credentials||Ii.credentials||Q.config.withCredentials,timeout:ri.timeout||Ii.timeout||Q.config.timeout,path:ei,triggeringEvent:ni};if(!ce(ti,"htmx:configRequest",Pi))return ie(si),Qi(),li;if(ei=Pi.path,ii=Pi.verb,rn=Pi.headers,Ri=Pi.parameters,on=Pi.errors,ji=Pi.useUrlParams,on&&on.length>0)return ce(ti,"htmx:validation:halted",Pi),ie(si),Qi(),li;var ln=ei.split("#"),kn=ln[0],yn=ln[1],Cn=ei;if(ji){Cn=kn;var $s=Object.keys(Ri).length!==0;$s&&(Cn.indexOf("?")<0?Cn+="?":Cn+="&",Cn+=pr(Ri),yn&&(Cn+="#"+yn))}if(!kr(ti,Cn,Pi))return fe(ti,"htmx:invalidPath",Pi),ie(ai),li;if(Si.open(ii.toUpperCase(),Cn,!0),Si.overrideMimeType("text/html"),Si.withCredentials=Pi.withCredentials,Si.timeout=Pi.timeout,!Ii.noHeaders){for(var ro in rn)if(rn.hasOwnProperty(ro)){var wo=rn[ro];Lr(Si,ro,wo)}}var bn={xhr:Si,target:di,requestConfig:Pi,etc:ri,boosted:Ui,select:ci,pathInfo:{requestPath:ei,finalRequestPath:Cn,anchor:yn}};if(Si.onload=function(){try{var On=Ir(ti);if(bn.pathInfo.responsePath=Ar(Si),ui(ti,bn),lr(xo,ao),ce(ti,"htmx:afterRequest",bn),ce(ti,"htmx:afterOnLoad",bn),!se(ti)){for(var zn=null;On.length>0&&zn==null;){var Gn=On.shift();se(Gn)&&(zn=Gn)}zn&&(ce(zn,"htmx:afterRequest",bn),ce(zn,"htmx:afterOnLoad",bn))}ie(si),Qi()}catch(Jn){throw fe(ti,"htmx:onLoadError",le({error:Jn},bn)),Jn}},Si.onerror=function(){lr(xo,ao),fe(ti,"htmx:afterRequest",bn),fe(ti,"htmx:sendError",bn),ie(ai),Qi()},Si.onabort=function(){lr(xo,ao),fe(ti,"htmx:afterRequest",bn),fe(ti,"htmx:sendAbort",bn),ie(ai),Qi()},Si.ontimeout=function(){lr(xo,ao),fe(ti,"htmx:afterRequest",bn),fe(ti,"htmx:timeout",bn),ie(ai),Qi()},!ce(ti,"htmx:beforeRequest",bn))return ie(si),Qi(),li;var xo=or(ti),ao=sr(ti);oe(["loadstart","loadend","progress","abort"],function(On){oe([Si,Si.upload],function(zn){zn.addEventListener(On,function(Gn){ce(ti,"htmx:xhr:"+On,{lengthComputable:Gn.lengthComputable,loaded:Gn.loaded,total:Gn.total})})})}),ce(ti,"htmx:beforeSend",bn);var ls=ji?null:Er(Si,ti,Ri);return Si.send(ls),li}function Pr(ii,ei){var ti=ei.xhr,ni=null,ri=null;if(O(ti,/HX-Push:/i)?(ni=ti.getResponseHeader("HX-Push"),ri="push"):O(ti,/HX-Push-Url:/i)?(ni=ti.getResponseHeader("HX-Push-Url"),ri="push"):O(ti,/HX-Replace-Url:/i)&&(ni=ti.getResponseHeader("HX-Replace-Url"),ri="replace"),ni)return ni==="false"?{}:{type:ri,path:ni};var oi=ei.pathInfo.finalRequestPath,si=ei.pathInfo.responsePath,ai=ne(ii,"hx-push-url"),li=ne(ii,"hx-replace-url"),ui=ae(ii).boosted,ci=null,di=null;return ai?(ci="push",di=ai):li?(ci="replace",di=li):ui&&(ci="push",di=si||oi),di?di==="false"?{}:(di==="true"&&(di=si||oi),ei.pathInfo.anchor&&di.indexOf("#")===-1&&(di=di+"#"+ei.pathInfo.anchor),{type:ci,path:di}):{}}function Mr(ii,ei){var ti=ei.xhr,ni=ei.target,ri=ei.etc,oi=ei.requestConfig,si=ei.select;if(ce(ii,"htmx:beforeOnLoad",ei)){if(O(ti,/HX-Trigger:/i)&&_e(ti,"HX-Trigger",ii),O(ti,/HX-Location:/i)){er();var ai=ti.getResponseHeader("HX-Location"),li;ai.indexOf("{")===0&&(li=E(ai),ai=li.path,delete li.path),Nr("GET",ai,li).then(function(){tr(ai)});return}var ui=O(ti,/HX-Refresh:/i)&&ti.getResponseHeader("HX-Refresh")==="true";if(O(ti,/HX-Redirect:/i)){location.href=ti.getResponseHeader("HX-Redirect"),ui&&location.reload();return}if(ui){location.reload();return}O(ti,/HX-Retarget:/i)&&(ti.getResponseHeader("HX-Retarget")==="this"?ei.target=ii:ei.target=ue(ii,ti.getResponseHeader("HX-Retarget")));var ci=Pr(ii,ei),di=ti.status>=200&&ti.status<400&&ti.status!==204,pi=ti.response,yi=ti.status>=400,gi=Q.config.ignoreTitle,vi=le({shouldSwap:di,serverResponse:pi,isError:yi,ignoreTitle:gi},ei);if(ce(ni,"htmx:beforeSwap",vi)){if(ni=vi.target,pi=vi.serverResponse,yi=vi.isError,gi=vi.ignoreTitle,ei.target=ni,ei.failed=yi,ei.successful=!yi,vi.shouldSwap){ti.status===286&&at(ii),R(ii,function(Mi){pi=Mi.transformResponse(pi,ti,ii)}),ci.type&&er();var Ei=ri.swapOverride;O(ti,/HX-Reswap:/i)&&(Ei=ti.getResponseHeader("HX-Reswap"));var li=wr(ii,Ei);li.hasOwnProperty("ignoreTitle")&&(gi=li.ignoreTitle),ni.classList.add(Q.config.swappingClass);var Ci=null,xi=null,Li=function(){try{var Mi=document.activeElement,Ai={};try{Ai={elt:Mi,start:Mi?Mi.selectionStart:null,end:Mi?Mi.selectionEnd:null}}catch(Zi){}var qi;si&&(qi=si),O(ti,/HX-Reselect:/i)&&(qi=ti.getResponseHeader("HX-Reselect")),ci.type&&(ce(re().body,"htmx:beforeHistoryUpdate",le({history:ci},ei)),ci.type==="push"?(tr(ci.path),ce(re().body,"htmx:pushedIntoHistory",{path:ci.path})):(rr(ci.path),ce(re().body,"htmx:replacedInHistory",{path:ci.path})));var Si=T(ni);if(je(li.swapStyle,ni,ii,pi,Si,qi),Ai.elt&&!se(Ai.elt)&&ee(Ai.elt,"id")){var Qi=document.getElementById(ee(Ai.elt,"id")),Ji={preventScroll:li.focusScroll!==void 0?!li.focusScroll:!Q.config.defaultFocusScroll};if(Qi){if(Ai.start&&Qi.setSelectionRange)try{Qi.setSelectionRange(Ai.start,Ai.end)}catch(Zi){}Qi.focus(Ji)}}if(ni.classList.remove(Q.config.swappingClass),oe(Si.elts,function(Zi){Zi.classList&&Zi.classList.add(Q.config.settlingClass),ce(Zi,"htmx:afterSwap",ei)}),O(ti,/HX-Trigger-After-Swap:/i)){var gn=ii;se(ii)||(gn=re().body),_e(ti,"HX-Trigger-After-Swap",gn)}var rn=function(){if(oe(Si.tasks,function(vn){vn.call()}),oe(Si.elts,function(vn){vn.classList&&vn.classList.remove(Q.config.settlingClass),ce(vn,"htmx:afterSettle",ei)}),ei.pathInfo.anchor){var Zi=re().getElementById(ei.pathInfo.anchor);Zi&&Zi.scrollIntoView({block:"start",behavior:"auto"})}if(Si.title&&!gi){var on=C("title");on?on.innerHTML=Si.title:window.document.title=Si.title}if(Cr(Si.elts,li),O(ti,/HX-Trigger-After-Settle:/i)){var Mn=ii;se(ii)||(Mn=re().body),_e(ti,"HX-Trigger-After-Settle",Mn)}ie(Ci)};li.settleDelay>0?setTimeout(rn,li.settleDelay):rn()}catch(Zi){throw fe(ii,"htmx:swapError",ei),ie(xi),Zi}},Oi=Q.config.globalViewTransitions;if(li.hasOwnProperty("transition")&&(Oi=li.transition),Oi&&ce(ii,"htmx:beforeTransition",ei)&&typeof Promise!="undefined"&&document.startViewTransition){var zi=new Promise(function(Mi,Ai){Ci=Mi,xi=Ai}),Vi=Li;Li=function(){document.startViewTransition(function(){return Vi(),zi})}}li.swapDelay>0?setTimeout(Li,li.swapDelay):Li()}yi&&fe(ii,"htmx:responseError",le({error:"Response Status Error Code "+ti.status+" from "+ei.pathInfo.requestPath},ei))}}}var Xr={};function Dr(){return{init:function(ii){return null},onEvent:function(ii,ei){return!0},transformResponse:function(ii,ei,ti){return ii},isInlineSwap:function(ii){return!1},handleSwap:function(ii,ei,ti,ni){return!1},encodeParameters:function(ii,ei,ti){return null}}}function Ur(ii,ei){ei.init&&ei.init(r),Xr[ii]=le(Dr(),ei)}function Br(ii){delete Xr[ii]}function Fr(ii,ei,ti){if(ii==null)return ei;ei==null&&(ei=[]),ti==null&&(ti=[]);var ni=te(ii,"hx-ext");return ni&&oe(ni.split(","),function(ri){if(ri=ri.replace(/ /g,""),ri.slice(0,7)=="ignore:"){ti.push(ri.slice(7));return}if(ti.indexOf(ri)<0){var oi=Xr[ri];oi&&ei.indexOf(oi)<0&&ei.push(oi)}}),Fr(u(ii),ei,ti)}var Vr=!1;re().addEventListener("DOMContentLoaded",function(){Vr=!0});function jr(ii){Vr||re().readyState==="complete"?ii():re().addEventListener("DOMContentLoaded",ii)}function _r(){Q.config.includeIndicatorStyles!==!1&&re().head.insertAdjacentHTML("beforeend","<style> ."+Q.config.indicatorClass+"{opacity:0} ."+Q.config.requestClass+" ."+Q.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;} ."+Q.config.requestClass+"."+Q.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;} </style>")}function zr(){var ii=re().querySelector('meta[name="htmx-config"]');return ii?E(ii.content):null}function $r(){var ii=zr();ii&&(Q.config=le(Q.config,ii))}return jr(function(){$r(),_r();var ii=re().body;zt(ii);var ei=re().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");ii.addEventListener("htmx:abort",function(ni){var ri=ni.target,oi=ae(ri);oi&&oi.xhr&&oi.xhr.abort()});let ti=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(ni){ni.state&&ni.state.htmx?(ar(),oe(ei,function(ri){ce(ri,"htmx:restored",{document:re(),triggerEvent:ce})})):ti&&ti(ni)},setTimeout(function(){ce(ii,"htmx:load",{}),ii=null},0)}),Q}()})});var fh=au((va,Uc)=>{(function(ei,ti){typeof va=="object"&&typeof Uc=="object"?Uc.exports=ti():typeof define=="function"&&define.amd?define([],ti):typeof va=="object"?va.ClipboardJS=ti():ei.ClipboardJS=ti()})(va,function(){return function(){var ii={686:function(ni,ri,oi){"use strict";oi.d(ri,{default:function(){return vn}});var si=oi(279),ai=oi.n(si),li=oi(370),ui=oi.n(li),ci=oi(817),di=oi.n(ci);function pi(Yi){try{return document.execCommand(Yi)}catch(Ri){return!1}}var yi=function(Ri){var Ii=di()(Ri);return pi("cut"),Ii},gi=yi;function vi(Yi){var Ri=document.documentElement.getAttribute("dir")==="rtl",Ii=document.createElement("textarea");Ii.style.fontSize="12pt",Ii.style.border="0",Ii.style.padding="0",Ii.style.margin="0",Ii.style.position="absolute",Ii.style[Ri?"right":"left"]="-9999px";var Ui=window.pageYOffset||document.documentElement.scrollTop;return Ii.style.top="".concat(Ui,"px"),Ii.setAttribute("readonly",""),Ii.value=Yi,Ii}var Ei=function(Ri,Ii){var Ui=vi(Ri);Ii.container.appendChild(Ui);var ji=di()(Ui);return pi("copy"),Ui.remove(),ji},Ci=function(Ri){var Ii=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},Ui="";return typeof Ri=="string"?Ui=Ei(Ri,Ii):Ri instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(Ri==null?void 0:Ri.type)?Ui=Ei(Ri.value,Ii):(Ui=di()(Ri),pi("copy")),Ui},xi=Ci;function Li(Yi){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Li=function(Ii){return typeof Ii}:Li=function(Ii){return Ii&&typeof Symbol=="function"&&Ii.constructor===Symbol&&Ii!==Symbol.prototype?"symbol":typeof Ii},Li(Yi)}var Oi=function(){var Ri=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ii=Ri.action,Ui=Ii===void 0?"copy":Ii,ji=Ri.container,Pi=Ri.target,ln=Ri.text;if(Ui!=="copy"&&Ui!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(Pi!==void 0)if(Pi&&Li(Pi)==="object"&&Pi.nodeType===1){if(Ui==="copy"&&Pi.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(Ui==="cut"&&(Pi.hasAttribute("readonly")||Pi.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(ln)return xi(ln,{container:ji});if(Pi)return Ui==="cut"?gi(Pi):xi(Pi,{container:ji})},zi=Oi;function Vi(Yi){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vi=function(Ii){return typeof Ii}:Vi=function(Ii){return Ii&&typeof Symbol=="function"&&Ii.constructor===Symbol&&Ii!==Symbol.prototype?"symbol":typeof Ii},Vi(Yi)}function ki(Yi,Ri){if(!(Yi instanceof Ri))throw new TypeError("Cannot call a class as a function")}function Mi(Yi,Ri){for(var Ii=0;Ii<Ri.length;Ii++){var Ui=Ri[Ii];Ui.enumerable=Ui.enumerable||!1,Ui.configurable=!0,"value"in Ui&&(Ui.writable=!0),Object.defineProperty(Yi,Ui.key,Ui)}}function Ai(Yi,Ri,Ii){return Ri&&Mi(Yi.prototype,Ri),Ii&&Mi(Yi,Ii),Yi}function qi(Yi,Ri){if(typeof Ri!="function"&&Ri!==null)throw new TypeError("Super expression must either be null or a function");Yi.prototype=Object.create(Ri&&Ri.prototype,{constructor:{value:Yi,writable:!0,configurable:!0}}),Ri&&Si(Yi,Ri)}function Si(Yi,Ri){return Si=Object.setPrototypeOf||function(Ui,ji){return Ui.__proto__=ji,Ui},Si(Yi,Ri)}function Qi(Yi){var Ri=rn();return function(){var Ui=Zi(Yi),ji;if(Ri){var Pi=Zi(this).constructor;ji=Reflect.construct(Ui,arguments,Pi)}else ji=Ui.apply(this,arguments);return Ji(this,ji)}}function Ji(Yi,Ri){return Ri&&(Vi(Ri)==="object"||typeof Ri=="function")?Ri:gn(Yi)}function gn(Yi){if(Yi===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Yi}function rn(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(Yi){return!1}}function Zi(Yi){return Zi=Object.setPrototypeOf?Object.getPrototypeOf:function(Ii){return Ii.__proto__||Object.getPrototypeOf(Ii)},Zi(Yi)}function on(Yi,Ri){var Ii="data-clipboard-".concat(Yi);if(Ri.hasAttribute(Ii))return Ri.getAttribute(Ii)}var Mn=function(Yi){qi(Ii,Yi);var Ri=Qi(Ii);function Ii(Ui,ji){var Pi;return ki(this,Ii),Pi=Ri.call(this),Pi.resolveOptions(ji),Pi.listenClick(Ui),Pi}return Ai(Ii,[{key:"resolveOptions",value:function(){var ji=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof ji.action=="function"?ji.action:this.defaultAction,this.target=typeof ji.target=="function"?ji.target:this.defaultTarget,this.text=typeof ji.text=="function"?ji.text:this.defaultText,this.container=Vi(ji.container)==="object"?ji.container:document.body}},{key:"listenClick",value:function(ji){var Pi=this;this.listener=ui()(ji,"click",function(ln){return Pi.onClick(ln)})}},{key:"onClick",value:function(ji){var Pi=ji.delegateTarget||ji.currentTarget,ln=this.action(Pi)||"copy",kn=zi({action:ln,container:this.container,target:this.target(Pi),text:this.text(Pi)});this.emit(kn?"success":"error",{action:ln,text:kn,trigger:Pi,clearSelection:function(){Pi&&Pi.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(ji){return on("action",ji)}},{key:"defaultTarget",value:function(ji){var Pi=on("target",ji);if(Pi)return document.querySelector(Pi)}},{key:"defaultText",value:function(ji){return on("text",ji)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(ji){var Pi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return xi(ji,Pi)}},{key:"cut",value:function(ji){return gi(ji)}},{key:"isSupported",value:function(){var ji=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],Pi=typeof ji=="string"?[ji]:ji,ln=!!document.queryCommandSupported;return Pi.forEach(function(kn){ln=ln&&!!document.queryCommandSupported(kn)}),ln}}]),Ii}(ai()),vn=Mn},828:function(ni){var ri=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var oi=Element.prototype;oi.matches=oi.matchesSelector||oi.mozMatchesSelector||oi.msMatchesSelector||oi.oMatchesSelector||oi.webkitMatchesSelector}function si(ai,li){for(;ai&&ai.nodeType!==ri;){if(typeof ai.matches=="function"&&ai.matches(li))return ai;ai=ai.parentNode}}ni.exports=si},438:function(ni,ri,oi){var si=oi(828);function ai(ci,di,pi,yi,gi){var vi=ui.apply(this,arguments);return ci.addEventListener(pi,vi,gi),{destroy:function(){ci.removeEventListener(pi,vi,gi)}}}function li(ci,di,pi,yi,gi){return typeof ci.addEventListener=="function"?ai.apply(null,arguments):typeof pi=="function"?ai.bind(null,document).apply(null,arguments):(typeof ci=="string"&&(ci=document.querySelectorAll(ci)),Array.prototype.map.call(ci,function(vi){return ai(vi,di,pi,yi,gi)}))}function ui(ci,di,pi,yi){return function(gi){gi.delegateTarget=si(gi.target,di),gi.delegateTarget&&yi.call(ci,gi)}}ni.exports=li},879:function(ni,ri){ri.node=function(oi){return oi!==void 0&&oi instanceof HTMLElement&&oi.nodeType===1},ri.nodeList=function(oi){var si=Object.prototype.toString.call(oi);return oi!==void 0&&(si==="[object NodeList]"||si==="[object HTMLCollection]")&&"length"in oi&&(oi.length===0||ri.node(oi[0]))},ri.string=function(oi){return typeof oi=="string"||oi instanceof String},ri.fn=function(oi){var si=Object.prototype.toString.call(oi);return si==="[object Function]"}},370:function(ni,ri,oi){var si=oi(879),ai=oi(438);function li(pi,yi,gi){if(!pi&&!yi&&!gi)throw new Error("Missing required arguments");if(!si.string(yi))throw new TypeError("Second argument must be a String");if(!si.fn(gi))throw new TypeError("Third argument must be a Function");if(si.node(pi))return ui(pi,yi,gi);if(si.nodeList(pi))return ci(pi,yi,gi);if(si.string(pi))return di(pi,yi,gi);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function ui(pi,yi,gi){return pi.addEventListener(yi,gi),{destroy:function(){pi.removeEventListener(yi,gi)}}}function ci(pi,yi,gi){return Array.prototype.forEach.call(pi,function(vi){vi.addEventListener(yi,gi)}),{destroy:function(){Array.prototype.forEach.call(pi,function(vi){vi.removeEventListener(yi,gi)})}}}function di(pi,yi,gi){return ai(document.body,pi,yi,gi)}ni.exports=li},817:function(ni){function ri(oi){var si;if(oi.nodeName==="SELECT")oi.focus(),si=oi.value;else if(oi.nodeName==="INPUT"||oi.nodeName==="TEXTAREA"){var ai=oi.hasAttribute("readonly");ai||oi.setAttribute("readonly",""),oi.select(),oi.setSelectionRange(0,oi.value.length),ai||oi.removeAttribute("readonly"),si=oi.value}else{oi.hasAttribute("contenteditable")&&oi.focus();var li=window.getSelection(),ui=document.createRange();ui.selectNodeContents(oi),li.removeAllRanges(),li.addRange(ui),si=li.toString()}return si}ni.exports=ri},279:function(ni){function ri(){}ri.prototype={on:function(oi,si,ai){var li=this.e||(this.e={});return(li[oi]||(li[oi]=[])).push({fn:si,ctx:ai}),this},once:function(oi,si,ai){var li=this;function ui(){li.off(oi,ui),si.apply(ai,arguments)}return ui._=si,this.on(oi,ui,ai)},emit:function(oi){var si=[].slice.call(arguments,1),ai=((this.e||(this.e={}))[oi]||[]).slice(),li=0,ui=ai.length;for(li;li<ui;li++)ai[li].fn.apply(ai[li].ctx,si);return this},off:function(oi,si){var ai=this.e||(this.e={}),li=ai[oi],ui=[];if(li&&si)for(var ci=0,di=li.length;ci<di;ci++)li[ci].fn!==si&&li[ci].fn._!==si&&ui.push(li[ci]);return ui.length?ai[oi]=ui:delete ai[oi],this}},ni.exports=ri,ni.exports.TinyEmitter=ri}},ei={};function ti(ni){if(ei[ni])return ei[ni].exports;var ri=ei[ni]={exports:{}};return ii[ni](ri,ri.exports,ti),ri.exports}return function(){ti.n=function(ni){var ri=ni&&ni.__esModule?function(){return ni.default}:function(){return ni};return ti.d(ri,{a:ri}),ri}}(),function(){ti.d=function(ni,ri){for(var oi in ri)ti.o(ri,oi)&&!ti.o(ni,oi)&&Object.defineProperty(ni,oi,{enumerable:!0,get:ri[oi]})}}(),function(){ti.o=function(ni,ri){return Object.prototype.hasOwnProperty.call(ni,ri)}}(),ti(686)}().default})});var Pa={};lu(Pa,{afterMain:()=>mu,afterRead:()=>fu,afterWrite:()=>yu,applyStyles:()=>ps,arrow:()=>Oa,auto:()=>js,basePlacements:()=>uo,beforeMain:()=>hu,beforeRead:()=>uu,beforeWrite:()=>gu,bottom:()=>_n,clippingParents:()=>$l,computeStyles:()=>gs,createPopper:()=>Js,createPopperBase:()=>Au,createPopperLite:()=>Du,detectOverflow:()=>Fn,end:()=>To,eventListeners:()=>vs,flip:()=>Na,hide:()=>Ra,left:()=>hn,main:()=>pu,modifierPhases:()=>zl,offset:()=>Ia,placements:()=>Ws,popper:()=>jo,popperGenerator:()=>Xo,popperOffsets:()=>_s,preventOverflow:()=>Ha,read:()=>du,reference:()=>Bl,right:()=>mn,start:()=>so,top:()=>dn,variationPlacements:()=>Da,viewport:()=>qs,write:()=>vu});var dn="top",_n="bottom",mn="right",hn="left",js="auto",uo=[dn,_n,mn,hn],so="start",To="end",$l="clippingParents",qs="viewport",jo="popper",Bl="reference",Da=uo.reduce(function(ii,ei){return ii.concat([ei+"-"+so,ei+"-"+To])},[]),Ws=[].concat(uo,[js]).reduce(function(ii,ei){return ii.concat([ei,ei+"-"+so,ei+"-"+To])},[]),uu="beforeRead",du="read",fu="afterRead",hu="beforeMain",pu="main",mu="afterMain",gu="beforeWrite",vu="write",yu="afterWrite",zl=[uu,du,fu,hu,pu,mu,gu,vu,yu];function An(ii){return ii?(ii.nodeName||"").toLowerCase():null}function cn(ii){if(ii==null)return window;if(ii.toString()!=="[object Window]"){var ei=ii.ownerDocument;return ei&&ei.defaultView||window}return ii}function Zn(ii){var ei=cn(ii).Element;return ii instanceof ei||ii instanceof Element}function Tn(ii){var ei=cn(ii).HTMLElement;return ii instanceof ei||ii instanceof HTMLElement}function hs(ii){if(typeof ShadowRoot=="undefined")return!1;var ei=cn(ii).ShadowRoot;return ii instanceof ei||ii instanceof ShadowRoot}function op(ii){var ei=ii.state;Object.keys(ei.elements).forEach(function(ti){var ni=ei.styles[ti]||{},ri=ei.attributes[ti]||{},oi=ei.elements[ti];!Tn(oi)||!An(oi)||(Object.assign(oi.style,ni),Object.keys(ri).forEach(function(si){var ai=ri[si];ai===!1?oi.removeAttribute(si):oi.setAttribute(si,ai===!0?"":ai)}))})}function sp(ii){var ei=ii.state,ti={popper:{position:ei.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(ei.elements.popper.style,ti.popper),ei.styles=ti,ei.elements.arrow&&Object.assign(ei.elements.arrow.style,ti.arrow),function(){Object.keys(ei.elements).forEach(function(ni){var ri=ei.elements[ni],oi=ei.attributes[ni]||{},si=Object.keys(ei.styles.hasOwnProperty(ni)?ei.styles[ni]:ti[ni]),ai=si.reduce(function(li,ui){return li[ui]="",li},{});!Tn(ri)||!An(ri)||(Object.assign(ri.style,ai),Object.keys(oi).forEach(function(li){ri.removeAttribute(li)}))})}}var ps={name:"applyStyles",enabled:!0,phase:"write",fn:op,effect:sp,requires:["computeStyles"]};function Dn(ii){return ii.split("-")[0]}var eo=Math.max,qo=Math.min,fo=Math.round;function ms(){var ii=navigator.userAgentData;return ii!=null&&ii.brands&&Array.isArray(ii.brands)?ii.brands.map(function(ei){return ei.brand+"/"+ei.version}).join(" "):navigator.userAgent}function Us(){return!/^((?!chrome|android).)*safari/i.test(ms())}function Wr(ii,ei,ti){ei===void 0&&(ei=!1),ti===void 0&&(ti=!1);var ni=ii.getBoundingClientRect(),ri=1,oi=1;ei&&Tn(ii)&&(ri=ii.offsetWidth>0&&fo(ni.width)/ii.offsetWidth||1,oi=ii.offsetHeight>0&&fo(ni.height)/ii.offsetHeight||1);var si=Zn(ii)?cn(ii):window,ai=si.visualViewport,li=!Us()&&ti,ui=(ni.left+(li&&ai?ai.offsetLeft:0))/ri,ci=(ni.top+(li&&ai?ai.offsetTop:0))/oi,di=ni.width/ri,pi=ni.height/oi;return{width:di,height:pi,top:ci,right:ui+di,bottom:ci+pi,left:ui,x:ui,y:ci}}function Wo(ii){var ei=Wr(ii),ti=ii.offsetWidth,ni=ii.offsetHeight;return Math.abs(ei.width-ti)<=1&&(ti=ei.width),Math.abs(ei.height-ni)<=1&&(ni=ei.height),{x:ii.offsetLeft,y:ii.offsetTop,width:ti,height:ni}}function Ys(ii,ei){var ti=ei.getRootNode&&ei.getRootNode();if(ii.contains(ei))return!0;if(ti&&hs(ti)){var ni=ei;do{if(ni&&ii.isSameNode(ni))return!0;ni=ni.parentNode||ni.host}while(ni)}return!1}function Pn(ii){return cn(ii).getComputedStyle(ii)}function Vl(ii){return["table","td","th"].indexOf(An(ii))>=0}function Ln(ii){return((Zn(ii)?ii.ownerDocument:ii.document)||window.document).documentElement}function ho(ii){return An(ii)==="html"?ii:ii.assignedSlot||ii.parentNode||(hs(ii)?ii.host:null)||Ln(ii)}function bu(ii){return!Tn(ii)||Pn(ii).position==="fixed"?null:ii.offsetParent}function ap(ii){var ei=/firefox/i.test(ms()),ti=/Trident/i.test(ms());if(ti&&Tn(ii)){var ni=Pn(ii);if(ni.position==="fixed")return null}var ri=ho(ii);for(hs(ri)&&(ri=ri.host);Tn(ri)&&["html","body"].indexOf(An(ri))<0;){var oi=Pn(ri);if(oi.transform!=="none"||oi.perspective!=="none"||oi.contain==="paint"||["transform","perspective"].indexOf(oi.willChange)!==-1||ei&&oi.willChange==="filter"||ei&&oi.filter&&oi.filter!=="none")return ri;ri=ri.parentNode}return null}function to(ii){for(var ei=cn(ii),ti=bu(ii);ti&&Vl(ti)&&Pn(ti).position==="static";)ti=bu(ti);return ti&&(An(ti)==="html"||An(ti)==="body"&&Pn(ti).position==="static")?ei:ti||ap(ii)||ei}function Uo(ii){return["top","bottom"].indexOf(ii)>=0?"x":"y"}function Yo(ii,ei,ti){return eo(ii,qo(ei,ti))}function _u(ii,ei,ti){var ni=Yo(ii,ei,ti);return ni>ti?ti:ni}function Gs(){return{top:0,right:0,bottom:0,left:0}}function Ks(ii){return Object.assign({},Gs(),ii)}function Qs(ii,ei){return ei.reduce(function(ti,ni){return ti[ni]=ii,ti},{})}var lp=function(ei,ti){return ei=typeof ei=="function"?ei(Object.assign({},ti.rects,{placement:ti.placement})):ei,Ks(typeof ei!="number"?ei:Qs(ei,uo))};function cp(ii){var ei,ti=ii.state,ni=ii.name,ri=ii.options,oi=ti.elements.arrow,si=ti.modifiersData.popperOffsets,ai=Dn(ti.placement),li=Uo(ai),ui=[hn,mn].indexOf(ai)>=0,ci=ui?"height":"width";if(!(!oi||!si)){var di=lp(ri.padding,ti),pi=Wo(oi),yi=li==="y"?dn:hn,gi=li==="y"?_n:mn,vi=ti.rects.reference[ci]+ti.rects.reference[li]-si[li]-ti.rects.popper[ci],Ei=si[li]-ti.rects.reference[li],Ci=to(oi),xi=Ci?li==="y"?Ci.clientHeight||0:Ci.clientWidth||0:0,Li=vi/2-Ei/2,Oi=di[yi],zi=xi-pi[ci]-di[gi],Vi=xi/2-pi[ci]/2+Li,ki=Yo(Oi,Vi,zi),Mi=li;ti.modifiersData[ni]=(ei={},ei[Mi]=ki,ei.centerOffset=ki-Vi,ei)}}function up(ii){var ei=ii.state,ti=ii.options,ni=ti.element,ri=ni===void 0?"[data-popper-arrow]":ni;ri!=null&&(typeof ri=="string"&&(ri=ei.elements.popper.querySelector(ri),!ri)||Ys(ei.elements.popper,ri)&&(ei.elements.arrow=ri))}var Oa={name:"arrow",enabled:!0,phase:"main",fn:cp,effect:up,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Yr(ii){return ii.split("-")[1]}var dp={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fp(ii,ei){var ti=ii.x,ni=ii.y,ri=ei.devicePixelRatio||1;return{x:fo(ti*ri)/ri||0,y:fo(ni*ri)/ri||0}}function Eu(ii){var ei,ti=ii.popper,ni=ii.popperRect,ri=ii.placement,oi=ii.variation,si=ii.offsets,ai=ii.position,li=ii.gpuAcceleration,ui=ii.adaptive,ci=ii.roundOffsets,di=ii.isFixed,pi=si.x,yi=pi===void 0?0:pi,gi=si.y,vi=gi===void 0?0:gi,Ei=typeof ci=="function"?ci({x:yi,y:vi}):{x:yi,y:vi};yi=Ei.x,vi=Ei.y;var Ci=si.hasOwnProperty("x"),xi=si.hasOwnProperty("y"),Li=hn,Oi=dn,zi=window;if(ui){var Vi=to(ti),ki="clientHeight",Mi="clientWidth";if(Vi===cn(ti)&&(Vi=Ln(ti),Pn(Vi).position!=="static"&&ai==="absolute"&&(ki="scrollHeight",Mi="scrollWidth")),Vi=Vi,ri===dn||(ri===hn||ri===mn)&&oi===To){Oi=_n;var Ai=di&&Vi===zi&&zi.visualViewport?zi.visualViewport.height:Vi[ki];vi-=Ai-ni.height,vi*=li?1:-1}if(ri===hn||(ri===dn||ri===_n)&&oi===To){Li=mn;var qi=di&&Vi===zi&&zi.visualViewport?zi.visualViewport.width:Vi[Mi];yi-=qi-ni.width,yi*=li?1:-1}}var Si=Object.assign({position:ai},ui&&dp),Qi=ci===!0?fp({x:yi,y:vi},cn(ti)):{x:yi,y:vi};if(yi=Qi.x,vi=Qi.y,li){var Ji;return Object.assign({},Si,(Ji={},Ji[Oi]=xi?"0":"",Ji[Li]=Ci?"0":"",Ji.transform=(zi.devicePixelRatio||1)<=1?"translate("+yi+"px, "+vi+"px)":"translate3d("+yi+"px, "+vi+"px, 0)",Ji))}return Object.assign({},Si,(ei={},ei[Oi]=xi?vi+"px":"",ei[Li]=Ci?yi+"px":"",ei.transform="",ei))}function hp(ii){var ei=ii.state,ti=ii.options,ni=ti.gpuAcceleration,ri=ni===void 0?!0:ni,oi=ti.adaptive,si=oi===void 0?!0:oi,ai=ti.roundOffsets,li=ai===void 0?!0:ai,ui={placement:Dn(ei.placement),variation:Yr(ei.placement),popper:ei.elements.popper,popperRect:ei.rects.popper,gpuAcceleration:ri,isFixed:ei.options.strategy==="fixed"};ei.modifiersData.popperOffsets!=null&&(ei.styles.popper=Object.assign({},ei.styles.popper,Eu(Object.assign({},ui,{offsets:ei.modifiersData.popperOffsets,position:ei.options.strategy,adaptive:si,roundOffsets:li})))),ei.modifiersData.arrow!=null&&(ei.styles.arrow=Object.assign({},ei.styles.arrow,Eu(Object.assign({},ui,{offsets:ei.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:li})))),ei.attributes.popper=Object.assign({},ei.attributes.popper,{"data-popper-placement":ei.placement})}var gs={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:hp,data:{}};var La={passive:!0};function pp(ii){var ei=ii.state,ti=ii.instance,ni=ii.options,ri=ni.scroll,oi=ri===void 0?!0:ri,si=ni.resize,ai=si===void 0?!0:si,li=cn(ei.elements.popper),ui=[].concat(ei.scrollParents.reference,ei.scrollParents.popper);return oi&&ui.forEach(function(ci){ci.addEventListener("scroll",ti.update,La)}),ai&&li.addEventListener("resize",ti.update,La),function(){oi&&ui.forEach(function(ci){ci.removeEventListener("scroll",ti.update,La)}),ai&&li.removeEventListener("resize",ti.update,La)}}var vs={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:pp,data:{}};var mp={left:"right",right:"left",bottom:"top",top:"bottom"};function ys(ii){return ii.replace(/left|right|bottom|top/g,function(ei){return mp[ei]})}var gp={start:"end",end:"start"};function Ma(ii){return ii.replace(/start|end/g,function(ei){return gp[ei]})}function Go(ii){var ei=cn(ii),ti=ei.pageXOffset,ni=ei.pageYOffset;return{scrollLeft:ti,scrollTop:ni}}function Ko(ii){return Wr(Ln(ii)).left+Go(ii).scrollLeft}function jl(ii,ei){var ti=cn(ii),ni=Ln(ii),ri=ti.visualViewport,oi=ni.clientWidth,si=ni.clientHeight,ai=0,li=0;if(ri){oi=ri.width,si=ri.height;var ui=Us();(ui||!ui&&ei==="fixed")&&(ai=ri.offsetLeft,li=ri.offsetTop)}return{width:oi,height:si,x:ai+Ko(ii),y:li}}function ql(ii){var ei,ti=Ln(ii),ni=Go(ii),ri=(ei=ii.ownerDocument)==null?void 0:ei.body,oi=eo(ti.scrollWidth,ti.clientWidth,ri?ri.scrollWidth:0,ri?ri.clientWidth:0),si=eo(ti.scrollHeight,ti.clientHeight,ri?ri.scrollHeight:0,ri?ri.clientHeight:0),ai=-ni.scrollLeft+Ko(ii),li=-ni.scrollTop;return Pn(ri||ti).direction==="rtl"&&(ai+=eo(ti.clientWidth,ri?ri.clientWidth:0)-oi),{width:oi,height:si,x:ai,y:li}}function Qo(ii){var ei=Pn(ii),ti=ei.overflow,ni=ei.overflowX,ri=ei.overflowY;return/auto|scroll|overlay|hidden/.test(ti+ri+ni)}function ka(ii){return["html","body","#document"].indexOf(An(ii))>=0?ii.ownerDocument.body:Tn(ii)&&Qo(ii)?ii:ka(ho(ii))}function So(ii,ei){var ti;ei===void 0&&(ei=[]);var ni=ka(ii),ri=ni===((ti=ii.ownerDocument)==null?void 0:ti.body),oi=cn(ni),si=ri?[oi].concat(oi.visualViewport||[],Qo(ni)?ni:[]):ni,ai=ei.concat(si);return ri?ai:ai.concat(So(ho(si)))}function bs(ii){return Object.assign({},ii,{left:ii.x,top:ii.y,right:ii.x+ii.width,bottom:ii.y+ii.height})}function vp(ii,ei){var ti=Wr(ii,!1,ei==="fixed");return ti.top=ti.top+ii.clientTop,ti.left=ti.left+ii.clientLeft,ti.bottom=ti.top+ii.clientHeight,ti.right=ti.left+ii.clientWidth,ti.width=ii.clientWidth,ti.height=ii.clientHeight,ti.x=ti.left,ti.y=ti.top,ti}function wu(ii,ei,ti){return ei===qs?bs(jl(ii,ti)):Zn(ei)?vp(ei,ti):bs(ql(Ln(ii)))}function yp(ii){var ei=So(ho(ii)),ti=["absolute","fixed"].indexOf(Pn(ii).position)>=0,ni=ti&&Tn(ii)?to(ii):ii;return Zn(ni)?ei.filter(function(ri){return Zn(ri)&&Ys(ri,ni)&&An(ri)!=="body"}):[]}function Wl(ii,ei,ti,ni){var ri=ei==="clippingParents"?yp(ii):[].concat(ei),oi=[].concat(ri,[ti]),si=oi[0],ai=oi.reduce(function(li,ui){var ci=wu(ii,ui,ni);return li.top=eo(ci.top,li.top),li.right=qo(ci.right,li.right),li.bottom=qo(ci.bottom,li.bottom),li.left=eo(ci.left,li.left),li},wu(ii,si,ni));return ai.width=ai.right-ai.left,ai.height=ai.bottom-ai.top,ai.x=ai.left,ai.y=ai.top,ai}function Xs(ii){var ei=ii.reference,ti=ii.element,ni=ii.placement,ri=ni?Dn(ni):null,oi=ni?Yr(ni):null,si=ei.x+ei.width/2-ti.width/2,ai=ei.y+ei.height/2-ti.height/2,li;switch(ri){case dn:li={x:si,y:ei.y-ti.height};break;case _n:li={x:si,y:ei.y+ei.height};break;case mn:li={x:ei.x+ei.width,y:ai};break;case hn:li={x:ei.x-ti.width,y:ai};break;default:li={x:ei.x,y:ei.y}}var ui=ri?Uo(ri):null;if(ui!=null){var ci=ui==="y"?"height":"width";switch(oi){case so:li[ui]=li[ui]-(ei[ci]/2-ti[ci]/2);break;case To:li[ui]=li[ui]+(ei[ci]/2-ti[ci]/2);break;default:}}return li}function Fn(ii,ei){ei===void 0&&(ei={});var ti=ei,ni=ti.placement,ri=ni===void 0?ii.placement:ni,oi=ti.strategy,si=oi===void 0?ii.strategy:oi,ai=ti.boundary,li=ai===void 0?$l:ai,ui=ti.rootBoundary,ci=ui===void 0?qs:ui,di=ti.elementContext,pi=di===void 0?jo:di,yi=ti.altBoundary,gi=yi===void 0?!1:yi,vi=ti.padding,Ei=vi===void 0?0:vi,Ci=Ks(typeof Ei!="number"?Ei:Qs(Ei,uo)),xi=pi===jo?Bl:jo,Li=ii.rects.popper,Oi=ii.elements[gi?xi:pi],zi=Wl(Zn(Oi)?Oi:Oi.contextElement||Ln(ii.elements.popper),li,ci,si),Vi=Wr(ii.elements.reference),ki=Xs({reference:Vi,element:Li,strategy:"absolute",placement:ri}),Mi=bs(Object.assign({},Li,ki)),Ai=pi===jo?Mi:Vi,qi={top:zi.top-Ai.top+Ci.top,bottom:Ai.bottom-zi.bottom+Ci.bottom,left:zi.left-Ai.left+Ci.left,right:Ai.right-zi.right+Ci.right},Si=ii.modifiersData.offset;if(pi===jo&&Si){var Qi=Si[ri];Object.keys(qi).forEach(function(Ji){var gn=[mn,_n].indexOf(Ji)>=0?1:-1,rn=[dn,_n].indexOf(Ji)>=0?"y":"x";qi[Ji]+=Qi[rn]*gn})}return qi}function Ul(ii,ei){ei===void 0&&(ei={});var ti=ei,ni=ti.placement,ri=ti.boundary,oi=ti.rootBoundary,si=ti.padding,ai=ti.flipVariations,li=ti.allowedAutoPlacements,ui=li===void 0?Ws:li,ci=Yr(ni),di=ci?ai?Da:Da.filter(function(gi){return Yr(gi)===ci}):uo,pi=di.filter(function(gi){return ui.indexOf(gi)>=0});pi.length===0&&(pi=di);var yi=pi.reduce(function(gi,vi){return gi[vi]=Fn(ii,{placement:vi,boundary:ri,rootBoundary:oi,padding:si})[Dn(vi)],gi},{});return Object.keys(yi).sort(function(gi,vi){return yi[gi]-yi[vi]})}function bp(ii){if(Dn(ii)===js)return[];var ei=ys(ii);return[Ma(ii),ei,Ma(ei)]}function _p(ii){var ei=ii.state,ti=ii.options,ni=ii.name;if(!ei.modifiersData[ni]._skip){for(var ri=ti.mainAxis,oi=ri===void 0?!0:ri,si=ti.altAxis,ai=si===void 0?!0:si,li=ti.fallbackPlacements,ui=ti.padding,ci=ti.boundary,di=ti.rootBoundary,pi=ti.altBoundary,yi=ti.flipVariations,gi=yi===void 0?!0:yi,vi=ti.allowedAutoPlacements,Ei=ei.options.placement,Ci=Dn(Ei),xi=Ci===Ei,Li=li||(xi||!gi?[ys(Ei)]:bp(Ei)),Oi=[Ei].concat(Li).reduce(function(ji,Pi){return ji.concat(Dn(Pi)===js?Ul(ei,{placement:Pi,boundary:ci,rootBoundary:di,padding:ui,flipVariations:gi,allowedAutoPlacements:vi}):Pi)},[]),zi=ei.rects.reference,Vi=ei.rects.popper,ki=new Map,Mi=!0,Ai=Oi[0],qi=0;qi<Oi.length;qi++){var Si=Oi[qi],Qi=Dn(Si),Ji=Yr(Si)===so,gn=[dn,_n].indexOf(Qi)>=0,rn=gn?"width":"height",Zi=Fn(ei,{placement:Si,boundary:ci,rootBoundary:di,altBoundary:pi,padding:ui}),on=gn?Ji?mn:hn:Ji?_n:dn;zi[rn]>Vi[rn]&&(on=ys(on));var Mn=ys(on),vn=[];if(oi&&vn.push(Zi[Qi]<=0),ai&&vn.push(Zi[on]<=0,Zi[Mn]<=0),vn.every(function(ji){return ji})){Ai=Si,Mi=!1;break}ki.set(Si,vn)}if(Mi)for(var Yi=gi?3:1,Ri=function(Pi){var ln=Oi.find(function(kn){var yn=ki.get(kn);if(yn)return yn.slice(0,Pi).every(function(Cn){return Cn})});if(ln)return Ai=ln,"break"},Ii=Yi;Ii>0;Ii--){var Ui=Ri(Ii);if(Ui==="break")break}ei.placement!==Ai&&(ei.modifiersData[ni]._skip=!0,ei.placement=Ai,ei.reset=!0)}}var Na={name:"flip",enabled:!0,phase:"main",fn:_p,requiresIfExists:["offset"],data:{_skip:!1}};function xu(ii,ei,ti){return ti===void 0&&(ti={x:0,y:0}),{top:ii.top-ei.height-ti.y,right:ii.right-ei.width+ti.x,bottom:ii.bottom-ei.height+ti.y,left:ii.left-ei.width-ti.x}}function Tu(ii){return[dn,mn,_n,hn].some(function(ei){return ii[ei]>=0})}function Ep(ii){var ei=ii.state,ti=ii.name,ni=ei.rects.reference,ri=ei.rects.popper,oi=ei.modifiersData.preventOverflow,si=Fn(ei,{elementContext:"reference"}),ai=Fn(ei,{altBoundary:!0}),li=xu(si,ni),ui=xu(ai,ri,oi),ci=Tu(li),di=Tu(ui);ei.modifiersData[ti]={referenceClippingOffsets:li,popperEscapeOffsets:ui,isReferenceHidden:ci,hasPopperEscaped:di},ei.attributes.popper=Object.assign({},ei.attributes.popper,{"data-popper-reference-hidden":ci,"data-popper-escaped":di})}var Ra={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ep};function wp(ii,ei,ti){var ni=Dn(ii),ri=[hn,dn].indexOf(ni)>=0?-1:1,oi=typeof ti=="function"?ti(Object.assign({},ei,{placement:ii})):ti,si=oi[0],ai=oi[1];return si=si||0,ai=(ai||0)*ri,[hn,mn].indexOf(ni)>=0?{x:ai,y:si}:{x:si,y:ai}}function xp(ii){var ei=ii.state,ti=ii.options,ni=ii.name,ri=ti.offset,oi=ri===void 0?[0,0]:ri,si=Ws.reduce(function(ci,di){return ci[di]=wp(di,ei.rects,oi),ci},{}),ai=si[ei.placement],li=ai.x,ui=ai.y;ei.modifiersData.popperOffsets!=null&&(ei.modifiersData.popperOffsets.x+=li,ei.modifiersData.popperOffsets.y+=ui),ei.modifiersData[ni]=si}var Ia={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:xp};function Tp(ii){var ei=ii.state,ti=ii.name;ei.modifiersData[ti]=Xs({reference:ei.rects.reference,element:ei.rects.popper,strategy:"absolute",placement:ei.placement})}var _s={name:"popperOffsets",enabled:!0,phase:"read",fn:Tp,data:{}};function Yl(ii){return ii==="x"?"y":"x"}function Sp(ii){var ei=ii.state,ti=ii.options,ni=ii.name,ri=ti.mainAxis,oi=ri===void 0?!0:ri,si=ti.altAxis,ai=si===void 0?!1:si,li=ti.boundary,ui=ti.rootBoundary,ci=ti.altBoundary,di=ti.padding,pi=ti.tether,yi=pi===void 0?!0:pi,gi=ti.tetherOffset,vi=gi===void 0?0:gi,Ei=Fn(ei,{boundary:li,rootBoundary:ui,padding:di,altBoundary:ci}),Ci=Dn(ei.placement),xi=Yr(ei.placement),Li=!xi,Oi=Uo(Ci),zi=Yl(Oi),Vi=ei.modifiersData.popperOffsets,ki=ei.rects.reference,Mi=ei.rects.popper,Ai=typeof vi=="function"?vi(Object.assign({},ei.rects,{placement:ei.placement})):vi,qi=typeof Ai=="number"?{mainAxis:Ai,altAxis:Ai}:Object.assign({mainAxis:0,altAxis:0},Ai),Si=ei.modifiersData.offset?ei.modifiersData.offset[ei.placement]:null,Qi={x:0,y:0};if(Vi){if(oi){var Ji,gn=Oi==="y"?dn:hn,rn=Oi==="y"?_n:mn,Zi=Oi==="y"?"height":"width",on=Vi[Oi],Mn=on+Ei[gn],vn=on-Ei[rn],Yi=yi?-Mi[Zi]/2:0,Ri=xi===so?ki[Zi]:Mi[Zi],Ii=xi===so?-Mi[Zi]:-ki[Zi],Ui=ei.elements.arrow,ji=yi&&Ui?Wo(Ui):{width:0,height:0},Pi=ei.modifiersData["arrow#persistent"]?ei.modifiersData["arrow#persistent"].padding:Gs(),ln=Pi[gn],kn=Pi[rn],yn=Yo(0,ki[Zi],ji[Zi]),Cn=Li?ki[Zi]/2-Yi-yn-ln-qi.mainAxis:Ri-yn-ln-qi.mainAxis,$s=Li?-ki[Zi]/2+Yi+yn+kn+qi.mainAxis:Ii+yn+kn+qi.mainAxis,ro=ei.elements.arrow&&to(ei.elements.arrow),wo=ro?Oi==="y"?ro.clientTop||0:ro.clientLeft||0:0,bn=(Ji=Si==null?void 0:Si[Oi])!=null?Ji:0,xo=on+Cn-bn-wo,ao=on+$s-bn,ls=Yo(yi?qo(Mn,xo):Mn,on,yi?eo(vn,ao):vn);Vi[Oi]=ls,Qi[Oi]=ls-on}if(ai){var On,zn=Oi==="x"?dn:hn,Gn=Oi==="x"?_n:mn,Jn=Vi[zi],cs=zi==="y"?"height":"width",Bs=Jn+Ei[zn],us=Jn-Ei[Gn],ds=[dn,hn].indexOf(Ci)!==-1,Vo=(On=Si==null?void 0:Si[zi])!=null?On:0,Ta=ds?Bs:Jn-ki[cs]-Mi[cs]-Vo+qi.altAxis,zs=ds?Jn+ki[cs]+Mi[cs]-Vo-qi.altAxis:us,Sa=yi&&ds?_u(Ta,Jn,zs):Yo(yi?Ta:Bs,Jn,yi?zs:us);Vi[zi]=Sa,Qi[zi]=Sa-Jn}ei.modifiersData[ni]=Qi}}var Ha={name:"preventOverflow",enabled:!0,phase:"main",fn:Sp,requiresIfExists:["offset"]};function Gl(ii){return{scrollLeft:ii.scrollLeft,scrollTop:ii.scrollTop}}function Kl(ii){return ii===cn(ii)||!Tn(ii)?Go(ii):Gl(ii)}function Cp(ii){var ei=ii.getBoundingClientRect(),ti=fo(ei.width)/ii.offsetWidth||1,ni=fo(ei.height)/ii.offsetHeight||1;return ti!==1||ni!==1}function Ql(ii,ei,ti){ti===void 0&&(ti=!1);var ni=Tn(ei),ri=Tn(ei)&&Cp(ei),oi=Ln(ei),si=Wr(ii,ri,ti),ai={scrollLeft:0,scrollTop:0},li={x:0,y:0};return(ni||!ni&&!ti)&&((An(ei)!=="body"||Qo(oi))&&(ai=Kl(ei)),Tn(ei)?(li=Wr(ei,!0),li.x+=ei.clientLeft,li.y+=ei.clientTop):oi&&(li.x=Ko(oi))),{x:si.left+ai.scrollLeft-li.x,y:si.top+ai.scrollTop-li.y,width:si.width,height:si.height}}function Ap(ii){var ei=new Map,ti=new Set,ni=[];ii.forEach(function(oi){ei.set(oi.name,oi)});function ri(oi){ti.add(oi.name);var si=[].concat(oi.requires||[],oi.requiresIfExists||[]);si.forEach(function(ai){if(!ti.has(ai)){var li=ei.get(ai);li&&ri(li)}}),ni.push(oi)}return ii.forEach(function(oi){ti.has(oi.name)||ri(oi)}),ni}function Xl(ii){var ei=Ap(ii);return zl.reduce(function(ti,ni){return ti.concat(ei.filter(function(ri){return ri.phase===ni}))},[])}function Jl(ii){var ei;return function(){return ei||(ei=new Promise(function(ti){Promise.resolve().then(function(){ei=void 0,ti(ii())})})),ei}}function Zl(ii){var ei=ii.reduce(function(ti,ni){var ri=ti[ni.name];return ti[ni.name]=ri?Object.assign({},ri,ni,{options:Object.assign({},ri.options,ni.options),data:Object.assign({},ri.data,ni.data)}):ni,ti},{});return Object.keys(ei).map(function(ti){return ei[ti]})}var Su={placement:"bottom",modifiers:[],strategy:"absolute"};function Cu(){for(var ii=arguments.length,ei=new Array(ii),ti=0;ti<ii;ti++)ei[ti]=arguments[ti];return!ei.some(function(ni){return!(ni&&typeof ni.getBoundingClientRect=="function")})}function Xo(ii){ii===void 0&&(ii={});var ei=ii,ti=ei.defaultModifiers,ni=ti===void 0?[]:ti,ri=ei.defaultOptions,oi=ri===void 0?Su:ri;return function(ai,li,ui){ui===void 0&&(ui=oi);var ci={placement:"bottom",orderedModifiers:[],options:Object.assign({},Su,oi),modifiersData:{},elements:{reference:ai,popper:li},attributes:{},styles:{}},di=[],pi=!1,yi={state:ci,setOptions:function(Ci){var xi=typeof Ci=="function"?Ci(ci.options):Ci;vi(),ci.options=Object.assign({},oi,ci.options,xi),ci.scrollParents={reference:Zn(ai)?So(ai):ai.contextElement?So(ai.contextElement):[],popper:So(li)};var Li=Xl(Zl([].concat(ni,ci.options.modifiers)));return ci.orderedModifiers=Li.filter(function(Oi){return Oi.enabled}),gi(),yi.update()},forceUpdate:function(){if(!pi){var Ci=ci.elements,xi=Ci.reference,Li=Ci.popper;if(Cu(xi,Li)){ci.rects={reference:Ql(xi,to(Li),ci.options.strategy==="fixed"),popper:Wo(Li)},ci.reset=!1,ci.placement=ci.options.placement,ci.orderedModifiers.forEach(function(qi){return ci.modifiersData[qi.name]=Object.assign({},qi.data)});for(var Oi=0;Oi<ci.orderedModifiers.length;Oi++){if(ci.reset===!0){ci.reset=!1,Oi=-1;continue}var zi=ci.orderedModifiers[Oi],Vi=zi.fn,ki=zi.options,Mi=ki===void 0?{}:ki,Ai=zi.name;typeof Vi=="function"&&(ci=Vi({state:ci,options:Mi,name:Ai,instance:yi})||ci)}}}},update:Jl(function(){return new Promise(function(Ei){yi.forceUpdate(),Ei(ci)})}),destroy:function(){vi(),pi=!0}};if(!Cu(ai,li))return yi;yi.setOptions(ui).then(function(Ei){!pi&&ui.onFirstUpdate&&ui.onFirstUpdate(Ei)});function gi(){ci.orderedModifiers.forEach(function(Ei){var Ci=Ei.name,xi=Ei.options,Li=xi===void 0?{}:xi,Oi=Ei.effect;if(typeof Oi=="function"){var zi=Oi({state:ci,name:Ci,instance:yi,options:Li}),Vi=function(){};di.push(zi||Vi)}})}function vi(){di.forEach(function(Ei){return Ei()}),di=[]}return yi}}var Au=Xo();var Dp=[vs,_s,gs,ps],Du=Xo({defaultModifiers:Dp});var Op=[vs,_s,gs,ps,Ia,Na,Ha,Oa,Ra],Js=Xo({defaultModifiers:Op});var Co=new Map,ec={set(ii,ei,ti){Co.has(ii)||Co.set(ii,new Map);let ni=Co.get(ii);if(!ni.has(ei)&&ni.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(ni.keys())[0]}.`);return}ni.set(ei,ti)},get(ii,ei){return Co.has(ii)&&Co.get(ii).get(ei)||null},remove(ii,ei){if(!Co.has(ii))return;let ti=Co.get(ii);ti.delete(ei),ti.size===0&&Co.delete(ii)}},Lp=1e6,Mp=1e3,mc="transitionend",nd=ii=>(ii&&window.CSS&&window.CSS.escape&&(ii=ii.replace(/#([^\s"#']+)/g,(ei,ti)=>`#${CSS.escape(ti)}`)),ii),kp=ii=>ii==null?`${ii}`:Object.prototype.toString.call(ii).match(/\s([a-z]+)/i)[1].toLowerCase(),Np=ii=>{do ii+=Math.floor(Math.random()*Lp);while(document.getElementById(ii));return ii},Rp=ii=>{if(!ii)return 0;let{transitionDuration:ei,transitionDelay:ti}=window.getComputedStyle(ii),ni=Number.parseFloat(ei),ri=Number.parseFloat(ti);return!ni&&!ri?0:(ei=ei.split(",")[0],ti=ti.split(",")[0],(Number.parseFloat(ei)+Number.parseFloat(ti))*Mp)},rd=ii=>{ii.dispatchEvent(new Event(mc))},po=ii=>!ii||typeof ii!="object"?!1:(typeof ii.jquery!="undefined"&&(ii=ii[0]),typeof ii.nodeType!="undefined"),Ao=ii=>po(ii)?ii.jquery?ii[0]:ii:typeof ii=="string"&&ii.length>0?document.querySelector(nd(ii)):null,As=ii=>{if(!po(ii)||ii.getClientRects().length===0)return!1;let ei=getComputedStyle(ii).getPropertyValue("visibility")==="visible",ti=ii.closest("details:not([open])");if(!ti)return ei;if(ti!==ii){let ni=ii.closest("summary");if(ni&&ni.parentNode!==ti||ni===null)return!1}return ei},Do=ii=>!ii||ii.nodeType!==Node.ELEMENT_NODE||ii.classList.contains("disabled")?!0:typeof ii.disabled!="undefined"?ii.disabled:ii.hasAttribute("disabled")&&ii.getAttribute("disabled")!=="false",od=ii=>{if(!document.documentElement.attachShadow)return null;if(typeof ii.getRootNode=="function"){let ei=ii.getRootNode();return ei instanceof ShadowRoot?ei:null}return ii instanceof ShadowRoot?ii:ii.parentNode?od(ii.parentNode):null},Ua=()=>{},na=ii=>{ii.offsetHeight},sd=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,tc=[],Ip=ii=>{document.readyState==="loading"?(tc.length||document.addEventListener("DOMContentLoaded",()=>{for(let ei of tc)ei()}),tc.push(ii)):ii()},Gr=()=>document.documentElement.dir==="rtl",Qr=ii=>{Ip(()=>{let ei=sd();if(ei){let ti=ii.NAME,ni=ei.fn[ti];ei.fn[ti]=ii.jQueryInterface,ei.fn[ti].Constructor=ii,ei.fn[ti].noConflict=()=>(ei.fn[ti]=ni,ii.jQueryInterface)}})},Vn=(ii,ei=[],ti=ii)=>typeof ii=="function"?ii(...ei):ti,ad=(ii,ei,ti=!0)=>{if(!ti){Vn(ii);return}let ri=Rp(ei)+5,oi=!1,si=({target:ai})=>{ai===ei&&(oi=!0,ei.removeEventListener(mc,si),Vn(ii))};ei.addEventListener(mc,si),setTimeout(()=>{oi||rd(ei)},ri)},bc=(ii,ei,ti,ni)=>{let ri=ii.length,oi=ii.indexOf(ei);return oi===-1?!ti&&ni?ii[ri-1]:ii[0]:(oi+=ti?1:-1,ni&&(oi=(oi+ri)%ri),ii[Math.max(0,Math.min(oi,ri-1))])},Hp=/[^.]*(?=\..*)\.|.*/,Pp=/\..*/,Fp=/::\d+$/,ic={},Ou=1,ld={mouseenter:"mouseover",mouseleave:"mouseout"},$p=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function cd(ii,ei){return ei&&`${ei}::${Ou++}`||ii.uidEvent||Ou++}function ud(ii){let ei=cd(ii);return ii.uidEvent=ei,ic[ei]=ic[ei]||{},ic[ei]}function Bp(ii,ei){return function ti(ni){return _c(ni,{delegateTarget:ii}),ti.oneOff&&wi.off(ii,ni.type,ei),ei.apply(ii,[ni])}}function zp(ii,ei,ti){return function ni(ri){let oi=ii.querySelectorAll(ei);for(let{target:si}=ri;si&&si!==this;si=si.parentNode)for(let ai of oi)if(ai===si)return _c(ri,{delegateTarget:si}),ni.oneOff&&wi.off(ii,ri.type,ei,ti),ti.apply(si,[ri])}}function dd(ii,ei,ti=null){return Object.values(ii).find(ni=>ni.callable===ei&&ni.delegationSelector===ti)}function fd(ii,ei,ti){let ni=typeof ei=="string",ri=ni?ti:ei||ti,oi=hd(ii);return $p.has(oi)||(oi=ii),[ni,ri,oi]}function Lu(ii,ei,ti,ni,ri){if(typeof ei!="string"||!ii)return;let[oi,si,ai]=fd(ei,ti,ni);ei in ld&&(si=(gi=>function(vi){if(!vi.relatedTarget||vi.relatedTarget!==vi.delegateTarget&&!vi.delegateTarget.contains(vi.relatedTarget))return gi.call(this,vi)})(si));let li=ud(ii),ui=li[ai]||(li[ai]={}),ci=dd(ui,si,oi?ti:null);if(ci){ci.oneOff=ci.oneOff&&ri;return}let di=cd(si,ei.replace(Hp,"")),pi=oi?zp(ii,ti,si):Bp(ii,si);pi.delegationSelector=oi?ti:null,pi.callable=si,pi.oneOff=ri,pi.uidEvent=di,ui[di]=pi,ii.addEventListener(ai,pi,oi)}function gc(ii,ei,ti,ni,ri){let oi=dd(ei[ti],ni,ri);oi&&(ii.removeEventListener(ti,oi,!!ri),delete ei[ti][oi.uidEvent])}function Vp(ii,ei,ti,ni){let ri=ei[ti]||{};for(let[oi,si]of Object.entries(ri))oi.includes(ni)&&gc(ii,ei,ti,si.callable,si.delegationSelector)}function hd(ii){return ii=ii.replace(Pp,""),ld[ii]||ii}var wi={on(ii,ei,ti,ni){Lu(ii,ei,ti,ni,!1)},one(ii,ei,ti,ni){Lu(ii,ei,ti,ni,!0)},off(ii,ei,ti,ni){if(typeof ei!="string"||!ii)return;let[ri,oi,si]=fd(ei,ti,ni),ai=si!==ei,li=ud(ii),ui=li[si]||{},ci=ei.startsWith(".");if(typeof oi!="undefined"){if(!Object.keys(ui).length)return;gc(ii,li,si,oi,ri?ti:null);return}if(ci)for(let di of Object.keys(li))Vp(ii,li,di,ei.slice(1));for(let[di,pi]of Object.entries(ui)){let yi=di.replace(Fp,"");(!ai||ei.includes(yi))&&gc(ii,li,si,pi.callable,pi.delegationSelector)}},trigger(ii,ei,ti){if(typeof ei!="string"||!ii)return null;let ni=sd(),ri=hd(ei),oi=ei!==ri,si=null,ai=!0,li=!0,ui=!1;oi&&ni&&(si=ni.Event(ei,ti),ni(ii).trigger(si),ai=!si.isPropagationStopped(),li=!si.isImmediatePropagationStopped(),ui=si.isDefaultPrevented());let ci=_c(new Event(ei,{bubbles:ai,cancelable:!0}),ti);return ui&&ci.preventDefault(),li&&ii.dispatchEvent(ci),ci.defaultPrevented&&si&&si.preventDefault(),ci}};function _c(ii,ei={}){for(let[ti,ni]of Object.entries(ei))try{ii[ti]=ni}catch(ri){Object.defineProperty(ii,ti,{configurable:!0,get(){return ni}})}return ii}function Mu(ii){if(ii==="true")return!0;if(ii==="false")return!1;if(ii===Number(ii).toString())return Number(ii);if(ii===""||ii==="null")return null;if(typeof ii!="string")return ii;try{return JSON.parse(decodeURIComponent(ii))}catch(ei){return ii}}function nc(ii){return ii.replace(/[A-Z]/g,ei=>`-${ei.toLowerCase()}`)}var mo={setDataAttribute(ii,ei,ti){ii.setAttribute(`data-bs-${nc(ei)}`,ti)},removeDataAttribute(ii,ei){ii.removeAttribute(`data-bs-${nc(ei)}`)},getDataAttributes(ii){if(!ii)return{};let ei={},ti=Object.keys(ii.dataset).filter(ni=>ni.startsWith("bs")&&!ni.startsWith("bsConfig"));for(let ni of ti){let ri=ni.replace(/^bs/,"");ri=ri.charAt(0).toLowerCase()+ri.slice(1,ri.length),ei[ri]=Mu(ii.dataset[ni])}return ei},getDataAttribute(ii,ei){return Mu(ii.getAttribute(`data-bs-${nc(ei)}`))}},es=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(ei){return ei=this._mergeConfigObj(ei),ei=this._configAfterMerge(ei),this._typeCheckConfig(ei),ei}_configAfterMerge(ei){return ei}_mergeConfigObj(ei,ti){let ni=po(ti)?mo.getDataAttribute(ti,"config"):{};return Di(Di(Di(Di({},this.constructor.Default),typeof ni=="object"?ni:{}),po(ti)?mo.getDataAttributes(ti):{}),typeof ei=="object"?ei:{})}_typeCheckConfig(ei,ti=this.constructor.DefaultType){for(let[ni,ri]of Object.entries(ti)){let oi=ei[ni],si=po(oi)?"element":kp(oi);if(!new RegExp(ri).test(si))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${ni}" provided type "${si}" but expected type "${ri}".`)}}},jp="5.3.3",Qn=class extends es{constructor(ei,ti){super(),ei=Ao(ei),ei&&(this._element=ei,this._config=this._getConfig(ti),ec.set(this._element,this.constructor.DATA_KEY,this))}dispose(){ec.remove(this._element,this.constructor.DATA_KEY),wi.off(this._element,this.constructor.EVENT_KEY);for(let ei of Object.getOwnPropertyNames(this))this[ei]=null}_queueCallback(ei,ti,ni=!0){ad(ei,ti,ni)}_getConfig(ei){return ei=this._mergeConfigObj(ei,this._element),ei=this._configAfterMerge(ei),this._typeCheckConfig(ei),ei}static getInstance(ei){return ec.get(Ao(ei),this.DATA_KEY)}static getOrCreateInstance(ei,ti={}){return this.getInstance(ei)||new this(ei,typeof ti=="object"?ti:null)}static get VERSION(){return jp}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(ei){return`${ei}${this.EVENT_KEY}`}},rc=ii=>{let ei=ii.getAttribute("data-bs-target");if(!ei||ei==="#"){let ti=ii.getAttribute("href");if(!ti||!ti.includes("#")&&!ti.startsWith("."))return null;ti.includes("#")&&!ti.startsWith("#")&&(ti=`#${ti.split("#")[1]}`),ei=ti&&ti!=="#"?ti.trim():null}return ei?ei.split(",").map(ti=>nd(ti)).join(","):null},Wi={find(ii,ei=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(ei,ii))},findOne(ii,ei=document.documentElement){return Element.prototype.querySelector.call(ei,ii)},children(ii,ei){return[].concat(...ii.children).filter(ti=>ti.matches(ei))},parents(ii,ei){let ti=[],ni=ii.parentNode.closest(ei);for(;ni;)ti.push(ni),ni=ni.parentNode.closest(ei);return ti},prev(ii,ei){let ti=ii.previousElementSibling;for(;ti;){if(ti.matches(ei))return[ti];ti=ti.previousElementSibling}return[]},next(ii,ei){let ti=ii.nextElementSibling;for(;ti;){if(ti.matches(ei))return[ti];ti=ti.nextElementSibling}return[]},focusableChildren(ii){let ei=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(ti=>`${ti}:not([tabindex^="-"])`).join(",");return this.find(ei,ii).filter(ti=>!Do(ti)&&As(ti))},getSelectorFromElement(ii){let ei=rc(ii);return ei&&Wi.findOne(ei)?ei:null},getElementFromSelector(ii){let ei=rc(ii);return ei?Wi.findOne(ei):null},getMultipleElementsFromSelector(ii){let ei=rc(ii);return ei?Wi.find(ei):[]}},el=(ii,ei="hide")=>{let ti=`click.dismiss${ii.EVENT_KEY}`,ni=ii.NAME;wi.on(document,ti,`[data-bs-dismiss="${ni}"]`,function(ri){if(["A","AREA"].includes(this.tagName)&&ri.preventDefault(),Do(this))return;let oi=Wi.getElementFromSelector(this)||this.closest(`.${ni}`);ii.getOrCreateInstance(oi)[ei]()})},qp="alert",Wp="bs.alert",pd=`.${Wp}`,Up=`close${pd}`,Yp=`closed${pd}`,Gp="fade",Kp="show",Ya=class ii extends Qn{static get NAME(){return qp}close(){if(wi.trigger(this._element,Up).defaultPrevented)return;this._element.classList.remove(Kp);let ti=this._element.classList.contains(Gp);this._queueCallback(()=>this._destroyElement(),this._element,ti)}_destroyElement(){this._element.remove(),wi.trigger(this._element,Yp),this.dispose()}static jQueryInterface(ei){return this.each(function(){let ti=ii.getOrCreateInstance(this);if(typeof ei=="string"){if(ti[ei]===void 0||ei.startsWith("_")||ei==="constructor")throw new TypeError(`No method named "${ei}"`);ti[ei](this)}})}};el(Ya,"close");Qr(Ya);var Qp="button",Xp="bs.button",Jp=`.${Xp}`,Zp=".data-api",em="active",ku='[data-bs-toggle="button"]',tm=`click${Jp}${Zp}`,Ga=class ii extends Qn{static get NAME(){return Qp}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(em))}static jQueryInterface(ei){return this.each(function(){let ti=ii.getOrCreateInstance(this);ei==="toggle"&&ti[ei]()})}};wi.on(document,tm,ku,ii=>{ii.preventDefault();let ei=ii.target.closest(ku);Ga.getOrCreateInstance(ei).toggle()});Qr(Ga);var im="swipe",Ds=".bs.swipe",nm=`touchstart${Ds}`,rm=`touchmove${Ds}`,om=`touchend${Ds}`,sm=`pointerdown${Ds}`,am=`pointerup${Ds}`,lm="touch",cm="pen",um="pointer-event",dm=40,fm={endCallback:null,leftCallback:null,rightCallback:null},hm={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"},Ka=class ii extends es{constructor(ei,ti){super(),this._element=ei,!(!ei||!ii.isSupported())&&(this._config=this._getConfig(ti),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return fm}static get DefaultType(){return hm}static get NAME(){return im}dispose(){wi.off(this._element,Ds)}_start(ei){if(!this._supportPointerEvents){this._deltaX=ei.touches[0].clientX;return}this._eventIsPointerPenTouch(ei)&&(this._deltaX=ei.clientX)}_end(ei){this._eventIsPointerPenTouch(ei)&&(this._deltaX=ei.clientX-this._deltaX),this._handleSwipe(),Vn(this._config.endCallback)}_move(ei){this._deltaX=ei.touches&&ei.touches.length>1?0:ei.touches[0].clientX-this._deltaX}_handleSwipe(){let ei=Math.abs(this._deltaX);if(ei<=dm)return;let ti=ei/this._deltaX;this._deltaX=0,ti&&Vn(ti>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(wi.on(this._element,sm,ei=>this._start(ei)),wi.on(this._element,am,ei=>this._end(ei)),this._element.classList.add(um)):(wi.on(this._element,nm,ei=>this._start(ei)),wi.on(this._element,rm,ei=>this._move(ei)),wi.on(this._element,om,ei=>this._end(ei)))}_eventIsPointerPenTouch(ei){return this._supportPointerEvents&&(ei.pointerType===cm||ei.pointerType===lm)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}},pm="carousel",mm="bs.carousel",ko=`.${mm}`,md=".data-api",gm="ArrowLeft",vm="ArrowRight",ym=500,Zs="next",Es="prev",xs="left",qa="right",bm=`slide${ko}`,oc=`slid${ko}`,_m=`keydown${ko}`,Em=`mouseenter${ko}`,wm=`mouseleave${ko}`,xm=`dragstart${ko}`,Tm=`load${ko}${md}`,Sm=`click${ko}${md}`,gd="carousel",Fa="active",Cm="slide",Am="carousel-item-end",Dm="carousel-item-start",Om="carousel-item-next",Lm="carousel-item-prev",vd=".active",yd=".carousel-item",Mm=vd+yd,km=".carousel-item img",Nm=".carousel-indicators",Rm="[data-bs-slide], [data-bs-slide-to]",Im='[data-bs-ride="carousel"]',Hm={[gm]:qa,[vm]:xs},Pm={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Fm={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"},ta=class ii extends Qn{constructor(ei,ti){super(ei,ti),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Wi.findOne(Nm,this._element),this._addEventListeners(),this._config.ride===gd&&this.cycle()}static get Default(){return Pm}static get DefaultType(){return Fm}static get NAME(){return pm}next(){this._slide(Zs)}nextWhenVisible(){!document.hidden&&As(this._element)&&this.next()}prev(){this._slide(Es)}pause(){this._isSliding&&rd(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){wi.one(this._element,oc,()=>this.cycle());return}this.cycle()}}to(ei){let ti=this._getItems();if(ei>ti.length-1||ei<0)return;if(this._isSliding){wi.one(this._element,oc,()=>this.to(ei));return}let ni=this._getItemIndex(this._getActive());if(ni===ei)return;let ri=ei>ni?Zs:Es;this._slide(ri,ti[ei])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(ei){return ei.defaultInterval=ei.interval,ei}_addEventListeners(){this._config.keyboard&&wi.on(this._element,_m,ei=>this._keydown(ei)),this._config.pause==="hover"&&(wi.on(this._element,Em,()=>this.pause()),wi.on(this._element,wm,()=>this._maybeEnableCycle())),this._config.touch&&Ka.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(let ni of Wi.find(km,this._element))wi.on(ni,xm,ri=>ri.preventDefault());let ti={leftCallback:()=>this._slide(this._directionToOrder(xs)),rightCallback:()=>this._slide(this._directionToOrder(qa)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),ym+this._config.interval))}};this._swipeHelper=new Ka(this._element,ti)}_keydown(ei){if(/input|textarea/i.test(ei.target.tagName))return;let ti=Hm[ei.key];ti&&(ei.preventDefault(),this._slide(this._directionToOrder(ti)))}_getItemIndex(ei){return this._getItems().indexOf(ei)}_setActiveIndicatorElement(ei){if(!this._indicatorsElement)return;let ti=Wi.findOne(vd,this._indicatorsElement);ti.classList.remove(Fa),ti.removeAttribute("aria-current");let ni=Wi.findOne(`[data-bs-slide-to="${ei}"]`,this._indicatorsElement);ni&&(ni.classList.add(Fa),ni.setAttribute("aria-current","true"))}_updateInterval(){let ei=this._activeElement||this._getActive();if(!ei)return;let ti=Number.parseInt(ei.getAttribute("data-bs-interval"),10);this._config.interval=ti||this._config.defaultInterval}_slide(ei,ti=null){if(this._isSliding)return;let ni=this._getActive(),ri=ei===Zs,oi=ti||bc(this._getItems(),ni,ri,this._config.wrap);if(oi===ni)return;let si=this._getItemIndex(oi),ai=yi=>wi.trigger(this._element,yi,{relatedTarget:oi,direction:this._orderToDirection(ei),from:this._getItemIndex(ni),to:si});if(ai(bm).defaultPrevented||!ni||!oi)return;let ui=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(si),this._activeElement=oi;let ci=ri?Dm:Am,di=ri?Om:Lm;oi.classList.add(di),na(oi),ni.classList.add(ci),oi.classList.add(ci);let pi=()=>{oi.classList.remove(ci,di),oi.classList.add(Fa),ni.classList.remove(Fa,di,ci),this._isSliding=!1,ai(oc)};this._queueCallback(pi,ni,this._isAnimated()),ui&&this.cycle()}_isAnimated(){return this._element.classList.contains(Cm)}_getActive(){return Wi.findOne(Mm,this._element)}_getItems(){return Wi.find(yd,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(ei){return Gr()?ei===xs?Es:Zs:ei===xs?Zs:Es}_orderToDirection(ei){return Gr()?ei===Es?xs:qa:ei===Es?qa:xs}static jQueryInterface(ei){return this.each(function(){let ti=ii.getOrCreateInstance(this,ei);if(typeof ei=="number"){ti.to(ei);return}if(typeof ei=="string"){if(ti[ei]===void 0||ei.startsWith("_")||ei==="constructor")throw new TypeError(`No method named "${ei}"`);ti[ei]()}})}};wi.on(document,Sm,Rm,function(ii){let ei=Wi.getElementFromSelector(this);if(!ei||!ei.classList.contains(gd))return;ii.preventDefault();let ti=ta.getOrCreateInstance(ei),ni=this.getAttribute("data-bs-slide-to");if(ni){ti.to(ni),ti._maybeEnableCycle();return}if(mo.getDataAttribute(this,"slide")==="next"){ti.next(),ti._maybeEnableCycle();return}ti.prev(),ti._maybeEnableCycle()});wi.on(window,Tm,()=>{let ii=Wi.find(Im);for(let ei of ii)ta.getOrCreateInstance(ei)});Qr(ta);var $m="collapse",Bm="bs.collapse",ra=`.${Bm}`,zm=".data-api",Vm=`show${ra}`,jm=`shown${ra}`,qm=`hide${ra}`,Wm=`hidden${ra}`,Um=`click${ra}${zm}`,sc="show",Ss="collapse",$a="collapsing",Ym="collapsed",Gm=`:scope .${Ss} .${Ss}`,Km="collapse-horizontal",Qm="width",Xm="height",Jm=".collapse.show, .collapse.collapsing",vc='[data-bs-toggle="collapse"]',Zm={parent:null,toggle:!0},eg={parent:"(null|element)",toggle:"boolean"},Oo=class ii extends Qn{constructor(ei,ti){super(ei,ti),this._isTransitioning=!1,this._triggerArray=[];let ni=Wi.find(vc);for(let ri of ni){let oi=Wi.getSelectorFromElement(ri),si=Wi.find(oi).filter(ai=>ai===this._element);oi!==null&&si.length&&this._triggerArray.push(ri)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Zm}static get DefaultType(){return eg}static get NAME(){return $m}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let ei=[];if(this._config.parent&&(ei=this._getFirstLevelChildren(Jm).filter(ai=>ai!==this._element).map(ai=>ii.getOrCreateInstance(ai,{toggle:!1}))),ei.length&&ei[0]._isTransitioning||wi.trigger(this._element,Vm).defaultPrevented)return;for(let ai of ei)ai.hide();let ni=this._getDimension();this._element.classList.remove(Ss),this._element.classList.add($a),this._element.style[ni]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;let ri=()=>{this._isTransitioning=!1,this._element.classList.remove($a),this._element.classList.add(Ss,sc),this._element.style[ni]="",wi.trigger(this._element,jm)},si=`scroll${ni[0].toUpperCase()+ni.slice(1)}`;this._queueCallback(ri,this._element,!0),this._element.style[ni]=`${this._element[si]}px`}hide(){if(this._isTransitioning||!this._isShown()||wi.trigger(this._element,qm).defaultPrevented)return;let ti=this._getDimension();this._element.style[ti]=`${this._element.getBoundingClientRect()[ti]}px`,na(this._element),this._element.classList.add($a),this._element.classList.remove(Ss,sc);for(let ri of this._triggerArray){let oi=Wi.getElementFromSelector(ri);oi&&!this._isShown(oi)&&this._addAriaAndCollapsedClass([ri],!1)}this._isTransitioning=!0;let ni=()=>{this._isTransitioning=!1,this._element.classList.remove($a),this._element.classList.add(Ss),wi.trigger(this._element,Wm)};this._element.style[ti]="",this._queueCallback(ni,this._element,!0)}_isShown(ei=this._element){return ei.classList.contains(sc)}_configAfterMerge(ei){return ei.toggle=!!ei.toggle,ei.parent=Ao(ei.parent),ei}_getDimension(){return this._element.classList.contains(Km)?Qm:Xm}_initializeChildren(){if(!this._config.parent)return;let ei=this._getFirstLevelChildren(vc);for(let ti of ei){let ni=Wi.getElementFromSelector(ti);ni&&this._addAriaAndCollapsedClass([ti],this._isShown(ni))}}_getFirstLevelChildren(ei){let ti=Wi.find(Gm,this._config.parent);return Wi.find(ei,this._config.parent).filter(ni=>!ti.includes(ni))}_addAriaAndCollapsedClass(ei,ti){if(ei.length)for(let ni of ei)ni.classList.toggle(Ym,!ti),ni.setAttribute("aria-expanded",ti)}static jQueryInterface(ei){let ti={};return typeof ei=="string"&&/show|hide/.test(ei)&&(ti.toggle=!1),this.each(function(){let ni=ii.getOrCreateInstance(this,ti);if(typeof ei=="string"){if(typeof ni[ei]=="undefined")throw new TypeError(`No method named "${ei}"`);ni[ei]()}})}};wi.on(document,Um,vc,function(ii){(ii.target.tagName==="A"||ii.delegateTarget&&ii.delegateTarget.tagName==="A")&&ii.preventDefault();for(let ei of Wi.getMultipleElementsFromSelector(this))Oo.getOrCreateInstance(ei,{toggle:!1}).toggle()});Qr(Oo);var Nu="dropdown",tg="bs.dropdown",is=`.${tg}`,Ec=".data-api",ig="Escape",Ru="Tab",ng="ArrowUp",Iu="ArrowDown",rg=2,og=`hide${is}`,sg=`hidden${is}`,ag=`show${is}`,lg=`shown${is}`,bd=`click${is}${Ec}`,_d=`keydown${is}${Ec}`,cg=`keyup${is}${Ec}`,Ts="show",ug="dropup",dg="dropend",fg="dropstart",hg="dropup-center",pg="dropdown-center",Jo='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',mg=`${Jo}.${Ts}`,Wa=".dropdown-menu",gg=".navbar",vg=".navbar-nav",yg=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",bg=Gr()?"top-end":"top-start",_g=Gr()?"top-start":"top-end",Eg=Gr()?"bottom-end":"bottom-start",wg=Gr()?"bottom-start":"bottom-end",xg=Gr()?"left-start":"right-start",Tg=Gr()?"right-start":"left-start",Sg="top",Cg="bottom",Ag={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Dg={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"},Lo=class ii extends Qn{constructor(ei,ti){super(ei,ti),this._popper=null,this._parent=this._element.parentNode,this._menu=Wi.next(this._element,Wa)[0]||Wi.prev(this._element,Wa)[0]||Wi.findOne(Wa,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Ag}static get DefaultType(){return Dg}static get NAME(){return Nu}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Do(this._element)||this._isShown())return;let ei={relatedTarget:this._element};if(!wi.trigger(this._element,ag,ei).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(vg))for(let ni of[].concat(...document.body.children))wi.on(ni,"mouseover",Ua);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ts),this._element.classList.add(Ts),wi.trigger(this._element,lg,ei)}}hide(){if(Do(this._element)||!this._isShown())return;let ei={relatedTarget:this._element};this._completeHide(ei)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(ei){if(!wi.trigger(this._element,og,ei).defaultPrevented){if("ontouchstart"in document.documentElement)for(let ni of[].concat(...document.body.children))wi.off(ni,"mouseover",Ua);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ts),this._element.classList.remove(Ts),this._element.setAttribute("aria-expanded","false"),mo.removeDataAttribute(this._menu,"popper"),wi.trigger(this._element,sg,ei)}}_getConfig(ei){if(ei=super._getConfig(ei),typeof ei.reference=="object"&&!po(ei.reference)&&typeof ei.reference.getBoundingClientRect!="function")throw new TypeError(`${Nu.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return ei}_createPopper(){if(typeof Pa=="undefined")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let ei=this._element;this._config.reference==="parent"?ei=this._parent:po(this._config.reference)?ei=Ao(this._config.reference):typeof this._config.reference=="object"&&(ei=this._config.reference);let ti=this._getPopperConfig();this._popper=Js(ei,this._menu,ti)}_isShown(){return this._menu.classList.contains(Ts)}_getPlacement(){let ei=this._parent;if(ei.classList.contains(dg))return xg;if(ei.classList.contains(fg))return Tg;if(ei.classList.contains(hg))return Sg;if(ei.classList.contains(pg))return Cg;let ti=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return ei.classList.contains(ug)?ti?_g:bg:ti?wg:Eg}_detectNavbar(){return this._element.closest(gg)!==null}_getOffset(){let{offset:ei}=this._config;return typeof ei=="string"?ei.split(",").map(ti=>Number.parseInt(ti,10)):typeof ei=="function"?ti=>ei(ti,this._element):ei}_getPopperConfig(){let ei={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(mo.setDataAttribute(this._menu,"popper","static"),ei.modifiers=[{name:"applyStyles",enabled:!1}]),Di(Di({},ei),Vn(this._config.popperConfig,[ei]))}_selectMenuItem({key:ei,target:ti}){let ni=Wi.find(yg,this._menu).filter(ri=>As(ri));ni.length&&bc(ni,ti,ei===Iu,!ni.includes(ti)).focus()}static jQueryInterface(ei){return this.each(function(){let ti=ii.getOrCreateInstance(this,ei);if(typeof ei=="string"){if(typeof ti[ei]=="undefined")throw new TypeError(`No method named "${ei}"`);ti[ei]()}})}static clearMenus(ei){if(ei.button===rg||ei.type==="keyup"&&ei.key!==Ru)return;let ti=Wi.find(mg);for(let ni of ti){let ri=ii.getInstance(ni);if(!ri||ri._config.autoClose===!1)continue;let oi=ei.composedPath(),si=oi.includes(ri._menu);if(oi.includes(ri._element)||ri._config.autoClose==="inside"&&!si||ri._config.autoClose==="outside"&&si||ri._menu.contains(ei.target)&&(ei.type==="keyup"&&ei.key===Ru||/input|select|option|textarea|form/i.test(ei.target.tagName)))continue;let ai={relatedTarget:ri._element};ei.type==="click"&&(ai.clickEvent=ei),ri._completeHide(ai)}}static dataApiKeydownHandler(ei){let ti=/input|textarea/i.test(ei.target.tagName),ni=ei.key===ig,ri=[ng,Iu].includes(ei.key);if(!ri&&!ni||ti&&!ni)return;ei.preventDefault();let oi=this.matches(Jo)?this:Wi.prev(this,Jo)[0]||Wi.next(this,Jo)[0]||Wi.findOne(Jo,ei.delegateTarget.parentNode),si=ii.getOrCreateInstance(oi);if(ri){ei.stopPropagation(),si.show(),si._selectMenuItem(ei);return}si._isShown()&&(ei.stopPropagation(),si.hide(),oi.focus())}};wi.on(document,_d,Jo,Lo.dataApiKeydownHandler);wi.on(document,_d,Wa,Lo.dataApiKeydownHandler);wi.on(document,bd,Lo.clearMenus);wi.on(document,cg,Lo.clearMenus);wi.on(document,bd,Jo,function(ii){ii.preventDefault(),Lo.getOrCreateInstance(this).toggle()});Qr(Lo);var Ed="backdrop",Og="fade",Hu="show",Pu=`mousedown.bs.${Ed}`,Lg={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Mg={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"},Qa=class extends es{constructor(ei){super(),this._config=this._getConfig(ei),this._isAppended=!1,this._element=null}static get Default(){return Lg}static get DefaultType(){return Mg}static get NAME(){return Ed}show(ei){if(!this._config.isVisible){Vn(ei);return}this._append();let ti=this._getElement();this._config.isAnimated&&na(ti),ti.classList.add(Hu),this._emulateAnimation(()=>{Vn(ei)})}hide(ei){if(!this._config.isVisible){Vn(ei);return}this._getElement().classList.remove(Hu),this._emulateAnimation(()=>{this.dispose(),Vn(ei)})}dispose(){this._isAppended&&(wi.off(this._element,Pu),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){let ei=document.createElement("div");ei.className=this._config.className,this._config.isAnimated&&ei.classList.add(Og),this._element=ei}return this._element}_configAfterMerge(ei){return ei.rootElement=Ao(ei.rootElement),ei}_append(){if(this._isAppended)return;let ei=this._getElement();this._config.rootElement.append(ei),wi.on(ei,Pu,()=>{Vn(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(ei){ad(ei,this._getElement(),this._config.isAnimated)}},kg="focustrap",Ng="bs.focustrap",Xa=`.${Ng}`,Rg=`focusin${Xa}`,Ig=`keydown.tab${Xa}`,Hg="Tab",Pg="forward",Fu="backward",Fg={autofocus:!0,trapElement:null},$g={autofocus:"boolean",trapElement:"element"},Ja=class extends es{constructor(ei){super(),this._config=this._getConfig(ei),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Fg}static get DefaultType(){return $g}static get NAME(){return kg}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),wi.off(document,Xa),wi.on(document,Rg,ei=>this._handleFocusin(ei)),wi.on(document,Ig,ei=>this._handleKeydown(ei)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,wi.off(document,Xa))}_handleFocusin(ei){let{trapElement:ti}=this._config;if(ei.target===document||ei.target===ti||ti.contains(ei.target))return;let ni=Wi.focusableChildren(ti);ni.length===0?ti.focus():this._lastTabNavDirection===Fu?ni[ni.length-1].focus():ni[0].focus()}_handleKeydown(ei){ei.key===Hg&&(this._lastTabNavDirection=ei.shiftKey?Fu:Pg)}},$u=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Bu=".sticky-top",Ba="padding-right",zu="margin-right",ia=class{constructor(){this._element=document.body}getWidth(){let ei=document.documentElement.clientWidth;return Math.abs(window.innerWidth-ei)}hide(){let ei=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Ba,ti=>ti+ei),this._setElementAttributes($u,Ba,ti=>ti+ei),this._setElementAttributes(Bu,zu,ti=>ti-ei)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Ba),this._resetElementAttributes($u,Ba),this._resetElementAttributes(Bu,zu)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(ei,ti,ni){let ri=this.getWidth(),oi=si=>{if(si!==this._element&&window.innerWidth>si.clientWidth+ri)return;this._saveInitialAttribute(si,ti);let ai=window.getComputedStyle(si).getPropertyValue(ti);si.style.setProperty(ti,`${ni(Number.parseFloat(ai))}px`)};this._applyManipulationCallback(ei,oi)}_saveInitialAttribute(ei,ti){let ni=ei.style.getPropertyValue(ti);ni&&mo.setDataAttribute(ei,ti,ni)}_resetElementAttributes(ei,ti){let ni=ri=>{let oi=mo.getDataAttribute(ri,ti);if(oi===null){ri.style.removeProperty(ti);return}mo.removeDataAttribute(ri,ti),ri.style.setProperty(ti,oi)};this._applyManipulationCallback(ei,ni)}_applyManipulationCallback(ei,ti){if(po(ei)){ti(ei);return}for(let ni of Wi.find(ei,this._element))ti(ni)}},Bg="modal",zg="bs.modal",Kr=`.${zg}`,Vg=".data-api",jg="Escape",qg=`hide${Kr}`,Wg=`hidePrevented${Kr}`,wd=`hidden${Kr}`,xd=`show${Kr}`,Ug=`shown${Kr}`,Yg=`resize${Kr}`,Gg=`click.dismiss${Kr}`,Kg=`mousedown.dismiss${Kr}`,Qg=`keydown.dismiss${Kr}`,Xg=`click${Kr}${Vg}`,Vu="modal-open",Jg="fade",ju="show",ac="modal-static",Zg=".modal.show",ev=".modal-dialog",tv=".modal-body",iv='[data-bs-toggle="modal"]',nv={backdrop:!0,focus:!0,keyboard:!0},rv={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"},io=class ii extends Qn{constructor(ei,ti){super(ei,ti),this._dialog=Wi.findOne(ev,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new ia,this._addEventListeners()}static get Default(){return nv}static get DefaultType(){return rv}static get NAME(){return Bg}toggle(ei){return this._isShown?this.hide():this.show(ei)}show(ei){this._isShown||this._isTransitioning||wi.trigger(this._element,xd,{relatedTarget:ei}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Vu),this._adjustDialog(),this._backdrop.show(()=>this._showElement(ei)))}hide(){!this._isShown||this._isTransitioning||wi.trigger(this._element,qg).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(ju),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){wi.off(window,Kr),wi.off(this._dialog,Kr),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Qa({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ja({trapElement:this._element})}_showElement(ei){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;let ti=Wi.findOne(tv,this._dialog);ti&&(ti.scrollTop=0),na(this._element),this._element.classList.add(ju);let ni=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,wi.trigger(this._element,Ug,{relatedTarget:ei})};this._queueCallback(ni,this._dialog,this._isAnimated())}_addEventListeners(){wi.on(this._element,Qg,ei=>{if(ei.key===jg){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),wi.on(window,Yg,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),wi.on(this._element,Kg,ei=>{wi.one(this._element,Gg,ti=>{if(!(this._element!==ei.target||this._element!==ti.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Vu),this._resetAdjustments(),this._scrollBar.reset(),wi.trigger(this._element,wd)})}_isAnimated(){return this._element.classList.contains(Jg)}_triggerBackdropTransition(){if(wi.trigger(this._element,Wg).defaultPrevented)return;let ti=this._element.scrollHeight>document.documentElement.clientHeight,ni=this._element.style.overflowY;ni==="hidden"||this._element.classList.contains(ac)||(ti||(this._element.style.overflowY="hidden"),this._element.classList.add(ac),this._queueCallback(()=>{this._element.classList.remove(ac),this._queueCallback(()=>{this._element.style.overflowY=ni},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){let ei=this._element.scrollHeight>document.documentElement.clientHeight,ti=this._scrollBar.getWidth(),ni=ti>0;if(ni&&!ei){let ri=Gr()?"paddingLeft":"paddingRight";this._element.style[ri]=`${ti}px`}if(!ni&&ei){let ri=Gr()?"paddingRight":"paddingLeft";this._element.style[ri]=`${ti}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(ei,ti){return this.each(function(){let ni=ii.getOrCreateInstance(this,ei);if(typeof ei=="string"){if(typeof ni[ei]=="undefined")throw new TypeError(`No method named "${ei}"`);ni[ei](ti)}})}};wi.on(document,Xg,iv,function(ii){let ei=Wi.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&ii.preventDefault(),wi.one(ei,xd,ri=>{ri.defaultPrevented||wi.one(ei,wd,()=>{As(this)&&this.focus()})});let ti=Wi.findOne(Zg);ti&&io.getInstance(ti).hide(),io.getOrCreateInstance(ei).toggle(this)});el(io);Qr(io);var ov="offcanvas",sv="bs.offcanvas",yo=`.${sv}`,Td=".data-api",av=`load${yo}${Td}`,lv="Escape",qu="show",Wu="showing",Uu="hiding",cv="offcanvas-backdrop",Sd=".offcanvas.show",uv=`show${yo}`,dv=`shown${yo}`,fv=`hide${yo}`,Yu=`hidePrevented${yo}`,Cd=`hidden${yo}`,hv=`resize${yo}`,pv=`click${yo}${Td}`,mv=`keydown.dismiss${yo}`,gv='[data-bs-toggle="offcanvas"]',vv={backdrop:!0,keyboard:!0,scroll:!1},yv={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"},Mo=class ii extends Qn{constructor(ei,ti){super(ei,ti),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return vv}static get DefaultType(){return yv}static get NAME(){return ov}toggle(ei){return this._isShown?this.hide():this.show(ei)}show(ei){if(this._isShown||wi.trigger(this._element,uv,{relatedTarget:ei}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new ia().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Wu);let ni=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(qu),this._element.classList.remove(Wu),wi.trigger(this._element,dv,{relatedTarget:ei})};this._queueCallback(ni,this._element,!0)}hide(){if(!this._isShown||wi.trigger(this._element,fv).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Uu),this._backdrop.hide();let ti=()=>{this._element.classList.remove(qu,Uu),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new ia().reset(),wi.trigger(this._element,Cd)};this._queueCallback(ti,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){let ei=()=>{if(this._config.backdrop==="static"){wi.trigger(this._element,Yu);return}this.hide()},ti=!!this._config.backdrop;return new Qa({className:cv,isVisible:ti,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:ti?ei:null})}_initializeFocusTrap(){return new Ja({trapElement:this._element})}_addEventListeners(){wi.on(this._element,mv,ei=>{if(ei.key===lv){if(this._config.keyboard){this.hide();return}wi.trigger(this._element,Yu)}})}static jQueryInterface(ei){return this.each(function(){let ti=ii.getOrCreateInstance(this,ei);if(typeof ei=="string"){if(ti[ei]===void 0||ei.startsWith("_")||ei==="constructor")throw new TypeError(`No method named "${ei}"`);ti[ei](this)}})}};wi.on(document,pv,gv,function(ii){let ei=Wi.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&ii.preventDefault(),Do(this))return;wi.one(ei,Cd,()=>{As(this)&&this.focus()});let ti=Wi.findOne(Sd);ti&&ti!==ei&&Mo.getInstance(ti).hide(),Mo.getOrCreateInstance(ei).toggle(this)});wi.on(window,av,()=>{for(let ii of Wi.find(Sd))Mo.getOrCreateInstance(ii).show()});wi.on(window,hv,()=>{for(let ii of Wi.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(ii).position!=="fixed"&&Mo.getOrCreateInstance(ii).hide()});el(Mo);Qr(Mo);var bv=/^aria-[\w-]*$/i,Ad={"*":["class","dir","id","lang","role",bv],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},_v=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Ev=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,wv=(ii,ei)=>{let ti=ii.nodeName.toLowerCase();return ei.includes(ti)?_v.has(ti)?!!Ev.test(ii.nodeValue):!0:ei.filter(ni=>ni instanceof RegExp).some(ni=>ni.test(ti))};function xv(ii,ei,ti){if(!ii.length)return ii;if(ti&&typeof ti=="function")return ti(ii);let ri=new window.DOMParser().parseFromString(ii,"text/html"),oi=[].concat(...ri.body.querySelectorAll("*"));for(let si of oi){let ai=si.nodeName.toLowerCase();if(!Object.keys(ei).includes(ai)){si.remove();continue}let li=[].concat(...si.attributes),ui=[].concat(ei["*"]||[],ei[ai]||[]);for(let ci of li)wv(ci,ui)||si.removeAttribute(ci.nodeName)}return ri.body.innerHTML}var Tv="TemplateFactory",Sv={allowList:Ad,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Cv={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Av={entry:"(string|element|function|null)",selector:"(string|element)"},yc=class extends es{constructor(ei){super(),this._config=this._getConfig(ei)}static get Default(){return Sv}static get DefaultType(){return Cv}static get NAME(){return Tv}getContent(){return Object.values(this._config.content).map(ei=>this._resolvePossibleFunction(ei)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(ei){return this._checkContent(ei),this._config.content=Di(Di({},this._config.content),ei),this}toHtml(){let ei=document.createElement("div");ei.innerHTML=this._maybeSanitize(this._config.template);for(let[ri,oi]of Object.entries(this._config.content))this._setContent(ei,oi,ri);let ti=ei.children[0],ni=this._resolvePossibleFunction(this._config.extraClass);return ni&&ti.classList.add(...ni.split(" ")),ti}_typeCheckConfig(ei){super._typeCheckConfig(ei),this._checkContent(ei.content)}_checkContent(ei){for(let[ti,ni]of Object.entries(ei))super._typeCheckConfig({selector:ti,entry:ni},Av)}_setContent(ei,ti,ni){let ri=Wi.findOne(ni,ei);if(ri){if(ti=this._resolvePossibleFunction(ti),!ti){ri.remove();return}if(po(ti)){this._putElementInTemplate(Ao(ti),ri);return}if(this._config.html){ri.innerHTML=this._maybeSanitize(ti);return}ri.textContent=ti}}_maybeSanitize(ei){return this._config.sanitize?xv(ei,this._config.allowList,this._config.sanitizeFn):ei}_resolvePossibleFunction(ei){return Vn(ei,[this])}_putElementInTemplate(ei,ti){if(this._config.html){ti.innerHTML="",ti.append(ei);return}ti.textContent=ei.textContent}},Dv="tooltip",Ov=new Set(["sanitize","allowList","sanitizeFn"]),lc="fade",Lv="modal",za="show",Mv=".tooltip-inner",Gu=`.${Lv}`,Ku="hide.bs.modal",ea="hover",cc="focus",kv="click",Nv="manual",Rv="hide",Iv="hidden",Hv="show",Pv="shown",Fv="inserted",$v="click",Bv="focusin",zv="focusout",Vv="mouseenter",jv="mouseleave",qv={AUTO:"auto",TOP:"top",RIGHT:Gr()?"left":"right",BOTTOM:"bottom",LEFT:Gr()?"right":"left"},Wv={allowList:Ad,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},Uv={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"},go=class ii extends Qn{constructor(ei,ti){if(typeof Pa=="undefined")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(ei,ti),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Wv}static get DefaultType(){return Uv}static get NAME(){return Dv}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),wi.off(this._element.closest(Gu),Ku,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;let ei=wi.trigger(this._element,this.constructor.eventName(Hv)),ni=(od(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(ei.defaultPrevented||!ni)return;this._disposePopper();let ri=this._getTipElement();this._element.setAttribute("aria-describedby",ri.getAttribute("id"));let{container:oi}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(oi.append(ri),wi.trigger(this._element,this.constructor.eventName(Fv))),this._popper=this._createPopper(ri),ri.classList.add(za),"ontouchstart"in document.documentElement)for(let ai of[].concat(...document.body.children))wi.on(ai,"mouseover",Ua);let si=()=>{wi.trigger(this._element,this.constructor.eventName(Pv)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(si,this.tip,this._isAnimated())}hide(){if(!this._isShown()||wi.trigger(this._element,this.constructor.eventName(Rv)).defaultPrevented)return;if(this._getTipElement().classList.remove(za),"ontouchstart"in document.documentElement)for(let ri of[].concat(...document.body.children))wi.off(ri,"mouseover",Ua);this._activeTrigger[kv]=!1,this._activeTrigger[cc]=!1,this._activeTrigger[ea]=!1,this._isHovered=null;let ni=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),wi.trigger(this._element,this.constructor.eventName(Iv)))};this._queueCallback(ni,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(ei){let ti=this._getTemplateFactory(ei).toHtml();if(!ti)return null;ti.classList.remove(lc,za),ti.classList.add(`bs-${this.constructor.NAME}-auto`);let ni=Np(this.constructor.NAME).toString();return ti.setAttribute("id",ni),this._isAnimated()&&ti.classList.add(lc),ti}setContent(ei){this._newContent=ei,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(ei){return this._templateFactory?this._templateFactory.changeContent(ei):this._templateFactory=new yc(sn(Di({},this._config),{content:ei,extraClass:this._resolvePossibleFunction(this._config.customClass)})),this._templateFactory}_getContentForTemplate(){return{[Mv]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(ei){return this.constructor.getOrCreateInstance(ei.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(lc)}_isShown(){return this.tip&&this.tip.classList.contains(za)}_createPopper(ei){let ti=Vn(this._config.placement,[this,ei,this._element]),ni=qv[ti.toUpperCase()];return Js(this._element,ei,this._getPopperConfig(ni))}_getOffset(){let{offset:ei}=this._config;return typeof ei=="string"?ei.split(",").map(ti=>Number.parseInt(ti,10)):typeof ei=="function"?ti=>ei(ti,this._element):ei}_resolvePossibleFunction(ei){return Vn(ei,[this._element])}_getPopperConfig(ei){let ti={placement:ei,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:ni=>{this._getTipElement().setAttribute("data-popper-placement",ni.state.placement)}}]};return Di(Di({},ti),Vn(this._config.popperConfig,[ti]))}_setListeners(){let ei=this._config.trigger.split(" ");for(let ti of ei)if(ti==="click")wi.on(this._element,this.constructor.eventName($v),this._config.selector,ni=>{this._initializeOnDelegatedTarget(ni).toggle()});else if(ti!==Nv){let ni=ti===ea?this.constructor.eventName(Vv):this.constructor.eventName(Bv),ri=ti===ea?this.constructor.eventName(jv):this.constructor.eventName(zv);wi.on(this._element,ni,this._config.selector,oi=>{let si=this._initializeOnDelegatedTarget(oi);si._activeTrigger[oi.type==="focusin"?cc:ea]=!0,si._enter()}),wi.on(this._element,ri,this._config.selector,oi=>{let si=this._initializeOnDelegatedTarget(oi);si._activeTrigger[oi.type==="focusout"?cc:ea]=si._element.contains(oi.relatedTarget),si._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},wi.on(this._element.closest(Gu),Ku,this._hideModalHandler)}_fixTitle(){let ei=this._element.getAttribute("title");ei&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",ei),this._element.setAttribute("data-bs-original-title",ei),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(ei,ti){clearTimeout(this._timeout),this._timeout=setTimeout(ei,ti)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(ei){let ti=mo.getDataAttributes(this._element);for(let ni of Object.keys(ti))Ov.has(ni)&&delete ti[ni];return ei=Di(Di({},ti),typeof ei=="object"&&ei?ei:{}),ei=this._mergeConfigObj(ei),ei=this._configAfterMerge(ei),this._typeCheckConfig(ei),ei}_configAfterMerge(ei){return ei.container=ei.container===!1?document.body:Ao(ei.container),typeof ei.delay=="number"&&(ei.delay={show:ei.delay,hide:ei.delay}),typeof ei.title=="number"&&(ei.title=ei.title.toString()),typeof ei.content=="number"&&(ei.content=ei.content.toString()),ei}_getDelegateConfig(){let ei={};for(let[ti,ni]of Object.entries(this._config))this.constructor.Default[ti]!==ni&&(ei[ti]=ni);return ei.selector=!1,ei.trigger="manual",ei}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(ei){return this.each(function(){let ti=ii.getOrCreateInstance(this,ei);if(typeof ei=="string"){if(typeof ti[ei]=="undefined")throw new TypeError(`No method named "${ei}"`);ti[ei]()}})}};Qr(go);var Yv="popover",Gv=".popover-header",Kv=".popover-body",Qv=sn(Di({},go.Default),{content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"}),Xv=sn(Di({},go.DefaultType),{content:"(null|string|element|function)"}),Cs=class ii extends go{static get Default(){return Qv}static get DefaultType(){return Xv}static get NAME(){return Yv}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Gv]:this._getTitle(),[Kv]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(ei){return this.each(function(){let ti=ii.getOrCreateInstance(this,ei);if(typeof ei=="string"){if(typeof ti[ei]=="undefined")throw new TypeError(`No method named "${ei}"`);ti[ei]()}})}};Qr(Cs);var Jv="scrollspy",Zv="bs.scrollspy",wc=`.${Zv}`,ey=".data-api",ty=`activate${wc}`,Qu=`click${wc}`,iy=`load${wc}${ey}`,ny="dropdown-item",ws="active",ry='[data-bs-spy="scroll"]',uc="[href]",oy=".nav, .list-group",Xu=".nav-link",sy=".nav-item",ay=".list-group-item",ly=`${Xu}, ${sy} > ${Xu}, ${ay}`,cy=".dropdown",uy=".dropdown-toggle",dy={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},fy={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"},Za=class ii extends Qn{constructor(ei,ti){super(ei,ti),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return dy}static get DefaultType(){return fy}static get NAME(){return Jv}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(let ei of this._observableSections.values())this._observer.observe(ei)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(ei){return ei.target=Ao(ei.target)||document.body,ei.rootMargin=ei.offset?`${ei.offset}px 0px -30%`:ei.rootMargin,typeof ei.threshold=="string"&&(ei.threshold=ei.threshold.split(",").map(ti=>Number.parseFloat(ti))),ei}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(wi.off(this._config.target,Qu),wi.on(this._config.target,Qu,uc,ei=>{let ti=this._observableSections.get(ei.target.hash);if(ti){ei.preventDefault();let ni=this._rootElement||window,ri=ti.offsetTop-this._element.offsetTop;if(ni.scrollTo){ni.scrollTo({top:ri,behavior:"smooth"});return}ni.scrollTop=ri}}))}_getNewObserver(){let ei={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(ti=>this._observerCallback(ti),ei)}_observerCallback(ei){let ti=si=>this._targetLinks.get(`#${si.target.id}`),ni=si=>{this._previousScrollData.visibleEntryTop=si.target.offsetTop,this._process(ti(si))},ri=(this._rootElement||document.documentElement).scrollTop,oi=ri>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=ri;for(let si of ei){if(!si.isIntersecting){this._activeTarget=null,this._clearActiveClass(ti(si));continue}let ai=si.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(oi&&ai){if(ni(si),!ri)return;continue}!oi&&!ai&&ni(si)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;let ei=Wi.find(uc,this._config.target);for(let ti of ei){if(!ti.hash||Do(ti))continue;let ni=Wi.findOne(decodeURI(ti.hash),this._element);As(ni)&&(this._targetLinks.set(decodeURI(ti.hash),ti),this._observableSections.set(ti.hash,ni))}}_process(ei){this._activeTarget!==ei&&(this._clearActiveClass(this._config.target),this._activeTarget=ei,ei.classList.add(ws),this._activateParents(ei),wi.trigger(this._element,ty,{relatedTarget:ei}))}_activateParents(ei){if(ei.classList.contains(ny)){Wi.findOne(uy,ei.closest(cy)).classList.add(ws);return}for(let ti of Wi.parents(ei,oy))for(let ni of Wi.prev(ti,ly))ni.classList.add(ws)}_clearActiveClass(ei){ei.classList.remove(ws);let ti=Wi.find(`${uc}.${ws}`,ei);for(let ni of ti)ni.classList.remove(ws)}static jQueryInterface(ei){return this.each(function(){let ti=ii.getOrCreateInstance(this,ei);if(typeof ei=="string"){if(ti[ei]===void 0||ei.startsWith("_")||ei==="constructor")throw new TypeError(`No method named "${ei}"`);ti[ei]()}})}};wi.on(window,iy,()=>{for(let ii of Wi.find(ry))Za.getOrCreateInstance(ii)});Qr(Za);var hy="tab",py="bs.tab",ns=`.${py}`,my=`hide${ns}`,gy=`hidden${ns}`,vy=`show${ns}`,yy=`shown${ns}`,by=`click${ns}`,_y=`keydown${ns}`,Ey=`load${ns}`,wy="ArrowLeft",Ju="ArrowRight",xy="ArrowUp",Zu="ArrowDown",dc="Home",ed="End",Zo="active",td="fade",fc="show",Ty="dropdown",Dd=".dropdown-toggle",Sy=".dropdown-menu",hc=`:not(${Dd})`,Cy='.list-group, .nav, [role="tablist"]',Ay=".nav-item, .list-group-item",Dy=`.nav-link${hc}, .list-group-item${hc}, [role="tab"]${hc}`,Od='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',pc=`${Dy}, ${Od}`,Oy=`.${Zo}[data-bs-toggle="tab"], .${Zo}[data-bs-toggle="pill"], .${Zo}[data-bs-toggle="list"]`,ts=class ii extends Qn{constructor(ei){super(ei),this._parent=this._element.closest(Cy),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),wi.on(this._element,_y,ti=>this._keydown(ti)))}static get NAME(){return hy}show(){let ei=this._element;if(this._elemIsActive(ei))return;let ti=this._getActiveElem(),ni=ti?wi.trigger(ti,my,{relatedTarget:ei}):null;wi.trigger(ei,vy,{relatedTarget:ti}).defaultPrevented||ni&&ni.defaultPrevented||(this._deactivate(ti,ei),this._activate(ei,ti))}_activate(ei,ti){if(!ei)return;ei.classList.add(Zo),this._activate(Wi.getElementFromSelector(ei));let ni=()=>{if(ei.getAttribute("role")!=="tab"){ei.classList.add(fc);return}ei.removeAttribute("tabindex"),ei.setAttribute("aria-selected",!0),this._toggleDropDown(ei,!0),wi.trigger(ei,yy,{relatedTarget:ti})};this._queueCallback(ni,ei,ei.classList.contains(td))}_deactivate(ei,ti){if(!ei)return;ei.classList.remove(Zo),ei.blur(),this._deactivate(Wi.getElementFromSelector(ei));let ni=()=>{if(ei.getAttribute("role")!=="tab"){ei.classList.remove(fc);return}ei.setAttribute("aria-selected",!1),ei.setAttribute("tabindex","-1"),this._toggleDropDown(ei,!1),wi.trigger(ei,gy,{relatedTarget:ti})};this._queueCallback(ni,ei,ei.classList.contains(td))}_keydown(ei){if(![wy,Ju,xy,Zu,dc,ed].includes(ei.key))return;ei.stopPropagation(),ei.preventDefault();let ti=this._getChildren().filter(ri=>!Do(ri)),ni;if([dc,ed].includes(ei.key))ni=ti[ei.key===dc?0:ti.length-1];else{let ri=[Ju,Zu].includes(ei.key);ni=bc(ti,ei.target,ri,!0)}ni&&(ni.focus({preventScroll:!0}),ii.getOrCreateInstance(ni).show())}_getChildren(){return Wi.find(pc,this._parent)}_getActiveElem(){return this._getChildren().find(ei=>this._elemIsActive(ei))||null}_setInitialAttributes(ei,ti){this._setAttributeIfNotExists(ei,"role","tablist");for(let ni of ti)this._setInitialAttributesOnChild(ni)}_setInitialAttributesOnChild(ei){ei=this._getInnerElement(ei);let ti=this._elemIsActive(ei),ni=this._getOuterElement(ei);ei.setAttribute("aria-selected",ti),ni!==ei&&this._setAttributeIfNotExists(ni,"role","presentation"),ti||ei.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(ei,"role","tab"),this._setInitialAttributesOnTargetPanel(ei)}_setInitialAttributesOnTargetPanel(ei){let ti=Wi.getElementFromSelector(ei);ti&&(this._setAttributeIfNotExists(ti,"role","tabpanel"),ei.id&&this._setAttributeIfNotExists(ti,"aria-labelledby",`${ei.id}`))}_toggleDropDown(ei,ti){let ni=this._getOuterElement(ei);if(!ni.classList.contains(Ty))return;let ri=(oi,si)=>{let ai=Wi.findOne(oi,ni);ai&&ai.classList.toggle(si,ti)};ri(Dd,Zo),ri(Sy,fc),ni.setAttribute("aria-expanded",ti)}_setAttributeIfNotExists(ei,ti,ni){ei.hasAttribute(ti)||ei.setAttribute(ti,ni)}_elemIsActive(ei){return ei.classList.contains(Zo)}_getInnerElement(ei){return ei.matches(pc)?ei:Wi.findOne(pc,ei)}_getOuterElement(ei){return ei.closest(Ay)||ei}static jQueryInterface(ei){return this.each(function(){let ti=ii.getOrCreateInstance(this);if(typeof ei=="string"){if(ti[ei]===void 0||ei.startsWith("_")||ei==="constructor")throw new TypeError(`No method named "${ei}"`);ti[ei]()}})}};wi.on(document,by,Od,function(ii){["A","AREA"].includes(this.tagName)&&ii.preventDefault(),!Do(this)&&ts.getOrCreateInstance(this).show()});wi.on(window,Ey,()=>{for(let ii of Wi.find(Oy))ts.getOrCreateInstance(ii)});Qr(ts);var Ly="toast",My="bs.toast",No=`.${My}`,ky=`mouseover${No}`,Ny=`mouseout${No}`,Ry=`focusin${No}`,Iy=`focusout${No}`,Hy=`hide${No}`,Py=`hidden${No}`,Fy=`show${No}`,$y=`shown${No}`,By="fade",id="hide",Va="show",ja="showing",zy={animation:"boolean",autohide:"boolean",delay:"number"},Vy={animation:!0,autohide:!0,delay:5e3},vo=class ii extends Qn{constructor(ei,ti){super(ei,ti),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Vy}static get DefaultType(){return zy}static get NAME(){return Ly}show(){if(wi.trigger(this._element,Fy).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(By);let ti=()=>{this._element.classList.remove(ja),wi.trigger(this._element,$y),this._maybeScheduleHide()};this._element.classList.remove(id),na(this._element),this._element.classList.add(Va,ja),this._queueCallback(ti,this._element,this._config.animation)}hide(){if(!this.isShown()||wi.trigger(this._element,Hy).defaultPrevented)return;let ti=()=>{this._element.classList.add(id),this._element.classList.remove(ja,Va),wi.trigger(this._element,Py)};this._element.classList.add(ja),this._queueCallback(ti,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Va),super.dispose()}isShown(){return this._element.classList.contains(Va)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(ei,ti){switch(ei.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=ti;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=ti;break}}if(ti){this._clearTimeout();return}let ni=ei.relatedTarget;this._element===ni||this._element.contains(ni)||this._maybeScheduleHide()}_setListeners(){wi.on(this._element,ky,ei=>this._onInteraction(ei,!0)),wi.on(this._element,Ny,ei=>this._onInteraction(ei,!1)),wi.on(this._element,Ry,ei=>this._onInteraction(ei,!0)),wi.on(this._element,Iy,ei=>this._onInteraction(ei,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(ei){return this.each(function(){let ti=ii.getOrCreateInstance(this,ei);if(typeof ei=="string"){if(typeof ti[ei]=="undefined")throw new TypeError(`No method named "${ei}"`);ti[ei](this)}})}};el(vo);Qr(vo);var FL=cu(Ld());function xc(ii,ei){ii.split(/\s+/).forEach(ti=>{ei(ti)})}var oa=class{constructor(){this._events={}}on(ei,ti){xc(ei,ni=>{let ri=this._events[ni]||[];ri.push(ti),this._events[ni]=ri})}off(ei,ti){var ni=arguments.length;if(ni===0){this._events={};return}xc(ei,ri=>{if(ni===1){delete this._events[ri];return}let oi=this._events[ri];oi!==void 0&&(oi.splice(oi.indexOf(ti),1),this._events[ri]=oi)})}trigger(ei,...ti){var ni=this;xc(ei,ri=>{let oi=ni._events[ri];oi!==void 0&&oi.forEach(si=>{si.apply(ni,ti)})})}};function Tc(ii){return ii.plugins={},class extends ii{constructor(){super(...arguments),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(ei,ti){ii.plugins[ei]={name:ei,fn:ti}}initializePlugins(ei){var ti,ni;let ri=this,oi=[];if(Array.isArray(ei))ei.forEach(si=>{typeof si=="string"?oi.push(si):(ri.plugins.settings[si.name]=si.options,oi.push(si.name))});else if(ei)for(ti in ei)ei.hasOwnProperty(ti)&&(ri.plugins.settings[ti]=ei[ti],oi.push(ti));for(;ni=oi.shift();)ri.require(ni)}loadPlugin(ei){var ti=this,ni=ti.plugins,ri=ii.plugins[ei];if(!ii.plugins.hasOwnProperty(ei))throw new Error('Unable to find "'+ei+'" plugin');ni.requested[ei]=!0,ni.loaded[ei]=ri.fn.apply(ti,[ti.plugins.settings[ei]||{}]),ni.names.push(ei)}require(ei){var ti=this,ni=ti.plugins;if(!ti.plugins.loaded.hasOwnProperty(ei)){if(ni.requested[ei])throw new Error('Plugin has circular dependency ("'+ei+'")');ti.loadPlugin(ei)}return ni.loaded[ei]}}}var sa=ii=>(ii=ii.filter(Boolean),ii.length<2?ii[0]||"":qy(ii)==1?"["+ii.join("")+"]":"(?:"+ii.join("|")+")"),Sc=ii=>{if(!jy(ii))return ii.join("");let ei="",ti=0,ni=()=>{ti>1&&(ei+="{"+ti+"}")};return ii.forEach((ri,oi)=>{if(ri===ii[oi-1]){ti++;return}ni(),ei+=ri,ti=1}),ni(),ei},Cc=ii=>{let ei=Array.from(ii);return sa(ei)},jy=ii=>new Set(ii).size!==ii.length,Ro=ii=>(ii+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),qy=ii=>ii.reduce((ei,ti)=>Math.max(ei,Wy(ti)),0),Wy=ii=>Array.from(ii).length;var Ac=ii=>{if(ii.length===1)return[[ii]];let ei=[],ti=ii.substring(1);return Ac(ti).forEach(function(ri){let oi=ri.slice(0);oi[0]=ii.charAt(0)+oi[0],ei.push(oi),oi=ri.slice(0),oi.unshift(ii.charAt(0)),ei.push(oi)}),ei};var Uy=[[0,65535]],Yy="[\u0300-\u036F\xB7\u02BE\u02BC]",tl,Rd,Gy=3,Dc={},Md={"/":"\u2044\u2215",0:"\u07C0",a:"\u2C65\u0250\u0251",aa:"\uA733",ae:"\xE6\u01FD\u01E3",ao:"\uA735",au:"\uA737",av:"\uA739\uA73B",ay:"\uA73D",b:"\u0180\u0253\u0183",c:"\uA73F\u0188\u023C\u2184",d:"\u0111\u0257\u0256\u1D05\u018C\uABB7\u0501\u0266",e:"\u025B\u01DD\u1D07\u0247",f:"\uA77C\u0192",g:"\u01E5\u0260\uA7A1\u1D79\uA77F\u0262",h:"\u0127\u2C68\u2C76\u0265",i:"\u0268\u0131",j:"\u0249\u0237",k:"\u0199\u2C6A\uA741\uA743\uA745\uA7A3",l:"\u0142\u019A\u026B\u2C61\uA749\uA747\uA781\u026D",m:"\u0271\u026F\u03FB",n:"\uA7A5\u019E\u0272\uA791\u1D0E\u043B\u0509",o:"\xF8\u01FF\u0254\u0275\uA74B\uA74D\u1D11",oe:"\u0153",oi:"\u01A3",oo:"\uA74F",ou:"\u0223",p:"\u01A5\u1D7D\uA751\uA753\uA755\u03C1",q:"\uA757\uA759\u024B",r:"\u024D\u027D\uA75B\uA7A7\uA783",s:"\xDF\u023F\uA7A9\uA785\u0282",t:"\u0167\u01AD\u0288\u2C66\uA787",th:"\xFE",tz:"\uA729",u:"\u0289",v:"\u028B\uA75F\u028C",vy:"\uA761",w:"\u2C73",y:"\u01B4\u024F\u1EFF",z:"\u01B6\u0225\u0240\u2C6C\uA763",hv:"\u0195"};for(let ii in Md){let ei=Md[ii]||"";for(let ti=0;ti<ei.length;ti++){let ni=ei.substring(ti,ti+1);Dc[ni]=ii}}var Ky=new RegExp(Object.keys(Dc).join("|")+"|"+Yy,"gu"),Qy=ii=>{tl===void 0&&(tl=eb(ii||Uy))},kd=(ii,ei="NFKD")=>ii.normalize(ei),aa=ii=>Array.from(ii).reduce((ei,ti)=>ei+Xy(ti),""),Xy=ii=>(ii=kd(ii).toLowerCase().replace(Ky,ei=>Dc[ei]||""),kd(ii,"NFC"));function*Jy(ii){for(let[ei,ti]of ii)for(let ni=ei;ni<=ti;ni++){let ri=String.fromCharCode(ni),oi=aa(ri);oi!=ri.toLowerCase()&&(oi.length>Gy||oi.length!=0&&(yield{folded:oi,composed:ri,code_point:ni}))}}var Zy=ii=>{let ei={},ti=(ni,ri)=>{let oi=ei[ni]||new Set,si=new RegExp("^"+Cc(oi)+"$","iu");ri.match(si)||(oi.add(Ro(ri)),ei[ni]=oi)};for(let ni of Jy(ii))ti(ni.folded,ni.folded),ti(ni.folded,ni.composed);return ei},eb=ii=>{let ei=Zy(ii),ti={},ni=[];for(let oi in ei){let si=ei[oi];si&&(ti[oi]=Cc(si)),oi.length>1&&ni.push(Ro(oi))}ni.sort((oi,si)=>si.length-oi.length);let ri=sa(ni);return Rd=new RegExp("^"+ri,"u"),ti},tb=(ii,ei=1)=>{let ti=0;return ii=ii.map(ni=>(tl[ni]&&(ti+=ni.length),tl[ni]||ni)),ti>=ei?Sc(ii):""},ib=(ii,ei=1)=>(ei=Math.max(ei,ii.length-1),sa(Ac(ii).map(ti=>tb(ti,ei)))),Nd=(ii,ei=!0)=>{let ti=ii.length>1?1:0;return sa(ii.map(ni=>{let ri=[],oi=ei?ni.length():ni.length()-1;for(let si=0;si<oi;si++)ri.push(ib(ni.substrs[si]||"",ti));return Sc(ri)}))},nb=(ii,ei)=>{for(let ti of ei){if(ti.start!=ii.start||ti.end!=ii.end||ti.substrs.join("")!==ii.substrs.join(""))continue;let ni=ii.parts,ri=si=>{for(let ai of ni){if(ai.start===si.start&&ai.substr===si.substr)return!1;if(!(si.length==1||ai.length==1)&&(si.start<ai.start&&si.end>ai.start||ai.start<si.start&&ai.end>si.start))return!0}return!1};if(!(ti.parts.filter(ri).length>0))return!0}return!1},il=class ii{constructor(){en(this,"parts");en(this,"substrs");en(this,"start");en(this,"end");this.parts=[],this.substrs=[],this.start=0,this.end=0}add(ei){ei&&(this.parts.push(ei),this.substrs.push(ei.substr),this.start=Math.min(ei.start,this.start),this.end=Math.max(ei.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(ei,ti){let ni=new ii,ri=JSON.parse(JSON.stringify(this.parts)),oi=ri.pop();for(let li of ri)ni.add(li);let si=ti.substr.substring(0,ei-oi.start),ai=si.length;return ni.add({start:oi.start,end:oi.start+ai,length:ai,substr:si}),ni}},Id=ii=>{Qy(),ii=aa(ii);let ei="",ti=[new il];for(let ni=0;ni<ii.length;ni++){let oi=ii.substring(ni).match(Rd),si=ii.substring(ni,ni+1),ai=oi?oi[0]:null,li=[],ui=new Set;for(let ci of ti){let di=ci.last();if(!di||di.length==1||di.end<=ni)if(ai){let pi=ai.length;ci.add({start:ni,end:ni+pi,length:pi,substr:ai}),ui.add("1")}else ci.add({start:ni,end:ni+1,length:1,substr:si}),ui.add("2");else if(ai){let pi=ci.clone(ni,di),yi=ai.length;pi.add({start:ni,end:ni+yi,length:yi,substr:ai}),li.push(pi)}else ui.add("3")}if(li.length>0){li=li.sort((ci,di)=>ci.length()-di.length());for(let ci of li)nb(ci,ti)||ti.push(ci);continue}if(ni>0&&ui.size==1&&!ui.has("3")){ei+=Nd(ti,!1);let ci=new il,di=ti[0];di&&ci.add(di.last()),ti=[ci]}}return ei+=Nd(ti,!0),ei};var Hd=(ii,ei)=>{if(ii)return ii[ei]},Pd=(ii,ei)=>{if(ii){for(var ti,ni=ei.split(".");(ti=ni.shift())&&(ii=ii[ti]););return ii}},nl=(ii,ei,ti)=>{var ni,ri;return!ii||(ii=ii+"",ei.regex==null)||(ri=ii.search(ei.regex),ri===-1)?0:(ni=ei.string.length/ii.length,ri===0&&(ni+=.5),ni*ti)},rl=(ii,ei)=>{var ti=ii[ei];if(typeof ti=="function")return ti;ti&&!Array.isArray(ti)&&(ii[ei]=[ti])},la=(ii,ei)=>{if(Array.isArray(ii))ii.forEach(ei);else for(var ti in ii)ii.hasOwnProperty(ti)&&ei(ii[ti],ti)},Fd=(ii,ei)=>typeof ii=="number"&&typeof ei=="number"?ii>ei?1:ii<ei?-1:0:(ii=aa(ii+"").toLowerCase(),ei=aa(ei+"").toLowerCase(),ii>ei?1:ei>ii?-1:0);var ol=class{constructor(ei,ti){en(this,"items");en(this,"settings");this.items=ei,this.settings=ti||{diacritics:!0}}tokenize(ei,ti,ni){if(!ei||!ei.length)return[];let ri=[],oi=ei.split(/\s+/);var si;return ni&&(si=new RegExp("^("+Object.keys(ni).map(Ro).join("|")+"):(.*)$")),oi.forEach(ai=>{let li,ui=null,ci=null;si&&(li=ai.match(si))&&(ui=li[1],ai=li[2]),ai.length>0&&(this.settings.diacritics?ci=Id(ai)||null:ci=Ro(ai),ci&&ti&&(ci="\\b"+ci)),ri.push({string:ai,regex:ci?new RegExp(ci,"iu"):null,field:ui})}),ri}getScoreFunction(ei,ti){var ni=this.prepareSearch(ei,ti);return this._getScoreFunction(ni)}_getScoreFunction(ei){let ti=ei.tokens,ni=ti.length;if(!ni)return function(){return 0};let ri=ei.options.fields,oi=ei.weights,si=ri.length,ai=ei.getAttrFn;if(!si)return function(){return 1};let li=function(){return si===1?function(ui,ci){let di=ri[0].field;return nl(ai(ci,di),ui,oi[di]||1)}:function(ui,ci){var di=0;if(ui.field){let pi=ai(ci,ui.field);!ui.regex&&pi?di+=1/si:di+=nl(pi,ui,1)}else la(oi,(pi,yi)=>{di+=nl(ai(ci,yi),ui,pi)});return di/si}}();return ni===1?function(ui){return li(ti[0],ui)}:ei.options.conjunction==="and"?function(ui){var ci,di=0;for(let pi of ti){if(ci=li(pi,ui),ci<=0)return 0;di+=ci}return di/ni}:function(ui){var ci=0;return la(ti,di=>{ci+=li(di,ui)}),ci/ni}}getSortFunction(ei,ti){var ni=this.prepareSearch(ei,ti);return this._getSortFunction(ni)}_getSortFunction(ei){var ti,ni=[];let ri=this,oi=ei.options,si=!ei.query&&oi.sort_empty?oi.sort_empty:oi.sort;if(typeof si=="function")return si.bind(this);let ai=function(ui,ci){return ui==="$score"?ci.score:ei.getAttrFn(ri.items[ci.id],ui)};if(si)for(let ui of si)(ei.query||ui.field!=="$score")&&ni.push(ui);if(ei.query){ti=!0;for(let ui of ni)if(ui.field==="$score"){ti=!1;break}ti&&ni.unshift({field:"$score",direction:"desc"})}else ni=ni.filter(ui=>ui.field!=="$score");return ni.length?function(ui,ci){var di,pi;for(let yi of ni)if(pi=yi.field,di=(yi.direction==="desc"?-1:1)*Fd(ai(pi,ui),ai(pi,ci)),di)return di;return 0}:null}prepareSearch(ei,ti){let ni={};var ri=Object.assign({},ti);if(rl(ri,"sort"),rl(ri,"sort_empty"),ri.fields){rl(ri,"fields");let oi=[];ri.fields.forEach(si=>{typeof si=="string"&&(si={field:si,weight:1}),oi.push(si),ni[si.field]="weight"in si?si.weight:1}),ri.fields=oi}return{options:ri,query:ei.toLowerCase().trim(),tokens:this.tokenize(ei,ri.respect_word_boundaries,ni),total:0,items:[],weights:ni,getAttrFn:ri.nesting?Pd:Hd}}search(ei,ti){var ni=this,ri,oi;oi=this.prepareSearch(ei,ti),ti=oi.options,ei=oi.query;let si=ti.score||ni._getScoreFunction(oi);ei.length?la(ni.items,(li,ui)=>{ri=si(li),(ti.filter===!1||ri>0)&&oi.items.push({score:ri,id:ui})}):la(ni.items,(li,ui)=>{oi.items.push({score:1,id:ui})});let ai=ni._getSortFunction(oi);return ai&&oi.items.sort(ai),oi.total=oi.items.length,typeof ti.limit=="number"&&(oi.items=oi.items.slice(0,ti.limit)),oi}};var Xn=ii=>typeof ii=="undefined"||ii===null?null:ca(ii),ca=ii=>typeof ii=="boolean"?ii?"1":"0":ii+"",sl=ii=>(ii+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),$d=(ii,ei)=>ei>0?window.setTimeout(ii,ei):(ii.call(null),null),Bd=(ii,ei)=>{var ti;return function(ni,ri){var oi=this;ti&&(oi.loading=Math.max(oi.loading-1,0),clearTimeout(ti)),ti=setTimeout(function(){ti=null,oi.loadedSearches[ni]=!0,ii.call(oi,ni,ri)},ei)}},Oc=(ii,ei,ti)=>{var ni,ri=ii.trigger,oi={};ii.trigger=function(){var si=arguments[0];if(ei.indexOf(si)!==-1)oi[si]=arguments;else return ri.apply(ii,arguments)},ti.apply(ii,[]),ii.trigger=ri;for(ni of ei)ni in oi&&ri.apply(ii,oi[ni])},zd=ii=>({start:ii.selectionStart||0,length:(ii.selectionEnd||0)-(ii.selectionStart||0)}),fn=(ii,ei=!1)=>{ii&&(ii.preventDefault(),ei&&ii.stopPropagation())},Nn=(ii,ei,ti,ni)=>{ii.addEventListener(ei,ti,ni)},Io=(ii,ei)=>{if(!ei||!ei[ii])return!1;var ti=(ei.altKey?1:0)+(ei.ctrlKey?1:0)+(ei.shiftKey?1:0)+(ei.metaKey?1:0);return ti===1},al=(ii,ei)=>{let ti=ii.getAttribute("id");return ti||(ii.setAttribute("id",ei),ei)},Lc=ii=>ii.replace(/[\\"']/g,"\\$&"),Ho=(ii,ei)=>{ei&&ii.append(ei)},En=(ii,ei)=>{if(Array.isArray(ii))ii.forEach(ei);else for(var ti in ii)ii.hasOwnProperty(ti)&&ei(ii[ti],ti)};var no=ii=>{if(ii.jquery)return ii[0];if(ii instanceof HTMLElement)return ii;if(Mc(ii)){var ei=document.createElement("template");return ei.innerHTML=ii.trim(),ei.content.firstChild}return document.querySelector(ii)},Mc=ii=>typeof ii=="string"&&ii.indexOf("<")>-1,Vd=ii=>ii.replace(/['"\\]/g,"\\$&"),ll=(ii,ei)=>{var ti=document.createEvent("HTMLEvents");ti.initEvent(ei,!0,!1),ii.dispatchEvent(ti)},ua=(ii,ei)=>{Object.assign(ii.style,ei)},jn=(ii,...ei)=>{var ti=jd(ei);ii=qd(ii),ii.map(ni=>{ti.map(ri=>{ni.classList.add(ri)})})},bo=(ii,...ei)=>{var ti=jd(ei);ii=qd(ii),ii.map(ni=>{ti.map(ri=>{ni.classList.remove(ri)})})},jd=ii=>{var ei=[];return En(ii,ti=>{typeof ti=="string"&&(ti=ti.trim().split(/[\t\n\f\r\s]/)),Array.isArray(ti)&&(ei=ei.concat(ti))}),ei.filter(Boolean)},qd=ii=>(Array.isArray(ii)||(ii=[ii]),ii),cl=(ii,ei,ti)=>{if(!(ti&&!ti.contains(ii)))for(;ii&&ii.matches;){if(ii.matches(ei))return ii;ii=ii.parentNode}},kc=(ii,ei=0)=>ei>0?ii[ii.length-1]:ii[0],Wd=ii=>Object.keys(ii).length===0,Nc=(ii,ei)=>{if(!ii)return-1;ei=ei||ii.nodeName;for(var ti=0;ii=ii.previousElementSibling;)ii.matches(ei)&&ti++;return ti},an=(ii,ei)=>{En(ei,(ti,ni)=>{ti==null?ii.removeAttribute(ni):ii.setAttribute(ni,""+ti)})},da=(ii,ei)=>{ii.parentNode&&ii.parentNode.replaceChild(ei,ii)};var Ud=(ii,ei)=>{if(ei===null)return;if(typeof ei=="string"){if(!ei.length)return;ei=new RegExp(ei,"i")}let ti=oi=>{var si=oi.data.match(ei);if(si&&oi.data.length>0){var ai=document.createElement("span");ai.className="highlight";var li=oi.splitText(si.index);li.splitText(si[0].length);var ui=li.cloneNode(!0);return ai.appendChild(ui),da(li,ai),1}return 0},ni=oi=>{oi.nodeType===1&&oi.childNodes&&!/(script|style)/i.test(oi.tagName)&&(oi.className!=="highlight"||oi.tagName!=="SPAN")&&Array.from(oi.childNodes).forEach(si=>{ri(si)})},ri=oi=>oi.nodeType===3?ti(oi):(ni(oi),0);ri(ii)},Yd=ii=>{var ei=ii.querySelectorAll("span.highlight");Array.prototype.forEach.call(ei,function(ti){var ni=ti.parentNode;ni.replaceChild(ti.firstChild,ti),ni.normalize()})};var rb=typeof navigator=="undefined"?!1:/Mac/.test(navigator.userAgent),fa=rb?"metaKey":"ctrlKey";var Rc={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,refreshThrottle:300,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'<input type="text" autocomplete="off" size="1" />',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(ii){return ii.length>0},render:{}};function ul(ii,ei){var ti=Object.assign({},Rc,ei),ni=ti.dataAttr,ri=ti.labelField,oi=ti.valueField,si=ti.disabledField,ai=ti.optgroupField,li=ti.optgroupLabelField,ui=ti.optgroupValueField,ci=ii.tagName.toLowerCase(),di=ii.getAttribute("placeholder")||ii.getAttribute("data-placeholder");if(!di&&!ti.allowEmptyOption){let vi=ii.querySelector('option[value=""]');vi&&(di=vi.textContent)}var pi={placeholder:di,options:[],optgroups:[],items:[],maxItems:null},yi=()=>{var vi,Ei=pi.options,Ci={},xi=1;let Li=0;var Oi=ki=>{var Mi=Object.assign({},ki.dataset),Ai=ni&&Mi[ni];return typeof Ai=="string"&&Ai.length&&(Mi=Object.assign(Mi,JSON.parse(Ai))),Mi},zi=(ki,Mi)=>{var Ai=Xn(ki.value);if(Ai!=null&&!(!Ai&&!ti.allowEmptyOption)){if(Ci.hasOwnProperty(Ai)){if(Mi){var qi=Ci[Ai][ai];qi?Array.isArray(qi)?qi.push(Mi):Ci[Ai][ai]=[qi,Mi]:Ci[Ai][ai]=Mi}}else{var Si=Oi(ki);Si[ri]=Si[ri]||ki.textContent,Si[oi]=Si[oi]||Ai,Si[si]=Si[si]||ki.disabled,Si[ai]=Si[ai]||Mi,Si.$option=ki,Si.$order=Si.$order||++Li,Ci[Ai]=Si,Ei.push(Si)}ki.selected&&pi.items.push(Ai)}},Vi=ki=>{var Mi,Ai;Ai=Oi(ki),Ai[li]=Ai[li]||ki.getAttribute("label")||"",Ai[ui]=Ai[ui]||xi++,Ai[si]=Ai[si]||ki.disabled,Ai.$order=Ai.$order||++Li,pi.optgroups.push(Ai),Mi=Ai[ui],En(ki.children,qi=>{zi(qi,Mi)})};pi.maxItems=ii.hasAttribute("multiple")?null:1,En(ii.children,ki=>{vi=ki.tagName.toLowerCase(),vi==="optgroup"?Vi(ki):vi==="option"&&zi(ki)})},gi=()=>{let vi=ii.getAttribute(ni);if(vi)pi.options=JSON.parse(vi),En(pi.options,Ci=>{pi.items.push(Ci[oi])});else{var Ei=ii.value.trim()||"";if(!ti.allowEmptyOption&&!Ei.length)return;let Ci=Ei.split(ti.delimiter);En(Ci,xi=>{let Li={};Li[ri]=xi,Li[oi]=xi,pi.options.push(Li)}),pi.items=Ci}};return ci==="select"?yi():gi(),Object.assign({},Rc,pi,ei)}var Qd=0,Sn=class extends Tc(oa){constructor(ei,ti){super(),this.order=0,this.isOpen=!1,this.isDisabled=!1,this.isReadOnly=!1,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.refreshTimeout=null,Qd++;var ni,ri=no(ei);if(ri.tomselect)throw new Error("Tom Select already initialized on this element");ri.tomselect=this;var oi=window.getComputedStyle&&window.getComputedStyle(ri,null);ni=oi.getPropertyValue("direction");let si=ul(ri,ti);this.settings=si,this.input=ri,this.tabIndex=ri.tabIndex||0,this.is_select_tag=ri.tagName.toLowerCase()==="select",this.rtl=/rtl/i.test(ni),this.inputId=al(ri,"tomselect-"+Qd),this.isRequired=ri.required,this.sifter=new ol(this.options,{diacritics:si.diacritics}),si.mode=si.mode||(si.maxItems===1?"single":"multi"),typeof si.hideSelected!="boolean"&&(si.hideSelected=si.mode==="multi"),typeof si.hidePlaceholder!="boolean"&&(si.hidePlaceholder=si.mode!=="multi");var ai=si.createFilter;typeof ai!="function"&&(typeof ai=="string"&&(ai=new RegExp(ai)),ai instanceof RegExp?si.createFilter=Ei=>ai.test(Ei):si.createFilter=Ei=>this.settings.duplicates||!this.options[Ei]),this.initializePlugins(si.plugins),this.setupCallbacks(),this.setupTemplates();let li=no("<div>"),ui=no("<div>"),ci=this._render("dropdown"),di=no('<div role="listbox" tabindex="-1">'),pi=this.input.getAttribute("class")||"",yi=si.mode;var gi;if(jn(li,si.wrapperClass,pi,yi),jn(ui,si.controlClass),Ho(li,ui),jn(ci,si.dropdownClass,yi),si.copyClassesToDropdown&&jn(ci,pi),jn(di,si.dropdownContentClass),Ho(ci,di),no(si.dropdownParent||li).appendChild(ci),Mc(si.controlInput)){gi=no(si.controlInput);var vi=["autocorrect","autocapitalize","autocomplete","spellcheck"];En(vi,Ei=>{ri.getAttribute(Ei)&&an(gi,{[Ei]:ri.getAttribute(Ei)})}),gi.tabIndex=-1,ui.appendChild(gi),this.focus_node=gi}else si.controlInput?(gi=no(si.controlInput),this.focus_node=gi):(gi=no("<input/>"),this.focus_node=ui);this.wrapper=li,this.dropdown=ci,this.dropdown_content=di,this.control=ui,this.control_input=gi,this.setup()}setup(){let ei=this,ti=ei.settings,ni=ei.control_input,ri=ei.dropdown,oi=ei.dropdown_content,si=ei.wrapper,ai=ei.control,li=ei.input,ui=ei.focus_node,ci={passive:!0},di=ei.inputId+"-ts-dropdown";an(oi,{id:di}),an(ui,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":di});let pi=al(ui,ei.inputId+"-ts-control"),yi="label[for='"+Vd(ei.inputId)+"']",gi=document.querySelector(yi),vi=ei.focus.bind(ei);if(gi){Nn(gi,"click",vi),an(gi,{for:pi});let xi=al(gi,ei.inputId+"-ts-label");an(ui,{"aria-labelledby":xi}),an(oi,{"aria-labelledby":xi})}if(si.style.width=li.style.width,ei.plugins.names.length){let xi="plugin-"+ei.plugins.names.join(" plugin-");jn([si,ri],xi)}(ti.maxItems===null||ti.maxItems>1)&&ei.is_select_tag&&an(li,{multiple:"multiple"}),ti.placeholder&&an(ni,{placeholder:ti.placeholder}),!ti.splitOn&&ti.delimiter&&(ti.splitOn=new RegExp("\\s*"+Ro(ti.delimiter)+"+\\s*")),ti.load&&ti.loadThrottle&&(ti.load=Bd(ti.load,ti.loadThrottle)),Nn(ri,"mousemove",()=>{ei.ignoreHover=!1}),Nn(ri,"mouseenter",xi=>{var Li=cl(xi.target,"[data-selectable]",ri);Li&&ei.onOptionHover(xi,Li)},{capture:!0}),Nn(ri,"click",xi=>{let Li=cl(xi.target,"[data-selectable]");Li&&(ei.onOptionSelect(xi,Li),fn(xi,!0))}),Nn(ai,"click",xi=>{var Li=cl(xi.target,"[data-ts-item]",ai);if(Li&&ei.onItemSelect(xi,Li)){fn(xi,!0);return}ni.value==""&&(ei.onClick(),fn(xi,!0))}),Nn(ui,"keydown",xi=>ei.onKeyDown(xi)),Nn(ni,"keypress",xi=>ei.onKeyPress(xi)),Nn(ni,"input",xi=>ei.onInput(xi)),Nn(ui,"blur",xi=>ei.onBlur(xi)),Nn(ui,"focus",xi=>ei.onFocus(xi)),Nn(ni,"paste",xi=>ei.onPaste(xi));let Ei=xi=>{let Li=xi.composedPath()[0];if(!si.contains(Li)&&!ri.contains(Li)){ei.isFocused&&ei.blur(),ei.inputState();return}Li==ni&&ei.isOpen?xi.stopPropagation():fn(xi,!0)},Ci=()=>{ei.isOpen&&ei.positionDropdown()};Nn(document,"mousedown",Ei),Nn(window,"scroll",Ci,ci),Nn(window,"resize",Ci,ci),this._destroy=()=>{document.removeEventListener("mousedown",Ei),window.removeEventListener("scroll",Ci),window.removeEventListener("resize",Ci),gi&&gi.removeEventListener("click",vi)},this.revertSettings={innerHTML:li.innerHTML,tabIndex:li.tabIndex},li.tabIndex=-1,li.insertAdjacentElement("afterend",ei.wrapper),ei.sync(!1),ti.items=[],delete ti.optgroups,delete ti.options,Nn(li,"invalid",()=>{ei.isValid&&(ei.isValid=!1,ei.isInvalid=!0,ei.refreshState())}),ei.updateOriginalInput(),ei.refreshItems(),ei.close(!1),ei.inputState(),ei.isSetup=!0,li.disabled?ei.disable():li.readOnly?ei.setReadOnly(!0):ei.enable(),ei.on("change",this.onChange),jn(li,"tomselected","ts-hidden-accessible"),ei.trigger("initialize"),ti.preload===!0&&ei.preload()}setupOptions(ei=[],ti=[]){this.addOptions(ei),En(ti,ni=>{this.registerOptionGroup(ni)})}setupTemplates(){var ei=this,ti=ei.settings.labelField,ni=ei.settings.optgroupLabelField,ri={optgroup:oi=>{let si=document.createElement("div");return si.className="optgroup",si.appendChild(oi.options),si},optgroup_header:(oi,si)=>'<div class="optgroup-header">'+si(oi[ni])+"</div>",option:(oi,si)=>"<div>"+si(oi[ti])+"</div>",item:(oi,si)=>"<div>"+si(oi[ti])+"</div>",option_create:(oi,si)=>'<div class="create">Add <strong>'+si(oi.input)+"</strong>&hellip;</div>",no_results:()=>'<div class="no-results">No results found</div>',loading:()=>'<div class="spinner"></div>',not_loading:()=>{},dropdown:()=>"<div></div>"};ei.settings.render=Object.assign({},ri,ei.settings.render)}setupCallbacks(){var ei,ti,ni={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(ei in ni)ti=this.settings[ni[ei]],ti&&this.on(ei,ti)}sync(ei=!0){let ti=this,ni=ei?ul(ti.input,{delimiter:ti.settings.delimiter}):ti.settings;ti.setupOptions(ni.options,ni.optgroups),ti.setValue(ni.items||[],!0),ti.lastQuery=null}onClick(){var ei=this;if(ei.activeItems.length>0){ei.clearActiveItems(),ei.focus();return}ei.isFocused&&ei.isOpen?ei.blur():ei.focus()}onMouseDown(){}onChange(){ll(this.input,"input"),ll(this.input,"change")}onPaste(ei){var ti=this;if(ti.isInputHidden||ti.isLocked){fn(ei);return}ti.settings.splitOn&&setTimeout(()=>{var ni=ti.inputValue();if(ni.match(ti.settings.splitOn)){var ri=ni.trim().split(ti.settings.splitOn);En(ri,oi=>{Xn(oi)&&(this.options[oi]?ti.addItem(oi):ti.createItem(oi))})}},0)}onKeyPress(ei){var ti=this;if(ti.isLocked){fn(ei);return}var ni=String.fromCharCode(ei.keyCode||ei.which);if(ti.settings.create&&ti.settings.mode==="multi"&&ni===ti.settings.delimiter){ti.createItem(),fn(ei);return}}onKeyDown(ei){var ti=this;if(ti.ignoreHover=!0,ti.isLocked){ei.keyCode!==9&&fn(ei);return}switch(ei.keyCode){case 65:if(Io(fa,ei)&&ti.control_input.value==""){fn(ei),ti.selectAll();return}break;case 27:ti.isOpen&&(fn(ei,!0),ti.close()),ti.clearActiveItems();return;case 40:if(!ti.isOpen&&ti.hasOptions)ti.open();else if(ti.activeOption){let ni=ti.getAdjacent(ti.activeOption,1);ni&&ti.setActiveOption(ni)}fn(ei);return;case 38:if(ti.activeOption){let ni=ti.getAdjacent(ti.activeOption,-1);ni&&ti.setActiveOption(ni)}fn(ei);return;case 13:ti.canSelect(ti.activeOption)?(ti.onOptionSelect(ei,ti.activeOption),fn(ei)):ti.settings.create&&ti.createItem()?fn(ei):document.activeElement==ti.control_input&&ti.isOpen&&fn(ei);return;case 37:ti.advanceSelection(-1,ei);return;case 39:ti.advanceSelection(1,ei);return;case 9:ti.settings.selectOnTab&&(ti.canSelect(ti.activeOption)&&(ti.onOptionSelect(ei,ti.activeOption),fn(ei)),ti.settings.create&&ti.createItem()&&fn(ei));return;case 8:case 46:ti.deleteSelection(ei);return}ti.isInputHidden&&!Io(fa,ei)&&fn(ei)}onInput(ei){if(this.isLocked)return;let ti=this.inputValue();if(this.lastValue!==ti){if(this.lastValue=ti,ti==""){this._onInput();return}this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=$d(()=>{this.refreshTimeout=null,this._onInput()},this.settings.refreshThrottle)}}_onInput(){let ei=this.lastValue;this.settings.shouldLoad.call(this,ei)&&this.load(ei),this.refreshOptions(),this.trigger("type",ei)}onOptionHover(ei,ti){this.ignoreHover||this.setActiveOption(ti,!1)}onFocus(ei){var ti=this,ni=ti.isFocused;if(ti.isDisabled||ti.isReadOnly){ti.blur(),fn(ei);return}ti.ignoreFocus||(ti.isFocused=!0,ti.settings.preload==="focus"&&ti.preload(),ni||ti.trigger("focus"),ti.activeItems.length||(ti.inputState(),ti.refreshOptions(!!ti.settings.openOnFocus)),ti.refreshState())}onBlur(ei){if(document.hasFocus()!==!1){var ti=this;if(ti.isFocused){ti.isFocused=!1,ti.ignoreFocus=!1;var ni=()=>{ti.close(),ti.setActiveItem(),ti.setCaret(ti.items.length),ti.trigger("blur")};ti.settings.create&&ti.settings.createOnBlur?ti.createItem(null,ni):ni()}}}onOptionSelect(ei,ti){var ni,ri=this;ti.parentElement&&ti.parentElement.matches("[data-disabled]")||(ti.classList.contains("create")?ri.createItem(null,()=>{ri.settings.closeAfterSelect&&ri.close()}):(ni=ti.dataset.value,typeof ni!="undefined"&&(ri.lastQuery=null,ri.addItem(ni),ri.settings.closeAfterSelect&&ri.close(),!ri.settings.hideSelected&&ei.type&&/click/.test(ei.type)&&ri.setActiveOption(ti))))}canSelect(ei){return!!(this.isOpen&&ei&&this.dropdown_content.contains(ei))}onItemSelect(ei,ti){var ni=this;return!ni.isLocked&&ni.settings.mode==="multi"?(fn(ei),ni.setActiveItem(ti,ei),!0):!1}canLoad(ei){return!(!this.settings.load||this.loadedSearches.hasOwnProperty(ei))}load(ei){let ti=this;if(!ti.canLoad(ei))return;jn(ti.wrapper,ti.settings.loadingClass),ti.loading++;let ni=ti.loadCallback.bind(ti);ti.settings.load.call(ti,ei,ni)}loadCallback(ei,ti){let ni=this;ni.loading=Math.max(ni.loading-1,0),ni.lastQuery=null,ni.clearActiveOption(),ni.setupOptions(ei,ti),ni.refreshOptions(ni.isFocused&&!ni.isInputHidden),ni.loading||bo(ni.wrapper,ni.settings.loadingClass),ni.trigger("load",ei,ti)}preload(){var ei=this.wrapper.classList;ei.contains("preloaded")||(ei.add("preloaded"),this.load(""))}setTextboxValue(ei=""){var ti=this.control_input,ni=ti.value!==ei;ni&&(ti.value=ei,ll(ti,"update"),this.lastValue=ei)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(ei,ti){var ni=ti?[]:["change"];Oc(this,ni,()=>{this.clear(ti),this.addItems(ei,ti)})}setMaxItems(ei){ei===0&&(ei=null),this.settings.maxItems=ei,this.refreshState()}setActiveItem(ei,ti){var ni=this,ri,oi,si,ai,li,ui;if(ni.settings.mode!=="single"){if(!ei){ni.clearActiveItems(),ni.isFocused&&ni.inputState();return}if(ri=ti&&ti.type.toLowerCase(),ri==="click"&&Io("shiftKey",ti)&&ni.activeItems.length){for(ui=ni.getLastActive(),si=Array.prototype.indexOf.call(ni.control.children,ui),ai=Array.prototype.indexOf.call(ni.control.children,ei),si>ai&&(li=si,si=ai,ai=li),oi=si;oi<=ai;oi++)ei=ni.control.children[oi],ni.activeItems.indexOf(ei)===-1&&ni.setActiveItemClass(ei);fn(ti)}else ri==="click"&&Io(fa,ti)||ri==="keydown"&&Io("shiftKey",ti)?ei.classList.contains("active")?ni.removeActiveItem(ei):ni.setActiveItemClass(ei):(ni.clearActiveItems(),ni.setActiveItemClass(ei));ni.inputState(),ni.isFocused||ni.focus()}}setActiveItemClass(ei){let ti=this,ni=ti.control.querySelector(".last-active");ni&&bo(ni,"last-active"),jn(ei,"active last-active"),ti.trigger("item_select",ei),ti.activeItems.indexOf(ei)==-1&&ti.activeItems.push(ei)}removeActiveItem(ei){var ti=this.activeItems.indexOf(ei);this.activeItems.splice(ti,1),bo(ei,"active")}clearActiveItems(){bo(this.activeItems,"active"),this.activeItems=[]}setActiveOption(ei,ti=!0){ei!==this.activeOption&&(this.clearActiveOption(),ei&&(this.activeOption=ei,an(this.focus_node,{"aria-activedescendant":ei.getAttribute("id")}),an(ei,{"aria-selected":"true"}),jn(ei,"active"),ti&&this.scrollToOption(ei)))}scrollToOption(ei,ti){if(!ei)return;let ni=this.dropdown_content,ri=ni.clientHeight,oi=ni.scrollTop||0,si=ei.offsetHeight,ai=ei.getBoundingClientRect().top-ni.getBoundingClientRect().top+oi;ai+si>ri+oi?this.scroll(ai-ri+si,ti):ai<oi&&this.scroll(ai,ti)}scroll(ei,ti){let ni=this.dropdown_content;ti&&(ni.style.scrollBehavior=ti),ni.scrollTop=ei,ni.style.scrollBehavior=""}clearActiveOption(){this.activeOption&&(bo(this.activeOption,"active"),an(this.activeOption,{"aria-selected":null})),this.activeOption=null,an(this.focus_node,{"aria-activedescendant":null})}selectAll(){let ei=this;if(ei.settings.mode==="single")return;let ti=ei.controlChildren();ti.length&&(ei.inputState(),ei.close(),ei.activeItems=ti,En(ti,ni=>{ei.setActiveItemClass(ni)}))}inputState(){var ei=this;ei.control.contains(ei.control_input)&&(an(ei.control_input,{placeholder:ei.settings.placeholder}),ei.activeItems.length>0||!ei.isFocused&&ei.settings.hidePlaceholder&&ei.items.length>0?(ei.setTextboxValue(),ei.isInputHidden=!0):(ei.settings.hidePlaceholder&&ei.items.length>0&&an(ei.control_input,{placeholder:""}),ei.isInputHidden=!1),ei.wrapper.classList.toggle("input-hidden",ei.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var ei=this;ei.isDisabled||ei.isReadOnly||(ei.ignoreFocus=!0,ei.control_input.offsetWidth?ei.control_input.focus():ei.focus_node.focus(),setTimeout(()=>{ei.ignoreFocus=!1,ei.onFocus()},0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(ei){return this.sifter.getScoreFunction(ei,this.getSearchOptions())}getSearchOptions(){var ei=this.settings,ti=ei.sortField;return typeof ei.sortField=="string"&&(ti=[{field:ei.sortField}]),{fields:ei.searchField,conjunction:ei.searchConjunction,sort:ti,nesting:ei.nesting}}search(ei){var ti,ni,ri=this,oi=this.getSearchOptions();if(ri.settings.score&&(ni=ri.settings.score.call(ri,ei),typeof ni!="function"))throw new Error('Tom Select "score" setting must be a function that returns a function');return ei!==ri.lastQuery?(ri.lastQuery=ei,ti=ri.sifter.search(ei,Object.assign(oi,{score:ni})),ri.currentResults=ti):ti=Object.assign({},ri.currentResults),ri.settings.hideSelected&&(ti.items=ti.items.filter(si=>{let ai=Xn(si.id);return!(ai&&ri.items.indexOf(ai)!==-1)})),ti}refreshOptions(ei=!0){var ti,ni,ri,oi,si,ai,li,ui,ci,di;let pi={},yi=[];var gi=this,vi=gi.inputValue();let Ei=vi===gi.lastQuery||vi==""&&gi.lastQuery==null;var Ci=gi.search(vi),xi=null,Li=gi.settings.shouldOpen||!1,Oi=gi.dropdown_content;Ei&&(xi=gi.activeOption,xi&&(ci=xi.closest("[data-group]"))),oi=Ci.items.length,typeof gi.settings.maxOptions=="number"&&(oi=Math.min(oi,gi.settings.maxOptions)),oi>0&&(Li=!0);let zi=(ki,Mi)=>{let Ai=pi[ki];if(Ai!==void 0){let Si=yi[Ai];if(Si!==void 0)return[Ai,Si.fragment]}let qi=document.createDocumentFragment();return Ai=yi.length,yi.push({fragment:qi,order:Mi,optgroup:ki}),[Ai,qi]};for(ti=0;ti<oi;ti++){let ki=Ci.items[ti];if(!ki)continue;let Mi=ki.id,Ai=gi.options[Mi];if(Ai===void 0)continue;let qi=ca(Mi),Si=gi.getOption(qi,!0);for(gi.settings.hideSelected||Si.classList.toggle("selected",gi.items.includes(qi)),si=Ai[gi.settings.optgroupField]||"",ai=Array.isArray(si)?si:[si],ni=0,ri=ai&&ai.length;ni<ri;ni++){si=ai[ni];let Qi=Ai.$order,Ji=gi.optgroups[si];Ji===void 0?si="":Qi=Ji.$order;let[gn,rn]=zi(si,Qi);ni>0&&(Si=Si.cloneNode(!0),an(Si,{id:Ai.$id+"-clone-"+ni,"aria-selected":null}),Si.classList.add("ts-cloned"),bo(Si,"active"),gi.activeOption&&gi.activeOption.dataset.value==Mi&&ci&&ci.dataset.group===si.toString()&&(xi=Si)),rn.appendChild(Si),si!=""&&(pi[si]=gn)}}gi.settings.lockOptgroupOrder&&yi.sort((ki,Mi)=>ki.order-Mi.order),li=document.createDocumentFragment(),En(yi,ki=>{let Mi=ki.fragment,Ai=ki.optgroup;if(!Mi||!Mi.children.length)return;let qi=gi.optgroups[Ai];if(qi!==void 0){let Si=document.createDocumentFragment(),Qi=gi.render("optgroup_header",qi);Ho(Si,Qi),Ho(Si,Mi);let Ji=gi.render("optgroup",{group:qi,options:Si});Ho(li,Ji)}else Ho(li,Mi)}),Oi.innerHTML="",Ho(Oi,li),gi.settings.highlight&&(Yd(Oi),Ci.query.length&&Ci.tokens.length&&En(Ci.tokens,ki=>{Ud(Oi,ki.regex)}));var Vi=ki=>{let Mi=gi.render(ki,{input:vi});return Mi&&(Li=!0,Oi.insertBefore(Mi,Oi.firstChild)),Mi};if(gi.loading?Vi("loading"):gi.settings.shouldLoad.call(gi,vi)?Ci.items.length===0&&Vi("no_results"):Vi("not_loading"),ui=gi.canCreate(vi),ui&&(di=Vi("option_create")),gi.hasOptions=Ci.items.length>0||ui,Li){if(Ci.items.length>0){if(!xi&&gi.settings.mode==="single"&&gi.items[0]!=null&&(xi=gi.getOption(gi.items[0])),!Oi.contains(xi)){let ki=0;di&&!gi.settings.addPrecedence&&(ki=1),xi=gi.selectable()[ki]}}else di&&(xi=di);ei&&!gi.isOpen&&(gi.open(),gi.scrollToOption(xi,"auto")),gi.setActiveOption(xi)}else gi.clearActiveOption(),ei&&gi.isOpen&&gi.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(ei,ti=!1){let ni=this;if(Array.isArray(ei))return ni.addOptions(ei,ti),!1;let ri=Xn(ei[ni.settings.valueField]);return ri===null||ni.options.hasOwnProperty(ri)?!1:(ei.$order=ei.$order||++ni.order,ei.$id=ni.inputId+"-opt-"+ei.$order,ni.options[ri]=ei,ni.lastQuery=null,ti&&(ni.userOptions[ri]=ti,ni.trigger("option_add",ri,ei)),ri)}addOptions(ei,ti=!1){En(ei,ni=>{this.addOption(ni,ti)})}registerOption(ei){return this.addOption(ei)}registerOptionGroup(ei){var ti=Xn(ei[this.settings.optgroupValueField]);return ti===null?!1:(ei.$order=ei.$order||++this.order,this.optgroups[ti]=ei,ti)}addOptionGroup(ei,ti){var ni;ti[this.settings.optgroupValueField]=ei,(ni=this.registerOptionGroup(ti))&&this.trigger("optgroup_add",ni,ti)}removeOptionGroup(ei){this.optgroups.hasOwnProperty(ei)&&(delete this.optgroups[ei],this.clearCache(),this.trigger("optgroup_remove",ei))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(ei,ti){let ni=this;var ri,oi;let si=Xn(ei),ai=Xn(ti[ni.settings.valueField]);if(si===null)return;let li=ni.options[si];if(li==null)return;if(typeof ai!="string")throw new Error("Value must be set in option data");let ui=ni.getOption(si),ci=ni.getItem(si);if(ti.$order=ti.$order||li.$order,delete ni.options[si],ni.uncacheValue(ai),ni.options[ai]=ti,ui){if(ni.dropdown_content.contains(ui)){let di=ni._render("option",ti);da(ui,di),ni.activeOption===ui&&ni.setActiveOption(di)}ui.remove()}ci&&(oi=ni.items.indexOf(si),oi!==-1&&ni.items.splice(oi,1,ai),ri=ni._render("item",ti),ci.classList.contains("active")&&jn(ri,"active"),da(ci,ri)),ni.lastQuery=null}removeOption(ei,ti){let ni=this;ei=ca(ei),ni.uncacheValue(ei),delete ni.userOptions[ei],delete ni.options[ei],ni.lastQuery=null,ni.trigger("option_remove",ei),ni.removeItem(ei,ti)}clearOptions(ei){let ti=(ei||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();let ni={};En(this.options,(ri,oi)=>{ti(ri,oi)&&(ni[oi]=ri)}),this.options=this.sifter.items=ni,this.lastQuery=null,this.trigger("option_clear")}clearFilter(ei,ti){return this.items.indexOf(ti)>=0}getOption(ei,ti=!1){let ni=Xn(ei);if(ni===null)return null;let ri=this.options[ni];if(ri!=null){if(ri.$div)return ri.$div;if(ti)return this._render("option",ri)}return null}getAdjacent(ei,ti,ni="option"){var ri=this,oi;if(!ei)return null;ni=="item"?oi=ri.controlChildren():oi=ri.dropdown_content.querySelectorAll("[data-selectable]");for(let si=0;si<oi.length;si++)if(oi[si]==ei)return ti>0?oi[si+1]:oi[si-1];return null}getItem(ei){if(typeof ei=="object")return ei;var ti=Xn(ei);return ti!==null?this.control.querySelector(`[data-value="${Lc(ti)}"]`):null}addItems(ei,ti){var ni=this,ri=Array.isArray(ei)?ei:[ei];ri=ri.filter(si=>ni.items.indexOf(si)===-1);let oi=ri[ri.length-1];ri.forEach(si=>{ni.isPending=si!==oi,ni.addItem(si,ti)})}addItem(ei,ti){var ni=ti?[]:["change","dropdown_close"];Oc(this,ni,()=>{var ri,oi;let si=this,ai=si.settings.mode,li=Xn(ei);if(!(li&&si.items.indexOf(li)!==-1&&(ai==="single"&&si.close(),ai==="single"||!si.settings.duplicates))&&!(li===null||!si.options.hasOwnProperty(li))&&(ai==="single"&&si.clear(ti),!(ai==="multi"&&si.isFull()))){if(ri=si._render("item",si.options[li]),si.control.contains(ri)&&(ri=ri.cloneNode(!0)),oi=si.isFull(),si.items.splice(si.caretPos,0,li),si.insertAtCaret(ri),si.isSetup){if(!si.isPending&&si.settings.hideSelected){let ui=si.getOption(li),ci=si.getAdjacent(ui,1);ci&&si.setActiveOption(ci)}!si.isPending&&!si.settings.closeAfterSelect&&si.refreshOptions(si.isFocused&&ai!=="single"),si.settings.closeAfterSelect!=!1&&si.isFull()?si.close():si.isPending||si.positionDropdown(),si.trigger("item_add",li,ri),si.isPending||si.updateOriginalInput({silent:ti})}(!si.isPending||!oi&&si.isFull())&&(si.inputState(),si.refreshState())}})}removeItem(ei=null,ti){let ni=this;if(ei=ni.getItem(ei),!ei)return;var ri,oi;let si=ei.dataset.value;ri=Nc(ei),ei.remove(),ei.classList.contains("active")&&(oi=ni.activeItems.indexOf(ei),ni.activeItems.splice(oi,1),bo(ei,"active")),ni.items.splice(ri,1),ni.lastQuery=null,!ni.settings.persist&&ni.userOptions.hasOwnProperty(si)&&ni.removeOption(si,ti),ri<ni.caretPos&&ni.setCaret(ni.caretPos-1),ni.updateOriginalInput({silent:ti}),ni.refreshState(),ni.positionDropdown(),ni.trigger("item_remove",si,ei)}createItem(ei=null,ti=()=>{}){arguments.length===3&&(ti=arguments[2]),typeof ti!="function"&&(ti=()=>{});var ni=this,ri=ni.caretPos,oi;if(ei=ei||ni.inputValue(),!ni.canCreate(ei))return ti(),!1;ni.lock();var si=!1,ai=li=>{if(ni.unlock(),!li||typeof li!="object")return ti();var ui=Xn(li[ni.settings.valueField]);if(typeof ui!="string")return ti();ni.setTextboxValue(),ni.addOption(li,!0),ni.setCaret(ri),ni.addItem(ui),ti(li),si=!0};return typeof ni.settings.create=="function"?oi=ni.settings.create.call(this,ei,ai):oi={[ni.settings.labelField]:ei,[ni.settings.valueField]:ei},si||ai(oi),!0}refreshItems(){var ei=this;ei.lastQuery=null,ei.isSetup&&ei.addItems(ei.items),ei.updateOriginalInput(),ei.refreshState()}refreshState(){let ei=this;ei.refreshValidityState();let ti=ei.isFull(),ni=ei.isLocked;ei.wrapper.classList.toggle("rtl",ei.rtl);let ri=ei.wrapper.classList;ri.toggle("focus",ei.isFocused),ri.toggle("disabled",ei.isDisabled),ri.toggle("readonly",ei.isReadOnly),ri.toggle("required",ei.isRequired),ri.toggle("invalid",!ei.isValid),ri.toggle("locked",ni),ri.toggle("full",ti),ri.toggle("input-active",ei.isFocused&&!ei.isInputHidden),ri.toggle("dropdown-active",ei.isOpen),ri.toggle("has-options",Wd(ei.options)),ri.toggle("has-items",ei.items.length>0)}refreshValidityState(){var ei=this;ei.input.validity&&(ei.isValid=ei.input.validity.valid,ei.isInvalid=!ei.isValid)}isFull(){return this.settings.maxItems!==null&&this.items.length>=this.settings.maxItems}updateOriginalInput(ei={}){let ti=this;var ni,ri;let oi=ti.input.querySelector('option[value=""]');if(ti.is_select_tag){let li=function(ui,ci,di){return ui||(ui=no('<option value="'+sl(ci)+'">'+sl(di)+"</option>")),ui!=oi&&ti.input.append(ui),si.push(ui),(ui!=oi||ai>0)&&(ui.selected=!0),ui},si=[],ai=ti.input.querySelectorAll("option:checked").length;ti.input.querySelectorAll("option:checked").forEach(ui=>{ui.selected=!1}),ti.items.length==0&&ti.settings.mode=="single"?li(oi,"",""):ti.items.forEach(ui=>{if(ni=ti.options[ui],ri=ni[ti.settings.labelField]||"",si.includes(ni.$option)){let ci=ti.input.querySelector(`option[value="${Lc(ui)}"]:not(:checked)`);li(ci,ui,ri)}else ni.$option=li(ni.$option,ui,ri)})}else ti.input.value=ti.getValue();ti.isSetup&&(ei.silent||ti.trigger("change",ti.getValue()))}open(){var ei=this;ei.isLocked||ei.isOpen||ei.settings.mode==="multi"&&ei.isFull()||(ei.isOpen=!0,an(ei.focus_node,{"aria-expanded":"true"}),ei.refreshState(),ua(ei.dropdown,{visibility:"hidden",display:"block"}),ei.positionDropdown(),ua(ei.dropdown,{visibility:"visible",display:"block"}),ei.focus(),ei.trigger("dropdown_open",ei.dropdown))}close(ei=!0){var ti=this,ni=ti.isOpen;ei&&(ti.setTextboxValue(),ti.settings.mode==="single"&&ti.items.length&&ti.inputState()),ti.isOpen=!1,an(ti.focus_node,{"aria-expanded":"false"}),ua(ti.dropdown,{display:"none"}),ti.settings.hideSelected&&ti.clearActiveOption(),ti.refreshState(),ni&&ti.trigger("dropdown_close",ti.dropdown)}positionDropdown(){if(this.settings.dropdownParent==="body"){var ei=this.control,ti=ei.getBoundingClientRect(),ni=ei.offsetHeight+ti.top+window.scrollY,ri=ti.left+window.scrollX;ua(this.dropdown,{width:ti.width+"px",top:ni+"px",left:ri+"px"})}}clear(ei){var ti=this;if(ti.items.length){var ni=ti.controlChildren();En(ni,ri=>{ti.removeItem(ri,!0)}),ti.inputState(),ei||ti.updateOriginalInput(),ti.trigger("clear")}}insertAtCaret(ei){let ti=this,ni=ti.caretPos,ri=ti.control;ri.insertBefore(ei,ri.children[ni]||null),ti.setCaret(ni+1)}deleteSelection(ei){var ti,ni,ri,oi,si=this;ti=ei&&ei.keyCode===8?-1:1,ni=zd(si.control_input);let ai=[];if(si.activeItems.length)oi=kc(si.activeItems,ti),ri=Nc(oi),ti>0&&ri++,En(si.activeItems,li=>ai.push(li));else if((si.isFocused||si.settings.mode==="single")&&si.items.length){let li=si.controlChildren(),ui;ti<0&&ni.start===0&&ni.length===0?ui=li[si.caretPos-1]:ti>0&&ni.start===si.inputValue().length&&(ui=li[si.caretPos]),ui!==void 0&&ai.push(ui)}if(!si.shouldDelete(ai,ei))return!1;for(fn(ei,!0),typeof ri!="undefined"&&si.setCaret(ri);ai.length;)si.removeItem(ai.pop());return si.inputState(),si.positionDropdown(),si.refreshOptions(!1),!0}shouldDelete(ei,ti){let ni=ei.map(ri=>ri.dataset.value);return!(!ni.length||typeof this.settings.onDelete=="function"&&this.settings.onDelete(ni,ti)===!1)}advanceSelection(ei,ti){var ni,ri,oi=this;oi.rtl&&(ei*=-1),!oi.inputValue().length&&(Io(fa,ti)||Io("shiftKey",ti)?(ni=oi.getLastActive(ei),ni?ni.classList.contains("active")?ri=oi.getAdjacent(ni,ei,"item"):ri=ni:ei>0?ri=oi.control_input.nextElementSibling:ri=oi.control_input.previousElementSibling,ri&&(ri.classList.contains("active")&&oi.removeActiveItem(ni),oi.setActiveItemClass(ri))):oi.moveCaret(ei))}moveCaret(ei){}getLastActive(ei){let ti=this.control.querySelector(".last-active");if(ti)return ti;var ni=this.control.querySelectorAll(".active");if(ni)return kc(ni,ei)}setCaret(ei){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(ei=this.isReadOnly||this.isDisabled){this.isLocked=ei,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(ei){this.focus_node.tabIndex=ei?-1:this.tabIndex,this.isDisabled=ei,this.input.disabled=ei,this.control_input.disabled=ei,this.setLocked()}setReadOnly(ei){this.isReadOnly=ei,this.input.readOnly=ei,this.control_input.readOnly=ei,this.setLocked()}destroy(){var ei=this,ti=ei.revertSettings;ei.trigger("destroy"),ei.off(),ei.wrapper.remove(),ei.dropdown.remove(),ei.input.innerHTML=ti.innerHTML,ei.input.tabIndex=ti.tabIndex,bo(ei.input,"tomselected","ts-hidden-accessible"),ei._destroy(),delete ei.input.tomselect}render(ei,ti){var ni,ri;let oi=this;if(typeof this.settings.render[ei]!="function"||(ri=oi.settings.render[ei].call(this,ti,sl),!ri))return null;if(ri=no(ri),ei==="option"||ei==="option_create"?ti[oi.settings.disabledField]?an(ri,{"aria-disabled":"true"}):an(ri,{"data-selectable":""}):ei==="optgroup"&&(ni=ti.group[oi.settings.optgroupValueField],an(ri,{"data-group":ni}),ti.group[oi.settings.disabledField]&&an(ri,{"data-disabled":""})),ei==="option"||ei==="item"){let si=ca(ti[oi.settings.valueField]);an(ri,{"data-value":si}),ei==="item"?(jn(ri,oi.settings.itemClass),an(ri,{"data-ts-item":""})):(jn(ri,oi.settings.optionClass),an(ri,{role:"option",id:ti.$id}),ti.$div=ri,oi.options[si]=ti)}return ri}_render(ei,ti){let ni=this.render(ei,ti);if(ni==null)throw"HTMLElement expected";return ni}clearCache(){En(this.options,ei=>{ei.$div&&(ei.$div.remove(),delete ei.$div)})}uncacheValue(ei){let ti=this.getOption(ei);ti&&ti.remove()}canCreate(ei){return this.settings.create&&ei.length>0&&this.settings.createFilter.call(this,ei)}hook(ei,ti,ni){var ri=this,oi=ri[ti];ri[ti]=function(){var si,ai;return ei==="after"&&(si=oi.apply(ri,arguments)),ai=ni.apply(ri,arguments),ei==="instead"?ai:(ei==="before"&&(si=oi.apply(ri,arguments)),si)}}};var pb=(ii,ei,ti,ni)=>{ii.addEventListener(ei,ti,ni)};function Xd(){pb(this.input,"change",()=>{this.sync()})}var mb=ii=>typeof ii=="undefined"||ii===null?null:gb(ii),gb=ii=>typeof ii=="boolean"?ii?"1":"0":ii+"",Jd=(ii,ei=!1)=>{ii&&(ii.preventDefault(),ei&&ii.stopPropagation())},vb=ii=>{if(ii.jquery)return ii[0];if(ii instanceof HTMLElement)return ii;if(yb(ii)){var ei=document.createElement("template");return ei.innerHTML=ii.trim(),ei.content.firstChild}return document.querySelector(ii)},yb=ii=>typeof ii=="string"&&ii.indexOf("<")>-1;function Zd(ii){var ei=this,ti=ei.onOptionSelect;ei.settings.hideSelected=!1;let ni=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},ii);var ri=function(ai,li){li?(ai.checked=!0,ni.uncheckedClassNames&&ai.classList.remove(...ni.uncheckedClassNames),ni.checkedClassNames&&ai.classList.add(...ni.checkedClassNames)):(ai.checked=!1,ni.checkedClassNames&&ai.classList.remove(...ni.checkedClassNames),ni.uncheckedClassNames&&ai.classList.add(...ni.uncheckedClassNames))},oi=function(ai){setTimeout(()=>{var li=ai.querySelector("input."+ni.className);li instanceof HTMLInputElement&&ri(li,ai.classList.contains("selected"))},1)};ei.hook("after","setupTemplates",()=>{var si=ei.settings.render.option;ei.settings.render.option=(ai,li)=>{var ui=vb(si.call(ei,ai,li)),ci=document.createElement("input");ni.className&&ci.classList.add(ni.className),ci.addEventListener("click",function(pi){Jd(pi)}),ci.type="checkbox";let di=mb(ai[ei.settings.valueField]);return ri(ci,!!(di&&ei.items.indexOf(di)>-1)),ui.prepend(ci),ui}}),ei.on("item_remove",si=>{var ai=ei.getOption(si);ai&&(ai.classList.remove("selected"),oi(ai))}),ei.on("item_add",si=>{var ai=ei.getOption(si);ai&&oi(ai)}),ei.hook("instead","onOptionSelect",(si,ai)=>{if(ai.classList.contains("selected")){ai.classList.remove("selected"),ei.removeItem(ai.dataset.value),ei.refreshOptions(),Jd(si,!0);return}ti.call(ei,si,ai),oi(ai)})}var bb=ii=>{if(ii.jquery)return ii[0];if(ii instanceof HTMLElement)return ii;if(_b(ii)){var ei=document.createElement("template");return ei.innerHTML=ii.trim(),ei.content.firstChild}return document.querySelector(ii)},_b=ii=>typeof ii=="string"&&ii.indexOf("<")>-1;function ef(ii){let ei=this,ti=Object.assign({className:"clear-button",title:"Clear All",html:ni=>`<div class="${ni.className}" title="${ni.title}">&#10799;</div>`},ii);ei.on("initialize",()=>{var ni=bb(ti.html(ti));ni.addEventListener("click",ri=>{ei.isLocked||(ei.clear(),ei.settings.mode==="single"&&ei.settings.allowEmptyOption&&ei.addItem(""),ri.preventDefault(),ri.stopPropagation())}),ei.control.appendChild(ni)})}var Eb=(ii,ei=!1)=>{ii&&(ii.preventDefault(),ei&&ii.stopPropagation())},Os=(ii,ei,ti,ni)=>{ii.addEventListener(ei,ti,ni)},wb=(ii,ei)=>{if(Array.isArray(ii))ii.forEach(ei);else for(var ti in ii)ii.hasOwnProperty(ti)&&ei(ii[ti],ti)},xb=ii=>{if(ii.jquery)return ii[0];if(ii instanceof HTMLElement)return ii;if(Tb(ii)){var ei=document.createElement("template");return ei.innerHTML=ii.trim(),ei.content.firstChild}return document.querySelector(ii)},Tb=ii=>typeof ii=="string"&&ii.indexOf("<")>-1,Sb=(ii,ei)=>{wb(ei,(ti,ni)=>{ti==null?ii.removeAttribute(ni):ii.setAttribute(ni,""+ti)})},Cb=(ii,ei)=>{var ti;(ti=ii.parentNode)==null||ti.insertBefore(ei,ii.nextSibling)},Ab=(ii,ei)=>{var ti;(ti=ii.parentNode)==null||ti.insertBefore(ei,ii)},Db=(ii,ei)=>{do{var ti;if(ei=(ti=ei)==null?void 0:ti.previousElementSibling,ii==ei)return!0}while(ei&&ei.previousElementSibling);return!1};function tf(){var ii=this;if(ii.settings.mode!=="multi")return;var ei=ii.lock,ti=ii.unlock;let ni=!0,ri;ii.hook("after","setupTemplates",()=>{var oi=ii.settings.render.item;ii.settings.render.item=(si,ai)=>{let li=xb(oi.call(ii,si,ai));Sb(li,{draggable:"true"});let ui=vi=>{ni||Eb(vi),vi.stopPropagation()},ci=vi=>{ri=li,setTimeout(()=>{li.classList.add("ts-dragging")},0)},di=vi=>{vi.preventDefault(),li.classList.add("ts-drag-over"),yi(li,ri)},pi=()=>{li.classList.remove("ts-drag-over")},yi=(vi,Ei)=>{Ei!==void 0&&(Db(Ei,li)?Cb(vi,Ei):Ab(vi,Ei))},gi=()=>{var vi;document.querySelectorAll(".ts-drag-over").forEach(Ci=>Ci.classList.remove("ts-drag-over")),(vi=ri)==null||vi.classList.remove("ts-dragging"),ri=void 0;var Ei=[];ii.control.querySelectorAll("[data-value]").forEach(Ci=>{if(Ci.dataset.value){let xi=Ci.dataset.value;xi&&Ei.push(xi)}}),ii.setValue(Ei)};return Os(li,"mousedown",ui),Os(li,"dragstart",ci),Os(li,"dragenter",di),Os(li,"dragover",di),Os(li,"dragleave",pi),Os(li,"dragend",gi),li}}),ii.hook("instead","lock",()=>(ni=!1,ei.call(ii))),ii.hook("instead","unlock",()=>(ni=!0,ti.call(ii)))}var Ob=(ii,ei=!1)=>{ii&&(ii.preventDefault(),ei&&ii.stopPropagation())},Lb=ii=>{if(ii.jquery)return ii[0];if(ii instanceof HTMLElement)return ii;if(Mb(ii)){var ei=document.createElement("template");return ei.innerHTML=ii.trim(),ei.content.firstChild}return document.querySelector(ii)},Mb=ii=>typeof ii=="string"&&ii.indexOf("<")>-1;function nf(ii){let ei=this,ti=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:ni=>'<div class="'+ni.headerClass+'"><div class="'+ni.titleRowClass+'"><span class="'+ni.labelClass+'">'+ni.title+'</span><a class="'+ni.closeClass+'">&times;</a></div></div>'},ii);ei.on("initialize",()=>{var ni=Lb(ti.html(ti)),ri=ni.querySelector("."+ti.closeClass);ri&&ri.addEventListener("click",oi=>{Ob(oi,!0),ei.close()}),ei.dropdown.insertBefore(ni,ei.dropdown.firstChild)})}var kb=(ii,ei)=>{if(Array.isArray(ii))ii.forEach(ei);else for(var ti in ii)ii.hasOwnProperty(ti)&&ei(ii[ti],ti)},Nb=(ii,...ei)=>{var ti=Rb(ei);ii=Ib(ii),ii.map(ni=>{ti.map(ri=>{ni.classList.remove(ri)})})},Rb=ii=>{var ei=[];return kb(ii,ti=>{typeof ti=="string"&&(ti=ti.trim().split(/[\t\n\f\r\s]/)),Array.isArray(ti)&&(ei=ei.concat(ti))}),ei.filter(Boolean)},Ib=ii=>(Array.isArray(ii)||(ii=[ii]),ii),Hb=(ii,ei)=>{if(!ii)return-1;ei=ei||ii.nodeName;for(var ti=0;ii=ii.previousElementSibling;)ii.matches(ei)&&ti++;return ti};function rf(){var ii=this;ii.hook("instead","setCaret",ei=>{ii.settings.mode==="single"||!ii.control.contains(ii.control_input)?ei=ii.items.length:(ei=Math.max(0,Math.min(ii.items.length,ei)),ei!=ii.caretPos&&!ii.isPending&&ii.controlChildren().forEach((ti,ni)=>{ni<ei?ii.control_input.insertAdjacentElement("beforebegin",ti):ii.control.appendChild(ti)})),ii.caretPos=ei}),ii.hook("instead","moveCaret",ei=>{if(!ii.isFocused)return;let ti=ii.getLastActive(ei);if(ti){let ni=Hb(ti);ii.setCaret(ei>0?ni+1:ni),ii.setActiveItem(),Nb(ti,"last-active")}else ii.setCaret(ii.caretPos+ei)})}var Pb=(ii,ei=!1)=>{ii&&(ii.preventDefault(),ei&&ii.stopPropagation())},Fb=(ii,ei,ti,ni)=>{ii.addEventListener(ei,ti,ni)},$b=(ii,ei)=>{if(Array.isArray(ii))ii.forEach(ei);else for(var ti in ii)ii.hasOwnProperty(ti)&&ei(ii[ti],ti)},of=ii=>{if(ii.jquery)return ii[0];if(ii instanceof HTMLElement)return ii;if(Bb(ii)){var ei=document.createElement("template");return ei.innerHTML=ii.trim(),ei.content.firstChild}return document.querySelector(ii)},Bb=ii=>typeof ii=="string"&&ii.indexOf("<")>-1,zb=(ii,...ei)=>{var ti=Vb(ei);ii=jb(ii),ii.map(ni=>{ti.map(ri=>{ni.classList.add(ri)})})},Vb=ii=>{var ei=[];return $b(ii,ti=>{typeof ti=="string"&&(ti=ti.trim().split(/[\t\n\f\r\s]/)),Array.isArray(ti)&&(ei=ei.concat(ti))}),ei.filter(Boolean)},jb=ii=>(Array.isArray(ii)||(ii=[ii]),ii);function sf(){let ii=this;ii.settings.shouldOpen=!0,ii.hook("before","setup",()=>{ii.focus_node=ii.control,zb(ii.control_input,"dropdown-input");let ei=of('<div class="dropdown-input-wrap">');ei.append(ii.control_input),ii.dropdown.insertBefore(ei,ii.dropdown.firstChild);let ti=of('<input class="items-placeholder" tabindex="-1" />');ti.placeholder=ii.settings.placeholder||"",ii.control.append(ti)}),ii.on("initialize",()=>{ii.control_input.addEventListener("keydown",ti=>{switch(ti.keyCode){case 27:ii.isOpen&&(Pb(ti,!0),ii.close()),ii.clearActiveItems();return;case 9:ii.focus_node.tabIndex=-1;break}return ii.onKeyDown.call(ii,ti)}),ii.on("blur",()=>{ii.focus_node.tabIndex=ii.isDisabled?-1:ii.tabIndex}),ii.on("dropdown_open",()=>{ii.control_input.focus()});let ei=ii.onBlur;ii.hook("instead","onBlur",ti=>{if(!(ti&&ti.relatedTarget==ii.control_input))return ei.call(ii)}),Fb(ii.control_input,"blur",()=>ii.onBlur()),ii.hook("before","close",()=>{ii.isOpen&&ii.focus_node.focus({preventScroll:!0})})})}var dl=(ii,ei,ti,ni)=>{ii.addEventListener(ei,ti,ni)};function af(){var ii=this;ii.on("initialize",()=>{var ei=document.createElement("span"),ti=ii.control_input;ei.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",ii.wrapper.appendChild(ei);var ni=["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"];for(let oi of ni)ei.style[oi]=ti.style[oi];var ri=()=>{ei.textContent=ti.value,ti.style.width=ei.clientWidth+"px"};ri(),ii.on("update item_add item_remove",ri),dl(ti,"input",ri),dl(ti,"keyup",ri),dl(ti,"blur",ri),dl(ti,"update",ri)})}function lf(){var ii=this,ei=ii.deleteSelection;this.hook("instead","deleteSelection",ti=>ii.activeItems.length?ei.call(ii,ti):!1)}function cf(){this.hook("instead","setActiveItem",()=>{}),this.hook("instead","selectAll",()=>{})}var qb=(ii,ei,ti)=>{for(;ii&&ii.matches;){if(ii.matches(ei))return ii;ii=ii.parentNode}},Wb=(ii,ei)=>{if(!ii)return-1;ei=ei||ii.nodeName;for(var ti=0;ii=ii.previousElementSibling;)ii.matches(ei)&&ti++;return ti};function uf(){var ii=this,ei=ii.onKeyDown;ii.hook("instead","onKeyDown",ti=>{var ni,ri,oi,si;if(!ii.isOpen||!(ti.keyCode===37||ti.keyCode===39))return ei.call(ii,ti);ii.ignoreHover=!0,si=qb(ii.activeOption,"[data-group]"),ni=Wb(ii.activeOption,"[data-selectable]"),si&&(ti.keyCode===37?si=si.previousSibling:si=si.nextSibling,si&&(oi=si.querySelectorAll("[data-selectable]"),ri=oi[Math.min(oi.length-1,ni)],ri&&ii.setActiveOption(ri)))})}var Ub=ii=>(ii+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),df=(ii,ei=!1)=>{ii&&(ii.preventDefault(),ei&&ii.stopPropagation())},ff=(ii,ei,ti,ni)=>{ii.addEventListener(ei,ti,ni)},hf=ii=>{if(ii.jquery)return ii[0];if(ii instanceof HTMLElement)return ii;if(Yb(ii)){var ei=document.createElement("template");return ei.innerHTML=ii.trim(),ei.content.firstChild}return document.querySelector(ii)},Yb=ii=>typeof ii=="string"&&ii.indexOf("<")>-1;function pf(ii){let ei=Object.assign({label:"&times;",title:"Remove",className:"remove",append:!0},ii);var ti=this;if(ei.append){var ni='<a href="javascript:void(0)" class="'+ei.className+'" tabindex="-1" title="'+Ub(ei.title)+'">'+ei.label+"</a>";ti.hook("after","setupTemplates",()=>{var ri=ti.settings.render.item;ti.settings.render.item=(oi,si)=>{var ai=hf(ri.call(ti,oi,si)),li=hf(ni);return ai.appendChild(li),ff(li,"mousedown",ui=>{df(ui,!0)}),ff(li,"click",ui=>{ti.isLocked||(df(ui,!0),!ti.isLocked&&ti.shouldDelete([ai],ui)&&(ti.removeItem(ai),ti.refreshOptions(!1),ti.inputState()))}),ai}})}}function mf(ii){let ei=this,ti=Object.assign({text:ni=>ni[ei.settings.labelField]},ii);ei.on("item_remove",function(ni){if(ei.isFocused&&ei.control_input.value.trim()===""){var ri=ei.options[ni];ri&&ei.setTextboxValue(ti.text.call(ei,ri))}})}var Gb=(ii,ei)=>{if(Array.isArray(ii))ii.forEach(ei);else for(var ti in ii)ii.hasOwnProperty(ti)&&ei(ii[ti],ti)},Kb=(ii,...ei)=>{var ti=Qb(ei);ii=Xb(ii),ii.map(ni=>{ti.map(ri=>{ni.classList.add(ri)})})},Qb=ii=>{var ei=[];return Gb(ii,ti=>{typeof ti=="string"&&(ti=ti.trim().split(/[\t\n\f\r\s]/)),Array.isArray(ti)&&(ei=ei.concat(ti))}),ei.filter(Boolean)},Xb=ii=>(Array.isArray(ii)||(ii=[ii]),ii);function gf(){let ii=this,ei=ii.canLoad,ti=ii.clearActiveOption,ni=ii.loadCallback;var ri={},oi,si=!1,ai,li=[];if(ii.settings.shouldLoadMore||(ii.settings.shouldLoadMore=()=>{if(oi.clientHeight/(oi.scrollHeight-oi.scrollTop)>.9)return!0;if(ii.activeOption){var pi=ii.selectable(),yi=Array.from(pi).indexOf(ii.activeOption);if(yi>=pi.length-2)return!0}return!1}),!ii.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";ii.settings.sortField=[{field:"$order"},{field:"$score"}];let ui=di=>typeof ii.settings.maxOptions=="number"&&oi.children.length>=ii.settings.maxOptions?!1:!!(di in ri&&ri[di]),ci=(di,pi)=>ii.items.indexOf(pi)>=0||li.indexOf(pi)>=0;ii.setNextUrl=(di,pi)=>{ri[di]=pi},ii.getUrl=di=>{if(di in ri){let pi=ri[di];return ri[di]=!1,pi}return ii.clearPagination(),ii.settings.firstUrl.call(ii,di)},ii.clearPagination=()=>{ri={}},ii.hook("instead","clearActiveOption",()=>{if(!si)return ti.call(ii)}),ii.hook("instead","canLoad",di=>di in ri?ui(di):ei.call(ii,di)),ii.hook("instead","loadCallback",(di,pi)=>{if(!si)ii.clearOptions(ci);else if(ai){let yi=di[0];yi!==void 0&&(ai.dataset.value=yi[ii.settings.valueField])}ni.call(ii,di,pi),si=!1}),ii.hook("after","refreshOptions",()=>{let di=ii.lastValue;var pi;ui(di)?(pi=ii.render("loading_more",{query:di}),pi&&(pi.setAttribute("data-selectable",""),ai=pi)):di in ri&&!oi.querySelector(".no-results")&&(pi=ii.render("no_more_results",{query:di})),pi&&(Kb(pi,ii.settings.optionClass),oi.append(pi))}),ii.on("initialize",()=>{li=Object.keys(ii.options),oi=ii.dropdown_content,ii.settings.render=Object.assign({},{loading_more:()=>'<div class="loading-more-results">Loading more results ... </div>',no_more_results:()=>'<div class="no-more-results">No more results</div>'},ii.settings.render),oi.addEventListener("scroll",()=>{ii.settings.shouldLoadMore.call(ii)&&ui(ii.lastValue)&&(si||(si=!0,ii.load.call(ii,ii.lastValue)))})})}Sn.define("change_listener",Xd);Sn.define("checkbox_options",Zd);Sn.define("clear_button",ef);Sn.define("drag_drop",tf);Sn.define("dropdown_header",nf);Sn.define("caret_position",rf);Sn.define("dropdown_input",sf);Sn.define("input_autogrow",af);Sn.define("no_backspace_delete",lf);Sn.define("no_active_items",cf);Sn.define("optgroup_columns",uf);Sn.define("remove_button",pf);Sn.define("restore_on_backspace",mf);Sn.define("virtual_scroll",gf);var ha=Sn;function rs(ii){return"error"in ii}function pn(ii){let ei=["","null","undefined"];return Array.isArray(ii)?ii.length>0:typeof ii=="string"&&!ei.includes(ii)||typeof ii=="number"||typeof ii=="boolean"?!0:typeof ii=="object"&&ii!==null}function fl(ii){return typeof ii!==null&&typeof ii!="undefined"}function Jb(ii,ei,ti){return co(this,null,function*(){let ni=window.CSRF_TOKEN,ri=new Headers({"X-CSRFToken":ni}),oi;typeof ti!="undefined"&&(oi=JSON.stringify(ti),ri.set("content-type","application/json"));let si=yield fetch(ii,{method:ei,body:oi,headers:ri,credentials:"same-origin"}),ai=si.headers.get("Content-Type");if(typeof ai=="string"&&ai.includes("text"))return{error:yield si.text()};let li=yield si.json();return!si.ok&&Array.isArray(li)?{error:li.join(`
`)}:!si.ok&&"detail"in li?{error:li.detail}:li})}function Ls(ii,ei){return co(this,null,function*(){return yield Jb(ii,"PATCH",ei)})}function*Hi(...ii){for(let ei of ii)for(let ti of document.querySelectorAll(ei))ti!==null&&(yield ti)}function pa(ii){return document.getElementById(ii)}function vf(ii,ei=0){let ti=ei,ni=document.getElementById("content-title");ni!==null&&(ti+=ni.getBoundingClientRect().bottom);let ri=ii.getBoundingClientRect().top+window.pageYOffset+ti;window.scrollTo({top:ri,behavior:"smooth"})}function yf(ii,ei="select"){let ti=[];for(let ni of ii.querySelectorAll(ei))if(ni!==null){let ri={name:ni.name,options:[]};for(let oi of ni.options)oi.selected&&ri.options.push(oi.value);ti=[...ti,ri]}return ti}function os(ii,ei,ti){function ni(oi){return!!(typeof ti=="string"&&oi!==null&&oi.matches(ti))}function ri(oi){if(oi!==null&&oi.parentElement!==null&&!ni(oi)){for(let si of oi.parentElement.querySelectorAll(ei))if(si!==null)return si;return ri(oi.parentElement.parentElement)}return null}return ri(ii)}function Ic(ii,ei,ti=null,ni=[]){let ri=document.createElement(ii);if(ei!==null)for(let oi of Object.keys(ei)){let si=oi,ai=ei[si];si in ri&&(ri[si]=ai)}ti!==null&&ti.length>0&&ri.classList.add(...ti);for(let oi of ni)ri.appendChild(oi);return ri}function Ms(ii,ei,ti){if(typeof ii!="string")throw new TypeError("replaceAll 'input' argument must be a string");if(typeof ei!="string"&&!(ei instanceof RegExp))throw new TypeError("replaceAll 'pattern' argument must be a string or RegExp instance");switch(typeof ti){case"boolean":ti=String(ti);break;case"number":ti=String(ti);break;case"string":break;default:throw new TypeError("replaceAll 'replacement' argument must be stringifyable")}if(ei instanceof RegExp){let ni=Array.from(new Set([...ei.flags.split(""),"g"])).join("");ei=new RegExp(ei.source,ni)}else ei=new RegExp(ei,"g");return ii.replace(ei,ti)}function Zb(ii,ei){let ti=new Set;for(let ni of ei.querySelectorAll("*[name]"))ni.validity.valid?ni.classList.contains("is-invalid")&&ni.classList.remove("is-invalid"):(ti.add(ni.name),ni.classList.contains("is-invalid")||ni.classList.add("is-invalid"));if(ti.size!==0){let ni=ei.elements.namedItem(Array.from(ti)[0]);vf(ni),ii.preventDefault()}}function bf(){for(let ii of Hi("form")){let ei=ii.querySelectorAll("button[type=submit]");for(let ni of ei)ni.addEventListener("click",ri=>Zb(ri,ii));let ti=document.querySelector("button[data-reset-select]");ti!==null&&ti.addEventListener("click",()=>{window.location.assign(window.location.origin+window.location.pathname)})}}function _f(){for(let ei of Hi("a.set_field_value"))if(ei!==null){let ti=function(ni){ni.preventDefault();let ri=ei.getAttribute("data"),oi=document.getElementById(ei.target);oi!==null&&ri!==null&&(oi.value=ri)};var ii=ti;ei.addEventListener("click",ti)}}function Ef(){for(let ii of[bf,_f])ii()}window.Collapse=Oo;window.Modal=io;window.Popover=Cs;window.Toast=vo;window.Tooltip=go;function e_(){for(let ii of Hi('[data-bs-toggle="tooltip"]'))new go(ii,{container:"body"})}function t_(){for(let ii of Hi('[data-bs-toggle="modal"]'))new io(ii)}function Po(ii,ei,ti,ni){let ri="mdi-alert";switch(ii){case"warning":ri="mdi-alert";break;case"success":ri="mdi-check-circle";break;case"info":ri="mdi-information";break;case"danger":ri="mdi-alert";break}let oi=document.createElement("div");oi.setAttribute("class","toast-container position-fixed bottom-0 end-0 m-3");let si=document.createElement("div");si.setAttribute("class",`toast bg-${ii}`),si.setAttribute("role","alert"),si.setAttribute("aria-live","assertive"),si.setAttribute("aria-atomic","true");let ai=document.createElement("div");ai.setAttribute("class",`toast-header bg-${ii} text-body`);let li=document.createElement("i");li.setAttribute("class",`mdi ${ri}`);let ui=document.createElement("strong");ui.setAttribute("class","me-auto ms-1"),ui.innerText=ei;let ci=document.createElement("button");ci.setAttribute("type","button"),ci.setAttribute("class","btn-close"),ci.setAttribute("data-bs-dismiss","toast"),ci.setAttribute("aria-label","Close");let di=document.createElement("div");if(di.setAttribute("class","toast-body"),ai.appendChild(li),ai.appendChild(ui),typeof ni!="undefined"){let yi=document.createElement("small");yi.setAttribute("class","text-muted"),ai.appendChild(yi)}return ai.appendChild(ci),di.innerText=ti.trim(),si.appendChild(ai),si.appendChild(di),oi.appendChild(si),document.body.appendChild(oi),new vo(si)}function i_(){let{hash:ii}=location;if(ii&&ii.match(/^#tab_.+$/)){let ei=ii.replace("tab_","");for(let ti of Hi(`ul.nav.nav-tabs .nav-link[data-bs-target="${ei}"]`))new ts(ti).show()}}function n_(){let ii=document.querySelectorAll(".sidebar .accordion-item");function ei(ti){for(let ni of ii)ni!==ti?ni.classList.remove("is-open"):ni.classList.toggle("is-open")}for(let ti of ii)for(let ni of ti.querySelectorAll(".accordion-button"))ni.addEventListener("click",()=>{ei(ti)})}function r_(){for(let ii of Hi("a.image-preview")){let ei=`${Math.round(window.innerWidth/4)}px`,ti=Ic("img",{src:ii.href});ti.style.maxWidth=ei;let ni=Ic("div",null,null,[ti]);new Cs(ii,{customClass:"image-preview-popover",trigger:"hover",html:!0,content:ni})}}function hl(){for(let ii of[e_,t_,i_,r_,n_])ii()}function wf(ii){let ei=ii.currentTarget,ti=document.getElementById("quicksearch_clear");pn(ti)&&(ei.value===""?ti.classList.add("invisible"):ti.classList.remove("invisible"))}function xf(){let ii=document.getElementById("export_current_view"),ei=ii==null?void 0:ii.href.split("&")[0];ii.setAttribute("href",ei)}function o_(ii){let ei=ii.currentTarget;if(xf(),ei!=null){let ti=document.getElementById("export_current_view"),ni=`q=${ei.value}`,ri=(ti==null?void 0:ti.href)+"&"+ni;ti.setAttribute("href",ri)}}function Tf(){let ii=document.getElementById("quicksearch"),ei=document.getElementById("quicksearch_clear");pn(ii)&&(ii.addEventListener("keyup",wf,{passive:!0}),ii.addEventListener("search",wf,{passive:!0}),ii.addEventListener("change",o_,{passive:!0}),pn(ei)&&ei.addEventListener("click",()=>co(this,null,function*(){let ti=new Event("search");ii.value="",yield new Promise(ni=>setTimeout(ni,100)),ii.dispatchEvent(ti),xf()}),{passive:!0}))}function ma(ii){let ei={};return ei.clear_button={html:ti=>`<i class="mdi mdi-close-circle ${ti.className}" title="${ti.title}"></i>`},ii.hasAttribute("multiple")&&(ei.remove_button={title:"Remove"}),{plugins:ei}}function Sf(){for(let ii of Hi("select:not(.tomselected):not(.no-ts):not([size]):not(.api-select):not(.color-select)"))new ha(ii,sn(Di({},ma(ii)),{maxOptions:void 0}))}function Cf(){function ii(ei,ti){return`<div><span class="dropdown-item-indicator color-label" style="background-color: #${ti(ei.value)}"></span> ${ti(ei.text)}</div>`}for(let ei of Hi("select.color-select:not(.tomselected)"))new ha(ei,sn(Di({},ma(ei)),{maxOptions:void 0,render:{option:ii,item:ii}}))}var Af=(ii,ei)=>{if(Array.isArray(ii))ii.forEach(ei);else for(var ti in ii)ii.hasOwnProperty(ti)&&ei(ii[ti],ti)};var Df=(ii,...ei)=>{var ti=s_(ei);ii=a_(ii),ii.map(ni=>{ti.map(ri=>{ni.classList.add(ri)})})};var s_=ii=>{var ei=[];return Af(ii,ti=>{typeof ti=="string"&&(ti=ti.trim().split(/[\t\n\f\r\s]/)),Array.isArray(ti)&&(ei=ei.concat(ti))}),ei.filter(Boolean)},a_=ii=>(Array.isArray(ii)||(ii=[ii]),ii);var zc={};lu(zc,{exclude:()=>m_,extract:()=>$c,parse:()=>Bc,parseUrl:()=>Ff,pick:()=>Bf,stringify:()=>Pf,stringifyUrl:()=>$f});var Mf="%[a-f0-9]{2}",Of=new RegExp("("+Mf+")|([^%]+?)","gi"),Lf=new RegExp("("+Mf+")+","gi");function Hc(ii,ei){try{return[decodeURIComponent(ii.join(""))]}catch(ri){}if(ii.length===1)return ii;ei=ei||1;let ti=ii.slice(0,ei),ni=ii.slice(ei);return Array.prototype.concat.call([],Hc(ti),Hc(ni))}function l_(ii){try{return decodeURIComponent(ii)}catch(ei){let ti=ii.match(Of)||[];for(let ni=1;ni<ti.length;ni++)ii=Hc(ti,ni).join(""),ti=ii.match(Of)||[];return ii}}function c_(ii){let ei={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},ti=Lf.exec(ii);for(;ti;){try{ei[ti[0]]=decodeURIComponent(ti[0])}catch(ri){let oi=l_(ti[0]);oi!==ti[0]&&(ei[ti[0]]=oi)}ti=Lf.exec(ii)}ei["%C2"]="\uFFFD";let ni=Object.keys(ei);for(let ri of ni)ii=ii.replace(new RegExp(ri,"g"),ei[ri]);return ii}function Pc(ii){if(typeof ii!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof ii+"`");try{return decodeURIComponent(ii)}catch(ei){return c_(ii)}}function kf(ii,ei){let ti={};if(Array.isArray(ei))for(let ni of ei){let ri=Object.getOwnPropertyDescriptor(ii,ni);ri!=null&&ri.enumerable&&Object.defineProperty(ti,ni,ri)}else for(let ni of Reflect.ownKeys(ii)){let ri=Object.getOwnPropertyDescriptor(ii,ni);if(ri.enumerable){let oi=ii[ni];ei(ni,oi,ii)&&Object.defineProperty(ti,ni,ri)}}return ti}function pl(ii,ei){if(!(typeof ii=="string"&&typeof ei=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(ii===""||ei==="")return[];let ti=ii.indexOf(ei);return ti===-1?[]:[ii.slice(0,ti),ii.slice(ti+ei.length)]}var u_=ii=>ii==null,d_=ii=>encodeURIComponent(ii).replaceAll(/[!'()*]/g,ei=>`%${ei.charCodeAt(0).toString(16).toUpperCase()}`),Fc=Symbol("encodeFragmentIdentifier");function f_(ii){switch(ii.arrayFormat){case"index":return ei=>(ti,ni)=>{let ri=ti.length;return ni===void 0||ii.skipNull&&ni===null||ii.skipEmptyString&&ni===""?ti:ni===null?[...ti,[wn(ei,ii),"[",ri,"]"].join("")]:[...ti,[wn(ei,ii),"[",wn(ri,ii),"]=",wn(ni,ii)].join("")]};case"bracket":return ei=>(ti,ni)=>ni===void 0||ii.skipNull&&ni===null||ii.skipEmptyString&&ni===""?ti:ni===null?[...ti,[wn(ei,ii),"[]"].join("")]:[...ti,[wn(ei,ii),"[]=",wn(ni,ii)].join("")];case"colon-list-separator":return ei=>(ti,ni)=>ni===void 0||ii.skipNull&&ni===null||ii.skipEmptyString&&ni===""?ti:ni===null?[...ti,[wn(ei,ii),":list="].join("")]:[...ti,[wn(ei,ii),":list=",wn(ni,ii)].join("")];case"comma":case"separator":case"bracket-separator":{let ei=ii.arrayFormat==="bracket-separator"?"[]=":"=";return ti=>(ni,ri)=>ri===void 0||ii.skipNull&&ri===null||ii.skipEmptyString&&ri===""?ni:(ri=ri===null?"":ri,ni.length===0?[[wn(ti,ii),ei,wn(ri,ii)].join("")]:[[ni,wn(ri,ii)].join(ii.arrayFormatSeparator)])}default:return ei=>(ti,ni)=>ni===void 0||ii.skipNull&&ni===null||ii.skipEmptyString&&ni===""?ti:ni===null?[...ti,wn(ei,ii)]:[...ti,[wn(ei,ii),"=",wn(ni,ii)].join("")]}}function h_(ii){let ei;switch(ii.arrayFormat){case"index":return(ti,ni,ri)=>{if(ei=/\[(\d*)]$/.exec(ti),ti=ti.replace(/\[\d*]$/,""),!ei){ri[ti]=ni;return}ri[ti]===void 0&&(ri[ti]={}),ri[ti][ei[1]]=ni};case"bracket":return(ti,ni,ri)=>{if(ei=/(\[])$/.exec(ti),ti=ti.replace(/\[]$/,""),!ei){ri[ti]=ni;return}if(ri[ti]===void 0){ri[ti]=[ni];return}ri[ti]=[...ri[ti],ni]};case"colon-list-separator":return(ti,ni,ri)=>{if(ei=/(:list)$/.exec(ti),ti=ti.replace(/:list$/,""),!ei){ri[ti]=ni;return}if(ri[ti]===void 0){ri[ti]=[ni];return}ri[ti]=[...ri[ti],ni]};case"comma":case"separator":return(ti,ni,ri)=>{let oi=typeof ni=="string"&&ni.includes(ii.arrayFormatSeparator),si=typeof ni=="string"&&!oi&&_o(ni,ii).includes(ii.arrayFormatSeparator);ni=si?_o(ni,ii):ni;let ai=oi||si?ni.split(ii.arrayFormatSeparator).map(li=>_o(li,ii)):ni===null?ni:_o(ni,ii);ri[ti]=ai};case"bracket-separator":return(ti,ni,ri)=>{let oi=/(\[])$/.test(ti);if(ti=ti.replace(/\[]$/,""),!oi){ri[ti]=ni&&_o(ni,ii);return}let si=ni===null?[]:_o(ni,ii).split(ii.arrayFormatSeparator);if(ri[ti]===void 0){ri[ti]=si;return}ri[ti]=[...ri[ti],...si]};default:return(ti,ni,ri)=>{if(ri[ti]===void 0){ri[ti]=ni;return}ri[ti]=[...[ri[ti]].flat(),ni]}}}function Rf(ii){if(typeof ii!="string"||ii.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function wn(ii,ei){return ei.encode?ei.strict?d_(ii):encodeURIComponent(ii):ii}function _o(ii,ei){return ei.decode?Pc(ii):ii}function If(ii){return Array.isArray(ii)?ii.sort():typeof ii=="object"?If(Object.keys(ii)).sort((ei,ti)=>Number(ei)-Number(ti)).map(ei=>ii[ei]):ii}function Hf(ii){let ei=ii.indexOf("#");return ei!==-1&&(ii=ii.slice(0,ei)),ii}function p_(ii){let ei="",ti=ii.indexOf("#");return ti!==-1&&(ei=ii.slice(ti)),ei}function Nf(ii,ei,ti){return ti==="string"&&typeof ii=="string"?ii:typeof ti=="function"&&typeof ii=="string"?ti(ii):ei.parseBooleans&&ii!==null&&(ii.toLowerCase()==="true"||ii.toLowerCase()==="false")?ii.toLowerCase()==="true":ti==="number"&&!Number.isNaN(Number(ii))&&typeof ii=="string"&&ii.trim()!==""||ei.parseNumbers&&!Number.isNaN(Number(ii))&&typeof ii=="string"&&ii.trim()!==""?Number(ii):ii}function $c(ii){ii=Hf(ii);let ei=ii.indexOf("?");return ei===-1?"":ii.slice(ei+1)}function Bc(ii,ei){ei=Di({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null)},ei),Rf(ei.arrayFormatSeparator);let ti=h_(ei),ni=Object.create(null);if(typeof ii!="string"||(ii=ii.trim().replace(/^[?#&]/,""),!ii))return ni;for(let ri of ii.split("&")){if(ri==="")continue;let oi=ei.decode?ri.replaceAll("+"," "):ri,[si,ai]=pl(oi,"=");si===void 0&&(si=oi),ai=ai===void 0?null:["comma","separator","bracket-separator"].includes(ei.arrayFormat)?ai:_o(ai,ei),ti(_o(si,ei),ai,ni)}for(let[ri,oi]of Object.entries(ni))if(typeof oi=="object"&&oi!==null&&ei.types[ri]!=="string")for(let[si,ai]of Object.entries(oi)){let li=ei.types[ri]?ei.types[ri].replace("[]",""):void 0;oi[si]=Nf(ai,ei,li)}else typeof oi=="object"&&oi!==null&&ei.types[ri]==="string"?ni[ri]=Object.values(oi).join(ei.arrayFormatSeparator):ni[ri]=Nf(oi,ei,ei.types[ri]);return ei.sort===!1?ni:(ei.sort===!0?Object.keys(ni).sort():Object.keys(ni).sort(ei.sort)).reduce((ri,oi)=>{let si=ni[oi];return ri[oi]=si&&typeof si=="object"&&!Array.isArray(si)?If(si):si,ri},Object.create(null))}function Pf(ii,ei){if(!ii)return"";ei=Di({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},ei),Rf(ei.arrayFormatSeparator);let ti=si=>ei.skipNull&&u_(ii[si])||ei.skipEmptyString&&ii[si]==="",ni=f_(ei),ri={};for(let[si,ai]of Object.entries(ii))ti(si)||(ri[si]=ai);let oi=Object.keys(ri);return ei.sort!==!1&&oi.sort(ei.sort),oi.map(si=>{let ai=ii[si];return ai===void 0?"":ai===null?wn(si,ei):Array.isArray(ai)?ai.length===0&&ei.arrayFormat==="bracket-separator"?wn(si,ei)+"[]":ai.reduce(ni(si),[]).join("&"):wn(si,ei)+"="+wn(ai,ei)}).filter(si=>si.length>0).join("&")}function Ff(ii,ei){var ri,oi;ei=Di({decode:!0},ei);let[ti,ni]=pl(ii,"#");return ti===void 0&&(ti=ii),Di({url:(oi=(ri=ti==null?void 0:ti.split("?"))==null?void 0:ri[0])!=null?oi:"",query:Bc($c(ii),ei)},ei&&ei.parseFragmentIdentifier&&ni?{fragmentIdentifier:_o(ni,ei)}:{})}function $f(ii,ei){ei=Di({encode:!0,strict:!0,[Fc]:!0},ei);let ti=Hf(ii.url).split("?")[0]||"",ni=$c(ii.url),ri=Di(Di({},Bc(ni,{sort:!1})),ii.query),oi=Pf(ri,ei);oi&&(oi=`?${oi}`);let si=p_(ii.url);if(typeof ii.fragmentIdentifier=="string"){let ai=new URL(ti);ai.hash=ii.fragmentIdentifier,si=ei[Fc]?ai.hash:`#${ii.fragmentIdentifier}`}return`${ti}${oi}${si}`}function Bf(ii,ei,ti){ti=Di({parseFragmentIdentifier:!0,[Fc]:!1},ti);let{url:ni,query:ri,fragmentIdentifier:oi}=Ff(ii,ti);return $f({url:ni,query:kf(ri,ei),fragmentIdentifier:oi},ti)}function m_(ii,ei,ti){let ni=Array.isArray(ei)?ri=>!ei.includes(ri):(ri,oi)=>!ei(ri,oi);return Bf(ii,ni,ti)}var zf=zc;function Vf(ii){if(Array.isArray(ii)){for(let ei of ii)if(typeof ei=="object"&&ei!==null&&"fieldName"in ei&&"queryParam"in ei)return typeof ei.fieldName=="string"&&typeof ei.queryParam=="string"}return!1}var ml=class extends Map{queryParam(ei){let ti=this.get(ei);return typeof ti!="undefined"?ti.queryParam:null}queryValue(ei){let ti=this.get(ei);return typeof ti!="undefined"?ti.queryValue:[]}updateValue(ei,ti){let ni=this.get(ei);if(pn(ni)){let{queryParam:ri}=ni;return this.set(ei,{queryParam:ri,queryValue:ti}),!0}return!1}addFromJson(ei){if(pn(ei)){let ti=JSON.parse(ei);if(Vf(ti))for(let{queryParam:ni,fieldName:ri}of ti)this.set(ri,{queryParam:ni,queryValue:[]});else throw new Error(`Data from 'data-dynamic-params' attribute is improperly formatted: '${ei}'`)}}};var gl=class extends ha{constructor(ti,ni){super(ti,ni);en(this,"nullOption",null);en(this,"queryParams",new Map);en(this,"staticParams",new Map);en(this,"dynamicParams",new ml);en(this,"pathValues",new Map);this.api_url=this.input.getAttribute("data-url"),this.valueField=this.input.getAttribute("ts-value-field")||this.settings.valueField,this.labelField=this.input.getAttribute("ts-label-field")||this.settings.labelField,this.disabledField=this.input.getAttribute("ts-disabled-field")||this.settings.disabledField,this.descriptionField=this.input.getAttribute("ts-description-field")||"description",this.depthField=this.input.getAttribute("ts-depth-field")||"_depth",this.parentField=this.input.getAttribute("ts-parent-field")||null,this.countField=this.input.getAttribute("ts-count-field")||null;let ri=this.input.getAttribute("data-null-option");if(ri){let oi=this.settings.valueField,si=this.settings.labelField;this.nullOption={},this.nullOption[oi]="null",this.nullOption[si]=ri}this.getStaticParams();for(let[oi,si]of this.staticParams.entries())this.queryParams.set(oi,si);this.getDynamicParams();for(let oi of this.dynamicParams.keys())this.updateQueryParams(oi);this.getPathKeys();for(let oi of this.pathValues.keys())this.updatePathValues(oi);this.addEventListeners()}load(ti){let ni=this;ni.clearOptions(),ni.nullOption&&!ti&&ni.addOption(ni.nullOption);let ri=ni.getRequestUrl(ti);ri&&(Df(ni.wrapper,ni.settings.loadingClass),ni.loading++,fetch(ri).then(oi=>oi.json()).then(oi=>{let si=oi.results,ai=[];for(let li of si){let ui=ni.getOptionFromData(li);ai.push(ui)}return ai}).then(oi=>{ni.loadCallback(oi,[])}).catch(()=>{ni.loadCallback([],[])}))}getRequestUrl(ti){let ni=this.api_url,ri={};for(let[oi,si]of this.queryParams.entries())ri[oi]=si;for(let[oi,si]of this.pathValues.entries())for(let ai of this.api_url.matchAll(new RegExp(`({{${oi}}})`,"g")))if(si)ni=Ms(ni,ai[1],si.toString());else return"";return ti&&(ri.q=[ti]),ri.brief=[!0],ri.limit=[this.settings.maxOptions],zf.stringifyUrl({url:ni,query:ri})}getOptionFromData(ti){let ni={id:ti[this.valueField],display:ti[this.labelField],depth:ti[this.depthField]||null,description:ti[this.descriptionField]||null};if(ti[this.parentField]){let ri=ti[this.parentField];ni.parent=ri[this.labelField]}return ti[this.countField]&&(ni.count=ti[this.countField]),ti[this.disabledField]&&(ni.disabled=ti[this.disabledField]),ni}getStaticParams(){let ti=this.input.getAttribute("data-static-params");try{if(ti){let ni=JSON.parse(ti);if(ni)for(let{queryParam:ri,queryValue:oi}of ni)Array.isArray(oi)?this.staticParams.set(ri,oi):this.staticParams.set(ri,[oi])}}catch(ni){console.group(`Unable to determine static query parameters for select field '${this.name}'`),console.warn(ni),console.groupEnd()}}getDynamicParams(){let ti=this.input.getAttribute("data-dynamic-params");try{this.dynamicParams.addFromJson(ti)}catch(ni){console.group(`Unable to determine dynamic query parameters for select field '${this.name}'`),console.warn(ni),console.groupEnd()}}getPathKeys(){for(let ti of this.api_url.matchAll(new RegExp("{{(.+)}}","g")))this.pathValues.set(ti[1],"")}updateQueryParams(ti){let ni=document.querySelector(`[name="${ti}"]`);if(ni!==null){let ri=[];if(ni.multiple?ri=Array.from(ni.options).filter(oi=>oi.selected).map(oi=>oi.value):ni.value!==""&&(ri=[ni.value]),ri.length>0){this.dynamicParams.updateValue(ti,ri);let oi=this.dynamicParams.get(ti);if(typeof oi!="undefined"){let{queryParam:si,queryValue:ai}=oi,li=[];if(this.staticParams.has(si)){let ui=this.staticParams.get(si);typeof ui!="undefined"&&(li=[...ui,...ai])}else li=ai;li.length>0?this.queryParams.set(si,li):this.queryParams.delete(si)}}else{let oi=this.dynamicParams.queryParam(ti);oi!==null&&this.queryParams.delete(oi)}}}updatePathValues(ti){let ni=Ms(ti,/^id_/i,""),ri=pa(`id_${ni}`);ri!==null&&this.api_url.includes("{{")&&this.api_url.match(new RegExp(`({{(${ti})}})`,"g"))&&(ri.value?this.pathValues.set(ti,ri.value):this.pathValues.set(ti,""))}addEventListeners(){let ti=new Set([...this.dynamicParams.keys(),...this.pathValues.keys()]);for(let ni of ti){let ri=document.querySelector(`[name="${ni}"]`);ri!==null&&ri.addEventListener("change",oi=>this.handleEvent(oi)),this.input.addEventListener(`netbox.select.onload.${ni}`,oi=>this.handleEvent(oi))}}handleEvent(ti){let ni=ti.target;this.updateQueryParams(ni.name),this.updatePathValues(ni.name),this.clear(),this.load(this.lastValue)}};var g_="id",vl="display",v_=100;function y_(ii,ei){let ti="<div>";return typeof ii.depth=="number"&&ii.depth>0&&(ti=`${ti}${"\u2500".repeat(ii.depth)} `),ti=`${ti}${ei(ii[vl])}`,ii.parent&&(ti=`${ti} <span class="text-secondary">${ei(ii.parent)}</span>`),ii.count&&(ti=`${ti} <span class="badge">${ei(ii.count)}</span>`),ii.description&&(ti=`${ti}<br /><small class="text-secondary">${ei(ii.description)}</small>`),ti=`${ti}</div>`,ti}function b_(ii,ei){return ii.parent?`<div>${ei(ii.parent)} > ${ei(ii[vl])}</div>`:`<div>${ei(ii[vl])}<div>`}function jf(){for(let ii of Hi("select.api-select:not(.tomselected)"))new gl(ii,sn(Di({},ma(ii)),{valueField:g_,labelField:vl,maxOptions:v_,searchField:[],preload:"focus",render:{option:y_,item:b_},shouldLoad:function(){return!0}}))}function yl(){Sf(),jf(),Cf()}function qf(ii,ei){var ri;let ti=(ri=ii.parentElement)==null?void 0:ri.parentElement,ni=ii.getAttribute("data-url");pn(ni)&&Ls(ni,{status:ei}).then(oi=>{if(rs(oi)){Po("danger","Error",oi.error).show();return}else ti.setAttribute("data-cable-status",ei)})}function Wf(){for(let ii of Hi("button.mark-planned"))ii.addEventListener("click",()=>qf(ii,"planned"));for(let ii of Hi("button.mark-installed"))ii.addEventListener("click",()=>qf(ii,"connected"))}var Vc=class{set(ei,ti,ni){return ei[ti]=ni,!0}get(ei,ti){return ei[ti]}has(ei,ti){return ti in ei}},ga=class{constructor(ei,ti){en(this,"handlers");en(this,"proxy");en(this,"options");en(this,"key","");if(this.options=ti,typeof this.options.key=="string"?this.key=this.options.key:this.key=this.generateStateKey(ei),this.options.persist){let ni=this.retrieve();ni!==null&&(ei=Di(Di({},ei),ni))}this.handlers=new Vc,this.proxy=new Proxy(ei,this.handlers),this.options.persist&&this.save()}generateStateKey(ei){return`netbox-${window.btoa(Object.keys(ei).join("---"))}`}get(ei){return this.handlers.get(this.proxy,ei)}set(ei,ti){this.handlers.set(this.proxy,ei,ti),this.options.persist&&this.save()}all(){return this.proxy}keys(){return Object.keys(this.proxy)}values(){return Object.values(this.proxy)}save(){let ei=JSON.stringify(this.proxy);localStorage.setItem(this.key,ei)}retrieve(){let ei=localStorage.getItem(this.key);return ei!==null?JSON.parse(ei):null}};function Fo(ii,ei={}){return new ga(ii,ei)}var jc=Fo({hidden:!1},{persist:!0,key:"netbox-object-depth"});var qc=Fo({view:"images-and-labels"},{persist:!0});var Uf=Fo({element:null},{persist:!1});var Yf=Fo({hidden:!0},{persist:!0,key:"netbox-secret"});function Gf(ii,ei){ei.setAttribute("data-depth-indicators",ii?"hidden":"shown"),ei.innerText=ii?"Show Depth Indicators":"Hide Depth Indicators"}function Kf(){for(let ii of Hi(".record-depth"))ii.style.display=""}function Qf(){for(let ii of Hi(".record-depth"))ii.style.display="none"}function __(ii,ei){let ti=ii.get("hidden");ii.set("hidden",!ti);let ni=ii.get("hidden");ni?Qf():Kf(),Gf(ni,ei)}function Xf(){let ii=jc.get("hidden");for(let ei of Hi("button.toggle-depth"))Gf(ii,ei),ei.addEventListener("click",ti=>{__(jc,ti.currentTarget)},!1);ii?Qf():ii||Kf()}function E_(ii){let ei=Array.from(ii.options);for(let ti=1;ti<ei.length;ti++){let ni=ei[ti];ni.selected&&(ii.removeChild(ni),ii.insertBefore(ni,ii.options[ti-1]))}}function w_(ii){let ei=Array.from(ii.options);for(let ti=ei.length-2;ti>=0;ti--){let ni=ei[ti];if(ni.selected){let ri=ii.options[ti+1];ni=ii.removeChild(ni),ri=ii.replaceChild(ni,ri),ii.insertBefore(ri,ni)}}}function Jf(){for(let ii of Hi("#move-option-up")){let ei=ii.getAttribute("data-target");if(ei!==null)for(let ti of Hi(`#${ei}`))ii.addEventListener("click",()=>E_(ti))}for(let ii of Hi("#move-option-down")){let ei=ii.getAttribute("data-target");if(ei!==null)for(let ti of Hi(`#${ei}`))ii.addEventListener("click",()=>w_(ti))}}function Zf(ii,ei){return ii.replace(/[^\-.\w\s]/g,"").replace(/^[\s.]+|[\s.]+$/g,"").replace(/[-.\s]+/g,"-").toLowerCase().substring(0,ei)}function eh(){for(let ii of Hi("button#reslug")){let ei=ii.form;if(ei==null)continue;let ti=ei.querySelector("#id_slug");if(ti==null)continue;let ni=ti.getAttribute("slug-source"),ri=ei.querySelector(`#id_${ni}`),oi=ti.getAttribute("maxlength"),si=50;oi&&(si=Number(oi)),ri.addEventListener("blur",()=>{ti.value||(ti.value=Zf(ri.value,si))}),ii.addEventListener("click",()=>{ti.value=Zf(ri.value,si)})}}function x_(ii){if(!ii.currentTarget.checked)for(let ti of Hi('input[type="checkbox"].toggle',"input#select-all"))ti.checked=!1}function T_(ii){let ei=ii.currentTarget,ti=os(ei,"table"),ni=document.getElementById("select-all-box"),ri=document.getElementById("select-all");if(ti!==null){for(let oi of ti.querySelectorAll('tr:not(.d-none) input[type="checkbox"][name="pk"]'))ei.checked?oi.checked=!0:oi.checked=!1;ni!==null&&(ei.checked?ni.classList.remove("d-none"):(ni.classList.add("d-none"),ri!==null&&(ri.checked=!1)))}}function th(){for(let ii of Hi('table tr th > input[type="checkbox"].toggle'))ii.addEventListener("change",T_);for(let ii of Hi('input[type="checkbox"][name="pk"]'))ii.addEventListener("change",x_)}function ih(){let ii=document.querySelector('input[type="checkbox"][name="pk"]:checked'),ei=document.querySelector("div.form.form-horizontal div.btn-list");if(!ei)return;let ti=ei.classList.contains("btn-float-group-left");ii!==null&&!ti?ei.classList.add("btn-float-group-left"):ii===null&&ti&&ei.classList.remove("btn-float-group-left")}function nh(){for(let ii of Hi('input[type="checkbox"][name="pk"]'))ii.addEventListener("change",()=>{ih()});for(let ii of Hi('table tr th > input[type="checkbox"].toggle'))ii.addEventListener("change",()=>{ih()})}function oh(){var ii;(ii=window.getSelection())==null||ii.removeAllRanges()}function rh(ii,ei){ei.set("element",ii)}function S_(ii,ei,ti){let ni=!1;for(let ri of ti){let oi=ri;if(ni===!0&&(oi.checked=ii.checked),ri===ei){if(ni===!0){ni=!1;return}ni=!0,oi.checked=ii.checked}if(ri===ii){if(ni===!0){ni=!1;return}ni=!0}}}function C_(ii,ei){let ti=ii.target,ni=ei.get("element");if(rh(ti,ei),!ii.shiftKey)return;if(oh(),ni===null)return rh(ti,ei);let ri=Hi('input[type="checkbox"][name="pk"]');S_(ti,ni,ri)}function sh(){let ii=Hi('input[type="checkbox"][name="pk"]');for(let ei of ii)ei.addEventListener("click",ti=>{oh(),ti.stopPropagation(),C_(ti,Uf)})}function A_(ii){let ei=ii.querySelector("button.preview-button"),ti=ii.querySelector("textarea"),ni=ii.querySelector("div.preview");if(!pn(ti.style.height)){let{height:ri}=ti.getBoundingClientRect();ti.style.height=`${ri}px`}ei.addEventListener("htmx:configRequest",ri=>{ri.detail.parameters={text:ti.value||""},ri.detail.headers["X-CSRFToken"]=window.CSRF_TOKEN,ni.style.minHeight=ti.style.height,ni.innerHTML=""})}function ah(){for(let ii of document.querySelectorAll(".markdown-widget"))A_(ii)}function D_(ii,ei){ei.setAttribute("data-secret-visibility",ii?"hidden":"shown"),ei.innerText=ii?"Show Secret":"Hide Secret"}function O_(){let ii=pa("secret");if(pn(ii)){let ei=ii.getAttribute("data-secret");pn(ei)&&(ii.innerText=ei)}}function ch(){let ii=pa("secret");if(pn(ii)){let ei=ii.getAttribute("data-secret");pn(ei)&&(ii.innerText="\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022")}}function L_(ii,ei){ii.set("hidden",!ii.get("hidden"));let ti=ii.get("hidden");ti?ch():O_(),D_(ti,ei)}function lh(ii){L_(Yf,ii.currentTarget)}function uh(){ch();for(let ii of Hi("button.toggle-secret"))ii.removeEventListener("click",lh),ii.addEventListener("click",lh)}function bl(){for(let ii of[Xf,Wf,eh,th,sh,nh,Jf,ah,uh])ii()}var Wc="netbox-color-mode";function M_(ii){return ii==="dark"||ii==="light"}function k_(ii){return localStorage.setItem(Wc,ii)}function N_(ii){var ti,ni;let ei=document.querySelector("body");ei&&ii=="dark"?ei.setAttribute("data-bs-theme","dark"):ei&&ei.setAttribute("data-bs-theme","light");for(let ri of Hi(".rack_elevation")){let oi=(ni=(ti=ri.contentDocument)==null?void 0:ti.querySelector("svg"))!=null?ni:null;oi!==null&&oi.setAttribute("data-bs-theme",ii)}}function $o(ii){k_(ii),N_(ii)}function R_(){let ii=localStorage.getItem(Wc);ii==="light"?$o("dark"):ii==="dark"?$o("light"):console.warn("Unable to determine the current color mode")}function I_(){let ii=localStorage.getItem(Wc);if(pn(ii))return $o(ii);let ei="none";for(let ti of["dark","light"])if(window.matchMedia(`(prefers-color-scheme: ${ti})`).matches){ei=ti;break}if(pn(ii)&&M_(ii))return $o(ii);switch(ei){case"dark":return $o("dark");case"light":return $o("light");case"none":return $o("light");default:return $o("light")}}function H_(){for(let ii of Hi("button.color-mode-toggle"))ii.addEventListener("click",R_)}function dh(){window.addEventListener("load",I_);for(let ii of[H_])ii()}function _l(){let ii=document.querySelectorAll("body > div#django-messages > div.toast");for(let ei of ii)if(ei!==null){let ti=new vo(ei);ti.isShown()||ti.show()}}var hh=cu(fh());function El(){for(let ii of Hi(".copy-content"))new hh.default(ii)}var wl=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Bo={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(ii){return typeof console!="undefined"&&console.warn(ii)},getWeek:function(ii){var ei=new Date(ii.getTime());ei.setHours(0,0,0,0),ei.setDate(ei.getDate()+3-(ei.getDay()+6)%7);var ti=new Date(ei.getFullYear(),0,4);return 1+Math.round(((ei.getTime()-ti.getTime())/864e5-3+(ti.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};var xl={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(ii){var ei=ii%100;if(ei>3&&ei<21)return"th";switch(ei%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},Tl=xl;var Rn=function(ii,ei){return ei===void 0&&(ei=2),("000"+ii).slice(ei*-1)},qn=function(ii){return ii===!0?1:0};function Yc(ii,ei){var ti;return function(){var ni=this,ri=arguments;clearTimeout(ti),ti=setTimeout(function(){return ii.apply(ni,ri)},ei)}}var Sl=function(ii){return ii instanceof Array?ii:[ii]};function In(ii,ei,ti){if(ti===!0)return ii.classList.add(ei);ii.classList.remove(ei)}function tn(ii,ei,ti){var ni=window.document.createElement(ii);return ei=ei||"",ti=ti||"",ni.className=ei,ti!==void 0&&(ni.textContent=ti),ni}function ya(ii){for(;ii.firstChild;)ii.removeChild(ii.firstChild)}function Gc(ii,ei){if(ei(ii))return ii;if(ii.parentNode)return Gc(ii.parentNode,ei)}function ba(ii,ei){var ti=tn("div","numInputWrapper"),ni=tn("input","numInput "+ii),ri=tn("span","arrowUp"),oi=tn("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?ni.type="number":(ni.type="text",ni.pattern="\\d*"),ei!==void 0)for(var si in ei)ni.setAttribute(si,ei[si]);return ti.appendChild(ni),ti.appendChild(ri),ti.appendChild(oi),ti}function Wn(ii){try{if(typeof ii.composedPath=="function"){var ei=ii.composedPath();return ei[0]}return ii.target}catch(ti){return ii.target}}var Kc=function(){},_a=function(ii,ei,ti){return ti.months[ei?"shorthand":"longhand"][ii]},ph={D:Kc,F:function(ii,ei,ti){ii.setMonth(ti.months.longhand.indexOf(ei))},G:function(ii,ei){ii.setHours((ii.getHours()>=12?12:0)+parseFloat(ei))},H:function(ii,ei){ii.setHours(parseFloat(ei))},J:function(ii,ei){ii.setDate(parseFloat(ei))},K:function(ii,ei,ti){ii.setHours(ii.getHours()%12+12*qn(new RegExp(ti.amPM[1],"i").test(ei)))},M:function(ii,ei,ti){ii.setMonth(ti.months.shorthand.indexOf(ei))},S:function(ii,ei){ii.setSeconds(parseFloat(ei))},U:function(ii,ei){return new Date(parseFloat(ei)*1e3)},W:function(ii,ei,ti){var ni=parseInt(ei),ri=new Date(ii.getFullYear(),0,2+(ni-1)*7,0,0,0,0);return ri.setDate(ri.getDate()-ri.getDay()+ti.firstDayOfWeek),ri},Y:function(ii,ei){ii.setFullYear(parseFloat(ei))},Z:function(ii,ei){return new Date(ei)},d:function(ii,ei){ii.setDate(parseFloat(ei))},h:function(ii,ei){ii.setHours((ii.getHours()>=12?12:0)+parseFloat(ei))},i:function(ii,ei){ii.setMinutes(parseFloat(ei))},j:function(ii,ei){ii.setDate(parseFloat(ei))},l:Kc,m:function(ii,ei){ii.setMonth(parseFloat(ei)-1)},n:function(ii,ei){ii.setMonth(parseFloat(ei)-1)},s:function(ii,ei){ii.setSeconds(parseFloat(ei))},u:function(ii,ei){return new Date(parseFloat(ei))},w:Kc,y:function(ii,ei){ii.setFullYear(2e3+parseFloat(ei))}},Eo={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},ks={Z:function(ii){return ii.toISOString()},D:function(ii,ei,ti){return ei.weekdays.shorthand[ks.w(ii,ei,ti)]},F:function(ii,ei,ti){return _a(ks.n(ii,ei,ti)-1,!1,ei)},G:function(ii,ei,ti){return Rn(ks.h(ii,ei,ti))},H:function(ii){return Rn(ii.getHours())},J:function(ii,ei){return ei.ordinal!==void 0?ii.getDate()+ei.ordinal(ii.getDate()):ii.getDate()},K:function(ii,ei){return ei.amPM[qn(ii.getHours()>11)]},M:function(ii,ei){return _a(ii.getMonth(),!0,ei)},S:function(ii){return Rn(ii.getSeconds())},U:function(ii){return ii.getTime()/1e3},W:function(ii,ei,ti){return ti.getWeek(ii)},Y:function(ii){return Rn(ii.getFullYear(),4)},d:function(ii){return Rn(ii.getDate())},h:function(ii){return ii.getHours()%12?ii.getHours()%12:12},i:function(ii){return Rn(ii.getMinutes())},j:function(ii){return ii.getDate()},l:function(ii,ei){return ei.weekdays.longhand[ii.getDay()]},m:function(ii){return Rn(ii.getMonth()+1)},n:function(ii){return ii.getMonth()+1},s:function(ii){return ii.getSeconds()},u:function(ii){return ii.getTime()},w:function(ii){return ii.getDay()},y:function(ii){return String(ii.getFullYear()).substring(2)}};var Qc=function(ii){var ei=ii.config,ti=ei===void 0?Bo:ei,ni=ii.l10n,ri=ni===void 0?xl:ni,oi=ii.isMobile,si=oi===void 0?!1:oi;return function(ai,li,ui){var ci=ui||ri;return ti.formatDate!==void 0&&!si?ti.formatDate(ai,li,ci):li.split("").map(function(di,pi,yi){return ks[di]&&yi[pi-1]!=="\\"?ks[di](ai,ci,ti):di!=="\\"?di:""}).join("")}},Cl=function(ii){var ei=ii.config,ti=ei===void 0?Bo:ei,ni=ii.l10n,ri=ni===void 0?xl:ni;return function(oi,si,ai,li){if(!(oi!==0&&!oi)){var ui=li||ri,ci,di=oi;if(oi instanceof Date)ci=new Date(oi.getTime());else if(typeof oi!="string"&&oi.toFixed!==void 0)ci=new Date(oi);else if(typeof oi=="string"){var pi=si||(ti||Bo).dateFormat,yi=String(oi).trim();if(yi==="today")ci=new Date,ai=!0;else if(ti&&ti.parseDate)ci=ti.parseDate(oi,pi);else if(/Z$/.test(yi)||/GMT$/.test(yi))ci=new Date(oi);else{for(var gi=void 0,vi=[],Ei=0,Ci=0,xi="";Ei<pi.length;Ei++){var Li=pi[Ei],Oi=Li==="\\",zi=pi[Ei-1]==="\\"||Oi;if(Eo[Li]&&!zi){xi+=Eo[Li];var Vi=new RegExp(xi).exec(oi);Vi&&(gi=!0)&&vi[Li!=="Y"?"push":"unshift"]({fn:ph[Li],val:Vi[++Ci]})}else Oi||(xi+=".")}ci=!ti||!ti.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),vi.forEach(function(ki){var Mi=ki.fn,Ai=ki.val;return ci=Mi(ci,Ai,ui)||ci}),ci=gi?ci:void 0}}if(!(ci instanceof Date&&!isNaN(ci.getTime()))){ti.errorHandler(new Error("Invalid date provided: "+di));return}return ai===!0&&ci.setHours(0,0,0,0),ci}}};function Un(ii,ei,ti){return ti===void 0&&(ti=!0),ti!==!1?new Date(ii.getTime()).setHours(0,0,0,0)-new Date(ei.getTime()).setHours(0,0,0,0):ii.getTime()-ei.getTime()}var mh=function(ii,ei,ti){return ii>Math.min(ei,ti)&&ii<Math.max(ei,ti)},Al=function(ii,ei,ti){return ii*3600+ei*60+ti},gh=function(ii){var ei=Math.floor(ii/3600),ti=(ii-ei*3600)/60;return[ei,ti,ii-ei*3600-ti*60]},vh={DAY:864e5};function Dl(ii){var ei=ii.defaultHour,ti=ii.defaultMinute,ni=ii.defaultSeconds;if(ii.minDate!==void 0){var ri=ii.minDate.getHours(),oi=ii.minDate.getMinutes(),si=ii.minDate.getSeconds();ei<ri&&(ei=ri),ei===ri&&ti<oi&&(ti=oi),ei===ri&&ti===oi&&ni<si&&(ni=ii.minDate.getSeconds())}if(ii.maxDate!==void 0){var ai=ii.maxDate.getHours(),li=ii.maxDate.getMinutes();ei=Math.min(ei,ai),ei===ai&&(ti=Math.min(li,ti)),ei===ai&&ti===li&&(ni=ii.maxDate.getSeconds())}return{hours:ei,minutes:ti,seconds:ni}}typeof Object.assign!="function"&&(Object.assign=function(ii){for(var ei=[],ti=1;ti<arguments.length;ti++)ei[ti-1]=arguments[ti];if(!ii)throw TypeError("Cannot convert undefined or null to object");for(var ni=function(ai){ai&&Object.keys(ai).forEach(function(li){return ii[li]=ai[li]})},ri=0,oi=ei;ri<oi.length;ri++){var si=oi[ri];ni(si)}return ii});var Hn=function(){return Hn=Object.assign||function(ii){for(var ei,ti=1,ni=arguments.length;ti<ni;ti++){ei=arguments[ti];for(var ri in ei)Object.prototype.hasOwnProperty.call(ei,ri)&&(ii[ri]=ei[ri])}return ii},Hn.apply(this,arguments)},yh=function(){for(var ii=0,ei=0,ti=arguments.length;ei<ti;ei++)ii+=arguments[ei].length;for(var ni=Array(ii),ri=0,ei=0;ei<ti;ei++)for(var oi=arguments[ei],si=0,ai=oi.length;si<ai;si++,ri++)ni[ri]=oi[si];return ni},P_=300;function F_(ii,ei){var ti={config:Hn(Hn({},Bo),xn.defaultConfig),l10n:Tl};ti.parseDate=Cl({config:ti.config,l10n:ti.l10n}),ti._handlers=[],ti.pluginElements=[],ti.loadedPlugins=[],ti._bind=vi,ti._setHoursFromDate=pi,ti._positionCalendar=Gn,ti.changeMonth=Ri,ti.changeYear=kn,ti.clear=Ii,ti.close=Ui,ti.onMouseOver=wo,ti._createElement=tn,ti.createDay=Vi,ti.destroy=ji,ti.isEnabled=yn,ti.jumpToDate=xi,ti.updateValue=lo,ti.open=xo,ti.redraw=Bs,ti.set=Ta,ti.setDate=Sa,ti.toggle=Fh;function ni(){ti.utils={getDaysInMonth:function(fi,hi){return fi===void 0&&(fi=ti.currentMonth),hi===void 0&&(hi=ti.currentYear),fi===1&&(hi%4===0&&hi%100!==0||hi%400===0)?29:ti.l10n.daysInMonth[fi]}}}function ri(){ti.element=ti.input=ii,ti.isOpen=!1,ls(),zn(),Hh(),Ih(),ni(),ti.isMobile||zi(),Ci(),(ti.selectedDates.length||ti.config.noCalendar)&&(ti.config.enableTime&&pi(ti.config.noCalendar?ti.latestSelectedDateObj:void 0),lo(!1)),ai();var fi=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!ti.isMobile&&fi&&Gn(),un("onReady")}function oi(){var fi;return((fi=ti.calendarContainer)===null||fi===void 0?void 0:fi.getRootNode()).activeElement||document.activeElement}function si(fi){return fi.bind(ti)}function ai(){var fi=ti.config;fi.weekNumbers===!1&&fi.showMonths===1||fi.noCalendar!==!0&&window.requestAnimationFrame(function(){if(ti.calendarContainer!==void 0&&(ti.calendarContainer.style.visibility="hidden",ti.calendarContainer.style.display="block"),ti.daysContainer!==void 0){var hi=(ti.days.offsetWidth+1)*fi.showMonths;ti.daysContainer.style.width=hi+"px",ti.calendarContainer.style.width=hi+(ti.weekWrapper!==void 0?ti.weekWrapper.offsetWidth:0)+"px",ti.calendarContainer.style.removeProperty("visibility"),ti.calendarContainer.style.removeProperty("display")}})}function li(fi){if(ti.selectedDates.length===0){var hi=ti.config.minDate===void 0||Un(new Date,ti.config.minDate)>=0?new Date:new Date(ti.config.minDate.getTime()),mi=Dl(ti.config);hi.setHours(mi.hours,mi.minutes,mi.seconds,hi.getMilliseconds()),ti.selectedDates=[hi],ti.latestSelectedDateObj=hi}fi!==void 0&&fi.type!=="blur"&&zh(fi);var _i=ti._input.value;di(),lo(),ti._input.value!==_i&&ti._debouncedChange()}function ui(fi,hi){return fi%12+12*qn(hi===ti.l10n.amPM[1])}function ci(fi){switch(fi%24){case 0:case 12:return 12;default:return fi%12}}function di(){if(!(ti.hourElement===void 0||ti.minuteElement===void 0)){var fi=(parseInt(ti.hourElement.value.slice(-2),10)||0)%24,hi=(parseInt(ti.minuteElement.value,10)||0)%60,mi=ti.secondElement!==void 0?(parseInt(ti.secondElement.value,10)||0)%60:0;ti.amPM!==void 0&&(fi=ui(fi,ti.amPM.textContent));var _i=ti.config.minTime!==void 0||ti.config.minDate&&ti.minDateHasTime&&ti.latestSelectedDateObj&&Un(ti.latestSelectedDateObj,ti.config.minDate,!0)===0,Ti=ti.config.maxTime!==void 0||ti.config.maxDate&&ti.maxDateHasTime&&ti.latestSelectedDateObj&&Un(ti.latestSelectedDateObj,ti.config.maxDate,!0)===0;if(ti.config.maxTime!==void 0&&ti.config.minTime!==void 0&&ti.config.minTime>ti.config.maxTime){var Ni=Al(ti.config.minTime.getHours(),ti.config.minTime.getMinutes(),ti.config.minTime.getSeconds()),Ki=Al(ti.config.maxTime.getHours(),ti.config.maxTime.getMinutes(),ti.config.maxTime.getSeconds()),$i=Al(fi,hi,mi);if($i>Ki&&$i<Ni){var Xi=gh(Ni);fi=Xi[0],hi=Xi[1],mi=Xi[2]}}else{if(Ti){var Fi=ti.config.maxTime!==void 0?ti.config.maxTime:ti.config.maxDate;fi=Math.min(fi,Fi.getHours()),fi===Fi.getHours()&&(hi=Math.min(hi,Fi.getMinutes())),hi===Fi.getMinutes()&&(mi=Math.min(mi,Fi.getSeconds()))}if(_i){var Gi=ti.config.minTime!==void 0?ti.config.minTime:ti.config.minDate;fi=Math.max(fi,Gi.getHours()),fi===Gi.getHours()&&hi<Gi.getMinutes()&&(hi=Gi.getMinutes()),hi===Gi.getMinutes()&&(mi=Math.max(mi,Gi.getSeconds()))}}yi(fi,hi,mi)}}function pi(fi){var hi=fi||ti.latestSelectedDateObj;hi&&hi instanceof Date&&yi(hi.getHours(),hi.getMinutes(),hi.getSeconds())}function yi(fi,hi,mi){ti.latestSelectedDateObj!==void 0&&ti.latestSelectedDateObj.setHours(fi%24,hi,mi||0,0),!(!ti.hourElement||!ti.minuteElement||ti.isMobile)&&(ti.hourElement.value=Rn(ti.config.time_24hr?fi:(12+fi)%12+12*qn(fi%12===0)),ti.minuteElement.value=Rn(hi),ti.amPM!==void 0&&(ti.amPM.textContent=ti.l10n.amPM[qn(fi>=12)]),ti.secondElement!==void 0&&(ti.secondElement.value=Rn(mi)))}function gi(fi){var hi=Wn(fi),mi=parseInt(hi.value)+(fi.delta||0);(mi/1e3>1||fi.key==="Enter"&&!/[^\d]/.test(mi.toString()))&&kn(mi)}function vi(fi,hi,mi,_i){if(hi instanceof Array)return hi.forEach(function(Ti){return vi(fi,Ti,mi,_i)});if(fi instanceof Array)return fi.forEach(function(Ti){return vi(Ti,hi,mi,_i)});fi.addEventListener(hi,mi,_i),ti._handlers.push({remove:function(){return fi.removeEventListener(hi,mi,_i)}})}function Ei(){un("onChange")}function Ci(){if(ti.config.wrap&&["open","close","toggle","clear"].forEach(function(mi){Array.prototype.forEach.call(ti.element.querySelectorAll("[data-"+mi+"]"),function(_i){return vi(_i,"click",ti[mi])})}),ti.isMobile){Ph();return}var fi=Yc(bn,50);if(ti._debouncedChange=Yc(Ei,P_),ti.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&vi(ti.daysContainer,"mouseover",function(mi){ti.config.mode==="range"&&wo(Wn(mi))}),vi(ti._input,"keydown",ro),ti.calendarContainer!==void 0&&vi(ti.calendarContainer,"keydown",ro),!ti.config.inline&&!ti.config.static&&vi(window,"resize",fi),window.ontouchstart!==void 0?vi(window.document,"touchstart",ln):vi(window.document,"mousedown",ln),vi(window.document,"focus",ln,{capture:!0}),ti.config.clickOpens===!0&&(vi(ti._input,"focus",ti.open),vi(ti._input,"click",ti.open)),ti.daysContainer!==void 0&&(vi(ti.monthNav,"click",Bh),vi(ti.monthNav,["keyup","increment"],gi),vi(ti.daysContainer,"click",ds)),ti.timeContainer!==void 0&&ti.minuteElement!==void 0&&ti.hourElement!==void 0){var hi=function(mi){return Wn(mi).select()};vi(ti.timeContainer,["increment"],li),vi(ti.timeContainer,"blur",li,{capture:!0}),vi(ti.timeContainer,"click",Li),vi([ti.hourElement,ti.minuteElement],["focus","click"],hi),ti.secondElement!==void 0&&vi(ti.secondElement,"focus",function(){return ti.secondElement&&ti.secondElement.select()}),ti.amPM!==void 0&&vi(ti.amPM,"click",function(mi){li(mi)})}ti.config.allowInput&&vi(ti._input,"blur",$s)}function xi(fi,hi){var mi=fi!==void 0?ti.parseDate(fi):ti.latestSelectedDateObj||(ti.config.minDate&&ti.config.minDate>ti.now?ti.config.minDate:ti.config.maxDate&&ti.config.maxDate<ti.now?ti.config.maxDate:ti.now),_i=ti.currentYear,Ti=ti.currentMonth;try{mi!==void 0&&(ti.currentYear=mi.getFullYear(),ti.currentMonth=mi.getMonth())}catch(Ni){Ni.message="Invalid date supplied: "+mi,ti.config.errorHandler(Ni)}hi&&ti.currentYear!==_i&&(un("onYearChange"),Ji()),hi&&(ti.currentYear!==_i||ti.currentMonth!==Ti)&&un("onMonthChange"),ti.redraw()}function Li(fi){var hi=Wn(fi);~hi.className.indexOf("arrow")&&Oi(fi,hi.classList.contains("arrowUp")?1:-1)}function Oi(fi,hi,mi){var _i=fi&&Wn(fi),Ti=mi||_i&&_i.parentNode&&_i.parentNode.firstChild,Ni=Rl("increment");Ni.delta=hi,Ti&&Ti.dispatchEvent(Ni)}function zi(){var fi=window.document.createDocumentFragment();if(ti.calendarContainer=tn("div","flatpickr-calendar"),ti.calendarContainer.tabIndex=-1,!ti.config.noCalendar){if(fi.appendChild(Zi()),ti.innerContainer=tn("div","flatpickr-innerContainer"),ti.config.weekNumbers){var hi=Yi(),mi=hi.weekWrapper,_i=hi.weekNumbers;ti.innerContainer.appendChild(mi),ti.weekNumbers=_i,ti.weekWrapper=mi}ti.rContainer=tn("div","flatpickr-rContainer"),ti.rContainer.appendChild(Mn()),ti.daysContainer||(ti.daysContainer=tn("div","flatpickr-days"),ti.daysContainer.tabIndex=-1),Qi(),ti.rContainer.appendChild(ti.daysContainer),ti.innerContainer.appendChild(ti.rContainer),fi.appendChild(ti.innerContainer)}ti.config.enableTime&&fi.appendChild(on()),In(ti.calendarContainer,"rangeMode",ti.config.mode==="range"),In(ti.calendarContainer,"animate",ti.config.animate===!0),In(ti.calendarContainer,"multiMonth",ti.config.showMonths>1),ti.calendarContainer.appendChild(fi);var Ti=ti.config.appendTo!==void 0&&ti.config.appendTo.nodeType!==void 0;if((ti.config.inline||ti.config.static)&&(ti.calendarContainer.classList.add(ti.config.inline?"inline":"static"),ti.config.inline&&(!Ti&&ti.element.parentNode?ti.element.parentNode.insertBefore(ti.calendarContainer,ti._input.nextSibling):ti.config.appendTo!==void 0&&ti.config.appendTo.appendChild(ti.calendarContainer)),ti.config.static)){var Ni=tn("div","flatpickr-wrapper");ti.element.parentNode&&ti.element.parentNode.insertBefore(Ni,ti.element),Ni.appendChild(ti.element),ti.altInput&&Ni.appendChild(ti.altInput),Ni.appendChild(ti.calendarContainer)}!ti.config.static&&!ti.config.inline&&(ti.config.appendTo!==void 0?ti.config.appendTo:window.document.body).appendChild(ti.calendarContainer)}function Vi(fi,hi,mi,_i){var Ti=yn(hi,!0),Ni=tn("span",fi,hi.getDate().toString());return Ni.dateObj=hi,Ni.$i=_i,Ni.setAttribute("aria-label",ti.formatDate(hi,ti.config.ariaDateFormat)),fi.indexOf("hidden")===-1&&Un(hi,ti.now)===0&&(ti.todayDateElem=Ni,Ni.classList.add("today"),Ni.setAttribute("aria-current","date")),Ti?(Ni.tabIndex=-1,Il(hi)&&(Ni.classList.add("selected"),ti.selectedDateElem=Ni,ti.config.mode==="range"&&(In(Ni,"startRange",ti.selectedDates[0]&&Un(hi,ti.selectedDates[0],!0)===0),In(Ni,"endRange",ti.selectedDates[1]&&Un(hi,ti.selectedDates[1],!0)===0),fi==="nextMonthDay"&&Ni.classList.add("inRange")))):Ni.classList.add("flatpickr-disabled"),ti.config.mode==="range"&&$h(hi)&&!Il(hi)&&Ni.classList.add("inRange"),ti.weekNumbers&&ti.config.showMonths===1&&fi!=="prevMonthDay"&&_i%7===6&&ti.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+ti.config.getWeek(hi)+"</span>"),un("onDayCreate",Ni),Ni}function ki(fi){fi.focus(),ti.config.mode==="range"&&wo(fi)}function Mi(fi){for(var hi=fi>0?0:ti.config.showMonths-1,mi=fi>0?ti.config.showMonths:-1,_i=hi;_i!=mi;_i+=fi)for(var Ti=ti.daysContainer.children[_i],Ni=fi>0?0:Ti.children.length-1,Ki=fi>0?Ti.children.length:-1,$i=Ni;$i!=Ki;$i+=fi){var Xi=Ti.children[$i];if(Xi.className.indexOf("hidden")===-1&&yn(Xi.dateObj))return Xi}}function Ai(fi,hi){for(var mi=fi.className.indexOf("Month")===-1?fi.dateObj.getMonth():ti.currentMonth,_i=hi>0?ti.config.showMonths:-1,Ti=hi>0?1:-1,Ni=mi-ti.currentMonth;Ni!=_i;Ni+=Ti)for(var Ki=ti.daysContainer.children[Ni],$i=mi-ti.currentMonth===Ni?fi.$i+hi:hi<0?Ki.children.length-1:0,Xi=Ki.children.length,Fi=$i;Fi>=0&&Fi<Xi&&Fi!=(hi>0?Xi:-1);Fi+=Ti){var Gi=Ki.children[Fi];if(Gi.className.indexOf("hidden")===-1&&yn(Gi.dateObj)&&Math.abs(fi.$i-Fi)>=Math.abs(hi))return ki(Gi)}ti.changeMonth(Ti),qi(Mi(Ti),0)}function qi(fi,hi){var mi=oi(),_i=Cn(mi||document.body),Ti=fi!==void 0?fi:_i?mi:ti.selectedDateElem!==void 0&&Cn(ti.selectedDateElem)?ti.selectedDateElem:ti.todayDateElem!==void 0&&Cn(ti.todayDateElem)?ti.todayDateElem:Mi(hi>0?1:-1);Ti===void 0?ti._input.focus():_i?Ai(Ti,hi):ki(Ti)}function Si(fi,hi){for(var mi=(new Date(fi,hi,1).getDay()-ti.l10n.firstDayOfWeek+7)%7,_i=ti.utils.getDaysInMonth((hi-1+12)%12,fi),Ti=ti.utils.getDaysInMonth(hi,fi),Ni=window.document.createDocumentFragment(),Ki=ti.config.showMonths>1,$i=Ki?"prevMonthDay hidden":"prevMonthDay",Xi=Ki?"nextMonthDay hidden":"nextMonthDay",Fi=_i+1-mi,Gi=0;Fi<=_i;Fi++,Gi++)Ni.appendChild(Vi("flatpickr-day "+$i,new Date(fi,hi-1,Fi),Fi,Gi));for(Fi=1;Fi<=Ti;Fi++,Gi++)Ni.appendChild(Vi("flatpickr-day",new Date(fi,hi,Fi),Fi,Gi));for(var nn=Ti+1;nn<=42-mi&&(ti.config.showMonths===1||Gi%7!==0);nn++,Gi++)Ni.appendChild(Vi("flatpickr-day "+Xi,new Date(fi,hi+1,nn%Ti),nn,Gi));var oo=tn("div","dayContainer");return oo.appendChild(Ni),oo}function Qi(){if(ti.daysContainer!==void 0){ya(ti.daysContainer),ti.weekNumbers&&ya(ti.weekNumbers);for(var fi=document.createDocumentFragment(),hi=0;hi<ti.config.showMonths;hi++){var mi=new Date(ti.currentYear,ti.currentMonth,1);mi.setMonth(ti.currentMonth+hi),fi.appendChild(Si(mi.getFullYear(),mi.getMonth()))}ti.daysContainer.appendChild(fi),ti.days=ti.daysContainer.firstChild,ti.config.mode==="range"&&ti.selectedDates.length===1&&wo()}}function Ji(){if(!(ti.config.showMonths>1||ti.config.monthSelectorType!=="dropdown")){var fi=function(_i){return ti.config.minDate!==void 0&&ti.currentYear===ti.config.minDate.getFullYear()&&_i<ti.config.minDate.getMonth()?!1:!(ti.config.maxDate!==void 0&&ti.currentYear===ti.config.maxDate.getFullYear()&&_i>ti.config.maxDate.getMonth())};ti.monthsDropdownContainer.tabIndex=-1,ti.monthsDropdownContainer.innerHTML="";for(var hi=0;hi<12;hi++)if(fi(hi)){var mi=tn("option","flatpickr-monthDropdown-month");mi.value=new Date(ti.currentYear,hi).getMonth().toString(),mi.textContent=_a(hi,ti.config.shorthandCurrentMonth,ti.l10n),mi.tabIndex=-1,ti.currentMonth===hi&&(mi.selected=!0),ti.monthsDropdownContainer.appendChild(mi)}}}function gn(){var fi=tn("div","flatpickr-month"),hi=window.document.createDocumentFragment(),mi;ti.config.showMonths>1||ti.config.monthSelectorType==="static"?mi=tn("span","cur-month"):(ti.monthsDropdownContainer=tn("select","flatpickr-monthDropdown-months"),ti.monthsDropdownContainer.setAttribute("aria-label",ti.l10n.monthAriaLabel),vi(ti.monthsDropdownContainer,"change",function(Ki){var $i=Wn(Ki),Xi=parseInt($i.value,10);ti.changeMonth(Xi-ti.currentMonth),un("onMonthChange")}),Ji(),mi=ti.monthsDropdownContainer);var _i=ba("cur-year",{tabindex:"-1"}),Ti=_i.getElementsByTagName("input")[0];Ti.setAttribute("aria-label",ti.l10n.yearAriaLabel),ti.config.minDate&&Ti.setAttribute("min",ti.config.minDate.getFullYear().toString()),ti.config.maxDate&&(Ti.setAttribute("max",ti.config.maxDate.getFullYear().toString()),Ti.disabled=!!ti.config.minDate&&ti.config.minDate.getFullYear()===ti.config.maxDate.getFullYear());var Ni=tn("div","flatpickr-current-month");return Ni.appendChild(mi),Ni.appendChild(_i),hi.appendChild(Ni),fi.appendChild(hi),{container:fi,yearElement:Ti,monthElement:mi}}function rn(){ya(ti.monthNav),ti.monthNav.appendChild(ti.prevMonthNav),ti.config.showMonths&&(ti.yearElements=[],ti.monthElements=[]);for(var fi=ti.config.showMonths;fi--;){var hi=gn();ti.yearElements.push(hi.yearElement),ti.monthElements.push(hi.monthElement),ti.monthNav.appendChild(hi.container)}ti.monthNav.appendChild(ti.nextMonthNav)}function Zi(){return ti.monthNav=tn("div","flatpickr-months"),ti.yearElements=[],ti.monthElements=[],ti.prevMonthNav=tn("span","flatpickr-prev-month"),ti.prevMonthNav.innerHTML=ti.config.prevArrow,ti.nextMonthNav=tn("span","flatpickr-next-month"),ti.nextMonthNav.innerHTML=ti.config.nextArrow,rn(),Object.defineProperty(ti,"_hidePrevMonthArrow",{get:function(){return ti.__hidePrevMonthArrow},set:function(fi){ti.__hidePrevMonthArrow!==fi&&(In(ti.prevMonthNav,"flatpickr-disabled",fi),ti.__hidePrevMonthArrow=fi)}}),Object.defineProperty(ti,"_hideNextMonthArrow",{get:function(){return ti.__hideNextMonthArrow},set:function(fi){ti.__hideNextMonthArrow!==fi&&(In(ti.nextMonthNav,"flatpickr-disabled",fi),ti.__hideNextMonthArrow=fi)}}),ti.currentYearElement=ti.yearElements[0],Ca(),ti.monthNav}function on(){ti.calendarContainer.classList.add("hasTime"),ti.config.noCalendar&&ti.calendarContainer.classList.add("noCalendar");var fi=Dl(ti.config);ti.timeContainer=tn("div","flatpickr-time"),ti.timeContainer.tabIndex=-1;var hi=tn("span","flatpickr-time-separator",":"),mi=ba("flatpickr-hour",{"aria-label":ti.l10n.hourAriaLabel});ti.hourElement=mi.getElementsByTagName("input")[0];var _i=ba("flatpickr-minute",{"aria-label":ti.l10n.minuteAriaLabel});if(ti.minuteElement=_i.getElementsByTagName("input")[0],ti.hourElement.tabIndex=ti.minuteElement.tabIndex=-1,ti.hourElement.value=Rn(ti.latestSelectedDateObj?ti.latestSelectedDateObj.getHours():ti.config.time_24hr?fi.hours:ci(fi.hours)),ti.minuteElement.value=Rn(ti.latestSelectedDateObj?ti.latestSelectedDateObj.getMinutes():fi.minutes),ti.hourElement.setAttribute("step",ti.config.hourIncrement.toString()),ti.minuteElement.setAttribute("step",ti.config.minuteIncrement.toString()),ti.hourElement.setAttribute("min",ti.config.time_24hr?"0":"1"),ti.hourElement.setAttribute("max",ti.config.time_24hr?"23":"12"),ti.hourElement.setAttribute("maxlength","2"),ti.minuteElement.setAttribute("min","0"),ti.minuteElement.setAttribute("max","59"),ti.minuteElement.setAttribute("maxlength","2"),ti.timeContainer.appendChild(mi),ti.timeContainer.appendChild(hi),ti.timeContainer.appendChild(_i),ti.config.time_24hr&&ti.timeContainer.classList.add("time24hr"),ti.config.enableSeconds){ti.timeContainer.classList.add("hasSeconds");var Ti=ba("flatpickr-second");ti.secondElement=Ti.getElementsByTagName("input")[0],ti.secondElement.value=Rn(ti.latestSelectedDateObj?ti.latestSelectedDateObj.getSeconds():fi.seconds),ti.secondElement.setAttribute("step",ti.minuteElement.getAttribute("step")),ti.secondElement.setAttribute("min","0"),ti.secondElement.setAttribute("max","59"),ti.secondElement.setAttribute("maxlength","2"),ti.timeContainer.appendChild(tn("span","flatpickr-time-separator",":")),ti.timeContainer.appendChild(Ti)}return ti.config.time_24hr||(ti.amPM=tn("span","flatpickr-am-pm",ti.l10n.amPM[qn((ti.latestSelectedDateObj?ti.hourElement.value:ti.config.defaultHour)>11)]),ti.amPM.title=ti.l10n.toggleTitle,ti.amPM.tabIndex=-1,ti.timeContainer.appendChild(ti.amPM)),ti.timeContainer}function Mn(){ti.weekdayContainer?ya(ti.weekdayContainer):ti.weekdayContainer=tn("div","flatpickr-weekdays");for(var fi=ti.config.showMonths;fi--;){var hi=tn("div","flatpickr-weekdaycontainer");ti.weekdayContainer.appendChild(hi)}return vn(),ti.weekdayContainer}function vn(){if(ti.weekdayContainer){var fi=ti.l10n.firstDayOfWeek,hi=yh(ti.l10n.weekdays.shorthand);fi>0&&fi<hi.length&&(hi=yh(hi.splice(fi,hi.length),hi.splice(0,fi)));for(var mi=ti.config.showMonths;mi--;)ti.weekdayContainer.children[mi].innerHTML=`
<span class='flatpickr-weekday'>
`+hi.join("</span><span class='flatpickr-weekday'>")+`
</span>
`}}function Yi(){ti.calendarContainer.classList.add("hasWeeks");var fi=tn("div","flatpickr-weekwrapper");fi.appendChild(tn("span","flatpickr-weekday",ti.l10n.weekAbbreviation));var hi=tn("div","flatpickr-weeks");return fi.appendChild(hi),{weekWrapper:fi,weekNumbers:hi}}function Ri(fi,hi){hi===void 0&&(hi=!0);var mi=hi?fi:fi-ti.currentMonth;mi<0&&ti._hidePrevMonthArrow===!0||mi>0&&ti._hideNextMonthArrow===!0||(ti.currentMonth+=mi,(ti.currentMonth<0||ti.currentMonth>11)&&(ti.currentYear+=ti.currentMonth>11?1:-1,ti.currentMonth=(ti.currentMonth+12)%12,un("onYearChange"),Ji()),Qi(),un("onMonthChange"),Ca())}function Ii(fi,hi){if(fi===void 0&&(fi=!0),hi===void 0&&(hi=!0),ti.input.value="",ti.altInput!==void 0&&(ti.altInput.value=""),ti.mobileInput!==void 0&&(ti.mobileInput.value=""),ti.selectedDates=[],ti.latestSelectedDateObj=void 0,hi===!0&&(ti.currentYear=ti._initialDate.getFullYear(),ti.currentMonth=ti._initialDate.getMonth()),ti.config.enableTime===!0){var mi=Dl(ti.config),_i=mi.hours,Ti=mi.minutes,Ni=mi.seconds;yi(_i,Ti,Ni)}ti.redraw(),fi&&un("onChange")}function Ui(){ti.isOpen=!1,ti.isMobile||(ti.calendarContainer!==void 0&&ti.calendarContainer.classList.remove("open"),ti._input!==void 0&&ti._input.classList.remove("active")),un("onClose")}function ji(){ti.config!==void 0&&un("onDestroy");for(var fi=ti._handlers.length;fi--;)ti._handlers[fi].remove();if(ti._handlers=[],ti.mobileInput)ti.mobileInput.parentNode&&ti.mobileInput.parentNode.removeChild(ti.mobileInput),ti.mobileInput=void 0;else if(ti.calendarContainer&&ti.calendarContainer.parentNode)if(ti.config.static&&ti.calendarContainer.parentNode){var hi=ti.calendarContainer.parentNode;if(hi.lastChild&&hi.removeChild(hi.lastChild),hi.parentNode){for(;hi.firstChild;)hi.parentNode.insertBefore(hi.firstChild,hi);hi.parentNode.removeChild(hi)}}else ti.calendarContainer.parentNode.removeChild(ti.calendarContainer);ti.altInput&&(ti.input.type="text",ti.altInput.parentNode&&ti.altInput.parentNode.removeChild(ti.altInput),delete ti.altInput),ti.input&&(ti.input.type=ti.input._type,ti.input.classList.remove("flatpickr-input"),ti.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(mi){try{delete ti[mi]}catch(_i){}})}function Pi(fi){return ti.calendarContainer.contains(fi)}function ln(fi){if(ti.isOpen&&!ti.config.inline){var hi=Wn(fi),mi=Pi(hi),_i=hi===ti.input||hi===ti.altInput||ti.element.contains(hi)||fi.path&&fi.path.indexOf&&(~fi.path.indexOf(ti.input)||~fi.path.indexOf(ti.altInput)),Ti=!_i&&!mi&&!Pi(fi.relatedTarget),Ni=!ti.config.ignoredFocusElements.some(function(Ki){return Ki.contains(hi)});Ti&&Ni&&(ti.config.allowInput&&ti.setDate(ti._input.value,!1,ti.config.altInput?ti.config.altFormat:ti.config.dateFormat),ti.timeContainer!==void 0&&ti.minuteElement!==void 0&&ti.hourElement!==void 0&&ti.input.value!==""&&ti.input.value!==void 0&&li(),ti.close(),ti.config&&ti.config.mode==="range"&&ti.selectedDates.length===1&&ti.clear(!1))}}function kn(fi){if(!(!fi||ti.config.minDate&&fi<ti.config.minDate.getFullYear()||ti.config.maxDate&&fi>ti.config.maxDate.getFullYear())){var hi=fi,mi=ti.currentYear!==hi;ti.currentYear=hi||ti.currentYear,ti.config.maxDate&&ti.currentYear===ti.config.maxDate.getFullYear()?ti.currentMonth=Math.min(ti.config.maxDate.getMonth(),ti.currentMonth):ti.config.minDate&&ti.currentYear===ti.config.minDate.getFullYear()&&(ti.currentMonth=Math.max(ti.config.minDate.getMonth(),ti.currentMonth)),mi&&(ti.redraw(),un("onYearChange"),Ji())}}function yn(fi,hi){var mi;hi===void 0&&(hi=!0);var _i=ti.parseDate(fi,void 0,hi);if(ti.config.minDate&&_i&&Un(_i,ti.config.minDate,hi!==void 0?hi:!ti.minDateHasTime)<0||ti.config.maxDate&&_i&&Un(_i,ti.config.maxDate,hi!==void 0?hi:!ti.maxDateHasTime)>0)return!1;if(!ti.config.enable&&ti.config.disable.length===0)return!0;if(_i===void 0)return!1;for(var Ti=!!ti.config.enable,Ni=(mi=ti.config.enable)!==null&&mi!==void 0?mi:ti.config.disable,Ki=0,$i=void 0;Ki<Ni.length;Ki++){if($i=Ni[Ki],typeof $i=="function"&&$i(_i))return Ti;if($i instanceof Date&&_i!==void 0&&$i.getTime()===_i.getTime())return Ti;if(typeof $i=="string"){var Xi=ti.parseDate($i,void 0,!0);return Xi&&Xi.getTime()===_i.getTime()?Ti:!Ti}else if(typeof $i=="object"&&_i!==void 0&&$i.from&&$i.to&&_i.getTime()>=$i.from.getTime()&&_i.getTime()<=$i.to.getTime())return Ti}return!Ti}function Cn(fi){return ti.daysContainer!==void 0?fi.className.indexOf("hidden")===-1&&fi.className.indexOf("flatpickr-disabled")===-1&&ti.daysContainer.contains(fi):!1}function $s(fi){var hi=fi.target===ti._input,mi=ti._input.value.trimEnd()!==Hl();hi&&mi&&!(fi.relatedTarget&&Pi(fi.relatedTarget))&&ti.setDate(ti._input.value,!0,fi.target===ti.altInput?ti.config.altFormat:ti.config.dateFormat)}function ro(fi){var hi=Wn(fi),mi=ti.config.wrap?ii.contains(hi):hi===ti._input,_i=ti.config.allowInput,Ti=ti.isOpen&&(!_i||!mi),Ni=ti.config.inline&&mi&&!_i;if(fi.keyCode===13&&mi){if(_i)return ti.setDate(ti._input.value,!0,hi===ti.altInput?ti.config.altFormat:ti.config.dateFormat),ti.close(),hi.blur();ti.open()}else if(Pi(hi)||Ti||Ni){var Ki=!!ti.timeContainer&&ti.timeContainer.contains(hi);switch(fi.keyCode){case 13:Ki?(fi.preventDefault(),li(),us()):ds(fi);break;case 27:fi.preventDefault(),us();break;case 8:case 46:mi&&!ti.config.allowInput&&(fi.preventDefault(),ti.clear());break;case 37:case 39:if(!Ki&&!mi){fi.preventDefault();var $i=oi();if(ti.daysContainer!==void 0&&(_i===!1||$i&&Cn($i))){var Xi=fi.keyCode===39?1:-1;fi.ctrlKey?(fi.stopPropagation(),Ri(Xi),qi(Mi(1),0)):qi(void 0,Xi)}}else ti.hourElement&&ti.hourElement.focus();break;case 38:case 40:fi.preventDefault();var Fi=fi.keyCode===40?1:-1;ti.daysContainer&&hi.$i!==void 0||hi===ti.input||hi===ti.altInput?fi.ctrlKey?(fi.stopPropagation(),kn(ti.currentYear-Fi),qi(Mi(1),0)):Ki||qi(void 0,Fi*7):hi===ti.currentYearElement?kn(ti.currentYear-Fi):ti.config.enableTime&&(!Ki&&ti.hourElement&&ti.hourElement.focus(),li(fi),ti._debouncedChange());break;case 9:if(Ki){var Gi=[ti.hourElement,ti.minuteElement,ti.secondElement,ti.amPM].concat(ti.pluginElements).filter(function(Kn){return Kn}),nn=Gi.indexOf(hi);if(nn!==-1){var oo=Gi[nn+(fi.shiftKey?-1:1)];fi.preventDefault(),(oo||ti._input).focus()}}else!ti.config.noCalendar&&ti.daysContainer&&ti.daysContainer.contains(hi)&&fi.shiftKey&&(fi.preventDefault(),ti._input.focus());break;default:break}}if(ti.amPM!==void 0&&hi===ti.amPM)switch(fi.key){case ti.l10n.amPM[0].charAt(0):case ti.l10n.amPM[0].charAt(0).toLowerCase():ti.amPM.textContent=ti.l10n.amPM[0],di(),lo();break;case ti.l10n.amPM[1].charAt(0):case ti.l10n.amPM[1].charAt(0).toLowerCase():ti.amPM.textContent=ti.l10n.amPM[1],di(),lo();break}(mi||Pi(hi))&&un("onKeyDown",fi)}function wo(fi,hi){if(hi===void 0&&(hi="flatpickr-day"),!(ti.selectedDates.length!==1||fi&&(!fi.classList.contains(hi)||fi.classList.contains("flatpickr-disabled")))){for(var mi=fi?fi.dateObj.getTime():ti.days.firstElementChild.dateObj.getTime(),_i=ti.parseDate(ti.selectedDates[0],void 0,!0).getTime(),Ti=Math.min(mi,ti.selectedDates[0].getTime()),Ni=Math.max(mi,ti.selectedDates[0].getTime()),Ki=!1,$i=0,Xi=0,Fi=Ti;Fi<Ni;Fi+=vh.DAY)yn(new Date(Fi),!0)||(Ki=Ki||Fi>Ti&&Fi<Ni,Fi<_i&&(!$i||Fi>$i)?$i=Fi:Fi>_i&&(!Xi||Fi<Xi)&&(Xi=Fi));var Gi=Array.from(ti.rContainer.querySelectorAll("*:nth-child(-n+"+ti.config.showMonths+") > ."+hi));Gi.forEach(function(nn){var oo=nn.dateObj,Kn=oo.getTime(),Vs=$i>0&&Kn<$i||Xi>0&&Kn>Xi;if(Vs){nn.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(fs){nn.classList.remove(fs)});return}else if(Ki&&!Vs)return;["startRange","inRange","endRange","notAllowed"].forEach(function(fs){nn.classList.remove(fs)}),fi!==void 0&&(fi.classList.add(mi<=ti.selectedDates[0].getTime()?"startRange":"endRange"),_i<mi&&Kn===_i?nn.classList.add("startRange"):_i>mi&&Kn===_i&&nn.classList.add("endRange"),Kn>=$i&&(Xi===0||Kn<=Xi)&&mh(Kn,_i,mi)&&nn.classList.add("inRange"))})}}function bn(){ti.isOpen&&!ti.config.static&&!ti.config.inline&&Gn()}function xo(fi,hi){if(hi===void 0&&(hi=ti._positionElement),ti.isMobile===!0){if(fi){fi.preventDefault();var mi=Wn(fi);mi&&mi.blur()}ti.mobileInput!==void 0&&(ti.mobileInput.focus(),ti.mobileInput.click()),un("onOpen");return}else if(ti._input.disabled||ti.config.inline)return;var _i=ti.isOpen;ti.isOpen=!0,_i||(ti.calendarContainer.classList.add("open"),ti._input.classList.add("active"),un("onOpen"),Gn(hi)),ti.config.enableTime===!0&&ti.config.noCalendar===!0&&ti.config.allowInput===!1&&(fi===void 0||!ti.timeContainer.contains(fi.relatedTarget))&&setTimeout(function(){return ti.hourElement.select()},50)}function ao(fi){return function(hi){var mi=ti.config["_"+fi+"Date"]=ti.parseDate(hi,ti.config.dateFormat),_i=ti.config["_"+(fi==="min"?"max":"min")+"Date"];mi!==void 0&&(ti[fi==="min"?"minDateHasTime":"maxDateHasTime"]=mi.getHours()>0||mi.getMinutes()>0||mi.getSeconds()>0),ti.selectedDates&&(ti.selectedDates=ti.selectedDates.filter(function(Ti){return yn(Ti)}),!ti.selectedDates.length&&fi==="min"&&pi(mi),lo()),ti.daysContainer&&(Bs(),mi!==void 0?ti.currentYearElement[fi]=mi.getFullYear().toString():ti.currentYearElement.removeAttribute(fi),ti.currentYearElement.disabled=!!_i&&mi!==void 0&&_i.getFullYear()===mi.getFullYear())}}function ls(){var fi=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],hi=Hn(Hn({},JSON.parse(JSON.stringify(ii.dataset||{}))),ei),mi={};ti.config.parseDate=hi.parseDate,ti.config.formatDate=hi.formatDate,Object.defineProperty(ti.config,"enable",{get:function(){return ti.config._enable},set:function(Gi){ti.config._enable=nu(Gi)}}),Object.defineProperty(ti.config,"disable",{get:function(){return ti.config._disable},set:function(Gi){ti.config._disable=nu(Gi)}});var _i=hi.mode==="time";if(!hi.dateFormat&&(hi.enableTime||_i)){var Ti=xn.defaultConfig.dateFormat||Bo.dateFormat;mi.dateFormat=hi.noCalendar||_i?"H:i"+(hi.enableSeconds?":S":""):Ti+" H:i"+(hi.enableSeconds?":S":"")}if(hi.altInput&&(hi.enableTime||_i)&&!hi.altFormat){var Ni=xn.defaultConfig.altFormat||Bo.altFormat;mi.altFormat=hi.noCalendar||_i?"h:i"+(hi.enableSeconds?":S K":" K"):Ni+(" h:i"+(hi.enableSeconds?":S":"")+" K")}Object.defineProperty(ti.config,"minDate",{get:function(){return ti.config._minDate},set:ao("min")}),Object.defineProperty(ti.config,"maxDate",{get:function(){return ti.config._maxDate},set:ao("max")});var Ki=function(Gi){return function(nn){ti.config[Gi==="min"?"_minTime":"_maxTime"]=ti.parseDate(nn,"H:i:S")}};Object.defineProperty(ti.config,"minTime",{get:function(){return ti.config._minTime},set:Ki("min")}),Object.defineProperty(ti.config,"maxTime",{get:function(){return ti.config._maxTime},set:Ki("max")}),hi.mode==="time"&&(ti.config.noCalendar=!0,ti.config.enableTime=!0),Object.assign(ti.config,mi,hi);for(var $i=0;$i<fi.length;$i++)ti.config[fi[$i]]=ti.config[fi[$i]]===!0||ti.config[fi[$i]]==="true";wl.filter(function(Gi){return ti.config[Gi]!==void 0}).forEach(function(Gi){ti.config[Gi]=Sl(ti.config[Gi]||[]).map(si)}),ti.isMobile=!ti.config.disableMobile&&!ti.config.inline&&ti.config.mode==="single"&&!ti.config.disable.length&&!ti.config.enable&&!ti.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var $i=0;$i<ti.config.plugins.length;$i++){var Xi=ti.config.plugins[$i](ti)||{};for(var Fi in Xi)wl.indexOf(Fi)>-1?ti.config[Fi]=Sl(Xi[Fi]).map(si).concat(ti.config[Fi]):typeof hi[Fi]=="undefined"&&(ti.config[Fi]=Xi[Fi])}hi.altInputClass||(ti.config.altInputClass=On().className+" "+ti.config.altInputClass),un("onParseConfig")}function On(){return ti.config.wrap?ii.querySelector("[data-input]"):ii}function zn(){typeof ti.config.locale!="object"&&typeof xn.l10ns[ti.config.locale]=="undefined"&&ti.config.errorHandler(new Error("flatpickr: invalid locale "+ti.config.locale)),ti.l10n=Hn(Hn({},xn.l10ns.default),typeof ti.config.locale=="object"?ti.config.locale:ti.config.locale!=="default"?xn.l10ns[ti.config.locale]:void 0),Eo.D="("+ti.l10n.weekdays.shorthand.join("|")+")",Eo.l="("+ti.l10n.weekdays.longhand.join("|")+")",Eo.M="("+ti.l10n.months.shorthand.join("|")+")",Eo.F="("+ti.l10n.months.longhand.join("|")+")",Eo.K="("+ti.l10n.amPM[0]+"|"+ti.l10n.amPM[1]+"|"+ti.l10n.amPM[0].toLowerCase()+"|"+ti.l10n.amPM[1].toLowerCase()+")";var fi=Hn(Hn({},ei),JSON.parse(JSON.stringify(ii.dataset||{})));fi.time_24hr===void 0&&xn.defaultConfig.time_24hr===void 0&&(ti.config.time_24hr=ti.l10n.time_24hr),ti.formatDate=Qc(ti),ti.parseDate=Cl({config:ti.config,l10n:ti.l10n})}function Gn(fi){if(typeof ti.config.position=="function")return void ti.config.position(ti,fi);if(ti.calendarContainer!==void 0){un("onPreCalendarPosition");var hi=fi||ti._positionElement,mi=Array.prototype.reduce.call(ti.calendarContainer.children,function(Kh,Qh){return Kh+Qh.offsetHeight},0),_i=ti.calendarContainer.offsetWidth,Ti=ti.config.position.split(" "),Ni=Ti[0],Ki=Ti.length>1?Ti[1]:null,$i=hi.getBoundingClientRect(),Xi=window.innerHeight-$i.bottom,Fi=Ni==="above"||Ni!=="below"&&Xi<mi&&$i.top>mi,Gi=window.pageYOffset+$i.top+(Fi?-mi-2:hi.offsetHeight+2);if(In(ti.calendarContainer,"arrowTop",!Fi),In(ti.calendarContainer,"arrowBottom",Fi),!ti.config.inline){var nn=window.pageXOffset+$i.left,oo=!1,Kn=!1;Ki==="center"?(nn-=(_i-$i.width)/2,oo=!0):Ki==="right"&&(nn-=_i-$i.width,Kn=!0),In(ti.calendarContainer,"arrowLeft",!oo&&!Kn),In(ti.calendarContainer,"arrowCenter",oo),In(ti.calendarContainer,"arrowRight",Kn);var Vs=window.document.body.offsetWidth-(window.pageXOffset+$i.right),fs=nn+_i>window.document.body.offsetWidth,Vh=Vs+_i>window.document.body.offsetWidth;if(In(ti.calendarContainer,"rightMost",fs),!ti.config.static)if(ti.calendarContainer.style.top=Gi+"px",!fs)ti.calendarContainer.style.left=nn+"px",ti.calendarContainer.style.right="auto";else if(!Vh)ti.calendarContainer.style.left="auto",ti.calendarContainer.style.right=Vs+"px";else{var Pl=Jn();if(Pl===void 0)return;var jh=window.document.body.offsetWidth,qh=Math.max(0,jh/2-_i/2),Wh=".flatpickr-calendar.centerMost:before",Uh=".flatpickr-calendar.centerMost:after",Yh=Pl.cssRules.length,Gh="{left:"+$i.left+"px;right:auto;}";In(ti.calendarContainer,"rightMost",!1),In(ti.calendarContainer,"centerMost",!0),Pl.insertRule(Wh+","+Uh+Gh,Yh),ti.calendarContainer.style.left=qh+"px",ti.calendarContainer.style.right="auto"}}}}function Jn(){for(var fi=null,hi=0;hi<document.styleSheets.length;hi++){var mi=document.styleSheets[hi];if(mi.cssRules){try{mi.cssRules}catch(_i){continue}fi=mi;break}}return fi!=null?fi:cs()}function cs(){var fi=document.createElement("style");return document.head.appendChild(fi),fi.sheet}function Bs(){ti.config.noCalendar||ti.isMobile||(Ji(),Ca(),Qi())}function us(){ti._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(ti.close,0):ti.close()}function ds(fi){fi.preventDefault(),fi.stopPropagation();var hi=function(Gi){return Gi.classList&&Gi.classList.contains("flatpickr-day")&&!Gi.classList.contains("flatpickr-disabled")&&!Gi.classList.contains("notAllowed")},mi=Gc(Wn(fi),hi);if(mi!==void 0){var _i=mi,Ti=ti.latestSelectedDateObj=new Date(_i.dateObj.getTime()),Ni=(Ti.getMonth()<ti.currentMonth||Ti.getMonth()>ti.currentMonth+ti.config.showMonths-1)&&ti.config.mode!=="range";if(ti.selectedDateElem=_i,ti.config.mode==="single")ti.selectedDates=[Ti];else if(ti.config.mode==="multiple"){var Ki=Il(Ti);Ki?ti.selectedDates.splice(parseInt(Ki),1):ti.selectedDates.push(Ti)}else ti.config.mode==="range"&&(ti.selectedDates.length===2&&ti.clear(!1,!1),ti.latestSelectedDateObj=Ti,ti.selectedDates.push(Ti),Un(Ti,ti.selectedDates[0],!0)!==0&&ti.selectedDates.sort(function(Gi,nn){return Gi.getTime()-nn.getTime()}));if(di(),Ni){var $i=ti.currentYear!==Ti.getFullYear();ti.currentYear=Ti.getFullYear(),ti.currentMonth=Ti.getMonth(),$i&&(un("onYearChange"),Ji()),un("onMonthChange")}if(Ca(),Qi(),lo(),!Ni&&ti.config.mode!=="range"&&ti.config.showMonths===1?ki(_i):ti.selectedDateElem!==void 0&&ti.hourElement===void 0&&ti.selectedDateElem&&ti.selectedDateElem.focus(),ti.hourElement!==void 0&&ti.hourElement!==void 0&&ti.hourElement.focus(),ti.config.closeOnSelect){var Xi=ti.config.mode==="single"&&!ti.config.enableTime,Fi=ti.config.mode==="range"&&ti.selectedDates.length===2&&!ti.config.enableTime;(Xi||Fi)&&us()}Ei()}}var Vo={locale:[zn,vn],showMonths:[rn,ai,Mn],minDate:[xi],maxDate:[xi],positionElement:[ru],clickOpens:[function(){ti.config.clickOpens===!0?(vi(ti._input,"focus",ti.open),vi(ti._input,"click",ti.open)):(ti._input.removeEventListener("focus",ti.open),ti._input.removeEventListener("click",ti.open))}]};function Ta(fi,hi){if(fi!==null&&typeof fi=="object"){Object.assign(ti.config,fi);for(var mi in fi)Vo[mi]!==void 0&&Vo[mi].forEach(function(_i){return _i()})}else ti.config[fi]=hi,Vo[fi]!==void 0?Vo[fi].forEach(function(_i){return _i()}):wl.indexOf(fi)>-1&&(ti.config[fi]=Sl(hi));ti.redraw(),lo(!0)}function zs(fi,hi){var mi=[];if(fi instanceof Array)mi=fi.map(function(_i){return ti.parseDate(_i,hi)});else if(fi instanceof Date||typeof fi=="number")mi=[ti.parseDate(fi,hi)];else if(typeof fi=="string")switch(ti.config.mode){case"single":case"time":mi=[ti.parseDate(fi,hi)];break;case"multiple":mi=fi.split(ti.config.conjunction).map(function(_i){return ti.parseDate(_i,hi)});break;case"range":mi=fi.split(ti.l10n.rangeSeparator).map(function(_i){return ti.parseDate(_i,hi)});break;default:break}else ti.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(fi)));ti.selectedDates=ti.config.allowInvalidPreload?mi:mi.filter(function(_i){return _i instanceof Date&&yn(_i,!1)}),ti.config.mode==="range"&&ti.selectedDates.sort(function(_i,Ti){return _i.getTime()-Ti.getTime()})}function Sa(fi,hi,mi){if(hi===void 0&&(hi=!1),mi===void 0&&(mi=ti.config.dateFormat),fi!==0&&!fi||fi instanceof Array&&fi.length===0)return ti.clear(hi);zs(fi,mi),ti.latestSelectedDateObj=ti.selectedDates[ti.selectedDates.length-1],ti.redraw(),xi(void 0,hi),pi(),ti.selectedDates.length===0&&ti.clear(!1),lo(hi),hi&&un("onChange")}function nu(fi){return fi.slice().map(function(hi){return typeof hi=="string"||typeof hi=="number"||hi instanceof Date?ti.parseDate(hi,void 0,!0):hi&&typeof hi=="object"&&hi.from&&hi.to?{from:ti.parseDate(hi.from,void 0),to:ti.parseDate(hi.to,void 0)}:hi}).filter(function(hi){return hi})}function Ih(){ti.selectedDates=[],ti.now=ti.parseDate(ti.config.now)||new Date;var fi=ti.config.defaultDate||((ti.input.nodeName==="INPUT"||ti.input.nodeName==="TEXTAREA")&&ti.input.placeholder&&ti.input.value===ti.input.placeholder?null:ti.input.value);fi&&zs(fi,ti.config.dateFormat),ti._initialDate=ti.selectedDates.length>0?ti.selectedDates[0]:ti.config.minDate&&ti.config.minDate.getTime()>ti.now.getTime()?ti.config.minDate:ti.config.maxDate&&ti.config.maxDate.getTime()<ti.now.getTime()?ti.config.maxDate:ti.now,ti.currentYear=ti._initialDate.getFullYear(),ti.currentMonth=ti._initialDate.getMonth(),ti.selectedDates.length>0&&(ti.latestSelectedDateObj=ti.selectedDates[0]),ti.config.minTime!==void 0&&(ti.config.minTime=ti.parseDate(ti.config.minTime,"H:i")),ti.config.maxTime!==void 0&&(ti.config.maxTime=ti.parseDate(ti.config.maxTime,"H:i")),ti.minDateHasTime=!!ti.config.minDate&&(ti.config.minDate.getHours()>0||ti.config.minDate.getMinutes()>0||ti.config.minDate.getSeconds()>0),ti.maxDateHasTime=!!ti.config.maxDate&&(ti.config.maxDate.getHours()>0||ti.config.maxDate.getMinutes()>0||ti.config.maxDate.getSeconds()>0)}function Hh(){if(ti.input=On(),!ti.input){ti.config.errorHandler(new Error("Invalid input element specified"));return}ti.input._type=ti.input.type,ti.input.type="text",ti.input.classList.add("flatpickr-input"),ti._input=ti.input,ti.config.altInput&&(ti.altInput=tn(ti.input.nodeName,ti.config.altInputClass),ti._input=ti.altInput,ti.altInput.placeholder=ti.input.placeholder,ti.altInput.disabled=ti.input.disabled,ti.altInput.required=ti.input.required,ti.altInput.tabIndex=ti.input.tabIndex,ti.altInput.type="text",ti.input.setAttribute("type","hidden"),!ti.config.static&&ti.input.parentNode&&ti.input.parentNode.insertBefore(ti.altInput,ti.input.nextSibling)),ti.config.allowInput||ti._input.setAttribute("readonly","readonly"),ru()}function ru(){ti._positionElement=ti.config.positionElement||ti._input}function Ph(){var fi=ti.config.enableTime?ti.config.noCalendar?"time":"datetime-local":"date";ti.mobileInput=tn("input",ti.input.className+" flatpickr-mobile"),ti.mobileInput.tabIndex=1,ti.mobileInput.type=fi,ti.mobileInput.disabled=ti.input.disabled,ti.mobileInput.required=ti.input.required,ti.mobileInput.placeholder=ti.input.placeholder,ti.mobileFormatStr=fi==="datetime-local"?"Y-m-d\\TH:i:S":fi==="date"?"Y-m-d":"H:i:S",ti.selectedDates.length>0&&(ti.mobileInput.defaultValue=ti.mobileInput.value=ti.formatDate(ti.selectedDates[0],ti.mobileFormatStr)),ti.config.minDate&&(ti.mobileInput.min=ti.formatDate(ti.config.minDate,"Y-m-d")),ti.config.maxDate&&(ti.mobileInput.max=ti.formatDate(ti.config.maxDate,"Y-m-d")),ti.input.getAttribute("step")&&(ti.mobileInput.step=String(ti.input.getAttribute("step"))),ti.input.type="hidden",ti.altInput!==void 0&&(ti.altInput.type="hidden");try{ti.input.parentNode&&ti.input.parentNode.insertBefore(ti.mobileInput,ti.input.nextSibling)}catch(hi){}vi(ti.mobileInput,"change",function(hi){ti.setDate(Wn(hi).value,!1,ti.mobileFormatStr),un("onChange"),un("onClose")})}function Fh(fi){if(ti.isOpen===!0)return ti.close();ti.open(fi)}function un(fi,hi){if(ti.config!==void 0){var mi=ti.config[fi];if(mi!==void 0&&mi.length>0)for(var _i=0;mi[_i]&&_i<mi.length;_i++)mi[_i](ti.selectedDates,ti.input.value,ti,hi);fi==="onChange"&&(ti.input.dispatchEvent(Rl("change")),ti.input.dispatchEvent(Rl("input")))}}function Rl(fi){var hi=document.createEvent("Event");return hi.initEvent(fi,!0,!0),hi}function Il(fi){for(var hi=0;hi<ti.selectedDates.length;hi++){var mi=ti.selectedDates[hi];if(mi instanceof Date&&Un(mi,fi)===0)return""+hi}return!1}function $h(fi){return ti.config.mode!=="range"||ti.selectedDates.length<2?!1:Un(fi,ti.selectedDates[0])>=0&&Un(fi,ti.selectedDates[1])<=0}function Ca(){ti.config.noCalendar||ti.isMobile||!ti.monthNav||(ti.yearElements.forEach(function(fi,hi){var mi=new Date(ti.currentYear,ti.currentMonth,1);mi.setMonth(ti.currentMonth+hi),ti.config.showMonths>1||ti.config.monthSelectorType==="static"?ti.monthElements[hi].textContent=_a(mi.getMonth(),ti.config.shorthandCurrentMonth,ti.l10n)+" ":ti.monthsDropdownContainer.value=mi.getMonth().toString(),fi.value=mi.getFullYear().toString()}),ti._hidePrevMonthArrow=ti.config.minDate!==void 0&&(ti.currentYear===ti.config.minDate.getFullYear()?ti.currentMonth<=ti.config.minDate.getMonth():ti.currentYear<ti.config.minDate.getFullYear()),ti._hideNextMonthArrow=ti.config.maxDate!==void 0&&(ti.currentYear===ti.config.maxDate.getFullYear()?ti.currentMonth+1>ti.config.maxDate.getMonth():ti.currentYear>ti.config.maxDate.getFullYear()))}function Hl(fi){var hi=fi||(ti.config.altInput?ti.config.altFormat:ti.config.dateFormat);return ti.selectedDates.map(function(mi){return ti.formatDate(mi,hi)}).filter(function(mi,_i,Ti){return ti.config.mode!=="range"||ti.config.enableTime||Ti.indexOf(mi)===_i}).join(ti.config.mode!=="range"?ti.config.conjunction:ti.l10n.rangeSeparator)}function lo(fi){fi===void 0&&(fi=!0),ti.mobileInput!==void 0&&ti.mobileFormatStr&&(ti.mobileInput.value=ti.latestSelectedDateObj!==void 0?ti.formatDate(ti.latestSelectedDateObj,ti.mobileFormatStr):""),ti.input.value=Hl(ti.config.dateFormat),ti.altInput!==void 0&&(ti.altInput.value=Hl(ti.config.altFormat)),fi!==!1&&un("onValueUpdate")}function Bh(fi){var hi=Wn(fi),mi=ti.prevMonthNav.contains(hi),_i=ti.nextMonthNav.contains(hi);mi||_i?Ri(mi?-1:1):ti.yearElements.indexOf(hi)>=0?hi.select():hi.classList.contains("arrowUp")?ti.changeYear(ti.currentYear+1):hi.classList.contains("arrowDown")&&ti.changeYear(ti.currentYear-1)}function zh(fi){fi.preventDefault();var hi=fi.type==="keydown",mi=Wn(fi),_i=mi;ti.amPM!==void 0&&mi===ti.amPM&&(ti.amPM.textContent=ti.l10n.amPM[qn(ti.amPM.textContent===ti.l10n.amPM[0])]);var Ti=parseFloat(_i.getAttribute("min")),Ni=parseFloat(_i.getAttribute("max")),Ki=parseFloat(_i.getAttribute("step")),$i=parseInt(_i.value,10),Xi=fi.delta||(hi?fi.which===38?1:-1:0),Fi=$i+Ki*Xi;if(typeof _i.value!="undefined"&&_i.value.length===2){var Gi=_i===ti.hourElement,nn=_i===ti.minuteElement;Fi<Ti?(Fi=Ni+Fi+qn(!Gi)+(qn(Gi)&&qn(!ti.amPM)),nn&&Oi(void 0,-1,ti.hourElement)):Fi>Ni&&(Fi=_i===ti.hourElement?Fi-Ni-qn(!ti.amPM):Ti,nn&&Oi(void 0,1,ti.hourElement)),ti.amPM&&Gi&&(Ki===1?Fi+$i===23:Math.abs(Fi-$i)>Ki)&&(ti.amPM.textContent=ti.l10n.amPM[qn(ti.amPM.textContent===ti.l10n.amPM[0])]),_i.value=Rn(Fi)}}return ri(),ti}function Ns(ii,ei){for(var ti=Array.prototype.slice.call(ii).filter(function(si){return si instanceof HTMLElement}),ni=[],ri=0;ri<ti.length;ri++){var oi=ti[ri];try{if(oi.getAttribute("data-fp-omit")!==null)continue;oi._flatpickr!==void 0&&(oi._flatpickr.destroy(),oi._flatpickr=void 0),oi._flatpickr=F_(oi,ei||{}),ni.push(oi._flatpickr)}catch(si){console.error(si)}}return ni.length===1?ni[0]:ni}typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(ii){return Ns(this,ii)},HTMLElement.prototype.flatpickr=function(ii){return Ns([this],ii)});var xn=function(ii,ei){return typeof ii=="string"?Ns(window.document.querySelectorAll(ii),ei):ii instanceof Node?Ns([ii],ei):Ns(ii,ei)};xn.defaultConfig={};xn.l10ns={en:Hn({},Tl),default:Hn({},Tl)};xn.localize=function(ii){xn.l10ns.default=Hn(Hn({},xn.l10ns.default),ii)};xn.setDefaults=function(ii){xn.defaultConfig=Hn(Hn({},xn.defaultConfig),ii)};xn.parseDate=Cl({});xn.formatDate=Qc({});xn.compareDates=Un;typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(ii){return Ns(this,ii)});Date.prototype.fp_incr=function(ii){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof ii=="string"?parseInt(ii,10):ii))};typeof window!="undefined"&&(window.flatpickr=xn);var Ol=xn;function bh(){Ol(".date-picker",{allowInput:!0}),Ol(".datetime-picker",{allowInput:!0,enableSeconds:!0,enableTime:!0,time_24hr:!0}),Ol(".time-picker",{allowInput:!0,enableSeconds:!0,enableTime:!0,noCalendar:!0,time_24hr:!0})}function $_(){for(let ii of Hi('select[name="columns"] option'))ii.selected=!0}function B_(ii){for(let ei of Hi("#id_available_columns > option"))if(ei.selected){for(let ti of Hi("#id_columns"))ti.appendChild(ei.cloneNode(!0));ei.remove()}ii.preventDefault()}function z_(ii){for(let ei of Hi("#id_columns > option"))if(ei.selected){for(let ti of Hi("#id_available_columns"))ti.appendChild(ei.cloneNode(!0));ei.remove()}ii.preventDefault()}function _h(ii,ei){return co(this,null,function*(){return yield Ls(ii,ei)})}function V_(ii){var li,ui,ci;ii.preventDefault();let ei=ii.currentTarget,ti=ei.getAttribute("data-url");if(ti==null){Po("danger","Error Updating Table Configuration","No API path defined for configuration form.").show();return}let ni=((li=document.activeElement)==null?void 0:li.getAttribute("value"))==="Reset",ri=(ci=(ui=ei.getAttribute("data-config-root"))==null?void 0:ui.split("."))!=null?ci:[];if(ni){let di=ri.reduceRight((pi,yi)=>({[yi]:pi}),{});_h(ti,di).then(pi=>{rs(pi)?Po("danger","Error Resetting Table Configuration",pi.error).show():location.reload()});return}let oi=yf(ei,"select[name=columns]"),si=Object.assign({},...oi.map(di=>({[di.name]:di.options}))),ai=ri.reduceRight((di,pi)=>({[pi]:di}),si);_h(ti,ai).then(di=>{rs(di)?Po("danger","Error Updating Table Configuration",di.error).show():location.reload()})}function Eh(){for(let ii of Hi("#save_tableconfig"))ii.addEventListener("click",$_);for(let ii of Hi("#add_columns"))ii.addEventListener("click",B_);for(let ii of Hi("#remove_columns"))ii.addEventListener("click",z_);for(let ii of Hi("form.userconfigform"))ii.addEventListener("submit",V_)}function wh(ii){return typeof ii=="string"&&["show","hide"].includes(ii)}var ss=class extends Error{constructor(ti,ni){super(ti);en(this,"table");this.table=ni}},Rs=class{constructor(ei,ti){en(this,"button");en(this,"rows");this.button=ei,this.rows=ti}hideRows(){for(let ei of this.rows)ei.classList.add("d-none")}set buttonState(ei){wh(ei)&&this.button.setAttribute("data-state",ei)}get buttonState(){let ei=this.button.getAttribute("data-state");return wh(ei)?ei:null}toggleButton(){this.buttonState==="show"?this.button.innerText=Ms(this.button.innerText,"Show","Hide"):this.buttonState==="hide"&&(this.button.innerText=Ms(this.button.innerHTML,"Hide","Show"))}toggleState(){this.buttonState==="show"?this.buttonState="hide":this.buttonState==="hide"&&(this.buttonState="show")}toggle(){this.toggleState(),this.toggleButton()}handleClick(ei){ei.currentTarget.isEqualNode(this.button)&&this.toggle(),this.buttonState==="hide"&&this.hideRows()}},Xc=class{constructor(ei){en(this,"table");en(this,"enabledButton");en(this,"disabledButton");en(this,"virtualButton");en(this,"disconnectedButton");en(this,"rows");this.table=ei,this.rows=this.table.querySelectorAll("tr");try{let ti=os(this.table,"button.toggle-enabled"),ni=os(this.table,"button.toggle-disabled"),ri=os(this.table,"button.toggle-virtual"),oi=os(this.table,"button.toggle-disconnected");if(ti===null)throw new ss("Table is missing a 'toggle-enabled' button.",ei);if(ni===null)throw new ss("Table is missing a 'toggle-disabled' button.",ei);if(ri===null)throw new ss("Table is missing a 'toggle-virtual' button.",ei);if(oi===null)throw new ss("Table is missing a 'toggle-disconnected' button.",ei);ti.addEventListener("click",si=>this.handleClick(si,this)),ni.addEventListener("click",si=>this.handleClick(si,this)),ri.addEventListener("click",si=>this.handleClick(si,this)),oi.addEventListener("click",si=>this.handleClick(si,this)),this.enabledButton=new Rs(ti,ei.querySelectorAll('tr[data-enabled="enabled"]')),this.disabledButton=new Rs(ni,ei.querySelectorAll('tr[data-enabled="disabled"]')),this.virtualButton=new Rs(ri,ei.querySelectorAll('tr[data-type="virtual"]')),this.disconnectedButton=new Rs(oi,ei.querySelectorAll('tr[data-connected="disconnected"]'))}catch(ti){if(ti instanceof ss){console.debug("Table does not contain enable/disable toggle buttons");return}else throw ti}}handleClick(ei,ti){for(let ni of this.rows)ni.classList.remove("d-none");ti.enabledButton.handleClick(ei),ti.disabledButton.handleClick(ei),ti.virtualButton.handleClick(ei),ti.disconnectedButton.handleClick(ei)}};function xh(){for(let ii of Hi("table"))new Xc(ii)}var Jc=class{constructor(ei){en(this,"base");en(this,"state");en(this,"activeLink",null);en(this,"sections",[]);this.base=ei,this.state=new ga({pinned:!0},{persist:!0,key:"netbox-sidenav"}),this.init(),this.initSectionLinks(),this.initLinks()}bodyHas(ei){return document.body.hasAttribute(`data-sidenav-${ei}`)}bodyRemove(...ei){for(let ti of ei)document.body.removeAttribute(`data-sidenav-${ti}`)}bodyAdd(...ei){for(let ti of ei)document.body.setAttribute(`data-sidenav-${ti}`,"")}init(){for(let ei of this.base.querySelectorAll(".sidenav-toggle"))ei.addEventListener("click",ti=>this.onToggle(ti));for(let ei of Hi(".sidenav-toggle-mobile"))ei.addEventListener("click",ti=>this.onMobileToggle(ti));window.innerWidth>1200&&(this.state.get("pinned")&&this.pin(),this.state.get("pinned")||this.unpin(),window.addEventListener("resize",()=>this.onResize())),window.innerWidth<1200&&(this.bodyRemove("hide"),this.bodyAdd("hidden"),window.addEventListener("resize",()=>this.onResize())),this.base.addEventListener("mouseenter",()=>this.onEnter()),this.base.addEventListener("mouseleave",()=>this.onLeave())}initLinks(){for(let ei of this.getActiveLinks())this.bodyHas("show")?this.activateLink(ei,"expand"):this.bodyHas("hidden")&&this.activateLink(ei,"collapse")}show(){this.bodyAdd("show"),this.bodyRemove("hidden","hide")}hide(){this.bodyAdd("hidden"),this.bodyRemove("pinned","show");for(let ei of this.base.querySelectorAll(".collapse"))ei.classList.remove("show")}pin(){this.bodyAdd("show","pinned"),this.bodyRemove("hidden"),this.state.set("pinned",!0)}unpin(){this.bodyRemove("pinned","show"),this.bodyAdd("hidden");for(let ei of this.base.querySelectorAll(".collapse"))ei.classList.remove("show");this.state.set("pinned",!1)}handleSectionClick(ei){ei.preventDefault();let ti=ei.target;this.activeLink=ti,this.closeInactiveSections()}closeInactiveSections(){for(let[ei,ti]of this.sections)ei!==this.activeLink&&(ei.classList.add("collapsed"),ei.setAttribute("aria-expanded","false"),ti.hide())}initSectionLinks(){for(let ei of Hi(".navbar-nav .nav-item .nav-link[data-bs-toggle]"))if(ei.parentElement!==null){let ti=ei.parentElement.querySelector(".collapse");if(ti!==null){let ni=new Oo(ti,{toggle:!1});this.sections.push([ei,ni]),ei.addEventListener("click",ri=>this.handleSectionClick(ri))}}}activateLink(ei,ti){var ri;let ni=ei.closest(".dropdown-menu");if(fl(ni)){let oi=ni.parentElement,si=(ri=ni.parentElement)==null?void 0:ri.querySelector(".nav-link");if(fl(si)&&fl(oi))switch(ti){case"expand":si.setAttribute("aria-expanded","true"),oi.classList.add("active"),ni.classList.add("show"),ei.classList.add("active");break;case"collapse":si.setAttribute("aria-expanded","false"),oi.classList.remove("active"),ni.classList.remove("show"),ei.classList.remove("active");break}}}*getActiveLinks(){for(let ei of this.base.querySelectorAll("ul.navbar-nav .nav-item .dropdown-item")){let ti=ei.querySelector("a");if(ti){let ni=new RegExp(ti.href,"gi");window.location.href.match(ni)&&(yield ei)}}}onEnter(){if(!this.bodyHas("pinned")){this.bodyRemove("hide","hidden"),this.bodyAdd("show");for(let ei of this.getActiveLinks())this.activateLink(ei,"expand")}}onLeave(){if(!this.bodyHas("pinned")){this.bodyRemove("show"),this.bodyAdd("hide");for(let ei of this.getActiveLinks())this.activateLink(ei,"collapse");this.bodyRemove("hide"),this.bodyAdd("hidden")}}onResize(){this.bodyHas("show")&&!this.bodyHas("pinned")&&(this.bodyRemove("show"),this.bodyAdd("hidden"))}onToggle(ei){ei.preventDefault(),this.state.get("pinned")?this.unpin():this.pin()}onMobileToggle(ei){ei.preventDefault(),this.bodyHas("hidden")?this.show():this.hide()}};function Th(){for(let ii of Hi(".navbar"))new Jc(ii)}function Sh(ii,ei,ti,ni,ri){let oi=(...si)=>(console.warn("gridstack.js: Function `"+ti+"` is deprecated in "+ri+" and has been replaced with `"+ni+"`. It will be **removed** in a future release"),ei.apply(ii,si));return oi.prototype=ei.prototype,oi}var bi=class ii{static getElements(ei,ti=document){if(typeof ei=="string"){let ni="getElementById"in ti?ti:void 0;if(ni&&!isNaN(+ei[0])){let oi=ni.getElementById(ei);return oi?[oi]:[]}let ri=ti.querySelectorAll(ei);return!ri.length&&ei[0]!=="."&&ei[0]!=="#"&&(ri=ti.querySelectorAll("."+ei),ri.length||(ri=ti.querySelectorAll("#"+ei))),Array.from(ri)}return[ei]}static getElement(ei,ti=document){if(typeof ei=="string"){let ni="getElementById"in ti?ti:void 0;if(!ei.length)return null;if(ni&&ei[0]==="#")return ni.getElementById(ei.substring(1));if(ei[0]==="#"||ei[0]==="."||ei[0]==="[")return ti.querySelector(ei);if(ni&&!isNaN(+ei[0]))return ni.getElementById(ei);let ri=ti.querySelector(ei);return ni&&!ri&&(ri=ni.getElementById(ei)),ri||(ri=ti.querySelector("."+ei)),ri}return ei}static createWidgetDivs(ei,ti){var si,ai;let ni=ii.createDiv(["grid-stack-item",ei]),ri=ii.createDiv(["grid-stack-item-content"],ni);return ti.lazyLoad||((ai=(si=ti.grid)==null?void 0:si.opts)==null?void 0:ai.lazyLoad)&&ti.lazyLoad!==!1?ti.visibleObservable||(ti.visibleObservable=new IntersectionObserver(([li])=>{var ui;li.isIntersecting&&((ui=ti.visibleObservable)==null||ui.disconnect(),delete ti.visibleObservable,Jr.renderCB(ri,ti))}),window.setTimeout(()=>{var li;return(li=ti.visibleObservable)==null?void 0:li.observe(ni)})):Jr.renderCB(ri,ti),ni}static createDiv(ei,ti){let ni=document.createElement("div");return ei.forEach(ri=>{ri&&ni.classList.add(ri)}),ti==null||ti.appendChild(ni),ni}static shouldSizeToContent(ei,ti=!1){return(ei==null?void 0:ei.grid)&&(ti?ei.sizeToContent===!0||ei.grid.opts.sizeToContent===!0&&ei.sizeToContent===void 0:!!ei.sizeToContent||ei.grid.opts.sizeToContent&&ei.sizeToContent!==!1)}static isIntercepted(ei,ti){return!(ei.y>=ti.y+ti.h||ei.y+ei.h<=ti.y||ei.x+ei.w<=ti.x||ei.x>=ti.x+ti.w)}static isTouching(ei,ti){return ii.isIntercepted(ei,{x:ti.x-.5,y:ti.y-.5,w:ti.w+1,h:ti.h+1})}static areaIntercept(ei,ti){let ni=ei.x>ti.x?ei.x:ti.x,ri=ei.x+ei.w<ti.x+ti.w?ei.x+ei.w:ti.x+ti.w;if(ri<=ni)return 0;let oi=ei.y>ti.y?ei.y:ti.y,si=ei.y+ei.h<ti.y+ti.h?ei.y+ei.h:ti.y+ti.h;return si<=oi?0:(ri-ni)*(si-oi)}static area(ei){return ei.w*ei.h}static sort(ei,ti=1){return ei.sort((ri,oi)=>{var ai,li,ui,ci;let si=ti*(((ai=ri.y)!=null?ai:1e4)-((li=oi.y)!=null?li:1e4));return si===0?ti*(((ui=ri.x)!=null?ui:1e4)-((ci=oi.x)!=null?ci:1e4)):si})}static find(ei,ti){return ti?ei.find(ni=>ni.id===ti):void 0}static createStylesheet(ei,ti,ni){let ri=document.createElement("style"),oi=ni==null?void 0:ni.nonce;return oi&&(ri.nonce=oi),ri.setAttribute("type","text/css"),ri.setAttribute("gs-style-id",ei),ri.styleSheet?ri.styleSheet.cssText="":ri.appendChild(document.createTextNode("")),ti?ti.insertBefore(ri,ti.firstChild):(ti=document.getElementsByTagName("head")[0],ti.appendChild(ri)),ri}static removeStylesheet(ei,ti){let ri=(ti||document).querySelector("STYLE[gs-style-id="+ei+"]");ri&&ri.parentNode&&ri.remove()}static addCSSRule(ei,ti,ni){ei.textContent+=`${ti} { ${ni} } `}static toBool(ei){return typeof ei=="boolean"?ei:typeof ei=="string"?(ei=ei.toLowerCase(),!(ei===""||ei==="no"||ei==="false"||ei==="0")):!!ei}static toNumber(ei){return ei===null||ei.length===0?void 0:Number(ei)}static parseHeight(ei){let ti,ni="px";if(typeof ei=="string")if(ei==="auto"||ei==="")ti=0;else{let ri=ei.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);if(!ri)throw new Error(`Invalid height val = ${ei}`);ni=ri[2]||"px",ti=parseFloat(ri[1])}else ti=ei;return{h:ti,unit:ni}}static defaults(ei,...ti){return ti.forEach(ni=>{for(let ri in ni){if(!ni.hasOwnProperty(ri))return;ei[ri]===null||ei[ri]===void 0?ei[ri]=ni[ri]:typeof ni[ri]=="object"&&typeof ei[ri]=="object"&&this.defaults(ei[ri],ni[ri])}}),ei}static same(ei,ti){if(typeof ei!="object")return ei==ti;if(typeof ei!=typeof ti||Object.keys(ei).length!==Object.keys(ti).length)return!1;for(let ni in ei)if(ei[ni]!==ti[ni])return!1;return!0}static copyPos(ei,ti,ni=!1){return ti.x!==void 0&&(ei.x=ti.x),ti.y!==void 0&&(ei.y=ti.y),ti.w!==void 0&&(ei.w=ti.w),ti.h!==void 0&&(ei.h=ti.h),ni&&(ti.minW&&(ei.minW=ti.minW),ti.minH&&(ei.minH=ti.minH),ti.maxW&&(ei.maxW=ti.maxW),ti.maxH&&(ei.maxH=ti.maxH)),ei}static samePos(ei,ti){return ei&&ti&&ei.x===ti.x&&ei.y===ti.y&&(ei.w||1)===(ti.w||1)&&(ei.h||1)===(ti.h||1)}static sanitizeMinMax(ei){ei.minW||delete ei.minW,ei.minH||delete ei.minH,ei.maxW||delete ei.maxW,ei.maxH||delete ei.maxH}static removeInternalAndSame(ei,ti){if(!(typeof ei!="object"||typeof ti!="object"))for(let ni in ei){let ri=ei[ni],oi=ti[ni];ni[0]==="_"||ri===oi?delete ei[ni]:ri&&typeof ri=="object"&&oi!==void 0&&(ii.removeInternalAndSame(ri,oi),Object.keys(ri).length||delete ei[ni])}}static removeInternalForSave(ei,ti=!0){for(let ni in ei)(ni[0]==="_"||ei[ni]===null||ei[ni]===void 0)&&delete ei[ni];delete ei.grid,ti&&delete ei.el,ei.autoPosition||delete ei.autoPosition,ei.noResize||delete ei.noResize,ei.noMove||delete ei.noMove,ei.locked||delete ei.locked,(ei.w===1||ei.w===ei.minW)&&delete ei.w,(ei.h===1||ei.h===ei.minH)&&delete ei.h}static throttle(ei,ti){let ni=!1;return(...ri)=>{ni||(ni=!0,setTimeout(()=>{ei(...ri),ni=!1},ti))}}static removePositioningStyles(ei){let ti=ei.style;ti.position&&ti.removeProperty("position"),ti.left&&ti.removeProperty("left"),ti.top&&ti.removeProperty("top"),ti.width&&ti.removeProperty("width"),ti.height&&ti.removeProperty("height")}static getScrollElement(ei){if(!ei)return document.scrollingElement||document.documentElement;let ti=getComputedStyle(ei);return/(auto|scroll)/.test(ti.overflow+ti.overflowY)?ei:this.getScrollElement(ei.parentElement)}static updateScrollPosition(ei,ti,ni){let ri=ei.getBoundingClientRect(),oi=window.innerHeight||document.documentElement.clientHeight;if(ri.top<0||ri.bottom>oi){let si=ri.bottom-oi,ai=ri.top,li=this.getScrollElement(ei);if(li!==null){let ui=li.scrollTop;ri.top<0&&ni<0?ei.offsetHeight>oi?li.scrollTop+=ni:li.scrollTop+=Math.abs(ai)>Math.abs(ni)?ni:ai:ni>0&&(ei.offsetHeight>oi?li.scrollTop+=ni:li.scrollTop+=si>ni?ni:si),ti.top+=li.scrollTop-ui}}}static updateScrollResize(ei,ti,ni){let ri=this.getScrollElement(ti),oi=ri.clientHeight,si=ri===this.getScrollElement()?0:ri.getBoundingClientRect().top,ai=ei.clientY-si,li=ai<ni,ui=ai>oi-ni;li?ri.scrollBy({behavior:"smooth",top:ai-ni}):ui&&ri.scrollBy({behavior:"smooth",top:ni-(oi-ai)})}static clone(ei){return ei==null||typeof ei!="object"?ei:ei instanceof Array?[...ei]:Di({},ei)}static cloneDeep(ei){let ti=["parentGrid","el","grid","subGrid","engine"],ni=ii.clone(ei);for(let ri in ni)ni.hasOwnProperty(ri)&&typeof ni[ri]=="object"&&ri.substring(0,2)!=="__"&&!ti.find(oi=>oi===ri)&&(ni[ri]=ii.cloneDeep(ei[ri]));return ni}static cloneNode(ei){let ti=ei.cloneNode(!0);return ti.removeAttribute("id"),ti}static appendTo(ei,ti){let ni;typeof ti=="string"?ni=ii.getElement(ti):ni=ti,ni&&ni.appendChild(ei)}static addElStyles(ei,ti){if(ti instanceof Object)for(let ni in ti)ti.hasOwnProperty(ni)&&(Array.isArray(ti[ni])?ti[ni].forEach(ri=>{ei.style[ni]=ri}):ei.style[ni]=ti[ni])}static initEvent(ei,ti){let ni={type:ti.type},ri={button:0,which:0,buttons:1,bubbles:!0,cancelable:!0,target:ti.target?ti.target:ei.target};return["altKey","ctrlKey","metaKey","shiftKey"].forEach(oi=>ni[oi]=ei[oi]),["pageX","pageY","clientX","clientY","screenX","screenY"].forEach(oi=>ni[oi]=ei[oi]),Di(Di({},ni),ri)}static simulateMouseEvent(ei,ti,ni){let ri=document.createEvent("MouseEvents");ri.initMouseEvent(ti,!0,!0,window,1,ei.screenX,ei.screenY,ei.clientX,ei.clientY,ei.ctrlKey,ei.altKey,ei.shiftKey,ei.metaKey,0,ei.target),(ni||ei.target).dispatchEvent(ri)}static getValuesFromTransformedElement(ei){let ti=document.createElement("div");ii.addElStyles(ti,{opacity:"0",position:"fixed",top:"0px",left:"0px",width:"1px",height:"1px",zIndex:"-999999"}),ei.appendChild(ti);let ni=ti.getBoundingClientRect();return ei.removeChild(ti),ti.remove(),{xScale:1/ni.width,yScale:1/ni.height,xOffset:ni.left,yOffset:ni.top}}static swap(ei,ti,ni){if(!ei)return;let ri=ei[ti];ei[ti]=ei[ni],ei[ni]=ri}static canBeRotated(ei){var ti;return!(!ei||ei.w===ei.h||ei.locked||ei.noResize||(ti=ei.grid)!=null&&ti.opts.disableResize||ei.minW&&ei.minW===ei.maxW||ei.minH&&ei.minH===ei.maxH)}};var as=class ii{constructor(ei={}){this.addedNodes=[],this.removedNodes=[],this.defaultColumn=12,this.column=ei.column||this.defaultColumn,this.column>this.defaultColumn&&(this.defaultColumn=this.column),this.maxRow=ei.maxRow,this._float=ei.float,this.nodes=ei.nodes||[],this.onChange=ei.onChange}batchUpdate(ei=!0,ti=!0){return!!this.batchMode===ei?this:(this.batchMode=ei,ei?(this._prevFloat=this._float,this._float=!0,this.cleanNodes(),this.saveInitial()):(this._float=this._prevFloat,delete this._prevFloat,ti&&this._packNodes(),this._notify()),this)}_useEntireRowArea(ei,ti){return(!this.float||this.batchMode&&!this._prevFloat)&&!this._hasLocked&&(!ei._moving||ei._skipDown||ti.y<=ei.y)}_fixCollisions(ei,ti=ei,ni,ri={}){if(this.sortNodes(-1),ni=ni||this.collide(ei,ti),!ni)return!1;if(ei._moving&&!ri.nested&&!this.float&&this.swap(ei,ni))return!0;let oi=ti;!this._loading&&this._useEntireRowArea(ei,ti)&&(oi={x:0,w:this.column,y:ti.y,h:ti.h},ni=this.collide(ei,oi,ri.skip));let si=!1,ai={nested:!0,pack:!1},li=0;for(;ni=ni||this.collide(ei,oi,ri.skip);){if(li++>this.nodes.length*2)throw new Error("Infinite collide check");let ui;if(ni.locked||this._loading||ei._moving&&!ei._skipDown&&ti.y>ei.y&&!this.float&&(!this.collide(ni,sn(Di({},ni),{y:ei.y}),ei)||!this.collide(ni,sn(Di({},ni),{y:ti.y-ni.h}),ei))){ei._skipDown=ei._skipDown||ti.y>ei.y;let ci=Di(sn(Di({},ti),{y:ni.y+ni.h}),ai);ui=this._loading&&bi.samePos(ei,ci)?!0:this.moveNode(ei,ci),(ni.locked||this._loading)&&ui?bi.copyPos(ti,ei):!ni.locked&&ui&&ri.pack&&(this._packNodes(),ti.y=ni.y+ni.h,bi.copyPos(ei,ti)),si=si||ui}else ui=this.moveNode(ni,Di(sn(Di({},ni),{y:ti.y+ti.h,skip:ei}),ai));if(!ui)return si;ni=void 0}return si}collide(ei,ti=ei,ni){let ri=ei._id,oi=ni==null?void 0:ni._id;return this.nodes.find(si=>si._id!==ri&&si._id!==oi&&bi.isIntercepted(si,ti))}collideAll(ei,ti=ei,ni){let ri=ei._id,oi=ni==null?void 0:ni._id;return this.nodes.filter(si=>si._id!==ri&&si._id!==oi&&bi.isIntercepted(si,ti))}directionCollideCoverage(ei,ti,ni){if(!ti.rect||!ei._rect)return;let ri=ei._rect,oi=Di({},ti.rect);oi.y>ri.y?(oi.h+=oi.y-ri.y,oi.y=ri.y):oi.h+=ri.y-oi.y,oi.x>ri.x?(oi.w+=oi.x-ri.x,oi.x=ri.x):oi.w+=ri.x-oi.x;let si,ai=.5;for(let li of ni){if(li.locked||!li._rect)break;let ui=li._rect,ci=Number.MAX_VALUE,di=Number.MAX_VALUE;ri.y<ui.y?ci=(oi.y+oi.h-ui.y)/ui.h:ri.y+ri.h>ui.y+ui.h&&(ci=(ui.y+ui.h-oi.y)/ui.h),ri.x<ui.x?di=(oi.x+oi.w-ui.x)/ui.w:ri.x+ri.w>ui.x+ui.w&&(di=(ui.x+ui.w-oi.x)/ui.w);let pi=Math.min(di,ci);pi>ai&&(ai=pi,si=li)}return ti.collide=si,si}cacheRects(ei,ti,ni,ri,oi,si){return this.nodes.forEach(ai=>ai._rect={y:ai.y*ti+ni,x:ai.x*ei+si,w:ai.w*ei-si-ri,h:ai.h*ti-ni-oi}),this}swap(ei,ti){if(!ti||ti.locked||!ei||ei.locked)return!1;function ni(){let oi=ti.x,si=ti.y;return ti.x=ei.x,ti.y=ei.y,ei.h!=ti.h?(ei.x=oi,ei.y=ti.y+ti.h):ei.w!=ti.w?(ei.x=ti.x+ti.w,ei.y=si):(ei.x=oi,ei.y=si),ei._dirty=ti._dirty=!0,!0}let ri;if(ei.w===ti.w&&ei.h===ti.h&&(ei.x===ti.x||ei.y===ti.y)&&(ri=bi.isTouching(ei,ti)))return ni();if(ri!==!1){if(ei.w===ti.w&&ei.x===ti.x&&(ri||(ri=bi.isTouching(ei,ti)))){if(ti.y<ei.y){let oi=ei;ei=ti,ti=oi}return ni()}if(ri!==!1){if(ei.h===ti.h&&ei.y===ti.y&&(ri||(ri=bi.isTouching(ei,ti)))){if(ti.x<ei.x){let oi=ei;ei=ti,ti=oi}return ni()}return!1}}}isAreaEmpty(ei,ti,ni,ri){let oi={x:ei||0,y:ti||0,w:ni||1,h:ri||1};return!this.collide(oi)}compact(ei="compact",ti=!0){if(this.nodes.length===0)return this;ti&&this.sortNodes();let ni=this.batchMode;ni||this.batchUpdate();let ri=this._inColumnResize;ri||(this._inColumnResize=!0);let oi=this.nodes;return this.nodes=[],oi.forEach((si,ai,li)=>{let ui;si.locked||(si.autoPosition=!0,ei==="list"&&ai&&(ui=li[ai-1])),this.addNode(si,!1,ui)}),ri||delete this._inColumnResize,ni||this.batchUpdate(!1),this}set float(ei){this._float!==ei&&(this._float=ei||!1,ei||this._packNodes()._notify())}get float(){return this._float||!1}sortNodes(ei=1){return this.nodes=bi.sort(this.nodes,ei),this}_packNodes(){return this.batchMode?this:(this.sortNodes(),this.float?this.nodes.forEach(ei=>{if(ei._updating||ei._orig===void 0||ei.y===ei._orig.y)return;let ti=ei.y;for(;ti>ei._orig.y;)--ti,this.collide(ei,{x:ei.x,y:ti,w:ei.w,h:ei.h})||(ei._dirty=!0,ei.y=ti)}):this.nodes.forEach((ei,ti)=>{if(!ei.locked)for(;ei.y>0;){let ni=ti===0?0:ei.y-1;if(!(ti===0||!this.collide(ei,{x:ei.x,y:ni,w:ei.w,h:ei.h})))break;ei._dirty=ei.y!==ni,ei.y=ni}}),this)}prepareNode(ei,ti){var oi;ei._id=(oi=ei._id)!=null?oi:ii._idSeq++;let ni=ei.id;if(ni){let si=1;for(;this.nodes.find(ai=>ai.id===ei.id&&ai!==ei);)ei.id=ni+"_"+si++}(ei.x===void 0||ei.y===void 0||ei.x===null||ei.y===null)&&(ei.autoPosition=!0);let ri={x:0,y:0,w:1,h:1};return bi.defaults(ei,ri),ei.autoPosition||delete ei.autoPosition,ei.noResize||delete ei.noResize,ei.noMove||delete ei.noMove,bi.sanitizeMinMax(ei),typeof ei.x=="string"&&(ei.x=Number(ei.x)),typeof ei.y=="string"&&(ei.y=Number(ei.y)),typeof ei.w=="string"&&(ei.w=Number(ei.w)),typeof ei.h=="string"&&(ei.h=Number(ei.h)),isNaN(ei.x)&&(ei.x=ri.x,ei.autoPosition=!0),isNaN(ei.y)&&(ei.y=ri.y,ei.autoPosition=!0),isNaN(ei.w)&&(ei.w=ri.w),isNaN(ei.h)&&(ei.h=ri.h),this.nodeBoundFix(ei,ti),ei}nodeBoundFix(ei,ti){let ni=ei._orig||bi.copyPos({},ei);if(ei.maxW&&ei.w&&(ei.w=Math.min(ei.w,ei.maxW)),ei.maxH&&ei.h&&(ei.h=Math.min(ei.h,ei.maxH)),ei.minW&&ei.w&&ei.minW<=this.column&&(ei.w=Math.max(ei.w,ei.minW)),ei.minH&&ei.h&&(ei.h=Math.max(ei.h,ei.minH)),(ei.x||0)+(ei.w||1)>this.column&&this.column<this.defaultColumn&&!this._inColumnResize&&ei._id&&this.findCacheLayout(ei,this.defaultColumn)===-1){let oi=Di({},ei);oi.autoPosition||oi.x===void 0?(delete oi.x,delete oi.y):oi.x=Math.min(this.defaultColumn-1,oi.x),oi.w=Math.min(this.defaultColumn,oi.w||1),this.cacheOneLayout(oi,this.defaultColumn)}return ei.w>this.column?ei.w=this.column:ei.w<1&&(ei.w=1),this.maxRow&&ei.h>this.maxRow?ei.h=this.maxRow:ei.h<1&&(ei.h=1),ei.x<0&&(ei.x=0),ei.y<0&&(ei.y=0),ei.x+ei.w>this.column&&(ti?ei.w=this.column-ei.x:ei.x=this.column-ei.w),this.maxRow&&ei.y+ei.h>this.maxRow&&(ti?ei.h=this.maxRow-ei.y:ei.y=this.maxRow-ei.h),bi.samePos(ei,ni)||(ei._dirty=!0),this}getDirtyNodes(ei){return ei?this.nodes.filter(ti=>ti._dirty&&!bi.samePos(ti,ti._orig)):this.nodes.filter(ti=>ti._dirty)}_notify(ei){if(this.batchMode||!this.onChange)return this;let ti=(ei||[]).concat(this.getDirtyNodes());return this.onChange(ti),this}cleanNodes(){return this.batchMode?this:(this.nodes.forEach(ei=>{delete ei._dirty,delete ei._lastTried}),this)}saveInitial(){return this.nodes.forEach(ei=>{ei._orig=bi.copyPos({},ei),delete ei._dirty}),this._hasLocked=this.nodes.some(ei=>ei.locked),this}restoreInitial(){return this.nodes.forEach(ei=>{!ei._orig||bi.samePos(ei,ei._orig)||(bi.copyPos(ei,ei._orig),ei._dirty=!0)}),this._notify(),this}findEmptyPosition(ei,ti=this.nodes,ni=this.column,ri){let oi=ri?ri.y*ni+(ri.x+ri.w):0,si=!1;for(let ai=oi;!si;++ai){let li=ai%ni,ui=Math.floor(ai/ni);if(li+ei.w>ni)continue;let ci={x:li,y:ui,w:ei.w,h:ei.h};ti.find(di=>bi.isIntercepted(ci,di))||((ei.x!==li||ei.y!==ui)&&(ei._dirty=!0),ei.x=li,ei.y=ui,delete ei.autoPosition,si=!0)}return si}addNode(ei,ti=!1,ni){let ri=this.nodes.find(si=>si._id===ei._id);if(ri)return ri;this._inColumnResize?this.nodeBoundFix(ei):this.prepareNode(ei),delete ei._temporaryRemoved,delete ei._removeDOM;let oi;return ei.autoPosition&&this.findEmptyPosition(ei,this.nodes,this.column,ni)&&(delete ei.autoPosition,oi=!0),this.nodes.push(ei),ti&&this.addedNodes.push(ei),oi||this._fixCollisions(ei),this.batchMode||this._packNodes()._notify(),ei}removeNode(ei,ti=!0,ni=!1){return this.nodes.find(ri=>ri._id===ei._id)?(ni&&this.removedNodes.push(ei),ti&&(ei._removeDOM=!0),this.nodes=this.nodes.filter(ri=>ri._id!==ei._id),ei._isAboutToRemove||this._packNodes(),this._notify([ei]),this):this}removeAll(ei=!0,ti=!0){if(delete this._layouts,!this.nodes.length)return this;ei&&this.nodes.forEach(ri=>ri._removeDOM=!0);let ni=this.nodes;return this.removedNodes=ti?ni:[],this.nodes=[],this._notify(ni)}moveNodeCheck(ei,ti){if(!this.changedPosConstrain(ei,ti))return!1;if(ti.pack=!0,!this.maxRow)return this.moveNode(ei,ti);let ni,ri=new ii({column:this.column,float:this.float,nodes:this.nodes.map(si=>si._id===ei._id?(ni=Di({},si),ni):Di({},si))});if(!ni)return!1;let oi=ri.moveNode(ni,ti)&&ri.getRow()<=Math.max(this.getRow(),this.maxRow);if(!oi&&!ti.resizing&&ti.collide){let si=ti.collide.el.gridstackNode;if(this.swap(ei,si))return this._notify(),!0}return oi?(ri.nodes.filter(si=>si._dirty).forEach(si=>{let ai=this.nodes.find(li=>li._id===si._id);ai&&(bi.copyPos(ai,si),ai._dirty=!0)}),this._notify(),!0):!1}willItFit(ei){if(delete ei._willFitPos,!this.maxRow)return!0;let ti=new ii({column:this.column,float:this.float,nodes:this.nodes.map(ri=>Di({},ri))}),ni=Di({},ei);return this.cleanupNode(ni),delete ni.el,delete ni._id,delete ni.content,delete ni.grid,ti.addNode(ni),ti.getRow()<=this.maxRow?(ei._willFitPos=bi.copyPos({},ni),!0):!1}changedPosConstrain(ei,ti){return ti.w=ti.w||ei.w,ti.h=ti.h||ei.h,ei.x!==ti.x||ei.y!==ti.y?!0:(ei.maxW&&(ti.w=Math.min(ti.w,ei.maxW)),ei.maxH&&(ti.h=Math.min(ti.h,ei.maxH)),ei.minW&&(ti.w=Math.max(ti.w,ei.minW)),ei.minH&&(ti.h=Math.max(ti.h,ei.minH)),ei.w!==ti.w||ei.h!==ti.h)}moveNode(ei,ti){var ui,ci;if(!ei||!ti)return!1;let ni;ti.pack===void 0&&!this.batchMode&&(ni=ti.pack=!0),typeof ti.x!="number"&&(ti.x=ei.x),typeof ti.y!="number"&&(ti.y=ei.y),typeof ti.w!="number"&&(ti.w=ei.w),typeof ti.h!="number"&&(ti.h=ei.h);let ri=ei.w!==ti.w||ei.h!==ti.h,oi=bi.copyPos({},ei,!0);if(bi.copyPos(oi,ti),this.nodeBoundFix(oi,ri),bi.copyPos(ti,oi),!ti.forceCollide&&bi.samePos(ei,ti))return!1;let si=bi.copyPos({},ei),ai=this.collideAll(ei,oi,ti.skip),li=!0;if(ai.length){let di=ei._moving&&!ti.nested,pi=di?this.directionCollideCoverage(ei,ti,ai):ai[0];if(di&&pi&&((ci=(ui=ei.grid)==null?void 0:ui.opts)!=null&&ci.subGridDynamic)&&!ei.grid._isTemp){let yi=bi.areaIntercept(ti.rect,pi._rect),gi=bi.area(ti.rect),vi=bi.area(pi._rect);yi/(gi<vi?gi:vi)>.8&&(pi.grid.makeSubGrid(pi.el,void 0,ei),pi=void 0)}pi?li=!this._fixCollisions(ei,oi,pi,ti):(li=!1,ni&&delete ti.pack)}return li&&!bi.samePos(ei,oi)&&(ei._dirty=!0,bi.copyPos(ei,oi)),ti.pack&&this._packNodes()._notify(),!bi.samePos(ei,si)}getRow(){return this.nodes.reduce((ei,ti)=>Math.max(ei,ti.y+ti.h),0)}beginUpdate(ei){return ei._updating||(ei._updating=!0,delete ei._skipDown,this.batchMode||this.saveInitial()),this}endUpdate(){let ei=this.nodes.find(ti=>ti._updating);return ei&&(delete ei._updating,delete ei._skipDown),this}save(ei=!0,ti){var si;let ni=(si=this._layouts)==null?void 0:si.length,ri=ni&&this.column!==ni-1?this._layouts[ni-1]:null,oi=[];return this.sortNodes(),this.nodes.forEach(ai=>{let li=ri==null?void 0:ri.find(ci=>ci._id===ai._id),ui=Di(Di({},ai),li||{});bi.removeInternalForSave(ui,!ei),ti&&ti(ai,ui),oi.push(ui)}),oi}layoutsNodesChange(ei){return!this._layouts||this._inColumnResize?this:(this._layouts.forEach((ti,ni)=>{if(!ti||ni===this.column)return this;if(ni<this.column)this._layouts[ni]=void 0;else{let ri=ni/this.column;ei.forEach(oi=>{if(!oi._orig)return;let si=ti.find(ai=>ai._id===oi._id);si&&(si.y>=0&&oi.y!==oi._orig.y&&(si.y+=oi.y-oi._orig.y),oi.x!==oi._orig.x&&(si.x=Math.round(oi.x*ri)),oi.w!==oi._orig.w&&(si.w=Math.round(oi.w*ri)))})}}),this)}columnChanged(ei,ti,ni="moveScale"){var ai;if(!this.nodes.length||!ti||ei===ti)return this;if(ni==="none")return this;let ri=ni==="compact"||ni==="list";ri&&this.sortNodes(1),ti<ei&&this.cacheLayout(this.nodes,ei),this.batchUpdate();let oi=[],si=ri?this.nodes:bi.sort(this.nodes,-1);if(ti>ei&&this._layouts){let li=this._layouts[ti]||[],ui=this._layouts.length-1;!li.length&&ei!==ui&&((ai=this._layouts[ui])!=null&&ai.length)&&(ei=ui,this._layouts[ui].forEach(ci=>{var pi,yi,gi;let di=si.find(vi=>vi._id===ci._id);di&&(!ri&&!ci.autoPosition&&(di.x=(pi=ci.x)!=null?pi:di.x,di.y=(yi=ci.y)!=null?yi:di.y),di.w=(gi=ci.w)!=null?gi:di.w,(ci.x==null||ci.y===void 0)&&(di.autoPosition=!0))})),li.forEach(ci=>{var pi,yi,gi;let di=si.findIndex(vi=>vi._id===ci._id);if(di!==-1){let vi=si[di];if(ri){vi.w=ci.w;return}(ci.autoPosition||isNaN(ci.x)||isNaN(ci.y))&&this.findEmptyPosition(ci,oi),ci.autoPosition||(vi.x=(pi=ci.x)!=null?pi:vi.x,vi.y=(yi=ci.y)!=null?yi:vi.y,vi.w=(gi=ci.w)!=null?gi:vi.w,oi.push(vi)),si.splice(di,1)}})}if(ri)this.compact(ni,!1);else{if(si.length)if(typeof ni=="function")ni(ti,ei,oi,si);else{let li=ri?1:ti/ei,ui=ni==="move"||ni==="moveScale",ci=ni==="scale"||ni==="moveScale";si.forEach(di=>{di.x=ti===1?0:ui?Math.round(di.x*li):Math.min(di.x,ti-1),di.w=ti===1||ei===1?1:ci?Math.round(di.w*li)||1:Math.min(di.w,ti),oi.push(di)}),si=[]}oi=bi.sort(oi,-1),this._inColumnResize=!0,this.nodes=[],oi.forEach(li=>{this.addNode(li,!1),delete li._orig})}return this.nodes.forEach(li=>delete li._orig),this.batchUpdate(!1,!ri),delete this._inColumnResize,this}cacheLayout(ei,ti,ni=!1){let ri=[];return ei.forEach((oi,si)=>{var ai;if(oi._id===void 0){let li=oi.id?this.nodes.find(ui=>ui.id===oi.id):void 0;oi._id=(ai=li==null?void 0:li._id)!=null?ai:ii._idSeq++}ri[si]={x:oi.x,y:oi.y,w:oi.w,_id:oi._id}}),this._layouts=ni?[]:this._layouts||[],this._layouts[ti]=ri,this}cacheOneLayout(ei,ti){var oi;ei._id=(oi=ei._id)!=null?oi:ii._idSeq++;let ni={x:ei.x,y:ei.y,w:ei.w,_id:ei._id};(ei.autoPosition||ei.x===void 0)&&(delete ni.x,delete ni.y,ei.autoPosition&&(ni.autoPosition=!0)),this._layouts=this._layouts||[],this._layouts[ti]=this._layouts[ti]||[];let ri=this.findCacheLayout(ei,ti);return ri===-1?this._layouts[ti].push(ni):this._layouts[ti][ri]=ni,this}findCacheLayout(ei,ti){var ni,ri,oi;return(oi=(ri=(ni=this._layouts)==null?void 0:ni[ti])==null?void 0:ri.findIndex(si=>si._id===ei._id))!=null?oi:-1}removeNodeFromLayoutCache(ei){if(this._layouts)for(let ti=0;ti<this._layouts.length;ti++){let ni=this.findCacheLayout(ei,ti);ni!==-1&&this._layouts[ti].splice(ni,1)}}cleanupNode(ei){for(let ti in ei)ti[0]==="_"&&ti!=="_id"&&delete ei[ti];return this}};as._idSeq=0;var Yn={alwaysShowResizeHandle:"mobile",animate:!0,auto:!0,cellHeight:"auto",cellHeightThrottle:100,cellHeightUnit:"px",column:12,draggable:{handle:".grid-stack-item-content",appendTo:"body",scroll:!0},handle:".grid-stack-item-content",itemClass:"grid-stack-item",margin:10,marginUnit:"px",maxRow:0,minRow:0,placeholderClass:"grid-stack-placeholder",placeholderText:"",removableOptions:{accept:"grid-stack-item",decline:"grid-stack-non-removable"},resizable:{handles:"se"},rtl:"auto"};var Bi=class{};var $n=typeof window!="undefined"&&typeof document!="undefined"&&("ontouchstart"in document||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),Zr=class{};function Ll(ii,ei){if(ii.touches.length>1)return;ii.cancelable&&ii.preventDefault();let ti=ii.changedTouches[0],ni=document.createEvent("MouseEvents");ni.initMouseEvent(ei,!0,!0,window,1,ti.screenX,ti.screenY,ti.clientX,ti.clientY,!1,!1,!1,!1,0,null),ii.target.dispatchEvent(ni)}function Ch(ii,ei){ii.cancelable&&ii.preventDefault();let ti=document.createEvent("MouseEvents");ti.initMouseEvent(ei,!0,!0,window,1,ii.screenX,ii.screenY,ii.clientX,ii.clientY,!1,!1,!1,!1,0,null),ii.target.dispatchEvent(ti)}function Is(ii){Zr.touchHandled||(Zr.touchHandled=!0,Ll(ii,"mousedown"))}function Hs(ii){Zr.touchHandled&&Ll(ii,"mousemove")}function Ps(ii){if(!Zr.touchHandled)return;Zr.pointerLeaveTimeout&&(window.clearTimeout(Zr.pointerLeaveTimeout),delete Zr.pointerLeaveTimeout);let ei=!!Bi.dragElement;Ll(ii,"mouseup"),ei||Ll(ii,"click"),Zr.touchHandled=!1}function Fs(ii){ii.pointerType!=="mouse"&&ii.target.releasePointerCapture(ii.pointerId)}function Zc(ii){Bi.dragElement&&ii.pointerType!=="mouse"&&Ch(ii,"mouseenter")}function eu(ii){Bi.dragElement&&ii.pointerType!=="mouse"&&(Zr.pointerLeaveTimeout=window.setTimeout(()=>{delete Zr.pointerLeaveTimeout,Ch(ii,"mouseleave")},10))}var Ea=class ii{constructor(ei,ti,ni){this.host=ei,this.dir=ti,this.option=ni,this.moving=!1,this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this._init()}_init(){let ei=this.el=document.createElement("div");return ei.classList.add("ui-resizable-handle"),ei.classList.add(`${ii.prefix}${this.dir}`),ei.style.zIndex="100",ei.style.userSelect="none",this.host.appendChild(this.el),this.el.addEventListener("mousedown",this._mouseDown),$n&&(this.el.addEventListener("touchstart",Is),this.el.addEventListener("pointerdown",Fs)),this}destroy(){return this.moving&&this._mouseUp(this.mouseDownEvent),this.el.removeEventListener("mousedown",this._mouseDown),$n&&(this.el.removeEventListener("touchstart",Is),this.el.removeEventListener("pointerdown",Fs)),this.host.removeChild(this.el),delete this.el,delete this.host,this}_mouseDown(ei){this.mouseDownEvent=ei,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),$n&&(this.el.addEventListener("touchmove",Hs),this.el.addEventListener("touchend",Ps)),ei.stopPropagation(),ei.preventDefault()}_mouseMove(ei){let ti=this.mouseDownEvent;this.moving?this._triggerEvent("move",ei):Math.abs(ei.x-ti.x)+Math.abs(ei.y-ti.y)>2&&(this.moving=!0,this._triggerEvent("start",this.mouseDownEvent),this._triggerEvent("move",ei),document.addEventListener("keydown",this._keyEvent)),ei.stopPropagation()}_mouseUp(ei){this.moving&&(this._triggerEvent("stop",ei),document.removeEventListener("keydown",this._keyEvent)),document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),$n&&(this.el.removeEventListener("touchmove",Hs),this.el.removeEventListener("touchend",Ps)),delete this.moving,delete this.mouseDownEvent,ei.stopPropagation(),ei.preventDefault()}_keyEvent(ei){var ti,ni;ei.key==="Escape"&&((ni=(ti=this.host.gridstackNode)==null?void 0:ti.grid)==null||ni.engine.restoreInitial(),this._mouseUp(this.mouseDownEvent))}_triggerEvent(ei,ti){return this.option[ei]&&this.option[ei](ti),this}};Ea.prefix="ui-resizable-";var zo=class{constructor(){this._eventRegister={}}get disabled(){return this._disabled}on(ei,ti){this._eventRegister[ei]=ti}off(ei){delete this._eventRegister[ei]}enable(){this._disabled=!1}disable(){this._disabled=!0}destroy(){delete this._eventRegister}triggerEvent(ei,ti){if(!this.disabled&&this._eventRegister&&this._eventRegister[ei])return this._eventRegister[ei](ti)}};var wa=class ii extends zo{constructor(ei,ti={}){super(),this.el=ei,this.option=ti,this.rectScale={x:1,y:1},this._ui=()=>{let ri=this.el.parentElement.getBoundingClientRect(),oi={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},si=this.temporalRect||oi;return{position:{left:(si.left-ri.left)*this.rectScale.x,top:(si.top-ri.top)*this.rectScale.y},size:{width:si.width*this.rectScale.x,height:si.height*this.rectScale.y}}},this._mouseOver=this._mouseOver.bind(this),this._mouseOut=this._mouseOut.bind(this),this.enable(),this._setupAutoHide(this.option.autoHide),this._setupHandlers()}on(ei,ti){super.on(ei,ti)}off(ei){super.off(ei)}enable(){super.enable(),this.el.classList.remove("ui-resizable-disabled"),this._setupAutoHide(this.option.autoHide)}disable(){super.disable(),this.el.classList.add("ui-resizable-disabled"),this._setupAutoHide(!1)}destroy(){this._removeHandlers(),this._setupAutoHide(!1),delete this.el,super.destroy()}updateOption(ei){let ti=ei.handles&&ei.handles!==this.option.handles,ni=ei.autoHide&&ei.autoHide!==this.option.autoHide;return Object.keys(ei).forEach(ri=>this.option[ri]=ei[ri]),ti&&(this._removeHandlers(),this._setupHandlers()),ni&&this._setupAutoHide(this.option.autoHide),this}_setupAutoHide(ei){return ei?(this.el.classList.add("ui-resizable-autohide"),this.el.addEventListener("mouseover",this._mouseOver),this.el.addEventListener("mouseout",this._mouseOut)):(this.el.classList.remove("ui-resizable-autohide"),this.el.removeEventListener("mouseover",this._mouseOver),this.el.removeEventListener("mouseout",this._mouseOut),Bi.overResizeElement===this&&delete Bi.overResizeElement),this}_mouseOver(ei){Bi.overResizeElement||Bi.dragElement||(Bi.overResizeElement=this,this.el.classList.remove("ui-resizable-autohide"))}_mouseOut(ei){Bi.overResizeElement===this&&(delete Bi.overResizeElement,this.el.classList.add("ui-resizable-autohide"))}_setupHandlers(){return this.handlers=this.option.handles.split(",").map(ei=>ei.trim()).map(ei=>new Ea(this.el,ei,{start:ti=>{this._resizeStart(ti)},stop:ti=>{this._resizeStop(ti)},move:ti=>{this._resizing(ti,ei)}})),this}_resizeStart(ei){this.sizeToContent=bi.shouldSizeToContent(this.el.gridstackNode,!0),this.originalRect=this.el.getBoundingClientRect(),this.scrollEl=bi.getScrollElement(this.el),this.scrollY=this.scrollEl.scrollTop,this.scrolled=0,this.startEvent=ei,this._setupHelper(),this._applyChange();let ti=bi.initEvent(ei,{type:"resizestart",target:this.el});return this.option.start&&this.option.start(ti,this._ui()),this.el.classList.add("ui-resizable-resizing"),this.triggerEvent("resizestart",ti),this}_resizing(ei,ti){this.scrolled=this.scrollEl.scrollTop-this.scrollY,this.temporalRect=this._getChange(ei,ti),this._applyChange();let ni=bi.initEvent(ei,{type:"resize",target:this.el});return this.option.resize&&this.option.resize(ni,this._ui()),this.triggerEvent("resize",ni),this}_resizeStop(ei){let ti=bi.initEvent(ei,{type:"resizestop",target:this.el});return this.option.stop&&this.option.stop(ti),this.el.classList.remove("ui-resizable-resizing"),this.triggerEvent("resizestop",ti),this._cleanHelper(),delete this.startEvent,delete this.originalRect,delete this.temporalRect,delete this.scrollY,delete this.scrolled,this}_setupHelper(){this.elOriginStyleVal=ii._originStyleProp.map(ni=>this.el.style[ni]),this.parentOriginStylePosition=this.el.parentElement.style.position;let ei=this.el.parentElement,ti=bi.getValuesFromTransformedElement(ei);return this.rectScale={x:ti.xScale,y:ti.yScale},getComputedStyle(this.el.parentElement).position.match(/static/)&&(this.el.parentElement.style.position="relative"),this.el.style.position="absolute",this.el.style.opacity="0.8",this}_cleanHelper(){return ii._originStyleProp.forEach((ei,ti)=>{this.el.style[ei]=this.elOriginStyleVal[ti]||null}),this.el.parentElement.style.position=this.parentOriginStylePosition||null,this}_getChange(ei,ti){let ni=this.startEvent,ri={width:this.originalRect.width,height:this.originalRect.height+this.scrolled,left:this.originalRect.left,top:this.originalRect.top-this.scrolled},oi=ei.clientX-ni.clientX,si=this.sizeToContent?0:ei.clientY-ni.clientY,ai,li;ti.indexOf("e")>-1?ri.width+=oi:ti.indexOf("w")>-1&&(ri.width-=oi,ri.left+=oi,ai=!0),ti.indexOf("s")>-1?ri.height+=si:ti.indexOf("n")>-1&&(ri.height-=si,ri.top+=si,li=!0);let ui=this._constrainSize(ri.width,ri.height,ai,li);return Math.round(ri.width)!==Math.round(ui.width)&&(ti.indexOf("w")>-1&&(ri.left+=ri.width-ui.width),ri.width=ui.width),Math.round(ri.height)!==Math.round(ui.height)&&(ti.indexOf("n")>-1&&(ri.top+=ri.height-ui.height),ri.height=ui.height),ri}_constrainSize(ei,ti,ni,ri){let oi=this.option,si=(ni?oi.maxWidthMoveLeft:oi.maxWidth)||Number.MAX_SAFE_INTEGER,ai=oi.minWidth/this.rectScale.x||ei,li=(ri?oi.maxHeightMoveUp:oi.maxHeight)||Number.MAX_SAFE_INTEGER,ui=oi.minHeight/this.rectScale.y||ti,ci=Math.min(si,Math.max(ai,ei)),di=Math.min(li,Math.max(ui,ti));return{width:ci,height:di}}_applyChange(){let ei={left:0,top:0,width:0,height:0};if(this.el.style.position==="absolute"){let ti=this.el.parentElement,{left:ni,top:ri}=ti.getBoundingClientRect();ei={left:ni,top:ri,width:0,height:0}}return this.temporalRect?(Object.keys(this.temporalRect).forEach(ti=>{let ni=this.temporalRect[ti],ri=ti==="width"||ti==="left"?this.rectScale.x:ti==="height"||ti==="top"?this.rectScale.y:1;this.el.style[ti]=(ni-ei[ti])*ri+"px"}),this):this}_removeHandlers(){return this.handlers.forEach(ei=>ei.destroy()),delete this.handlers,this}};wa._originStyleProp=["width","height","position","left","top","opacity","zIndex"];var j_='input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle',xa=class ii extends zo{constructor(ei,ti={}){var oi;super(),this.el=ei,this.option=ti,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0};let ni=(oi=ti==null?void 0:ti.handle)==null?void 0:oi.substring(1),ri=ei.gridstackNode;this.dragEls=!ni||ei.classList.contains(ni)?[ei]:ri!=null&&ri.subGrid?[ei.querySelector(ti.handle)||ei]:Array.from(ei.querySelectorAll(ti.handle)),this.dragEls.length===0&&(this.dragEls=[ei]),this._mouseDown=this._mouseDown.bind(this),this._mouseMove=this._mouseMove.bind(this),this._mouseUp=this._mouseUp.bind(this),this._keyEvent=this._keyEvent.bind(this),this.enable()}on(ei,ti){super.on(ei,ti)}off(ei){super.off(ei)}enable(){this.disabled!==!1&&(super.enable(),this.dragEls.forEach(ei=>{ei.addEventListener("mousedown",this._mouseDown),$n&&(ei.addEventListener("touchstart",Is),ei.addEventListener("pointerdown",Fs))}),this.el.classList.remove("ui-draggable-disabled"))}disable(ei=!1){this.disabled!==!0&&(super.disable(),this.dragEls.forEach(ti=>{ti.removeEventListener("mousedown",this._mouseDown),$n&&(ti.removeEventListener("touchstart",Is),ti.removeEventListener("pointerdown",Fs))}),ei||this.el.classList.add("ui-draggable-disabled"))}destroy(){this.dragTimeout&&window.clearTimeout(this.dragTimeout),delete this.dragTimeout,this.mouseDownEvent&&this._mouseUp(this.mouseDownEvent),this.disable(!0),delete this.el,delete this.helper,delete this.option,super.destroy()}updateOption(ei){return Object.keys(ei).forEach(ti=>this.option[ti]=ei[ti]),this}_mouseDown(ei){if(!Bi.mouseHandled)return ei.button!==0||!this.dragEls.find(ti=>ti===ei.target)&&ei.target.closest(j_)||this.option.cancel&&ei.target.closest(this.option.cancel)||(this.mouseDownEvent=ei,delete this.dragging,delete Bi.dragElement,delete Bi.dropElement,document.addEventListener("mousemove",this._mouseMove,{capture:!0,passive:!0}),document.addEventListener("mouseup",this._mouseUp,!0),$n&&(ei.currentTarget.addEventListener("touchmove",Hs),ei.currentTarget.addEventListener("touchend",Ps)),ei.preventDefault(),document.activeElement&&document.activeElement.blur(),Bi.mouseHandled=!0),!0}_callDrag(ei){if(!this.dragging)return;let ti=bi.initEvent(ei,{target:this.el,type:"drag"});this.option.drag&&this.option.drag(ti,this.ui()),this.triggerEvent("drag",ti)}_mouseMove(ei){var ni;let ti=this.mouseDownEvent;if(this.lastDrag=ei,this.dragging)if(this._dragFollow(ei),Bi.pauseDrag){let ri=Number.isInteger(Bi.pauseDrag)?Bi.pauseDrag:100;this.dragTimeout&&window.clearTimeout(this.dragTimeout),this.dragTimeout=window.setTimeout(()=>this._callDrag(ei),ri)}else this._callDrag(ei);else if(Math.abs(ei.x-ti.x)+Math.abs(ei.y-ti.y)>3){this.dragging=!0,Bi.dragElement=this;let ri=(ni=this.el.gridstackNode)==null?void 0:ni.grid;ri?Bi.dropElement=ri.el.ddElement.ddDroppable:delete Bi.dropElement,this.helper=this._createHelper(),this._setupHelperContainmentStyle(),this.dragTransform=bi.getValuesFromTransformedElement(this.helperContainment),this.dragOffset=this._getDragOffset(ei,this.el,this.helperContainment),this._setupHelperStyle(ei);let oi=bi.initEvent(ei,{target:this.el,type:"dragstart"});this.option.start&&this.option.start(oi,this.ui()),this.triggerEvent("dragstart",oi),document.addEventListener("keydown",this._keyEvent)}return!0}_mouseUp(ei){var ti,ni;if(document.removeEventListener("mousemove",this._mouseMove,!0),document.removeEventListener("mouseup",this._mouseUp,!0),$n&&ei.currentTarget&&(ei.currentTarget.removeEventListener("touchmove",Hs,!0),ei.currentTarget.removeEventListener("touchend",Ps,!0)),this.dragging){delete this.dragging,(ti=this.el.gridstackNode)==null||delete ti._origRotate,document.removeEventListener("keydown",this._keyEvent),((ni=Bi.dropElement)==null?void 0:ni.el)===this.el.parentElement&&delete Bi.dropElement,this.helperContainment.style.position=this.parentOriginStylePosition||null,this.helper!==this.el&&this.helper.remove(),this._removeHelperStyle();let ri=bi.initEvent(ei,{target:this.el,type:"dragstop"});this.option.stop&&this.option.stop(ri),this.triggerEvent("dragstop",ri),Bi.dropElement&&Bi.dropElement.drop(ei)}delete this.helper,delete this.mouseDownEvent,delete Bi.dragElement,delete Bi.dropElement,delete Bi.mouseHandled,ei.preventDefault()}_keyEvent(ei){var ri,oi;let ti=this.el.gridstackNode,ni=(ti==null?void 0:ti.grid)||((oi=(ri=Bi.dropElement)==null?void 0:ri.el)==null?void 0:oi.gridstack);if(ei.key==="Escape")ti&&ti._origRotate&&(ti._orig=ti._origRotate,delete ti._origRotate),ni==null||ni.cancelDrag(),this._mouseUp(this.mouseDownEvent);else if(ti&&ni&&(ei.key==="r"||ei.key==="R")){if(!bi.canBeRotated(ti))return;ti._origRotate=ti._origRotate||Di({},ti._orig),delete ti._moving,ni.setAnimation(!1).rotate(ti.el,{top:-this.dragOffset.offsetTop,left:-this.dragOffset.offsetLeft}).setAnimation(),ti._moving=!0,this.dragOffset=this._getDragOffset(this.lastDrag,ti.el,this.helperContainment),this.helper.style.width=this.dragOffset.width+"px",this.helper.style.height=this.dragOffset.height+"px",bi.swap(ti._orig,"w","h"),delete ti._rect,this._mouseMove(this.lastDrag)}}_createHelper(){let ei=this.el;return typeof this.option.helper=="function"?ei=this.option.helper(this.el):this.option.helper==="clone"&&(ei=bi.cloneNode(this.el)),document.body.contains(ei)||bi.appendTo(ei,this.option.appendTo==="parent"?this.el.parentElement:this.option.appendTo),this.dragElementOriginStyle=ii.originStyleProp.map(ti=>this.el.style[ti]),ei}_setupHelperStyle(ei){this.helper.classList.add("ui-draggable-dragging");let ti=this.helper.style;return ti.pointerEvents="none",ti.width=this.dragOffset.width+"px",ti.height=this.dragOffset.height+"px",ti.willChange="left, top",ti.position="fixed",this._dragFollow(ei),ti.transition="none",setTimeout(()=>{this.helper&&(ti.transition=null)},0),this}_removeHelperStyle(){var ti;this.helper.classList.remove("ui-draggable-dragging");let ei=(ti=this.helper)==null?void 0:ti.gridstackNode;if(!(ei!=null&&ei._isAboutToRemove)&&this.dragElementOriginStyle){let ni=this.helper,ri=this.dragElementOriginStyle.transition||null;ni.style.transition=this.dragElementOriginStyle.transition="none",ii.originStyleProp.forEach(oi=>ni.style[oi]=this.dragElementOriginStyle[oi]||null),setTimeout(()=>ni.style.transition=ri,50)}return delete this.dragElementOriginStyle,this}_dragFollow(ei){let ti={left:0,top:0},ni=this.helper.style,ri=this.dragOffset;ni.left=(ei.clientX+ri.offsetLeft-ti.left)*this.dragTransform.xScale+"px",ni.top=(ei.clientY+ri.offsetTop-ti.top)*this.dragTransform.yScale+"px"}_setupHelperContainmentStyle(){return this.helperContainment=this.helper.parentElement,this.helper.style.position!=="fixed"&&(this.parentOriginStylePosition=this.helperContainment.style.position,getComputedStyle(this.helperContainment).position.match(/static/)&&(this.helperContainment.style.position="relative")),this}_getDragOffset(ei,ti,ni){let ri=0,oi=0;ni&&(ri=this.dragTransform.xOffset,oi=this.dragTransform.yOffset);let si=ti.getBoundingClientRect();return{left:si.left,top:si.top,offsetLeft:-ei.clientX+si.left-ri,offsetTop:-ei.clientY+si.top-oi,width:si.width*this.dragTransform.xScale,height:si.height*this.dragTransform.yScale}}ui(){let ti=this.el.parentElement.getBoundingClientRect(),ni=this.helper.getBoundingClientRect();return{position:{top:(ni.top-ti.top)*this.dragTransform.yScale,left:(ni.left-ti.left)*this.dragTransform.xScale}}}};xa.originStyleProp=["width","height","transform","transform-origin","transition","pointerEvents","position","left","top","minWidth","willChange"];var Ml=class extends zo{constructor(ei,ti={}){super(),this.el=ei,this.option=ti,this._mouseEnter=this._mouseEnter.bind(this),this._mouseLeave=this._mouseLeave.bind(this),this.enable(),this._setupAccept()}on(ei,ti){super.on(ei,ti)}off(ei){super.off(ei)}enable(){this.disabled!==!1&&(super.enable(),this.el.classList.add("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),this.el.addEventListener("mouseenter",this._mouseEnter),this.el.addEventListener("mouseleave",this._mouseLeave),$n&&(this.el.addEventListener("pointerenter",Zc),this.el.addEventListener("pointerleave",eu)))}disable(ei=!1){this.disabled!==!0&&(super.disable(),this.el.classList.remove("ui-droppable"),ei||this.el.classList.add("ui-droppable-disabled"),this.el.removeEventListener("mouseenter",this._mouseEnter),this.el.removeEventListener("mouseleave",this._mouseLeave),$n&&(this.el.removeEventListener("pointerenter",Zc),this.el.removeEventListener("pointerleave",eu)))}destroy(){this.disable(!0),this.el.classList.remove("ui-droppable"),this.el.classList.remove("ui-droppable-disabled"),super.destroy()}updateOption(ei){return Object.keys(ei).forEach(ti=>this.option[ti]=ei[ti]),this._setupAccept(),this}_mouseEnter(ei){if(!Bi.dragElement||!this._canDrop(Bi.dragElement.el))return;ei.preventDefault(),ei.stopPropagation(),Bi.dropElement&&Bi.dropElement!==this&&Bi.dropElement._mouseLeave(ei,!0),Bi.dropElement=this;let ti=bi.initEvent(ei,{target:this.el,type:"dropover"});this.option.over&&this.option.over(ti,this._ui(Bi.dragElement)),this.triggerEvent("dropover",ti),this.el.classList.add("ui-droppable-over")}_mouseLeave(ei,ti=!1){var ri;if(!Bi.dragElement||Bi.dropElement!==this)return;ei.preventDefault(),ei.stopPropagation();let ni=bi.initEvent(ei,{target:this.el,type:"dropout"});if(this.option.out&&this.option.out(ni,this._ui(Bi.dragElement)),this.triggerEvent("dropout",ni),Bi.dropElement===this&&(delete Bi.dropElement,!ti)){let oi,si=this.el.parentElement;for(;!oi&&si;)oi=(ri=si.ddElement)==null?void 0:ri.ddDroppable,si=si.parentElement;oi&&oi._mouseEnter(ei)}}drop(ei){ei.preventDefault();let ti=bi.initEvent(ei,{target:this.el,type:"drop"});this.option.drop&&this.option.drop(ti,this._ui(Bi.dragElement)),this.triggerEvent("drop",ti)}_canDrop(ei){return ei&&(!this.accept||this.accept(ei))}_setupAccept(){return this.option.accept?(typeof this.option.accept=="string"?this.accept=ei=>ei.classList.contains(this.option.accept)||ei.matches(this.option.accept):this.accept=this.option.accept,this):this}_ui(ei){return Di({draggable:ei.el},ei.ui())}};var kl=class ii{static init(ei){return ei.ddElement||(ei.ddElement=new ii(ei)),ei.ddElement}constructor(ei){this.el=ei}on(ei,ti){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(ei)>-1?this.ddDraggable.on(ei,ti):this.ddDroppable&&["drop","dropover","dropout"].indexOf(ei)>-1?this.ddDroppable.on(ei,ti):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(ei)>-1&&this.ddResizable.on(ei,ti),this}off(ei){return this.ddDraggable&&["drag","dragstart","dragstop"].indexOf(ei)>-1?this.ddDraggable.off(ei):this.ddDroppable&&["drop","dropover","dropout"].indexOf(ei)>-1?this.ddDroppable.off(ei):this.ddResizable&&["resizestart","resize","resizestop"].indexOf(ei)>-1&&this.ddResizable.off(ei),this}setupDraggable(ei){return this.ddDraggable?this.ddDraggable.updateOption(ei):this.ddDraggable=new xa(this.el,ei),this}cleanDraggable(){return this.ddDraggable&&(this.ddDraggable.destroy(),delete this.ddDraggable),this}setupResizable(ei){return this.ddResizable?this.ddResizable.updateOption(ei):this.ddResizable=new wa(this.el,ei),this}cleanResizable(){return this.ddResizable&&(this.ddResizable.destroy(),delete this.ddResizable),this}setupDroppable(ei){return this.ddDroppable?this.ddDroppable.updateOption(ei):this.ddDroppable=new Ml(this.el,ei),this}cleanDroppable(){return this.ddDroppable&&(this.ddDroppable.destroy(),delete this.ddDroppable),this}};var Nl=class{resizable(ei,ti,ni,ri){return this._getDDElements(ei).forEach(oi=>{if(ti==="disable"||ti==="enable")oi.ddResizable&&oi.ddResizable[ti]();else if(ti==="destroy")oi.ddResizable&&oi.cleanResizable();else if(ti==="option")oi.setupResizable({[ni]:ri});else{let ai=oi.el.gridstackNode.grid,li=oi.el.getAttribute("gs-resize-handles")||ai.opts.resizable.handles||"e,s,se";li==="all"&&(li="n,e,s,w,se,sw,ne,nw");let ui=!ai.opts.alwaysShowResizeHandle;oi.setupResizable(sn(Di({},ai.opts.resizable),{handles:li,autoHide:ui,start:ti.start,stop:ti.stop,resize:ti.resize}))}}),this}draggable(ei,ti,ni,ri){return this._getDDElements(ei).forEach(oi=>{if(ti==="disable"||ti==="enable")oi.ddDraggable&&oi.ddDraggable[ti]();else if(ti==="destroy")oi.ddDraggable&&oi.cleanDraggable();else if(ti==="option")oi.setupDraggable({[ni]:ri});else{let si=oi.el.gridstackNode.grid;oi.setupDraggable(sn(Di({},si.opts.draggable),{start:ti.start,stop:ti.stop,drag:ti.drag}))}}),this}dragIn(ei,ti){return this._getDDElements(ei).forEach(ni=>ni.setupDraggable(ti)),this}droppable(ei,ti,ni,ri){return typeof ti.accept=="function"&&!ti._accept&&(ti._accept=ti.accept,ti.accept=oi=>ti._accept(oi)),this._getDDElements(ei).forEach(oi=>{ti==="disable"||ti==="enable"?oi.ddDroppable&&oi.ddDroppable[ti]():ti==="destroy"?oi.ddDroppable&&oi.cleanDroppable():ti==="option"?oi.setupDroppable({[ni]:ri}):oi.setupDroppable(ti)}),this}isDroppable(ei){var ti;return!!((ti=ei==null?void 0:ei.ddElement)!=null&&ti.ddDroppable&&!ei.ddElement.ddDroppable.disabled)}isDraggable(ei){var ti;return!!((ti=ei==null?void 0:ei.ddElement)!=null&&ti.ddDraggable&&!ei.ddElement.ddDraggable.disabled)}isResizable(ei){var ti;return!!((ti=ei==null?void 0:ei.ddElement)!=null&&ti.ddResizable&&!ei.ddElement.ddResizable.disabled)}on(ei,ti,ni){return this._getDDElements(ei).forEach(ri=>ri.on(ti,oi=>{ni(oi,Bi.dragElement?Bi.dragElement.el:oi.target,Bi.dragElement?Bi.dragElement.helper:null)})),this}off(ei,ti){return this._getDDElements(ei).forEach(ni=>ni.off(ti)),this}_getDDElements(ei,ti=!0){let ni=bi.getElements(ei);if(!ni.length)return[];let ri=ni.map(oi=>oi.ddElement||(ti?kl.init(oi):null));return ti||ri.filter(oi=>oi),ri}};var Bn=new Nl,Jr=class ii{static init(ei={},ti=".grid-stack"){if(typeof document=="undefined")return null;let ni=ii.getGridElement(ti);return ni?(ni.gridstack||(ni.gridstack=new ii(ni,bi.cloneDeep(ei))),ni.gridstack):(console.error(typeof ti=="string"?'GridStack.initAll() no grid was found with selector "'+ti+`" - element missing or wrong selector ?
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`:"GridStack.init() no grid element was passed."),null)}static initAll(ei={},ti=".grid-stack"){let ni=[];return typeof document=="undefined"||(ii.getGridElements(ti).forEach(ri=>{ri.gridstack||(ri.gridstack=new ii(ri,bi.cloneDeep(ei))),ni.push(ri.gridstack)}),ni.length===0&&console.error('GridStack.initAll() no grid was found with selector "'+ti+`" - element missing or wrong selector ?
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)),ni}static addGrid(ei,ti={}){if(!ei)return null;let ni=ei;if(ni.gridstack){let si=ni.gridstack;return ti&&(si.opts=Di(Di({},si.opts),ti)),ti.children!==void 0&&si.load(ti.children),si}return(!ei.classList.contains("grid-stack")||ii.addRemoveCB)&&(ii.addRemoveCB?ni=ii.addRemoveCB(ei,ti,!0,!0):ni=bi.createDiv(["grid-stack",ti.class],ei)),ii.init(ti,ni)}static registerEngine(ei){ii.engineClass=ei}get placeholder(){if(!this._placeholder){this._placeholder=bi.createDiv([this.opts.placeholderClass,Yn.itemClass,this.opts.itemClass]);let ei=bi.createDiv(["placeholder-content"],this._placeholder);this.opts.placeholderText&&(ei.textContent=this.opts.placeholderText)}return this._placeholder}constructor(ei,ti={}){var di,pi,yi;this.el=ei,this.opts=ti,this.animationDelay=310,this._gsEventHandler={},this._extraDragRow=0,this.dragTransform={xScale:1,yScale:1,xOffset:0,yOffset:0},ei.gridstack=this,this.opts=ti=ti||{},ei.classList.contains("grid-stack")||this.el.classList.add("grid-stack"),ti.row&&(ti.minRow=ti.maxRow=ti.row,delete ti.row);let ni=bi.toNumber(ei.getAttribute("gs-row"));ti.column==="auto"&&delete ti.column,ti.alwaysShowResizeHandle!==void 0&&(ti._alwaysShowResizeHandle=ti.alwaysShowResizeHandle);let ri=(di=ti.columnOpts)==null?void 0:di.breakpoints,oi=ti;if(oi.oneColumnModeDomSort&&(delete oi.oneColumnModeDomSort,console.log("warning: Gridstack oneColumnModeDomSort no longer supported. Use GridStackOptions.columnOpts instead.")),oi.oneColumnSize||oi.disableOneColumnMode===!1){let gi=oi.oneColumnSize||768;delete oi.oneColumnSize,delete oi.disableOneColumnMode,ti.columnOpts=ti.columnOpts||{},ri=ti.columnOpts.breakpoints=ti.columnOpts.breakpoints||[];let vi=ri.find(Ei=>Ei.c===1);vi?vi.w=gi:(vi={c:1,w:gi},ri.push(vi,{c:12,w:gi+1}))}let si=ti.columnOpts;si&&(!si.columnWidth&&!((pi=si.breakpoints)!=null&&pi.length)?(delete ti.columnOpts,ri=void 0):si.columnMax=si.columnMax||12),(ri==null?void 0:ri.length)>1&&ri.sort((gi,vi)=>(vi.w||0)-(gi.w||0));let ai=sn(Di({},bi.cloneDeep(Yn)),{column:bi.toNumber(ei.getAttribute("gs-column"))||Yn.column,minRow:ni||bi.toNumber(ei.getAttribute("gs-min-row"))||Yn.minRow,maxRow:ni||bi.toNumber(ei.getAttribute("gs-max-row"))||Yn.maxRow,staticGrid:bi.toBool(ei.getAttribute("gs-static"))||Yn.staticGrid,sizeToContent:bi.toBool(ei.getAttribute("gs-size-to-content"))||void 0,draggable:{handle:(ti.handleClass?"."+ti.handleClass:ti.handle?ti.handle:"")||Yn.draggable.handle},removableOptions:{accept:ti.itemClass||Yn.removableOptions.accept,decline:Yn.removableOptions.decline}});ei.getAttribute("gs-animate")&&(ai.animate=bi.toBool(ei.getAttribute("gs-animate"))),ti=bi.defaults(ti,ai),this._initMargin(),this.checkDynamicColumn(),this.el.classList.add("gs-"+ti.column),ti.rtl==="auto"&&(ti.rtl=ei.style.direction==="rtl"),ti.rtl&&this.el.classList.add("grid-stack-rtl");let li=this.el.closest("."+Yn.itemClass),ui=li==null?void 0:li.gridstackNode;ui&&(ui.subGrid=this,this.parentGridNode=ui,this.el.classList.add("grid-stack-nested"),ui.el.classList.add("grid-stack-sub-grid")),this._isAutoCellHeight=ti.cellHeight==="auto",this._isAutoCellHeight||ti.cellHeight==="initial"?this.cellHeight(void 0,!1):(typeof ti.cellHeight=="number"&&ti.cellHeightUnit&&ti.cellHeightUnit!==Yn.cellHeightUnit&&(ti.cellHeight=ti.cellHeight+ti.cellHeightUnit,delete ti.cellHeightUnit),this.cellHeight(ti.cellHeight,!1)),ti.alwaysShowResizeHandle==="mobile"&&(ti.alwaysShowResizeHandle=$n),this._styleSheetClass="gs-id-"+as._idSeq++,this.el.classList.add(this._styleSheetClass),this._setStaticClass();let ci=ti.engineClass||ii.engineClass||as;if(this.engine=new ci({column:this.getColumn(),float:ti.float,maxRow:ti.maxRow,onChange:gi=>{let vi=0;this.engine.nodes.forEach(Ei=>{vi=Math.max(vi,Ei.y+Ei.h)}),gi.forEach(Ei=>{let Ci=Ei.el;Ci&&(Ei._removeDOM?(Ci&&Ci.remove(),delete Ei._removeDOM):this._writePosAttr(Ci,Ei))}),this._updateStyles(!1,vi)}}),this._updateStyles(!1,0),ti.auto&&(this.batchUpdate(),this.engine._loading=!0,this.getGridItems().forEach(gi=>this._prepareElement(gi)),delete this.engine._loading,this.batchUpdate(!1)),ti.children){let gi=ti.children;delete ti.children,gi.length&&this.load(gi)}this.setAnimation(),ti.subGridDynamic&&!Bi.pauseDrag&&(Bi.pauseDrag=!0),((yi=ti.draggable)==null?void 0:yi.pause)!==void 0&&(Bi.pauseDrag=ti.draggable.pause),this._setupRemoveDrop(),this._setupAcceptWidget(),this._updateResizeEvent()}addWidget(ei){if(typeof ei=="string"){console.error("V11: GridStack.addWidget() does not support string anymore. see #2736");return}if(ei.ELEMENT_NODE)return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"),this.makeWidget(ei);let ti,ni=ei;if(ni.grid=this,ni!=null&&ni.el?ti=ni.el:ii.addRemoveCB?ti=ii.addRemoveCB(this.el,ei,!0,!1):ti=bi.createWidgetDivs(this.opts.itemClass,ni),!ti)return;if(ni=ti.gridstackNode,ni&&ti.parentElement===this.el&&this.engine.nodes.find(oi=>oi._id===ni._id))return ti;let ri=this._readAttr(ti);return bi.defaults(ei,ri),this.engine.prepareNode(ei),this.el.appendChild(ti),this.makeWidget(ti,ei),ti}makeSubGrid(ei,ti,ni,ri=!0){var yi,gi,vi;let oi=ei.gridstackNode;if(oi||(oi=this.makeWidget(ei).gridstackNode),(yi=oi.subGrid)!=null&&yi.el)return oi.subGrid;let si,ai=this;for(;ai&&!si;)si=(gi=ai.opts)==null?void 0:gi.subGridOpts,ai=(vi=ai.parentGridNode)==null?void 0:vi.grid;ti=bi.cloneDeep(Di(Di(sn(Di({},this.opts),{id:void 0,children:void 0,column:"auto",columnOpts:void 0,layout:"list",subGridOpts:void 0}),si||{}),ti||oi.subGridOpts||{})),oi.subGridOpts=ti;let li;ti.column==="auto"&&(li=!0,ti.column=Math.max(oi.w||1,(ni==null?void 0:ni.w)||1),delete ti.columnOpts);let ui=oi.el.querySelector(".grid-stack-item-content"),ci,di;if(ri&&(this._removeDD(oi.el),di=sn(Di({},oi),{x:0,y:0}),bi.removeInternalForSave(di),delete di.subGridOpts,oi.content&&(di.content=oi.content,delete oi.content),ii.addRemoveCB?ci=ii.addRemoveCB(this.el,di,!0,!1):(ci=bi.createDiv(["grid-stack-item"]),ci.appendChild(ui),ui=bi.createDiv(["grid-stack-item-content"],oi.el)),this._prepareDragDropByNode(oi)),ni){let Ei=li?ti.column:oi.w,Ci=oi.h+ni.h,xi=oi.el.style;xi.transition="none",this.update(oi.el,{w:Ei,h:Ci}),setTimeout(()=>xi.transition=null)}let pi=oi.subGrid=ii.addGrid(ui,ti);return ni!=null&&ni._moving&&(pi._isTemp=!0),li&&(pi._autoColumn=!0),ri&&pi.makeWidget(ci,di),ni&&(ni._moving?window.setTimeout(()=>bi.simulateMouseEvent(ni._event,"mouseenter",pi.el),0):pi.makeWidget(oi.el,oi)),this.resizeToContentCheck(!1,oi),pi}removeAsSubGrid(ei){var ni;let ti=(ni=this.parentGridNode)==null?void 0:ni.grid;ti&&(ti.batchUpdate(),ti.removeWidget(this.parentGridNode.el,!0,!0),this.engine.nodes.forEach(ri=>{ri.x+=this.parentGridNode.x,ri.y+=this.parentGridNode.y,ti.makeWidget(ri.el,ri)}),ti.batchUpdate(!1),this.parentGridNode&&delete this.parentGridNode.subGrid,delete this.parentGridNode,ei&&window.setTimeout(()=>bi.simulateMouseEvent(ei._event,"mouseenter",ti.el),0))}save(ei=!0,ti=!1,ni=ii.saveCB){let ri=this.engine.save(ei,ni);if(ri.forEach(oi=>{var si;if(ei&&oi.el&&!oi.subGrid&&!ni){let ai=oi.el.querySelector(".grid-stack-item-content");oi.content=ai==null?void 0:ai.innerHTML,oi.content||delete oi.content}else if(!ei&&!ni&&delete oi.content,(si=oi.subGrid)!=null&&si.el){let ai=oi.subGrid.save(ei,ti,ni);oi.subGridOpts=ti?ai:{children:ai},delete oi.subGrid}delete oi.el}),ti){let oi=bi.cloneDeep(this.opts);oi.marginBottom===oi.marginTop&&oi.marginRight===oi.marginLeft&&oi.marginTop===oi.marginRight&&(oi.margin=oi.marginTop,delete oi.marginTop,delete oi.marginRight,delete oi.marginBottom,delete oi.marginLeft),oi.rtl===(this.el.style.direction==="rtl")&&(oi.rtl="auto"),this._isAutoCellHeight&&(oi.cellHeight="auto"),this._autoColumn&&(oi.column="auto");let si=oi._alwaysShowResizeHandle;return delete oi._alwaysShowResizeHandle,si!==void 0?oi.alwaysShowResizeHandle=si:delete oi.alwaysShowResizeHandle,bi.removeInternalAndSame(oi,Yn),oi.children=ri,oi}return ri}load(ei,ti=ii.addRemoveCB||!0){var ui;ei=bi.cloneDeep(ei);let ni=this.getColumn();ei.forEach(ci=>{ci.w=ci.w||1,ci.h=ci.h||1}),ei=bi.sort(ei);let ri=0;ei.forEach(ci=>{ri=Math.max(ri,(ci.x||0)+ci.w)}),ri>this.engine.defaultColumn&&(this.engine.defaultColumn=ri),ri>ni&&(this._ignoreLayoutsNodeChange=!0,this.engine.cacheLayout(ei,ri,!0));let oi=ii.addRemoveCB;typeof ti=="function"&&(ii.addRemoveCB=ti);let si=[];this.batchUpdate();let ai=!this.engine.nodes.length;ai&&this.setAnimation(!1),!ai&&ti&&[...this.engine.nodes].forEach(di=>{if(!di.id)return;bi.find(ei,di.id)||(ii.addRemoveCB&&ii.addRemoveCB(this.el,di,!1,!1),si.push(di),this.removeWidget(di.el,!0,!1))}),this.engine._loading=!0;let li=[];return this.engine.nodes=this.engine.nodes.filter(ci=>bi.find(ei,ci.id)?(li.push(ci),!1):!0),ei.forEach(ci=>{var pi;let di=bi.find(li,ci.id);if(di){if(bi.shouldSizeToContent(di)&&(ci.h=di.h),this.engine.nodeBoundFix(ci),(ci.autoPosition||ci.x===void 0||ci.y===void 0)&&(ci.w=ci.w||di.w,ci.h=ci.h||di.h,this.engine.findEmptyPosition(ci)),this.engine.nodes.push(di),bi.samePos(di,ci)&&this.engine.nodes.length>1&&(this.moveNode(di,sn(Di({},ci),{forceCollide:!0})),bi.copyPos(ci,di)),this.update(di.el,ci),(pi=ci.subGridOpts)!=null&&pi.children){let yi=di.el.querySelector(".grid-stack");yi&&yi.gridstack&&yi.gridstack.load(ci.subGridOpts.children)}}else ti&&this.addWidget(ci)}),delete this.engine._loading,this.engine.removedNodes=si,this.batchUpdate(!1),delete this._ignoreLayoutsNodeChange,oi?ii.addRemoveCB=oi:delete ii.addRemoveCB,ai&&((ui=this.opts)!=null&&ui.animate)&&this.setAnimation(this.opts.animate,!0),this}batchUpdate(ei=!0){return this.engine.batchUpdate(ei),ei||(this._updateContainerHeight(),this._triggerRemoveEvent(),this._triggerAddEvent(),this._triggerChangeEvent()),this}getCellHeight(ei=!1){if(this.opts.cellHeight&&this.opts.cellHeight!=="auto"&&(!ei||!this.opts.cellHeightUnit||this.opts.cellHeightUnit==="px"))return this.opts.cellHeight;if(this.opts.cellHeightUnit==="rem")return this.opts.cellHeight*parseFloat(getComputedStyle(document.documentElement).fontSize);if(this.opts.cellHeightUnit==="em")return this.opts.cellHeight*parseFloat(getComputedStyle(this.el).fontSize);if(this.opts.cellHeightUnit==="cm")return this.opts.cellHeight*(96/2.54);if(this.opts.cellHeightUnit==="mm")return this.opts.cellHeight*(96/2.54)/10;let ti=this.el.querySelector("."+this.opts.itemClass);if(ti){let ri=bi.toNumber(ti.getAttribute("gs-h"))||1;return Math.round(ti.offsetHeight/ri)}let ni=parseInt(this.el.getAttribute("gs-current-row"));return ni?Math.round(this.el.getBoundingClientRect().height/ni):this.opts.cellHeight}cellHeight(ei,ti=!0){if(ti&&ei!==void 0&&this._isAutoCellHeight!==(ei==="auto")&&(this._isAutoCellHeight=ei==="auto",this._updateResizeEvent()),(ei==="initial"||ei==="auto")&&(ei=void 0),ei===void 0){let ri=-this.opts.marginRight-this.opts.marginLeft+this.opts.marginTop+this.opts.marginBottom;ei=this.cellWidth()+ri}let ni=bi.parseHeight(ei);return this.opts.cellHeightUnit===ni.unit&&this.opts.cellHeight===ni.h?this:(this.opts.cellHeightUnit=ni.unit,this.opts.cellHeight=ni.h,this.resizeToContentCheck(),ti&&this._updateStyles(!0),this)}cellWidth(){return this._widthOrContainer()/this.getColumn()}_widthOrContainer(ei=!1){var ti;return ei&&((ti=this.opts.columnOpts)!=null&&ti.breakpointForWindow)?window.innerWidth:this.el.clientWidth||this.el.parentElement.clientWidth||window.innerWidth}checkDynamicColumn(){var oi,si;let ei=this.opts.columnOpts;if(!ei||!ei.columnWidth&&!((oi=ei.breakpoints)!=null&&oi.length))return!1;let ti=this.getColumn(),ni=ti,ri=this._widthOrContainer(!0);if(ei.columnWidth)ni=Math.min(Math.round(ri/ei.columnWidth)||1,ei.columnMax);else{ni=ei.columnMax;let ai=0;for(;ai<ei.breakpoints.length&&ri<=ei.breakpoints[ai].w;)ni=ei.breakpoints[ai++].c||ti}if(ni!==ti){let ai=(si=ei.breakpoints)==null?void 0:si.find(li=>li.c===ni);return this.column(ni,(ai==null?void 0:ai.layout)||ei.layout),!0}return!1}compact(ei="compact",ti=!0){return this.engine.compact(ei,ti),this._triggerChangeEvent(),this}column(ei,ti="moveScale"){if(!ei||ei<1||this.opts.column===ei)return this;let ni=this.getColumn();return this.opts.column=ei,this.engine?(this.engine.column=ei,this.el.classList.remove("gs-"+ni),this.el.classList.add("gs-"+ei),this.engine.columnChanged(ni,ei,ti),this._isAutoCellHeight&&this.cellHeight(),this.resizeToContentCheck(!0),this._ignoreLayoutsNodeChange=!0,this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,this):this}getColumn(){return this.opts.column}getGridItems(){return Array.from(this.el.children).filter(ei=>ei.matches("."+this.opts.itemClass)&&!ei.matches("."+this.opts.placeholderClass))}destroy(ei=!0){var ti,ni;if(this.el)return this.offAll(),this._updateResizeEvent(!0),this.setStatic(!0,!1),this.setAnimation(!1),ei?this.el.parentNode.removeChild(this.el):(this.removeAll(ei),this.el.classList.remove(this._styleSheetClass),this.el.removeAttribute("gs-current-row")),this._removeStylesheet(),(ti=this.parentGridNode)==null||delete ti.subGrid,delete this.parentGridNode,delete this.opts,(ni=this._placeholder)==null||delete ni.gridstackNode,delete this._placeholder,delete this.engine,delete this.el.gridstack,delete this.el,this}float(ei){return this.opts.float!==ei&&(this.opts.float=this.engine.float=ei,this._triggerChangeEvent()),this}getFloat(){return this.engine.float}getCellFromPixel(ei,ti=!1){let ni=this.el.getBoundingClientRect(),ri;ti?ri={top:ni.top+document.documentElement.scrollTop,left:ni.left}:ri={top:this.el.offsetTop,left:this.el.offsetLeft};let oi=ei.left-ri.left,si=ei.top-ri.top,ai=ni.width/this.getColumn(),li=ni.height/parseInt(this.el.getAttribute("gs-current-row"));return{x:Math.floor(oi/ai),y:Math.floor(si/li)}}getRow(){return Math.max(this.engine.getRow(),this.opts.minRow)}isAreaEmpty(ei,ti,ni,ri){return this.engine.isAreaEmpty(ei,ti,ni,ri)}makeWidget(ei,ti){let ni=ii.getElement(ei);if(!ni)return;ni.parentElement||this.el.appendChild(ni),this._prepareElement(ni,!0,ti);let ri=ni.gridstackNode;return this._updateContainerHeight(),ri.subGridOpts&&this.makeSubGrid(ni,ri.subGridOpts,void 0,!1),this.opts.column===1&&(this._ignoreLayoutsNodeChange=!0),this._triggerAddEvent(),this._triggerChangeEvent(),delete this._ignoreLayoutsNodeChange,ni}on(ei,ti){return ei.indexOf(" ")!==-1?(ei.split(" ").forEach(ri=>this.on(ri,ti)),this):(ei==="change"||ei==="added"||ei==="removed"||ei==="enable"||ei==="disable"?(ei==="enable"||ei==="disable"?this._gsEventHandler[ei]=ri=>ti(ri):this._gsEventHandler[ei]=ri=>{ri.detail&&ti(ri,ri.detail)},this.el.addEventListener(ei,this._gsEventHandler[ei])):ei==="drag"||ei==="dragstart"||ei==="dragstop"||ei==="resizestart"||ei==="resize"||ei==="resizestop"||ei==="dropped"||ei==="resizecontent"?this._gsEventHandler[ei]=ti:console.error("GridStack.on("+ei+") event not supported"),this)}off(ei){return ei.indexOf(" ")!==-1?(ei.split(" ").forEach(ni=>this.off(ni)),this):((ei==="change"||ei==="added"||ei==="removed"||ei==="enable"||ei==="disable")&&this._gsEventHandler[ei]&&this.el.removeEventListener(ei,this._gsEventHandler[ei]),delete this._gsEventHandler[ei],this)}offAll(){return Object.keys(this._gsEventHandler).forEach(ei=>this.off(ei)),this}removeWidget(ei,ti=!0,ni=!0){return ei?(ii.getElements(ei).forEach(ri=>{if(ri.parentElement&&ri.parentElement!==this.el)return;let oi=ri.gridstackNode;oi||(oi=this.engine.nodes.find(si=>ri===si.el)),oi&&(ti&&ii.addRemoveCB&&ii.addRemoveCB(this.el,oi,!1,!1),delete ri.gridstackNode,this._removeDD(ri),this.engine.removeNode(oi,ti,ni),ti&&ri.parentElement&&ri.remove())}),ni&&(this._triggerRemoveEvent(),this._triggerChangeEvent()),this):(console.error("Error: GridStack.removeWidget(undefined) called"),this)}removeAll(ei=!0,ti=!0){return this.engine.nodes.forEach(ni=>{ei&&ii.addRemoveCB&&ii.addRemoveCB(this.el,ni,!1,!1),delete ni.el.gridstackNode,this.opts.staticGrid||this._removeDD(ni.el)}),this.engine.removeAll(ei,ti),ti&&this._triggerRemoveEvent(),this}setAnimation(ei=this.opts.animate,ti){return ti?setTimeout(()=>{this.opts&&this.setAnimation(ei)}):ei?this.el.classList.add("grid-stack-animate"):this.el.classList.remove("grid-stack-animate"),this}hasAnimationCSS(){return this.el.classList.contains("grid-stack-animate")}setStatic(ei,ti=!0,ni=!0){return!!this.opts.staticGrid===ei?this:(ei?this.opts.staticGrid=!0:delete this.opts.staticGrid,this._setupRemoveDrop(),this._setupAcceptWidget(),this.engine.nodes.forEach(ri=>{this._prepareDragDropByNode(ri),ri.subGrid&&ni&&ri.subGrid.setStatic(ei,ti,ni)}),ti&&this._setStaticClass(),this)}update(ei,ti){if(arguments.length>2){console.warn("gridstack.ts: `update(el, x, y, w, h)` is deprecated. Use `update(el, {x, w, content, ...})`. It will be removed soon");let ni=arguments,ri=1;return ti={x:ni[ri++],y:ni[ri++],w:ni[ri++],h:ni[ri++]},this.update(ei,ti)}return ii.getElements(ei).forEach(ni=>{var ci;let ri=ni==null?void 0:ni.gridstackNode;if(!ri)return;let oi=bi.cloneDeep(ti);this.engine.nodeBoundFix(oi),delete oi.autoPosition;let si=["x","y","w","h"],ai;if(si.some(di=>oi[di]!==void 0&&oi[di]!==ri[di])&&(ai={},si.forEach(di=>{ai[di]=oi[di]!==void 0?oi[di]:ri[di],delete oi[di]})),!ai&&(oi.minW||oi.minH||oi.maxW||oi.maxH)&&(ai={}),oi.content!==void 0){let di=ni.querySelector(".grid-stack-item-content");di&&di.textContent!==oi.content&&(ri.content=oi.content,ii.renderCB(di,oi),(ci=ri.subGrid)!=null&&ci.el&&(di.appendChild(ri.subGrid.el),ri.subGrid.opts.styleInHead||ri.subGrid._updateStyles(!0))),delete oi.content}let li=!1,ui=!1;for(let di in oi)di[0]!=="_"&&ri[di]!==oi[di]&&(ri[di]=oi[di],li=!0,ui=ui||!this.opts.staticGrid&&(di==="noResize"||di==="noMove"||di==="locked"));if(bi.sanitizeMinMax(ri),ai){let di=ai.w!==void 0&&ai.w!==ri.w;this.moveNode(ri,ai),di&&ri.subGrid?ri.subGrid.onResize(this.hasAnimationCSS()?ri.w:void 0):this.resizeToContentCheck(di,ri),delete ri._orig}(ai||li)&&this._writeAttr(ni,ri),ui&&this._prepareDragDropByNode(ri)}),this}moveNode(ei,ti){let ni=ei._updating;ni||this.engine.cleanNodes().beginUpdate(ei),this.engine.moveNode(ei,ti),this._updateContainerHeight(),ni||(this._triggerChangeEvent(),this.engine.endUpdate())}resizeToContent(ei){var pi,yi;if(!ei||(ei.classList.remove("size-to-content-max"),!ei.clientHeight))return;let ti=ei.gridstackNode;if(!ti)return;let ni=ti.grid;if(!ni||ei.parentElement!==ni.el)return;let ri=ni.getCellHeight(!0);if(!ri)return;let oi=ti.h?ti.h*ri:ei.clientHeight,si;if(ti.resizeToContentParent&&(si=ei.querySelector(ti.resizeToContentParent)),si||(si=ei.querySelector(ii.resizeToContentParent)),!si)return;let ai=ei.clientHeight-si.clientHeight,li=ti.h?ti.h*ri-ai:si.clientHeight,ui;if(ti.subGrid){ui=ti.subGrid.getRow()*ti.subGrid.getCellHeight(!0);let gi=ti.subGrid.el.getBoundingClientRect(),vi=ti.subGrid.el.parentElement.getBoundingClientRect();ui+=gi.top-vi.top}else{if((yi=(pi=ti.subGridOpts)==null?void 0:pi.children)!=null&&yi.length)return;{let gi=si.firstElementChild;if(!gi){console.error(`Error: GridStack.resizeToContent() widget id:${ti.id} '${ii.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);return}ui=gi.getBoundingClientRect().height||li}}if(li===ui)return;oi+=ui-li;let ci=Math.ceil(oi/ri),di=Number.isInteger(ti.sizeToContent)?ti.sizeToContent:0;di&&ci>di&&(ci=di,ei.classList.add("size-to-content-max")),ti.minH&&ci<ti.minH?ci=ti.minH:ti.maxH&&ci>ti.maxH&&(ci=ti.maxH),ci!==ti.h&&(ni._ignoreLayoutsNodeChange=!0,ni.moveNode(ti,{h:ci}),delete ni._ignoreLayoutsNodeChange)}resizeToContentCBCheck(ei){ii.resizeToContentCB?ii.resizeToContentCB(ei):this.resizeToContent(ei)}rotate(ei,ti){return ii.getElements(ei).forEach(ni=>{let ri=ni.gridstackNode;if(!bi.canBeRotated(ri))return;let oi={w:ri.h,h:ri.w,minH:ri.minW,minW:ri.minH,maxH:ri.maxW,maxW:ri.maxH};if(ti){let ai=ti.left>0?Math.floor(ti.left/this.cellWidth()):0,li=ti.top>0?Math.floor(ti.top/this.opts.cellHeight):0;oi.x=ri.x+ai-(ri.h-(li+1)),oi.y=ri.y+li-ai}Object.keys(oi).forEach(ai=>{oi[ai]===void 0&&delete oi[ai]});let si=ri._orig;this.update(ni,oi),ri._orig=si}),this}margin(ei){if(!(typeof ei=="string"&&ei.split(" ").length>1)){let ni=bi.parseHeight(ei);if(this.opts.marginUnit===ni.unit&&this.opts.margin===ni.h)return}return this.opts.margin=ei,this.opts.marginTop=this.opts.marginBottom=this.opts.marginLeft=this.opts.marginRight=void 0,this._initMargin(),this._updateStyles(!0),this}getMargin(){return this.opts.margin}willItFit(ei){if(arguments.length>1){console.warn("gridstack.ts: `willItFit(x,y,w,h,autoPosition)` is deprecated. Use `willItFit({x, y,...})`. It will be removed soon");let ti=arguments,ni=0,ri={x:ti[ni++],y:ti[ni++],w:ti[ni++],h:ti[ni++],autoPosition:ti[ni++]};return this.willItFit(ri)}return this.engine.willItFit(ei)}_triggerChangeEvent(){if(this.engine.batchMode)return this;let ei=this.engine.getDirtyNodes(!0);return ei&&ei.length&&(this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(ei),this._triggerEvent("change",ei)),this.engine.saveInitial(),this}_triggerAddEvent(){var ei;if(this.engine.batchMode)return this;if((ei=this.engine.addedNodes)!=null&&ei.length){this._ignoreLayoutsNodeChange||this.engine.layoutsNodesChange(this.engine.addedNodes),this.engine.addedNodes.forEach(ni=>{delete ni._dirty});let ti=[...this.engine.addedNodes];this.engine.addedNodes=[],this._triggerEvent("added",ti)}return this}_triggerRemoveEvent(){var ei;if(this.engine.batchMode)return this;if((ei=this.engine.removedNodes)!=null&&ei.length){let ti=[...this.engine.removedNodes];this.engine.removedNodes=[],this._triggerEvent("removed",ti)}return this}_triggerEvent(ei,ti){let ni=ti?new CustomEvent(ei,{bubbles:!1,detail:ti}):new Event(ei);return this.el.dispatchEvent(ni),this}_removeStylesheet(){if(this._styles){let ei=this.opts.styleInHead?void 0:this.el.parentNode;bi.removeStylesheet(this._styleSheetClass,ei),delete this._styles}return this}_updateStyles(ei=!1,ti){if(ei&&this._removeStylesheet(),ti===void 0&&(ti=this.getRow()),this._updateContainerHeight(),this.opts.cellHeight===0)return this;let ni=this.opts.cellHeight,ri=this.opts.cellHeightUnit,oi=`.${this._styleSheetClass} > .${this.opts.itemClass}`;if(!this._styles){let si=this.opts.styleInHead?void 0:this.el.parentNode;if(this._styles=bi.createStylesheet(this._styleSheetClass,si,{nonce:this.opts.nonce}),!this._styles)return this;this._styles._max=0,bi.addCSSRule(this._styles,oi,`height: ${ni}${ri}`);let ai=this.opts.marginTop+this.opts.marginUnit,li=this.opts.marginBottom+this.opts.marginUnit,ui=this.opts.marginRight+this.opts.marginUnit,ci=this.opts.marginLeft+this.opts.marginUnit,di=`${oi} > .grid-stack-item-content`,pi=`.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;bi.addCSSRule(this._styles,di,`top: ${ai}; right: ${ui}; bottom: ${li}; left: ${ci};`),bi.addCSSRule(this._styles,pi,`top: ${ai}; right: ${ui}; bottom: ${li}; left: ${ci};`),bi.addCSSRule(this._styles,`${oi} > .ui-resizable-n`,`top: ${ai};`),bi.addCSSRule(this._styles,`${oi} > .ui-resizable-s`,`bottom: ${li}`),bi.addCSSRule(this._styles,`${oi} > .ui-resizable-ne`,`right: ${ui}; top: ${ai}`),bi.addCSSRule(this._styles,`${oi} > .ui-resizable-e`,`right: ${ui}`),bi.addCSSRule(this._styles,`${oi} > .ui-resizable-se`,`right: ${ui}; bottom: ${li}`),bi.addCSSRule(this._styles,`${oi} > .ui-resizable-nw`,`left: ${ci}; top: ${ai}`),bi.addCSSRule(this._styles,`${oi} > .ui-resizable-w`,`left: ${ci}`),bi.addCSSRule(this._styles,`${oi} > .ui-resizable-sw`,`left: ${ci}; bottom: ${li}`)}if(ti=ti||this._styles._max,ti>this._styles._max){let si=ai=>ni*ai+ri;for(let ai=this._styles._max+1;ai<=ti;ai++)bi.addCSSRule(this._styles,`${oi}[gs-y="${ai}"]`,`top: ${si(ai)}`),bi.addCSSRule(this._styles,`${oi}[gs-h="${ai+1}"]`,`height: ${si(ai+1)}`);this._styles._max=ti}return this}_updateContainerHeight(){if(!this.engine||this.engine.batchMode)return this;let ei=this.parentGridNode,ti=this.getRow()+this._extraDragRow,ni=this.opts.cellHeight,ri=this.opts.cellHeightUnit;if(!ni)return this;if(!ei){let oi=bi.parseHeight(getComputedStyle(this.el).minHeight);if(oi.h>0&&oi.unit===ri){let si=Math.floor(oi.h/ni);ti<si&&(ti=si)}}return this.el.setAttribute("gs-current-row",String(ti)),this.el.style.removeProperty("min-height"),this.el.style.removeProperty("height"),ti&&(this.el.style[ei?"minHeight":"height"]=ti*ni+ri),ei&&!ei.grid.engine.batchMode&&bi.shouldSizeToContent(ei)&&ei.grid.resizeToContentCBCheck(ei.el),this}_prepareElement(ei,ti=!1,ni){ni=ni||this._readAttr(ei),ei.gridstackNode=ni,ni.el=ei,ni.grid=this,ni=this.engine.addNode(ni,ti),this._writeAttr(ei,ni),ei.classList.add(Yn.itemClass,this.opts.itemClass);let ri=bi.shouldSizeToContent(ni);return ri?ei.classList.add("size-to-content"):ei.classList.remove("size-to-content"),ri&&this.resizeToContentCheck(!1,ni),this._prepareDragDropByNode(ni),this}_writePosAttr(ei,ti){return ti.x!==void 0&&ti.x!==null&&ei.setAttribute("gs-x",String(ti.x)),ti.y!==void 0&&ti.y!==null&&ei.setAttribute("gs-y",String(ti.y)),ti.w>1?ei.setAttribute("gs-w",String(ti.w)):ei.removeAttribute("gs-w"),ti.h>1?ei.setAttribute("gs-h",String(ti.h)):ei.removeAttribute("gs-h"),this}_writeAttr(ei,ti){if(!ti)return this;this._writePosAttr(ei,ti);let ni={noResize:"gs-no-resize",noMove:"gs-no-move",locked:"gs-locked",id:"gs-id",sizeToContent:"gs-size-to-content"};for(let ri in ni)ti[ri]?ei.setAttribute(ni[ri],String(ti[ri])):ei.removeAttribute(ni[ri]);return this}_readAttr(ei,ti=!0){let ni={};ni.x=bi.toNumber(ei.getAttribute("gs-x")),ni.y=bi.toNumber(ei.getAttribute("gs-y")),ni.w=bi.toNumber(ei.getAttribute("gs-w")),ni.h=bi.toNumber(ei.getAttribute("gs-h")),ni.autoPosition=bi.toBool(ei.getAttribute("gs-auto-position")),ni.noResize=bi.toBool(ei.getAttribute("gs-no-resize")),ni.noMove=bi.toBool(ei.getAttribute("gs-no-move")),ni.locked=bi.toBool(ei.getAttribute("gs-locked")),ni.sizeToContent=bi.toBool(ei.getAttribute("gs-size-to-content")),ni.id=ei.getAttribute("gs-id"),ni.maxW=bi.toNumber(ei.getAttribute("gs-max-w")),ni.minW=bi.toNumber(ei.getAttribute("gs-min-w")),ni.maxH=bi.toNumber(ei.getAttribute("gs-max-h")),ni.minH=bi.toNumber(ei.getAttribute("gs-min-h")),ti&&(ni.w===1&&ei.removeAttribute("gs-w"),ni.h===1&&ei.removeAttribute("gs-h"),ni.maxW&&ei.removeAttribute("gs-max-w"),ni.minW&&ei.removeAttribute("gs-min-w"),ni.maxH&&ei.removeAttribute("gs-max-h"),ni.minH&&ei.removeAttribute("gs-min-h"));for(let ri in ni){if(!ni.hasOwnProperty(ri))return;!ni[ri]&&ni[ri]!==0&&delete ni[ri]}return ni}_setStaticClass(){let ei=["grid-stack-static"];return this.opts.staticGrid?(this.el.classList.add(...ei),this.el.setAttribute("gs-static","true")):(this.el.classList.remove(...ei),this.el.removeAttribute("gs-static")),this}onResize(ei=(ti=>(ti=this.el)==null?void 0:ti.clientWidth)()){if(!ei||this.prevWidth===ei)return;this.prevWidth=ei,this.batchUpdate();let ni=!1;return this._autoColumn&&this.parentGridNode?this.opts.column!==this.parentGridNode.w&&(this.column(this.parentGridNode.w,this.opts.layout||"list"),ni=!0):ni=this.checkDynamicColumn(),this._isAutoCellHeight&&this.cellHeight(),this.engine.nodes.forEach(ri=>{ri.subGrid&&ri.subGrid.onResize()}),this._skipInitialResize||this.resizeToContentCheck(ni),delete this._skipInitialResize,this.batchUpdate(!1),this}resizeToContentCheck(ei=!1,ti=void 0){if(this.engine){if(ei&&this.hasAnimationCSS())return setTimeout(()=>this.resizeToContentCheck(!1,ti),this.animationDelay);if(ti)bi.shouldSizeToContent(ti)&&this.resizeToContentCBCheck(ti.el);else if(this.engine.nodes.some(ni=>bi.shouldSizeToContent(ni))){let ni=[...this.engine.nodes];this.batchUpdate(),ni.forEach(ri=>{bi.shouldSizeToContent(ri)&&this.resizeToContentCBCheck(ri.el)}),this.batchUpdate(!1)}this._gsEventHandler.resizecontent&&this._gsEventHandler.resizecontent(null,ti?[ti]:this.engine.nodes)}}_updateResizeEvent(ei=!1){let ti=!this.parentGridNode&&(this._isAutoCellHeight||this.opts.sizeToContent||this.opts.columnOpts||this.engine.nodes.find(ni=>ni.sizeToContent));return!ei&&ti&&!this.resizeObserver?(this._sizeThrottle=bi.throttle(()=>this.onResize(),this.opts.cellHeightThrottle),this.resizeObserver=new ResizeObserver(()=>this._sizeThrottle()),this.resizeObserver.observe(this.el),this._skipInitialResize=!0):(ei||!ti)&&this.resizeObserver&&(this.resizeObserver.disconnect(),delete this.resizeObserver,delete this._sizeThrottle),this}static getElement(ei=".grid-stack-item"){return bi.getElement(ei)}static getElements(ei=".grid-stack-item"){return bi.getElements(ei)}static getGridElement(ei){return ii.getElement(ei)}static getGridElements(ei){return bi.getElements(ei)}_initMargin(){let ei,ti=0,ni=[];return typeof this.opts.margin=="string"&&(ni=this.opts.margin.split(" ")),ni.length===2?(this.opts.marginTop=this.opts.marginBottom=ni[0],this.opts.marginLeft=this.opts.marginRight=ni[1]):ni.length===4?(this.opts.marginTop=ni[0],this.opts.marginRight=ni[1],this.opts.marginBottom=ni[2],this.opts.marginLeft=ni[3]):(ei=bi.parseHeight(this.opts.margin),this.opts.marginUnit=ei.unit,ti=this.opts.margin=ei.h),this.opts.marginTop===void 0?this.opts.marginTop=ti:(ei=bi.parseHeight(this.opts.marginTop),this.opts.marginTop=ei.h,delete this.opts.margin),this.opts.marginBottom===void 0?this.opts.marginBottom=ti:(ei=bi.parseHeight(this.opts.marginBottom),this.opts.marginBottom=ei.h,delete this.opts.margin),this.opts.marginRight===void 0?this.opts.marginRight=ti:(ei=bi.parseHeight(this.opts.marginRight),this.opts.marginRight=ei.h,delete this.opts.margin),this.opts.marginLeft===void 0?this.opts.marginLeft=ti:(ei=bi.parseHeight(this.opts.marginLeft),this.opts.marginLeft=ei.h,delete this.opts.margin),this.opts.marginUnit=ei.unit,this.opts.marginTop===this.opts.marginBottom&&this.opts.marginLeft===this.opts.marginRight&&this.opts.marginTop===this.opts.marginRight&&(this.opts.margin=this.opts.marginTop),this}static getDD(){return Bn}static setupDragIn(ei,ti,ni,ri=document){(ti==null?void 0:ti.pause)!==void 0&&(Bi.pauseDrag=ti.pause),ti=Di({appendTo:"body",helper:"clone"},ti||{}),(typeof ei=="string"?bi.getElements(ei,ri):ei).forEach((si,ai)=>{Bn.isDraggable(si)||Bn.dragIn(si,ti),ni!=null&&ni[ai]&&(si.gridstackNode=ni[ai])})}movable(ei,ti){return this.opts.staticGrid?this:(ii.getElements(ei).forEach(ni=>{let ri=ni.gridstackNode;ri&&(ti?delete ri.noMove:ri.noMove=!0,this._prepareDragDropByNode(ri))}),this)}resizable(ei,ti){return this.opts.staticGrid?this:(ii.getElements(ei).forEach(ni=>{let ri=ni.gridstackNode;ri&&(ti?delete ri.noResize:ri.noResize=!0,this._prepareDragDropByNode(ri))}),this)}disable(ei=!0){if(!this.opts.staticGrid)return this.enableMove(!1,ei),this.enableResize(!1,ei),this._triggerEvent("disable"),this}enable(ei=!0){if(!this.opts.staticGrid)return this.enableMove(!0,ei),this.enableResize(!0,ei),this._triggerEvent("enable"),this}enableMove(ei,ti=!0){return this.opts.staticGrid?this:(ei?delete this.opts.disableDrag:this.opts.disableDrag=!0,this.engine.nodes.forEach(ni=>{this._prepareDragDropByNode(ni),ni.subGrid&&ti&&ni.subGrid.enableMove(ei,ti)}),this)}enableResize(ei,ti=!0){return this.opts.staticGrid?this:(ei?delete this.opts.disableResize:this.opts.disableResize=!0,this.engine.nodes.forEach(ni=>{this._prepareDragDropByNode(ni),ni.subGrid&&ti&&ni.subGrid.enableResize(ei,ti)}),this)}cancelDrag(){var ti;let ei=(ti=this._placeholder)==null?void 0:ti.gridstackNode;ei&&(ei._isExternal?(ei._isAboutToRemove=!0,this.engine.removeNode(ei)):ei._isAboutToRemove&&ii._itemRemoving(ei.el,!1),this.engine.restoreInitial())}_removeDD(ei){return Bn.draggable(ei,"destroy").resizable(ei,"destroy"),ei.gridstackNode&&delete ei.gridstackNode._initDD,delete ei.ddElement,this}_setupAcceptWidget(){if(this.opts.staticGrid||!this.opts.acceptWidgets&&!this.opts.removable)return Bn.droppable(this.el,"destroy"),this;let ei,ti,ni=(ri,oi,si)=>{var pi;si=si||oi;let ai=si.gridstackNode;if(!ai)return;if(!((pi=ai.grid)!=null&&pi.el)){si.style.transform=`scale(${1/this.dragTransform.xScale},${1/this.dragTransform.yScale})`;let yi=si.getBoundingClientRect();si.style.left=yi.x+(this.dragTransform.xScale-1)*(ri.clientX-yi.x)/this.dragTransform.xScale+"px",si.style.top=yi.y+(this.dragTransform.yScale-1)*(ri.clientY-yi.y)/this.dragTransform.yScale+"px",si.style.transformOrigin="0px 0px"}let{top:li,left:ui}=si.getBoundingClientRect(),ci=this.el.getBoundingClientRect();ui-=ci.left,li-=ci.top;let di={position:{top:li*this.dragTransform.xScale,left:ui*this.dragTransform.yScale}};if(ai._temporaryRemoved){if(ai.x=Math.max(0,Math.round(ui/ti)),ai.y=Math.max(0,Math.round(li/ei)),delete ai.autoPosition,this.engine.nodeBoundFix(ai),!this.engine.willItFit(ai)){if(ai.autoPosition=!0,!this.engine.willItFit(ai)){Bn.off(oi,"drag");return}ai._willFitPos&&(bi.copyPos(ai,ai._willFitPos),delete ai._willFitPos)}this._onStartMoving(si,ri,di,ai,ti,ei)}else this._dragOrResize(si,ri,di,ai,ti,ei)};return Bn.droppable(this.el,{accept:ri=>{let oi=ri.gridstackNode||this._readAttr(ri,!1);if((oi==null?void 0:oi.grid)===this)return!0;if(!this.opts.acceptWidgets)return!1;let si=!0;if(typeof this.opts.acceptWidgets=="function")si=this.opts.acceptWidgets(ri);else{let ai=this.opts.acceptWidgets===!0?".grid-stack-item":this.opts.acceptWidgets;si=ri.matches(ai)}if(si&&oi&&this.opts.maxRow){let ai={w:oi.w,h:oi.h,minW:oi.minW,minH:oi.minH};si=this.engine.willItFit(ai)}return si}}).on(this.el,"dropover",(ri,oi,si)=>{let ai=(si==null?void 0:si.gridstackNode)||oi.gridstackNode;if((ai==null?void 0:ai.grid)===this&&!ai._temporaryRemoved)return!1;if(ai!=null&&ai.grid&&ai.grid!==this&&!ai._temporaryRemoved&&ai.grid._leave(oi,si),si=si||oi,ti=this.cellWidth(),ei=this.getCellHeight(!0),!ai){let ci=si.getAttribute("data-gs-widget")||si.getAttribute("gridstacknode");if(ci){try{ai=JSON.parse(ci)}catch(di){console.error("Gridstack dropover: Bad JSON format: ",ci)}si.removeAttribute("data-gs-widget"),si.removeAttribute("gridstacknode")}ai||(ai=this._readAttr(si))}ai.grid||(ai.el||(ai=Di({},ai)),ai._isExternal=!0,si.gridstackNode=ai);let li=ai.w||Math.round(si.offsetWidth/ti)||1,ui=ai.h||Math.round(si.offsetHeight/ei)||1;return ai.grid&&ai.grid!==this?(oi._gridstackNodeOrig||(oi._gridstackNodeOrig=ai),oi.gridstackNode=ai=sn(Di({},ai),{w:li,h:ui,grid:this}),delete ai.x,delete ai.y,this.engine.cleanupNode(ai).nodeBoundFix(ai),ai._initDD=ai._isExternal=ai._temporaryRemoved=!0):(ai.w=li,ai.h=ui,ai._temporaryRemoved=!0),ii._itemRemoving(ai.el,!1),Bn.on(oi,"drag",ni),ni(ri,oi,si),!1}).on(this.el,"dropout",(ri,oi,si)=>{let ai=(si==null?void 0:si.gridstackNode)||oi.gridstackNode;return ai&&(!ai.grid||ai.grid===this)&&(this._leave(oi,si),this._isTemp&&this.removeAsSubGrid(ai)),!1}).on(this.el,"drop",(ri,oi,si)=>{var yi,gi,vi;let ai=(si==null?void 0:si.gridstackNode)||oi.gridstackNode;if((ai==null?void 0:ai.grid)===this&&!ai._isExternal)return!1;let li=!!this.placeholder.parentElement,ui=oi!==si;this.placeholder.remove(),delete this.placeholder.gridstackNode;let ci=li&&this.opts.animate;ci&&this.setAnimation(!1);let di=oi._gridstackNodeOrig;if(delete oi._gridstackNodeOrig,li&&(di!=null&&di.grid)&&di.grid!==this){let Ei=di.grid;Ei.engine.removeNodeFromLayoutCache(di),Ei.engine.removedNodes.push(di),Ei._triggerRemoveEvent()._triggerChangeEvent(),Ei.parentGridNode&&!Ei.engine.nodes.length&&Ei.opts.subGridDynamic&&Ei.removeAsSubGrid()}if(!ai||(li&&(this.engine.cleanupNode(ai),ai.grid=this),(yi=ai.grid)==null||delete yi._isTemp,Bn.off(oi,"drag"),si!==oi?(si.remove(),oi=si):oi.remove(),this._removeDD(oi),!li))return!1;let pi=(vi=(gi=ai.subGrid)==null?void 0:gi.el)==null?void 0:vi.gridstack;return bi.copyPos(ai,this._readAttr(this.placeholder)),bi.removePositioningStyles(oi),ui&&(ai.content||ai.subGridOpts||ii.addRemoveCB)?(delete ai.el,oi=this.addWidget(ai)):(this._prepareElement(oi,!0,ai),this.el.appendChild(oi),this.resizeToContentCheck(!1,ai),pi&&(pi.parentGridNode=ai,pi.opts.styleInHead||pi._updateStyles(!0)),this._updateContainerHeight()),this.engine.addedNodes.push(ai),this._triggerAddEvent(),this._triggerChangeEvent(),this.engine.endUpdate(),this._gsEventHandler.dropped&&this._gsEventHandler.dropped(sn(Di({},ri),{type:"dropped"}),di&&di.grid?di:void 0,ai),ci&&this.setAnimation(this.opts.animate,!0),!1}),this}static _itemRemoving(ei,ti){if(!ei)return;let ni=ei?ei.gridstackNode:void 0;!(ni!=null&&ni.grid)||ei.classList.contains(ni.grid.opts.removableOptions.decline)||(ti?ni._isAboutToRemove=!0:delete ni._isAboutToRemove,ti?ei.classList.add("grid-stack-item-removing"):ei.classList.remove("grid-stack-item-removing"))}_setupRemoveDrop(){if(typeof this.opts.removable!="string")return this;let ei=document.querySelector(this.opts.removable);return ei?(!this.opts.staticGrid&&!Bn.isDroppable(ei)&&Bn.droppable(ei,this.opts.removableOptions).on(ei,"dropover",(ti,ni)=>ii._itemRemoving(ni,!0)).on(ei,"dropout",(ti,ni)=>ii._itemRemoving(ni,!1)),this):this}_prepareDragDropByNode(ei){let ti=ei.el,ni=ei.noMove||this.opts.disableDrag,ri=ei.noResize||this.opts.disableResize;if(this.opts.staticGrid||ni&&ri)return ei._initDD&&(this._removeDD(ti),delete ei._initDD),ti.classList.add("ui-draggable-disabled","ui-resizable-disabled"),this;if(!ei._initDD){let oi,si,ai=(ci,di)=>{this._gsEventHandler[ci.type]&&this._gsEventHandler[ci.type](ci,ci.target),oi=this.cellWidth(),si=this.getCellHeight(!0),this._onStartMoving(ti,ci,di,ei,oi,si)},li=(ci,di)=>{this._dragOrResize(ti,ci,di,ei,oi,si)},ui=ci=>{this.placeholder.remove(),delete this.placeholder.gridstackNode,delete ei._moving,delete ei._event,delete ei._lastTried;let di=ei.w!==ei._orig.w,pi=ci.target;if(!(!pi.gridstackNode||pi.gridstackNode.grid!==this)){if(ei.el=pi,ei._isAboutToRemove){let yi=ti.gridstackNode.grid;yi._gsEventHandler[ci.type]&&yi._gsEventHandler[ci.type](ci,pi),yi.engine.nodes.push(ei),yi.removeWidget(ti,!0,!0)}else bi.removePositioningStyles(pi),ei._temporaryRemoved?(bi.copyPos(ei,ei._orig),this._writePosAttr(pi,ei),this.engine.addNode(ei)):this._writePosAttr(pi,ei),this._gsEventHandler[ci.type]&&this._gsEventHandler[ci.type](ci,pi);this._extraDragRow=0,this._updateContainerHeight(),this._triggerChangeEvent(),this.engine.endUpdate(),ci.type==="resizestop"&&(Number.isInteger(ei.sizeToContent)&&(ei.sizeToContent=ei.h),this.resizeToContentCheck(di,ei))}};Bn.draggable(ti,{start:ai,stop:ui,drag:li}).resizable(ti,{start:ai,stop:ui,resize:li}),ei._initDD=!0}return Bn.draggable(ti,ni?"disable":"enable").resizable(ti,ri?"disable":"enable"),this}_onStartMoving(ei,ti,ni,ri,oi,si){var ai;if(this.engine.cleanNodes().beginUpdate(ri),this._writePosAttr(this.placeholder,ri),this.el.appendChild(this.placeholder),this.placeholder.gridstackNode=ri,(ai=ri.grid)!=null&&ai.el)this.dragTransform=bi.getValuesFromTransformedElement(ei);else if(this.placeholder&&this.placeholder.closest(".grid-stack")){let li=this.placeholder.closest(".grid-stack");this.dragTransform=bi.getValuesFromTransformedElement(li)}else this.dragTransform={xScale:1,xOffset:0,yScale:1,yOffset:0};if(ri.el=this.placeholder,ri._lastUiPosition=ni.position,ri._prevYPix=ni.position.top,ri._moving=ti.type==="dragstart",delete ri._lastTried,ti.type==="dropover"&&ri._temporaryRemoved&&(this.engine.addNode(ri),ri._moving=!0),this.engine.cacheRects(oi,si,this.opts.marginTop,this.opts.marginRight,this.opts.marginBottom,this.opts.marginLeft),ti.type==="resizestart"){let li=this.getColumn()-ri.x,ui=(this.opts.maxRow||Number.MAX_SAFE_INTEGER)-ri.y;Bn.resizable(ei,"option","minWidth",oi*Math.min(ri.minW||1,li)).resizable(ei,"option","minHeight",si*Math.min(ri.minH||1,ui)).resizable(ei,"option","maxWidth",oi*Math.min(ri.maxW||Number.MAX_SAFE_INTEGER,li)).resizable(ei,"option","maxWidthMoveLeft",oi*Math.min(ri.maxW||Number.MAX_SAFE_INTEGER,ri.x+ri.w)).resizable(ei,"option","maxHeight",si*Math.min(ri.maxH||Number.MAX_SAFE_INTEGER,ui)).resizable(ei,"option","maxHeightMoveUp",si*Math.min(ri.maxH||Number.MAX_SAFE_INTEGER,ri.y+ri.h))}}_dragOrResize(ei,ti,ni,ri,oi,si){let ai=Di({},ri._orig),li,ui=this.opts.marginLeft,ci=this.opts.marginRight,di=this.opts.marginTop,pi=this.opts.marginBottom,yi=Math.round(si*.1),gi=Math.round(oi*.1);if(ui=Math.min(ui,gi),ci=Math.min(ci,gi),di=Math.min(di,yi),pi=Math.min(pi,yi),ti.type==="drag"){if(ri._temporaryRemoved)return;let Ei=ni.position.top-ri._prevYPix;ri._prevYPix=ni.position.top,this.opts.draggable.scroll!==!1&&bi.updateScrollPosition(ei,ni.position,Ei);let Ci=ni.position.left+(ni.position.left>ri._lastUiPosition.left?-ci:ui),xi=ni.position.top+(ni.position.top>ri._lastUiPosition.top?-pi:di);ai.x=Math.round(Ci/oi),ai.y=Math.round(xi/si);let Li=this._extraDragRow;if(this.engine.collide(ri,ai)){let Oi=this.getRow(),zi=Math.max(0,ai.y+ri.h-Oi);this.opts.maxRow&&Oi+zi>this.opts.maxRow&&(zi=Math.max(0,this.opts.maxRow-Oi)),this._extraDragRow=zi}else this._extraDragRow=0;if(this._extraDragRow!==Li&&this._updateContainerHeight(),ri.x===ai.x&&ri.y===ai.y)return}else if(ti.type==="resize"){if(ai.x<0||(bi.updateScrollResize(ti,ei,si),ai.w=Math.round((ni.size.width-ui)/oi),ai.h=Math.round((ni.size.height-di)/si),ri.w===ai.w&&ri.h===ai.h)||ri._lastTried&&ri._lastTried.w===ai.w&&ri._lastTried.h===ai.h)return;let Ei=ni.position.left+ui,Ci=ni.position.top+di;ai.x=Math.round(Ei/oi),ai.y=Math.round(Ci/si),li=!0}ri._event=ti,ri._lastTried=ai;let vi={x:ni.position.left+ui,y:ni.position.top+di,w:(ni.size?ni.size.width:ri.w*oi)-ui-ci,h:(ni.size?ni.size.height:ri.h*si)-di-pi};if(this.engine.moveNodeCheck(ri,sn(Di({},ai),{cellWidth:oi,cellHeight:si,rect:vi,resizing:li}))){ri._lastUiPosition=ni.position,this.engine.cacheRects(oi,si,di,ci,pi,ui),delete ri._skipDown,li&&ri.subGrid&&ri.subGrid.onResize(),this._extraDragRow=0,this._updateContainerHeight();let Ei=ti.target;this._writePosAttr(Ei,ri),this._gsEventHandler[ti.type]&&this._gsEventHandler[ti.type](ti,Ei)}}_leave(ei,ti){ti=ti||ei;let ni=ti.gridstackNode;ni&&(ti.style.transform=ti.style.transformOrigin=null,Bn.off(ei,"drag"),!ni._temporaryRemoved&&(ni._temporaryRemoved=!0,this.engine.removeNode(ni),ni.el=ni._isExternal&&ti?ti:ei,ni._isExternal&&this.engine.cleanupNode(ni),this.opts.removable===!0&&ii._itemRemoving(ei,!0),ei._gridstackNodeOrig?(ei.gridstackNode=ei._gridstackNodeOrig,delete ei._gridstackNodeOrig):ni._isExternal&&this.engine.restoreInitial()))}commit(){return Sh(this,this.batchUpdate(!1),"commit","batchUpdate","5.2"),this}};Jr.renderCB=(ii,ei)=>{ii&&(ei!=null&&ei.content)&&(ii.textContent=ei.content)};Jr.resizeToContentParent=".grid-stack-item-content";Jr.Utils=bi;Jr.Engine=as;Jr.GDRev="11.2.0";function q_(){let ii=document.getElementById("dashboard");ii&&ii.gridstack.disable()}function W_(){let ii=document.getElementById("dashboard");ii&&ii.gridstack.enable()}function U_(ii,ei){return co(this,null,function*(){return yield Ls(ii,{layout:ei})})}function Ah(){if(document.getElementById("dashboard")==null)return;let ei=Jr.init({cellHeight:100,disableDrag:!0,disableResize:!0,draggable:{handle:".grid-stack-item-content .card-header",appendTo:"body",scroll:!0}}),ti=document.getElementById("lock_dashboard");ti&&ti.addEventListener("click",()=>{q_()});let ni=document.getElementById("unlock_dashboard");ni&&ni.addEventListener("click",()=>{W_()});let ri=document.getElementById("save_dashboard");ri!==null&&ri.addEventListener("click",()=>{let oi=ri.getAttribute("data-url");if(oi==null)return;let si=ei.save(!1);U_(oi,si).then(ai=>{rs(ai)?Po("danger","Error Saving Dashboard Config",ai.error).show():location.reload()})})}function Dh(ii,ei){switch(ii){case"images-and-labels":{tu("image.device-image",ei),tu("text.device-image-label",ei);break}case"images-only":{tu("image.device-image",ei),iu("text.device-image-label",ei);break}case"labels-only":{iu("image.device-image",ei),iu("text.device-image-label",ei);break}}}function tu(ii,ei){var ni,ri;let ti=(ri=(ni=ei.contentDocument)==null?void 0:ni.querySelectorAll(ii))!=null?ri:[];for(let oi of ti)oi.classList.remove("hidden")}function iu(ii,ei){var ni,ri;let ti=(ri=(ni=ei.contentDocument)==null?void 0:ni.querySelectorAll(ii))!=null?ri:[];for(let oi of ti)oi.classList.add("hidden")}function Y_(ii,ei){ei.set("view",ii);for(let ti of Hi(".rack_elevation"))Dh(ii,ti)}function Oh(){let ii=qc.get("view");for(let ei of Hi("select.rack-view"))ei.selectedIndex=[...ei.options].findIndex(ti=>ti.value==ii),ei.addEventListener("change",ti=>{Y_(ti.currentTarget.value,qc)},!1);for(let ei of Hi(".rack_elevation"))ei.addEventListener("load",()=>{Dh(ii,ei)})}function G_(ii){let ei=document.getElementById("selector_results");if(ei==null)return;let ti=ei.getAttribute("data-selector-target");if(ti==null)return;let ni=document.getElementById(ti);if(ni==null)return;let ri=ii.getAttribute("data-label"),oi=ii.getAttribute("data-value");ni.tomselect.addOption({id:oi,display:ri}),ni.tomselect.addItem(oi)}function Lh(){for(let ii of Hi("#selector_results a"))ii.addEventListener("click",()=>G_(ii))}function K_(){let ii=document.getElementById("quick-add-object");if(ii==null)return;let ei=ii.getAttribute("data-object-id");if(ei==null)return;let ti=ii.getAttribute("data-object-repr");if(ti==null)return;let ni=ii.getAttribute("data-target-id");if(ni==null)return;let ri=document.getElementById(ni);if(ri==null)return;ri.tomselect.addOption({id:ei,display:ti}),ri.tomselect.addItem(ei);let oi=document.getElementById("htmx-modal");if(oi){let si=io.getInstance(oi);si&&si.hide()}}function Mh(){let ii=document.getElementById("htmx-modal-content");ii&&ii.addEventListener("htmx:afterSwap",()=>K_())}function Q_(){bl(),El(),yl(),Lh(),Mh(),hl(),_l()}function kh(){document.addEventListener("htmx:afterSettle",Q_)}function X_(ii){let ei=ii.currentTarget,ti=ei.baseURI.split("?")[0],ni="?",ri=Array.from(ei.options).filter(oi=>oi.selected).map(oi=>`filter_id=${oi.value}`).join("&");ti+=`${ni}${ri}`,document.location.href=ti}function Nh(){let ii=document.getElementById("results");if(pn(ii)){let ei=document.getElementById("id_filter_id");pn(ei)&&ei.addEventListener("change",X_)}}function Rh(){for(let ii of[hl,dh,_l,Ef,Tf,yl,bh,bl,El,Eh,xh,Th,Ah,Oh,kh,Nh])ii()}function J_(){let ii=document.forms;for(let ti of ii)ti.method.toUpperCase()=="GET"&&ti.addEventListener("formdata",function(ni){let ri=ni.formData;for(let[oi,si]of Array.from(ri.entries()))si===""&&ri.delete(oi)});let ei=document.querySelector(".content-container");ei!==null&&ei.focus()}window.addEventListener("load",J_);document.readyState!=="loading"?Rh():document.addEventListener("DOMContentLoaded",Rh);})();
/*! Bundled license information:
clipboard/dist/clipboard.js:
(*!
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*)
bootstrap/dist/js/bootstrap.esm.js:
(*!
* Bootstrap v5.3.3 (https://getbootstrap.com/)
* Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*)
gridstack/dist/gridstack.js:
(*!
* GridStack 11.2.0
* https://gridstackjs.com/
*
* Copyright (c) 2021-2024 Alain Dumesny
* see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
*)
*/