1!function(root,factory){"object"==typeof exports&&"object"==typeof module?module.exports=factory():"function"==typeof define&&define.amd?define([],factory):"object"==typeof exports?exports.Datepickk=factory():root.Datepickk=factory()}(this,(function(){return function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0)}([function(module,exports,__webpack_require__){"use strict";function verificarConflito(data1,dataFim1,data2,dataFim2){return data1<=dataFim2&&data2<=dataFim1}function whichAnimationEvent(){var t,el=document.createElement("fakeelement"),transitions={animation:"animationend",OAnimation:"oanimationend",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd","":"MSAnimationEnd"};for(t in transitions)if(void 0!==el.style[t])return transitions[t]}Object.defineProperty(exports,"__esModule",{value:!0}),__webpack_require__(1);var template='<div class="d-title"></div><div class="d-calendar font-conteudo-mobile_v2"><div class="d-header"><i id="d-previous"></i><p><span class="d-month"></span><span class="d-year"></span></p><i id="d-next"></i></div><div class="d-month-picker"><div data-month="1">1</div><div data-month="2">2</div><div data-month="3">3</div><div data-month="4">4</div><div data-month="5">5</div><div data-month="6">6</div><div data-month="7">7</div><div data-month="8">8</div><div data-month="9">9</div><div data-month="10">10</div><div data-month="11">11</div><div data-month="12">12</div></div><div class="d-year-picker"><div data-year="-5"></div><div data-year="-4"></div><div data-year="-3"></div><div data-year="-2"></div><div data-year="-1"></div><div data-year="0"></div><div data-year="1"></div><div data-year="2"></div><div data-year="3"></div><div data-year="4"></div><div data-year="5"></div></div><div class="d-weekdays"></div><div class="d-tables"></div></div><div class="d-note scrollbar_v2"></div><button class="d-confirm"></button><div class="d-overlay"></div>',getBrowserVersion=function(){var tem,ios,browser={type:null,version:null},ua=navigator.userAgent,M=ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return ios=ua.match(/(iphone|ipad)\s+OS\s+([\d+_]+\d+)/i)||[],/trident/i.test(M[1])?(tem=/\brv[ :]+(\d+)/g.exec(ua)||[],browser.type="MSIE",browser.version=parseInt(tem[1]),browser):"Chrome"===M[1]&&null!=(tem=ua.match(/\bOPR\/(\d+)/))?"Opera "+tem[1]:ios[1]?{type:"iOS",version:ios[2]}:(M=M[2]?[M[1],M[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(tem=ua.match(/version\/(\d+)/i))&&M.splice(1,1,tem[1]),browser.type=M[0],browser.version=parseInt(M[1]),browser)};exports.default=function Datepickk(args){Datepickk.numInstances=(Datepickk.numInstances||0)+1;var that=this,selectedDates=[],currentYear=(new Date).getFullYear(),currentMonth=(new Date).getMonth()+1,languages={pt:{monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayNames:["DOM","SEG","TER","QUA","QUI","SEX","SÃB"],weekStart:0}};languages.nb=languages.no,languages.nn=languages.no;var range=!1,maxSelections=null,container=document.body,opened=!1,months=1,closeOnSelect=!1,button=null,title=null,onNavigation=null,onClose=null,onConfirm=null,closeOnClick=!0,inline=!1,lang="pt",onSelect=null,disabledDates=[],disabledDays=[],notes=[],daynames=!0,today=!0,date=null,minDate=null,maxDate=null,weekStart=null,locked=!1;function generateDaynames(){that.el.days.innerHTML="";var ws=null!==weekStart?weekStart:languages[lang].weekStart;if(daynames)for(var x=0;x<months&&x<3;
1x++){var weekEl=document.createElement("div");weekEl.setAttribute("class","d-week");for(var i=0;i<7;i++){var dayNameIndex=i+ws>languages[lang].dayNames.length-1?i+ws-languages[lang].dayNames.length:i+ws,dayEl=document.createElement("div"),dayTextEl=document.createElement("p");dayTextEl.innerHTML=languages[lang].dayNames[dayNameIndex],dayEl.appendChild(dayTextEl),weekEl.appendChild(dayEl)}that.el.days.appendChild(weekEl)}}function generateInputs(){that.el.tables.innerHTML="";for(var x=0;x<months;x++){var container=document.createElement("div");container.setAttribute("class","d-table");for(var i=0;i<42;i++){var input=document.createElement("input");input.type="checkbox",input.id=Datepickk.numInstances+"-"+x+"-d-day-"+i;var label=document.createElement("label");label.setAttribute("for",Datepickk.numInstances+"-"+x+"-d-day-"+i);var text=document.createElement("p");container.appendChild(input),container.appendChild(label),label.appendChild(text),input.addEventListener("click",(function(event){locked&&event.preventDefault()})),input.addEventListener("change",inputChange)}that.el.tables.appendChild(container)}}function generateDates(year,month){var monthElements=that.el.querySelectorAll(".d-table"),ws=null!==weekStart?weekStart:languages[lang].weekStart;[].slice.call(that.el.querySelectorAll(".d-table")).forEach((function(element,index){const ano=year,mesReal=month+index-1;new Date(ano,mesReal,1).getDay()+new Date(ano,mesReal+1,0).getDate()>35?(element.classList.add("seis-semanas"),element.classList.remove("cinco-semanas")):(element.classList.add("cinco-semanas"),element.classList.remove("seis-semanas"));var days=new Date(year,month+index,0).getDate(),daysLast=new Date(year,month+index-1,0).getDate(),dateDay=new Date(year,month+index-1,1).getDay();dateDay-ws<0?dateDay=7-ws:dateDay-=ws;var monthText=languages[lang].monthNames[function(month){return month>11?month-=12:month<0&&(month+=12),month}(month-1+index)];element.setAttribute("data-month",monthText),[].slice.call(element.querySelectorAll(".d-table input")).forEach((function(inputEl,i){var labelEl=inputEl.nextSibling;inputEl.checked=!1,inputEl.removeAttribute("disabled"),labelEl.removeAttribute("style"),labelEl.removeAttribute("data-note-id"),labelEl.className="";var date=null;if(i<dateDay?(labelEl.childNodes[0].innerHTML=daysLast-(dateDay-i-1),0==index?(date=new Date(year,month+index-2,daysLast-(dateDay-i-1)),labelEl.className="prev"):(date="",labelEl.className="d-hidden",inputEl.setAttribute("disabled",!0))):i<days+dateDay?(date=new Date(year,month+index-1,i-dateDay+1),labelEl.childNodes[0].innerHTML=i-dateDay+1,labelEl.className=""):(labelEl.childNodes[0].innerHTML=i-days-dateDay+1,index==monthElements.length-1?(date=new Date(year,month+index,i-days-dateDay+1),labelEl.className="next"):(date="",labelEl.className="d-hidden",inputEl.setAttribute("disabled",!0))),date instanceof Date){var tabelaCalendario=$(".d-table > label").width(),localDate=date.getFullYear()+"-"+String(date.getMonth()+1).padStart(2,"0")+"-"+String(date.getDate()).padStart(2,"0");$(".d-table > label").css("height",tabelaCalendario),inputEl.setAttribute("data-date",localDate),-1==disabledDates.indexOf(date.getTime())&&-1==disabledDays.indexOf(date.getDay())||inputEl.setAttribute("disabled",!0),(minDate&&date<minDate||maxDate&&date>maxDate)&&(inputEl.setAttribute("disabled",!0),labelEl.className="d-hidden"),today&&date.getTime()==(new Date).setHours(0,0,0,0)?labelEl.classList.add("today"):labelEl.classList.remove("today");var _notess=notes.filter((function(x){for(var m=0;m<x.dates.length;m++)if(date.getTime()>=x.dates[m].date.getTime()&&date.getTime()<=x.dates[m].dateFim.getTime())return!0;return!1}));if(_notess.length>0){var bgColor="",noteIds="";_notess.length>1||(bgColor=_notess[0].color?"background:"+_notess[0].color+";":"",noteIds+=notes.indexOf(_notess[0]));var ColorFont=_notess[0].colorFont?"color:"+_notess[0].colorFont+";":"";labelEl.setAttribute("style",bgColor+ColorFont),labelEl.setAttribute("data-note-id",noteIds),labelEl.classList.add("bg-padrao"),labelEl.classList.add("bg-padrao-"+noteIds);const{conflitos:conflitos,eventosSemConflito:eventosSemConflito}=function(arr){const conflitos=[],eventosSemConflito=[];for(let i=0;i<arr.length;i++){const{dates:[{date:data1,dateFim:dataFim1}],id:id}=arr[i],conflitoAtual={id:id,menorData:new Date(data1),maiorData:new Date(dataFim1)};let conflitoEncontrado=!1;for(let j=i+1;j<arr.length;j++){const{dates:[{date:data2,dateFim:dataFim2}],id:id2}=arr[j];verificarConflito(new Date(data1),new Date(dataFim1),new Date(data2),new Date(dataFim2))&&(conflitoAtual.menorData=new Date(Math.min(conflitoAtual.menorData,data2)),conflitoAtual.maiorData=new Date(Math.max(conflitoAtual.maiorData,dataFim2)),conflitoEncontrado=!0)}if(conflitoEncontrado)conflitos.push(conflitoAtual);else{conflitos.some((conflito=>verificarConflito(conflitoAtual.menorData,conflitoAtual.maiorData,conflito.menorData,conflito.maiorData)))||eventosSemConflito.push({id:id,menorData:conflitoAtual.menorData,maiorData:conflitoAtual.maiorData})}}const novosConflitos=function(conflitos){const novosConflitos=new Set;for(let i=0;i<conflitos.length;i++){const conflitoAtual=conflitos[i];for(let j=i+1;j<conflitos.length;j++){const outroConflito=conflitos[j];if(verificarConflito(new Date(conflitoAtual.menorData),new Date(conflitoAtual.maiorData),new Date(outroConflito.menorData),new Date(outroConflito.maiorData))){const novoConflito={menorData:new Date(conflitoAtual.menorData)<new Date(outroConflito.menorData)?conflitoAtual.menorData:outroConflito.menorData,maiorData:new Date(conflitoAtual.maiorData)>new Date(outroConflito.maiorData)?conflitoAtual.maiorData:outroConflito.maiorData};novosConflitos.add(JSON.stringify(novoConflito))}}}return Array.from(novosConflitos).map((conflito=>JSON.parse(conflito)))}(conflitos),eventosSemConflitoFiltrados=eventosSemConflito.filter((eventoSemConflito=>!novosConflitos.some((conflito=>verificarConflito(eventoSemConflito.menorData,eventoSemConflito.maiorData,conflito.menorData,conflito.maiorData)))));return{conflitos:novosConflitos.length>0?[...conflitos,...novosConflitos]:conflitos,eventosSemConflito:eventosSemConflitoFiltrados}}(notes);( 2/*! 3 * Datepickk 4 * Docs & License: https://crsten.github.com/datepickk 5 * (c) 2017 Carsten Jacobsen 6 */ 7function(conflitos){const objetoFiltrado=[];for(let i=0;i<conflitos.length;i++){const dataAtual=new Date(conflitos[i].menorData),mesAtual=dataAtual.getMonth(),anoAtual=dataAtual.getFullYear();let duplicado=!1;for(let j=0;j<objetoFiltrado.length;j++){const dataFiltrada=new Date(objetoFiltrado[j].menorData);
7if(mesAtual===dataFiltrada.getMonth()&&anoAtual==dataFiltrada.getFullYear()){duplicado=!0,dataAtual<dataFiltrada&&(objetoFiltrado[j]=conflitos[i]);break}}duplicado||objetoFiltrado.push(conflitos[i])}return objetoFiltrado})(conflitos).map((conflito=>{const menorDataLocal=conflito.menorData.getFullYear()+"-"+String(conflito.menorData.getMonth()+1).padStart(2,"0")+"-"+String(conflito.menorData.getDate()).padStart(2,"0"),idData=$(`.d-table input[data-date="${menorDataLocal}"]`).attr("id");$(`.d-table label[for="${idData}"]`).addClass("first-element");const maiorDataLocal=conflito.maiorData.getFullYear()+"-"+String(conflito.maiorData.getMonth()+1).padStart(2,"0")+"-"+String(conflito.maiorData.getDate()).padStart(2,"0"),idDataFinal=$(`.d-table input[data-date="${maiorDataLocal}"]`).attr("id");$(`.d-table label[for="${idDataFinal}"]`).addClass("last-element")})),eventosSemConflito.map((eventosSem=>{const idData=$(`.d-table input[data-date="${eventosSem.menorData.toISOString()}"]`).attr("id");$(`.d-table label[for="${idData}"]`).addClass("first-element");const idDataFinal=$(`.d-table input[data-date="${eventosSem.maiorData.toISOString()}"]`).attr("id");$(`.d-table label[for="${idDataFinal}"]`).addClass("last-element")}))}}}))}));!function(){var mesTexto=that.el.tables.querySelector(".d-table[data-month]").getAttribute("data-month"),mesAtual=languages[lang].monthNames.indexOf(mesTexto),anoAtual=currentYear,date=new Date(anoAtual,mesAtual,1),dateFim=new Date(anoAtual,mesAtual+1,0),_notess=notes.filter((function(x){for(var m=0;m<x.dates.length;m++)if(x.dates[m].date<=dateFim&&x.dates[m].dateFim>=date)return!0;return!1})),notelist=[];that.el.note.querySelectorAll(".d-note"),that.el.note.innerHTML="";var container=that.el.note;container.innerHTML="";for(var seen=new Set,l=0;l<_notess.length;l++)if("note"in _notess[l]&&_notess[l].note){var ev=_notess[l],key=(ev.id||"")+"::"+(ev.dates&&ev.dates[0]?ev.dates[0].date:"")+"::"+(ev.dates&&ev.dates[0]?ev.dates[0].dateFim:"")+"::"+(ev.horarioInicio||"")+"::"+(ev.horarioFim||"");if(seen.has(key))continue;seen.add(key);var oldNote=container.querySelector('.d-note-item[data-key="'+key+'"]');if(null==oldNote){var mesPadrao=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],semana=["DOM","SEG","TER","QUA","QUI","SEX","SÃB"],semanaStart=new Date(_notess[l].dates[0].date),diaStart=new Date(_notess[l].dates[0].date),semanaEnd=new Date(_notess[l].dates[0].dateFim),diaEnd=new Date(_notess[l].dates[0].dateFim),noteItem=document.createElement("div");noteItem.setAttribute("data-key",key),noteItem.setAttribute("data-id",ev.id),noteItem.setAttribute("data-hora-inicio",ev.horarioInicio||""),noteItem.setAttribute("data-hora-fim",ev.horarioFim||""),noteItem.setAttribute("data-descricao",ev.descricao||""),noteItem.setAttribute("class","d-note-item"),noteItem.setAttribute("data-note",_notess[l].note),noteItem.setAttribute("data-start",_notess[l].dates[0].date),noteItem.setAttribute("data-note-id",notes.indexOf(_notess[l])),noteItem.setAttribute("data-color-font",_notess[l].color);var noteItemStart=document.createElement("div");noteItemStart.setAttribute("class","data-info"),noteItemStart.innerHTML='<div class="data-semana font-conteudo-mobile_v2">'+semana[semanaStart.getDay()]+'</div><div class="data-dia font-conteudo-mobile_v2">'+diaStart.getDate()+"</div>",noteItem.appendChild(noteItemStart);var noteItemDescricao=document.createElement("div");if(noteItemDescricao.setAttribute("class","data-separa font-conteudo-mobile_v2 data-descricao"),noteItemDescricao.innerHTML="<p class='ellipse-line-3_v2'>"+_notess[l].note+'</p><a id="'+_notess[l].id+'" data-bs-toggle="modal" data-bs-target="#evento_v2'+_notess[l].id+'"><i class="icon_v2 icon_v2-noticia-visualizacao"><pre class="conteudo-hidden_v2">.</pre></i></a>',_notess[l].dates[0].date<_notess[l].dates[0].dateFim){var noteItemSepara=document.createElement("div"),noteItemEnd=document.createElement("div");noteItemEnd.setAttribute("class","data-info"),noteItemSepara.setAttribute("class","data-separa font-conteudo-mobile_v2"),noteItemEnd.innerHTML='<div class="data-semana font-conteudo-mobile_v2">'+semana[semanaEnd.getDay()]+'</div><div class="data-dia font-conteudo-mobile_v2">'+diaEnd.getDate()+"</div>",noteItemSepara.innerHTML="<p>até</p>",noteItem.appendChild(noteItemSepara),noteItem.appendChild(noteItemEnd)}noteItem.appendChild(noteItemDescricao);let infoHorario="";!0===_notess[l].diaTodo||"1"===_notess[l].diaTodo||1===_notess[l].diaTodo?infoHorario+='<div style="display: none">\n\t\t\t\t\t\t\t\t\t<p><strong>InÃcio:</strong></p>\n\t\t\t\t\t\t\t\t\t<p>'+diaStart.getDate()+" de "+mesPadrao[diaStart.getMonth()].toLowerCase()+" de "+diaStart.getFullYear()+"</p>\n\t\t\t\t\t\t\t\t\t<hr>\n\t\t\t\t\t\t\t\t\t<p><strong>Fim:</strong></p>\n\t\t\t\t\t\t\t\t\t<p>"+diaEnd.getDate()+" de "+mesPadrao[diaEnd.getMonth()].toLowerCase()+" de "+diaEnd.getFullYear()+"</p>\n\t\t\t\t\t\t\t\t\t<hr>\n\t\t\t\t\t\t\t\t\t<p><strong>Horário:</strong></p>\n\t\t\t\t\t\t\t\t\t<p><p>Este evento ocorrerá durante o dia todo.</p></p>\n\t\t\t\t\t\t\t\t\t<hr>\n\t\t\t\t\t\t\t\t\t<p>"+_notess[l].descricao+"</p>\n\t\t\t\t\t\t\t\t</div>":infoHorario+='<div style="display: none">\n\t\t\t\t\t\t\t\t\t<p><strong>InÃcio:</strong></p>\n\t\t\t\t\t\t\t\t\t<p>'+diaStart.getDate()+" de "+mesPadrao[diaStart.getMonth()].toLowerCase()+" de "+diaStart.getFullYear()+" à s "+_notess[l].horarioInicio+"</p>\n\t\t\t\t\t\t\t\t\t<hr>\n\t\t\t\t\t\t\t\t\t<p><strong>Fim:</strong></p>\n\t\t\t\t\t\t\t\t\t<p>"+diaEnd.getDate()+" de "+mesPadrao[diaEnd.getMonth()].toLowerCase()+" de "+diaEnd.getFullYear()+" à s "+_notess[l].horarioFim+"</p>\n\t\t\t\t\t\t\t\t\t<hr>\n\t\t\t\t\t\t\t\t\t<p>"+_notess[l].descricao+"</p>\n\t\t\t\t\t\t\t\t</div>";var noteModal=document.createElement("div");noteModal.innerHTML=infoHorario,noteItem.appendChild(noteModal),container.appendChild(noteItem),notelist.push(noteItem)}else notelist.push(oldNote)}0===seen.size&&(container.innerHTML='<h2 class="sem-evento_v2">Sem eventos cadastrados neste mês!</h2>')}();$(document).on("click",".d-note-item",(function(){let titleHtml=$(this).find("div").eq(7).find("p").text(),recuperaHtml=$(this).find("div").eq(9).html();titleHtml||(titleHtml=$(this).find("div").eq(3).find("p").text(),recuperaHtml=$(this).find("div").eq(5).html()),$("#modalGeralContent").find("div").eq(0).find("h3").text(titleHtml),$("#modalGeralContent").find("div").eq(1).html(recuperaHtml),$("#modalGeral").modal("show")}))}function setDate(){if(that.el.tables.childNodes.length&&that.el.tables.childNodes[0].childNodes.length){[].slice.call(that.el.querySelectorAll(".d-table input")).forEac
7h((function(inputEl){inputEl.checked=!1})),[].slice.call(that.el.monthPicker.querySelectorAll(".current")).forEach((function(monthPickEl){monthPickEl.classList.remove("current")})),[].slice.call(that.el.yearPicker.querySelectorAll(".current")).forEach((function(yearPickEl){yearPickEl.classList.remove("current")})),(currentMonth>12||currentMonth<1)&&(currentMonth>12?(currentYear+=1,currentMonth-=12):(currentYear-=1,currentMonth+=12)),maxDate&&new Date(currentYear,currentMonth-1+months-1,1)>=new Date(maxDate).setDate(1)?(currentYear=maxDate.getFullYear(),currentMonth=maxDate.getMonth()+1-months+1,that.el.header.childNodes[2].setAttribute("style","visibility:hidden")):that.el.header.childNodes[2].removeAttribute("style"),minDate&&new Date(currentYear,currentMonth-1,1)<=new Date(minDate).setDate(1)?(currentYear=minDate.getFullYear(),currentMonth=minDate.getMonth()+1,that.el.header.childNodes[0].setAttribute("style","visibility:hidden")):that.el.header.childNodes[0].removeAttribute("style");for(var c=0;c<months;c++){var index=currentMonth-1+c;index>11?index-=12:index<0&&(index+=12),that.el.monthPicker.childNodes[index].classList.add("current")}generateDates(currentYear,currentMonth),[].slice.call(that.el.yearPicker.childNodes).forEach((function(node,index){node.innerHTML="'"+(currentYear+parseInt(node.getAttribute("data-year"))).toString().substring(2,4)}));var datemonth=languages[lang].monthNames[currentMonth-1],dateFimmonth="";if(months>1){dateFimmonth+=" - ";var monthint=currentMonth-1+months-1;monthint>11?monthint-=12:monthint<0&&(monthint+=12),dateFimmonth+=languages[lang].monthNames[monthint]}var yearname=currentYear;that.el.header.childNodes[1].childNodes[0].innerHTML=datemonth+dateFimmonth,that.el.header.childNodes[1].childNodes[1].innerHTML=yearname,that.el.yearPicker.querySelector('[data-year="0"]').classList.add("current"),currentMonth-1+months-1>11&&that.el.yearPicker.querySelector('[data-year="1"]').classList.add("current"),function(){if(selectedDates.forEach((function(date){var el=that.el.querySelector('[data-date="'+date.toJSON()+'"]');el&&(el.checked=!0)})),that.el.tables.classList.remove("before"),range&&selectedDates.length>1){var currentDate=new Date(currentYear,currentMonth-1,1),sorted=selectedDates.sort((function(a,b){return a.getTime()-b.getTime()}));!that.el.querySelector('[data-date="'+sorted[0].toJSON()+'"]')&¤tDate>=new Date(sorted[0].getFullYear(),sorted[0].getMonth(),1)&¤tDate<=new Date(sorted[1].getFullYear(),sorted[1].getMonth(),1)&&that.el.tables.classList.add("before")}}(),onNavigation&&onNavigation.call(that)}}function nextMonth(){currentMonth+=months,generateDates(),setDate()}function prevMonth(){currentMonth-=months,generateDates(),setDate()}function selectDate(date,ignoreOnSelect){(date=new Date(date)).setHours(0,0,0,0);var el=that.el.querySelector('[data-date="'+date.toJSON()+'"]');range&&el&&el.checked&&el.classList.add("single"),el&&!el.checked&&(el.checked=!0),selectedDates.push(date),onSelect&&!ignoreOnSelect&&onSelect.apply(date,[!0])}function unselectDate(date,ignoreOnSelect){(date=new Date(date)).setHours(0,0,0,0);var el=that.el.querySelector('[data-date="'+date.toJSON()+'"]');el&&(el.classList.remove("single"),el.checked&&(el.checked=!1)),selectedDates=selectedDates.filter((function(x){return x.getTime()!=date.getTime()})),onSelect&&!ignoreOnSelect&&onSelect.call(date,!1)}function inputChange(e){var date=new Date(this.getAttribute("data-date"));if(this.classList.remove("single"),!locked){if(range&&that.el.tables.classList.remove("before"),this.checked){if(maxSelections&&selectedDates.length>maxSelections-1)for(var length=selectedDates.length;length>maxSelections-1;length--)unselectDate(selectedDates[0]);range&&selectedDates.length&&!that.el.querySelector('[data-date="'+selectedDates[0].toJSON()+'"]')&&date>selectedDates[0]&&that.el.tables.classList.add("before"),selectedDates.push(date),closeOnSelect&&that.hide()}else range&&1==selectedDates.length&&selectedDates[0].getTime()==date.getTime()?(selectDate(date),this.classList.add("single")):selectedDates=selectedDates.filter((function(x){return x.getTime()!=date.getTime()}));onSelect&&onSelect.call(date,this.checked)}}function show(properties){that.inline||that.container!==document.body||document.body.classList.add("d-noscroll"),setArgs(
7properties);that.el.calendar.addEventListener(whichAnimationEvent(),(function handler(){that.el.calendar.removeEventListener(whichAnimationEvent(),handler)})),container.appendChild(that.el),opened=!0,date&&(currentMonth=date.getMonth()+1,currentYear=date.getFullYear()),setDate()}function hide(){document.body.classList.remove("d-noscroll");that.el.addEventListener(whichAnimationEvent(),(function handler(){that.el.parentNode.removeChild(that.el),opened=!1,that.el.classList.remove("d-hide"),"function"==typeof onClose&&onClose.apply(that),that.el.removeEventListener(whichAnimationEvent(),handler)})),that.el.classList.add("d-hide")}function setArgs(x){for(var key in x)key in that&&(that[key]=x[key])}function currentDateSetter(x){x=new Date(x),currentMonth=x.getMonth()+1,currentYear=x.getFullYear(),setDate()}that.show=show,that.hide=hide,that.selectDate=selectDate,that.unselectAll=function(ignoreOnSelect){selectedDates.forEach((function(date){unselectDate(date,ignoreOnSelect)}))},that.unselectDate=unselectDate,Object.defineProperties(that,{selectedDates:{get:function(){return selectedDates.sort((function(a,b){return a.getTime()-b.getTime()}))}},range:{get:function(){return range},set:function(x){x?(range=!0,that.el.tables.classList.add("range")):(range=!1,that.el.tables.classList.remove("range")),x&&(maxSelections=2)}},button:{get:function(){return button},set:function(x){button="string"==typeof x?x:null,that.el.button.innerHTML=button||""}},title:{get:function(){return title},set:function(x){title="string"==typeof x?x:null,that.el.titleBox.innerText=title||""}},lang:{get:function(){return lang},set:function(x){x in languages?(lang=x,generateDaynames(),setDate()):console.error("Language not found")}},weekStart:{get:function(){return null!==weekStart?weekStart:languages[lang].weekStart},set:function(x){"number"==typeof x&&x>-1&&x<7?(weekStart=x,generateDaynames(),setDate()):console.error("weekStart must be a number between 0 and 6")}},months:{get:function(){return months},set:function(x){"number"==typeof x&&x>0?(months=x,generateDaynames(),generateInputs(),setDate(),1==months?that.el.classList.remove("multi"):that.el.classList.add("multi")):console.error("months must be a number > 0")}},isOpen:{get:function(){return opened}},closeOnSelect:{get:function(){return closeOnSelect},set:function(x){closeOnSelect=!!x}},disabledDays:{get:function(){return disabledDays},set:function(x){if(x instanceof Array)for(var i=0;i<x.length;i++)"number"==typeof x[i]&&disabledDays.push(x[i]);else"number"==typeof x?disabledDays=[x]:x||(disabledDays=[]);setDate()}},disabledDates:{get:function(){return disabledDates.map((function(x){return new Date(x)}))},set:function(x){x instanceof Array?x.forEach((function(date){date instanceof Date&&disabledDates.push(new Date(date.getFullYear(),date.getMonth(),date.getDate()).getTime())})):x instanceof Date?disabledDates=[new Date(x.getFullYear(),x.getMonth(),x.getDate()).getTime()]:x||(disabledDates=[]),setDate()}},notes:{get:function(){return notes},set:function(x){if(x instanceof Array)x.forEach((function(hl){if(hl instanceof Object){var notesObj={dates:[]};"date"in hl?notesObj.dates.push({date:new Date(hl.date.getFullYear(),hl.date.getMonth(),hl.date.getDate()),dateFim:"dateFim"in hl?new Date(hl.dateFim.getFullYear(),hl.dateFim.getMonth(),hl.dateFim.getDate()):new Date(hl.date.getFullYear(),hl.date.getMonth(),hl.date.getDate())}):"dates"in hl&&hl.dates instanceof Array&&hl.dates.forEach((function(hlDate){notesObj.dates.push({date:new Date(hlDate.date.getFullYear(),hlDate.date.getMonth(),hlDate.date.getDate()),dateFim:"dateFim"in hlDate?new Date(hlDate.dateFim.getFullYear(),hlDate.dateFim.getMonth(),hlDate.dateFim.getDate()):new Date(hlDate.date.getFullYear(),hlDate.date.getMonth(),hlDate.date.getDate())})})),notesObj.colorFont=hl.colorFont,notesObj.color=hl.color,notesObj.note="note"in hl?hl.note:null,notesObj.id=hl.id,notesObj.horarioInicio=hl.horarioInicio,notesObj.horarioFim=hl.horarioFim,notesObj.descricao=hl.descricao,notesObj.diaTodo=hl.diaTodo,notes.push(notesObj)}}));else if(x instanceof Object){var notesObj={dates:[]};"date"in x?notesObj.dates.push({date:new Date(x.date.getFullYear(),x.date.getMonth(),x.date.getDate()),dateFim:"dateFim"in x?new Date(x.dateFim.getFullYear(),x.dateFim.getMonth(),x.dateFim.getDate()):new Date(x.date.getFullYear(),x.date.getMonth(),x.date.getDate())}
7):"dates"in x&&x.dates instanceof Array&&x.dates.forEach((function(hlDate){notesObj.dates.push({date:new Date(hlDate.date.getFullYear(),hlDate.date.getMonth(),hlDate.date.getDate()),dateFim:"dateFim"in hlDate?new Date(hlDate.dateFim.getFullYear(),hlDate.dateFim.getMonth(),hlDate.dateFim.getDate()):new Date(hlDate.date.getFullYear(),hlDate.date.getMonth(),hlDate.date.getDate())})})),notesObj.colorFont=x.colorFont,notesObj.color=x.color,notesObj.note="note"in x?x.note:null,notesObj.id=x.id,notesObj.horarioInicio=x.horarioInicio,notesObj.horarioFim=x.horarioFim,notesObj.descricao=x.descricao,notesObj.diaTodo=x.diaTodo,notes.push(notesObj)}else x||(notes=[]);setDate()}},onClose:{set:function(callback){onClose=callback}},onSelect:{set:function(callback){onSelect=callback}},today:{get:function(){return today},set:function(x){today=!!x}},daynames:{get:function(){return daynames},set:function(x){daynames=!!x,generateDaynames()}},fullscreen:{get:function(){return that.el.classList.contains("fullscreen")},set:function(x){x?that.el.classList.add("fullscreen"):that.el.classList.remove("fullscreen")}},locked:{get:function(){return locked},set:function(x){x?(locked=!0,that.el.tables.classList.add("locked")):(locked=!1,that.el.tables.classList.remove("locked"))}},maxSelections:{get:function(){return maxSelections},set:function(x){maxSelections="number"!=typeof x||range?range?2:null:x}},onConfirm:{set:function(callback){"function"==typeof callback?(onConfirm=callback.bind(that),that.el.button.addEventListener("click",onConfirm)):callback||(that.el.button.removeEventListener("click",onConfirm),onConfirm=null)}},onNavigation:{set:function(callback){"function"==typeof callback?onNavigation=callback.bind(that):callback||(onNavigation=null)}},closeOnClick:{get:function(){return closeOnClick},set:function(x){closeOnClick=!!x}},currentDate:{get:function(){return new Date(currentYear,currentMonth-1,1)},set:currentDateSetter},setDate:{set:currentDateSetter},date:{get:function(){return date},set:function(x){x?date=new Date(x):(date=null,currentYear=(new Date).getFullYear(),currentMonth=(new Date).getMonth()+1),setDate()}},minDate:{get:function(){return minDate},set:function(x){minDate=x?new Date(x):null,setDate()}},maxDate:{get:function(){return maxDate},set:function(x){maxDate=x?new Date(x):null,setDate()}},container:{get:function(){return container},set:function(x){if(x instanceof String){var y=document.querySelector(x);y?(container=y)!=document.body?that.el.classList.add("wrapped"):that.el.classList.remove("wrapped"):console.error("Container doesn't exist")}else x instanceof HTMLElement?(container=x)!=document.body?that.el.classList.add("wrapped"):that.el.classList.remove("wrapped"):console.error("Invalid type")}},inline:{get:function(){return inline},set:function(x){x?(inline=!0,that.el.classList.add("inline")):(inline=!1,that.el.classList.remove("inline"))}}}),that.el=document.createElement("div"),that.el.id="Datepickk",that.el.classList.add(getBrowserVersion().type),that.el.innerHTML=template,that.el.calendar=that.el.childNodes[1],that.el.titleBox=that.el.childNodes[0],that.el.button=that.el.childNodes[3],that.el.header=that.el.calendar.childNodes[0],that.el.monthPicker=that.el.calendar.childNodes[1],that.el.yearPicker=that.el.calendar.childNodes[2],that.el.tables=that.el.calendar.childNodes[4],that.el.days=that.el.calendar.childNodes[3],that.el.overlay=that.el.childNodes[4],that.el.note=that.el.childNodes[2],setArgs(args),generateInputs(),generateDaynames(),function(){that.el.header.childNodes[0].addEventListener("click",prevMonth),that.el.header.childNodes[2].addEventListener("click",nextMonth),that.el.button.addEventListener("click",hide),that.el.overlay.addEventListener("click",(function(){closeOnClick&&that.hide()}));var dateX=0,distance=0;that.el.calendar.addEventListener("touchdate",(function(e){dateX=e.changedTouches[0].clientX||e.originalEvent.changedTouches[0].clientX})),that.el.calendar.addEventListener("",(function(e){distance=e.changedTouches[0].clientX-dateX||e.originalEvent.changedTouches[0].clientX-dateX,e.preventDefault()})),that.el.calendar.addEventListener("touchend",(function(e){distance>50?prevMonth():distance<-50&&nextMonth(),distance=0}))}(),inline&&show(),setDate()}},function(module,exports){}]).default}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.