mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-10-22 11:05:45 +02:00
2 lines
139 KiB
JavaScript
2 lines
139 KiB
JavaScript
/*! For license information please see app.js.LICENSE.txt */
|
|
!function(){var t={15:function(t){"use strict";t.exports=function makeYoutubeEmbed(t){if("string"===typeof t){var o=function getId(t){var o=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);if(o&&11==o[2].length)return o[2]}(t);return o?"//www.youtube.com/embed/"+o:void 0}}},456:function(t){var o={getParents:function(t,o){for(var i=[],a=t;a&&a!==document;)o?a.matches(o)&&i.push(a):i.push(a),a=a.parentNode;return i},ucwords:function(t){var o=t.toLowerCase(),i=o.split(" ");o="";for(var a=0;a<i.length;a++){var c=i[a];c=c.charAt(0).toUpperCase()+c.slice(1),a>0&&(o="".concat(o," ")),o+=c}return o}};window.globalF=o,t.exports=o,t.exports.default=o}},o={};function __webpack_require__(i){var a=o[i];if(void 0!==a)return a.exports;var c=o[i]={exports:{}};return t[i](c,c.exports,__webpack_require__),c.exports}!function(){"use strict";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"},o=(function(o){var i="_main.visibility",a=document,c=a.body;a.addEventListener("visibilitychange",(function(){"hidden"===a.visibilityState?(console.log("".concat(i,": Tab: hidden")),c.classList.add("is-hidden"),c.classList.remove("is-focused"),o.dispatchEvent(new Event(t.TABHIDDEN))):(console.log("".concat(i,": Tab: focused")),c.classList.add("is-focused"),c.classList.remove("is-hidden"),o.dispatchEvent(new Event(t.TABFOCUSED)))}))}(window),function(o){var i,a,c="_main.touch",l=document,u=l.body,p=function SET_TOUCH_SCREEN(l,p){a||p===i||(l?(console.log("".concat(c,": Touch screen enabled")),u.classList.add("is-touch"),u.classList.remove("is-mouse"),o.dispatchEvent(new Event(t.TOUCHENABLE))):(console.log("".concat(c,": Touch screen disabled")),u.classList.add("is-mouse"),u.classList.remove("is-touch"),o.dispatchEvent(new Event(t.TOUCHDISABLED))),i=p,a||(a=setTimeout((function(){clearTimeout(a),a=null}),500)))};p("ontouchstart"in o||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0||o.matchMedia("(hover: none)").matches,"init"),l.addEventListener("touchend",(function(t){var o=!1;"click"!==t.type&&(o=!0),p(o,"click-touchend")})),l.addEventListener("click",(function(t){var o=!1;"click"!==t.type&&(o=!0),p(o,"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,o){if(!t)return;if("string"===typeof t)return _arrayLikeToArray(t,o);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,o)}(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,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}(function(i){var a=document,c=a.body,l=function detectCSSScreenSize(){var t,l=a.createElement("div");l.className="env-test",c.appendChild(l);var u=_toConsumableArray(o.ENVS).reverse(),p=u.shift();(t=c.classList).remove.apply(t,_toConsumableArray(u));for(var h=0;h<u.length;++h){var v=u[h];if(l.classList.add("d-".concat(v,"-none")),"none"===i.getComputedStyle(l).display){p=v,c.classList.add("".concat(p));break}}var g=!0;return i.innerWidth>i.innerHeight?(c.classList.add("landscape"),c.classList.remove("portrait")):(g=!1,c.classList.add("portrait"),c.classList.remove("landscape")),console.log("".concat("_main.css-screen-size",": screen size detected ").concat(p," | landscape ").concat(g)),c.removeChild(l),p};i.detectCSSScreenSize=l,i.addEventListener("".concat(t.LOADED),l),i.addEventListener("".concat(t.RESIZE),l)})(window),__webpack_require__(456);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)}function _defineProperties(t,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,(c=a.key,l=void 0,l=function _toPrimitive(t,o){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,o||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(c,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var c,l}var a="_main.loading-spinner",c=document.getElementById("PageLoading"),l=function(){function SpinnerUI(){!function _classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,SpinnerUI)}return function _createClass(t,o,i){return o&&_defineProperties(t.prototype,o),i&&_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(SpinnerUI,null,[{key:"show",value:function show(){console.log("".concat(a,": show")),c.classList.remove("d-none")}},{key:"hide",value:function hide(){console.log("".concat(a,": hide")),c.classList.add("d-none")}}]),SpinnerUI}();function main_typeof(t){return main_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},main_typeof(t)}function main_defineProperties(t,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,(c=a.key,l=void 0,l=function main_toPrimitive(t,o){if("object"!==main_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,o||"default");if("object"!==main_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(c,"string"),"symbol"===main_typeof(l)?l:String(l)),a)}var c,l}!function(i){var a="_main",c=document.body;console.info("%cUI Kit ".concat("@a2nt/ss-bootstrap-ui-webpack-boilerplate-react"," ").concat("5.4.4"),"color:yellow;font-size:14px"),console.info("%c".concat("@a2nt/meta-lightbox-js"," ").concat("4.2.8"),"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(o){console.info("".concat(o,": ").concat(t[o]))})),console.groupEnd("Events"),console.groupCollapsed("Consts"),Object.keys(o).forEach((function(t){console.info("".concat(t,": ").concat(o[t]))})),console.groupEnd("Events"),console.groupCollapsed("Init"),console.time("init");var u=function(){function MainUI(){!function main_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,MainUI)}return function main_createClass(t,o,i){return o&&main_defineProperties(t.prototype,o),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(a,": loaded"))}},{key:"unloaded",value:function unloaded(){console.log("".concat(a,": unloaded")),l.show(),c.classList.remove("loaded")}}]),MainUI}(),p=function documentInit(){u.init(),console.groupEnd("init"),console.timeEnd("init"),i.addEventListener("".concat(t.LOADED),(function(o){i.dispatchEvent(new Event(t.LODEDANDREADY))}))};"loading"===document.readyState?document.addEventListener("".concat(t.DOMLOADED),p):p(),i.addEventListener("".concat(t.LODEDANDREADY),(function(){c.classList.add("loaded"),"undefined"!==typeof i.app&&"undefined"!==typeof i.app.Router||(console.warn("Spinner is hidden"),l.hide())})),i.addEventListener("".concat(t.AJAX),(function(){u.loaded()})),i.MainUI=u}(window);var u="ajax-load",p="load-ready";function window_typeof(t){return window_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},window_typeof(t)}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,o){if(!t)return;if("string"===typeof t)return window_arrayLikeToArray(t,o);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,o)}(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,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}function window_defineProperties(t,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,window_toPropertyKey(a.key),a)}}function _defineProperty(t,o,i){return(o=window_toPropertyKey(o))in t?Object.defineProperty(t,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[o]=i,t}function window_toPropertyKey(t){var o=function window_toPrimitive(t,o){if("object"!==window_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,o||"default");if("object"!==window_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(t,"string");return"symbol"===window_typeof(o)?o:String(o)}var h=window,v=function(){function MetaWindow(){var t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shown:!1},i=arguments.length>1?arguments[1]:void 0;!function window_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(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 o=t;console.log("".concat(o.name,": show")),o.setState({shown:!0}),h.dispatchEvent(new Event("{ui.name}.show"))})),_defineProperty(this,"hide",(function(){var o=t;console.log("".concat(o.name,": hide")),o.setState({shown:!1}),h.dispatchEvent(new Event("{ui.name}.hide"))})),_defineProperty(this,"next",(function(){var o=t,i=o.state.current.getAttribute("data-gallery"),a=o._currIndex();a<o.state.collections[i].length-1?a++:a=0,o.state.collections[i][a].click(),console.log("".concat(o.name,": next")),h.dispatchEvent(new Event("{ui.name}.next"))})),_defineProperty(this,"prev",(function(){var o=t,i=o.state.current.getAttribute("data-gallery"),a=o._currIndex();a>0?a--:a=o.state.collections[i].length-1,o.state.collections[i][a].click(),console.log("".concat(o.name,": prev")),h.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(o){var i=t;i.reset(),i.setState({loading:!0}),i.show(),window.fetch(o,{mode:"no-cors"}).then((function(t){var a=t.headers.get("content-type").toLowerCase();console.log(t),console.log("".concat(i.name,": response content-type: ").concat(a));switch(a){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(a,";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(o,'" 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":t.text().then((function(t){i.setContent(t,["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!"))}h.dispatchEvent(new Event("{ui.name}.loaded"))})).catch((function(t){console.error(t);var o="";if(t.response)switch(t.response.status){case 404:o="Not Found.";break;case 500:o="Server issue, please try again latter.";break;default:o="Something went wrong."}else t.request?o="No response received":console.warn("Error",t.message);i.setState({error:o}),h.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 o=t,i=o.state.current,a=i.getAttribute("data-gallery");return o.state.collections[a].indexOf(i)})),_defineProperty(this,"embed",(function(o){var i=t;console.log("".concat(i.name,": embed")),i.reset(),i.setState({embed:o,loading:!1,type:["meta-".concat(i.name,"--embed"),"meta-".concat(i.name,"--video")]}),i.show()})),_defineProperty(this,"setCaption",(function(o){var i=t;console.log("".concat(i.name,": setCaption")),i.state.caption=o})),_defineProperty(this,"addExtraClass",(function(o){var i=t;o&&o.length&&(console.log("".concat(i.name,": addExtraClass(").concat(o,")")),i.state.extraClass=o)})),_defineProperty(this,"getCaption",(function(){return t.state.caption})),_defineProperty(this,"_imageEncode",(function(t){var o="";return[].slice.call(new Uint8Array(t)).forEach((function(t){o+=String.fromCharCode(t)})),window.btoa(o)})),_defineProperty(this,"setContent",(function(o,i){var a=t;console.log("".concat(a.name,": setContent"));var c=i||["meta-".concat(a.name,"--html"),"meta-".concat(a.name,"--text")];Array.isArray(c)||(c=i.split(" ")),a.setState({content:o,type:c})})),_defineProperty(this,"getHtml",(function(){var o=t;if(o.state.embed){var i=__webpack_require__(15)(o.state.embed);o.state.content='<iframe width="600" height="380" src="'.concat(i,'" frameborder="0"></iframe>')}return o.state.content}));var a=this;switch(a.name=a.constructor.name,console.log("".concat(a.name,": init")),a.setState(o),i){case"show":case"hide":a.hide()}h.dispatchEvent(new Event("{ui.name}.init"))}return function window_createClass(t,o,i){return o&&window_defineProperties(t.prototype,o),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 o=this;t&&(o.state.collections[t]=[],document.querySelectorAll('[data-toggle="lightbox"][data-gallery="'.concat(t,'"]')).forEach((function(i){o.state.collections[t].push(i)})))}},{key:"toggle",value:function toggle(t){var o=this;o.cleanLinks();var i=t.getAttribute("href")||t.getAttribute("data-href"),a=t.getAttribute("data-embed");t.classList.add("loading"),o.state.current=t;var c=t.getAttribute("data-title");c?o.setCaption(c):o.setCaption(""),a?o.embed(i):o.load(i),o.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(o){var i=o.getAttribute("data-gallery");t.collectGaleries(i),o.addEventListener("click",(function(o){o.preventDefault(),console.log("MetaWindow: [link] click");var i=o.currentTarget;t.toggle(i)}))}))}},{key:"setState",value:function setState(t){var o=this;o.state=Object.assign({},o.state,t),o.render()}},{key:"render",value:function render(){var t,o=this,i=o.name,a=o.state.current;o.state.target.innerHTML="";var c=document.createElement("div");c.classList.add("meta-".concat(i)),(t=c.classList).add.apply(t,window_toConsumableArray(o.state.type)),o.state.target.append(c);var l=document.createElement("div");l.classList.add("meta-".concat(i,"-overlay")),o.state.shown&&l.classList.add("meta-".concat(i,"-overlay--open")),o.state.loading&&l.classList.add("meta-".concat(i,"-overlay--loading")),o.state.error&&l.classList.add("meta-".concat(i,"-overlay--error")),c.append(l);var u=document.createElement("div");u.classList.add("meta-content"),l.append(u);var p=document.createElement("button");if(p.classList.add("meta-nav","meta-close","a"),p.innerHTML='<i class="icon fa fas fa-times"></i> <span class="visually-hidden">Close</span>',p.addEventListener("click",(function(t){t.preventDefault(),o.hide()})),u.append(p),a){var h=a.getAttribute("data-gallery");if(h&&o.state.collections[h].length>1){var v=document.createElement("nav");v.classList.add("meta-navs");var g=document.createElement("button");g.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__prev","a"),g.innerHTML='<i class="icon fa fas fa-chevron-left"></i> <span class="visually-hidden">Previous</span>',g.addEventListener("click",(function(t){t.preventDefault(),o.prev()})),v.append(g);var b=document.createElement("button");b.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__next","a"),b.innerHTML='<i class="icon fa fas fa-chevron-right"></i> <span class="visually-hidden">Next</span>',b.addEventListener("click",(function(t){t.preventDefault(),o.next()})),v.append(b),u.append(v)}}var w=document.createElement("section");if(w.classList.add("meta-wrap","typography"),o.state.extraClass&&w.classList.add(o.state.extraClass),w.innerHTML=o.getHtml(),u.append(w),o.state.error){var _=document.createElement("div");_.classList.add("meta-error"),_.innerHTML=o.state.error,u.append(_)}else if(o.state.caption){var k=document.createElement("div");k.classList.add("meta-caption"),k.innerHTML=o.getCaption(),u.append(k)}return"undefined"!==typeof window.FontAwesome&&window.FontAwesome.dom.i2svg(),o}}]),MetaWindow}(),g=v,b=document.getElementById("MetaLightboxApp");b||(console.warn("MetaWindow: missing container #MetaLightboxApp - create new one"),(b=document.createElement("div")).setAttribute("id","MetaLightboxApp"),document.querySelector("body").append(b));var w=function init(){var t=window.MetaWindow;"undefined"===typeof t&&(t=new g({target:b}),window.MetaWindow=t),t.init()};window.addEventListener("".concat(p),w),window.addEventListener("".concat(u),w),window.addEventListener("MetaWindow.initLinks",w);var _=new Map,k=function set(t,o,i){_.has(t)||_.set(t,new Map);var a=_.get(t);a.has(o)||0===a.size?a.set(o,i):console.error("Bootstrap doesn't allow more than one instance per element. Bound instance: ".concat(Array.from(a.keys())[0],"."))},O=function get(t,o){return _.has(t)&&_.get(t).get(o)||null},S=function remove(t,o){if(_.has(t)){var i=_.get(t);i.delete(o),0===i.size&&_.delete(t)}};function util_toConsumableArray(t){return function util_arrayWithoutHoles(t){if(Array.isArray(t))return util_arrayLikeToArray(t)}(t)||function util_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function util_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return util_arrayLikeToArray(t,o);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 util_arrayLikeToArray(t,o)}(t)||function util_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 util_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}function util_typeof(t){return util_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},util_typeof(t)}var A="transitionend",E=function parseSelector(t){return t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(function(t,o){return"#".concat(CSS.escape(o))}))),t},P=function toType(t){return null===t||void 0===t?"".concat(t):Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase()},T=function triggerTransitionEnd(t){t.dispatchEvent(new Event(A))},L=function isElement(t){return!(!t||"object"!==util_typeof(t))&&("undefined"!==typeof t.jquery&&(t=t[0]),"undefined"!==typeof t.nodeType)},C=function getElement(t){return L(t)?t.jquery?t[0]:t:"string"===typeof t&&t.length>0?document.querySelector(E(t)):null},I=function isVisible(t){if(!L(t)||0===t.getClientRects().length)return!1;var o="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return o;if(i!==t){var a=t.closest("summary");if(a&&a.parentNode!==i)return!1;if(null===a)return!1}return o},V=function getjQuery(){return window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null},j=[],x=function isRTL(){return"rtl"===document.documentElement.dir},N=function execute(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;return"function"===typeof t?t.apply(void 0,util_toConsumableArray(o)):i},R=function executeAfterTransition(t,o){if(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]){var i=function getTransitionDurationFromElement(t){if(!t)return 0;var o=window.getComputedStyle(t),i=o.transitionDuration,a=o.transitionDelay,c=Number.parseFloat(i),l=Number.parseFloat(a);return c||l?(i=i.split(",")[0],a=a.split(",")[0],1e3*(Number.parseFloat(i)+Number.parseFloat(a))):0}(o)+5,a=!1;o.addEventListener(A,(function handler(i){i.target===o&&(a=!0,o.removeEventListener(A,handler),N(t))})),setTimeout((function(){a||T(o)}),i)}else N(t)};function _slicedToArray(t,o){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,o){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,c,l,u,p=[],h=!0,v=!1;try{if(l=(i=i.call(t)).next,0===o){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(p.push(a.value),p.length!==o);h=!0);}catch(t){v=!0,c=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(v)throw c}}return p}}(t,o)||event_handler_unsupportedIterableToArray(t,o)||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 _createForOfIteratorHelper(t,o){var i="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=event_handler_unsupportedIterableToArray(t))||o&&t&&"number"===typeof t.length){i&&(t=i);var a=0,c=function F(){};return{s:c,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,p=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();return u=t.done,t},e:function e(t){p=!0,l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(p)throw l}}}}function event_handler_unsupportedIterableToArray(t,o){if(t){if("string"===typeof t)return event_handler_arrayLikeToArray(t,o);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_handler_arrayLikeToArray(t,o):void 0}}function event_handler_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}var Y=/[^.]*(?=\..*)\.|.*/,B=/\..*/,W=/::\d+$/,H={},U=1,z={mouseenter:"mouseover",mouseleave:"mouseout"},K=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 makeEventUid(t,o){return o&&"".concat(o,"::").concat(U++)||t.uidEvent||U++}function getElementEvents(t){var o=makeEventUid(t);return t.uidEvent=o,H[o]=H[o]||{},H[o]}function findHandler(t,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object.values(t).find((function(t){return t.callable===o&&t.delegationSelector===i}))}function normalizeParameters(t,o,i){var a="string"===typeof o,c=a?i:o||i,l=getTypeEvent(t);return K.has(l)||(l=t),[a,c,l]}function addHandler(t,o,i,a,c){if("string"===typeof o&&t){var l=_slicedToArray(normalizeParameters(o,i,a),3),u=l[0],p=l[1],h=l[2];if(o in z){p=function wrapFunction(t){return function(o){if(!o.relatedTarget||o.relatedTarget!==o.delegateTarget&&!o.delegateTarget.contains(o.relatedTarget))return t.call(this,o)}}(p)}var v=getElementEvents(t),g=v[h]||(v[h]={}),b=findHandler(g,p,u?i:null);if(b)b.oneOff=b.oneOff&&c;else{var w=makeEventUid(p,o.replace(Y,"")),_=u?function bootstrapDelegationHandler(t,o,i){return function handler(a){for(var c=t.querySelectorAll(o),l=a.target;l&&l!==this;l=l.parentNode){var u,p=_createForOfIteratorHelper(c);try{for(p.s();!(u=p.n()).done;)if(u.value===l)return hydrateObj(a,{delegateTarget:l}),handler.oneOff&&q.off(t,a.type,o,i),i.apply(l,[a])}catch(h){p.e(h)}finally{p.f()}}}}(t,i,p):function bootstrapHandler(t,o){return function handler(i){return hydrateObj(i,{delegateTarget:t}),handler.oneOff&&q.off(t,i.type,o),o.apply(t,[i])}}(t,p);_.delegationSelector=u?i:null,_.callable=p,_.oneOff=c,_.uidEvent=w,g[w]=_,t.addEventListener(h,_,u)}}}function removeHandler(t,o,i,a,c){var l=findHandler(o[i],a,c);l&&(t.removeEventListener(i,l,Boolean(c)),delete o[i][l.uidEvent])}function removeNamespacedHandlers(t,o,i,a){for(var c=o[i]||{},l=0,u=Object.entries(c);l<u.length;l++){var p=_slicedToArray(u[l],2),h=p[0],v=p[1];h.includes(a)&&removeHandler(t,o,i,v.callable,v.delegationSelector)}}function getTypeEvent(t){return t=t.replace(B,""),z[t]||t}var q={on:function on(t,o,i,a){addHandler(t,o,i,a,!1)},one:function one(t,o,i,a){addHandler(t,o,i,a,!0)},off:function off(t,o,i,a){if("string"===typeof o&&t){var c=_slicedToArray(normalizeParameters(o,i,a),3),l=c[0],u=c[1],p=c[2],h=p!==o,v=getElementEvents(t),g=v[p]||{},b=o.startsWith(".");if("undefined"===typeof u){if(b)for(var w=0,_=Object.keys(v);w<_.length;w++){removeNamespacedHandlers(t,v,_[w],o.slice(1))}for(var k=0,O=Object.entries(g);k<O.length;k++){var S=_slicedToArray(O[k],2),A=S[0],E=S[1],P=A.replace(W,"");h&&!o.includes(P)||removeHandler(t,v,p,E.callable,E.delegationSelector)}}else{if(!Object.keys(g).length)return;removeHandler(t,v,p,u,l?i:null)}}},trigger:function trigger(t,o,i){if("string"!==typeof o||!t)return null;var $=V(),a=null,c=!0,l=!0,u=!1;o!==getTypeEvent(o)&&$&&(a=$.Event(o,i),$(t).trigger(a),c=!a.isPropagationStopped(),l=!a.isImmediatePropagationStopped(),u=a.isDefaultPrevented());var p=hydrateObj(new Event(o,{bubbles:c,cancelable:!0}),i);return u&&p.preventDefault(),l&&t.dispatchEvent(p),p.defaultPrevented&&a&&a.preventDefault(),p}};function hydrateObj(t){for(var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=function _loop(){var o=_slicedToArray(c[a],2),i=o[0],l=o[1];try{t[i]=l}catch(u){Object.defineProperty(t,i,{configurable:!0,get:function get(){return l}})}},a=0,c=Object.entries(o);a<c.length;a++)i();return t}var X=q;function manipulator_createForOfIteratorHelper(t,o){var i="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function manipulator_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return manipulator_arrayLikeToArray(t,o);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 manipulator_arrayLikeToArray(t,o)}(t))||o&&t&&"number"===typeof t.length){i&&(t=i);var a=0,c=function F(){};return{s:c,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,p=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();return u=t.done,t},e:function e(t){p=!0,l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(p)throw l}}}}function manipulator_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}function normalizeData(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!==typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(o){return t}}function normalizeDataKey(t){return t.replace(/[A-Z]/g,(function(t){return"-".concat(t.toLowerCase())}))}var J={setDataAttribute:function setDataAttribute(t,o,i){t.setAttribute("data-bs-".concat(normalizeDataKey(o)),i)},removeDataAttribute:function removeDataAttribute(t,o){t.removeAttribute("data-bs-".concat(normalizeDataKey(o)))},getDataAttributes:function getDataAttributes(t){if(!t)return{};var o,i={},a=Object.keys(t.dataset).filter((function(t){return t.startsWith("bs")&&!t.startsWith("bsConfig")})),c=manipulator_createForOfIteratorHelper(a);try{for(c.s();!(o=c.n()).done;){var l=o.value,u=l.replace(/^bs/,"");i[u=u.charAt(0).toLowerCase()+u.slice(1,u.length)]=normalizeData(t.dataset[l])}}catch(p){c.e(p)}finally{c.f()}return i},getDataAttribute:function getDataAttribute(t,o){return normalizeData(t.getAttribute("data-bs-".concat(normalizeDataKey(o))))}};function config_slicedToArray(t,o){return function config_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function config_iterableToArrayLimit(t,o){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,c,l,u,p=[],h=!0,v=!1;try{if(l=(i=i.call(t)).next,0===o){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(p.push(a.value),p.length!==o);h=!0);}catch(t){v=!0,c=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(v)throw c}}return p}}(t,o)||function config_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return config_arrayLikeToArray(t,o);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 config_arrayLikeToArray(t,o)}(t,o)||function config_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 config_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}function config_typeof(t){return config_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},config_typeof(t)}function ownKeys(t,o){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(Object(i),!0).forEach((function(o){config_defineProperty(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(i,o))}))}return t}function config_defineProperty(t,o,i){return(o=config_toPropertyKey(o))in t?Object.defineProperty(t,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[o]=i,t}function config_defineProperties(t,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,config_toPropertyKey(a.key),a)}}function config_toPropertyKey(t){var o=function config_toPrimitive(t,o){if("object"!==config_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,o||"default");if("object"!==config_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(t,"string");return"symbol"===config_typeof(o)?o:String(o)}var G=function(){function Config(){!function config_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Config)}return function config_createClass(t,o,i){return o&&config_defineProperties(t.prototype,o),i&&config_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(Config,[{key:"_getConfig",value:function _getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}},{key:"_configAfterMerge",value:function _configAfterMerge(t){return t}},{key:"_mergeConfigObj",value:function _mergeConfigObj(t,o){var i=L(o)?J.getDataAttribute(o,"config"):{};return _objectSpread(_objectSpread(_objectSpread(_objectSpread({},this.constructor.Default),"object"===config_typeof(i)?i:{}),L(o)?J.getDataAttributes(o):{}),"object"===config_typeof(t)?t:{})}},{key:"_typeCheckConfig",value:function _typeCheckConfig(t){for(var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.constructor.DefaultType,i=0,a=Object.entries(o);i<a.length;i++){var c=config_slicedToArray(a[i],2),l=c[0],u=c[1],p=t[l],h=L(p)?"element":P(p);if(!new RegExp(u).test(h))throw new TypeError("".concat(this.constructor.NAME.toUpperCase(),': Option "').concat(l,'" provided type "').concat(h,'" but expected type "').concat(u,'".'))}}}],[{key:"Default",get:function get(){return{}}},{key:"DefaultType",get:function get(){return{}}},{key:"NAME",get:function get(){throw new Error('You have to implement the static method "NAME", for each component!')}}]),Config}(),Z=G;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_createForOfIteratorHelper(t,o){var i="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function base_component_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return base_component_arrayLikeToArray(t,o);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 base_component_arrayLikeToArray(t,o)}(t))||o&&t&&"number"===typeof t.length){i&&(t=i);var a=0,c=function F(){};return{s:c,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,p=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();return u=t.done,t},e:function e(t){p=!0,l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(p)throw l}}}}function base_component_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}function base_component_defineProperties(t,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,(c=a.key,l=void 0,l=function base_component_toPrimitive(t,o){if("object"!==base_component_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,o||"default");if("object"!==base_component_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(c,"string"),"symbol"===base_component_typeof(l)?l:String(l)),a)}var c,l}function _setPrototypeOf(t,o){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,o){return t.__proto__=o,t},_setPrototypeOf(t,o)}function _createSuper(t){var o=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,a=_getPrototypeOf(t);if(o){var c=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,c)}else i=a.apply(this,arguments);return _possibleConstructorReturn(this,i)}}function _possibleConstructorReturn(t,o){if(o&&("object"===base_component_typeof(o)||"function"===typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}var Q=function(t){!function _inherits(t,o){if("function"!==typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&_setPrototypeOf(t,o)}(BaseComponent,t);var o=_createSuper(BaseComponent);function BaseComponent(t,i){var a;return function base_component_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,BaseComponent),a=o.call(this),(t=C(t))?(a._element=t,a._config=a._getConfig(i),k(a._element,a.constructor.DATA_KEY,_assertThisInitialized(a)),a):_possibleConstructorReturn(a)}return function base_component_createClass(t,o,i){return o&&base_component_defineProperties(t.prototype,o),i&&base_component_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(BaseComponent,[{key:"dispose",value:function dispose(){S(this._element,this.constructor.DATA_KEY),X.off(this._element,this.constructor.EVENT_KEY);var t,o=base_component_createForOfIteratorHelper(Object.getOwnPropertyNames(this));try{for(o.s();!(t=o.n()).done;){this[t.value]=null}}catch(i){o.e(i)}finally{o.f()}}},{key:"_queueCallback",value:function _queueCallback(t,o){R(t,o,!(arguments.length>2&&void 0!==arguments[2])||arguments[2])}},{key:"_getConfig",value:function _getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}}],[{key:"getInstance",value:function getInstance(t){return O(C(t),this.DATA_KEY)}},{key:"getOrCreateInstance",value:function getOrCreateInstance(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getInstance(t)||new this(t,"object"===base_component_typeof(o)?o:null)}},{key:"VERSION",get:function get(){return"5.3.2"}},{key:"DATA_KEY",get:function get(){return"bs.".concat(this.NAME)}},{key:"EVENT_KEY",get:function get(){return".".concat(this.DATA_KEY)}},{key:"eventName",value:function eventName(t){return"".concat(t).concat(this.EVENT_KEY)}}]),BaseComponent}(Z),ee=Q;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,o){if(!t)return;if("string"===typeof t)return selector_engine_arrayLikeToArray(t,o);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,o)}(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,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}var te=function getSelector(t){var o=t.getAttribute("data-bs-target");if(!o||"#"===o){var i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i="#".concat(i.split("#")[1])),o=i&&"#"!==i?E(i.trim()):null}return o},re={find:function find(t){var o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return(o=[]).concat.apply(o,selector_engine_toConsumableArray(Element.prototype.querySelectorAll.call(i,t)))},findOne:function findOne(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return Element.prototype.querySelector.call(o,t)},children:function children(t,o){var i;return(i=[]).concat.apply(i,selector_engine_toConsumableArray(t.children)).filter((function(t){return t.matches(o)}))},parents:function parents(t,o){for(var parents=[],i=t.parentNode.closest(o);i;)parents.push(i),i=i.parentNode.closest(o);return parents},prev:function prev(t,o){for(var i=t.previousElementSibling;i;){if(i.matches(o))return[i];i=i.previousElementSibling}return[]},next:function next(t,o){for(var next=t.nextElementSibling;next;){if(next.matches(o))return[next];next=next.nextElementSibling}return[]},focusableChildren:function focusableChildren(t){var o=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((function(t){return"".concat(t,':not([tabindex^="-"])')})).join(",");return this.find(o,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)&&I(t)}))},getSelectorFromElement:function getSelectorFromElement(t){var o=te(t);return o&&re.findOne(o)?o:null},getElementFromSelector:function getElementFromSelector(t){var o=te(t);return o?re.findOne(o):null},getMultipleElementsFromSelector:function getMultipleElementsFromSelector(t){var o=te(t);return o?re.find(o):[]}},ne=re;function swipe_typeof(t){return swipe_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},swipe_typeof(t)}function swipe_defineProperties(t,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,(c=a.key,l=void 0,l=function swipe_toPrimitive(t,o){if("object"!==swipe_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,o||"default");if("object"!==swipe_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(c,"string"),"symbol"===swipe_typeof(l)?l:String(l)),a)}var c,l}function swipe_setPrototypeOf(t,o){return swipe_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,o){return t.__proto__=o,t},swipe_setPrototypeOf(t,o)}function swipe_createSuper(t){var o=function swipe_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,a=swipe_getPrototypeOf(t);if(o){var c=swipe_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,c)}else i=a.apply(this,arguments);return swipe_possibleConstructorReturn(this,i)}}function swipe_possibleConstructorReturn(t,o){if(o&&("object"===swipe_typeof(o)||"function"===typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function swipe_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function swipe_getPrototypeOf(t){return swipe_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},swipe_getPrototypeOf(t)}var oe,ie=".bs.swipe",ae="touchstart".concat(ie),se="touchmove".concat(ie),ce="touchend".concat(ie),le="pointerdown".concat(ie),ue="pointerup".concat(ie),fe={endCallback:null,leftCallback:null,rightCallback:null},de={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"},pe=function(t){!function swipe_inherits(t,o){if("function"!==typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&swipe_setPrototypeOf(t,o)}(Swipe,t);var o=swipe_createSuper(Swipe);function Swipe(t,i){var a;return function swipe_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Swipe),(a=o.call(this))._element=t,t&&Swipe.isSupported()?(a._config=a._getConfig(i),a._deltaX=0,a._supportPointerEvents=Boolean(window.PointerEvent),a._initEvents(),a):swipe_possibleConstructorReturn(a)}return function swipe_createClass(t,o,i){return o&&swipe_defineProperties(t.prototype,o),i&&swipe_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(Swipe,[{key:"dispose",value:function dispose(){X.off(this._element,ie)}},{key:"_start",value:function _start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}},{key:"_end",value:function _end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),N(this._config.endCallback)}},{key:"_move",value:function _move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}},{key:"_handleSwipe",value:function _handleSwipe(){var t=Math.abs(this._deltaX);if(!(t<=40)){var o=t/this._deltaX;this._deltaX=0,o&&N(o>0?this._config.rightCallback:this._config.leftCallback)}}},{key:"_initEvents",value:function _initEvents(){var t=this;this._supportPointerEvents?(X.on(this._element,le,(function(o){return t._start(o)})),X.on(this._element,ue,(function(o){return t._end(o)})),this._element.classList.add("pointer-event")):(X.on(this._element,ae,(function(o){return t._start(o)})),X.on(this._element,se,(function(o){return t._move(o)})),X.on(this._element,ce,(function(o){return t._end(o)})))}},{key:"_eventIsPointerPenTouch",value:function _eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}}],[{key:"Default",get:function get(){return fe}},{key:"DefaultType",get:function get(){return de}},{key:"NAME",get:function get(){return"swipe"}},{key:"isSupported",value:function isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}]),Swipe}(Z),ye=pe;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 carousel_createForOfIteratorHelper(t,o){var i="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function carousel_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return carousel_arrayLikeToArray(t,o);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 carousel_arrayLikeToArray(t,o)}(t))||o&&t&&"number"===typeof t.length){i&&(t=i);var a=0,c=function F(){};return{s:c,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,p=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();return u=t.done,t},e:function e(t){p=!0,l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(p)throw l}}}}function carousel_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}function carousel_defineProperties(t,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,carousel_toPropertyKey(a.key),a)}}function _get(){return _get="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,o,i){var a=function _superPropBase(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&null!==(t=carousel_getPrototypeOf(t)););return t}(t,o);if(a){var c=Object.getOwnPropertyDescriptor(a,o);return c.get?c.get.call(arguments.length<3?t:i):c.value}},_get.apply(this,arguments)}function carousel_setPrototypeOf(t,o){return carousel_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,o){return t.__proto__=o,t},carousel_setPrototypeOf(t,o)}function carousel_createSuper(t){var o=function carousel_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,a=carousel_getPrototypeOf(t);if(o){var c=carousel_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,c)}else i=a.apply(this,arguments);return function carousel_possibleConstructorReturn(t,o){if(o&&("object"===carousel_typeof(o)||"function"===typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function carousel_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,i)}}function carousel_getPrototypeOf(t){return carousel_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},carousel_getPrototypeOf(t)}function carousel_defineProperty(t,o,i){return(o=carousel_toPropertyKey(o))in t?Object.defineProperty(t,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[o]=i,t}function carousel_toPropertyKey(t){var o=function carousel_toPrimitive(t,o){if("object"!==carousel_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,o||"default");if("object"!==carousel_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(t,"string");return"symbol"===carousel_typeof(o)?o:String(o)}var he=".".concat("bs.carousel"),ve=".data-api",me="next",ge="prev",be="left",we="right",_e="slide".concat(he),ke="slid".concat(he),Oe="keydown".concat(he),Se="mouseenter".concat(he),Ae="mouseleave".concat(he),De="dragstart".concat(he),Ee="load".concat(he).concat(ve),Pe="click".concat(he).concat(ve),Te="carousel",Le="active",Ce=".active",Ie=".carousel-item",Me=Ce+Ie,Ve=(carousel_defineProperty(oe={},"ArrowLeft",we),carousel_defineProperty(oe,"ArrowRight",be),oe),je={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},xe={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"},Ne=function(t){!function carousel_inherits(t,o){if("function"!==typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&carousel_setPrototypeOf(t,o)}(Carousel,t);var o=carousel_createSuper(Carousel);function Carousel(t,i){var a;return function carousel_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Carousel),(a=o.call(this,t,i))._interval=null,a._activeElement=null,a._isSliding=!1,a.touchTimeout=null,a._swipeHelper=null,a._indicatorsElement=ne.findOne(".carousel-indicators",a._element),a._addEventListeners(),a._config.ride===Te&&a.cycle(),a}return function carousel_createClass(t,o,i){return o&&carousel_defineProperties(t.prototype,o),i&&carousel_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(Carousel,[{key:"next",value:function next(){this._slide(me)}},{key:"nextWhenVisible",value:function nextWhenVisible(){!document.hidden&&I(this._element)&&this.next()}},{key:"prev",value:function prev(){this._slide(ge)}},{key:"pause",value:function pause(){this._isSliding&&T(this._element),this._clearInterval()}},{key:"cycle",value:function cycle(){var t=this;this._clearInterval(),this._updateInterval(),this._interval=setInterval((function(){return t.nextWhenVisible()}),this._config.interval)}},{key:"_maybeEnableCycle",value:function _maybeEnableCycle(){var t=this;this._config.ride&&(this._isSliding?X.one(this._element,ke,(function(){return t.cycle()})):this.cycle())}},{key:"to",value:function to(t){var o=this,i=this._getItems();if(!(t>i.length-1||t<0))if(this._isSliding)X.one(this._element,ke,(function(){return o.to(t)}));else{var a=this._getItemIndex(this._getActive());if(a!==t){var c=t>a?me:ge;this._slide(c,i[t])}}}},{key:"dispose",value:function dispose(){this._swipeHelper&&this._swipeHelper.dispose(),_get(carousel_getPrototypeOf(Carousel.prototype),"dispose",this).call(this)}},{key:"_configAfterMerge",value:function _configAfterMerge(t){return t.defaultInterval=t.interval,t}},{key:"_addEventListeners",value:function _addEventListeners(){var t=this;this._config.keyboard&&X.on(this._element,Oe,(function(o){return t._keydown(o)})),"hover"===this._config.pause&&(X.on(this._element,Se,(function(){return t.pause()})),X.on(this._element,Ae,(function(){return t._maybeEnableCycle()}))),this._config.touch&&ye.isSupported()&&this._addTouchEventListeners()}},{key:"_addTouchEventListeners",value:function _addTouchEventListeners(){var t,o=this,i=carousel_createForOfIteratorHelper(ne.find(".carousel-item img",this._element));try{for(i.s();!(t=i.n()).done;){var a=t.value;X.on(a,De,(function(t){return t.preventDefault()}))}}catch(l){i.e(l)}finally{i.f()}var c={leftCallback:function leftCallback(){return o._slide(o._directionToOrder(be))},rightCallback:function rightCallback(){return o._slide(o._directionToOrder(we))},endCallback:function endCallBack(){"hover"===o._config.pause&&(o.pause(),o.touchTimeout&&clearTimeout(o.touchTimeout),o.touchTimeout=setTimeout((function(){return o._maybeEnableCycle()}),500+o._config.interval))}};this._swipeHelper=new ye(this._element,c)}},{key:"_keydown",value:function _keydown(t){if(!/input|textarea/i.test(t.target.tagName)){var o=Ve[t.key];o&&(t.preventDefault(),this._slide(this._directionToOrder(o)))}}},{key:"_getItemIndex",value:function _getItemIndex(t){return this._getItems().indexOf(t)}},{key:"_setActiveIndicatorElement",value:function _setActiveIndicatorElement(t){if(this._indicatorsElement){var o=ne.findOne(Ce,this._indicatorsElement);o.classList.remove(Le),o.removeAttribute("aria-current");var i=ne.findOne('[data-bs-slide-to="'.concat(t,'"]'),this._indicatorsElement);i&&(i.classList.add(Le),i.setAttribute("aria-current","true"))}}},{key:"_updateInterval",value:function _updateInterval(){var t=this._activeElement||this._getActive();if(t){var o=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=o||this._config.defaultInterval}}},{key:"_slide",value:function _slide(t){var o=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!this._isSliding){var a=this._getActive(),c=t===me,l=i||function getNextActiveElement(t,o,i,a){var c=t.length,l=t.indexOf(o);return-1===l?!i&&a?t[c-1]:t[0]:(l+=i?1:-1,a&&(l=(l+c)%c),t[Math.max(0,Math.min(l,c-1))])}(this._getItems(),a,c,this._config.wrap);if(l!==a){var u=this._getItemIndex(l),p=function triggerEvent(i){return X.trigger(o._element,i,{relatedTarget:l,direction:o._orderToDirection(t),from:o._getItemIndex(a),to:u})};if(!p(_e).defaultPrevented&&a&&l){var h=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(u),this._activeElement=l;var v=c?"carousel-item-start":"carousel-item-end",g=c?"carousel-item-next":"carousel-item-prev";l.classList.add(g),function reflow(t){t.offsetHeight}(l),a.classList.add(v),l.classList.add(v);this._queueCallback((function completeCallBack(){l.classList.remove(v,g),l.classList.add(Le),a.classList.remove(Le,g,v),o._isSliding=!1,p(ke)}),a,this._isAnimated()),h&&this.cycle()}}}}},{key:"_isAnimated",value:function _isAnimated(){return this._element.classList.contains("slide")}},{key:"_getActive",value:function _getActive(){return ne.findOne(Me,this._element)}},{key:"_getItems",value:function _getItems(){return ne.find(Ie,this._element)}},{key:"_clearInterval",value:function _clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}},{key:"_directionToOrder",value:function _directionToOrder(t){return x()?t===be?ge:me:t===be?me:ge}},{key:"_orderToDirection",value:function _orderToDirection(t){return x()?t===ge?be:we:t===ge?we:be}}],[{key:"Default",get:function get(){return je}},{key:"DefaultType",get:function get(){return xe}},{key:"NAME",get:function get(){return"carousel"}},{key:"jQueryInterface",value:function jQueryInterface(t){return this.each((function(){var o=Carousel.getOrCreateInstance(this,t);if("number"!==typeof t){if("string"===typeof t){if(void 0===o[t]||t.startsWith("_")||"constructor"===t)throw new TypeError('No method named "'.concat(t,'"'));o[t]()}}else o.to(t)}))}}]),Carousel}(ee);X.on(document,Pe,"[data-bs-slide], [data-bs-slide-to]",(function(t){var o=ne.getElementFromSelector(this);if(o&&o.classList.contains(Te)){t.preventDefault();var i=Ne.getOrCreateInstance(o),a=this.getAttribute("data-bs-slide-to");if(a)return i.to(a),void i._maybeEnableCycle();if("next"===J.getDataAttribute(this,"slide"))return i.next(),void i._maybeEnableCycle();i.prev(),i._maybeEnableCycle()}})),X.on(window,Ee,(function(){var t,o=carousel_createForOfIteratorHelper(ne.find('[data-bs-ride="carousel"]'));try{for(o.s();!(t=o.n()).done;){var i=t.value;Ne.getOrCreateInstance(i)}}catch(a){o.e(a)}finally{o.f()}})),function defineJQueryPlugin(t){!function onDOMContentLoaded(t){"loading"===document.readyState?(j.length||document.addEventListener("DOMContentLoaded",(function(){for(var t=0,o=j;t<o.length;t++)(0,o[t])()})),j.push(t)):t()}((function(){var $=V();if($){var o=t.NAME,i=$.fn[o];$.fn[o]=t.jQueryInterface,$.fn[o].Constructor=t,$.fn[o].noConflict=function(){return $.fn[o]=i,t.jQueryInterface}}}))}(Ne);var Re=Ne;!function(o){var i="js-carousel",a=function init(){console.log("".concat(i,": init")),document.querySelectorAll(".".concat(i)).forEach((function(t,a){var c=!!t.dataset.bsInterval&&parseInt(t.dataset.bsInterval),l=new Re(t,{interval:c});t.ui=l;var u=t.querySelectorAll(".carousel-item"),p=parseInt(u.length);if(t.dataset.bsArrows){var h=document.createElement("button");h.classList.add("carousel-control-next"),h.setAttribute("type","button"),h.setAttribute("aria-label","Next Slide"),h.setAttribute("data-bs-target",t.getAttribute("id")),h.setAttribute("data-bs-slide","next"),h.addEventListener("click",(function(t){l.next()})),h.innerHTML='<span class="carousel-control-next-icon" aria-hidden="true"></span><span class="visually-hidden">Next</span>',t.appendChild(h);var v=document.createElement("button");v.setAttribute("type","button"),v.setAttribute("aria-label","Previous Slide"),v.classList.add("carousel-control-prev"),v.setAttribute("data-bs-target",t.getAttribute("id")),v.setAttribute("data-bs-slide","prev"),v.addEventListener("click",(function(t){l.prev()})),v.innerHTML='<span class="carousel-control-prev-icon" aria-hidden="true"></span><span class="visually-hidden">Previous</span>',t.appendChild(v)}if(t.dataset.bsIndicators){var g=document.createElement("div");g.classList.add("carousel-indicators");for(var b=0;b<p;){var w=document.createElement("button");w.setAttribute("type","button"),w.setAttribute("aria-label","Slide to #".concat(b+1)),0===b&&w.classList.add("active"),w.setAttribute("data-bs-target",t.getAttribute("id")),w.setAttribute("data-bs-slide-to",b),w.addEventListener("click",(function(t){var o=t.target;l.to(o.getAttribute("data-bs-slide-to")),g.querySelectorAll(".active").forEach((function(t){t.classList.remove("active")})),o.classList.add("active")})),g.appendChild(w),b++}t.appendChild(g),t.addEventListener("slide.bs.carousel",(function(o){t.querySelectorAll(".carousel-indicators .active").forEach((function(t){t.classList.remove("active")})),t.querySelectorAll('.carousel-indicators [data-bs-slide-to="'.concat(o.to,'"]')).forEach((function(t){t.classList.add("active")}))}))}if(t.classList.contains("carousel-multislide")){var _=t.querySelector(".carousel-inner");u.forEach((function(t,o){var i=t.cloneNode(!0);i.classList.remove("active"),_.appendChild(i)})),u=t.querySelectorAll(".carousel-item"),p=parseInt(u.length),_.style.left="0px";var k=function getNumToDisplay(t){var i=o.detectCSSScreenSize(),a=parseInt(t.dataset["length".concat(o.globalF.ucwords(i))]);return a||(a=parseInt(t.dataset.length)),Math.min(a,p)},O=new o.ResizeObserver((function calculate(t){var o=t[0],a=o.target,c=(o.contentRect,a.querySelector(".carousel-inner-container").clientWidth),h=k(a),v=c/h;a.dataset.itemWidth=v,a.dataset.numToDisplay=h,_.style.width="".concat(p*v,"px"),u.forEach((function(t,o){t.style.width="".concat(v,"px")})),p===h&&(a.classList.add("".concat(i,"-no-slide")),l.pause())}));O.observe(t);var S=function resetPosition(){_.style.transition="none",_.classList.add("no-transition"),_.style.left="0px",setTimeout((function(){_.style.transition="",_.classList.remove("no-transition"),_.querySelectorAll(".carousel-item").forEach((function(t){t.classList.remove("active")})),_.querySelector(".carousel-item:first-child").classList.add("active")}),1e3)};t.addEventListener("slide.bs.carousel",(function(o){var a=k(t);if(console.log(".".concat(i,": ").concat(o.to," ").concat(p/2)),p-a<o.to)return o.preventDefault(),void S();switch(o.direction){case"left":case"right":_.style.left="".concat(-o.to*t.dataset.itemWidth,"px")}p/2===o.to&&S()})),t.classList.add("".concat(i,"-multislide-active"))}else 1===u.length&&t.classList.add("".concat(i,"-no-slide"));c&&t.ui.cycle(),t.dataset.ui=t.ui,t.classList.add("".concat(i,"-active")),t.dispatchEvent(new Event("".concat(i,"-ready")))}))};o.addEventListener("".concat(t.LODEDANDREADY),a),o.addEventListener("".concat(t.AJAX),a)}(window);function dropdown_toConsumableArray(t){return function dropdown_arrayWithoutHoles(t){if(Array.isArray(t))return dropdown_arrayLikeToArray(t)}(t)||function dropdown_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function dropdown_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return dropdown_arrayLikeToArray(t,o);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 dropdown_arrayLikeToArray(t,o)}(t)||function dropdown_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 dropdown_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}!function(o){var i="js-dropdown",a=["active","active-dropdown"],c=function LockMenu(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;t.locked=!0,t.dropdownTimeout&&clearTimeout(t.dropdownTimeout),t.dropdownTimeout=setTimeout((function(){t.locked=!1}),o)},l=function HideSiblings(t){var o=t.parentNode;o&&dropdown_toConsumableArray(o.children).forEach((function(o){if(t!==o){var i=o.querySelector(".dropdown-menu");i&&i.classList.remove("show")}}))},u=function Show(t){var o;t.stopPropagation();var c=t.currentTarget,u=c.querySelector(".dropdown-menu");u&&(u.locked||(u.dropdownToggle=!1,"".concat(i,": Show"),l(c),(o=c.classList).add.apply(o,a),u.classList.add("show")))},p=function Hide(t){var o;t.stopPropagation();var l=t.currentTarget,u=l.querySelector(".dropdown-menu");u&&(u.locked||(u.dropdownToggle=!1,c(u),"".concat(i,": Hide"),(o=l.classList).remove.apply(o,a),u.classList.remove("show")))},h=function init(){"".concat(i,": init");var t=document.querySelectorAll('[data-bs-toggle="dropdown"]'),o=document.querySelectorAll('[data-bs-toggle="hover"]'),h=function attachClickEvents(t){t.classList.contains("".concat(i,"-click-active"))||(t.addEventListener("click",(function(t){t.preventDefault();var o=t.currentTarget.closest(".dropdown");"".concat(i,": click"),o&&function Toggle(t){var o=t.querySelector(".dropdown-menu"),u=o.classList.contains("show")&&o.dropdownToggle;if(o&&!o.locked){var p,h;c(o,800),l(t),u?("".concat(i,": Toggle hide"),(p=t.classList).remove.apply(p,a),o.classList.remove("show")):("".concat(i,": Toggle show"),(h=t.classList).add.apply(h,a),o.classList.add("show")),o.dropdownToggle=!0}}(o)})),t.classList.add("".concat(i,"-active")),t.classList.add("".concat(i,"-click-active")))};document.addEventListener("click",(function(t){var o=!1,c=t.path||t.composedPath&&t.composedPath();c||console.warn("Browser does not provide event path to hide dropdowns on outside click"),c.forEach((function(t,c){o||(t===document&&function HideAll(){"".concat(i,": HideAll"),document.querySelectorAll(".dropdown-menu").forEach((function(t,o){if(!t.locked){var i,c=t.closest(".dropdown");c&&(i=c.classList).remove.apply(i,a),t.classList.remove("show")}}))}(),t.classList&&t.classList.contains("dropdown-toggle")&&(o=!0))}))})),o.forEach((function(t){var o=t.closest(".dropdown");o&&(!function attachHoverEvents(t){t.classList.contains("".concat(i,"-hover-active"))||(t.addEventListener("mouseover",u,!1),t.addEventListener("mouseleave",p,!1),t.classList.add("".concat(i,"-active")),t.classList.add("".concat(i,"-hover-active")))}(o),h(o))})),t.forEach((function(t){var o=t.closest(".dropdown");o&&h(o)}))};o.addEventListener("".concat(t.LODEDANDREADY),h),o.addEventListener("".concat(t.AJAX),h)}(window);function lastItemOf(t){return t[t.length-1]}function pushUnique(t){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return i.forEach((function(o){t.includes(o)||t.push(o)})),t}function stringToArray(t,o){return t?t.split(o):[]}function isInRange(t,o,i){return(void 0===o||t>=o)&&(void 0===i||t<=i)}function limitToRange(t,o,i){return t<o?o:t>i?i:t}function createTagRepeat(t,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",l=Object.keys(i).reduce((function(t,o){var c=i[o];return"function"===typeof c&&(c=c(a)),"".concat(t," ").concat(o,'="').concat(c,'"')}),t);c+="<".concat(l,"></").concat(t,">");var u=a+1;return u<o?createTagRepeat(t,o,i,u,c):c}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,o){var i=new Date(t);return i.setDate(i.getDate()+o)}function addMonths(t,o){var i=new Date(t),a=i.getMonth()+o,c=a%12;c<0&&(c+=12);var l=i.setMonth(a);return i.getMonth()!==c?i.setDate(0):l}function addYears(t,o){var i=new Date(t),a=i.getMonth(),c=i.setFullYear(i.getFullYear()+o);return 1===a&&2===i.getMonth()?i.setDate(0):c}function dayDiff(t,o){return(t-o+7)%7}function dayOfTheWeekOf(t,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=new Date(t).getDay();return addDays(t,dayDiff(o,i)-dayDiff(a,i))}function calcWeekNum(t,o){return Math.round((t-o)/6048e5)+1}function getIsoWeek(t){var o=dayOfTheWeekOf(t,4,1);return calcWeekNum(o,dayOfTheWeekOf(new Date(o).setMonth(0,4),4,1))}function calcTraditionalWeekNumber(t,o){var i=dayOfTheWeekOf(new Date(t).setMonth(0,1),o,o),a=dayOfTheWeekOf(t,o,o),c=calcWeekNum(a,i);return c<53?c:a===dayOfTheWeekOf(new Date(t).setDate(32),o,o)?1:c}function getWesternTradWeek(t){return calcTraditionalWeekNumber(t,0)}function getMidEasternWeek(t){return calcTraditionalWeekNumber(t,6)}function startOfYearPeriod(t,o){var i=new Date(t).getFullYear();return Math.floor(i/o)*o}function regularizeDate(t,o,i){if(1!==o&&2!==o)return t;var a=new Date(t);return 1===o?i?a.setMonth(a.getMonth()+1,0):a.setDate(1):i?a.setFullYear(a.getFullYear()+1,0,0):a.setMonth(0,1),a.setHours(0,0,0,0)}var Fe=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,Ye=/[\s!-/:-@[-`{-~\u5e74\u6708\u65e5]+/,Be={},We={y:function y(t,o){return new Date(t).setFullYear(parseInt(o,10))},m:function m(t,o,i){var a=new Date(t),c=parseInt(o,10)-1;if(isNaN(c)){if(!o)return NaN;var l=o.toLowerCase(),u=function compareNames(t){return t.toLowerCase().startsWith(l)};if((c=i.monthsShort.findIndex(u))<0&&(c=i.months.findIndex(u)),c<0)return NaN}return a.setMonth(c),a.getMonth()!==normalizeMonth(c)?a.setDate(0):a.getTime()},d:function d(t,o){return new Date(t).setDate(parseInt(o,10))}},He={d:function d(t){return t.getDate()},dd:function dd(t){return padZero(t.getDate(),2)},D:function D(t,o){return o.daysShort[t.getDay()]},DD:function DD(t,o){return o.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,o){return o.monthsShort[t.getMonth()]},MM:function MM(t,o){return o.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,o){return t.toString().padStart(o,"0")}function parseFormatString(t){if("string"!==typeof t)throw new Error("Invalid date format.");if(t in Be)return Be[t];var o=t.split(Fe),i=t.match(new RegExp(Fe,"g"));if(0===o.length||!i)throw new Error("Invalid date format.");var a=i.map((function(t){return He[t]})),c=Object.keys(We).reduce((function(t,o){return i.find((function(t){return"D"!==t[0]&&t[0].toLowerCase()===o}))&&t.push(o),t}),[]);return Be[t]={parser:function parser(t,o){var a=t.split(Ye).reduce((function(t,o,a){if(o.length>0&&i[a]){var c=i[a][0];"M"===c?t.m=o:"D"!==c&&(t[c]=o)}return t}),{});return c.reduce((function(t,i){var c=We[i](t,a[i],o);return isNaN(c)?t:c}),today())},formatter:function formatter(t,i){return a.reduce((function(a,c,l){return a+"".concat(o[l]).concat(c(t,i))}),"")+lastItemOf(o)}}}function date_format_parseDate(t,o,i){if(t instanceof Date||"number"===typeof t){var a=stripTime(t);return isNaN(a)?void 0:a}if(t){if("today"===t)return today();if(o&&o.toValue){var c=o.toValue(t,o,i);return isNaN(c)?void 0:stripTime(c)}return parseFormatString(o).parser(t,i)}}function date_format_formatDate(t,o,i){if(isNaN(t)||!t&&0!==t)return"";var a="number"===typeof t?new Date(t):t;return o.toDisplay?o.toDisplay(a,o,i):parseFormatString(o).formatter(a,i)}var Ue=document.createRange();function parseHTML(t){return Ue.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,o){if(t){if("string"===typeof t)return event_arrayLikeToArray(t,o);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,o):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,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}var ze=new WeakMap,Ke=EventTarget.prototype,qe=Ke.addEventListener,Xe=Ke.removeEventListener;function registerListeners(t,o){var i=ze.get(t);i||(i=[],ze.set(t,i)),o.forEach((function(t){qe.call.apply(qe,event_toConsumableArray(t)),i.push(t)}))}if(!Event.prototype.composedPath){var Je=function getComposedPath(t){var o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return i.push(t),t.parentNode?o=t.parentNode:t.host?o=t.host:t.defaultView&&(o=t.defaultView),o?getComposedPath(o,i):i};Event.prototype.composedPath=function(){return Je(this.target)}}function findFromPath(t,o,i){var a=_toArray(t),c=a[0],l=a.slice(1);return o(c)?c:c!==i&&"HTML"!==c.tagName&&0!==l.length?findFromPath(l,o,i):void 0}function findElementInEventPath(t,o){var i="function"===typeof o?o:function(t){return t instanceof Element&&t.matches(o)};return findFromPath(t.composedPath(),i,t.currentTarget)}var $e={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"}},Ge={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,clearButton:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,enableOnReadonly:!0,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:"",todayButton:!1,todayButtonMode:0,todayHighlight:!1,updateOnBlur:!0,weekNumbers:0,weekStart:0};function processOptions_slicedToArray(t,o){return function processOptions_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function processOptions_iterableToArrayLimit(t,o){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,c,l,u,p=[],h=!0,v=!1;try{if(l=(i=i.call(t)).next,0===o){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(p.push(a.value),p.length!==o);h=!0);}catch(t){v=!0,c=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(v)throw c}}return p}}(t,o)||function processOptions_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return processOptions_arrayLikeToArray(t,o);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 processOptions_arrayLikeToArray(t,o)}(t,o)||function processOptions_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 processOptions_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}var Ze=Ge.language,Qe=Ge.format,et=Ge.weekStart;function sanitizeDOW(t,o){return t.length<6&&o>=0&&o<7?pushUnique(t,o):t}function determineGetWeekMethod(t,o){switch(4===t?6===o?3:!o+1:t){case 1:return getIsoWeek;case 2:return getWesternTradWeek;case 3:return getMidEasternWeek}}function updateWeekStart(t,o,i){return o.weekStart=t,o.weekEnd=(t+6)%7,4===i&&(o.getWeekNumber=determineGetWeekMethod(4,t)),t}function validateDate(t,o,i,a){var c=date_format_parseDate(t,o,i);return void 0!==c?c:a}function validateViewId(t,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,a=parseInt(t,10);return a>=0&&a<=i?a:o}function replaceOptions(t,o,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;o in t&&(i in t||(t[i]=a?a(t[o]):t[o]),delete t[o])}function processOptions(t,o){var i,a=Object.assign({},t),c={},l=o.constructor.locales,u=!!o.rangeSideIndex,p=o.config||{},h=p.datesDisabled,v=p.format,g=p.language,b=p.locale,w=p.maxDate,_=p.maxView,k=p.minDate,O=p.pickLevel,S=p.startView,A=p.weekNumbers,E=p.weekStart;if((replaceOptions(a,"calendarWeeks","weekNumbers",(function(t){return t?1:0})),replaceOptions(a,"clearBtn","clearButton"),replaceOptions(a,"todayBtn","todayButton"),replaceOptions(a,"todayBtnMode","todayButtonMode"),a.language)&&(a.language!==g&&(l[a.language]?i=a.language:l[i=a.language.split("-")[0]]||(i=!1)),delete a.language,i)){g=c.language=i;var P=b||l[Ze];b=Object.assign({format:Qe,weekStart:et},l[Ze]),g!==Ze&&Object.assign(b,l[g]),c.locale=b,v===P.format&&(v=c.format=b.format),E===P.weekStart&&(E=updateWeekStart(b.weekStart,c,A))}if(a.format){var T="function"===typeof a.format.toDisplay,L="function"===typeof a.format.toValue,C=Fe.test(a.format);(T&&L||C)&&(v=c.format=a.format),delete a.format}var I=O;"pickLevel"in a&&(I=validateViewId(a.pickLevel,O,2),delete a.pickLevel),I!==O&&(I>O&&("minDate"in a||(a.minDate=k),"maxDate"in a||(a.maxDate=w)),h&&!a.datesDisabled&&(a.datesDisabled=[]),O=c.pickLevel=I);var V=k,j=w;if("minDate"in a){var x=dateValue(0,0,1);(V=null===a.minDate?x:validateDate(a.minDate,v,b,V))!==x&&(V=regularizeDate(V,O,!1)),delete a.minDate}if("maxDate"in a&&(void 0!==(j=null===a.maxDate?void 0:validateDate(a.maxDate,v,b,j))&&(j=regularizeDate(j,O,!0)),delete a.maxDate),j<V?(k=c.minDate=j,w=c.maxDate=V):(k!==V&&(k=c.minDate=V),w!==j&&(w=c.maxDate=j)),a.datesDisabled){var N=a.datesDisabled;if("function"===typeof N)c.datesDisabled=null,c.checkDisabled=function(t,o){return N(new Date(t),o,u)};else{var R=c.datesDisabled=N.reduce((function(t,o){var i=date_format_parseDate(o,v,b);return void 0!==i?pushUnique(t,regularizeDate(i,O,u)):t}),[]);c.checkDisabled=function(t){return R.includes(t)}}delete a.datesDisabled}if("defaultViewDate"in a){var Y=date_format_parseDate(a.defaultViewDate,v,b);void 0!==Y&&(c.defaultViewDate=Y),delete a.defaultViewDate}if("weekStart"in a){var B=Number(a.weekStart)%7;isNaN(B)||(E=updateWeekStart(B,c,A)),delete a.weekStart}if(a.daysOfWeekDisabled&&(c.daysOfWeekDisabled=a.daysOfWeekDisabled.reduce(sanitizeDOW,[]),delete a.daysOfWeekDisabled),a.daysOfWeekHighlighted&&(c.daysOfWeekHighlighted=a.daysOfWeekHighlighted.reduce(sanitizeDOW,[]),delete a.daysOfWeekHighlighted),"weekNumbers"in a){var W=a.weekNumbers;if(W){var H="function"===typeof W?function(t,o){return W(new Date(t),o)}:determineGetWeekMethod(W=parseInt(W,10),E);H&&(A=c.weekNumbers=W,c.getWeekNumber=H)}else A=c.weekNumbers=0,c.getWeekNumber=null;delete a.weekNumbers}if("maxNumberOfDates"in a){var U=parseInt(a.maxNumberOfDates,10);U>=0&&(c.maxNumberOfDates=U,c.multidate=1!==U),delete a.maxNumberOfDates}a.dateDelimiter&&(c.dateDelimiter=String(a.dateDelimiter),delete a.dateDelimiter);var z=_;"maxView"in a&&(z=validateViewId(a.maxView,_),delete a.maxView),(z=O>z?O:z)!==_&&(_=c.maxView=z);var K=S;if("startView"in a&&(K=validateViewId(a.startView,K),delete a.startView),K<O?K=O:K>_&&(K=_),K!==S&&(c.startView=K),a.prevArrow){var q=parseHTML(a.prevArrow);q.childNodes.length>0&&(c.prevArrow=q.childNodes),delete a.prevArrow}if(a.nextArrow){var X=parseHTML(a.nextArrow);X.childNodes.length>0&&(c.nextArrow=X.childNodes),delete a.nextArrow}if("disableTouchKeyboard"in a&&(c.disableTouchKeyboard="ontouchstart"in document&&!!a.disableTouchKeyboard,delete a.disableTouchKeyboard),a.orientation){var J=a.orientation.toLowerCase().split(/\s+/g);c.orientation={x:J.find((function(t){return"left"===t||"right"===t}))||"auto",y:J.find((function(t){return"top"===t||"bottom"===t}))||"auto"},delete a.orientation}if("todayButtonMode"in a){switch(a.todayButtonMode){case 0:case 1:c.todayButtonMode=a.todayButtonMode}delete a.todayButtonMode}return Object.entries(a).forEach((function(t){var o=processOptions_slicedToArray(t,2),i=o[0],a=o[1];void 0!==a&&i in Ge&&(c[i]=a)})),c}var tt={show:{key:"ArrowDown"},hide:null,toggle:{key:"Escape"},prevButton:{key:"ArrowLeft",ctrlOrMetaKey:!0},nextButton:{key:"ArrowRight",ctrlOrMetaKey:!0},viewSwitch:{key:"ArrowUp",ctrlOrMetaKey:!0},clearButton:{key:"Backspace",ctrlOrMetaKey:!0},todayButton:{key:".",ctrlOrMetaKey:!0},exitEditMode:{key:"ArrowDown",ctrlOrMetaKey:!0}};var rt=function getButtons(t){return t.map((function(t){return'<button type="button" class="%buttonClass% '.concat(t,'" tabindex="-1"></button>')})).join("")},nt=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 '.concat(rt(["prev-button prev-btn","view-switch","next-button next-btn"]),'\n </div>\n </div>\n <div class="datepicker-main"></div>\n <div class="datepicker-footer">\n <div class="datepicker-controls">\n ').concat(rt(["today-button today-btn","clear-button clear-btn"]),"\n </div>\n </div>\n </div>\n</div>")),ot=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>")),it=optimizeTemplateHTML('<div class="week-numbers 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_slicedToArray(t,o){return function View_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function View_iterableToArrayLimit(t,o){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,c,l,u,p=[],h=!0,v=!1;try{if(l=(i=i.call(t)).next,0===o){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(p.push(a.value),p.length!==o);h=!0);}catch(t){v=!0,c=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(v)throw c}}return p}}(t,o)||View_unsupportedIterableToArray(t,o)||function View_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 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)||View_unsupportedIterableToArray(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_unsupportedIterableToArray(t,o){if(t){if("string"===typeof t)return View_arrayLikeToArray(t,o);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)?View_arrayLikeToArray(t,o):void 0}}function View_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}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,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,(c=a.key,l=void 0,l=function View_toPrimitive(t,o){if("object"!==View_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,o||"default");if("object"!==View_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(c,"string"),"symbol"===View_typeof(l)?l:String(l)),a)}var c,l}var at=function(){function View(t,o){!function View_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,View),Object.assign(this,o,{picker:t,element:parseHTML('<div class="datepicker-view"></div>').firstChild,selected:[],isRangeEnd:!!t.datepicker.rangeSideIndex}),this.init(this.picker.datepicker.config)}return function View_createClass(t,o,i){return o&&View_defineProperties(t.prototype,o),i&&View_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(View,[{key:"init",value:function init(t){"pickLevel"in t&&(this.isMinView=this.id===t.pickLevel),this.setOptions(t),this.updateFocus(),this.updateSelection()}},{key:"prepareForRender",value:function prepareForRender(t,o,i){this.disabled=[];var a=this.picker;a.setViewSwitchLabel(t),a.setPrevButtonDisabled(o),a.setNextButtonDisabled(i)}},{key:"setDisabled",value:function setDisabled(t,o){o.add("disabled"),pushUnique(this.disabled,t)}},{key:"performBeforeHook",value:function performBeforeHook(t,o){var i=this.beforeShow(new Date(o));switch(View_typeof(i)){case"boolean":i={enabled:i};break;case"string":i={classes:i}}if(i){var a=t.classList;if(!1===i.enabled&&this.setDisabled(o,a),i.classes){var c=i.classes.split(/\s+/);a.add.apply(a,View_toConsumableArray(c)),c.includes("disabled")&&this.setDisabled(o,a)}i.content&&function replaceChildNodes(t,o){emptyChildNodes(t),o instanceof DocumentFragment?t.appendChild(o):"string"===typeof o?t.appendChild(parseHTML(o)):"function"===typeof o.forEach&&o.forEach((function(o){t.appendChild(o)}))}(t,i.content)}}},{key:"renderCell",value:function renderCell(t,o,i,a,c,l){var u=c.selected,p=c.range,h=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[];t.textContent=o,this.isMinView&&(t.dataset.date=a);var v=t.classList;if(t.className="datepicker-cell ".concat(this.cellClass),i<this.first?v.add("prev"):i>this.last&&v.add("next"),v.add.apply(v,View_toConsumableArray(h)),(l||this.checkDisabled(a,this.id))&&this.setDisabled(a,v),p){var g=View_slicedToArray(p,2),b=g[0],w=g[1];i>b&&i<w&&v.add("range"),i===b&&v.add("range-start"),i===w&&v.add("range-end")}u.includes(i)&&v.add("selected"),i===this.focused&&v.add("focused"),this.beforeShow&&this.performBeforeHook(t,a)}},{key:"refreshCell",value:function refreshCell(t,o,i,a){var c=View_slicedToArray(a,2),l=c[0],u=c[1],p=t.classList;p.remove("range","range-start","range-end","selected","focused"),o>l&&o<u&&p.add("range"),o===l&&p.add("range-start"),o===u&&p.add("range-end"),i.includes(o)&&p.add("selected"),o===this.focused&&p.add("focused")}},{key:"changeFocusedCell",value:function changeFocusedCell(t){this.grid.querySelectorAll(".focused").forEach((function(t){t.classList.remove("focused")})),this.grid.children[t].classList.add("focused")}}]),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_defineProperties(t,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,(c=a.key,l=void 0,l=function DaysView_toPrimitive(t,o){if("object"!==DaysView_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,o||"default");if("object"!==DaysView_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(c,"string"),"symbol"===DaysView_typeof(l)?l:String(l)),a)}var c,l}function DaysView_get(){return DaysView_get="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,o,i){var a=function DaysView_superPropBase(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&null!==(t=DaysView_getPrototypeOf(t)););return t}(t,o);if(a){var c=Object.getOwnPropertyDescriptor(a,o);return c.get?c.get.call(arguments.length<3?t:i):c.value}},DaysView_get.apply(this,arguments)}function DaysView_setPrototypeOf(t,o){return DaysView_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,o){return t.__proto__=o,t},DaysView_setPrototypeOf(t,o)}function DaysView_createSuper(t){var o=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,a=DaysView_getPrototypeOf(t);if(o){var c=DaysView_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,c)}else i=a.apply(this,arguments);return function DaysView_possibleConstructorReturn(t,o){if(o&&("object"===DaysView_typeof(o)||"function"===typeof o))return o;if(void 0!==o)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)}(this,i)}}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 st=function(t){!function DaysView_inherits(t,o){if("function"!==typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&DaysView_setPrototypeOf(t,o)}(DaysView,t);var o=DaysView_createSuper(DaysView);function DaysView(t){return function DaysView_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,DaysView),o.call(this,t,{id:0,name:"days",cellClass:"day"})}return function DaysView_createClass(t,o,i){return o&&DaysView_defineProperties(t.prototype,o),i&&DaysView_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(DaysView,[{key:"init",value:function init(t){if(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]){var o=parseHTML(ot).firstChild;this.dow=o.firstChild,this.grid=o.lastChild,this.element.appendChild(o)}DaysView_get(DaysView_getPrototypeOf(DaysView.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function setOptions(t){var o,i=this;if("minDate"in t&&(this.minDate=t.minDate),"maxDate"in t&&(this.maxDate=t.maxDate),t.checkDisabled&&(this.checkDisabled=t.checkDisabled),t.daysOfWeekDisabled&&(this.daysOfWeekDisabled=t.daysOfWeekDisabled,o=!0),t.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=t.daysOfWeekHighlighted),"todayHighlight"in t&&(this.todayHighlight=t.todayHighlight),"weekStart"in t&&(this.weekStart=t.weekStart,this.weekEnd=t.weekEnd,o=!0),t.locale){var a=this.locale=t.locale;this.dayNames=a.daysMin,this.switchLabelFormat=a.titleFormat,o=!0}if("beforeShowDay"in t&&(this.beforeShow="function"===typeof t.beforeShowDay?t.beforeShowDay:void 0),"weekNumbers"in t)if(t.weekNumbers&&!this.weekNumbers){var c=parseHTML(it).firstChild;this.weekNumbers={element:c,dow:c.firstChild,weeks:c.lastChild},this.element.insertBefore(c,this.element.firstChild)}else this.weekNumbers&&!t.weekNumbers&&(this.element.removeChild(this.weekNumbers.element),this.weekNumbers=null);"getWeekNumber"in t&&(this.getWeekNumber=t.getWeekNumber),"showDaysOfWeek"in t&&(t.showDaysOfWeek?(showElement(this.dow),this.weekNumbers&&showElement(this.weekNumbers.dow)):(hideElement(this.dow),this.weekNumbers&&hideElement(this.weekNumbers.dow))),o&&Array.from(this.dow.children).forEach((function(t,o){var a=(i.weekStart+o)%7;t.textContent=i.dayNames[a],t.className=i.daysOfWeekDisabled.includes(a)?"dow disabled":"dow"}))}},{key:"updateFocus",value:function updateFocus(){var t=new Date(this.picker.viewDate),o=t.getFullYear(),i=t.getMonth(),a=dateValue(o,i,1),c=dayOfTheWeekOf(a,this.weekStart,this.weekStart);this.first=a,this.last=dateValue(o,i+1,0),this.start=c,this.focused=this.picker.viewDate}},{key:"updateSelection",value:function updateSelection(){var t=this.picker.datepicker,o=t.dates,i=t.rangepicker;this.selected=o,i&&(this.range=i.dates)}},{key:"render",value:function render(){var t=this;if(this.today=this.todayHighlight?today():void 0,this.prepareForRender(date_format_formatDate(this.focused,this.switchLabelFormat,this.locale),this.first<=this.minDate,this.last>=this.maxDate),this.weekNumbers){var o=this.weekStart,i=dayOfTheWeekOf(this.first,o,o);Array.from(this.weekNumbers.weeks.children).forEach((function(a,c){var l=function addWeeks(t,o){return addDays(t,7*o)}(i,c);a.textContent=t.getWeekNumber(l,o),c>3&&a.classList[l>t.last?"add":"remove"]("next")}))}Array.from(this.grid.children).forEach((function(o,i){var a=addDays(t.start,i),c=new Date(a),l=c.getDay(),u=[];t.today===a&&u.push("today"),t.daysOfWeekHighlighted.includes(l)&&u.push("highlighted"),t.renderCell(o,c.getDate(),a,a,t,a<t.minDate||a>t.maxDate||t.daysOfWeekDisabled.includes(l),u)}))}},{key:"refresh",value:function refresh(){var t=this,o=this.range||[];Array.from(this.grid.children).forEach((function(i){t.refreshCell(i,Number(i.dataset.date),t.selected,o)}))}},{key:"refreshFocus",value:function refreshFocus(){this.changeFocusedCell(Math.round((this.focused-this.start)/864e5))}}]),DaysView}(at);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,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,(c=a.key,l=void 0,l=function MonthsView_toPrimitive(t,o){if("object"!==MonthsView_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,o||"default");if("object"!==MonthsView_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(c,"string"),"symbol"===MonthsView_typeof(l)?l:String(l)),a)}var c,l}function MonthsView_get(){return MonthsView_get="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,o,i){var a=function MonthsView_superPropBase(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&null!==(t=MonthsView_getPrototypeOf(t)););return t}(t,o);if(a){var c=Object.getOwnPropertyDescriptor(a,o);return c.get?c.get.call(arguments.length<3?t:i):c.value}},MonthsView_get.apply(this,arguments)}function MonthsView_setPrototypeOf(t,o){return MonthsView_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,o){return t.__proto__=o,t},MonthsView_setPrototypeOf(t,o)}function MonthsView_createSuper(t){var o=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,a=MonthsView_getPrototypeOf(t);if(o){var c=MonthsView_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,c)}else i=a.apply(this,arguments);return function MonthsView_possibleConstructorReturn(t,o){if(o&&("object"===MonthsView_typeof(o)||"function"===typeof o))return o;if(void 0!==o)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)}(this,i)}}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,o){return function MonthsView_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function MonthsView_iterableToArrayLimit(t,o){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,c,l,u,p=[],h=!0,v=!1;try{if(l=(i=i.call(t)).next,0===o){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(p.push(a.value),p.length!==o);h=!0);}catch(t){v=!0,c=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(v)throw c}}return p}}(t,o)||function MonthsView_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return MonthsView_arrayLikeToArray(t,o);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,o)}(t,o)||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,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}function computeMonthRange(t,o){if(t&&t[0]&&t[1]){var i=MonthsView_slicedToArray(t,2),a=MonthsView_slicedToArray(i[0],2),c=a[0],l=a[1],u=MonthsView_slicedToArray(i[1],2),p=u[0],h=u[1];if(!(c>o||p<o))return[c===o?l:-1,p===o?h:12]}}var ct=function(t){!function MonthsView_inherits(t,o){if("function"!==typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&MonthsView_setPrototypeOf(t,o)}(MonthsView,t);var o=MonthsView_createSuper(MonthsView);function MonthsView(t){return function MonthsView_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,MonthsView),o.call(this,t,{id:1,name:"months",cellClass:"month"})}return function MonthsView_createClass(t,o,i){return o&&MonthsView_defineProperties(t.prototype,o),i&&MonthsView_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(MonthsView,[{key:"init",value:function init(t){(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(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}}))),this.first=0,this.last=11),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),"minDate"in t)if(void 0===t.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{var o=new Date(t.minDate);this.minYear=o.getFullYear(),this.minMonth=o.getMonth(),this.minDate=o.setDate(1)}if("maxDate"in t)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)}t.checkDisabled&&(this.checkDisabled=this.isMinView||null===t.datesDisabled?t.checkDisabled:function(){return!1}),"beforeShowMonth"in t&&(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,o=t.dates,i=t.rangepicker;this.selected=o.reduce((function(t,o){var i=new Date(o),a=i.getFullYear(),c=i.getMonth();return void 0===t[a]?t[a]=[c]:pushUnique(t[a],c),t}),{}),i&&i.dates&&(this.range=i.dates.map((function(t){var o=new Date(t);return isNaN(o)?void 0:[o.getFullYear(),o.getMonth()]})))}},{key:"render",value:function render(){var t=this;this.prepareForRender(this.year,this.year<=this.minYear,this.year>=this.maxYear);var o=this.selected[this.year]||[],i=this.year<this.minYear||this.year>this.maxYear,a=this.year===this.minYear,c=this.year===this.maxYear,l=computeMonthRange(this.range,this.year);Array.from(this.grid.children).forEach((function(u,p){var h=regularizeDate(new Date(t.year,p,1),1,t.isRangeEnd);t.renderCell(u,t.monthNames[p],p,h,{selected:o,range:l},i||a&&p<t.minMonth||c&&p>t.maxMonth)}))}},{key:"refresh",value:function refresh(){var t=this,o=this.selected[this.year]||[],i=computeMonthRange(this.range,this.year)||[];Array.from(this.grid.children).forEach((function(a,c){t.refreshCell(a,c,o,i)}))}},{key:"refreshFocus",value:function refreshFocus(){this.changeFocusedCell(this.focused)}}]),MonthsView}(at);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_defineProperties(t,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,(c=a.key,l=void 0,l=function YearsView_toPrimitive(t,o){if("object"!==YearsView_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,o||"default");if("object"!==YearsView_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(c,"string"),"symbol"===YearsView_typeof(l)?l:String(l)),a)}var c,l}function YearsView_get(){return YearsView_get="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,o,i){var a=function YearsView_superPropBase(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&null!==(t=YearsView_getPrototypeOf(t)););return t}(t,o);if(a){var c=Object.getOwnPropertyDescriptor(a,o);return c.get?c.get.call(arguments.length<3?t:i):c.value}},YearsView_get.apply(this,arguments)}function YearsView_setPrototypeOf(t,o){return YearsView_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,o){return t.__proto__=o,t},YearsView_setPrototypeOf(t,o)}function YearsView_createSuper(t){var o=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,a=YearsView_getPrototypeOf(t);if(o){var c=YearsView_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,c)}else i=a.apply(this,arguments);return function YearsView_possibleConstructorReturn(t,o){if(o&&("object"===YearsView_typeof(o)||"function"===typeof o))return o;if(void 0!==o)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)}(this,i)}}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)||function YearsView_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return YearsView_arrayLikeToArray(t,o);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 YearsView_arrayLikeToArray(t,o)}(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_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}var lt=function(t){!function YearsView_inherits(t,o){if("function"!==typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&YearsView_setPrototypeOf(t,o)}(YearsView,t);var o=YearsView_createSuper(YearsView);function YearsView(t,i){return function YearsView_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,YearsView),o.call(this,t,i)}return function YearsView_createClass(t,o,i){return o&&YearsView_defineProperties(t.prototype,o),i&&YearsView_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(YearsView,[{key:"init",value:function init(t){(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(this.navStep=10*this.step,this.beforeShowOption="beforeShow".concat(function toTitleCase(t){return YearsView_toConsumableArray(t).reduce((function(t,o,i){return t+(i?o:o.toUpperCase())}),"")}(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("minDate"in t&&(void 0===t.minDate?this.minYear=this.minDate=void 0:(this.minYear=startOfYearPeriod(t.minDate,this.step),this.minDate=dateValue(this.minYear,0,1))),"maxDate"in t&&(void 0===t.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=startOfYearPeriod(t.maxDate,this.step),this.maxDate=dateValue(this.maxYear,11,31))),t.checkDisabled&&(this.checkDisabled=this.isMinView||null===t.datesDisabled?t.checkDisabled:function(){return!1}),this.beforeShowOption in t){var o=t[this.beforeShowOption];this.beforeShow="function"===typeof o?o:void 0}}},{key:"updateFocus",value:function updateFocus(){var t=new Date(this.picker.viewDate),o=startOfYearPeriod(t,this.navStep),i=o+9*this.step;this.first=o,this.last=i,this.start=o-this.step,this.focused=startOfYearPeriod(t,this.step)}},{key:"updateSelection",value:function updateSelection(){var t=this,o=this.picker.datepicker,i=o.dates,a=o.rangepicker;this.selected=i.reduce((function(o,i){return pushUnique(o,startOfYearPeriod(i,t.step))}),[]),a&&a.dates&&(this.range=a.dates.map((function(o){if(void 0!==o)return startOfYearPeriod(o,t.step)})))}},{key:"render",value:function render(){var t=this;this.prepareForRender("".concat(this.first,"-").concat(this.last),this.first<=this.minYear,this.last>=this.maxYear),Array.from(this.grid.children).forEach((function(o,i){var a=t.start+i*t.step,c=regularizeDate(new Date(a,0,1),2,t.isRangeEnd);o.dataset.year=a,t.renderCell(o,a,a,c,t,a<t.minYear||a>t.maxYear)}))}},{key:"refresh",value:function refresh(){var t=this,o=this.range||[];Array.from(this.grid.children).forEach((function(i){t.refreshCell(i,Number(i.textContent),t.selected,o)}))}},{key:"refreshFocus",value:function refreshFocus(){this.changeFocusedCell(Math.round((this.focused-this.start)/this.step))}}]),YearsView}(at);function triggerDatepickerEvent(t,o){var i={bubbles:!0,cancelable:!0,detail:{date:t.getDate(),viewDate:new Date(t.picker.viewDate),viewId:t.picker.currentView.id,datepicker:t}};t.element.dispatchEvent(new CustomEvent(o,i))}function goToPrevOrNext(t,o){var i,a=t.config,c=t.picker,l=c.currentView,u=c.viewDate;switch(l.id){case 0:i=addMonths(u,o);break;case 1:i=addYears(u,o);break;default:i=addYears(u,o*l.navStep)}i=limitToRange(i,a.minDate,a.maxDate),c.changeFocus(i).render()}function switchView(t){var o=t.picker.currentView.id;o!==t.config.maxView&&t.picker.changeView(o+1).render()}function clearSelection(t){t.setDate({clear:!0})}function goToOrSelectToday(t){var o=today();1===t.config.todayButtonMode?t.setDate(o,{forceRefresh:!0,viewDate:o}):t.setFocusedDate(o,!0)}function unfocus(t){var o=function onBlur(){t.config.updateOnBlur?t.update({revert:!0}):t.refresh("input"),t.hide()},i=t.element;isActiveElement(i)?i.addEventListener("blur",o,{once:!0}):o()}function goToSelectedMonthOrYear(t,o){var i=t.picker,a=new Date(i.viewDate),c=i.currentView.id,l=1===c?addMonths(a,o-a.getMonth()):addYears(a,o-a.getFullYear());i.changeFocus(l).changeView(c-1).render()}function onClickViewSwitch(t){switchView(t)}function onClickPrevButton(t){goToPrevOrNext(t,-1)}function onClickNextButton(t){goToPrevOrNext(t,1)}function onClickView(t,o){var i=findElementInEventPath(o,".datepicker-cell");if(i&&!i.classList.contains("disabled")){var a=t.picker.currentView,c=a.id,l=a.isMinView,u=i.dataset;l?t.setDate(Number(u.date)):goToSelectedMonthOrYear(t,Number(1===c?u.month:u.year))}}function onMousedownPicker(t){t.preventDefault()}function Picker_typeof(t){return Picker_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},Picker_typeof(t)}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,o){return function Picker_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function Picker_iterableToArrayLimit(t,o){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,c,l,u,p=[],h=!0,v=!1;try{if(l=(i=i.call(t)).next,0===o){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(p.push(a.value),p.length!==o);h=!0);}catch(t){v=!0,c=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(v)throw c}}return p}}(t,o)||Picker_unsupportedIterableToArray(t,o)||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,o){if(t){if("string"===typeof t)return Picker_arrayLikeToArray(t,o);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,o):void 0}}function Picker_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=t[i];return a}function Picker_defineProperties(t,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,(c=a.key,l=void 0,l=function Picker_toPrimitive(t,o){if("object"!==Picker_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,o||"default");if("object"!==Picker_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(c,"string"),"symbol"===Picker_typeof(l)?l:String(l)),a)}var c,l}var ut=["left","top","right","bottom"].reduce((function(t,o){return t[o]="datepicker-orient-".concat(o),t}),{}),ft=function toPx(t){return t?"".concat(t,"px"):t};function processPickerOptions(t,o){if("title"in o&&(o.title?(t.controls.title.textContent=o.title,showElement(t.controls.title)):(t.controls.title.textContent="",hideElement(t.controls.title))),o.prevArrow){var i=t.controls.prevButton;emptyChildNodes(i),o.prevArrow.forEach((function(t){i.appendChild(t.cloneNode(!0))}))}if(o.nextArrow){var a=t.controls.nextButton;emptyChildNodes(a),o.nextArrow.forEach((function(t){a.appendChild(t.cloneNode(!0))}))}if(o.locale&&(t.controls.todayButton.textContent=o.locale.today,t.controls.clearButton.textContent=o.locale.clear),"todayButton"in o&&(o.todayButton?showElement(t.controls.todayButton):hideElement(t.controls.todayButton)),"minDate"in o||"maxDate"in o){var c=t.datepicker.config,l=c.minDate,u=c.maxDate;t.controls.todayButton.disabled=!isInRange(today(),l,u)}"clearButton"in o&&(o.clearButton?showElement(t.controls.clearButton):hideElement(t.controls.clearButton))}function computeResetViewDate(t){var o=t.dates,i=t.config,a=t.rangeSideIndex;return limitToRange(o.length>0?lastItemOf(o):regularizeDate(i.defaultViewDate,i.pickLevel,a),i.minDate,i.maxDate)}function setViewDate(t,o){"_oldViewDate"in t||o===t.viewDate||(t._oldViewDate=t.viewDate),t.viewDate=o;var i=t.currentView,a=i.id,c=i.year,l=i.first,u=i.last,p=new Date(o).getFullYear();switch(a){case 0:return o<l||o>u;case 1:return p!==c;default:return p<l||p>u}}function getTextDirection(t){return window.getComputedStyle(t).direction}function findScrollParents(t){var o=getParent(t);if(o!==document.body&&o)return"visible"!==window.getComputedStyle(o).overflow?o:findScrollParents(o)}var dt=function(){function Picker(t){!function Picker_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Picker);var o=this.datepicker=t,i=o.config,a=o.inputField,c=nt.replace(/%buttonClass%/g,i.buttonClass),l=this.element=parseHTML(c).firstChild,u=Picker_slicedToArray(l.firstChild.children,3),p=u[0],h=u[1],v=u[2],g=p.firstElementChild,b=Picker_slicedToArray(p.lastElementChild.children,3),w=b[0],_=b[1],k=b[2],O=Picker_slicedToArray(v.firstChild.children,2),S={title:g,prevButton:w,viewSwitch:_,nextButton:k,todayButton:O[0],clearButton:O[1]};this.main=h,this.controls=S;var A=a?"dropdown":"inline";l.classList.add("datepicker-".concat(A)),processPickerOptions(this,i),this.viewDate=computeResetViewDate(t),registerListeners(t,[[l,"mousedown",onMousedownPicker],[h,"click",onClickView.bind(null,t)],[S.viewSwitch,"click",onClickViewSwitch.bind(null,t)],[S.prevButton,"click",onClickPrevButton.bind(null,t)],[S.nextButton,"click",onClickNextButton.bind(null,t)],[S.todayButton,"click",goToOrSelectToday.bind(null,t)],[S.clearButton,"click",clearSelection.bind(null,t)]]),this.views=[new st(this),new ct(this),new lt(this,{id:2,name:"years",cellClass:"year",step:1}),new lt(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[i.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),i.container?i.container.appendChild(this.element):a.after(this.element)}return function Picker_createClass(t,o,i){return o&&Picker_defineProperties(t.prototype,o),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(o){o.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,o=this.element,i=t.inputField;if(i){var a=getTextDirection(i);a!==getTextDirection(getParent(o))?o.dir=a:o.dir&&o.removeAttribute("dir"),this.place(),o.classList.add("active"),t.config.disableTouchKeyboard&&i.blur()}else o.classList.add("active");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,o=t.classList,i=t.style;i.display="block";var a=this.element.getBoundingClientRect(),c=a.width,l=a.height,u=this.element.offsetParent;i.display="";var p=this.datepicker,h=p.config,v=p.inputField,g=v.getBoundingClientRect(),b=g.left,w=g.top,_=g.right,k=g.bottom,O=g.width,S=g.height,A=h.orientation,E=A.x,P=A.y,T=b,L=w;if(u!==document.body&&u){var C=u.getBoundingClientRect();T-=C.left-u.scrollLeft,L-=C.top-u.scrollTop}else T+=window.scrollX,L+=window.scrollY;var I=findScrollParents(v),V=0,j=0,x=document.documentElement,N=x.clientWidth,R=x.clientHeight;if(I){var Y=I.getBoundingClientRect();Y.top>0&&(j=Y.top),Y.left>0&&(V=Y.left),Y.right<N&&(N=Y.right),Y.bottom<R&&(R=Y.bottom)}var B=0;"auto"===E&&(b<V?(E="left",B=V-b):b+c>N?(E="right",N<_&&(B=N-_)):E="rtl"===getTextDirection(v)?_-c<V?"left":"right":"left"),"right"===E&&(T+=O-c),T+=B,"auto"===P&&(P=w-l>j&&k+l>R?"top":"bottom"),"top"===P?L-=l:L+=S,o.remove.apply(o,Picker_toConsumableArray(Object.values(ut))),o.add(ut[E],ut[P]),i.left=ft(T),i.top=ft(L)}},{key:"setViewSwitchLabel",value:function setViewSwitchLabel(t){this.controls.viewSwitch.textContent=t}},{key:"setPrevButtonDisabled",value:function setPrevButtonDisabled(t){this.controls.prevButton.disabled=t}},{key:"setNextButtonDisabled",value:function setNextButtonDisabled(t){this.controls.nextButton.disabled=t}},{key:"changeView",value:function changeView(t){var o=this.currentView;return t!==o.id&&(this._oldView||(this._oldView=o),this.currentView=this.views[t],this._renderMethod="render"),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=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,o=void 0===t?computeResetViewDate(this.datepicker):t;return this._renderMethod=setViewDate(this,o)?"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],o=this.currentView,i=this.datepicker,a=this._oldView,c=new Date(this._oldViewDate),l=t&&this._renderMethod||"render";if(delete this._oldView,delete this._oldViewDate,delete this._renderMethod,o[l](),a&&(this.main.replaceChild(o.element,a.element),triggerDatepickerEvent(i,"changeView")),!isNaN(c)){var u=new Date(this.viewDate);u.getFullYear()!==c.getFullYear()&&triggerDatepickerEvent(i,"changeYear"),u.getMonth()!==c.getMonth()&&triggerDatepickerEvent(i,"changeMonth")}}}]),Picker}();function findNextAvailableOne(t,o,i,a,c,l){if(isInRange(t,c,l))return a(t)?findNextAvailableOne(o(t,i),o,i,a,c,l):t}function moveByArrowKey(t,o,i){var a,c=t.picker,l=c.currentView,u=l.step||1,p=c.viewDate;switch(l.id){case 0:p=addDays(p,i?7*o:o),a=addDays;break;case 1:p=addMonths(p,i?4*o:o),a=addMonths;break;default:p=addYears(p,o*(i?4:1)*u),a=addYears}void 0!==(p=findNextAvailableOne(p,a,o<0?-u:u,(function(t){return l.disabled.includes(t)}),l.minDate,l.maxDate))&&c.changeFocus(p).render()}function onKeydown(t,o){var i=t.config,a=t.picker,c=t.editMode,l=a.active,u=o.key,p=o.altKey,h=o.shiftKey,v=o.ctrlKey||o.metaKey,g=function cancelEvent(){o.preventDefault(),o.stopPropagation()};if("Tab"!==u)if("Enter"!==u){var b,w=i.shortcutKeys,_={key:u,ctrlOrMetaKey:v,altKey:p,shiftKey:h},k=Object.keys(w).find((function(t){var o=w[t];return!Object.keys(o).find((function(t){return o[t]!==_[t]}))}));if(k)if("toggle"===k?b=k:c?"exitEditMode"===k&&(b=k):l?"hide"===k?b=k:"prevButton"===k?b=[goToPrevOrNext,[t,-1]]:"nextButton"===k?b=[goToPrevOrNext,[t,1]]:"viewSwitch"===k?b=[switchView,[t]]:i.clearButton&&"clearButton"===k?b=[clearSelection,[t]]:i.todayButton&&"todayButton"===k&&(b=[goToOrSelectToday,[t]]):"show"===k&&(b=k),b)return Array.isArray(b)?b[0].apply(null,b[1]):t[b](),void g();if(l&&!c){var O=function handleArrowKeyPress(i,a){h||v||p?t.enterEditMode():(moveByArrowKey(t,i,a),o.preventDefault())};"ArrowLeft"===u?O(-1,!1):"ArrowRight"===u?O(1,!1):"ArrowUp"===u?O(-1,!0):"ArrowDown"===u?O(1,!0):("Backspace"===u||"Delete"===u||u&&1===u.length&&!v)&&t.enterEditMode()}}else if(l)if(c)t.exitEditMode({update:!0,autohide:i.autohide});else{var S=a.currentView;S.isMinView?t.setDate(a.viewDate):(a.changeView(S.id-1).render(),g())}else t.update();else unfocus(t)}function onFocus(t){t.config.showOnFocus&&!t._showing&&t.show()}function onMousedown(t,o){var i=o.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,o){var i=o.target;i._clicking&&(clearTimeout(i._clicking),delete i._clicking,i._active&&t.enterEditMode(),delete i._active,t.config.showOnClick&&t.show())}function onPaste(t,o){o.clipboardData.types.includes("text/plain")&&t.enterEditMode()}function onClickOutside(t,o){var i=t.element,a=t.picker;if(a.active||isActiveElement(i)){var c=a.element;findElementInEventPath(o,(function(t){return t===i||t===c}))||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_defineProperties(t,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,(c=a.key,l=void 0,l=function Datepicker_toPrimitive(t,o){if("object"!==Datepicker_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,o||"default");if("object"!==Datepicker_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(c,"string"),"symbol"===Datepicker_typeof(l)?l:String(l)),a)}var c,l}function stringifyDates(t,o){return t.map((function(t){return date_format_formatDate(t,o.format,o.locale)})).join(o.dateDelimiter)}function processInputDates(t,o){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(0===o.length)return i?[]:void 0;var a=t.config,c=t.dates,l=t.rangeSideIndex,u=a.pickLevel,p=a.maxNumberOfDates,h=o.reduce((function(t,o){var i=date_format_parseDate(o,a.format,a.locale);return void 0===i||!isInRange(i=regularizeDate(i,u,l),a.minDate,a.maxDate)||t.includes(i)||a.checkDisabled(i,u)||!(u>0)&&a.daysOfWeekDisabled.includes(new Date(i).getDay())||t.push(i),t}),[]);return 0!==h.length?(a.multidate&&!i&&(h=h.reduce((function(t,o){return c.includes(o)||t.push(o),t}),c.filter((function(t){return!h.includes(t)})))),p&&h.length>p?h.slice(-1*p):h):void 0}function refreshUI(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,c=t.config,l=t.picker,u=t.inputField;if(2&o){var p=l.active?c.pickLevel:c.startView;l.update(a).changeView(p).render(i)}1&o&&u&&(u.value=stringifyDates(t.dates,c))}function _setDate(t,o,i){var a=t.config,c=i.clear,l=i.render,u=i.autohide,p=i.revert,h=i.forceRefresh,v=i.viewDate;void 0===l&&(l=!0),l?void 0===u&&(u=a.autohide):u=h=!1,v=date_format_parseDate(v,a.format,a.locale);var g=processInputDates(t,o,c);(g||p)&&(g&&g.toString()!==t.dates.toString()?(t.dates=g,refreshUI(t,l?3:1,!0,v),triggerDatepickerEvent(t,"changeDate")):refreshUI(t,h?3:1,!0,v),u&&t.hide())}function getOutputConverter(t,o){return o?function(i){return date_format_formatDate(i,o,t.config.locale)}:function(t){return new Date(t)}}var pt=function(){function Datepicker(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;!function Datepicker_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Datepicker),t.datepicker=this,this.element=t,this.dates=[];var a,c=this.config=Object.assign({buttonClass:o.buttonClass&&String(o.buttonClass)||"button",container:null,defaultViewDate:today(),maxDate:void 0,minDate:void 0},processOptions(Ge,this));if("INPUT"===t.tagName?((a=this.inputField=t).classList.add("datepicker-input"),o.container&&(c.container=o.container instanceof HTMLElement?o.container:document.querySelector(o.container))):c.container=t,i){var l=i.inputs.indexOf(a),u=i.datepickers;if(l<0||l>1||!Array.isArray(u))throw Error("Invalid rangepicker object.");u[l]=this,this.rangepicker=i,this.rangeSideIndex=l}this._options=o,Object.assign(c,processOptions(o,this)),c.shortcutKeys=function createShortcutKeyConfig(t){return Object.keys(tt).reduce((function(o,i){var a=void 0===t[i]?tt[i]:t[i],c=a&&a.key;if(!c||"string"!==typeof c)return o;var l={key:c,ctrlOrMetaKey:!!(a.ctrlOrMetaKey||a.ctrlKey||a.metaKey)};return c.length>1&&(l.altKey=!!a.altKey,l.shiftKey=!!a.shiftKey),o[i]=l,o}),{})}(o.shortcutKeys||{});var p=stringToArray(t.value||t.dataset.date,c.dateDelimiter);delete t.dataset.date;var h=processInputDates(this,p);h&&h.length>0&&(this.dates=h),a&&(a.value=stringifyDates(this.dates,c));var v=this.picker=new dt(this),g=[t,"keydown",onKeydown.bind(null,this)];a?registerListeners(this,[g,[a,"focus",onFocus.bind(null,this)],[a,"mousedown",onMousedown.bind(null,this)],[a,"click",onClickInput.bind(null,this)],[a,"paste",onPaste.bind(null,this)],[document,"mousedown",onClickOutside.bind(null,this)],[window,"resize",v.place.bind(v)]]):(registerListeners(this,[g]),this.show())}return function Datepicker_createClass(t,o,i){return o&&Datepicker_defineProperties(t.prototype,o),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 o=processOptions(t,this);Object.assign(this._options,t),Object.assign(this.config,o),this.picker.setOptions(o),refreshUI(this,3)}},{key:"show",value:function show(){if(this.inputField){var t=this.config,o=this.inputField;if(o.disabled||o.readOnly&&!t.enableOnReadonly)return;isActiveElement(o)||t.disableTouchKeyboard||(this._showing=!0,o.focus(),delete this._showing)}this.picker.show()}},{key:"hide",value:function hide(){this.inputField&&(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}},{key:"toggle",value:function toggle(){this.picker.active?this.inputField&&this.picker.hide():this.show()}},{key:"destroy",value:function destroy(){this.hide(),function unregisterListeners(t){var o=ze.get(t);o&&(o.forEach((function(t){Xe.call.apply(Xe,event_toConsumableArray(t))})),ze.delete(t))}(this),this.picker.detach();var t=this.element;return t.classList.remove("datepicker-input"),delete t.datepicker,this}},{key:"getDate",value:function getDate(){var t=getOutputConverter(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0);return this.config.multidate?this.dates.map(t):this.dates.length>0?t(this.dates[0]):void 0}},{key:"setDate",value:function setDate(){for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];var a=[].concat(o),c={},l=lastItemOf(o);!l||"object"!==Datepicker_typeof(l)||Array.isArray(l)||l instanceof Date||Object.assign(c,a.pop()),_setDate(this,Array.isArray(a[0])?a[0]:a,c)}},{key:"update",value:function update(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this.inputField){var o=Object.assign(t||{},{clear:!0,render:!0,viewDate:void 0});_setDate(this,stringToArray(this.inputField.value,this.config.dateDelimiter),o)}}},{key:"getFocusedDate",value:function getFocusedDate(){return getOutputConverter(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0)(this.picker.viewDate)}},{key:"setFocusedDate",value:function setFocusedDate(t){var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.config,a=this.picker,c=this.active,l=this.rangeSideIndex,u=i.pickLevel,p=date_format_parseDate(t,i.format,i.locale);void 0!==p&&(a.changeFocus(regularizeDate(p,u,l)),c&&o&&a.changeView(u),a.render())}},{key:"refresh",value:function refresh(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t&&"string"!==typeof t&&(o=t,t=void 0),refreshUI(this,"picker"===t?2:"input"===t?1:3,!o)}},{key:"enterEditMode",value:function enterEditMode(){var t=this.inputField;t&&!t.readOnly&&this.picker.active&&!this.editMode&&(this.editMode=!0,t.classList.add("in-edit"))}},{key:"exitEditMode",value:function exitEditMode(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this.inputField&&this.editMode){var o=Object.assign({update:!1},t);delete this.editMode,this.inputField.classList.remove("in-edit"),o.update&&this.update(o)}}}],[{key:"formatDate",value:function formatDate(t,o,i){return date_format_formatDate(t,o,i&&$e[i]||$e.en)}},{key:"parseDate",value:function parseDate(t,o,i){return date_format_parseDate(t,o,i&&$e[i]||$e.en)}},{key:"locales",get:function get(){return $e}}]),Datepicker}(),yt=function init(){document.querySelectorAll("input.js-datepicker").forEach((function(t,o){if(!t.dataset.ui){var i=t.dataset.datesNum,a=new pt(t,{buttonClass:"btn",autohide:!0,maxNumberOfDates:i||1});t.addEventListener("changeDate",(function(t){t.currentTarget.dispatchEvent(new Event("change"))})),t.ui=a,t.dataset.ui=!0}}))};window.addEventListener("".concat(t.LODEDANDREADY),yt),window.addEventListener("".concat(t.AJAX),yt);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 ht=function e(t){function n(t,o,i){var a,c={};if(Array.isArray(t))return t.concat(o);for(a in t)c[i?a.toLowerCase():a]=t[a];for(a in o){var l=i?a.toLowerCase():a,u=o[a];c[l]=l in c&&"object"==redaxios_module_typeof(u)?n(c[l],u,"headers"==l):u}return c}function r(o,i,a,c,l){var u="string"!=typeof o?(i=o).url:o,p={config:i},h=n(t,i),v={};c=c||h.data,(h.transformRequest||[]).map((function(t){c=t(c,h.headers)||c})),h.auth&&(v.authorization=h.auth),c&&"object"==redaxios_module_typeof(c)&&"function"!=typeof c.append&&"function"!=typeof c.text&&(c=JSON.stringify(c),v["content-type"]="application/json");try{v[h.xsrfHeaderName]=decodeURIComponent(document.cookie.match(RegExp("(^|; )"+h.xsrfCookieName+"=([^;]*)"))[2])}catch(o){}return h.baseURL&&(u=u.replace(/^(?!.*\/\/)\/?/,h.baseURL+"/")),h.params&&(u+=(~u.indexOf("?")?"&":"?")+(h.paramsSerializer?h.paramsSerializer(h.params):new URLSearchParams(h.params))),(h.fetch||fetch)(u,{method:(a||h.method||"get").toUpperCase(),body:c,headers:n(h.headers,v,!0),credentials:h.withCredentials?"include":l}).then((function(t){for(var o in t)"function"!=typeof t[o]&&(p[o]=t[o]);return"stream"==h.responseType?(p.data=t.body,p):t[h.responseType||"text"]().then((function(t){p.data=t,p.data=JSON.parse(t)})).catch(Object).then((function(){return(h.validateStatus?h.validateStatus(t.status):t.ok)?p:Promise.reject(p)}))}))}return t=t||{},r.request=r,r.get=function(t,o){return r(t,o,"get")},r.delete=function(t,o){return r(t,o,"delete")},r.head=function(t,o){return r(t,o,"head")},r.options=function(t,o){return r(t,o,"options")},r.post=function(t,o,i){return r(t,i,"post",o)},r.put=function(t,o,i){return r(t,i,"put",o)},r.patch=function(t,o,i){return r(t,i,"patch",o)},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(o){var i,a="main.online",c=document,l=c.body,u=c.querySelector('meta[name="ping"]'),p=!1,h=function UPDATE_ONLINE_STATUS(c){p||(p=!0,c?(l.classList.contains("is-offline")?(console.log("".concat(a,": back Online")),o.dispatchEvent(new Event(t.BACKONLINE))):(console.log("".concat(a,": Online")),o.dispatchEvent(new Event(t.ONLINE))),l.classList.add("is-online"),l.classList.remove("is-offline"),u&&!i&&(console.log("".concat(a,": SESSION_PING is active")),i=setInterval(g,3e5))):(console.log("".concat(a,": Offline")),l.classList.add("is-offline"),l.classList.remove("is-online"),clearInterval(i),i=null,o.dispatchEvent(new Event(t.OFFLINE))),p=!1)},v=!1,g=function SESSION_PING(){if(!v&&!l.classList.contains("is-offline")){var t=u.getAttribute("content");console.log("".concat(a,": session ping")),v=!0,ht.post(t,{}).then((function(t){v=!1,h(!0)})).catch((function(t){console.error(t),console.warn("".concat(a,": SESSION_PING failed")),v=!1,h(!1)}))}},b=function navigatorStateUpdate(){"undefined"!==typeof navigator.onLine&&(navigator.onLine?h(!0):h(!1))};o.addEventListener("".concat(t.OFFLINE),(function(){h(!1)})),o.addEventListener("".concat(t.ONLINE),(function(){h(!0)})),o.addEventListener("".concat(t.LOADED),b),o.addEventListener("".concat(t.AJAX),b)}(window);function image_typeof(t){return image_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},image_typeof(t)}function image_defineProperties(t,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,(c=a.key,l=void 0,l=function image_toPrimitive(t,o){if("object"!==image_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,o||"default");if("object"!==image_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(c,"string"),"symbol"===image_typeof(l)?l:String(l)),a)}var c,l}var vt="ajax.models.image",mt=document.querySelector('meta[name="api_static_domain"]'),gt=mt?mt.getAttribute("content"):"".concat(window.location.protocol,"//").concat(window.location.host);console.log("".concat(vt," [static url]: ").concat(gt));var bt=function(){function ImageObject(){!function image_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,ImageObject)}return function image_createClass(t,o,i){return o&&image_defineProperties(t.prototype,o),i&&image_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(ImageObject,[{key:"load",value:function load(t,o){var i=t.startsWith("http")?t:gt+t;return o&&(o.classList.add("loading"),o.classList.remove("loading__network-error")),new Promise((function(t,a){ht.get(i,{responseType:"blob"}).then((function(i){var a=new window.FileReader;a.readAsDataURL(i.data),a.onload=function(){var i=a.result;o&&(o.classList.remove("loading"),o.classList.add("loading__success")),t(i)}})).catch((function(t){console.warn(t);var c="";if(t.response){switch(t.response.status){case 404:c="Not Found.";break;case 500:c="Server issue, please try again latter.";break;default:c="Something went wrong."}console.error("".concat(vt," [").concat(i,"]: ").concat(c))}else t.request?(c="No response received",console.error("".concat(vt," [").concat(i,"]: ").concat(c))):console.error("".concat(vt," [").concat(i,"]: ").concat(t.message));o&&(o.classList.remove("loading"),o.classList.add("loading__network-error"),o.classList.add("empty")),a(t)}))}))}}]),ImageObject}();(function(o){var i=document,a=function loadLazyImages(){console.log("".concat("main.lazy-images",": Load lazy images"));var t=document.querySelector("base"),o=t?t.getAttribute("href"):"/";i.querySelectorAll("[data-lazy-src]").forEach((function(t){t.classList.remove("empty");var i=new bt,a=t.getAttribute("data-lazy-src");a.startsWith("http://")||a.startsWith("https://")||(a=o+t.getAttribute("data-lazy-src")),a=a.replace(/([^:]\/)\/+/g,"$1"),i.load(a,t).then((function(o){t.setAttribute("src",o)})).catch((function(){t.classList.add("empty")}))})),i.querySelectorAll("[data-lazy-bg]").forEach((function(t){t.classList.remove("empty"),(new bt).load(t.getAttribute("data-lazy-bg"),t).then((function(o){t.style.backgroundImage="url(".concat(o,")")})).catch((function(o){t.classList.add("empty")}))}))};o.addEventListener("".concat(t.LODEDANDREADY),a),o.addEventListener("".concat(t.AJAX),(function(){setTimeout(a,250)}))})(window),function(o){var a="_layout";o.addEventListener("".concat(t.LOADED),(function(){!function initFonts(){console.log("".concat(a,": initFonts"));var t=document.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",document.getElementsByTagName("head")[0].appendChild(t)}(),function initAnalytics(){console.log("".concat(a,": initAnalytics"))}(),function initMobileTables(){document.querySelectorAll(".typography table").forEach((function(t){var o=t.querySelector("thead tr:first-child");o&&(o.classList.add("d-typography-breakpoint-none"),o.querySelectorAll("td").forEach((function(o){t.querySelectorAll("td:eq(".concat(i,")")).forEach((function(t){t.dataset.label||(t.dataset.label=o.innerText)}))})))}))}()}))}(window)}()}(); |