mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-10-22 11:05:45 +02:00
1 line
112 KiB
JavaScript
1 line
112 KiB
JavaScript
!function(){"use strict";var t={358:function(t){t.exports=function makeYoutubeEmbed(t){if("string"===typeof t){var a=function getId(t){var a=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);if(a&&11==a[2].length)return a[2]}(t);return a?"//www.youtube.com/embed/"+a:void 0}}}},a={};function __webpack_require__(i){var o=a[i];if(void 0!==o)return o.exports;var s=a[i]={exports:{}};return t[i](s,s.exports,__webpack_require__),s.exports}!function(){var t={APOLLO_ERROR:"apollo-error",AJAX:"ajax-load",AJAXMAIN:"ajax-main-load",MAININIT:"main-init",TABHIDDEN:"tab-hidden",TABFOCUSED:"tab-focused",OFFLINE:"offline",ONLINE:"online",BACKONLINE:"back-online",TOUCHENABLE:"touch-enabled",TOUCHDISABLED:"touch-disabled",DOMLOADED:"DOMContentLoaded",LOADED:"load",SWIPELEFT:"swipeleft panleft",SWIPERIGHT:"swiperight panright",ALLERTAPPEARED:"alert-appeared",ALERTREMOVED:"alert-removed",LODEDANDREADY:"load-ready",LAZYIMAGEREADY:"image-lazy-bg-loaded",LAZYIMAGESREADY:"images-lazy-loaded",MAPLOADED:"map-loaded",MAPAPILOADED:"map-api-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",CAROUSEL_READY:"bs.carousel.ready",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"},a=(function(a){var i="_main.visibility",o=document,s=o.body;o.addEventListener("visibilitychange",(function(){"hidden"===o.visibilityState?(console.log("".concat(i,": Tab: hidden")),s.classList.add("is-hidden"),s.classList.remove("is-focused"),a.dispatchEvent(new Event(t.TABHIDDEN))):(console.log("".concat(i,": Tab: focused")),s.classList.add("is-focused"),s.classList.remove("is-hidden"),a.dispatchEvent(new Event(t.TABFOCUSED)))}))}(window),function(a){var i,o,s="_main.touch",c=document,l=c.body,u=function SET_TOUCH_SCREEN(c,u){o||u===i||(c?(console.log("".concat(s,": Touch screen enabled")),l.classList.add("is-touch"),l.classList.remove("is-mouse"),a.dispatchEvent(new Event(t.TOUCHENABLE))):(console.log("".concat(s,": Touch screen disabled")),l.classList.add("is-mouse"),l.classList.remove("is-touch"),a.dispatchEvent(new Event(t.TOUCHDISABLED))),i=u,o||(o=setTimeout((function(){clearTimeout(o),o=null}),500)))};u("ontouchstart"in a||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0||a.matchMedia("(hover: none)").matches,"init"),c.addEventListener("touchend",(function(t){var a=!1;"click"!==t.type&&(a=!0),u(a,"click-touchend")})),c.addEventListener("click",(function(t){var a=!1;"click"!==t.type&&(a=!0),u(a,"click-touchend")}))}(window),{ENVS:["xs","sm","md","lg","xl","xxl","xxxl"]});function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function _unsupportedIterableToArray(t,a){if(!t)return;if("string"===typeof t)return _arrayLikeToArray(t,a);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,a)}(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,a){(null==a||a>t.length)&&(a=t.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=t[i];return o}!function(i){var o=document,s=o.body,c=function detectCSSScreenSize(){var t,c=o.createElement("div");c.className="env-test",s.appendChild(c);var l=_toConsumableArray(a.ENVS).reverse(),u=l.shift();(t=s.classList).remove.apply(t,_toConsumableArray(l));for(var f=0;f<l.length;++f){var p=l[f];if(c.classList.add("d-".concat(p,"-none")),"none"===i.getComputedStyle(c).display){u=p,s.classList.add("".concat(u));break}}var h=!0;return i.innerWidth>i.innerHeight?(s.classList.add("landscape"),s.classList.remove("portrait")):(h=!1,s.classList.add("portrait"),s.classList.remove("landscape")),console.log("".concat("_main.css-screen-size",": screen size detected ").concat(u," | landscape ").concat(h)),s.removeChild(c),u};i.addEventListener("".concat(t.LOADED),c),i.addEventListener("".concat(t.RESIZE),c)}(window);function _defineProperties(t,a){for(var i=0;i<a.length;i++){var o=a[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var i="_main.loading-spinner",o=document.getElementById("PageLoading"),s=function(){function SpinnerUI(){!function _classCallCheck(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}(this,SpinnerUI)}return function _createClass(t,a,i){return a&&_defineProperties(t.prototype,a),i&&_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(SpinnerUI,null,[{key:"show",value:function show(){console.log("".concat(i,": show")),o.classList.remove("d-none")}},{key:"hide",value:function hide(){console.log("".concat(i,": hide")),o.classList.add("d-none")}}]),SpinnerUI}();function main_defineProperties(t,a){for(var i=0;i<a.length;i++){var o=a[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}!function(i){var o=document.body;console.info("%cUI Kit ".concat("@a2nt/ss-bootstrap-ui-webpack-boilerplate-react"," ").concat("4.6.7"),"color:yellow;font-size:14px"),console.info("%c".concat("@a2nt/meta-lightbox-js"," ").concat("4.2.3"),"color:yellow;font-size:12px"),console.info("%chttps://github.com/a2nt/webpack-bootstrap-ui-kit by ".concat("Tony Air <tony@twma.pro>"),"color:yellow;font-size:10px"),console.info("%cENV: ".concat("production"),"color:green;font-size:10px"),console.groupCollapsed("Events"),Object.keys(t).forEach((function(a){console.info("".concat(a,": ").concat(t[a]))})),console.groupEnd("Events"),console.groupCollapsed("Consts"),Object.keys(a).forEach((function(t){console.info("".concat(t,": ").concat(a[t]))})),console.groupEnd("Events"),console.groupCollapsed("Init"),console.time("init");var c=function(){function MainUI(){!function main_classCallCheck(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}(this,MainUI)}return function main_createClass(t,a,i){return a&&main_defineProperties(t.prototype,a),i&&main_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(MainUI,null,[{key:"init",value:function init(){i.history.replaceState({landing:i.location.href},document.title,i.location.href),this.loaded()}},{key:"loaded",value:function loaded(){console.log("".concat("_main",": loaded"))}}]),MainUI}(),l=function documentInit(){c.init(),o.classList.add("loaded"),s.hide(),console.groupEnd("init"),console.timeEnd("init"),i.addEventListener("".concat(t.LOADED),(function(a){i.dispatchEvent(new Event(t.LODEDANDREADY))}))};"loading"===document.readyState?document.addEventListener("".concat(t.DOMLOADED),l):l(),i.addEventListener("".concat(t.AJAX),(function(){c.loaded()})),i.MainUI=c}(window);var c="ajax-load",l="load-ready";function window_toConsumableArray(t){return function window_arrayWithoutHoles(t){if(Array.isArray(t))return window_arrayLikeToArray(t)}(t)||function window_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function window_unsupportedIterableToArray(t,a){if(!t)return;if("string"===typeof t)return window_arrayLikeToArray(t,a);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return window_arrayLikeToArray(t,a)}(t)||function window_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function window_arrayLikeToArray(t,a){(null==a||a>t.length)&&(a=t.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=t[i];return o}function window_classCallCheck(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}function window_defineProperties(t,a){for(var i=0;i<a.length;i++){var o=a[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function _defineProperty(t,a,i){return a in t?Object.defineProperty(t,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[a]=i,t}var u=window,f=function(){function MetaWindow(){var t=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shown:!1},i=arguments.length>1?arguments[1]:void 0;window_classCallCheck(this,MetaWindow),_defineProperty(this,"state",{content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1,collections:[],current:null,target:null,extraClass:null}),_defineProperty(this,"show",(function(){var a=t;console.log("".concat(a.name,": show")),a.setState({shown:!0}),u.dispatchEvent(new Event("{ui.name}.show"))})),_defineProperty(this,"hide",(function(){var a=t;console.log("".concat(a.name,": hide")),a.setState({shown:!1}),u.dispatchEvent(new Event("{ui.name}.hide"))})),_defineProperty(this,"next",(function(){var a=t,i=a.state.current.getAttribute("data-gallery"),o=a._currIndex();o<a.state.collections[i].length-1?o++:o=0,a.state.collections[i][o].click(),console.log("".concat(a.name,": next")),u.dispatchEvent(new Event("{ui.name}.next"))})),_defineProperty(this,"prev",(function(){var a=t,i=a.state.current.getAttribute("data-gallery"),o=a._currIndex();o>0?o--:o=a.state.collections[i].length-1,a.state.collections[i][o].click(),console.log("".concat(a.name,": prev")),u.dispatchEvent(new Event("{ui.name}.prev"))})),_defineProperty(this,"reset",(function(){t.setState({content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1})})),_defineProperty(this,"load",(function(a){var i=t;i.reset(),i.setState({loading:!0}),i.show(),window.fetch(a).then((function(t){var o=t.headers.get("content-type");console.log(t),console.log("".concat(i.name,": response content-type: ").concat(o));switch(o){case"image/jpeg":case"image/png":case"image/svg+xml":case"image/bmp":case"image/gif":case"image/tiff":case"image/webp":case"image/jpg":case"image/svg":t.arrayBuffer().then((function(t){i.setContent('<img src="data:'.concat(o,";base64,").concat(i._imageEncode(t),'" />'),"meta-".concat(i.name,"--image"))}));break;case"application/json":case"application/ld+json":case"application/json; charset=UTF-8":i.setContent("".concat((!1).Content),["meta-".concat(i.name,"--text"),"meta-".concat(i.name,"--html"),"meta-".concat(i.name,"--json")]);break;case"video/mp4":i.setContent('<video controls autoplay><source src="'.concat(a,'" type="video/mp4">Your browser does not support the video tag.</video>'),["meta-".concat(i.name,"--image"),"meta-".concat(i.name,"--video")]);break;case"text/html":case"application/xhtml+xml":case"text/plain":case"text/html; charset=UTF-8":case"application/xhtml+xml; charset=UTF-8":case"text/plain; charset=UTF-8":i.setContent(t.data,["meta-".concat(i.name,"--text"),"meta-".concat(i.name,"--html"),"meta-".concat(i.name,"--pajax")]);break;default:console.warn("".concat(i.name,": Unknown response content-type!"))}u.dispatchEvent(new Event("{ui.name}.loaded"))})).catch((function(t){console.error(t);var a="";if(t.response)switch(t.response.status){case 404:a="Not Found.";break;case 500:a="Server issue, please try again latter.";break;default:a="Something went wrong."}else t.request?a="No response received":console.warn("Error",t.message);i.setState({error:a}),u.dispatchEvent(new Event("{ui.name}.error"))})).then((function(){i.setState({loading:!1}),setTimeout((function(){i.state.current.classList.remove("loading")}),1e3)}))})),_defineProperty(this,"_currIndex",(function(){var a=t,i=a.state.current,o=i.getAttribute("data-gallery");return a.state.collections[o].indexOf(i)})),_defineProperty(this,"embed",(function(a){var i=t;console.log("".concat(i.name,": embed")),i.reset(),i.setState({embed:a,loading:!1,type:["meta-".concat(i.name,"--embed"),"meta-".concat(i.name,"--video")]}),i.show()})),_defineProperty(this,"setCaption",(function(a){var i=t;console.log("".concat(i.name,": setCaption")),i.state.caption=a})),_defineProperty(this,"addExtraClass",(function(a){var i=t;a&&a.length&&(console.log("".concat(i.name,": addExtraClass(").concat(a,")")),i.state.extraClass=a)})),_defineProperty(this,"getCaption",(function(){return t.state.caption})),_defineProperty(this,"_imageEncode",(function(t){var a="";return[].slice.call(new Uint8Array(t)).forEach((function(t){a+=String.fromCharCode(t)})),window.btoa(a)})),_defineProperty(this,"setContent",(function(a,i){var o=t;console.log("".concat(o.name,": setContent"));var s=i||["meta-".concat(o.name,"--html"),"meta-".concat(o.name,"--text")];Array.isArray(s)||(s=i.split(" ")),o.setState({content:a,type:s})})),_defineProperty(this,"getHtml",(function(){var a=t;if(a.state.embed){var i=__webpack_require__(358)(a.state.embed);a.state.content='<iframe width="600" height="380" src="'.concat(i,'" frameborder="0"></iframe>')}return a.state.content}));var o=this;switch(o.name=o.constructor.name,console.log("".concat(o.name,": init")),o.setState(a),i){case"show":case"hide":o.hide()}u.dispatchEvent(new Event("{ui.name}.init"))}return function window_createClass(t,a,i){return a&&window_defineProperties(t.prototype,a),i&&window_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(MetaWindow,[{key:"cleanLinks",value:function cleanLinks(){document.querySelectorAll('[data-toggle="lightbox"]').forEach((function(t){t.classList.remove("loading")}))}},{key:"collectGaleries",value:function collectGaleries(t){var a=this;t&&(a.state.collections[t]=[],document.querySelectorAll('[data-toggle="lightbox"][data-gallery="'.concat(t,'"]')).forEach((function(i){a.state.collections[t].push(i)})))}},{key:"toggle",value:function toggle(t){var a=this;a.cleanLinks();var i=t.getAttribute("href")||t.getAttribute("data-href"),o=t.getAttribute("data-embed");t.classList.add("loading"),a.state.current=t;var s=t.getAttribute("data-title");s&&a.setCaption(s),o?a.embed(i):a.load(i),a.addExtraClass(t.getAttribute("data-lightbox-class"))}},{key:"init",value:function init(){var t=this;console.log("MetaWindow: [links] init"),document.querySelectorAll('[data-toggle="lightbox"],[data-gallery]').forEach((function(a){var i=a.getAttribute("data-gallery");t.collectGaleries(i),a.addEventListener("click",(function(a){a.preventDefault(),console.log("MetaWindow: [link] click");var i=a.currentTarget;t.toggle(i)}))}))}},{key:"setState",value:function setState(t){var a=this;a.state=Object.assign({},a.state,t),a.render()}},{key:"render",value:function render(){var t,a=this,i=a.name,o=a.state.current;a.state.target.innerHTML="";var s=document.createElement("div");s.classList.add("meta-".concat(i)),(t=s.classList).add.apply(t,window_toConsumableArray(a.state.type)),a.state.target.append(s);var c=document.createElement("div");c.classList.add("meta-".concat(i,"-overlay")),a.state.shown&&c.classList.add("meta-".concat(i,"-overlay--open")),a.state.loading&&c.classList.add("meta-".concat(i,"-overlay--loading")),a.state.error&&c.classList.add("meta-".concat(i,"-overlay--error")),s.append(c);var l=document.createElement("div");l.classList.add("meta-content"),c.append(l);var u=document.createElement("button");if(u.classList.add("meta-nav","meta-close","a"),u.innerHTML='<i class="icon fa fas fa-times"></i> <span class="visually-hidden">Close</span>',u.addEventListener("click",(function(t){t.preventDefault(),a.hide()})),l.append(u),o){var f=o.getAttribute("data-gallery");if(f&&a.state.collections[f].length>1){var p=document.createElement("nav");p.classList.add("meta-navs");var h=document.createElement("button");h.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__prev","a"),h.innerHTML='<i class="icon fa fas fa-chevron-left"></i> <span class="visually-hidden">Previous</span>',h.addEventListener("click",(function(t){t.preventDefault(),a.prev()})),p.append(h);var v=document.createElement("button");v.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__next","a"),v.innerHTML='<i class="icon fa fas fa-chevron-right"></i> <span class="visually-hidden">Next</span>',v.addEventListener("click",(function(t){t.preventDefault(),a.next()})),p.append(v),l.append(p)}}var g=document.createElement("section");if(g.classList.add("meta-wrap","typography"),a.state.extraClass&&g.classList.add(a.state.extraClass),g.innerHTML=a.getHtml(),l.append(g),a.state.error){var b=document.createElement("div");b.classList.add("meta-error"),b.innerHTML=a.state.error,l.append(b)}else if(a.state.caption){var w=document.createElement("div");w.classList.add("meta-caption"),w.innerHTML=a.getCaption(),l.append(w)}return"undefined"!==typeof window.FontAwesome&&window.FontAwesome.dom.i2svg(),a}}]),MetaWindow}(),p=f,h=document.getElementById("MetaLightboxApp");h||console.log("MetaWindow: missing container #MetaLightboxApp");var v=function init(){var t=window.MetaWindow;"undefined"===typeof t&&(t=new p({target:h}),window.MetaWindow=t),t.init()};window.addEventListener("".concat(l),v),window.addEventListener("".concat(c),v),window.addEventListener("MetaWindow.initLinks",v);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var g="transitionend",b=function getSelector(t){var a=t.getAttribute("data-bs-target");if(!a||"#"===a){var i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i="#".concat(i.split("#")[1])),a=i&&"#"!==i?i.trim():null}return a},w=function getTransitionDurationFromElement(t){if(!t)return 0;var a=window.getComputedStyle(t),i=a.transitionDuration,o=a.transitionDelay,s=Number.parseFloat(i),c=Number.parseFloat(o);return s||c?(i=i.split(",")[0],o=o.split(",")[0],1e3*(Number.parseFloat(i)+Number.parseFloat(o))):0},_=function triggerTransitionEnd(t){t.dispatchEvent(new Event(g))},k=function isElement(t){return!(!t||"object"!==_typeof(t))&&("undefined"!==typeof t.jquery&&(t=t[0]),"undefined"!==typeof t.nodeType)},E=function getElement(t){return k(t)?t.jquery?t[0]:t:"string"===typeof t&&t.length>0?document.querySelector(t):null},A=function isVisible(t){return!(!k(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility")},O=function getjQuery(){var jQuery=window.jQuery;return jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?jQuery:null},S=[],L=function isRTL(){return"rtl"===document.documentElement.dir},T=function execute(t){"function"===typeof t&&t()},P=function executeAfterTransition(t,a){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(i){var o=5,s=w(a)+o,c=!1,l=function handler(i){i.target===a&&(c=!0,a.removeEventListener(g,handler),T(t))};a.addEventListener(g,l),setTimeout((function(){c||_(a)}),s)}else T(t)};function _slicedToArray(t,a){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,a){var i=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var o,s,c=[],l=!0,u=!1;try{for(i=i.call(t);!(l=(o=i.next()).done)&&(c.push(o.value),!a||c.length!==a);l=!0);}catch(f){u=!0,s=f}finally{try{l||null==i.return||i.return()}finally{if(u)throw s}}return c}(t,a)||function event_handler_unsupportedIterableToArray(t,a){if(!t)return;if("string"===typeof t)return event_handler_arrayLikeToArray(t,a);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return event_handler_arrayLikeToArray(t,a)}(t,a)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function event_handler_arrayLikeToArray(t,a){(null==a||a>t.length)&&(a=t.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=t[i];return o}var C=/[^.]*(?=\..*)\.|.*/,V=/\..*/,x=/::\d+$/,I={},j=1,N={mouseenter:"mouseover",mouseleave:"mouseout"},Y=/^(mouseenter|mouseleave)/i,R=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function getUidEvent(t,a){return a&&"".concat(a,"::").concat(j++)||t.uidEvent||j++}function getEvent(t){var a=getUidEvent(t);return t.uidEvent=a,I[a]=I[a]||{},I[a]}function findHandler(t,a){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=Object.keys(t),s=0,c=o.length;s<c;s++){var l=t[o[s]];if(l.originalHandler===a&&l.delegationSelector===i)return l}return null}function normalizeParams(t,a,i){var o="string"===typeof a,s=o?i:a,c=getTypeEvent(t);return R.has(c)||(c=t),[o,s,c]}function addHandler(t,a,i,o,s){if("string"===typeof a&&t){if(i||(i=o,o=null),Y.test(a)){var c=function wrapFn(t){return function(a){if(!a.relatedTarget||a.relatedTarget!==a.delegateTarget&&!a.delegateTarget.contains(a.relatedTarget))return t.call(this,a)}};o?o=c(o):i=c(i)}var l=_slicedToArray(normalizeParams(a,i,o),3),u=l[0],f=l[1],p=l[2],h=getEvent(t),v=h[p]||(h[p]={}),g=findHandler(v,f,u?i:null);if(g)g.oneOff=g.oneOff&&s;else{var b=getUidEvent(f,a.replace(C,"")),w=u?function bootstrapDelegationHandler(t,a,i){return function handler(o){for(var s=t.querySelectorAll(a),c=o.target;c&&c!==this;c=c.parentNode)for(var l=s.length;l--;)if(s[l]===c)return o.delegateTarget=c,handler.oneOff&&F.off(t,o.type,a,i),i.apply(c,[o]);return null}}(t,i,o):function bootstrapHandler(t,a){return function handler(i){return i.delegateTarget=t,handler.oneOff&&F.off(t,i.type,a),a.apply(t,[i])}}(t,i);w.delegationSelector=u?i:null,w.originalHandler=f,w.oneOff=s,w.uidEvent=b,v[b]=w,t.addEventListener(p,w,u)}}}function removeHandler(t,a,i,o,s){var c=findHandler(a[i],o,s);c&&(t.removeEventListener(i,c,Boolean(s)),delete a[i][c.uidEvent])}function getTypeEvent(t){return t=t.replace(V,""),N[t]||t}var F={on:function on(t,a,i,o){addHandler(t,a,i,o,!1)},one:function one(t,a,i,o){addHandler(t,a,i,o,!0)},off:function off(t,a,i,o){if("string"===typeof a&&t){var s=_slicedToArray(normalizeParams(a,i,o),3),c=s[0],l=s[1],u=s[2],f=u!==a,p=getEvent(t),h=a.startsWith(".");if("undefined"===typeof l){h&&Object.keys(p).forEach((function(i){!function removeNamespacedHandlers(t,a,i,o){var s=a[i]||{};Object.keys(s).forEach((function(c){if(c.includes(o)){var l=s[c];removeHandler(t,a,i,l.originalHandler,l.delegationSelector)}}))}(t,p,i,a.slice(1))}));var v=p[u]||{};Object.keys(v).forEach((function(i){var o=i.replace(x,"");if(!f||a.includes(o)){var s=v[i];removeHandler(t,p,u,s.originalHandler,s.delegationSelector)}}))}else{if(!p||!p[u])return;removeHandler(t,p,u,l,c?i:null)}}},trigger:function trigger(t,a,i){if("string"!==typeof a||!t)return null;var o,$=O(),s=getTypeEvent(a),c=a!==s,l=R.has(s),u=!0,f=!0,p=!1,h=null;return c&&$&&(o=$.Event(a,i),$(t).trigger(o),u=!o.isPropagationStopped(),f=!o.isImmediatePropagationStopped(),p=o.isDefaultPrevented()),l?(h=document.createEvent("HTMLEvents")).initEvent(s,u,!0):h=new CustomEvent(a,{bubbles:u,cancelable:!0}),"undefined"!==typeof i&&Object.keys(i).forEach((function(t){Object.defineProperty(h,t,{get:function get(){return i[t]}})})),p&&h.preventDefault(),f&&t.dispatchEvent(h),h.defaultPrevented&&"undefined"!==typeof o&&o.preventDefault(),h}},B=F;function normalizeData(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function normalizeDataKey(t){return t.replace(/[A-Z]/g,(function(t){return"-".concat(t.toLowerCase())}))}var H={setDataAttribute:function setDataAttribute(t,a,i){t.setAttribute("data-bs-".concat(normalizeDataKey(a)),i)},removeDataAttribute:function removeDataAttribute(t,a){t.removeAttribute("data-bs-".concat(normalizeDataKey(a)))},getDataAttributes:function getDataAttributes(t){if(!t)return{};var a={};return Object.keys(t.dataset).filter((function(t){return t.startsWith("bs")})).forEach((function(i){var o=i.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1,o.length),a[o]=normalizeData(t.dataset[i])})),a},getDataAttribute:function getDataAttribute(t,a){return normalizeData(t.getAttribute("data-bs-".concat(normalizeDataKey(a))))},offset:function offset(t){var a=t.getBoundingClientRect();return{top:a.top+window.pageYOffset,left:a.left+window.pageXOffset}},position:function position(t){return{top:t.offsetTop,left:t.offsetLeft}}};function selector_engine_toConsumableArray(t){return function selector_engine_arrayWithoutHoles(t){if(Array.isArray(t))return selector_engine_arrayLikeToArray(t)}(t)||function selector_engine_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function selector_engine_unsupportedIterableToArray(t,a){if(!t)return;if("string"===typeof t)return selector_engine_arrayLikeToArray(t,a);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return selector_engine_arrayLikeToArray(t,a)}(t)||function selector_engine_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function selector_engine_arrayLikeToArray(t,a){(null==a||a>t.length)&&(a=t.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=t[i];return o}var W={find:function find(t){var a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return(a=[]).concat.apply(a,selector_engine_toConsumableArray(Element.prototype.querySelectorAll.call(i,t)))},findOne:function findOne(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return Element.prototype.querySelector.call(a,t)},children:function children(t,a){var i;return(i=[]).concat.apply(i,selector_engine_toConsumableArray(t.children)).filter((function(t){return t.matches(a)}))},parents:function parents(t,a){for(var parents=[],i=t.parentNode;i&&i.nodeType===Node.ELEMENT_NODE&&3!==i.nodeType;)i.matches(a)&&parents.push(i),i=i.parentNode;return parents},prev:function prev(t,a){for(var i=t.previousElementSibling;i;){if(i.matches(a))return[i];i=i.previousElementSibling}return[]},next:function next(t,a){for(var next=t.nextElementSibling;next;){if(next.matches(a))return[next];next=next.nextElementSibling}return[]},focusableChildren:function focusableChildren(t){var a=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((function(t){return"".concat(t,':not([tabindex^="-"])')})).join(", ");return this.find(a,t).filter((function(t){return!function isDisabled(t){return!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||("undefined"!==typeof t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))}(t)&&A(t)}))}},U=W,q=new Map,z=function set(t,a,i){q.has(t)||q.set(t,new Map);var o=q.get(t);o.has(a)||0===o.size?o.set(a,i):console.error("Bootstrap doesn't allow more than one instance per element. Bound instance: ".concat(Array.from(o.keys())[0],"."))},K=function get(t,a){return q.has(t)&&q.get(t).get(a)||null},X=function remove(t,a){if(q.has(t)){var i=q.get(t);i.delete(a),0===i.size&&q.delete(t)}};function base_component_typeof(t){return base_component_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},base_component_typeof(t)}function base_component_defineProperties(t,a){for(var i=0;i<a.length;i++){var o=a[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var J,G=function(){function BaseComponent(t){!function base_component_classCallCheck(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}(this,BaseComponent),(t=E(t))&&(this._element=t,z(this._element,this.constructor.DATA_KEY,this))}return function base_component_createClass(t,a,i){return a&&base_component_defineProperties(t.prototype,a),i&&base_component_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(BaseComponent,[{key:"dispose",value:function dispose(){var t=this;X(this._element,this.constructor.DATA_KEY),B.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((function(a){t[a]=null}))}},{key:"_queueCallback",value:function _queueCallback(t,a){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];P(t,a,i)}}],[{key:"getInstance",value:function getInstance(t){return K(E(t),this.DATA_KEY)}},{key:"getOrCreateInstance",value:function getOrCreateInstance(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getInstance(t)||new this(t,"object"===base_component_typeof(a)?a:null)}},{key:"VERSION",get:function get(){return"5.1.3"}},{key:"NAME",get:function get(){throw new Error('You have to implement the static method "NAME", for each component!')}},{key:"DATA_KEY",get:function get(){return"bs.".concat(this.NAME)}},{key:"EVENT_KEY",get:function get(){return".".concat(this.DATA_KEY)}}]),BaseComponent}(),Z=G;function carousel_typeof(t){return carousel_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},carousel_typeof(t)}function ownKeys(t,a){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);a&&(o=o.filter((function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),i.push.apply(i,o)}return i}function _objectSpread(t){for(var a=1;a<arguments.length;a++){var i=null!=arguments[a]?arguments[a]:{};a%2?ownKeys(Object(i),!0).forEach((function(a){carousel_defineProperty(t,a,i[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))}))}return t}function carousel_defineProperties(t,a){for(var i=0;i<a.length;i++){var o=a[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function _setPrototypeOf(t,a){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,a){return t.__proto__=a,t},_setPrototypeOf(t,a)}function _createSuper(t){var a=function _isNativeReflectConstruct(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=_getPrototypeOf(t);if(a){var s=_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,s)}else i=o.apply(this,arguments);return _possibleConstructorReturn(this,i)}}function _possibleConstructorReturn(t,a){if(a&&("object"===carousel_typeof(a)||"function"===typeof a))return a;if(void 0!==a)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function carousel_defineProperty(t,a,i){return a in t?Object.defineProperty(t,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[a]=i,t}var Q="carousel",ee=".".concat("bs.carousel"),te=".data-api",ne={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},re={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},ae="next",ie="prev",oe="left",se="right",ce=(carousel_defineProperty(J={},"ArrowLeft",se),carousel_defineProperty(J,"ArrowRight",oe),J),le="slide".concat(ee),ue="slid".concat(ee),de="keydown".concat(ee),fe="mouseenter".concat(ee),pe="mouseleave".concat(ee),he="touchstart".concat(ee),ye="touchmove".concat(ee),ve="touchend".concat(ee),me="pointerdown".concat(ee),ge="pointerup".concat(ee),be="dragstart".concat(ee),we="load".concat(ee).concat(te),_e="click".concat(ee).concat(te),ke="active",De=".active.carousel-item",Ee=function(t){!function _inherits(t,a){if("function"!==typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(a&&a.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),a&&_setPrototypeOf(t,a)}(Carousel,t);var a=_createSuper(Carousel);function Carousel(t,i){var o;return function carousel_classCallCheck(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}(this,Carousel),(o=a.call(this,t))._items=null,o._interval=null,o._activeElement=null,o._isPaused=!1,o._isSliding=!1,o.touchTimeout=null,o.touchStartX=0,o.touchDeltaX=0,o._config=o._getConfig(i),o._indicatorsElement=U.findOne(".carousel-indicators",o._element),o._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,o._pointerEvent=Boolean(window.PointerEvent),o._addEventListeners(),o}return function carousel_createClass(t,a,i){return a&&carousel_defineProperties(t.prototype,a),i&&carousel_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(Carousel,[{key:"next",value:function next(){this._slide(ae)}},{key:"nextWhenVisible",value:function nextWhenVisible(){!document.hidden&&A(this._element)&&this.next()}},{key:"prev",value:function prev(){this._slide(ie)}},{key:"pause",value:function pause(t){t||(this._isPaused=!0),U.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(_(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}},{key:"cycle",value:function cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}},{key:"to",value:function to(t){var a=this;this._activeElement=U.findOne(De,this._element);var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)B.one(this._element,ue,(function(){return a.to(t)}));else{if(i===t)return this.pause(),void this.cycle();var o=t>i?ae:ie;this._slide(o,this._items[t])}}},{key:"_getConfig",value:function _getConfig(t){return t=_objectSpread(_objectSpread(_objectSpread({},ne),H.getDataAttributes(this._element)),"object"===carousel_typeof(t)?t:{}),function typeCheckConfig(t,a,i){Object.keys(i).forEach((function(o){var s=i[o],c=a[o],l=c&&k(c)?"element":function toType(t){return null===t||void 0===t?"".concat(t):{}.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase()}(c);if(!new RegExp(s).test(l))throw new TypeError("".concat(t.toUpperCase(),': Option "').concat(o,'" provided type "').concat(l,'" but expected type "').concat(s,'".'))}))}(Q,t,re),t}},{key:"_handleSwipe",value:function _handleSwipe(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var a=t/this.touchDeltaX;this.touchDeltaX=0,a&&this._slide(a>0?se:oe)}}},{key:"_addEventListeners",value:function _addEventListeners(){var t=this;this._config.keyboard&&B.on(this._element,de,(function(a){return t._keydown(a)})),"hover"===this._config.pause&&(B.on(this._element,fe,(function(a){return t.pause(a)})),B.on(this._element,pe,(function(a){return t.cycle(a)}))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}},{key:"_addTouchEventListeners",value:function _addTouchEventListeners(){var t=this,a=function hasPointerPenTouch(a){return t._pointerEvent&&("pen"===a.pointerType||"touch"===a.pointerType)},i=function start(i){a(i)?t.touchStartX=i.clientX:t._pointerEvent||(t.touchStartX=i.touches[0].clientX)},o=function end(i){a(i)&&(t.touchDeltaX=i.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(a){return t.cycle(a)}),500+t._config.interval))};U.find(".carousel-item img",this._element).forEach((function(t){B.on(t,be,(function(t){return t.preventDefault()}))})),this._pointerEvent?(B.on(this._element,me,(function(t){return i(t)})),B.on(this._element,ge,(function(t){return o(t)})),this._element.classList.add("pointer-event")):(B.on(this._element,he,(function(t){return i(t)})),B.on(this._element,ye,(function(a){return function move(a){t.touchDeltaX=a.touches&&a.touches.length>1?0:a.touches[0].clientX-t.touchStartX}(a)})),B.on(this._element,ve,(function(t){return o(t)})))}},{key:"_keydown",value:function _keydown(t){if(!/input|textarea/i.test(t.target.tagName)){var a=ce[t.key];a&&(t.preventDefault(),this._slide(a))}}},{key:"_getItemIndex",value:function _getItemIndex(t){return this._items=t&&t.parentNode?U.find(".carousel-item",t.parentNode):[],this._items.indexOf(t)}},{key:"_getItemByOrder",value:function _getItemByOrder(t,a){var i=t===ae;return function getNextActiveElement(t,a,i,o){var s=t.indexOf(a);if(-1===s)return t[!i&&o?t.length-1:0];var c=t.length;return s+=i?1:-1,o&&(s=(s+c)%c),t[Math.max(0,Math.min(s,c-1))]}(this._items,a,i,this._config.wrap)}},{key:"_triggerSlideEvent",value:function _triggerSlideEvent(t,a){var i=this._getItemIndex(t),o=this._getItemIndex(U.findOne(De,this._element));return B.trigger(this._element,le,{relatedTarget:t,direction:a,from:o,to:i})}},{key:"_setActiveIndicatorElement",value:function _setActiveIndicatorElement(t){if(this._indicatorsElement){var a=U.findOne(".active",this._indicatorsElement);a.classList.remove(ke),a.removeAttribute("aria-current");for(var i=U.find("[data-bs-target]",this._indicatorsElement),o=0;o<i.length;o++)if(Number.parseInt(i[o].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(t)){i[o].classList.add(ke),i[o].setAttribute("aria-current","true");break}}}},{key:"_updateInterval",value:function _updateInterval(){var t=this._activeElement||U.findOne(De,this._element);if(t){var a=Number.parseInt(t.getAttribute("data-bs-interval"),10);a?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=a):this._config.interval=this._config.defaultInterval||this._config.interval}}},{key:"_slide",value:function _slide(t,a){var i=this,o=this._directionToOrder(t),s=U.findOne(De,this._element),c=this._getItemIndex(s),l=a||this._getItemByOrder(o,s),u=this._getItemIndex(l),f=Boolean(this._interval),p=o===ae,h=p?"carousel-item-start":"carousel-item-end",v=p?"carousel-item-next":"carousel-item-prev",g=this._orderToDirection(o);if(l&&l.classList.contains(ke))this._isSliding=!1;else if(!this._isSliding&&!this._triggerSlideEvent(l,g).defaultPrevented&&s&&l){this._isSliding=!0,f&&this.pause(),this._setActiveIndicatorElement(l),this._activeElement=l;var b=function triggerSlidEvent(){B.trigger(i._element,ue,{relatedTarget:l,direction:g,from:c,to:u})};if(this._element.classList.contains("slide")){l.classList.add(v),function reflow(t){t.offsetHeight}(l),s.classList.add(h),l.classList.add(h);this._queueCallback((function completeCallBack(){l.classList.remove(h,v),l.classList.add(ke),s.classList.remove(ke,v,h),i._isSliding=!1,setTimeout(b,0)}),s,!0)}else s.classList.remove(ke),l.classList.add(ke),this._isSliding=!1,b();f&&this.cycle()}}},{key:"_directionToOrder",value:function _directionToOrder(t){return[se,oe].includes(t)?L()?t===oe?ie:ae:t===oe?ae:ie:t}},{key:"_orderToDirection",value:function _orderToDirection(t){return[ae,ie].includes(t)?L()?t===ie?oe:se:t===ie?se:oe:t}}],[{key:"Default",get:function get(){return ne}},{key:"NAME",get:function get(){return Q}},{key:"carouselInterface",value:function carouselInterface(t,a){var i=Carousel.getOrCreateInstance(t,a),o=i._config;"object"===carousel_typeof(a)&&(o=_objectSpread(_objectSpread({},o),a));var s="string"===typeof a?a:o.slide;if("number"===typeof a)i.to(a);else if("string"===typeof s){if("undefined"===typeof i[s])throw new TypeError('No method named "'.concat(s,'"'));i[s]()}else o.interval&&o.ride&&(i.pause(),i.cycle())}},{key:"jQueryInterface",value:function jQueryInterface(t){return this.each((function(){Carousel.carouselInterface(this,t)}))}},{key:"dataApiClickHandler",value:function dataApiClickHandler(t){var a=function getElementFromSelector(t){var a=b(t);return a?document.querySelector(a):null}(this);if(a&&a.classList.contains("carousel")){var i=_objectSpread(_objectSpread({},H.getDataAttributes(a)),H.getDataAttributes(this)),o=this.getAttribute("data-bs-slide-to");o&&(i.interval=!1),Carousel.carouselInterface(a,i),o&&Carousel.getInstance(a).to(o),t.preventDefault()}}}]),Carousel}(Z);B.on(document,_e,"[data-bs-slide], [data-bs-slide-to]",Ee.dataApiClickHandler),B.on(window,we,(function(){for(var t=U.find('[data-bs-ride="carousel"]'),a=0,i=t.length;a<i;a++)Ee.carouselInterface(t[a],Ee.getInstance(t[a]))})),function defineJQueryPlugin(t){!function onDOMContentLoaded(t){"loading"===document.readyState?(S.length||document.addEventListener("DOMContentLoaded",(function(){S.forEach((function(t){return t()}))})),S.push(t)):t()}((function(){var $=O();if($){var a=t.NAME,i=$.fn[a];$.fn[a]=t.jQueryInterface,$.fn[a].Constructor=t,$.fn[a].noConflict=function(){return $.fn[a]=i,t.jQueryInterface}}}))}(Ee);var Ae=Ee;(function(a){var i="js-carousel",o=function init(){console.log("".concat(i,": init")),document.querySelectorAll(".".concat(i)).forEach((function(t,o){var s=new Ae(t,{interval:!!t.dataset.bsInterval&&parseInt(t.dataset.bsInterval)});t.ui=s;var c=t.querySelectorAll(".carousel-item"),l=parseInt(c.length);if(t.dataset.bsArrows){var u=document.createElement("button");u.classList.add("carousel-control-next"),u.setAttribute("type","button"),u.setAttribute("aria-label","Next Slide"),u.setAttribute("data-bs-target",t.getAttribute("id")),u.setAttribute("data-bs-slide","next"),u.addEventListener("click",(function(t){s.next()})),u.innerHTML='<span class="carousel-control-next-icon" aria-hidden="true"></span><span class="visually-hidden">Next</span>',t.appendChild(u);var f=document.createElement("button");f.setAttribute("type","button"),f.setAttribute("aria-label","Previous Slide"),f.classList.add("carousel-control-prev"),f.setAttribute("data-bs-target",t.getAttribute("id")),f.setAttribute("data-bs-slide","prev"),f.addEventListener("click",(function(t){s.prev()})),f.innerHTML='<span class="carousel-control-prev-icon" aria-hidden="true"></span><span class="visually-hidden">Previous</span>',t.appendChild(f)}if(t.dataset.bsIndicators&&function(){var a=document.createElement("div");a.classList.add("carousel-indicators");for(var i=0;i<l;){var o=document.createElement("button");o.setAttribute("type","button"),o.setAttribute("aria-label","Slide to #".concat(i+1)),0===i&&o.classList.add("active"),o.setAttribute("data-bs-target",t.getAttribute("id")),o.setAttribute("data-bs-slide-to",i),o.addEventListener("click",(function(t){var i=t.target;s.to(i.getAttribute("data-bs-slide-to")),a.querySelectorAll(".active").forEach((function(t){t.classList.remove("active")})),i.classList.add("active")})),a.appendChild(o),i++}t.appendChild(a),t.addEventListener("slide.bs.carousel",(function(a){t.querySelectorAll(".carousel-indicators .active").forEach((function(t){t.classList.remove("active")})),t.querySelectorAll('.carousel-indicators [data-bs-slide-to="'.concat(a.to,'"]')).forEach((function(t){t.classList.add("active")}))}))}(),t.classList.contains("carousel-multislide")){var p=new a.ResizeObserver((function(t){var a=t[0],i=a.target,o=a.contentRect,c=i.querySelectorAll(".carousel-item"),u=o.width,f=Math.min(parseInt(i.dataset.length),l),p=u/f;i.dataset.itemWidth=p,i.dataset.numToDisplay=f,i.querySelector(".carousel-inner").style.width="".concat(l*p,"px"),c.forEach((function(t,a){t.style.width="".concat(p,"px")})),l===f&&(i.classList.add("js-carousel-no-slide"),s.pause())}));p.observe(t),t.addEventListener("slide.bs.carousel",(function(a){var i=t.querySelector(".carousel-inner");switch(a.direction){case"left":case"right":i.style.left="".concat(-a.to*t.dataset.itemWidth,"px")}})),t.classList.add("".concat(i,"-multislide-active"))}else 1===c.length&&t.classList.add("js-carousel-no-slide");t.classList.add("".concat(i,"-active"))}))};a.addEventListener("".concat(t.LODEDANDREADY),o),a.addEventListener("".concat(t.AJAX),o)})(window),function(a){var i="js-dropdown",o=["active","active-dropdown"],s=function HideAll(){document.querySelectorAll(".dropdown-menu").forEach((function(t,a){var i;(i=t.closest(".dropdown").classList).remove.apply(i,o),t.classList.remove("show")}))},c=function Show(t){var a;t.stopPropagation();var i=t.currentTarget;(a=i.classList).add.apply(a,o),i.querySelector(".dropdown-menu").classList.add("show")},l=function Hide(t){var a;t.stopPropagation();var i=t.currentTarget;(a=i.classList).remove.apply(a,o),i.querySelector(".dropdown-menu").classList.remove("show")},u=function init(){console.log("".concat(i,": init"));var t=document.querySelectorAll(".".concat(i,',[data-bs-toggle="dropdown"]')),a=document.querySelectorAll('[data-bs-toggle="hover"]'),o=function attachClickEvents(t){t.addEventListener("click",(function(t){t.preventDefault(),function Toggle(t){s(),t.querySelector(".dropdown-menu").classList.toggle("show")}(t.currentTarget.closest(".dropdown"))})),t.classList.add("".concat(i,"-active"))};document.addEventListener("click",(function(t){var a=!1,i=t.path||t.composedPath&&t.composedPath();i||console.warn("Browser does not provide event path to hide dropdowns on outside click"),i.forEach((function(t,i){a||(t===document&&s(),t.classList&&t.classList.contains("dropdown-toggle")&&(a=!0))}))})),a.forEach((function(t,a){!function attachHoverEvents(t){t.addEventListener("mouseover",c,!1),t.addEventListener("mouseleave",l,!1),t.classList.add("".concat(i,"-active"))}(t.closest(".dropdown"))})),t.forEach((function(t,a){o(t)}))};a.addEventListener("".concat(t.LODEDANDREADY),u),a.addEventListener("".concat(t.AJAX),u)}(window);function hasProperty(t,a){return Object.prototype.hasOwnProperty.call(t,a)}function lastItemOf(t){return t[t.length-1]}function pushUnique(t){for(var a=arguments.length,i=new Array(a>1?a-1:0),o=1;o<a;o++)i[o-1]=arguments[o];return i.forEach((function(a){t.includes(a)||t.push(a)})),t}function stringToArray(t,a){return t?t.split(a):[]}function isInRange(t,a,i){return(void 0===a||t>=a)&&(void 0===i||t<=i)}function limitToRange(t,a,i){return t<a?a:t>i?i:t}function createTagRepeat(t,a){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",c=Object.keys(i).reduce((function(t,a){var s=i[a];return"function"===typeof s&&(s=s(o)),"".concat(t," ").concat(a,'="').concat(s,'"')}),t);s+="<".concat(c,"></").concat(t,">");var l=o+1;return l<a?createTagRepeat(t,a,i,l,s):s}function optimizeTemplateHTML(t){return t.replace(/>\s+/g,">").replace(/\s+</,"<")}function stripTime(t){return new Date(t).setHours(0,0,0,0)}function today(){return(new Date).setHours(0,0,0,0)}function dateValue(){switch(arguments.length){case 0:return today();case 1:return stripTime(arguments.length<=0?void 0:arguments[0])}var t=new Date(0);return t.setFullYear.apply(t,arguments),t.setHours(0,0,0,0)}function addDays(t,a){var i=new Date(t);return i.setDate(i.getDate()+a)}function addMonths(t,a){var i=new Date(t),o=i.getMonth()+a,s=o%12;s<0&&(s+=12);var c=i.setMonth(o);return i.getMonth()!==s?i.setDate(0):c}function addYears(t,a){var i=new Date(t),o=i.getMonth(),s=i.setFullYear(i.getFullYear()+a);return 1===o&&2===i.getMonth()?i.setDate(0):s}function dayDiff(t,a){return(t-a+7)%7}function dayOfTheWeekOf(t,a){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=new Date(t).getDay();return addDays(t,dayDiff(a,i)-dayDiff(o,i))}function startOfYearPeriod(t,a){var i=new Date(t).getFullYear();return Math.floor(i/a)*a}function regularizeDate(t,a,i){if(1!==a&&2!==a)return t;var o=new Date(t);return 1===a?i?o.setMonth(o.getMonth()+1,0):o.setDate(1):i?o.setFullYear(o.getFullYear()+1,0,0):o.setMonth(0,1),o.setHours(0,0,0,0)}var Oe=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,Se=/[\s!-/:-@[-`{-~\u5e74\u6708\u65e5]+/,Le={},Te={y:function y(t,a){return new Date(t).setFullYear(parseInt(a,10))},m:function m(t,a,i){var o=new Date(t),s=parseInt(a,10)-1;if(isNaN(s)){if(!a)return NaN;var c=a.toLowerCase(),l=function compareNames(t){return t.toLowerCase().startsWith(c)};if((s=i.monthsShort.findIndex(l))<0&&(s=i.months.findIndex(l)),s<0)return NaN}return o.setMonth(s),o.getMonth()!==normalizeMonth(s)?o.setDate(0):o.getTime()},d:function d(t,a){return new Date(t).setDate(parseInt(a,10))}},Pe={d:function d(t){return t.getDate()},dd:function dd(t){return padZero(t.getDate(),2)},D:function D(t,a){return a.daysShort[t.getDay()]},DD:function DD(t,a){return a.days[t.getDay()]},m:function m(t){return t.getMonth()+1},mm:function mm(t){return padZero(t.getMonth()+1,2)},M:function M(t,a){return a.monthsShort[t.getMonth()]},MM:function MM(t,a){return a.months[t.getMonth()]},y:function y(t){return t.getFullYear()},yy:function yy(t){return padZero(t.getFullYear(),2).slice(-2)},yyyy:function yyyy(t){return padZero(t.getFullYear(),4)}};function normalizeMonth(t){return t>-1?t%12:normalizeMonth(t+12)}function padZero(t,a){return t.toString().padStart(a,"0")}function parseFormatString(t){if("string"!==typeof t)throw new Error("Invalid date format.");if(t in Le)return Le[t];var a=t.split(Oe),i=t.match(new RegExp(Oe,"g"));if(0===a.length||!i)throw new Error("Invalid date format.");var o=i.map((function(t){return Pe[t]})),s=Object.keys(Te).reduce((function(t,a){return i.find((function(t){return"D"!==t[0]&&t[0].toLowerCase()===a}))&&t.push(a),t}),[]);return Le[t]={parser:function parser(t,a){var o=t.split(Se).reduce((function(t,a,o){if(a.length>0&&i[o]){var s=i[o][0];"M"===s?t.m=a:"D"!==s&&(t[s]=a)}return t}),{});return s.reduce((function(t,i){var s=Te[i](t,o[i],a);return isNaN(s)?t:s}),today())},formatter:function formatter(t,i){return o.reduce((function(o,s,c){return o+"".concat(a[c]).concat(s(t,i))}),"")+lastItemOf(a)}}}function date_format_parseDate(t,a,i){if(t instanceof Date||"number"===typeof t){var o=stripTime(t);return isNaN(o)?void 0:o}if(t){if("today"===t)return today();if(a&&a.toValue){var s=a.toValue(t,a,i);return isNaN(s)?void 0:stripTime(s)}return parseFormatString(a).parser(t,i)}}function date_format_formatDate(t,a,i){if(isNaN(t)||!t&&0!==t)return"";var o="number"===typeof t?new Date(t):t;return a.toDisplay?a.toDisplay(o,a,i):parseFormatString(a).formatter(o,i)}var Ce=document.createRange();function parseHTML(t){return Ce.createContextualFragment(t)}function getParent(t){return t.parentElement||(t.parentNode instanceof ShadowRoot?t.parentNode.host:void 0)}function isActiveElement(t){return t.getRootNode().activeElement===t}function hideElement(t){"none"!==t.style.display&&(t.style.display&&(t.dataset.styleDisplay=t.style.display),t.style.display="none")}function showElement(t){"none"===t.style.display&&(t.dataset.styleDisplay?(t.style.display=t.dataset.styleDisplay,delete t.dataset.styleDisplay):t.style.display="")}function emptyChildNodes(t){t.firstChild&&(t.removeChild(t.firstChild),emptyChildNodes(t))}function _toArray(t){return function event_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||event_iterableToArray(t)||event_unsupportedIterableToArray(t)||function event_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function event_toConsumableArray(t){return function event_arrayWithoutHoles(t){if(Array.isArray(t))return event_arrayLikeToArray(t)}(t)||event_iterableToArray(t)||event_unsupportedIterableToArray(t)||function event_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function event_unsupportedIterableToArray(t,a){if(t){if("string"===typeof t)return event_arrayLikeToArray(t,a);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?event_arrayLikeToArray(t,a):void 0}}function event_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function event_arrayLikeToArray(t,a){(null==a||a>t.length)&&(a=t.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=t[i];return o}var Ve=new WeakMap,Me=EventTarget.prototype,xe=Me.addEventListener,Ie=Me.removeEventListener;function registerListeners(t,a){var i=Ve.get(t);i||(i=[],Ve.set(t,i)),a.forEach((function(t){xe.call.apply(xe,event_toConsumableArray(t)),i.push(t)}))}if(!Event.prototype.composedPath){var je=function getComposedPath(t){var a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return i.push(t),t.parentNode?a=t.parentNode:t.host?a=t.host:t.defaultView&&(a=t.defaultView),a?getComposedPath(a,i):i};Event.prototype.composedPath=function(){return je(this.target)}}function findFromPath(t,a,i){var o=_toArray(t),s=o[0],c=o.slice(1);return a(s)?s:s!==i&&"HTML"!==s.tagName&&0!==c.length?findFromPath(c,a,i):void 0}function findElementInEventPath(t,a){var i="function"===typeof a?a:function(t){return t instanceof Element&&t.matches(a)};return findFromPath(t.composedPath(),i,t.currentTarget)}var Ne={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM y"}},Ye={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:"\xbb",orientation:"auto",pickLevel:0,prevArrow:"\xab",showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0},Re=Ye.language,Fe=Ye.format,Be=Ye.weekStart;function sanitizeDOW(t,a){return t.length<6&&a>=0&&a<7?pushUnique(t,a):t}function calcEndOfWeek(t){return(t+6)%7}function validateDate(t,a,i,o){var s=date_format_parseDate(t,a,i);return void 0!==s?s:o}function validateViewId(t,a){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,o=parseInt(t,10);return o>=0&&o<=i?o:a}function processOptions(t,a){var i,o=Object.assign({},t),s={},c=a.constructor.locales,l=a.rangeSideIndex,u=a.config||{},f=u.format,p=u.language,h=u.locale,v=u.maxDate,g=u.maxView,b=u.minDate,w=u.pickLevel,_=u.startView,k=u.weekStart;if(o.language&&(o.language!==p&&(c[o.language]?i=o.language:void 0===c[i=o.language.split("-")[0]]&&(i=!1)),delete o.language,i)){p=s.language=i;var E=h||c[Re];h=Object.assign({format:Fe,weekStart:Be},c[Re]),p!==Re&&Object.assign(h,c[p]),s.locale=h,f===E.format&&(f=s.format=h.format),k===E.weekStart&&(k=s.weekStart=h.weekStart,s.weekEnd=calcEndOfWeek(h.weekStart))}if(o.format){var A="function"===typeof o.format.toDisplay,O="function"===typeof o.format.toValue,S=Oe.test(o.format);(A&&O||S)&&(f=s.format=o.format),delete o.format}var L=w;void 0!==o.pickLevel&&(L=validateViewId(o.pickLevel,2),delete o.pickLevel),L!==w&&(L>w&&(void 0===o.minDate&&(o.minDate=b),void 0===o.maxDate&&(o.maxDate=v)),o.datesDisabled||(o.datesDisabled=[]),w=s.pickLevel=L);var T=b,P=v;if(void 0!==o.minDate){var C=dateValue(0,0,1);(T=null===o.minDate?C:validateDate(o.minDate,f,h,T))!==C&&(T=regularizeDate(T,w,!1)),delete o.minDate}if(void 0!==o.maxDate&&(void 0!==(P=null===o.maxDate?void 0:validateDate(o.maxDate,f,h,P))&&(P=regularizeDate(P,w,!0)),delete o.maxDate),P<T?(b=s.minDate=P,v=s.maxDate=T):(b!==T&&(b=s.minDate=T),v!==P&&(v=s.maxDate=P)),o.datesDisabled&&(s.datesDisabled=o.datesDisabled.reduce((function(t,a){var i=date_format_parseDate(a,f,h);return void 0!==i?pushUnique(t,regularizeDate(i,w,l)):t}),[]),delete o.datesDisabled),void 0!==o.defaultViewDate){var V=date_format_parseDate(o.defaultViewDate,f,h);void 0!==V&&(s.defaultViewDate=V),delete o.defaultViewDate}if(void 0!==o.weekStart){var x=Number(o.weekStart)%7;isNaN(x)||(k=s.weekStart=x,s.weekEnd=calcEndOfWeek(x)),delete o.weekStart}if(o.daysOfWeekDisabled&&(s.daysOfWeekDisabled=o.daysOfWeekDisabled.reduce(sanitizeDOW,[]),delete o.daysOfWeekDisabled),o.daysOfWeekHighlighted&&(s.daysOfWeekHighlighted=o.daysOfWeekHighlighted.reduce(sanitizeDOW,[]),delete o.daysOfWeekHighlighted),void 0!==o.maxNumberOfDates){var I=parseInt(o.maxNumberOfDates,10);I>=0&&(s.maxNumberOfDates=I,s.multidate=1!==I),delete o.maxNumberOfDates}o.dateDelimiter&&(s.dateDelimiter=String(o.dateDelimiter),delete o.dateDelimiter);var j=g;void 0!==o.maxView&&(j=validateViewId(o.maxView,g),delete o.maxView),(j=w>j?w:j)!==g&&(g=s.maxView=j);var N=_;if(void 0!==o.startView&&(N=validateViewId(o.startView,N),delete o.startView),N<w?N=w:N>g&&(N=g),N!==_&&(s.startView=N),o.prevArrow){var Y=parseHTML(o.prevArrow);Y.childNodes.length>0&&(s.prevArrow=Y.childNodes),delete o.prevArrow}if(o.nextArrow){var R=parseHTML(o.nextArrow);R.childNodes.length>0&&(s.nextArrow=R.childNodes),delete o.nextArrow}if(void 0!==o.disableTouchKeyboard&&(s.disableTouchKeyboard="ontouchstart"in document&&!!o.disableTouchKeyboard,delete o.disableTouchKeyboard),o.orientation){var F=o.orientation.toLowerCase().split(/\s+/g);s.orientation={x:F.find((function(t){return"left"===t||"right"===t}))||"auto",y:F.find((function(t){return"top"===t||"bottom"===t}))||"auto"},delete o.orientation}if(void 0!==o.todayBtnMode){switch(o.todayBtnMode){case 0:case 1:s.todayBtnMode=o.todayBtnMode}delete o.todayBtnMode}return Object.keys(o).forEach((function(t){void 0!==o[t]&&hasProperty(Ye,t)&&(s[t]=o[t])})),s}var He=optimizeTemplateHTML('<div class="datepicker">\n <div class="datepicker-picker">\n <div class="datepicker-header">\n <div class="datepicker-title"></div>\n <div class="datepicker-controls">\n <button type="button" class="%buttonClass% prev-btn"></button>\n <button type="button" class="%buttonClass% view-switch"></button>\n <button type="button" class="%buttonClass% next-btn"></button>\n </div>\n </div>\n <div class="datepicker-main"></div>\n <div class="datepicker-footer">\n <div class="datepicker-controls">\n <button type="button" class="%buttonClass% today-btn"></button>\n <button type="button" class="%buttonClass% clear-btn"></button>\n </div>\n </div>\n </div>\n</div>'),We=optimizeTemplateHTML('<div class="days">\n <div class="days-of-week">'.concat(createTagRepeat("span",7,{class:"dow"}),'</div>\n <div class="datepicker-grid">').concat(createTagRepeat("span",42),"</div>\n</div>")),Ue=optimizeTemplateHTML('<div class="calendar-weeks">\n <div class="days-of-week"><span class="dow"></span></div>\n <div class="weeks">'.concat(createTagRepeat("span",6,{class:"week"}),"</div>\n</div>"));function View_toConsumableArray(t){return function View_arrayWithoutHoles(t){if(Array.isArray(t))return View_arrayLikeToArray(t)}(t)||function View_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function View_unsupportedIterableToArray(t,a){if(!t)return;if("string"===typeof t)return View_arrayLikeToArray(t,a);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return View_arrayLikeToArray(t,a)}(t)||function View_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function View_arrayLikeToArray(t,a){(null==a||a>t.length)&&(a=t.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=t[i];return o}function View_typeof(t){return View_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},View_typeof(t)}function View_defineProperties(t,a){for(var i=0;i<a.length;i++){var o=a[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var qe=function(){function View(t,a){!function View_classCallCheck(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}(this,View),Object.assign(this,a,{picker:t,element:parseHTML('<div class="datepicker-view"></div>').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}return function View_createClass(t,a,i){return a&&View_defineProperties(t.prototype,a),i&&View_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(View,[{key:"init",value:function init(t){void 0!==t.pickLevel&&(this.isMinView=this.id===t.pickLevel),this.setOptions(t),this.updateFocus(),this.updateSelection()}},{key:"performBeforeHook",value:function performBeforeHook(t,a,i){var o=this.beforeShow(new Date(i));switch(View_typeof(o)){case"boolean":o={enabled:o};break;case"string":o={classes:o}}if(o){if(!1===o.enabled&&(t.classList.add("disabled"),pushUnique(this.disabled,a)),o.classes){var s,c=o.classes.split(/\s+/);(s=t.classList).add.apply(s,View_toConsumableArray(c)),c.includes("disabled")&&pushUnique(this.disabled,a)}o.content&&function replaceChildNodes(t,a){emptyChildNodes(t),a instanceof DocumentFragment?t.appendChild(a):"string"===typeof a?t.appendChild(parseHTML(a)):"function"===typeof a.forEach&&a.forEach((function(a){t.appendChild(a)}))}(t,o.content)}}}]),View}();function DaysView_typeof(t){return DaysView_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},DaysView_typeof(t)}function DaysView_slicedToArray(t,a){return function DaysView_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function DaysView_iterableToArrayLimit(t,a){var i=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var o,s,c=[],l=!0,u=!1;try{for(i=i.call(t);!(l=(o=i.next()).done)&&(c.push(o.value),!a||c.length!==a);l=!0);}catch(f){u=!0,s=f}finally{try{l||null==i.return||i.return()}finally{if(u)throw s}}return c}(t,a)||DaysView_unsupportedIterableToArray(t,a)||function DaysView_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DaysView_toConsumableArray(t){return function DaysView_arrayWithoutHoles(t){if(Array.isArray(t))return DaysView_arrayLikeToArray(t)}(t)||function DaysView_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||DaysView_unsupportedIterableToArray(t)||function DaysView_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DaysView_unsupportedIterableToArray(t,a){if(t){if("string"===typeof t)return DaysView_arrayLikeToArray(t,a);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?DaysView_arrayLikeToArray(t,a):void 0}}function DaysView_arrayLikeToArray(t,a){(null==a||a>t.length)&&(a=t.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=t[i];return o}function DaysView_defineProperties(t,a){for(var i=0;i<a.length;i++){var o=a[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function _get(){return _get="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,a,i){var o=_superPropBase(t,a);if(o){var s=Object.getOwnPropertyDescriptor(o,a);return s.get?s.get.call(arguments.length<3?t:i):s.value}},_get.apply(this,arguments)}function _superPropBase(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&null!==(t=DaysView_getPrototypeOf(t)););return t}function DaysView_setPrototypeOf(t,a){return DaysView_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,a){return t.__proto__=a,t},DaysView_setPrototypeOf(t,a)}function DaysView_createSuper(t){var a=function DaysView_isNativeReflectConstruct(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=DaysView_getPrototypeOf(t);if(a){var s=DaysView_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,s)}else i=o.apply(this,arguments);return DaysView_possibleConstructorReturn(this,i)}}function DaysView_possibleConstructorReturn(t,a){if(a&&("object"===DaysView_typeof(a)||"function"===typeof a))return a;if(void 0!==a)throw new TypeError("Derived constructors may only return object or undefined");return function DaysView_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function DaysView_getPrototypeOf(t){return DaysView_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},DaysView_getPrototypeOf(t)}var ze=function(t){!function DaysView_inherits(t,a){if("function"!==typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(a&&a.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),a&&DaysView_setPrototypeOf(t,a)}(DaysView,t);var a=DaysView_createSuper(DaysView);function DaysView(t){return function DaysView_classCallCheck(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}(this,DaysView),a.call(this,t,{id:0,name:"days",cellClass:"day"})}return function DaysView_createClass(t,a,i){return a&&DaysView_defineProperties(t.prototype,a),i&&DaysView_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(DaysView,[{key:"init",value:function init(t){var a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(a){var i=parseHTML(We).firstChild;this.dow=i.firstChild,this.grid=i.lastChild,this.element.appendChild(i)}_get(DaysView_getPrototypeOf(DaysView.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function setOptions(t){var a,i=this;if(hasProperty(t,"minDate")&&(this.minDate=t.minDate),hasProperty(t,"maxDate")&&(this.maxDate=t.maxDate),t.datesDisabled&&(this.datesDisabled=t.datesDisabled),t.daysOfWeekDisabled&&(this.daysOfWeekDisabled=t.daysOfWeekDisabled,a=!0),t.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=t.daysOfWeekHighlighted),void 0!==t.todayHighlight&&(this.todayHighlight=t.todayHighlight),void 0!==t.weekStart&&(this.weekStart=t.weekStart,this.weekEnd=t.weekEnd,a=!0),t.locale){var o=this.locale=t.locale;this.dayNames=o.daysMin,this.switchLabelFormat=o.titleFormat,a=!0}if(void 0!==t.beforeShowDay&&(this.beforeShow="function"===typeof t.beforeShowDay?t.beforeShowDay:void 0),void 0!==t.calendarWeeks)if(t.calendarWeeks&&!this.calendarWeeks){var s=parseHTML(Ue).firstChild;this.calendarWeeks={element:s,dow:s.firstChild,weeks:s.lastChild},this.element.insertBefore(s,this.element.firstChild)}else this.calendarWeeks&&!t.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);void 0!==t.showDaysOfWeek&&(t.showDaysOfWeek?(showElement(this.dow),this.calendarWeeks&&showElement(this.calendarWeeks.dow)):(hideElement(this.dow),this.calendarWeeks&&hideElement(this.calendarWeeks.dow))),a&&Array.from(this.dow.children).forEach((function(t,a){var o=(i.weekStart+a)%7;t.textContent=i.dayNames[o],t.className=i.daysOfWeekDisabled.includes(o)?"dow disabled":"dow"}))}},{key:"updateFocus",value:function updateFocus(){var t=new Date(this.picker.viewDate),a=t.getFullYear(),i=t.getMonth(),o=dateValue(a,i,1),s=dayOfTheWeekOf(o,this.weekStart,this.weekStart);this.first=o,this.last=dateValue(a,i+1,0),this.start=s,this.focused=this.picker.viewDate}},{key:"updateSelection",value:function updateSelection(){var t=this.picker.datepicker,a=t.dates,i=t.rangepicker;this.selected=a,i&&(this.range=i.dates)}},{key:"render",value:function render(){var t=this;this.today=this.todayHighlight?today():void 0,this.disabled=DaysView_toConsumableArray(this.datesDisabled);var a=date_format_formatDate(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(a),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){var i=dayOfTheWeekOf(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach((function(t,a){t.textContent=function getWeek(t){var a=dayOfTheWeekOf(t,4,1),i=dayOfTheWeekOf(new Date(a).setMonth(0,4),4,1);return Math.round((a-i)/6048e5)+1}(function addWeeks(t,a){return addDays(t,7*a)}(i,a))}))}Array.from(this.grid.children).forEach((function(a,i){var o=a.classList,s=addDays(t.start,i),c=new Date(s),l=c.getDay();if(a.className="datepicker-cell ".concat(t.cellClass),a.dataset.date=s,a.textContent=c.getDate(),s<t.first?o.add("prev"):s>t.last&&o.add("next"),t.today===s&&o.add("today"),(s<t.minDate||s>t.maxDate||t.disabled.includes(s))&&o.add("disabled"),t.daysOfWeekDisabled.includes(l)&&(o.add("disabled"),pushUnique(t.disabled,s)),t.daysOfWeekHighlighted.includes(l)&&o.add("highlighted"),t.range){var u=DaysView_slicedToArray(t.range,2),f=u[0],p=u[1];s>f&&s<p&&o.add("range"),s===f&&o.add("range-start"),s===p&&o.add("range-end")}t.selected.includes(s)&&o.add("selected"),s===t.focused&&o.add("focused"),t.beforeShow&&t.performBeforeHook(a,s,s)}))}},{key:"refresh",value:function refresh(){var t=this,a=DaysView_slicedToArray(this.range||[],2),i=a[0],o=a[1];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach((function(t){t.classList.remove("range","range-start","range-end","selected","focused")})),Array.from(this.grid.children).forEach((function(a){var s=Number(a.dataset.date),c=a.classList;s>i&&s<o&&c.add("range"),s===i&&c.add("range-start"),s===o&&c.add("range-end"),t.selected.includes(s)&&c.add("selected"),s===t.focused&&c.add("focused")}))}},{key:"refreshFocus",value:function refreshFocus(){var t=Math.round((this.focused-this.start)/864e5);this.grid.querySelectorAll(".focused").forEach((function(t){t.classList.remove("focused")})),this.grid.children[t].classList.add("focused")}}]),DaysView}(qe);function MonthsView_typeof(t){return MonthsView_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},MonthsView_typeof(t)}function MonthsView_defineProperties(t,a){for(var i=0;i<a.length;i++){var o=a[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function MonthsView_get(){return MonthsView_get="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,a,i){var o=MonthsView_superPropBase(t,a);if(o){var s=Object.getOwnPropertyDescriptor(o,a);return s.get?s.get.call(arguments.length<3?t:i):s.value}},MonthsView_get.apply(this,arguments)}function MonthsView_superPropBase(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&null!==(t=MonthsView_getPrototypeOf(t)););return t}function MonthsView_setPrototypeOf(t,a){return MonthsView_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,a){return t.__proto__=a,t},MonthsView_setPrototypeOf(t,a)}function MonthsView_createSuper(t){var a=function MonthsView_isNativeReflectConstruct(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=MonthsView_getPrototypeOf(t);if(a){var s=MonthsView_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,s)}else i=o.apply(this,arguments);return MonthsView_possibleConstructorReturn(this,i)}}function MonthsView_possibleConstructorReturn(t,a){if(a&&("object"===MonthsView_typeof(a)||"function"===typeof a))return a;if(void 0!==a)throw new TypeError("Derived constructors may only return object or undefined");return function MonthsView_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function MonthsView_getPrototypeOf(t){return MonthsView_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},MonthsView_getPrototypeOf(t)}function MonthsView_slicedToArray(t,a){return function MonthsView_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function MonthsView_iterableToArrayLimit(t,a){var i=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var o,s,c=[],l=!0,u=!1;try{for(i=i.call(t);!(l=(o=i.next()).done)&&(c.push(o.value),!a||c.length!==a);l=!0);}catch(f){u=!0,s=f}finally{try{l||null==i.return||i.return()}finally{if(u)throw s}}return c}(t,a)||function MonthsView_unsupportedIterableToArray(t,a){if(!t)return;if("string"===typeof t)return MonthsView_arrayLikeToArray(t,a);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return MonthsView_arrayLikeToArray(t,a)}(t,a)||function MonthsView_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function MonthsView_arrayLikeToArray(t,a){(null==a||a>t.length)&&(a=t.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=t[i];return o}function computeMonthRange(t,a){if(t&&t[0]&&t[1]){var i=MonthsView_slicedToArray(t,2),o=MonthsView_slicedToArray(i[0],2),s=o[0],c=o[1],l=MonthsView_slicedToArray(i[1],2),u=l[0],f=l[1];if(!(s>a||u<a))return[s===a?c:-1,u===a?f:12]}}var Ke=function(t){!function MonthsView_inherits(t,a){if("function"!==typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(a&&a.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),a&&MonthsView_setPrototypeOf(t,a)}(MonthsView,t);var a=MonthsView_createSuper(MonthsView);function MonthsView(t){return function MonthsView_classCallCheck(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}(this,MonthsView),a.call(this,t,{id:1,name:"months",cellClass:"month"})}return function MonthsView_createClass(t,a,i){return a&&MonthsView_defineProperties(t.prototype,a),i&&MonthsView_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(MonthsView,[{key:"init",value:function init(t){var a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];a&&(this.grid=this.element,this.element.classList.add("months","datepicker-grid"),this.grid.appendChild(parseHTML(createTagRepeat("span",12,{"data-month":function dataMonth(t){return t}})))),MonthsView_get(MonthsView_getPrototypeOf(MonthsView.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function setOptions(t){if(t.locale&&(this.monthNames=t.locale.monthsShort),hasProperty(t,"minDate"))if(void 0===t.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{var a=new Date(t.minDate);this.minYear=a.getFullYear(),this.minMonth=a.getMonth(),this.minDate=a.setDate(1)}if(hasProperty(t,"maxDate"))if(void 0===t.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{var i=new Date(t.maxDate);this.maxYear=i.getFullYear(),this.maxMonth=i.getMonth(),this.maxDate=dateValue(this.maxYear,this.maxMonth+1,0)}this.isMinView?t.datesDisabled&&(this.datesDisabled=t.datesDisabled):this.datesDisabled=[],void 0!==t.beforeShowMonth&&(this.beforeShow="function"===typeof t.beforeShowMonth?t.beforeShowMonth:void 0)}},{key:"updateFocus",value:function updateFocus(){var t=new Date(this.picker.viewDate);this.year=t.getFullYear(),this.focused=t.getMonth()}},{key:"updateSelection",value:function updateSelection(){var t=this.picker.datepicker,a=t.dates,i=t.rangepicker;this.selected=a.reduce((function(t,a){var i=new Date(a),o=i.getFullYear(),s=i.getMonth();return void 0===t[o]?t[o]=[s]:pushUnique(t[o],s),t}),{}),i&&i.dates&&(this.range=i.dates.map((function(t){var a=new Date(t);return isNaN(a)?void 0:[a.getFullYear(),a.getMonth()]})))}},{key:"render",value:function render(){var t=this;this.disabled=this.datesDisabled.reduce((function(a,i){var o=new Date(i);return t.year===o.getFullYear()&&a.push(o.getMonth()),a}),[]),this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);var a=this.selected[this.year]||[],i=this.year<this.minYear||this.year>this.maxYear,o=this.year===this.minYear,s=this.year===this.maxYear,c=computeMonthRange(this.range,this.year);Array.from(this.grid.children).forEach((function(l,u){var f=l.classList,p=dateValue(t.year,u,1);if(l.className="datepicker-cell ".concat(t.cellClass),t.isMinView&&(l.dataset.date=p),l.textContent=t.monthNames[u],(i||o&&u<t.minMonth||s&&u>t.maxMonth||t.disabled.includes(u))&&f.add("disabled"),c){var h=MonthsView_slicedToArray(c,2),v=h[0],g=h[1];u>v&&u<g&&f.add("range"),u===v&&f.add("range-start"),u===g&&f.add("range-end")}a.includes(u)&&f.add("selected"),u===t.focused&&f.add("focused"),t.beforeShow&&t.performBeforeHook(l,u,p)}))}},{key:"refresh",value:function refresh(){var t=this,a=this.selected[this.year]||[],i=MonthsView_slicedToArray(computeMonthRange(this.range,this.year)||[],2),o=i[0],s=i[1];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach((function(t){t.classList.remove("range","range-start","range-end","selected","focused")})),Array.from(this.grid.children).forEach((function(i,c){var l=i.classList;c>o&&c<s&&l.add("range"),c===o&&l.add("range-start"),c===s&&l.add("range-end"),a.includes(c)&&l.add("selected"),c===t.focused&&l.add("focused")}))}},{key:"refreshFocus",value:function refreshFocus(){this.grid.querySelectorAll(".focused").forEach((function(t){t.classList.remove("focused")})),this.grid.children[this.focused].classList.add("focused")}}]),MonthsView}(qe);function YearsView_typeof(t){return YearsView_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},YearsView_typeof(t)}function YearsView_slicedToArray(t,a){return function YearsView_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function YearsView_iterableToArrayLimit(t,a){var i=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var o,s,c=[],l=!0,u=!1;try{for(i=i.call(t);!(l=(o=i.next()).done)&&(c.push(o.value),!a||c.length!==a);l=!0);}catch(f){u=!0,s=f}finally{try{l||null==i.return||i.return()}finally{if(u)throw s}}return c}(t,a)||YearsView_unsupportedIterableToArray(t,a)||function YearsView_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function YearsView_defineProperties(t,a){for(var i=0;i<a.length;i++){var o=a[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function YearsView_get(){return YearsView_get="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,a,i){var o=YearsView_superPropBase(t,a);if(o){var s=Object.getOwnPropertyDescriptor(o,a);return s.get?s.get.call(arguments.length<3?t:i):s.value}},YearsView_get.apply(this,arguments)}function YearsView_superPropBase(t,a){for(;!Object.prototype.hasOwnProperty.call(t,a)&&null!==(t=YearsView_getPrototypeOf(t)););return t}function YearsView_setPrototypeOf(t,a){return YearsView_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,a){return t.__proto__=a,t},YearsView_setPrototypeOf(t,a)}function YearsView_createSuper(t){var a=function YearsView_isNativeReflectConstruct(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=YearsView_getPrototypeOf(t);if(a){var s=YearsView_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,s)}else i=o.apply(this,arguments);return YearsView_possibleConstructorReturn(this,i)}}function YearsView_possibleConstructorReturn(t,a){if(a&&("object"===YearsView_typeof(a)||"function"===typeof a))return a;if(void 0!==a)throw new TypeError("Derived constructors may only return object or undefined");return function YearsView_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function YearsView_getPrototypeOf(t){return YearsView_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},YearsView_getPrototypeOf(t)}function YearsView_toConsumableArray(t){return function YearsView_arrayWithoutHoles(t){if(Array.isArray(t))return YearsView_arrayLikeToArray(t)}(t)||function YearsView_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||YearsView_unsupportedIterableToArray(t)||function YearsView_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function YearsView_unsupportedIterableToArray(t,a){if(t){if("string"===typeof t)return YearsView_arrayLikeToArray(t,a);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?YearsView_arrayLikeToArray(t,a):void 0}}function YearsView_arrayLikeToArray(t,a){(null==a||a>t.length)&&(a=t.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=t[i];return o}function toTitleCase(t){return YearsView_toConsumableArray(t).reduce((function(t,a,i){return t+(i?a:a.toUpperCase())}),"")}var Xe=function(t){!function YearsView_inherits(t,a){if("function"!==typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(a&&a.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),a&&YearsView_setPrototypeOf(t,a)}(YearsView,t);var a=YearsView_createSuper(YearsView);function YearsView(t,i){return function YearsView_classCallCheck(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}(this,YearsView),a.call(this,t,i)}return function YearsView_createClass(t,a,i){return a&&YearsView_defineProperties(t.prototype,a),i&&YearsView_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(YearsView,[{key:"init",value:function init(t){var a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];a&&(this.navStep=10*this.step,this.beforeShowOption="beforeShow".concat(toTitleCase(this.cellClass)),this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid"),this.grid.appendChild(parseHTML(createTagRepeat("span",12)))),YearsView_get(YearsView_getPrototypeOf(YearsView.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function setOptions(t){if(hasProperty(t,"minDate")&&(void 0===t.minDate?this.minYear=this.minDate=void 0:(this.minYear=startOfYearPeriod(t.minDate,this.step),this.minDate=dateValue(this.minYear,0,1))),hasProperty(t,"maxDate")&&(void 0===t.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=startOfYearPeriod(t.maxDate,this.step),this.maxDate=dateValue(this.maxYear,11,31))),this.isMinView?t.datesDisabled&&(this.datesDisabled=t.datesDisabled):this.datesDisabled=[],void 0!==t[this.beforeShowOption]){var a=t[this.beforeShowOption];this.beforeShow="function"===typeof a?a:void 0}}},{key:"updateFocus",value:function updateFocus(){var t=new Date(this.picker.viewDate),a=startOfYearPeriod(t,this.navStep),i=a+9*this.step;this.first=a,this.last=i,this.start=a-this.step,this.focused=startOfYearPeriod(t,this.step)}},{key:"updateSelection",value:function updateSelection(){var t=this,a=this.picker.datepicker,i=a.dates,o=a.rangepicker;this.selected=i.reduce((function(a,i){return pushUnique(a,startOfYearPeriod(i,t.step))}),[]),o&&o.dates&&(this.range=o.dates.map((function(a){if(void 0!==a)return startOfYearPeriod(a,t.step)})))}},{key:"render",value:function render(){var t=this;this.disabled=this.datesDisabled.map((function(t){return new Date(t).getFullYear()})),this.picker.setViewSwitchLabel("".concat(this.first,"-").concat(this.last)),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach((function(a,i){var o=a.classList,s=t.start+i*t.step,c=dateValue(s,0,1);if(a.className="datepicker-cell ".concat(t.cellClass),t.isMinView&&(a.dataset.date=c),a.textContent=a.dataset.year=s,0===i?o.add("prev"):11===i&&o.add("next"),(s<t.minYear||s>t.maxYear||t.disabled.includes(s))&&o.add("disabled"),t.range){var l=YearsView_slicedToArray(t.range,2),u=l[0],f=l[1];s>u&&s<f&&o.add("range"),s===u&&o.add("range-start"),s===f&&o.add("range-end")}t.selected.includes(s)&&o.add("selected"),s===t.focused&&o.add("focused"),t.beforeShow&&t.performBeforeHook(a,s,c)}))}},{key:"refresh",value:function refresh(){var t=this,a=YearsView_slicedToArray(this.range||[],2),i=a[0],o=a[1];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach((function(t){t.classList.remove("range","range-start","range-end","selected","focused")})),Array.from(this.grid.children).forEach((function(a){var s=Number(a.textContent),c=a.classList;s>i&&s<o&&c.add("range"),s===i&&c.add("range-start"),s===o&&c.add("range-end"),t.selected.includes(s)&&c.add("selected"),s===t.focused&&c.add("focused")}))}},{key:"refreshFocus",value:function refreshFocus(){var t=Math.round((this.focused-this.start)/this.step);this.grid.querySelectorAll(".focused").forEach((function(t){t.classList.remove("focused")})),this.grid.children[t].classList.add("focused")}}]),YearsView}(qe);function triggerDatepickerEvent(t,a){var i={date:t.getDate(),viewDate:new Date(t.picker.viewDate),viewId:t.picker.currentView.id,datepicker:t};t.element.dispatchEvent(new CustomEvent(a,{detail:i}))}function goToPrevOrNext(t,a){var i,o=t.config,s=o.minDate,c=o.maxDate,l=t.picker,u=l.currentView,f=l.viewDate;switch(u.id){case 0:i=addMonths(f,a);break;case 1:i=addYears(f,a);break;default:i=addYears(f,a*u.navStep)}i=limitToRange(i,s,c),t.picker.changeFocus(i).render()}function switchView(t){var a=t.picker.currentView.id;a!==t.config.maxView&&t.picker.changeView(a+1).render()}function unfocus(t){t.config.updateOnBlur?t.update({revert:!0}):t.refresh("input"),t.hide()}function goToSelectedMonthOrYear(t,a){var i=t.picker,o=new Date(i.viewDate),s=i.currentView.id,c=1===s?addMonths(o,a-o.getMonth()):addYears(o,a-o.getFullYear());i.changeFocus(c).changeView(s-1).render()}function onClickTodayBtn(t){var a=t.picker,i=today();if(1===t.config.todayBtnMode){if(t.config.autohide)return void t.setDate(i);t.setDate(i,{render:!1}),a.update()}a.viewDate!==i&&a.changeFocus(i),a.changeView(0).render()}function onClickClearBtn(t){t.setDate({clear:!0})}function onClickViewSwitch(t){switchView(t)}function onClickPrevBtn(t){goToPrevOrNext(t,-1)}function onClickNextBtn(t){goToPrevOrNext(t,1)}function onClickView(t,a){var i=findElementInEventPath(a,".datepicker-cell");if(i&&!i.classList.contains("disabled")){var o=t.picker.currentView,s=o.id;o.isMinView?t.setDate(Number(i.dataset.date)):goToSelectedMonthOrYear(t,Number(1===s?i.dataset.month:i.dataset.year))}}function onMousedownPicker(t){t.preventDefault()}function Picker_toConsumableArray(t){return function Picker_arrayWithoutHoles(t){if(Array.isArray(t))return Picker_arrayLikeToArray(t)}(t)||function Picker_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Picker_unsupportedIterableToArray(t)||function Picker_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Picker_slicedToArray(t,a){return function Picker_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function Picker_iterableToArrayLimit(t,a){var i=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var o,s,c=[],l=!0,u=!1;try{for(i=i.call(t);!(l=(o=i.next()).done)&&(c.push(o.value),!a||c.length!==a);l=!0);}catch(f){u=!0,s=f}finally{try{l||null==i.return||i.return()}finally{if(u)throw s}}return c}(t,a)||Picker_unsupportedIterableToArray(t,a)||function Picker_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Picker_unsupportedIterableToArray(t,a){if(t){if("string"===typeof t)return Picker_arrayLikeToArray(t,a);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Picker_arrayLikeToArray(t,a):void 0}}function Picker_arrayLikeToArray(t,a){(null==a||a>t.length)&&(a=t.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=t[i];return o}function Picker_defineProperties(t,a){for(var i=0;i<a.length;i++){var o=a[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var Je=["left","top","right","bottom"].reduce((function(t,a){return t[a]="datepicker-orient-".concat(a),t}),{}),Ge=function toPx(t){return t?"".concat(t,"px"):t};function processPickerOptions(t,a){if(void 0!==a.title&&(a.title?(t.controls.title.textContent=a.title,showElement(t.controls.title)):(t.controls.title.textContent="",hideElement(t.controls.title))),a.prevArrow){var i=t.controls.prevBtn;emptyChildNodes(i),a.prevArrow.forEach((function(t){i.appendChild(t.cloneNode(!0))}))}if(a.nextArrow){var o=t.controls.nextBtn;emptyChildNodes(o),a.nextArrow.forEach((function(t){o.appendChild(t.cloneNode(!0))}))}if(a.locale&&(t.controls.todayBtn.textContent=a.locale.today,t.controls.clearBtn.textContent=a.locale.clear),void 0!==a.todayBtn&&(a.todayBtn?showElement(t.controls.todayBtn):hideElement(t.controls.todayBtn)),hasProperty(a,"minDate")||hasProperty(a,"maxDate")){var s=t.datepicker.config,c=s.minDate,l=s.maxDate;t.controls.todayBtn.disabled=!isInRange(today(),c,l)}void 0!==a.clearBtn&&(a.clearBtn?showElement(t.controls.clearBtn):hideElement(t.controls.clearBtn))}function computeResetViewDate(t){var a=t.dates,i=t.config;return limitToRange(a.length>0?lastItemOf(a):i.defaultViewDate,i.minDate,i.maxDate)}function setViewDate(t,a){var i=new Date(t.viewDate),o=new Date(a),s=t.currentView,c=s.id,l=s.year,u=s.first,f=s.last,p=o.getFullYear();switch(t.viewDate=a,p!==i.getFullYear()&&triggerDatepickerEvent(t.datepicker,"changeYear"),o.getMonth()!==i.getMonth()&&triggerDatepickerEvent(t.datepicker,"changeMonth"),c){case 0:return a<u||a>f;case 1:return p!==l;default:return p<u||p>f}}function getTextDirection(t){return window.getComputedStyle(t).direction}function findScrollParents(t){var a=getParent(t);if(a!==document.body&&a)return"visible"!==window.getComputedStyle(a).overflow?a:findScrollParents(a)}var $e=function(){function Picker(t){!function Picker_classCallCheck(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}(this,Picker);var a=(this.datepicker=t).config,i=He.replace(/%buttonClass%/g,a.buttonClass),o=this.element=parseHTML(i).firstChild,s=Picker_slicedToArray(o.firstChild.children,3),c=s[0],l=s[1],u=s[2],f=c.firstElementChild,p=Picker_slicedToArray(c.lastElementChild.children,3),h=p[0],v=p[1],g=p[2],b=Picker_slicedToArray(u.firstChild.children,2),w={title:f,prevBtn:h,viewSwitch:v,nextBtn:g,todayBtn:b[0],clearBtn:b[1]};this.main=l,this.controls=w;var _=t.inline?"inline":"dropdown";o.classList.add("datepicker-".concat(_)),processPickerOptions(this,a),this.viewDate=computeResetViewDate(t),registerListeners(t,[[o,"mousedown",onMousedownPicker],[l,"click",onClickView.bind(null,t)],[w.viewSwitch,"click",onClickViewSwitch.bind(null,t)],[w.prevBtn,"click",onClickPrevBtn.bind(null,t)],[w.nextBtn,"click",onClickNextBtn.bind(null,t)],[w.todayBtn,"click",onClickTodayBtn.bind(null,t)],[w.clearBtn,"click",onClickClearBtn.bind(null,t)]]),this.views=[new ze(this),new Ke(this),new Xe(this,{id:2,name:"years",cellClass:"year",step:1}),new Xe(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[a.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),a.container?a.container.appendChild(this.element):t.inputField.after(this.element)}return function Picker_createClass(t,a,i){return a&&Picker_defineProperties(t.prototype,a),i&&Picker_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(Picker,[{key:"setOptions",value:function setOptions(t){processPickerOptions(this,t),this.views.forEach((function(a){a.init(t,!1)})),this.currentView.render()}},{key:"detach",value:function detach(){this.element.remove()}},{key:"show",value:function show(){if(!this.active){var t=this.datepicker,a=this.element;if(t.inline)a.classList.add("active");else{var i=getTextDirection(t.inputField);i!==getTextDirection(getParent(a))?a.dir=i:a.dir&&a.removeAttribute("dir"),a.style.visiblity="hidden",a.classList.add("active"),this.place(),a.style.visiblity="",t.config.disableTouchKeyboard&&t.inputField.blur()}this.active=!0,triggerDatepickerEvent(t,"show")}}},{key:"hide",value:function hide(){this.active&&(this.datepicker.exitEditMode(),this.element.classList.remove("active"),this.active=!1,triggerDatepickerEvent(this.datepicker,"hide"))}},{key:"place",value:function place(){var t=this.element,a=t.classList,i=t.offsetParent,o=t.style,s=this.datepicker,c=s.config,l=s.inputField,u=this.element.getBoundingClientRect(),f=u.width,p=u.height,h=l.getBoundingClientRect(),v=h.left,g=h.top,b=h.right,w=h.bottom,_=h.width,k=h.height,E=c.orientation,A=E.x,O=E.y,S=v,L=g;if(i!==document.body&&i){var T=i.getBoundingClientRect();S-=T.left-i.scrollLeft,L-=T.top-i.scrollTop}else S+=window.scrollX,L+=window.scrollY;var P=findScrollParents(l),C=0,V=0,x=document.documentElement,I=x.clientWidth,j=x.clientHeight;if(P){var N=P.getBoundingClientRect();N.top>0&&(V=N.top),N.left>0&&(C=N.left),N.right<I&&(I=N.right),N.bottom<j&&(j=N.bottom)}var Y=0;"auto"===A&&(v<C?(A="left",Y=C-v):v+f>I?(A="right",I<b&&(Y=I-b)):A="rtl"===getTextDirection(l)?b-f<C?"left":"right":"left"),"right"===A&&(S+=_-f),S+=Y,"auto"===O&&(O=g-p>V&&w+p>j?"top":"bottom"),"top"===O?L-=p:L+=k,a.remove.apply(a,Picker_toConsumableArray(Object.values(Je))),a.add(Je[A],Je[O]),o.left=Ge(S),o.top=Ge(L)}},{key:"setViewSwitchLabel",value:function setViewSwitchLabel(t){this.controls.viewSwitch.textContent=t}},{key:"setPrevBtnDisabled",value:function setPrevBtnDisabled(t){this.controls.prevBtn.disabled=t}},{key:"setNextBtnDisabled",value:function setNextBtnDisabled(t){this.controls.nextBtn.disabled=t}},{key:"changeView",value:function changeView(t){var a=this.currentView,i=this.views[t];return i.id!==a.id&&(this.currentView=i,this._renderMethod="render",triggerDatepickerEvent(this.datepicker,"changeView"),this.main.replaceChild(i.element,a.element)),this}},{key:"changeFocus",value:function changeFocus(t){return this._renderMethod=setViewDate(this,t)?"render":"refreshFocus",this.views.forEach((function(t){t.updateFocus()})),this}},{key:"update",value:function update(){var t=computeResetViewDate(this.datepicker);return this._renderMethod=setViewDate(this,t)?"render":"refresh",this.views.forEach((function(t){t.updateFocus(),t.updateSelection()})),this}},{key:"render",value:function render(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],a=t&&this._renderMethod||"render";delete this._renderMethod,this.currentView[a]()}}]),Picker}();function findNextAvailableOne(t,a,i,o,s,c){if(isInRange(t,s,c))return o(t)?findNextAvailableOne(a(t,i),a,i,o,s,c):t}function moveByArrowKey(t,a,i,o){var s,c,l=t.picker,u=l.currentView,f=u.step||1,p=l.viewDate;switch(u.id){case 0:p=o?addDays(p,7*i):a.ctrlKey||a.metaKey?addYears(p,i):addDays(p,i),s=addDays,c=function testFn(t){return u.disabled.includes(t)};break;case 1:p=addMonths(p,o?4*i:i),s=addMonths,c=function testFn(t){var a=new Date(t),i=u.year,o=u.disabled;return a.getFullYear()===i&&o.includes(a.getMonth())};break;default:p=addYears(p,i*(o?4:1)*f),s=addYears,c=function testFn(t){return u.disabled.includes(startOfYearPeriod(t,f))}}void 0!==(p=findNextAvailableOne(p,s,i<0?-f:f,c,u.minDate,u.maxDate))&&l.changeFocus(p).render()}function onKeydown(t,a){var i=a.key;if("Tab"!==i){var o=t.picker,s=o.currentView,c=s.id,l=s.isMinView;if(o.active){if(t.editMode)return void("Enter"===i?t.exitEditMode({update:!0,autohide:t.config.autohide}):"Escape"===i&&o.hide());if("ArrowLeft"===i)if(a.ctrlKey||a.metaKey)goToPrevOrNext(t,-1);else{if(a.shiftKey)return void t.enterEditMode();moveByArrowKey(t,a,-1,!1)}else if("ArrowRight"===i)if(a.ctrlKey||a.metaKey)goToPrevOrNext(t,1);else{if(a.shiftKey)return void t.enterEditMode();moveByArrowKey(t,a,1,!1)}else if("ArrowUp"===i)if(a.ctrlKey||a.metaKey)switchView(t);else{if(a.shiftKey)return void t.enterEditMode();moveByArrowKey(t,a,-1,!0)}else if("ArrowDown"===i){if(a.shiftKey&&!a.ctrlKey&&!a.metaKey)return void t.enterEditMode();moveByArrowKey(t,a,1,!0)}else{if("Enter"!==i)return void("Escape"===i?o.hide():"Backspace"!==i&&"Delete"!==i&&(1!==i.length||a.ctrlKey||a.metaKey)||t.enterEditMode());if(l)return void t.setDate(o.viewDate);o.changeView(c-1).render()}}else{if("ArrowDown"!==i)return void("Enter"===i?t.update():"Escape"===i&&o.show());o.show()}a.preventDefault()}else unfocus(t)}function onFocus(t){t.config.showOnFocus&&!t._showing&&t.show()}function onMousedown(t,a){var i=a.target;(t.picker.active||t.config.showOnClick)&&(i._active=isActiveElement(i),i._clicking=setTimeout((function(){delete i._active,delete i._clicking}),2e3))}function onClickInput(t,a){var i=a.target;i._clicking&&(clearTimeout(i._clicking),delete i._clicking,i._active&&t.enterEditMode(),delete i._active,t.config.showOnClick&&t.show())}function onPaste(t,a){a.clipboardData.types.includes("text/plain")&&t.enterEditMode()}function onClickOutside(t,a){var i=t.element,o=t.picker;if(o.active||isActiveElement(i)){var s=o.element;findElementInEventPath(a,(function(t){return t===i||t===s}))||unfocus(t)}}function Datepicker_typeof(t){return Datepicker_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Datepicker_typeof(t)}function Datepicker_classCallCheck(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}function Datepicker_defineProperties(t,a){for(var i=0;i<a.length;i++){var o=a[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function stringifyDates(t,a){return t.map((function(t){return date_format_formatDate(t,a.format,a.locale)})).join(a.dateDelimiter)}function processInputDates(t,a){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=t.config,s=t.dates,c=t.rangeSideIndex;if(0===a.length)return i?[]:void 0;var l=a.reduce((function(t,a){var i=date_format_parseDate(a,o.format,o.locale);return void 0===i||!isInRange(i=regularizeDate(i,o.pickLevel,c),o.minDate,o.maxDate)||t.includes(i)||o.datesDisabled.includes(i)||!(o.pickLevel>0)&&o.daysOfWeekDisabled.includes(new Date(i).getDay())||t.push(i),t}),[]);return 0!==l.length?(o.multidate&&!i&&(l=l.reduce((function(t,a){return s.includes(a)||t.push(a),t}),s.filter((function(t){return!l.includes(t)})))),o.maxNumberOfDates&&l.length>o.maxNumberOfDates?l.slice(-1*o.maxNumberOfDates):l):void 0}function refreshUI(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=t.config,s=t.picker,c=t.inputField;if(2&a){var l=s.active?o.pickLevel:o.startView;s.update().changeView(l).render(i)}1&a&&c&&(c.value=stringifyDates(t.dates,o))}function _setDate(t,a,i){var o=i.clear,s=i.render,c=i.autohide,l=i.revert;void 0===s&&(s=!0),s?void 0===c&&(c=t.config.autohide):c=!1;var u=processInputDates(t,a,o);(u||l)&&(u&&u.toString()!==t.dates.toString()?(t.dates=u,refreshUI(t,s?3:1),triggerDatepickerEvent(t,"changeDate")):refreshUI(t,1),c&&t.hide())}var Ze=function(){function Datepicker(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;Datepicker_classCallCheck(this,Datepicker),t.datepicker=this,this.element=t;var o,s,c=this.config=Object.assign({buttonClass:a.buttonClass&&String(a.buttonClass)||"button",container:null,defaultViewDate:today(),maxDate:void 0,minDate:void 0},processOptions(Ye,this)),l=this.inline="INPUT"!==t.tagName;if(l?c.container=t:(a.container&&(c.container=a.container instanceof HTMLElement?a.container:document.querySelector(a.container)),(o=this.inputField=t).classList.add("datepicker-input")),i){var u=i.inputs.indexOf(o),f=i.datepickers;if(u<0||u>1||!Array.isArray(f))throw Error("Invalid rangepicker object.");f[u]=this,Object.defineProperty(this,"rangepicker",{get:function get(){return i}}),Object.defineProperty(this,"rangeSideIndex",{get:function get(){return u}})}this._options=a,Object.assign(c,processOptions(a,this)),l?(s=stringToArray(t.dataset.date,c.dateDelimiter),delete t.dataset.date):s=stringToArray(o.value,c.dateDelimiter),this.dates=[];var p=processInputDates(this,s);p&&p.length>0&&(this.dates=p),o&&(o.value=stringifyDates(this.dates,c));var h=this.picker=new $e(this);if(l)this.show();else{var v=onClickOutside.bind(null,this),g=[[o,"keydown",onKeydown.bind(null,this)],[o,"focus",onFocus.bind(null,this)],[o,"mousedown",onMousedown.bind(null,this)],[o,"click",onClickInput.bind(null,this)],[o,"paste",onPaste.bind(null,this)],[document,"mousedown",v],[document,"touchstart",v],[window,"resize",h.place.bind(h)]];registerListeners(this,g)}}return function Datepicker_createClass(t,a,i){return a&&Datepicker_defineProperties(t.prototype,a),i&&Datepicker_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(Datepicker,[{key:"active",get:function get(){return!(!this.picker||!this.picker.active)}},{key:"pickerElement",get:function get(){return this.picker?this.picker.element:void 0}},{key:"setOptions",value:function setOptions(t){var a=this.picker,i=processOptions(t,this);Object.assign(this._options,t),Object.assign(this.config,i),a.setOptions(i),refreshUI(this,3)}},{key:"show",value:function show(){if(this.inputField){if(this.inputField.disabled)return;isActiveElement(this.inputField)||this.config.disableTouchKeyboard||(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}},{key:"hide",value:function hide(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}},{key:"destroy",value:function destroy(){return this.hide(),function unregisterListeners(t){var a=Ve.get(t);a&&(a.forEach((function(t){Ie.call.apply(Ie,event_toConsumableArray(t))})),Ve.delete(t))}(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}},{key:"getDate",value:function getDate(){var t=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,i=a?function(i){return date_format_formatDate(i,a,t.config.locale)}:function(t){return new Date(t)};return this.config.multidate?this.dates.map(i):this.dates.length>0?i(this.dates[0]):void 0}},{key:"setDate",value:function setDate(){for(var t=arguments.length,a=new Array(t),i=0;i<t;i++)a[i]=arguments[i];var o=[].concat(a),s={},c=lastItemOf(a);"object"!==Datepicker_typeof(c)||Array.isArray(c)||c instanceof Date||!c||Object.assign(s,o.pop());var l=Array.isArray(o[0])?o[0]:o;_setDate(this,l,s)}},{key:"update",value:function update(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline){var a=Object.assign(t||{},{clear:!0,render:!0}),i=stringToArray(this.inputField.value,this.config.dateDelimiter);_setDate(this,i,a)}}},{key:"refresh",value:function refresh(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t&&"string"!==typeof t&&(a=t,t=void 0),refreshUI(this,"picker"===t?2:"input"===t?1:3,!a)}},{key:"enterEditMode",value:function enterEditMode(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit"))}},{key:"exitEditMode",value:function exitEditMode(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline&&this.editMode){var a=Object.assign({update:!1},t);delete this.editMode,this.inputField.classList.remove("in-edit"),a.update&&this.update(a)}}}],[{key:"formatDate",value:function formatDate(t,a,i){return date_format_formatDate(t,a,i&&Ne[i]||Ne.en)}},{key:"parseDate",value:function parseDate(t,a,i){return date_format_parseDate(t,a,i&&Ne[i]||Ne.en)}},{key:"locales",get:function get(){return Ne}}]),Datepicker}(),Qe=function init(){document.querySelectorAll(".js-datepicker").forEach((function(t,a){var i=new Ze(t);t.ui=i}))};window.addEventListener("".concat(t.LODEDANDREADY),Qe),window.addEventListener("".concat(t.AJAX),Qe);function redaxios_module_typeof(t){return redaxios_module_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},redaxios_module_typeof(t)}var et=function e(t){function n(t,a,i){var o,s={};if(Array.isArray(t))return t.concat(a);for(o in t)s[i?o.toLowerCase():o]=t[o];for(o in a){var c=i?o.toLowerCase():o,l=a[o];s[c]=c in s&&"object"==redaxios_module_typeof(l)?n(s[c],l,"headers"==c):l}return s}function r(a,i,o,s,c){var l="string"!=typeof a?(i=a).url:a,u={config:i},f=n(t,i),p={};s=s||f.data,(f.transformRequest||[]).map((function(t){s=t(s,f.headers)||s})),f.auth&&(p.authorization=f.auth),s&&"object"==redaxios_module_typeof(s)&&"function"!=typeof s.append&&"function"!=typeof s.text&&(s=JSON.stringify(s),p["content-type"]="application/json");try{p[f.xsrfHeaderName]=decodeURIComponent(document.cookie.match(RegExp("(^|; )"+f.xsrfCookieName+"=([^;]*)"))[2])}catch(a){}return f.baseURL&&(l=l.replace(/^(?!.*\/\/)\/?/,f.baseURL+"/")),f.params&&(l+=(~l.indexOf("?")?"&":"?")+(f.paramsSerializer?f.paramsSerializer(f.params):new URLSearchParams(f.params))),(f.fetch||fetch)(l,{method:(o||f.method||"get").toUpperCase(),body:s,headers:n(f.headers,p,!0),credentials:f.withCredentials?"include":c}).then((function(t){for(var a in t)"function"!=typeof t[a]&&(u[a]=t[a]);return"stream"==f.responseType?(u.data=t.body,u):t[f.responseType||"text"]().then((function(t){u.data=t,u.data=JSON.parse(t)})).catch(Object).then((function(){return(f.validateStatus?f.validateStatus(t.status):t.ok)?u:Promise.reject(u)}))}))}return t=t||{},r.request=r,r.get=function(t,a){return r(t,a,"get")},r.delete=function(t,a){return r(t,a,"delete")},r.head=function(t,a){return r(t,a,"head")},r.options=function(t,a){return r(t,a,"options")},r.post=function(t,a,i){return r(t,i,"post",a)},r.put=function(t,a,i){return r(t,i,"put",a)},r.patch=function(t,a,i){return r(t,i,"patch",a)},r.all=Promise.all.bind(Promise),r.spread=function(t){return t.apply.bind(t,t)},r.CancelToken="function"==typeof AbortController?AbortController:Object,r.defaults=t,r.create=e,r}();!function(a){var i,o="main.online",s=document,c=s.body,l=s.querySelector('meta[name="ping"]'),u=!1,f=function UPDATE_ONLINE_STATUS(s){u||(u=!0,s?(c.classList.contains("is-offline")?(console.log("".concat(o,": back Online")),a.dispatchEvent(new Event(t.BACKONLINE))):(console.log("".concat(o,": Online")),a.dispatchEvent(new Event(t.ONLINE))),c.classList.add("is-online"),c.classList.remove("is-offline"),l&&!i&&(console.log("".concat(o,": SESSION_PING is active")),i=setInterval(h,3e5))):(console.log("".concat(o,": Offline")),c.classList.add("is-offline"),c.classList.remove("is-online"),clearInterval(i),i=null,a.dispatchEvent(new Event(t.OFFLINE))),u=!1)},p=!1,h=function SESSION_PING(){if(!p&&!c.classList.contains("is-offline")){var t=l.getAttribute("content");console.log("".concat(o,": session ping")),p=!0,et.post(t,{}).then((function(t){p=!1,f(!0)})).catch((function(t){console.error(t),console.warn("".concat(o,": SESSION_PING failed")),p=!1,f(!1)}))}},v=function navigatorStateUpdate(){"undefined"!==typeof navigator.onLine&&(navigator.onLine?f(!0):f(!1))};a.addEventListener("".concat(t.OFFLINE),(function(){f(!1)})),a.addEventListener("".concat(t.ONLINE),(function(){f(!0)})),a.addEventListener("".concat(t.LOADED),v),a.addEventListener("".concat(t.AJAX),v)}(window);function image_defineProperties(t,a){for(var i=0;i<a.length;i++){var o=a[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var tt="ajax.models.image",nt=document.querySelector('meta[name="api_static_domain"]'),rt=nt?nt.getAttribute("content"):"".concat(window.location.protocol,"//").concat(window.location.host);console.log("".concat(tt," [static url]: ").concat(rt));var at=function(){function ImageObject(){!function image_classCallCheck(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}(this,ImageObject)}return function image_createClass(t,a,i){return a&&image_defineProperties(t.prototype,a),i&&image_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(ImageObject,[{key:"load",value:function load(t,a){var i=t.startsWith("http")?t:rt+t;return a&&(a.classList.add("loading"),a.classList.remove("loading__network-error")),new Promise((function(t,o){et.get(i,{responseType:"blob"}).then((function(i){var o=new window.FileReader;o.readAsDataURL(i.data),o.onload=function(){var i=o.result;a&&(a.classList.remove("loading"),a.classList.add("loading__success")),t(i)}})).catch((function(t){console.warn(t);var s="";if(t.response){switch(t.response.status){case 404:s="Not Found.";break;case 500:s="Server issue, please try again latter.";break;default:s="Something went wrong."}console.error("".concat(tt," [").concat(i,"]: ").concat(s))}else t.request?(s="No response received",console.error("".concat(tt," [").concat(i,"]: ").concat(s))):console.error("".concat(tt," [").concat(i,"]: ").concat(t.message));a&&(a.classList.remove("loading"),a.classList.add("loading__network-error"),a.classList.add("empty")),o(t)}))}))}}]),ImageObject}();(function(a){var i=document,o=function loadLazyImages(){console.log("".concat("main.lazy-images",": Load lazy images")),i.querySelectorAll("[data-lazy-src]").forEach((function(t){t.classList.remove("empty"),(new at).load(t.getAttribute("data-lazy-src"),t).then((function(a){t.setAttribute("src",a)})).catch((function(){t.classList.add("empty")}))})),i.querySelectorAll("[data-lazy-bg]").forEach((function(t){t.classList.remove("empty"),(new at).load(t.getAttribute("data-lazy-bg"),t).then((function(a){t.style.backgroundImage="url(".concat(a,")")})).catch((function(a){t.classList.add("empty")}))}))};a.addEventListener("".concat(t.LODEDANDREADY),o),a.addEventListener("".concat(t.AJAX),o)})(window),function(a){var i="_layout",o=document;a.addEventListener("".concat(t.LOADED),(function(){!function initFonts(){console.log("".concat(i,": initFonts"));var t=o.createElement("link");t.rel="stylesheet",t.type="text/css",t.media="all",t.href="https://fonts.googleapis.com/css?family=Roboto:ital,wght@0,400;0,700;1,400&display=swap",o.getElementsByTagName("head")[0].appendChild(t)}(),function initAnalytics(){console.log("".concat(i,": initAnalytics"))}()}))}(window)}()}(); |