Altijd een stapje slimmer We werken continu aan verbeteringen en nieuwe functies. Op deze pagina zie je wat er onlangs is toegevoegd en wat er binnenkort aankomt. Heb jij nog een goed idee? Laat het ons weten via het contactformulier!
Updates Nieuwe updates Vorige updates Binnenkort
Geef je horloge kleur! - 1 augustus Je kunt nu ieder GPS horloge een eigen kleur geven in de app. Hiermee kun je verschillende GPS horloges in je account nog makkelijker uit elkaar houden. Wil je een kleur instellen? Ga dan naar het betreffende horloge profiel en druk op het blauwe potloodje. Je kunt nu de verschillende kleuren kiezen of aanpassen.
Snelle actiemenu's - 1 augustus Vanuit gebruikers ontvingen wij de vraag om de meest gebruikte functies in de app zoals bellen, videobellen en chat sneller bereikbaar te maken. In deze release daarom een nieuw snelkeuze menu voor deze functies. Dit snelkeuze menu is bereikbaar via het horloge tabje onderin óf via drukken op de locatieballon.
Nieuw berichtenscherm - 1 augustus De chatfunctie is helemaal vernieuwd. Er zijn nieuwe animaties en iconen toegevoegd zoals verzonden, afgeleverd en beluisterd. Ook zijn bugs opgelost rondom audioberichten op Android, zoals opslag en afspelen.
Verbeterde swipefunctie - 1 augustus De navigatiebalk onderin het scherm kan nu volledig uitklappen. Ook is de swipefunctie compleet vernieuwd waardoor het navigeren een stuk soepeler werkt.
Bug fixes verholpen - 8 augustus In deze update hebben we diverse bugs verholpen en de prestaties van de app geoptimaliseerd. Hierdoor werkt alles net weer iets beter en kun je de app nog beter gebruiken.
Avonturengids bugfixes - 1 juli In de nieuwste update hebben we de app weer een stukje slimmer en gebruiksvriendelijker gemaakt. Zo is het nu makkelijker om een avontuur te delen in de Avonturengids en zijn bugs in de nieuwe interface opgelost. Ook het probleem met Unlimited op Android is verholpen.
Caretogether en bugs - 1 juli Uniek bij one2track! Actief groepstoezicht in geval van een SOS van jouw kind. Ideaal voor kinderen met een medische achtergrond of kinderen die zich in een situatie bevinden waarbij een snelle alarmopvolging belangrijk is.
Interface bugfixes - 1 juni De compleet vernieuwde interface in de app gaf op sommige formaten smartphones toch wat problemen. Deze schalingsissues zijn opgelost in deze release.
Nieuwe interface - 1 mei Op basis van veel feedback zijn wij 9 maanden geleden begonnen met een compleet nieuwe interface en huisstijl voor de one2track app. Na vele maanden ontwerpen, testen en bouwen is het eindelijk zo ver!
Met jouw feedback maken we de app nog beter! Met regelmaat voeren wij nieuwe functies en verbeteringen door in de app. Begin september staat er weer een nieuwe release gepland met deze keer de focus op het optimaliseren van GPS-locatie en nauwkeurigheid.
Dankzij nieuwe logica wordt de locatiebepaling nog slimmer, waardoor we straks ook binnenshuis nauwkeurig locaties kunnen tonen. Zeker met de wintermaanden in aantocht, komt deze verbetering goed van pas.
Heb jij ook suggesties of ideeën voor nieuwe functies? Of ben je een foutje tegengekomen in de app? Laat het ons weten via het contactformulier hieronder en zorg dat onze developers direct op de hoogte zijn van jouw verbetervoorstellen. Zo maken we samen de app steeds beter!
Achter de schermen: veilig en vertrouwd Achter elke functie van de one2track-app zit een stevig en veilig systeem. Al jouw gegevens en die van je kind worden opgeslagen op Nederlandse servers (Serverius), gebouwd en beheerd door ons eigen team. Zo weet je zeker dat alles netjes geregeld is, zonder buitenlandse platformen of onbekende tussenpartijen.
Heb jij suggesties voor de app? Stuur deze dan in via het contactformulier!
'),this.closestDraggable=null,this.activeDroppable=null,this.parent=document,parent&&(this.parent=parent),this.init()}init(){this.parent.addEventListener("mousedown",e=>{if(0===e.button&&null!=e.target.closest(this.draggableSelector)){if(""!=this.settings.draggerSelector&&!e.target.matches(this.settings.draggerSelector))return!1;e.preventDefault(),this.originalDraggable=e.target.closest(this.draggableSelector),"clone"==this.settings.dragged&&(this.draggable=this.originalDraggable.cloneNode(!0),null!=this.settings.onClone(this.draggable)&&(this.draggable=this.settings.onClone(this.draggable)),this.parent.querySelector("body").append(this.draggable),this.originalDraggable.parentElement.matches(this.droppableSelector)&&(this.originalDraggable.classList.add("disabled"),this.originalDraggable.before(this.placeHolder))),this.draggable.classList.add("dragging"),this.settings.onDrag(this.draggable),this.mouseStartX=e.clientX,this.mouseStartY=e.clientY,this.draggableStartOffsetX=this.draggable.offsetLeft,this.draggableStartOffsetY=this.draggable.offsetTop,this.draggable.style.position="absolute",this.draggable.style.zIndex="1000",this.draggable.style.top=e.clientY+window.scrollY+"px",this.draggable.style.left=e.clientX+window.scrollX+"px",this.draggable.parentElement.matches(this.droppableSelector)&&(null!=this.draggable.nextElementSibling?this.draggable.nextElementSibling.before(this.placeHolder):null!=this.draggable.previousElementSibling?this.draggable.previousElementSibling.after(this.placeHolder):this.draggable.parentElement.append(this.placeHolder))}}),this.parent.addEventListener("mouseover",e=>{this.draggable&&e.target.closest(this.droppableSelector)}),this.parent.addEventListener("mousemove",e=>{if(null!=this.draggable){e.preventDefault(),this.draggable.style.top=e.clientY+15+window.scrollY+"px",this.draggable.style.left=e.clientX+15+window.scrollX+"px",this.parent.querySelectorAll(this.droppableSelector).forEach(droppable=>{let bounds=droppable.getBoundingClientRect();if(e.clientY>=Math.floor(bounds.top)-2&&e.clientY=bounds.left&&e.clientX0?(this.setDroppable(overs[overs.length-1]),overs.forEach((over,k)=>{k==overs.length-1?over.classList.add("droppable_selected_active"):over.classList.remove("droppable_selected_active")})):this.unsetDroppable(),null!=this.activeDroppable){let mode="vertical";[...this.activeDroppable.children].filter(elem=>elem.matches(this.settings.sortableSelector)).forEach(otherDraggable=>{if(otherDraggable==this.draggable)return;let otherDraggableRect=otherDraggable.getBoundingClientRect();"row"==this.activeDroppable.style.flexDirection?(mode="horizontal",this.placeHolder.style.height="auto",this.placeHolder.style.width="5px"):(this.placeHolder.style.height="5px",this.placeHolder.style.width="auto"),null==this.closestDraggable?this.closestDraggable=otherDraggable:"vertical"==mode&&Math.abs(e.clientY-this.closestDraggable.getBoundingClientRect().top)>Math.abs(e.clientY-otherDraggableRect.top)?this.closestDraggable=otherDraggable:"horizontal"==mode&&Math.abs(e.clientX-this.closestDraggable.getBoundingClientRect().left)>Math.abs(e.clientX-otherDraggableRect.left)&&(this.closestDraggable=otherDraggable)}),null==this.closestDraggable?this.placeHolder.parentElement!==this.activeDroppable&&this.activeDroppable.append(this.placeHolder):"vertical"==mode?e.clientY
{null!=this.draggable&&(e.preventDefault(),this.draggable.classList.remove("dragging"),null!=this.placeHolder.parentElement&&this.placeHolder.parentElement.matches(this.droppableSelector)?(this.originalDraggable.parentElement.matches(this.droppableSelector)?(this.draggable.remove(),this.originalDraggable.classList.remove("disabled"),this.placeHolder.replaceWith(this.originalDraggable),this.settings.onDrop(this.originalDraggable),this.draggable.classList.add(this.settings.droppedClass)):(this.placeHolder.replaceWith(this.draggable),this.settings.onDrop(this.draggable),this.draggable.classList.add(this.settings.droppedClass)),this.unsetDroppable()):this.originalDraggable.parentElement.matches(this.droppableSelector)?(this.draggable.remove(),this.originalDraggable.classList.remove("disabled"),this.placeHolder.replaceWith(this.originalDraggable),this.settings.onDrop(this.originalDraggable),this.draggable.classList.add(this.settings.droppedClass)):this.draggable.remove(),this.draggable.style.position="",this.draggable.style.zIndex="",this.draggable.style.top="",this.draggable.style.left="",this.draggable=null,this.mouseStartX=0,this.mouseStartY=0,this.draggableStartOffsetX=0,this.draggableStartOffsetY=0)})}setDroppable(droppable){null!=this.draggable&&this.activeDroppable!=droppable&&(this.closestDraggable=null,this.activeDroppable=droppable,this.settings.onEnterDroppable(this.draggable,this.activeDroppable))}unsetDroppable(){this.activeDroppable&&this.settings.onExitDroppable(this.draggable,this.activeDroppable),this.closestDraggable=null,this.activeDroppable=null}},Nui.Checkbox=class extends Nui.Component{constructor(node){super(node),this.init()}init(){this.checkbox=this._element.querySelectorAll("input[type=checkbox], input[type=radio]")[0],this.checkbox.classList.add("hidden"),this.checkbox.checked&&(this._element.classList.add("checked"),null!=this._element.querySelector("input[type=hidden]")&&(this._element.querySelector("input[type=hidden]").disabled=!0)),this.checkbox.addEventListener("change",e=>{this.set_state()}),this._element.querySelector("label").addEventListener("keydown",e=>{"Space"==e.code&&(e.stopPropagation(),e.preventDefault(),this._element.querySelector("label").dispatchEvent(new Event("click")))})}check(){this.checkbox.checked=!0,this._element.classList.add("checked"),this.setGhost(!0),this.checkbox.dispatchEvent(new Event("checked"))}uncheck(){this.checkbox.checked=!1,this._element.classList.remove("checked"),this.setGhost(!1),this.checkbox.dispatchEvent(new Event("unchecked"))}set_state(){let isChecked=this.checkbox.checked,isRadio="radio"==this.checkbox.getAttribute("type");isChecked?(isRadio&&document.querySelectorAll("input[name='"+this.checkbox.getAttribute("name")+"'][type=radio]").forEach(radio=>{radio.matches(".hidden")&&radio.closest(".checkbox").classList.remove("checked")}),this.check()):this.uncheck()}setGhost(value){null!=this._element.querySelector("input[type=hidden]")&&(this._element.querySelector("input[type=hidden]").disabled=value)}},Nui.Toast=class extends Nui.Component{constructor(node){super(node),this.init()}init(){}static show(params){this.settings={color:"red",message:"Message",position:"top center",time:2e3},Object.assign(this.settings,params);let toast=Nui.Core.create_element(``),holder=document.querySelector(".nui.floating."+this.settings.position.replace(" ","."));null==holder&&(holder=Nui.Core.create_element(`
`),document.querySelector("body").append(holder)),holder.prepend(toast),setTimeout((function(){toast.remove(),null==holder.querySelector(".nui.segment")&&holder.remove()}),this.settings.time)}},Nui.Modal=class extends Nui.Component{constructor(node,params){super(node),this.settings={content:"",position:"auto",color:"white",closable:!0,hide_lag:300,style:"",show_on:"click",onShow:()=>{},onHide:()=>{}},Object.assign(this.settings,params),this.init()}init(){let params=this._element.getAttribute("data-modal");var observer;(params&¶ms.length>0&&(params=JSON.parse(params),Object.assign(this.settings,params)),this.isShown=!1,this.hideOk=!0,"visible"==this.settings.show_on)?new IntersectionObserver(entries=>{!0===entries[0].isIntersecting&&(this.isShown||this.show()),this.hideOk=!1},{threshold:[0]}).observe(this._element):this._element.addEventListener(this.settings.show_on,e=>{e.preventDefault(),this.isShown||this.show(),this.hideOk=!1});this.settings.url=this._element.getAttribute("href"),this._element.getAttribute("href")&&!this.settings.url.includes("output=component")&&(this.settings.url.includes("?")?this.settings.url=this.settings.url+"&output=component":this.settings.url=this.settings.url+"?output=component")}show(){if(this.settings.onShow(),null!=this.dimmer)this.dimmer.style.display="",document.querySelector("body").style.overflow="hidden";else if(this.modal=Nui.Core.create_element(``),this.dimmer=Nui.Core.create_element('
'),document.querySelector("body").append(this.dimmer),document.querySelector("body").style.overflow="hidden",this.dimmer.addEventListener("mousedown",e=>{e.target==this.dimmer&&this.hide()}),this.dimmer.append(this.modal),0==this.settings.content.length){const xhttp=new XMLHttpRequest;xhttp.addEventListener("readystatechange",e=>{4==e.target.readyState&&200==e.target.status&&(this.set_content(e.target.responseText),Nui_boot(this.modal))}),xhttp.open("GET",this.settings.url),xhttp.send()}else(this.settings.content.startsWith("#")||this.settings.content.startsWith("."))&&document.querySelector(this.settings.content)?(this.target=document.querySelector(this.settings.content),this.placeHolder=Nui.Core.create_element(' '),this.target.after(this.placeHolder),this.set_content(this.target),this.target.classList.contains("hidden")&&(this.target.classList.toggle("hidden"),this.to_hide=!0)):this.set_content(this.settings.content)}hide(){this.settings.onHide(),this.settings.content.length>0?(this.dimmer.style.display="none",this.placeHolder&&this.placeHolder.replaceWith(this.target),this.to_hide&&this.target.classList.toggle("hidden"),this.dimmer.remove()):this.dimmer.remove(),document.querySelector("body").style.overflow="auto",this.dimmer=null}set_content(content){if(content instanceof HTMLElement?this.modal.querySelector(".content").append(content):this.modal.querySelector(".content").innerHTML=content,this.modal.classList.remove("loading"),this.settings.closable){let close_icon=Nui.Core.create_element(' ');this.modal.append(close_icon),close_icon.addEventListener("mousedown",e=>{this.dimmer.dispatchEvent(new Event("mousedown"))})}this.settings.style&&this.modal.setAttribute("style",this.settings.style)}},Nui.Carousel=class extends Nui.Component{constructor(node,params){super(node),this.settings={auto_scroll_delay:5e3,items_per_scroll:1},Object.assign(this.settings,params),this.init()}init(){this.carousel=this._element.querySelector(".items"),Array.from(this.carousel.children).forEach(item=>{item.style.minWidth=100/this.settings.items_per_scroll+"%"}),this.currentIndex=0,this.totalItems=this._element.querySelectorAll(".item").length,this.autoSlide,this.updateCarousel(),this.startAutoSlide(),this.container=this._element.querySelector(".container"),this.container.addEventListener("mouseenter",()=>clearInterval(this.autoSlide)),this.container.addEventListener("mouseleave",()=>this.startAutoSlide()),this._element.querySelector(".button.next").addEventListener("click",e=>{e.preventDefault(),this.nextSlide()}),this._element.querySelector(".button.prev").addEventListener("click",e=>{e.preventDefault(),this.prevSlide()})}updateCarousel(){this.offset=100*-this.currentIndex/this.settings.items_per_scroll,this.carousel.style.transform=`translateX(${this.offset}%)`}nextSlide(){this.currentIndex=(this.currentIndex+1)%this.totalItems,this.updateCarousel(),this.resetAutoSlide()}prevSlide(){this.currentIndex=(this.currentIndex-1+this.totalItems)%this.totalItems,this.updateCarousel(),this.resetAutoSlide()}startAutoSlide(){this.autoSlide=setInterval(()=>this.nextSlide(),this.settings.auto_scroll_delay)}resetAutoSlide(){clearInterval(this.autoSlide),this.startAutoSlide()}},Nui.Sidebar=class extends Nui.Component{constructor(node){super(node),this.init()}init(){this._element.hasAttribute("data-trigger")&&document.querySelector(this._element.getAttribute("data-trigger")).addEventListener("click",function(e){e.preventDefault(),this.show()}.bind(this))}show(params){let settings={color:"black"};Object.assign(settings,params);let dimmer=Nui.Core.create_element(`
`);this._element.after(dimmer),dimmer.addEventListener("click",function(e){this.hide()}.bind(this)),this._element.classList.add("active")}hide(){this._element.classList.remove("active"),this._element.nextElementSibling.remove()}},Nui.Tabs=class extends Nui.Component{constructor(node){super(node),this.container=this._element.parentElement,this._element.hasAttribute("data-parent")&&(this.container=this._element.closest(this._element.dataset.parent)),this.init()}init(){0==Array.from(this._element.children).filter(e=>e.matches(".item.active")).length&&Array.from(this._element.children).filter(e=>e.matches(".item:not(.header)")).length>0&&Array.from(this._element.children).filter(e=>e.matches(".item:not(.header)"))[0].classList.add("active"),this._element.addEventListener("click",e=>{e.target.matches(".item[data-tab]")?this.toggle(e.target):e.target.matches(".remove_tab")&&this.remove(e.target.closest(".item[data-tab]"))}),this._element.addEventListener("mouseover",e=>{e.target.matches(".item[data-tab].hover-tab")&&1==e.buttons&&1==e.which&&this.toggle(e.target)}),Array.from(this._element.children).filter(e=>e.matches(".item[data-tab]")).forEach(tab=>{this.container.querySelectorAll("[data-tab="+tab.dataset.tab+"]:not(.item)").forEach(tabarea=>{tab.matches(".active")?tabarea.classList.remove("hidden"):tabarea.classList.add("hidden")})})}toggle(tab){Array.from(this._element.children).filter(e=>e.matches("[data-tab]")).forEach(_tab=>{_tab.classList.remove("active"),this.container.querySelectorAll("[data-tab="+_tab.dataset.tab+"].item").forEach(_sametab=>{_sametab.classList.remove("active")}),this.container.querySelectorAll('[data-tab="'+_tab.dataset.tab+'"]:not(.item)').forEach(_tabarea=>{_tabarea.matches('[data-tab="'+tab.dataset.tab+'"]')?_tabarea.classList.remove("hidden"):_tabarea.classList.add("hidden")})}),tab.classList.add("active"),this.container.querySelectorAll("[data-tab="+tab.dataset.tab+"].item").forEach(_sametab=>{_sametab.classList.add("active")}),tab.dispatchEvent(new Event("activated"))}remove(tab){let name=tab.getAttribute("data-tab");this.container.querySelectorAll('[data-tab="'+tab.dataset.tab+'"]:not(.item)').forEach(tabarea=>{tabarea.remove()}),tab.remove()}},Nui.Form=class extends Nui.Component{constructor(node){super(node),this.errors={},this.failedInputs=[],this.vfailed=!1,this.validations={},this.init()}init(){["input","change"].forEach(event=>{this._element.addEventListener(event,e=>{e.target.hasAttribute("data-validations")&&this.validateInput(e.target,!0)})}),this.analyzeForm(),this._element.querySelectorAll("button[data-clear]").forEach(clearBtn=>{clearBtn.addEventListener("click",e=>{this._element.querySelectorAll(clearBtn.getAttribute("data-clear")).forEach(formInput=>{formInput.matches("[type=button], [type=submit], [type=reset], [type=radio], [type=checkbox], [type=hidden], [data-cftoken]")||(formInput.setAttribute("value",""),formInput.value="",formInput.dispatchEvent(new Event("change"))),formInput.matches("[type=radio], [type=checkbox]")&&(formInput.removeAttribute("checked"),formInput.checked=!1,formInput.dispatchEvent(new Event("change"))),formInput.matches("select")&&(formInput.querySelectorAll("option").forEach(opt=>{opt.removeAttribute("selected"),opt.selected=!1}),formInput.dispatchEvent(new Event("change")))}),this._element.submit()})}),this._element.addEventListener("submit",e=>{if(this._element.classList.add("loading"),this.analyzeForm(),this.validations!={}&&(this.validate(),this.vfailed))return this.displayErrors(),e.preventDefault(),this._element.classList.remove("loading"),!1;if(this._element.querySelector(".g-recaptcha.v3")){e.preventDefault();let form=this._element;grecaptcha.ready((function(){grecaptcha.execute(form.querySelector(".g-recaptcha.v3").getAttribute("data-sitekey3"),{action:"submit"}).then((function(token){form.querySelector(".g-recaptcha.v3").remove(),form.querySelector('[name="g-recaptcha-response"]').value=token,form.submit()}))}))}})}analyzeForm(){this.errors={},this.vfailed=!1,this.validations={},this._element.querySelectorAll("[data-validations]").forEach(input=>{let validations=this.getInputValidations(input);this.validations[input.getAttribute("name")]=validations;let holder,label=input.closest(".field.holder").querySelector("label");null!=label&&null==label.querySelector(".errormark")&&this.validations[input.getAttribute("name")].rules.forEach((rule,ruleKey)=>{"required"==rule.type&&(label.innerHTML+=" * ")})})}getInputValidations(input){let validations=input.getAttribute("data-validations");if(validations.startsWith("{"))validations=JSON.parse(input.getAttribute("data-validations"));else{let jvalidations={rules:[]},rules;validations.split(";").forEach(rule=>{let rule_parts=rule.split(":");switch(rule_parts[0]){case"regex":jvalidations.rules.push({type:rule_parts[0],prompt:rule_parts[1],regex:rule_parts[2]});break;default:jvalidations.rules.push({type:rule_parts[0],prompt:rule_parts[1]})}}),validations=jvalidations}return validations}displayErrors(){this._element.querySelectorAll("[data-validations]").forEach(input=>{this.displayFieldErrors(input)}),Nui.Core.scrollToTargetwithOffset(this._element.querySelector(".field"),200)}displayFieldErrors(input){Object.keys(this.errors[input.getAttribute("name")]).length>0&&null!=input.closest(".field.holder:not(.error)")&&(input.closest(".field.holder").classList.add("error"),Object.keys(this.errors[input.getAttribute("name")]).forEach(ruleType=>{input.closest(".field.holder").append(Nui.Core.create_element(''+this.errors[input.getAttribute("name")][ruleType]+" "))}),this._element.dispatchEvent(new Event("resize")))}cleanErrors(){this.errors={},this.vfailed=!1,this._element.querySelectorAll("[data-validations]").forEach(input=>{this.cleanFieldErrors(input)})}cleanFieldErrors(input){this.errors[input.getAttribute("name")]={},input.closest(".field.holder")&&(input.closest(".field.holder").classList.remove("error"),input.closest(".field.holder").querySelectorAll(".errormsg").forEach(errormsg=>{errormsg.remove()}))}validate(){this.cleanErrors(),this._element.querySelectorAll("[data-validations]").forEach(input=>{this.validateInput(input)})}validateInput(input,single){if(!0===single&&this.cleanFieldErrors(input),input.hasAttribute("disable-validations")||input.parentElement.closest(".hidden")||input.closest(".disabled"))return;let inputValidations=this.getInputValidations(input);null!=inputValidations.rules&&inputValidations.rules.forEach((rule,ruleKey)=>{switch(rule.type){case"required":if(null!=inputValidations.multiple){let oneChecked=!1;document.querySelectorAll("input[name='"+input.getAttribute("name")+"']").forEach(radio=>{radio.checked&&(oneChecked=!0)}),oneChecked||this.addError(input,ruleKey,rule)}else if("checkbox"==input.getAttribute("type"))input.checked||this.addError(input,ruleKey,rule);else if(""==input.value){if("file"==input.getAttribute("type")&&input.previousElementSibling&&input.previousElementSibling.querySelector("input[type='hidden'][name='"+input.getAttribute("name")+"']")&&input.previousElementSibling.querySelector("input[type='hidden'][name='"+input.getAttribute("name")+"']").value.length>0)break;this.addError(input,ruleKey,rule)}break;case"count":if(null!=inputValidations.multiple){let checked=0;document.querySelectorAll("input[name='"+input.getAttribute("name")+"']").forEach(radio=>{radio.checked&&checked++}),null!=rule.mincount&&rule.mincount.length>0&&checked0&&checked>rule.maxcount&&this.addError(input,ruleKey,rule)}break;case"email":""==input.value||input.value.match(/^([a-zA-Z0-9_\.\-\+%])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{1,11})+$/)||this.addError(input,ruleKey,rule);break;case"matches":""!=rule.id&&input.value!=document.getElementById(rule.id).value&&this.addError(input,ruleKey,rule);break;case"function":if(""!=rule.function&&null!=window[rule.function]&&"function"==typeof window[rule.function]){let returned=window[rule.function](input.value);!0!==returned&&this.addError(input,ruleKey,{prompt:returned})}break;case"regex":""==input.value||input.value.match(new RegExp(rule.regex.slice(1,-1)))||this.addError(input,ruleKey,rule)}}),!0===single&&this.displayFieldErrors(input)}addError(input,ruleKey,rule){null==this.errors[input.getAttribute("name")]&&(this.errors[input.getAttribute("name")]={}),this.errors[input.getAttribute("name")][rule.type]=rule.prompt,this.vfailed=!0}},Nui.Dropdown=class extends Nui.Component{constructor(node){super(node),this.select=node,this.isOpen=!1,this.settings={onAddOption:null},this.init()}init(){if(this._element.closest(".clonable[data-key='n']"))return;if(this.select.parentElement.matches(".nui.select")){let rm=this.select.closest(".nui.select");rm.after(this.select.cloneNode(!0)),this.select=rm.nextElementSibling,this.select.classList.add("nui","select"),rm.remove()}let dropdownHTML=`\n\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\n\t \t
';this.select.after(Nui.Core.create_element(dropdownHTML)),this.dropdown=this.select.nextElementSibling,this.dropdown.prepend(this.select),this.select.setAttribute("class",this.select.hasAttribute("data-class")?this.select.getAttribute("data-class"):""),this.select.multiple&&this.dropdown.classList.add("multiple"),(this.select.matches("[data-searchable]")||this.select.matches("[data-additions]"))&&(this.dropdown.classList.add("search"),this.select.matches("[data-additions]")&&this.dropdown.classList.add("additions")),this.buildOptions(),this.dropdown.addEventListener("click",e=>{this.dropdown.focus(),this.isOpen?this.dropdown.querySelector("input.search")&&e.srcElement==this.dropdown.querySelector("input.search")||this.close():this.open()}),this.dropdown.addEventListener("keydown",e=>{if(" "==e.key&&this.dropdown.matches(":focus"))e.stopPropagation(),e.preventDefault(),this.open();else if("Enter"==e.key)this.isOpen&&this.dropdown.querySelector(".menu").querySelectorAll(".item.hovered").length>0&&(e.stopPropagation(),e.preventDefault(),this.dropdown.querySelector(".menu").querySelector(".item.hovered").dispatchEvent(new Event("click")),this.close(),this.dropdown.focus());else if("ArrowDown"==e.key){if(this.isOpen){e.stopPropagation(),e.preventDefault();let hoveredItem=this.dropdown.querySelector(".menu").querySelector(".item.hovered");if(!hoveredItem&&this.dropdown.querySelector(".menu").querySelector(".item.selected")&&(hoveredItem=this.dropdown.querySelector(".menu").querySelector(".item.selected")),hoveredItem){let current=hoveredItem;for(;current.nextElementSibling;){if(current.nextElementSibling.matches(".item:not(.filtered)")){current.nextElementSibling.classList.add("hovered"),hoveredItem.classList.remove("hovered");break}current=current.nextElementSibling}}else this.dropdown.querySelector(".menu").querySelector(".item:not(.filtered)").classList.add("hovered");this.dropdown.querySelector(".menu").querySelector(".item.hovered")&&this.dropdown.querySelector(".menu").querySelector(".item.hovered").offsetTop+this.dropdown.querySelector(".menu").querySelector(".item.hovered").offsetHeight>=this.dropdown.querySelector(".menu").offsetHeight&&(this.dropdown.querySelector(".menu").scrollTop=this.dropdown.querySelector(".menu").querySelector(".item.hovered").offsetTop)}}else if("ArrowUp"==e.key&&this.isOpen){e.stopPropagation(),e.preventDefault();let hoveredItem=this.dropdown.querySelector(".menu").querySelector(".item.hovered");if(!hoveredItem&&this.dropdown.querySelector(".menu").querySelector(".item.selected")&&(hoveredItem=this.dropdown.querySelector(".menu").querySelector(".item.selected")),hoveredItem){let current=hoveredItem;for(;current.previousElementSibling;){if(current.previousElementSibling.matches(".item:not(.filtered)")){current.previousElementSibling.classList.add("hovered"),hoveredItem.classList.remove("hovered");break}current=current.previousElementSibling}}else this.dropdown.querySelector(".menu").querySelector(".item:not(.filtered)").classList.add("hovered");this.dropdown.querySelector(".menu").querySelector(".item.hovered")&&this.dropdown.querySelector(".menu").querySelector(".item.hovered").offsetTop{e.relatedTarget!=this.dropdown.querySelector("input.search")&&this.close()}),this.dropdown.matches(".search")&&(this.dropdown.querySelector("input.search").addEventListener("blur",e=>{this.select.matches("[data-additions]")&&e.relatedTarget!=this.dropdown&&this.addSearchOption(),e.relatedTarget!=this.dropdown?this.dropdown.dispatchEvent(new Event("blur")):this.select.multiple&&(this.dropdown.querySelector("input.search").value="",this.dropdown.querySelector("input.search").focus())}),this.dropdown.querySelector("input.search").addEventListener("input",e=>{""!=this.dropdown.querySelector("input.search").value?(this.dropdown.querySelector(".text").classList.add("filtered"),this.filterBy(this.dropdown.querySelector("input.search").value)):(this.dropdown.querySelector(".text").classList.remove("filtered"),this.clearFilter())}),this.select.matches("[data-additions]")&&this.dropdown.querySelector("input.search").addEventListener("keydown",e=>{e.stopPropagation();let separators=[];if(this.select.hasAttribute("data-separators")&&(separators=this.select.getAttribute("data-separators").split("")),(13==e.which||separators.includes(e.key))&&(e.preventDefault(),this.addSearchOption()),"Backspace"===e.key&&""==this.dropdown.querySelector("input.search").value){e.preventDefault();let customs=this.dropdown.querySelectorAll(".custom_option");customs.length>0&&this.removeSelection(customs[customs.length-1].getAttribute("data-value"))}})),this.select.addEventListener("click",e=>{e.stopPropagation(),this.dropdown.dispatchEvent(new Event("click"))}),this.showPlacholder(),this.select.addEventListener("change",e=>{this.showPlacholder()}),this.select.matches("[data-clearable]")&&this.addClear(),this.select.dispatchEvent(new CustomEvent("DropdownReady"))}showPlacholder(){this.select.hasAttribute("placeholder")&&0==this.select.querySelectorAll("option[selected]").length&&(this.dropdown.querySelector(".text").innerHTML=this.select.getAttribute("placeholder"))}buildOptions(){this.dropdown.querySelector(".menu").querySelectorAll(".item").forEach(item=>{item.remove()}),this.dropdown.querySelectorAll(".custom_option").forEach(item=>{item.remove()}),[...this.select.querySelectorAll("option")].forEach(option=>{this.initOption(option)}),this.select.querySelector("option[selected]")?this.dropdown.matches(".multiple")?[...this.select.querySelectorAll("option[selected]")].forEach(selection=>{this.selectOption(selection,!1)}):this.selectOption(this.select.querySelector("option[selected]"),!1):(this.select.classList.add("noselection"),this.select.querySelector("option")&&!this.select.multiple&&this.selectOption(this.select.querySelectorAll("option")[0],!1))}updateOptions(options){let selected=[];this.select.querySelectorAll("option").forEach(option=>{option.selected&&selected.push(option.getAttribute("value")),option.remove()}),Object.keys(options).forEach(k=>{this.select.append(Nui.Core.create_element('"+options[k]+" "))}),this.buildOptions(!0)}addSearchOption(){if(""!=this.dropdown.querySelector("input.search").value){let addition=this.dropdown.querySelector("input.search").value;if(null!=this.select.querySelector('option[value="'+addition+'"]')){let add_option=this.select.querySelector('option[value="'+addition+'"]');add_option.selected||this.selectOption(add_option)}else{this.settings.onAddOption&&(addition=this.settings.onAddOption(addition));let new_option=Nui.Core.create_element(''+addition+" ");this.select.append(new_option),this.initOption(new_option),this.selectOption(new_option)}this.hideSearch()}}filterBy(value){if(this.select.hasAttribute("data-autocomplete")){const xhttp=new XMLHttpRequest;xhttp.addEventListener("readystatechange",e=>{if(4==e.target.readyState&&200==e.target.status){let options=JSON.parse(e.target.responseText);"object"==typeof options&&null!==options&&(this.select.querySelectorAll("option").forEach(option=>{option.remove()}),Object.keys(options).forEach(key=>{let opt=Nui.Core.create_element(''+options[key].text+" ");this.select.append(opt)}),this.buildOptions())}}),xhttp.open("GET",this.select.getAttribute("data-autocomplete")+value),xhttp.send()}[...this.dropdown.querySelector(".menu").querySelectorAll(".item")].forEach(item=>{item.innerHTML.toLowerCase().includes(value.toLowerCase())?item.classList.remove("hidden"):item.classList.add("hidden")})}clearFilter(){[...this.dropdown.querySelector(".menu").querySelectorAll(".item")].forEach(item=>{item.classList.remove("hidden")})}initOption(option){let content=""==option.innerHTML?" ":option.innerHTML,flex="";option.hasAttribute("data-html")&&(content=option.dataset.html,flex="nui flex");let option_item=Nui.Core.create_element(`${content}
`);this.dropdown.querySelector(".menu").append(option_item),option_item.addEventListener("click",function(e){this.selectOption(this.select.querySelector('option[value="'+option_item.dataset.value+'"]')),this.clearFilter()}.bind(this))}addClear(){this.dropdown.classList.add("clearable"),this.dropdown.querySelector("i.close.icon").addEventListener("click",function(e){e.stopPropagation(),this.dropdown.classList.remove("hasSelection"),this.select.multiple?[...this.dropdown.querySelectorAll(".nui.label[data-value]")].forEach(selection=>{this.removeSelection(selection.dataset.value)}):this.selectOption(this.select.querySelector("option"))}.bind(this))}open(){this.select.dispatchEvent(new CustomEvent("open",{bubbles:!0})),this.dropdown.querySelector(".menu").querySelectorAll(".item:not(.filtered)").length>0?(this.dropdown.classList.add("active"),this.dropdown.querySelector(".menu").classList.remove("hidden"),this.dropdown.querySelector(".menu").classList.add("visible"),this.isOpen=!0,null!=this.dropdown.querySelector(".menu").querySelector(".item.selected")&&(this.dropdown.querySelector(".menu").scrollTop=this.dropdown.querySelector(".menu").querySelector(".item.selected").offsetTop),this.dropdown.querySelector(".menu").style.zIndex="100",window.innerHeight0&&this.dropdown.querySelector(".menu").querySelectorAll(".item.hovered").forEach(hovered=>{hovered.classList.remove("hovered")}),this.dropdown.closest("form")&&this.dropdown.closest("form").dispatchEvent(new Event("resize")),this.select.dispatchEvent(new CustomEvent("opened",{bubbles:!0}))}hideSearch(){this.dropdown.matches(".search")&&(this.dropdown.querySelector("input.search").value="",this.dropdown.querySelector("input.search").style.zIndex="",this.dropdown.querySelector(".text").classList.remove("filtered"),[...this.dropdown.querySelector(".menu").querySelectorAll(".item")].forEach(item=>{item.classList.remove("hidden")}))}close(){this.select.dispatchEvent(new CustomEvent("close",{bubbles:!0})),this.dropdown.classList.remove("top"),this.dropdown.classList.remove("active"),this.dropdown.querySelector(".menu").classList.remove("visible"),this.dropdown.querySelector(".menu").classList.add("hidden"),this.isOpen=!1,this.dropdown.querySelector(".menu").style.zIndex="",this.hideSearch(),this.dropdown.closest("form")&&this.dropdown.closest("form").dispatchEvent(new Event("resize")),this.select.dispatchEvent(new CustomEvent("closed",{bubbles:!0}))}selectOption(option,event){this.dropdown.querySelector(".text").classList.remove("default"),this.dropdown.querySelector(".text").innerHTML=" ",this.select.multiple?(this.dropdown.querySelector('.item[data-value="'+option.value+'"]').classList.add("active","filtered"),this.dropdown.querySelector("input.search").before(this.createSelection(option.value,option.innerHTML)),option.selected=!0):([...this.dropdown.querySelector(".menu").querySelectorAll(".item")].forEach(item=>{item.classList.remove("active","selected")}),this.dropdown.querySelector('.item[data-value="'+option.value+'"]').classList.add("active","selected"),this.dropdown.querySelector(".text").innerHTML=this.dropdown.querySelector('.item[data-value="'+option.value+'"]').innerHTML,this.select.value=option.value),""!=option.value?this.dropdown.classList.add("hasSelection"):this.dropdown.classList.remove("hasSelection"),!1!==event&&(this.select.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})),this.select.dispatchEvent(new CustomEvent("optionSelected",{detail:option.value,bubbles:!0})))}removeSelection(value){this.dropdown.querySelector('.item[data-value="'+value+'"]').classList.remove("active","filtered"),this.select.querySelector('option[value="'+value+'"]').selected=!1,this.dropdown.querySelector('.nui.label[data-value="'+value+'"]')&&this.dropdown.querySelector('.nui.label[data-value="'+value+'"]').remove(),null==this.dropdown.querySelector(".menu").querySelector(".item.active")&&this.dropdown.classList.remove("hasSelection"),this.select.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0})),this.select.dispatchEvent(new CustomEvent("optionUnselected",{detail:value,bubbles:!0}))}createSelection(value,content){let selection=Nui.Core.create_element(`${content} `);return selection.querySelector("i.icon").addEventListener("click",function(e){e.stopPropagation(),this.removeSelection(value)}.bind(this)),selection}},Nui.Popup=class extends Nui.Component{constructor(node,params){if(super(node),this.settings={popup:"",content:"",position:"auto",color:"white",hide_lag:300,event:"hover",clickable:!1,onOpen:()=>{},onShow:()=>{}},Object.assign(this.settings,params),null===this._element.offsetParent)for(this._element=this._element.parentElement;null===this._element.parentElement.offsetParent;)this._element=this._element.parentElement;this.init()}init(){let popup_params=this._element.getAttribute("data-popup");null!=popup_params&&popup_params.length>0&&(popup_params=JSON.parse(popup_params),Object.assign(this.settings,popup_params)),this.opened=!1,this.hideID=null,"hover"==this.settings.event?(this._element.addEventListener("mouseover",e=>{this.hideID&&clearTimeout(this.hideID),this.opened||(this.show(),setTimeout(()=>{this.opened=!0},200))}),this._element.addEventListener("mouseout",e=>{this.hideID=setTimeout(()=>{this.hide(),this.hideID=null},this.settings.hide_lag)})):"focus"==this.settings.event&&(this._element.addEventListener("focus",e=>{this.show(),setTimeout(()=>{this.opened=!0},200)}),this._element.addEventListener("click",e=>{e.stopPropagation()}),document.addEventListener("click",e=>{this.hide()}),document.addEventListener("focusin",e=>{e.target!=this._element&&this.hide()}))}show(){let addToBody=!0;null==this.popup&&(0==this.settings.popup.length?(this.popup=Nui.Core.create_element(``),0==this.settings.content.length&&(this.settings.content=this._element.getAttribute("title"),this._element.setAttribute("title","")),this.popup.querySelector(".content").innerHTML=this.settings.content):"string"==typeof this.settings.popup?this.popup=document.querySelector(this.settings.popup):this.popup=this.settings.popup),this.settings.clickable&&this.popup.addEventListener("click",e=>{e.stopPropagation()}),this.settings.onOpen(),document.querySelector("body").append(this.popup),this.popup.classList.remove("hidden"),this.popup.classList.add("visible"),this.isShown=!0;let element_bounds=this._element.getBoundingClientRect(),popup_bounds=this.popup.getBoundingClientRect();if("auto"==this.settings.position){let posv="",posh="";posv=element_bounds.toppopup_bounds.width?"center":element_bounds.right '),this._element.closest(".field").append(this.calendar),this.input=this._element,this.sinput=this._element.closest(".field").querySelector('input[type="hidden"]'),this._element.hasAttribute("data-startmode")&&(this.settings.startMode=this._element.getAttribute("data-startmode")),this._element.hasAttribute("data-startday")&&(this.settings.startday=parseInt(this._element.getAttribute("data-startday"))),this._element.hasAttribute("data-format")&&(this.settings.format=this._element.getAttribute("data-format")),this._element.hasAttribute("data-sformat")&&(this.settings.sformat=this._element.getAttribute("data-sformat")),this._element.hasAttribute("data-type")&&(this.settings.type=this._element.getAttribute("data-type")),this._element.hasAttribute("data-months"))try{this.settings.text.months=JSON.parse(this._element.getAttribute("data-months"))}catch(e){this.settings.text.months=this._element.getAttribute("data-months").split(",")}if(this._element.hasAttribute("data-days"))try{this.settings.text.days=JSON.parse(this._element.getAttribute("data-days"))}catch(e){this.settings.text.days=this._element.getAttribute("data-days").split(",")}if(this._element.hasAttribute("data-units"))try{this.settings.text.units=JSON.parse(this._element.getAttribute("data-units"))}catch(e){this.settings.text.units=this._element.getAttribute("data-units").split(",")}this._element.hasAttribute("data-minutestep")&&(this.settings.minutestep=parseInt(this._element.getAttribute("data-minutestep"))),this.setDateLimits(),this._element.hasAttribute("data-opendays")&&this._element.getAttribute("data-opendays").length>0&&(this.settings.opendays=JSON.parse(this._element.getAttribute("data-opendays"))),this._element.hasAttribute("data-openhours")&&this._element.getAttribute("data-openhours").length>0&&(this.settings.openhours=JSON.parse(this._element.getAttribute("data-openhours")));let now=new Date;this.sinput&&this.sinput.value.trim().length&&(now=new Date(this.sinput.value.trim().replace(" ","T")),this.input.value=this.format(now,this.settings.format)),this.selected={day:now.getDate(),month:now.getMonth(),year:now.getFullYear(),minute:now.getMinutes(),second:now.getSeconds(),hour:now.getHours()};let popup_settings={popup:this.calendar,event:"focus",clickable:!0,onOpen:()=>{this.mode=this.settings.startMode,this.setDateLimits(),this.setupContent(this.selected.year,this.selected.month,this.selected.day,this.selected.hour,this.selected.minute)}};this.popup=new Nui.Popup(this._element,popup_settings)}setDateLimits(){if(this._element.hasAttribute("data-startdate")&&(this.settings.startdate=this._element.getAttribute("data-startdate")),this._element.hasAttribute("data-enddate")&&(this.settings.enddate=this._element.getAttribute("data-enddate")),this._element.hasAttribute("data-startdate_difference")&&(this.settings.startdate_difference=parseInt(this._element.getAttribute("data-startdate_difference")),this._element.hasAttribute("data-startdate_difference_unit"))){let diff_unit=parseInt(this._element.getAttribute("data-startdate_difference_unit"));this.settings.startdate_difference=this.settings.startdate_difference*diff_unit}if(this.settings.startdate&&(this.settings.startdate=new Date(this.settings.startdate.trim().replace(" ","T")),this.settings.startdate_difference)){let endseconds=this.settings.startdate.getSeconds();this.settings.startdate.setSeconds(endseconds+this.settings.startdate_difference)}this.settings.enddate&&(this.settings.enddate=new Date(this.settings.enddate.trim().replace(" ","T")))}close(){this.popup.hide()}format(date,format_string){var format=format_string;return format=(format=(format=(format=(format=(format=format.replace("YYYY",date.getFullYear())).replace("MM",("00"+(date.getMonth()+1)).slice(-2))).replace("DD",("00"+date.getDate()).slice(-2))).replace("HH",("00"+date.getHours()).slice(-2))).replace("mm",("00"+date.getMinutes()).slice(-2))).replace("ss",("00"+date.getSeconds()).slice(-2))}saveSelection(){let date=new Date(this.selected.year,this.selected.month,this.selected.day,this.selected.hour,this.selected.minute,this.selected.second);if(this.sinput&&(this.sinput.value=this.format(date,this.settings.sformat),this.sinput.setAttribute("data-value",this.format(date,"YYYY-MM-DD HH:mm:ss"))),this.input.value=this.format(date,this.settings.format),this.input.setAttribute("data-date",date),this.input.dispatchEvent(new Event("change",{bubbles:!0})),this._element.hasAttribute("data-enddate-field")){let name=this._element.getAttribute("data-enddate-field");document.querySelector('input[type="hidden"][name="'+name+'"]')&&(document.querySelector('input[type="hidden"][name="'+name+'"]').value="",document.querySelector('input[type="text"][name="'+name+'"]').value="")}}setupContent(){if(this._element.hasAttribute("data-startdate-field")){let name=this._element.getAttribute("data-startdate-field");if(document.querySelector('input[type="hidden"][name="'+name+'"]')&&document.querySelector('input[type="hidden"][name="'+name+'"]').hasAttribute("data-value")&&(this.settings.startdate=new Date(document.querySelector('input[type="hidden"][name="'+name+'"]').getAttribute("data-value").replace(" ","T")),this.settings.startdate_difference)){let endseconds=this.settings.startdate.getSeconds();this.settings.startdate.setSeconds(endseconds+this.settings.startdate_difference)}}"day"==this.mode?(this.calendar.innerHTML=this.buildMonthView(),[...this.calendar.querySelectorAll(".link[data-year]:not(.disabled)")].forEach(selection=>{selection.addEventListener("click",e=>{this.selected.month=parseInt(selection.dataset.month),this.selected.year=parseInt(selection.dataset.year),this.saveSelection(),this.setupContent()})}),[...this.calendar.querySelectorAll(".link[data-day]:not(.disabled)")].forEach(selection=>{selection.addEventListener("click",e=>{this.selected.day=parseInt(selection.dataset.day),this.saveSelection(),"date"==this.settings.type?this.close():(this.mode="time",this.setupContent())})}),this.calendar.querySelector(".link.month-year").addEventListener("click",e=>{this.mode="month-year",this.setupContent()})):"month-year"==this.mode?(this.calendar.innerHTML=this.buildMonthYearView(),[...this.calendar.querySelectorAll(".link[data-year]:not(.disabled)")].forEach(selection=>{selection.addEventListener("click",e=>{this.selected.year=parseInt(selection.getAttribute("data-year")),this.saveSelection(),this.setupContent()})}),[...this.calendar.querySelectorAll(".link[data-month]:not(.disabled)")].forEach(selection=>{selection.addEventListener("click",e=>{this.selected.month=parseInt(selection.dataset.month),this.saveSelection(),this.mode="day",this.setupContent()})}),this.calendar.querySelector(".menu.years").scrollTop=this.calendar.querySelector(".menu.years").querySelector(".item.selected").offsetTop-10,this.calendar.querySelector(".menu.months").scrollTop=this.calendar.querySelector(".menu.months").querySelector(".item.selected").offsetTop-10):"time"==this.mode&&(this.calendar.innerHTML=this.buildTimeView(),[...this.calendar.querySelectorAll(".link[data-day]:not(.disabled)")].forEach(selection=>{selection.addEventListener("click",e=>{this.selected.year=parseInt(selection.dataset.year),this.selected.month=parseInt(selection.dataset.month),this.selected.day=parseInt(selection.dataset.day),this.saveSelection(),this.setupContent()})}),[...this.calendar.querySelectorAll(".link[data-hour]:not(.disabled)")].forEach(selection=>{selection.addEventListener("click",e=>{this.selected.hour=parseInt(selection.getAttribute("data-hour")),this.saveSelection(),this.setupContent()})}),[...this.calendar.querySelectorAll(".link[data-minute]:not(.disabled)")].forEach(selection=>{selection.addEventListener("click",e=>{this.selected.minute=parseInt(selection.dataset.minute),this.saveSelection(),this.calendar.querySelector(".menu.seconds")?this.setupContent():this.close()})}),[...this.calendar.querySelectorAll(".link[data-second]:not(.disabled)")].forEach(selection=>{selection.addEventListener("click",e=>{this.selected.second=parseInt(selection.dataset.second),this.saveSelection(),this.close()})}),this.calendar.querySelector(".link.day").addEventListener("click",e=>{this.mode="day",this.setupContent()}),this.calendar.querySelector(".menu.hours").scrollTop=this.calendar.querySelector(".menu.hours").querySelector(".item.selected").offsetTop-10,this.calendar.querySelector(".menu.minutes").querySelector(".item.selected")&&(this.calendar.querySelector(".menu.minutes").scrollTop=this.calendar.querySelector(".menu.minutes").querySelector(".item.selected").offsetTop-10),this.calendar.querySelector(".menu.seconds")&&this.calendar.querySelector(".menu.seconds").querySelector(".item.selected")&&(this.calendar.querySelector(".menu.seconds").scrollTop=this.calendar.querySelector(".menu.seconds").querySelector(".item.selected").offsetTop-10))}buildDaysRows(){let rows="",dclass="",day=0,odate=new Date(this.selected.year,this.selected.month,1),date,startDay=new Date(this.selected.year,this.selected.month,1).getDay(),ws=0;startDay
");let date=new Date(this.selected.year,this.selected.month,1);if(day=d+7*w-startDay+1+this.settings.startday,date.setDate(day),dclass="",date.getMonth()==odate.getMonth()&&date.getFullYear()==odate.getFullYear()||(dclass+=" adjacent disabled"),this.settings.opendays.includes(d)||(dclass+=" disabled"),this.settings.startdate){let startdate=new Date(this.settings.startdate);startdate.setHours(0),startdate.setMinutes(0),startdate.setSeconds(0),startdate>date&&(dclass+=" disabled")}if(this.settings.enddate){let enddate=new Date(this.settings.enddate);enddate.setHours(23),enddate.setMinutes(59),enddate.setSeconds(59),enddate\n\t\t\t\t${date.getDate()}\n\t\t\t\t`,6==d&&(rows+="")}return rows}buildMonthView(){let date=new Date(this.selected.year,this.selected.month,1),datePrev=new Date(this.selected.year,this.selected.month-1,1),dateNext=new Date(this.selected.year,this.selected.month+1,1),dayslist="",html;for(let d=0;d'+this.settings.text.days[(this.settings.startday+d)%7]+"";return`\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t${this.settings.text.months[date.getMonth()]} ${date.getFullYear()} \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t
\n\t\t\t\t\t \n\t\t\t\t \n\t\t\t\t\n\t\t\t\t\t${dayslist}\n\t\t\t\t \n\t\t\t \n\t\t\t\n\t\t\t\t${this.buildDaysRows()}\n\t\t\t \n\t\t
\n\t\t`}buildMonthYearView(){let date=new Date(this.selected.year,this.selected.month,this.selected.day),html;return`\n\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t${this.settings.text.units.year}\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t${this.settings.text.units.month}\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t\t`}buildMonthsRows2(){let rows="",dclass="";for(let r=0;rdate&&(dclass+=" disabled")}if(this.settings.enddate){let enddate=new Date(this.settings.enddate);enddate.setDate(28),enddate${this.settings.text.months[r]} `}return rows}buildYearsRows2(){let rows="",dclass="",start_year=this.settings.startyear,end_year=this.settings.endyear;if(this.settings.startdate){let startdate;start_year=new Date(this.settings.startdate).getFullYear()}if(this.settings.enddate){let enddate;end_year=new Date(this.settings.enddate).getFullYear()}for(let r=start_year;rdate&&(dclass+=" disabled")}if(this.settings.enddate){let enddate=new Date(this.settings.enddate);enddate.setMonth(11),enddate