CMD:
PHP:
mini manager
Path:
/
var
/
www
/
forum.shootsilhouette.com
/
public_html
/
js
/
Upload:
Edit: search-rollup-569.js
/* =======================================================================*\ || ###################################################################### || || # vBulletin 5.6.9 || # ------------------------------------------------------------------ # || || # Copyright 2000-2022 MH Sub I, LLC dba vBulletin. All Rights Reserved. # || || # This file may not be redistributed in whole or significant part. # || || # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || ###################################################################### || \*========================================================================*/ // *************************** // js.compressed/tag-editor.js // *************************** vBulletin.precache("add_tags edit_tags error error_adding_search_tips_code_x error_adding_tags_code_x error_fetching_popular_tags invalid_server_response_please_try_again invalid_x_tag_length loading none popular_tags_cloud tag_cloud unable_to_load_tag_editor unable_to_save_tags you_may_add_one_more_tag you_may_add_x_more_tags you_may_not_add_any_more_tags".split(" "),["tagforcelower","tagmaxlen","tagminlen"]); (function(b){function A(d,e){var k=e.split(",");e=[];b.each(k,function(b,d){""!=d&&e.push(d)});vBulletin.AJAX({call:"/ajax/api/tags/updateUserTags",data:{nodeid:d,taglist:e},success:function(e){if(e){var k=b("#content-tags-"+d);k.find(".js-content-tag, .js-content-tag-none").remove();e.tags&&0<e.tags.length?b.each(e.tags,function(d,r){var h=b("<span />").addClass("js-content-tag");b("<a />").attr("href",r.searchurl).html(r.tagtext).appendTo(h);d<e.tags.length-1&&h.append(document.createTextNode(", ")); h.appendTo(k)}):b("<span />").addClass("js-content-tag-none").html(vBulletin.phrase.get("none")).appendTo(k)}},error_phrase:"unable_to_save_tags",title_phrase:"edit_tags"})}function B(d){var e=b(this).data("node-id");vBulletin.AJAX({call:"/ajax/render/tag_editor",data:{nodeid:e,dialogOnly:!0,editPost:!0,editorClass:"js-topic-tag-editor",isAjaxTemplateRenderWithData:!0},success:function(k){b("body").append(k.template);b(document).on("vb-tag-editor-init",function(b,d){function k(){h.dialog("destroy").closest(".tag-editor-wrapper").remove()} var h=d.$dialog;h.on("vb-tag-dialog-cancel",k);h.on("vb-tag-dialog-save",function(b,d){A(e,d.tagList);k()})});new vBulletin.tagEditor.instance(".js-topic-tag-editor",!1,!1,d)},error_phrase:"unable_to_load_tag_editor",title_phrase:"edit_tags"})}var w=vBulletin.ensureObj("jsexec.tag_editor",{exec:0});w.exec++;if(!(1<w)){var q={};vBulletin.tagEditor=vBulletin.tagEditor||{};vBulletin.tagEditor.instance=function(d,e,k,h){function H(){var a=l.find(".you-may-add-text");if(n||m){var c=n&&!m?n:!n&&m?m:Math.min(n, m);a.find("span").text(c)}else a.addClass("h-hide");y()?f.is(":visible")&&f[0].focus():f.hide()}function w(a){a=b(this);var c=a.parent();!c.hasClass("added")&&x(a.text())&&(c.addClass("added"),f.is(":visible")&&f[0].focus());return!1}function r(a,c){0<a.length&&(c=(c.find(".tag-input").val()||"").split(","),b.each(c,function(c,d){var f=b.trim(d);a.each(function(){b(this).data("tag")==f&&b(this).addClass("added")})}))}function I(a){a.stopPropagation();var c=b(this),d=p.find(".tag-editor-container"); 1==d.length?(d.dialog({title:vBulletin.phrase.get("add_tags"),autoOpen:!1,modal:!0,resizable:!1,closeOnEscape:!1,showCloseButton:!1,width:500,dialogClass:"dialog-container tag-editor-dialog-container dialog-box",open:function(){g.clearElements();var a=p.find(".tag-input").val();if(a){a=a.split(",");for(var e in a)x(b.trim(a[e]))}else t&&!f.attr("placeholder")&&f.attr("placeholder",t);0<z()&&f.show();K(c.data("node-id"));var C=b(".tag-cloud",d);vBulletin.tagEditor.fetchPopularTags({type:p.data("type")|| "nodes",noformat:1,success:function(a){C.html(a);r(C.find(".tagcloudlink"),p)},error:function(a){C.html('<span class="error">{0}</span>'.format(a))}})},close:function(){p.data("autocomplete-instance").close()}}).dialog("open"),c.data("tag-dialog",d),d.data("parent",c.closest("form, .search-controls-tags, .form_row"))):(d=c.data("tag-dialog")||b(),d.dialog("open"));return!1}var A=this,u=!1,v=!1,D=vBulletin.options.get("tagmaxlen")||25,B=vBulletin.options.get("tagminlen")||3,n=0,m=0,E=!1,f=b(d),l=f.closest(".tag-editor-container"), p=f.closest(".tag-editor-wrapper");l.data("node-id");var g=!1,t=f.attr("placeholder")?f.attr("placeholder"):"",F=t?t.length:10,x=function(a,c){if(!g)return!1;if("undefined"==typeof c||1>c)c=pageData.userid;var b=g.getMinLength();if(a.length<b)return vBulletin.warning("error",["invalid_x_tag_length",b]),!1;1==vBulletin.options.get("tagforcelower")&&(a=a.toLowerCase());a.length>D&&(a=a.substr(0,D));c=g.addElement(a,c);f.val("");z();return c},J=function(a){var c=a.length,b;for(b=0;b<c;++b)x(a[b])},G= function(){f.attr("size",F);var a=JShtmlEncode(b.trim(f.val()));if(""==a)return!1;var c="Adding tag: "+a;0<y()&&(setTimeout(function(){x(a)},10),c+=" (Tag added)");console.log(c)},y=function(){if(e||0==n&&0==m)return!0;var a=g.countElements(),c=b(g.getElements()).filter(function(a,c){return 0==pageData.userid||c.value==pageData.userid}).length;a=0<n?n-a:m-a;return Math.min(0==m?a:m-c,a)},z=function(){var a=l.find(".you-may-add-x-tags"),c=y();if(!0===c)return!0;if(1<c)var b=["you_may_add_x_more_tags", c];else 1==c?b="you_may_add_one_more_tag":(b="you_may_not_add_any_more_tags",c=0);a.toggleClass("warning",0==c).html(vBulletin.phrase.get(b));return c},K=function(a){e?f[0].focus():q[a]?(n=q[a].maxTags,m=q[a].maxUserTags,E=q[a].canManageTags,H()):(q[a]={},vBulletin.AJAX({call:"/ajax/api/tags/getNodeTags",data:{nodeid:a},success:function(c){b.isArray(c.tags)&&(n=parseInt(c.maxtags,10),m=parseInt(c.maxusertags,10),E=c.canmanagetags,q[a]={maxTags:n,maxUserTags:m,canManageTags:E},H())},api_error:b.noop, error:b.noop}))};this.addTag=function(a,c){x(a,c)};this.addTags=function(a){J(a)};this.setTags=function(a){g&&(g.clearElements(),J(a))};this.removeAllTags=function(){g.clearElements()};this.getTags=function(){return g?g.getLabels():!1};this.getTagEditor=function(){return f};p.data("initialized")?console.log("Tag Editor is already initialized."):(p.attr("data-initialized",!0),function(){if(0==f.length)return!1;f.attr("maxlength",D);g=new vBulletin_Autocomplete(f,{apiClass:"Tags",containerClass:(k|| "")+" entry-field h-clearfix",placeholderText:t,editorContext:{type:"tags",context:A},minLength:B,beforeAdd:function(a,c){u=v?!0:!1;return 0==y()?!1:!0},afterAdd:function(a,c){0==z()&&f.hide();f.attr("placeholder","");r(l.find(".tagcloudlink"),l)},afterDelete:function(a,c){u=v?!0:!1;c=z();if(e||0<c)f.show(),setTimeout(function(){f[0].focus()},10);f.attr("placeholder",function(){var a=g?g.getLabels():!1;return a&&0!=a.length?"":t});c=l.find(".tag-cloud .tagcloudlink");if(0==c.length){var d=l.find(".popular-tags-link"); d.length&&d.qtip&&(c=d.qtip("api").elements.tooltip.find(".tagcloudlink"))}c.each(function(){b(this).data("tag")==a&&b(this).removeClass("added")})}});f=g.getInputField();p.data("autocomplete-instance",g)}(),f.off("keydown").on("keydown",function(a){var c=b(a.target).val().length;b(a.target).attr("size",c>F?c:F);if(13==a.which)return u=v?!0:!1,G(),a.preventDefault(),!1}),f.off("blur").on("blur",function(a){v=setTimeout(function(){u||G();v=u=!1},0)}),f.off("click").on("click",function(a){b(a.target).hasClass("tag-input")|| (b(".tag-input",b(this)).trigger("focus"),u=v?!0:!1);return!1}),f.each(function(){b(this).closest("form").on("submit",G)}),b(".tag-cloud-text.inline-tag-cloud .popular-tags-link",l).off("click").on("click",function(){var a=l.find(".tag-cloud");vBulletin.tagEditor.fetchPopularTags({type:"nodes",noformat:1,success:function(c){a.html(c);r(a.find(".tagcloudlink"),l)},error:function(c){a.html('<span class="error">{0}</span>'.format(c))}})}),vBulletin.qtip.apply(b(".tag-cloud-text:not(.inline-tag-cloud) .popular-tags-link", l),"qtip-populartags",{content:{title:{text:vBulletin.phrase.get("tag_cloud"),button:!1},text:function(a,c){function b(a){var b=vBulletin.phrase.get("error_fetching_popular_tags");a&&(b+=" "+vBulletin.phrase.get(a));c.set("content.text",'<span class="error">{0}</span>'.format(b))}vBulletin.AJAX({call:"/search/fetchTagCloud",data:{type:"nodes",noformat:1},success:function(a){c.set("content.text",'<div class="tag-cloud">{0}</div>'.format(a));a=c.elements.tooltip;a.on("click",".tag-cloud .tagcloudlink label", w);r(a.find(".tagcloudlink"),p)},api_error:function(a){b(a[0])},error:function(){b()}});return vBulletin.phrase.get("working_ellipsis")}},position:{at:"bottom center",my:"top center",viewport:b(window),effect:!1},show:{event:"click",solo:!0},hide:"unfocus"}),l.on("click",".tag-cloud .tagcloudlink label",w),p.on("click",".add-tag-link",I),"undefined"!==typeof h&&I.call(h.target,h),b(document).trigger("vb-tag-editor-init",{$dialog:l}))};vBulletin.tagEditor.fetchPopularTags=function(d){d=d||{};d.type= "search"!=d.type?"nodes":d.type;var e="function"==typeof d.error?d.error:b.noop;vBulletin.AJAX({call:"/search/fetchTagCloud",data:{type:d.type,noformat:d.noformat},success:function(b,e,q){"function"==typeof d.success&&d.success(b,e,q)},api_error:function(b){e("{0} {1}".format(vBulletin.phrase.get("error_fetching_popular_tags"),vBulletin.phrase.get(b[0])))},error:function(){e(vBulletin.phrase.get("error_fetching_popular_tags"))}})};b(function(){b(document).offon("click.tage",".tag-editor-container .cancel-tag-btn", function(){b(".tag-editor-container").dialog("close").trigger("vb-tag-dialog-cancel")});b(document).offon("click.tage",".tag-editor-container .save-tag-btn",function(){var d=b(this).closest(".tag-editor-container"),e=d.find(".tag-input").val(),k=e.replace(/,/g,", "),h=d.data("parent");h.find(".tag-list span").text(k);h.find(".tag-input").val(e);h.find(".tag-list").toggleClass("h-hide",!e);d.dialog("close").trigger("vb-tag-dialog-save",{tagList:e})});b(document).offon("mousedown.tage",".tag-editor-container .autocomplete-container", function(){var d=this;setTimeout(function(){var e=b(".autocompleteHelper:visible",d);0<e.length&&e[0].focus()},10);return!1});0<b(".js-content-entry-tag-editor").length&&vBulletin.tagEditor&&new vBulletin.tagEditor.instance(".js-content-entry-tag-editor");b(document).offon("click.tage",".js-edit-tags",B)})}})(jQuery); ; // *************************** // js.compressed/flatpickr/flatpickr.min.js // *************************** /* flatpickr v4.4.4, @license MIT */ (function(L,r){"object"===typeof exports&&"undefined"!==typeof module?module.exports=r():"function"===typeof define&&define.amd?define(r):L.flatpickr=r()})(this,function(){function L(c,d,e){void 0===e&&(e=!1);var g;return function(){var k=this,l=arguments;null!==g&&clearTimeout(g);g=window.setTimeout(function(){g=null;e||c.apply(k,l)},d);e&&!g&&c.apply(k,l)}}function r(c,d,e){void 0===e&&(e=!0);return!1!==e?(new Date(c.getTime())).setHours(0,0,0,0)-(new Date(d.getTime())).setHours(0, 0,0,0):c.getTime()-d.getTime()}function v(c,d,e){if(!0===e)return c.classList.add(d);c.classList.remove(d)}function g(c,d,e){c=window.document.createElement(c);e=e||"";c.className=d||"";void 0!==e&&(c.textContent=e);return c}function M(c){for(;c.firstChild;)c.removeChild(c.firstChild)}function ja(c,d){if(d(c))return c;if(c.parentNode)return ja(c.parentNode,d)}function N(c,d){var e=g("div","numInputWrapper");c=g("input","numInput "+c);var x=g("span","arrowUp"),k=g("span","arrowDown");c.type="text"; c.pattern="\\d*";if(void 0!==d)for(var l in d)c.setAttribute(l,d[l]);e.appendChild(c);e.appendChild(x);e.appendChild(k);return e}function R(c,d){function e(){a.utils={getDaysInMonth:function(b,f){void 0===b&&(b=a.currentMonth);void 0===f&&(f=a.currentYear);return 1===b&&(0===f%4&&0!==f%100||0===f%400)?29:a.l10n.daysInMonth[b]}}}function x(b){return b.bind(a)}function k(){if(void 0!==a.daysContainer){a.calendarContainer.style.visibility="hidden";a.calendarContainer.style.display="block";var b=(a.days.offsetWidth+ 1)*a.config.showMonths;a.daysContainer.style.width=b+"px";a.calendarContainer.style.width=b+"px";void 0!==a.weekWrapper&&(a.calendarContainer.style.width=b+a.weekWrapper.offsetWidth+"px");a.calendarContainer.style.removeProperty("visibility");a.calendarContainer.style.removeProperty("display")}}function l(b){0!==a.selectedDates.length&&(za(b),"input"!==b.type?(F(),z()):setTimeout(function(){F();z()},300))}function F(){if(void 0!==a.hourElement&&void 0!==a.minuteElement){var b=(parseInt(a.hourElement.value.slice(-2), 10)||0)%24,f=(parseInt(a.minuteElement.value,10)||0)%60,c=void 0!==a.secondElement?(parseInt(a.secondElement.value,10)||0)%60:0;void 0!==a.amPM&&(b=b%12+12*t(a.amPM.textContent===a.l10n.amPM[1]));var d=void 0!==a.config.minTime||a.config.minDate&&a.minDateHasTime&&a.latestSelectedDateObj&&0===r(a.latestSelectedDateObj,a.config.minDate,!0);if(void 0!==a.config.maxTime||a.config.maxDate&&a.maxDateHasTime&&a.latestSelectedDateObj&&0===r(a.latestSelectedDateObj,a.config.maxDate,!0)){var w=void 0!==a.config.maxTime? a.config.maxTime:a.config.maxDate;b=Math.min(b,w.getHours());b===w.getHours()&&(f=Math.min(f,w.getMinutes()));f===w.getMinutes()&&(c=Math.min(c,w.getSeconds()))}d&&(d=void 0!==a.config.minTime?a.config.minTime:a.config.minDate,b=Math.max(b,d.getHours()),b===d.getHours()&&(f=Math.max(f,d.getMinutes())),f===d.getMinutes()&&(c=Math.max(c,d.getSeconds())));S(b,f,c)}}function y(b){(b=b||a.latestSelectedDateObj)&&S(b.getHours(),b.getMinutes(),b.getSeconds())}function S(b,f,c){void 0!==a.latestSelectedDateObj&& a.latestSelectedDateObj.setHours(b%24,f,c||0,0);a.hourElement&&a.minuteElement&&!a.isMobile&&(a.hourElement.value=u(a.config.time_24hr?b:(12+b)%12+12*t(0===b%12)),a.minuteElement.value=u(f),void 0!==a.amPM&&(a.amPM.textContent=a.l10n.amPM[t(12<=b)]),void 0!==a.secondElement&&(a.secondElement.value=u(c)))}function A(a){var b=parseInt(a.target.value)+(a.delta||0);if(4===b.toString().length||"Enter"===a.key)a.target.blur(),/[^\d]/.test(b.toString())||T(b)}function h(b,f,c,d){if(f instanceof Array)return f.forEach(function(a){return h(b, a,c,d)});if(b instanceof Array)return b.forEach(function(a){return h(a,f,c,d)});b.addEventListener(f,c,d);a._handlers.push({element:b,event:f,handler:c})}function G(a){return function(b){1===b.which&&a(b)}}function U(){p("onChange")}function Aa(){a.config.wrap&&["open","close","toggle","clear"].forEach(function(b){Array.prototype.forEach.call(a.element.querySelectorAll("[data-"+b+"]"),function(f){return h(f,"click",a[b])})});if(a.isMobile)Ba();else{var b=L(Ca,50);a._debouncedChange=L(U,300);a.daysContainer&& !/iPhone|iPad|iPod/i.test(navigator.userAgent)&&h(a.daysContainer,"mouseover",function(b){"range"===a.config.mode&&V(b.target)});h(window.document.body,"keydown",ka);a.config.static||h(a._input,"keydown",ka);a.config.inline||a.config.static||h(window,"resize",b);void 0!==window.ontouchstart&&h(window.document,"touchstart",W);h(window.document,"mousedown",G(W));h(window.document,"focus",W,{capture:!0});!0===a.config.clickOpens&&(h(a._input,"focus",a.open),h(a._input,"mousedown",G(a.open)));void 0!== a.daysContainer&&(h(a.monthNav,"mousedown",G(Da)),h(a.monthNav,["keyup","increment"],A),h(a.daysContainer,"mousedown",G(la)));void 0!==a.timeContainer&&void 0!==a.minuteElement&&void 0!==a.hourElement&&(h(a.timeContainer,["input","increment"],l),h(a.timeContainer,"mousedown",G(E)),h(a.timeContainer,["input","increment"],a._debouncedChange,{passive:!0}),h([a.hourElement,a.minuteElement],["focus","click"],function(a){return a.target.select()}),void 0!==a.secondElement&&h(a.secondElement,"focus",function(){return a.secondElement&& a.secondElement.select()}),void 0!==a.amPM&&h(a.amPM,"mousedown",G(function(a){l(a);U()})))}}function X(b){b=void 0!==b?a.parseDate(b):a.latestSelectedDateObj||(a.config.minDate&&a.config.minDate>a.now?a.config.minDate:a.config.maxDate&&a.config.maxDate<a.now?a.config.maxDate:a.now);try{void 0!==b&&(a.currentYear=b.getFullYear(),a.currentMonth=b.getMonth())}catch(f){f.message="Invalid date supplied: "+b,a.config.errorHandler(f)}a.redraw()}function E(a){~a.target.className.indexOf("arrow")&&Y(a,a.target.classList.contains("arrowUp")? 1:-1)}function Y(a,f,c){a=a&&a.target;c=c||a&&a.parentNode&&a.parentNode.firstChild;a=Z("increment");a.delta=f;c&&c.dispatchEvent(a)}function aa(b,f,c,d){var B=D(f,!0),m=g("span","flatpickr-day "+b,f.getDate().toString());m.dateObj=f;m.$i=d;m.setAttribute("aria-label",a.formatDate(f,a.config.ariaDateFormat));-1===b.indexOf("hidden")&&0===r(f,a.now)&&(a.todayDateElem=m,m.classList.add("today"),m.setAttribute("aria-current","date"));B?(m.tabIndex=-1,ba(f)&&(m.classList.add("selected"),a.selectedDateElem= m,"range"===a.config.mode&&(v(m,"startRange",a.selectedDates[0]&&0===r(f,a.selectedDates[0],!0)),v(m,"endRange",a.selectedDates[1]&&0===r(f,a.selectedDates[1],!0)),"nextMonthDay"===b&&m.classList.add("inRange")))):m.classList.add("disabled");"range"===a.config.mode&&(d="range"!==a.config.mode||2>a.selectedDates.length?!1:0<=r(f,a.selectedDates[0])&&0>=r(f,a.selectedDates[1]),d&&!ba(f)&&m.classList.add("inRange"));a.weekNumbers&&1===a.config.showMonths&&"prevMonthDay"!==b&&1===c%7&&a.weekNumbers.insertAdjacentHTML("beforeend", "<span class='flatpickr-day'>"+a.config.getWeek(f)+"</span>");p("onDayCreate",m);return m}function C(b){b.focus();"range"===a.config.mode&&V(b)}function O(b){for(var f=0<b?a.config.showMonths:-1,c=0<b?0:a.config.showMonths-1;c!=f;c+=b)for(var d=a.daysContainer.children[c],w=0<b?d.children.length:-1,e=0<b?0:d.children.length-1;e!=w;e+=b){var n=d.children[e];if(-1===n.className.indexOf("hidden")&&D(n.dateObj))return n}}function H(b,f){var c=ca(document.activeElement);b=void 0!==b?b:c?document.activeElement: void 0!==a.selectedDateElem&&ca(a.selectedDateElem)?a.selectedDateElem:void 0!==a.todayDateElem&&ca(a.todayDateElem)?a.todayDateElem:O(0<f?1:-1);if(void 0===b)return a._input.focus();if(!c)return C(b);a:{c=-1===b.className.indexOf("Month")?b.dateObj.getMonth():a.currentMonth;for(var d=0<f?a.config.showMonths:-1,w=0<f?1:-1,e=c-a.currentMonth;e!=d;e+=w)for(var n=a.daysContainer.children[e],k=n.children.length,g=c-a.currentMonth===e?b.$i+f:0>f?n.children.length-1:0;0<=g&&g<k&&g!=(0<f?k:-1);g+=w){var h= n.children[g];if(-1===h.className.indexOf("hidden")&&D(h.dateObj)&&Math.abs(b.$i-g)>=Math.abs(f)){C(h);break a}}a.changeMonth(w);H(O(w),0)}}function K(b,f){var c=((new Date(b,f,1)).getDay()-a.l10n.firstDayOfWeek+7)%7,d=a.utils.getDaysInMonth((f-1+12)%12),w=a.utils.getDaysInMonth(f),e=window.document.createDocumentFragment(),n=1<a.config.showMonths,k=n?"prevMonthDay hidden":"prevMonthDay";n=n?"nextMonthDay hidden":"nextMonthDay";for(var h=d+1-c,l=0;h<=d;h++,l++)e.appendChild(aa(k,new Date(b,f-1,h), h,l));for(h=1;h<=w;h++,l++)e.appendChild(aa("",new Date(b,f,h),h,l));for(d=w+1;d<=42-c&&(1===a.config.showMonths||0!==l%7);d++,l++)e.appendChild(aa(n,new Date(b,f+1,d%w),d,l));b=g("div","dayContainer");b.appendChild(e);return b}function P(){if(void 0!==a.daysContainer){M(a.daysContainer);a.weekNumbers&&M(a.weekNumbers);for(var b=document.createDocumentFragment(),f=0;f<a.config.showMonths;f++){var c=new Date(a.currentYear,a.currentMonth,1);c.setMonth(a.currentMonth+f);b.appendChild(K(c.getFullYear(), c.getMonth()))}a.daysContainer.appendChild(b);a.days=a.daysContainer.firstChild}}function ma(){M(a.monthNav);a.monthNav.appendChild(a.prevMonthNav);for(var b=a.config.showMonths;b--;){var f=g("div","flatpickr-month");var c=window.document.createDocumentFragment();var d=g("span","cur-month");d.title=a.l10n.scrollTitle;var e=N("cur-year",{tabindex:"-1"});var h=e.childNodes[0];h.title=a.l10n.scrollTitle;h.setAttribute("aria-label",a.l10n.yearAriaLabel);a.config.minDate&&h.setAttribute("data-min",a.config.minDate.getFullYear().toString()); a.config.maxDate&&(h.setAttribute("data-max",a.config.maxDate.getFullYear().toString()),h.disabled=!!a.config.minDate&&a.config.minDate.getFullYear()===a.config.maxDate.getFullYear());var n=g("div","flatpickr-current-month");n.appendChild(d);n.appendChild(e);c.appendChild(n);f.appendChild(c);a.yearElements.push(h);a.monthElements.push(d);a.monthNav.appendChild(f)}a.monthNav.appendChild(a.nextMonthNav)}function R(){a.monthNav=g("div","flatpickr-months");a.yearElements=[];a.monthElements=[];a.prevMonthNav= g("span","flatpickr-prev-month");a.prevMonthNav.innerHTML=a.config.prevArrow;a.nextMonthNav=g("span","flatpickr-next-month");a.nextMonthNav.innerHTML=a.config.nextArrow;ma();Object.defineProperty(a,"_hidePrevMonthArrow",{get:function(){return a.__hidePrevMonthArrow},set:function(b){a.__hidePrevMonthArrow!==b&&(v(a.prevMonthNav,"disabled",b),a.__hidePrevMonthArrow=b)}});Object.defineProperty(a,"_hideNextMonthArrow",{get:function(){return a.__hideNextMonthArrow},set:function(b){a.__hideNextMonthArrow!== b&&(v(a.nextMonthNav,"disabled",b),a.__hideNextMonthArrow=b)}});a.currentYearElement=a.yearElements[0];I();return a.monthNav}function ia(){a.calendarContainer.classList.add("hasTime");a.config.noCalendar&&a.calendarContainer.classList.add("noCalendar");a.timeContainer=g("div","flatpickr-time");a.timeContainer.tabIndex=-1;var b=g("span","flatpickr-time-separator",":"),f=N("flatpickr-hour");a.hourElement=f.childNodes[0];var c=N("flatpickr-minute");a.minuteElement=c.childNodes[0];a.hourElement.tabIndex= a.minuteElement.tabIndex=-1;var d=a.hourElement;if(a.latestSelectedDateObj)var e=a.latestSelectedDateObj.getHours();else if(a.config.time_24hr)e=a.config.defaultHour;else a:switch(e=a.config.defaultHour,e%24){case 0:case 12:e=12;break a;default:e%=12}d.value=u(e);a.minuteElement.value=u(a.latestSelectedDateObj?a.latestSelectedDateObj.getMinutes():a.config.defaultMinute);a.hourElement.setAttribute("data-step",a.config.hourIncrement.toString());a.minuteElement.setAttribute("data-step",a.config.minuteIncrement.toString()); a.hourElement.setAttribute("data-min",a.config.time_24hr?"0":"1");a.hourElement.setAttribute("data-max",a.config.time_24hr?"23":"12");a.minuteElement.setAttribute("data-min","0");a.minuteElement.setAttribute("data-max","59");a.timeContainer.appendChild(f);a.timeContainer.appendChild(b);a.timeContainer.appendChild(c);a.config.time_24hr&&a.timeContainer.classList.add("time24hr");a.config.enableSeconds&&(a.timeContainer.classList.add("hasSeconds"),b=N("flatpickr-second"),a.secondElement=b.childNodes[0], a.secondElement.value=u(a.latestSelectedDateObj?a.latestSelectedDateObj.getSeconds():a.config.defaultSeconds),a.secondElement.setAttribute("data-step",a.minuteElement.getAttribute("data-step")),a.secondElement.setAttribute("data-min",a.minuteElement.getAttribute("data-min")),a.secondElement.setAttribute("data-max",a.minuteElement.getAttribute("data-max")),a.timeContainer.appendChild(g("span","flatpickr-time-separator",":")),a.timeContainer.appendChild(b));a.config.time_24hr||(a.amPM=g("span","flatpickr-am-pm", a.l10n.amPM[t(11<(a.latestSelectedDateObj?a.hourElement.value:a.config.defaultHour))]),a.amPM.title=a.l10n.toggleTitle,a.amPM.tabIndex=-1,a.timeContainer.appendChild(a.amPM));return a.timeContainer}function na(){a.weekdayContainer?M(a.weekdayContainer):a.weekdayContainer=g("div","flatpickr-weekdays");for(var b=a.config.showMonths;b--;){var c=g("div","flatpickr-weekdaycontainer");a.weekdayContainer.appendChild(c)}oa();return a.weekdayContainer}function oa(){var b=a.l10n.firstDayOfWeek,c=a.l10n.weekdays.shorthand.concat(); 0<b&&b<c.length&&(c=c.splice(b,c.length).concat(c.splice(0,b)));for(b=a.config.showMonths;b--;)a.weekdayContainer.children[b].innerHTML="\n <span class=flatpickr-weekday>\n "+c.join("</span><span class=flatpickr-weekday>")+"\n </span>\n "}function da(b,c){void 0===c&&(c=!0);b=c?b:b-a.currentMonth;if(!(0>b&&!0===a._hidePrevMonthArrow||0<b&&!0===a._hideNextMonthArrow)){a.currentMonth+=b;if(0>a.currentMonth||11<a.currentMonth)a.currentYear+=11<a.currentMonth?1:-1,a.currentMonth= (a.currentMonth+12)%12,p("onYearChange");P();p("onMonthChange");I()}}function ea(b){return a.config.appendTo&&a.config.appendTo.contains(b)?!0:a.calendarContainer.contains(b)}function W(b){if(a.isOpen&&!a.config.inline){var c=ea(b.target),d=b.target===a.input||b.target===a.altInput||a.element.contains(b.target)||b.path&&b.path.indexOf&&(~b.path.indexOf(a.input)||~b.path.indexOf(a.altInput));c="blur"===b.type?d&&b.relatedTarget&&!ea(b.relatedTarget):!d&&!c;d=!a.config.ignoredFocusElements.some(function(a){return a.contains(b.target)}); c&&d&&(a.close(),"range"===a.config.mode&&1===a.selectedDates.length&&(a.clear(!1),a.redraw()))}}function T(b){if(!(!b||a.config.minDate&&b<a.config.minDate.getFullYear()||a.config.maxDate&&b>a.config.maxDate.getFullYear())){var c=a.currentYear!==b;a.currentYear=b||a.currentYear;a.config.maxDate&&a.currentYear===a.config.maxDate.getFullYear()?a.currentMonth=Math.min(a.config.maxDate.getMonth(),a.currentMonth):a.config.minDate&&a.currentYear===a.config.minDate.getFullYear()&&(a.currentMonth=Math.max(a.config.minDate.getMonth(), a.currentMonth));c&&(a.redraw(),p("onYearChange"))}}function D(b,c){void 0===c&&(c=!0);b=a.parseDate(b,void 0,c);if(a.config.minDate&&b&&0>r(b,a.config.minDate,void 0!==c?c:!a.minDateHasTime)||a.config.maxDate&&b&&0<r(b,a.config.maxDate,void 0!==c?c:!a.maxDateHasTime))return!1;if(0===a.config.enable.length&&0===a.config.disable.length)return!0;if(void 0===b)return!1;for(var f=(c=0<a.config.enable.length)?a.config.enable:a.config.disable,d=0,e;d<f.length;d++){e=f[d];if("function"===typeof e&&e(b)|| e instanceof Date&&void 0!==b&&e.getTime()===b.getTime())return c;if("string"===typeof e&&void 0!==b)return(f=a.parseDate(e,void 0,!0))&&f.getTime()===b.getTime()?c:!c;if("object"===typeof e&&void 0!==b&&e.from&&e.to&&b.getTime()>=e.from.getTime()&&b.getTime()<=e.to.getTime())return c}return!c}function ca(b){return void 0!==a.daysContainer?-1===b.className.indexOf("hidden")&&a.daysContainer.contains(b):!1}function ka(b){var c=b.target===a._input,d=ea(b.target),e=a.config.allowInput,h=a.isOpen&&(!e|| !c),g=a.config.inline&&c&&!e;if(13===b.keyCode&&c){b.stopPropagation();if(e)return a.setDate(a._input.value,!0,b.target===a.altInput?a.config.altFormat:a.config.dateFormat),b.target.blur();a.open()}else if(d||h||g){b.stopPropagation();d=!!a.timeContainer&&a.timeContainer.contains(b.target);switch(b.keyCode){case 13:d?z():la(b);break;case 27:b.preventDefault();pa();break;case 8:case 46:c&&!a.config.allowInput&&(b.preventDefault(),a.clear());break;case 37:case 39:d?a.hourElement&&a.hourElement.focus(): (b.preventDefault(),void 0!==a.daysContainer&&!1===a.config.allowInput&&(c=39===b.keyCode?1:-1,b.ctrlKey?(da(c),H(O(1),0)):H(void 0,c)));break;case 38:case 40:b.preventDefault();c=40===b.keyCode?1:-1;a.daysContainer?b.ctrlKey?(T(a.currentYear-c),H(O(1),0)):d||H(void 0,7*c):a.config.enableTime&&(!d&&a.hourElement&&a.hourElement.focus(),l(b),a._debouncedChange());break;case 9:b.target===a.hourElement?(b.preventDefault(),a.minuteElement.select()):b.target===a.minuteElement&&(a.secondElement||a.amPM)? (b.preventDefault(),void 0!==a.secondElement?a.secondElement.focus():void 0!==a.amPM&&a.amPM.focus()):b.target===a.secondElement&&a.amPM&&(b.preventDefault(),a.amPM.focus())}switch(b.key){case a.l10n.amPM[0].charAt(0):case a.l10n.amPM[0].charAt(0).toLowerCase():void 0!==a.amPM&&b.target===a.amPM&&(a.amPM.textContent=a.l10n.amPM[0],F(),z());break;case a.l10n.amPM[1].charAt(0):case a.l10n.amPM[1].charAt(0).toLowerCase():void 0!==a.amPM&&b.target===a.amPM&&(a.amPM.textContent=a.l10n.amPM[1],F(),z())}p("onKeyDown", b)}}function V(b){if(1===a.selectedDates.length&&b.classList.contains("flatpickr-day")&&!b.classList.contains("disabled")){var c=b.dateObj.getTime(),d=a.parseDate(a.selectedDates[0],void 0,!0).getTime(),e=Math.min(c,a.selectedDates[0].getTime()),h=Math.max(c,a.selectedDates[0].getTime()),g=a.daysContainer.children,n=g[0].children[0].dateObj.getTime();g=g[g.length-1].lastChild.dateObj.getTime();for(var k=!1,l=0,y=0;n<g;n+=Ea.DAY)D(new Date(n),!0)||(k=k||n>e&&n<h,n<d&&(!l||n>l)?l=n:n>d&&(!y||n<y)&& (y=n));for(var x=0;x<a.config.showMonths;x++){var p=a.daysContainer.children[x],q=a.daysContainer.children[x-1];e=function(f,e){var B=p.children[f];f=B.dateObj.getTime();if(e=0<l&&f<l||0<y&&f>y)return B.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(a){B.classList.remove(a)}),"continue";if(k&&!e)return"continue";["startRange","inRange","endRange","notAllowed"].forEach(function(a){B.classList.remove(a)});b.classList.add(c<a.selectedDates[0].getTime()?"startRange": "endRange");!p.contains(b)&&0<x&&q&&q.lastChild.dateObj.getTime()>=f||(d<c&&f===d?B.classList.add("startRange"):d>c&&f===d&&B.classList.add("endRange"),f>=l&&(0===y||f<=y)&&f>Math.min(d,c)&&f<Math.max(d,c)&&B.classList.add("inRange"))};h=0;for(n=p.children.length;h<n;h++)e(h,n)}}}function Ca(){!a.isOpen||a.config.static||a.config.inline||Q()}function qa(b){return function(c){c=a.config["_"+b+"Date"]=a.parseDate(c,a.config.dateFormat);var f=a.config["_"+("min"===b?"max":"min")+"Date"];void 0!==c&& (a["min"===b?"minDateHasTime":"maxDateHasTime"]=0<c.getHours()||0<c.getMinutes()||0<c.getSeconds());a.selectedDates&&(a.selectedDates=a.selectedDates.filter(function(a){return D(a)}),a.selectedDates.length||"min"!==b||y(c),z());a.daysContainer&&(ra(),void 0!==c?a.currentYearElement[b]=c.getFullYear().toString():a.currentYearElement.removeAttribute(b),a.currentYearElement.disabled=!!f&&void 0!==c&&f.getFullYear()===c.getFullYear())}}function Fa(){var b="wrap weekNumbers allowInput clickOpens time_24hr enableTime noCalendar altInput shorthandCurrentMonth inline static enableSeconds disableMobile".split(" "), f="onChange onClose onDayCreate onDestroy onKeyDown onMonthChange onOpen onParseConfig onReady onValueUpdate onYearChange onPreCalendarPosition".split(" "),e=Object.assign({},d,JSON.parse(JSON.stringify(c.dataset||{}))),m={};a.config.parseDate=e.parseDate;a.config.formatDate=e.formatDate;Object.defineProperty(a.config,"enable",{get:function(){return a.config._enable},set:function(b){a.config._enable=sa(b)}});Object.defineProperty(a.config,"disable",{get:function(){return a.config._disable},set:function(b){a.config._disable= sa(b)}});!e.dateFormat&&e.enableTime&&(m.dateFormat=e.noCalendar?"H:i"+(e.enableSeconds?":S":""):q.defaultConfig.dateFormat+" H:i"+(e.enableSeconds?":S":""));e.altInput&&e.enableTime&&!e.altFormat&&(m.altFormat=e.noCalendar?"h:i"+(e.enableSeconds?":S K":" K"):q.defaultConfig.altFormat+(" h:i"+(e.enableSeconds?":S":"")+" K"));Object.defineProperty(a.config,"minDate",{get:function(){return a.config._minDate},set:qa("min")});Object.defineProperty(a.config,"maxDate",{get:function(){return a.config._maxDate}, set:qa("max")});var h=function(b){return function(c){a.config["min"===b?"_minTime":"_maxTime"]=a.parseDate(c,"H:i")}};Object.defineProperty(a.config,"minTime",{get:function(){return a.config._minTime},set:h("min")});Object.defineProperty(a.config,"maxTime",{get:function(){return a.config._maxTime},set:h("max")});Object.assign(a.config,m,e);for(m=0;m<b.length;m++)a.config[b[m]]=!0===a.config[b[m]]||"true"===a.config[b[m]];for(b=f.length;b--;)void 0!==a.config[f[b]]&&(a.config[f[b]]=ta(a.config[f[b]]|| []).map(x));"time"===a.config.mode&&(a.config.noCalendar=!0,a.config.enableTime=!0);for(b=0;b<a.config.plugins.length;b++){m=a.config.plugins[b](a)||{};for(var g in m)~f.indexOf(g)?a.config[g]=ta(m[g]).map(x).concat(a.config[g]):"undefined"===typeof e[g]&&(a.config[g]=m[g])}a.isMobile=!a.config.disableMobile&&!a.config.inline&&"single"===a.config.mode&&!a.config.disable.length&&!a.config.enable.length&&!a.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); p("onParseConfig")}function ua(){"object"!==typeof a.config.locale&&"undefined"===typeof q.l10ns[a.config.locale]&&a.config.errorHandler(Error("flatpickr: invalid locale "+a.config.locale));a.l10n=Object.assign({},q.l10ns.default,"object"===typeof a.config.locale?a.config.locale:"default"!==a.config.locale?q.l10ns[a.config.locale]:void 0);fa.K="("+a.l10n.amPM[0]+"|"+a.l10n.amPM[1]+"|"+a.l10n.amPM[0].toLowerCase()+"|"+a.l10n.amPM[1].toLowerCase()+")";a.formatDate=va(a)}function Q(b){if(void 0!==a.calendarContainer){p("onPreCalendarPosition"); var c=b||a._positionElement,d=Array.prototype.reduce.call(a.calendarContainer.children,function(a,b){return a+b.offsetHeight},0);b=a.calendarContainer.offsetWidth;var e=a.config.position,h=c.getBoundingClientRect(),g=window.innerHeight-h.bottom;e="above"===e||"below"!==e&&g<d&&h.top>d;c=window.pageYOffset+h.top+(e?-d-2:c.offsetHeight+2);v(a.calendarContainer,"arrowTop",!e);v(a.calendarContainer,"arrowBottom",e);a.config.inline||(d=window.pageXOffset+h.left,h=window.document.body.offsetWidth-h.right, b=d+b>window.document.body.offsetWidth,v(a.calendarContainer,"rightMost",b),a.config.static||(a.calendarContainer.style.top=c+"px",b?(a.calendarContainer.style.left="auto",a.calendarContainer.style.right=h+"px"):(a.calendarContainer.style.left=d+"px",a.calendarContainer.style.right="auto")))}}function ra(){a.config.noCalendar||a.isMobile||(I(),P())}function pa(){a._input.focus();-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(a.close,0):a.close()}function la(b){b.preventDefault(); b.stopPropagation();b=ja(b.target,function(a){return a.classList&&a.classList.contains("flatpickr-day")&&!a.classList.contains("disabled")&&!a.classList.contains("notAllowed")});if(void 0!==b){var c=a.latestSelectedDateObj=new Date(b.dateObj.getTime()),d=(c.getMonth()<a.currentMonth||c.getMonth()>a.currentMonth+a.config.showMonths-1)&&"range"!==a.config.mode;a.selectedDateElem=b;if("single"===a.config.mode)a.selectedDates=[c];else if("multiple"===a.config.mode){var e=ba(c);e?a.selectedDates.splice(parseInt(e), 1):a.selectedDates.push(c)}else"range"===a.config.mode&&(2===a.selectedDates.length&&a.clear(!1),a.selectedDates.push(c),0!==r(c,a.selectedDates[0],!0)&&a.selectedDates.sort(function(a,b){return a.getTime()-b.getTime()}));F();d&&(e=a.currentYear!==c.getFullYear(),a.currentYear=c.getFullYear(),a.currentMonth=c.getMonth(),e&&p("onYearChange"),p("onMonthChange"));I();P();a.config.minDate&&a.minDateHasTime&&a.config.enableTime&&0===r(c,a.config.minDate)&&y(a.config.minDate);z();a.config.enableTime&&setTimeout(function(){return a.showTimeInput= !0},50);"range"===a.config.mode&&(1===a.selectedDates.length?V(b):I());d||"range"===a.config.mode||1!==a.config.showMonths?a.selectedDateElem&&a.selectedDateElem.focus():C(b);void 0!==a.hourElement&&setTimeout(function(){return void 0!==a.hourElement&&a.hourElement.select()},451);a.config.closeOnSelect&&(b="range"===a.config.mode&&2===a.selectedDates.length&&!a.config.enableTime,("single"===a.config.mode&&!a.config.enableTime||b)&&pa());U()}}function wa(b,c){var d=[];if(b instanceof Array)d=b.map(function(b){return a.parseDate(b, c)});else if(b instanceof Date||"number"===typeof b)d=[a.parseDate(b,c)];else if("string"===typeof b)switch(a.config.mode){case "single":d=[a.parseDate(b,c)];break;case "multiple":d=b.split(a.config.conjunction).map(function(b){return a.parseDate(b,c)});break;case "range":d=b.split(a.l10n.rangeSeparator).map(function(b){return a.parseDate(b,c)})}else a.config.errorHandler(Error("Invalid date supplied: "+JSON.stringify(b)));a.selectedDates=d.filter(function(a){return a instanceof Date&&D(a,!1)});"range"=== a.config.mode&&a.selectedDates.sort(function(a,b){return a.getTime()-b.getTime()})}function sa(b){return b.map(function(b){return"string"===typeof b||"number"===typeof b||b instanceof Date?a.parseDate(b,void 0,!0):b&&"object"===typeof b&&b.from&&b.to?{from:a.parseDate(b.from,void 0),to:a.parseDate(b.to,void 0)}:b}).filter(function(a){return a})}function Ga(){a.selectedDates=[];a.now=a.parseDate(a.config.now)||new Date;var b=a.config.defaultDate||a.input.value;b&&wa(b,a.config.dateFormat);b=0<a.selectedDates.length? a.selectedDates[0]:a.config.minDate&&a.config.minDate.getTime()>a.now.getTime()?a.config.minDate:a.config.maxDate&&a.config.maxDate.getTime()<a.now.getTime()?a.config.maxDate:a.now;a.currentYear=b.getFullYear();a.currentMonth=b.getMonth();0<a.selectedDates.length&&(a.latestSelectedDateObj=a.selectedDates[0]);void 0!==a.config.minTime&&(a.config.minTime=a.parseDate(a.config.minTime,"H:i"));void 0!==a.config.maxTime&&(a.config.maxTime=a.parseDate(a.config.maxTime,"H:i"));a.minDateHasTime=!!a.config.minDate&& (0<a.config.minDate.getHours()||0<a.config.minDate.getMinutes()||0<a.config.minDate.getSeconds());a.maxDateHasTime=!!a.config.maxDate&&(0<a.config.maxDate.getHours()||0<a.config.maxDate.getMinutes()||0<a.config.maxDate.getSeconds());Object.defineProperty(a,"showTimeInput",{get:function(){return a._showTimeInput},set:function(b){a._showTimeInput=b;a.calendarContainer&&v(a.calendarContainer,"showTimeInput",b);a.isOpen&&Q()}})}function Ba(){var b=a.config.enableTime?a.config.noCalendar?"time":"datetime-local": "date";a.mobileInput=g("input",a.input.className+" flatpickr-mobile");a.mobileInput.step=a.input.getAttribute("step")||"any";a.mobileInput.tabIndex=1;a.mobileInput.type=b;a.mobileInput.disabled=a.input.disabled;a.mobileInput.required=a.input.required;a.mobileInput.placeholder=a.input.placeholder;a.mobileFormatStr="datetime-local"===b?"Y-m-d\\TH:i:S":"date"===b?"Y-m-d":"H:i:S";0<a.selectedDates.length&&(a.mobileInput.defaultValue=a.mobileInput.value=a.formatDate(a.selectedDates[0],a.mobileFormatStr)); a.config.minDate&&(a.mobileInput.min=a.formatDate(a.config.minDate,"Y-m-d"));a.config.maxDate&&(a.mobileInput.max=a.formatDate(a.config.maxDate,"Y-m-d"));a.input.type="hidden";void 0!==a.altInput&&(a.altInput.type="hidden");try{a.input.parentNode&&a.input.parentNode.insertBefore(a.mobileInput,a.input.nextSibling)}catch(f){}h(a.mobileInput,"change",function(b){a.setDate(b.target.value,!1,a.mobileFormatStr);p("onChange");p("onClose")})}function p(b,c){var d=a.config[b];if(void 0!==d&&0<d.length)for(var f= 0;d[f]&&f<d.length;f++)d[f](a.selectedDates,a.input.value,a,c);"onChange"===b&&(a.input.dispatchEvent(Z("change")),a.input.dispatchEvent(Z("input")))}function Z(a){var b=document.createEvent("Event");b.initEvent(a,!0,!0);return b}function ba(b){for(var c=0;c<a.selectedDates.length;c++)if(0===r(a.selectedDates[c],b))return""+c;return!1}function I(){a.config.noCalendar||a.isMobile||!a.monthNav||(a.yearElements.forEach(function(b,c){var d=new Date(a.currentYear,a.currentMonth,1);d.setMonth(a.currentMonth+ c);a.monthElements[c].textContent=ha(d.getMonth(),a.config.shorthandCurrentMonth,a.l10n)+" ";b.value=d.getFullYear().toString()}),a._hidePrevMonthArrow=void 0!==a.config.minDate&&(a.currentYear===a.config.minDate.getFullYear()?a.currentMonth<=a.config.minDate.getMonth():a.currentYear<a.config.minDate.getFullYear()),a._hideNextMonthArrow=void 0!==a.config.maxDate&&(a.currentYear===a.config.maxDate.getFullYear()?a.currentMonth+1>a.config.maxDate.getMonth():a.currentYear>a.config.maxDate.getFullYear()))} function z(b){void 0===b&&(b=!0);if(0===a.selectedDates.length)return a.clear(b);void 0!==a.mobileInput&&a.mobileFormatStr&&(a.mobileInput.value=void 0!==a.latestSelectedDateObj?a.formatDate(a.latestSelectedDateObj,a.mobileFormatStr):"");var c="range"!==a.config.mode?a.config.conjunction:a.l10n.rangeSeparator;a.input.value=a.selectedDates.map(function(b){return a.formatDate(b,a.config.dateFormat)}).join(c);void 0!==a.altInput&&(a.altInput.value=a.selectedDates.map(function(b){return a.formatDate(b, a.config.altFormat)}).join(c));!1!==b&&p("onValueUpdate")}function Da(b){var c=a.prevMonthNav.contains(b.target),d=a.nextMonthNav.contains(b.target);c||d?da(c?-1:1):0<=a.yearElements.indexOf(b.target)?(b.preventDefault(),b.target.select()):b.target.classList.contains("arrowUp")?a.changeYear(a.currentYear+1):b.target.classList.contains("arrowDown")&&a.changeYear(a.currentYear-1)}function za(b){b.preventDefault();var c="keydown"===b.type,d=b.target;void 0!==a.amPM&&b.target===a.amPM&&(a.amPM.textContent= a.l10n.amPM[t(a.amPM.textContent===a.l10n.amPM[0])]);var e=parseFloat(d.getAttribute("data-min")),h=parseFloat(d.getAttribute("data-max")),g=parseFloat(d.getAttribute("data-step")),k=parseInt(d.value,10);b=k+g*(b.delta||(c?38===b.which?1:-1:0));if("undefined"!==typeof d.value&&2===d.value.length){c=d===a.hourElement;var l=d===a.minuteElement;b<e?(b=h+b+t(!c)+(t(c)&&t(!a.amPM)),l&&Y(void 0,-1,a.hourElement)):b>h&&(b=d===a.hourElement?b-h-t(!a.amPM):e,l&&Y(void 0,1,a.hourElement));a.amPM&&c&&(1===g? 23===b+k:Math.abs(b-k)>g)&&(a.amPM.textContent=a.l10n.amPM[t(a.amPM.textContent===a.l10n.amPM[0])]);d.value=u(b)}}var a={config:Object.assign({},q.defaultConfig),l10n:J};a.parseDate=xa({config:a.config,l10n:a.l10n});a._handlers=[];a._bind=h;a._setHoursFromDate=y;a.changeMonth=da;a.changeYear=T;a.clear=function(b){void 0===b&&(b=!0);a.input.value="";void 0!==a.altInput&&(a.altInput.value="");void 0!==a.mobileInput&&(a.mobileInput.value="");a.selectedDates=[];a.latestSelectedDateObj=void 0;a.showTimeInput= !1;!0===a.config.enableTime&&(void 0!==a.config.minDate?y(a.config.minDate):S(a.config.defaultHour,a.config.defaultMinute,a.config.defaultSeconds));a.redraw();b&&p("onChange")};a.close=function(){a.isOpen=!1;a.isMobile||(a.calendarContainer.classList.remove("open"),a._input.classList.remove("active"));p("onClose")};a._createElement=g;a.destroy=function(){void 0!==a.config&&p("onDestroy");for(var b=a._handlers.length;b--;){var c=a._handlers[b];c.element.removeEventListener(c.event,c.handler)}a._handlers= [];a.mobileInput?(a.mobileInput.parentNode&&a.mobileInput.parentNode.removeChild(a.mobileInput),a.mobileInput=void 0):a.calendarContainer&&a.calendarContainer.parentNode&&a.calendarContainer.parentNode.removeChild(a.calendarContainer);a.altInput&&(a.input.type="text",a.altInput.parentNode&&a.altInput.parentNode.removeChild(a.altInput),delete a.altInput);a.input&&(a.input.type=a.input._type,a.input.classList.remove("flatpickr-input"),a.input.removeAttribute("readonly"),a.input.value="");"_showTimeInput latestSelectedDateObj _hideNextMonthArrow _hidePrevMonthArrow __hideNextMonthArrow __hidePrevMonthArrow isMobile isOpen selectedDateElem minDateHasTime maxDateHasTime days daysContainer _input _positionElement innerContainer rContainer monthNav todayDateElem calendarContainer weekdayContainer prevMonthNav nextMonthNav currentMonthElement currentYearElement navigationCurrentMonth selectedDateElem config".split(" ").forEach(function(b){try{delete a[b]}catch(m){}})}; a.isEnabled=D;a.jumpToDate=X;a.open=function(b,c){void 0===c&&(c=a._input);!0===a.isMobile?(b&&(b.preventDefault(),b.target&&b.target.blur()),setTimeout(function(){void 0!==a.mobileInput&&a.mobileInput.click()},0),p("onOpen")):a._input.disabled||a.config.inline||(b=a.isOpen,a.isOpen=!0,b||(a.calendarContainer.classList.add("open"),a._input.classList.add("active"),p("onOpen"),Q(c)),!0===a.config.enableTime&&!0===a.config.noCalendar&&(0===a.selectedDates.length&&(a.setDate(void 0!==a.config.minDate? new Date(a.config.minDate.getTime()):(new Date).setHours(a.config.defaultHour,a.config.defaultMinute,a.config.defaultSeconds,0),!1),F(),z()),setTimeout(function(){return a.hourElement.select()},50)))};a.redraw=ra;a.set=function(b,c){null!==b&&"object"===typeof b?Object.assign(a.config,b):(a.config[b]=c,void 0!==ya[b]&&ya[b].forEach(function(a){return a()}));a.redraw();X()};a.setDate=function(b,c,d){void 0===c&&(c=!1);void 0===d&&(d=a.config.dateFormat);if(0!==b&&!b)return a.clear(c);wa(b,d);a.showTimeInput= 0<a.selectedDates.length;a.latestSelectedDateObj=a.selectedDates[0];a.redraw();X();y();z(c);c&&p("onChange")};a.toggle=function(){if(a.isOpen)return a.close();a.open()};var ya={locale:[ua,oa],showMonths:[ma,k,na]};(function(){a.element=a.input=c;a.isOpen=!1;Fa();ua();a.input=a.config.wrap?c.querySelector("[data-input]"):c;a.input?(a.input._type=a.input.type,a.input.type="text",a.input.classList.add("flatpickr-input"),a._input=a.input,a.config.altInput&&(a.altInput=g(a.input.nodeName,a.input.className+ " "+a.config.altInputClass),a._input=a.altInput,a.altInput.placeholder=a.input.placeholder,a.altInput.disabled=a.input.disabled,a.altInput.required=a.input.required,a.altInput.tabIndex=a.input.tabIndex,a.altInput.type="text",a.input.type="hidden",!a.config.static&&a.input.parentNode&&a.input.parentNode.insertBefore(a.altInput,a.input.nextSibling)),a.config.allowInput||a._input.setAttribute("readonly","readonly"),a._positionElement=a.config.positionElement||a._input):a.config.errorHandler(Error("Invalid input element specified")); Ga();e();if(!a.isMobile){var b=window.document.createDocumentFragment();a.calendarContainer=g("div","flatpickr-calendar");a.calendarContainer.tabIndex=-1;if(!a.config.noCalendar){b.appendChild(R());a.innerContainer=g("div","flatpickr-innerContainer");if(a.config.weekNumbers){a.calendarContainer.classList.add("hasWeeks");var d=g("div","flatpickr-weekwrapper");d.appendChild(g("span","flatpickr-weekday",a.l10n.weekAbbreviation));var h=g("div","flatpickr-weeks");d.appendChild(h);a.innerContainer.appendChild(d); a.weekNumbers=h;a.weekWrapper=d}a.rContainer=g("div","flatpickr-rContainer");a.rContainer.appendChild(na());a.daysContainer||(a.daysContainer=g("div","flatpickr-days"),a.daysContainer.tabIndex=-1);P();a.rContainer.appendChild(a.daysContainer);a.innerContainer.appendChild(a.rContainer);b.appendChild(a.innerContainer)}a.config.enableTime&&b.appendChild(ia());v(a.calendarContainer,"rangeMode","range"===a.config.mode);v(a.calendarContainer,"animate",!0===a.config.animate);v(a.calendarContainer,"multiMonth", 1<a.config.showMonths);a.calendarContainer.appendChild(b);b=void 0!==a.config.appendTo&&void 0!==a.config.appendTo.nodeType;if(a.config.inline||a.config.static)a.calendarContainer.classList.add(a.config.inline?"inline":"static"),a.config.inline&&(!b&&a.element.parentNode?a.element.parentNode.insertBefore(a.calendarContainer,a._input.nextSibling):void 0!==a.config.appendTo&&a.config.appendTo.appendChild(a.calendarContainer)),a.config.static&&(b=g("div","flatpickr-wrapper"),a.element.parentNode&&a.element.parentNode.insertBefore(b, a.element),b.appendChild(a.element),a.altInput&&b.appendChild(a.altInput),b.appendChild(a.calendarContainer));a.config.static||a.config.inline||(void 0!==a.config.appendTo?a.config.appendTo:window.document.body).appendChild(a.calendarContainer)}Aa();if(a.selectedDates.length||a.config.noCalendar)a.config.enableTime&&y(a.config.noCalendar?a.latestSelectedDateObj||a.config.minDate:void 0),z(!1);k();a.showTimeInput=0<a.selectedDates.length||a.config.noCalendar;b=/^((?!chrome|android).)*safari/i.test(navigator.userAgent); !a.isMobile&&b&&Q();p("onReady")})();return a}function A(c,d){c=Array.prototype.slice.call(c);for(var e=[],g=0;g<c.length;g++){var k=c[g];try{null===k.getAttribute("data-fp-omit")&&(void 0!==k._flatpickr&&(k._flatpickr.destroy(),k._flatpickr=void 0),k._flatpickr=R(k,d||{}),e.push(k._flatpickr))}catch(l){console.error(l)}}return 1===e.length?e[0]:e}var u=function(c){return("0"+c).slice(-2)},t=function(c){return!0===c?1:0},ta=function(c){return c instanceof Array?c:[c]},K=function(){},ha=function(c, d,e){return e.months[d?"shorthand":"longhand"][c]},ia={D:K,F:function(c,d,e){c.setMonth(e.months.longhand.indexOf(d))},G:function(c,d){c.setHours(parseFloat(d))},H:function(c,d){c.setHours(parseFloat(d))},J:function(c,d){c.setDate(parseFloat(d))},K:function(c,d,e){c.setHours(c.getHours()%12+12*t((new RegExp(e.amPM[1],"i")).test(d)))},M:function(c,d,e){c.setMonth(e.months.shorthand.indexOf(d))},S:function(c,d){c.setSeconds(parseFloat(d))},U:function(c,d){return new Date(1E3*parseFloat(d))},W:function(c, d){d=parseInt(d);return new Date(c.getFullYear(),0,2+7*(d-1),0,0,0,0)},Y:function(c,d){c.setFullYear(parseFloat(d))},Z:function(c,d){return new Date(d)},d:function(c,d){c.setDate(parseFloat(d))},h:function(c,d){c.setHours(parseFloat(d))},i:function(c,d){c.setMinutes(parseFloat(d))},j:function(c,d){c.setDate(parseFloat(d))},l:K,m:function(c,d){c.setMonth(parseFloat(d)-1)},n:function(c,d){c.setMonth(parseFloat(d)-1)},s:function(c,d){c.setSeconds(parseFloat(d))},w:K,y:function(c,d){c.setFullYear(2E3+ parseFloat(d))}},fa={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)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},E={Z:function(c){return c.toISOString()},D:function(c,d,e){return d.weekdays.shorthand[E.w(c,d,e)]},F:function(c,d,e){return ha(E.n(c,d,e)-1,!1,d)},G:function(c, d,e){return u(E.h(c,d,e))},H:function(c){return u(c.getHours())},J:function(c,d){return void 0!==d.ordinal?c.getDate()+d.ordinal(c.getDate()):c.getDate()},K:function(c,d){return d.amPM[t(11<c.getHours())]},M:function(c,d){return ha(c.getMonth(),!0,d)},S:function(c){return u(c.getSeconds())},U:function(c){return c.getTime()/1E3},W:function(c,d,e){return e.getWeek(c)},Y:function(c){return c.getFullYear()},d:function(c){return u(c.getDate())},h:function(c){return c.getHours()%12?c.getHours()%12:12}, i:function(c){return u(c.getMinutes())},j:function(c){return c.getDate()},l:function(c,d){return d.weekdays.longhand[c.getDay()]},m:function(c){return u(c.getMonth()+1)},n:function(c){return c.getMonth()+1},s:function(c){return c.getSeconds()},w:function(c){return c.getDay()},y:function(c){return String(c.getFullYear()).substring(2)}},J={weekdays:{shorthand:"Sun Mon Tue Wed Thu Fri Sat".split(" "),longhand:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")},months:{shorthand:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), longhand:"January February March April May June July August September October November December".split(" ")},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(c){c%=100;if(3<c&&21>c)return"th";switch(c%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"},va=function(c){var d=c.config,e=void 0=== d?C:d;c=c.l10n;var g=void 0===c?J:c;return function(c,d,x){if(void 0!==e.formatDate)return e.formatDate(c,d);var k=x||g;return d.split("").map(function(d,g,h){return E[d]&&"\\"!==h[g-1]?E[d](c,k,e):"\\"!==d?d:""}).join("")}},xa=function(c){var d=c.config,e=void 0===d?C:d;c=c.l10n;var g=void 0===c?J:c;return function(c,d,x){if(0===c||c){if(c instanceof Date)var k=new Date(c.getTime());else if("string"!==typeof c&&void 0!==c.toFixed)k=new Date(c);else if("string"===typeof c){d=d||(e||C).dateFormat; var l=String(c).trim();if("today"===l)k=new Date,x=!0;else if(/Z$/.test(l)||/GMT$/.test(l))k=new Date(c);else if(e&&e.parseDate)k=e.parseDate(c,d);else{k=e&&e.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);var q;l=[];for(var h=0,r=0,u="";h<d.length;h++){var t=d[h],v="\\"===t,A="\\"===d[h-1]||v;if(fa[t]&&!A){if(u+=fa[t],(v=(new RegExp(u)).exec(c))&&(q=!0))l["Y"!==t?"push":"unshift"]({fn:ia[t],val:v[++r]})}else v||(u+=".");l.forEach(function(c){var d= c.fn;return k=d(k,c.val,g)||k})}k=q?k:void 0}}if(k instanceof Date)return!0===x&&k.setHours(0,0,0,0),k;e.errorHandler(Error("Invalid date provided: "+c))}}},Ea={DAY:864E5},C={_disable:[],_enable:[],allowInput:!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",clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[], disableMobile:!1,enable:[],enableSeconds:!1,enableTime:!1,errorHandler:function(c){return"undefined"!==typeof console&&console.warn(c)},getWeek:function(c){c=new Date(c.getTime());c.setHours(0,0,0,0);c.setDate(c.getDate()+3-(c.getDay()+6)%7);var d=new Date(c.getFullYear(),0,4);return 1+Math.round(((c.getTime()-d.getTime())/864E5-3+(d.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",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};"function"!==typeof Object.assign&&(Object.assign=function(c){if(!c)throw TypeError("Cannot convert undefined or null to object");for(var d=arguments.length,e=Array(1<d?d-1:0),g=1;g<d;g++)e[g-1]=arguments[g];d=function(d){d&&Object.keys(d).forEach(function(e){return c[e]=d[e]})};for(g=0;g<e.length;g++)d(e[g]);return c});"undefined"!==typeof HTMLElement&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(c){return A(this, c)},HTMLElement.prototype.flatpickr=function(c){return A([this],c)});var q=function(c,d){return c instanceof NodeList?A(c,d):"string"===typeof c?A(window.document.querySelectorAll(c),d):A([c],d)};q.defaultConfig=C;q.l10ns={en:Object.assign({},J),default:Object.assign({},J)};q.localize=function(c){q.l10ns.default=Object.assign({},q.l10ns.default,c)};q.setDefaults=function(c){q.defaultConfig=Object.assign({},q.defaultConfig,c)};q.parseDate=xa({});q.formatDate=va({});q.compareDates=r;"undefined"!==typeof jQuery&& (jQuery.fn.flatpickr=function(c){return A(this,c)});Date.prototype.fp_incr=function(c){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"===typeof c?parseInt(c,10):c))};return q}); ; // *************************** // js.compressed/flatpickr.js // *************************** vBulletin.precache("january february march april may june july august september october november december january_short february_short march_short april_short may_short june_short july_short august_short september_short october_short november_short december_short sunday monday tuesday wednesday thursday friday saturday sunday_short monday_short tuesday_short wednesday_short thursday_short friday_short saturday_short datepicker_am datepicker_clicktotoggle datepicker_pm datepicker_rangeseparator datepicker_scrolltoincrement datepicker_weekabbreviation datepicker_year".split(" "), ["pickerdateformat"]); vBulletin.flatpickr=function(f){function m(a,b){var c="january february march april may june july august september october november december".split(" "),d="sunday monday tuesday wednesday thursday friday saturday".split(" "),e="long"==b?"":"_short",g=[];f.each("month"==a?c:d,function(a,b){g.push(vBulletin.phrase.get(b+e))});return g}function y(){var a=vBulletin.options.get("pickerdateformat"),b="",c="";pageData.user_lang_pickerdateformatoverride&&(a=pageData.user_lang_pickerdateformatoverride);var d= "",e=null,g=null,k=null,q=null,h=!1,t=!1;f.each(a.split(""),function(a,b){var c=!!b.match(/[GHhiSsK]/),f=!!b.match(/[a-z]/i);"\\"!=d&&(c?("K"===b&&(h=!0),"h"===b&&(t=!0),null===e&&(e=a),g=a):f&&!c&&(null===k&&(k=a),q=a));d=b});if(g<k){var l=g+1;c=a.slice(0,l);b=a.slice(l)}else q<e?(l=q+1,b=a.slice(0,l),c=a.slice(l)):c=b=a;return{datetime:a,date:b,time:c,use24hour:!(h||t)}}function z(a,b){f.each("onChange onClose onOpen onMonthChange onYearChange onReady onValueUpdate onDayCreate".split(" "),function(c, d){"function"==typeof b[d]&&(b[d]=[b[d]]);"function"==typeof a[d]&&(a[d]=[a[d]])});return f.extend(!0,{},a,b)}function n(a,b,c){b=b||{};var d=y(),e={time_24hr:d.use24hour,onReady:A,onOpen:B,onChange:C,onPreCalendarPosition:D,altInput:!0,locale:{weekdays:{shorthand:m("weekday","short"),longhand:m("weekday","long")},months:{shorthand:m("month","short"),longhand:m("month","long")},rangeSeparator:vBulletin.phrase.get("datepicker_rangeseparator"),weekAbbreviation:vBulletin.phrase.get("datepicker_weekabbreviation"), scrollTitle:vBulletin.phrase.get("datepicker_scrolltoincrement"),toggleTitle:vBulletin.phrase.get("datepicker_clicktotoggle"),amPM:[vBulletin.phrase.get("datepicker_am"),vBulletin.phrase.get("datepicker_pm")],yearAriaLabel:vBulletin.phrase.get("datepicker_year"),firstDayOfWeek:(parseInt(pageData.user_startofweek,10)||1)-1}};vBulletin.isRtl()&&(e.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='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>", e.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='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>");switch(c){case "date":e.enableTime=!1;e.noCalendar=!1;e.dateFormat="m/d/Y";e.altFormat=d.date;break;case "time":e.enableTime=!0;e.noCalendar=!0;e.dateFormat="H:i";e.altFormat=d.time;break;case "datetime":e.enableTime=!0,e.noCalendar=!1,e.dateFormat="m/d/Y H:i", e.altFormat=d.datetime}b=z(e,b);a.flatpickr(b);a.attr("data-vb-flatpicker-initialized",c);a.trigger("vb-flatpicker-initialized")}function u(a,b){n(a,b,"date")}function v(a,b){n(a,b,"time")}function w(a,b){n(a,b,"datetime")}function r(a){var b=a.find(".js-daterange--min[data-vb-flatpicker-initialized]"),c=a.find(".js-daterange--max[data-vb-flatpicker-initialized]");if(a.data("vb-daterange-initialized"))return!0;if(!b.length)return f(".js-daterange--min",a).one("vb-flatpicker-initialized",function(){r(a)}), !0;if(!c.length)return f(".js-daterange--max",a).one("vb-flatpicker-initialized",function(){r(a)}),!0;if(b.length&&c.length){var d=vBulletin.flatpickr.getInstance(b),e=vBulletin.flatpickr.getInstance(c);if(!d||!e)return!0;b=d.config.onChange;c=function(){var a=!1;return function(b,c,d,f){a||(a=!0,c&&e.set("minDate",c),a=!1)}}();var g=e.config.onChange,k=function(){var a=!1;return function(b,c,e,f){a||(a=!0,c&&d.set("maxDate",c),a=!1)}}();b.push(c);d.set("onChange",b);g.push(k);e.set("onChange",g)}a.attr("data-vb-daterange-initialized", 1)}function x(){f(".js-datepicker").each(function(){u(f(this))});f(".js-timepicker").each(function(){v(f(this))});f(".js-datetimepicker").each(function(){w(f(this))});f(".js-daterange").each(function(){r(f(this))})}function h(a){try{return a.get(0)._flatpickr}catch(b){}return null}function p(a){if(vBulletin.isRtl()&&a&&a.calendarContainer&&a._positionElement){var b=a.calendarContainer,c=a._positionElement;a=b.offsetWidth;var d=c.offsetWidth;c=c.getBoundingClientRect();var e=window.document.body.offsetWidth- c.right;window.pageXOffset+c.left+d<a||f(b).addClass("rightMost").css({left:"auto",right:e+"px"})}}function A(a,b,c,d){p(c)}function B(a,b,c,d){a=f(c.element);p(c);"1"==a.data("vb-flatpickr-disabled")&&c.close()}function C(a,b,c,d){f(c.element).change();p(c)}function D(a,b,c,d){setTimeout(function(){p(c);var a=f(c.calendarContainer),b=a.find(".flatpickr-days"),d=b.find(".dayContainer");b=b.outerWidth();d=d.outerWidth();a=a.closest(".flatpickr-calendar");b&&d&&b>d&&a.width(d-1)},0)}f(function(){x()}); return{initPickers:x,getInstance:h,disablePicker:function(a){var b=h(a);b&&(a.data("vb-flatpickr-disabled","1"),b.clear(),b.close())},enablePicker:function(a){h(a)&&a.data("vb-flatpickr-disabled","0")},initDatePicker:u,initTimePicker:v,initDateTimePicker:w,changePickerType:function(a,b){var c=h(a),d=a.val();c&&(c.destroy(),n(a,null,b),c=h(a),c.setDate(d))}}}(jQuery); ; // *************************** // js.compressed/sb_search.js // *************************** vBulletin.precache("error error_adding_search_tips_code_x invalid_json_string invalid_search_syntax invalid_server_response_please_try_again search_tag_cloud please_select_past_date please_select_valid_date_range content_type_Text content_type_Gallery content_type_Link content_type_Photo content_type_Poll content_type_PrivateMessage content_type_Video save_as_search_module saved_search_module_as_x search_module_already_exists search_module_not_found please_enter_search_module_name error_saving_search_module_x".split(" "), []); (function(c){if(!vBulletin.pageHasSelectors([".search-fields-widget",".search-results-widget","#search-config-dialog"]))return!1;vBulletin.search=vBulletin.search||{};vBulletin.search.SearchControl=function(h){function g(a){if("undefined"==typeof a){a=q();if(!a)return!1;a=JSON.stringify(a)}e.val(a);b.find(".form_row.form-row-json").removeClass("h-hide-imp").nextAll().hide();m.toggle(!1);p.toggle(!0)}function r(a){if(!b.find(".searchAdvancedFields").is(":visible")){a=q();if(!a)return!1;if(!(a.author||a.channel|| a.keywords||a.tag||a.type||a.date||a.last_visit||a.my_following||a.eventstartdate))return vBulletin.warning("error","error_no_criteria"),!1;b.find(".searchFields_searchJSON").val(JSON.stringify(a));b.find("form.advSearchForm").append(c('input[name^="humanverify"]').clone().attr("type","hidden"))}}function q(){var a={};if(b.find(".searchSwitchToForm").is(":visible")){a=JSON.parse(b.find(".searchFields_searchJSON").val()||"{}");if(0==a.length){vBulletin.warning("error","invalid_json_string");return}return a}var f= b.find(".js-search-keywords");0<f.length&&0<c.trim(f.val()).length&&(a.keywords=c.trim(f.val()));0<b.find(".searchFields_title_only:checked").length&&(a.title_only=1);0<b.find(".searchFields_starter_only:checked").length&&(a.starter_only=1);0<b.find(".searchFields_myFriends:checked").length?a.author="myFriends":0<b.find(".searchFields_iFollow:checked").length?a.author="iFollow":u&&(f=u.getLabels(),0<f.length&&(a.author=f));0<b.find(".tag-input").length&&(f=b.find(".tag-input").val(),0<f.length&&(f= f.split(","),0<f.length&&(a.tag=f)));if(0<b.find(".searchFields_last_visit:checked").length)a.date="lastVisit";else{f={};var e=b.find(".searchFields_from_days");if(0<e.length&&0<c.trim(e.val()).length)f.from=c.trim(e.val());else{var l=b.find(".searchFields_from_date");e=Date.now();if(0<l.length&&0<c.trim(l.val()).length){var d=Date.parse(l.val());if(0>=d)return vBulletin.warning("error","invalid_start_date"),!1;if(d>e)return vBulletin.warning("error","please_select_past_date"),!1;f.from=c.trim(l.val())}l= b.find(".searchFields_to_date");if(0<l.length&&0<c.trim(l.val()).length){var k=Date.parse(l.val());if(0>=k)return vBulletin.warning("error","invalid_end_date"),!1;if(k>e)return vBulletin.warning("error","please_select_past_date"),!1;if(d&&d>k)return vBulletin.warning("error","please_select_valid_date_range"),!1;f.to=c.trim(l.val())}}c.isEmptyObject(f)||(a.date=f)}d=["eventstartdate","eventenddate"];f=d.length;for(e=0;e<f;e++){k=d[e];l=b.find('[name="searchFields['+k+'][from]"]');l=l.length&&l.val().trim()|| "";k=b.find('[name="searchFields['+k+'][to]"]');k=k.length&&k.val().trim()||"";var g={};l&&(g.from=l);k&&(g.to=k);c.isEmptyObject(g)||(a.eventstartdate=g)}d=b.find(".searchFields_featured");0<d.length&&d.prop("checked")&&(a.featured=1);d=b.find(".searchFields_my_following");0<d.length&&d.prop("checked")&&(a.my_following=1);var h=[];b.find(".searchFields_type:checked").each(function(a,b){h.push(c(b).val())});0<c(h).length&&(a.type=h);if(0<b.find(".searchFields_channel_param:checked").length)a.channel= {param:"channelid"};else if(d=b.find("select.searchFields_channel"),0<d.length&&(d=d.val()))a.channel=d;d=b.find(".searchFields_order_field");f=b.find(".searchFields_order_direction");0<d.length&&0<f.length&&""!=d.val()&&(a.sort=d.val(),""!=f.val()&&(a.sort={},a.sort[d.val()]=f.val()));d=b.find(".searchFields_view");0<d.length&&(a.view=d.val());d=b.find(".searchFields_exclude");0<d.length&&0<c.trim(d.val()).length&&(a.exclude=c.trim(d.val()).split(","));d=b.find(".searchFields_exclude_type");0<d.length&& 0<c.trim(d.val()).length&&(a.exclude_type=c.trim(d.val()).split(","));0<b.find('input[name="searchFields[approved_only]"]:checked').length&&(a.approved_only=1);d=b.find('input[name="searchFields[has_answer]"]:checked');0<d.length&&(a.has_answer=d[0].value);return a}function t(a,f,n,l){l=a;if("string"==typeof a)try{if(a=JSON.parse(a||"{}"),0==a.length)return vBulletin.warning("error","invalid_json_string"),!1}catch(A){return vBulletin.warning("error","invalid_json_string"),!1}else l=JSON.stringify(a); var d=b.find(".js-search-keywords");0<d.length&&(d.val(a.keywords||""),delete a.keywords);c.each({".searchFields_myFriends":"myFriends",".searchFields_iFollow":"iFollow"},function(c,d){c=b.find(c);0<c.length&&((d=a.author&&a.author==d)&&delete a.author,c.prop("checked",d))});0<b.find(".searchFields_author").length&&(d=!1,c.isArray(a.author)?d=a.author:a.exactname&&(d=[a.author]),d&&(u.setElements(d),delete a.author,delete a.exactname));d=b.find(".tag-input");if(0<d.length){var k=a.tag||[];Array.isArray(k)|| (k=[k]);d.val(k);x.setTags(k);b.find(".tag-list span").html(k.join(", "));delete a.tag}var h=b.find(".searchFields_last_visit"),m=a.date&&a.date&&"lastVisit"==a.date;0<h.length&&(h.prop("checked",m),m&&delete a.date);c.each({".searchFields_from_date":"from",".searchFields_to_date":"to",".searchFields_from_days":"from"},function(c,d){c=b.find(c);if(0<c.length&&(vBulletin.flatpickr&&vBulletin.flatpickr.getInstance(c)&&(h.is(":checked")?vBulletin.flatpickr.disablePicker(c):vBulletin.flatpickr.enablePicker(c)), !m)){var e="";a.date&&a.date[d]&&(e=a.date[d],delete a.date[d]);c.val(e)}});c.isEmptyObject(a.date)&&delete a.date;d=["eventstartdate","eventenddate"];k=d.length;for(var p=0;p<k;p++){var v=d[p],q=b.find('[name="searchFields['+v+'][from]"]'),r=b.find('[name="searchFields['+v+'][to]"]');a[v]&&(a[v].to&&r.length&&r.val(a[v].to),a[v].from&&q.length&&q.val(a[v].from));delete a[v]}c.each({".searchFields_featured":"featured",".searchFields_my_following":"my_following",".searchFields_starter_only":"starter_only", ".searchFields_title_only":"title_only",'input[name="searchFields[approved_only]"]':"approved_only"},function(c,d){c=b.find(c);0<c.length&&(c.prop("checked",a[d]?!0:!1),delete a[d])});c.each({'input[name="searchFields[has_answer]"]':"has_answer"},function(c,d){c=b.find(c);let e=a[d];c.each((b,c)=>{null==e?c.checked=null!=c.attributes.checked:c.value==e?(delete a[d],c.checked=!0):c.checked=!1})});d=b.find(".searchFields_type_container");if(0<d.length){if(f){var t=d.find(".field-desc");t.prevAll().remove(); c.each(f,function(a,b){"vBForum_PrivateMessage"!=a&&t.before(c('<label><input type="checkbox" name="searchFields[type][]" class="searchFields_type" value="'+a+'" /><span>'+vBulletin.phrase.get("content_type_"+b["class"])+"</span></label>"))})}b.find(".searchFields_type").val(a.type||[]);delete a.type;delete a.exclude_type}f=b.find(".searchFields_channel");0<f.length&&(n&&f.selectBox("options",w(n)),a.channel&&f.selectBox("value",c.makeArray(a.channel)));delete a.channel;n=b.find("select.searchFields_order_direction"); f=b.find("select.searchFields_order_field");var y="",z="";a.sort&&("string"==typeof a.sort?y=a.sort:"object"==typeof a.sort&&c.each(a.sort,function(a,b){y=a;z=b}),delete a.sort);0<n.length&&n.selectBox("value",z);0<f.length&&f.selectBox("value",y);n=b.find("select.searchFields_view");0<n.length&&(n.selectBox("value",a.view||""),delete a.view);if(c.isEmptyObject(a))e.val(l);else return g(l),!1;return!0}function w(a){var b="";c.each(a,function(a,e){b+=c("<option></option>").val(a).html(str_repeat(" ", 3*e.depth).concat(e.htmltitle));e.channels&&(b+=addChannels(e.channels))});return b}var b=c(h),x=!1,u=!1,m=b.find(".searchSwitchToAdvanced"),p=b.find(".searchSwitchToForm"),e=b.find(".searchFields_searchJSON");this.load=function(){return q()};this.set=function(a,b,c,e){return t(a,b,c,e)};(function(){var a=m.is(":visible"),e=p.is(":visible");a==e&&(m.toggle(!0),p.toggle(!1),b.find(".form_row.form-row-json").addClass("h-hide-imp").nextAll().show());m.off("click").on("click",()=>{g()});p.off("click").on("click", ()=>{t(b.find(".searchFields_searchJSON").val())&&(m.toggle(!0),p.toggle(!1),b.find(".form_row.form-row-json").addClass("h-hide-imp").nextAll().show())});var n=b.find(".advSearchForm");0<n.length&&n.submit(r);x=new vBulletin.tagEditor.instance("{0}-searchFields_tag".format(h.replace(/#/g,".")),!0);a=b.find(".searchFields_author");0<a.length&&(u=new vBulletin_Autocomplete(a,{apiClass:"user",containerClass:"entry-field h-clearfix"}));b.find(".js-search-keywords").off("keydown").on("keydown",function(a){13== a.which&&0<n.length&&n.submit()});b.find(".searchFields_last_visit").off("click").on("click",function(a){b.find(".datefield").prop("disabled",c(this).prop("checked"));c(this).is(":checked")?(vBulletin.flatpickr.disablePicker(b.find(".searchFields_from_date")),vBulletin.flatpickr.disablePicker(b.find(".searchFields_to_date"))):(vBulletin.flatpickr.enablePicker(b.find(".searchFields_from_date")),vBulletin.flatpickr.enablePicker(b.find(".searchFields_to_date")))});b.find(".searchFields_channel_param").off("click").on("click", function(a){c(this).prop("checked")?b.find(".searchFields_channel").selectBox("disable"):b.find(".searchFields_channel").selectBox("enable")});b.find(".search-tips").off("click").on("click",function(a){c(".search-tips-dialog").first().dialog({title:vBulletin.phrase.get("search_tips"),autoOpen:!1,modal:!0,resizable:!1,closeOnEscape:!0,showCloseButton:!0,width:500,dialogClass:"dialog-container search-tips-dialog-container dialog-box"}).dialog("open");a.stopPropagation();return!1});b.find(".searchFields_channel").selectBox(); b.find(".searchFields_order_field").selectBox();b.find(".searchFields_order_direction").selectBox();b.find(".searchFields_view").selectBox()})()};c(function(){var h=c("#advancedSearchFields"),g=c(".search-results-widget");vBulletin.truncatePostContent(g);if(0<h.length){var r=h.find(".searchFields_from_date"),q=h.find(".searchFields_to_date"),t=new Date;if(r.data("vb-flatpicker-initialized"))vBulletin.flatpickr.getInstance(r).set("maxDate",t);else r.one("vb-flatpicker-initialized",function(){vBulletin.flatpickr.getInstance(c(this)).set("maxDate", t)});if(q.data("vb-flatpicker-initialized"))vBulletin.flatpickr.getInstance(q).set("maxDate",t);else q.one("vb-flatpicker-initialized",function(){vBulletin.flatpickr.getInstance(c(this)).set("maxDate",t)});r=new vBulletin.search.SearchControl("#advancedSearchFields");searchJSONStr=h.find(".searchFields_searchJSON").val();0<searchJSONStr.length&&r.set(searchJSONStr,!1,!1,!0)}var w=c(".sort-controls",g);0<w.length&&(w.find(".searchFields_order_field").selectBox().change(function(){var e=b.find(".searchResults_searchJSON").val()|| "{}";e=JSON.parse(e);e.sort={};e.sort[c(this).val()]=w.find(".searchFields_order_direction").selectBox().val();b.find(".searchResults_searchJSON").val(JSON.stringify(e));c(".resultSearchForm").submit()}),w.find(".searchFields_order_direction").selectBox().change(function(){var e=b.find(".searchResults_searchJSON").val()||"{}";e=JSON.parse(e);e.sort={};e.sort[w.find(".searchFields_order_field").selectBox().val()]=c(this).val();b.find(".searchResults_searchJSON").val(JSON.stringify(e));c(".resultSearchForm").submit()}), w.removeClass("h-invisible"));var b=c(".search-controls",g);if(0<b.length){var x=!1,u=!1;h=b.find(".searchFields_author");0<h.length&&(x=new vBulletin_Autocomplete(h,{apiClass:"user",containerClass:"entry-field h-clearfix"}),b.find(".search-controls-members .removable-element .element-text").each(function(b,a){x.addElement(c(a).html())}));0<b.find(".searchResultTagEditor").length&&(u=new vBulletin.tagEditor.instance(".search-controls .searchResultTagEditor",!0),b.find(".search-controls-tags .removable-element .element-text").each(function(b, a){u.addTag(c(a).html())}));b.find("button").off("click").on("click",function(e){e=b.find(".searchResults_searchJSON").val()||"{}";e=JSON.parse(e);switch(c(this).val()){case "keywords":e.keywords=b.find(".js-search-keywords").val();e.title_only=b.find(".searchFields_title_only").is(":checked");break;case "author":e.author=x.getLabels();e.starter_only=b.find(".searchFields_starter_only").is(":checked");break;case "tags":e.tag=u.getTags();break;default:return}b.find(".searchResults_searchJSON").val(JSON.stringify(e)); c(".resultSearchForm").submit()});b.find(".removable-element .element-x").off("click").on("click",function(e){e=b.find(".searchResults_searchJSON").val()||"{}";e=JSON.parse(e);var a=c(this).parents(".search-control-popup");if(a.hasClass("search-controls-members")){c(this).parents(".removable-element").remove();var f=[];a.find(".removable-element .element-text").each(function(a,b){f.push(c(b).html())});e.author=f;0==f.length&&delete e.author}if(a.hasClass("search-controls-tags")){c(this).parents(".removable-element").remove(); var g=[];a.find(".removable-element .element-text").each(function(a,b){g.push(c(b).html())});e.tag=g;0==g.length&&delete e.tag}b.find(".searchResults_searchJSON").val(JSON.stringify(e));c(".resultSearchForm").submit()})}vBulletin.inlinemod&&"function"==typeof vBulletin.inlinemod.init&&vBulletin.inlinemod.init(g);vBulletin.conversation.initContentEvents(g);g.off("click",".js-comment-entry__post").on("click",".js-comment-entry__post",function(b){vBulletin.conversation.postComment.apply(this,[b,function(a){location.reload()}])}); h="undefined"!=typeof g.data("keywords")?g.data("keywords").toString():"";if(0<h.length){var m;c(h.split(" ")).each(function(b,a){m=a.toUpperCase();"OR"!=m&&"AND"!=m&&(c(".post-header",g).highlight(a),c(".searchFields_title_only",g).prop("checked")||c(".post-content",g).highlight(a))})}if(1==g.length){var p=c(".pagenav-form",g).attr("action");p&&c(".js-pagenav .js-pagenav-button",g).each(function(){var b=c(this),a=b.prop("href");(!a||pageData.baseurl&&a==pageData.baseurl)&&b.prop("href",p+"&p="+parseInt(b.data("page"), 10))})}})})(jQuery); ;
[ Kembali ]
© 2026 mini manager