;(function (window, $, undefined){ ;(function (){
"use strict";
var VERSION='2.2.3',
pluginName='airdatepicker',
autoInitSelector='.airdatepicker-here',
$body, $airdatepickersContainer,
containerBuilt=false,
baseTemplate='' +
'<div class="airdatepicker">' +
'<i class="airdatepicker--pointer"></i>' +
'<nav class="airdatepicker--nav"></nav>' +
'<div class="airdatepicker--content"></div>' +
'</div>',
defaults={
classes: '',
inline: false,
inline_popup: false,
language: 'en',
startDate: new Date(),
firstDay: '',
weekends: [6, 0],
dateFormat: '',
altField: '',
altFieldDateFormat: '@',
toggleSelected: true,
keyboardNav: true,
position: 'bottom left',
offset: 12,
view: 'days',
minView: 'days',
showOtherMonths: true,
selectOtherMonths: true,
moveToOtherMonthsOnSelect: true,
showOtherYears: true,
selectOtherYears: true,
moveToOtherYearsOnSelect: true,
minDate: '',
maxDate: '',
disableNavWhenOutOfRange: true,
multipleDates: false,
multipleDatesSeparator: ',',
range: false,
todayButton: false,
clearButton: false,
showEvent: 'focus',
autoClose: false,
monthsField: 'monthsShort',
prevHtml: '<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',
nextHtml: '<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',
navTitles: {
days: 'MM, <i>yyyy</i>',
months: 'yyyy',
years: 'yyyy1 - yyyy2'
},
timepicker: false,
onlyTimepicker: false,
dateTimeSeparator: ' ',
timeFormat: '',
minHours: 0,
maxHours: 24,
minMinutes: 0,
maxMinutes: 59,
hoursStep: 1,
minutesStep: 1,
onSelect: '',
onShow: '',
onHide: '',
onChangeMonth: '',
onChangeYear: '',
onChangeDecade: '',
onChangeView: '',
onRenderCell: ''
},
hotKeys={
'ctrlRight': [17, 39],
'ctrlUp': [17, 38],
'ctrlLeft': [17, 37],
'ctrlDown': [17, 40],
'shiftRight': [16, 39],
'shiftUp': [16, 38],
'shiftLeft': [16, 37],
'shiftDown': [16, 40],
'altUp': [18, 38],
'altRight': [18, 39],
'altLeft': [18, 37],
'altDown': [18, 40],
'ctrlShiftUp': [16, 17, 38]
},
airdatepicker;
var Datepicker=function (el, options){
this.el=el;
this.$el=$(el);
this.opts=$.extend(true, {}, defaults, options, this.$el.data());
if($body==undefined){
$body=$('body');
}
if(!this.opts.startDate){
this.opts.startDate=new Date();
}
if(this.el.nodeName=='INPUT'){
this.elIsInput=true;
}
if(this.opts.altField){
this.$altField=typeof this.opts.altField=='string' ? $(this.opts.altField):this.opts.altField;
}
this.inited=false;
this.visible=false;
this.silent=false;
this.currentDate=this.opts.startDate;
this.currentView=this.opts.view;
this._createShortCuts();
this.selectedDates=[];
this.views={};
this.keys=[];
this.minRange='';
this.maxRange='';
this._prevOnSelectValue='';
this.init()
};
airdatepicker=Datepicker;
airdatepicker.prototype={
VERSION: VERSION,
viewIndexes: ['days', 'months', 'years'],
init: function (){
if(!containerBuilt&&!this.opts.inline&&this.elIsInput){
this._buildDatepickersContainer();
}
this._buildBaseHtml();
this._defineLocale(this.opts.language);
this._syncWithMinMaxDates();
if(this.elIsInput){
if(!this.opts.inline){
this._setPositionClasses(this.opts.position);
this._bindEvents()
}
if(this.opts.keyboardNav&&!this.opts.onlyTimepicker){
this._bindKeyboardEvents();
}
this.$airdatepicker.on('mousedown', this._onMouseDownDatepicker.bind(this));
this.$airdatepicker.on('mouseup', this._onMouseUpDatepicker.bind(this));
}
if(this.opts.classes){
this.$airdatepicker.addClass(this.opts.classes)
}
if(this.opts.timepicker){
this.timepicker=new $.fn.airdatepicker.Timepicker(this, this.opts);
this._bindTimepickerEvents();
}
if(this.opts.onlyTimepicker){
this.$airdatepicker.addClass('-only-timepicker-');
}
this.views[this.currentView]=new $.fn.airdatepicker.Body(this, this.currentView, this.opts);
this.views[this.currentView].show();
this.nav=new $.fn.airdatepicker.Navigation(this, this.opts);
this.view=this.currentView;
this.$el.on('clickCell.adp', this._onClickCell.bind(this));
this.$airdatepicker.on('mouseenter', '.airdatepicker--cell', this._onMouseEnterCell.bind(this));
this.$airdatepicker.on('mouseleave', '.airdatepicker--cell', this._onMouseLeaveCell.bind(this));
this.inited=true;
},
_createShortCuts: function (){
this.minDate=this.opts.minDate ? this.opts.minDate:new Date(-8639999913600000);
this.maxDate=this.opts.maxDate ? this.opts.maxDate:new Date(8639999913600000);
},
_bindEvents:function (){
this.$el.on(this.opts.showEvent + '.adp', this._onShowEvent.bind(this));
this.$el.on('mouseup.adp', this._onMouseUpEl.bind(this));
this.$el.on('blur.adp', this._onBlur.bind(this));
this.$el.on('keyup.adp', this._onKeyUpGeneral.bind(this));
$(window).on('resize.adp', this._onResize.bind(this));
$('body').on('mouseup.adp', this._onMouseUpBody.bind(this));
},
_bindKeyboardEvents: function (){
this.$el.on('keydown.adp', this._onKeyDown.bind(this));
this.$el.on('keyup.adp', this._onKeyUp.bind(this));
this.$el.on('hotKey.adp', this._onHotKey.bind(this));
},
_bindTimepickerEvents: function (){
this.$el.on('timeChange.adp', this._onTimeChange.bind(this));
},
isWeekend: function (day){
return this.opts.weekends.indexOf(day)!==-1;
},
_defineLocale: function (lang){
if(typeof lang=='string'){
this.loc=$.fn.airdatepicker.language[lang];
if(!this.loc){
console.warn('Can\'t find language "' + lang + '" in Datepicker.language, will use "en" instead');
this.loc=$.extend(true, {}, $.fn.airdatepicker.language.ru)
}
this.loc=$.extend(true, {}, $.fn.airdatepicker.language.ru, $.fn.airdatepicker.language[lang])
}else{
this.loc=$.extend(true, {}, $.fn.airdatepicker.language.ru, lang)
}
if(this.opts.dateFormat){
this.loc.dateFormat=this.opts.dateFormat
}
if(this.opts.timeFormat){
this.loc.timeFormat=this.opts.timeFormat
}
if(this.opts.firstDay!==''){
this.loc.firstDay=this.opts.firstDay
}
if(this.opts.timepicker){
this.loc.dateFormat=[this.loc.dateFormat, this.loc.timeFormat].join(this.opts.dateTimeSeparator);
}
if(this.opts.onlyTimepicker){
this.loc.dateFormat=this.loc.timeFormat;
}
var boundary=this._getWordBoundaryRegExp;
if(this.loc.timeFormat.match(boundary('aa')) ||
this.loc.timeFormat.match(boundary('AA'))
){
this.ampm=true;
}},
_buildDatepickersContainer: function (){
containerBuilt=true;
$body.append('<div class="airdatepickers-container" id="airdatepickers-container"></div>');
$airdatepickersContainer=$('#airdatepickers-container');
},
_buildBaseHtml: function (){
var $appendTarget,
$inline=$('<div class="airdatepicker-inline">');
if(this.el.nodeName=='INPUT'){
if(!this.opts.inline){
if(!this.opts.inline_popup) $appendTarget=$airdatepickersContainer;
else $appendTarget=jQuery(this.$el).parent();
}else{
$appendTarget=$inline.insertAfter(this.$el)
}}else{
$appendTarget=$inline.appendTo(this.$el)
}
this.$airdatepicker=$(baseTemplate).appendTo($appendTarget);
this.$content=$('.airdatepicker--content', this.$airdatepicker);
this.$nav=$('.airdatepicker--nav', this.$airdatepicker);
},
_triggerOnChange: function (){
if(!this.selectedDates.length){
if(this._prevOnSelectValue==='') return;
this._prevOnSelectValue='';
return this.opts.onSelect('', '', this);
}
var selectedDates=this.selectedDates,
parsedSelected=airdatepicker.getParsedDate(selectedDates[0]),
formattedDates,
_this=this,
dates=new Date(
parsedSelected.year,
parsedSelected.month,
parsedSelected.date,
parsedSelected.hours,
parsedSelected.minutes
);
formattedDates=selectedDates.map(function (date){
return _this.formatDate(_this.loc.dateFormat, date)
}).join(this.opts.multipleDatesSeparator);
if(this.opts.multipleDates||this.opts.range){
dates=selectedDates.map(function(date){
var parsedDate=airdatepicker.getParsedDate(date);
return new Date(
parsedDate.year,
parsedDate.month,
parsedDate.date,
parsedDate.hours,
parsedDate.minutes
);
})
}
this._prevOnSelectValue=formattedDates;
this.opts.onSelect(formattedDates, dates, this);
},
next: function (){
var d=this.parsedDate,
o=this.opts;
switch (this.view){
case 'days':
this.date=new Date(d.year, d.month + 1, 1);
if(o.onChangeMonth) o.onChangeMonth(this.parsedDate.month, this.parsedDate.year);
break;
case 'months':
this.date=new Date(d.year + 1, d.month, 1);
if(o.onChangeYear) o.onChangeYear(this.parsedDate.year);
break;
case 'years':
this.date=new Date(d.year + 10, 0, 1);
if(o.onChangeDecade) o.onChangeDecade(this.curDecade);
break;
}},
prev: function (){
var d=this.parsedDate,
o=this.opts;
switch (this.view){
case 'days':
this.date=new Date(d.year, d.month - 1, 1);
if(o.onChangeMonth) o.onChangeMonth(this.parsedDate.month, this.parsedDate.year);
break;
case 'months':
this.date=new Date(d.year - 1, d.month, 1);
if(o.onChangeYear) o.onChangeYear(this.parsedDate.year);
break;
case 'years':
this.date=new Date(d.year - 10, 0, 1);
if(o.onChangeDecade) o.onChangeDecade(this.curDecade);
break;
}},
formatDate: function (string, date){
date=date||this.date;
var result=string,
boundary=this._getWordBoundaryRegExp,
locale=this.loc,
leadingZero=airdatepicker.getLeadingZeroNum,
decade=airdatepicker.getDecade(date),
d=airdatepicker.getParsedDate(date),
fullHours=d.fullHours,
hours=d.hours,
ampm=string.match(boundary('aa'))||string.match(boundary('AA')),
dayPeriod='am',
replacer=this._replacer,
validHours;
if(this.opts.timepicker&&this.timepicker&&ampm){
validHours=this.timepicker._getValidHoursFromDate(date, ampm);
fullHours=leadingZero(validHours.hours);
hours=validHours.hours;
dayPeriod=validHours.dayPeriod;
}
switch (true){
case /@/.test(result):
result=result.replace(/@/, date.getTime());
case /aa/.test(result):
result=replacer(result, boundary('aa'), dayPeriod);
case /AA/.test(result):
result=replacer(result, boundary('AA'), dayPeriod.toUpperCase());
case /dd/.test(result):
result=replacer(result, boundary('dd'), d.fullDate);
case /d/.test(result):
result=replacer(result, boundary('d'), d.date);
case /DD/.test(result):
result=replacer(result, boundary('DD'), locale.days[d.day]);
case /D/.test(result):
result=replacer(result, boundary('D'), locale.daysShort[d.day]);
case /mm/.test(result):
result=replacer(result, boundary('mm'), d.fullMonth);
case /m/.test(result):
result=replacer(result, boundary('m'), d.month + 1);
case /MM/.test(result):
result=replacer(result, boundary('MM'), this.loc.months[d.month]);
case /M/.test(result):
result=replacer(result, boundary('M'), locale.monthsShort[d.month]);
case /ii/.test(result):
result=replacer(result, boundary('ii'), d.fullMinutes);
case /i/.test(result):
result=replacer(result, boundary('i'), d.minutes);
case /hh/.test(result):
result=replacer(result, boundary('hh'), fullHours);
case /h/.test(result):
result=replacer(result, boundary('h'), hours);
case /yyyy/.test(result):
result=replacer(result, boundary('yyyy'), d.year);
case /yyyy1/.test(result):
result=replacer(result, boundary('yyyy1'), decade[0]);
case /yyyy2/.test(result):
result=replacer(result, boundary('yyyy2'), decade[1]);
case /yy/.test(result):
result=replacer(result, boundary('yy'), d.year.toString().slice(-2));
}
return result;
},
_replacer: function (str, reg, data){
return str.replace(reg, function (match, p1,p2,p3){
return p1 + data + p3;
})
},
_getWordBoundaryRegExp: function (sign){
var symbols='\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;';
return new RegExp('(^|>|' + symbols + ')(' + sign + ')($|<|' + symbols + ')', 'g');
},
selectDate: function (date){
var _this=this,
opts=_this.opts,
d=_this.parsedDate,
selectedDates=_this.selectedDates,
len=selectedDates.length,
newDate='';
if(Array.isArray(date)){
date.forEach(function (d){
_this.selectDate(d)
});
return;
}
if(!(date instanceof Date)) return;
this.lastSelectedDate=date;
if(this.timepicker){
this.timepicker._setTime(date);
}
_this._trigger('selectDate', date);
if(this.timepicker){
date.setHours(this.timepicker.hours);
date.setMinutes(this.timepicker.minutes)
}
if(_this.view=='days'){
if(date.getMonth()!=d.month&&opts.moveToOtherMonthsOnSelect){
newDate=new Date(date.getFullYear(), date.getMonth(), 1);
}}
if(_this.view=='years'){
if(date.getFullYear()!=d.year&&opts.moveToOtherYearsOnSelect){
newDate=new Date(date.getFullYear(), 0, 1);
}}
if(newDate){
_this.silent=true;
_this.date=newDate;
_this.silent=false;
_this.nav._render()
}
if(opts.multipleDates&&!opts.range){
if(len===opts.multipleDates) return;
if(!_this._isSelected(date)){
_this.selectedDates.push(date);
}}else if(opts.range){
if(len==2){
_this.selectedDates=[date];
_this.minRange=date;
_this.maxRange='';
}else if(len==1){
_this.selectedDates.push(date);
if(!_this.maxRange){
_this.maxRange=date;
}else{
_this.minRange=date;
}
if(airdatepicker.bigger(_this.maxRange, _this.minRange)){
_this.maxRange=_this.minRange;
_this.minRange=date;
}
_this.selectedDates=[_this.minRange, _this.maxRange]
}else{
_this.selectedDates=[date];
_this.minRange=date;
}}else{
_this.selectedDates=[date];
}
_this._setInputValue();
if(opts.onSelect){
_this._triggerOnChange();
}
if(opts.autoClose&&!this.timepickerIsActive){
if(!opts.multipleDates&&!opts.range){
_this.hide();
}else if(opts.range&&_this.selectedDates.length==2){
_this.hide();
}}
_this.views[this.currentView]._render()
},
removeDate: function (date){
var selected=this.selectedDates,
_this=this;
if(!(date instanceof Date)) return;
return selected.some(function (curDate, i){
if(airdatepicker.isSame(curDate, date)){
selected.splice(i, 1);
if(!_this.selectedDates.length){
_this.minRange='';
_this.maxRange='';
_this.lastSelectedDate='';
}else{
_this.lastSelectedDate=_this.selectedDates[_this.selectedDates.length - 1];
}
_this.views[_this.currentView]._render();
_this._setInputValue();
if(_this.opts.onSelect){
_this._triggerOnChange();
}
return true
}})
},
today: function (){
this.silent=true;
this.view=this.opts.minView;
this.silent=false;
this.date=new Date();
if(this.opts.todayButton instanceof Date){
this.selectDate(this.opts.todayButton)
}},
clear: function (){
this.selectedDates=[];
this.minRange='';
this.maxRange='';
this.views[this.currentView]._render();
this._setInputValue();
if(this.opts.onSelect){
this._triggerOnChange()
}},
update: function (param, value){
var len=arguments.length,
lastSelectedDate=this.lastSelectedDate;
if(len==2){
this.opts[param]=value;
}else if(len==1&&typeof param=='object'){
this.opts=$.extend(true, this.opts, param)
}
this._createShortCuts();
this._syncWithMinMaxDates();
this._defineLocale(this.opts.language);
this.nav._addButtonsIfNeed();
if(!this.opts.onlyTimepicker) this.nav._render();
this.views[this.currentView]._render();
if(this.elIsInput&&!this.opts.inline){
this._setPositionClasses(this.opts.position);
if(this.visible){
this.setPosition(this.opts.position)
}}
if(this.opts.classes){
this.$airdatepicker.addClass(this.opts.classes)
}
if(this.opts.onlyTimepicker){
this.$airdatepicker.addClass('-only-timepicker-');
}
if(this.opts.timepicker){
if(lastSelectedDate) this.timepicker._handleDate(lastSelectedDate);
this.timepicker._updateRanges();
this.timepicker._updateCurrentTime();
if(lastSelectedDate){
lastSelectedDate.setHours(this.timepicker.hours);
lastSelectedDate.setMinutes(this.timepicker.minutes);
}}
this._setInputValue();
return this;
},
_syncWithMinMaxDates: function (){
var curTime=this.date.getTime();
this.silent=true;
if(this.minTime > curTime){
this.date=this.minDate;
}
if(this.maxTime < curTime){
this.date=this.maxDate;
}
this.silent=false;
},
_isSelected: function (checkDate, cellType){
var res=false;
this.selectedDates.some(function (date){
if(airdatepicker.isSame(date, checkDate, cellType)){
res=date;
return true;
}});
return res;
},
_setInputValue: function (){
var _this=this,
opts=_this.opts,
format=_this.loc.dateFormat,
altFormat=opts.altFieldDateFormat,
value=_this.selectedDates.map(function (date){
return _this.formatDate(format, date)
}),
altValues;
if(opts.altField&&_this.$altField.length){
altValues=this.selectedDates.map(function (date){
return _this.formatDate(altFormat, date)
});
altValues=altValues.join(this.opts.multipleDatesSeparator);
this.$altField.val(altValues);
}
value=value.join(this.opts.multipleDatesSeparator);
this.$el.val(value)
},
_isInRange: function (date, type){
var time=date.getTime(),
d=airdatepicker.getParsedDate(date),
min=airdatepicker.getParsedDate(this.minDate),
max=airdatepicker.getParsedDate(this.maxDate),
dMinTime=new Date(d.year, d.month, min.date).getTime(),
dMaxTime=new Date(d.year, d.month, max.date).getTime(),
types={
day: time >=this.minTime&&time <=this.maxTime,
month: dMinTime >=this.minTime&&dMaxTime <=this.maxTime,
year: d.year >=min.year&&d.year <=max.year
};
return type ? types[type]:types.day
},
_getDimensions: function ($el){
var offset=$el.offset();
return {
width: $el.outerWidth(),
height: $el.outerHeight(),
left: offset.left,
top: offset.top
}},
_getDateFromCell: function (cell){
var curDate=this.parsedDate,
year=cell.data('year')||curDate.year,
month=cell.data('month')==undefined ? curDate.month:cell.data('month'),
date=cell.data('date')||1;
return new Date(year, month, date);
},
_setPositionClasses: function (pos){
pos=pos.split(' ');
var main=pos[0],
sec=pos[1],
classes='airdatepicker -' + main + '-' + sec + '- -from-' + main + '-';
if(this.visible) classes +=' active';
this.$airdatepicker
.removeAttr('class')
.addClass(classes);
},
setPosition: function (position){
position=position||this.opts.position;
var dims=this._getDimensions(this.$el),
selfDims=this._getDimensions(this.$airdatepicker),
pos=position.split(' '),
top, left,
offset=this.opts.offset,
main=pos[0],
secondary=pos[1];
if(this.opts.inline_popup){
dims.left=0;
dims.top=0;
}
switch (main){
case 'top':
top=dims.top - selfDims.height - offset;
break;
case 'right':
left=dims.left + dims.width + offset;
break;
case 'bottom':
top=dims.top + dims.height + offset;
break;
case 'left':
left=dims.left - selfDims.width - offset;
break;
}
switch(secondary){
case 'top':
top=dims.top;
break;
case 'right':
left=dims.left + dims.width - selfDims.width;
break;
case 'bottom':
top=dims.top + dims.height - selfDims.height;
break;
case 'left':
left=dims.left;
break;
case 'center':
if(/left|right/.test(main)){
top=dims.top + dims.height/2 - selfDims.height/2;
}else{
left=dims.left + dims.width/2 - selfDims.width/2;
}}
this.$airdatepicker
.css({
left: left,
top: top
})
},
show: function (){
var onShow=this.opts.onShow;
this.setPosition(this.opts.position);
this.$airdatepicker.addClass('active');
this.visible=true;
if(onShow){
this._bindVisionEvents(onShow)
}},
hide: function (){
var onHide=this.opts.onHide;
this.$airdatepicker
.removeClass('active')
.css({
left: '-100000px'
});
this.focused='';
this.keys=[];
this.inFocus=false;
this.visible=false;
this.$el.blur();
if(onHide){
this._bindVisionEvents(onHide)
}},
down: function (date){
this._changeView(date, 'down');
},
up: function (date){
this._changeView(date, 'up');
},
_bindVisionEvents: function (event){
this.$airdatepicker.off('transitionend.dp');
event(this, false);
this.$airdatepicker.one('transitionend.dp', event.bind(this, this, true))
},
_changeView: function (date, dir){
date=date||this.focused||this.date;
var nextView=dir=='up' ? this.viewIndex + 1:this.viewIndex - 1;
if(nextView > 2) nextView=2;
if(nextView < 0) nextView=0;
this.silent=true;
this.date=new Date(date.getFullYear(), date.getMonth(), 1);
this.silent=false;
this.view=this.viewIndexes[nextView];
},
_handleHotKey: function (key){
var date=airdatepicker.getParsedDate(this._getFocusedDate()),
focusedParsed,
o=this.opts,
newDate,
totalDaysInNextMonth,
monthChanged=false,
yearChanged=false,
decadeChanged=false,
y=date.year,
m=date.month,
d=date.date;
switch (key){
case 'ctrlRight':
case 'ctrlUp':
m +=1;
monthChanged=true;
break;
case 'ctrlLeft':
case 'ctrlDown':
m -=1;
monthChanged=true;
break;
case 'shiftRight':
case 'shiftUp':
yearChanged=true;
y +=1;
break;
case 'shiftLeft':
case 'shiftDown':
yearChanged=true;
y -=1;
break;
case 'altRight':
case 'altUp':
decadeChanged=true;
y +=10;
break;
case 'altLeft':
case 'altDown':
decadeChanged=true;
y -=10;
break;
case 'ctrlShiftUp':
this.up();
break;
}
totalDaysInNextMonth=airdatepicker.getDaysCount(new Date(y,m));
newDate=new Date(y,m,d);
if(totalDaysInNextMonth < d) d=totalDaysInNextMonth;
if(newDate.getTime() < this.minTime){
newDate=this.minDate;
}else if(newDate.getTime() > this.maxTime){
newDate=this.maxDate;
}
this.focused=newDate;
focusedParsed=airdatepicker.getParsedDate(newDate);
if(monthChanged&&o.onChangeMonth){
o.onChangeMonth(focusedParsed.month, focusedParsed.year)
}
if(yearChanged&&o.onChangeYear){
o.onChangeYear(focusedParsed.year)
}
if(decadeChanged&&o.onChangeDecade){
o.onChangeDecade(this.curDecade)
}},
_registerKey: function (key){
var exists=this.keys.some(function (curKey){
return curKey==key;
});
if(!exists){
this.keys.push(key)
}},
_unRegisterKey: function (key){
var index=this.keys.indexOf(key);
this.keys.splice(index, 1);
},
_isHotKeyPressed: function (){
var currentHotKey,
found=false,
_this=this,
pressedKeys=this.keys.sort();
for (var hotKey in hotKeys){
currentHotKey=hotKeys[hotKey];
if(pressedKeys.length!=currentHotKey.length) continue;
if(currentHotKey.every(function (key, i){ return key==pressedKeys[i]})){
_this._trigger('hotKey', hotKey);
found=true;
}}
return found;
},
_trigger: function (event, args){
this.$el.trigger(event, args)
},
_focusNextCell: function (keyCode, type){
type=type||this.cellType;
var date=airdatepicker.getParsedDate(this._getFocusedDate()),
y=date.year,
m=date.month,
d=date.date;
if(this._isHotKeyPressed()){
return;
}
switch(keyCode){
case 37:
type=='day' ? (d -=1):'';
type=='month' ? (m -=1):'';
type=='year' ? (y -=1):'';
break;
case 38:
type=='day' ? (d -=7):'';
type=='month' ? (m -=3):'';
type=='year' ? (y -=4):'';
break;
case 39:
type=='day' ? (d +=1):'';
type=='month' ? (m +=1):'';
type=='year' ? (y +=1):'';
break;
case 40:
type=='day' ? (d +=7):'';
type=='month' ? (m +=3):'';
type=='year' ? (y +=4):'';
break;
}
var nd=new Date(y,m,d);
if(nd.getTime() < this.minTime){
nd=this.minDate;
}else if(nd.getTime() > this.maxTime){
nd=this.maxDate;
}
this.focused=nd;
},
_getFocusedDate: function (){
var focused=this.focused||this.selectedDates[this.selectedDates.length - 1],
d=this.parsedDate;
if(!focused){
switch (this.view){
case 'days':
focused=new Date(d.year, d.month, new Date().getDate());
break;
case 'months':
focused=new Date(d.year, d.month, 1);
break;
case 'years':
focused=new Date(d.year, 0, 1);
break;
}}
return focused;
},
_getCell: function (date, type){
type=type||this.cellType;
var d=airdatepicker.getParsedDate(date),
selector='.airdatepicker--cell[data-year="' + d.year + '"]',
$cell;
switch (type){
case 'month':
selector='[data-month="' + d.month + '"]';
break;
case 'day':
selector +='[data-month="' + d.month + '"][data-date="' + d.date + '"]';
break;
}
$cell=this.views[this.currentView].$el.find(selector);
return $cell.length ? $cell:$('');
},
destroy: function (){
var _this=this;
_this.$el
.off('.adp')
.data('airdatepicker', '');
_this.selectedDates=[];
_this.focused='';
_this.views={};
_this.keys=[];
_this.minRange='';
_this.maxRange='';
if(_this.opts.inline||!_this.elIsInput){
_this.$airdatepicker.closest('.airdatepicker-inline').remove();
}else{
_this.$airdatepicker.remove();
}},
_handleAlreadySelectedDates: function (alreadySelected, selectedDate){
if(this.opts.range){
if(!this.opts.toggleSelected){
if(this.selectedDates.length!=2){
this._trigger('clickCell', selectedDate);
}}else{
this.removeDate(selectedDate);
}}else if(this.opts.toggleSelected){
this.removeDate(selectedDate);
}
if(!this.opts.toggleSelected){
this.lastSelectedDate=alreadySelected;
if(this.opts.timepicker){
this.timepicker._setTime(alreadySelected);
this.timepicker.update();
}}
},
_onShowEvent: function (e){
if(!this.visible){
this.show();
}},
_onBlur: function (){
if(!this.inFocus&&this.visible){
this.hide();
}},
_onMouseDownDatepicker: function (e){
this.inFocus=true;
},
_onMouseUpDatepicker: function (e){
this.inFocus=false;
e.originalEvent.inFocus=true;
if(!e.originalEvent.timepickerFocus) this.$el.focus();
},
_onKeyUpGeneral: function (e){
var val=this.$el.val();
if(!val){
this.clear();
}},
_onResize: function (){
if(this.visible){
this.setPosition();
}},
_onMouseUpBody: function (e){
if(e.originalEvent.inFocus) return;
if(this.visible&&!this.inFocus){
this.hide();
}},
_onMouseUpEl: function (e){
e.originalEvent.inFocus=true;
setTimeout(this._onKeyUpGeneral.bind(this),4);
},
_onKeyDown: function (e){
var code=e.which;
this._registerKey(code);
if(code >=37&&code <=40){
e.preventDefault();
this._focusNextCell(code);
}
if(code==13){
if(this.focused){
if(this._getCell(this.focused).hasClass('-disabled-')) return;
if(this.view!=this.opts.minView){
this.down()
}else{
var alreadySelected=this._isSelected(this.focused, this.cellType);
if(!alreadySelected){
if(this.timepicker){
this.focused.setHours(this.timepicker.hours);
this.focused.setMinutes(this.timepicker.minutes);
}
this.selectDate(this.focused);
return;
}
this._handleAlreadySelectedDates(alreadySelected, this.focused)
}}
}
if(code==27){
this.hide();
}},
_onKeyUp: function (e){
var code=e.which;
this._unRegisterKey(code);
},
_onHotKey: function (e, hotKey){
this._handleHotKey(hotKey);
},
_onMouseEnterCell: function (e){
var $cell=$(e.target).closest('.airdatepicker--cell'),
date=this._getDateFromCell($cell);
this.silent=true;
if(this.focused){
this.focused=''
}
$cell.addClass('-focus-');
this.focused=date;
this.silent=false;
if(this.opts.range&&this.selectedDates.length==1){
this.minRange=this.selectedDates[0];
this.maxRange='';
if(airdatepicker.less(this.minRange, this.focused)){
this.maxRange=this.minRange;
this.minRange='';
}
this.views[this.currentView]._update();
}},
_onMouseLeaveCell: function (e){
var $cell=$(e.target).closest('.airdatepicker--cell');
$cell.removeClass('-focus-');
this.silent=true;
this.focused='';
this.silent=false;
},
_onTimeChange: function (e, h, m){
var date=new Date(),
selectedDates=this.selectedDates,
selected=false;
if(selectedDates.length){
selected=true;
date=this.lastSelectedDate;
}
date.setHours(h);
date.setMinutes(m);
if(!selected&&!this._getCell(date).hasClass('-disabled-')){
this.selectDate(date);
}else{
this._setInputValue();
if(this.opts.onSelect){
this._triggerOnChange();
}}
},
_onClickCell: function (e, date){
if(this.timepicker){
date.setHours(this.timepicker.hours);
date.setMinutes(this.timepicker.minutes);
}
this.selectDate(date);
},
set focused(val){
if(!val&&this.focused){
var $cell=this._getCell(this.focused);
if($cell.length){
$cell.removeClass('-focus-')
}}
this._focused=val;
if(this.opts.range&&this.selectedDates.length==1){
this.minRange=this.selectedDates[0];
this.maxRange='';
if(airdatepicker.less(this.minRange, this._focused)){
this.maxRange=this.minRange;
this.minRange='';
}}
if(this.silent) return;
this.date=val;
},
get focused(){
return this._focused;
},
get parsedDate(){
return airdatepicker.getParsedDate(this.date);
},
set date (val){
if(!(val instanceof Date)) return;
this.currentDate=val;
if(this.inited&&!this.silent){
this.views[this.view]._render();
this.nav._render();
if(this.visible&&this.elIsInput){
this.setPosition();
}}
return val;
},
get date (){
return this.currentDate
},
set view (val){
this.viewIndex=this.viewIndexes.indexOf(val);
if(this.viewIndex < 0){
return;
}
this.prevView=this.currentView;
this.currentView=val;
if(this.inited){
if(!this.views[val]){
this.views[val]=new  $.fn.airdatepicker.Body(this, val, this.opts)
}else{
this.views[val]._render();
}
this.views[this.prevView].hide();
this.views[val].show();
this.nav._render();
if(this.opts.onChangeView){
this.opts.onChangeView(val)
}
if(this.elIsInput&&this.visible) this.setPosition();
}
return val
},
get view(){
return this.currentView;
},
get cellType(){
return this.view.substring(0, this.view.length - 1)
},
get minTime(){
var min=airdatepicker.getParsedDate(this.minDate);
return new Date(min.year, min.month, min.date).getTime()
},
get maxTime(){
var max=airdatepicker.getParsedDate(this.maxDate);
return new Date(max.year, max.month, max.date).getTime()
},
get curDecade(){
return airdatepicker.getDecade(this.date)
}};
airdatepicker.getDaysCount=function (date){
return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
};
airdatepicker.getParsedDate=function (date){
return {
year: date.getFullYear(),
month: date.getMonth(),
fullMonth: (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1):date.getMonth() + 1,
date: date.getDate(),
fullDate: date.getDate() < 10 ? '0' + date.getDate():date.getDate(),
day: date.getDay(),
hours: date.getHours(),
fullHours:  date.getHours() < 10 ? '0' + date.getHours():date.getHours() ,
minutes: date.getMinutes(),
fullMinutes:  date.getMinutes() < 10 ? '0' + date.getMinutes():date.getMinutes()
}};
airdatepicker.getDecade=function (date){
var firstYear=Math.floor(date.getFullYear() / 10) * 10;
return [firstYear, firstYear + 9];
};
airdatepicker.template=function (str, data){
return str.replace(/#\{([\w]+)\}/g, function (source, match){
if(data[match]||data[match]===0){
return data[match]
}});
};
airdatepicker.isSame=function (date1, date2, type){
if(!date1||!date2) return false;
var d1=airdatepicker.getParsedDate(date1),
d2=airdatepicker.getParsedDate(date2),
_type=type ? type:'day',
conditions={
day: d1.date==d2.date&&d1.month==d2.month&&d1.year==d2.year,
month: d1.month==d2.month&&d1.year==d2.year,
year: d1.year==d2.year
};
return conditions[_type];
};
airdatepicker.less=function (dateCompareTo, date, type){
if(!dateCompareTo||!date) return false;
return date.getTime() < dateCompareTo.getTime();
};
airdatepicker.bigger=function (dateCompareTo, date, type){
if(!dateCompareTo||!date) return false;
return date.getTime() > dateCompareTo.getTime();
};
airdatepicker.getLeadingZeroNum=function (num){
return parseInt(num) < 10 ? '0' + num:num;
};
airdatepicker.resetTime=function (date){
if(typeof date!='object') return;
date=airdatepicker.getParsedDate(date);
return new Date(date.year, date.month, date.date)
};
$.fn.airdatepicker=function(options){
return this.each(function (){
if(!$.data(this, pluginName)){
$.data(this,  pluginName,
new Datepicker(this, options));
}else{
var _this=$.data(this, pluginName);
_this.opts=$.extend(true, _this.opts, options);
_this.update();
}});
};
$.fn.airdatepicker.Constructor=Datepicker;
$.fn.airdatepicker.language={
en: {
days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
daysMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
months: ['January','February','March','April','May','June', 'July','August','September','October','November','December'],
monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
today: 'Today',
clear: 'Clear',
dateFormat: 'mm/dd/yyyy',
timeFormat: 'hh:ii aa',
firstDay: 0
},
cs: {
days: ['Neděle', 'Pondělí', 'Úterý', 'Středa', 'Čtvrtek', 'Pátek', 'Sobota'],
daysShort: ['Ne', 'Po', 'Út', 'St', 'Čt', 'Pá', 'So'],
daysMin: ['Ne', 'Po', 'Út', 'St', 'Čt', 'Pá', 'So'],
months: ['Leden', 'Únor', 'Březen', 'Duben', 'Květen', 'Červen', 'Červenec', 'Srpen', 'Září', 'Říjen', 'Listopad', 'Prosinec'],
monthsShort: ['Led', 'Úno', 'Bře', 'Dub', 'Kvě', 'Čvn', 'Čvc', 'Srp', 'Zář', 'Říj', 'Lis', 'Pro'],
today: 'Dnes',
clear: 'Vymazat',
dateFormat: 'dd.mm.yyyy',
timeFormat: 'hh:ii',
firstDay: 1
},
da: {
days: ['Søndag', 'Mandag', 'Tirsdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lørdag'],
daysShort: ['Søn', 'Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør'],
daysMin: ['Sø', 'Ma', 'Ti', 'On', 'To', 'Fr', 'Lø'],
months: ['Januar','Februar','Marts','April','Maj','Juni', 'Juli','August','September','Oktober','November','December'],
monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'],
today: 'I dag',
clear: 'Nulstil',
dateFormat: 'dd/mm/yyyy',
timeFormat: 'hh:ii',
firstDay: 1
},
de: {
days: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
daysShort: ['Son', 'Mon', 'Die', 'Mit', 'Don', 'Fre', 'Sam'],
daysMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
months: ['Januar','Februar','März','April','Mai','Juni', 'Juli','August','September','Oktober','November','Dezember'],
monthsShort: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
today: 'Heute',
clear: 'Aufräumen',
dateFormat: 'dd.mm.yyyy',
timeFormat: 'hh:ii',
firstDay: 1
},
es: {
days: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'],
daysShort: ['Dom', 'Lun', 'Mar', 'Mie', 'Jue', 'Vie', 'Sab'],
daysMin: ['Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa'],
months: ['Enero','Febrero','Marzo','Abril','Mayo','Junio', 'Julio','Augosto','Septiembre','Octubre','Noviembre','Diciembre'],
monthsShort: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
today: 'Hoy',
clear: 'Limpiar',
dateFormat: 'dd/mm/yyyy',
timeFormat: 'hh:ii aa',
firstDay: 1
},
fi: {
days: ['Sunnuntai', 'Maanantai', 'Tiistai', 'Keskiviikko', 'Torstai', 'Perjantai', 'Lauantai'],
daysShort: ['Su', 'Ma', 'Ti', 'Ke', 'To', 'Pe', 'La'],
daysMin: ['Su', 'Ma', 'Ti', 'Ke', 'To', 'Pe', 'La'],
months: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu', 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
monthsShort: ['Tammi', 'Helmi', 'Maalis', 'Huhti', 'Touko', 'Kesä', 'Heinä', 'Elo', 'Syys', 'Loka', 'Marras', 'Joulu'],
today: 'Tänään',
clear: 'Tyhjennä',
dateFormat: 'dd.mm.yyyy',
timeFormat: 'hh:ii',
firstDay: 1
},
fr: {
days: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'],
daysShort: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'],
daysMin: ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'],
months: ['Janvier','Février','Mars','Avril','Mai','Juin', 'Juillet','Août','Septembre','Octobre','Novembre','Decembre'],
monthsShort: ['Jan', 'Fév', 'Mars', 'Avr', 'Mai', 'Juin', 'Juil', 'Août', 'Sep', 'Oct', 'Nov', 'Dec'],
today: "Aujourd'hui",
clear: 'Effacer',
dateFormat: 'dd/mm/yyyy',
timeFormat: 'hh:ii',
firstDay: 1
},
hu: {
days: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
daysShort: ['Va', 'Hé', 'Ke', 'Sze', 'Cs', 'Pé', 'Szo'],
daysMin: ['V', 'H', 'K', 'Sz', 'Cs', 'P', 'Sz'],
months: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június', 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
monthsShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún', 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
today: 'Ma',
clear: 'Törlés',
dateFormat: 'yyyy-mm-dd',
timeFormat: 'hh:ii aa',
firstDay: 1
},
it: {
days: ['Domenica', 'Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato'],
daysShort: ['Dom', 'Lun', 'Mar', 'Mer', 'Gio', 'Ven', 'Sab'],
daysMin: ['Do', 'Lu', 'Ma', 'Me', 'Gi', 'Ve', 'Sa'],
months: ['Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre'],
monthsShort: ['Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'],
today: 'Oggi',
clear: 'Pulisci',
dateFormat: 'dd/mm/yyyy',
timeFormat: 'hh:ii aa',
firstDay: 1
},
nl: {
days: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
daysShort: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
daysMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
months: ['Januari', 'Februari', 'Maart', 'April', 'Mei', 'Juni', 'Juli', 'Augustus', 'September', 'Oktober', 'November', 'December'],
monthsShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'],
today: 'Vandaag',
clear: 'Legen',
dateFormat: 'dd-mm-yyyy',
timeFormat: 'hh:ii',
firstDay: 1
},
pl: {
days: ['Niedziela', 'Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota'],
daysShort: ['Nie', 'Pon', 'Wto', 'Śro', 'Czw', 'Pią', 'Sob'],
daysMin: ['Nd', 'Pn', 'Wt', 'Śr', 'Czw', 'Pt', 'So'],
months: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec', 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
monthsShort: ['Sty', 'Lut', 'Mar', 'Kwi', 'Maj', 'Cze', 'Lip', 'Sie', 'Wrz', 'Paź', 'Lis', 'Gru'],
today: 'Dzisiaj',
clear: 'Wyczyść',
dateFormat: 'yyyy-mm-dd',
timeFormat: 'hh:ii aa',
firstDay: 1
},
pt: {
days: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado'],
daysShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
daysMin: ['Do', 'Se', 'Te', 'Qa', 'Qi', 'Sx', 'Sa'],
months: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
monthsShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
today: 'Hoje',
clear: 'Limpar',
dateFormat: 'dd/mm/yyyy',
timeFormat: 'hh:ii',
firstDay: 1
},
ro: {
days: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'],
daysShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
daysMin: ['D', 'L', 'Ma', 'Mi', 'J', 'V', 'S'],
months: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie','Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
monthsShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun', 'Iul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'],
today: 'Azi',
clear: 'Şterge',
dateFormat: 'dd.mm.yyyy',
timeFormat: 'hh:ii',
firstDay: 1
},
ru: {
days: ['Воскресенье', 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота'],
daysShort: ['Вос','Пон','Вто','Сре','Чет','Пят','Суб'],
daysMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
months: ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'],
monthsShort: ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'],
today: 'Сегодня',
clear: 'Очистить',
dateFormat: 'dd.mm.yyyy',
timeFormat: 'hh:ii',
firstDay: 1
},
sk: {
days: ['Nedeľa', 'Pondelok', 'Utorok', 'Streda', 'Štvrtok', 'Piatok', 'Sobota'],
daysShort: ['Ned', 'Pon', 'Uto', 'Str', 'Štv', 'Pia', 'Sob'],
daysMin: ['Ne', 'Po', 'Ut', 'St', 'Št', 'Pi', 'So'],
months: ['Január','Február','Marec','Apríl','Máj','Jún', 'Júl','August','September','Október','November','December'],
monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'Máj', 'Jún', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'],
today: 'Dnes',
clear: 'Vymazať',
dateFormat: 'dd.mm.yyyy',
timeFormat: 'hh:ii',
firstDay: 1
},
tr: {
days: ['Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi'],
daysShort: ['Paz', 'Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt'],
daysMin: ['Pz', 'Pt', 'Sa', 'Ça', 'Pe', 'Cu', 'Ct'],
months: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran', 'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
monthsShort: ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara'],
today: 'Bugün',
clear: 'Temizle',
dateFormat: 'dd.mm.yyyy',
timeFormat: 'hh:ii',
firstDay: 1
},
zh: {
days: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
daysShort: ['日', '一', '二', '三', '四', '五', '六'],
daysMin: ['日', '一', '二', '三', '四', '五', '六'],
months: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
monthsShort: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
today: '今天',
clear: '清除',
dateFormat: 'yyyy-mm-dd',
timeFormat: 'hh:ii',
firstDay: 1
}};
$(function (){
$(autoInitSelector).airdatepicker();
})
})();
;(function (){
var templates={
days:'' +
'<div class="airdatepicker--days airdatepicker--body">' +
'<div class="airdatepicker--days-names"></div>' +
'<div class="airdatepicker--cells airdatepicker--cells-days"></div>' +
'</div>',
months: '' +
'<div class="airdatepicker--months airdatepicker--body">' +
'<div class="airdatepicker--cells airdatepicker--cells-months"></div>' +
'</div>',
years: '' +
'<div class="airdatepicker--years airdatepicker--body">' +
'<div class="airdatepicker--cells airdatepicker--cells-years"></div>' +
'</div>'
},
airdatepicker=$.fn.airdatepicker,
dp=airdatepicker.Constructor;
airdatepicker.Body=function (d, type, opts){
this.d=d;
this.type=type;
this.opts=opts;
this.$el=$('');
if(this.opts.onlyTimepicker) return;
this.init();
};
airdatepicker.Body.prototype={
init: function (){
this._buildBaseHtml();
this._render();
this._bindEvents();
},
_bindEvents: function (){
this.$el.on('click', '.airdatepicker--cell', $.proxy(this._onClickCell, this));
},
_buildBaseHtml: function (){
this.$el=$(templates[this.type]).appendTo(this.d.$content);
this.$names=$('.airdatepicker--days-names', this.$el);
this.$cells=$('.airdatepicker--cells', this.$el);
},
_getDayNamesHtml: function (firstDay, curDay, html, i){
curDay=curDay!=undefined ? curDay:firstDay;
html=html ? html:'';
i=i!=undefined ? i:0;
if(i > 7) return html;
if(curDay==7) return this._getDayNamesHtml(firstDay, 0, html, ++i);
html +='<div class="airdatepicker--day-name' + (this.d.isWeekend(curDay) ? " -weekend-":"") + '">' + this.d.loc.daysMin[curDay] + '</div>';
return this._getDayNamesHtml(firstDay, ++curDay, html, ++i);
},
_getCellContents: function (date, type){
var classes="airdatepicker--cell airdatepicker--cell-" + type,
currentDate=new Date(),
parent=this.d,
minRange=dp.resetTime(parent.minRange),
maxRange=dp.resetTime(parent.maxRange),
opts=parent.opts,
d=dp.getParsedDate(date),
render={},
html=d.date;
switch (type){
case 'day':
if(parent.isWeekend(d.day)) classes +=" -weekend-";
if(d.month!=this.d.parsedDate.month){
classes +=" -other-month-";
if(!opts.selectOtherMonths){
classes +=" -disabled-";
}
if(!opts.showOtherMonths) html='';
}
break;
case 'month':
html=parent.loc[parent.opts.monthsField][d.month];
break;
case 'year':
var decade=parent.curDecade;
html=d.year;
if(d.year < decade[0]||d.year > decade[1]){
classes +=' -other-decade-';
if(!opts.selectOtherYears){
classes +=" -disabled-";
}
if(!opts.showOtherYears) html='';
}
break;
}
if(opts.onRenderCell){
render=opts.onRenderCell(date, type)||{};
html=render.html ? render.html:html;
classes +=render.classes ? ' ' + render.classes:'';
}
if(opts.range){
if(dp.isSame(minRange, date, type)) classes +=' -range-from-';
if(dp.isSame(maxRange, date, type)) classes +=' -range-to-';
if(parent.selectedDates.length==1&&parent.focused){
if((dp.bigger(minRange, date)&&dp.less(parent.focused, date)) ||
(dp.less(maxRange, date)&&dp.bigger(parent.focused, date))){
classes +=' -in-range-'
}
if(dp.less(maxRange, date)&&dp.isSame(parent.focused, date)){
classes +=' -range-from-'
}
if(dp.bigger(minRange, date)&&dp.isSame(parent.focused, date)){
classes +=' -range-to-'
}}else if(parent.selectedDates.length==2){
if(dp.bigger(minRange, date)&&dp.less(maxRange, date)){
classes +=' -in-range-'
}}
}
if(dp.isSame(currentDate, date, type)) classes +=' -current-';
if(parent.focused&&dp.isSame(date, parent.focused, type)) classes +=' -focus-';
if(parent._isSelected(date, type)) classes +=' -selected-';
if(!parent._isInRange(date, type)||render.disabled) classes +=' -disabled-';
return {
html: html,
classes: classes
}},
_getDaysHtml: function (date){
var totalMonthDays=dp.getDaysCount(date),
firstMonthDay=new Date(date.getFullYear(), date.getMonth(), 1).getDay(),
lastMonthDay=new Date(date.getFullYear(), date.getMonth(), totalMonthDays).getDay(),
daysFromPevMonth=firstMonthDay - this.d.loc.firstDay,
daysFromNextMonth=6 - lastMonthDay + this.d.loc.firstDay;
daysFromPevMonth=daysFromPevMonth < 0 ? daysFromPevMonth + 7:daysFromPevMonth;
daysFromNextMonth=daysFromNextMonth > 6 ? daysFromNextMonth - 7:daysFromNextMonth;
var startDayIndex=-daysFromPevMonth + 1,
m, y,
html='';
for (var i=startDayIndex, max=totalMonthDays + daysFromNextMonth; i <=max; i++){
y=date.getFullYear();
m=date.getMonth();
html +=this._getDayHtml(new Date(y, m, i))
}
return html;
},
_getDayHtml: function (date){
var content=this._getCellContents(date, 'day');
return '<div class="' + content.classes + '" ' +
'data-date="' + date.getDate() + '" ' +
'data-month="' + date.getMonth() + '" ' +
'data-year="' + date.getFullYear() + '">' + content.html + '</div>';
},
_getMonthsHtml: function (date){
var html='',
d=dp.getParsedDate(date),
i=0;
while(i < 12){
html +=this._getMonthHtml(new Date(d.year, i));
i++
}
return html;
},
_getMonthHtml: function (date){
var content=this._getCellContents(date, 'month');
return '<div class="' + content.classes + '" data-month="' + date.getMonth() + '">' + content.html + '</div>'
},
_getYearsHtml: function (date){
var d=dp.getParsedDate(date),
decade=dp.getDecade(date),
firstYear=decade[0] - 1,
html='',
i=firstYear;
for (i; i <=decade[1] + 1; i++){
html +=this._getYearHtml(new Date(i , 0));
}
return html;
},
_getYearHtml: function (date){
var content=this._getCellContents(date, 'year');
return '<div class="' + content.classes + '" data-year="' + date.getFullYear() + '">' + content.html + '</div>'
},
_renderTypes: {
days: function (){
var dayNames=this._getDayNamesHtml(this.d.loc.firstDay),
days=this._getDaysHtml(this.d.currentDate);
this.$cells.html(days);
this.$names.html(dayNames)
},
months: function (){
var html=this._getMonthsHtml(this.d.currentDate);
this.$cells.html(html)
},
years: function (){
var html=this._getYearsHtml(this.d.currentDate);
this.$cells.html(html)
}},
_render: function (){
if(this.opts.onlyTimepicker) return;
this._renderTypes[this.type].bind(this)();
},
_update: function (){
var $cells=$('.airdatepicker--cell', this.$cells),
_this=this,
classes,
$cell,
date;
$cells.each(function (cell, i){
$cell=$(this);
date=_this.d._getDateFromCell($(this));
classes=_this._getCellContents(date, _this.d.cellType);
$cell.attr('class',classes.classes)
});
},
show: function (){
if(this.opts.onlyTimepicker) return;
this.$el.addClass('active');
this.acitve=true;
},
hide: function (){
this.$el.removeClass('active');
this.active=false;
},
_handleClick: function (el){
var date=el.data('date')||1,
month=el.data('month')||0,
year=el.data('year')||this.d.parsedDate.year,
dp=this.d;
if(dp.view!=this.opts.minView){
dp.down(new Date(year, month, date));
return;
}
var selectedDate=new Date(year, month, date),
alreadySelected=this.d._isSelected(selectedDate, this.d.cellType);
if(!alreadySelected){
dp._trigger('clickCell', selectedDate);
return;
}
dp._handleAlreadySelectedDates.bind(dp, alreadySelected, selectedDate)();
},
_onClickCell: function (e){
var $el=$(e.target).closest('.airdatepicker--cell');
if($el.hasClass('-disabled-')) return;
this._handleClick.bind(this)($el);
}};})();
;(function (){
var template='' +
'<div class="airdatepicker--nav-action" data-action="prev">#{prevHtml}</div>' +
'<div class="airdatepicker--nav-title">#{title}</div>' +
'<div class="airdatepicker--nav-action" data-action="next">#{nextHtml}</div>',
buttonsContainerTemplate='<div class="airdatepicker--buttons"></div>',
button='<span class="airdatepicker--button" data-action="#{action}">#{label}</span>',
airdatepicker=$.fn.airdatepicker,
dp=airdatepicker.Constructor;
airdatepicker.Navigation=function (d, opts){
this.d=d;
this.opts=opts;
this.$buttonsContainer='';
this.init();
};
airdatepicker.Navigation.prototype={
init: function (){
this._buildBaseHtml();
this._bindEvents();
},
_bindEvents: function (){
this.d.$nav.on('click', '.airdatepicker--nav-action', $.proxy(this._onClickNavButton, this));
this.d.$nav.on('click', '.airdatepicker--nav-title', $.proxy(this._onClickNavTitle, this));
this.d.$airdatepicker.on('click', '.airdatepicker--button', $.proxy(this._onClickNavButton, this));
},
_buildBaseHtml: function (){
if(!this.opts.onlyTimepicker){
this._render();
}
this._addButtonsIfNeed();
},
_addButtonsIfNeed: function (){
if(this.opts.todayButton){
this._addButton('today')
}
if(this.opts.clearButton){
this._addButton('clear')
}},
_render: function (){
var title=this._getTitle(this.d.currentDate),
html=dp.template(template, $.extend({title: title}, this.opts));
this.d.$nav.html(html);
if(this.d.view=='years'){
$('.airdatepicker--nav-title', this.d.$nav).addClass('-disabled-');
}
this.setNavStatus();
},
_getTitle: function (date){
return this.d.formatDate(this.opts.navTitles[this.d.view], date)
},
_addButton: function (type){
if(!this.$buttonsContainer.length){
this._addButtonsContainer();
}
var data={
action: type,
label: this.d.loc[type]
},
html=dp.template(button, data);
if($('[data-action=' + type + ']', this.$buttonsContainer).length) return;
this.$buttonsContainer.append(html);
},
_addButtonsContainer: function (){
this.d.$airdatepicker.append(buttonsContainerTemplate);
this.$buttonsContainer=$('.airdatepicker--buttons', this.d.$airdatepicker);
},
setNavStatus: function (){
if(!(this.opts.minDate||this.opts.maxDate)||!this.opts.disableNavWhenOutOfRange) return;
var date=this.d.parsedDate,
m=date.month,
y=date.year,
d=date.date;
switch (this.d.view){
case 'days':
if(!this.d._isInRange(new Date(y, m-1, 1), 'month')){
this._disableNav('prev')
}
if(!this.d._isInRange(new Date(y, m+1, 1), 'month')){
this._disableNav('next')
}
break;
case 'months':
if(!this.d._isInRange(new Date(y-1, m, d), 'year')){
this._disableNav('prev')
}
if(!this.d._isInRange(new Date(y+1, m, d), 'year')){
this._disableNav('next')
}
break;
case 'years':
var decade=dp.getDecade(this.d.date);
if(!this.d._isInRange(new Date(decade[0] - 1, 0, 1), 'year')){
this._disableNav('prev')
}
if(!this.d._isInRange(new Date(decade[1] + 1, 0, 1), 'year')){
this._disableNav('next')
}
break;
}},
_disableNav: function (nav){
$('[data-action="' + nav + '"]', this.d.$nav).addClass('-disabled-')
},
_activateNav: function (nav){
$('[data-action="' + nav + '"]', this.d.$nav).removeClass('-disabled-')
},
_onClickNavButton: function (e){
var $el=$(e.target).closest('[data-action]'),
action=$el.data('action');
this.d[action]();
},
_onClickNavTitle: function (e){
if($(e.target).hasClass('-disabled-')) return;
if(this.d.view=='days'){
return this.d.view='months'
}
this.d.view='years';
}}
})();
;(function (){
var template='<div class="airdatepicker--time">' +
'<div class="airdatepicker--time-current">' +
'   <span class="airdatepicker--time-current-hours">#{hourVisible}</span>' +
'   <span class="airdatepicker--time-current-colon">:</span>' +
'   <span class="airdatepicker--time-current-minutes">#{minValue}</span>' +
'</div>' +
'<div class="airdatepicker--time-sliders">' +
'   <div class="airdatepicker--time-row">' +
'	  <input type="range" name="hours" value="#{hourValue}" min="#{hourMin}" max="#{hourMax}" step="#{hourStep}"/>' +
'   </div>' +
'   <div class="airdatepicker--time-row">' +
'	  <input type="range" name="minutes" value="#{minValue}" min="#{minMin}" max="#{minMax}" step="#{minStep}"/>' +
'   </div>' +
'</div>' +
'</div>',
airdatepicker=$.fn.airdatepicker,
dp=airdatepicker.Constructor;
airdatepicker.Timepicker=function (inst, opts){
this.d=inst;
this.opts=opts;
this.init();
};
airdatepicker.Timepicker.prototype={
init: function (){
var input='input';
this._setTime(this.d.date);
this._buildHTML();
if(navigator.userAgent.match(/trident/gi)){
input='change';
}
this.d.$el.on('selectDate', this._onSelectDate.bind(this));
this.$ranges.on(input, this._onChangeRange.bind(this));
this.$ranges.on('mouseup', this._onMouseUpRange.bind(this));
this.$ranges.on('mousemove focus ', this._onMouseEnterRange.bind(this));
this.$ranges.on('mouseout blur', this._onMouseOutRange.bind(this));
},
_setTime: function (date){
var _date=dp.getParsedDate(date);
this._handleDate(date);
this.hours=_date.hours < this.minHours ? this.minHours:_date.hours;
this.minutes=_date.minutes < this.minMinutes ? this.minMinutes:_date.minutes;
},
_setMinTimeFromDate: function (date){
this.minHours=date.getHours();
this.minMinutes=date.getMinutes();
if(this.d.lastSelectedDate){
if(this.d.lastSelectedDate.getHours() > date.getHours()){
this.minMinutes=this.opts.minMinutes;
}}
},
_setMaxTimeFromDate: function (date){
this.maxHours=date.getHours();
this.maxMinutes=date.getMinutes();
if(this.d.lastSelectedDate){
if(this.d.lastSelectedDate.getHours() < date.getHours()){
this.maxMinutes=this.opts.maxMinutes;
}}
},
_setDefaultMinMaxTime: function (){
var maxHours=23,
maxMinutes=59,
opts=this.opts;
this.minHours=opts.minHours < 0||opts.minHours > maxHours ? 0:opts.minHours;
this.minMinutes=opts.minMinutes < 0||opts.minMinutes > maxMinutes ? 0:opts.minMinutes;
this.maxHours=opts.maxHours < 0||opts.maxHours > maxHours ? maxHours:opts.maxHours;
this.maxMinutes=opts.maxMinutes < 0||opts.maxMinutes > maxMinutes ? maxMinutes:opts.maxMinutes;
},
_validateHoursMinutes: function (date){
if(this.hours < this.minHours){
this.hours=this.minHours;
}else if(this.hours > this.maxHours){
this.hours=this.maxHours;
}
if(this.minutes < this.minMinutes){
this.minutes=this.minMinutes;
}else if(this.minutes > this.maxMinutes){
this.minutes=this.maxMinutes;
}},
_buildHTML: function (){
var lz=dp.getLeadingZeroNum,
data={
hourMin: this.minHours,
hourMax: lz(this.maxHours),
hourStep: this.opts.hoursStep,
hourValue: this.hours,
hourVisible: lz(this.displayHours),
minMin: this.minMinutes,
minMax: lz(this.maxMinutes),
minStep: this.opts.minutesStep,
minValue: lz(this.minutes)
},
_template=dp.template(template, data);
this.$timepicker=$(_template).appendTo(this.d.$airdatepicker);
this.$ranges=$('[type="range"]', this.$timepicker);
this.$hours=$('[name="hours"]', this.$timepicker);
this.$minutes=$('[name="minutes"]', this.$timepicker);
this.$hoursText=$('.airdatepicker--time-current-hours', this.$timepicker);
this.$minutesText=$('.airdatepicker--time-current-minutes', this.$timepicker);
if(this.d.ampm){
this.$ampm=$('<span class="airdatepicker--time-current-ampm">')
.appendTo($('.airdatepicker--time-current', this.$timepicker))
.html(this.dayPeriod);
this.$timepicker.addClass('-am-pm-');
}},
_updateCurrentTime: function (){
var h=dp.getLeadingZeroNum(this.displayHours),
m=dp.getLeadingZeroNum(this.minutes);
this.$hoursText.html(h);
this.$minutesText.html(m);
if(this.d.ampm){
this.$ampm.html(this.dayPeriod);
}},
_updateRanges: function (){
this.$hours.attr({
min: this.minHours,
max: this.maxHours
}).val(this.hours);
this.$minutes.attr({
min: this.minMinutes,
max: this.maxMinutes
}).val(this.minutes)
},
_handleDate: function (date){
this._setDefaultMinMaxTime();
if(date){
if(dp.isSame(date, this.d.opts.minDate)){
this._setMinTimeFromDate(this.d.opts.minDate);
}else if(dp.isSame(date, this.d.opts.maxDate)){
this._setMaxTimeFromDate(this.d.opts.maxDate);
}}
this._validateHoursMinutes(date);
},
update: function (){
this._updateRanges();
this._updateCurrentTime();
},
_getValidHoursFromDate: function (date, ampm){
var d=date,
hours=date;
if(date instanceof Date){
d=dp.getParsedDate(date);
hours=d.hours;
}
var _ampm=ampm||this.d.ampm,
dayPeriod='am';
if(_ampm){
switch(true){
case hours==0:
hours=12;
break;
case hours==12:
dayPeriod='pm';
break;
case hours > 11:
hours=hours - 12;
dayPeriod='pm';
break;
default:
break;
}}
return {
hours: hours,
dayPeriod: dayPeriod
}},
set hours (val){
this._hours=val;
var displayHours=this._getValidHoursFromDate(val);
this.displayHours=displayHours.hours;
this.dayPeriod=displayHours.dayPeriod;
},
get hours(){
return this._hours;
},
_onChangeRange: function (e){
var $target=$(e.target),
name=$target.attr('name');
this.d.timepickerIsActive=true;
this[name]=$target.val();
this._updateCurrentTime();
this.d._trigger('timeChange', [this.hours, this.minutes]);
this._handleDate(this.d.lastSelectedDate);
this.update()
},
_onSelectDate: function (e, data){
this._handleDate(data);
this.update();
},
_onMouseEnterRange: function (e){
var name=$(e.target).attr('name');
$('.airdatepicker--time-current-' + name, this.$timepicker).addClass('-focus-');
},
_onMouseOutRange: function (e){
var name=$(e.target).attr('name');
if(this.d.inFocus) return;
$('.airdatepicker--time-current-' + name, this.$timepicker).removeClass('-focus-');
},
_onMouseUpRange: function (e){
this.d.timepickerIsActive=false;
}};})();
})(window, jQuery);
jQuery(function(d){function t(t,a){var e;return function(){clearTimeout(e),e=setTimeout(function(){e=void 0,t.call()},a)}}var m,u;function a(){try{return generateWooCommerce.hooks.generateQuantityButtons()}catch(t){}var a,e;if(d(".woocommerce div.product form.cart").first().closest(".elementor-add-to-cart").length)d(".elementor.product").removeClass("do-quantity-buttons");else{try{a=generateWooCommerce.selectors.generateQuantityButtons.quantityBoxes}catch(t){a=d(".cart div.quantity:not(.buttons-added), .cart td.quantity:not(.buttons-added)").find(".qty")}try{if(0===a.length)return}catch(t){return}try{e=generateWooCommerce.callbacks.generateQuantityButtons.quantityBoxes}catch(t){e=function(t,a){var s=d(a);-1===["date","hidden"].indexOf(s.prop("type"))&&(s.parent().addClass("buttons-added").prepend('<a href="javascript:void(0)" class="minus">-</a>'),s.after('<a href="javascript:void(0)" class="plus">+</a>'),(a=parseFloat(d(this).attr("min")))&&0<a&&parseFloat(d(this).val())<a&&d(this).val(a),s.parent().find(".plus, .minus").on("click",function(){var t=parseFloat(s.val()),a=parseFloat(s.attr("max")),e=parseFloat(s.attr("min")),o=s.attr("step");t&&""!==t&&"NaN"!==t||(t=0),""!==a&&"NaN"!==a||(a=""),""!==e&&"NaN"!==e||(e=0),"any"!==o&&""!==o&&void 0!==o&&"NaN"!==parseFloat(o)||(o=1),d(this).is(".plus")?a&&(a===t||a<t)?s.val(a):s.val(t+parseFloat(o)):e&&(e===t||t<e)?s.val(e):0<t&&s.val(t-parseFloat(o)),s.trigger("change")}))}}d.each(a,e)}}d("body").on("added_to_cart",function(){d(".wc-menu-item").hasClass("has-items")||d(".wc-menu-item").addClass("has-items"),d(".wc-mobile-cart-items").hasClass("has-items")||d(".wc-mobile-cart-items").addClass("has-items")}),d("body").on("removed_from_cart",function(){var t=d(".number-of-items");t.length&&t.hasClass("no-items")&&(d(".wc-menu-item").removeClass("has-items"),d(".wc-mobile-cart-items").removeClass("has-items"))}),generateWooCommerce.addToCartPanel&&(d(document.body).on("added_to_cart",function(){var t=d("#wpadminbar"),a=d(".navigation-stick"),e=0;t.length&&(e=t.outerHeight()),a.length&&"0px"===a.css("top")&&(e+=a.outerHeight()),d(".add-to-cart-panel").addClass("item-added").css({"-webkit-transform":"translateY("+e+"px)","-ms-transform":"translateY("+e+"px)",transform:"translateY("+e+"px)"})}),d(".add-to-cart-panel .continue-shopping").on("click",function(t){t.preventDefault(),d(".add-to-cart-panel").removeClass("item-added").css({"-webkit-transform":"translateY(-100%)","-ms-transform":"translateY(-100%)",transform:"translateY(-100%)"})}),d(window).on("scroll",t(function(){var t=d(".add-to-cart-panel");t.hasClass("item-added")&&t.removeClass("item-added").css({"-webkit-transform":"translateY(-100%)","-ms-transform":"translateY(-100%)",transform:"translateY(-100%)"})},250))),generateWooCommerce.stickyAddToCart&&(m=0,u=300,d(window).on("scroll",t(function(){var t=d("#wpadminbar"),a=d(".navigation-stick"),e=d(".stuckElement"),o=0,s=d(window).scrollTop(),r=d(".add-to-cart-panel"),n=r.offset().top+r.outerHeight(),i=d(".single_add_to_cart_button"),c=i.offset().top,i=i.outerHeight(),l=d(".site-footer").offset().top;0===e.length&&(u=0),c+i<s&&n<l?setTimeout(function(){t.length&&(o=t.outerHeight()),a.length&&(a.hasClass("auto-hide-sticky")?(s<m&&"0px"===a.css("top")&&(o+=a.outerHeight()),m=s):o+=a.outerHeight()),r.addClass("show-sticky-add-to-cart").css({"-webkit-transform":"translateY("+o+"px)","-ms-transform":"translateY("+o+"px)",transform:"translateY("+o+"px)"})},u):r.removeClass("show-sticky-add-to-cart").css({"-webkit-transform":"","-ms-transform":"",transform:""})},50)),d(".go-to-variables").on("click",function(t){t.preventDefault();var t=0,a=d(".navigation-stick"),e=d("#wpadminbar");a.length&&(t=a.outerHeight()),e.length&&(t+=e.outerHeight()),d("html, body").animate({scrollTop:d(".variations").offset().top-t},250)})),d(function(){"use strict";generateWooCommerce.quantityButtons&&a()}),d(document).ajaxComplete(function(){"use strict";generateWooCommerce.quantityButtons&&a()})});
((e,o)=>{"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.postscribe=o():e.postscribe=o()})(this,function(){return t=[function(e,o,r){var r=r(1),r=(r=r)&&r.__esModule?r:{default:r};e.exports=r.default},function(e,o,r){function s(){}function c(){var e,o=d.shift();o&&((e=n.last(o)).afterDequeue(),o.stream=function(e,o,t){function n(e){e=t.beforeWrite(e),f.write(e),t.afterWrite(e)}(f=new _.default(e,t)).id=l++,f.name=t.name||f.id,a.streams[f.name]=f;var r=e.ownerDocument,i={close:r.close,open:r.open,write:r.write,writeln:r.writeln},d=(p(r,{close:s,open:s,write:function(){for(var e=arguments.length,o=Array(e),r=0;r<e;r++)o[r]=arguments[r];return n(o.join(""))},writeln:function(){for(var e=arguments.length,o=Array(e),r=0;r<e;r++)o[r]=arguments[r];return n(o.join("")+"\n")}}),f.win.onerror||s);return f.win.onerror=function(e,o,r){t.error({msg:e+" - "+o+": "+r}),d.apply(f.win,[e,o,r])},f.write(o,function(){p(r,i),f.win.onerror=d,t.done(),f=null,c()}),f}.apply(void 0,o),e.afterStreamStart())}function a(e,o,r){if(n.isFunction(r))r={done:r};else if("clear"===r)return d=[],f=null,void(l=0);r=n.defaults(r,i);var t=[e=/^#/.test(e)?window.document.getElementById(e.substr(1)):e.jquery?e[0]:e,o,r];return e.postscribe={cancel:function(){t.stream?t.stream.abort():t[1]=s}},r.beforeEnqueue(t),d.push(t),f||c(),e.postscribe}o.__esModule=!0;var p=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r,t=arguments[o];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o=(o.default=a,r(2)),_=(o=o)&&o.__esModule?o:{default:o},n=(e=>{if(e&&e.__esModule)return e;var o={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r]);return o.default=e,o})(r(4)),i={afterAsync:s,afterDequeue:s,afterStreamStart:s,afterWrite:s,autoFix:!0,beforeEnqueue:s,beforeWriteToken:function(e){return e},beforeWrite:function(e){return e},done:s,error:function(e){throw new Error(e.msg)},releaseAsync:!1},l=0,d=[],f=null;p(a,{streams:{},queue:d,WriteStream:_.default})},function(e,o,r){function t(e,o){e=e.getAttribute(p+o);return c.existy(e)?String(e):e}function n(e,o,r){r=2<arguments.length&&void 0!==r?r:null,o=p+o;c.existy(r)&&""!==r?e.setAttribute(o,r):e.removeAttribute(o)}o.__esModule=!0;var s=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r,t=arguments[o];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i=r(3),d=(i=i)&&i.__esModule?i:{default:i},c=(e=>{if(e&&e.__esModule)return e;var o={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r]);return o.default=e,o})(r(4)),p="data-ps-",_="ps-style",l="ps-script";function a(e){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=this,t=a;if(!(r instanceof t))throw new TypeError("Cannot call a class as a function");this.root=e,this.options=o,this.doc=e.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new d.default("",{autoFix:o.autoFix}),this.actuals=[e],this.proxyHistory="",this.proxyRoot=this.doc.createElement(e.nodeName),this.scriptStack=[],this.writeQueue=[],n(this.proxyRoot,"proxyof",0)}a.prototype.write=function(){var e;for((e=this.writeQueue).push.apply(e,arguments);!this.deferredRemote&&this.writeQueue.length;){var o=this.writeQueue.shift();c.isFunction(o)?this._callFunction(o):this._writeImpl(o)}},a.prototype._callFunction=function(e){var o={type:"function",value:e.name||e.toString()};this._onScriptStart(o),e.call(this.win,this.doc),this._onScriptDone(o)},a.prototype._writeImpl=function(e){this.parser.append(e);for(var o=void 0,r=void 0,t=void 0,n=[];(o=this.parser.readToken())&&!(r=c.isScript(o))&&!(t=c.isStyle(o));)(o=this.options.beforeWriteToken(o))&&n.push(o);0<n.length&&this._writeStaticTokens(n),r&&this._handleScriptToken(o),t&&this._handleStyleToken(o)},a.prototype._writeStaticTokens=function(e){e=this._buildChunk(e);return e.actual?(e.html=this.proxyHistory+e.actual,this.proxyHistory+=e.proxy,this.proxyRoot.innerHTML=e.html,this._walkChunk(),e):null},a.prototype._buildChunk=function(e){for(var o=this.actuals.length,r=[],t=[],n=[],i=e.length,d=0;d<i;d++){var s,c=e[d],a=c.toString();r.push(a),c.attrs?/^noscript$/i.test(c.tagName)||(s=o++,t.push(a.replace(/(\/?>)/," "+p+"id="+s+" $1")),c.attrs.id!==l&&c.attrs.id!==_&&n.push("atomicTag"===c.type?"":"<"+c.tagName+" "+p+"proxyof="+s+(c.unary?" />":">"))):(t.push(a),n.push("endTag"===c.type?a:""))}return{tokens:e,raw:r.join(""),actual:t.join(""),proxy:n.join("")}},a.prototype._walkChunk=function(){for(var e,o=[this.proxyRoot];c.existy(e=o.shift());){var r=1===e.nodeType;!(r&&t(e,"proxyof"))&&(r&&n(this.actuals[t(e,"id")]=e,"id"),r=e.parentNode&&t(e.parentNode,"proxyof"))&&this.actuals[r].appendChild(e),o.unshift.apply(o,c.toArray(e.childNodes))}},a.prototype._handleScriptToken=function(e){var o=this,r=this.parser.clear();r&&this.writeQueue.unshift(r),e.src=e.attrs.src||e.attrs.SRC,(e=this.options.beforeWriteToken(e))&&(e.src&&this.scriptStack.length?this.deferredRemote=e:this._onScriptStart(e),this._writeScriptToken(e,function(){o._onScriptDone(e)}))},a.prototype._handleStyleToken=function(e){var o=this.parser.clear();o&&this.writeQueue.unshift(o),e.type=e.attrs.type||e.attrs.TYPE||"text/css",(e=this.options.beforeWriteToken(e))&&this._writeStyleToken(e),o&&this.write()},a.prototype._writeStyleToken=function(e){var o=this._buildStyle(e);this._insertCursor(o,_),e.content&&(o.styleSheet&&!o.sheet?o.styleSheet.cssText=e.content:o.appendChild(this.doc.createTextNode(e.content)))},a.prototype._buildStyle=function(e){var r=this.doc.createElement(e.tagName);return r.setAttribute("type",e.type),c.eachKey(e.attrs,function(e,o){r.setAttribute(e,o)}),r},a.prototype._insertCursor=function(e,o){this._writeImpl('<span id="'+o+'"/>');o=this.doc.getElementById(o);o&&o.parentNode.replaceChild(e,o)},a.prototype._onScriptStart=function(e){e.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(e)},a.prototype._onScriptDone=function(e){return e!==this.scriptStack[0]?void this.options.error({msg:"Bad script nesting or script finished twice"}):(this.scriptStack.shift(),this.write.apply(this,e.outerWrites),void(!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)))},a.prototype._writeScriptToken=function(e,o){var r=this._buildScript(e),t=this._shouldRelease(r),n=this.options.afterAsync;e.src&&(r.src=e.src,this._scriptLoadHandler(r,t?n:function(){o(),n()}));try{this._insertCursor(r,l),r.src&&!t||o()}catch(e){this.options.error(e),o()}},a.prototype._buildScript=function(e){var r=this.doc.createElement(e.tagName);return c.eachKey(e.attrs,function(e,o){r.setAttribute(e,o)}),e.content&&(r.text=e.content),r},a.prototype._scriptLoadHandler=function(o,r){function t(){o=o.onload=o.onreadystatechange=o.onerror=null}function e(){t(),null!=r&&r(),r=null}function n(e){t(),d(e),null!=r&&r(),r=null}function i(e,o){var r=e["on"+o];null!=r&&(e["_on"+o]=r)}var d=this.options.error;i(o,"load"),i(o,"error"),s(o,{onload:function(){if(o._onload)try{o._onload.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){n({msg:"onload handler failed "+e+" @ "+o.src})}e()},onerror:function(){if(o._onerror)try{o._onerror.apply(this,Array.prototype.slice.call(arguments,0))}catch(e){return void n({msg:"onerror handler failed "+e+" @ "+o.src})}n({msg:"remote script failed "+o.src})},onreadystatechange:function(){/^(loaded|complete)$/.test(o.readyState)&&e()}})},a.prototype._shouldRelease=function(e){return!/^script$/i.test(e.nodeName)||!!(this.options.releaseAsync&&e.src&&e.hasAttribute("async"))},o.default=a},function(e,o,r){function t(e){var o;return(i[e]||(o=i[e]={exports:{},id:e,loaded:!1},n[e].call(o.exports,o,o.exports,t),o.loaded=!0,o)).exports}var n,i;e.exports=(n=[function(e,o,r){var r=r(1),r=(r=r)&&r.__esModule?r:{default:r};e.exports=r.default},function(e,o,r){function t(e){if(e&&e.__esModule)return e;var o={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r]);return o.default=e,o}o.__esModule=!0;var n,c=t(r(2)),i=t(r(3)),d=r(6),a=(d=d)&&d.__esModule?d:{default:d},s=r(5),p={comment:/^<!--/,endTag:/^<\//,atomicTag:/^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i,startTag:/^</,chars:/^[^<]/},_=(l.prototype.append=function(e){this.stream+=e},l.prototype.prepend=function(e){this.stream=e+this.stream},l.prototype._readTokenImpl=function(){var e=this._peekTokenImpl();if(e)return this.stream=this.stream.slice(e.length),e},l.prototype._peekTokenImpl=function(){for(var e in p)if(p.hasOwnProperty(e)&&p[e].test(this.stream)){e=i[e](this.stream);if(e)return"startTag"===e.type&&/script|style/i.test(e.tagName)?null:(e.text=this.stream.substr(0,e.length),e)}},l.prototype.peekToken=function(){return this._peekToken()},l.prototype.readToken=function(){return this._readToken()},l.prototype.readTokens=function(e){for(var o;o=this.readToken();)if(e[o.type]&&!1===e[o.type](o))return},l.prototype.clear=function(){var e=this.stream;return this.stream="",e},l.prototype.rest=function(){return this.stream},l);function l(){var e=this,o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=this,n=l;if(!(t instanceof n))throw new TypeError("Cannot call a class as a function");this.stream=o;var i,d=!1,s={};for(i in c)c.hasOwnProperty(i)&&(r.autoFix&&(s[i+"Fix"]=!0),d=d||s[i+"Fix"]);d?(this._readToken=(0,a.default)(this,s,function(){return e._readTokenImpl()}),this._peekToken=(0,a.default)(this,s,function(){return e._peekTokenImpl()})):(this._readToken=this._readTokenImpl,this._peekToken=this._peekTokenImpl)}for(n in(o.default=_).tokenToString=function(e){return e.toString()},_.escapeAttributes=function(e){var o,r={};for(o in e)e.hasOwnProperty(o)&&(r[o]=(0,s.escapeQuotes)(e[o],null));return r},_.supports=c)c.hasOwnProperty(n)&&(_.browserHasFlaw=_.browserHasFlaw||!c[n]&&n)},function(e,o){var r=!(o.__esModule=!0),t=!1,n=window.document.createElement("div");try{var i="<P><I></P></I>";n.innerHTML=i,o.tagSoup=r=n.innerHTML!==i}catch(e){o.tagSoup=r=!1}try{n.innerHTML="<P><i><P></P></i></P>",o.selfClose=t=2===n.childNodes.length}catch(e){o.selfClose=t=!1}n=null,o.tagSoup=r,o.selfClose=t},function(e,o,r){function t(e){var r,t,n;if(-1!==e.indexOf(">")){e=e.match(s.startTag);if(e){r={},t={},n=e[2],e[2].replace(s.attr,function(e,o){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(r[arguments[5]]="",t[arguments[5]]=!0):r[o]=arguments[2]||arguments[3]||arguments[4]||s.fillAttr.test(o)&&o||"":r[o]="",n=n.replace(e,"")});e={v:new d.StartTagToken(e[1],e[0].length,r,t,!!e[3],n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))};if("object"===(void 0===e?"undefined":i(e)))return e.v}}}o.__esModule=!0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d=(o.comment=function(e){var o=e.indexOf("--\x3e");if(0<=o)return new d.CommentToken(e.substr(4,o-1),o+3)},o.chars=function(e){var o=e.indexOf("<");return new d.CharsToken(0<=o?o:e.length)},o.startTag=t,o.atomicTag=function(e){var o=t(e);if(o){e=e.slice(o.length);if(e.match(new RegExp("</\\s*"+o.tagName+"\\s*>","i"))){e=e.match(new RegExp("([\\s\\S]*?)</\\s*"+o.tagName+"\\s*>","i"));if(e)return new d.AtomicTagToken(o.tagName,e[0].length+o.length,o.attrs,o.booleanAttrs,e[1])}}},o.endTag=function(e){if(e=e.match(s.endTag))return new d.EndTagToken(e[1],e[0].length)},r(4)),s={startTag:/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/([\-A-Za-z0-9_]+)[^>]*>/,attr:/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,fillAttr:/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i}},function(e,o,r){function d(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}o.__esModule=!0,o.EndTagToken=o.AtomicTagToken=o.StartTagToken=o.TagToken=o.CharsToken=o.CommentToken=o.Token=void 0;var i=r(5),t=(o.Token=function e(o,r){d(this,e),this.type=o,this.length=r,this.text=""},o.CommentToken=(c.prototype.toString=function(){return"\x3c!--"+this.content},c),o.CharsToken=(n.prototype.toString=function(){return this.text},n),o.TagToken=(s.formatTag=function(e){var o,r,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,n="<"+e.tagName;for(o in e.attrs)e.attrs.hasOwnProperty(o)&&(n+=" "+o,r=e.attrs[o],void 0!==e.booleanAttrs&&void 0!==e.booleanAttrs[o]||(n+='="'+(0,i.escapeQuotes)(r)+'"'));return e.rest&&(n+=" "+e.rest),n+=e.unary&&!e.html5Unary?"/>":">",null!=t&&(n+=t+"</"+e.tagName+">"),n},s));function s(e,o,r,t,n){d(this,s),this.type=e,this.length=r,this.text="",this.tagName=o,this.attrs=t,this.booleanAttrs=n,this.unary=!1,this.html5Unary=!1}function n(e){d(this,n),this.type="chars",this.length=e,this.text=""}function c(e,o){d(this,c),this.type="comment",this.length=o||(e?e.length:0),this.text="",this.content=e}function a(e,o){d(this,a),this.type="endTag",this.length=o,this.text="",this.tagName=e}function p(e,o,r,t,n){d(this,p),this.type="atomicTag",this.length=o,this.text="",this.tagName=e,this.attrs=r,this.booleanAttrs=t,this.unary=!1,this.html5Unary=!1,this.content=n}function _(e,o,r,t,n,i){d(this,_),this.type="startTag",this.length=o,this.text="",this.tagName=e,this.attrs=r,this.booleanAttrs=t,this.html5Unary=!1,this.unary=n,this.rest=i}o.StartTagToken=(_.prototype.toString=function(){return t.formatTag(this)},_),o.AtomicTagToken=(p.prototype.toString=function(){return t.formatTag(this,this.content)},p),o.EndTagToken=(a.prototype.toString=function(){return"</"+this.tagName+">"},a)},function(e,o){o.__esModule=!0,o.escapeQuotes=function(e){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return e?e.replace(/([^"]*)"/g,function(e,o){return/\\/.test(o)?o+'"':o+'\\"'}):o}},function(e,o){function c(e){return e&&"startTag"===e.type&&(e.unary=r.test(e.tagName)||e.unary,e.html5Unary=!/\/>$/.test(e.text)),e}function a(e,o){o=o.pop();e.prepend("</"+o.tagName+">")}o.__esModule=!0,o.default=function(t,r,n){function i(){var e,o,r;o=n,r=(e=t).stream,o=c(n()),e.stream=r,o&&s[o.type]&&s[o.type](o)}(e=[]).last=function(){return this[this.length-1]},e.lastTagNameEq=function(e){var o=this.last();return o&&o.tagName&&o.tagName.toUpperCase()===e.toUpperCase()},e.containsTagName=function(e){for(var o,r=0;o=this[r];r++)if(o.tagName===e)return!0;return!1};var e,d=e,s={startTag:function(e){var o=e.tagName;"TR"===o.toUpperCase()&&d.lastTagNameEq("TABLE")?(t.prepend("<TBODY>"),i()):r.selfCloseFix&&p.test(o)&&d.containsTagName(o)?d.lastTagNameEq(o)?a(t,d):(t.prepend("</"+e.tagName+">"),i()):e.unary||d.push(e)},endTag:function(e){d.last()?r.tagSoupFix&&!d.lastTagNameEq(e.tagName)?a(t,d):d.pop():r.tagSoupFix&&(n(),i())}};return function(){return i(),c(n())}};var r=/^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i,p=/^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i}],i={},t.m=n,t.c=i,t.p="",t(0))},function(e,o){function t(e){return null!=e}function n(e,o,r){for(var t=void 0,n=e&&e.length||0,t=0;t<n;t++)o.call(r,e[t],t)}function i(e,o,r){for(var t in e)e.hasOwnProperty(t)&&o.call(r,t,e[t])}function r(e,o){return!(!e||"startTag"!==e.type&&"atomicTag"!==e.type||!("tagName"in e)||!~e.tagName.toLowerCase().indexOf(o))}o.__esModule=!0;var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};o.existy=t,o.isFunction=function(e){return"function"==typeof e},o.each=n,o.eachKey=i,o.defaults=function(r,e){return r=r||{},i(e,function(e,o){t(r[e])||(r[e]=o)}),r},o.toArray=function(o){try{return Array.prototype.slice.call(o)}catch(e){r=[],n(o,function(e){r.push(e)});o={v:r};if("object"===(void 0===o?"undefined":d(o)))return o.v}var r},o.last=function(e){return e[e.length-1]},o.isTag=r,o.isScript=function(e){return r(e,"script")},o.isStyle=function(e){return r(e,"style")}}],n={},r.m=t,r.c=n,r.p="",r(0);function r(e){var o;return(n[e]||(o=n[e]={exports:{},id:e,loaded:!1},t[e].call(o.exports,o,o.exports,r),o.loaded=!0,o)).exports}var t,n}),(e=>{e.gdpr_lightbox=((e,m)=>{var v=e.document,u=m(e),h=m.Deferred,b=m("html"),y=[],k="ah",w="gdpr_lightbox-"+k,t='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])',x={esc:!0,handler:null,handlers:{image:_,inline:function(e,o){var r,t,n;try{r=m(e)}catch(e){return!1}return!!r.length&&(t=m('<i style="display:none !important"></i>'),n=r.hasClass("gdpr_lightbox-hide"),o.element().one("gdpr_lightbox:remove",function(){t.before(r).remove(),n&&!r.closest(".gdpr_lightbox-content").length&&r.addClass("gdpr_lightbox-hide")}),r.removeClass("gdpr_lightbox-hide").after(t))},youtube:function(e){var o=r.exec(e);return!!o&&l(p(e,a("https://www.youtube"+(o[2]||"")+".com/embed/"+o[4],m.extend({autoplay:1},c(o[5]||"")))))},vimeo:function(e){var o=n.exec(e);return!!o&&l(p(e,a("https://player.vimeo.com/video/"+o[3],m.extend({autoplay:1},c(o[4]||"")))))},googlemaps:function(e){var o=i.exec(e);return!!o&&l(p(e,a("https://www.google."+o[3]+"/maps?"+o[6],{output:0<o[6].indexOf("layer=c")?"svembed":"embed"})))},facebookvideo:function(e){var o=d.exec(e);if(!o)return!1;0!==e.indexOf("http")&&(e="https:"+e);return l(p(e,a("https://www.facebook.com/plugins/video.php?href="+e,m.extend({autoplay:1},c(o[4]||"")))))},iframe:l},template:'<div class="gdpr_lightbox" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="gdpr_lightbox-wrap" data-gdpr_lightbox-close role="document"><div class="gdpr_lightbox-loader">Loading...</div><div class="gdpr_lightbox-container"><div class="gdpr_lightbox-content"></div><button class="gdpr_lightbox-close" type="button" aria-label="Close (Press escape to close)" data-gdpr_lightbox-close>&times;</button></div></div></div>'},o=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i,r=/(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i,n=/(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/,i=/((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i,d=/(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i,s=(()=>{var e,o=v.createElement("div"),r={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(e in r)if(void 0!==o.style[e])return r[e];return!1})();function T(e){var o=h();return s&&e.length?(e.one(s,o.resolve),setTimeout(o.resolve,500)):o.resolve(),o.promise()}function C(e,o,r){if(1===arguments.length)return m.extend({},e);if("string"==typeof o){if(void 0===r)return void 0===e[o]?null:e[o];e[o]=r}else m.extend(e,o);return this}function c(e){for(var o,r=decodeURI(e.split("#")[0]).split("&"),t={},n=0,i=r.length;n<i;n++)r[n]&&(t[(o=r[n].split("="))[0]]=o[1]);return t}function a(e,o){return e+(-1<e.indexOf("?")?"&":"?")+m.param(o)}function p(e,o){var r=e.indexOf("#");return-1===r?o:o+(e=0<r?e.substr(r):e)}function _(e,o){function r(){n.reject(m('<span class="gdpr_lightbox-error"></span>').append("Failed loading image"))}var o=o.opener()&&o.opener().data("gdpr_lightbox-desc")||"Image with no description",t=m('<img src="'+e+'" alt="'+o+'"/>'),n=h();return t.on("load",function(){if(0===this.naturalWidth)return r();n.resolve(t)}).on("error",r),n.promise()}function l(e){return'<div class="gdpr_lightbox-iframe-container"><iframe frameborder="0" allowfullscreen allow="autoplay; fullscreen" src="'+e+'"/></div>'}function I(){return v.documentElement.clientHeight||Math.round(u.height())}function S(e){var o,r=f();r&&(27===e.keyCode&&r.options("esc")&&r.close(),9===e.keyCode)&&(e=e,r=(r=r).element().find(t),o=r.index(v.activeElement),e.shiftKey&&o<=0?(r.get(r.length-1),e.preventDefault()):e.shiftKey||o!==r.length-1||(r.get(0),e.preventDefault()))}function N(){m.each(y,function(e,o){o.resize()})}function f(){return 0===y.length?null:y[0]}function g(e,o,r,t){var n,i,d,s,c,a,p,_,l=this,f=!1,g=!1;o=m.extend({},x,o),n=m(o.template),l.element=function(){return n},l.opener=function(){return r},l.options=m.proxy(C,l,o),l.handlers=m.proxy(C,l,o.handlers),l.resize=function(){f&&!g&&i.css("max-height",I()+"px").trigger("gdpr_lightbox:resize",[l])},l.close=function(){var o,e;if(f&&!g)return g=!0,(o=l).element().attr(k,"true"),1===y.length&&(b.removeClass("gdpr_lightbox-active"),u.off({resize:N,keydown:S})),((y=m.grep(y,function(e){return o!==e})).length?y[0].element():m(".gdpr_lightbox-hidden")).removeClass("gdpr_lightbox-hidden").each(function(){var e=m(this),o=e.data(w);o?e.attr(k,o):e.removeAttr(k),e.removeData(w)}),e=h(),t&&v.activeElement!==n[0]&&m.contains(n[0],v.activeElement),i.trigger("gdpr_lightbox:close",[l]),n.removeClass("gdpr_lightbox-opened").addClass("gdpr_lightbox-closed"),T(i.add(n)).always(function(){i.trigger("gdpr_lightbox:remove",[l]),n.remove(),n=void 0,e.resolve()}),e.promise()},d=e,s=l,c=o.handlers,e=o.handler,p="inline",_=m.extend({},c),e&&_[e]?(a=_[e](d,s),p=e):(m.each(["inline","iframe"],function(e,o){delete _[o],_[o]=c[o]}),m.each(_,function(e,o){return!o||!(!o.test||o.test(d,s))||(!1!==(a=o(d,s))?(p=e,!1):void 0)})),o={handler:p,content:a||""},n.attr(k,"false").addClass("gdpr_lightbox-loading gdpr_lightbox-opened gdpr_lightbox-"+o.handler).appendTo("body").on("click","[data-gdpr_lightbox-close]",function(e){m(e.target).is("[data-gdpr_lightbox-close]")&&l.close()}).trigger("gdpr_lightbox:open",[l]),e=l,1===y.unshift(e)&&(b.addClass("gdpr_lightbox-active"),u.on({resize:N,keydown:S})),m("body > *").not(e.element()).addClass("gdpr_lightbox-hidden").each(function(){var e=m(this);void 0===e.data(w)&&e.data(w,e.attr(k)||null)}).attr(k,"true"),m.when(o.content).always(function(e){i=m(e).css("max-height",I()+"px"),n.find(".gdpr_lightbox-loader").each(function(){var e=m(this);T(e).always(function(){e.remove()})}),n.removeClass("gdpr_lightbox-loading").find(".gdpr_lightbox-content").empty().append(i),f=!0,i.trigger("gdpr_lightbox:ready",[l])})}function O(e,o,r){e.preventDefault?(e.preventDefault(),e=(r=m(this)).data("gdpr_lightbox-target")||r.attr("href")||r.attr("src")):r=m(r);o=new g(e,m.extend({},r.data("gdpr_lightbox-options")||r.data("gdpr_lightbox"),o),r,v.activeElement);if(!e.preventDefault)return o}return _.test=function(e){return o.test(e)},O.options=m.proxy(C,O,x),O.handlers=m.proxy(C,O,x.handlers),O.current=f,m(v).on("click.gdpr_lightbox","[data-gdpr_lightbox]",O),O})(e,e.jQuery||e.Zepto)})("undefined"!=typeof window?window:this),(M=>{var n={common:{init:function(){var p=365,_=[],s=!1;void 0!==moove_frontend_gdpr_scripts.cookie_expiration&&(p=moove_frontend_gdpr_scripts.cookie_expiration),M(document).on("click","#moove_gdpr_cookie_modal .moove-gdpr-modal-content.moove_gdpr_modal_theme_v1 .main-modal-content .moove-gdpr-tab-main:not(#privacy_overview) .tab-title",function(e){window.innerWidth<768&&(M(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-tab-main-content").is(":visible")?M(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-tab-main-content").slideUp(300):M(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-tab-main-content").slideDown(300))}),M(document).on("click tap",'#moove_gdpr_cookie_info_bar .moove-gdpr-infobar-reject-btn, [href*="#gdpr-reject-cookies"], .moove-gdpr-modal-reject-all',function(e){e.preventDefault(),J(),g(),0<M("#moove_gdpr_cookie_info_bar").length&&(M("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),M("body").removeClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").hide(),M("#moove_gdpr_save_popup_settings_button").show()),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),M(document).moove_gdpr_lightbox_close(),void 0!==moove_frontend_gdpr_scripts.gdpr_scor&&"false"===moove_frontend_gdpr_scripts.gdpr_scor||(T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p),setTimeout(function(){T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p)},500)),t()});var e=!1;var i=M(".moove_gdpr_modal_theme_v2 .moove-gdpr-tab-main").first(),d=M(".moove_gdpr_modal_theme_v2 .moove-gdpr-tab-main").first(),c=0,a=!1;function l(e){try{new URLSearchParams(window.location.search).has("gdpr_dbg")&&console.warn(e)}catch(e){console.warn(e)}}function f(){var e=void 0!==moove_frontend_gdpr_scripts.ajax_cookie_removal?moove_frontend_gdpr_scripts.ajax_cookie_removal:"false",o=void 0!==moove_frontend_gdpr_scripts.gdpr_nonce?moove_frontend_gdpr_scripts.gdpr_nonce:"false";"true"===e&&("function"==typeof navigator.sendBeacon?((e=new FormData).append("action","moove_gdpr_remove_php_cookies"),e.append("security",o),e.append("type","navigatorBeacon"),navigator.sendBeacon(moove_frontend_gdpr_scripts.ajaxurl,e),l("dbg - cookies removed navigatorBeacon")):M.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_remove_php_cookies",security:o,type:"ajax_b1"},function(e){l("dbg - cookies removed")}))}function g(){f();var e=void 0!==moove_frontend_gdpr_scripts.wp_lang?moove_frontend_gdpr_scripts.wp_lang:"";"true"===(void 0!==moove_frontend_gdpr_scripts.ajax_cookie_removal?moove_frontend_gdpr_scripts.ajax_cookie_removal:"false")?M.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_get_scripts",strict:0,thirdparty:0,advanced:0,performance:0,preference:0,wp_lang:e},function(e){var o={strict:1,thirdparty:0,advanced:0,performance:0,preference:0};J(),m("script_inject",o),w(o)}):J()}function m(e,o){"function"==typeof jQuery.fn.gdpr_cookie_compliance_analytics&&jQuery().gdpr_cookie_compliance_analytics(e,o)}function v(){var e=C("moove_gdpr_popup"),o={strict:"0",thirdparty:"0",advanced:"0",performance:"0",preference:"0"};return e&&(e=JSON.parse(e),o.strict=e.strict,o.thirdparty=e.thirdparty,o.advanced=e.advanced,o.performance=void 0!==e.performance?e.performance:0,o.preference=void 0!==e.preference?e.preference:0,w(o),m("script_inject",e)),void 0!==moove_frontend_gdpr_scripts.ifbc?("strict"===moove_frontend_gdpr_scripts.ifbc&&e&&1===parseInt(e.strict)&&u(),"thirdparty"===moove_frontend_gdpr_scripts.ifbc&&e&&1===parseInt(e.thirdparty)&&u(),"advanced"===moove_frontend_gdpr_scripts.ifbc&&e&&1===parseInt(e.advanced)&&u(),"performance"===moove_frontend_gdpr_scripts.ifbc&&e&&void 0!==e.performance&&1===parseInt(e.performance)&&u(),"preference"===moove_frontend_gdpr_scripts.ifbc&&e&&void 0!==e.preference&&1===parseInt(e.preference)&&u()):"1"!==moove_frontend_gdpr_scripts.strict_init&&u(),o}function u(){M(document).find("iframe[data-gdpr-iframesrc]").each(function(){M(this).attr("src",M(this).attr("data-gdpr-iframesrc"))})}M(document).on("keydown",function(e){if(M("body").hasClass("moove_gdpr_overflow")&&M(".moove-gdpr-modal-content").hasClass("moove_gdpr_modal_theme_v1")){if(38==e.keyCode&&(e.preventDefault(),(r=0===(r=M("#moove-gdpr-menu li.menu-item-selected").prev()).length?M("#moove-gdpr-menu li").last():r).find(".moove-gdpr-tab-nav:visible").trigger("click"),M(".moove-gdpr-tab-main:visible").trigger("focus")),40==e.keyCode&&(e.preventDefault(),(a?r=0===(r=M("#moove-gdpr-menu li.menu-item-selected").prev()).length?M("#moove-gdpr-menu li").last():r:n=0===(n=M("#moove-gdpr-menu li.menu-item-selected").next()).length?M("#moove-gdpr-menu li").first():n).find(".moove-gdpr-tab-nav:visible").trigger("click"),M(".moove-gdpr-tab-main:visible").trigger("focus")),9==e.keyCode)if(e.preventDefault(),0<(t=M("#moove_gdpr_cookie_modal .mgbutton, #moove_gdpr_cookie_modal .moove-gdpr-modal-close, #moove_gdpr_cookie_modal #moove-gdpr-menu > li, #moove_gdpr_cookie_modal .moove-gdpr-branding")).length){var o=!1;if(c<=t.length?(a?c--:c++,o=t[c],M(o).is(":visible")||(a?c--:c++,o=t[c])):o=t[c=0],M("#moove_gdpr_cookie_modal .focus-g").removeClass("focus-g"),c<0&&a&&(c=t.length),!o&&c>t.length&&(o=t[c=0]),M(o).addClass("focus-g").trigger("focus"),(M(o).hasClass("menu-item-on")||M(o).hasClass("menu-item-off"))&&M(o).find("button").trigger("click"),0<M(o).length&&void 0!==document.body.scrollIntoViewIfNeeded)try{M(o)[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}}else if(M(".cookie-switch").removeClass("focus-g"),0===(i=n=i.next()).length&&(i=n=d),n.find(".cookie-switch").trigger("focus").addClass("focus-g"),0<n.find(".cookie-switch").length&&void 0!==document.body.scrollIntoViewIfNeeded)try{n.find(".cookie-switch")[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}32==e.keyCode&&(e.preventDefault(),M(".moove-gdpr-tab-main:visible").find(".moove-gdpr-status-bar input[type=checkbox]").trigger("click")),13==e.keyCode&&(e.preventDefault(),(0<M(document).find(".focus-g").length?M(document).find(".focus-g"):M(".moove-gdpr-modal-save-settings")).trigger("click"))}if(M("body").hasClass("moove_gdpr_overflow")&&M(".moove-gdpr-modal-content").hasClass("moove_gdpr_modal_theme_v2")){var r,t,n;if(38==e.keyCode&&(e.preventDefault(),(r=0===(r=M("#moove-gdpr-menu li.menu-item-selected").prev()).length?M("#moove-gdpr-menu li").last():r).find(".moove-gdpr-tab-nav:visible").trigger("click"),M(".moove-gdpr-tab-main:visible").trigger("focus")),40==e.keyCode&&(e.preventDefault(),(n=0===(n=M("#moove-gdpr-menu li.menu-item-selected").next()).length?M("#moove-gdpr-menu li").first():n).find(".moove-gdpr-tab-nav:visible").trigger("click"),M(".moove-gdpr-tab-main:visible").trigger("focus")),32==e.keyCode&&(e.preventDefault(),M("#moove_gdpr_cookie_modal").find(".focus-g").trigger("click")),9==e.keyCode)if(e.preventDefault(),0<(t=M("#moove_gdpr_cookie_modal .cookie-switch, #moove_gdpr_cookie_modal .gdpr-cd-details-toggle, #moove_gdpr_cookie_modal .mgbutton, #moove_gdpr_cookie_modal a:not(.moove-gdpr-branding), #moove_gdpr_cookie_modal .moove-gdpr-modal-close, #moove_gdpr_cookie_modal .moove-gdpr-branding")).length){o=!1;if(c<=t.length?(a?c--:c++,o=t[c],M(o).is(":visible")||(a?c--:c++,o=t[c])):o=t[c=0],M("#moove_gdpr_cookie_modal .focus-g").removeClass("focus-g"),c<0&&a&&(c=t.length),!o&&c>t.length&&(o=t[c=0]),M(o).addClass("focus-g").trigger("focus"),0<M(o).length&&void 0!==document.body.scrollIntoViewIfNeeded)try{M(o)[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}}else if(M(".cookie-switch").removeClass("focus-g"),0===(i=n=i.next()).length&&(i=n=d),n.find(".cookie-switch").trigger("focus").addClass("focus-g"),0<n.find(".cookie-switch").length&&void 0!==document.body.scrollIntoViewIfNeeded)try{n.find(".cookie-switch")[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}13==e.keyCode&&(0<M("#moove_gdpr_cookie_modal .focus-g").length&&(M("#moove_gdpr_cookie_modal .focus-g").hasClass("mgbutton")||M("#moove_gdpr_cookie_modal .focus-g").hasClass("moove-gdpr-modal-close")||M("#moove_gdpr_cookie_modal .focus-g").attr("href"))?(M("#moove_gdpr_cookie_modal .focus-g").attr("href")||e.preventDefault(),M("#moove_gdpr_cookie_modal .focus-g")):(e.preventDefault(),M(".moove-gdpr-modal-save-settings"))).trigger("click")}}),M(document).on("keyup",function(e){16==e.keyCode&&(a=!1),17!=e.keyCode&&18!=e.keyCode&&13!=e.keyCode||(a=!1)}),document.addEventListener("visibilitychange",function(e){a=!1}),M(document).on("keydown",function(e){if(16==e.keyCode&&(a=!0),M("body").hasClass("gdpr-infobar-visible")&&!M("body").hasClass("moove_gdpr_overflow")&&M("#moove_gdpr_cookie_info_bar").hasClass("gdpr-full-screen-infobar")){if(9==e.keyCode){e.preventDefault(),console.warn("fsw-tab");var o=M('#moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar span.change-settings-button, #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar .moove-gdpr-infobar-allow-all, #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar .moove-gdpr-infobar-reject-btn,  #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar button.change-settings-button, #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar [data-target="third_party_cookies"] label, #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar [data-target="advanced-cookies"] label, #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar [data-target="performance-cookies"], #moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar [data-target="preference-cookies"], label#moove_gdpr_cookie_info_bar.gdpr-full-screen-infobar .mgbutton');if(0<o.length){var r=!1;if(c<=o.length?(a?c--:c++,r=o[c],M(r).is(":visible")||(a?c--:c++,r=o[c])):r=o[c=0],M("#moove_gdpr_cookie_info_bar .focus-g").removeClass("focus-g"),c<0&&a&&(c=o.length),!r&&c>o.length&&(r=o[c=0]),M(document).find("*").blur(),M(r).addClass("focus-g").trigger("focus"),0<M(r).length&&void 0!==document.body.scrollIntoViewIfNeeded)try{M(r)[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}}else{M(".cookie-switch").removeClass("focus-g");o=i.next();if(0===(i=o).length&&(i=o=d),o.find(".cookie-switch").trigger("focus").addClass("focus-g"),0<o.find(".cookie-switch").length&&void 0!==document.body.scrollIntoViewIfNeeded)try{o.find(".cookie-switch")[0].scrollIntoViewIfNeeded()}catch(e){console.warn(e)}}}32==e.keyCode&&(e.preventDefault(),r=M("#moove_gdpr_cookie_info_bar").find(".gdpr-shr-switch.focus-g input[type=checkbox]"),console.warn("space"),r.trigger("click"))}13==e.keyCode&&0<M(document.activeElement).length&&0<M(document.activeElement).closest("#moove_gdpr_cookie_info_bar").length&&(e.preventDefault(),M(document.activeElement).trigger("click"))}),M.fn.moove_gdpr_read_cookies=function(e){var o=C("moove_gdpr_popup"),r={strict:"0",thirdparty:"0",advanced:"0",performance:"0",preference:"0"};return o&&(o=JSON.parse(o),r.strict=parseInt(o.strict),r.thirdparty=parseInt(o.thirdparty),r.advanced=parseInt(o.advanced),r.performance=void 0!==o.performance?parseInt(o.performance):0,r.preference=void 0!==o.preference?parseInt(o.preference):0),r};var h=v(),b=!1,y=!1,r=!1,k="";function o(){s=!0,m("accept_all",""),T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"1",advanced:"1",performance:"1",preference:"1"}),p),t()}function t(){var e=!1;try{void 0!==moove_frontend_gdpr_scripts.force_reload&&"true"===moove_frontend_gdpr_scripts.force_reload&&(e=!0)}catch(e){}var o=v(),r=moove_frontend_gdpr_scripts.enabled_default.strict,t=moove_frontend_gdpr_scripts.enabled_default.third_party,n=moove_frontend_gdpr_scripts.enabled_default.advanced,i=void 0!==moove_frontend_gdpr_scripts.enabled_default.performance&&moove_frontend_gdpr_scripts.enabled_default.performance,d=void 0!==moove_frontend_gdpr_scripts.enabled_default.preference&&moove_frontend_gdpr_scripts.enabled_default.preference;(e=(0<=document.cookie.indexOf("moove_gdpr_popup")||1==t||1==n||1==i||1==d||1==r)&&(C("moove_gdpr_popup"),1==r&&(h.strict=1),1==t&&(h.strict=1,h.thirdparty=t),1==n&&(h.strict=1,h.advanced=n),1==i&&(h.strict=1,h.performance=i),1==d&&(h.strict=1,h.preference=d),h)&&(parseInt(o.strict)-parseInt(h.strict)<0&&(e=!0),parseInt(o.thirdparty)-parseInt(h.thirdparty)<0&&(e=!0),parseInt(o.advanced)-parseInt(h.advanced)<0&&(e=!0),parseInt(o.performance)-parseInt(h.performance)<0&&(e=!0),parseInt(o.preference)-parseInt(h.preference)<0)?!0:e)?(m("script_inject",{strict:0,thirdparty:0,advanced:0,performance:0,preference:0}),void 0!==moove_frontend_gdpr_scripts.scripts_defined?setTimeout(function(){location.reload(!0)},800):(0<(r=M(document).find('script[src*="googletagmanager.com"]')).length&&r.each(function(){var e=M(this).attr("src");e&&(e=>{var o;try{o=new URL(e)}catch(e){return}return"http:"===o.protocol||"https:"===o.protocol})(e)&&((e=new URL(e).searchParams.get("id"))&&(document.cookie="woocommerce_"+e+"=true; expires=Thu, 31 Dec 1970 23:59:59 UTC; path=/",window["ga-disable-"+e]=!0),window.gtag&&window.gtag("remove"),M(this).remove())}),t=void 0!==moove_frontend_gdpr_scripts.ajax_cookie_removal?moove_frontend_gdpr_scripts.ajax_cookie_removal:"true",n=void 0!==moove_frontend_gdpr_scripts.gdpr_nonce?moove_frontend_gdpr_scripts.gdpr_nonce:"false","function"==typeof navigator.sendBeacon?("true"===t&&((i=new FormData).append("action","moove_gdpr_remove_php_cookies"),i.append("security",n),i.append("type","navigatorBeacon"),navigator.sendBeacon(moove_frontend_gdpr_scripts.ajaxurl,i)),location.reload(!0)):"true"===t?M.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_remove_php_cookies",security:n,type:"ajax_b2"},function(e){location.reload(!0)}).fail(function(){location.reload(!0)}):location.reload(!0))):(d=C("moove_gdpr_popup"),l("dbg - inject - 4"),I(d),x(),M("#moove_gdpr_save_popup_settings_button").show())}function w(e){e&&(m("script_inject",e),1===parseInt(e.strict)?(M("#moove_gdpr_strict_cookies").is(":checked")||(M("#moove_gdpr_strict_cookies").prop("checked",!0).trigger("change"),M("#third_party_cookies fieldset, #third_party_cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#moove_gdpr_performance_cookies").prop("disabled",!1),M("#third_party_cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#advanced-cookies fieldset, #advanced-cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#advanced-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#moove_gdpr_advanced_cookies").prop("disabled",!1),M("#performance-cookies fieldset, #performance-cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#performance-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#moove_gdpr_performance_cc_cookies").prop("disabled",!1),M("#preference-cookies fieldset, #preference-cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#preference-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#moove_gdpr_preference_cc_cookies").prop("disabled",!1)),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("functional","allow")):(M("#moove_gdpr_strict_cookies").is(":checked")&&(M("#moove_gdpr_strict_cookies").prop("checked",!0).trigger("change"),M("#third_party_cookies fieldset, #third_party_cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_performance_cookies").prop("disabled",!0).prop("checked",!1),M("#advanced-cookies fieldset, #advanced-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_advanced_cookies").prop("disabled",!0).prop("checked",!1),M("#performance-cookies fieldset, #performance-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_performance_cc_cookies").prop("disabled",!0).prop("checked",!1),M("#preference-cookies fieldset, #preference-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_preference_cc_cookies").prop("disabled",!0).prop("checked",!1)),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("functional","deny")),1===parseInt(e.thirdparty)?(M("#moove_gdpr_performance_cookies").is(":checked")||M("#moove_gdpr_performance_cookies").prop("checked",!0).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("statistics","allow")):(M("#moove_gdpr_performance_cookies").is(":checked")&&M("#moove_gdpr_performance_cookies").prop("checked",!1).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("statistics","deny")),1===parseInt(e.advanced)?(M("#moove_gdpr_advanced_cookies").is(":checked")||M("#moove_gdpr_advanced_cookies").prop("checked",!0).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("marketing","allow")):(M("#moove_gdpr_advanced_cookies").is(":checked")&&M("#moove_gdpr_advanced_cookies").prop("checked",!1).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("marketing","deny")),1===parseInt(e.performance)?M("#moove_gdpr_performance_cc_cookies").is(":checked")||M("#moove_gdpr_performance_cc_cookies").prop("checked",!0).trigger("change"):M("#moove_gdpr_performance_cc_cookies").is(":checked")&&M("#moove_gdpr_performance_cc_cookies").prop("checked",!1).trigger("change"),1===parseInt(e.preference)?(M("#moove_gdpr_preference_cc_cookies").is(":checked")||M("#moove_gdpr_preference_cc_cookies").prop("checked",!0).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("preferences","allow")):(M("#moove_gdpr_preference_cc_cookies").is(":checked")&&M("#moove_gdpr_preference_cc_cookies").prop("checked",!1).trigger("change"),void 0!==moove_frontend_gdpr_scripts.wp_consent_api&&"true"===moove_frontend_gdpr_scripts.wp_consent_api&&wp_set_consent("preferences","deny")),M('input[data-name="moove_gdpr_performance_cookies"]').prop("checked",M("#moove_gdpr_performance_cookies").is(":checked")),M('input[data-name="moove_gdpr_strict_cookies"]').prop("checked",M("#moove_gdpr_strict_cookies").is(":checked")),M('input[data-name="moove_gdpr_advanced_cookies"]').prop("checked",M("#moove_gdpr_advanced_cookies").is(":checked")),M('input[data-name="moove_gdpr_performance_cc_cookies"]').prop("checked",M("#moove_gdpr_performance_cc_cookies").is(":checked")),M('input[data-name="moove_gdpr_preference_cc_cookies"]').prop("checked",M("#moove_gdpr_preference_cc_cookies").is(":checked")))}function x(){0<M("#moove_gdpr_cookie_info_bar").length&&(M("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),M("body").removeClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").attr("aria-hidden","true").hide())}function n(){var e=!0;"undefined"!=typeof sessionStorage&&1===parseInt(sessionStorage.getItem("gdpr_infobar_hidden"))&&(e=!1),void 0!==moove_frontend_gdpr_scripts.display_cookie_banner&&e?"true"===moove_frontend_gdpr_scripts.display_cookie_banner?0<M("#moove_gdpr_cookie_info_bar").length&&(M("#moove_gdpr_cookie_info_bar").removeClass("moove-gdpr-info-bar-hidden"),M("#moove_gdpr_save_popup_settings_button:not(.button-visible)").hide(),M("body").addClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").attr("aria-hidden","false").show(),m("show_infobar","")):0<M("#moove_gdpr_cookie_info_bar").length&&(M("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),M("body").removeClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").attr("aria-hidden","true").hide(),l("dbg - inject - 5"),I(JSON.stringify({strict:1,thirdparty:1,advanced:1,performance:1,preference:1}))):0<M("#moove_gdpr_cookie_info_bar").length&&e&&(M("#moove_gdpr_cookie_info_bar").removeClass("moove-gdpr-info-bar-hidden"),M("#moove_gdpr_save_popup_settings_button:not(.button-visible)").hide(),M("body").addClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").attr("aria-hidden","false").show(),m("show_infobar",""))}function T(e,o,r){var t,n,r=0<r?((t=new Date).setTime(t.getTime()+24*r*60*60*1e3),"; expires="+t.toGMTString()):"";try{var i="SameSite=Lax";if(void 0!==moove_frontend_gdpr_scripts.cookie_attributes&&(i=moove_frontend_gdpr_scripts.cookie_attributes),void 0!==moove_frontend_gdpr_scripts.gdpr_consent_version&&((o=JSON.parse(o)).version=moove_frontend_gdpr_scripts.gdpr_consent_version,o=JSON.stringify(o)),"moove_gdpr_popup"!==e||0!==parseInt(o.strict)||void 0!==moove_frontend_gdpr_scripts.gdpr_scor&&"false"===moove_frontend_gdpr_scripts.gdpr_scor?document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(o)+r+"; path=/; "+i:document.cookie=encodeURIComponent(e)+"=; Path=/;",o!==k&&(n=k=o,"function"==typeof jQuery.fn.gdpr_cookie_compliance_consent_log)&&jQuery().gdpr_cookie_compliance_consent_log(n),"moove_gdpr_popup"===e)try{var d="string"==typeof o?JSON.parse(o):o,s=(gdpr_consent__strict="1"===d.strict||1===d.strict?"true":"false",gdpr_consent__thirdparty="1"===d.thirdparty||1===d.thirdparty?"true":"false",gdpr_consent__advanced="1"===d.advanced||1===d.advanced?"true":"false",gdpr_consent__performance="1"===d.performance||1===d.performance?"true":"false",gdpr_consent__preference="1"===d.preference||1===d.preference?"true":"false",[]);"1"!==d.strict&&1!==d.strict||s.push("strict"),"1"!==d.thirdparty&&1!==d.thirdparty||s.push("thirdparty"),"1"!==d.advanced&&1!==d.advanced||s.push("advanced"),"1"!==d.performance&&1!==d.performance||s.push("performance"),"1"!==d.preference&&1!==d.preference||s.push("preference"),gdpr_consent__cookies=s.join("|")}catch(e){}}catch(e){l("error - moove_gdpr_create_cookie: "+e)}}function C(e){for(var o=encodeURIComponent(e)+"=",r=document.cookie.split(";"),t=0;t<r.length;t++){for(var n=r[t];" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(o)){var i=decodeURIComponent(n.substring(o.length,n.length)),d=JSON.parse(i);if(void 0!==d.version){if(void 0!==moove_frontend_gdpr_scripts.gdpr_consent_version){var s=moove_frontend_gdpr_scripts.gdpr_consent_version;if(parseFloat(s)>parseFloat(d.version))return document.cookie=e+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;",null}}else if(void 0!==moove_frontend_gdpr_scripts.gdpr_consent_version&&1<parseFloat(moove_frontend_gdpr_scripts.gdpr_consent_version))return document.cookie=e+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;",null;return i}}return null}function I(o){if(h=v(),o){var e,r=o;o=JSON.parse(o),v();if(!1!==b&&(e=JSON.parse(b),1===parseInt(e.thirdparty)&&1===parseInt(o.thirdparty)&&(o.thirdparty="0"),1===parseInt(e.advanced)&&1===parseInt(o.advanced)&&(o.advanced="0"),1===parseInt(e.performance)&&1===parseInt(o.performance)&&(o.performance="0"),1===parseInt(e.preference))&&1===parseInt(o.preference)&&(o.preference="0"),m("script_inject",o),y=!0,void 0!==moove_frontend_gdpr_scripts.ifbc?("strict"===moove_frontend_gdpr_scripts.ifbc&&o&&1===parseInt(o.strict)&&u(),"thirdparty"===moove_frontend_gdpr_scripts.ifbc&&o&&1===parseInt(o.thirdparty)&&u(),"advanced"===moove_frontend_gdpr_scripts.ifbc&&o&&1===parseInt(o.advanced)&&u(),"performance"===moove_frontend_gdpr_scripts.ifbc&&o&&1===parseInt(o.performance)&&u(),"preference"===moove_frontend_gdpr_scripts.ifbc&&o&&1===parseInt(o.preference)&&u()):1===parseInt(o.strict)&&u(),void 0!==moove_frontend_gdpr_scripts.scripts_defined)try{var t=JSON.parse(moove_frontend_gdpr_scripts.scripts_defined);void 0!==o.strict&&1===parseInt(o.strict)||1<parseInt(moove_frontend_gdpr_scripts.enabled_default.strict)?(("undefined"!==o.strict&&1===parseInt(o.strict)||1<parseInt(moove_frontend_gdpr_scripts.enabled_default.strict))&&void 0===_.strict&&(void 0!==t.strict&&t.strict.header&&postscribe(document.head,t.strict.header),void 0!==t.strict&&t.strict.body&&M(t.strict.body).prependTo(document.body),void 0!==t.strict&&t.strict.footer&&postscribe(document.body,t.strict.footer),_.strict=!0),1===parseInt(o.thirdparty)&&void 0===_.thirdparty&&(t.thirdparty.header&&postscribe(document.head,t.thirdparty.header),t.thirdparty.body&&M(t.thirdparty.body).prependTo(document.body),t.thirdparty.footer&&postscribe(document.body,t.thirdparty.footer),_.thirdparty=!0),1===parseInt(o.advanced)&&void 0===_.advanced&&(t.advanced.header&&postscribe(document.head,t.advanced.header),t.advanced.body&&M(t.advanced.body).prependTo(document.body),t.advanced.footer&&postscribe(document.body,t.advanced.footer),_.advanced=!0),void 0!==o.performance&&1===parseInt(o.performance)&&void 0===_.performance&&(void 0!==t.performance&&t.performance.header&&postscribe(document.head,t.performance.header),void 0!==t.performance&&t.performance.body&&M(t.performance.body).prependTo(document.body),void 0!==t.performance&&t.performance.footer&&postscribe(document.body,t.performance.footer),_.performance=!0),void 0!==o.preference&&1===parseInt(o.preference)&&void 0===_.preference&&(void 0!==t.preference&&t.preference.header&&postscribe(document.head,t.preference.header),void 0!==t.preference&&t.preference.body&&M(t.preference.body).prependTo(document.body),void 0!==t.preference&&t.preference.footer&&postscribe(document.body,t.preference.footer),_.preference=!0)):(o=C("moove_gdpr_popup"))&&(J(),g())}catch(e){console.warn("1"),console.error(e)}else void 0!==_.strict&&void 0!==_.thirdparty&&void 0!==_.advanced||(1===o.strict&&(_.strict=!0),1===o.thirdparty&&(_.thirdparty=!0),1===o.advanced&&(_.advanced=!0),1===o.performance&&(_.performance=!0),1===o.preference&&(_.preference=!0),e=void 0!==moove_frontend_gdpr_scripts.wp_lang?moove_frontend_gdpr_scripts.wp_lang:"",0===parseInt(o.strict)&&0===parseInt(o.thirdparty)&&0===parseInt(o.advanced)&&0===parseInt(o.performance)&&0===parseInt(o.preference)&&J(),M.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_get_scripts",strict:o.strict,thirdparty:o.thirdparty,advanced:o.advanced,performance:o.performance,preference:o.preference,wp_lang:e},function(e){b=r,m("script_inject",o);e="string"==typeof e?JSON.parse(e):e;e.header&&postscribe(document.head,e.header),e.body&&M(e.body).prependTo(document.body),e.footer&&postscribe(document.body,e.footer)}))}else n()}M(document).on("click tap","#moove_gdpr_cookie_info_bar .moove-gdpr-infobar-close-btn",function(e){e.preventDefault(),void 0!==moove_frontend_gdpr_scripts.close_btn_action?(1===(e=parseInt(moove_frontend_gdpr_scripts.close_btn_action))&&(x(),M("#moove_gdpr_save_popup_settings_button").show(),"undefined"!=typeof sessionStorage)&&sessionStorage.setItem("gdpr_infobar_hidden",1),2===e&&(J(),g(),0<M("#moove_gdpr_cookie_info_bar").length&&(M("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),M("body").removeClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").hide(),M("#moove_gdpr_save_popup_settings_button").show()),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),M(document).moove_gdpr_lightbox_close(),void 0!==moove_frontend_gdpr_scripts.gdpr_scor&&"false"===moove_frontend_gdpr_scripts.gdpr_scor||(T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p),setTimeout(function(){T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p)},500)),t()),3===e&&o(),4===e&&(J(),g(),0<M("#moove_gdpr_cookie_info_bar").length&&(M("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),M("body").removeClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").hide(),M("#moove_gdpr_save_popup_settings_button").show()),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),M(document).moove_gdpr_lightbox_close(),void 0!==moove_frontend_gdpr_scripts.gdpr_scor&&"false"===moove_frontend_gdpr_scripts.gdpr_scor||(T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p),setTimeout(function(){T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p)},500)),void 0!==moove_frontend_gdpr_scripts.close_btn_rdr&&""!==moove_frontend_gdpr_scripts.close_btn_rdr?window.parent.location.href=moove_frontend_gdpr_scripts.close_btn_rdr:t())):(x(),M("#moove_gdpr_save_popup_settings_button").show(),"undefined"!=typeof sessionStorage&&sessionStorage.setItem("gdpr_infobar_hidden",1))}),M.fn.moove_gdpr_save_cookie=function(e){var o,r,t,n,i,d=c=C("moove_gdpr_popup"),s=M(window).scrollTop();if(!c&&(o=e.thirdParty?"1":"0",r=e.advanced?"1":"0",t=e.performance?"1":"0",n=e.preference?"1":"0",e.scrollEnable?(i=e.scrollEnable,M(window).scroll(function(){!y&&M(this).scrollTop()-s>i&&("undefined"===e.thirdparty&&"undefined"===e.advanced||(T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:o,advanced:r,performance:t,preference:n}),p),w(c=JSON.parse(c))))})):"undefined"===e.thirdparty&&"undefined"===e.advanced||(T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:o,advanced:r,performance:t,preference:n}),p),w(c=JSON.parse(c))),c=C("moove_gdpr_popup")))if(m("script_inject",c=JSON.parse(c)),y=!0,void 0!==moove_frontend_gdpr_scripts.ifbc?("strict"===moove_frontend_gdpr_scripts.ifbc&&c&&1===parseInt(c.strict)&&u(),"thirdparty"===moove_frontend_gdpr_scripts.ifbc&&c&&1===parseInt(c.thirdparty)&&u(),"advanced"===moove_frontend_gdpr_scripts.ifbc&&c&&1===parseInt(c.advanced)&&u(),"performance"===moove_frontend_gdpr_scripts.ifbc&&c&&1===parseInt(c.performance)&&u(),"preference"===moove_frontend_gdpr_scripts.ifbc&&c&&1===parseInt(c.preference)&&u()):1===parseInt(c.strict)&&u(),void 0!==moove_frontend_gdpr_scripts.scripts_defined)try{var c,a=JSON.parse(moove_frontend_gdpr_scripts.scripts_defined);void 0!==c.strict&&1===parseInt(c.strict)||1<parseInt(moove_frontend_gdpr_scripts.enabled_default.strict)?(("undefined"!==c.strict&&1===parseInt(c.strict)||1<parseInt(moove_frontend_gdpr_scripts.enabled_default.strict))&&void 0===_.strict&&(void 0!==a.strict&&a.strict.header&&postscribe(document.head,a.strict.header),void 0!==a.strict&&a.strict.body&&M(a.strict.body).prependTo(document.body),void 0!==a.strict&&a.strict.footer&&postscribe(document.body,a.strict.footer),_.strict=!0),1===parseInt(c.thirdparty)&&void 0===_.thirdparty&&(a.thirdparty.header&&postscribe(document.head,a.thirdparty.header),a.thirdparty.body&&M(a.thirdparty.body).prependTo(document.body),a.thirdparty.footer&&postscribe(document.body,a.thirdparty.footer),_.thirdparty=!0),1===parseInt(c.advanced)&&void 0===_.advanced&&(a.advanced.header&&postscribe(document.head,a.advanced.header),a.advanced.body&&M(a.advanced.body).prependTo(document.body),a.advanced.footer&&postscribe(document.body,a.advanced.footer),_.advanced=!0),void 0!==c.performance&&1===parseInt(c.performance)&&void 0===_.performance&&(void 0!==a.performance&&a.performance.header&&postscribe(document.head,a.performance.header),void 0!==a.performance&&a.performance.body&&M(a.performance.body).prependTo(document.body),void 0!==a.performance&&a.performance.footer&&postscribe(document.body,a.performance.footer),_.performance=!0),void 0!==c.preference&&1===parseInt(c.preference)&&void 0===_.preference&&(void 0!==a.preference&&a.preference.header&&postscribe(document.head,a.preference.header),void 0!==a.preference&&a.preference.body&&M(a.preference.body).prependTo(document.body),void 0!==a.preference&&a.preference.footer&&postscribe(document.body,a.preference.footer),_.preference=!0)):(c=C("moove_gdpr_popup"))&&(J(),g())}catch(e){console.warn("2"),console.error(e)}else void 0!==_.thirdparty&&void 0!==_.advanced&&void 0!==_.performance&&void 0!==_.preference||(1===c.thirdparty&&(_.thirdparty=!0),1===c.advanced&&(_.advanced=!0),1===c.performance&&(_.performance=!0),1===c.preference&&(_.preference=!0),a=void 0!==moove_frontend_gdpr_scripts.wp_lang?moove_frontend_gdpr_scripts.wp_lang:"",0===parseInt(c.thirdparty)&&0===parseInt(c.advanced)&&0===parseInt(c.performance)&&0===parseInt(c.preference)&&J(),M.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_get_scripts",strict:c.strict,thirdparty:c.thirdparty,advanced:c.advanced,performance:c.performance,preference:c.preference,wp_lang:a},function(e){b=d,m("script_inject",c);e="string"==typeof e?JSON.parse(e):e;e.header&&postscribe(document.head,e.header),e.body&&M(e.body).prependTo(document.body),e.footer&&postscribe(document.body,e.footer)}))},location.pathname;var R=M(window).scrollTop(),S=(M("#moove_gdpr_save_popup_settings_button").show(),moove_frontend_gdpr_scripts.enabled_default.strict),N=moove_frontend_gdpr_scripts.enabled_default.third_party,O=moove_frontend_gdpr_scripts.enabled_default.advanced,j=void 0!==moove_frontend_gdpr_scripts.enabled_default.performance&&moove_frontend_gdpr_scripts.enabled_default.performance,D=void 0!==moove_frontend_gdpr_scripts.enabled_default.preference&&moove_frontend_gdpr_scripts.enabled_default.preference;if(void 0!==moove_frontend_gdpr_scripts.enable_on_scroll&&"true"===moove_frontend_gdpr_scripts.enable_on_scroll&&1!==parseInt(N)&&1!==parseInt(O)&&1!==parseInt(j)&&1!==parseInt(D)&&(D=j=O=N=S=1),0<=document.cookie.indexOf("moove_gdpr_popup")||1==N||1==O||1==j||1==D||1<S){var E=C("moove_gdpr_popup");if(E){S=v();"0"==S.strict&&"0"==S.thirdparty&&"0"==S.advanced&&"0"==S.performance&&"0"==S.preference&&(J(),n())}else{var A=!1;if("undefined"!=typeof sessionStorage&&(A=sessionStorage.getItem("gdpr_session")),void 0!==moove_frontend_gdpr_scripts.enable_on_scroll&&"true"===moove_frontend_gdpr_scripts.enable_on_scroll)if(A)try{w(JSON.parse(A)),y=!0,l("dbg - inject - 1"),I(A),T("moove_gdpr_popup",A,p),x()}catch(e){}else(!y&&1==moove_frontend_gdpr_scripts.enabled_default.third_party||!y&&1==moove_frontend_gdpr_scripts.enabled_default.advanced||!y&&1==moove_frontend_gdpr_scripts.enabled_default.performance||!y&&1==moove_frontend_gdpr_scripts.enabled_default.performance)&&(w(E={strict:1,thirdparty:N,advanced:O,performance:j,preference:D}),E=JSON.stringify(E),e=!0,n(),l("dbg - default scroll inject")),void 0!==moove_frontend_gdpr_scripts.gdpr_aos_hide&&("1"===moove_frontend_gdpr_scripts.gdpr_aos_hide||"true"===moove_frontend_gdpr_scripts.gdpr_aos_hide||"object"==typeof moove_frontend_gdpr_scripts.gdpr_aos_hide&&moove_frontend_gdpr_scripts.gdpr_aos_hide.includes("1"))&&(l("dbg - enable on scroll - enter"),M(window).scroll(function(){if((!y||e)&&200<M(this).scrollTop()-R){E={strict:1,thirdparty:N,advanced:O,performance:j,preference:D},C("moove_gdpr_popup")||"undefined"==typeof sessionStorage||(A=sessionStorage.getItem("gdpr_session"))||(sessionStorage.setItem("gdpr_session",JSON.stringify(E)),A=sessionStorage.getItem("gdpr_session"));try{w(E),E=JSON.stringify(E),n(),y=!0,l("dbg - inject - 2 - accept on scroll"),e||I(E),e=!1,T("moove_gdpr_popup",E,p),x(),t(),M("#moove_gdpr_save_popup_settings_button").show()}catch(e){}}})),void 0!==moove_frontend_gdpr_scripts.gdpr_aos_hide&&("2"===moove_frontend_gdpr_scripts.gdpr_aos_hide||"object"==typeof moove_frontend_gdpr_scripts.gdpr_aos_hide&&moove_frontend_gdpr_scripts.gdpr_aos_hide.includes("2"))&&(S=30,l("dbg - hidetimer - enter, seconds: "+(S=void 0!==moove_frontend_gdpr_scripts.gdpr_aos_hide_seconds?parseInt(moove_frontend_gdpr_scripts.gdpr_aos_hide_seconds):S)),setTimeout(function(){if(l("dbg - hidetimer - is_created: "+y),!y){E={strict:1,thirdparty:N,advanced:O,performance:j,preference:D};var e=C("moove_gdpr_popup");l("dbg - hidetimer - cookies_stored: "+e),e||"undefined"==typeof sessionStorage||(A=sessionStorage.getItem("gdpr_session"))||(sessionStorage.setItem("gdpr_session",JSON.stringify(E)),A=sessionStorage.getItem("gdpr_session"));try{w(E),E=JSON.stringify(E),n(),y=!0,l("dbg - inject - 2a"),I(E),T("moove_gdpr_popup",E,p),t()}catch(e){}}x(),M("#moove_gdpr_save_popup_settings_button").show()},1e3*S));else w(E={strict:1,thirdparty:N,advanced:O,performance:j,preference:D}),E=JSON.stringify(E),n()}l("dbg - inject - 3"),I(E)}else n();function U(){M(document).find("#moove_gdpr_cookie_modal input[type=checkbox]").each(function(){M(this).is(":checked")})}M(document).on("click",'[data-href*="#moove_gdpr_cookie_modal"],[href*="#moove_gdpr_cookie_modal"]',function(e){e.preventDefault(),0<M("#moove_gdpr_cookie_modal").length&&(r=!0,gdpr_lightbox("#moove_gdpr_cookie_modal"),M(".gdpr_lightbox").addClass("moove_gdpr_cookie_modal_open"),M(document).moove_gdpr_lightbox_open(),m("opened_modal_from_link",""))}),M(document).on("click",'[data-href*="#gdpr_cookie_modal"],[href*="#gdpr_cookie_modal"]',function(e){e.preventDefault(),0<M("#moove_gdpr_cookie_modal").length&&(r=!0,gdpr_lightbox("#moove_gdpr_cookie_modal"),M(".gdpr_lightbox").addClass("moove_gdpr_cookie_modal_open"),M(document).moove_gdpr_lightbox_open(),m("opened_modal_from_link",""))}),M(document).on("click tap","#moove_gdpr_cookie_info_bar .moove-gdpr-close-modal-button a, #moove_gdpr_cookie_info_bar .moove-gdpr-close-modal-button button",function(e){e.preventDefault()}),M(document).on("click tap",".moove-gdpr-modal-close",function(e){e.preventDefault(),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),M(document).moove_gdpr_lightbox_close()}),M(document).on("click","#moove-gdpr-menu .moove-gdpr-tab-nav",function(e){e.preventDefault(),e.stopPropagation(),M("#moove-gdpr-menu li").removeClass("menu-item-selected"),M(this).parent().addClass("menu-item-selected"),M(".moove-gdpr-tab-content .moove-gdpr-tab-main").hide(),M(M(this).attr("href")).show(),M(M(this).attr("data-href")).show(),m("clicked_to_tab",M(this).attr("data-href"))}),M(document).on("gdpr_lightbox:close",function(e,o){M(document).moove_gdpr_lightbox_close()}),M.fn.moove_gdpr_lightbox_close=function(e){r&&(M("body").removeClass("moove_gdpr_overflow"),M("#moove_gdpr_cookie_modal").attr("aria-hidden","true"),r=!1)},M.fn.moove_gdpr_lightbox_open=function(e){var o;r&&(M("body").addClass("moove_gdpr_overflow"),M("#moove_gdpr_cookie_modal").attr("aria-hidden","false"),o=C("moove_gdpr_popup"),document.activeElement.blur(),"none"===moove_frontend_gdpr_scripts.show_icons&&M("body").addClass("gdpr-no-icons"),M(".moove-gdpr-status-bar input[type=checkbox]").each(function(){M(this).is(":checked")?M(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideUp():M(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideDown()}),o?w(o=JSON.parse(o)):M("#moove_gdpr_strict_cookies").is(":checked")||(M("#advanced-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled"),M("#third_party_cookies .gdpr-cc-form-fieldset").addClass("fl-disabled")),void 0!==moove_frontend_gdpr_scripts.hide_save_btn&&"true"===moove_frontend_gdpr_scripts.hide_save_btn?M(".moove-gdpr-modal-save-settings").removeClass("button-visible").hide():M(".moove-gdpr-modal-save-settings").addClass("button-visible").show(),U())},M(document).on("gdpr_lightbox:open",function(e,o){M(document).moove_gdpr_lightbox_open()}),M(document).on("click tap",".fl-disabled",function(e){M("#moove_gdpr_cookie_modal .moove-gdpr-modal-content").is(".moove_gdpr_modal_theme_v2")?0<M("#moove_gdpr_strict_cookies").length&&(M("#moove_gdpr_strict_cookies").trigger("click"),M(this).trigger("click")):M(this).closest(".moove-gdpr-tab-main-content").find(".moove-gdpr-strict-secondary-warning-message").slideDown()}),M(document).on("change",".moove-gdpr-status-bar input[type=checkbox]",function(e){M(".moove-gdpr-modal-save-settings").addClass("button-visible").show();var o=M(this).closest(".moove-gdpr-tab-main").attr("id");M(this).closest(".moove-gdpr-status-bar").toggleClass("checkbox-selected"),M(this).closest(".moove-gdpr-tab-main").toggleClass("checkbox-selected"),M("#moove-gdpr-menu .menu-item-"+o).toggleClass("menu-item-off"),M(this).is(":checked")?M(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideUp():M(this).closest(".moove-gdpr-tab-main").find(".moove-gdpr-strict-warning-message").slideDown(),M(this).is("#moove_gdpr_strict_cookies")&&(M(this).is(":checked")?(M("#third_party_cookies fieldset, #third_party_cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#moove_gdpr_performance_cookies").prop("disabled",!1),M("#third_party_cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#advanced-cookies fieldset, #advanced-cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#advanced-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#moove_gdpr_advanced_cookies").prop("disabled",!1),M("#performance-cookies fieldset, #performance-cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#performance-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#moove_gdpr_performance_cc_cookies").prop("disabled",!1),M("#preference-cookies fieldset, #preference-cookies .gdpr-cc-form-fieldset").removeClass("fl-disabled"),M("#preference-cookies .moove-gdpr-strict-secondary-warning-message").slideUp(),M("#moove_gdpr_preference_cc_cookies").prop("disabled",!1)):(M(".gdpr_cookie_settings_shortcode_content").find("input").each(function(){M(this).prop("checked",!1)}),M("#third_party_cookies fieldset, #third_party_cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_performance_cookies").prop("disabled",!0).prop("checked",!1),M("#advanced-cookies fieldset, #advanced-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_advanced_cookies").prop("disabled",!0).prop("checked",!1),M("#performance-cookies fieldset, #performance-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_performance_cc_cookies").prop("disabled",!0).prop("checked",!1),M("#preference-cookies fieldset, #preference-cookies .gdpr-cc-form-fieldset").addClass("fl-disabled").closest(".moove-gdpr-status-bar").removeClass("checkbox-selected"),M("#moove_gdpr_preference_cc_cookies").prop("disabled",!0).prop("checked",!1))),M('input[data-name="'+M(this).attr("name")+'"]').prop("checked",M(this).is(":checked")),U()}),M(document).on("click tap",".gdpr_cookie_settings_shortcode_content a.gdpr-shr-save-settings",function(e){e.preventDefault(),P(!0),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),M(document).moove_gdpr_lightbox_close(),t()}),M(document).on("change",".gdpr_cookie_settings_shortcode_content input[type=checkbox]",function(e){var o=M(this).attr("data-name"),r=M("#"+o);M(this).is(":checked")?(M('input[data-name="'+o+'"]').prop("checked",!0),"moove_gdpr_strict_cookies"===M(this).attr("data-name")||M(this).closest(".gdpr_cookie_settings_shortcode_content").find('input[data-name="moove_gdpr_strict_cookies"]').is(":checked")||(M('input[data-name="'+o+'"]').prop("checked",!1),M('.gdpr_cookie_settings_shortcode_content input[data-name="moove_gdpr_strict_cookies"]').closest(".gdpr-shr-switch").css("transform","scale(1.2)"),setTimeout(function(){M('.gdpr_cookie_settings_shortcode_content input[data-name="moove_gdpr_strict_cookies"]').closest(".gdpr-shr-switch").css("transform","scale(1)")},300))):(M('input[data-name="'+o+'"]').prop("checked",M(this).is(":checked")),"moove_gdpr_strict_cookies"===M(this).attr("data-name")&&M(".gdpr_cookie_settings_shortcode_content").find('input[type="checkbox"]').prop("checked",!1)),r.trigger("click")}),M(document).on("click tap",'.moove-gdpr-modal-allow-all, [href*="#gdpr-accept-cookies"]',function(e){e.preventDefault(),M("#moove_gdpr_cookie_modal").find("input[type=checkbox]").each(function(){var e=M(this);e.is(":checked")||e.trigger("click")}),o(),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),x(),P(!1),M(document).moove_gdpr_lightbox_close()}),M(document).on("click tap",".moove-gdpr-infobar-allow-all",function(e){e.preventDefault(),M("#moove_gdpr_cookie_modal").find("input[type=checkbox]").each(function(){var e=M(this);e.is(":checked")||e.trigger("click")}),o(),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),x(),P(!1)}),M(document).on("click tap",".moove-gdpr-modal-save-settings",function(e){e.preventDefault(),P(!0),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),M(document).moove_gdpr_lightbox_close(),t()});function J(){try{M(document).find("script[data-gdpr]").each(function(){l("script_removed: "+M(this).attr("src")),M(this).remove()});for(var e=document.cookie.split(";"),o=window.location.hostname,r=0;r<e.length;r++){var t=e[r],n=t.indexOf("="),i=-1<n?t.substr(0,n):t;i.includes("woocommerce")||i.includes("wc_")||i.includes("moove_gdpr_popup")||i.includes("wordpress")||(document.cookie=i+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT;domain="+o,document.cookie=i+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT;domain=."+o,l("cookie removed: "+i+" - "+o))}}catch(e){l("error in gdpr_delete_all_cookies: "+e)}"undefined"!=typeof sessionStorage&&sessionStorage.removeItem("gdpr_session")}function P(e){var o=C("moove_gdpr_popup"),e=(e&&(J(),f()),"0"),r="0",t="0",n="0",i="0",d=!1;o&&(e=(o=JSON.parse(o)).strict,r=o.advanced,t=o.thirdparty,n=void 0!==o.performance?o.performance:0,i=void 0!==o.preference?o.preference:0),0<M(document).find("#moove_gdpr_strict_cookies").length?M(document).find("#moove_gdpr_strict_cookies").is(":checked")?(e="1",d=!0):e="0":(d=!0,e="1"),M(document).find("#moove_gdpr_performance_cookies").is(":checked")?(t="1",d=!0):t="0",M(document).find("#moove_gdpr_advanced_cookies").is(":checked")?(r="1",d=!0):r="0",M(document).find("#moove_gdpr_performance_cc_cookies").is(":checked")?(n="1",d=!0):n="0",M(document).find("#moove_gdpr_preference_cc_cookies").is(":checked")?(i="1",d=!0):i="0",!o&&d?(T("moove_gdpr_popup",JSON.stringify({strict:e,thirdparty:t,advanced:r,performance:n,preference:i}),p),x(),M(document).find("#moove_gdpr_save_popup_settings_button").show()):o&&!s&&T("moove_gdpr_popup",JSON.stringify({strict:e,thirdparty:t,advanced:r,performance:n,preference:i}),p),(o=C("moove_gdpr_popup"))&&"0"==(o=JSON.parse(o)).strict&&"0"==o.thirdparty&&"0"==o.advanced&&"0"==o.performance&&"0"==o.preference&&J()}window.location.hash&&("moove_gdpr_cookie_modal"!==(S=(S=window.location.hash.substring(1)).replace(/\/$/,""))&&"gdpr_cookie_modal"!==S||(r=!0,m("opened_modal_from_link",""),setTimeout(function(){0<M("#moove_gdpr_cookie_modal").length&&(gdpr_lightbox("#moove_gdpr_cookie_modal"),M(".gdpr_lightbox").addClass("moove_gdpr_cookie_modal_open"),M(document).moove_gdpr_lightbox_open())},500)),"gdpr-accept-cookies"===S&&(M("#moove_gdpr_cookie_modal").find("input[type=checkbox]").each(function(){var e=M(this);e.is(":checked")||e.trigger("click")}),o(),M(".gdpr_lightbox .gdpr_lightbox-close").trigger("click"),x(),P(!0),M(document).moove_gdpr_lightbox_close()),"gdpr-reject-cookies"===S)&&(J(),g(),0<M("#moove_gdpr_cookie_info_bar").length&&(M("#moove_gdpr_cookie_info_bar").addClass("moove-gdpr-info-bar-hidden"),M("body").removeClass("gdpr-infobar-visible"),M("#moove_gdpr_cookie_info_bar").hide(),M("#moove_gdpr_save_popup_settings_button").show()),n(),T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p),setTimeout(function(){T("moove_gdpr_popup",JSON.stringify({strict:"1",thirdparty:"0",advanced:"0",performance:"0",preference:"0"}),p)},500))},finalize:function(){}}},r={fire:function(e,o,r){var t=n;o=void 0===o?"init":o,""!==e&&t[e]&&"function"==typeof t[e][o]&&t[e][o](r)},loadEvents:function(){var n,o=!1,e=!1;void 0!==moove_frontend_gdpr_scripts.gpc&&1===parseInt(moove_frontend_gdpr_scripts.gpc)&&void 0!==navigator.globalPrivacyControl&&(gpcValue=navigator.globalPrivacyControl)&&(e=!0,console.warn("GDPR Cookie Compliance - Blocked by Global Policy Control (GPC)")),e||(void 0!==moove_frontend_gdpr_scripts.geo_location&&"true"===moove_frontend_gdpr_scripts.geo_location?(n="moove_gdpr_geo_cache",null!==(e=(()=>{for(var e=encodeURIComponent(n)+"=",o=document.cookie.split(";"),r=0;r<o.length;r++){for(var t=o[r];" "===t.charAt(0);)t=t.substring(1,t.length);if(0===t.indexOf(e))try{return JSON.parse(decodeURIComponent(t.substring(e.length,t.length)))}catch(e){return null}}return null})())?(void 0!==e.display_cookie_banner&&(moove_frontend_gdpr_scripts.display_cookie_banner=e.display_cookie_banner),void 0!==e.enabled_default&&(moove_frontend_gdpr_scripts.enabled_default=e.enabled_default),o||(o=!0,r.fire("common"))):jQuery.post(moove_frontend_gdpr_scripts.ajaxurl,{action:"moove_gdpr_localize_scripts"},function(e){var e="string"==typeof e?JSON.parse(e):e;void 0!==e.display_cookie_banner&&(moove_frontend_gdpr_scripts.display_cookie_banner=e.display_cookie_banner),void 0!==e.enabled_default&&(moove_frontend_gdpr_scripts.enabled_default=e.enabled_default),e=e,document.cookie=encodeURIComponent(n)+"="+encodeURIComponent(JSON.stringify(e))+"; path=/; SameSite=Lax",o||(o=!0,r.fire("common"))})):(moove_frontend_gdpr_scripts.script_delay,0<(e=0<=parseInt(moove_frontend_gdpr_scripts.script_delay)?parseInt(moove_frontend_gdpr_scripts.script_delay):0)?setTimeout(function(){r.fire("common")},e):r.fire("common"))),M.each(document.body.className.replace(/-/g,"_").split(/\s+/),function(e,o){r.fire(o),r.fire(o,"finalize")}),r.fire("common","finalize")}};M(document).ready(r.loadEvents)})(jQuery);