Current Path : /storage/v11800/affypharma/public_html/wp-content/plugins/cool-timeline/admin/codestar-framework/assets/js/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/affypharma/public_html/wp-content/plugins/cool-timeline/admin/codestar-framework/assets/js/plugins.min.js |
/* Codestar Framework | A Simple and Lightweight WordPress Option Framework - v2.2.8*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).flatpickr=t()}(this,function(){"use strict";var ee=function(){return(ee=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function te(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i}var ne=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ie={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},oe={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(3<t&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},re=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},se=function(e){return!0===e?1:0};function ae(t,n){var i;return function(){var e=this;clearTimeout(i),i=setTimeout(function(){return t.apply(e,arguments)},n)}}var le=function(e){return e instanceof Array?e:[e]};function ce(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function ue(e,t,n){var i=window.document.createElement(e);return t=t||"",n=n||"",i.className=t,void 0!==n&&(i.textContent=n),i}function he(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function de(e,t){var n=ue("div","numInputWrapper"),i=ue("input","numInput "+e),o=ue("span","arrowUp"),r=ue("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?i.type="number":(i.type="text",i.pattern="\\d*"),void 0!==t)for(var s in t)i.setAttribute(s,t[s]);return n.appendChild(i),n.appendChild(o),n.appendChild(r),n}function fe(t){try{return"function"!=typeof t.composedPath?t.target:t.composedPath()[0]}catch(e){return t.target}}var e=function(){},pe=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},b={D:e,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*se(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var i=parseInt(t),o=new Date(e.getFullYear(),0,2+7*(i-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:e,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:e,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},_e={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},l={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[l.w(e,t,n)]},F:function(e,t,n){return pe(l.n(e,t,n)-1,!1,t)},G:function(e,t,n){return re(l.h(e,t,n))},H:function(e){return re(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[se(11<e.getHours())]},M:function(e,t){return pe(e.getMonth(),!0,t)},S:function(e){return re(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return re(e.getFullYear(),4)},d:function(e){return re(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return re(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return re(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},me=function(e){var t=e.config,r=void 0===t?ie:t,n=e.l10n,s=void 0===n?oe:n,i=e.isMobile,a=void 0!==i&&i;return function(i,e,t){var o=t||s;return void 0===r.formatDate||a?e.split("").map(function(e,t,n){return l[e]&&"\\"!==n[t-1]?l[e](i,o,r):"\\"!==e?e:""}).join(""):r.formatDate(i,e,o)}},ge=function(e){var t=e.config,v=void 0===t?ie:t,n=e.l10n,y=void 0===n?oe:n;return function(e,t,n,i){if(0===e||e){var o,r=i||y,s=e;if(e instanceof Date)o=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)o=new Date(e);else if("string"==typeof e){var a=t||(v||ie).dateFormat,l=String(e).trim();if("today"===l)o=new Date,n=!0;else if(/Z$/.test(l)||/GMT$/.test(l))o=new Date(e);else if(v&&v.parseDate)o=v.parseDate(e,a);else{o=v&&v.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var c=void 0,u=[],h=0,d=0,f="";h<a.length;h++){var p=a[h],_="\\"===p,m="\\"===a[h-1]||_;if(_e[p]&&!m){f+=_e[p];var g=new RegExp(f).exec(e);g&&(c=!0)&&u["Y"!==p?"push":"unshift"]({fn:b[p],val:g[++d]})}else _||(f+=".");u.forEach(function(e){var t=e.fn,n=e.val;return o=t(o,n,r)||o})}o=c?o:void 0}}if(o instanceof Date&&!isNaN(o.getTime()))return!0===n&&o.setHours(0,0,0,0),o;v.errorHandler(new Error("Invalid date provided: "+s))}}};function ve(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var ye=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},be={DAY:864e5};function we(e){var t=e.defaultHour,n=e.defaultMinute,i=e.defaultSeconds;if(void 0!==e.minDate){var o=e.minDate.getHours(),r=e.minDate.getMinutes(),s=e.minDate.getSeconds();t<o&&(t=o),t===o&&n<r&&(n=r),t===o&&n===r&&i<s&&(i=e.minDate.getSeconds())}if(void 0!==e.maxDate){var a=e.maxDate.getHours(),l=e.maxDate.getMinutes();(t=Math.min(t,a))===a&&(n=Math.min(l,n)),t===a&&n===l&&(i=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:i}}"function"!=typeof Object.assign&&(Object.assign=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var i=function(t){t&&Object.keys(t).forEach(function(e){return n[e]=t[e]})},o=0,r=e;o<r.length;o++){i(r[o])}return n});var De=300;function s(d,u){var D={config:ee(ee({},ie),Ce.defaultConfig),l10n:oe};function h(e){return e.bind(D)}function t(){var t=D.config;!1===t.weekNumbers&&1===t.showMonths||!0!==t.noCalendar&&window.requestAnimationFrame(function(){if(void 0!==D.calendarContainer&&(D.calendarContainer.style.visibility="hidden",D.calendarContainer.style.display="block"),void 0!==D.daysContainer){var e=(D.days.offsetWidth+1)*t.showMonths;D.daysContainer.style.width=e+"px",D.calendarContainer.style.width=e+(void 0!==D.weekWrapper?D.weekWrapper.offsetWidth:0)+"px",D.calendarContainer.style.removeProperty("visibility"),D.calendarContainer.style.removeProperty("display")}})}function f(e){if(0===D.selectedDates.length){var t=void 0===D.config.minDate||0<=ve(new Date,D.config.minDate)?new Date:new Date(D.config.minDate.getTime()),n=we(D.config);t.setHours(n.hours,n.minutes,n.seconds,t.getMilliseconds()),D.selectedDates=[t],D.latestSelectedDateObj=t}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,n=fe(e),i=n;void 0!==D.amPM&&n===D.amPM&&(D.amPM.textContent=D.l10n.amPM[se(D.amPM.textContent===D.l10n.amPM[0])]);var o=parseFloat(i.getAttribute("min")),r=parseFloat(i.getAttribute("max")),s=parseFloat(i.getAttribute("step")),a=parseInt(i.value,10),l=e.delta||(t?38===e.which?1:-1:0),c=a+s*l;if(void 0!==i.value&&2===i.value.length){var u=i===D.hourElement,h=i===D.minuteElement;c<o?(c=r+c+se(!u)+(se(u)&&se(!D.amPM)),h&&_(void 0,-1,D.hourElement)):r<c&&(c=i===D.hourElement?c-r-se(!D.amPM):o,h&&_(void 0,1,D.hourElement)),D.amPM&&u&&(1===s?c+a===23:Math.abs(c-a)>s)&&(D.amPM.textContent=D.l10n.amPM[se(D.amPM.textContent===D.l10n.amPM[0])]),i.value=re(c)}}(e);var i=D._input.value;p(),X(),D._input.value!==i&&D._debouncedChange()}function p(){if(void 0!==D.hourElement&&void 0!==D.minuteElement){var e,t,n=(parseInt(D.hourElement.value.slice(-2),10)||0)%24,i=(parseInt(D.minuteElement.value,10)||0)%60,o=void 0!==D.secondElement?(parseInt(D.secondElement.value,10)||0)%60:0;void 0!==D.amPM&&(e=n,t=D.amPM.textContent,n=e%12+12*se(t===D.l10n.amPM[1]));var r=void 0!==D.config.minTime||D.config.minDate&&D.minDateHasTime&&D.latestSelectedDateObj&&0===ve(D.latestSelectedDateObj,D.config.minDate,!0);if(void 0!==D.config.maxTime||D.config.maxDate&&D.maxDateHasTime&&D.latestSelectedDateObj&&0===ve(D.latestSelectedDateObj,D.config.maxDate,!0)){var s=void 0!==D.config.maxTime?D.config.maxTime:D.config.maxDate;(n=Math.min(n,s.getHours()))===s.getHours()&&(i=Math.min(i,s.getMinutes())),i===s.getMinutes()&&(o=Math.min(o,s.getSeconds()))}if(r){var a=void 0!==D.config.minTime?D.config.minTime:D.config.minDate;(n=Math.max(n,a.getHours()))===a.getHours()&&i<a.getMinutes()&&(i=a.getMinutes()),i===a.getMinutes()&&(o=Math.max(o,a.getSeconds()))}l(n,i,o)}}function o(e){var t=e||D.latestSelectedDateObj;t&&l(t.getHours(),t.getMinutes(),t.getSeconds())}function l(e,t,n){void 0!==D.latestSelectedDateObj&&D.latestSelectedDateObj.setHours(e%24,t,n||0,0),D.hourElement&&D.minuteElement&&!D.isMobile&&(D.hourElement.value=re(D.config.time_24hr?e:(12+e)%12+12*se(e%12==0)),D.minuteElement.value=re(t),void 0!==D.amPM&&(D.amPM.textContent=D.l10n.amPM[se(12<=e)]),void 0!==D.secondElement&&(D.secondElement.value=re(n)))}function n(e){var t=fe(e),n=parseInt(t.value)+(e.delta||0);(1<n/1e3||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&S(n)}function s(t,n,i,o){return n instanceof Array?n.forEach(function(e){return s(t,e,i,o)}):t instanceof Array?t.forEach(function(e){return s(e,n,i,o)}):(t.addEventListener(n,i,o),void D._handlers.push({remove:function(){return t.removeEventListener(n,i)}}))}function c(){K("onChange")}function i(e,t){var n=void 0!==e?D.parseDate(e):D.latestSelectedDateObj||(D.config.minDate&&D.config.minDate>D.now?D.config.minDate:D.config.maxDate&&D.config.maxDate<D.now?D.config.maxDate:D.now),i=D.currentYear,o=D.currentMonth;try{void 0!==n&&(D.currentYear=n.getFullYear(),D.currentMonth=n.getMonth())}catch(e){e.message="Invalid date supplied: "+n,D.config.errorHandler(e)}t&&D.currentYear!==i&&(K("onYearChange"),w()),!t||D.currentYear===i&&D.currentMonth===o||K("onMonthChange"),D.redraw()}function r(e){var t=fe(e);~t.className.indexOf("arrow")&&_(e,t.classList.contains("arrowUp")?1:-1)}function _(e,t,n){var i=e&&fe(e),o=n||i&&i.parentNode&&i.parentNode.firstChild,r=$("increment");r.delta=t,o&&o.dispatchEvent(r)}function m(e,t,n,i){var o,r=A(t,!0),s=ue("span","flatpickr-day "+e,t.getDate().toString());return s.dateObj=t,s.$i=i,s.setAttribute("aria-label",D.formatDate(t,D.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===ve(t,D.now)&&((D.todayDateElem=s).classList.add("today"),s.setAttribute("aria-current","date")),r?(s.tabIndex=-1,Q(t)&&(s.classList.add("selected"),D.selectedDateElem=s,"range"===D.config.mode&&(ce(s,"startRange",D.selectedDates[0]&&0===ve(t,D.selectedDates[0],!0)),ce(s,"endRange",D.selectedDates[1]&&0===ve(t,D.selectedDates[1],!0)),"nextMonthDay"===e&&s.classList.add("inRange")))):s.classList.add("flatpickr-disabled"),"range"===D.config.mode&&(o=t,!("range"!==D.config.mode||D.selectedDates.length<2)&&0<=ve(o,D.selectedDates[0])&&ve(o,D.selectedDates[1])<=0&&!Q(t)&&s.classList.add("inRange")),D.weekNumbers&&1===D.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&D.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+D.config.getWeek(t)+"</span>"),K("onDayCreate",s),s}function g(e){e.focus(),"range"===D.config.mode&&F(e)}function v(e){for(var t=0<e?0:D.config.showMonths-1,n=0<e?D.config.showMonths:-1,i=t;i!=n;i+=e)for(var o=D.daysContainer.children[i],r=0<e?0:o.children.length-1,s=0<e?o.children.length:-1,a=r;a!=s;a+=e){var l=o.children[a];if(-1===l.className.indexOf("hidden")&&A(l.dateObj))return l}}function y(e,t){var n=I(document.activeElement||document.body),i=void 0!==e?e:n?document.activeElement:void 0!==D.selectedDateElem&&I(D.selectedDateElem)?D.selectedDateElem:void 0!==D.todayDateElem&&I(D.todayDateElem)?D.todayDateElem:v(0<t?1:-1);void 0===i?D._input.focus():n?function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():D.currentMonth,i=0<t?D.config.showMonths:-1,o=0<t?1:-1,r=n-D.currentMonth;r!=i;r+=o)for(var s=D.daysContainer.children[r],a=n-D.currentMonth===r?e.$i+t:t<0?s.children.length-1:0,l=s.children.length,c=a;0<=c&&c<l&&c!=(0<t?l:-1);c+=o){var u=s.children[c];if(-1===u.className.indexOf("hidden")&&A(u.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return g(u)}D.changeMonth(o),y(v(o),0)}(i,t):g(i)}function a(e,t){for(var n=(new Date(e,t,1).getDay()-D.l10n.firstDayOfWeek+7)%7,i=D.utils.getDaysInMonth((t-1+12)%12,e),o=D.utils.getDaysInMonth(t,e),r=window.document.createDocumentFragment(),s=1<D.config.showMonths,a=s?"prevMonthDay hidden":"prevMonthDay",l=s?"nextMonthDay hidden":"nextMonthDay",c=i+1-n,u=0;c<=i;c++,u++)r.appendChild(m(a,new Date(e,t-1,c),c,u));for(c=1;c<=o;c++,u++)r.appendChild(m("",new Date(e,t,c),c,u));for(var h=o+1;h<=42-n&&(1===D.config.showMonths||u%7!=0);h++,u++)r.appendChild(m(l,new Date(e,t+1,h%o),h,u));var d=ue("div","dayContainer");return d.appendChild(r),d}function b(){if(void 0!==D.daysContainer){he(D.daysContainer),D.weekNumbers&&he(D.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<D.config.showMonths;t++){var n=new Date(D.currentYear,D.currentMonth,1);n.setMonth(D.currentMonth+t),e.appendChild(a(n.getFullYear(),n.getMonth()))}D.daysContainer.appendChild(e),D.days=D.daysContainer.firstChild,"range"===D.config.mode&&1===D.selectedDates.length&&F()}}function w(){if(!(1<D.config.showMonths||"dropdown"!==D.config.monthSelectorType)){var e;D.monthsDropdownContainer.tabIndex=-1,D.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e=t,!(void 0!==D.config.minDate&&D.currentYear===D.config.minDate.getFullYear()&&e<D.config.minDate.getMonth()||void 0!==D.config.maxDate&&D.currentYear===D.config.maxDate.getFullYear()&&e>D.config.maxDate.getMonth())){var n=ue("option","flatpickr-monthDropdown-month");n.value=new Date(D.currentYear,t).getMonth().toString(),n.textContent=pe(t,D.config.shorthandCurrentMonth,D.l10n),n.tabIndex=-1,D.currentMonth===t&&(n.selected=!0),D.monthsDropdownContainer.appendChild(n)}}}function C(){var e,t=ue("div","flatpickr-month"),n=window.document.createDocumentFragment();e=1<D.config.showMonths||"static"===D.config.monthSelectorType?ue("span","cur-month"):(D.monthsDropdownContainer=ue("select","flatpickr-monthDropdown-months"),D.monthsDropdownContainer.setAttribute("aria-label",D.l10n.monthAriaLabel),s(D.monthsDropdownContainer,"change",function(e){var t=fe(e),n=parseInt(t.value,10);D.changeMonth(n-D.currentMonth),K("onMonthChange")}),w(),D.monthsDropdownContainer);var i=de("cur-year",{tabindex:"-1"}),o=i.getElementsByTagName("input")[0];o.setAttribute("aria-label",D.l10n.yearAriaLabel),D.config.minDate&&o.setAttribute("min",D.config.minDate.getFullYear().toString()),D.config.maxDate&&(o.setAttribute("max",D.config.maxDate.getFullYear().toString()),o.disabled=!!D.config.minDate&&D.config.minDate.getFullYear()===D.config.maxDate.getFullYear());var r=ue("div","flatpickr-current-month");return r.appendChild(e),r.appendChild(i),n.appendChild(r),t.appendChild(n),{container:t,yearElement:o,monthElement:e}}function x(){he(D.monthNav),D.monthNav.appendChild(D.prevMonthNav),D.config.showMonths&&(D.yearElements=[],D.monthElements=[]);for(var e=D.config.showMonths;e--;){var t=C();D.yearElements.push(t.yearElement),D.monthElements.push(t.monthElement),D.monthNav.appendChild(t.container)}D.monthNav.appendChild(D.nextMonthNav)}function M(){D.weekdayContainer?he(D.weekdayContainer):D.weekdayContainer=ue("div","flatpickr-weekdays");for(var e=D.config.showMonths;e--;){var t=ue("div","flatpickr-weekdaycontainer");D.weekdayContainer.appendChild(t)}return k(),D.weekdayContainer}function k(){if(D.weekdayContainer){var e=D.l10n.firstDayOfWeek,t=te(D.l10n.weekdays.shorthand);0<e&&e<t.length&&(t=te(t.splice(e,t.length),t.splice(0,e)));for(var n=D.config.showMonths;n--;)D.weekdayContainer.children[n].innerHTML="\n <span class='flatpickr-weekday'>\n "+t.join("</span><span class='flatpickr-weekday'>")+"\n </span>\n "}}function E(e,t){void 0===t&&(t=!0);var n=t?e:e-D.currentMonth;n<0&&!0===D._hidePrevMonthArrow||0<n&&!0===D._hideNextMonthArrow||(D.currentMonth+=n,(D.currentMonth<0||11<D.currentMonth)&&(D.currentYear+=11<D.currentMonth?1:-1,D.currentMonth=(D.currentMonth+12)%12,K("onYearChange"),w()),b(),K("onMonthChange"),V())}function T(e){return!(!D.config.appendTo||!D.config.appendTo.contains(e))||D.calendarContainer.contains(e)}function O(e){if(D.isOpen&&!D.config.inline){var t=fe(e),n=T(t),i=t===D.input||t===D.altInput||D.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(D.input)||~e.path.indexOf(D.altInput)),o="blur"===e.type?i&&e.relatedTarget&&!T(e.relatedTarget):!i&&!n&&!T(e.relatedTarget),r=!D.config.ignoredFocusElements.some(function(e){return e.contains(t)});o&&r&&(void 0!==D.timeContainer&&void 0!==D.minuteElement&&void 0!==D.hourElement&&""!==D.input.value&&void 0!==D.input.value&&f(),D.close(),D.config&&"range"===D.config.mode&&1===D.selectedDates.length&&(D.clear(!1),D.redraw()))}}function S(e){if(!(!e||D.config.minDate&&e<D.config.minDate.getFullYear()||D.config.maxDate&&e>D.config.maxDate.getFullYear())){var t=e,n=D.currentYear!==t;D.currentYear=t||D.currentYear,D.config.maxDate&&D.currentYear===D.config.maxDate.getFullYear()?D.currentMonth=Math.min(D.config.maxDate.getMonth(),D.currentMonth):D.config.minDate&&D.currentYear===D.config.minDate.getFullYear()&&(D.currentMonth=Math.max(D.config.minDate.getMonth(),D.currentMonth)),n&&(D.redraw(),K("onYearChange"),w())}}function A(e,t){var n;void 0===t&&(t=!0);var i=D.parseDate(e,void 0,t);if(D.config.minDate&&i&&ve(i,D.config.minDate,void 0!==t?t:!D.minDateHasTime)<0||D.config.maxDate&&i&&0<ve(i,D.config.maxDate,void 0!==t?t:!D.maxDateHasTime))return!1;if(!D.config.enable&&0===D.config.disable.length)return!0;if(void 0===i)return!1;for(var o=!!D.config.enable,r=null!==(n=D.config.enable)&&void 0!==n?n:D.config.disable,s=0,a=void 0;s<r.length;s++){if("function"==typeof(a=r[s])&&a(i))return o;if(a instanceof Date&&void 0!==i&&a.getTime()===i.getTime())return o;if("string"==typeof a){var l=D.parseDate(a,void 0,!0);return l&&l.getTime()===i.getTime()?o:!o}if("object"==typeof a&&void 0!==i&&a.from&&a.to&&i.getTime()>=a.from.getTime()&&i.getTime()<=a.to.getTime())return o}return!o}function I(e){return void 0!==D.daysContainer&&(-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&D.daysContainer.contains(e))}function N(e){!(e.target===D._input)||!(0<D.selectedDates.length||0<D._input.value.length)||e.relatedTarget&&T(e.relatedTarget)||D.setDate(D._input.value,!0,e.target===D.altInput?D.config.altFormat:D.config.dateFormat)}function j(e){var t=fe(e),n=D.config.wrap?d.contains(t):t===D._input,i=D.config.allowInput,o=D.isOpen&&(!i||!n),r=D.config.inline&&n&&!i;if(13===e.keyCode&&n){if(i)return D.setDate(D._input.value,!0,t===D.altInput?D.config.altFormat:D.config.dateFormat),t.blur();D.open()}else if(T(t)||o||r){var s=!!D.timeContainer&&D.timeContainer.contains(t);switch(e.keyCode){case 13:s?(e.preventDefault(),f(),W()):B(e);break;case 27:e.preventDefault(),W();break;case 8:case 46:n&&!D.config.allowInput&&(e.preventDefault(),D.clear());break;case 37:case 39:if(s||n)D.hourElement&&D.hourElement.focus();else if(e.preventDefault(),void 0!==D.daysContainer&&(!1===i||document.activeElement&&I(document.activeElement))){var a=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),E(a),y(v(1),0)):y(void 0,a)}break;case 38:case 40:e.preventDefault();var l=40===e.keyCode?1:-1;D.daysContainer&&void 0!==t.$i||t===D.input||t===D.altInput?e.ctrlKey?(e.stopPropagation(),S(D.currentYear-l),y(v(1),0)):s||y(void 0,7*l):t===D.currentYearElement?S(D.currentYear-l):D.config.enableTime&&(!s&&D.hourElement&&D.hourElement.focus(),f(e),D._debouncedChange());break;case 9:if(s){var c=[D.hourElement,D.minuteElement,D.secondElement,D.amPM].concat(D.pluginElements).filter(function(e){return e}),u=c.indexOf(t);if(-1!==u){var h=c[u+(e.shiftKey?-1:1)];e.preventDefault(),(h||D._input).focus()}}else!D.config.noCalendar&&D.daysContainer&&D.daysContainer.contains(t)&&e.shiftKey&&(e.preventDefault(),D._input.focus())}}if(void 0!==D.amPM&&t===D.amPM)switch(e.key){case D.l10n.amPM[0].charAt(0):case D.l10n.amPM[0].charAt(0).toLowerCase():D.amPM.textContent=D.l10n.amPM[0],p(),X();break;case D.l10n.amPM[1].charAt(0):case D.l10n.amPM[1].charAt(0).toLowerCase():D.amPM.textContent=D.l10n.amPM[1],p(),X()}(n||T(t))&&K("onKeyDown",e)}function F(r){if(1===D.selectedDates.length&&(!r||r.classList.contains("flatpickr-day")&&!r.classList.contains("flatpickr-disabled"))){for(var s=r?r.dateObj.getTime():D.days.firstElementChild.dateObj.getTime(),a=D.parseDate(D.selectedDates[0],void 0,!0).getTime(),e=Math.min(s,D.selectedDates[0].getTime()),t=Math.max(s,D.selectedDates[0].getTime()),l=!1,c=0,u=0,n=e;n<t;n+=be.DAY)A(new Date(n),!0)||(l=l||e<n&&n<t,n<a&&(!c||c<n)?c=n:a<n&&(!u||n<u)&&(u=n));for(var i=0;i<D.config.showMonths;i++)for(var h=D.daysContainer.children[i],o=function(e,t){var n=h.children[e],i=n.dateObj.getTime(),o=0<c&&i<c||0<u&&u<i;return o?(n.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){n.classList.remove(e)}),"continue"):l&&!o?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){n.classList.remove(e)}),void(void 0!==r&&(r.classList.add(s<=D.selectedDates[0].getTime()?"startRange":"endRange"),a<s&&i===a?n.classList.add("startRange"):s<a&&i===a&&n.classList.add("endRange"),c<=i&&(0===u||i<=u)&&ye(i,a,s)&&n.classList.add("inRange"))))},d=0,f=h.children.length;d<f;d++)o(d)}}function P(){!D.isOpen||D.config.static||D.config.inline||R()}function Y(i){return function(e){var t=D.config["_"+i+"Date"]=D.parseDate(e,D.config.dateFormat),n=D.config["_"+("min"===i?"max":"min")+"Date"];void 0!==t&&(D["min"===i?"minDateHasTime":"maxDateHasTime"]=0<t.getHours()||0<t.getMinutes()||0<t.getSeconds()),D.selectedDates&&(D.selectedDates=D.selectedDates.filter(function(e){return A(e)}),D.selectedDates.length||"min"!==i||o(t),X()),D.daysContainer&&(q(),void 0!==t?D.currentYearElement[i]=t.getFullYear().toString():D.currentYearElement.removeAttribute(i),D.currentYearElement.disabled=!!n&&void 0!==t&&n.getFullYear()===t.getFullYear())}}function H(){return D.config.wrap?d.querySelector("[data-input]"):d}function L(){"object"!=typeof D.config.locale&&void 0===Ce.l10ns[D.config.locale]&&D.config.errorHandler(new Error("flatpickr: invalid locale "+D.config.locale)),D.l10n=ee(ee({},Ce.l10ns.default),"object"==typeof D.config.locale?D.config.locale:"default"!==D.config.locale?Ce.l10ns[D.config.locale]:void 0),_e.K="("+D.l10n.amPM[0]+"|"+D.l10n.amPM[1]+"|"+D.l10n.amPM[0].toLowerCase()+"|"+D.l10n.amPM[1].toLowerCase()+")",void 0===ee(ee({},u),JSON.parse(JSON.stringify(d.dataset||{}))).time_24hr&&void 0===Ce.defaultConfig.time_24hr&&(D.config.time_24hr=D.l10n.time_24hr),D.formatDate=me(D),D.parseDate=ge({config:D.config,l10n:D.l10n})}function R(e){if("function"!=typeof D.config.position){if(void 0!==D.calendarContainer){K("onPreCalendarPosition");var t=e||D._positionElement,n=Array.prototype.reduce.call(D.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),i=D.calendarContainer.offsetWidth,o=D.config.position.split(" "),r=o[0],s=1<o.length?o[1]:null,a=t.getBoundingClientRect(),l=window.innerHeight-a.bottom,c="above"===r||"below"!==r&&l<n&&a.top>n,u=window.pageYOffset+a.top+(c?-n-2:t.offsetHeight+2);if(ce(D.calendarContainer,"arrowTop",!c),ce(D.calendarContainer,"arrowBottom",c),!D.config.inline){var h=window.pageXOffset+a.left,d=!1,f=!1;"center"===s?(h-=(i-a.width)/2,d=!0):"right"===s&&(h-=i-a.width,f=!0),ce(D.calendarContainer,"arrowLeft",!d&&!f),ce(D.calendarContainer,"arrowCenter",d),ce(D.calendarContainer,"arrowRight",f);var p=window.document.body.offsetWidth-(window.pageXOffset+a.right),_=h+i>window.document.body.offsetWidth,m=p+i>window.document.body.offsetWidth;if(ce(D.calendarContainer,"rightMost",_),!D.config.static)if(D.calendarContainer.style.top=u+"px",_)if(m){var g=function(){for(var e=null,t=0;t<document.styleSheets.length;t++){var n=document.styleSheets[t];try{n.cssRules}catch(e){continue}e=n;break}return null!=e?e:(i=document.createElement("style"),document.head.appendChild(i),i.sheet);var i}();if(void 0===g)return;var v=window.document.body.offsetWidth,y=Math.max(0,v/2-i/2),b=g.cssRules.length,w="{left:"+a.left+"px;right:auto;}";ce(D.calendarContainer,"rightMost",!1),ce(D.calendarContainer,"centerMost",!0),g.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+w,b),D.calendarContainer.style.left=y+"px",D.calendarContainer.style.right="auto"}else D.calendarContainer.style.left="auto",D.calendarContainer.style.right=p+"px";else D.calendarContainer.style.left=h+"px",D.calendarContainer.style.right="auto"}}}else D.config.position(D,e)}function q(){D.config.noCalendar||D.isMobile||(w(),V(),b())}function W(){D._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(D.close,0):D.close()}function B(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(fe(e),function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,i=D.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(i.getMonth()<D.currentMonth||i.getMonth()>D.currentMonth+D.config.showMonths-1)&&"range"!==D.config.mode;if(D.selectedDateElem=n,"single"===D.config.mode)D.selectedDates=[i];else if("multiple"===D.config.mode){var r=Q(i);r?D.selectedDates.splice(parseInt(r),1):D.selectedDates.push(i)}else"range"===D.config.mode&&(2===D.selectedDates.length&&D.clear(!1,!1),D.latestSelectedDateObj=i,D.selectedDates.push(i),0!==ve(i,D.selectedDates[0],!0)&&D.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(p(),o){var s=D.currentYear!==i.getFullYear();D.currentYear=i.getFullYear(),D.currentMonth=i.getMonth(),s&&(K("onYearChange"),w()),K("onMonthChange")}if(V(),b(),X(),o||"range"===D.config.mode||1!==D.config.showMonths?void 0!==D.selectedDateElem&&void 0===D.hourElement&&D.selectedDateElem&&D.selectedDateElem.focus():g(n),void 0!==D.hourElement&&void 0!==D.hourElement&&D.hourElement.focus(),D.config.closeOnSelect){var a="single"===D.config.mode&&!D.config.enableTime,l="range"===D.config.mode&&2===D.selectedDates.length&&!D.config.enableTime;(a||l)&&W()}c()}}D.parseDate=ge({config:D.config,l10n:D.l10n}),D._handlers=[],D.pluginElements=[],D.loadedPlugins=[],D._bind=s,D._setHoursFromDate=o,D._positionCalendar=R,D.changeMonth=E,D.changeYear=S,D.clear=function(e,t){void 0===e&&(e=!0);void 0===t&&(t=!0);D.input.value="",void 0!==D.altInput&&(D.altInput.value="");void 0!==D.mobileInput&&(D.mobileInput.value="");D.selectedDates=[],!(D.latestSelectedDateObj=void 0)===t&&(D.currentYear=D._initialDate.getFullYear(),D.currentMonth=D._initialDate.getMonth());if(!0===D.config.enableTime){var n=we(D.config),i=n.hours,o=n.minutes,r=n.seconds;l(i,o,r)}D.redraw(),e&&K("onChange")},D.close=function(){D.isOpen=!1,D.isMobile||(void 0!==D.calendarContainer&&D.calendarContainer.classList.remove("open"),void 0!==D._input&&D._input.classList.remove("active"));K("onClose")},D._createElement=ue,D.destroy=function(){void 0!==D.config&&K("onDestroy");for(var e=D._handlers.length;e--;)D._handlers[e].remove();if(D._handlers=[],D.mobileInput)D.mobileInput.parentNode&&D.mobileInput.parentNode.removeChild(D.mobileInput),D.mobileInput=void 0;else if(D.calendarContainer&&D.calendarContainer.parentNode)if(D.config.static&&D.calendarContainer.parentNode){var t=D.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else D.calendarContainer.parentNode.removeChild(D.calendarContainer);D.altInput&&(D.input.type="text",D.altInput.parentNode&&D.altInput.parentNode.removeChild(D.altInput),delete D.altInput);D.input&&(D.input.type=D.input._type,D.input.classList.remove("flatpickr-input"),D.input.removeAttribute("readonly"));["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete D[e]}catch(e){}})},D.isEnabled=A,D.jumpToDate=i,D.open=function(e,t){void 0===t&&(t=D._positionElement);{if(!0===D.isMobile){if(e){e.preventDefault();var n=fe(e);n&&n.blur()}return void 0!==D.mobileInput&&(D.mobileInput.focus(),D.mobileInput.click()),void K("onOpen")}if(D._input.disabled||D.config.inline)return}var i=D.isOpen;D.isOpen=!0,i||(D.calendarContainer.classList.add("open"),D._input.classList.add("active"),K("onOpen"),R(t));!0===D.config.enableTime&&!0===D.config.noCalendar&&(!1!==D.config.allowInput||void 0!==e&&D.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return D.hourElement.select()},50))},D.redraw=q,D.set=function(e,t){if(null!==e&&"object"==typeof e)for(var n in Object.assign(D.config,e),e)void 0!==z[n]&&z[n].forEach(function(e){return e()});else D.config[e]=t,void 0!==z[e]?z[e].forEach(function(e){return e()}):-1<ne.indexOf(e)&&(D.config[e]=le(t));D.redraw(),X(!0)},D.setDate=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=D.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return D.clear(t);U(e,n),D.latestSelectedDateObj=D.selectedDates[D.selectedDates.length-1],D.redraw(),i(void 0,t),o(),0===D.selectedDates.length&&D.clear(!1);X(t),t&&K("onChange")},D.toggle=function(e){if(!0===D.isOpen)return D.close();D.open(e)};var z={locale:[L,k],showMonths:[x,t,M],minDate:[i],maxDate:[i],clickOpens:[function(){!0===D.config.clickOpens?(s(D._input,"focus",D.open),s(D._input,"click",D.open)):(D._input.removeEventListener("focus",D.open),D._input.removeEventListener("click",D.open))}]};function U(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return D.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[D.parseDate(e,t)];else if("string"==typeof e)switch(D.config.mode){case"single":case"time":n=[D.parseDate(e,t)];break;case"multiple":n=e.split(D.config.conjunction).map(function(e){return D.parseDate(e,t)});break;case"range":n=e.split(D.l10n.rangeSeparator).map(function(e){return D.parseDate(e,t)})}else D.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));D.selectedDates=D.config.allowInvalidPreload?n:n.filter(function(e){return e instanceof Date&&A(e,!1)}),"range"===D.config.mode&&D.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function J(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?D.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:D.parseDate(e.from,void 0),to:D.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function K(e,t){if(void 0!==D.config){var n=D.config[e];if(void 0!==n&&0<n.length)for(var i=0;n[i]&&i<n.length;i++)n[i](D.selectedDates,D.input.value,D,t);"onChange"===e&&(D.input.dispatchEvent($("change")),D.input.dispatchEvent($("input")))}}function $(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function Q(e){for(var t=0;t<D.selectedDates.length;t++)if(0===ve(D.selectedDates[t],e))return""+t;return!1}function V(){D.config.noCalendar||D.isMobile||!D.monthNav||(D.yearElements.forEach(function(e,t){var n=new Date(D.currentYear,D.currentMonth,1);n.setMonth(D.currentMonth+t),1<D.config.showMonths||"static"===D.config.monthSelectorType?D.monthElements[t].textContent=pe(n.getMonth(),D.config.shorthandCurrentMonth,D.l10n)+" ":D.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()}),D._hidePrevMonthArrow=void 0!==D.config.minDate&&(D.currentYear===D.config.minDate.getFullYear()?D.currentMonth<=D.config.minDate.getMonth():D.currentYear<D.config.minDate.getFullYear()),D._hideNextMonthArrow=void 0!==D.config.maxDate&&(D.currentYear===D.config.maxDate.getFullYear()?D.currentMonth+1>D.config.maxDate.getMonth():D.currentYear>D.config.maxDate.getFullYear()))}function G(t){return D.selectedDates.map(function(e){return D.formatDate(e,t)}).filter(function(e,t,n){return"range"!==D.config.mode||D.config.enableTime||n.indexOf(e)===t}).join("range"!==D.config.mode?D.config.conjunction:D.l10n.rangeSeparator)}function X(e){void 0===e&&(e=!0),void 0!==D.mobileInput&&D.mobileFormatStr&&(D.mobileInput.value=void 0!==D.latestSelectedDateObj?D.formatDate(D.latestSelectedDateObj,D.mobileFormatStr):""),D.input.value=G(D.config.dateFormat),void 0!==D.altInput&&(D.altInput.value=G(D.config.altFormat)),!1!==e&&K("onValueUpdate")}function Z(e){var t=fe(e),n=D.prevMonthNav.contains(t),i=D.nextMonthNav.contains(t);n||i?E(n?-1:1):0<=D.yearElements.indexOf(t)?t.select():t.classList.contains("arrowUp")?D.changeYear(D.currentYear+1):t.classList.contains("arrowDown")&&D.changeYear(D.currentYear-1)}return function(){D.element=D.input=d,D.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=ee(ee({},JSON.parse(JSON.stringify(d.dataset||{}))),u),n={};D.config.parseDate=t.parseDate,D.config.formatDate=t.formatDate,Object.defineProperty(D.config,"enable",{get:function(){return D.config._enable},set:function(e){D.config._enable=J(e)}}),Object.defineProperty(D.config,"disable",{get:function(){return D.config._disable},set:function(e){D.config._disable=J(e)}});var i="time"===t.mode;if(!t.dateFormat&&(t.enableTime||i)){var o=Ce.defaultConfig.dateFormat||ie.dateFormat;n.dateFormat=t.noCalendar||i?"H:i"+(t.enableSeconds?":S":""):o+" H:i"+(t.enableSeconds?":S":"")}if(t.altInput&&(t.enableTime||i)&&!t.altFormat){var r=Ce.defaultConfig.altFormat||ie.altFormat;n.altFormat=t.noCalendar||i?"h:i"+(t.enableSeconds?":S K":" K"):r+" h:i"+(t.enableSeconds?":S":"")+" K"}Object.defineProperty(D.config,"minDate",{get:function(){return D.config._minDate},set:Y("min")}),Object.defineProperty(D.config,"maxDate",{get:function(){return D.config._maxDate},set:Y("max")});var s=function(t){return function(e){D.config["min"===t?"_minTime":"_maxTime"]=D.parseDate(e,"H:i:S")}};Object.defineProperty(D.config,"minTime",{get:function(){return D.config._minTime},set:s("min")}),Object.defineProperty(D.config,"maxTime",{get:function(){return D.config._maxTime},set:s("max")}),"time"===t.mode&&(D.config.noCalendar=!0,D.config.enableTime=!0),Object.assign(D.config,n,t);for(var a=0;a<e.length;a++)D.config[e[a]]=!0===D.config[e[a]]||"true"===D.config[e[a]];ne.filter(function(e){return void 0!==D.config[e]}).forEach(function(e){D.config[e]=le(D.config[e]||[]).map(h)}),D.isMobile=!D.config.disableMobile&&!D.config.inline&&"single"===D.config.mode&&!D.config.disable.length&&!D.config.enable&&!D.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var a=0;a<D.config.plugins.length;a++){var l=D.config.plugins[a](D)||{};for(var c in l)-1<ne.indexOf(c)?D.config[c]=le(l[c]).map(h).concat(D.config[c]):void 0===t[c]&&(D.config[c]=l[c])}t.altInputClass||(D.config.altInputClass=H().className+" "+D.config.altInputClass),K("onParseConfig")}(),L(),function(){if(D.input=H(),!D.input)return D.config.errorHandler(new Error("Invalid input element specified"));D.input._type=D.input.type,D.input.type="text",D.input.classList.add("flatpickr-input"),D._input=D.input,D.config.altInput&&(D.altInput=ue(D.input.nodeName,D.config.altInputClass),D._input=D.altInput,D.altInput.placeholder=D.input.placeholder,D.altInput.disabled=D.input.disabled,D.altInput.required=D.input.required,D.altInput.tabIndex=D.input.tabIndex,D.altInput.type="text",D.input.setAttribute("type","hidden"),!D.config.static&&D.input.parentNode&&D.input.parentNode.insertBefore(D.altInput,D.input.nextSibling)),D.config.allowInput||D._input.setAttribute("readonly","readonly"),D._positionElement=D.config.positionElement||D._input}(),function(){D.selectedDates=[],D.now=D.parseDate(D.config.now)||new Date;var e=D.config.defaultDate||("INPUT"!==D.input.nodeName&&"TEXTAREA"!==D.input.nodeName||!D.input.placeholder||D.input.value!==D.input.placeholder?D.input.value:null);e&&U(e,D.config.dateFormat),D._initialDate=0<D.selectedDates.length?D.selectedDates[0]:D.config.minDate&&D.config.minDate.getTime()>D.now.getTime()?D.config.minDate:D.config.maxDate&&D.config.maxDate.getTime()<D.now.getTime()?D.config.maxDate:D.now,D.currentYear=D._initialDate.getFullYear(),D.currentMonth=D._initialDate.getMonth(),0<D.selectedDates.length&&(D.latestSelectedDateObj=D.selectedDates[0]),void 0!==D.config.minTime&&(D.config.minTime=D.parseDate(D.config.minTime,"H:i")),void 0!==D.config.maxTime&&(D.config.maxTime=D.parseDate(D.config.maxTime,"H:i")),D.minDateHasTime=!!D.config.minDate&&(0<D.config.minDate.getHours()||0<D.config.minDate.getMinutes()||0<D.config.minDate.getSeconds()),D.maxDateHasTime=!!D.config.maxDate&&(0<D.config.maxDate.getHours()||0<D.config.maxDate.getMinutes()||0<D.config.maxDate.getSeconds())}(),D.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=D.currentMonth),void 0===t&&(t=D.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:D.l10n.daysInMonth[e]}},D.isMobile||function(){var e=window.document.createDocumentFragment();if(D.calendarContainer=ue("div","flatpickr-calendar"),D.calendarContainer.tabIndex=-1,!D.config.noCalendar){if(e.appendChild((D.monthNav=ue("div","flatpickr-months"),D.yearElements=[],D.monthElements=[],D.prevMonthNav=ue("span","flatpickr-prev-month"),D.prevMonthNav.innerHTML=D.config.prevArrow,D.nextMonthNav=ue("span","flatpickr-next-month"),D.nextMonthNav.innerHTML=D.config.nextArrow,x(),Object.defineProperty(D,"_hidePrevMonthArrow",{get:function(){return D.__hidePrevMonthArrow},set:function(e){D.__hidePrevMonthArrow!==e&&(ce(D.prevMonthNav,"flatpickr-disabled",e),D.__hidePrevMonthArrow=e)}}),Object.defineProperty(D,"_hideNextMonthArrow",{get:function(){return D.__hideNextMonthArrow},set:function(e){D.__hideNextMonthArrow!==e&&(ce(D.nextMonthNav,"flatpickr-disabled",e),D.__hideNextMonthArrow=e)}}),D.currentYearElement=D.yearElements[0],V(),D.monthNav)),D.innerContainer=ue("div","flatpickr-innerContainer"),D.config.weekNumbers){var t=function(){D.calendarContainer.classList.add("hasWeeks");var e=ue("div","flatpickr-weekwrapper");e.appendChild(ue("span","flatpickr-weekday",D.l10n.weekAbbreviation));var t=ue("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,i=t.weekNumbers;D.innerContainer.appendChild(n),D.weekNumbers=i,D.weekWrapper=n}D.rContainer=ue("div","flatpickr-rContainer"),D.rContainer.appendChild(M()),D.daysContainer||(D.daysContainer=ue("div","flatpickr-days"),D.daysContainer.tabIndex=-1),b(),D.rContainer.appendChild(D.daysContainer),D.innerContainer.appendChild(D.rContainer),e.appendChild(D.innerContainer)}D.config.enableTime&&e.appendChild(function(){D.calendarContainer.classList.add("hasTime"),D.config.noCalendar&&D.calendarContainer.classList.add("noCalendar");var e=we(D.config);D.timeContainer=ue("div","flatpickr-time"),D.timeContainer.tabIndex=-1;var t=ue("span","flatpickr-time-separator",":"),n=de("flatpickr-hour",{"aria-label":D.l10n.hourAriaLabel});D.hourElement=n.getElementsByTagName("input")[0];var i=de("flatpickr-minute",{"aria-label":D.l10n.minuteAriaLabel});if(D.minuteElement=i.getElementsByTagName("input")[0],D.hourElement.tabIndex=D.minuteElement.tabIndex=-1,D.hourElement.value=re(D.latestSelectedDateObj?D.latestSelectedDateObj.getHours():D.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),D.minuteElement.value=re(D.latestSelectedDateObj?D.latestSelectedDateObj.getMinutes():e.minutes),D.hourElement.setAttribute("step",D.config.hourIncrement.toString()),D.minuteElement.setAttribute("step",D.config.minuteIncrement.toString()),D.hourElement.setAttribute("min",D.config.time_24hr?"0":"1"),D.hourElement.setAttribute("max",D.config.time_24hr?"23":"12"),D.hourElement.setAttribute("maxlength","2"),D.minuteElement.setAttribute("min","0"),D.minuteElement.setAttribute("max","59"),D.minuteElement.setAttribute("maxlength","2"),D.timeContainer.appendChild(n),D.timeContainer.appendChild(t),D.timeContainer.appendChild(i),D.config.time_24hr&&D.timeContainer.classList.add("time24hr"),D.config.enableSeconds){D.timeContainer.classList.add("hasSeconds");var o=de("flatpickr-second");D.secondElement=o.getElementsByTagName("input")[0],D.secondElement.value=re(D.latestSelectedDateObj?D.latestSelectedDateObj.getSeconds():e.seconds),D.secondElement.setAttribute("step",D.minuteElement.getAttribute("step")),D.secondElement.setAttribute("min","0"),D.secondElement.setAttribute("max","59"),D.secondElement.setAttribute("maxlength","2"),D.timeContainer.appendChild(ue("span","flatpickr-time-separator",":")),D.timeContainer.appendChild(o)}return D.config.time_24hr||(D.amPM=ue("span","flatpickr-am-pm",D.l10n.amPM[se(11<(D.latestSelectedDateObj?D.hourElement.value:D.config.defaultHour))]),D.amPM.title=D.l10n.toggleTitle,D.amPM.tabIndex=-1,D.timeContainer.appendChild(D.amPM)),D.timeContainer}()),ce(D.calendarContainer,"rangeMode","range"===D.config.mode),ce(D.calendarContainer,"animate",!0===D.config.animate),ce(D.calendarContainer,"multiMonth",1<D.config.showMonths),D.calendarContainer.appendChild(e);var o=void 0!==D.config.appendTo&&void 0!==D.config.appendTo.nodeType;if((D.config.inline||D.config.static)&&(D.calendarContainer.classList.add(D.config.inline?"inline":"static"),D.config.inline&&(!o&&D.element.parentNode?D.element.parentNode.insertBefore(D.calendarContainer,D._input.nextSibling):void 0!==D.config.appendTo&&D.config.appendTo.appendChild(D.calendarContainer)),D.config.static)){var r=ue("div","flatpickr-wrapper");D.element.parentNode&&D.element.parentNode.insertBefore(r,D.element),r.appendChild(D.element),D.altInput&&r.appendChild(D.altInput),r.appendChild(D.calendarContainer)}D.config.static||D.config.inline||(void 0!==D.config.appendTo?D.config.appendTo:window.document.body).appendChild(D.calendarContainer)}(),function(){if(D.config.wrap&&["open","close","toggle","clear"].forEach(function(t){Array.prototype.forEach.call(D.element.querySelectorAll("[data-"+t+"]"),function(e){return s(e,"click",D[t])})}),D.isMobile)return function(){var e=D.config.enableTime?D.config.noCalendar?"time":"datetime-local":"date";D.mobileInput=ue("input",D.input.className+" flatpickr-mobile"),D.mobileInput.tabIndex=1,D.mobileInput.type=e,D.mobileInput.disabled=D.input.disabled,D.mobileInput.required=D.input.required,D.mobileInput.placeholder=D.input.placeholder,D.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",0<D.selectedDates.length&&(D.mobileInput.defaultValue=D.mobileInput.value=D.formatDate(D.selectedDates[0],D.mobileFormatStr)),D.config.minDate&&(D.mobileInput.min=D.formatDate(D.config.minDate,"Y-m-d")),D.config.maxDate&&(D.mobileInput.max=D.formatDate(D.config.maxDate,"Y-m-d")),D.input.getAttribute("step")&&(D.mobileInput.step=String(D.input.getAttribute("step"))),D.input.type="hidden",void 0!==D.altInput&&(D.altInput.type="hidden");try{D.input.parentNode&&D.input.parentNode.insertBefore(D.mobileInput,D.input.nextSibling)}catch(e){}s(D.mobileInput,"change",function(e){D.setDate(fe(e).value,!1,D.mobileFormatStr),K("onChange"),K("onClose")})}();var e=ae(P,50);D._debouncedChange=ae(c,De),D.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&s(D.daysContainer,"mouseover",function(e){"range"===D.config.mode&&F(fe(e))}),s(window.document.body,"keydown",j),D.config.inline||D.config.static||s(window,"resize",e),void 0!==window.ontouchstart?s(window.document,"touchstart",O):s(window.document,"mousedown",O),s(window.document,"focus",O,{capture:!0}),!0===D.config.clickOpens&&(s(D._input,"focus",D.open),s(D._input,"click",D.open)),void 0!==D.daysContainer&&(s(D.monthNav,"click",Z),s(D.monthNav,["keyup","increment"],n),s(D.daysContainer,"click",B)),void 0!==D.timeContainer&&void 0!==D.minuteElement&&void 0!==D.hourElement&&(s(D.timeContainer,["increment"],f),s(D.timeContainer,"blur",f,{capture:!0}),s(D.timeContainer,"click",r),s([D.hourElement,D.minuteElement],["focus","click"],function(e){return fe(e).select()}),void 0!==D.secondElement&&s(D.secondElement,"focus",function(){return D.secondElement&&D.secondElement.select()}),void 0!==D.amPM&&s(D.amPM,"click",function(e){f(e),c()})),D.config.allowInput&&s(D._input,"blur",N)}(),(D.selectedDates.length||D.config.noCalendar)&&(D.config.enableTime&&o(D.config.noCalendar?D.latestSelectedDateObj:void 0),X(!1)),t();var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!D.isMobile&&e&&R(),K("onReady")}(),D}function n(e,t){for(var n=Array.prototype.slice.call(e).filter(function(e){return e instanceof HTMLElement}),i=[],o=0;o<n.length;o++){var r=n[o];try{if(null!==r.getAttribute("data-fp-omit"))continue;void 0!==r._flatpickr&&(r._flatpickr.destroy(),r._flatpickr=void 0),r._flatpickr=s(r,t||{}),i.push(r._flatpickr)}catch(e){console.error(e)}}return 1===i.length?i[0]:i}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return n(this,e)},HTMLElement.prototype.flatpickr=function(e){return n([this],e)});var Ce=function(e,t){return"string"==typeof e?n(window.document.querySelectorAll(e),t):e instanceof Node?n([e],t):n(e,t)};return Ce.defaultConfig={},Ce.l10ns={en:ee({},oe),default:ee({},oe)},Ce.localize=function(e){Ce.l10ns.default=ee(ee({},Ce.l10ns.default),e)},Ce.setDefaults=function(e){Ce.defaultConfig=ee(ee({},Ce.defaultConfig),e)},Ce.parseDate=ge({}),Ce.formatDate=me({}),Ce.compareDates=ve,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return n(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=Ce),Ce}),function(s){function t(e,t){this.element=s(e),this.options=t,this.init()}t.prototype.init=function(){this.element.chosen(this.options),this.container=this.element.next(".chosen-container"),this.search_field=this.container.find(".chosen-search-input"),this.is_multiple=this.container.hasClass("chosen-container-multi"),this.is_typing=!1,this.chosenXhr=null,this.events()},t.prototype.events=function(){var e=this;this.search_field.on("compositionstart",function(){e.is_typing=!0}),this.search_field.on("compositionend",function(){e.is_typing=!1,e.update_list()}),this.search_field.on("keyup",function(){e.update_list()}),this.search_field.on("focus",function(){e.search_field_focused()})},t.prototype.search_field_focused=function(){this.search_welcome_message(),0===this.options.min_length&&0===this.search_field.val().length&&this.update_list()},t.prototype.search_welcome_message=function(){var e=s.trim(this.search_field.val()),t=this.container.find(".chosen-results");0===t.children().length&&0===e.length&&t.html('<li class="no-results">'+this.options.typing_text.replace("%s",this.options.min_length-e.length)+"</li>")},t.prototype.update_list=function(){var t=this;if(this.search_welcome_message(),!this.is_typing){var e=s.trim(this.search_field.val()),n=e.length<this.options.min_length?this.options.typing_text.replace("%s",this.options.min_length-e.length):this.options.searching_text;this.container.find(".no-results").text(n),e!==this.search_field.data("prevVal")&&(this.search_field.data("prevVal",e),this.timer&&clearTimeout(this.timer),e.length<this.options.min_length||(this.timer=setTimeout(function(){t.chosenXhr&&t.chosenXhr.abort(),t.options.data.term=e,t.chosenXhr=window.wp.ajax.post("csf-chosen",t.options.data).done(function(e){t.show_results(e)}).fail(function(e){t.container.find(".no-results").text(e.error)})},this.options.type_delay)))}},t.prototype.show_results=function(e){var n=this;if(!this.is_typing&&null!==e){if(0===e.length)return this.element.data().chosen.no_results_clear(),void this.element.data().chosen.no_results(this.search_field.val());var i=[];this.element.find("option").each(function(){s(this).is(":selected")?i.push(s(this).val()+"-"+s(this).text()):s(this).attr("value").length&&s(this).remove()}),s.each(e,function(e,t){-1===s.inArray(t.value+"-"+t.text,i)&&s("<option />").attr("value",t.value).html(t.text).appendTo(n.element)});var t=this.search_field.val(),o=this.search_field.innerWidth();if(this.element.trigger("chosen:updated"),this.is_multiple){var r=this.element.parent().find(".csf-hide-select").val()||[];this.element.CSFChosenOrder(r,!0),this.search_field.css("width",o)}this.search_field.val(t),null!==this.chosenXhr.done&&this.chosenXhr.done(e)}},s.fn.CSFAjaxChosen=function(e){return this.each(function(){new t(this,e)})}}(jQuery),function(){var n,i,s=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},o={}.hasOwnProperty;i=function(){function e(){}return e.insertAt=function(e,t,n){return n.insertBefore(e,n.children[t].nextSibling)},e.getFlattenedOptionsAndGroups=function(e){var t,n,i,o,r,s,a,l,c;for(t=[],s=0,l=(i=Array.prototype.filter.call(e.childNodes,function(e){var t;return"OPTION"===(t=e.nodeName.toUpperCase())||"OPTGROUP"===t})).length;s<l;s++)if(n=i[s],t.push(n),"OPTGROUP"===n.nodeName.toUpperCase())for(a=0,c=(r=Array.prototype.filter.call(n.childNodes,function(e){return"OPTION"===e.nodeName.toUpperCase()})).length;a<c;a++)o=r[a],t.push(o);return t},e.isValidMultipleSelectElement=function(e){return null!=e&&"SELECT"===e.nodeName&&e.multiple},e.getChosenUIContainer=function(e){return""!==e.id?document.getElementById(e.id.replace(/-/g,"_")+"_chosen"):this.searchChosenUIContainer(e)},e.isChosenified=function(e){return null!=this.getChosenUIContainer(e)},e.forceSelection=function(e,t){var n,i,o,r;for(o=this.getFlattenedOptionsAndGroups(e),n=0;n<o.length;)r=(i=o[n]).getAttribute("value"),0<=s.call(t,r)?(i.selected=!0,i.setAttribute("selected","")):(i.selected=!1,i.removeAttribute("selected")),n++;return this.triggerEvent(e,"chosen:updated")},e.CSFChosenOrder=function(e,t,n){var i,o,r,s,a,l,c,u,h,d,f,p,_,m;if(null!=this.getDOMElement&&(e=this.getDOMElement(e)),this.isValidMultipleSelectElement(e)&&null!=(o=this.getChosenUIContainer(e))&&t instanceof Array){for(t=t.map(Function.prototype.call,String.prototype.trim),c=this.getFlattenedOptionsAndGroups(e),null!=n&&!0===n&&this.forceSelection(e,t),m=[],r=d=0,p=t.length;d<p;r=++d){for(a=t[r],u=null,s=f=0,_=c.length;f<_;s=++f)c[s].value===a&&(u=s);i=o.querySelectorAll(".search-choice"),h=this.relAttributeName,null!=(l=Array.prototype.filter.call(i,function(e){return null!=e.querySelector("a.search-choice-close["+h+'="'+u+'"]')})[0])&&(o.querySelector("ul.chosen-choices"),m.push(this.insertAt(l,r,o.querySelector("ul.chosen-choices"))))}return m}},e}(),(n=jQuery).fn.extend({CSFChosenOrder:function(e,t){return _CSFChosenOrder.CSFChosenOrder(this,e,t)}}),this._CSFChosenOrder=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return function(e,t){for(var n in t)o.call(t,n)&&(e[n]=t[n]);function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype}(t,i),t.relAttributeName="data-option-array-index",t.isjQueryObject=function(e){return"undefined"!=typeof jQuery&&null!==jQuery&&e instanceof jQuery},t.getDOMElement=function(e){return this.isjQueryObject(e)?e.get(0):e},t.searchChosenUIContainer=function(e){return null!=n(e).data("chosen")?n(e).data("chosen").container[0]:n(e).next(".chosen-container.chosen-container-multi").get(0)},t.triggerEvent=function(e,t){return n(e).trigger(t)},t}()}.call(this),function(){var a,n,o,s,r={}.hasOwnProperty;(s=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,n,i,o,r,s;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,title:e.title?e.title:void 0,children:0,disabled:e.disabled,classes:e.className}),s=[],n=0,i=(r=e.childNodes).length;n<i;n++)o=r[n],s.push(this.add_option(o,t,e.disabled));return s},e.prototype.add_option=function(e,t,n){if("OPTION"===e.nodeName.toUpperCase())return""!==e.text?(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,title:e.title?e.title:void 0,selected:e.selected,disabled:!0===n?n:e.disabled,group_array_index:t,group_label:null!=t?this.parsed[t].label:null,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},e}()).select_to_array=function(e){var t,n,i,o,r;for(o=new s,n=0,i=(r=e.childNodes).length;n<i;n++)t=r[n],o.add_node(t);return o.parsed},n=function(){function o(e,t){var n,i;this.form_field=e,this.options=null!=t?t:{},this.label_click_handler=(n=this.label_click_handler,i=this,function(){return n.apply(i,arguments)}),o.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return o.prototype.set_default_values=function(){var t,n;return this.click_test_action=(t=this,function(e){return t.test_active_click(e)}),this.activate_action=(n=this,function(e){return n.activate_field(e)}),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},o.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||o.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||o.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||o.default_no_result_text},o.prototype.choice_label=function(e){return this.include_group_label_in_selected&&null!=e.group_label?"<b class='group-name'>"+this.escape_html(e.group_label)+"</b>"+e.html:e.html},o.prototype.mouse_enter=function(){return this.mouse_on_container=!0},o.prototype.mouse_leave=function(){return this.mouse_on_container=!1},o.prototype.input_focus=function(e){if(this.is_multiple){if(!this.active_field)return setTimeout((t=this,function(){return t.container_mousedown()}),50)}else if(!this.active_field)return this.activate_field();var t},o.prototype.input_blur=function(e){if(!this.mouse_on_container)return this.active_field=!1,setTimeout((t=this,function(){return t.blur_test()}),100);var t},o.prototype.label_click_handler=function(e){return this.is_multiple?this.container_mousedown(e):this.activate_field()},o.prototype.results_option_build=function(e){var t,n,i,o,r,s,a;for(t="",o=a=0,r=(s=this.results_data).length;o<r&&((i="")!==(i=(n=s[o]).group?this.result_add_group(n):this.result_add_option(n))&&(a++,t+=i),(null!=e?e.first:void 0)&&(n.selected&&this.is_multiple?this.choice_build(n):n.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(n))),!(a>=this.max_shown_results));o++);return t},o.prototype.result_add_option=function(e){var t,n;return e.search_match&&this.include_option_in_results(e)?(t=[],e.disabled||e.selected&&this.is_multiple||t.push("active-result"),!e.disabled||e.selected&&this.is_multiple||t.push("disabled-result"),e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),(n=document.createElement("li")).className=t.join(" "),e.style&&(n.style.cssText=e.style),n.setAttribute("data-option-array-index",e.array_index),n.innerHTML=e.highlighted_html||e.html,e.title&&(n.title=e.title),this.outerHTML(n)):""},o.prototype.result_add_group=function(e){var t,n;return(e.search_match||e.group_match)&&0<e.active_options?((t=[]).push("group-result"),e.classes&&t.push(e.classes),(n=document.createElement("li")).className=t.join(" "),n.innerHTML=e.highlighted_html||this.escape_html(e.label),e.title&&(n.title=e.title),this.outerHTML(n)):""},o.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},o.prototype.reset_single_select_options=function(){var e,t,n,i,o;for(o=[],e=0,t=(n=this.results_data).length;e<t;e++)(i=n[e]).selected?o.push(i.selected=!1):o.push(void 0);return o},o.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},o.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},o.prototype.winnow_results=function(e){var t,n,i,o,r,s,a,l,c,u,h,d,f,p,_;for(this.no_results_clear(),u=0,t=(a=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),c=this.get_search_regex(t),i=0,o=(l=this.results_data).length;i<o;i++)(r=l[i]).search_match=!1,d=h=null,r.highlighted_html="",this.include_option_in_results(r)&&(r.group&&(r.group_match=!1,r.active_options=0),null!=r.group_array_index&&this.results_data[r.group_array_index]&&(0===(h=this.results_data[r.group_array_index]).active_options&&h.search_match&&(u+=1),h.active_options+=1),_=r.group?r.label:r.text,r.group&&!this.group_search||(d=this.search_string_match(_,c),r.search_match=null!=d,r.search_match&&!r.group&&(u+=1),r.search_match?(a.length&&(f=d.index,s=_.slice(0,f),n=_.slice(f,f+a.length),p=_.slice(f+a.length),r.highlighted_html=this.escape_html(s)+"<em>"+this.escape_html(n)+"</em>"+this.escape_html(p)),null!=h&&(h.group_match=!0)):null!=r.group_array_index&&this.results_data[r.group_array_index].search_match&&(r.search_match=!0)));return this.result_clear_highlight(),u<1&&a.length?(this.update_results_content(""),this.no_results(a)):(this.update_results_content(this.results_option_build()),(null!=e?e.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},o.prototype.get_search_regex=function(e){var t,n;return n=this.search_contains?e:"(^|\\s|\\b)"+e+"[^\\s]*",this.enable_split_word_search||this.search_contains||(n="^"+n),t=this.case_sensitive_search?"":"i",new RegExp(n,t)},o.prototype.search_string_match=function(e,t){var n;return n=t.exec(e),!this.search_contains&&(null!=n?n[1]:void 0)&&(n.index+=1),n},o.prototype.choices_count=function(){var e,t,n;if(null!=this.selected_option_count)return this.selected_option_count;for(e=this.selected_option_count=0,t=(n=this.form_field.options).length;e<t;e++)n[e].selected&&(this.selected_option_count+=1);return this.selected_option_count},o.prototype.choices_click=function(e){if(e.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},o.prototype.keydown_checker=function(e){var t,n;switch(n=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),8!==n&&this.pending_backstroke&&this.clear_backstroke(),n){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&e.preventDefault();break;case 32:this.disable_search&&e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:e.preventDefault(),this.keydown_arrow()}},o.prototype.keyup_checker=function(e){var t,n;switch(n=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),n){case 8:this.is_multiple&&this.backstroke_length<1&&0<this.choices_count()?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:e.preventDefault(),this.results_showing&&this.result_select(e);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},o.prototype.clipboard_event_checker=function(e){var t;if(!this.is_disabled)return setTimeout((t=this,function(){return t.results_search()}),50)},o.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},o.prototype.include_option_in_results=function(e){return!(this.is_multiple&&!this.display_selected_options&&e.selected)&&(!(!this.display_disabled_options&&e.disabled)&&!e.empty)},o.prototype.search_results_touchstart=function(e){return this.touch_started=!0,this.search_results_mouseover(e)},o.prototype.search_results_touchmove=function(e){return this.touch_started=!1,this.search_results_mouseout(e)},o.prototype.search_results_touchend=function(e){if(this.touch_started)return this.search_results_mouseup(e)},o.prototype.outerHTML=function(e){var t;return e.outerHTML?e.outerHTML:((t=document.createElement("div")).appendChild(e),t.innerHTML)},o.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},o.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},o.prototype.get_no_results_html=function(e){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(e)+"</span>\n</li>"},o.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?8<=document.documentMode:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},o.default_multiple_text="Select Some Options",o.default_single_text="Select an Option",o.default_no_result_text="No results match",o}(),(a=jQuery).fn.extend({chosen:function(i){return n.browser_is_supported()?this.each(function(e){var t,n;n=(t=a(this)).data("chosen"),"destroy"!==i?n instanceof o||t.data("chosen",new o(this,i)):n instanceof o&&n.destroy()}):this}}),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return function(e,t){for(var n in t)r.call(t,n)&&(e[n]=t[n]);function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype}(t,n),t.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},t.prototype.set_up_html=function(){var e,t;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),t={class:e.join(" "),title:this.form_field.title},this.form_field.id.length&&(t.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",t),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},t.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},t.prototype.register_observers=function(){var t,n,i,o,r,s,a,l,c,u,h,d,f,p,_,m,g,v,y,b,w,D,C,x;return this.container.on("touchstart.chosen",(t=this,function(e){t.container_mousedown(e)})),this.container.on("touchend.chosen",(n=this,function(e){n.container_mouseup(e)})),this.container.on("mousedown.chosen",(i=this,function(e){i.container_mousedown(e)})),this.container.on("mouseup.chosen",(o=this,function(e){o.container_mouseup(e)})),this.container.on("mouseenter.chosen",(r=this,function(e){r.mouse_enter(e)})),this.container.on("mouseleave.chosen",(s=this,function(e){s.mouse_leave(e)})),this.search_results.on("mouseup.chosen",(a=this,function(e){a.search_results_mouseup(e)})),this.search_results.on("mouseover.chosen",(l=this,function(e){l.search_results_mouseover(e)})),this.search_results.on("mouseout.chosen",(c=this,function(e){c.search_results_mouseout(e)})),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",(u=this,function(e){u.search_results_mousewheel(e)})),this.search_results.on("touchstart.chosen",(h=this,function(e){h.search_results_touchstart(e)})),this.search_results.on("touchmove.chosen",(d=this,function(e){d.search_results_touchmove(e)})),this.search_results.on("touchend.chosen",(f=this,function(e){f.search_results_touchend(e)})),this.form_field_jq.on("chosen:updated.chosen",(p=this,function(e){p.results_update_field(e)})),this.form_field_jq.on("chosen:activate.chosen",(_=this,function(e){_.activate_field(e)})),this.form_field_jq.on("chosen:open.chosen",(m=this,function(e){m.container_mousedown(e)})),this.form_field_jq.on("chosen:close.chosen",(g=this,function(e){g.close_field(e)})),this.search_field.on("blur.chosen",(v=this,function(e){v.input_blur(e)})),this.search_field.on("keyup.chosen",(y=this,function(e){y.keyup_checker(e)})),this.search_field.on("keydown.chosen",(b=this,function(e){b.keydown_checker(e)})),this.search_field.on("focus.chosen",(w=this,function(e){w.input_focus(e)})),this.search_field.on("cut.chosen",(D=this,function(e){D.clipboard_event_checker(e)})),this.search_field.on("paste.chosen",(C=this,function(e){C.clipboard_event_checker(e)})),this.is_multiple?this.search_choices.on("click.chosen",(x=this,function(e){x.choices_click(e)})):this.container.on("click.chosen",function(e){e.preventDefault()})},t.prototype.destroy=function(){return a(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),0<this.form_field_label.length&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},t.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},t.prototype.container_mousedown=function(e){var t;if(!this.is_disabled)return!e||"mousedown"!==(t=e.type)&&"touchstart"!==t||this.results_showing||e.preventDefault(),null!=e&&a(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||a(e.target)[0]!==this.selected_item[0]&&!a(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},t.prototype.container_mouseup=function(e){if("ABBR"===e.target.nodeName&&!this.is_disabled)return this.results_reset(e)},t.prototype.search_results_mousewheel=function(e){var t;if(e.originalEvent&&(t=e.originalEvent.deltaY||-e.originalEvent.wheelDelta||e.originalEvent.detail),null!=t)return e.preventDefault(),"DOMMouseScroll"===e.type&&(t*=40),this.search_results.scrollTop(t+this.search_results.scrollTop())},t.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},t.prototype.close_field=function(){return a(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},t.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},t.prototype.test_active_click=function(e){var t;return(t=a(e.target).closest(".chosen-container")).length&&this.container[0]===t[0]?this.active_field=!0:this.close_field()},t.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=s.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},t.prototype.result_do_highlight=function(e){var t,n,i,o;if(e.length){if(this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),(i=parseInt(this.search_results.css("maxHeight"),10))+(o=this.search_results.scrollTop())<=(t=(n=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight()))return this.search_results.scrollTop(0<t-i?t-i:0);if(n<o)return this.search_results.scrollTop(n)}},t.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},t.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},t.prototype.update_results_content=function(e){return this.search_results.html(e)},t.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},t.prototype.set_tab_index=function(e){var t;if(this.form_field.tabIndex)return t=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=t},t.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),0<this.form_field_label.length)return this.form_field_label.on("click.chosen",this.label_click_handler)},t.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},t.prototype.search_results_mouseup=function(e){var t;if((t=a(e.target).hasClass("active-result")?a(e.target):a(e.target).parents(".active-result").first()).length)return this.result_highlight=t,this.result_select(e),this.search_field.focus()},t.prototype.search_results_mouseover=function(e){var t;if(t=a(e.target).hasClass("active-result")?a(e.target):a(e.target).parents(".active-result").first())return this.result_do_highlight(t)},t.prototype.search_results_mouseout=function(e){if(a(e.target).hasClass("active-result")||a(e.target).parents(".active-result").first())return this.result_clear_highlight()},t.prototype.choice_build=function(e){var t,n,i;return t=a("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?t.addClass("search-choice-disabled"):((n=a("<a />",{class:"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",(i=this,function(e){return i.choice_destroy_link_click(e)})),t.append(n)),this.search_container.before(t)},t.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(a(e.target))},t.prototype.choice_destroy=function(e){if(this.result_deselect(e[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&0<this.choices_count()&&this.get_search_field_value().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()},t.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},t.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},t.prototype.result_select=function(e){var t,n;if(this.result_highlight)return t=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?t.removeClass("active-result"):this.reset_single_select_options(),t.addClass("result-selected"),(n=this.results_data[t[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[n.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(n):this.single_set_selected_text(this.choice_label(n)),this.is_multiple&&(!this.hide_results_on_select||e.metaKey||e.ctrlKey)?e.metaKey||e.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[n.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,e.preventDefault(),this.search_field_scale())},t.prototype.single_set_selected_text=function(e){return null==e&&(e=this.default_text),e===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(e)},t.prototype.result_deselect=function(e){var t;return t=this.results_data[e],!this.form_field.options[t.options_index].disabled&&(t.selected=!1,this.form_field.options[t.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[t.options_index].value}),this.search_field_scale(),!0)},t.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},t.prototype.get_search_field_value=function(){return this.search_field.val()},t.prototype.get_search_text=function(){return a.trim(this.get_search_field_value())},t.prototype.escape_html=function(e){return a("<div/>").text(e).html()},t.prototype.winnow_results_set_highlight=function(){var e,t;if(null!=(e=(t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?t.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(e)},t.prototype.no_results=function(e){var t;return t=this.get_no_results_html(e),this.search_results.append(t),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},t.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},t.prototype.keydown_arrow=function(){var e;return this.results_showing&&this.result_highlight?(e=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(e):void 0:this.results_show()},t.prototype.keyup_arrow=function(){var e;return this.results_showing||this.is_multiple?this.result_highlight?(e=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(e.first()):(0<this.choices_count()&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},t.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(e=this.search_container.siblings("li.search-choice").last()).length&&!e.hasClass("search-choice-disabled")?(this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},t.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},t.prototype.search_field_scale=function(){var e,t,n,i,o,r,s;if(this.is_multiple){for(o={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},t=0,n=(r=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;t<n;t++)o[i=r[t]]=this.search_field.css(i);return(e=a("<div />").css(o)).text(this.get_search_field_value()),a("body").append(e),s=e.width()+25,e.remove(),this.container.is(":visible")&&(s=Math.min(this.container.outerWidth()-10,s)),this.search_field.width(s)}},t.prototype.trigger_form_field_change=function(e){return this.form_field_jq.trigger("input",e),this.form_field_jq.trigger("change",e)},t}()}.call(this),function(s){"use strict";function o(e,t,n){this.init(e,t,n)}function e(){this.rules=[]}s.extend(o.prototype,{init:function(e,t,n){this.controller=e,this.condition=t,this.value=n,this.rules=[],this.controls=[]},evalCondition:function(e,t,n,i,o){if("=="==n)return this.checkBoolean(i)==this.checkBoolean(o);if("!="==n)return this.checkBoolean(i)!=this.checkBoolean(o);if(">="==n)return Number(o)>=Number(i);if("<="==n)return Number(o)<=Number(i);if(">"==n)return Number(o)>Number(i);if("<"==n)return Number(o)<Number(i);if("()"==n)return window[i](e,t,o);if("any"==n){if(s.isArray(o)){for(var r=o.length-1;0<=r;r--)if(-1!==s.inArray(o[r],i.split(",")))return!0}else if(-1!==s.inArray(o,i.split(",")))return!0}else if("not-any"==n)if(s.isArray(o)){for(r=o.length-1;0<=r;r--)if(-1==s.inArray(o[r],i.split(",")))return!0}else if(-1==s.inArray(o,i.split(",")))return!0;return!1},checkBoolean:function(e){switch(e){case!0:case"true":case 1:case"1":e=!0;break;case null:case!1:case"false":case 0:case"0":e=!1}return e},checkCondition:function(e){if(!this.condition)return!0;var t=e.find(this.controller),n=this.getControlValue(e,t);return void 0!==n&&(n=this.normalizeValue(t,this.value,n),this.evalCondition(e,t,this.condition,this.value,n))},normalizeValue:function(e,t,n){return"number"==typeof t?parseFloat(n):n},getControlValue:function(e,t){return 1<t.length&&("radio"==t.attr("type")||"checkbox"==t.attr("type"))?t.filter(":checked").map(function(){return this.value}).get():"checkbox"==t.attr("type")||"radio"==t.attr("type")?t.is(":checked"):t.val()},createRule:function(e,t,n){var i=new o(e,t,n);return this.rules.push(i),i},include:function(e){this.controls.push(e)},applyRule:function(n,e){var t;t=void 0===e?this.checkCondition(n):e;var i=s.map(this.controls,function(e,t){return n.find(e)});t?(s(i).each(function(){s(this).removeClass("csf-depend-on")}),s(this.rules).each(function(){this.applyRule(n)})):(s(i).each(function(){s(this).addClass("csf-depend-on")}),s(this.rules).each(function(){this.applyRule(n,!1)}))}}),s.extend(e.prototype,{createRule:function(e,t,n){var i=new o(e,t,n);return this.rules.push(i),i},applyRules:function(e){s(this.rules).each(function(){this.applyRule(e)})}}),s.csf_deps={createRuleset:function(){return new e},enable:function(n,i,o){return n.on("change keyup",function(e){var t=e.target.getAttribute("data-depend-id")||e.target.getAttribute("data-sub-depend-id");-1!==o.indexOf(t)&&i.applyRules(n)}),i.applyRules(n),!0}}}(jQuery),function(e,n){if("function"==typeof define&&define.amd)define(["exports","jquery"],function(e,t){return n(e,t)});else if("undefined"!=typeof exports){var t=require("jquery");n(exports,t)}else n(e,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,t){var a={validate:/^(?!(_nonce|_pseudo))[a-zA-Z0-9_-]*(?:\[(?:\d*|(?!(_nonce|_pseudo))[a-zA-Z0-9_-]+)\])*$/i,key:/[a-zA-Z0-9_-]+|(?=\[\])/g,named:/^[a-zA-Z0-9_-]+$/,push:/^$/,fixed:/^\d+$/};function n(i,e){var n={},r={};function s(e,t,n){return e[t]=n,e}function t(){return n}this.addPair=function(e){if(!a.validate.test(e.name))return this;var t=function(e,t){for(var n,i=e.match(a.key);void 0!==(n=i.pop());)a.push.test(n)?t=s([],(o=e.replace(/\[\]$/,""),void 0===r[o]&&(r[o]=0),r[o]++),t):a.fixed.test(n)?t=s([],n,t):a.named.test(n)&&(t=s({},n,t));var o;return t}(e.name,e.value);return n=i.extend(!0,n,t),this},this.addPairs=function(e){if(!i.isArray(e))throw new Error("formSerializer.addPairs expects an Array");for(var t=0,n=e.length;t<n;t++)this.addPair(e[t]);return this},this.serialize=t,this.serializeJSON=function(){return JSON.stringify(t())}}return n.patterns=a,n.serializeObject=function(){return new n(t,this).addPairs(this.serializeArray()).serialize()},n.serializeJSON=function(){return new n(t,this).addPairs(this.serializeArray()).serializeJSON()},void 0!==t.fn&&(t.fn.serializeObjectCSF=n.serializeObject,t.fn.serializeJSONCSF=n.serializeJSON),e.FormSerializer=n});