'),u=this.input.getAttribute("class")||"",d=s.mode;var h;if(wt(o,s.wrapperClass,u,d),wt(a,s.controlClass),ft(o,a),wt(l,s.dropdownClass,d),s.copyClassesToDropdown&&wt(l,u),wt(c,s.dropdownContentClass),ft(l,c),vt(s.dropdownParent||o).appendChild(l),yt(s.controlInput)){h=vt(s.controlInput);gt(["autocorrect","autocapitalize","autocomplete","spellcheck"],(t=>{i.getAttribute(t)&&Ot(h,{[t]:i.getAttribute(t)})})),h.tabIndex=-1,a.appendChild(h),this.focus_node=h}else s.controlInput?(h=vt(s.controlInput),this.focus_node=h):(h=vt("
"),this.focus_node=a);this.wrapper=o,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=h,this.setup()}setup(){const t=this,e=t.settings,n=t.control_input,i=t.dropdown,s=t.dropdown_content,r=t.wrapper,o=t.control,a=t.input,l=t.focus_node,c={passive:!0},u=t.inputId+"-ts-dropdown";Ot(s,{id:u}),Ot(l,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u});const d=pt(l,t.inputId+"-ts-control"),h="label[for='"+(t=>t.replace(/['"\\]/g,"\\$&"))(t.inputId)+"']",p=document.querySelector(h),m=t.focus.bind(t);if(p){dt(p,"click",m),Ot(p,{for:d});const e=pt(p,t.inputId+"-ts-label");Ot(l,{"aria-labelledby":e}),Ot(s,{"aria-labelledby":e})}if(r.style.width=a.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");wt([r,i],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&Ot(a,{multiple:"multiple"}),e.placeholder&&Ot(n,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+A(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=lt(e.load,e.loadThrottle)),dt(i,"mousemove",(()=>{t.ignoreHover=!1})),dt(i,"mouseenter",(e=>{var n=Dt(e.target,"[data-selectable]",i);n&&t.onOptionHover(e,n)}),{capture:!0}),dt(i,"click",(e=>{const n=Dt(e.target,"[data-selectable]");n&&(t.onOptionSelect(e,n),ut(e,!0))})),dt(o,"click",(e=>{var i=Dt(e.target,"[data-ts-item]",o);i&&t.onItemSelect(e,i)?ut(e,!0):""==n.value&&(t.onClick(),ut(e,!0))})),dt(l,"keydown",(e=>t.onKeyDown(e))),dt(n,"keypress",(e=>t.onKeyPress(e))),dt(n,"input",(e=>t.onInput(e))),dt(l,"blur",(e=>t.onBlur(e))),dt(l,"focus",(e=>t.onFocus(e))),dt(n,"paste",(e=>t.onPaste(e)));const f=e=>{const s=e.composedPath()[0];if(!r.contains(s)&&!i.contains(s))return t.isFocused&&t.blur(),void t.inputState();s==n&&t.isOpen?e.stopPropagation():ut(e,!0)},g=()=>{t.isOpen&&t.positionDropdown()};dt(document,"mousedown",f),dt(window,"scroll",g,c),dt(window,"resize",g,c),this._destroy=()=>{document.removeEventListener("mousedown",f),window.removeEventListener("scroll",g),window.removeEventListener("resize",g),p&&p.removeEventListener("click",m)},this.revertSettings={innerHTML:a.innerHTML,tabIndex:a.tabIndex},a.tabIndex=-1,a.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,dt(a,"invalid",(()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())})),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,a.disabled?t.disable():a.readOnly?t.setReadOnly(!0):t.enable(),t.on("change",this.onChange),wt(a,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),gt(e,(t=>{this.registerOptionGroup(t)}))}setupTemplates(){var t=this,e=t.settings.labelField,n=t.settings.optgroupLabelField,i={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'",option:(t,n)=>"
"+n(t[e])+"
",item:(t,n)=>"
"+n(t[e])+"
",option_create:(t,e)=>'
Add '+e(t.input)+"…
",no_results:()=>'
No results found
',loading:()=>'
',not_loading:()=>{},dropdown:()=>"
"};t.settings.render=Object.assign({},i,t.settings.render)}setupCallbacks(){var t,e,n={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(t in n)(e=this.settings[n[t]])&&this.on(t,e)}sync(t=!0){const e=this,n=t?It(e.input,{delimiter:e.settings.delimiter}):e.settings;e.setupOptions(n.options,n.optgroups),e.setValue(n.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){bt(this.input,"input"),bt(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?ut(t):e.settings.splitOn&&setTimeout((()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var n=t.trim().split(e.settings.splitOn);gt(n,(t=>{rt(t)&&(this.options[t]?e.addItem(t):e.createItem(t))}))}}),0)}onKeyPress(t){var e=this;if(!e.isLocked){var n=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&n===e.settings.delimiter?(e.createItem(),void ut(t)):void 0}ut(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)9!==t.keyCode&&ut(t);else{switch(t.keyCode){case 65:if(ht(Mt,t)&&""==e.control_input.value)return ut(t),void e.selectAll();break;case 27:return e.isOpen&&(ut(t,!0),e.close()),void e.clearActiveItems();case 40:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void ut(t);case 38:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void ut(t);case 13:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),ut(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&ut(t));case 37:return void e.advanceSelection(-1,t);case 39:return void e.advanceSelection(1,t);case 9:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),ut(t)),e.settings.create&&e.createItem()&&ut(t)));case 8:case 46:return void e.deleteSelection(t)}e.isInputHidden&&!ht(Mt,t)&&ut(t)}}onInput(t){if(this.isLocked)return;const e=this.inputValue();this.lastValue!==e&&(this.lastValue=e,""!=e?(this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=((t,e)=>e>0?window.setTimeout(t,e):(t.call(null),null))((()=>{this.refreshTimeout=null,this._onInput()}),this.settings.refreshThrottle)):this._onInput())}_onInput(){const t=this.lastValue;this.settings.shouldLoad.call(this,t)&&this.load(t),this.refreshOptions(),this.trigger("type",t)}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,n=e.isFocused;if(e.isDisabled||e.isReadOnly)return e.blur(),void ut(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),n||e.trigger("focus"),e.activeItems.length||(e.inputState(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var n=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,n):n()}}}onOptionSelect(t,e){var n,i=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?i.createItem(null,(()=>{i.settings.closeAfterSelect&&i.close()})):void 0!==(n=e.dataset.value)&&(i.lastQuery=null,i.addItem(n),i.settings.closeAfterSelect&&i.close(),!i.settings.hideSelected&&t.type&&/click/.test(t.type)&&i.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var n=this;return!n.isLocked&&"multi"===n.settings.mode&&(ut(t),n.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;wt(e.wrapper,e.settings.loadingClass),e.loading++;const n=e.loadCallback.bind(e);e.settings.load.call(e,t,n)}loadCallback(t,e){const n=this;n.loading=Math.max(n.loading-1,0),n.lastQuery=null,n.clearActiveOption(),n.setupOptions(t,e),n.refreshOptions(n.isFocused&&!n.isInputHidden),n.loading||kt(n.wrapper,n.settings.loadingClass),n.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,bt(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){ct(this,e?[]:["change"],(()=>{this.clear(e),this.addItems(t,e)}))}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var n,i,s,r,o,a,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.inputState());if("click"===(n=e&&e.type.toLowerCase())&&ht("shiftKey",e)&&l.activeItems.length){for(a=l.getLastActive(),(s=Array.prototype.indexOf.call(l.control.children,a))>(r=Array.prototype.indexOf.call(l.control.children,t))&&(o=s,s=r,r=o),i=s;i<=r;i++)t=l.control.children[i],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);ut(e)}else"click"===n&&ht(Mt,e)||"keydown"===n&&ht("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.inputState(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,n=e.control.querySelector(".last-active");n&&kt(n,"last-active"),wt(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),kt(t,"active")}clearActiveItems(){kt(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,Ot(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),Ot(t,{"aria-selected":"true"}),wt(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const n=this.dropdown_content,i=n.clientHeight,s=n.scrollTop||0,r=t.offsetHeight,o=t.getBoundingClientRect().top-n.getBoundingClientRect().top+s;o+r>i+s?this.scroll(o-i+r,e):o
{t.setActiveItemClass(e)})))}inputState(){var t=this;t.control.contains(t.control_input)&&(Ot(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&Ot(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||t.isReadOnly||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout((()=>{t.ignoreFocus=!1,t.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,n,i=this,s=this.getSearchOptions();if(i.settings.score&&"function"!=typeof(n=i.settings.score.call(i,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==i.lastQuery?(i.lastQuery=t,e=i.sifter.search(t,Object.assign(s,{score:n})),i.currentResults=e):e=Object.assign({},i.currentResults),i.settings.hideSelected&&(e.items=e.items.filter((t=>{let e=rt(t.id);return!(e&&-1!==i.items.indexOf(e))}))),e}refreshOptions(t=!0){var e,n,i,s,r,o,a,l,c,u;const d={},h=[];var p=this,m=p.inputValue();const f=m===p.lastQuery||""==m&&null==p.lastQuery;var g=p.search(m),v=null,y=p.settings.shouldOpen||!1,b=p.dropdown_content;f&&(v=p.activeOption)&&(c=v.closest("[data-group]")),s=g.items.length,"number"==typeof p.settings.maxOptions&&(s=Math.min(s,p.settings.maxOptions)),s>0&&(y=!0);const _=(t,e)=>{let n=d[t];if(void 0!==n){let t=h[n];if(void 0!==t)return[n,t.fragment]}let i=document.createDocumentFragment();return n=h.length,h.push({fragment:i,order:e,optgroup:t}),[n,i]};for(e=0;e0&&(u=u.cloneNode(!0),Ot(u,{id:a.$id+"-clone-"+n,"aria-selected":null}),u.classList.add("ts-cloned"),kt(u,"active"),p.activeOption&&p.activeOption.dataset.value==s&&c&&c.dataset.group===r.toString()&&(v=u)),l.appendChild(u),""!=r&&(d[r]=i)}}var w;p.settings.lockOptgroupOrder&&h.sort(((t,e)=>t.order-e.order)),a=document.createDocumentFragment(),gt(h,(t=>{let e=t.fragment,n=t.optgroup;if(!e||!e.children.length)return;let i=p.optgroups[n];if(void 0!==i){let t=document.createDocumentFragment(),n=p.render("optgroup_header",i);ft(t,n),ft(t,e);let s=p.render("optgroup",{group:i,options:t});ft(a,s)}else ft(a,e)})),b.innerHTML="",ft(b,a),p.settings.highlight&&(w=b.querySelectorAll("span.highlight"),Array.prototype.forEach.call(w,(function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()})),g.query.length&&g.tokens.length&>(g.tokens,(t=>{Ct(b,t.regex)})));var k=t=>{let e=p.render(t,{input:m});return e&&(y=!0,b.insertBefore(e,b.firstChild)),e};if(p.loading?k("loading"):p.settings.shouldLoad.call(p,m)?0===g.items.length&&k("no_results"):k("not_loading"),(l=p.canCreate(m))&&(u=k("option_create")),p.hasOptions=g.items.length>0||l,y){if(g.items.length>0){if(v||"single"!==p.settings.mode||null==p.items[0]||(v=p.getOption(p.items[0])),!b.contains(v)){let t=0;u&&!p.settings.addPrecedence&&(t=1),v=p.selectable()[t]}}else u&&(v=u);t&&!p.isOpen&&(p.open(),p.scrollToOption(v,"auto")),p.setActiveOption(v)}else p.clearActiveOption(),t&&p.isOpen&&p.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const n=this;if(Array.isArray(t))return n.addOptions(t,e),!1;const i=rt(t[n.settings.valueField]);return null!==i&&!n.options.hasOwnProperty(i)&&(t.$order=t.$order||++n.order,t.$id=n.inputId+"-opt-"+t.$order,n.options[i]=t,n.lastQuery=null,e&&(n.userOptions[i]=e,n.trigger("option_add",i,t)),i)}addOptions(t,e=!1){gt(t,(t=>{this.addOption(t,e)}))}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=rt(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var n;e[this.settings.optgroupValueField]=t,(n=this.registerOptionGroup(e))&&this.trigger("optgroup_add",n,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const n=this;var i,s;const r=rt(t),o=rt(e[n.settings.valueField]);if(null===r)return;const a=n.options[r];if(null==a)return;if("string"!=typeof o)throw new Error("Value must be set in option data");const l=n.getOption(r),c=n.getItem(r);if(e.$order=e.$order||a.$order,delete n.options[r],n.uncacheValue(o),n.options[o]=e,l){if(n.dropdown_content.contains(l)){const t=n._render("option",e);Lt(l,t),n.activeOption===l&&n.setActiveOption(t)}l.remove()}c&&(-1!==(s=n.items.indexOf(r))&&n.items.splice(s,1,o),i=n._render("item",e),c.classList.contains("active")&&wt(i,"active"),Lt(c,i)),n.lastQuery=null}removeOption(t,e){const n=this;t=ot(t),n.uncacheValue(t),delete n.userOptions[t],delete n.options[t],n.lastQuery=null,n.trigger("option_remove",t),n.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const n={};gt(this.options,((t,i)=>{e(t,i)&&(n[i]=t)})),this.options=this.sifter.items=n,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const n=rt(t);if(null===n)return null;const i=this.options[n];if(null!=i){if(i.$div)return i.$div;if(e)return this._render("option",i)}return null}getAdjacent(t,e,n="option"){var i;if(!t)return null;i="item"==n?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let n=0;n0?i[n+1]:i[n-1];return null}getItem(t){if("object"==typeof t)return t;var e=rt(t);return null!==e?this.control.querySelector(`[data-value="${mt(e)}"]`):null}addItems(t,e){var n=this,i=Array.isArray(t)?t:[t];const s=(i=i.filter((t=>-1===n.items.indexOf(t))))[i.length-1];i.forEach((t=>{n.isPending=t!==s,n.addItem(t,e)}))}addItem(t,e){ct(this,e?[]:["change","dropdown_close"],(()=>{var n,i;const s=this,r=s.settings.mode,o=rt(t);if((!o||-1===s.items.indexOf(o)||("single"===r&&s.close(),"single"!==r&&s.settings.duplicates))&&null!==o&&s.options.hasOwnProperty(o)&&("single"===r&&s.clear(e),"multi"!==r||!s.isFull())){if(n=s._render("item",s.options[o]),s.control.contains(n)&&(n=n.cloneNode(!0)),i=s.isFull(),s.items.splice(s.caretPos,0,o),s.insertAtCaret(n),s.isSetup){if(!s.isPending&&s.settings.hideSelected){let t=s.getOption(o),e=s.getAdjacent(t,1);e&&s.setActiveOption(e)}s.isPending||s.settings.closeAfterSelect||s.refreshOptions(s.isFocused&&"single"!==r),0!=s.settings.closeAfterSelect&&s.isFull()?s.close():s.isPending||s.positionDropdown(),s.trigger("item_add",o,n),s.isPending||s.updateOriginalInput({silent:e})}(!s.isPending||!i&&s.isFull())&&(s.inputState(),s.refreshState())}}))}removeItem(t=null,e){const n=this;if(!(t=n.getItem(t)))return;var i,s;const r=t.dataset.value;i=St(t),t.remove(),t.classList.contains("active")&&(s=n.activeItems.indexOf(t),n.activeItems.splice(s,1),kt(t,"active")),n.items.splice(i,1),n.lastQuery=null,!n.settings.persist&&n.userOptions.hasOwnProperty(r)&&n.removeOption(r,e),i{})){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var n,i=this,s=i.caretPos;if(t=t||i.inputValue(),!i.canCreate(t))return e(),!1;i.lock();var r=!1,o=t=>{if(i.unlock(),!t||"object"!=typeof t)return e();var n=rt(t[i.settings.valueField]);if("string"!=typeof n)return e();i.setTextboxValue(),i.addOption(t,!0),i.setCaret(s),i.addItem(n),e(t),r=!0};return n="function"==typeof i.settings.create?i.settings.create.call(this,t,o):{[i.settings.labelField]:t,[i.settings.valueField]:t},r||o(n),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),n=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const i=t.wrapper.classList;var s;i.toggle("focus",t.isFocused),i.toggle("disabled",t.isDisabled),i.toggle("readonly",t.isReadOnly),i.toggle("required",t.isRequired),i.toggle("invalid",!t.isValid),i.toggle("locked",n),i.toggle("full",e),i.toggle("input-active",t.isFocused&&!t.isInputHidden),i.toggle("dropdown-active",t.isOpen),i.toggle("has-options",(s=t.options,0===Object.keys(s).length)),i.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var n,i;const s=e.input.querySelector('option[value=""]');if(e.is_select_tag){const r=[],o=e.input.querySelectorAll("option:checked").length;function a(t,n,i){return t||(t=vt('")),t!=s&&e.input.append(t),r.push(t),(t!=s||o>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach((t=>{t.selected=!1})),0==e.items.length&&"single"==e.settings.mode?a(s,"",""):e.items.forEach((t=>{if(n=e.options[t],i=n[e.settings.labelField]||"",r.includes(n.$option)){a(e.input.querySelector(`option[value="${mt(t)}"]:not(:checked)`),t,i)}else n.$option=a(n.$option,t,i)}))}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,Ot(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),_t(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),_t(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,n=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.inputState()),e.isOpen=!1,Ot(e.focus_node,{"aria-expanded":"false"}),_t(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),n&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),n=t.offsetHeight+e.top+window.scrollY,i=e.left+window.scrollX;_t(this.dropdown,{width:e.width+"px",top:n+"px",left:i+"px"})}}clear(t){var e=this;if(e.items.length){var n=e.controlChildren();gt(n,(t=>{e.removeItem(t,!0)})),e.inputState(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,n=e.caretPos,i=e.control;i.insertBefore(t,i.children[n]||null),e.setCaret(n+1)}deleteSelection(t){var e,n,i,s,r,o=this;e=t&&8===t.keyCode?-1:1,n={start:(r=o.control_input).selectionStart||0,length:(r.selectionEnd||0)-(r.selectionStart||0)};const a=[];if(o.activeItems.length)s=xt(o.activeItems,e),i=St(s),e>0&&i++,gt(o.activeItems,(t=>a.push(t)));else if((o.isFocused||"single"===o.settings.mode)&&o.items.length){const t=o.controlChildren();let i;e<0&&0===n.start&&0===n.length?i=t[o.caretPos-1]:e>0&&n.start===o.inputValue().length&&(i=t[o.caretPos]),void 0!==i&&a.push(i)}if(!o.shouldDelete(a,t))return!1;for(ut(t,!0),void 0!==i&&o.setCaret(i);a.length;)o.removeItem(a.pop());return o.inputState(),o.positionDropdown(),o.refreshOptions(!1),!0}shouldDelete(t,e){const n=t.map((t=>t.dataset.value));return!(!n.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(n,e))}advanceSelection(t,e){var n,i,s=this;s.rtl&&(t*=-1),s.inputValue().length||(ht(Mt,e)||ht("shiftKey",e)?(i=(n=s.getLastActive(t))?n.classList.contains("active")?s.getAdjacent(n,t,"item"):n:t>0?s.control_input.nextElementSibling:s.control_input.previousElementSibling)&&(i.classList.contains("active")&&s.removeActiveItem(n),s.setActiveItemClass(i)):s.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var n=this.control.querySelectorAll(".active");return n?xt(n,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(t=this.isReadOnly||this.isDisabled){this.isLocked=t,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(t){this.focus_node.tabIndex=t?-1:this.tabIndex,this.isDisabled=t,this.input.disabled=t,this.control_input.disabled=t,this.setLocked()}setReadOnly(t){this.isReadOnly=t,this.input.readOnly=t,this.control_input.readOnly=t,this.setLocked()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,kt(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var n,i;const s=this;if("function"!=typeof this.settings.render[t])return null;if(!(i=s.settings.render[t].call(this,e,at)))return null;if(i=vt(i),"option"===t||"option_create"===t?e[s.settings.disabledField]?Ot(i,{"aria-disabled":"true"}):Ot(i,{"data-selectable":""}):"optgroup"===t&&(n=e.group[s.settings.optgroupValueField],Ot(i,{"data-group":n}),e.group[s.settings.disabledField]&&Ot(i,{"data-disabled":""})),"option"===t||"item"===t){const n=ot(e[s.settings.valueField]);Ot(i,{"data-value":n}),"item"===t?(wt(i,s.settings.itemClass),Ot(i,{"data-ts-item":""})):(wt(i,s.settings.optionClass),Ot(i,{role:"option",id:e.$id}),e.$div=i,s.options[n]=e)}return i}_render(t,e){const n=this.render(t,e);if(null==n)throw"HTMLElement expected";return n}clearCache(){gt(this.options,(t=>{t.$div&&(t.$div.remove(),delete t.$div)}))}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,n){var i=this,s=i[e];i[e]=function(){var e,r;return"after"===t&&(e=s.apply(i,arguments)),r=n.apply(i,arguments),"instead"===t?r:("before"===t&&(e=s.apply(i,arguments)),e)}}}const Ft=t=>"boolean"==typeof t?t?"1":"0":t+"",jt=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},qt=t=>"string"==typeof t&&t.indexOf("<")>-1;const Ht=t=>"string"==typeof t&&t.indexOf("<")>-1;const Vt=(t,e,n,i)=>{t.addEventListener(e,n,i)},$t=t=>"string"==typeof t&&t.indexOf("<")>-1,Bt=(t,e)=>{((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(e,((e,n)=>{null==e?t.removeAttribute(n):t.setAttribute(n,""+e)}))};const Rt=t=>"string"==typeof t&&t.indexOf("<")>-1;const Wt=t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},zt=t=>(Array.isArray(t)||(t=[t]),t);const Yt=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(Ut(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},Ut=t=>"string"==typeof t&&t.indexOf("<")>-1,Zt=t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},Kt=t=>(Array.isArray(t)||(t=[t]),t);const Jt=(t,e,n,i)=>{t.addEventListener(e,n,i)};const Gt=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},Qt=(t,e,n,i)=>{t.addEventListener(e,n,i)},Xt=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(te(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},te=t=>"string"==typeof t&&t.indexOf("<")>-1;const ee=t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},ne=t=>(Array.isArray(t)||(t=[t]),t);Pt.define("change_listener",(function(){var t,e,n,i;t=this.input,e="change",n=()=>{this.sync()},t.addEventListener(e,n,i)})),Pt.define("checkbox_options",(function(t){var e=this,n=e.onOptionSelect;e.settings.hideSelected=!1;const i=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},t);var s=function(t,e){e?(t.checked=!0,i.uncheckedClassNames&&t.classList.remove(...i.uncheckedClassNames),i.checkedClassNames&&t.classList.add(...i.checkedClassNames)):(t.checked=!1,i.checkedClassNames&&t.classList.remove(...i.checkedClassNames),i.uncheckedClassNames&&t.classList.add(...i.uncheckedClassNames))},r=function(t){setTimeout((()=>{var e=t.querySelector("input."+i.className);e instanceof HTMLInputElement&&s(e,t.classList.contains("selected"))}),1)};e.hook("after","setupTemplates",(()=>{var t=e.settings.render.option;e.settings.render.option=(n,r)=>{var o=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(qt(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(t.call(e,n,r)),a=document.createElement("input");i.className&&a.classList.add(i.className),a.addEventListener("click",(function(t){jt(t)})),a.type="checkbox";const l=null==(c=n[e.settings.valueField])?null:Ft(c);var c;return s(a,!!(l&&e.items.indexOf(l)>-1)),o.prepend(a),o}})),e.on("item_remove",(t=>{var n=e.getOption(t);n&&(n.classList.remove("selected"),r(n))})),e.on("item_add",(t=>{var n=e.getOption(t);n&&r(n)})),e.hook("instead","onOptionSelect",((t,i)=>{if(i.classList.contains("selected"))return i.classList.remove("selected"),e.removeItem(i.dataset.value),e.refreshOptions(),void jt(t,!0);n.call(e,t,i),r(i)}))})),Pt.define("clear_button",(function(t){const e=this,n=Object.assign({className:"clear-button",title:"Clear All",html:t=>`⨯
`},t);e.on("initialize",(()=>{var t=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(Ht(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(n.html(n));t.addEventListener("click",(t=>{e.isLocked||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),t.preventDefault(),t.stopPropagation())})),e.control.appendChild(t)}))})),Pt.define("drag_drop",(function(){var t=this;if("multi"!==t.settings.mode)return;var e=t.lock,n=t.unlock;let i,s=!0;t.hook("after","setupTemplates",(()=>{var e=t.settings.render.item;t.settings.render.item=(n,r)=>{const o=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if($t(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(e.call(t,n,r));Bt(o,{draggable:"true"});const a=t=>{t.preventDefault(),o.classList.add("ts-drag-over"),l(o,i)},l=(t,e)=>{var n,i,s;void 0!==e&&(((t,e)=>{do{var n;if(t==(e=null==(n=e)?void 0:n.previousElementSibling))return!0}while(e&&e.previousElementSibling);return!1})(e,o)?(i=e,null==(s=(n=t).parentNode)||s.insertBefore(i,n.nextSibling)):((t,e)=>{var n;null==(n=t.parentNode)||n.insertBefore(e,t)})(t,e))};return Vt(o,"mousedown",(t=>{s||((t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())})(t),t.stopPropagation()})),Vt(o,"dragstart",(t=>{i=o,setTimeout((()=>{o.classList.add("ts-dragging")}),0)})),Vt(o,"dragenter",a),Vt(o,"dragover",a),Vt(o,"dragleave",(()=>{o.classList.remove("ts-drag-over")})),Vt(o,"dragend",(()=>{var e;document.querySelectorAll(".ts-drag-over").forEach((t=>t.classList.remove("ts-drag-over"))),null==(e=i)||e.classList.remove("ts-dragging"),i=void 0;var n=[];t.control.querySelectorAll("[data-value]").forEach((t=>{if(t.dataset.value){let e=t.dataset.value;e&&n.push(e)}})),t.setValue(n)})),o}})),t.hook("instead","lock",(()=>(s=!1,e.call(t)))),t.hook("instead","unlock",(()=>(s=!0,n.call(t))))})),Pt.define("dropdown_header",(function(t){const e=this,n=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>''},t);e.on("initialize",(()=>{var t=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(Rt(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(n.html(n)),i=t.querySelector("."+n.closeClass);i&&i.addEventListener("click",(t=>{((t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())})(t,!0),e.close()})),e.dropdown.insertBefore(t,e.dropdown.firstChild)}))})),Pt.define("caret_position",(function(){var t=this;t.hook("instead","setCaret",(e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEach(((n,i)=>{i{if(!t.isFocused)return;const n=t.getLastActive(e);if(n){const i=((t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var n=0;t=t.previousElementSibling;)t.matches(e)&&n++;return n})(n);t.setCaret(e>0?i+1:i),t.setActiveItem(),((t,...e)=>{var n=Wt(e);(t=zt(t)).map((t=>{n.map((e=>{t.classList.remove(e)}))}))})(n,"last-active")}else t.setCaret(t.caretPos+e)}))})),Pt.define("dropdown_input",(function(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",(()=>{t.focus_node=t.control,((t,...e)=>{var n=Zt(e);(t=Kt(t)).map((t=>{n.map((e=>{t.classList.add(e)}))}))})(t.control_input,"dropdown-input");const e=Yt('");for(var D=1;D<=7;D+=1){var x=3+this.options.firstDay+D,S=document.createElement("div");S.innerHTML=this.weekdayName(x),S.title=this.weekdayName(x,"long"),E.appendChild(S)}var O=document.createElement("div");O.className=a.containerDays;var L=this.calcSkipDays(i);this.options.showWeekNumbers&&L&&O.appendChild(this.renderWeekNumber(i));for(var C=0;C1&&1===this.datePicked.length){var s=this.options.minDays-1,r=this.datePicked[0].clone().subtract(s,"day"),c=this.datePicked[0].clone().add(s,"day");t.isBetween(r,this.datePicked[0],"(]")&&e.classList.add(a.isLocked),t.isBetween(this.datePicked[0],c,"[)")&&e.classList.add(a.isLocked)}if(this.options.maxDays&&1===this.datePicked.length){var u=this.options.maxDays;r=this.datePicked[0].clone().subtract(u,"day"),c=this.datePicked[0].clone().add(u,"day"),t.isSameOrBefore(r)&&e.classList.add(a.isLocked),t.isSameOrAfter(c)&&e.classList.add(a.isLocked)}return this.options.selectForward&&1===this.datePicked.length&&t.isBefore(this.datePicked[0])&&e.classList.add(a.isLocked),this.options.selectBackward&&1===this.datePicked.length&&t.isAfter(this.datePicked[0])&&e.classList.add(a.isLocked),l.dateIsLocked(t,this.options,this.datePicked)&&e.classList.add(a.isLocked),this.options.highlightedDays.length&&this.options.highlightedDays.filter((function(e){return e instanceof Array?t.isBetween(e[0],e[1],"[]"):e.isSame(t,"day")})).length&&e.classList.add(a.isHighlighted),e.tabIndex=e.classList.contains("is-locked")?-1:0,this.emit("render:day",e,t),e},e.prototype.renderFooter=function(){var t=document.createElement("div");if(t.className=a.containerFooter,this.options.footerHTML?t.innerHTML=this.options.footerHTML:t.innerHTML='\n \n \n \n ",this.options.singleMode){if(1===this.datePicked.length){var e=this.datePicked[0].format(this.options.format,this.options.lang);t.querySelector("."+a.previewDateRange).innerHTML=e}}else if(1===this.datePicked.length&&t.querySelector("."+a.buttonApply).setAttribute("disabled",""),2===this.datePicked.length){e=this.datePicked[0].format(this.options.format,this.options.lang);var n=this.datePicked[1].format(this.options.format,this.options.lang);t.querySelector("."+a.previewDateRange).innerHTML=""+e+this.options.delimiter+n}return this.emit("render:footer",t),t},e.prototype.renderWeekNumber=function(t){var e=document.createElement("div"),n=t.getWeek(this.options.firstDay);return e.className=a.weekNumber,e.innerHTML=53===n&&0===t.getMonth()?"53 / 1":n,e},e.prototype.renderTooltip=function(){var t=document.createElement("div");return t.className=a.containerTooltip,t},e.prototype.weekdayName=function(t,e){return void 0===e&&(e="short"),new Date(1970,0,t,12,0,0,0).toLocaleString(this.options.lang,{weekday:e})},e.prototype.calcSkipDays=function(t){var e=t.getDay()-this.options.firstDay;return e<0&&(e+=7),e},e}(r.LPCore);e.Calendar=c},function(t,e,n){"use strict";var i,s=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,i=arguments.length;n',nextMonth:'',reset:''},tooltipText:{one:"day",other:"days"}},n.options=r(r({},n.options),e.element.dataset),Object.keys(n.options).forEach((function(t){"true"!==n.options[t]&&"false"!==n.options[t]||(n.options[t]="true"===n.options[t])}));var i=r(r({},n.options.dropdowns),e.dropdowns),s=r(r({},n.options.buttonText),e.buttonText),o=r(r({},n.options.tooltipText),e.tooltipText);n.options=r(r({},n.options),e),n.options.dropdowns=r({},i),n.options.buttonText=r({},s),n.options.tooltipText=r({},o),n.options.elementEnd||(n.options.allowRepick=!1),n.options.lockDays.length&&(n.options.lockDays=a.DateTime.convertArray(n.options.lockDays,n.options.lockDaysFormat)),n.options.highlightedDays.length&&(n.options.highlightedDays=a.DateTime.convertArray(n.options.highlightedDays,n.options.highlightedDaysFormat));var l=n.parseInput(),c=l[0],u=l[1];n.options.startDate&&(n.options.singleMode||n.options.endDate)&&(c=new a.DateTime(n.options.startDate,n.options.format,n.options.lang)),c&&n.options.endDate&&(u=new a.DateTime(n.options.endDate,n.options.format,n.options.lang)),c instanceof a.DateTime&&!isNaN(c.getTime())&&(n.options.startDate=c),n.options.startDate&&u instanceof a.DateTime&&!isNaN(u.getTime())&&(n.options.endDate=u),!n.options.singleMode||n.options.startDate instanceof a.DateTime||(n.options.startDate=null),n.options.singleMode||n.options.startDate instanceof a.DateTime&&n.options.endDate instanceof a.DateTime||(n.options.startDate=null,n.options.endDate=null);for(var d=0;dwindow.innerHeight,c=e.top+r-n.height>=n.height;l&&c&&(o=e.top+r-n.height)}if(/left|right/.test(i[0])||i[1]&&"auto"!==i[1]&&/left|right/.test(i[1]))a=/left|right/.test(i[0])?e[i[0]]+s:e[i[1]]+s,"right"!==i[0]&&"right"!==i[1]||(a-=n.width);else{a=e.left+s,l=e.left+n.width>window.innerWidth;var u=e.right+s-n.width>=0;l&&u&&(a=e.right+s-n.width)}return{left:a,top:o}},e}(o.EventEmitter);e.LPCore=c},function(t,e,n){"use strict";var i,s="object"==typeof Reflect?Reflect:null,r=s&&"function"==typeof s.apply?s.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};i=s&&"function"==typeof s.ownKeys?s.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function c(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function u(t,e,n,i){var s,r,o,a;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(r=t._events)?(r=t._events=Object.create(null),t._eventsCount=0):(void 0!==r.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),r=t._events),o=r[e]),void 0===o)o=r[e]=n,++t._eventsCount;else if("function"==typeof o?o=r[e]=i?[n,o]:[o,n]:i?o.unshift(n):o.push(n),(s=c(t))>0&&o.length>s&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=o.length,a=l,console&&console.warn&&console.warn(a)}return t}function d(){for(var t=[],e=0;e0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=s[t];if(void 0===l)return!1;if("function"==typeof l)r(l,this,e);else{var c=l.length,u=f(l,c);for(n=0;n=0;r--)if(n[r]===e||n[r].listener===e){o=n[r].listener,s=r;break}if(s<0)return this;0===s?n.shift():function(t,e){for(;e+1=0;i--)this.removeListener(t,e[i]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(t,e,n){(e=n(9)(!1)).push([t.i,':root{--litepicker-container-months-color-bg: #fff;--litepicker-container-months-box-shadow-color: #ddd;--litepicker-footer-color-bg: #fafafa;--litepicker-footer-box-shadow-color: #ddd;--litepicker-tooltip-color-bg: #fff;--litepicker-month-header-color: #333;--litepicker-button-prev-month-color: #9e9e9e;--litepicker-button-next-month-color: #9e9e9e;--litepicker-button-prev-month-color-hover: #2196f3;--litepicker-button-next-month-color-hover: #2196f3;--litepicker-month-width: calc(var(--litepicker-day-width) * 7);--litepicker-month-weekday-color: #9e9e9e;--litepicker-month-week-number-color: #9e9e9e;--litepicker-day-width: 38px;--litepicker-day-color: #333;--litepicker-day-color-hover: #2196f3;--litepicker-is-today-color: #f44336;--litepicker-is-in-range-color: #bbdefb;--litepicker-is-locked-color: #9e9e9e;--litepicker-is-start-color: #fff;--litepicker-is-start-color-bg: #2196f3;--litepicker-is-end-color: #fff;--litepicker-is-end-color-bg: #2196f3;--litepicker-button-cancel-color: #fff;--litepicker-button-cancel-color-bg: #9e9e9e;--litepicker-button-apply-color: #fff;--litepicker-button-apply-color-bg: #2196f3;--litepicker-button-reset-color: #909090;--litepicker-button-reset-color-hover: #2196f3;--litepicker-highlighted-day-color: #333;--litepicker-highlighted-day-color-bg: #ffeb3b}.show-week-numbers{--litepicker-month-width: calc(var(--litepicker-day-width) * 8)}.litepicker{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;font-size:0.8em;display:none}.litepicker button{border:none;background:none}.litepicker .container__main{display:-webkit-box;display:-ms-flexbox;display:flex}.litepicker .container__months{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;background-color:var(--litepicker-container-months-color-bg);border-radius:5px;-webkit-box-shadow:0 0 5px var(--litepicker-container-months-box-shadow-color);box-shadow:0 0 5px var(--litepicker-container-months-box-shadow-color);width:calc(var(--litepicker-month-width) + 10px);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months.columns-2{width:calc((var(--litepicker-month-width) * 2) + 20px)}.litepicker .container__months.columns-3{width:calc((var(--litepicker-month-width) * 3) + 30px)}.litepicker .container__months.columns-4{width:calc((var(--litepicker-month-width) * 4) + 40px)}.litepicker .container__months.split-view .month-item-header .button-previous-month,.litepicker .container__months.split-view .month-item-header .button-next-month{visibility:visible}.litepicker .container__months .month-item{padding:5px;width:var(--litepicker-month-width);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months .month-item-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-weight:500;padding:10px 5px;text-align:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--litepicker-month-header-color)}.litepicker .container__months .month-item-header div{-webkit-box-flex:1;-ms-flex:1;flex:1}.litepicker .container__months .month-item-header div>.month-item-name{margin-right:5px}.litepicker .container__months .month-item-header div>.month-item-year{padding:0}.litepicker .container__months .month-item-header .reset-button{color:var(--litepicker-button-reset-color)}.litepicker .container__months .month-item-header .reset-button>svg{fill:var(--litepicker-button-reset-color)}.litepicker .container__months .month-item-header .reset-button *{pointer-events:none}.litepicker .container__months .month-item-header .reset-button:hover{color:var(--litepicker-button-reset-color-hover)}.litepicker .container__months .month-item-header .reset-button:hover>svg{fill:var(--litepicker-button-reset-color-hover)}.litepicker .container__months .month-item-header .button-previous-month,.litepicker .container__months .month-item-header .button-next-month{visibility:hidden;text-decoration:none;padding:3px 5px;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__months .month-item-header .button-previous-month *,.litepicker .container__months .month-item-header .button-next-month *{pointer-events:none}.litepicker .container__months .month-item-header .button-previous-month{color:var(--litepicker-button-prev-month-color)}.litepicker .container__months .month-item-header .button-previous-month>svg,.litepicker .container__months .month-item-header .button-previous-month>img{fill:var(--litepicker-button-prev-month-color)}.litepicker .container__months .month-item-header .button-previous-month:hover{color:var(--litepicker-button-prev-month-color-hover)}.litepicker .container__months .month-item-header .button-previous-month:hover>svg{fill:var(--litepicker-button-prev-month-color-hover)}.litepicker .container__months .month-item-header .button-next-month{color:var(--litepicker-button-next-month-color)}.litepicker .container__months .month-item-header .button-next-month>svg,.litepicker .container__months .month-item-header .button-next-month>img{fill:var(--litepicker-button-next-month-color)}.litepicker .container__months .month-item-header .button-next-month:hover{color:var(--litepicker-button-next-month-color-hover)}.litepicker .container__months .month-item-header .button-next-month:hover>svg{fill:var(--litepicker-button-next-month-color-hover)}.litepicker .container__months .month-item-weekdays-row{display:-webkit-box;display:-ms-flexbox;display:flex;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;color:var(--litepicker-month-weekday-color)}.litepicker .container__months .month-item-weekdays-row>div{padding:5px 0;font-size:85%;-webkit-box-flex:1;-ms-flex:1;flex:1;width:var(--litepicker-day-width);text-align:center}.litepicker .container__months .month-item:first-child .button-previous-month{visibility:visible}.litepicker .container__months .month-item:last-child .button-next-month{visibility:visible}.litepicker .container__months .month-item.no-previous-month .button-previous-month{visibility:hidden}.litepicker .container__months .month-item.no-next-month .button-next-month{visibility:hidden}.litepicker .container__days{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:center;-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__days>div,.litepicker .container__days>a{padding:5px 0;width:var(--litepicker-day-width)}.litepicker .container__days .day-item{color:var(--litepicker-day-color);text-align:center;text-decoration:none;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__days .day-item:hover{color:var(--litepicker-day-color-hover);-webkit-box-shadow:inset 0 0 0 1px var(--litepicker-day-color-hover);box-shadow:inset 0 0 0 1px var(--litepicker-day-color-hover)}.litepicker .container__days .day-item.is-today{color:var(--litepicker-is-today-color)}.litepicker .container__days .day-item.is-locked{color:var(--litepicker-is-locked-color)}.litepicker .container__days .day-item.is-locked:hover{color:var(--litepicker-is-locked-color);-webkit-box-shadow:none;box-shadow:none;cursor:default}.litepicker .container__days .day-item.is-in-range{background-color:var(--litepicker-is-in-range-color);border-radius:0}.litepicker .container__days .day-item.is-start-date{color:var(--litepicker-is-start-color);background-color:var(--litepicker-is-start-color-bg);border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-flipped{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date{color:var(--litepicker-is-end-color);background-color:var(--litepicker-is-end-color-bg);border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date.is-flipped{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-end-date{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-highlighted{color:var(--litepicker-highlighted-day-color);background-color:var(--litepicker-highlighted-day-color-bg)}.litepicker .container__days .week-number{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:var(--litepicker-month-week-number-color);font-size:85%}.litepicker .container__footer{text-align:right;padding:10px 5px;margin:0 5px;background-color:var(--litepicker-footer-color-bg);-webkit-box-shadow:inset 0px 3px 3px 0px var(--litepicker-footer-box-shadow-color);box-shadow:inset 0px 3px 3px 0px var(--litepicker-footer-box-shadow-color);border-bottom-left-radius:5px;border-bottom-right-radius:5px}.litepicker .container__footer .preview-date-range{margin-right:10px;font-size:90%}.litepicker .container__footer .button-cancel{background-color:var(--litepicker-button-cancel-color-bg);color:var(--litepicker-button-cancel-color);border:0;padding:3px 7px 4px;border-radius:3px}.litepicker .container__footer .button-cancel *{pointer-events:none}.litepicker .container__footer .button-apply{background-color:var(--litepicker-button-apply-color-bg);color:var(--litepicker-button-apply-color);border:0;padding:3px 7px 4px;border-radius:3px;margin-left:10px;margin-right:10px}.litepicker .container__footer .button-apply:disabled{opacity:0.7}.litepicker .container__footer .button-apply *{pointer-events:none}.litepicker .container__tooltip{position:absolute;margin-top:-4px;padding:4px 8px;border-radius:4px;background-color:var(--litepicker-tooltip-color-bg);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.25);box-shadow:0 1px 3px rgba(0,0,0,0.25);white-space:nowrap;font-size:11px;pointer-events:none;visibility:hidden}.litepicker .container__tooltip:before{position:absolute;bottom:-5px;left:calc(50% - 5px);border-top:5px solid rgba(0,0,0,0.12);border-right:5px solid transparent;border-left:5px solid transparent;content:""}.litepicker .container__tooltip:after{position:absolute;bottom:-4px;left:calc(50% - 4px);border-top:4px solid var(--litepicker-tooltip-color-bg);border-right:4px solid transparent;border-left:4px solid transparent;content:""}\n',""]),e.locals={showWeekNumbers:"show-week-numbers",litepicker:"litepicker",containerMain:"container__main",containerMonths:"container__months",columns2:"columns-2",columns3:"columns-3",columns4:"columns-4",splitView:"split-view",monthItemHeader:"month-item-header",buttonPreviousMonth:"button-previous-month",buttonNextMonth:"button-next-month",monthItem:"month-item",monthItemName:"month-item-name",monthItemYear:"month-item-year",resetButton:"reset-button",monthItemWeekdaysRow:"month-item-weekdays-row",noPreviousMonth:"no-previous-month",noNextMonth:"no-next-month",containerDays:"container__days",dayItem:"day-item",isToday:"is-today",isLocked:"is-locked",isInRange:"is-in-range",isStartDate:"is-start-date",isFlipped:"is-flipped",isEndDate:"is-end-date",isHighlighted:"is-highlighted",weekNumber:"week-number",containerFooter:"container__footer",previewDateRange:"preview-date-range",buttonCancel:"button-cancel",buttonApply:"button-apply",containerTooltip:"container__tooltip"},t.exports=e},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,i,s,r=t[1]||"",o=t[3];if(!o)return r;if(e&&"function"==typeof btoa){var a=(n=o,i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),"/*# ".concat(s," */")),l=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(t," */")}));return[r].concat(l).concat([a]).join("\n")}return[r].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var s={};if(i)for(var r=0;rthis.options.endDate.getTime()&&(this.options.endDate=this.options.startDate.clone(),this.options.startDate=new s.DateTime(t,this.options.format,this.options.lang)),this.updateInput())},r.Litepicker.prototype.setDateRange=function(t,e,n){void 0===n&&(n=!1),this.triggerElement=void 0;var i=new s.DateTime(t,this.options.format,this.options.lang),r=new s.DateTime(e,this.options.format,this.options.lang);(this.options.disallowLockDaysInRange?o.rangeIsLocked([i,r],this.options):o.dateIsLocked(i,this.options,[i,r])||o.dateIsLocked(r,this.options,[i,r]))&&!n?this.emit("error:range",[i,r]):(this.setStartDate(i),this.setEndDate(r),this.options.inlineMode&&this.render(),this.updateInput(),this.emit("selected",this.getStartDate(),this.getEndDate()))},r.Litepicker.prototype.gotoDate=function(t,e){void 0===e&&(e=0);var n=new s.DateTime(t);n.setDate(1),this.calendars[e]=n.clone(),this.render()},r.Litepicker.prototype.setLockDays=function(t){this.options.lockDays=s.DateTime.convertArray(t,this.options.lockDaysFormat),this.render()},r.Litepicker.prototype.setHighlightedDays=function(t){this.options.highlightedDays=s.DateTime.convertArray(t,this.options.highlightedDaysFormat),this.render()},r.Litepicker.prototype.setOptions=function(t){delete t.element,delete t.elementEnd,delete t.parentEl,t.startDate&&(t.startDate=new s.DateTime(t.startDate,this.options.format,this.options.lang)),t.endDate&&(t.endDate=new s.DateTime(t.endDate,this.options.format,this.options.lang));var e=i(i({},this.options.dropdowns),t.dropdowns),n=i(i({},this.options.buttonText),t.buttonText),r=i(i({},this.options.tooltipText),t.tooltipText);this.options=i(i({},this.options),t),this.options.dropdowns=i({},e),this.options.buttonText=i({},n),this.options.tooltipText=i({},r),!this.options.singleMode||this.options.startDate instanceof s.DateTime||(this.options.startDate=null,this.options.endDate=null),this.options.singleMode||this.options.startDate instanceof s.DateTime&&this.options.endDate instanceof s.DateTime||(this.options.startDate=null,this.options.endDate=null);for(var o=0;oMath.abs(r),a=t.options.numberOfMonths,l=null,c=!1,u="",d=Array.from(t.ui.querySelectorAll(".month-item"));if(o){var h=t.DateTime(t.ui.querySelector(".day-item").dataset.time),p=Number("".concat(1-Math.abs(s)/100)),m=0;if(s>0){m=-Math.abs(s),l=h.clone().add(a,"month");var f=t.options.maxDate;c=!f||l.isSameOrBefore(t.DateTime(f),"month"),u="next"}else{m=Math.abs(s),l=h.clone().subtract(a,"month");var g=t.options.minDate;c=!g||l.isSameOrAfter(t.DateTime(g),"month"),u="prev"}c&&d.map((function(t){t.style.opacity=p,t.style.transform="translateX(".concat(m,"px)")}))}Math.abs(s)+Math.abs(r)>100&&o&&l&&c&&(t.touchTargetMonth=u,t.gotoDate(l))}}),!!n&&{passive:!0}),t.ui.addEventListener("touchend",(function(e){t.touchTargetMonth||Array.from(t.ui.querySelectorAll(".month-item")).map((function(t){t.style.transform="translateX(0px)",t.style.opacity=1})),t.xTouchDown=null,t.yTouchDown=null}),!!n&&{passive:!0})}})},function(t,e,n){var i=n(7);"string"==typeof i&&(i=[[t.i,i,""]]);var s={insert:function(t){var e=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;window.disableLitepickerStyles||(n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t)},singleton:!1};n(1)(i,s),i.locals&&(t.exports=i.locals)},function(t,e,n){(e=n(0)(!1)).push([t.i,':root {\n --litepicker-mobilefriendly-backdrop-color-bg: #000;\n}\n\n.litepicker-backdrop {\n display: none;\n background-color: var(--litepicker-mobilefriendly-backdrop-color-bg);\n opacity: 0.3;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n.litepicker-open {\n overflow: hidden;\n}\n\n.litepicker.mobilefriendly[data-plugins*="mobilefriendly"] {\n transform: translate(-50%, -50%);\n font-size: 1.1rem;\n --litepicker-container-months-box-shadow-color: #616161;\n}\n.litepicker.mobilefriendly-portrait {\n --litepicker-day-width: 13.5vw;\n --litepicker-month-width: calc(var(--litepicker-day-width) * 7);\n}\n.litepicker.mobilefriendly-landscape {\n --litepicker-day-width: 5.5vw;\n --litepicker-month-width: calc(var(--litepicker-day-width) * 7);\n}\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months {\n overflow: hidden;\n}\n\n.litepicker.mobilefriendly[data-plugins*="mobilefriendly"] .container__months .month-item-header {\n height: var(--litepicker-day-width);\n}\n\n.litepicker.mobilefriendly[data-plugins*="mobilefriendly"] .container__days > div {\n height: var(--litepicker-day-width);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months .month-item {\n transform-origin: center;\n}\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months .month-item.touch-target-next {\n animation-name: lp-bounce-target-next;\n animation-duration: .5s;\n animation-timing-function: ease;\n}\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months .month-item.touch-target-prev {\n animation-name: lp-bounce-target-prev;\n animation-duration: .5s;\n animation-timing-function: ease;\n}\n\n@keyframes lp-bounce-target-next {\n from {\n transform: translateX(100px) scale(0.5);\n }\n to {\n transform: translateX(0px) scale(1);\n }\n}\n\n@keyframes lp-bounce-target-prev {\n from {\n transform: translateX(-100px) scale(0.5);\n }\n to {\n transform: translateX(0px) scale(1);\n }\n}',""]),t.exports=e}])},4975:function(t,e,n){"use strict";n.r(e)},6285:function(t,e,n){"use strict";n.d(e,{c9:function(){return fi},dw:function(){return Tn},wB:function(){return bt}});class i extends Error{}class s extends i{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class r extends i{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class o extends i{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class a extends i{}class l extends i{constructor(t){super(`Invalid unit ${t}`)}}class c extends i{}class u extends i{constructor(){super("Zone is an abstract class")}}const d="numeric",h="short",p="long",m={year:d,month:d,day:d},f={year:d,month:h,day:d},g={year:d,month:h,day:d,weekday:h},v={year:d,month:p,day:d},y={year:d,month:p,day:d,weekday:p},b={hour:d,minute:d},_={hour:d,minute:d,second:d},w={hour:d,minute:d,second:d,timeZoneName:h},k={hour:d,minute:d,second:d,timeZoneName:p},T={hour:d,minute:d,hourCycle:"h23"},E={hour:d,minute:d,second:d,hourCycle:"h23"},D={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:h},x={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:p},S={year:d,month:d,day:d,hour:d,minute:d},O={year:d,month:d,day:d,hour:d,minute:d,second:d},L={year:d,month:h,day:d,hour:d,minute:d},C={year:d,month:h,day:d,hour:d,minute:d,second:d},M={year:d,month:h,day:d,weekday:h,hour:d,minute:d},A={year:d,month:p,day:d,hour:d,minute:d,timeZoneName:h},I={year:d,month:p,day:d,hour:d,minute:d,second:d,timeZoneName:h},N={year:d,month:p,day:d,weekday:p,hour:d,minute:d,timeZoneName:p},P={year:d,month:p,day:d,weekday:p,hour:d,minute:d,second:d,timeZoneName:p};class F{get type(){throw new u}get name(){throw new u}get ianaName(){return this.name}get isUniversal(){throw new u}offsetName(t,e){throw new u}formatOffset(t,e){throw new u}offset(t){throw new u}equals(t){throw new u}get isValid(){throw new u}}let j=null;class q extends F{static get instance(){return null===j&&(j=new q),j}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:e,locale:n}){return ne(t,e,n)}formatOffset(t,e){return oe(this.offset(t),e)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return"system"===t.type}get isValid(){return!0}}let H={};const V={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let $={};class B extends F{static create(t){return $[t]||($[t]=new B(t)),$[t]}static resetCache(){$={},H={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(t){return!1}}constructor(t){super(),this.zoneName=t,this.valid=B.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:e,locale:n}){return ne(t,e,n,this.name)}formatOffset(t,e){return oe(this.offset(t),e)}offset(t){const e=new Date(t);if(isNaN(e))return NaN;const n=(i=this.name,H[i]||(H[i]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:i,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),H[i]);var i;let[s,r,o,a,l,c,u]=n.formatToParts?function(t,e){const n=t.formatToParts(e),i=[];for(let t=0;t=0?h:1e3+h,(Qt({year:s,month:r,day:o,hour:24===l?0:l,minute:c,second:u,millisecond:0})-d)/6e4}equals(t){return"iana"===t.type&&t.name===this.name}get isValid(){return this.valid}}let R={};let W={};function z(t,e={}){const n=JSON.stringify([t,e]);let i=W[n];return i||(i=new Intl.DateTimeFormat(t,e),W[n]=i),i}let Y={};let U={};let Z=null;let K={};function J(t,e,n,i){const s=t.listingMode();return"error"===s?null:"en"===s?n(e):i(e)}class G{constructor(t,e,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:i,floor:s,...r}=n;if(!e||Object.keys(r).length>0){const e={useGrouping:!1,...n};n.padTo>0&&(e.minimumIntegerDigits=n.padTo),this.inf=function(t,e={}){const n=JSON.stringify([t,e]);let i=Y[n];return i||(i=new Intl.NumberFormat(t,e),Y[n]=i),i}(t,e)}}format(t){if(this.inf){const e=this.floor?Math.floor(t):t;return this.inf.format(e)}return Wt(this.floor?Math.floor(t):Zt(t,3),this.padTo)}}class Q{constructor(t,e,n){let i;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=t;else if("fixed"===t.zone.type){const e=t.offset/60*-1,n=e>=0?`Etc/GMT+${e}`:`Etc/GMT${e}`;0!==t.offset&&B.create(n).valid?(i=n,this.dt=t):(i="UTC",this.dt=0===t.offset?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else"system"===t.zone.type?this.dt=t:"iana"===t.zone.type?(this.dt=t,i=t.zone.name):(i="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const s={...this.opts};s.timeZone=s.timeZone||i,this.dtf=z(e,s)}format(){return this.originalZone?this.formatToParts().map((({value:t})=>t)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map((t=>{if("timeZoneName"===t.type){const e=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:e}}return t})):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class X{constructor(t,e,n){this.opts={style:"long",...n},!e&&qt()&&(this.rtf=function(t,e={}){const{base:n,...i}=e,s=JSON.stringify([t,i]);let r=U[s];return r||(r=new Intl.RelativeTimeFormat(t,e),U[s]=r),r}(t,n))}format(t,e){return this.rtf?this.rtf.format(t,e):function(t,e,n="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},r=-1===["hours","minutes","seconds"].indexOf(t);if("auto"===n&&r){const n="days"===t;switch(e){case 1:return n?"tomorrow":`next ${s[t][0]}`;case-1:return n?"yesterday":`last ${s[t][0]}`;case 0:return n?"today":`this ${s[t][0]}`}}const o=Object.is(e,-0)||e<0,a=Math.abs(e),l=1===a,c=s[t],u=i?l?c[1]:c[2]||c[1]:l?s[t][0]:t;return o?`${a} ${u} ago`:`in ${a} ${u}`}(e,t,this.opts.numeric,"long"!==this.opts.style)}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}}const tt={firstDay:1,minimalDays:4,weekend:[6,7]};class et{static fromOpts(t){return et.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,e,n,i,s=!1){const r=t||bt.defaultLocale,o=r||(s?"en-US":Z||(Z=(new Intl.DateTimeFormat).resolvedOptions().locale,Z)),a=e||bt.defaultNumberingSystem,l=n||bt.defaultOutputCalendar,c=Bt(i)||bt.defaultWeekSettings;return new et(o,a,l,c,r)}static resetCache(){Z=null,W={},Y={},U={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:n,weekSettings:i}={}){return et.create(t,e,n,i)}constructor(t,e,n,i,s){const[r,o,a]=function(t){const e=t.indexOf("-x-");-1!==e&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(-1===n)return[t];{let e,i;try{e=z(t).resolvedOptions(),i=t}catch(s){const r=t.substring(0,n);e=z(r).resolvedOptions(),i=r}const{numberingSystem:s,calendar:r}=e;return[i,s,r]}}(t);this.locale=r,this.numberingSystem=e||o||null,this.outputCalendar=n||a||null,this.weekSettings=i,this.intl=function(t,e,n){return n||e?(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){var t;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(t=this).numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),e=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t&&e?"en":"intl"}clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?et.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Bt(t.weekSettings)||this.weekSettings,t.defaultToEN||!1):this}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1){return J(this,t,de,(()=>{const n=e?{month:t,day:"numeric"}:{month:t},i=e?"format":"standalone";return this.monthsCache[i][t]||(this.monthsCache[i][t]=function(t){const e=[];for(let n=1;n<=12;n++){const i=fi.utc(2009,n,1);e.push(t(i))}return e}((t=>this.extract(t,n,"month")))),this.monthsCache[i][t]}))}weekdays(t,e=!1){return J(this,t,fe,(()=>{const n=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},i=e?"format":"standalone";return this.weekdaysCache[i][t]||(this.weekdaysCache[i][t]=function(t){const e=[];for(let n=1;n<=7;n++){const i=fi.utc(2016,11,13+n);e.push(t(i))}return e}((t=>this.extract(t,n,"weekday")))),this.weekdaysCache[i][t]}))}meridiems(){return J(this,void 0,(()=>ge),(()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[fi.utc(2016,11,13,9),fi.utc(2016,11,13,19)].map((e=>this.extract(e,t,"dayperiod")))}return this.meridiemCache}))}eras(t){return J(this,t,_e,(()=>{const e={era:t};return this.eraCache[t]||(this.eraCache[t]=[fi.utc(-40,1,1),fi.utc(2017,1,1)].map((t=>this.extract(t,e,"era")))),this.eraCache[t]}))}extract(t,e,n){const i=this.dtFormatter(t,e).formatToParts().find((t=>t.type.toLowerCase()===n));return i?i.value:null}numberFormatter(t={}){return new G(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new Q(t,this.intl,e)}relFormatter(t={}){return new X(this.intl,this.isEnglish(),t)}listFormatter(t={}){return function(t,e={}){const n=JSON.stringify([t,e]);let i=R[n];return i||(i=new Intl.ListFormat(t,e),R[n]=i),i}(this.intl,t)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Ht()?function(t){let e=K[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,K[t]=e}return e}(this.locale):tt}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let nt=null;class it extends F{static get utcInstance(){return null===nt&&(nt=new it(0)),nt}static instance(t){return 0===t?it.utcInstance:new it(t)}static parseSpecifier(t){if(t){const e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new it(ie(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${oe(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${oe(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return oe(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return"fixed"===t.type&&t.fixed===this.fixed}get isValid(){return!0}}class st extends F{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function rt(t,e){if(Pt(t)||null===t)return e;if(t instanceof F)return t;if("string"==typeof t){const n=t.toLowerCase();return"default"===n?e:"local"===n||"system"===n?q.instance:"utc"===n||"gmt"===n?it.utcInstance:it.parseSpecifier(n)||B.create(t)}return Ft(t)?it.instance(t):"object"==typeof t&&"offset"in t&&"function"==typeof t.offset?t:new st(t)}const ot={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},at={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},lt=ot.hanidec.replace(/[\[|\]]/g,"").split("");let ct={};function ut({numberingSystem:t},e=""){const n=t||"latn";return ct[n]||(ct[n]={}),ct[n][e]||(ct[n][e]=new RegExp(`${ot[n]}${e}`)),ct[n][e]}let dt,ht=()=>Date.now(),pt="system",mt=null,ft=null,gt=null,vt=60,yt=null;class bt{static get now(){return ht}static set now(t){ht=t}static set defaultZone(t){pt=t}static get defaultZone(){return rt(pt,q.instance)}static get defaultLocale(){return mt}static set defaultLocale(t){mt=t}static get defaultNumberingSystem(){return ft}static set defaultNumberingSystem(t){ft=t}static get defaultOutputCalendar(){return gt}static set defaultOutputCalendar(t){gt=t}static get defaultWeekSettings(){return yt}static set defaultWeekSettings(t){yt=Bt(t)}static get twoDigitCutoffYear(){return vt}static set twoDigitCutoffYear(t){vt=t%100}static get throwOnInvalid(){return dt}static set throwOnInvalid(t){dt=t}static resetCaches(){et.resetCache(),B.resetCache(),fi.resetCache(),ct={}}}class _t{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const wt=[0,31,59,90,120,151,181,212,243,273,304,334],kt=[0,31,60,91,121,152,182,213,244,274,305,335];function Tt(t,e){return new _t("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Et(t,e,n){const i=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return 0===s?7:s}function Dt(t,e,n){return n+(Kt(t)?kt:wt)[e-1]}function xt(t,e){const n=Kt(t)?kt:wt,i=n.findIndex((t=>tte(i,e,n)?(l=i+1,c=1):l=i,{weekYear:l,weekNumber:c,weekday:a,...ae(t)}}function Lt(t,e=4,n=1){const{weekYear:i,weekNumber:s,weekday:r}=t,o=St(Et(i,1,e),n),a=Jt(i);let l,c=7*s+r-o-7+e;c<1?(l=i-1,c+=Jt(l)):c>a?(l=i+1,c-=Jt(i)):l=i;const{month:u,day:d}=xt(l,c);return{year:l,month:u,day:d,...ae(t)}}function Ct(t){const{year:e,month:n,day:i}=t;return{year:e,ordinal:Dt(e,n,i),...ae(t)}}function Mt(t){const{year:e,ordinal:n}=t,{month:i,day:s}=xt(e,n);return{year:e,month:i,day:s,...ae(t)}}function At(t,e){if(!Pt(t.localWeekday)||!Pt(t.localWeekNumber)||!Pt(t.localWeekYear)){if(!Pt(t.weekday)||!Pt(t.weekNumber)||!Pt(t.weekYear))throw new a("Cannot mix locale-based week fields with ISO-based week fields");return Pt(t.localWeekday)||(t.weekday=t.localWeekday),Pt(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),Pt(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function It(t){const e=jt(t.year),n=Rt(t.month,1,12),i=Rt(t.day,1,Gt(t.year,t.month));return e?n?!i&&Tt("day",t.day):Tt("month",t.month):Tt("year",t.year)}function Nt(t){const{hour:e,minute:n,second:i,millisecond:s}=t,r=Rt(e,0,23)||24===e&&0===n&&0===i&&0===s,o=Rt(n,0,59),a=Rt(i,0,59),l=Rt(s,0,999);return r?o?a?!l&&Tt("millisecond",s):Tt("second",i):Tt("minute",n):Tt("hour",e)}function Pt(t){return void 0===t}function Ft(t){return"number"==typeof t}function jt(t){return"number"==typeof t&&t%1==0}function qt(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function Ht(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(t){return!1}}function Vt(t,e,n){if(0!==t.length)return t.reduce(((t,i)=>{const s=[e(i),i];return t&&n(t[0],s[0])===t[0]?t:s}),null)[1]}function $t(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Bt(t){if(null==t)return null;if("object"!=typeof t)throw new c("Week settings must be an object");if(!Rt(t.firstDay,1,7)||!Rt(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some((t=>!Rt(t,1,7))))throw new c("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Rt(t,e,n){return jt(t)&&t>=e&&t<=n}function Wt(t,e=2){let n;return n=t<0?"-"+(""+-t).padStart(e,"0"):(""+t).padStart(e,"0"),n}function zt(t){return Pt(t)||null===t||""===t?void 0:parseInt(t,10)}function Yt(t){return Pt(t)||null===t||""===t?void 0:parseFloat(t)}function Ut(t){if(!Pt(t)&&null!==t&&""!==t){const e=1e3*parseFloat("0."+t);return Math.floor(e)}}function Zt(t,e,n=!1){const i=10**e;return(n?Math.trunc:Math.round)(t*i)/i}function Kt(t){return t%4==0&&(t%100!=0||t%400==0)}function Jt(t){return Kt(t)?366:365}function Gt(t,e){const n=function(t,e){return t-e*Math.floor(t/e)}(e-1,12)+1;return 2===n?Kt(t+(e-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Qt(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function Xt(t,e,n){return-St(Et(t,1,e),n)+e-1}function te(t,e=4,n=1){const i=Xt(t,e,n),s=Xt(t+1,e,n);return(Jt(t)-i+s)/7}function ee(t){return t>99?t:t>bt.twoDigitCutoffYear?1900+t:2e3+t}function ne(t,e,n,i=null){const s=new Date(t),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(r.timeZone=i);const o={timeZoneName:e,...r},a=new Intl.DateTimeFormat(n,o).formatToParts(s).find((t=>"timezonename"===t.type.toLowerCase()));return a?a.value:null}function ie(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const i=parseInt(e,10)||0;return 60*n+(n<0||Object.is(n,-0)?-i:i)}function se(t){const e=Number(t);if("boolean"==typeof t||""===t||Number.isNaN(e))throw new c(`Invalid unit value ${t}`);return e}function re(t,e){const n={};for(const i in t)if($t(t,i)){const s=t[i];if(null==s)continue;n[e(i)]=se(s)}return n}function oe(t,e){const n=Math.trunc(Math.abs(t/60)),i=Math.trunc(Math.abs(t%60)),s=t>=0?"+":"-";switch(e){case"short":return`${s}${Wt(n,2)}:${Wt(i,2)}`;case"narrow":return`${s}${n}${i>0?`:${i}`:""}`;case"techie":return`${s}${Wt(n,2)}${Wt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function ae(t){return function(t,e){return e.reduce(((e,n)=>(e[n]=t[n],e)),{})}(t,["hour","minute","second","millisecond"])}const le=["January","February","March","April","May","June","July","August","September","October","November","December"],ce=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ue=["J","F","M","A","M","J","J","A","S","O","N","D"];function de(t){switch(t){case"narrow":return[...ue];case"short":return[...ce];case"long":return[...le];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const he=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],me=["M","T","W","T","F","S","S"];function fe(t){switch(t){case"narrow":return[...me];case"short":return[...pe];case"long":return[...he];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ge=["AM","PM"],ve=["Before Christ","Anno Domini"],ye=["BC","AD"],be=["B","A"];function _e(t){switch(t){case"narrow":return[...be];case"short":return[...ye];case"long":return[...ve];default:return null}}function we(t,e){let n="";for(const i of t)i.literal?n+=i.val:n+=e(i.val);return n}const ke={D:m,DD:f,DDD:v,DDDD:y,t:b,tt:_,ttt:w,tttt:k,T:T,TT:E,TTT:D,TTTT:x,f:S,ff:L,fff:A,ffff:N,F:O,FF:C,FFF:I,FFFF:P};class Te{static create(t,e={}){return new Te(t,e)}static parseFormat(t){let e=null,n="",i=!1;const s=[];for(let r=0;r0&&s.push({literal:i||/^\s+$/.test(n),val:n}),e=null,n="",i=!i):i||o===e?n+=o:(n.length>0&&s.push({literal:/^\s+$/.test(n),val:n}),n=o,e=o)}return n.length>0&&s.push({literal:i||/^\s+$/.test(n),val:n}),s}static macroTokenToFormatOpts(t){return ke[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}dtFormatter(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e})}formatDateTime(t,e){return this.dtFormatter(t,e).format()}formatDateTimeParts(t,e){return this.dtFormatter(t,e).formatToParts()}formatInterval(t,e){return this.dtFormatter(t.start,e).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,e){return this.dtFormatter(t,e).resolvedOptions()}num(t,e=0){if(this.opts.forceSimple)return Wt(t,e);const n={...this.opts};return e>0&&(n.padTo=e),this.loc.numberFormatter(n).format(t)}formatDateTimeFromString(t,e){const n="en"===this.loc.listingMode(),i=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(e,n)=>this.loc.extract(t,e,n),r=e=>t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):"",o=()=>n?function(t){return ge[t.hour<12?0:1]}(t):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(e,i)=>n?function(t,e){return de(e)[t.month-1]}(t,e):s(i?{month:e}:{month:e,day:"numeric"},"month"),l=(e,i)=>n?function(t,e){return fe(e)[t.weekday-1]}(t,e):s(i?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday"),c=e=>{const n=Te.macroTokenToFormatOpts(e);return n?this.formatWithSystemDefault(t,n):e},u=e=>n?function(t,e){return _e(e)[t.year<0?0:1]}(t,e):s({era:e},"era");return we(Te.parseFormat(e),(e=>{switch(e){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12==0?12:t.hour%12);case"hh":return this.num(t.hour%12==0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return o();case"d":return i?s({day:"numeric"},"day"):this.num(t.day);case"dd":return i?s({day:"2-digit"},"day"):this.num(t.day,2);case"c":case"E":return this.num(t.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return i?s({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return i?s({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return i?s({month:"numeric"},"month"):this.num(t.month);case"MM":return i?s({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return i?s({year:"numeric"},"year"):this.num(t.year);case"yy":return i?s({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return i?s({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return i?s({year:"numeric"},"year"):this.num(t.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return c(e)}}))}formatDurationFromString(t,e){const n=t=>{switch(t[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=Te.parseFormat(e),s=i.reduce(((t,{literal:e,val:n})=>e?t:t.concat(n)),[]);return we(i,(t=>e=>{const i=n(e);return i?this.num(t.get(i),e.length):e})(t.shiftTo(...s.map(n).filter((t=>t)))))}}const Ee=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function De(...t){const e=t.reduce(((t,e)=>t+e.source),"");return RegExp(`^${e}$`)}function xe(...t){return e=>t.reduce((([t,n,i],s)=>{const[r,o,a]=s(e,i);return[{...t,...r},o||n,a]}),[{},null,1]).slice(0,2)}function Se(t,...e){if(null==t)return[null,null];for(const[n,i]of e){const e=n.exec(t);if(e)return i(e)}return[null,null]}function Oe(...t){return(e,n)=>{const i={};let s;for(s=0;svoid 0!==t&&(e||t&&u)?-t:t;return[{years:h(Yt(n)),months:h(Yt(i)),weeks:h(Yt(s)),days:h(Yt(r)),hours:h(Yt(o)),minutes:h(Yt(a)),seconds:h(Yt(l),"-0"===l),milliseconds:h(Ut(c),d)}]}const We={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ze(t,e,n,i,s,r,o){const a={year:2===e.length?ee(zt(e)):zt(e),month:ce.indexOf(n)+1,day:zt(i),hour:zt(s),minute:zt(r)};return o&&(a.second=zt(o)),t&&(a.weekday=t.length>3?he.indexOf(t)+1:pe.indexOf(t)+1),a}const Ye=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ue(t){const[,e,n,i,s,r,o,a,l,c,u,d]=t,h=ze(e,s,i,n,r,o,a);let p;return p=l?We[l]:c?0:ie(u,d),[h,new it(p)]}const Ze=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Ke=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Je=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Ge(t){const[,e,n,i,s,r,o,a]=t;return[ze(e,s,i,n,r,o,a),it.utcInstance]}function Qe(t){const[,e,n,i,s,r,o,a]=t;return[ze(e,a,n,i,s,r,o),it.utcInstance]}const Xe=De(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ae),tn=De(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ae),en=De(/(\d{4})-?(\d{3})/,Ae),nn=De(Me),sn=xe((function(t,e){return[{year:je(t,e),month:je(t,e+1,1),day:je(t,e+2,1)},null,e+3]}),qe,He,Ve),rn=xe(Ie,qe,He,Ve),on=xe(Ne,qe,He,Ve),an=xe(qe,He,Ve);const ln=xe(qe);const cn=De(/(\d{4})-(\d\d)-(\d\d)/,Fe),un=De(Pe),dn=xe(qe,He,Ve);const hn="Invalid Duration",pn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},mn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...pn},fn=365.2425,gn=30.436875,vn={years:{quarters:4,months:12,weeks:52.1775,days:fn,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:gn,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...pn},yn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],bn=yn.slice(0).reverse();function _n(t,e,n=!1){const i={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Tn(i)}function wn(t,e){let n=e.milliseconds??0;for(const i of bn.slice(1))e[i]&&(n+=e[i]*t[i].milliseconds);return n}function kn(t,e){const n=wn(t,e)<0?-1:1;yn.reduceRight(((i,s)=>{if(Pt(e[s]))return i;if(i){const r=e[i]*n,o=t[s][i],a=Math.floor(r/o);e[s]+=a*n,e[i]-=a*o*n}return s}),null),yn.reduce(((n,i)=>{if(Pt(e[i]))return n;if(n){const s=e[n]%1;e[n]-=s,e[i]+=s*t[n][i]}return i}),null)}class Tn{constructor(t){const e="longterm"===t.conversionAccuracy||!1;let n=e?vn:mn;t.matrix&&(n=t.matrix),this.values=t.values,this.loc=t.loc||et.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,e){return Tn.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(null==t||"object"!=typeof t)throw new c("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new Tn({values:re(t,Tn.normalizeUnit),loc:et.fromObject(e),conversionAccuracy:e.conversionAccuracy,matrix:e.matrix})}static fromDurationLike(t){if(Ft(t))return Tn.fromMillis(t);if(Tn.isDuration(t))return t;if("object"==typeof t)return Tn.fromObject(t);throw new c(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){const[n]=function(t){return Se(t,[Be,Re])}(t);return n?Tn.fromObject(n,e):Tn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){const[n]=function(t){return Se(t,[$e,ln])}(t);return n?Tn.fromObject(n,e):Tn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the Duration is invalid");const n=t instanceof _t?t:new _t(t,e);if(bt.throwOnInvalid)throw new o(n);return new Tn({invalid:n})}static normalizeUnit(t){const e={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t?t.toLowerCase():t];if(!e)throw new l(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){const n={...e,floor:!1!==e.round&&!1!==e.floor};return this.isValid?Te.create(this.loc,n).formatDurationFromString(this,t):hn}toHuman(t={}){if(!this.isValid)return hn;const e=yn.map((e=>{const n=this.values[e];return Pt(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:e.slice(0,-1)}).format(n)})).filter((t=>t));return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=Zt(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const e=this.toMillis();if(e<0||e>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1};return fi.fromMillis(e,{zone:"UTC"}).toISOTime(t)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?wn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const e=Tn.fromDurationLike(t),n={};for(const t of yn)($t(e.values,t)||$t(this.values,t))&&(n[t]=e.get(t)+this.get(t));return _n(this,{values:n},!0)}minus(t){if(!this.isValid)return this;const e=Tn.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=se(t(this.values[n],n));return _n(this,{values:e},!0)}get(t){return this[Tn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;return _n(this,{values:{...this.values,...re(t,Tn.normalizeUnit)}})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:n,matrix:i}={}){return _n(this,{loc:this.loc.clone({locale:t,numberingSystem:e}),matrix:i,conversionAccuracy:n})}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return kn(this.matrix,t),_n(this,{values:t},!0)}rescale(){if(!this.isValid)return this;return _n(this,{values:function(t){const e={};for(const[n,i]of Object.entries(t))0!==i&&(e[n]=i);return e}(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...t){if(!this.isValid)return this;if(0===t.length)return this;t=t.map((t=>Tn.normalizeUnit(t)));const e={},n={},i=this.toObject();let s;for(const r of yn)if(t.indexOf(r)>=0){s=r;let t=0;for(const e in n)t+=this.matrix[e][r]*n[e],n[e]=0;Ft(i[r])&&(t+=i[r]);const o=Math.trunc(t);e[r]=o,n[r]=(1e3*t-1e3*o)/1e3}else Ft(i[r])&&(n[r]=i[r]);for(const t in n)0!==n[t]&&(e[s]+=t===s?n[t]:n[t]/this.matrix[s][t]);return kn(this.matrix,e),_n(this,{values:e},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const e of Object.keys(this.values))t[e]=0===this.values[e]?0:-this.values[e];return _n(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;for(const i of yn)if(e=this.values[i],n=t.values[i],!(void 0===e||0===e?void 0===n||0===n:e===n))return!1;var e,n;return!0}}const En="Invalid Interval";class Dn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the Interval is invalid");const n=t instanceof _t?t:new _t(t,e);if(bt.throwOnInvalid)throw new r(n);return new Dn({invalid:n})}static fromDateTimes(t,e){const n=gi(t),i=gi(e),s=function(t,e){return t&&t.isValid?e&&e.isValid?et}isBefore(t){return!!this.isValid&&this.e<=t}contains(t){return!!this.isValid&&(this.s<=t&&this.e>t)}set({start:t,end:e}={}){return this.isValid?Dn.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];const e=t.map(gi).filter((t=>this.contains(t))).sort(((t,e)=>t.toMillis()-e.toMillis())),n=[];let{s:i}=this,s=0;for(;i+this.e?this.e:t;n.push(Dn.fromDateTimes(i,r)),i=r,s+=1}return n}splitBy(t){const e=Tn.fromDurationLike(t);if(!this.isValid||!e.isValid||0===e.as("milliseconds"))return[];let n,{s:i}=this,s=1;const r=[];for(;it*s)));n=+t>+this.e?this.e:t,r.push(Dn.fromDateTimes(i,n)),i=n,s+=1}return r}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e)}equals(t){return!(!this.isValid||!t.isValid)&&(this.s.equals(t.s)&&this.e.equals(t.e))}intersection(t){if(!this.isValid)return this;const e=this.s>t.s?this.s:t.s,n=this.e=n?null:Dn.fromDateTimes(e,n)}union(t){if(!this.isValid)return this;const e=this.st.e?this.e:t.e;return Dn.fromDateTimes(e,n)}static merge(t){const[e,n]=t.sort(((t,e)=>t.s-e.s)).reduce((([t,e],n)=>e?e.overlaps(n)||e.abutsStart(n)?[t,e.union(n)]:[t.concat([e]),n]:[t,n]),[[],null]);return n&&e.push(n),e}static xor(t){let e=null,n=0;const i=[],s=t.map((t=>[{time:t.s,type:"s"},{time:t.e,type:"e"}])),r=Array.prototype.concat(...s).sort(((t,e)=>t.time-e.time));for(const t of r)n+="s"===t.type?1:-1,1===n?e=t.time:(e&&+e!=+t.time&&i.push(Dn.fromDateTimes(e,t.time)),e=null);return Dn.merge(i)}difference(...t){return Dn.xor([this].concat(t)).map((t=>this.intersection(t))).filter((t=>t&&!t.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:En}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=m,e={}){return this.isValid?Te.create(this.s.loc.clone(e),t).formatInterval(this):En}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:En}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:En}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:En}toFormat(t,{separator:e=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:En}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):Tn.invalid(this.invalidReason)}mapEndpoints(t){return Dn.fromDateTimes(t(this.s),t(this.e))}}class xn{static hasDST(t=bt.defaultZone){const e=fi.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return B.isValidZone(t)}static normalizeZone(t){return rt(t,bt.defaultZone)}static getStartOfWeek({locale:t=null,locObj:e=null}={}){return(e||et.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:e=null}={}){return(e||et.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:e=null}={}){return(e||et.create(t)).getWeekendDays().slice()}static months(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||et.create(e,n,s)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||et.create(e,n,s)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null}={}){return(i||et.create(e,n,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null}={}){return(i||et.create(e,n,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return et.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return et.create(e,null,"gregory").eras(t)}static features(){return{relative:qt(),localeWeek:Ht()}}}function Sn(t,e){const n=t=>t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(e)-n(t);return Math.floor(Tn.fromMillis(i).as("days"))}function On(t,e,n,i){let[s,r,o,a]=function(t,e,n){const i=[["years",(t,e)=>e.year-t.year],["quarters",(t,e)=>e.quarter-t.quarter+4*(e.year-t.year)],["months",(t,e)=>e.month-t.month+12*(e.year-t.year)],["weeks",(t,e)=>{const n=Sn(t,e);return(n-n%7)/7}],["days",Sn]],s={},r=t;let o,a;for(const[l,c]of i)n.indexOf(l)>=0&&(o=l,s[l]=c(t,e),a=r.plus(s),a>e?(s[l]--,(t=r.plus(s))>e&&(a=t,s[l]--,t=r.plus(s))):t=a);return[t,s,a,o]}(t,e,n);const l=e-s,c=n.filter((t=>["hours","minutes","seconds","milliseconds"].indexOf(t)>=0));0===c.length&&(o0?Tn.fromMillis(l,i).shiftTo(...c).plus(u):u}function Ln(t,e=(t=>t)){return{regex:t,deser:([t])=>e(function(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n=n&&i<=s&&(e+=i-n)}}return parseInt(e,10)}return e}(t))}}const Cn=`[ ${String.fromCharCode(160)}]`,Mn=new RegExp(Cn,"g");function An(t){return t.replace(/\./g,"\\.?").replace(Mn,Cn)}function In(t){return t.replace(/\./g,"").replace(Mn," ").toLowerCase()}function Nn(t,e){return null===t?null:{regex:RegExp(t.map(An).join("|")),deser:([n])=>t.findIndex((t=>In(n)===In(t)))+e}}function Pn(t,e){return{regex:t,deser:([,t,e])=>ie(t,e),groups:e}}function Fn(t){return{regex:t,deser:([t])=>t}}const jn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let qn=null;function Hn(t,e){return Array.prototype.concat(...t.map((t=>function(t,e){if(t.literal)return t;const n=Bn(Te.macroTokenToFormatOpts(t.val),e);return null==n||n.includes(void 0)?t:n}(t,e))))}class Vn{constructor(t,e){if(this.locale=t,this.format=e,this.tokens=Hn(Te.parseFormat(e),t),this.units=this.tokens.map((e=>function(t,e){const n=ut(e),i=ut(e,"{2}"),s=ut(e,"{3}"),r=ut(e,"{4}"),o=ut(e,"{6}"),a=ut(e,"{1,2}"),l=ut(e,"{1,3}"),c=ut(e,"{1,6}"),u=ut(e,"{1,9}"),d=ut(e,"{2,4}"),h=ut(e,"{4,6}"),p=t=>{return{regex:RegExp((e=t.val,e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([t])=>t,literal:!0};var e},m=(m=>{if(t.literal)return p(m);switch(m.val){case"G":return Nn(e.eras("short"),0);case"GG":return Nn(e.eras("long"),0);case"y":return Ln(c);case"yy":case"kk":return Ln(d,ee);case"yyyy":case"kkkk":return Ln(r);case"yyyyy":return Ln(h);case"yyyyyy":return Ln(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Ln(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Ln(i);case"MMM":return Nn(e.months("short",!0),1);case"MMMM":return Nn(e.months("long",!0),1);case"LLL":return Nn(e.months("short",!1),1);case"LLLL":return Nn(e.months("long",!1),1);case"o":case"S":return Ln(l);case"ooo":case"SSS":return Ln(s);case"u":return Fn(u);case"uu":return Fn(a);case"uuu":case"E":case"c":return Ln(n);case"a":return Nn(e.meridiems(),0);case"EEE":return Nn(e.weekdays("short",!1),1);case"EEEE":return Nn(e.weekdays("long",!1),1);case"ccc":return Nn(e.weekdays("short",!0),1);case"cccc":return Nn(e.weekdays("long",!0),1);case"Z":case"ZZ":return Pn(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return Pn(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return Fn(/[a-z_+-/]{1,256}?/i);case" ":return Fn(/[^\S\n\r]/);default:return p(m)}})(t)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return m.token=t,m}(e,t))),this.disqualifyingUnit=this.units.find((t=>t.invalidReason)),!this.disqualifyingUnit){const[t,e]=[`^${(n=this.units).map((t=>t.regex)).reduce(((t,e)=>`${t}(${e.source})`),"")}$`,n];this.regex=RegExp(t,"i"),this.handlers=e}var n}explainFromTokens(t){if(this.isValid){const[e,n]=function(t,e,n){const i=t.match(e);if(i){const t={};let e=1;for(const s in n)if($t(n,s)){const r=n[s],o=r.groups?r.groups+1:1;!r.literal&&r.token&&(t[r.token.val[0]]=r.deser(i.slice(e,e+o))),e+=o}return[i,t]}return[i,{}]}(t,this.regex,this.handlers),[i,s,r]=n?function(t){let e,n=null;return Pt(t.z)||(n=B.create(t.z)),Pt(t.Z)||(n||(n=new it(t.Z)),e=t.Z),Pt(t.q)||(t.M=3*(t.q-1)+1),Pt(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),Pt(t.u)||(t.S=Ut(t.u)),[Object.keys(t).reduce(((e,n)=>{const i=(t=>{switch(t){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return i&&(e[i]=t[n]),e}),{}),n,e]}(n):[null,null,void 0];if($t(n,"a")&&$t(n,"H"))throw new a("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:e,matches:n,result:i,zone:s,specificOffset:r}}return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function $n(t,e,n){return new Vn(t,n).explainFromTokens(e)}function Bn(t,e){if(!t)return null;const n=Te.create(e,t).dtFormatter((qn||(qn=fi.fromMillis(1555555555555)),qn)),i=n.formatToParts(),s=n.resolvedOptions();return i.map((e=>function(t,e,n){const{type:i,value:s}=t;if("literal"===i){const t=/^\s+$/.test(s);return{literal:!t,val:t?" ":s}}const r=e[i];let o=i;"hour"===i&&(o=null!=e.hour12?e.hour12?"hour12":"hour24":null!=e.hourCycle?"h11"===e.hourCycle||"h12"===e.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let a=jn[o];if("object"==typeof a&&(a=a[r]),a)return{literal:!1,val:a}}(e,t,s)))}const Rn="Invalid DateTime",Wn=864e13;function zn(t){return new _t("unsupported zone",`the zone "${t.name}" is not supported`)}function Yn(t){return null===t.weekData&&(t.weekData=Ot(t.c)),t.weekData}function Un(t){return null===t.localWeekData&&(t.localWeekData=Ot(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Zn(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new fi({...n,...e,old:n})}function Kn(t,e,n){let i=t-60*e*1e3;const s=n.offset(i);if(e===s)return[i,e];i-=60*(s-e)*1e3;const r=n.offset(i);return s===r?[i,s]:[t-60*Math.min(s,r)*1e3,Math.max(s,r)]}function Jn(t,e){const n=new Date(t+=60*e*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Gn(t,e,n){return Kn(Qt(t),e,n)}function Qn(t,e){const n=t.o,i=t.c.year+Math.trunc(e.years),s=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),r={...t.c,year:i,month:s,day:Math.min(t.c.day,Gt(i,s))+Math.trunc(e.days)+7*Math.trunc(e.weeks)},o=Tn.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=Qt(r);let[l,c]=Kn(a,n,t.zone);return 0!==o&&(l+=o,c=t.zone.offset(l)),{ts:l,o:c}}function Xn(t,e,n,i,s,r){const{setZone:o,zone:a}=n;if(t&&0!==Object.keys(t).length||e){const i=e||a,s=fi.fromObject(t,{...n,zone:i,specificOffset:r});return o?s:s.setZone(a)}return fi.invalid(new _t("unparsable",`the input "${s}" can't be parsed as ${i}`))}function ti(t,e,n=!0){return t.isValid?Te.create(et.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function ei(t,e){const n=t.c.year>9999||t.c.year<0;let i="";return n&&t.c.year>=0&&(i+="+"),i+=Wt(t.c.year,n?6:4),e?(i+="-",i+=Wt(t.c.month),i+="-",i+=Wt(t.c.day)):(i+=Wt(t.c.month),i+=Wt(t.c.day)),i}function ni(t,e,n,i,s,r){let o=Wt(t.c.hour);return e?(o+=":",o+=Wt(t.c.minute),0===t.c.millisecond&&0===t.c.second&&n||(o+=":")):o+=Wt(t.c.minute),0===t.c.millisecond&&0===t.c.second&&n||(o+=Wt(t.c.second),0===t.c.millisecond&&i||(o+=".",o+=Wt(t.c.millisecond,3))),s&&(t.isOffsetFixed&&0===t.offset&&!r?o+="Z":t.o<0?(o+="-",o+=Wt(Math.trunc(-t.o/60)),o+=":",o+=Wt(Math.trunc(-t.o%60))):(o+="+",o+=Wt(Math.trunc(t.o/60)),o+=":",o+=Wt(Math.trunc(t.o%60)))),r&&(o+="["+t.zone.ianaName+"]"),o}const ii={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},si={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ri={ordinal:1,hour:0,minute:0,second:0,millisecond:0},oi=["year","month","day","hour","minute","second","millisecond"],ai=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],li=["year","ordinal","hour","minute","second","millisecond"];function ci(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return function(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new l(t);return e}(t)}}function ui(t,e){const n=rt(e.zone,bt.defaultZone);if(!n.isValid)return fi.invalid(zn(n));const i=et.fromObject(e);let s,r;if(Pt(t.year))s=bt.now();else{for(const e of oi)Pt(t[e])&&(t[e]=ii[e]);const e=It(t)||Nt(t);if(e)return fi.invalid(e);const i=function(t){return mi[t]||(void 0===pi&&(pi=bt.now()),mi[t]=t.offset(pi)),mi[t]}(n);[s,r]=Gn(t,i,n)}return new fi({ts:s,zone:n,loc:i,o:r})}function di(t,e,n){const i=!!Pt(n.round)||n.round,s=(t,s)=>{t=Zt(t,i||n.calendary?0:2,!0);return e.loc.clone(n).relFormatter(n).format(t,s)},r=i=>n.calendary?e.hasSame(t,i)?0:e.startOf(i).diff(t.startOf(i),i).get(i):e.diff(t,i).get(i);if(n.unit)return s(r(n.unit),n.unit);for(const t of n.units){const e=r(t);if(Math.abs(e)>=1)return s(e,t)}return s(t>e?-0:0,n.units[n.units.length-1])}function hi(t){let e,n={};return t.length>0&&"object"==typeof t[t.length-1]?(n=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[n,e]}let pi,mi={};class fi{constructor(t){const e=t.zone||bt.defaultZone;let n=t.invalid||(Number.isNaN(t.ts)?new _t("invalid input"):null)||(e.isValid?null:zn(e));this.ts=Pt(t.ts)?bt.now():t.ts;let i=null,s=null;if(!n){if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[i,s]=[t.old.c,t.old.o];else{const r=Ft(t.o)&&!t.old?t.o:e.offset(this.ts);i=Jn(this.ts,r),n=Number.isNaN(i.year)?new _t("invalid input"):null,i=n?null:i,s=n?null:r}}this._zone=e,this.loc=t.loc||et.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}static now(){return new fi({})}static local(){const[t,e]=hi(arguments),[n,i,s,r,o,a,l]=e;return ui({year:n,month:i,day:s,hour:r,minute:o,second:a,millisecond:l},t)}static utc(){const[t,e]=hi(arguments),[n,i,s,r,o,a,l]=e;return t.zone=it.utcInstance,ui({year:n,month:i,day:s,hour:r,minute:o,second:a,millisecond:l},t)}static fromJSDate(t,e={}){const n=(i=t,"[object Date]"===Object.prototype.toString.call(i)?t.valueOf():NaN);var i;if(Number.isNaN(n))return fi.invalid("invalid input");const s=rt(e.zone,bt.defaultZone);return s.isValid?new fi({ts:n,zone:s,loc:et.fromObject(e)}):fi.invalid(zn(s))}static fromMillis(t,e={}){if(Ft(t))return t<-Wn||t>Wn?fi.invalid("Timestamp out of range"):new fi({ts:t,zone:rt(e.zone,bt.defaultZone),loc:et.fromObject(e)});throw new c(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(Ft(t))return new fi({ts:1e3*t,zone:rt(e.zone,bt.defaultZone),loc:et.fromObject(e)});throw new c("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};const n=rt(e.zone,bt.defaultZone);if(!n.isValid)return fi.invalid(zn(n));const i=et.fromObject(e),s=re(t,ci),{minDaysInFirstWeek:r,startOfWeek:o}=At(s,i),l=bt.now(),c=Pt(e.specificOffset)?n.offset(l):e.specificOffset,u=!Pt(s.ordinal),d=!Pt(s.year),h=!Pt(s.month)||!Pt(s.day),p=d||h,m=s.weekYear||s.weekNumber;if((p||u)&&m)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new a("Can't mix ordinal dates with month/day");const f=m||s.weekday&&!p;let g,v,y=Jn(l,c);f?(g=ai,v=si,y=Ot(y,r,o)):u?(g=li,v=ri,y=Ct(y)):(g=oi,v=ii);let b=!1;for(const t of g){Pt(s[t])?s[t]=b?v[t]:y[t]:b=!0}const _=f?function(t,e=4,n=1){const i=jt(t.weekYear),s=Rt(t.weekNumber,1,te(t.weekYear,e,n)),r=Rt(t.weekday,1,7);return i?s?!r&&Tt("weekday",t.weekday):Tt("week",t.weekNumber):Tt("weekYear",t.weekYear)}(s,r,o):u?function(t){const e=jt(t.year),n=Rt(t.ordinal,1,Jt(t.year));return e?!n&&Tt("ordinal",t.ordinal):Tt("year",t.year)}(s):It(s),w=_||Nt(s);if(w)return fi.invalid(w);const k=f?Lt(s,r,o):u?Mt(s):s,[T,E]=Gn(k,c,n),D=new fi({ts:T,zone:n,o:E,loc:i});return s.weekday&&p&&t.weekday!==D.weekday?fi.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${D.toISO()}`):D.isValid?D:fi.invalid(D.invalid)}static fromISO(t,e={}){const[n,i]=function(t){return Se(t,[Xe,sn],[tn,rn],[en,on],[nn,an])}(t);return Xn(n,i,e,"ISO 8601",t)}static fromRFC2822(t,e={}){const[n,i]=function(t){return Se(function(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[Ye,Ue])}(t);return Xn(n,i,e,"RFC 2822",t)}static fromHTTP(t,e={}){const[n,i]=function(t){return Se(t,[Ze,Ge],[Ke,Ge],[Je,Qe])}(t);return Xn(n,i,e,"HTTP",e)}static fromFormat(t,e,n={}){if(Pt(t)||Pt(e))throw new c("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:s=null}=n,r=et.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),[o,a,l,u]=function(t,e,n){const{result:i,zone:s,specificOffset:r,invalidReason:o}=$n(t,e,n);return[i,s,r,o]}(r,t,e);return u?fi.invalid(u):Xn(o,a,n,`format ${e}`,t,l)}static fromString(t,e,n={}){return fi.fromFormat(t,e,n)}static fromSQL(t,e={}){const[n,i]=function(t){return Se(t,[cn,sn],[un,dn])}(t);return Xn(n,i,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the DateTime is invalid");const n=t instanceof _t?t:new _t(t,e);if(bt.throwOnInvalid)throw new s(n);return new fi({invalid:n})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,e={}){const n=Bn(t,et.fromObject(e));return n?n.map((t=>t?t.val:null)).join(""):null}static expandFormat(t,e={}){return Hn(Te.parseFormat(t),et.fromObject(e)).map((t=>t.val)).join("")}static resetCache(){pi=void 0,mi={}}get(t){return this[t]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Yn(this).weekYear:NaN}get weekNumber(){return this.isValid?Yn(this).weekNumber:NaN}get weekday(){return this.isValid?Yn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Un(this).weekday:NaN}get localWeekNumber(){return this.isValid?Un(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Un(this).weekYear:NaN}get ordinal(){return this.isValid?Ct(this.c).ordinal:NaN}get monthShort(){return this.isValid?xn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?xn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?xn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?xn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,e=6e4,n=Qt(this.c),i=this.zone.offset(n-t),s=this.zone.offset(n+t),r=this.zone.offset(n-i*e),o=this.zone.offset(n-s*e);if(r===o)return[this];const a=n-r*e,l=n-o*e,c=Jn(a,r),u=Jn(l,o);return c.hour===u.hour&&c.minute===u.minute&&c.second===u.second&&c.millisecond===u.millisecond?[Zn(this,{ts:a}),Zn(this,{ts:l})]:[this]}get isInLeapYear(){return Kt(this.year)}get daysInMonth(){return Gt(this.year,this.month)}get daysInYear(){return this.isValid?Jt(this.year):NaN}get weeksInWeekYear(){return this.isValid?te(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?te(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:e,numberingSystem:n,calendar:i}=Te.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:n,outputCalendar:i}}toUTC(t=0,e={}){return this.setZone(it.instance(t),e)}toLocal(){return this.setZone(bt.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:n=!1}={}){if((t=rt(t,bt.defaultZone)).equals(this.zone))return this;if(t.isValid){let i=this.ts;if(e||n){const e=t.offset(this.ts),n=this.toObject();[i]=Gn(n,e,t)}return Zn(this,{ts:i,zone:t})}return fi.invalid(zn(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:n}={}){return Zn(this,{loc:this.loc.clone({locale:t,numberingSystem:e,outputCalendar:n})})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const e=re(t,ci),{minDaysInFirstWeek:n,startOfWeek:i}=At(e,this.loc),s=!Pt(e.weekYear)||!Pt(e.weekNumber)||!Pt(e.weekday),r=!Pt(e.ordinal),o=!Pt(e.year),l=!Pt(e.month)||!Pt(e.day),c=o||l,u=e.weekYear||e.weekNumber;if((c||r)&&u)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new a("Can't mix ordinal dates with month/day");let d;s?d=Lt({...Ot(this.c,n,i),...e},n,i):Pt(e.ordinal)?(d={...this.toObject(),...e},Pt(e.day)&&(d.day=Math.min(Gt(d.year,d.month),d.day))):d=Mt({...Ct(this.c),...e});const[h,p]=Gn(d,this.o,this.zone);return Zn(this,{ts:h,o:p})}plus(t){if(!this.isValid)return this;return Zn(this,Qn(this,Tn.fromDurationLike(t)))}minus(t){if(!this.isValid)return this;return Zn(this,Qn(this,Tn.fromDurationLike(t).negate()))}startOf(t,{useLocaleWeeks:e=!1}={}){if(!this.isValid)return this;const n={},i=Tn.normalizeUnit(t);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===i)if(e){const t=this.loc.getStartOfWeek(),{weekday:e}=this;ethis.valueOf(),o=On(r?this:t,r?t:this,s,i);var a;return r?o.negate():o}diffNow(t="milliseconds",e={}){return this.diff(fi.now(),t,e)}until(t){return this.isValid?Dn.fromDateTimes(this,t):this}hasSame(t,e,n){if(!this.isValid)return!1;const i=t.valueOf(),s=this.setZone(t.zone,{keepLocalTime:!0});return s.startOf(e,n)<=i&&i<=s.endOf(e,n)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const e=t.base||fi.fromObject({},{zone:this.zone}),n=t.padding?thist.valueOf()),Math.min)}static max(...t){if(!t.every(fi.isDateTime))throw new c("max requires all arguments be DateTimes");return Vt(t,(t=>t.valueOf()),Math.max)}static fromFormatExplain(t,e,n={}){const{locale:i=null,numberingSystem:s=null}=n;return $n(et.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),t,e)}static fromStringExplain(t,e,n={}){return fi.fromFormatExplain(t,e,n)}static buildFormatParser(t,e={}){const{locale:n=null,numberingSystem:i=null}=e,s=et.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new Vn(s,t)}static fromFormatParser(t,e,n={}){if(Pt(t)||Pt(e))throw new c("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:s=null}=n,r=et.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});if(!r.equals(e.locale))throw new c(`fromFormatParser called with a locale of ${r}, but the format parser was created for ${e.locale}`);const{result:o,zone:a,specificOffset:l,invalidReason:u}=e.explainFromTokens(t);return u?fi.invalid(u):Xn(o,a,n,`format ${e.format}`,t,l)}static get DATE_SHORT(){return m}static get DATE_MED(){return f}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return v}static get DATE_HUGE(){return y}static get TIME_SIMPLE(){return b}static get TIME_WITH_SECONDS(){return _}static get TIME_WITH_SHORT_OFFSET(){return w}static get TIME_WITH_LONG_OFFSET(){return k}static get TIME_24_SIMPLE(){return T}static get TIME_24_WITH_SECONDS(){return E}static get TIME_24_WITH_SHORT_OFFSET(){return D}static get TIME_24_WITH_LONG_OFFSET(){return x}static get DATETIME_SHORT(){return S}static get DATETIME_SHORT_WITH_SECONDS(){return O}static get DATETIME_MED(){return L}static get DATETIME_MED_WITH_SECONDS(){return C}static get DATETIME_MED_WITH_WEEKDAY(){return M}static get DATETIME_FULL(){return A}static get DATETIME_FULL_WITH_SECONDS(){return I}static get DATETIME_HUGE(){return N}static get DATETIME_HUGE_WITH_SECONDS(){return P}}function gi(t){if(fi.isDateTime(t))return t;if(t&&t.valueOf&&Ft(t.valueOf()))return fi.fromJSDate(t);if(t&&"object"==typeof t)return fi.fromObject(t);throw new c(`Unknown datetime argument: ${t}, of type ${typeof t}`)}}},function(t){var e;e=4028,t(t.s=e)}]);
\ No newline at end of file
diff --git a/public/build/app.e10c6f94.js b/public/build/app.e10c6f94.js
new file mode 100644
index 00000000..ca2746de
--- /dev/null
+++ b/public/build/app.e10c6f94.js
@@ -0,0 +1,2 @@
+/*! For license information please see app.e10c6f94.js.LICENSE.txt */
+(self.webpackChunkkimai=self.webpackChunkkimai||[]).push([[524],{4028:function(t,e,n){n(4975),n(4942),n.g.KimaiPaginatedBoxWidget=n(4100).A,n.g.KimaiReloadPageWidget=n(5170).A,n.g.KimaiColor=n(9997).A,n.g.KimaiStorage=n(5247).A},4942:function(t,e,n){"use strict";var i=n(6285);class s{constructor(t){this._translations=t}get(t){return this._translations[t]}has(t){return t in this._translations}}class r{constructor(t){this._configurations=t}get(t){return this._configurations[t]}has(t){return t in this._configurations}isRTL(){return"rtl"===this.get("direction")}getLanguage(){return this.get("locale").replace("_","-")}is24Hours(){return!!this.get("twentyFourHours")}getFirstDayOfWeek(t=!0){void 0===t&&(t=!0);let e=this.get("first_dow_iso");return t||(e%=7),e}}class o{init(){}getId(){return null}setContainer(t){if(!(t instanceof a))throw new Error("Plugin was given an invalid KimaiContainer");this._core=t}getContainer(){return this._core}getConfiguration(t){return this.getContainer().getConfiguration().get(t)}getConfigurations(){return this.getContainer().getConfiguration()}getDateUtils(){return this.getPlugin("date")}getPlugin(t){return this.getContainer().getPlugin(t)}getTranslation(){return this.getContainer().getTranslation()}translate(t){return this.getTranslation().get(t)}escape(t){return this.getPlugin("escape").escapeForHtml(t)}trigger(t,e=null){this.getPlugin("event").trigger(t,e)}fetch(t,e={}){return this.getPlugin("fetch").fetch(t,e)}fetchForm(t,e={},n=null){n=n||t.getAttribute("action");const i=t.getAttribute("method").toUpperCase();if("GET"===i){const i=this.getPlugin("form").convertFormDataToQueryString(t,{},!0);n=n+(n.includes("?")?"&":"?")+i,e={method:"GET",...e}}else"POST"===i&&(e={method:"POST",body:new FormData(t),...e});return this.fetch(n,e)}isMobile(){return Math.max(document.documentElement.clientWidth,window.innerWidth||0)<576}}class a{constructor(t,e){if(!(t instanceof r))throw new Error("Configuration needs to a KimaiConfiguration instance");if(this._configuration=t,!(e instanceof s))throw new Error("Configuration needs to a KimaiTranslation instance");this._translation=e,this._plugins=[]}registerPlugin(t){if(!(t instanceof o))throw new Error("Invalid plugin given, needs to be a KimaiPlugin instance");return t.setContainer(this),this._plugins.push(t),t}getPlugin(t){for(let e of this._plugins)if(null!==e.getId()&&e.getId()===t)return e;throw new Error("Unknown plugin: "+t)}getPlugins(){return this._plugins}getTranslation(){return this._translation}getConfiguration(){return this._configuration}getUser(){return this.getPlugin("user")}}class l extends o{constructor(t){super(),this.dataAttribute=t}getId(){return"datatable-column-visibility"}init(){let t=document.querySelector("["+this.dataAttribute+"]");if(null!==t){this._id=t.getAttribute(this.dataAttribute),this._modal=document.getElementById("modal_"+this._id),this._modal.addEventListener("show.bs.modal",(()=>{this._evaluateCheckboxes()})),this._modal.querySelector("button[data-type=save]").addEventListener("click",(()=>{this._saveVisibility()})),this._modal.querySelector("button[data-type=reset]").addEventListener("click",(t=>{this._resetVisibility(t.currentTarget)})),this._modal.querySelectorAll("input[name=datatable_profile]").forEach((t=>{t.addEventListener("change",(()=>{const e=this._modal.getElementsByTagName("form")[0];this.fetchForm(e,{},t.getAttribute("data-href")).then((()=>{localStorage.setItem("kimai_profile",t.getAttribute("value")),document.location.reload()})).catch((()=>{e.setAttribute("action",t.getAttribute("data-href")),e.submit()}))}))}));for(let t of this._modal.querySelectorAll("form input[type=checkbox]"))t.addEventListener("change",(()=>{this._changeVisibility(t.getAttribute("name"),t.checked)}))}}_evaluateCheckboxes(){const t=this._modal.getElementsByTagName("form")[0],e=document.getElementsByClassName("datatable_"+this._id)[0];for(let n of e.getElementsByTagName("th")){const e=n.getAttribute("data-field");if(null===e)continue;const i=t.querySelector("input[name="+e+"]");null!==i&&(i.checked="none"!==window.getComputedStyle(n).display)}}_saveVisibility(){const t=this._modal.getElementsByTagName("form")[0];this.fetchForm(t).then((()=>{document.location.reload()})).catch((()=>{t.submit()}))}_resetVisibility(t){const e=this._modal.getElementsByTagName("form")[0];this.fetchForm(e,{},t.getAttribute("formaction")).then((()=>{document.location.reload()})).catch((()=>{e.setAttribute("action",t.getAttribute("formaction")),e.submit()}))}_changeVisibility(t,e){for(const n of document.getElementsByClassName("datatable_"+this._id)){let i=null;for(let s of n.getElementsByClassName("col_"+t)){if(null===i){let t="-none",n="d-table-cell";e||(t="-table-cell",n="d-none"),i="",s.classList.forEach((function(e,n,s){-1===e.indexOf(t)&&(i+=" "+e)})),-1===i.indexOf(n)&&(i+=" "+n)}s.className=i}}}}var c=n(9336);class u extends o{init(){[].slice.call(document.querySelectorAll('[data-toggle="tooltip"]')).map((function(t){return new c.m_(t)}));[...document.querySelectorAll(".offcanvas")].map((t=>new c.go(t)));this.getContainer().getPlugin("form").activateForm("div.page-wrapper form"),this._registerModalAutofocus("#remote_form_modal"),this.overlay=null,document.addEventListener("kimai.reloadContent",(t=>{if(null!==this.overlay)return;let e="body";void 0!==t.detail&&null!==t.detail&&(e=t.detail);const n=document.createElement("div");n.innerHTML='',this.overlay=n.firstElementChild,document.querySelector(e).append(this.overlay)})),document.addEventListener("kimai.reloadedContent",(()=>{null!==this.overlay&&(this.overlay.remove(),this.overlay=null)}))}_registerModalAutofocus(t){if(this.isMobile())return;const e=document.querySelector(t);null!==e&&e.addEventListener("shown.bs.modal",(()=>{const t=e.querySelector("form");let n=t.querySelectorAll("[autofocus]");n.length<1&&(n=t.querySelectorAll("input[type=text],input[type=date],textarea,select")),n.length>0&&n[0].focus()}))}}var d=n(424);n(8214);class h extends o{supportsForm(t){return!1}activateForm(t){}destroyForm(t){}}class p extends h{constructor(t){super(),this._selector=t}init(){window.disableLitepickerStyles=!0,this._pickers=[]}supportsForm(t){return!0}activateForm(t){const e=this.getConfigurations().getFirstDayOfWeek(!1),n=this.getConfigurations().getLanguage();let i={buttonText:{previousMonth:'',nextMonth:'',apply:this.translate("confirm"),cancel:this.translate("cancel")}};const s=[].slice.call(t.querySelectorAll(this._selector)).map((t=>(void 0===t.dataset.format&&console.log("Trying to bind litepicker to an element without data-format attribute"),void 0!==t.hasAttribute("min")&&(i={...i,minDate:t.getAttribute("min")}),void 0!==t.hasAttribute("max")&&(i={...i,maxDate:t.getAttribute("max")}),i={...i,format:t.dataset.format,showTooltip:!1,element:t,lang:n,autoRefresh:!0,firstDay:e,setup:e=>{e.on("preselect",((t,n)=>{e._wasPreselected=!0})),e.on("selected",((n,i)=>{void 0!==e._wasPreselected&&(t.dispatchEvent(new Event("change",{bubbles:!0})),delete e._wasPreselected)})),void 0!==e.backdrop&&document.body.appendChild(e.backdrop)}},[t,new d.Litepicker(this.prepareOptions(i))])));this._pickers=this._pickers.concat(s)}prepareOptions(t){return{...t,plugins:["mobilefriendly"]}}destroyForm(t){[].slice.call(t.querySelectorAll(this._selector)).map((t=>{for(let e=0;e{this.reloadDatatable()};for(let t of e.split(" "))document.addEventListener(t,n);document.addEventListener("pagination-change",n),document.addEventListener("filter-change",n)}registerContextMenu(t){f.A.createForDataTable(t)}reloadDatatable(){const t=this.getContainer().getPlugin("toolbar").getSelector(),e=document.querySelector(t),n=t=>{const e=document.createElement("div");e.innerHTML=t;const n=e.querySelector(this._contentArea);document.querySelector(this._contentArea).replaceWith(n),this.registerContextMenu(this._selector),document.dispatchEvent(new Event("kimai.reloadedContent"))};document.dispatchEvent(new CustomEvent("kimai.reloadContent",{detail:this._contentArea})),null!==e?this.fetchForm(e).then((t=>{t.text().then(n)})).catch((()=>{e.submit()})):this.fetch(document.location).then((t=>{t.text().then(n)})).catch((()=>{document.location.reload()}))}}class v extends o{constructor(t,e){super(),this._formSelector=t,this._actionClass=e}getId(){return"toolbar"}init(){const t=this.getSelector();this._registerPagination(t),this._registerSortableTables(t),this._registerAlternativeSubmitActions(t,this._actionClass),[].slice.call(document.querySelectorAll(t+" input")).map((e=>{e.addEventListener("change",(e=>{switch(e.target.id){case"order":case"orderBy":case"page":break;default:document.querySelector(t+" input#page").value=1}})),this.triggerChange()})),[].slice.call(document.querySelectorAll(t+" select")).map((e=>{e.addEventListener("change",(e=>{let n=!0;switch(e.target.id){case"customer":null!==document.querySelector(t+" select#project")&&(n=!1);break;case"project":null!==document.querySelector(t+" select#activity")&&(n=!1)}document.querySelector(t+" input#page").value=1,n&&this.triggerChange()}))}))}_registerAlternativeSubmitActions(t,e){document.addEventListener("click",(function(n){let i=n.target;for(;null!==i&&"function"==typeof i.matches&&!i.matches("body");){if(i.classList.contains(e)){const e=document.querySelector(t);if(null===e)return;const s=e.getAttribute("action"),r=e.getAttribute("method");void 0!==i.dataset.target&&(e.target=i.dataset.target),e.action=i.href,void 0!==i.dataset.method&&(e.method=i.dataset.method),e.submit(),e.target="",e.action=s,e.method=r,n.preventDefault(),n.stopPropagation()}i=i.parentNode}}))}_registerSortableTables(t){document.body.addEventListener("click",(e=>{if(!e.target.matches("th.sortable"))return;let n="DESC",i=e.target.dataset.order;e.target.classList.contains("sorting_desc")&&(n="ASC"),document.querySelector(t+" #orderBy").value=i,document.querySelector(t+" #order").value=n,document.querySelector(t+" #orderBy").dispatchEvent(new Event("change")),document.querySelector(t+" #order").dispatchEvent(new Event("change")),document.dispatchEvent(new Event("filter-change"))}))}_registerPagination(t){document.body.addEventListener("click",(e=>{if(!(e.target.matches("ul.pagination li a")||null!==e.target.parentNode&&e.target.parentNode.matches("ul.pagination li a")))return;let n=document.querySelector(t+" input#page");if(null===n)return;let i=e.target;i.matches("a")||(i=i.parentNode),e.preventDefault(),e.stopPropagation();let s=i.href.split("/"),r=s[s.length-1];return/\d/.test(r)||(r=1),n.value=r,n.dispatchEvent(new Event("change")),document.dispatchEvent(new Event("pagination-change")),!1}))}triggerChange(){document.dispatchEvent(new Event("toolbar-change"))}getSelector(){return this._formSelector}}class y extends o{getId(){return"api"}_headers(){const t=new Headers;return t.append("Content-Type","application/json"),t}get(t,e,n,i){if(void 0!==e){const n=new URLSearchParams(e).toString();""!==n&&(t=t+(t.includes("?")?"&":"?")+n)}void 0===i&&(i=t=>{this.handleError("An error occurred",t)}),this.fetch(t,{method:"GET",headers:this._headers()}).then((t=>{t.json().then((t=>{n(t)}))})).catch((t=>{i(t)}))}post(t,e,n,i){void 0===i&&(i=t=>{this.handleError("action.update.error",t)}),this.fetch(t,{method:"POST",body:this._parseData(e),headers:this._headers()}).then((t=>{t.json().then((t=>{n(t)}))})).catch((t=>{i(t)}))}patch(t,e,n,i){void 0===i&&(i=t=>{this.handleError("action.update.error",t)}),this.fetch(t,{method:"PATCH",body:this._parseData(e),headers:this._headers()}).then((t=>{204===t.statusCode?n():t.json().then((t=>{n(t)}))})).catch((t=>{i(t)}))}delete(t,e,n){void 0===n&&(n=t=>{this.handleError("action.delete.error",t)}),this.fetch(t,{method:"DELETE",headers:this._headers()}).then((()=>{e()})).catch((t=>{n(t)}))}_parseData(t){return"object"==typeof t?JSON.stringify(t):t}handleError(t,e){if(void 0===e.headers)return;const n=e.headers.get("content-type");n&&-1!==n.indexOf("application/json")?e.json().then((n=>{let i=n.message;if(400===e.status&&n.errors){let t=[""+i+""];if(n.errors.errors)for(let e of n.errors.errors)t.push(e);if(n.errors.children)for(let e in n.errors.children){let i=n.errors.children[e];if(void 0!==i.errors&&i.errors.length>0)for(let e of i.errors)t.push(e)}t.length>0&&(i=t)}this.getPlugin("alert").error(t,i)})):e.text().then((()=>{const n="["+e.statusCode+"] "+e.statusText;this.getPlugin("alert").error(t,n)}))}}class b extends o{addClickHandler(t,e,n){document.body.addEventListener("click",(i=>{let s=i.target;for(;null!==s;){const e=s.tagName.toUpperCase();if("BODY"===e)return;if(s.matches(t))break;if("A"===e||"BUTTON"===e||"INPUT"===e||"LABEL"===e)return;for(let t of n)if(s.matches(t))return;s=s.parentNode}if(null===s)return;if(s.isContentEditable||s.parentNode.isContentEditable)return;if(!s.matches(t))return;for(let t of n)if(s.matches(t))return;i.preventDefault(),i.stopPropagation();let r=s.dataset.href;null==r&&(r=s.href),null!=r&&""!==r&&e(r)}))}}class _ extends b{constructor(t){super(),this._selector=t}init(){this.addClickHandler(this._selector,(function(t){window.location=t}),[])}}class w extends b{constructor(t,e){super(),this._selector=t,this._stopSelector=e}getId(){return"modal"}init(){this._isDirty=!1;const t=this._getModalElement();null!==t&&(t.addEventListener("hide.bs.modal",(e=>{if(this._isDirty){if(null===t.querySelector(".modal-body .remote_modal_is_dirty_warning")){const e=this.translate("modal.dirty"),n=document.createElement("div");n.innerHTML=''+e+"
",t.querySelector(".modal-body").prepend(n.firstElementChild)}e.preventDefault()}else this._isDirty=!1,document.dispatchEvent(new Event("modal-hide"))})),t.addEventListener("hidden.bs.modal",(()=>{this.getContainer().getPlugin("form").destroyForm(this._getFormIdentifier()),t.querySelector(".modal-body").replaceWith("")})),t.addEventListener("show.bs.modal",(()=>{document.dispatchEvent(new Event("modal-show"))})),this.addClickHandler(this._selector,(t=>{this.openUrlInModal(t)}),this._stopSelector))}_getModal(){return c.aF.getOrCreateInstance(this._getModalElement())}openUrlInModal(t,e){const n=new Headers;n.append("X-Requested-With","Kimai-Modal"),this.fetch(t,{method:"GET",redirect:"follow",headers:n}).then((e=>{if(e.ok)return e.text().then((t=>{this._openFormInModal(t)}));window.location=t})).catch((n=>{null==e?window.location=t:e(n)}))}_getFormIdentifier(){return"#remote_form_modal .modal-content form"}_getModalElement(){return document.getElementById("remote_form_modal")}_makeScriptExecutable(t){if(void 0!==t.tagName&&"SCRIPT"===t.tagName){const e=document.createElement("script");e.text=t.innerHTML,t.parentNode.replaceChild(e,t)}else for(const e of t.childNodes)this._makeScriptExecutable(e);return t}_openFormInModal(t){const e=this._getFormIdentifier();let n=this._getModalElement();const i=document.createElement("div");i.innerHTML=t;const s=this._makeScriptExecutable(i.querySelector("#form_modal .modal-content"));if(null!==s){let t=n.querySelector(".modal-dialog"),r=i.querySelector(".modal-dialog").classList.contains("modal-lg");r&&!t.classList.contains("modal-lg")&&t.classList.toggle("modal-lg"),!r&&t.classList.contains("modal-lg")&&t.classList.toggle("modal-lg"),n.querySelector(".modal-content").replaceWith(s),[].slice.call(n.querySelectorAll('[data-bs-dismiss="modal"]')).map((t=>{t.addEventListener("click",(()=>{this._isDirty=!1,this._getModal().hide()}))})),this.getContainer().getPlugin("form").activateForm(e)}let r=i.querySelector("div.alert");null!==r&&n.querySelector(".modal-body").prepend(r);const o=document.querySelector(e);o.addEventListener("change",(()=>{this._isDirty=!0})),o.addEventListener("submit",this._getEventHandler()),this._getModal().show()}_getEventHandler(){return void 0===this.eventHandler&&(this.eventHandler=t=>{const e=t.target;if(void 0!==e.target&&""!==e.target)return!0;const n=document.querySelector(this._getFormIdentifier()+" button[type=submit]");n.textContent=n.textContent+" …",n.disabled=!0;const i=e.dataset.formEvent,s=this.getContainer().getPlugin("event"),r=this.getContainer().getPlugin("alert");t.preventDefault(),t.stopPropagation();const o=new Headers;o.append("X-Requested-With","Kimai-Modal");const a={headers:o};this.fetchForm(e,a).then((t=>{t.text().then((t=>{const o=document.createElement("div");o.innerHTML=t;let a=!1,l=!1,c=!1;n.textContent=n.textContent.replace(" …",""),n.disabled=!1;const u=o.querySelector("#form_modal .modal-content");if(null!==u&&(a=null!==u.querySelector(".is-invalid"),a||(a=null!==u.querySelector(".invalid-feedback")),l=null!==u.querySelector("ul.list-unstyled li.text-danger"),c=null!==o.querySelector("div.alert-danger")),a||l||c)this._openFormInModal(t);else{s.trigger(i);let t=e.dataset.msgSuccess;null!=t&&""!==t||(t="action.update.success"),this._isDirty=!1,this._getModal().hide(),r.success(t)}}))})).catch((t=>{let i=e.dataset.msgError;null!=i&&""!==i||(i="action.update.error"),r.error(i,t.message),setTimeout((()=>{n.textContent=n.textContent.replace(" …",""),n.disabled=!1}),1500)}))}),this.eventHandler}}class k extends o{constructor(){super(),this._selector=".ticktac-menu",this._selectorEmpty=".ticktac-menu-empty",this._favIconUrl=null}getId(){return"active-records"}init(){if(null===document.querySelector(this._selector))return;const t=()=>{this.reloadActiveRecords()};document.addEventListener("kimai.timesheetUpdate",t),document.addEventListener("kimai.timesheetDelete",t),document.addEventListener("kimai.activityUpdate",t),document.addEventListener("kimai.activityDelete",t),document.addEventListener("kimai.projectUpdate",t),document.addEventListener("kimai.projectDelete",t),document.addEventListener("kimai.customerUpdate",t),document.addEventListener("kimai.customerDelete",t),this._updateBrowserTitle=!!this.getConfiguration("updateBrowserTitle");const e=()=>{this._updateDuration()};this._updatesHandler=setInterval(e,1e4),document.addEventListener("kimai.timesheetUpdate",e),document.addEventListener("kimai.reloadedContent",e)}_updateDuration(){const t=document.querySelectorAll('[data-since]:not([data-since=""])');if(this._updateBrowserTitle&&this._changeFavicon(t.length>0),0===t.length)return void(this._updateBrowserTitle&&(void 0===document.body.dataset.title?this._updateBrowserTitle=!1:document.title=document.body.dataset.title));const e=this.getDateUtils();let n=[];for(const i of t){const t=e.formatDuration(i.dataset.since);void 0!==i.dataset.replacer&&null!==i.dataset.title&&"?"!==t&&n.push(t),i.textContent=t}0!==n.length&&this._updateBrowserTitle&&(document.title=n.shift())}_setEntries(t){const e=t.length>0;for(let t of document.querySelectorAll(this._selectorEmpty))t.style.display=e?"none":"inline-block";for(let n of document.querySelectorAll(this._selector)){if(n.style.display=e?"inline-block":"none",!e)for(let t of n.querySelectorAll("[data-since]"))t.dataset.since="";const i=n.querySelector(".ticktac-stop");e?(i&&(i.accesskey="s"),this._replaceInNode(n,t[0])):i&&(i.accesskey=null)}this._updateDuration()}_replaceInNode(t,e){const n=this.getDateUtils(),i=t.querySelectorAll("[data-replacer]");for(let s of i){const i=s.dataset.replacer;"url"===i?s.dataset.href=t.dataset.href.replace("000",e.id):"activity"===i?s.innerText=e.activity.name:"project"===i?s.innerText=e.project.name:"customer"===i?s.innerText=e.project.customer.name:"duration"===i&&(s.dataset.since=e.begin,s.innerText=n.formatDuration(e.duration))}}reloadActiveRecords(){const t=this.getContainer().getPlugin("api"),e=document.querySelector(this._selector).dataset.api;t.get(e,{},(t=>{this._setEntries(t)}))}_changeFavicon(t){const e=document.createElement("canvas"),n=document.getElementById("favicon");null===this._favIconUrl&&(this._favIconUrl=n.href);const i=n.cloneNode(!0);if(e.getContext&&i){const s=window.devicePixelRatio,r=document.createElement("img");e.height=e.width=16*s,r.onload=function(){const r=e.getContext("2d");if(r.drawImage(this,0,0,e.width,e.height),t){const t=5.5*s;r.fillStyle="rgb(182,57,57)",r.fillRect(e.width/2-t/2,e.height/2-t/2,t,t)}i.href=e.toDataURL("image/png"),n.remove(),document.head.appendChild(i)},r.src=this._favIconUrl}}}class T extends o{getId(){return"event"}trigger(t,e=null){if(""!==t)for(const n of t.split(" ")){let t=new Event(n);null!==e&&(t=new CustomEvent(n,{detail:e})),document.dispatchEvent(t)}}}class E extends o{constructor(t){super(),this._selector=t}init(){document.addEventListener("click",(t=>{let e=t.target;for(;null!==e&&"function"==typeof e.matches&&!e.matches("body");){if(e.classList.contains(this._selector)){const n=e.dataset;let i=n.href;i||(i=e.getAttribute("href")),void 0!==n.question?this.getContainer().getPlugin("alert").question(n.question,(t=>{t&&this._callApi(i,n)})):this._callApi(i,n),t.preventDefault(),t.stopPropagation()}e=e.parentNode}}))}_callApi(t,e){const n=e.method,i=e.event,s=this.getContainer().getPlugin("api"),r=this.getContainer().getPlugin("event"),o=this.getContainer().getPlugin("alert"),a=()=>{r.trigger(i),void 0!==e.msgSuccess&&o.success(e.msgSuccess)},l=t=>{let n="action.update.error";void 0!==e.msgError&&(n=e.msgError),s.handleError(n,t)};let c={};if(void 0!==e.payload&&(c=e.payload),"PATCH"===n)s.patch(t,c,a,l);else if("POST"===n){let e={};s.post(t,e,a,l)}else"DELETE"===n?s.delete(t,a,l):"GET"===n&&s.get(t,c,a,l)}}class D extends o{getId(){return"alert"}error(t,e){const n=this.getTranslation();n.has(t)&&(t=n.get(t)),t=t.replace("%reason%",""),void 0===e&&(e=null),null!==e&&(n.has(e)&&(e=n.get(e)),Array.isArray(e)&&(e=e.join("
")));const i="alert_global_error",s=document.getElementById(i);null!==s&&c.aF.getOrCreateInstance(s).hide();const r='\n \n
\n
\n
\n
\n
\n
'+t+"
\n "+(null!==e?'
'+e+"
":"")+'\n
\n \n
\n
\n
\n ";this._showModal(r)}warning(t){this._show("warning",t)}success(t){this._toast("success",t)}info(t){this._show("info",t)}_showModal(t){const e=document.body,n=document.createElement("template");n.innerHTML=t.trim();const i=n.content.firstChild;e.appendChild(i);const s=new c.aF(i);i.addEventListener("hidden.bs.modal",(function(){e.removeChild(i)})),s.show()}_show(t,e){const n=this.getTranslation();n.has(e)&&(e=n.get(e));const i='\n \n
\n
\n
\n
\n \n
'+e+'
\n \n \n
\n
\n
\n ";this._showModal(i)}_mapClass(t){return"info"===t||"success"===t||"warning"===t||"danger"===t?t:"error"===t?"danger":"primary"}_toast(t,e){const n=this.getTranslation();n.has(e)&&(e=n.get(e));let i='';"success"===t?i='':"warning"===t?i='':"danger"!==t&&"error"!==t||(i='');const s='\n
\n
\n '+i+" "+e+'\n
\n
\n
\n
',r=document.getElementById("toast-container"),o=document.createElement("template");o.innerHTML=s.trim();const a=o.content.firstChild;r.appendChild(a);const l=new c.y8(a);a.addEventListener("hidden.bs.toast",(function(){r.removeChild(a)})),l.show()}question(t,e){const n=this.getTranslation();n.has(t)&&(t=n.get(t));const i=this._mapClass("info"),s='\n \n
\n
\n
\n
\n \n
'+t+'
\n \n \n
\n
\n
\n ",r=document.body,o=document.createElement("template");o.innerHTML=s.trim();const a=o.content.firstChild;r.appendChild(a),a.querySelector(".question-confirm").addEventListener("click",(()=>{e(!0)})),a.querySelector(".question-cancel").addEventListener("click",(()=>{e(!1)}));const l=new c.aF(a);a.addEventListener("hidden.bs.modal",(()=>{r.removeChild(a)})),l.show()}}function x(t,e){t.split(/\s+/).forEach((t=>{e(t)}))}class S{constructor(){this._events={}}on(t,e){x(t,(t=>{const n=this._events[t]||[];n.push(e),this._events[t]=n}))}off(t,e){var n=arguments.length;0!==n?x(t,(t=>{if(1===n)return void delete this._events[t];const i=this._events[t];void 0!==i&&(i.splice(i.indexOf(e),1),this._events[t]=i)})):this._events={}}trigger(t,...e){var n=this;x(t,(t=>{const i=n._events[t];void 0!==i&&i.forEach((t=>{t.apply(n,e)}))}))}}const O=t=>(t=t.filter(Boolean)).length<2?t[0]||"":1==I(t)?"["+t.join("")+"]":"(?:"+t.join("|")+")",L=t=>{if(!M(t))return t.join("");let e="",n=0;const i=()=>{n>1&&(e+="{"+n+"}")};return t.forEach(((s,r)=>{s!==t[r-1]?(i(),e+=s,n=1):n++})),i(),e},C=t=>{let e=Array.from(t);return O(e)},M=t=>new Set(t).size!==t.length,A=t=>(t+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),I=t=>t.reduce(((t,e)=>Math.max(t,N(e))),0),N=t=>Array.from(t).length,P=t=>{if(1===t.length)return[[t]];let e=[];const n=t.substring(1);return P(n).forEach((function(n){let i=n.slice(0);i[0]=t.charAt(0)+i[0],e.push(i),i=n.slice(0),i.unshift(t.charAt(0)),e.push(i)})),e},F=[[0,65535]];let j,q;const H={},V={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let t in V){let e=V[t]||"";for(let n=0;nt.normalize(e),R=t=>Array.from(t).reduce(((t,e)=>t+W(e)),""),W=t=>(t=B(t).toLowerCase().replace($,(t=>H[t]||"")),B(t,"NFC"));const z=t=>{const e={},n=(t,n)=>{const i=e[t]||new Set,s=new RegExp("^"+C(i)+"$","iu");n.match(s)||(i.add(A(n)),e[t]=i)};for(let e of function*(t){for(const[e,n]of t)for(let t=e;t<=n;t++){let e=String.fromCharCode(t),n=R(e);n!=e.toLowerCase()&&(n.length>3||0!=n.length&&(yield{folded:n,composed:e,code_point:t}))}}(t))n(e.folded,e.folded),n(e.folded,e.composed);return e},Y=t=>{const e=z(t),n={};let i=[];for(let t in e){let s=e[t];s&&(n[t]=C(s)),t.length>1&&i.push(A(t))}i.sort(((t,e)=>e.length-t.length));const s=O(i);return q=new RegExp("^"+s,"u"),n},U=(t,e=1)=>(e=Math.max(e,t.length-1),O(P(t).map((t=>((t,e=1)=>{let n=0;return t=t.map((t=>(j[t]&&(n+=t.length),j[t]||t))),n>=e?L(t):""})(t,e))))),Z=(t,e=!0)=>{let n=t.length>1?1:0;return O(t.map((t=>{let i=[];const s=e?t.length():t.length()-1;for(let e=0;e{for(const n of e){if(n.start!=t.start||n.end!=t.end)continue;if(n.substrs.join("")!==t.substrs.join(""))continue;let e=t.parts;const i=t=>{for(const n of e){if(n.start===t.start&&n.substr===t.substr)return!1;if(1!=t.length&&1!=n.length){if(t.startn.start)return!0;if(n.startt.start)return!0}}return!1};if(!(n.parts.filter(i).length>0))return!0}return!1};class J{parts;substrs;start;end;constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(t){t&&(this.parts.push(t),this.substrs.push(t.substr),this.start=Math.min(t.start,this.start),this.end=Math.max(t.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let n=new J,i=JSON.parse(JSON.stringify(this.parts)),s=i.pop();for(const t of i)n.add(t);let r=e.substr.substring(0,t-s.start),o=r.length;return n.add({start:s.start,end:s.start+o,length:o,substr:r}),n}}const G=t=>{var e;void 0===j&&(j=Y(e||F)),t=R(t);let n="",i=[new J];for(let e=0;e0){a=a.sort(((t,e)=>t.length()-e.length()));for(let t of a)K(t,i)||i.push(t)}else if(e>0&&1==l.size&&!l.has("3")){n+=Z(i,!1);let t=new J;const e=i[0];e&&t.add(e.last()),i=[t]}}return n+=Z(i,!0),n},Q=(t,e)=>{if(t)return t[e]},X=(t,e)=>{if(t){for(var n,i=e.split(".");(n=i.shift())&&(t=t[n]););return t}},tt=(t,e,n)=>{var i,s;return t?(t+="",null==e.regex||-1===(s=t.search(e.regex))?0:(i=e.string.length/t.length,0===s&&(i+=.5),i*n)):0},et=(t,e)=>{var n=t[e];if("function"==typeof n)return n;n&&!Array.isArray(n)&&(t[e]=[n])},nt=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},it=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t(e=R(e+"").toLowerCase())?1:e>t?-1:0;class st{items;settings;constructor(t,e){this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,n){if(!t||!t.length)return[];const i=[],s=t.split(/\s+/);var r;return n&&(r=new RegExp("^("+Object.keys(n).map(A).join("|")+"):(.*)$")),s.forEach((t=>{let n,s=null,o=null;r&&(n=t.match(r))&&(s=n[1],t=n[2]),t.length>0&&(o=this.settings.diacritics?G(t)||null:A(t),o&&e&&(o="\\b"+o)),i.push({string:t,regex:o?new RegExp(o,"iu"):null,field:s})})),i}getScoreFunction(t,e){var n=this.prepareSearch(t,e);return this._getScoreFunction(n)}_getScoreFunction(t){const e=t.tokens,n=e.length;if(!n)return function(){return 0};const i=t.options.fields,s=t.weights,r=i.length,o=t.getAttrFn;if(!r)return function(){return 1};const a=1===r?function(t,e){const n=i[0].field;return tt(o(e,n),t,s[n]||1)}:function(t,e){var n=0;if(t.field){const i=o(e,t.field);!t.regex&&i?n+=1/r:n+=tt(i,t,1)}else nt(s,((i,s)=>{n+=tt(o(e,s),t,i)}));return n/r};return 1===n?function(t){return a(e[0],t)}:"and"===t.options.conjunction?function(t){var i,s=0;for(let n of e){if((i=a(n,t))<=0)return 0;s+=i}return s/n}:function(t){var i=0;return nt(e,(e=>{i+=a(e,t)})),i/n}}getSortFunction(t,e){var n=this.prepareSearch(t,e);return this._getSortFunction(n)}_getSortFunction(t){var e,n=[];const i=this,s=t.options,r=!t.query&&s.sort_empty?s.sort_empty:s.sort;if("function"==typeof r)return r.bind(this);const o=function(e,n){return"$score"===e?n.score:t.getAttrFn(i.items[n.id],e)};if(r)for(let e of r)(t.query||"$score"!==e.field)&&n.push(e);if(t.query){e=!0;for(let t of n)if("$score"===t.field){e=!1;break}e&&n.unshift({field:"$score",direction:"desc"})}else n=n.filter((t=>"$score"!==t.field));return n.length?function(t,e){var i,s;for(let r of n){if(s=r.field,i=("desc"===r.direction?-1:1)*it(o(s,t),o(s,e)))return i}return 0}:null}prepareSearch(t,e){const n={};var i=Object.assign({},e);if(et(i,"sort"),et(i,"sort_empty"),i.fields){et(i,"fields");const t=[];i.fields.forEach((e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),n[e.field]="weight"in e?e.weight:1})),i.fields=t}return{options:i,query:t.toLowerCase().trim(),tokens:this.tokenize(t,i.respect_word_boundaries,n),total:0,items:[],weights:n,getAttrFn:i.nesting?X:Q}}search(t,e){var n,i,s=this;i=this.prepareSearch(t,e),e=i.options,t=i.query;const r=e.score||s._getScoreFunction(i);t.length?nt(s.items,((t,s)=>{n=r(t),(!1===e.filter||n>0)&&i.items.push({score:n,id:s})})):nt(s.items,((t,e)=>{i.items.push({score:1,id:e})}));const o=s._getSortFunction(i);return o&&i.items.sort(o),i.total=i.items.length,"number"==typeof e.limit&&(i.items=i.items.slice(0,e.limit)),i}}const rt=t=>null==t?null:ot(t),ot=t=>"boolean"==typeof t?t?"1":"0":t+"",at=t=>(t+"").replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),lt=(t,e)=>{var n;return function(i,s){var r=this;n&&(r.loading=Math.max(r.loading-1,0),clearTimeout(n)),n=setTimeout((function(){n=null,r.loadedSearches[i]=!0,t.call(r,i,s)}),e)}},ct=(t,e,n)=>{var i,s=t.trigger,r={};for(i of(t.trigger=function(){var n=arguments[0];if(-1===e.indexOf(n))return s.apply(t,arguments);r[n]=arguments},n.apply(t,[]),t.trigger=s,e))i in r&&s.apply(t,r[i])},ut=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},dt=(t,e,n,i)=>{t.addEventListener(e,n,i)},ht=(t,e)=>!!e&&(!!e[t]&&1===(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0)),pt=(t,e)=>{const n=t.getAttribute("id");return n||(t.setAttribute("id",e),e)},mt=t=>t.replace(/[\\"']/g,"\\$&"),ft=(t,e)=>{e&&t.append(e)},gt=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},vt=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(yt(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},yt=t=>"string"==typeof t&&t.indexOf("<")>-1,bt=(t,e)=>{var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!1),t.dispatchEvent(n)},_t=(t,e)=>{Object.assign(t.style,e)},wt=(t,...e)=>{var n=Tt(e);(t=Et(t)).map((t=>{n.map((e=>{t.classList.add(e)}))}))},kt=(t,...e)=>{var n=Tt(e);(t=Et(t)).map((t=>{n.map((e=>{t.classList.remove(e)}))}))},Tt=t=>{var e=[];return gt(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},Et=t=>(Array.isArray(t)||(t=[t]),t),Dt=(t,e,n)=>{if(!n||n.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},xt=(t,e=0)=>e>0?t[t.length-1]:t[0],St=(t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var n=0;t=t.previousElementSibling;)t.matches(e)&&n++;return n},Ot=(t,e)=>{gt(e,((e,n)=>{null==e?t.removeAttribute(n):t.setAttribute(n,""+e)}))},Lt=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},Ct=(t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=new RegExp(e,"i")}const n=t=>3===t.nodeType?(t=>{var n=t.data.match(e);if(n&&t.data.length>0){var i=document.createElement("span");i.className="highlight";var s=t.splitText(n.index);s.splitText(n[0].length);var r=s.cloneNode(!0);return i.appendChild(r),Lt(s,i),1}return 0})(t):((t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach((t=>{n(t)}))})(t),0);n(t)},Mt="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var At={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:'',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};function It(t,e){var n=Object.assign({},At,e),i=n.dataAttr,s=n.labelField,r=n.valueField,o=n.disabledField,a=n.optgroupField,l=n.optgroupLabelField,c=n.optgroupValueField,u=t.tagName.toLowerCase(),d=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!d&&!n.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(d=e.textContent)}var h={placeholder:d,options:[],optgroups:[],items:[],maxItems:null};return"select"===u?(()=>{var e,u=h.options,d={},p=1;let m=0;var f=t=>{var e=Object.assign({},t.dataset),n=i&&e[i];return"string"==typeof n&&n.length&&(e=Object.assign(e,JSON.parse(n))),e},g=(t,e)=>{var i=rt(t.value);if(null!=i&&(i||n.allowEmptyOption)){if(d.hasOwnProperty(i)){if(e){var l=d[i][a];l?Array.isArray(l)?l.push(e):d[i][a]=[l,e]:d[i][a]=e}}else{var c=f(t);c[s]=c[s]||t.textContent,c[r]=c[r]||i,c[o]=c[o]||t.disabled,c[a]=c[a]||e,c.$option=t,c.$order=c.$order||++m,d[i]=c,u.push(c)}t.selected&&h.items.push(i)}};h.maxItems=t.hasAttribute("multiple")?null:1,gt(t.children,(t=>{var n,i,s;"optgroup"===(e=t.tagName.toLowerCase())?((s=f(n=t))[l]=s[l]||n.getAttribute("label")||"",s[c]=s[c]||p++,s[o]=s[o]||n.disabled,s.$order=s.$order||++m,h.optgroups.push(s),i=s[c],gt(n.children,(t=>{g(t,i)}))):"option"===e&&g(t)}))})():(()=>{const e=t.getAttribute(i);if(e)h.options=JSON.parse(e),gt(h.options,(t=>{h.items.push(t[r])}));else{var o=t.value.trim()||"";if(!n.allowEmptyOption&&!o.length)return;const e=o.split(n.delimiter);gt(e,(t=>{const e={};e[s]=t,e[r]=t,h.options.push(e)})),h.items=e}})(),Object.assign({},At,h,e)}var Nt=0;class Pt extends(function(t){return t.plugins={},class extends t{constructor(){super(...arguments),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(e,n){t.plugins[e]={name:e,fn:n}}initializePlugins(t){var e,n;const i=this,s=[];if(Array.isArray(t))t.forEach((t=>{"string"==typeof t?s.push(t):(i.plugins.settings[t.name]=t.options,s.push(t.name))}));else if(t)for(e in t)t.hasOwnProperty(e)&&(i.plugins.settings[e]=t[e],s.push(e));for(;n=s.shift();)i.require(n)}loadPlugin(e){var n=this,i=n.plugins,s=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');i.requested[e]=!0,i.loaded[e]=s.fn.apply(n,[n.plugins.settings[e]||{}]),i.names.push(e)}require(t){var e=this,n=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(n.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return n.loaded[t]}}}(S)){constructor(t,e){var n;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,Nt++;var i=vt(t);if(i.tomselect)throw new Error("Tom Select already initialized on this element");i.tomselect=this,n=(window.getComputedStyle&&window.getComputedStyle(i,null)).getPropertyValue("direction");const s=It(i,e);this.settings=s,this.input=i,this.tabIndex=i.tabIndex||0,this.is_select_tag="select"===i.tagName.toLowerCase(),this.rtl=/rtl/i.test(n),this.inputId=pt(i,"tomselect-"+Nt),this.isRequired=i.required,this.sifter=new st(this.options,{diacritics:s.diacritics}),s.mode=s.mode||(1===s.maxItems?"single":"multi"),"boolean"!=typeof s.hideSelected&&(s.hideSelected="multi"===s.mode),"boolean"!=typeof s.hidePlaceholder&&(s.hidePlaceholder="multi"!==s.mode);var r=s.createFilter;"function"!=typeof r&&("string"==typeof r&&(r=new RegExp(r)),r instanceof RegExp?s.createFilter=t=>r.test(t):s.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(s.plugins),this.setupCallbacks(),this.setupTemplates();const o=vt(""),a=vt("
"),l=this._render("dropdown"),c=vt('
'),u=this.input.getAttribute("class")||"",d=s.mode;var h;if(wt(o,s.wrapperClass,u,d),wt(a,s.controlClass),ft(o,a),wt(l,s.dropdownClass,d),s.copyClassesToDropdown&&wt(l,u),wt(c,s.dropdownContentClass),ft(l,c),vt(s.dropdownParent||o).appendChild(l),yt(s.controlInput)){h=vt(s.controlInput);gt(["autocorrect","autocapitalize","autocomplete","spellcheck"],(t=>{i.getAttribute(t)&&Ot(h,{[t]:i.getAttribute(t)})})),h.tabIndex=-1,a.appendChild(h),this.focus_node=h}else s.controlInput?(h=vt(s.controlInput),this.focus_node=h):(h=vt("
"),this.focus_node=a);this.wrapper=o,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=h,this.setup()}setup(){const t=this,e=t.settings,n=t.control_input,i=t.dropdown,s=t.dropdown_content,r=t.wrapper,o=t.control,a=t.input,l=t.focus_node,c={passive:!0},u=t.inputId+"-ts-dropdown";Ot(s,{id:u}),Ot(l,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u});const d=pt(l,t.inputId+"-ts-control"),h="label[for='"+(t=>t.replace(/['"\\]/g,"\\$&"))(t.inputId)+"']",p=document.querySelector(h),m=t.focus.bind(t);if(p){dt(p,"click",m),Ot(p,{for:d});const e=pt(p,t.inputId+"-ts-label");Ot(l,{"aria-labelledby":e}),Ot(s,{"aria-labelledby":e})}if(r.style.width=a.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");wt([r,i],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&Ot(a,{multiple:"multiple"}),e.placeholder&&Ot(n,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+A(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=lt(e.load,e.loadThrottle)),dt(i,"mousemove",(()=>{t.ignoreHover=!1})),dt(i,"mouseenter",(e=>{var n=Dt(e.target,"[data-selectable]",i);n&&t.onOptionHover(e,n)}),{capture:!0}),dt(i,"click",(e=>{const n=Dt(e.target,"[data-selectable]");n&&(t.onOptionSelect(e,n),ut(e,!0))})),dt(o,"click",(e=>{var i=Dt(e.target,"[data-ts-item]",o);i&&t.onItemSelect(e,i)?ut(e,!0):""==n.value&&(t.onClick(),ut(e,!0))})),dt(l,"keydown",(e=>t.onKeyDown(e))),dt(n,"keypress",(e=>t.onKeyPress(e))),dt(n,"input",(e=>t.onInput(e))),dt(l,"blur",(e=>t.onBlur(e))),dt(l,"focus",(e=>t.onFocus(e))),dt(n,"paste",(e=>t.onPaste(e)));const f=e=>{const s=e.composedPath()[0];if(!r.contains(s)&&!i.contains(s))return t.isFocused&&t.blur(),void t.inputState();s==n&&t.isOpen?e.stopPropagation():ut(e,!0)},g=()=>{t.isOpen&&t.positionDropdown()};dt(document,"mousedown",f),dt(window,"scroll",g,c),dt(window,"resize",g,c),this._destroy=()=>{document.removeEventListener("mousedown",f),window.removeEventListener("scroll",g),window.removeEventListener("resize",g),p&&p.removeEventListener("click",m)},this.revertSettings={innerHTML:a.innerHTML,tabIndex:a.tabIndex},a.tabIndex=-1,a.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,dt(a,"invalid",(()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())})),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,a.disabled?t.disable():a.readOnly?t.setReadOnly(!0):t.enable(),t.on("change",this.onChange),wt(a,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),gt(e,(t=>{this.registerOptionGroup(t)}))}setupTemplates(){var t=this,e=t.settings.labelField,n=t.settings.optgroupLabelField,i={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'",option:(t,n)=>"
"+n(t[e])+"
",item:(t,n)=>"
"+n(t[e])+"
",option_create:(t,e)=>'
Add '+e(t.input)+"…
",no_results:()=>'
No results found
',loading:()=>'
',not_loading:()=>{},dropdown:()=>"
"};t.settings.render=Object.assign({},i,t.settings.render)}setupCallbacks(){var t,e,n={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(t in n)(e=this.settings[n[t]])&&this.on(t,e)}sync(t=!0){const e=this,n=t?It(e.input,{delimiter:e.settings.delimiter}):e.settings;e.setupOptions(n.options,n.optgroups),e.setValue(n.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){bt(this.input,"input"),bt(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?ut(t):e.settings.splitOn&&setTimeout((()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var n=t.trim().split(e.settings.splitOn);gt(n,(t=>{rt(t)&&(this.options[t]?e.addItem(t):e.createItem(t))}))}}),0)}onKeyPress(t){var e=this;if(!e.isLocked){var n=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&n===e.settings.delimiter?(e.createItem(),void ut(t)):void 0}ut(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)9!==t.keyCode&&ut(t);else{switch(t.keyCode){case 65:if(ht(Mt,t)&&""==e.control_input.value)return ut(t),void e.selectAll();break;case 27:return e.isOpen&&(ut(t,!0),e.close()),void e.clearActiveItems();case 40:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void ut(t);case 38:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void ut(t);case 13:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),ut(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&ut(t));case 37:return void e.advanceSelection(-1,t);case 39:return void e.advanceSelection(1,t);case 9:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),ut(t)),e.settings.create&&e.createItem()&&ut(t)));case 8:case 46:return void e.deleteSelection(t)}e.isInputHidden&&!ht(Mt,t)&&ut(t)}}onInput(t){if(this.isLocked)return;const e=this.inputValue();this.lastValue!==e&&(this.lastValue=e,""!=e?(this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=((t,e)=>e>0?window.setTimeout(t,e):(t.call(null),null))((()=>{this.refreshTimeout=null,this._onInput()}),this.settings.refreshThrottle)):this._onInput())}_onInput(){const t=this.lastValue;this.settings.shouldLoad.call(this,t)&&this.load(t),this.refreshOptions(),this.trigger("type",t)}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,n=e.isFocused;if(e.isDisabled||e.isReadOnly)return e.blur(),void ut(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),n||e.trigger("focus"),e.activeItems.length||(e.inputState(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var n=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,n):n()}}}onOptionSelect(t,e){var n,i=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?i.createItem(null,(()=>{i.settings.closeAfterSelect&&i.close()})):void 0!==(n=e.dataset.value)&&(i.lastQuery=null,i.addItem(n),i.settings.closeAfterSelect&&i.close(),!i.settings.hideSelected&&t.type&&/click/.test(t.type)&&i.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var n=this;return!n.isLocked&&"multi"===n.settings.mode&&(ut(t),n.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;wt(e.wrapper,e.settings.loadingClass),e.loading++;const n=e.loadCallback.bind(e);e.settings.load.call(e,t,n)}loadCallback(t,e){const n=this;n.loading=Math.max(n.loading-1,0),n.lastQuery=null,n.clearActiveOption(),n.setupOptions(t,e),n.refreshOptions(n.isFocused&&!n.isInputHidden),n.loading||kt(n.wrapper,n.settings.loadingClass),n.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,bt(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){ct(this,e?[]:["change"],(()=>{this.clear(e),this.addItems(t,e)}))}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var n,i,s,r,o,a,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.inputState());if("click"===(n=e&&e.type.toLowerCase())&&ht("shiftKey",e)&&l.activeItems.length){for(a=l.getLastActive(),(s=Array.prototype.indexOf.call(l.control.children,a))>(r=Array.prototype.indexOf.call(l.control.children,t))&&(o=s,s=r,r=o),i=s;i<=r;i++)t=l.control.children[i],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);ut(e)}else"click"===n&&ht(Mt,e)||"keydown"===n&&ht("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.inputState(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,n=e.control.querySelector(".last-active");n&&kt(n,"last-active"),wt(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),kt(t,"active")}clearActiveItems(){kt(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,Ot(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),Ot(t,{"aria-selected":"true"}),wt(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const n=this.dropdown_content,i=n.clientHeight,s=n.scrollTop||0,r=t.offsetHeight,o=t.getBoundingClientRect().top-n.getBoundingClientRect().top+s;o+r>i+s?this.scroll(o-i+r,e):o
{t.setActiveItemClass(e)})))}inputState(){var t=this;t.control.contains(t.control_input)&&(Ot(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&Ot(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||t.isReadOnly||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout((()=>{t.ignoreFocus=!1,t.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,n,i=this,s=this.getSearchOptions();if(i.settings.score&&"function"!=typeof(n=i.settings.score.call(i,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==i.lastQuery?(i.lastQuery=t,e=i.sifter.search(t,Object.assign(s,{score:n})),i.currentResults=e):e=Object.assign({},i.currentResults),i.settings.hideSelected&&(e.items=e.items.filter((t=>{let e=rt(t.id);return!(e&&-1!==i.items.indexOf(e))}))),e}refreshOptions(t=!0){var e,n,i,s,r,o,a,l,c,u;const d={},h=[];var p=this,m=p.inputValue();const f=m===p.lastQuery||""==m&&null==p.lastQuery;var g=p.search(m),v=null,y=p.settings.shouldOpen||!1,b=p.dropdown_content;f&&(v=p.activeOption)&&(c=v.closest("[data-group]")),s=g.items.length,"number"==typeof p.settings.maxOptions&&(s=Math.min(s,p.settings.maxOptions)),s>0&&(y=!0);const _=(t,e)=>{let n=d[t];if(void 0!==n){let t=h[n];if(void 0!==t)return[n,t.fragment]}let i=document.createDocumentFragment();return n=h.length,h.push({fragment:i,order:e,optgroup:t}),[n,i]};for(e=0;e0&&(u=u.cloneNode(!0),Ot(u,{id:a.$id+"-clone-"+n,"aria-selected":null}),u.classList.add("ts-cloned"),kt(u,"active"),p.activeOption&&p.activeOption.dataset.value==s&&c&&c.dataset.group===r.toString()&&(v=u)),l.appendChild(u),""!=r&&(d[r]=i)}}var w;p.settings.lockOptgroupOrder&&h.sort(((t,e)=>t.order-e.order)),a=document.createDocumentFragment(),gt(h,(t=>{let e=t.fragment,n=t.optgroup;if(!e||!e.children.length)return;let i=p.optgroups[n];if(void 0!==i){let t=document.createDocumentFragment(),n=p.render("optgroup_header",i);ft(t,n),ft(t,e);let s=p.render("optgroup",{group:i,options:t});ft(a,s)}else ft(a,e)})),b.innerHTML="",ft(b,a),p.settings.highlight&&(w=b.querySelectorAll("span.highlight"),Array.prototype.forEach.call(w,(function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()})),g.query.length&&g.tokens.length&>(g.tokens,(t=>{Ct(b,t.regex)})));var k=t=>{let e=p.render(t,{input:m});return e&&(y=!0,b.insertBefore(e,b.firstChild)),e};if(p.loading?k("loading"):p.settings.shouldLoad.call(p,m)?0===g.items.length&&k("no_results"):k("not_loading"),(l=p.canCreate(m))&&(u=k("option_create")),p.hasOptions=g.items.length>0||l,y){if(g.items.length>0){if(v||"single"!==p.settings.mode||null==p.items[0]||(v=p.getOption(p.items[0])),!b.contains(v)){let t=0;u&&!p.settings.addPrecedence&&(t=1),v=p.selectable()[t]}}else u&&(v=u);t&&!p.isOpen&&(p.open(),p.scrollToOption(v,"auto")),p.setActiveOption(v)}else p.clearActiveOption(),t&&p.isOpen&&p.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const n=this;if(Array.isArray(t))return n.addOptions(t,e),!1;const i=rt(t[n.settings.valueField]);return null!==i&&!n.options.hasOwnProperty(i)&&(t.$order=t.$order||++n.order,t.$id=n.inputId+"-opt-"+t.$order,n.options[i]=t,n.lastQuery=null,e&&(n.userOptions[i]=e,n.trigger("option_add",i,t)),i)}addOptions(t,e=!1){gt(t,(t=>{this.addOption(t,e)}))}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=rt(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var n;e[this.settings.optgroupValueField]=t,(n=this.registerOptionGroup(e))&&this.trigger("optgroup_add",n,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const n=this;var i,s;const r=rt(t),o=rt(e[n.settings.valueField]);if(null===r)return;const a=n.options[r];if(null==a)return;if("string"!=typeof o)throw new Error("Value must be set in option data");const l=n.getOption(r),c=n.getItem(r);if(e.$order=e.$order||a.$order,delete n.options[r],n.uncacheValue(o),n.options[o]=e,l){if(n.dropdown_content.contains(l)){const t=n._render("option",e);Lt(l,t),n.activeOption===l&&n.setActiveOption(t)}l.remove()}c&&(-1!==(s=n.items.indexOf(r))&&n.items.splice(s,1,o),i=n._render("item",e),c.classList.contains("active")&&wt(i,"active"),Lt(c,i)),n.lastQuery=null}removeOption(t,e){const n=this;t=ot(t),n.uncacheValue(t),delete n.userOptions[t],delete n.options[t],n.lastQuery=null,n.trigger("option_remove",t),n.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const n={};gt(this.options,((t,i)=>{e(t,i)&&(n[i]=t)})),this.options=this.sifter.items=n,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const n=rt(t);if(null===n)return null;const i=this.options[n];if(null!=i){if(i.$div)return i.$div;if(e)return this._render("option",i)}return null}getAdjacent(t,e,n="option"){var i;if(!t)return null;i="item"==n?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let n=0;n0?i[n+1]:i[n-1];return null}getItem(t){if("object"==typeof t)return t;var e=rt(t);return null!==e?this.control.querySelector(`[data-value="${mt(e)}"]`):null}addItems(t,e){var n=this,i=Array.isArray(t)?t:[t];const s=(i=i.filter((t=>-1===n.items.indexOf(t))))[i.length-1];i.forEach((t=>{n.isPending=t!==s,n.addItem(t,e)}))}addItem(t,e){ct(this,e?[]:["change","dropdown_close"],(()=>{var n,i;const s=this,r=s.settings.mode,o=rt(t);if((!o||-1===s.items.indexOf(o)||("single"===r&&s.close(),"single"!==r&&s.settings.duplicates))&&null!==o&&s.options.hasOwnProperty(o)&&("single"===r&&s.clear(e),"multi"!==r||!s.isFull())){if(n=s._render("item",s.options[o]),s.control.contains(n)&&(n=n.cloneNode(!0)),i=s.isFull(),s.items.splice(s.caretPos,0,o),s.insertAtCaret(n),s.isSetup){if(!s.isPending&&s.settings.hideSelected){let t=s.getOption(o),e=s.getAdjacent(t,1);e&&s.setActiveOption(e)}s.isPending||s.settings.closeAfterSelect||s.refreshOptions(s.isFocused&&"single"!==r),0!=s.settings.closeAfterSelect&&s.isFull()?s.close():s.isPending||s.positionDropdown(),s.trigger("item_add",o,n),s.isPending||s.updateOriginalInput({silent:e})}(!s.isPending||!i&&s.isFull())&&(s.inputState(),s.refreshState())}}))}removeItem(t=null,e){const n=this;if(!(t=n.getItem(t)))return;var i,s;const r=t.dataset.value;i=St(t),t.remove(),t.classList.contains("active")&&(s=n.activeItems.indexOf(t),n.activeItems.splice(s,1),kt(t,"active")),n.items.splice(i,1),n.lastQuery=null,!n.settings.persist&&n.userOptions.hasOwnProperty(r)&&n.removeOption(r,e),i{})){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var n,i=this,s=i.caretPos;if(t=t||i.inputValue(),!i.canCreate(t))return e(),!1;i.lock();var r=!1,o=t=>{if(i.unlock(),!t||"object"!=typeof t)return e();var n=rt(t[i.settings.valueField]);if("string"!=typeof n)return e();i.setTextboxValue(),i.addOption(t,!0),i.setCaret(s),i.addItem(n),e(t),r=!0};return n="function"==typeof i.settings.create?i.settings.create.call(this,t,o):{[i.settings.labelField]:t,[i.settings.valueField]:t},r||o(n),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),n=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const i=t.wrapper.classList;var s;i.toggle("focus",t.isFocused),i.toggle("disabled",t.isDisabled),i.toggle("readonly",t.isReadOnly),i.toggle("required",t.isRequired),i.toggle("invalid",!t.isValid),i.toggle("locked",n),i.toggle("full",e),i.toggle("input-active",t.isFocused&&!t.isInputHidden),i.toggle("dropdown-active",t.isOpen),i.toggle("has-options",(s=t.options,0===Object.keys(s).length)),i.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var n,i;const s=e.input.querySelector('option[value=""]');if(e.is_select_tag){const r=[],o=e.input.querySelectorAll("option:checked").length;function a(t,n,i){return t||(t=vt('")),t!=s&&e.input.append(t),r.push(t),(t!=s||o>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach((t=>{t.selected=!1})),0==e.items.length&&"single"==e.settings.mode?a(s,"",""):e.items.forEach((t=>{if(n=e.options[t],i=n[e.settings.labelField]||"",r.includes(n.$option)){a(e.input.querySelector(`option[value="${mt(t)}"]:not(:checked)`),t,i)}else n.$option=a(n.$option,t,i)}))}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,Ot(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),_t(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),_t(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,n=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.inputState()),e.isOpen=!1,Ot(e.focus_node,{"aria-expanded":"false"}),_t(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),n&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),n=t.offsetHeight+e.top+window.scrollY,i=e.left+window.scrollX;_t(this.dropdown,{width:e.width+"px",top:n+"px",left:i+"px"})}}clear(t){var e=this;if(e.items.length){var n=e.controlChildren();gt(n,(t=>{e.removeItem(t,!0)})),e.inputState(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,n=e.caretPos,i=e.control;i.insertBefore(t,i.children[n]||null),e.setCaret(n+1)}deleteSelection(t){var e,n,i,s,r,o=this;e=t&&8===t.keyCode?-1:1,n={start:(r=o.control_input).selectionStart||0,length:(r.selectionEnd||0)-(r.selectionStart||0)};const a=[];if(o.activeItems.length)s=xt(o.activeItems,e),i=St(s),e>0&&i++,gt(o.activeItems,(t=>a.push(t)));else if((o.isFocused||"single"===o.settings.mode)&&o.items.length){const t=o.controlChildren();let i;e<0&&0===n.start&&0===n.length?i=t[o.caretPos-1]:e>0&&n.start===o.inputValue().length&&(i=t[o.caretPos]),void 0!==i&&a.push(i)}if(!o.shouldDelete(a,t))return!1;for(ut(t,!0),void 0!==i&&o.setCaret(i);a.length;)o.removeItem(a.pop());return o.inputState(),o.positionDropdown(),o.refreshOptions(!1),!0}shouldDelete(t,e){const n=t.map((t=>t.dataset.value));return!(!n.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(n,e))}advanceSelection(t,e){var n,i,s=this;s.rtl&&(t*=-1),s.inputValue().length||(ht(Mt,e)||ht("shiftKey",e)?(i=(n=s.getLastActive(t))?n.classList.contains("active")?s.getAdjacent(n,t,"item"):n:t>0?s.control_input.nextElementSibling:s.control_input.previousElementSibling)&&(i.classList.contains("active")&&s.removeActiveItem(n),s.setActiveItemClass(i)):s.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var n=this.control.querySelectorAll(".active");return n?xt(n,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(t=this.isReadOnly||this.isDisabled){this.isLocked=t,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(t){this.focus_node.tabIndex=t?-1:this.tabIndex,this.isDisabled=t,this.input.disabled=t,this.control_input.disabled=t,this.setLocked()}setReadOnly(t){this.isReadOnly=t,this.input.readOnly=t,this.control_input.readOnly=t,this.setLocked()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,kt(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var n,i;const s=this;if("function"!=typeof this.settings.render[t])return null;if(!(i=s.settings.render[t].call(this,e,at)))return null;if(i=vt(i),"option"===t||"option_create"===t?e[s.settings.disabledField]?Ot(i,{"aria-disabled":"true"}):Ot(i,{"data-selectable":""}):"optgroup"===t&&(n=e.group[s.settings.optgroupValueField],Ot(i,{"data-group":n}),e.group[s.settings.disabledField]&&Ot(i,{"data-disabled":""})),"option"===t||"item"===t){const n=ot(e[s.settings.valueField]);Ot(i,{"data-value":n}),"item"===t?(wt(i,s.settings.itemClass),Ot(i,{"data-ts-item":""})):(wt(i,s.settings.optionClass),Ot(i,{role:"option",id:e.$id}),e.$div=i,s.options[n]=e)}return i}_render(t,e){const n=this.render(t,e);if(null==n)throw"HTMLElement expected";return n}clearCache(){gt(this.options,(t=>{t.$div&&(t.$div.remove(),delete t.$div)}))}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,n){var i=this,s=i[e];i[e]=function(){var e,r;return"after"===t&&(e=s.apply(i,arguments)),r=n.apply(i,arguments),"instead"===t?r:("before"===t&&(e=s.apply(i,arguments)),e)}}}const Ft=t=>"boolean"==typeof t?t?"1":"0":t+"",jt=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},qt=t=>"string"==typeof t&&t.indexOf("<")>-1;const Ht=t=>"string"==typeof t&&t.indexOf("<")>-1;const Vt=(t,e,n,i)=>{t.addEventListener(e,n,i)},$t=t=>"string"==typeof t&&t.indexOf("<")>-1,Bt=(t,e)=>{((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(e,((e,n)=>{null==e?t.removeAttribute(n):t.setAttribute(n,""+e)}))};const Rt=t=>"string"==typeof t&&t.indexOf("<")>-1;const Wt=t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},zt=t=>(Array.isArray(t)||(t=[t]),t);const Yt=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(Ut(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},Ut=t=>"string"==typeof t&&t.indexOf("<")>-1,Zt=t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},Kt=t=>(Array.isArray(t)||(t=[t]),t);const Jt=(t,e,n,i)=>{t.addEventListener(e,n,i)};const Gt=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},Qt=(t,e,n,i)=>{t.addEventListener(e,n,i)},Xt=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(te(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},te=t=>"string"==typeof t&&t.indexOf("<")>-1;const ee=t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)})(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},ne=t=>(Array.isArray(t)||(t=[t]),t);Pt.define("change_listener",(function(){var t,e,n,i;t=this.input,e="change",n=()=>{this.sync()},t.addEventListener(e,n,i)})),Pt.define("checkbox_options",(function(t){var e=this,n=e.onOptionSelect;e.settings.hideSelected=!1;const i=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},t);var s=function(t,e){e?(t.checked=!0,i.uncheckedClassNames&&t.classList.remove(...i.uncheckedClassNames),i.checkedClassNames&&t.classList.add(...i.checkedClassNames)):(t.checked=!1,i.checkedClassNames&&t.classList.remove(...i.checkedClassNames),i.uncheckedClassNames&&t.classList.add(...i.uncheckedClassNames))},r=function(t){setTimeout((()=>{var e=t.querySelector("input."+i.className);e instanceof HTMLInputElement&&s(e,t.classList.contains("selected"))}),1)};e.hook("after","setupTemplates",(()=>{var t=e.settings.render.option;e.settings.render.option=(n,r)=>{var o=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(qt(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(t.call(e,n,r)),a=document.createElement("input");i.className&&a.classList.add(i.className),a.addEventListener("click",(function(t){jt(t)})),a.type="checkbox";const l=null==(c=n[e.settings.valueField])?null:Ft(c);var c;return s(a,!!(l&&e.items.indexOf(l)>-1)),o.prepend(a),o}})),e.on("item_remove",(t=>{var n=e.getOption(t);n&&(n.classList.remove("selected"),r(n))})),e.on("item_add",(t=>{var n=e.getOption(t);n&&r(n)})),e.hook("instead","onOptionSelect",((t,i)=>{if(i.classList.contains("selected"))return i.classList.remove("selected"),e.removeItem(i.dataset.value),e.refreshOptions(),void jt(t,!0);n.call(e,t,i),r(i)}))})),Pt.define("clear_button",(function(t){const e=this,n=Object.assign({className:"clear-button",title:"Clear All",html:t=>`⨯
`},t);e.on("initialize",(()=>{var t=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(Ht(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(n.html(n));t.addEventListener("click",(t=>{e.isLocked||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),t.preventDefault(),t.stopPropagation())})),e.control.appendChild(t)}))})),Pt.define("drag_drop",(function(){var t=this;if("multi"!==t.settings.mode)return;var e=t.lock,n=t.unlock;let i,s=!0;t.hook("after","setupTemplates",(()=>{var e=t.settings.render.item;t.settings.render.item=(n,r)=>{const o=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if($t(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(e.call(t,n,r));Bt(o,{draggable:"true"});const a=t=>{t.preventDefault(),o.classList.add("ts-drag-over"),l(o,i)},l=(t,e)=>{var n,i,s;void 0!==e&&(((t,e)=>{do{var n;if(t==(e=null==(n=e)?void 0:n.previousElementSibling))return!0}while(e&&e.previousElementSibling);return!1})(e,o)?(i=e,null==(s=(n=t).parentNode)||s.insertBefore(i,n.nextSibling)):((t,e)=>{var n;null==(n=t.parentNode)||n.insertBefore(e,t)})(t,e))};return Vt(o,"mousedown",(t=>{s||((t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())})(t),t.stopPropagation()})),Vt(o,"dragstart",(t=>{i=o,setTimeout((()=>{o.classList.add("ts-dragging")}),0)})),Vt(o,"dragenter",a),Vt(o,"dragover",a),Vt(o,"dragleave",(()=>{o.classList.remove("ts-drag-over")})),Vt(o,"dragend",(()=>{var e;document.querySelectorAll(".ts-drag-over").forEach((t=>t.classList.remove("ts-drag-over"))),null==(e=i)||e.classList.remove("ts-dragging"),i=void 0;var n=[];t.control.querySelectorAll("[data-value]").forEach((t=>{if(t.dataset.value){let e=t.dataset.value;e&&n.push(e)}})),t.setValue(n)})),o}})),t.hook("instead","lock",(()=>(s=!1,e.call(t)))),t.hook("instead","unlock",(()=>(s=!0,n.call(t))))})),Pt.define("dropdown_header",(function(t){const e=this,n=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>''},t);e.on("initialize",(()=>{var t=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(Rt(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)})(n.html(n)),i=t.querySelector("."+n.closeClass);i&&i.addEventListener("click",(t=>{((t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())})(t,!0),e.close()})),e.dropdown.insertBefore(t,e.dropdown.firstChild)}))})),Pt.define("caret_position",(function(){var t=this;t.hook("instead","setCaret",(e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEach(((n,i)=>{i{if(!t.isFocused)return;const n=t.getLastActive(e);if(n){const i=((t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var n=0;t=t.previousElementSibling;)t.matches(e)&&n++;return n})(n);t.setCaret(e>0?i+1:i),t.setActiveItem(),((t,...e)=>{var n=Wt(e);(t=zt(t)).map((t=>{n.map((e=>{t.classList.remove(e)}))}))})(n,"last-active")}else t.setCaret(t.caretPos+e)}))})),Pt.define("dropdown_input",(function(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",(()=>{t.focus_node=t.control,((t,...e)=>{var n=Zt(e);(t=Kt(t)).map((t=>{n.map((e=>{t.classList.add(e)}))}))})(t.control_input,"dropdown-input");const e=Yt('");for(var D=1;D<=7;D+=1){var x=3+this.options.firstDay+D,S=document.createElement("div");S.innerHTML=this.weekdayName(x),S.title=this.weekdayName(x,"long"),E.appendChild(S)}var O=document.createElement("div");O.className=a.containerDays;var L=this.calcSkipDays(i);this.options.showWeekNumbers&&L&&O.appendChild(this.renderWeekNumber(i));for(var C=0;C1&&1===this.datePicked.length){var s=this.options.minDays-1,r=this.datePicked[0].clone().subtract(s,"day"),c=this.datePicked[0].clone().add(s,"day");t.isBetween(r,this.datePicked[0],"(]")&&e.classList.add(a.isLocked),t.isBetween(this.datePicked[0],c,"[)")&&e.classList.add(a.isLocked)}if(this.options.maxDays&&1===this.datePicked.length){var u=this.options.maxDays;r=this.datePicked[0].clone().subtract(u,"day"),c=this.datePicked[0].clone().add(u,"day"),t.isSameOrBefore(r)&&e.classList.add(a.isLocked),t.isSameOrAfter(c)&&e.classList.add(a.isLocked)}return this.options.selectForward&&1===this.datePicked.length&&t.isBefore(this.datePicked[0])&&e.classList.add(a.isLocked),this.options.selectBackward&&1===this.datePicked.length&&t.isAfter(this.datePicked[0])&&e.classList.add(a.isLocked),l.dateIsLocked(t,this.options,this.datePicked)&&e.classList.add(a.isLocked),this.options.highlightedDays.length&&this.options.highlightedDays.filter((function(e){return e instanceof Array?t.isBetween(e[0],e[1],"[]"):e.isSame(t,"day")})).length&&e.classList.add(a.isHighlighted),e.tabIndex=e.classList.contains("is-locked")?-1:0,this.emit("render:day",e,t),e},e.prototype.renderFooter=function(){var t=document.createElement("div");if(t.className=a.containerFooter,this.options.footerHTML?t.innerHTML=this.options.footerHTML:t.innerHTML='\n \n \n \n ",this.options.singleMode){if(1===this.datePicked.length){var e=this.datePicked[0].format(this.options.format,this.options.lang);t.querySelector("."+a.previewDateRange).innerHTML=e}}else if(1===this.datePicked.length&&t.querySelector("."+a.buttonApply).setAttribute("disabled",""),2===this.datePicked.length){e=this.datePicked[0].format(this.options.format,this.options.lang);var n=this.datePicked[1].format(this.options.format,this.options.lang);t.querySelector("."+a.previewDateRange).innerHTML=""+e+this.options.delimiter+n}return this.emit("render:footer",t),t},e.prototype.renderWeekNumber=function(t){var e=document.createElement("div"),n=t.getWeek(this.options.firstDay);return e.className=a.weekNumber,e.innerHTML=53===n&&0===t.getMonth()?"53 / 1":n,e},e.prototype.renderTooltip=function(){var t=document.createElement("div");return t.className=a.containerTooltip,t},e.prototype.weekdayName=function(t,e){return void 0===e&&(e="short"),new Date(1970,0,t,12,0,0,0).toLocaleString(this.options.lang,{weekday:e})},e.prototype.calcSkipDays=function(t){var e=t.getDay()-this.options.firstDay;return e<0&&(e+=7),e},e}(r.LPCore);e.Calendar=c},function(t,e,n){"use strict";var i,s=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,i=arguments.length;n',nextMonth:'',reset:''},tooltipText:{one:"day",other:"days"}},n.options=r(r({},n.options),e.element.dataset),Object.keys(n.options).forEach((function(t){"true"!==n.options[t]&&"false"!==n.options[t]||(n.options[t]="true"===n.options[t])}));var i=r(r({},n.options.dropdowns),e.dropdowns),s=r(r({},n.options.buttonText),e.buttonText),o=r(r({},n.options.tooltipText),e.tooltipText);n.options=r(r({},n.options),e),n.options.dropdowns=r({},i),n.options.buttonText=r({},s),n.options.tooltipText=r({},o),n.options.elementEnd||(n.options.allowRepick=!1),n.options.lockDays.length&&(n.options.lockDays=a.DateTime.convertArray(n.options.lockDays,n.options.lockDaysFormat)),n.options.highlightedDays.length&&(n.options.highlightedDays=a.DateTime.convertArray(n.options.highlightedDays,n.options.highlightedDaysFormat));var l=n.parseInput(),c=l[0],u=l[1];n.options.startDate&&(n.options.singleMode||n.options.endDate)&&(c=new a.DateTime(n.options.startDate,n.options.format,n.options.lang)),c&&n.options.endDate&&(u=new a.DateTime(n.options.endDate,n.options.format,n.options.lang)),c instanceof a.DateTime&&!isNaN(c.getTime())&&(n.options.startDate=c),n.options.startDate&&u instanceof a.DateTime&&!isNaN(u.getTime())&&(n.options.endDate=u),!n.options.singleMode||n.options.startDate instanceof a.DateTime||(n.options.startDate=null),n.options.singleMode||n.options.startDate instanceof a.DateTime&&n.options.endDate instanceof a.DateTime||(n.options.startDate=null,n.options.endDate=null);for(var d=0;dwindow.innerHeight,c=e.top+r-n.height>=n.height;l&&c&&(o=e.top+r-n.height)}if(/left|right/.test(i[0])||i[1]&&"auto"!==i[1]&&/left|right/.test(i[1]))a=/left|right/.test(i[0])?e[i[0]]+s:e[i[1]]+s,"right"!==i[0]&&"right"!==i[1]||(a-=n.width);else{a=e.left+s,l=e.left+n.width>window.innerWidth;var u=e.right+s-n.width>=0;l&&u&&(a=e.right+s-n.width)}return{left:a,top:o}},e}(o.EventEmitter);e.LPCore=c},function(t,e,n){"use strict";var i,s="object"==typeof Reflect?Reflect:null,r=s&&"function"==typeof s.apply?s.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};i=s&&"function"==typeof s.ownKeys?s.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function c(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function u(t,e,n,i){var s,r,o,a;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(r=t._events)?(r=t._events=Object.create(null),t._eventsCount=0):(void 0!==r.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),r=t._events),o=r[e]),void 0===o)o=r[e]=n,++t._eventsCount;else if("function"==typeof o?o=r[e]=i?[n,o]:[o,n]:i?o.unshift(n):o.push(n),(s=c(t))>0&&o.length>s&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=o.length,a=l,console&&console.warn&&console.warn(a)}return t}function d(){for(var t=[],e=0;e0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=s[t];if(void 0===l)return!1;if("function"==typeof l)r(l,this,e);else{var c=l.length,u=f(l,c);for(n=0;n=0;r--)if(n[r]===e||n[r].listener===e){o=n[r].listener,s=r;break}if(s<0)return this;0===s?n.shift():function(t,e){for(;e+1=0;i--)this.removeListener(t,e[i]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(t,e,n){(e=n(9)(!1)).push([t.i,':root{--litepicker-container-months-color-bg: #fff;--litepicker-container-months-box-shadow-color: #ddd;--litepicker-footer-color-bg: #fafafa;--litepicker-footer-box-shadow-color: #ddd;--litepicker-tooltip-color-bg: #fff;--litepicker-month-header-color: #333;--litepicker-button-prev-month-color: #9e9e9e;--litepicker-button-next-month-color: #9e9e9e;--litepicker-button-prev-month-color-hover: #2196f3;--litepicker-button-next-month-color-hover: #2196f3;--litepicker-month-width: calc(var(--litepicker-day-width) * 7);--litepicker-month-weekday-color: #9e9e9e;--litepicker-month-week-number-color: #9e9e9e;--litepicker-day-width: 38px;--litepicker-day-color: #333;--litepicker-day-color-hover: #2196f3;--litepicker-is-today-color: #f44336;--litepicker-is-in-range-color: #bbdefb;--litepicker-is-locked-color: #9e9e9e;--litepicker-is-start-color: #fff;--litepicker-is-start-color-bg: #2196f3;--litepicker-is-end-color: #fff;--litepicker-is-end-color-bg: #2196f3;--litepicker-button-cancel-color: #fff;--litepicker-button-cancel-color-bg: #9e9e9e;--litepicker-button-apply-color: #fff;--litepicker-button-apply-color-bg: #2196f3;--litepicker-button-reset-color: #909090;--litepicker-button-reset-color-hover: #2196f3;--litepicker-highlighted-day-color: #333;--litepicker-highlighted-day-color-bg: #ffeb3b}.show-week-numbers{--litepicker-month-width: calc(var(--litepicker-day-width) * 8)}.litepicker{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;font-size:0.8em;display:none}.litepicker button{border:none;background:none}.litepicker .container__main{display:-webkit-box;display:-ms-flexbox;display:flex}.litepicker .container__months{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;background-color:var(--litepicker-container-months-color-bg);border-radius:5px;-webkit-box-shadow:0 0 5px var(--litepicker-container-months-box-shadow-color);box-shadow:0 0 5px var(--litepicker-container-months-box-shadow-color);width:calc(var(--litepicker-month-width) + 10px);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months.columns-2{width:calc((var(--litepicker-month-width) * 2) + 20px)}.litepicker .container__months.columns-3{width:calc((var(--litepicker-month-width) * 3) + 30px)}.litepicker .container__months.columns-4{width:calc((var(--litepicker-month-width) * 4) + 40px)}.litepicker .container__months.split-view .month-item-header .button-previous-month,.litepicker .container__months.split-view .month-item-header .button-next-month{visibility:visible}.litepicker .container__months .month-item{padding:5px;width:var(--litepicker-month-width);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months .month-item-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-weight:500;padding:10px 5px;text-align:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--litepicker-month-header-color)}.litepicker .container__months .month-item-header div{-webkit-box-flex:1;-ms-flex:1;flex:1}.litepicker .container__months .month-item-header div>.month-item-name{margin-right:5px}.litepicker .container__months .month-item-header div>.month-item-year{padding:0}.litepicker .container__months .month-item-header .reset-button{color:var(--litepicker-button-reset-color)}.litepicker .container__months .month-item-header .reset-button>svg{fill:var(--litepicker-button-reset-color)}.litepicker .container__months .month-item-header .reset-button *{pointer-events:none}.litepicker .container__months .month-item-header .reset-button:hover{color:var(--litepicker-button-reset-color-hover)}.litepicker .container__months .month-item-header .reset-button:hover>svg{fill:var(--litepicker-button-reset-color-hover)}.litepicker .container__months .month-item-header .button-previous-month,.litepicker .container__months .month-item-header .button-next-month{visibility:hidden;text-decoration:none;padding:3px 5px;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__months .month-item-header .button-previous-month *,.litepicker .container__months .month-item-header .button-next-month *{pointer-events:none}.litepicker .container__months .month-item-header .button-previous-month{color:var(--litepicker-button-prev-month-color)}.litepicker .container__months .month-item-header .button-previous-month>svg,.litepicker .container__months .month-item-header .button-previous-month>img{fill:var(--litepicker-button-prev-month-color)}.litepicker .container__months .month-item-header .button-previous-month:hover{color:var(--litepicker-button-prev-month-color-hover)}.litepicker .container__months .month-item-header .button-previous-month:hover>svg{fill:var(--litepicker-button-prev-month-color-hover)}.litepicker .container__months .month-item-header .button-next-month{color:var(--litepicker-button-next-month-color)}.litepicker .container__months .month-item-header .button-next-month>svg,.litepicker .container__months .month-item-header .button-next-month>img{fill:var(--litepicker-button-next-month-color)}.litepicker .container__months .month-item-header .button-next-month:hover{color:var(--litepicker-button-next-month-color-hover)}.litepicker .container__months .month-item-header .button-next-month:hover>svg{fill:var(--litepicker-button-next-month-color-hover)}.litepicker .container__months .month-item-weekdays-row{display:-webkit-box;display:-ms-flexbox;display:flex;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;color:var(--litepicker-month-weekday-color)}.litepicker .container__months .month-item-weekdays-row>div{padding:5px 0;font-size:85%;-webkit-box-flex:1;-ms-flex:1;flex:1;width:var(--litepicker-day-width);text-align:center}.litepicker .container__months .month-item:first-child .button-previous-month{visibility:visible}.litepicker .container__months .month-item:last-child .button-next-month{visibility:visible}.litepicker .container__months .month-item.no-previous-month .button-previous-month{visibility:hidden}.litepicker .container__months .month-item.no-next-month .button-next-month{visibility:hidden}.litepicker .container__days{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:center;-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__days>div,.litepicker .container__days>a{padding:5px 0;width:var(--litepicker-day-width)}.litepicker .container__days .day-item{color:var(--litepicker-day-color);text-align:center;text-decoration:none;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__days .day-item:hover{color:var(--litepicker-day-color-hover);-webkit-box-shadow:inset 0 0 0 1px var(--litepicker-day-color-hover);box-shadow:inset 0 0 0 1px var(--litepicker-day-color-hover)}.litepicker .container__days .day-item.is-today{color:var(--litepicker-is-today-color)}.litepicker .container__days .day-item.is-locked{color:var(--litepicker-is-locked-color)}.litepicker .container__days .day-item.is-locked:hover{color:var(--litepicker-is-locked-color);-webkit-box-shadow:none;box-shadow:none;cursor:default}.litepicker .container__days .day-item.is-in-range{background-color:var(--litepicker-is-in-range-color);border-radius:0}.litepicker .container__days .day-item.is-start-date{color:var(--litepicker-is-start-color);background-color:var(--litepicker-is-start-color-bg);border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-flipped{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date{color:var(--litepicker-is-end-color);background-color:var(--litepicker-is-end-color-bg);border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date.is-flipped{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-end-date{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-highlighted{color:var(--litepicker-highlighted-day-color);background-color:var(--litepicker-highlighted-day-color-bg)}.litepicker .container__days .week-number{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:var(--litepicker-month-week-number-color);font-size:85%}.litepicker .container__footer{text-align:right;padding:10px 5px;margin:0 5px;background-color:var(--litepicker-footer-color-bg);-webkit-box-shadow:inset 0px 3px 3px 0px var(--litepicker-footer-box-shadow-color);box-shadow:inset 0px 3px 3px 0px var(--litepicker-footer-box-shadow-color);border-bottom-left-radius:5px;border-bottom-right-radius:5px}.litepicker .container__footer .preview-date-range{margin-right:10px;font-size:90%}.litepicker .container__footer .button-cancel{background-color:var(--litepicker-button-cancel-color-bg);color:var(--litepicker-button-cancel-color);border:0;padding:3px 7px 4px;border-radius:3px}.litepicker .container__footer .button-cancel *{pointer-events:none}.litepicker .container__footer .button-apply{background-color:var(--litepicker-button-apply-color-bg);color:var(--litepicker-button-apply-color);border:0;padding:3px 7px 4px;border-radius:3px;margin-left:10px;margin-right:10px}.litepicker .container__footer .button-apply:disabled{opacity:0.7}.litepicker .container__footer .button-apply *{pointer-events:none}.litepicker .container__tooltip{position:absolute;margin-top:-4px;padding:4px 8px;border-radius:4px;background-color:var(--litepicker-tooltip-color-bg);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.25);box-shadow:0 1px 3px rgba(0,0,0,0.25);white-space:nowrap;font-size:11px;pointer-events:none;visibility:hidden}.litepicker .container__tooltip:before{position:absolute;bottom:-5px;left:calc(50% - 5px);border-top:5px solid rgba(0,0,0,0.12);border-right:5px solid transparent;border-left:5px solid transparent;content:""}.litepicker .container__tooltip:after{position:absolute;bottom:-4px;left:calc(50% - 4px);border-top:4px solid var(--litepicker-tooltip-color-bg);border-right:4px solid transparent;border-left:4px solid transparent;content:""}\n',""]),e.locals={showWeekNumbers:"show-week-numbers",litepicker:"litepicker",containerMain:"container__main",containerMonths:"container__months",columns2:"columns-2",columns3:"columns-3",columns4:"columns-4",splitView:"split-view",monthItemHeader:"month-item-header",buttonPreviousMonth:"button-previous-month",buttonNextMonth:"button-next-month",monthItem:"month-item",monthItemName:"month-item-name",monthItemYear:"month-item-year",resetButton:"reset-button",monthItemWeekdaysRow:"month-item-weekdays-row",noPreviousMonth:"no-previous-month",noNextMonth:"no-next-month",containerDays:"container__days",dayItem:"day-item",isToday:"is-today",isLocked:"is-locked",isInRange:"is-in-range",isStartDate:"is-start-date",isFlipped:"is-flipped",isEndDate:"is-end-date",isHighlighted:"is-highlighted",weekNumber:"week-number",containerFooter:"container__footer",previewDateRange:"preview-date-range",buttonCancel:"button-cancel",buttonApply:"button-apply",containerTooltip:"container__tooltip"},t.exports=e},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,i,s,r=t[1]||"",o=t[3];if(!o)return r;if(e&&"function"==typeof btoa){var a=(n=o,i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),"/*# ".concat(s," */")),l=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(t," */")}));return[r].concat(l).concat([a]).join("\n")}return[r].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var s={};if(i)for(var r=0;rthis.options.endDate.getTime()&&(this.options.endDate=this.options.startDate.clone(),this.options.startDate=new s.DateTime(t,this.options.format,this.options.lang)),this.updateInput())},r.Litepicker.prototype.setDateRange=function(t,e,n){void 0===n&&(n=!1),this.triggerElement=void 0;var i=new s.DateTime(t,this.options.format,this.options.lang),r=new s.DateTime(e,this.options.format,this.options.lang);(this.options.disallowLockDaysInRange?o.rangeIsLocked([i,r],this.options):o.dateIsLocked(i,this.options,[i,r])||o.dateIsLocked(r,this.options,[i,r]))&&!n?this.emit("error:range",[i,r]):(this.setStartDate(i),this.setEndDate(r),this.options.inlineMode&&this.render(),this.updateInput(),this.emit("selected",this.getStartDate(),this.getEndDate()))},r.Litepicker.prototype.gotoDate=function(t,e){void 0===e&&(e=0);var n=new s.DateTime(t);n.setDate(1),this.calendars[e]=n.clone(),this.render()},r.Litepicker.prototype.setLockDays=function(t){this.options.lockDays=s.DateTime.convertArray(t,this.options.lockDaysFormat),this.render()},r.Litepicker.prototype.setHighlightedDays=function(t){this.options.highlightedDays=s.DateTime.convertArray(t,this.options.highlightedDaysFormat),this.render()},r.Litepicker.prototype.setOptions=function(t){delete t.element,delete t.elementEnd,delete t.parentEl,t.startDate&&(t.startDate=new s.DateTime(t.startDate,this.options.format,this.options.lang)),t.endDate&&(t.endDate=new s.DateTime(t.endDate,this.options.format,this.options.lang));var e=i(i({},this.options.dropdowns),t.dropdowns),n=i(i({},this.options.buttonText),t.buttonText),r=i(i({},this.options.tooltipText),t.tooltipText);this.options=i(i({},this.options),t),this.options.dropdowns=i({},e),this.options.buttonText=i({},n),this.options.tooltipText=i({},r),!this.options.singleMode||this.options.startDate instanceof s.DateTime||(this.options.startDate=null,this.options.endDate=null),this.options.singleMode||this.options.startDate instanceof s.DateTime&&this.options.endDate instanceof s.DateTime||(this.options.startDate=null,this.options.endDate=null);for(var o=0;oMath.abs(r),a=t.options.numberOfMonths,l=null,c=!1,u="",d=Array.from(t.ui.querySelectorAll(".month-item"));if(o){var h=t.DateTime(t.ui.querySelector(".day-item").dataset.time),p=Number("".concat(1-Math.abs(s)/100)),m=0;if(s>0){m=-Math.abs(s),l=h.clone().add(a,"month");var f=t.options.maxDate;c=!f||l.isSameOrBefore(t.DateTime(f),"month"),u="next"}else{m=Math.abs(s),l=h.clone().subtract(a,"month");var g=t.options.minDate;c=!g||l.isSameOrAfter(t.DateTime(g),"month"),u="prev"}c&&d.map((function(t){t.style.opacity=p,t.style.transform="translateX(".concat(m,"px)")}))}Math.abs(s)+Math.abs(r)>100&&o&&l&&c&&(t.touchTargetMonth=u,t.gotoDate(l))}}),!!n&&{passive:!0}),t.ui.addEventListener("touchend",(function(e){t.touchTargetMonth||Array.from(t.ui.querySelectorAll(".month-item")).map((function(t){t.style.transform="translateX(0px)",t.style.opacity=1})),t.xTouchDown=null,t.yTouchDown=null}),!!n&&{passive:!0})}})},function(t,e,n){var i=n(7);"string"==typeof i&&(i=[[t.i,i,""]]);var s={insert:function(t){var e=document.querySelector("head"),n=window._lastElementInsertedByStyleLoader;window.disableLitepickerStyles||(n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),window._lastElementInsertedByStyleLoader=t)},singleton:!1};n(1)(i,s),i.locals&&(t.exports=i.locals)},function(t,e,n){(e=n(0)(!1)).push([t.i,':root {\n --litepicker-mobilefriendly-backdrop-color-bg: #000;\n}\n\n.litepicker-backdrop {\n display: none;\n background-color: var(--litepicker-mobilefriendly-backdrop-color-bg);\n opacity: 0.3;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n.litepicker-open {\n overflow: hidden;\n}\n\n.litepicker.mobilefriendly[data-plugins*="mobilefriendly"] {\n transform: translate(-50%, -50%);\n font-size: 1.1rem;\n --litepicker-container-months-box-shadow-color: #616161;\n}\n.litepicker.mobilefriendly-portrait {\n --litepicker-day-width: 13.5vw;\n --litepicker-month-width: calc(var(--litepicker-day-width) * 7);\n}\n.litepicker.mobilefriendly-landscape {\n --litepicker-day-width: 5.5vw;\n --litepicker-month-width: calc(var(--litepicker-day-width) * 7);\n}\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months {\n overflow: hidden;\n}\n\n.litepicker.mobilefriendly[data-plugins*="mobilefriendly"] .container__months .month-item-header {\n height: var(--litepicker-day-width);\n}\n\n.litepicker.mobilefriendly[data-plugins*="mobilefriendly"] .container__days > div {\n height: var(--litepicker-day-width);\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months .month-item {\n transform-origin: center;\n}\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months .month-item.touch-target-next {\n animation-name: lp-bounce-target-next;\n animation-duration: .5s;\n animation-timing-function: ease;\n}\n\n.litepicker[data-plugins*="mobilefriendly"] .container__months .month-item.touch-target-prev {\n animation-name: lp-bounce-target-prev;\n animation-duration: .5s;\n animation-timing-function: ease;\n}\n\n@keyframes lp-bounce-target-next {\n from {\n transform: translateX(100px) scale(0.5);\n }\n to {\n transform: translateX(0px) scale(1);\n }\n}\n\n@keyframes lp-bounce-target-prev {\n from {\n transform: translateX(-100px) scale(0.5);\n }\n to {\n transform: translateX(0px) scale(1);\n }\n}',""]),t.exports=e}])},4975:function(t,e,n){"use strict";n.r(e)},6285:function(t,e,n){"use strict";n.d(e,{c9:function(){return fi},dw:function(){return Tn},wB:function(){return bt}});class i extends Error{}class s extends i{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class r extends i{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class o extends i{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class a extends i{}class l extends i{constructor(t){super(`Invalid unit ${t}`)}}class c extends i{}class u extends i{constructor(){super("Zone is an abstract class")}}const d="numeric",h="short",p="long",m={year:d,month:d,day:d},f={year:d,month:h,day:d},g={year:d,month:h,day:d,weekday:h},v={year:d,month:p,day:d},y={year:d,month:p,day:d,weekday:p},b={hour:d,minute:d},_={hour:d,minute:d,second:d},w={hour:d,minute:d,second:d,timeZoneName:h},k={hour:d,minute:d,second:d,timeZoneName:p},T={hour:d,minute:d,hourCycle:"h23"},E={hour:d,minute:d,second:d,hourCycle:"h23"},D={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:h},x={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:p},S={year:d,month:d,day:d,hour:d,minute:d},O={year:d,month:d,day:d,hour:d,minute:d,second:d},L={year:d,month:h,day:d,hour:d,minute:d},C={year:d,month:h,day:d,hour:d,minute:d,second:d},M={year:d,month:h,day:d,weekday:h,hour:d,minute:d},A={year:d,month:p,day:d,hour:d,minute:d,timeZoneName:h},I={year:d,month:p,day:d,hour:d,minute:d,second:d,timeZoneName:h},N={year:d,month:p,day:d,weekday:p,hour:d,minute:d,timeZoneName:p},P={year:d,month:p,day:d,weekday:p,hour:d,minute:d,second:d,timeZoneName:p};class F{get type(){throw new u}get name(){throw new u}get ianaName(){return this.name}get isUniversal(){throw new u}offsetName(t,e){throw new u}formatOffset(t,e){throw new u}offset(t){throw new u}equals(t){throw new u}get isValid(){throw new u}}let j=null;class q extends F{static get instance(){return null===j&&(j=new q),j}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:e,locale:n}){return ne(t,e,n)}formatOffset(t,e){return oe(this.offset(t),e)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return"system"===t.type}get isValid(){return!0}}let H={};const V={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let $={};class B extends F{static create(t){return $[t]||($[t]=new B(t)),$[t]}static resetCache(){$={},H={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(t){return!1}}constructor(t){super(),this.zoneName=t,this.valid=B.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:e,locale:n}){return ne(t,e,n,this.name)}formatOffset(t,e){return oe(this.offset(t),e)}offset(t){const e=new Date(t);if(isNaN(e))return NaN;const n=(i=this.name,H[i]||(H[i]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:i,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),H[i]);var i;let[s,r,o,a,l,c,u]=n.formatToParts?function(t,e){const n=t.formatToParts(e),i=[];for(let t=0;t=0?h:1e3+h,(Qt({year:s,month:r,day:o,hour:24===l?0:l,minute:c,second:u,millisecond:0})-d)/6e4}equals(t){return"iana"===t.type&&t.name===this.name}get isValid(){return this.valid}}let R={};let W={};function z(t,e={}){const n=JSON.stringify([t,e]);let i=W[n];return i||(i=new Intl.DateTimeFormat(t,e),W[n]=i),i}let Y={};let U={};let Z=null;let K={};function J(t,e,n,i){const s=t.listingMode();return"error"===s?null:"en"===s?n(e):i(e)}class G{constructor(t,e,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:i,floor:s,...r}=n;if(!e||Object.keys(r).length>0){const e={useGrouping:!1,...n};n.padTo>0&&(e.minimumIntegerDigits=n.padTo),this.inf=function(t,e={}){const n=JSON.stringify([t,e]);let i=Y[n];return i||(i=new Intl.NumberFormat(t,e),Y[n]=i),i}(t,e)}}format(t){if(this.inf){const e=this.floor?Math.floor(t):t;return this.inf.format(e)}return Wt(this.floor?Math.floor(t):Zt(t,3),this.padTo)}}class Q{constructor(t,e,n){let i;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=t;else if("fixed"===t.zone.type){const e=t.offset/60*-1,n=e>=0?`Etc/GMT+${e}`:`Etc/GMT${e}`;0!==t.offset&&B.create(n).valid?(i=n,this.dt=t):(i="UTC",this.dt=0===t.offset?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else"system"===t.zone.type?this.dt=t:"iana"===t.zone.type?(this.dt=t,i=t.zone.name):(i="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const s={...this.opts};s.timeZone=s.timeZone||i,this.dtf=z(e,s)}format(){return this.originalZone?this.formatToParts().map((({value:t})=>t)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map((t=>{if("timeZoneName"===t.type){const e=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:e}}return t})):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class X{constructor(t,e,n){this.opts={style:"long",...n},!e&&qt()&&(this.rtf=function(t,e={}){const{base:n,...i}=e,s=JSON.stringify([t,i]);let r=U[s];return r||(r=new Intl.RelativeTimeFormat(t,e),U[s]=r),r}(t,n))}format(t,e){return this.rtf?this.rtf.format(t,e):function(t,e,n="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},r=-1===["hours","minutes","seconds"].indexOf(t);if("auto"===n&&r){const n="days"===t;switch(e){case 1:return n?"tomorrow":`next ${s[t][0]}`;case-1:return n?"yesterday":`last ${s[t][0]}`;case 0:return n?"today":`this ${s[t][0]}`}}const o=Object.is(e,-0)||e<0,a=Math.abs(e),l=1===a,c=s[t],u=i?l?c[1]:c[2]||c[1]:l?s[t][0]:t;return o?`${a} ${u} ago`:`in ${a} ${u}`}(e,t,this.opts.numeric,"long"!==this.opts.style)}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}}const tt={firstDay:1,minimalDays:4,weekend:[6,7]};class et{static fromOpts(t){return et.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,e,n,i,s=!1){const r=t||bt.defaultLocale,o=r||(s?"en-US":Z||(Z=(new Intl.DateTimeFormat).resolvedOptions().locale,Z)),a=e||bt.defaultNumberingSystem,l=n||bt.defaultOutputCalendar,c=Bt(i)||bt.defaultWeekSettings;return new et(o,a,l,c,r)}static resetCache(){Z=null,W={},Y={},U={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:n,weekSettings:i}={}){return et.create(t,e,n,i)}constructor(t,e,n,i,s){const[r,o,a]=function(t){const e=t.indexOf("-x-");-1!==e&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(-1===n)return[t];{let e,i;try{e=z(t).resolvedOptions(),i=t}catch(s){const r=t.substring(0,n);e=z(r).resolvedOptions(),i=r}const{numberingSystem:s,calendar:r}=e;return[i,s,r]}}(t);this.locale=r,this.numberingSystem=e||o||null,this.outputCalendar=n||a||null,this.weekSettings=i,this.intl=function(t,e,n){return n||e?(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){var t;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(t=this).numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),e=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t&&e?"en":"intl"}clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?et.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Bt(t.weekSettings)||this.weekSettings,t.defaultToEN||!1):this}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1){return J(this,t,de,(()=>{const n=e?{month:t,day:"numeric"}:{month:t},i=e?"format":"standalone";return this.monthsCache[i][t]||(this.monthsCache[i][t]=function(t){const e=[];for(let n=1;n<=12;n++){const i=fi.utc(2009,n,1);e.push(t(i))}return e}((t=>this.extract(t,n,"month")))),this.monthsCache[i][t]}))}weekdays(t,e=!1){return J(this,t,fe,(()=>{const n=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},i=e?"format":"standalone";return this.weekdaysCache[i][t]||(this.weekdaysCache[i][t]=function(t){const e=[];for(let n=1;n<=7;n++){const i=fi.utc(2016,11,13+n);e.push(t(i))}return e}((t=>this.extract(t,n,"weekday")))),this.weekdaysCache[i][t]}))}meridiems(){return J(this,void 0,(()=>ge),(()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[fi.utc(2016,11,13,9),fi.utc(2016,11,13,19)].map((e=>this.extract(e,t,"dayperiod")))}return this.meridiemCache}))}eras(t){return J(this,t,_e,(()=>{const e={era:t};return this.eraCache[t]||(this.eraCache[t]=[fi.utc(-40,1,1),fi.utc(2017,1,1)].map((t=>this.extract(t,e,"era")))),this.eraCache[t]}))}extract(t,e,n){const i=this.dtFormatter(t,e).formatToParts().find((t=>t.type.toLowerCase()===n));return i?i.value:null}numberFormatter(t={}){return new G(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new Q(t,this.intl,e)}relFormatter(t={}){return new X(this.intl,this.isEnglish(),t)}listFormatter(t={}){return function(t,e={}){const n=JSON.stringify([t,e]);let i=R[n];return i||(i=new Intl.ListFormat(t,e),R[n]=i),i}(this.intl,t)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Ht()?function(t){let e=K[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,K[t]=e}return e}(this.locale):tt}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let nt=null;class it extends F{static get utcInstance(){return null===nt&&(nt=new it(0)),nt}static instance(t){return 0===t?it.utcInstance:new it(t)}static parseSpecifier(t){if(t){const e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new it(ie(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${oe(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${oe(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return oe(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return"fixed"===t.type&&t.fixed===this.fixed}get isValid(){return!0}}class st extends F{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function rt(t,e){if(Pt(t)||null===t)return e;if(t instanceof F)return t;if("string"==typeof t){const n=t.toLowerCase();return"default"===n?e:"local"===n||"system"===n?q.instance:"utc"===n||"gmt"===n?it.utcInstance:it.parseSpecifier(n)||B.create(t)}return Ft(t)?it.instance(t):"object"==typeof t&&"offset"in t&&"function"==typeof t.offset?t:new st(t)}const ot={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},at={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},lt=ot.hanidec.replace(/[\[|\]]/g,"").split("");let ct={};function ut({numberingSystem:t},e=""){const n=t||"latn";return ct[n]||(ct[n]={}),ct[n][e]||(ct[n][e]=new RegExp(`${ot[n]}${e}`)),ct[n][e]}let dt,ht=()=>Date.now(),pt="system",mt=null,ft=null,gt=null,vt=60,yt=null;class bt{static get now(){return ht}static set now(t){ht=t}static set defaultZone(t){pt=t}static get defaultZone(){return rt(pt,q.instance)}static get defaultLocale(){return mt}static set defaultLocale(t){mt=t}static get defaultNumberingSystem(){return ft}static set defaultNumberingSystem(t){ft=t}static get defaultOutputCalendar(){return gt}static set defaultOutputCalendar(t){gt=t}static get defaultWeekSettings(){return yt}static set defaultWeekSettings(t){yt=Bt(t)}static get twoDigitCutoffYear(){return vt}static set twoDigitCutoffYear(t){vt=t%100}static get throwOnInvalid(){return dt}static set throwOnInvalid(t){dt=t}static resetCaches(){et.resetCache(),B.resetCache(),fi.resetCache(),ct={}}}class _t{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const wt=[0,31,59,90,120,151,181,212,243,273,304,334],kt=[0,31,60,91,121,152,182,213,244,274,305,335];function Tt(t,e){return new _t("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Et(t,e,n){const i=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return 0===s?7:s}function Dt(t,e,n){return n+(Kt(t)?kt:wt)[e-1]}function xt(t,e){const n=Kt(t)?kt:wt,i=n.findIndex((t=>tte(i,e,n)?(l=i+1,c=1):l=i,{weekYear:l,weekNumber:c,weekday:a,...ae(t)}}function Lt(t,e=4,n=1){const{weekYear:i,weekNumber:s,weekday:r}=t,o=St(Et(i,1,e),n),a=Jt(i);let l,c=7*s+r-o-7+e;c<1?(l=i-1,c+=Jt(l)):c>a?(l=i+1,c-=Jt(i)):l=i;const{month:u,day:d}=xt(l,c);return{year:l,month:u,day:d,...ae(t)}}function Ct(t){const{year:e,month:n,day:i}=t;return{year:e,ordinal:Dt(e,n,i),...ae(t)}}function Mt(t){const{year:e,ordinal:n}=t,{month:i,day:s}=xt(e,n);return{year:e,month:i,day:s,...ae(t)}}function At(t,e){if(!Pt(t.localWeekday)||!Pt(t.localWeekNumber)||!Pt(t.localWeekYear)){if(!Pt(t.weekday)||!Pt(t.weekNumber)||!Pt(t.weekYear))throw new a("Cannot mix locale-based week fields with ISO-based week fields");return Pt(t.localWeekday)||(t.weekday=t.localWeekday),Pt(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),Pt(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function It(t){const e=jt(t.year),n=Rt(t.month,1,12),i=Rt(t.day,1,Gt(t.year,t.month));return e?n?!i&&Tt("day",t.day):Tt("month",t.month):Tt("year",t.year)}function Nt(t){const{hour:e,minute:n,second:i,millisecond:s}=t,r=Rt(e,0,23)||24===e&&0===n&&0===i&&0===s,o=Rt(n,0,59),a=Rt(i,0,59),l=Rt(s,0,999);return r?o?a?!l&&Tt("millisecond",s):Tt("second",i):Tt("minute",n):Tt("hour",e)}function Pt(t){return void 0===t}function Ft(t){return"number"==typeof t}function jt(t){return"number"==typeof t&&t%1==0}function qt(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function Ht(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(t){return!1}}function Vt(t,e,n){if(0!==t.length)return t.reduce(((t,i)=>{const s=[e(i),i];return t&&n(t[0],s[0])===t[0]?t:s}),null)[1]}function $t(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Bt(t){if(null==t)return null;if("object"!=typeof t)throw new c("Week settings must be an object");if(!Rt(t.firstDay,1,7)||!Rt(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some((t=>!Rt(t,1,7))))throw new c("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Rt(t,e,n){return jt(t)&&t>=e&&t<=n}function Wt(t,e=2){let n;return n=t<0?"-"+(""+-t).padStart(e,"0"):(""+t).padStart(e,"0"),n}function zt(t){return Pt(t)||null===t||""===t?void 0:parseInt(t,10)}function Yt(t){return Pt(t)||null===t||""===t?void 0:parseFloat(t)}function Ut(t){if(!Pt(t)&&null!==t&&""!==t){const e=1e3*parseFloat("0."+t);return Math.floor(e)}}function Zt(t,e,n=!1){const i=10**e;return(n?Math.trunc:Math.round)(t*i)/i}function Kt(t){return t%4==0&&(t%100!=0||t%400==0)}function Jt(t){return Kt(t)?366:365}function Gt(t,e){const n=function(t,e){return t-e*Math.floor(t/e)}(e-1,12)+1;return 2===n?Kt(t+(e-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Qt(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function Xt(t,e,n){return-St(Et(t,1,e),n)+e-1}function te(t,e=4,n=1){const i=Xt(t,e,n),s=Xt(t+1,e,n);return(Jt(t)-i+s)/7}function ee(t){return t>99?t:t>bt.twoDigitCutoffYear?1900+t:2e3+t}function ne(t,e,n,i=null){const s=new Date(t),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(r.timeZone=i);const o={timeZoneName:e,...r},a=new Intl.DateTimeFormat(n,o).formatToParts(s).find((t=>"timezonename"===t.type.toLowerCase()));return a?a.value:null}function ie(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const i=parseInt(e,10)||0;return 60*n+(n<0||Object.is(n,-0)?-i:i)}function se(t){const e=Number(t);if("boolean"==typeof t||""===t||Number.isNaN(e))throw new c(`Invalid unit value ${t}`);return e}function re(t,e){const n={};for(const i in t)if($t(t,i)){const s=t[i];if(null==s)continue;n[e(i)]=se(s)}return n}function oe(t,e){const n=Math.trunc(Math.abs(t/60)),i=Math.trunc(Math.abs(t%60)),s=t>=0?"+":"-";switch(e){case"short":return`${s}${Wt(n,2)}:${Wt(i,2)}`;case"narrow":return`${s}${n}${i>0?`:${i}`:""}`;case"techie":return`${s}${Wt(n,2)}${Wt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function ae(t){return function(t,e){return e.reduce(((e,n)=>(e[n]=t[n],e)),{})}(t,["hour","minute","second","millisecond"])}const le=["January","February","March","April","May","June","July","August","September","October","November","December"],ce=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ue=["J","F","M","A","M","J","J","A","S","O","N","D"];function de(t){switch(t){case"narrow":return[...ue];case"short":return[...ce];case"long":return[...le];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const he=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],me=["M","T","W","T","F","S","S"];function fe(t){switch(t){case"narrow":return[...me];case"short":return[...pe];case"long":return[...he];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ge=["AM","PM"],ve=["Before Christ","Anno Domini"],ye=["BC","AD"],be=["B","A"];function _e(t){switch(t){case"narrow":return[...be];case"short":return[...ye];case"long":return[...ve];default:return null}}function we(t,e){let n="";for(const i of t)i.literal?n+=i.val:n+=e(i.val);return n}const ke={D:m,DD:f,DDD:v,DDDD:y,t:b,tt:_,ttt:w,tttt:k,T:T,TT:E,TTT:D,TTTT:x,f:S,ff:L,fff:A,ffff:N,F:O,FF:C,FFF:I,FFFF:P};class Te{static create(t,e={}){return new Te(t,e)}static parseFormat(t){let e=null,n="",i=!1;const s=[];for(let r=0;r0&&s.push({literal:i||/^\s+$/.test(n),val:n}),e=null,n="",i=!i):i||o===e?n+=o:(n.length>0&&s.push({literal:/^\s+$/.test(n),val:n}),n=o,e=o)}return n.length>0&&s.push({literal:i||/^\s+$/.test(n),val:n}),s}static macroTokenToFormatOpts(t){return ke[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}dtFormatter(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e})}formatDateTime(t,e){return this.dtFormatter(t,e).format()}formatDateTimeParts(t,e){return this.dtFormatter(t,e).formatToParts()}formatInterval(t,e){return this.dtFormatter(t.start,e).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,e){return this.dtFormatter(t,e).resolvedOptions()}num(t,e=0){if(this.opts.forceSimple)return Wt(t,e);const n={...this.opts};return e>0&&(n.padTo=e),this.loc.numberFormatter(n).format(t)}formatDateTimeFromString(t,e){const n="en"===this.loc.listingMode(),i=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(e,n)=>this.loc.extract(t,e,n),r=e=>t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):"",o=()=>n?function(t){return ge[t.hour<12?0:1]}(t):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(e,i)=>n?function(t,e){return de(e)[t.month-1]}(t,e):s(i?{month:e}:{month:e,day:"numeric"},"month"),l=(e,i)=>n?function(t,e){return fe(e)[t.weekday-1]}(t,e):s(i?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday"),c=e=>{const n=Te.macroTokenToFormatOpts(e);return n?this.formatWithSystemDefault(t,n):e},u=e=>n?function(t,e){return _e(e)[t.year<0?0:1]}(t,e):s({era:e},"era");return we(Te.parseFormat(e),(e=>{switch(e){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12==0?12:t.hour%12);case"hh":return this.num(t.hour%12==0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return o();case"d":return i?s({day:"numeric"},"day"):this.num(t.day);case"dd":return i?s({day:"2-digit"},"day"):this.num(t.day,2);case"c":case"E":return this.num(t.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return i?s({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return i?s({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return i?s({month:"numeric"},"month"):this.num(t.month);case"MM":return i?s({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return i?s({year:"numeric"},"year"):this.num(t.year);case"yy":return i?s({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return i?s({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return i?s({year:"numeric"},"year"):this.num(t.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return c(e)}}))}formatDurationFromString(t,e){const n=t=>{switch(t[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=Te.parseFormat(e),s=i.reduce(((t,{literal:e,val:n})=>e?t:t.concat(n)),[]);return we(i,(t=>e=>{const i=n(e);return i?this.num(t.get(i),e.length):e})(t.shiftTo(...s.map(n).filter((t=>t)))))}}const Ee=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function De(...t){const e=t.reduce(((t,e)=>t+e.source),"");return RegExp(`^${e}$`)}function xe(...t){return e=>t.reduce((([t,n,i],s)=>{const[r,o,a]=s(e,i);return[{...t,...r},o||n,a]}),[{},null,1]).slice(0,2)}function Se(t,...e){if(null==t)return[null,null];for(const[n,i]of e){const e=n.exec(t);if(e)return i(e)}return[null,null]}function Oe(...t){return(e,n)=>{const i={};let s;for(s=0;svoid 0!==t&&(e||t&&u)?-t:t;return[{years:h(Yt(n)),months:h(Yt(i)),weeks:h(Yt(s)),days:h(Yt(r)),hours:h(Yt(o)),minutes:h(Yt(a)),seconds:h(Yt(l),"-0"===l),milliseconds:h(Ut(c),d)}]}const We={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ze(t,e,n,i,s,r,o){const a={year:2===e.length?ee(zt(e)):zt(e),month:ce.indexOf(n)+1,day:zt(i),hour:zt(s),minute:zt(r)};return o&&(a.second=zt(o)),t&&(a.weekday=t.length>3?he.indexOf(t)+1:pe.indexOf(t)+1),a}const Ye=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ue(t){const[,e,n,i,s,r,o,a,l,c,u,d]=t,h=ze(e,s,i,n,r,o,a);let p;return p=l?We[l]:c?0:ie(u,d),[h,new it(p)]}const Ze=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Ke=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Je=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Ge(t){const[,e,n,i,s,r,o,a]=t;return[ze(e,s,i,n,r,o,a),it.utcInstance]}function Qe(t){const[,e,n,i,s,r,o,a]=t;return[ze(e,a,n,i,s,r,o),it.utcInstance]}const Xe=De(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ae),tn=De(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ae),en=De(/(\d{4})-?(\d{3})/,Ae),nn=De(Me),sn=xe((function(t,e){return[{year:je(t,e),month:je(t,e+1,1),day:je(t,e+2,1)},null,e+3]}),qe,He,Ve),rn=xe(Ie,qe,He,Ve),on=xe(Ne,qe,He,Ve),an=xe(qe,He,Ve);const ln=xe(qe);const cn=De(/(\d{4})-(\d\d)-(\d\d)/,Fe),un=De(Pe),dn=xe(qe,He,Ve);const hn="Invalid Duration",pn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},mn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...pn},fn=365.2425,gn=30.436875,vn={years:{quarters:4,months:12,weeks:52.1775,days:fn,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:gn,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...pn},yn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],bn=yn.slice(0).reverse();function _n(t,e,n=!1){const i={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Tn(i)}function wn(t,e){let n=e.milliseconds??0;for(const i of bn.slice(1))e[i]&&(n+=e[i]*t[i].milliseconds);return n}function kn(t,e){const n=wn(t,e)<0?-1:1;yn.reduceRight(((i,s)=>{if(Pt(e[s]))return i;if(i){const r=e[i]*n,o=t[s][i],a=Math.floor(r/o);e[s]+=a*n,e[i]-=a*o*n}return s}),null),yn.reduce(((n,i)=>{if(Pt(e[i]))return n;if(n){const s=e[n]%1;e[n]-=s,e[i]+=s*t[n][i]}return i}),null)}class Tn{constructor(t){const e="longterm"===t.conversionAccuracy||!1;let n=e?vn:mn;t.matrix&&(n=t.matrix),this.values=t.values,this.loc=t.loc||et.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,e){return Tn.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(null==t||"object"!=typeof t)throw new c("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new Tn({values:re(t,Tn.normalizeUnit),loc:et.fromObject(e),conversionAccuracy:e.conversionAccuracy,matrix:e.matrix})}static fromDurationLike(t){if(Ft(t))return Tn.fromMillis(t);if(Tn.isDuration(t))return t;if("object"==typeof t)return Tn.fromObject(t);throw new c(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){const[n]=function(t){return Se(t,[Be,Re])}(t);return n?Tn.fromObject(n,e):Tn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){const[n]=function(t){return Se(t,[$e,ln])}(t);return n?Tn.fromObject(n,e):Tn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the Duration is invalid");const n=t instanceof _t?t:new _t(t,e);if(bt.throwOnInvalid)throw new o(n);return new Tn({invalid:n})}static normalizeUnit(t){const e={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t?t.toLowerCase():t];if(!e)throw new l(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){const n={...e,floor:!1!==e.round&&!1!==e.floor};return this.isValid?Te.create(this.loc,n).formatDurationFromString(this,t):hn}toHuman(t={}){if(!this.isValid)return hn;const e=yn.map((e=>{const n=this.values[e];return Pt(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:e.slice(0,-1)}).format(n)})).filter((t=>t));return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=Zt(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const e=this.toMillis();if(e<0||e>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1};return fi.fromMillis(e,{zone:"UTC"}).toISOTime(t)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?wn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const e=Tn.fromDurationLike(t),n={};for(const t of yn)($t(e.values,t)||$t(this.values,t))&&(n[t]=e.get(t)+this.get(t));return _n(this,{values:n},!0)}minus(t){if(!this.isValid)return this;const e=Tn.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=se(t(this.values[n],n));return _n(this,{values:e},!0)}get(t){return this[Tn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;return _n(this,{values:{...this.values,...re(t,Tn.normalizeUnit)}})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:n,matrix:i}={}){return _n(this,{loc:this.loc.clone({locale:t,numberingSystem:e}),matrix:i,conversionAccuracy:n})}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return kn(this.matrix,t),_n(this,{values:t},!0)}rescale(){if(!this.isValid)return this;return _n(this,{values:function(t){const e={};for(const[n,i]of Object.entries(t))0!==i&&(e[n]=i);return e}(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...t){if(!this.isValid)return this;if(0===t.length)return this;t=t.map((t=>Tn.normalizeUnit(t)));const e={},n={},i=this.toObject();let s;for(const r of yn)if(t.indexOf(r)>=0){s=r;let t=0;for(const e in n)t+=this.matrix[e][r]*n[e],n[e]=0;Ft(i[r])&&(t+=i[r]);const o=Math.trunc(t);e[r]=o,n[r]=(1e3*t-1e3*o)/1e3}else Ft(i[r])&&(n[r]=i[r]);for(const t in n)0!==n[t]&&(e[s]+=t===s?n[t]:n[t]/this.matrix[s][t]);return kn(this.matrix,e),_n(this,{values:e},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const e of Object.keys(this.values))t[e]=0===this.values[e]?0:-this.values[e];return _n(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;for(const i of yn)if(e=this.values[i],n=t.values[i],!(void 0===e||0===e?void 0===n||0===n:e===n))return!1;var e,n;return!0}}const En="Invalid Interval";class Dn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the Interval is invalid");const n=t instanceof _t?t:new _t(t,e);if(bt.throwOnInvalid)throw new r(n);return new Dn({invalid:n})}static fromDateTimes(t,e){const n=gi(t),i=gi(e),s=function(t,e){return t&&t.isValid?e&&e.isValid?et}isBefore(t){return!!this.isValid&&this.e<=t}contains(t){return!!this.isValid&&(this.s<=t&&this.e>t)}set({start:t,end:e}={}){return this.isValid?Dn.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];const e=t.map(gi).filter((t=>this.contains(t))).sort(((t,e)=>t.toMillis()-e.toMillis())),n=[];let{s:i}=this,s=0;for(;i+this.e?this.e:t;n.push(Dn.fromDateTimes(i,r)),i=r,s+=1}return n}splitBy(t){const e=Tn.fromDurationLike(t);if(!this.isValid||!e.isValid||0===e.as("milliseconds"))return[];let n,{s:i}=this,s=1;const r=[];for(;it*s)));n=+t>+this.e?this.e:t,r.push(Dn.fromDateTimes(i,n)),i=n,s+=1}return r}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e)}equals(t){return!(!this.isValid||!t.isValid)&&(this.s.equals(t.s)&&this.e.equals(t.e))}intersection(t){if(!this.isValid)return this;const e=this.s>t.s?this.s:t.s,n=this.e=n?null:Dn.fromDateTimes(e,n)}union(t){if(!this.isValid)return this;const e=this.st.e?this.e:t.e;return Dn.fromDateTimes(e,n)}static merge(t){const[e,n]=t.sort(((t,e)=>t.s-e.s)).reduce((([t,e],n)=>e?e.overlaps(n)||e.abutsStart(n)?[t,e.union(n)]:[t.concat([e]),n]:[t,n]),[[],null]);return n&&e.push(n),e}static xor(t){let e=null,n=0;const i=[],s=t.map((t=>[{time:t.s,type:"s"},{time:t.e,type:"e"}])),r=Array.prototype.concat(...s).sort(((t,e)=>t.time-e.time));for(const t of r)n+="s"===t.type?1:-1,1===n?e=t.time:(e&&+e!=+t.time&&i.push(Dn.fromDateTimes(e,t.time)),e=null);return Dn.merge(i)}difference(...t){return Dn.xor([this].concat(t)).map((t=>this.intersection(t))).filter((t=>t&&!t.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:En}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=m,e={}){return this.isValid?Te.create(this.s.loc.clone(e),t).formatInterval(this):En}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:En}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:En}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:En}toFormat(t,{separator:e=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:En}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):Tn.invalid(this.invalidReason)}mapEndpoints(t){return Dn.fromDateTimes(t(this.s),t(this.e))}}class xn{static hasDST(t=bt.defaultZone){const e=fi.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return B.isValidZone(t)}static normalizeZone(t){return rt(t,bt.defaultZone)}static getStartOfWeek({locale:t=null,locObj:e=null}={}){return(e||et.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:e=null}={}){return(e||et.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:e=null}={}){return(e||et.create(t)).getWeekendDays().slice()}static months(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||et.create(e,n,s)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||et.create(e,n,s)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null}={}){return(i||et.create(e,n,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:n=null,locObj:i=null}={}){return(i||et.create(e,n,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return et.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return et.create(e,null,"gregory").eras(t)}static features(){return{relative:qt(),localeWeek:Ht()}}}function Sn(t,e){const n=t=>t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(e)-n(t);return Math.floor(Tn.fromMillis(i).as("days"))}function On(t,e,n,i){let[s,r,o,a]=function(t,e,n){const i=[["years",(t,e)=>e.year-t.year],["quarters",(t,e)=>e.quarter-t.quarter+4*(e.year-t.year)],["months",(t,e)=>e.month-t.month+12*(e.year-t.year)],["weeks",(t,e)=>{const n=Sn(t,e);return(n-n%7)/7}],["days",Sn]],s={},r=t;let o,a;for(const[l,c]of i)n.indexOf(l)>=0&&(o=l,s[l]=c(t,e),a=r.plus(s),a>e?(s[l]--,(t=r.plus(s))>e&&(a=t,s[l]--,t=r.plus(s))):t=a);return[t,s,a,o]}(t,e,n);const l=e-s,c=n.filter((t=>["hours","minutes","seconds","milliseconds"].indexOf(t)>=0));0===c.length&&(o0?Tn.fromMillis(l,i).shiftTo(...c).plus(u):u}function Ln(t,e=(t=>t)){return{regex:t,deser:([t])=>e(function(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n=n&&i<=s&&(e+=i-n)}}return parseInt(e,10)}return e}(t))}}const Cn=`[ ${String.fromCharCode(160)}]`,Mn=new RegExp(Cn,"g");function An(t){return t.replace(/\./g,"\\.?").replace(Mn,Cn)}function In(t){return t.replace(/\./g,"").replace(Mn," ").toLowerCase()}function Nn(t,e){return null===t?null:{regex:RegExp(t.map(An).join("|")),deser:([n])=>t.findIndex((t=>In(n)===In(t)))+e}}function Pn(t,e){return{regex:t,deser:([,t,e])=>ie(t,e),groups:e}}function Fn(t){return{regex:t,deser:([t])=>t}}const jn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let qn=null;function Hn(t,e){return Array.prototype.concat(...t.map((t=>function(t,e){if(t.literal)return t;const n=Bn(Te.macroTokenToFormatOpts(t.val),e);return null==n||n.includes(void 0)?t:n}(t,e))))}class Vn{constructor(t,e){if(this.locale=t,this.format=e,this.tokens=Hn(Te.parseFormat(e),t),this.units=this.tokens.map((e=>function(t,e){const n=ut(e),i=ut(e,"{2}"),s=ut(e,"{3}"),r=ut(e,"{4}"),o=ut(e,"{6}"),a=ut(e,"{1,2}"),l=ut(e,"{1,3}"),c=ut(e,"{1,6}"),u=ut(e,"{1,9}"),d=ut(e,"{2,4}"),h=ut(e,"{4,6}"),p=t=>{return{regex:RegExp((e=t.val,e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([t])=>t,literal:!0};var e},m=(m=>{if(t.literal)return p(m);switch(m.val){case"G":return Nn(e.eras("short"),0);case"GG":return Nn(e.eras("long"),0);case"y":return Ln(c);case"yy":case"kk":return Ln(d,ee);case"yyyy":case"kkkk":return Ln(r);case"yyyyy":return Ln(h);case"yyyyyy":return Ln(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Ln(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Ln(i);case"MMM":return Nn(e.months("short",!0),1);case"MMMM":return Nn(e.months("long",!0),1);case"LLL":return Nn(e.months("short",!1),1);case"LLLL":return Nn(e.months("long",!1),1);case"o":case"S":return Ln(l);case"ooo":case"SSS":return Ln(s);case"u":return Fn(u);case"uu":return Fn(a);case"uuu":case"E":case"c":return Ln(n);case"a":return Nn(e.meridiems(),0);case"EEE":return Nn(e.weekdays("short",!1),1);case"EEEE":return Nn(e.weekdays("long",!1),1);case"ccc":return Nn(e.weekdays("short",!0),1);case"cccc":return Nn(e.weekdays("long",!0),1);case"Z":case"ZZ":return Pn(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return Pn(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return Fn(/[a-z_+-/]{1,256}?/i);case" ":return Fn(/[^\S\n\r]/);default:return p(m)}})(t)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return m.token=t,m}(e,t))),this.disqualifyingUnit=this.units.find((t=>t.invalidReason)),!this.disqualifyingUnit){const[t,e]=[`^${(n=this.units).map((t=>t.regex)).reduce(((t,e)=>`${t}(${e.source})`),"")}$`,n];this.regex=RegExp(t,"i"),this.handlers=e}var n}explainFromTokens(t){if(this.isValid){const[e,n]=function(t,e,n){const i=t.match(e);if(i){const t={};let e=1;for(const s in n)if($t(n,s)){const r=n[s],o=r.groups?r.groups+1:1;!r.literal&&r.token&&(t[r.token.val[0]]=r.deser(i.slice(e,e+o))),e+=o}return[i,t]}return[i,{}]}(t,this.regex,this.handlers),[i,s,r]=n?function(t){let e,n=null;return Pt(t.z)||(n=B.create(t.z)),Pt(t.Z)||(n||(n=new it(t.Z)),e=t.Z),Pt(t.q)||(t.M=3*(t.q-1)+1),Pt(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),Pt(t.u)||(t.S=Ut(t.u)),[Object.keys(t).reduce(((e,n)=>{const i=(t=>{switch(t){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return i&&(e[i]=t[n]),e}),{}),n,e]}(n):[null,null,void 0];if($t(n,"a")&&$t(n,"H"))throw new a("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:e,matches:n,result:i,zone:s,specificOffset:r}}return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function $n(t,e,n){return new Vn(t,n).explainFromTokens(e)}function Bn(t,e){if(!t)return null;const n=Te.create(e,t).dtFormatter((qn||(qn=fi.fromMillis(1555555555555)),qn)),i=n.formatToParts(),s=n.resolvedOptions();return i.map((e=>function(t,e,n){const{type:i,value:s}=t;if("literal"===i){const t=/^\s+$/.test(s);return{literal:!t,val:t?" ":s}}const r=e[i];let o=i;"hour"===i&&(o=null!=e.hour12?e.hour12?"hour12":"hour24":null!=e.hourCycle?"h11"===e.hourCycle||"h12"===e.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let a=jn[o];if("object"==typeof a&&(a=a[r]),a)return{literal:!1,val:a}}(e,t,s)))}const Rn="Invalid DateTime",Wn=864e13;function zn(t){return new _t("unsupported zone",`the zone "${t.name}" is not supported`)}function Yn(t){return null===t.weekData&&(t.weekData=Ot(t.c)),t.weekData}function Un(t){return null===t.localWeekData&&(t.localWeekData=Ot(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Zn(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new fi({...n,...e,old:n})}function Kn(t,e,n){let i=t-60*e*1e3;const s=n.offset(i);if(e===s)return[i,e];i-=60*(s-e)*1e3;const r=n.offset(i);return s===r?[i,s]:[t-60*Math.min(s,r)*1e3,Math.max(s,r)]}function Jn(t,e){const n=new Date(t+=60*e*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Gn(t,e,n){return Kn(Qt(t),e,n)}function Qn(t,e){const n=t.o,i=t.c.year+Math.trunc(e.years),s=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),r={...t.c,year:i,month:s,day:Math.min(t.c.day,Gt(i,s))+Math.trunc(e.days)+7*Math.trunc(e.weeks)},o=Tn.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=Qt(r);let[l,c]=Kn(a,n,t.zone);return 0!==o&&(l+=o,c=t.zone.offset(l)),{ts:l,o:c}}function Xn(t,e,n,i,s,r){const{setZone:o,zone:a}=n;if(t&&0!==Object.keys(t).length||e){const i=e||a,s=fi.fromObject(t,{...n,zone:i,specificOffset:r});return o?s:s.setZone(a)}return fi.invalid(new _t("unparsable",`the input "${s}" can't be parsed as ${i}`))}function ti(t,e,n=!0){return t.isValid?Te.create(et.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function ei(t,e){const n=t.c.year>9999||t.c.year<0;let i="";return n&&t.c.year>=0&&(i+="+"),i+=Wt(t.c.year,n?6:4),e?(i+="-",i+=Wt(t.c.month),i+="-",i+=Wt(t.c.day)):(i+=Wt(t.c.month),i+=Wt(t.c.day)),i}function ni(t,e,n,i,s,r){let o=Wt(t.c.hour);return e?(o+=":",o+=Wt(t.c.minute),0===t.c.millisecond&&0===t.c.second&&n||(o+=":")):o+=Wt(t.c.minute),0===t.c.millisecond&&0===t.c.second&&n||(o+=Wt(t.c.second),0===t.c.millisecond&&i||(o+=".",o+=Wt(t.c.millisecond,3))),s&&(t.isOffsetFixed&&0===t.offset&&!r?o+="Z":t.o<0?(o+="-",o+=Wt(Math.trunc(-t.o/60)),o+=":",o+=Wt(Math.trunc(-t.o%60))):(o+="+",o+=Wt(Math.trunc(t.o/60)),o+=":",o+=Wt(Math.trunc(t.o%60)))),r&&(o+="["+t.zone.ianaName+"]"),o}const ii={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},si={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ri={ordinal:1,hour:0,minute:0,second:0,millisecond:0},oi=["year","month","day","hour","minute","second","millisecond"],ai=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],li=["year","ordinal","hour","minute","second","millisecond"];function ci(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return function(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new l(t);return e}(t)}}function ui(t,e){const n=rt(e.zone,bt.defaultZone);if(!n.isValid)return fi.invalid(zn(n));const i=et.fromObject(e);let s,r;if(Pt(t.year))s=bt.now();else{for(const e of oi)Pt(t[e])&&(t[e]=ii[e]);const e=It(t)||Nt(t);if(e)return fi.invalid(e);const i=function(t){return mi[t]||(void 0===pi&&(pi=bt.now()),mi[t]=t.offset(pi)),mi[t]}(n);[s,r]=Gn(t,i,n)}return new fi({ts:s,zone:n,loc:i,o:r})}function di(t,e,n){const i=!!Pt(n.round)||n.round,s=(t,s)=>{t=Zt(t,i||n.calendary?0:2,!0);return e.loc.clone(n).relFormatter(n).format(t,s)},r=i=>n.calendary?e.hasSame(t,i)?0:e.startOf(i).diff(t.startOf(i),i).get(i):e.diff(t,i).get(i);if(n.unit)return s(r(n.unit),n.unit);for(const t of n.units){const e=r(t);if(Math.abs(e)>=1)return s(e,t)}return s(t>e?-0:0,n.units[n.units.length-1])}function hi(t){let e,n={};return t.length>0&&"object"==typeof t[t.length-1]?(n=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[n,e]}let pi,mi={};class fi{constructor(t){const e=t.zone||bt.defaultZone;let n=t.invalid||(Number.isNaN(t.ts)?new _t("invalid input"):null)||(e.isValid?null:zn(e));this.ts=Pt(t.ts)?bt.now():t.ts;let i=null,s=null;if(!n){if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[i,s]=[t.old.c,t.old.o];else{const r=Ft(t.o)&&!t.old?t.o:e.offset(this.ts);i=Jn(this.ts,r),n=Number.isNaN(i.year)?new _t("invalid input"):null,i=n?null:i,s=n?null:r}}this._zone=e,this.loc=t.loc||et.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}static now(){return new fi({})}static local(){const[t,e]=hi(arguments),[n,i,s,r,o,a,l]=e;return ui({year:n,month:i,day:s,hour:r,minute:o,second:a,millisecond:l},t)}static utc(){const[t,e]=hi(arguments),[n,i,s,r,o,a,l]=e;return t.zone=it.utcInstance,ui({year:n,month:i,day:s,hour:r,minute:o,second:a,millisecond:l},t)}static fromJSDate(t,e={}){const n=(i=t,"[object Date]"===Object.prototype.toString.call(i)?t.valueOf():NaN);var i;if(Number.isNaN(n))return fi.invalid("invalid input");const s=rt(e.zone,bt.defaultZone);return s.isValid?new fi({ts:n,zone:s,loc:et.fromObject(e)}):fi.invalid(zn(s))}static fromMillis(t,e={}){if(Ft(t))return t<-Wn||t>Wn?fi.invalid("Timestamp out of range"):new fi({ts:t,zone:rt(e.zone,bt.defaultZone),loc:et.fromObject(e)});throw new c(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(Ft(t))return new fi({ts:1e3*t,zone:rt(e.zone,bt.defaultZone),loc:et.fromObject(e)});throw new c("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};const n=rt(e.zone,bt.defaultZone);if(!n.isValid)return fi.invalid(zn(n));const i=et.fromObject(e),s=re(t,ci),{minDaysInFirstWeek:r,startOfWeek:o}=At(s,i),l=bt.now(),c=Pt(e.specificOffset)?n.offset(l):e.specificOffset,u=!Pt(s.ordinal),d=!Pt(s.year),h=!Pt(s.month)||!Pt(s.day),p=d||h,m=s.weekYear||s.weekNumber;if((p||u)&&m)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new a("Can't mix ordinal dates with month/day");const f=m||s.weekday&&!p;let g,v,y=Jn(l,c);f?(g=ai,v=si,y=Ot(y,r,o)):u?(g=li,v=ri,y=Ct(y)):(g=oi,v=ii);let b=!1;for(const t of g){Pt(s[t])?s[t]=b?v[t]:y[t]:b=!0}const _=f?function(t,e=4,n=1){const i=jt(t.weekYear),s=Rt(t.weekNumber,1,te(t.weekYear,e,n)),r=Rt(t.weekday,1,7);return i?s?!r&&Tt("weekday",t.weekday):Tt("week",t.weekNumber):Tt("weekYear",t.weekYear)}(s,r,o):u?function(t){const e=jt(t.year),n=Rt(t.ordinal,1,Jt(t.year));return e?!n&&Tt("ordinal",t.ordinal):Tt("year",t.year)}(s):It(s),w=_||Nt(s);if(w)return fi.invalid(w);const k=f?Lt(s,r,o):u?Mt(s):s,[T,E]=Gn(k,c,n),D=new fi({ts:T,zone:n,o:E,loc:i});return s.weekday&&p&&t.weekday!==D.weekday?fi.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${D.toISO()}`):D.isValid?D:fi.invalid(D.invalid)}static fromISO(t,e={}){const[n,i]=function(t){return Se(t,[Xe,sn],[tn,rn],[en,on],[nn,an])}(t);return Xn(n,i,e,"ISO 8601",t)}static fromRFC2822(t,e={}){const[n,i]=function(t){return Se(function(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[Ye,Ue])}(t);return Xn(n,i,e,"RFC 2822",t)}static fromHTTP(t,e={}){const[n,i]=function(t){return Se(t,[Ze,Ge],[Ke,Ge],[Je,Qe])}(t);return Xn(n,i,e,"HTTP",e)}static fromFormat(t,e,n={}){if(Pt(t)||Pt(e))throw new c("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:s=null}=n,r=et.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),[o,a,l,u]=function(t,e,n){const{result:i,zone:s,specificOffset:r,invalidReason:o}=$n(t,e,n);return[i,s,r,o]}(r,t,e);return u?fi.invalid(u):Xn(o,a,n,`format ${e}`,t,l)}static fromString(t,e,n={}){return fi.fromFormat(t,e,n)}static fromSQL(t,e={}){const[n,i]=function(t){return Se(t,[cn,sn],[un,dn])}(t);return Xn(n,i,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the DateTime is invalid");const n=t instanceof _t?t:new _t(t,e);if(bt.throwOnInvalid)throw new s(n);return new fi({invalid:n})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,e={}){const n=Bn(t,et.fromObject(e));return n?n.map((t=>t?t.val:null)).join(""):null}static expandFormat(t,e={}){return Hn(Te.parseFormat(t),et.fromObject(e)).map((t=>t.val)).join("")}static resetCache(){pi=void 0,mi={}}get(t){return this[t]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Yn(this).weekYear:NaN}get weekNumber(){return this.isValid?Yn(this).weekNumber:NaN}get weekday(){return this.isValid?Yn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Un(this).weekday:NaN}get localWeekNumber(){return this.isValid?Un(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Un(this).weekYear:NaN}get ordinal(){return this.isValid?Ct(this.c).ordinal:NaN}get monthShort(){return this.isValid?xn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?xn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?xn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?xn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,e=6e4,n=Qt(this.c),i=this.zone.offset(n-t),s=this.zone.offset(n+t),r=this.zone.offset(n-i*e),o=this.zone.offset(n-s*e);if(r===o)return[this];const a=n-r*e,l=n-o*e,c=Jn(a,r),u=Jn(l,o);return c.hour===u.hour&&c.minute===u.minute&&c.second===u.second&&c.millisecond===u.millisecond?[Zn(this,{ts:a}),Zn(this,{ts:l})]:[this]}get isInLeapYear(){return Kt(this.year)}get daysInMonth(){return Gt(this.year,this.month)}get daysInYear(){return this.isValid?Jt(this.year):NaN}get weeksInWeekYear(){return this.isValid?te(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?te(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:e,numberingSystem:n,calendar:i}=Te.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:n,outputCalendar:i}}toUTC(t=0,e={}){return this.setZone(it.instance(t),e)}toLocal(){return this.setZone(bt.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:n=!1}={}){if((t=rt(t,bt.defaultZone)).equals(this.zone))return this;if(t.isValid){let i=this.ts;if(e||n){const e=t.offset(this.ts),n=this.toObject();[i]=Gn(n,e,t)}return Zn(this,{ts:i,zone:t})}return fi.invalid(zn(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:n}={}){return Zn(this,{loc:this.loc.clone({locale:t,numberingSystem:e,outputCalendar:n})})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const e=re(t,ci),{minDaysInFirstWeek:n,startOfWeek:i}=At(e,this.loc),s=!Pt(e.weekYear)||!Pt(e.weekNumber)||!Pt(e.weekday),r=!Pt(e.ordinal),o=!Pt(e.year),l=!Pt(e.month)||!Pt(e.day),c=o||l,u=e.weekYear||e.weekNumber;if((c||r)&&u)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new a("Can't mix ordinal dates with month/day");let d;s?d=Lt({...Ot(this.c,n,i),...e},n,i):Pt(e.ordinal)?(d={...this.toObject(),...e},Pt(e.day)&&(d.day=Math.min(Gt(d.year,d.month),d.day))):d=Mt({...Ct(this.c),...e});const[h,p]=Gn(d,this.o,this.zone);return Zn(this,{ts:h,o:p})}plus(t){if(!this.isValid)return this;return Zn(this,Qn(this,Tn.fromDurationLike(t)))}minus(t){if(!this.isValid)return this;return Zn(this,Qn(this,Tn.fromDurationLike(t).negate()))}startOf(t,{useLocaleWeeks:e=!1}={}){if(!this.isValid)return this;const n={},i=Tn.normalizeUnit(t);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===i)if(e){const t=this.loc.getStartOfWeek(),{weekday:e}=this;ethis.valueOf(),o=On(r?this:t,r?t:this,s,i);var a;return r?o.negate():o}diffNow(t="milliseconds",e={}){return this.diff(fi.now(),t,e)}until(t){return this.isValid?Dn.fromDateTimes(this,t):this}hasSame(t,e,n){if(!this.isValid)return!1;const i=t.valueOf(),s=this.setZone(t.zone,{keepLocalTime:!0});return s.startOf(e,n)<=i&&i<=s.endOf(e,n)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const e=t.base||fi.fromObject({},{zone:this.zone}),n=t.padding?thist.valueOf()),Math.min)}static max(...t){if(!t.every(fi.isDateTime))throw new c("max requires all arguments be DateTimes");return Vt(t,(t=>t.valueOf()),Math.max)}static fromFormatExplain(t,e,n={}){const{locale:i=null,numberingSystem:s=null}=n;return $n(et.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),t,e)}static fromStringExplain(t,e,n={}){return fi.fromFormatExplain(t,e,n)}static buildFormatParser(t,e={}){const{locale:n=null,numberingSystem:i=null}=e,s=et.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new Vn(s,t)}static fromFormatParser(t,e,n={}){if(Pt(t)||Pt(e))throw new c("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:s=null}=n,r=et.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});if(!r.equals(e.locale))throw new c(`fromFormatParser called with a locale of ${r}, but the format parser was created for ${e.locale}`);const{result:o,zone:a,specificOffset:l,invalidReason:u}=e.explainFromTokens(t);return u?fi.invalid(u):Xn(o,a,n,`format ${e.format}`,t,l)}static get DATE_SHORT(){return m}static get DATE_MED(){return f}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return v}static get DATE_HUGE(){return y}static get TIME_SIMPLE(){return b}static get TIME_WITH_SECONDS(){return _}static get TIME_WITH_SHORT_OFFSET(){return w}static get TIME_WITH_LONG_OFFSET(){return k}static get TIME_24_SIMPLE(){return T}static get TIME_24_WITH_SECONDS(){return E}static get TIME_24_WITH_SHORT_OFFSET(){return D}static get TIME_24_WITH_LONG_OFFSET(){return x}static get DATETIME_SHORT(){return S}static get DATETIME_SHORT_WITH_SECONDS(){return O}static get DATETIME_MED(){return L}static get DATETIME_MED_WITH_SECONDS(){return C}static get DATETIME_MED_WITH_WEEKDAY(){return M}static get DATETIME_FULL(){return A}static get DATETIME_FULL_WITH_SECONDS(){return I}static get DATETIME_HUGE(){return N}static get DATETIME_HUGE_WITH_SECONDS(){return P}}function gi(t){if(fi.isDateTime(t))return t;if(t&&t.valueOf&&Ft(t.valueOf()))return fi.fromJSDate(t);if(t&&"object"==typeof t)return fi.fromObject(t);throw new c(`Unknown datetime argument: ${t}, of type ${typeof t}`)}}},function(t){var e;e=4028,t(t.s=e)}]);
\ No newline at end of file
diff --git a/public/build/app.dd0a8e58.js.LICENSE.txt b/public/build/app.e10c6f94.js.LICENSE.txt
similarity index 97%
rename from public/build/app.dd0a8e58.js.LICENSE.txt
rename to public/build/app.e10c6f94.js.LICENSE.txt
index d0f89462..971b982a 100644
--- a/public/build/app.dd0a8e58.js.LICENSE.txt
+++ b/public/build/app.e10c6f94.js.LICENSE.txt
@@ -132,10 +132,6 @@
* [KIMAI] KimaiPlugin: base class for all plugins
*/
-/*!
- * [KIMAI] KimaiRecentActivities: responsible to reload the users recent activities
- */
-
/*!
* [KIMAI] KimaiReducedClickHandler: abstract class
*/
@@ -144,6 +140,10 @@
* [KIMAI] KimaiReloadPageWidget: a simple helper to reload the page on events
*/
+/*!
+ * [KIMAI] KimaiRemoteModal: load remote content (without forms) into a modal
+ */
+
/*!
* [KIMAI] KimaiStorage: simple wrapper to handle localStorage access
*/
diff --git a/public/build/entrypoints.json b/public/build/entrypoints.json
index 03eb4611..6ca62a48 100644
--- a/public/build/entrypoints.json
+++ b/public/build/entrypoints.json
@@ -3,7 +3,7 @@
"app": {
"js": [
"/build/runtime.6c399d29.js",
- "/build/app.dd0a8e58.js"
+ "/build/app.e10c6f94.js"
],
"css": [
"/build/app.8b6629a6.css"
@@ -81,7 +81,7 @@
},
"integrity": {
"/build/runtime.6c399d29.js": "sha384-/rm616f12czi8l/27GvWXtb3g608vJZf2XTUKxqCRI4tsa2vUHP+BW90edTok5zC",
- "/build/app.dd0a8e58.js": "sha384-k0DlCny0XdsJHHuyL8B5MNlZTl+s8ZvBFvjwD9xrPQhbZ7ryiTx72pHOi+vaEzB8",
+ "/build/app.e10c6f94.js": "sha384-liXpnmoTHMmDRcTM00CGPemKYTMMCVhSUN0nf3xTFq3Je3EPb5xGrIqGmZSryZbH",
"/build/app.8b6629a6.css": "sha384-mgEEi5bDaaMfrI+/iEBBD2S2sQvjdRJhsYN89QlhqPeUhM39pcxiGx9WVVP31jls",
"/build/app-rtl.7a875ca7.js": "sha384-T7gLI61h9dGeMgzo63vKu4GiDOeLPct9zSUHrceNbhSwIdUmSSNoZ1+d7fKhJJ4/",
"/build/app-rtl.bf451276.css": "sha384-hWaFBRhgNGAmCoe30xfzWFG1qkmKSAXBjZj/GRXY61Gymsq3p2d9sbyC7M6EwumB",
diff --git a/public/build/manifest.json b/public/build/manifest.json
index f6e46769..bc53ae27 100644
--- a/public/build/manifest.json
+++ b/public/build/manifest.json
@@ -1,6 +1,6 @@
{
"build/app.css": "/build/app.8b6629a6.css",
- "build/app.js": "/build/app.dd0a8e58.js",
+ "build/app.js": "/build/app.e10c6f94.js",
"build/app-rtl.css": "/build/app-rtl.bf451276.css",
"build/app-rtl.js": "/build/app-rtl.7a875ca7.js",
"build/export-pdf.css": "/build/export-pdf.d8a6c23b.css",
diff --git a/src/Constants.php b/src/Constants.php
index 714102ad..ac409cce 100644
--- a/src/Constants.php
+++ b/src/Constants.php
@@ -17,11 +17,11 @@ final class Constants
/**
* The current release version
*/
- public const VERSION = '2.43.0';
+ public const VERSION = '2.44.0';
/**
* The current release: major * 10000 + minor * 100 + patch
*/
- public const VERSION_ID = 24300;
+ public const VERSION_ID = 24400;
/**
* The software name
*/
diff --git a/src/Controller/SystemConfigurationController.php b/src/Controller/SystemConfigurationController.php
index bf45dbcf..181a757a 100644
--- a/src/Controller/SystemConfigurationController.php
+++ b/src/Controller/SystemConfigurationController.php
@@ -471,7 +471,7 @@ final class SystemConfigurationController extends AbstractController
->setType(CustomerTypePatternType::class),
(new Configuration('customer.number_format'))
->setLabel('customer.number_format')
- ->setOptions(['help' => 'allowed_replacer', 'help_translation_parameters' => ['%replacer%' => '{cc}']])
+ ->setOptions(['help' => 'allowed_replacer', 'help_translation_parameters' => ['%replacer%' => '{cc}, {Y}, {y}, {M}, {m}, {D}, {d}, {YY}, {yy}, {MM}, {DD}']])
->setRequired(true)
->setType(TextType::class)
->setTranslationDomain('system-configuration'),
@@ -491,7 +491,7 @@ final class SystemConfigurationController extends AbstractController
->setTranslationDomain('system-configuration'),
(new Configuration('project.number_format'))
->setLabel('project.number_format')
- ->setOptions(['help' => 'allowed_replacer', 'help_translation_parameters' => ['%replacer%' => '{pc}']])
+ ->setOptions(['help' => 'allowed_replacer', 'help_translation_parameters' => ['%replacer%' => '{pc}, {Y}, {y}, {M}, {m}, {D}, {d}, {YY}, {yy}, {MM}, {DD}']])
->setRequired(false)
->setType(TextType::class)
->setTranslationDomain('system-configuration'),
@@ -507,7 +507,7 @@ final class SystemConfigurationController extends AbstractController
->setType(ActivityTypePatternType::class),
(new Configuration('activity.number_format'))
->setLabel('activity.number_format')
- ->setOptions(['help' => 'allowed_replacer', 'help_translation_parameters' => ['%replacer%' => '{ac}']])
+ ->setOptions(['help' => 'allowed_replacer', 'help_translation_parameters' => ['%replacer%' => '{ac}, {Y}, {y}, {M}, {m}, {D}, {d}, {YY}, {yy}, {MM}, {DD}']])
->setRequired(false)
->setType(TextType::class)
->setTranslationDomain('system-configuration'),
diff --git a/src/Controller/TimesheetAbstractController.php b/src/Controller/TimesheetAbstractController.php
index 281dd9e1..4ee123a1 100644
--- a/src/Controller/TimesheetAbstractController.php
+++ b/src/Controller/TimesheetAbstractController.php
@@ -84,7 +84,7 @@ abstract class TimesheetAbstractController extends AbstractController
}
if ($this->configuration->isBreakTimeEnabled()) {
- $table->addColumn('break', ['class' => 'text-end text-nowrap']);
+ $table->addColumn('break', ['class' => 'text-end text-nowrap', 'orderBy' => false]);
}
$table->addColumn('duration', ['class' => 'text-end text-nowrap']);
diff --git a/src/Event/ThemeEvent.php b/src/Event/ThemeEvent.php
index d4fe597e..a889a981 100644
--- a/src/Event/ThemeEvent.php
+++ b/src/Event/ThemeEvent.php
@@ -19,6 +19,9 @@ class ThemeEvent extends Event
public const HTML_HEAD = 'app.theme.html_head';
public const CONTENT_BEFORE = 'app.theme.content_before';
public const CONTENT_START = 'app.theme.content_start';
+ /**
+ * The toolbar is rendered twice for small and large screens.
+ */
public const TOOLBAR = 'app.theme.toolbar';
public const CONTENT_END = 'app.theme.content_end';
public const CONTENT_AFTER = 'app.theme.content_after';
diff --git a/src/Timesheet/RoundingService.php b/src/Timesheet/RoundingService.php
index 914776e0..c9037881 100644
--- a/src/Timesheet/RoundingService.php
+++ b/src/Timesheet/RoundingService.php
@@ -73,12 +73,12 @@ final class RoundingService
public function roundBegin(Timesheet $record): void
{
- foreach ($this->getRoundingRules() as $rounding) {
- if ($record->getBegin() === null) {
- continue;
- }
- $weekday = $record->getBegin()->format('l');
+ if ($record->getBegin() === null) {
+ return;
+ }
+ $weekday = $record->getBegin()->format('l');
+ foreach ($this->getRoundingRules() as $rounding) {
if (\in_array(strtolower($weekday), $rounding['days'], true)) {
$rounder = $this->getRoundingMode($rounding['mode']);
$rounder->roundBegin($record, $rounding['begin']);
@@ -88,12 +88,12 @@ final class RoundingService
public function roundEnd(Timesheet $record): void
{
- foreach ($this->getRoundingRules() as $rounding) {
- if ($record->getEnd() === null) {
- continue;
- }
- $weekday = $record->getEnd()->format('l');
+ if ($record->getEnd() === null) {
+ return;
+ }
+ $weekday = $record->getEnd()->format('l');
+ foreach ($this->getRoundingRules() as $rounding) {
if (\in_array(strtolower($weekday), $rounding['days'], true)) {
$rounder = $this->getRoundingMode($rounding['mode']);
$rounder->roundEnd($record, $rounding['end']);
@@ -103,12 +103,12 @@ final class RoundingService
public function roundDuration(Timesheet $record): void
{
- foreach ($this->getRoundingRules() as $rounding) {
- if ($record->getEnd() === null) {
- continue;
- }
- $weekday = $record->getEnd()->format('l');
+ if ($record->getEnd() === null) {
+ return;
+ }
+ $weekday = $record->getEnd()->format('l');
+ foreach ($this->getRoundingRules() as $rounding) {
if (\in_array(strtolower($weekday), $rounding['days'], true)) {
$rounder = $this->getRoundingMode($rounding['mode']);
$rounder->roundDuration($record, $rounding['duration']);
@@ -118,16 +118,12 @@ final class RoundingService
public function applyRoundings(Timesheet $record): void
{
- if (null === $record->getEnd()) {
+ if ($record->getEnd() === null) {
return;
}
+ $weekday = $record->getEnd()->format('l');
foreach ($this->getRoundingRules() as $rounding) {
- if ($record->getEnd() === null) {
- continue;
- }
- $weekday = $record->getEnd()->format('l');
-
if (\in_array(strtolower($weekday), $rounding['days'], true)) {
$rounder = $this->getRoundingMode($rounding['mode']);
$rounder->roundBegin($record, $rounding['begin']);
diff --git a/templates/doctor/index.html.twig b/templates/doctor/index.html.twig
index 6435fda5..172e4f57 100644
--- a/templates/doctor/index.html.twig
+++ b/templates/doctor/index.html.twig
@@ -3,7 +3,7 @@
{% block status %}
{% from "macros/status.html.twig" import status %}
{{ status(constant('App\\Constants::VERSION')) }}
- {{ status(environment, environment == 'dev' ? 'red' : 'green') }}
+ {{ status(environment, environment == 'dev' ? 'danger' : 'success') }}
{% endblock %}
{% block main %}
diff --git a/templates/favorite/index.html.twig b/templates/favorite/index.html.twig
index 4b8e424f..4c3a6933 100644
--- a/templates/favorite/index.html.twig
+++ b/templates/favorite/index.html.twig
@@ -15,8 +15,8 @@
+ data-event="kimai.timesheetStart kimai.timesheetUpdate" data-method="PATCH" data-msg-error="timesheet.start.error"
+ data-msg-success="timesheet.start.success" data-bs-dismiss="modal">
{{ label_activity(entry.activity) }}
{{ label_project(entry.project) }}
diff --git a/templates/macros/status.html.twig b/templates/macros/status.html.twig
index 4376a1de..0c989785 100644
--- a/templates/macros/status.html.twig
+++ b/templates/macros/status.html.twig
@@ -1,18 +1,16 @@
{% macro status(title, color) %}
{% from '@theme/components/status.html.twig' import status %}
- {% set options = {} %}
- {% if color %}{% set options = options|merge({'color': color}) %}{% endif %}
- {{ status(title, options) }}
+ {{ status(title, {'color': color|default('primary')}) }}
{% endmacro %}
{% macro status_duration(duration) %}
- {{ _self.status(duration, 'azure') }}
+ {{ _self.status(duration) }}
{% endmacro %}
{% macro status_money(money) %}
- {{ _self.status(money, 'blue') }}
+ {{ _self.status(money) }}
{% endmacro %}
{% macro status_count(counter) %}
- {{ _self.status(counter, 'teal') }}
+ {{ _self.status(counter) }}
{% endmacro %}
diff --git a/templates/macros/widgets.html.twig b/templates/macros/widgets.html.twig
index 4d4bd33c..4846107e 100644
--- a/templates/macros/widgets.html.twig
+++ b/templates/macros/widgets.html.twig
@@ -226,10 +226,14 @@
{% endmacro %}
{% macro badge_team_access(teams) %}
- {% if teams|length > 0 %}
- {{ _self.badge_counter(teams|length) }}
+ {{ _self.badge_counted(teams|length) }}
+{% endmacro %}
+
+{% macro badge_counted(amount) %}
+ {% if amount > 0 %}
+ {{ _self.badge_counter(amount, null, 'primary') }}
{% else %}
- {{ _self.badge_counter(0, null, 'gray') }}
+ {{ _self.badge_counter(0, null, 'secondary') }}
{% endif %}
{% endmacro %}
diff --git a/templates/partials/recent-activities.html.twig b/templates/partials/recent-activities.html.twig
index 1f8c8347..e783152a 100644
--- a/templates/partials/recent-activities.html.twig
+++ b/templates/partials/recent-activities.html.twig
@@ -1,6 +1,6 @@
{% if is_granted('start_own_timesheet') %}
diff --git a/templates/tags/index.html.twig b/templates/tags/index.html.twig
index 2f15ab5a..0b2fdc84 100644
--- a/templates/tags/index.html.twig
+++ b/templates/tags/index.html.twig
@@ -10,7 +10,7 @@
{% if column == 'name' %}
{{ widgets.label_name(entry.name, entry.color|colorize(entry.name)) }}
{% elseif column == 'amount' %}
- {{ widgets.badge_counter(entry.amount, null, (entry.amount == 0 ? 'yellow' : '')) }}
+ {{ widgets.badge_counted(entry.amount) }}
{% elseif column == 'visible' %}
{{ widgets.label_visible(entry.visible) }}
{% elseif column == 'actions' %}
diff --git a/templates/team/index.html.twig b/templates/team/index.html.twig
index 36d8d593..ab5ac867 100644
--- a/templates/team/index.html.twig
+++ b/templates/team/index.html.twig
@@ -16,7 +16,7 @@
{{ widgets.user_avatar(user, tooltip, 'avatar-rounded', (member.teamlead ? 'info' : null)) }}
{% endfor %}
{% elseif column == 'amount' %}
- {{ widgets.badge_counter(entry.members|length) }}
+ {{ widgets.badge_counted(entry.members|length) }}
{% elseif column == 'actions' %}
{% set event = actions(app.user, 'team', 'index', {'team': entry}) %}
{{ widgets.table_actions(event.actions) }}
diff --git a/templates/timesheet/index.html.twig b/templates/timesheet/index.html.twig
index 0a3a0f17..d928f581 100644
--- a/templates/timesheet/index.html.twig
+++ b/templates/timesheet/index.html.twig
@@ -77,7 +77,7 @@
{% if lastEntry is not null and entry.end is not null and entry.user is same as (lastEntry.user) %}
{% if checkOverlappingDesc and entry.end.timestamp > lastEntry.begin.timestamp %}
{% set class = class ~ ' overlapping' %}
- {% elseif checkOverlappingAsc and entry.begin.timestamp < lastEntry.end.timestamp %}
+ {% elseif checkOverlappingAsc and lastEntry.end is not null and entry.begin.timestamp < lastEntry.end.timestamp %}
{% set class = class ~ ' overlapping' %}
{% endif %}
{% endif %}
diff --git a/tests/Controller/FavoriteControllerTest.php b/tests/Controller/FavoriteControllerTest.php
index e6e8d309..ff1633b9 100644
--- a/tests/Controller/FavoriteControllerTest.php
+++ b/tests/Controller/FavoriteControllerTest.php
@@ -39,6 +39,6 @@ class FavoriteControllerTest extends AbstractControllerBaseTestCase
$content = $client->getResponse()->getContent();
self::assertNotFalse($content);
self::assertStringContainsString('
+
electronic_invoice
E-Rechnung
diff --git a/translations/messages.en.xlf b/translations/messages.en.xlf
index 2b75533e..b3d20429 100644
--- a/translations/messages.en.xlf
+++ b/translations/messages.en.xlf
@@ -2042,7 +2042,7 @@
payment_account_name
IBAN or card number
-
+
electronic_invoice
E-Invoice
diff --git a/translations/messages.es.xlf b/translations/messages.es.xlf
index bf32ae4f..e956da2e 100644
--- a/translations/messages.es.xlf
+++ b/translations/messages.es.xlf
@@ -1986,7 +1986,7 @@
remaining_budget
Saldo
-
+
electronic_invoice
Factura electrónica
diff --git a/translations/messages.he.xlf b/translations/messages.he.xlf
index f5aa8c88..577493a5 100644
--- a/translations/messages.he.xlf
+++ b/translations/messages.he.xlf
@@ -2042,7 +2042,7 @@
buyerReference
זיהוי רוכש
-
+
electronic_invoice
חשבונית דיגיטלית
diff --git a/translations/messages.hr.xlf b/translations/messages.hr.xlf
index 07b2f8d1..9840bab9 100644
--- a/translations/messages.hr.xlf
+++ b/translations/messages.hr.xlf
@@ -2042,7 +2042,7 @@
payment_account_name
IBAN ili broj kartice
-
+
electronic_invoice
E-račun
diff --git a/translations/messages.it.xlf b/translations/messages.it.xlf
index 258cdc34..66890cd6 100644
--- a/translations/messages.it.xlf
+++ b/translations/messages.it.xlf
@@ -2042,7 +2042,7 @@
payment_account_name
IBAN o numero di carta
-
+
electronic_invoice
Fattura elettronica
diff --git a/translations/messages.nb_NO.xlf b/translations/messages.nb_NO.xlf
index 2f9be4e3..964015f6 100644
--- a/translations/messages.nb_NO.xlf
+++ b/translations/messages.nb_NO.xlf
@@ -2038,7 +2038,7 @@
payment_account_name
IBAN eller kortnummer
-
+
electronic_invoice
E-faktura
diff --git a/translations/messages.ro.xlf b/translations/messages.ro.xlf
index 25fb7bf3..68b104e6 100644
--- a/translations/messages.ro.xlf
+++ b/translations/messages.ro.xlf
@@ -2014,7 +2014,7 @@
payment_account_name
IBAN sau numar card
-
+
electronic_invoice
E-Factura
diff --git a/translations/messages.sv.xlf b/translations/messages.sv.xlf
index 2e21da85..7ccad2a0 100644
--- a/translations/messages.sv.xlf
+++ b/translations/messages.sv.xlf
@@ -2042,7 +2042,7 @@
payment_account_name
IBAN eller kortnummer
-
+
electronic_invoice
E-faktura
diff --git a/translations/messages.uk.xlf b/translations/messages.uk.xlf
index b313e036..5f0a788c 100644
--- a/translations/messages.uk.xlf
+++ b/translations/messages.uk.xlf
@@ -2042,7 +2042,7 @@
payment_account_name
IBAN або номер картки
-
+
electronic_invoice
E-Invoice
diff --git a/yarn.lock b/yarn.lock
index c1f5059f..611abef4 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2717,9 +2717,9 @@ __metadata:
linkType: hard
"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001359, caniuse-lite@npm:^1.0.30001587, caniuse-lite@npm:^1.0.30001669":
- version: 1.0.30001718
- resolution: "caniuse-lite@npm:1.0.30001718"
- checksum: 10/e172a4c156f743cc947e659f353ad9edb045725cc109a02cc792dcbf98569356ebfa4bb4356e3febf87427aab0951c34c1ee5630629334f25ae6f76de7d86fd0
+ version: 1.0.30001755
+ resolution: "caniuse-lite@npm:1.0.30001755"
+ checksum: 10/67f3b87bfd8f4da6fd69df185f54ab5409171f62185a52c916e1eb2f70f853aa374b0ce75d1742cc0215ca61e4bd1da8aa5557081bb2b6bb7220bf03a19b3b6e
languageName: node
linkType: hard