From 7fd9645b44c33537b820511d095c27a7567e99a9 Mon Sep 17 00:00:00 2001 From: Tony Air Date: Mon, 11 Apr 2022 11:49:15 +0200 Subject: [PATCH] Minor updates --- app/_config/app.yml | 4 + app/client/dist/js/app.js | 2 +- ...p_Site.Controllers.MapElementController.js | 2 +- app/client/dist/js/sample.js | 2 +- app/client/dist/records.json | 302 +++++++++--------- app/client/dist/report.html | 4 +- .../Sheadawson/Linkable/Models/Link.ss | 6 +- composer.json | 2 +- package.json | 36 +-- 9 files changed, 183 insertions(+), 177 deletions(-) diff --git a/app/_config/app.yml b/app/_config/app.yml index b5941e8..6617f80 100644 --- a/app/_config/app.yml +++ b/app/_config/app.yml @@ -15,3 +15,7 @@ SilverStripe\CMS\Model\SiteTree: DNADesign\ElementalList\Model\ElementList: allowed_elements: null + +DNADesign\ElementalUserForms\Model\ElementForm: + block_default_userforms_css: true + block_default_userforms_js: true diff --git a/app/client/dist/js/app.js b/app/client/dist/js/app.js index 22a8263..5b2ab58 100644 --- a/app/client/dist/js/app.js +++ b/app/client/dist/js/app.js @@ -1 +1 @@ -!function(){var e={103:function(e,t,n){var r={"./bg.png":669,"./logo.png":152,"./logo.svg":704,"./original.png":4,"./original2.png":129,"./photo1.png":203,"./photo2.jpg":755,"./photo3.svg":162,"app/client/src/img/bg.png":669,"app/client/src/img/logo.png":152,"app/client/src/img/logo.svg":704,"app/client/src/img/original.png":4,"app/client/src/img/original2.png":129,"app/client/src/img/photo1.png":203,"app/client/src/img/photo2.jpg":755,"app/client/src/img/photo3.svg":162,"bg.png":669,"img/bg.png":669,"img/logo.png":152,"img/logo.svg":704,"img/original.png":4,"img/original2.png":129,"img/photo1.png":203,"img/photo2.jpg":755,"img/photo3.svg":162,"logo.png":152,"logo.svg":704,"original.png":4,"original2.png":129,"photo1.png":203,"photo2.jpg":755,"photo3.svg":162};function webpackContext(e){var t=webpackContextResolve(e);return n(t)}function webpackContextResolve(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}webpackContext.keys=function webpackContextKeys(){return Object.keys(r)},webpackContext.resolve=webpackContextResolve,e.exports=webpackContext,webpackContext.id=103},641:function(e,t,n){e.exports=n(127)},379:function(e,t,n){"use strict";var r=n(642),o=n(158),i=n(229),a=n(290),s=n(65),c=n(284),l=n(835),u=n(82),f=n(985),p=n(696);e.exports=function xhrAdapter(e){return new Promise((function dispatchXhrRequest(t,n){var h,g=e.data,v=e.headers,b=e.responseType;function done(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}r.isFormData(g)&&delete v["Content-Type"];var w=new XMLHttpRequest;if(e.auth){var _=e.auth.username||"",k=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";v.Authorization="Basic "+btoa(_+":"+k)}var E=s(e.baseURL,e.url);function onloadend(){if(w){var r="getAllResponseHeaders"in w?c(w.getAllResponseHeaders()):null,i={data:b&&"text"!==b&&"json"!==b?w.response:w.responseText,status:w.status,statusText:w.statusText,headers:r,config:e,request:w};o((function _resolve(e){t(e),done()}),(function _reject(e){n(e),done()}),i),w=null}}if(w.open(e.method.toUpperCase(),a(E,e.params,e.paramsSerializer),!0),w.timeout=e.timeout,"onloadend"in w?w.onloadend=onloadend:w.onreadystatechange=function handleLoad(){w&&4===w.readyState&&(0!==w.status||w.responseURL&&0===w.responseURL.indexOf("file:"))&&setTimeout(onloadend)},w.onabort=function handleAbort(){w&&(n(u("Request aborted",e,"ECONNABORTED",w)),w=null)},w.onerror=function handleError(){n(u("Network Error",e,null,w)),w=null},w.ontimeout=function handleTimeout(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||f;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",w)),w=null},r.isStandardBrowserEnv()){var A=(e.withCredentials||l(E))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;A&&(v[e.xsrfHeaderName]=A)}"setRequestHeader"in w&&r.forEach(v,(function setRequestHeader(e,t){"undefined"===typeof g&&"content-type"===t.toLowerCase()?delete v[t]:w.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(w.withCredentials=!!e.withCredentials),b&&"json"!==b&&(w.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&w.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&w.upload&&w.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function onCanceled(e){w&&(n(!e||e&&e.type?new p("canceled"):e),w.abort(),w=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),g||(g=null),w.send(g)}))}},127:function(e,t,n){"use strict";var r=n(642),o=n(344),i=n(72),a=n(608);var s=function createInstance(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n.create=function create(t){return createInstance(a(e,t))},n}(n(656));s.Axios=i,s.Cancel=n(696),s.CancelToken=n(601),s.isCancel=n(298),s.VERSION=n(853).version,s.all=function all(e){return Promise.all(e)},s.spread=n(314),s.isAxiosError=n(976),e.exports=s,e.exports.default=s},696:function(e){"use strict";function Cancel(e){this.message=e}Cancel.prototype.toString=function toString(){return"Cancel"+(this.message?": "+this.message:"")},Cancel.prototype.__CANCEL__=!0,e.exports=Cancel},601:function(e,t,n){"use strict";var r=n(696);function CancelToken(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function promiseExecutor(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function forEachMethodNoData(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function forEachMethodWithData(e){c.headers[e]=r.merge(s)})),e.exports=c},985:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},853:function(e){e.exports={version:"0.26.1"}},344:function(e){"use strict";e.exports=function bind(e,t){return function wrap(){for(var n=new Array(arguments.length),r=0;r=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},314:function(e){"use strict";e.exports=function spread(e){return function wrap(t){return e.apply(null,t)}}},62:function(e,t,n){"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var r=n(853).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function validator(n){return _typeof(n)===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function transitional(e,t,n){function formatMessage(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,o){if(!1===e)throw new Error(formatMessage(r," has been removed"+(t?" in "+t:"")));return t&&!i[r]&&(i[r]=!0,console.warn(formatMessage(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}},e.exports={assertOptions:function assertOptions(e,t,n){if("object"!==_typeof(e))throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],c=void 0===s||a(s,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},642:function(e,t,n){"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var r=n(344),o=Object.prototype.toString;function isArray(e){return Array.isArray(e)}function isUndefined(e){return"undefined"===typeof e}function isArrayBuffer(e){return"[object ArrayBuffer]"===o.call(e)}function isObject(e){return null!==e&&"object"===_typeof(e)}function isPlainObject(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function isFunction(e){return"[object Function]"===o.call(e)}function forEach(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==_typeof(e)&&(e=[e]),isArray(e))for(var n=0,r=e.length;n0||navigator.msMaxTouchPoints>0||t.matchMedia("(hover: none)").matches,"init"),i.addEventListener("touchend",(function(e){var t=!1;"click"!==e.type&&(t=!0),s(t,"click-touchend")})),i.addEventListener("click",(function(e){var t=!1;"click"!==e.type&&(t=!0),s(t,"click-touchend")}))}(window),{ENVS:["xs","sm","md","lg","xl","xxl","xxxl"]});function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function _unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(e,t)}(e)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nn.innerHeight?(o.classList.add("landscape"),o.classList.remove("portrait")):(u=!1,o.classList.add("portrait"),o.classList.remove("landscape")),console.log("".concat("_main.css-screen-size",": screen size detected ").concat(s," | landscape ").concat(u)),o.removeChild(i),s};n.addEventListener("".concat(e.LOADED),i),n.addEventListener("".concat(e.RESIZE),i)}(window);function _defineProperties(e,t){for(var n=0;n"),"color:yellow;font-size:10px"),console.info("%cENV: ".concat("production"),"color:green;font-size:10px"),console.groupCollapsed("Events"),Object.keys(e).forEach((function(t){console.info("".concat(t,": ").concat(e[t]))})),console.groupEnd("Events"),console.groupCollapsed("Consts"),Object.keys(t).forEach((function(e){console.info("".concat(e,": ").concat(t[e]))})),console.groupEnd("Events"),console.groupCollapsed("Init"),console.time("init");var o=function(){function MainUI(){!function main_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,MainUI)}return function main_createClass(e,t,n){return t&&main_defineProperties(e.prototype,t),n&&main_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(MainUI,null,[{key:"init",value:function init(){n.history.replaceState({landing:n.location.href},document.title,n.location.href),this.loaded()}},{key:"loaded",value:function loaded(){console.log("".concat("_main",": loaded"))}}]),MainUI}(),a=function documentInit(){o.init(),r.classList.add("loaded"),i.hide(),console.groupEnd("init"),console.timeEnd("init"),n.addEventListener("".concat(e.LOADED),(function(t){n.dispatchEvent(new Event(e.LODEDANDREADY))}))};"loading"===document.readyState?document.addEventListener("".concat(e.DOMLOADED),a):a(),n.addEventListener("".concat(e.AJAX),(function(){o.loaded()})),n.MainUI=o}(window);var a="ajax-load",s="load-ready";function window_toConsumableArray(e){return function window_arrayWithoutHoles(e){if(Array.isArray(e))return window_arrayLikeToArray(e)}(e)||function window_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function window_unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return window_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return window_arrayLikeToArray(e,t)}(e)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{shown:!1},n=arguments.length>1?arguments[1]:void 0;window_classCallCheck(this,MetaWindow),_defineProperty(this,"state",{content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1,collections:[],current:null,target:null,extraClass:null}),_defineProperty(this,"show",(function(){var t=e;console.log("".concat(t.name,": show")),t.setState({shown:!0}),c.dispatchEvent(new Event("{ui.name}.show"))})),_defineProperty(this,"hide",(function(){var t=e;console.log("".concat(t.name,": hide")),t.setState({shown:!1}),c.dispatchEvent(new Event("{ui.name}.hide"))})),_defineProperty(this,"next",(function(){var t=e,n=t.state.current.getAttribute("data-gallery"),r=t._currIndex();r0?r--:r=t.state.collections[n].length-1,t.state.collections[n][r].click(),console.log("".concat(t.name,": prev")),c.dispatchEvent(new Event("{ui.name}.prev"))})),_defineProperty(this,"reset",(function(){e.setState({content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1})})),_defineProperty(this,"load",(function(t){var n=e,r=n.axios;n.reset(),n.setState({loading:!0}),n.show(),r.get(t,{responseType:"arraybuffer"}).then((function(e){console.log("".concat(n.name,": response content-type: ").concat(e.headers["content-type"]));switch(e.headers["content-type"]){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":n.setContent(''),"meta-".concat(n.name,"--image"));break;case"application/json":case"application/ld+json":case"application/json; charset=UTF-8":n.setContent("".concat((!1).Content),["meta-".concat(n.name,"--text"),"meta-".concat(n.name,"--html"),"meta-".concat(n.name,"--json")]);break;case"video/mp4":n.setContent(''),["meta-".concat(n.name,"--image"),"meta-".concat(n.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":n.setContent(n._abToString(e.data),["meta-".concat(n.name,"--text"),"meta-".concat(n.name,"--html"),"meta-".concat(n.name,"--pajax")]);break;default:console.warn("".concat(n.name,": Unknown response content-type!"))}c.dispatchEvent(new Event("{ui.name}.loaded"))})).catch((function(e){console.error(e);var t="";if(e.response)switch(e.response.status){case 404:t="Not Found.";break;case 500:t="Server issue, please try again latter.";break;default:t="Something went wrong."}else e.request?t="No response received":console.warn("Error",e.message);n.setState({error:t}),c.dispatchEvent(new Event("{ui.name}.error"))})).then((function(){n.setState({loading:!1}),setTimeout((function(){n.state.current.classList.remove("loading")}),3e3)}))})),_defineProperty(this,"_currIndex",(function(){var t=e,n=t.state.current,r=n.getAttribute("data-gallery");return t.state.collections[r].indexOf(n)})),_defineProperty(this,"embed",(function(t){var n=e;console.log("".concat(n.name,": embed")),n.reset(),n.setState({embed:t,loading:!1,type:["meta-".concat(n.name,"--embed"),"meta-".concat(n.name,"--video")]}),n.show()})),_defineProperty(this,"setCaption",(function(t){var n=e;console.log("".concat(n.name,": setCaption")),n.state.caption=t})),_defineProperty(this,"addExtraClass",(function(t){var n=e;t.length&&(console.log("".concat(n.name,": addExtraClass(").concat(t,")")),n.state.extraClass=t)})),_defineProperty(this,"getCaption",(function(){return e.state.caption})),_defineProperty(this,"_abToString",(function(e){return String.fromCharCode.apply(null,new Uint8Array(e))})),_defineProperty(this,"_imageEncode",(function(e){new Uint8Array(e);return btoa([].reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),""))})),_defineProperty(this,"setContent",(function(t,n){var r=e;console.log("".concat(r.name,": setContent"));var o=n||["meta-".concat(r.name,"--html"),"meta-".concat(r.name,"--text")];Array.isArray(o)||(o=n.split(" ")),r.setState({content:t,type:o})})),_defineProperty(this,"getHtml",(function(){var t=e;if(t.state.embed){var n=__webpack_require__(979)(t.state.embed);t.state.content='')}return t.state.content}));var r=this;switch(r.name=r.constructor.name,console.log("".concat(r.name,": init")),r.axios=l,r.setState(t),n){case"show":case"hide":r.hide()}c.dispatchEvent(new Event("{ui.name}.init"))}return function window_createClass(e,t,n){return t&&window_defineProperties(e.prototype,t),n&&window_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(MetaWindow,[{key:"init",value:function init(){var e=this;console.log("MetaWindow: [links] init"),document.querySelectorAll('[data-toggle="lightbox"],[data-gallery="${gallery}"]').forEach((function(t){var n=t.getAttribute("data-gallery");n&&(e.state.collections[n]=[],document.querySelectorAll('[data-toggle="lightbox"][data-gallery="'.concat(n,'"]')).forEach((function(t){e.state.collections[n].push(t)}))),t.addEventListener("click",(function(t){t.preventDefault(),console.log("MetaWindow: [link] click");var n=t.currentTarget,r=n.getAttribute("href")||n.getAttribute("data-href"),o=n.getAttribute("data-embed");n.classList.add("loading"),e.state.current=n,o?e.embed(r):e.load(r);var i=n.getAttribute("data-title");i&&e.setCaption(i),e.addExtraClass(n.getAttribute("data-lightbox-class"))}))}))}},{key:"setState",value:function setState(e){var t=this;t.state=Object.assign({},t.state,e),t.render()}},{key:"render",value:function render(){var e,t=this,n=t.name,r=t.state.current;t.state.target.innerHTML="";var o=document.createElement("div");o.classList.add("meta-".concat(n)),(e=o.classList).add.apply(e,window_toConsumableArray(t.state.type)),t.state.target.append(o);var i=document.createElement("div");i.classList.add("meta-".concat(n,"-overlay")),t.state.shown&&i.classList.add("meta-".concat(n,"-overlay--open")),t.state.loading&&i.classList.add("meta-".concat(n,"-overlay--loading")),t.state.error&&i.classList.add("meta-".concat(n,"-overlay--error")),o.append(i);var a=document.createElement("div");a.classList.add("meta-content"),i.append(a);var s=document.createElement("button");if(s.classList.add("meta-nav","meta-close","a"),s.innerHTML=' Close',s.addEventListener("click",(function(e){e.preventDefault(),t.hide()})),a.append(s),r){var c=r.getAttribute("data-gallery");if(c&&t.state.collections[c].length>1){var l=document.createElement("nav");l.classList.add("meta-navs");var u=document.createElement("button");u.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__prev","a"),u.innerHTML=' Previous',u.addEventListener("click",(function(e){e.preventDefault(),t.prev()})),l.append(u);var f=document.createElement("button");f.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__next","a"),f.innerHTML=' Next',f.addEventListener("click",(function(e){e.preventDefault(),t.next()})),l.append(f),a.append(l)}}var p=document.createElement("section");if(p.classList.add("meta-wrap","typography"),t.state.extraClass&&p.classList.add(t.state.extraClass),p.innerHTML=t.getHtml(),a.append(p),t.state.error){var h=document.createElement("div");h.classList.add("meta-error"),h.innerHTML=t.state.error,a.append(h)}else if(t.state.caption){var g=document.createElement("div");g.classList.add("meta-caption"),g.innerHTML=t.getCaption(),a.append(g)}return"undefined"!==typeof window.FontAwesome&&window.FontAwesome.dom.i2svg(),t}}]),MetaWindow}(),f=u,p=document.getElementById("MetaLightboxApp");p||console.log("MetaWindow: missing container #MetaLightboxApp");var h=function init(){var e=window.MetaWindow;"undefined"===typeof e&&(e=new f({target:p}),window.MetaWindow=e),e.init()};window.addEventListener("".concat(s),h),window.addEventListener("".concat(a),h),window.addEventListener("MetaWindow.initLinks",h);function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var g="transitionend",v=function getSelector(e){var t=e.getAttribute("data-bs-target");if(!t||"#"===t){var n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n="#".concat(n.split("#")[1])),t=n&&"#"!==n?n.trim():null}return t},b=function getSelectorFromElement(e){var t=v(e);return t&&document.querySelector(t)?t:null},w=function getElementFromSelector(e){var t=v(e);return t?document.querySelector(t):null},_=function getTransitionDurationFromElement(e){if(!e)return 0;var t=window.getComputedStyle(e),n=t.transitionDuration,r=t.transitionDelay,o=Number.parseFloat(n),i=Number.parseFloat(r);return o||i?(n=n.split(",")[0],r=r.split(",")[0],1e3*(Number.parseFloat(n)+Number.parseFloat(r))):0},k=function triggerTransitionEnd(e){e.dispatchEvent(new Event(g))},E=function isElement(e){return!(!e||"object"!==_typeof(e))&&("undefined"!==typeof e.jquery&&(e=e[0]),"undefined"!==typeof e.nodeType)},A=function getElement(e){return E(e)?e.jquery?e[0]:e:"string"===typeof e&&e.length>0?document.querySelector(e):null},O=function typeCheckConfig(e,t,n){Object.keys(n).forEach((function(r){var o=n[r],i=t[r],a=i&&E(i)?"element":function toType(e){return null===e||void 0===e?"".concat(e):{}.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase()}(i);if(!new RegExp(o).test(a))throw new TypeError("".concat(e.toUpperCase(),': Option "').concat(r,'" provided type "').concat(a,'" but expected type "').concat(o,'".'))}))},S=function isVisible(e){return!(!E(e)||0===e.getClientRects().length)&&"visible"===getComputedStyle(e).getPropertyValue("visibility")},C=function reflow(e){e.offsetHeight},T=function getjQuery(){var jQuery=window.jQuery;return jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?jQuery:null},P=[],L=function isRTL(){return"rtl"===document.documentElement.dir},x=function defineJQueryPlugin(e){!function onDOMContentLoaded(e){"loading"===document.readyState?(P.length||document.addEventListener("DOMContentLoaded",(function(){P.forEach((function(e){return e()}))})),P.push(e)):e()}((function(){var $=T();if($){var t=e.NAME,n=$.fn[t];$.fn[t]=e.jQueryInterface,$.fn[t].Constructor=e,$.fn[t].noConflict=function(){return $.fn[t]=n,e.jQueryInterface}}}))},V=function execute(e){"function"===typeof e&&e()},I=function executeAfterTransition(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(n){var r=5,o=_(t)+r,i=!1,a=function handler(n){n.target===t&&(i=!0,t.removeEventListener(g,handler),V(e))};t.addEventListener(g,a),setTimeout((function(){i||k(t)}),o)}else V(e)},j=new Map,N=function set(e,t,n){j.has(e)||j.set(e,new Map);var r=j.get(e);r.has(t)||0===r.size?r.set(t,n):console.error("Bootstrap doesn't allow more than one instance per element. Bound instance: ".concat(Array.from(r.keys())[0],"."))},R=function get(e,t){return j.has(e)&&j.get(e).get(t)||null},B=function remove(e,t){if(j.has(e)){var n=j.get(e);n.delete(t),0===n.size&&j.delete(e)}};function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function event_handler_unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return event_handler_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return event_handler_arrayLikeToArray(e,t)}(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function event_handler_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:null,r=Object.keys(e),o=0,i=r.length;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return(t=[]).concat.apply(t,selector_engine_toConsumableArray(Element.prototype.querySelectorAll.call(n,e)))},findOne:function findOne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return Element.prototype.querySelector.call(t,e)},children:function children(e,t){var n;return(n=[]).concat.apply(n,selector_engine_toConsumableArray(e.children)).filter((function(e){return e.matches(t)}))},parents:function parents(e,t){for(var parents=[],n=e.parentNode;n&&n.nodeType===Node.ELEMENT_NODE&&3!==n.nodeType;)n.matches(t)&&parents.push(n),n=n.parentNode;return parents},prev:function prev(e,t){for(var n=e.previousElementSibling;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next:function next(e,t){for(var next=e.nextElementSibling;next;){if(next.matches(t))return[next];next=next.nextElementSibling}return[]},focusableChildren:function focusableChildren(e){var t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((function(e){return"".concat(e,':not([tabindex^="-"])')})).join(", ");return this.find(t,e).filter((function(e){return!function isDisabled(e){return!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||("undefined"!==typeof e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))}(e)&&S(e)}))}},Q=G;function base_component_typeof(e){return base_component_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},base_component_typeof(e)}function base_component_defineProperties(e,t){for(var n=0;n2&&void 0!==arguments[2])||arguments[2];I(e,t,n)}}],[{key:"getInstance",value:function getInstance(e){return R(A(e),this.DATA_KEY)}},{key:"getOrCreateInstance",value:function getOrCreateInstance(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getInstance(e)||new this(e,"object"===base_component_typeof(t)?t:null)}},{key:"VERSION",get:function get(){return"5.1.3"}},{key:"NAME",get:function get(){throw new Error('You have to implement the static method "NAME", for each component!')}},{key:"DATA_KEY",get:function get(){return"bs.".concat(this.NAME)}},{key:"EVENT_KEY",get:function get(){return".".concat(this.DATA_KEY)}}]),BaseComponent}(),te=ee;function collapse_typeof(e){return collapse_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},collapse_typeof(e)}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:this._element;return e.classList.contains(fe)}},{key:"_getConfig",value:function _getConfig(e){return(e=_objectSpread(_objectSpread(_objectSpread({},ie),Z.getDataAttributes(this._element)),e)).toggle=Boolean(e.toggle),e.parent=A(e.parent),O(ne,e,ae),e}},{key:"_getDimension",value:function _getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}},{key:"_initializeChildren",value:function _initializeChildren(){var e=this;if(this._config.parent){var t=Q.find(me,this._config.parent);Q.find(ge,this._config.parent).filter((function(e){return!t.includes(e)})).forEach((function(t){var n=w(t);n&&e._addAriaAndCollapsedClass([t],e._isShown(n))}))}}},{key:"_addAriaAndCollapsedClass",value:function _addAriaAndCollapsedClass(e,t){e.length&&e.forEach((function(e){t?e.classList.remove(ye):e.classList.add(ye),e.setAttribute("aria-expanded",t)}))}}],[{key:"Default",get:function get(){return ie}},{key:"NAME",get:function get(){return ne}},{key:"jQueryInterface",value:function jQueryInterface(e){return this.each((function(){var t={};"string"===typeof e&&/show|hide/.test(e)&&(t.toggle=!1);var n=Collapse.getOrCreateInstance(this,t);if("string"===typeof e){if("undefined"===typeof n[e])throw new TypeError('No method named "'.concat(e,'"'));n[e]()}}))}}]),Collapse}(te);J.on(document,de,ge,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();var t=b(this);Q.find(t).forEach((function(e){ve.getOrCreateInstance(e,{toggle:!1}).toggle()}))})),x(ve);var be;!function(t){var n="js-dropdown",r=function HideAll(){document.querySelectorAll(".dropdown-menu").forEach((function(e,t){e.classList.remove("show")}))},o=function Show(e){e.currentTarget.querySelector(".dropdown-menu").classList.add("show")},i=function Hide(e){e.currentTarget.querySelector(".dropdown-menu").classList.remove("show")},a=function init(){console.log("".concat(n,": init"));var e=document.querySelectorAll(".".concat(n,',[data-bs-toggle="dropdown"]')),t=document.querySelectorAll('[data-bs-toggle="hover"]'),a=function attachClickEvents(e){e.addEventListener("click",(function(e){e.preventDefault(),function Toggle(e){r(),e.querySelector(".dropdown-menu").classList.toggle("show")}(e.currentTarget.closest(".dropdown"))})),e.classList.add("".concat(n,"-active"))};document.addEventListener("click",(function(e){var t=!1,n=e.path||e.composedPath&&e.composedPath();n||console.warn("Browser does not provide event path to hide dropdowns on outside click"),n.forEach((function(e,n){t||(e===document&&r(),e.classList&&e.classList.contains("dropdown-toggle")&&(t=!0))}))})),t.forEach((function(e,t){!function attachHoverEvents(e){e.addEventListener("mouseover",o,!1),e.addEventListener("mouseout",i,!1),e.classList.add("".concat(n,"-active"))}(e.closest(".dropdown"))})),e.forEach((function(e,t){a(e)}))};t.addEventListener("".concat(e.LODEDANDREADY),a),t.addEventListener("".concat(e.AJAX),a)}(window);function carousel_typeof(e){return carousel_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},carousel_typeof(e)}function carousel_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function carousel_objectSpread(e){for(var t=1;t0,r._pointerEvent=Boolean(window.PointerEvent),r._addEventListeners(),r}return function carousel_createClass(e,t,n){return t&&carousel_defineProperties(e.prototype,t),n&&carousel_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(Carousel,[{key:"next",value:function next(){this._slide(Ae)}},{key:"nextWhenVisible",value:function nextWhenVisible(){!document.hidden&&S(this._element)&&this.next()}},{key:"prev",value:function prev(){this._slide(Oe)}},{key:"pause",value:function pause(e){e||(this._isPaused=!0),Q.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(k(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}},{key:"cycle",value:function cycle(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}},{key:"to",value:function to(e){var t=this;this._activeElement=Q.findOne(We,this._element);var n=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)J.one(this._element,Le,(function(){return t.to(e)}));else{if(n===e)return this.pause(),void this.cycle();var r=e>n?Ae:Oe;this._slide(r,this._items[e])}}},{key:"_getConfig",value:function _getConfig(e){return e=carousel_objectSpread(carousel_objectSpread(carousel_objectSpread({},Ee),Z.getDataAttributes(this._element)),"object"===carousel_typeof(e)?e:{}),O(we,e,De),e}},{key:"_handleSwipe",value:function _handleSwipe(){var e=Math.abs(this.touchDeltaX);if(!(e<=40)){var t=e/this.touchDeltaX;this.touchDeltaX=0,t&&this._slide(t>0?Ce:Se)}}},{key:"_addEventListeners",value:function _addEventListeners(){var e=this;this._config.keyboard&&J.on(this._element,xe,(function(t){return e._keydown(t)})),"hover"===this._config.pause&&(J.on(this._element,Ve,(function(t){return e.pause(t)})),J.on(this._element,Me,(function(t){return e.cycle(t)}))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}},{key:"_addTouchEventListeners",value:function _addTouchEventListeners(){var e=this,t=function hasPointerPenTouch(t){return e._pointerEvent&&("pen"===t.pointerType||"touch"===t.pointerType)},n=function start(n){t(n)?e.touchStartX=n.clientX:e._pointerEvent||(e.touchStartX=n.touches[0].clientX)},r=function end(n){t(n)&&(e.touchDeltaX=n.clientX-e.touchStartX),e._handleSwipe(),"hover"===e._config.pause&&(e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout((function(t){return e.cycle(t)}),500+e._config.interval))};Q.find(".carousel-item img",this._element).forEach((function(e){J.on(e,Fe,(function(e){return e.preventDefault()}))})),this._pointerEvent?(J.on(this._element,Re,(function(e){return n(e)})),J.on(this._element,Be,(function(e){return r(e)})),this._element.classList.add("pointer-event")):(J.on(this._element,Ie,(function(e){return n(e)})),J.on(this._element,je,(function(t){return function move(t){e.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-e.touchStartX}(t)})),J.on(this._element,Ne,(function(e){return r(e)})))}},{key:"_keydown",value:function _keydown(e){if(!/input|textarea/i.test(e.target.tagName)){var t=Te[e.key];t&&(e.preventDefault(),this._slide(t))}}},{key:"_getItemIndex",value:function _getItemIndex(e){return this._items=e&&e.parentNode?Q.find(".carousel-item",e.parentNode):[],this._items.indexOf(e)}},{key:"_getItemByOrder",value:function _getItemByOrder(e,t){var n=e===Ae;return function getNextActiveElement(e,t,n,r){var o=e.indexOf(t);if(-1===o)return e[!n&&r?e.length-1:0];var i=e.length;return o+=n?1:-1,r&&(o=(o+i)%i),e[Math.max(0,Math.min(o,i-1))]}(this._items,t,n,this._config.wrap)}},{key:"_triggerSlideEvent",value:function _triggerSlideEvent(e,t){var n=this._getItemIndex(e),r=this._getItemIndex(Q.findOne(We,this._element));return J.trigger(this._element,Pe,{relatedTarget:e,direction:t,from:r,to:n})}},{key:"_setActiveIndicatorElement",value:function _setActiveIndicatorElement(e){if(this._indicatorsElement){var t=Q.findOne(".active",this._indicatorsElement);t.classList.remove(He),t.removeAttribute("aria-current");for(var n=Q.find("[data-bs-target]",this._indicatorsElement),r=0;r1?t-1:0),r=1;r=t)&&(void 0===n||e<=n)}function limitToRange(e,t,n){return en?n:e}function createTagRepeat(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=Object.keys(n).reduce((function(e,t){var o=n[t];return"function"===typeof o&&(o=o(r)),"".concat(e," ").concat(t,'="').concat(o,'"')}),e);o+="<".concat(i,">");var a=r+1;return a\s+/g,">").replace(/\s+2&&void 0!==arguments[2]?arguments[2]:0,r=new Date(e).getDay();return addDays(e,dayDiff(t,n)-dayDiff(r,n))}function startOfYearPeriod(e,t){var n=new Date(e).getFullYear();return Math.floor(n/t)*t}function regularizeDate(e,t,n){if(1!==t&&2!==t)return e;var r=new Date(e);return 1===t?n?r.setMonth(r.getMonth()+1,0):r.setDate(1):n?r.setFullYear(r.getFullYear()+1,0,0):r.setMonth(0,1),r.setHours(0,0,0,0)}var Ke=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,Xe=/[\s!-/:-@[-`{-~\u5e74\u6708\u65e5]+/,Je={},$e={y:function y(e,t){return new Date(e).setFullYear(parseInt(t,10))},m:function m(e,t,n){var r=new Date(e),o=parseInt(t,10)-1;if(isNaN(o)){if(!t)return NaN;var i=t.toLowerCase(),a=function compareNames(e){return e.toLowerCase().startsWith(i)};if((o=n.monthsShort.findIndex(a))<0&&(o=n.months.findIndex(a)),o<0)return NaN}return r.setMonth(o),r.getMonth()!==normalizeMonth(o)?r.setDate(0):r.getTime()},d:function d(e,t){return new Date(e).setDate(parseInt(t,10))}},Ze={d:function d(e){return e.getDate()},dd:function dd(e){return padZero(e.getDate(),2)},D:function D(e,t){return t.daysShort[e.getDay()]},DD:function DD(e,t){return t.days[e.getDay()]},m:function m(e){return e.getMonth()+1},mm:function mm(e){return padZero(e.getMonth()+1,2)},M:function M(e,t){return t.monthsShort[e.getMonth()]},MM:function MM(e,t){return t.months[e.getMonth()]},y:function y(e){return e.getFullYear()},yy:function yy(e){return padZero(e.getFullYear(),2).slice(-2)},yyyy:function yyyy(e){return padZero(e.getFullYear(),4)}};function normalizeMonth(e){return e>-1?e%12:normalizeMonth(e+12)}function padZero(e,t){return e.toString().padStart(t,"0")}function parseFormatString(e){if("string"!==typeof e)throw new Error("Invalid date format.");if(e in Je)return Je[e];var t=e.split(Ke),n=e.match(new RegExp(Ke,"g"));if(0===t.length||!n)throw new Error("Invalid date format.");var r=n.map((function(e){return Ze[e]})),o=Object.keys($e).reduce((function(e,t){return n.find((function(e){return"D"!==e[0]&&e[0].toLowerCase()===t}))&&e.push(t),e}),[]);return Je[e]={parser:function parser(e,t){var r=e.split(Xe).reduce((function(e,t,r){if(t.length>0&&n[r]){var o=n[r][0];"M"===o?e.m=t:"D"!==o&&(e[o]=t)}return e}),{});return o.reduce((function(e,n){var o=$e[n](e,r[n],t);return isNaN(o)?e:o}),today())},formatter:function formatter(e,n){return r.reduce((function(r,o,i){return r+"".concat(t[i]).concat(o(e,n))}),"")+lastItemOf(t)}}}function date_format_parseDate(e,t,n){if(e instanceof Date||"number"===typeof e){var r=stripTime(e);return isNaN(r)?void 0:r}if(e){if("today"===e)return today();if(t&&t.toValue){var o=t.toValue(e,t,n);return isNaN(o)?void 0:stripTime(o)}return parseFormatString(t).parser(e,n)}}function date_format_formatDate(e,t,n){if(isNaN(e)||!e&&0!==e)return"";var r="number"===typeof e?new Date(e):e;return t.toDisplay?t.toDisplay(r,t,n):parseFormatString(t).formatter(r,n)}var Ge=document.createRange();function parseHTML(e){return Ge.createContextualFragment(e)}function getParent(e){return e.parentElement||(e.parentNode instanceof ShadowRoot?e.parentNode.host:void 0)}function isActiveElement(e){return e.getRootNode().activeElement===e}function hideElement(e){"none"!==e.style.display&&(e.style.display&&(e.dataset.styleDisplay=e.style.display),e.style.display="none")}function showElement(e){"none"===e.style.display&&(e.dataset.styleDisplay?(e.style.display=e.dataset.styleDisplay,delete e.dataset.styleDisplay):e.style.display="")}function emptyChildNodes(e){e.firstChild&&(e.removeChild(e.firstChild),emptyChildNodes(e))}function _toArray(e){return function event_arrayWithHoles(e){if(Array.isArray(e))return e}(e)||event_iterableToArray(e)||event_unsupportedIterableToArray(e)||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(e){return function event_arrayWithoutHoles(e){if(Array.isArray(e))return event_arrayLikeToArray(e)}(e)||event_iterableToArray(e)||event_unsupportedIterableToArray(e)||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(e,t){if(e){if("string"===typeof e)return event_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?event_arrayLikeToArray(e,t):void 0}}function event_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function event_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:[];return n.push(e),e.parentNode?t=e.parentNode:e.host?t=e.host:e.defaultView&&(t=e.defaultView),t?getComposedPath(t,n):n};Event.prototype.composedPath=function(){return rt(this.target)}}function findFromPath(e,t,n){var r=_toArray(e),o=r[0],i=r.slice(1);return t(o)?o:o!==n&&"HTML"!==o.tagName&&0!==i.length?findFromPath(i,t,n):void 0}function findElementInEventPath(e,t){var n="function"===typeof t?t:function(e){return e instanceof Element&&e.matches(t)};return findFromPath(e.composedPath(),n,e.currentTarget)}var ot={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"}},it={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:"\xbb",orientation:"auto",pickLevel:0,prevArrow:"\xab",showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0},at=it.language,st=it.format,ct=it.weekStart;function sanitizeDOW(e,t){return e.length<6&&t>=0&&t<7?pushUnique(e,t):e}function calcEndOfWeek(e){return(e+6)%7}function validateDate(e,t,n,r){var o=date_format_parseDate(e,t,n);return void 0!==o?o:r}function validateViewId(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=parseInt(e,10);return r>=0&&r<=n?r:t}function processOptions(e,t){var n,r=Object.assign({},e),o={},i=t.constructor.locales,a=t.rangeSideIndex,s=t.config||{},c=s.format,l=s.language,u=s.locale,f=s.maxDate,p=s.maxView,h=s.minDate,g=s.pickLevel,v=s.startView,b=s.weekStart;if(r.language&&(r.language!==l&&(i[r.language]?n=r.language:void 0===i[n=r.language.split("-")[0]]&&(n=!1)),delete r.language,n)){l=o.language=n;var w=u||i[at];u=Object.assign({format:st,weekStart:ct},i[at]),l!==at&&Object.assign(u,i[l]),o.locale=u,c===w.format&&(c=o.format=u.format),b===w.weekStart&&(b=o.weekStart=u.weekStart,o.weekEnd=calcEndOfWeek(u.weekStart))}if(r.format){var _="function"===typeof r.format.toDisplay,k="function"===typeof r.format.toValue,E=Ke.test(r.format);(_&&k||E)&&(c=o.format=r.format),delete r.format}var A=g;void 0!==r.pickLevel&&(A=validateViewId(r.pickLevel,2),delete r.pickLevel),A!==g&&(A>g&&(void 0===r.minDate&&(r.minDate=h),void 0===r.maxDate&&(r.maxDate=f)),r.datesDisabled||(r.datesDisabled=[]),g=o.pickLevel=A);var O=h,S=f;if(void 0!==r.minDate){var C=dateValue(0,0,1);(O=null===r.minDate?C:validateDate(r.minDate,c,u,O))!==C&&(O=regularizeDate(O,g,!1)),delete r.minDate}if(void 0!==r.maxDate&&(void 0!==(S=null===r.maxDate?void 0:validateDate(r.maxDate,c,u,S))&&(S=regularizeDate(S,g,!0)),delete r.maxDate),S=0&&(o.maxNumberOfDates=L,o.multidate=1!==L),delete r.maxNumberOfDates}r.dateDelimiter&&(o.dateDelimiter=String(r.dateDelimiter),delete r.dateDelimiter);var x=p;void 0!==r.maxView&&(x=validateViewId(r.maxView,p),delete r.maxView),(x=g>x?g:x)!==p&&(p=o.maxView=x);var V=v;if(void 0!==r.startView&&(V=validateViewId(r.startView,V),delete r.startView),Vp&&(V=p),V!==v&&(o.startView=V),r.prevArrow){var I=parseHTML(r.prevArrow);I.childNodes.length>0&&(o.prevArrow=I.childNodes),delete r.prevArrow}if(r.nextArrow){var j=parseHTML(r.nextArrow);j.childNodes.length>0&&(o.nextArrow=j.childNodes),delete r.nextArrow}if(void 0!==r.disableTouchKeyboard&&(o.disableTouchKeyboard="ontouchstart"in document&&!!r.disableTouchKeyboard,delete r.disableTouchKeyboard),r.orientation){var N=r.orientation.toLowerCase().split(/\s+/g);o.orientation={x:N.find((function(e){return"left"===e||"right"===e}))||"auto",y:N.find((function(e){return"top"===e||"bottom"===e}))||"auto"},delete r.orientation}if(void 0!==r.todayBtnMode){switch(r.todayBtnMode){case 0:case 1:o.todayBtnMode=r.todayBtnMode}delete r.todayBtnMode}return Object.keys(r).forEach((function(e){void 0!==r[e]&&hasProperty(it,e)&&(o[e]=r[e])})),o}var lt=optimizeTemplateHTML('
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n \n
\n
'),ut=optimizeTemplateHTML('
\n
'.concat(createTagRepeat("span",7,{class:"dow"}),'
\n
').concat(createTagRepeat("span",42),"
\n
")),dt=optimizeTemplateHTML('
\n
\n
'.concat(createTagRepeat("span",6,{class:"week"}),"
\n
"));function View_toConsumableArray(e){return function View_arrayWithoutHoles(e){if(Array.isArray(e))return View_arrayLikeToArray(e)}(e)||function View_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function View_unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return View_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return View_arrayLikeToArray(e,t)}(e)||function View_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function View_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}return function View_createClass(e,t,n){return t&&View_defineProperties(e.prototype,t),n&&View_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(View,[{key:"init",value:function init(e){void 0!==e.pickLevel&&(this.isMinView=this.id===e.pickLevel),this.setOptions(e),this.updateFocus(),this.updateSelection()}},{key:"performBeforeHook",value:function performBeforeHook(e,t,n){var r=this.beforeShow(new Date(n));switch(View_typeof(r)){case"boolean":r={enabled:r};break;case"string":r={classes:r}}if(r){if(!1===r.enabled&&(e.classList.add("disabled"),pushUnique(this.disabled,t)),r.classes){var o,i=r.classes.split(/\s+/);(o=e.classList).add.apply(o,View_toConsumableArray(i)),i.includes("disabled")&&pushUnique(this.disabled,t)}r.content&&function replaceChildNodes(e,t){emptyChildNodes(e),t instanceof DocumentFragment?e.appendChild(t):"string"===typeof t?e.appendChild(parseHTML(t)):"function"===typeof t.forEach&&t.forEach((function(t){e.appendChild(t)}))}(e,r.content)}}}]),View}();function DaysView_typeof(e){return DaysView_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},DaysView_typeof(e)}function DaysView_slicedToArray(e,t){return function DaysView_arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function DaysView_iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||DaysView_unsupportedIterableToArray(e,t)||function DaysView_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DaysView_toConsumableArray(e){return function DaysView_arrayWithoutHoles(e){if(Array.isArray(e))return DaysView_arrayLikeToArray(e)}(e)||function DaysView_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||DaysView_unsupportedIterableToArray(e)||function DaysView_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DaysView_unsupportedIterableToArray(e,t){if(e){if("string"===typeof e)return DaysView_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?DaysView_arrayLikeToArray(e,t):void 0}}function DaysView_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1])||arguments[1];if(t){var n=parseHTML(ut).firstChild;this.dow=n.firstChild,this.grid=n.lastChild,this.element.appendChild(n)}_get(DaysView_getPrototypeOf(DaysView.prototype),"init",this).call(this,e)}},{key:"setOptions",value:function setOptions(e){var t,n=this;if(hasProperty(e,"minDate")&&(this.minDate=e.minDate),hasProperty(e,"maxDate")&&(this.maxDate=e.maxDate),e.datesDisabled&&(this.datesDisabled=e.datesDisabled),e.daysOfWeekDisabled&&(this.daysOfWeekDisabled=e.daysOfWeekDisabled,t=!0),e.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=e.daysOfWeekHighlighted),void 0!==e.todayHighlight&&(this.todayHighlight=e.todayHighlight),void 0!==e.weekStart&&(this.weekStart=e.weekStart,this.weekEnd=e.weekEnd,t=!0),e.locale){var r=this.locale=e.locale;this.dayNames=r.daysMin,this.switchLabelFormat=r.titleFormat,t=!0}if(void 0!==e.beforeShowDay&&(this.beforeShow="function"===typeof e.beforeShowDay?e.beforeShowDay:void 0),void 0!==e.calendarWeeks)if(e.calendarWeeks&&!this.calendarWeeks){var o=parseHTML(dt).firstChild;this.calendarWeeks={element:o,dow:o.firstChild,weeks:o.lastChild},this.element.insertBefore(o,this.element.firstChild)}else this.calendarWeeks&&!e.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);void 0!==e.showDaysOfWeek&&(e.showDaysOfWeek?(showElement(this.dow),this.calendarWeeks&&showElement(this.calendarWeeks.dow)):(hideElement(this.dow),this.calendarWeeks&&hideElement(this.calendarWeeks.dow))),t&&Array.from(this.dow.children).forEach((function(e,t){var r=(n.weekStart+t)%7;e.textContent=n.dayNames[r],e.className=n.daysOfWeekDisabled.includes(r)?"dow disabled":"dow"}))}},{key:"updateFocus",value:function updateFocus(){var e=new Date(this.picker.viewDate),t=e.getFullYear(),n=e.getMonth(),r=dateValue(t,n,1),o=dayOfTheWeekOf(r,this.weekStart,this.weekStart);this.first=r,this.last=dateValue(t,n+1,0),this.start=o,this.focused=this.picker.viewDate}},{key:"updateSelection",value:function updateSelection(){var e=this.picker.datepicker,t=e.dates,n=e.rangepicker;this.selected=t,n&&(this.range=n.dates)}},{key:"render",value:function render(){var e=this;this.today=this.todayHighlight?today():void 0,this.disabled=DaysView_toConsumableArray(this.datesDisabled);var t=date_format_formatDate(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(t),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){var n=dayOfTheWeekOf(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach((function(e,t){e.textContent=function getWeek(e){var t=dayOfTheWeekOf(e,4,1),n=dayOfTheWeekOf(new Date(t).setMonth(0,4),4,1);return Math.round((t-n)/6048e5)+1}(function addWeeks(e,t){return addDays(e,7*t)}(n,t))}))}Array.from(this.grid.children).forEach((function(t,n){var r=t.classList,o=addDays(e.start,n),i=new Date(o),a=i.getDay();if(t.className="datepicker-cell ".concat(e.cellClass),t.dataset.date=o,t.textContent=i.getDate(),oe.last&&r.add("next"),e.today===o&&r.add("today"),(oe.maxDate||e.disabled.includes(o))&&r.add("disabled"),e.daysOfWeekDisabled.includes(a)&&(r.add("disabled"),pushUnique(e.disabled,o)),e.daysOfWeekHighlighted.includes(a)&&r.add("highlighted"),e.range){var s=DaysView_slicedToArray(e.range,2),c=s[0],l=s[1];o>c&&on&&oe.length)&&(t=e.length);for(var n=0,r=new Array(t);nt||s1&&void 0!==arguments[1])||arguments[1];t&&(this.grid=this.element,this.element.classList.add("months","datepicker-grid"),this.grid.appendChild(parseHTML(createTagRepeat("span",12,{"data-month":function dataMonth(e){return e}})))),MonthsView_get(MonthsView_getPrototypeOf(MonthsView.prototype),"init",this).call(this,e)}},{key:"setOptions",value:function setOptions(e){if(e.locale&&(this.monthNames=e.locale.monthsShort),hasProperty(e,"minDate"))if(void 0===e.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{var t=new Date(e.minDate);this.minYear=t.getFullYear(),this.minMonth=t.getMonth(),this.minDate=t.setDate(1)}if(hasProperty(e,"maxDate"))if(void 0===e.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{var n=new Date(e.maxDate);this.maxYear=n.getFullYear(),this.maxMonth=n.getMonth(),this.maxDate=dateValue(this.maxYear,this.maxMonth+1,0)}this.isMinView?e.datesDisabled&&(this.datesDisabled=e.datesDisabled):this.datesDisabled=[],void 0!==e.beforeShowMonth&&(this.beforeShow="function"===typeof e.beforeShowMonth?e.beforeShowMonth:void 0)}},{key:"updateFocus",value:function updateFocus(){var e=new Date(this.picker.viewDate);this.year=e.getFullYear(),this.focused=e.getMonth()}},{key:"updateSelection",value:function updateSelection(){var e=this.picker.datepicker,t=e.dates,n=e.rangepicker;this.selected=t.reduce((function(e,t){var n=new Date(t),r=n.getFullYear(),o=n.getMonth();return void 0===e[r]?e[r]=[o]:pushUnique(e[r],o),e}),{}),n&&n.dates&&(this.range=n.dates.map((function(e){var t=new Date(e);return isNaN(t)?void 0:[t.getFullYear(),t.getMonth()]})))}},{key:"render",value:function render(){var e=this;this.disabled=this.datesDisabled.reduce((function(t,n){var r=new Date(n);return e.year===r.getFullYear()&&t.push(r.getMonth()),t}),[]),this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);var t=this.selected[this.year]||[],n=this.yearthis.maxYear,r=this.year===this.minYear,o=this.year===this.maxYear,i=computeMonthRange(this.range,this.year);Array.from(this.grid.children).forEach((function(a,s){var c=a.classList,l=dateValue(e.year,s,1);if(a.className="datepicker-cell ".concat(e.cellClass),e.isMinView&&(a.dataset.date=l),a.textContent=e.monthNames[s],(n||r&&se.maxMonth||e.disabled.includes(s))&&c.add("disabled"),i){var u=MonthsView_slicedToArray(i,2),f=u[0],p=u[1];s>f&&sr&&ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1])||arguments[1];t&&(this.navStep=10*this.step,this.beforeShowOption="beforeShow".concat(toTitleCase(this.cellClass)),this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid"),this.grid.appendChild(parseHTML(createTagRepeat("span",12)))),YearsView_get(YearsView_getPrototypeOf(YearsView.prototype),"init",this).call(this,e)}},{key:"setOptions",value:function setOptions(e){if(hasProperty(e,"minDate")&&(void 0===e.minDate?this.minYear=this.minDate=void 0:(this.minYear=startOfYearPeriod(e.minDate,this.step),this.minDate=dateValue(this.minYear,0,1))),hasProperty(e,"maxDate")&&(void 0===e.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=startOfYearPeriod(e.maxDate,this.step),this.maxDate=dateValue(this.maxYear,11,31))),this.isMinView?e.datesDisabled&&(this.datesDisabled=e.datesDisabled):this.datesDisabled=[],void 0!==e[this.beforeShowOption]){var t=e[this.beforeShowOption];this.beforeShow="function"===typeof t?t:void 0}}},{key:"updateFocus",value:function updateFocus(){var e=new Date(this.picker.viewDate),t=startOfYearPeriod(e,this.navStep),n=t+9*this.step;this.first=t,this.last=n,this.start=t-this.step,this.focused=startOfYearPeriod(e,this.step)}},{key:"updateSelection",value:function updateSelection(){var e=this,t=this.picker.datepicker,n=t.dates,r=t.rangepicker;this.selected=n.reduce((function(t,n){return pushUnique(t,startOfYearPeriod(n,e.step))}),[]),r&&r.dates&&(this.range=r.dates.map((function(t){if(void 0!==t)return startOfYearPeriod(t,e.step)})))}},{key:"render",value:function render(){var e=this;this.disabled=this.datesDisabled.map((function(e){return new Date(e).getFullYear()})),this.picker.setViewSwitchLabel("".concat(this.first,"-").concat(this.last)),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach((function(t,n){var r=t.classList,o=e.start+n*e.step,i=dateValue(o,0,1);if(t.className="datepicker-cell ".concat(e.cellClass),e.isMinView&&(t.dataset.date=i),t.textContent=t.dataset.year=o,0===n?r.add("prev"):11===n&&r.add("next"),(oe.maxYear||e.disabled.includes(o))&&r.add("disabled"),e.range){var a=YearsView_slicedToArray(e.range,2),s=a[0],c=a[1];o>s&&on&&oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?lastItemOf(t):n.defaultViewDate,n.minDate,n.maxDate)}function setViewDate(e,t){var n=new Date(e.viewDate),r=new Date(t),o=e.currentView,i=o.id,a=o.year,s=o.first,c=o.last,l=r.getFullYear();switch(e.viewDate=t,l!==n.getFullYear()&&triggerDatepickerEvent(e.datepicker,"changeYear"),r.getMonth()!==n.getMonth()&&triggerDatepickerEvent(e.datepicker,"changeMonth"),i){case 0:return tc;case 1:return l!==a;default:return lc}}function getTextDirection(e){return window.getComputedStyle(e).direction}function findScrollParents(e){var t=getParent(e);if(t!==document.body&&t)return"visible"!==window.getComputedStyle(t).overflow?t:findScrollParents(t)}var vt=function(){function Picker(e){!function Picker_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Picker);var t=(this.datepicker=e).config,n=lt.replace(/%buttonClass%/g,t.buttonClass),r=this.element=parseHTML(n).firstChild,o=Picker_slicedToArray(r.firstChild.children,3),i=o[0],a=o[1],s=o[2],c=i.firstElementChild,l=Picker_slicedToArray(i.lastElementChild.children,3),u=l[0],f=l[1],p=l[2],h=Picker_slicedToArray(s.firstChild.children,2),g={title:c,prevBtn:u,viewSwitch:f,nextBtn:p,todayBtn:h[0],clearBtn:h[1]};this.main=a,this.controls=g;var v=e.inline?"inline":"dropdown";r.classList.add("datepicker-".concat(v)),processPickerOptions(this,t),this.viewDate=computeResetViewDate(e),registerListeners(e,[[r,"mousedown",onMousedownPicker],[a,"click",onClickView.bind(null,e)],[g.viewSwitch,"click",onClickViewSwitch.bind(null,e)],[g.prevBtn,"click",onClickPrevBtn.bind(null,e)],[g.nextBtn,"click",onClickNextBtn.bind(null,e)],[g.todayBtn,"click",onClickTodayBtn.bind(null,e)],[g.clearBtn,"click",onClickClearBtn.bind(null,e)]]),this.views=[new pt(this),new ht(this),new yt(this,{id:2,name:"years",cellClass:"year",step:1}),new yt(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[t.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),t.container?t.container.appendChild(this.element):e.inputField.after(this.element)}return function Picker_createClass(e,t,n){return t&&Picker_defineProperties(e.prototype,t),n&&Picker_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(Picker,[{key:"setOptions",value:function setOptions(e){processPickerOptions(this,e),this.views.forEach((function(t){t.init(e,!1)})),this.currentView.render()}},{key:"detach",value:function detach(){this.element.remove()}},{key:"show",value:function show(){if(!this.active){var e=this.datepicker,t=this.element;if(e.inline)t.classList.add("active");else{var n=getTextDirection(e.inputField);n!==getTextDirection(getParent(t))?t.dir=n:t.dir&&t.removeAttribute("dir"),t.style.visiblity="hidden",t.classList.add("active"),this.place(),t.style.visiblity="",e.config.disableTouchKeyboard&&e.inputField.blur()}this.active=!0,triggerDatepickerEvent(e,"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 e=this.element,t=e.classList,n=e.offsetParent,r=e.style,o=this.datepicker,i=o.config,a=o.inputField,s=this.element.getBoundingClientRect(),c=s.width,l=s.height,u=a.getBoundingClientRect(),f=u.left,p=u.top,h=u.right,g=u.bottom,v=u.width,b=u.height,w=i.orientation,_=w.x,k=w.y,E=f,A=p;if(n!==document.body&&n){var O=n.getBoundingClientRect();E-=O.left-n.scrollLeft,A-=O.top-n.scrollTop}else E+=window.scrollX,A+=window.scrollY;var S=findScrollParents(a),C=0,T=0,P=document.documentElement,L=P.clientWidth,x=P.clientHeight;if(S){var V=S.getBoundingClientRect();V.top>0&&(T=V.top),V.left>0&&(C=V.left),V.rightL?(_="right",LT&&g+l>x?"top":"bottom"),"top"===k?A-=l:A+=b,t.remove.apply(t,Picker_toConsumableArray(Object.values(mt))),t.add(mt[_],mt[k]),r.left=gt(E),r.top=gt(A)}},{key:"setViewSwitchLabel",value:function setViewSwitchLabel(e){this.controls.viewSwitch.textContent=e}},{key:"setPrevBtnDisabled",value:function setPrevBtnDisabled(e){this.controls.prevBtn.disabled=e}},{key:"setNextBtnDisabled",value:function setNextBtnDisabled(e){this.controls.nextBtn.disabled=e}},{key:"changeView",value:function changeView(e){var t=this.currentView,n=this.views[e];return n.id!==t.id&&(this.currentView=n,this._renderMethod="render",triggerDatepickerEvent(this.datepicker,"changeView"),this.main.replaceChild(n.element,t.element)),this}},{key:"changeFocus",value:function changeFocus(e){return this._renderMethod=setViewDate(this,e)?"render":"refreshFocus",this.views.forEach((function(e){e.updateFocus()})),this}},{key:"update",value:function update(){var e=computeResetViewDate(this.datepicker);return this._renderMethod=setViewDate(this,e)?"render":"refresh",this.views.forEach((function(e){e.updateFocus(),e.updateSelection()})),this}},{key:"render",value:function render(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e&&this._renderMethod||"render";delete this._renderMethod,this.currentView[t]()}}]),Picker}();function findNextAvailableOne(e,t,n,r,o,i){if(isInRange(e,o,i))return r(e)?findNextAvailableOne(t(e,n),t,n,r,o,i):e}function moveByArrowKey(e,t,n,r){var o,i,a=e.picker,s=a.currentView,c=s.step||1,l=a.viewDate;switch(s.id){case 0:l=r?addDays(l,7*n):t.ctrlKey||t.metaKey?addYears(l,n):addDays(l,n),o=addDays,i=function testFn(e){return s.disabled.includes(e)};break;case 1:l=addMonths(l,r?4*n:n),o=addMonths,i=function testFn(e){var t=new Date(e),n=s.year,r=s.disabled;return t.getFullYear()===n&&r.includes(t.getMonth())};break;default:l=addYears(l,n*(r?4:1)*c),o=addYears,i=function testFn(e){return s.disabled.includes(startOfYearPeriod(e,c))}}void 0!==(l=findNextAvailableOne(l,o,n<0?-c:c,i,s.minDate,s.maxDate))&&a.changeFocus(l).render()}function onKeydown(e,t){var n=t.key;if("Tab"!==n){var r=e.picker,o=r.currentView,i=o.id,a=o.isMinView;if(r.active){if(e.editMode)return void("Enter"===n?e.exitEditMode({update:!0,autohide:e.config.autohide}):"Escape"===n&&r.hide());if("ArrowLeft"===n)if(t.ctrlKey||t.metaKey)goToPrevOrNext(e,-1);else{if(t.shiftKey)return void e.enterEditMode();moveByArrowKey(e,t,-1,!1)}else if("ArrowRight"===n)if(t.ctrlKey||t.metaKey)goToPrevOrNext(e,1);else{if(t.shiftKey)return void e.enterEditMode();moveByArrowKey(e,t,1,!1)}else if("ArrowUp"===n)if(t.ctrlKey||t.metaKey)switchView(e);else{if(t.shiftKey)return void e.enterEditMode();moveByArrowKey(e,t,-1,!0)}else if("ArrowDown"===n){if(t.shiftKey&&!t.ctrlKey&&!t.metaKey)return void e.enterEditMode();moveByArrowKey(e,t,1,!0)}else{if("Enter"!==n)return void("Escape"===n?r.hide():"Backspace"!==n&&"Delete"!==n&&(1!==n.length||t.ctrlKey||t.metaKey)||e.enterEditMode());if(a)return void e.setDate(r.viewDate);r.changeView(i-1).render()}}else{if("ArrowDown"!==n)return void("Enter"===n?e.update():"Escape"===n&&r.show());r.show()}t.preventDefault()}else unfocus(e)}function onFocus(e){e.config.showOnFocus&&!e._showing&&e.show()}function onMousedown(e,t){var n=t.target;(e.picker.active||e.config.showOnClick)&&(n._active=isActiveElement(n),n._clicking=setTimeout((function(){delete n._active,delete n._clicking}),2e3))}function onClickInput(e,t){var n=t.target;n._clicking&&(clearTimeout(n._clicking),delete n._clicking,n._active&&e.enterEditMode(),delete n._active,e.config.showOnClick&&e.show())}function onPaste(e,t){t.clipboardData.types.includes("text/plain")&&e.enterEditMode()}function onClickOutside(e,t){var n=e.element,r=e.picker;if(r.active||isActiveElement(n)){var o=r.element;findElementInEventPath(t,(function(e){return e===n||e===o}))||unfocus(e)}}function Datepicker_typeof(e){return Datepicker_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Datepicker_typeof(e)}function Datepicker_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Datepicker_defineProperties(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=e.config,o=e.dates,i=e.rangeSideIndex;if(0===t.length)return n?[]:void 0;var a=t.reduce((function(e,t){var n=date_format_parseDate(t,r.format,r.locale);return void 0===n||!isInRange(n=regularizeDate(n,r.pickLevel,i),r.minDate,r.maxDate)||e.includes(n)||r.datesDisabled.includes(n)||!(r.pickLevel>0)&&r.daysOfWeekDisabled.includes(new Date(n).getDay())||e.push(n),e}),[]);return 0!==a.length?(r.multidate&&!n&&(a=a.reduce((function(e,t){return o.includes(t)||e.push(t),e}),o.filter((function(e){return!a.includes(e)})))),r.maxNumberOfDates&&a.length>r.maxNumberOfDates?a.slice(-1*r.maxNumberOfDates):a):void 0}function refreshUI(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e.config,o=e.picker,i=e.inputField;if(2&t){var a=o.active?r.pickLevel:r.startView;o.update().changeView(a).render(n)}1&t&&i&&(i.value=stringifyDates(e.dates,r))}function _setDate(e,t,n){var r=n.clear,o=n.render,i=n.autohide,a=n.revert;void 0===o&&(o=!0),o?void 0===i&&(i=e.config.autohide):i=!1;var s=processInputDates(e,t,r);(s||a)&&(s&&s.toString()!==e.dates.toString()?(e.dates=s,refreshUI(e,o?3:1),triggerDatepickerEvent(e,"changeDate")):refreshUI(e,1),i&&e.hide())}var bt=function(){function Datepicker(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;Datepicker_classCallCheck(this,Datepicker),e.datepicker=this,this.element=e;var r,o,i=this.config=Object.assign({buttonClass:t.buttonClass&&String(t.buttonClass)||"button",container:null,defaultViewDate:today(),maxDate:void 0,minDate:void 0},processOptions(it,this)),a=this.inline="INPUT"!==e.tagName;if(a?i.container=e:(t.container&&(i.container=t.container instanceof HTMLElement?t.container:document.querySelector(t.container)),(r=this.inputField=e).classList.add("datepicker-input")),n){var s=n.inputs.indexOf(r),c=n.datepickers;if(s<0||s>1||!Array.isArray(c))throw Error("Invalid rangepicker object.");c[s]=this,Object.defineProperty(this,"rangepicker",{get:function get(){return n}}),Object.defineProperty(this,"rangeSideIndex",{get:function get(){return s}})}this._options=t,Object.assign(i,processOptions(t,this)),a?(o=stringToArray(e.dataset.date,i.dateDelimiter),delete e.dataset.date):o=stringToArray(r.value,i.dateDelimiter),this.dates=[];var l=processInputDates(this,o);l&&l.length>0&&(this.dates=l),r&&(r.value=stringifyDates(this.dates,i));var u=this.picker=new vt(this);if(a)this.show();else{var f=onClickOutside.bind(null,this),p=[[r,"keydown",onKeydown.bind(null,this)],[r,"focus",onFocus.bind(null,this)],[r,"mousedown",onMousedown.bind(null,this)],[r,"click",onClickInput.bind(null,this)],[r,"paste",onPaste.bind(null,this)],[document,"mousedown",f],[document,"touchstart",f],[window,"resize",u.place.bind(u)]];registerListeners(this,p)}}return function Datepicker_createClass(e,t,n){return t&&Datepicker_defineProperties(e.prototype,t),n&&Datepicker_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(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(e){var t=this.picker,n=processOptions(e,this);Object.assign(this._options,e),Object.assign(this.config,n),t.setOptions(n),refreshUI(this,3)}},{key:"show",value:function show(){if(this.inputField){if(this.inputField.disabled)return;isActiveElement(this.inputField)||this.config.disableTouchKeyboard||(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}},{key:"hide",value:function hide(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}},{key:"destroy",value:function destroy(){return this.hide(),function unregisterListeners(e){var t=Qe.get(e);t&&(t.forEach((function(e){nt.call.apply(nt,event_toConsumableArray(e))})),Qe.delete(e))}(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}},{key:"getDate",value:function getDate(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=t?function(n){return date_format_formatDate(n,t,e.config.locale)}:function(e){return new Date(e)};return this.config.multidate?this.dates.map(n):this.dates.length>0?n(this.dates[0]):void 0}},{key:"setDate",value:function setDate(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline){var t=Object.assign(e||{},{clear:!0,render:!0}),n=stringToArray(this.inputField.value,this.config.dateDelimiter);_setDate(this,n,t)}}},{key:"refresh",value:function refresh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&"string"!==typeof e&&(t=e,e=void 0),refreshUI(this,"picker"===e?2:"input"===e?1:3,!t)}},{key:"enterEditMode",value:function enterEditMode(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit"))}},{key:"exitEditMode",value:function exitEditMode(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline&&this.editMode){var t=Object.assign({update:!1},e);delete this.editMode,this.inputField.classList.remove("in-edit"),t.update&&this.update(t)}}}],[{key:"formatDate",value:function formatDate(e,t,n){return date_format_formatDate(e,t,n&&ot[n]||ot.en)}},{key:"parseDate",value:function parseDate(e,t,n){return date_format_parseDate(e,t,n&&ot[n]||ot.en)}},{key:"locales",get:function get(){return ot}}]),Datepicker}(),wt=function init(){document.querySelectorAll(".js-datepicker").forEach((function(e,t){var n=new bt(e);e.ui=n}))};window.addEventListener("".concat(e.LODEDANDREADY),wt),window.addEventListener("".concat(e.AJAX),wt);var _t=__webpack_require__(641);!function(t){var n,r="main.online",o=document,i=o.body,a=o.querySelector('meta[name="ping"]'),s=!1,c=function UPDATE_ONLINE_STATUS(o){s||(s=!0,o?(i.classList.contains("is-offline")?(console.log("".concat(r,": back Online")),t.dispatchEvent(new Event(e.BACKONLINE))):(console.log("".concat(r,": Online")),t.dispatchEvent(new Event(e.ONLINE))),i.classList.add("is-online"),i.classList.remove("is-offline"),a&&!n&&(console.log("".concat(r,": SESSION_PING is active")),n=setInterval(u,3e5))):(console.log("".concat(r,": Offline")),i.classList.add("is-offline"),i.classList.remove("is-online"),clearInterval(n),n=null,t.dispatchEvent(new Event(e.OFFLINE))),s=!1)},l=!1,u=function SESSION_PING(){if(!l&&!i.classList.contains("is-offline")){var e=a.getAttribute("content");console.log("".concat(r,": session ping")),l=!0,_t.post(e,{}).then((function(e){l=!1,c(!0)})).catch((function(e){console.error(e),console.warn("".concat(r,": SESSION_PING failed")),l=!1,c(!1)}))}},f=function navigatorStateUpdate(){"undefined"!==typeof navigator.onLine&&(navigator.onLine?c(!0):c(!1))};t.addEventListener("".concat(e.OFFLINE),(function(){c(!1)})),t.addEventListener("".concat(e.ONLINE),(function(){c(!0)})),t.addEventListener("".concat(e.LOADED),f),t.addEventListener("".concat(e.AJAX),f)}(window);function image_defineProperties(e,t){for(var n=0;n=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function forEachMethodNoData(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function forEachMethodWithData(e){c.headers[e]=r.merge(s)})),e.exports=c},146:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},106:function(e){e.exports={version:"0.26.1"}},770:function(e){"use strict";e.exports=function bind(e,t){return function wrap(){for(var n=new Array(arguments.length),r=0;r=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},175:function(e){"use strict";e.exports=function spread(e){return function wrap(t){return e.apply(null,t)}}},667:function(e,t,n){"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var r=n(106).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function validator(n){return _typeof(n)===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function transitional(e,t,n){function formatMessage(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,o){if(!1===e)throw new Error(formatMessage(r," has been removed"+(t?" in "+t:"")));return t&&!i[r]&&(i[r]=!0,console.warn(formatMessage(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}},e.exports={assertOptions:function assertOptions(e,t,n){if("object"!==_typeof(e))throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],c=void 0===s||a(s,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},780:function(e,t,n){"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var r=n(770),o=Object.prototype.toString;function isArray(e){return Array.isArray(e)}function isUndefined(e){return"undefined"===typeof e}function isArrayBuffer(e){return"[object ArrayBuffer]"===o.call(e)}function isObject(e){return null!==e&&"object"===_typeof(e)}function isPlainObject(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function isFunction(e){return"[object Function]"===o.call(e)}function forEach(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==_typeof(e)&&(e=[e]),isArray(e))for(var n=0,r=e.length;n0||navigator.msMaxTouchPoints>0||t.matchMedia("(hover: none)").matches,"init"),i.addEventListener("touchend",(function(e){var t=!1;"click"!==e.type&&(t=!0),s(t,"click-touchend")})),i.addEventListener("click",(function(e){var t=!1;"click"!==e.type&&(t=!0),s(t,"click-touchend")}))}(window),{ENVS:["xs","sm","md","lg","xl","xxl","xxxl"]});function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function _unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(e,t)}(e)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nn.innerHeight?(o.classList.add("landscape"),o.classList.remove("portrait")):(u=!1,o.classList.add("portrait"),o.classList.remove("landscape")),console.log("".concat("_main.css-screen-size",": screen size detected ").concat(s," | landscape ").concat(u)),o.removeChild(i),s};n.addEventListener("".concat(e.LOADED),i),n.addEventListener("".concat(e.RESIZE),i)}(window);function _defineProperties(e,t){for(var n=0;n"),"color:yellow;font-size:10px"),console.info("%cENV: ".concat("production"),"color:green;font-size:10px"),console.groupCollapsed("Events"),Object.keys(e).forEach((function(t){console.info("".concat(t,": ").concat(e[t]))})),console.groupEnd("Events"),console.groupCollapsed("Consts"),Object.keys(t).forEach((function(e){console.info("".concat(e,": ").concat(t[e]))})),console.groupEnd("Events"),console.groupCollapsed("Init"),console.time("init");var o=function(){function MainUI(){!function main_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,MainUI)}return function main_createClass(e,t,n){return t&&main_defineProperties(e.prototype,t),n&&main_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(MainUI,null,[{key:"init",value:function init(){n.history.replaceState({landing:n.location.href},document.title,n.location.href),this.loaded()}},{key:"loaded",value:function loaded(){console.log("".concat("_main",": loaded"))}}]),MainUI}(),a=function documentInit(){o.init(),r.classList.add("loaded"),i.hide(),console.groupEnd("init"),console.timeEnd("init"),n.addEventListener("".concat(e.LOADED),(function(t){n.dispatchEvent(new Event(e.LODEDANDREADY))}))};"loading"===document.readyState?document.addEventListener("".concat(e.DOMLOADED),a):a(),n.addEventListener("".concat(e.AJAX),(function(){o.loaded()})),n.MainUI=o}(window);var a="ajax-load",s="load-ready";function window_toConsumableArray(e){return function window_arrayWithoutHoles(e){if(Array.isArray(e))return window_arrayLikeToArray(e)}(e)||function window_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function window_unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return window_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return window_arrayLikeToArray(e,t)}(e)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{shown:!1},n=arguments.length>1?arguments[1]:void 0;window_classCallCheck(this,MetaWindow),_defineProperty(this,"state",{content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1,collections:[],current:null,target:null,extraClass:null}),_defineProperty(this,"show",(function(){var t=e;console.log("".concat(t.name,": show")),t.setState({shown:!0}),c.dispatchEvent(new Event("{ui.name}.show"))})),_defineProperty(this,"hide",(function(){var t=e;console.log("".concat(t.name,": hide")),t.setState({shown:!1}),c.dispatchEvent(new Event("{ui.name}.hide"))})),_defineProperty(this,"next",(function(){var t=e,n=t.state.current.getAttribute("data-gallery"),r=t._currIndex();r0?r--:r=t.state.collections[n].length-1,t.state.collections[n][r].click(),console.log("".concat(t.name,": prev")),c.dispatchEvent(new Event("{ui.name}.prev"))})),_defineProperty(this,"reset",(function(){e.setState({content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1})})),_defineProperty(this,"load",(function(t){var n=e,r=n.axios;n.reset(),n.setState({loading:!0}),n.show(),r.get(t,{responseType:"arraybuffer"}).then((function(e){console.log("".concat(n.name,": response content-type: ").concat(e.headers["content-type"]));switch(e.headers["content-type"]){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":n.setContent(''),"meta-".concat(n.name,"--image"));break;case"application/json":case"application/ld+json":case"application/json; charset=UTF-8":n.setContent("".concat((!1).Content),["meta-".concat(n.name,"--text"),"meta-".concat(n.name,"--html"),"meta-".concat(n.name,"--json")]);break;case"video/mp4":n.setContent(''),["meta-".concat(n.name,"--image"),"meta-".concat(n.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":n.setContent(n._abToString(e.data),["meta-".concat(n.name,"--text"),"meta-".concat(n.name,"--html"),"meta-".concat(n.name,"--pajax")]);break;default:console.warn("".concat(n.name,": Unknown response content-type!"))}c.dispatchEvent(new Event("{ui.name}.loaded"))})).catch((function(e){console.error(e);var t="";if(e.response)switch(e.response.status){case 404:t="Not Found.";break;case 500:t="Server issue, please try again latter.";break;default:t="Something went wrong."}else e.request?t="No response received":console.warn("Error",e.message);n.setState({error:t}),c.dispatchEvent(new Event("{ui.name}.error"))})).then((function(){n.setState({loading:!1}),setTimeout((function(){n.state.current.classList.remove("loading")}),3e3)}))})),_defineProperty(this,"_currIndex",(function(){var t=e,n=t.state.current,r=n.getAttribute("data-gallery");return t.state.collections[r].indexOf(n)})),_defineProperty(this,"embed",(function(t){var n=e;console.log("".concat(n.name,": embed")),n.reset(),n.setState({embed:t,loading:!1,type:["meta-".concat(n.name,"--embed"),"meta-".concat(n.name,"--video")]}),n.show()})),_defineProperty(this,"setCaption",(function(t){var n=e;console.log("".concat(n.name,": setCaption")),n.state.caption=t})),_defineProperty(this,"addExtraClass",(function(t){var n=e;t.length&&(console.log("".concat(n.name,": addExtraClass(").concat(t,")")),n.state.extraClass=t)})),_defineProperty(this,"getCaption",(function(){return e.state.caption})),_defineProperty(this,"_abToString",(function(e){return String.fromCharCode.apply(null,new Uint8Array(e))})),_defineProperty(this,"_imageEncode",(function(e){new Uint8Array(e);return btoa([].reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),""))})),_defineProperty(this,"setContent",(function(t,n){var r=e;console.log("".concat(r.name,": setContent"));var o=n||["meta-".concat(r.name,"--html"),"meta-".concat(r.name,"--text")];Array.isArray(o)||(o=n.split(" ")),r.setState({content:t,type:o})})),_defineProperty(this,"getHtml",(function(){var t=e;if(t.state.embed){var n=__webpack_require__(758)(t.state.embed);t.state.content='')}return t.state.content}));var r=this;switch(r.name=r.constructor.name,console.log("".concat(r.name,": init")),r.axios=l,r.setState(t),n){case"show":case"hide":r.hide()}c.dispatchEvent(new Event("{ui.name}.init"))}return function window_createClass(e,t,n){return t&&window_defineProperties(e.prototype,t),n&&window_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(MetaWindow,[{key:"init",value:function init(){var e=this;console.log("MetaWindow: [links] init"),document.querySelectorAll('[data-toggle="lightbox"],[data-gallery="${gallery}"]').forEach((function(t){var n=t.getAttribute("data-gallery");n&&(e.state.collections[n]=[],document.querySelectorAll('[data-toggle="lightbox"][data-gallery="'.concat(n,'"]')).forEach((function(t){e.state.collections[n].push(t)}))),t.addEventListener("click",(function(t){t.preventDefault(),console.log("MetaWindow: [link] click");var n=t.currentTarget,r=n.getAttribute("href")||n.getAttribute("data-href"),o=n.getAttribute("data-embed");n.classList.add("loading"),e.state.current=n,o?e.embed(r):e.load(r);var i=n.getAttribute("data-title");i&&e.setCaption(i),e.addExtraClass(n.getAttribute("data-lightbox-class"))}))}))}},{key:"setState",value:function setState(e){var t=this;t.state=Object.assign({},t.state,e),t.render()}},{key:"render",value:function render(){var e,t=this,n=t.name,r=t.state.current;t.state.target.innerHTML="";var o=document.createElement("div");o.classList.add("meta-".concat(n)),(e=o.classList).add.apply(e,window_toConsumableArray(t.state.type)),t.state.target.append(o);var i=document.createElement("div");i.classList.add("meta-".concat(n,"-overlay")),t.state.shown&&i.classList.add("meta-".concat(n,"-overlay--open")),t.state.loading&&i.classList.add("meta-".concat(n,"-overlay--loading")),t.state.error&&i.classList.add("meta-".concat(n,"-overlay--error")),o.append(i);var a=document.createElement("div");a.classList.add("meta-content"),i.append(a);var s=document.createElement("button");if(s.classList.add("meta-nav","meta-close","a"),s.innerHTML=' Close',s.addEventListener("click",(function(e){e.preventDefault(),t.hide()})),a.append(s),r){var c=r.getAttribute("data-gallery");if(c&&t.state.collections[c].length>1){var l=document.createElement("nav");l.classList.add("meta-navs");var u=document.createElement("button");u.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__prev","a"),u.innerHTML=' Previous',u.addEventListener("click",(function(e){e.preventDefault(),t.prev()})),l.append(u);var f=document.createElement("button");f.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__next","a"),f.innerHTML=' Next',f.addEventListener("click",(function(e){e.preventDefault(),t.next()})),l.append(f),a.append(l)}}var p=document.createElement("section");if(p.classList.add("meta-wrap","typography"),t.state.extraClass&&p.classList.add(t.state.extraClass),p.innerHTML=t.getHtml(),a.append(p),t.state.error){var h=document.createElement("div");h.classList.add("meta-error"),h.innerHTML=t.state.error,a.append(h)}else if(t.state.caption){var g=document.createElement("div");g.classList.add("meta-caption"),g.innerHTML=t.getCaption(),a.append(g)}return"undefined"!==typeof window.FontAwesome&&window.FontAwesome.dom.i2svg(),t}}]),MetaWindow}(),f=u,p=document.getElementById("MetaLightboxApp");p||console.log("MetaWindow: missing container #MetaLightboxApp");var h=function init(){var e=window.MetaWindow;"undefined"===typeof e&&(e=new f({target:p}),window.MetaWindow=e),e.init()};window.addEventListener("".concat(s),h),window.addEventListener("".concat(a),h),window.addEventListener("MetaWindow.initLinks",h);function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var g="transitionend",v=function getSelector(e){var t=e.getAttribute("data-bs-target");if(!t||"#"===t){var n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n="#".concat(n.split("#")[1])),t=n&&"#"!==n?n.trim():null}return t},b=function getSelectorFromElement(e){var t=v(e);return t&&document.querySelector(t)?t:null},w=function getElementFromSelector(e){var t=v(e);return t?document.querySelector(t):null},_=function getTransitionDurationFromElement(e){if(!e)return 0;var t=window.getComputedStyle(e),n=t.transitionDuration,r=t.transitionDelay,o=Number.parseFloat(n),i=Number.parseFloat(r);return o||i?(n=n.split(",")[0],r=r.split(",")[0],1e3*(Number.parseFloat(n)+Number.parseFloat(r))):0},k=function triggerTransitionEnd(e){e.dispatchEvent(new Event(g))},E=function isElement(e){return!(!e||"object"!==_typeof(e))&&("undefined"!==typeof e.jquery&&(e=e[0]),"undefined"!==typeof e.nodeType)},A=function getElement(e){return E(e)?e.jquery?e[0]:e:"string"===typeof e&&e.length>0?document.querySelector(e):null},O=function typeCheckConfig(e,t,n){Object.keys(n).forEach((function(r){var o=n[r],i=t[r],a=i&&E(i)?"element":function toType(e){return null===e||void 0===e?"".concat(e):{}.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase()}(i);if(!new RegExp(o).test(a))throw new TypeError("".concat(e.toUpperCase(),': Option "').concat(r,'" provided type "').concat(a,'" but expected type "').concat(o,'".'))}))},S=function isVisible(e){return!(!E(e)||0===e.getClientRects().length)&&"visible"===getComputedStyle(e).getPropertyValue("visibility")},C=function reflow(e){e.offsetHeight},T=function getjQuery(){var jQuery=window.jQuery;return jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?jQuery:null},P=[],L=function isRTL(){return"rtl"===document.documentElement.dir},x=function defineJQueryPlugin(e){!function onDOMContentLoaded(e){"loading"===document.readyState?(P.length||document.addEventListener("DOMContentLoaded",(function(){P.forEach((function(e){return e()}))})),P.push(e)):e()}((function(){var $=T();if($){var t=e.NAME,n=$.fn[t];$.fn[t]=e.jQueryInterface,$.fn[t].Constructor=e,$.fn[t].noConflict=function(){return $.fn[t]=n,e.jQueryInterface}}}))},V=function execute(e){"function"===typeof e&&e()},I=function executeAfterTransition(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(n){var r=5,o=_(t)+r,i=!1,a=function handler(n){n.target===t&&(i=!0,t.removeEventListener(g,handler),V(e))};t.addEventListener(g,a),setTimeout((function(){i||k(t)}),o)}else V(e)},j=new Map,N=function set(e,t,n){j.has(e)||j.set(e,new Map);var r=j.get(e);r.has(t)||0===r.size?r.set(t,n):console.error("Bootstrap doesn't allow more than one instance per element. Bound instance: ".concat(Array.from(r.keys())[0],"."))},R=function get(e,t){return j.has(e)&&j.get(e).get(t)||null},B=function remove(e,t){if(j.has(e)){var n=j.get(e);n.delete(t),0===n.size&&j.delete(e)}};function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function event_handler_unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return event_handler_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return event_handler_arrayLikeToArray(e,t)}(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function event_handler_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:null,r=Object.keys(e),o=0,i=r.length;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return(t=[]).concat.apply(t,selector_engine_toConsumableArray(Element.prototype.querySelectorAll.call(n,e)))},findOne:function findOne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return Element.prototype.querySelector.call(t,e)},children:function children(e,t){var n;return(n=[]).concat.apply(n,selector_engine_toConsumableArray(e.children)).filter((function(e){return e.matches(t)}))},parents:function parents(e,t){for(var parents=[],n=e.parentNode;n&&n.nodeType===Node.ELEMENT_NODE&&3!==n.nodeType;)n.matches(t)&&parents.push(n),n=n.parentNode;return parents},prev:function prev(e,t){for(var n=e.previousElementSibling;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next:function next(e,t){for(var next=e.nextElementSibling;next;){if(next.matches(t))return[next];next=next.nextElementSibling}return[]},focusableChildren:function focusableChildren(e){var t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((function(e){return"".concat(e,':not([tabindex^="-"])')})).join(", ");return this.find(t,e).filter((function(e){return!function isDisabled(e){return!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||("undefined"!==typeof e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))}(e)&&S(e)}))}},Q=G;function base_component_typeof(e){return base_component_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},base_component_typeof(e)}function base_component_defineProperties(e,t){for(var n=0;n2&&void 0!==arguments[2])||arguments[2];I(e,t,n)}}],[{key:"getInstance",value:function getInstance(e){return R(A(e),this.DATA_KEY)}},{key:"getOrCreateInstance",value:function getOrCreateInstance(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getInstance(e)||new this(e,"object"===base_component_typeof(t)?t:null)}},{key:"VERSION",get:function get(){return"5.1.3"}},{key:"NAME",get:function get(){throw new Error('You have to implement the static method "NAME", for each component!')}},{key:"DATA_KEY",get:function get(){return"bs.".concat(this.NAME)}},{key:"EVENT_KEY",get:function get(){return".".concat(this.DATA_KEY)}}]),BaseComponent}(),te=ee;function collapse_typeof(e){return collapse_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},collapse_typeof(e)}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:this._element;return e.classList.contains(fe)}},{key:"_getConfig",value:function _getConfig(e){return(e=_objectSpread(_objectSpread(_objectSpread({},ie),Z.getDataAttributes(this._element)),e)).toggle=Boolean(e.toggle),e.parent=A(e.parent),O(ne,e,ae),e}},{key:"_getDimension",value:function _getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}},{key:"_initializeChildren",value:function _initializeChildren(){var e=this;if(this._config.parent){var t=Q.find(me,this._config.parent);Q.find(ge,this._config.parent).filter((function(e){return!t.includes(e)})).forEach((function(t){var n=w(t);n&&e._addAriaAndCollapsedClass([t],e._isShown(n))}))}}},{key:"_addAriaAndCollapsedClass",value:function _addAriaAndCollapsedClass(e,t){e.length&&e.forEach((function(e){t?e.classList.remove(ye):e.classList.add(ye),e.setAttribute("aria-expanded",t)}))}}],[{key:"Default",get:function get(){return ie}},{key:"NAME",get:function get(){return ne}},{key:"jQueryInterface",value:function jQueryInterface(e){return this.each((function(){var t={};"string"===typeof e&&/show|hide/.test(e)&&(t.toggle=!1);var n=Collapse.getOrCreateInstance(this,t);if("string"===typeof e){if("undefined"===typeof n[e])throw new TypeError('No method named "'.concat(e,'"'));n[e]()}}))}}]),Collapse}(te);J.on(document,de,ge,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();var t=b(this);Q.find(t).forEach((function(e){ve.getOrCreateInstance(e,{toggle:!1}).toggle()}))})),x(ve);var be;!function(t){var n="js-dropdown",r=function HideAll(){document.querySelectorAll(".dropdown-menu").forEach((function(e,t){e.classList.remove("show")}))},o=function Show(e){e.currentTarget.querySelector(".dropdown-menu").classList.add("show")},i=function Hide(e){e.currentTarget.querySelector(".dropdown-menu").classList.remove("show")},a=function init(){console.log("".concat(n,": init"));var e=document.querySelectorAll(".".concat(n,',[data-bs-toggle="dropdown"]')),t=document.querySelectorAll('[data-bs-toggle="hover"]'),a=function attachClickEvents(e){e.addEventListener("click",(function(e){e.preventDefault(),function Toggle(e){r(),e.querySelector(".dropdown-menu").classList.toggle("show")}(e.currentTarget.closest(".dropdown"))})),e.classList.add("".concat(n,"-active"))};document.addEventListener("click",(function(e){var t=!1,n=e.path||e.composedPath&&e.composedPath();n||console.warn("Browser does not provide event path to hide dropdowns on outside click"),n.forEach((function(e,n){t||(e===document&&r(),e.classList&&e.classList.contains("dropdown-toggle")&&(t=!0))}))})),t.forEach((function(e,t){!function attachHoverEvents(e){e.addEventListener("mouseover",o,!1),e.addEventListener("mouseout",i,!1),e.classList.add("".concat(n,"-active"))}(e.closest(".dropdown"))})),e.forEach((function(e,t){a(e)}))};t.addEventListener("".concat(e.LODEDANDREADY),a),t.addEventListener("".concat(e.AJAX),a)}(window);function carousel_typeof(e){return carousel_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},carousel_typeof(e)}function carousel_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function carousel_objectSpread(e){for(var t=1;t0,r._pointerEvent=Boolean(window.PointerEvent),r._addEventListeners(),r}return function carousel_createClass(e,t,n){return t&&carousel_defineProperties(e.prototype,t),n&&carousel_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(Carousel,[{key:"next",value:function next(){this._slide(Ae)}},{key:"nextWhenVisible",value:function nextWhenVisible(){!document.hidden&&S(this._element)&&this.next()}},{key:"prev",value:function prev(){this._slide(Oe)}},{key:"pause",value:function pause(e){e||(this._isPaused=!0),Q.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(k(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}},{key:"cycle",value:function cycle(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}},{key:"to",value:function to(e){var t=this;this._activeElement=Q.findOne(We,this._element);var n=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)J.one(this._element,Le,(function(){return t.to(e)}));else{if(n===e)return this.pause(),void this.cycle();var r=e>n?Ae:Oe;this._slide(r,this._items[e])}}},{key:"_getConfig",value:function _getConfig(e){return e=carousel_objectSpread(carousel_objectSpread(carousel_objectSpread({},Ee),Z.getDataAttributes(this._element)),"object"===carousel_typeof(e)?e:{}),O(we,e,De),e}},{key:"_handleSwipe",value:function _handleSwipe(){var e=Math.abs(this.touchDeltaX);if(!(e<=40)){var t=e/this.touchDeltaX;this.touchDeltaX=0,t&&this._slide(t>0?Ce:Se)}}},{key:"_addEventListeners",value:function _addEventListeners(){var e=this;this._config.keyboard&&J.on(this._element,xe,(function(t){return e._keydown(t)})),"hover"===this._config.pause&&(J.on(this._element,Ve,(function(t){return e.pause(t)})),J.on(this._element,Me,(function(t){return e.cycle(t)}))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}},{key:"_addTouchEventListeners",value:function _addTouchEventListeners(){var e=this,t=function hasPointerPenTouch(t){return e._pointerEvent&&("pen"===t.pointerType||"touch"===t.pointerType)},n=function start(n){t(n)?e.touchStartX=n.clientX:e._pointerEvent||(e.touchStartX=n.touches[0].clientX)},r=function end(n){t(n)&&(e.touchDeltaX=n.clientX-e.touchStartX),e._handleSwipe(),"hover"===e._config.pause&&(e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout((function(t){return e.cycle(t)}),500+e._config.interval))};Q.find(".carousel-item img",this._element).forEach((function(e){J.on(e,Fe,(function(e){return e.preventDefault()}))})),this._pointerEvent?(J.on(this._element,Re,(function(e){return n(e)})),J.on(this._element,Be,(function(e){return r(e)})),this._element.classList.add("pointer-event")):(J.on(this._element,Ie,(function(e){return n(e)})),J.on(this._element,je,(function(t){return function move(t){e.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-e.touchStartX}(t)})),J.on(this._element,Ne,(function(e){return r(e)})))}},{key:"_keydown",value:function _keydown(e){if(!/input|textarea/i.test(e.target.tagName)){var t=Te[e.key];t&&(e.preventDefault(),this._slide(t))}}},{key:"_getItemIndex",value:function _getItemIndex(e){return this._items=e&&e.parentNode?Q.find(".carousel-item",e.parentNode):[],this._items.indexOf(e)}},{key:"_getItemByOrder",value:function _getItemByOrder(e,t){var n=e===Ae;return function getNextActiveElement(e,t,n,r){var o=e.indexOf(t);if(-1===o)return e[!n&&r?e.length-1:0];var i=e.length;return o+=n?1:-1,r&&(o=(o+i)%i),e[Math.max(0,Math.min(o,i-1))]}(this._items,t,n,this._config.wrap)}},{key:"_triggerSlideEvent",value:function _triggerSlideEvent(e,t){var n=this._getItemIndex(e),r=this._getItemIndex(Q.findOne(We,this._element));return J.trigger(this._element,Pe,{relatedTarget:e,direction:t,from:r,to:n})}},{key:"_setActiveIndicatorElement",value:function _setActiveIndicatorElement(e){if(this._indicatorsElement){var t=Q.findOne(".active",this._indicatorsElement);t.classList.remove(He),t.removeAttribute("aria-current");for(var n=Q.find("[data-bs-target]",this._indicatorsElement),r=0;r1?t-1:0),r=1;r=t)&&(void 0===n||e<=n)}function limitToRange(e,t,n){return en?n:e}function createTagRepeat(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=Object.keys(n).reduce((function(e,t){var o=n[t];return"function"===typeof o&&(o=o(r)),"".concat(e," ").concat(t,'="').concat(o,'"')}),e);o+="<".concat(i,">");var a=r+1;return a\s+/g,">").replace(/\s+2&&void 0!==arguments[2]?arguments[2]:0,r=new Date(e).getDay();return addDays(e,dayDiff(t,n)-dayDiff(r,n))}function startOfYearPeriod(e,t){var n=new Date(e).getFullYear();return Math.floor(n/t)*t}function regularizeDate(e,t,n){if(1!==t&&2!==t)return e;var r=new Date(e);return 1===t?n?r.setMonth(r.getMonth()+1,0):r.setDate(1):n?r.setFullYear(r.getFullYear()+1,0,0):r.setMonth(0,1),r.setHours(0,0,0,0)}var Ke=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,Xe=/[\s!-/:-@[-`{-~\u5e74\u6708\u65e5]+/,Je={},$e={y:function y(e,t){return new Date(e).setFullYear(parseInt(t,10))},m:function m(e,t,n){var r=new Date(e),o=parseInt(t,10)-1;if(isNaN(o)){if(!t)return NaN;var i=t.toLowerCase(),a=function compareNames(e){return e.toLowerCase().startsWith(i)};if((o=n.monthsShort.findIndex(a))<0&&(o=n.months.findIndex(a)),o<0)return NaN}return r.setMonth(o),r.getMonth()!==normalizeMonth(o)?r.setDate(0):r.getTime()},d:function d(e,t){return new Date(e).setDate(parseInt(t,10))}},Ze={d:function d(e){return e.getDate()},dd:function dd(e){return padZero(e.getDate(),2)},D:function D(e,t){return t.daysShort[e.getDay()]},DD:function DD(e,t){return t.days[e.getDay()]},m:function m(e){return e.getMonth()+1},mm:function mm(e){return padZero(e.getMonth()+1,2)},M:function M(e,t){return t.monthsShort[e.getMonth()]},MM:function MM(e,t){return t.months[e.getMonth()]},y:function y(e){return e.getFullYear()},yy:function yy(e){return padZero(e.getFullYear(),2).slice(-2)},yyyy:function yyyy(e){return padZero(e.getFullYear(),4)}};function normalizeMonth(e){return e>-1?e%12:normalizeMonth(e+12)}function padZero(e,t){return e.toString().padStart(t,"0")}function parseFormatString(e){if("string"!==typeof e)throw new Error("Invalid date format.");if(e in Je)return Je[e];var t=e.split(Ke),n=e.match(new RegExp(Ke,"g"));if(0===t.length||!n)throw new Error("Invalid date format.");var r=n.map((function(e){return Ze[e]})),o=Object.keys($e).reduce((function(e,t){return n.find((function(e){return"D"!==e[0]&&e[0].toLowerCase()===t}))&&e.push(t),e}),[]);return Je[e]={parser:function parser(e,t){var r=e.split(Xe).reduce((function(e,t,r){if(t.length>0&&n[r]){var o=n[r][0];"M"===o?e.m=t:"D"!==o&&(e[o]=t)}return e}),{});return o.reduce((function(e,n){var o=$e[n](e,r[n],t);return isNaN(o)?e:o}),today())},formatter:function formatter(e,n){return r.reduce((function(r,o,i){return r+"".concat(t[i]).concat(o(e,n))}),"")+lastItemOf(t)}}}function date_format_parseDate(e,t,n){if(e instanceof Date||"number"===typeof e){var r=stripTime(e);return isNaN(r)?void 0:r}if(e){if("today"===e)return today();if(t&&t.toValue){var o=t.toValue(e,t,n);return isNaN(o)?void 0:stripTime(o)}return parseFormatString(t).parser(e,n)}}function date_format_formatDate(e,t,n){if(isNaN(e)||!e&&0!==e)return"";var r="number"===typeof e?new Date(e):e;return t.toDisplay?t.toDisplay(r,t,n):parseFormatString(t).formatter(r,n)}var Ge=document.createRange();function parseHTML(e){return Ge.createContextualFragment(e)}function getParent(e){return e.parentElement||(e.parentNode instanceof ShadowRoot?e.parentNode.host:void 0)}function isActiveElement(e){return e.getRootNode().activeElement===e}function hideElement(e){"none"!==e.style.display&&(e.style.display&&(e.dataset.styleDisplay=e.style.display),e.style.display="none")}function showElement(e){"none"===e.style.display&&(e.dataset.styleDisplay?(e.style.display=e.dataset.styleDisplay,delete e.dataset.styleDisplay):e.style.display="")}function emptyChildNodes(e){e.firstChild&&(e.removeChild(e.firstChild),emptyChildNodes(e))}function _toArray(e){return function event_arrayWithHoles(e){if(Array.isArray(e))return e}(e)||event_iterableToArray(e)||event_unsupportedIterableToArray(e)||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(e){return function event_arrayWithoutHoles(e){if(Array.isArray(e))return event_arrayLikeToArray(e)}(e)||event_iterableToArray(e)||event_unsupportedIterableToArray(e)||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(e,t){if(e){if("string"===typeof e)return event_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?event_arrayLikeToArray(e,t):void 0}}function event_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function event_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:[];return n.push(e),e.parentNode?t=e.parentNode:e.host?t=e.host:e.defaultView&&(t=e.defaultView),t?getComposedPath(t,n):n};Event.prototype.composedPath=function(){return rt(this.target)}}function findFromPath(e,t,n){var r=_toArray(e),o=r[0],i=r.slice(1);return t(o)?o:o!==n&&"HTML"!==o.tagName&&0!==i.length?findFromPath(i,t,n):void 0}function findElementInEventPath(e,t){var n="function"===typeof t?t:function(e){return e instanceof Element&&e.matches(t)};return findFromPath(e.composedPath(),n,e.currentTarget)}var ot={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"}},it={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:"\xbb",orientation:"auto",pickLevel:0,prevArrow:"\xab",showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0},at=it.language,st=it.format,ct=it.weekStart;function sanitizeDOW(e,t){return e.length<6&&t>=0&&t<7?pushUnique(e,t):e}function calcEndOfWeek(e){return(e+6)%7}function validateDate(e,t,n,r){var o=date_format_parseDate(e,t,n);return void 0!==o?o:r}function validateViewId(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=parseInt(e,10);return r>=0&&r<=n?r:t}function processOptions(e,t){var n,r=Object.assign({},e),o={},i=t.constructor.locales,a=t.rangeSideIndex,s=t.config||{},c=s.format,l=s.language,u=s.locale,f=s.maxDate,p=s.maxView,h=s.minDate,g=s.pickLevel,v=s.startView,b=s.weekStart;if(r.language&&(r.language!==l&&(i[r.language]?n=r.language:void 0===i[n=r.language.split("-")[0]]&&(n=!1)),delete r.language,n)){l=o.language=n;var w=u||i[at];u=Object.assign({format:st,weekStart:ct},i[at]),l!==at&&Object.assign(u,i[l]),o.locale=u,c===w.format&&(c=o.format=u.format),b===w.weekStart&&(b=o.weekStart=u.weekStart,o.weekEnd=calcEndOfWeek(u.weekStart))}if(r.format){var _="function"===typeof r.format.toDisplay,k="function"===typeof r.format.toValue,E=Ke.test(r.format);(_&&k||E)&&(c=o.format=r.format),delete r.format}var A=g;void 0!==r.pickLevel&&(A=validateViewId(r.pickLevel,2),delete r.pickLevel),A!==g&&(A>g&&(void 0===r.minDate&&(r.minDate=h),void 0===r.maxDate&&(r.maxDate=f)),r.datesDisabled||(r.datesDisabled=[]),g=o.pickLevel=A);var O=h,S=f;if(void 0!==r.minDate){var C=dateValue(0,0,1);(O=null===r.minDate?C:validateDate(r.minDate,c,u,O))!==C&&(O=regularizeDate(O,g,!1)),delete r.minDate}if(void 0!==r.maxDate&&(void 0!==(S=null===r.maxDate?void 0:validateDate(r.maxDate,c,u,S))&&(S=regularizeDate(S,g,!0)),delete r.maxDate),S=0&&(o.maxNumberOfDates=L,o.multidate=1!==L),delete r.maxNumberOfDates}r.dateDelimiter&&(o.dateDelimiter=String(r.dateDelimiter),delete r.dateDelimiter);var x=p;void 0!==r.maxView&&(x=validateViewId(r.maxView,p),delete r.maxView),(x=g>x?g:x)!==p&&(p=o.maxView=x);var V=v;if(void 0!==r.startView&&(V=validateViewId(r.startView,V),delete r.startView),Vp&&(V=p),V!==v&&(o.startView=V),r.prevArrow){var I=parseHTML(r.prevArrow);I.childNodes.length>0&&(o.prevArrow=I.childNodes),delete r.prevArrow}if(r.nextArrow){var j=parseHTML(r.nextArrow);j.childNodes.length>0&&(o.nextArrow=j.childNodes),delete r.nextArrow}if(void 0!==r.disableTouchKeyboard&&(o.disableTouchKeyboard="ontouchstart"in document&&!!r.disableTouchKeyboard,delete r.disableTouchKeyboard),r.orientation){var N=r.orientation.toLowerCase().split(/\s+/g);o.orientation={x:N.find((function(e){return"left"===e||"right"===e}))||"auto",y:N.find((function(e){return"top"===e||"bottom"===e}))||"auto"},delete r.orientation}if(void 0!==r.todayBtnMode){switch(r.todayBtnMode){case 0:case 1:o.todayBtnMode=r.todayBtnMode}delete r.todayBtnMode}return Object.keys(r).forEach((function(e){void 0!==r[e]&&hasProperty(it,e)&&(o[e]=r[e])})),o}var lt=optimizeTemplateHTML('
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n \n
\n
'),ut=optimizeTemplateHTML('
\n
'.concat(createTagRepeat("span",7,{class:"dow"}),'
\n
').concat(createTagRepeat("span",42),"
\n
")),dt=optimizeTemplateHTML('
\n
\n
'.concat(createTagRepeat("span",6,{class:"week"}),"
\n
"));function View_toConsumableArray(e){return function View_arrayWithoutHoles(e){if(Array.isArray(e))return View_arrayLikeToArray(e)}(e)||function View_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function View_unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return View_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return View_arrayLikeToArray(e,t)}(e)||function View_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function View_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}return function View_createClass(e,t,n){return t&&View_defineProperties(e.prototype,t),n&&View_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(View,[{key:"init",value:function init(e){void 0!==e.pickLevel&&(this.isMinView=this.id===e.pickLevel),this.setOptions(e),this.updateFocus(),this.updateSelection()}},{key:"performBeforeHook",value:function performBeforeHook(e,t,n){var r=this.beforeShow(new Date(n));switch(View_typeof(r)){case"boolean":r={enabled:r};break;case"string":r={classes:r}}if(r){if(!1===r.enabled&&(e.classList.add("disabled"),pushUnique(this.disabled,t)),r.classes){var o,i=r.classes.split(/\s+/);(o=e.classList).add.apply(o,View_toConsumableArray(i)),i.includes("disabled")&&pushUnique(this.disabled,t)}r.content&&function replaceChildNodes(e,t){emptyChildNodes(e),t instanceof DocumentFragment?e.appendChild(t):"string"===typeof t?e.appendChild(parseHTML(t)):"function"===typeof t.forEach&&t.forEach((function(t){e.appendChild(t)}))}(e,r.content)}}}]),View}();function DaysView_typeof(e){return DaysView_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},DaysView_typeof(e)}function DaysView_slicedToArray(e,t){return function DaysView_arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function DaysView_iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||DaysView_unsupportedIterableToArray(e,t)||function DaysView_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DaysView_toConsumableArray(e){return function DaysView_arrayWithoutHoles(e){if(Array.isArray(e))return DaysView_arrayLikeToArray(e)}(e)||function DaysView_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||DaysView_unsupportedIterableToArray(e)||function DaysView_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DaysView_unsupportedIterableToArray(e,t){if(e){if("string"===typeof e)return DaysView_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?DaysView_arrayLikeToArray(e,t):void 0}}function DaysView_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1])||arguments[1];if(t){var n=parseHTML(ut).firstChild;this.dow=n.firstChild,this.grid=n.lastChild,this.element.appendChild(n)}_get(DaysView_getPrototypeOf(DaysView.prototype),"init",this).call(this,e)}},{key:"setOptions",value:function setOptions(e){var t,n=this;if(hasProperty(e,"minDate")&&(this.minDate=e.minDate),hasProperty(e,"maxDate")&&(this.maxDate=e.maxDate),e.datesDisabled&&(this.datesDisabled=e.datesDisabled),e.daysOfWeekDisabled&&(this.daysOfWeekDisabled=e.daysOfWeekDisabled,t=!0),e.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=e.daysOfWeekHighlighted),void 0!==e.todayHighlight&&(this.todayHighlight=e.todayHighlight),void 0!==e.weekStart&&(this.weekStart=e.weekStart,this.weekEnd=e.weekEnd,t=!0),e.locale){var r=this.locale=e.locale;this.dayNames=r.daysMin,this.switchLabelFormat=r.titleFormat,t=!0}if(void 0!==e.beforeShowDay&&(this.beforeShow="function"===typeof e.beforeShowDay?e.beforeShowDay:void 0),void 0!==e.calendarWeeks)if(e.calendarWeeks&&!this.calendarWeeks){var o=parseHTML(dt).firstChild;this.calendarWeeks={element:o,dow:o.firstChild,weeks:o.lastChild},this.element.insertBefore(o,this.element.firstChild)}else this.calendarWeeks&&!e.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);void 0!==e.showDaysOfWeek&&(e.showDaysOfWeek?(showElement(this.dow),this.calendarWeeks&&showElement(this.calendarWeeks.dow)):(hideElement(this.dow),this.calendarWeeks&&hideElement(this.calendarWeeks.dow))),t&&Array.from(this.dow.children).forEach((function(e,t){var r=(n.weekStart+t)%7;e.textContent=n.dayNames[r],e.className=n.daysOfWeekDisabled.includes(r)?"dow disabled":"dow"}))}},{key:"updateFocus",value:function updateFocus(){var e=new Date(this.picker.viewDate),t=e.getFullYear(),n=e.getMonth(),r=dateValue(t,n,1),o=dayOfTheWeekOf(r,this.weekStart,this.weekStart);this.first=r,this.last=dateValue(t,n+1,0),this.start=o,this.focused=this.picker.viewDate}},{key:"updateSelection",value:function updateSelection(){var e=this.picker.datepicker,t=e.dates,n=e.rangepicker;this.selected=t,n&&(this.range=n.dates)}},{key:"render",value:function render(){var e=this;this.today=this.todayHighlight?today():void 0,this.disabled=DaysView_toConsumableArray(this.datesDisabled);var t=date_format_formatDate(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(t),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){var n=dayOfTheWeekOf(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach((function(e,t){e.textContent=function getWeek(e){var t=dayOfTheWeekOf(e,4,1),n=dayOfTheWeekOf(new Date(t).setMonth(0,4),4,1);return Math.round((t-n)/6048e5)+1}(function addWeeks(e,t){return addDays(e,7*t)}(n,t))}))}Array.from(this.grid.children).forEach((function(t,n){var r=t.classList,o=addDays(e.start,n),i=new Date(o),a=i.getDay();if(t.className="datepicker-cell ".concat(e.cellClass),t.dataset.date=o,t.textContent=i.getDate(),oe.last&&r.add("next"),e.today===o&&r.add("today"),(oe.maxDate||e.disabled.includes(o))&&r.add("disabled"),e.daysOfWeekDisabled.includes(a)&&(r.add("disabled"),pushUnique(e.disabled,o)),e.daysOfWeekHighlighted.includes(a)&&r.add("highlighted"),e.range){var s=DaysView_slicedToArray(e.range,2),c=s[0],l=s[1];o>c&&on&&oe.length)&&(t=e.length);for(var n=0,r=new Array(t);nt||s1&&void 0!==arguments[1])||arguments[1];t&&(this.grid=this.element,this.element.classList.add("months","datepicker-grid"),this.grid.appendChild(parseHTML(createTagRepeat("span",12,{"data-month":function dataMonth(e){return e}})))),MonthsView_get(MonthsView_getPrototypeOf(MonthsView.prototype),"init",this).call(this,e)}},{key:"setOptions",value:function setOptions(e){if(e.locale&&(this.monthNames=e.locale.monthsShort),hasProperty(e,"minDate"))if(void 0===e.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{var t=new Date(e.minDate);this.minYear=t.getFullYear(),this.minMonth=t.getMonth(),this.minDate=t.setDate(1)}if(hasProperty(e,"maxDate"))if(void 0===e.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{var n=new Date(e.maxDate);this.maxYear=n.getFullYear(),this.maxMonth=n.getMonth(),this.maxDate=dateValue(this.maxYear,this.maxMonth+1,0)}this.isMinView?e.datesDisabled&&(this.datesDisabled=e.datesDisabled):this.datesDisabled=[],void 0!==e.beforeShowMonth&&(this.beforeShow="function"===typeof e.beforeShowMonth?e.beforeShowMonth:void 0)}},{key:"updateFocus",value:function updateFocus(){var e=new Date(this.picker.viewDate);this.year=e.getFullYear(),this.focused=e.getMonth()}},{key:"updateSelection",value:function updateSelection(){var e=this.picker.datepicker,t=e.dates,n=e.rangepicker;this.selected=t.reduce((function(e,t){var n=new Date(t),r=n.getFullYear(),o=n.getMonth();return void 0===e[r]?e[r]=[o]:pushUnique(e[r],o),e}),{}),n&&n.dates&&(this.range=n.dates.map((function(e){var t=new Date(e);return isNaN(t)?void 0:[t.getFullYear(),t.getMonth()]})))}},{key:"render",value:function render(){var e=this;this.disabled=this.datesDisabled.reduce((function(t,n){var r=new Date(n);return e.year===r.getFullYear()&&t.push(r.getMonth()),t}),[]),this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);var t=this.selected[this.year]||[],n=this.yearthis.maxYear,r=this.year===this.minYear,o=this.year===this.maxYear,i=computeMonthRange(this.range,this.year);Array.from(this.grid.children).forEach((function(a,s){var c=a.classList,l=dateValue(e.year,s,1);if(a.className="datepicker-cell ".concat(e.cellClass),e.isMinView&&(a.dataset.date=l),a.textContent=e.monthNames[s],(n||r&&se.maxMonth||e.disabled.includes(s))&&c.add("disabled"),i){var u=MonthsView_slicedToArray(i,2),f=u[0],p=u[1];s>f&&sr&&ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1])||arguments[1];t&&(this.navStep=10*this.step,this.beforeShowOption="beforeShow".concat(toTitleCase(this.cellClass)),this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid"),this.grid.appendChild(parseHTML(createTagRepeat("span",12)))),YearsView_get(YearsView_getPrototypeOf(YearsView.prototype),"init",this).call(this,e)}},{key:"setOptions",value:function setOptions(e){if(hasProperty(e,"minDate")&&(void 0===e.minDate?this.minYear=this.minDate=void 0:(this.minYear=startOfYearPeriod(e.minDate,this.step),this.minDate=dateValue(this.minYear,0,1))),hasProperty(e,"maxDate")&&(void 0===e.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=startOfYearPeriod(e.maxDate,this.step),this.maxDate=dateValue(this.maxYear,11,31))),this.isMinView?e.datesDisabled&&(this.datesDisabled=e.datesDisabled):this.datesDisabled=[],void 0!==e[this.beforeShowOption]){var t=e[this.beforeShowOption];this.beforeShow="function"===typeof t?t:void 0}}},{key:"updateFocus",value:function updateFocus(){var e=new Date(this.picker.viewDate),t=startOfYearPeriod(e,this.navStep),n=t+9*this.step;this.first=t,this.last=n,this.start=t-this.step,this.focused=startOfYearPeriod(e,this.step)}},{key:"updateSelection",value:function updateSelection(){var e=this,t=this.picker.datepicker,n=t.dates,r=t.rangepicker;this.selected=n.reduce((function(t,n){return pushUnique(t,startOfYearPeriod(n,e.step))}),[]),r&&r.dates&&(this.range=r.dates.map((function(t){if(void 0!==t)return startOfYearPeriod(t,e.step)})))}},{key:"render",value:function render(){var e=this;this.disabled=this.datesDisabled.map((function(e){return new Date(e).getFullYear()})),this.picker.setViewSwitchLabel("".concat(this.first,"-").concat(this.last)),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach((function(t,n){var r=t.classList,o=e.start+n*e.step,i=dateValue(o,0,1);if(t.className="datepicker-cell ".concat(e.cellClass),e.isMinView&&(t.dataset.date=i),t.textContent=t.dataset.year=o,0===n?r.add("prev"):11===n&&r.add("next"),(oe.maxYear||e.disabled.includes(o))&&r.add("disabled"),e.range){var a=YearsView_slicedToArray(e.range,2),s=a[0],c=a[1];o>s&&on&&oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?lastItemOf(t):n.defaultViewDate,n.minDate,n.maxDate)}function setViewDate(e,t){var n=new Date(e.viewDate),r=new Date(t),o=e.currentView,i=o.id,a=o.year,s=o.first,c=o.last,l=r.getFullYear();switch(e.viewDate=t,l!==n.getFullYear()&&triggerDatepickerEvent(e.datepicker,"changeYear"),r.getMonth()!==n.getMonth()&&triggerDatepickerEvent(e.datepicker,"changeMonth"),i){case 0:return tc;case 1:return l!==a;default:return lc}}function getTextDirection(e){return window.getComputedStyle(e).direction}function findScrollParents(e){var t=getParent(e);if(t!==document.body&&t)return"visible"!==window.getComputedStyle(t).overflow?t:findScrollParents(t)}var vt=function(){function Picker(e){!function Picker_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Picker);var t=(this.datepicker=e).config,n=lt.replace(/%buttonClass%/g,t.buttonClass),r=this.element=parseHTML(n).firstChild,o=Picker_slicedToArray(r.firstChild.children,3),i=o[0],a=o[1],s=o[2],c=i.firstElementChild,l=Picker_slicedToArray(i.lastElementChild.children,3),u=l[0],f=l[1],p=l[2],h=Picker_slicedToArray(s.firstChild.children,2),g={title:c,prevBtn:u,viewSwitch:f,nextBtn:p,todayBtn:h[0],clearBtn:h[1]};this.main=a,this.controls=g;var v=e.inline?"inline":"dropdown";r.classList.add("datepicker-".concat(v)),processPickerOptions(this,t),this.viewDate=computeResetViewDate(e),registerListeners(e,[[r,"mousedown",onMousedownPicker],[a,"click",onClickView.bind(null,e)],[g.viewSwitch,"click",onClickViewSwitch.bind(null,e)],[g.prevBtn,"click",onClickPrevBtn.bind(null,e)],[g.nextBtn,"click",onClickNextBtn.bind(null,e)],[g.todayBtn,"click",onClickTodayBtn.bind(null,e)],[g.clearBtn,"click",onClickClearBtn.bind(null,e)]]),this.views=[new pt(this),new ht(this),new yt(this,{id:2,name:"years",cellClass:"year",step:1}),new yt(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[t.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),t.container?t.container.appendChild(this.element):e.inputField.after(this.element)}return function Picker_createClass(e,t,n){return t&&Picker_defineProperties(e.prototype,t),n&&Picker_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(Picker,[{key:"setOptions",value:function setOptions(e){processPickerOptions(this,e),this.views.forEach((function(t){t.init(e,!1)})),this.currentView.render()}},{key:"detach",value:function detach(){this.element.remove()}},{key:"show",value:function show(){if(!this.active){var e=this.datepicker,t=this.element;if(e.inline)t.classList.add("active");else{var n=getTextDirection(e.inputField);n!==getTextDirection(getParent(t))?t.dir=n:t.dir&&t.removeAttribute("dir"),t.style.visiblity="hidden",t.classList.add("active"),this.place(),t.style.visiblity="",e.config.disableTouchKeyboard&&e.inputField.blur()}this.active=!0,triggerDatepickerEvent(e,"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 e=this.element,t=e.classList,n=e.offsetParent,r=e.style,o=this.datepicker,i=o.config,a=o.inputField,s=this.element.getBoundingClientRect(),c=s.width,l=s.height,u=a.getBoundingClientRect(),f=u.left,p=u.top,h=u.right,g=u.bottom,v=u.width,b=u.height,w=i.orientation,_=w.x,k=w.y,E=f,A=p;if(n!==document.body&&n){var O=n.getBoundingClientRect();E-=O.left-n.scrollLeft,A-=O.top-n.scrollTop}else E+=window.scrollX,A+=window.scrollY;var S=findScrollParents(a),C=0,T=0,P=document.documentElement,L=P.clientWidth,x=P.clientHeight;if(S){var V=S.getBoundingClientRect();V.top>0&&(T=V.top),V.left>0&&(C=V.left),V.rightL?(_="right",LT&&g+l>x?"top":"bottom"),"top"===k?A-=l:A+=b,t.remove.apply(t,Picker_toConsumableArray(Object.values(mt))),t.add(mt[_],mt[k]),r.left=gt(E),r.top=gt(A)}},{key:"setViewSwitchLabel",value:function setViewSwitchLabel(e){this.controls.viewSwitch.textContent=e}},{key:"setPrevBtnDisabled",value:function setPrevBtnDisabled(e){this.controls.prevBtn.disabled=e}},{key:"setNextBtnDisabled",value:function setNextBtnDisabled(e){this.controls.nextBtn.disabled=e}},{key:"changeView",value:function changeView(e){var t=this.currentView,n=this.views[e];return n.id!==t.id&&(this.currentView=n,this._renderMethod="render",triggerDatepickerEvent(this.datepicker,"changeView"),this.main.replaceChild(n.element,t.element)),this}},{key:"changeFocus",value:function changeFocus(e){return this._renderMethod=setViewDate(this,e)?"render":"refreshFocus",this.views.forEach((function(e){e.updateFocus()})),this}},{key:"update",value:function update(){var e=computeResetViewDate(this.datepicker);return this._renderMethod=setViewDate(this,e)?"render":"refresh",this.views.forEach((function(e){e.updateFocus(),e.updateSelection()})),this}},{key:"render",value:function render(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e&&this._renderMethod||"render";delete this._renderMethod,this.currentView[t]()}}]),Picker}();function findNextAvailableOne(e,t,n,r,o,i){if(isInRange(e,o,i))return r(e)?findNextAvailableOne(t(e,n),t,n,r,o,i):e}function moveByArrowKey(e,t,n,r){var o,i,a=e.picker,s=a.currentView,c=s.step||1,l=a.viewDate;switch(s.id){case 0:l=r?addDays(l,7*n):t.ctrlKey||t.metaKey?addYears(l,n):addDays(l,n),o=addDays,i=function testFn(e){return s.disabled.includes(e)};break;case 1:l=addMonths(l,r?4*n:n),o=addMonths,i=function testFn(e){var t=new Date(e),n=s.year,r=s.disabled;return t.getFullYear()===n&&r.includes(t.getMonth())};break;default:l=addYears(l,n*(r?4:1)*c),o=addYears,i=function testFn(e){return s.disabled.includes(startOfYearPeriod(e,c))}}void 0!==(l=findNextAvailableOne(l,o,n<0?-c:c,i,s.minDate,s.maxDate))&&a.changeFocus(l).render()}function onKeydown(e,t){var n=t.key;if("Tab"!==n){var r=e.picker,o=r.currentView,i=o.id,a=o.isMinView;if(r.active){if(e.editMode)return void("Enter"===n?e.exitEditMode({update:!0,autohide:e.config.autohide}):"Escape"===n&&r.hide());if("ArrowLeft"===n)if(t.ctrlKey||t.metaKey)goToPrevOrNext(e,-1);else{if(t.shiftKey)return void e.enterEditMode();moveByArrowKey(e,t,-1,!1)}else if("ArrowRight"===n)if(t.ctrlKey||t.metaKey)goToPrevOrNext(e,1);else{if(t.shiftKey)return void e.enterEditMode();moveByArrowKey(e,t,1,!1)}else if("ArrowUp"===n)if(t.ctrlKey||t.metaKey)switchView(e);else{if(t.shiftKey)return void e.enterEditMode();moveByArrowKey(e,t,-1,!0)}else if("ArrowDown"===n){if(t.shiftKey&&!t.ctrlKey&&!t.metaKey)return void e.enterEditMode();moveByArrowKey(e,t,1,!0)}else{if("Enter"!==n)return void("Escape"===n?r.hide():"Backspace"!==n&&"Delete"!==n&&(1!==n.length||t.ctrlKey||t.metaKey)||e.enterEditMode());if(a)return void e.setDate(r.viewDate);r.changeView(i-1).render()}}else{if("ArrowDown"!==n)return void("Enter"===n?e.update():"Escape"===n&&r.show());r.show()}t.preventDefault()}else unfocus(e)}function onFocus(e){e.config.showOnFocus&&!e._showing&&e.show()}function onMousedown(e,t){var n=t.target;(e.picker.active||e.config.showOnClick)&&(n._active=isActiveElement(n),n._clicking=setTimeout((function(){delete n._active,delete n._clicking}),2e3))}function onClickInput(e,t){var n=t.target;n._clicking&&(clearTimeout(n._clicking),delete n._clicking,n._active&&e.enterEditMode(),delete n._active,e.config.showOnClick&&e.show())}function onPaste(e,t){t.clipboardData.types.includes("text/plain")&&e.enterEditMode()}function onClickOutside(e,t){var n=e.element,r=e.picker;if(r.active||isActiveElement(n)){var o=r.element;findElementInEventPath(t,(function(e){return e===n||e===o}))||unfocus(e)}}function Datepicker_typeof(e){return Datepicker_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Datepicker_typeof(e)}function Datepicker_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Datepicker_defineProperties(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=e.config,o=e.dates,i=e.rangeSideIndex;if(0===t.length)return n?[]:void 0;var a=t.reduce((function(e,t){var n=date_format_parseDate(t,r.format,r.locale);return void 0===n||!isInRange(n=regularizeDate(n,r.pickLevel,i),r.minDate,r.maxDate)||e.includes(n)||r.datesDisabled.includes(n)||!(r.pickLevel>0)&&r.daysOfWeekDisabled.includes(new Date(n).getDay())||e.push(n),e}),[]);return 0!==a.length?(r.multidate&&!n&&(a=a.reduce((function(e,t){return o.includes(t)||e.push(t),e}),o.filter((function(e){return!a.includes(e)})))),r.maxNumberOfDates&&a.length>r.maxNumberOfDates?a.slice(-1*r.maxNumberOfDates):a):void 0}function refreshUI(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e.config,o=e.picker,i=e.inputField;if(2&t){var a=o.active?r.pickLevel:r.startView;o.update().changeView(a).render(n)}1&t&&i&&(i.value=stringifyDates(e.dates,r))}function _setDate(e,t,n){var r=n.clear,o=n.render,i=n.autohide,a=n.revert;void 0===o&&(o=!0),o?void 0===i&&(i=e.config.autohide):i=!1;var s=processInputDates(e,t,r);(s||a)&&(s&&s.toString()!==e.dates.toString()?(e.dates=s,refreshUI(e,o?3:1),triggerDatepickerEvent(e,"changeDate")):refreshUI(e,1),i&&e.hide())}var bt=function(){function Datepicker(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;Datepicker_classCallCheck(this,Datepicker),e.datepicker=this,this.element=e;var r,o,i=this.config=Object.assign({buttonClass:t.buttonClass&&String(t.buttonClass)||"button",container:null,defaultViewDate:today(),maxDate:void 0,minDate:void 0},processOptions(it,this)),a=this.inline="INPUT"!==e.tagName;if(a?i.container=e:(t.container&&(i.container=t.container instanceof HTMLElement?t.container:document.querySelector(t.container)),(r=this.inputField=e).classList.add("datepicker-input")),n){var s=n.inputs.indexOf(r),c=n.datepickers;if(s<0||s>1||!Array.isArray(c))throw Error("Invalid rangepicker object.");c[s]=this,Object.defineProperty(this,"rangepicker",{get:function get(){return n}}),Object.defineProperty(this,"rangeSideIndex",{get:function get(){return s}})}this._options=t,Object.assign(i,processOptions(t,this)),a?(o=stringToArray(e.dataset.date,i.dateDelimiter),delete e.dataset.date):o=stringToArray(r.value,i.dateDelimiter),this.dates=[];var l=processInputDates(this,o);l&&l.length>0&&(this.dates=l),r&&(r.value=stringifyDates(this.dates,i));var u=this.picker=new vt(this);if(a)this.show();else{var f=onClickOutside.bind(null,this),p=[[r,"keydown",onKeydown.bind(null,this)],[r,"focus",onFocus.bind(null,this)],[r,"mousedown",onMousedown.bind(null,this)],[r,"click",onClickInput.bind(null,this)],[r,"paste",onPaste.bind(null,this)],[document,"mousedown",f],[document,"touchstart",f],[window,"resize",u.place.bind(u)]];registerListeners(this,p)}}return function Datepicker_createClass(e,t,n){return t&&Datepicker_defineProperties(e.prototype,t),n&&Datepicker_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(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(e){var t=this.picker,n=processOptions(e,this);Object.assign(this._options,e),Object.assign(this.config,n),t.setOptions(n),refreshUI(this,3)}},{key:"show",value:function show(){if(this.inputField){if(this.inputField.disabled)return;isActiveElement(this.inputField)||this.config.disableTouchKeyboard||(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}},{key:"hide",value:function hide(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}},{key:"destroy",value:function destroy(){return this.hide(),function unregisterListeners(e){var t=Qe.get(e);t&&(t.forEach((function(e){nt.call.apply(nt,event_toConsumableArray(e))})),Qe.delete(e))}(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}},{key:"getDate",value:function getDate(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=t?function(n){return date_format_formatDate(n,t,e.config.locale)}:function(e){return new Date(e)};return this.config.multidate?this.dates.map(n):this.dates.length>0?n(this.dates[0]):void 0}},{key:"setDate",value:function setDate(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline){var t=Object.assign(e||{},{clear:!0,render:!0}),n=stringToArray(this.inputField.value,this.config.dateDelimiter);_setDate(this,n,t)}}},{key:"refresh",value:function refresh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&"string"!==typeof e&&(t=e,e=void 0),refreshUI(this,"picker"===e?2:"input"===e?1:3,!t)}},{key:"enterEditMode",value:function enterEditMode(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit"))}},{key:"exitEditMode",value:function exitEditMode(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline&&this.editMode){var t=Object.assign({update:!1},e);delete this.editMode,this.inputField.classList.remove("in-edit"),t.update&&this.update(t)}}}],[{key:"formatDate",value:function formatDate(e,t,n){return date_format_formatDate(e,t,n&&ot[n]||ot.en)}},{key:"parseDate",value:function parseDate(e,t,n){return date_format_parseDate(e,t,n&&ot[n]||ot.en)}},{key:"locales",get:function get(){return ot}}]),Datepicker}(),wt=function init(){document.querySelectorAll(".js-datepicker").forEach((function(e,t){var n=new bt(e);e.ui=n}))};window.addEventListener("".concat(e.LODEDANDREADY),wt),window.addEventListener("".concat(e.AJAX),wt);var _t=__webpack_require__(754);!function(t){var n,r="main.online",o=document,i=o.body,a=o.querySelector('meta[name="ping"]'),s=!1,c=function UPDATE_ONLINE_STATUS(o){s||(s=!0,o?(i.classList.contains("is-offline")?(console.log("".concat(r,": back Online")),t.dispatchEvent(new Event(e.BACKONLINE))):(console.log("".concat(r,": Online")),t.dispatchEvent(new Event(e.ONLINE))),i.classList.add("is-online"),i.classList.remove("is-offline"),a&&!n&&(console.log("".concat(r,": SESSION_PING is active")),n=setInterval(u,3e5))):(console.log("".concat(r,": Offline")),i.classList.add("is-offline"),i.classList.remove("is-online"),clearInterval(n),n=null,t.dispatchEvent(new Event(e.OFFLINE))),s=!1)},l=!1,u=function SESSION_PING(){if(!l&&!i.classList.contains("is-offline")){var e=a.getAttribute("content");console.log("".concat(r,": session ping")),l=!0,_t.post(e,{}).then((function(e){l=!1,c(!0)})).catch((function(e){console.error(e),console.warn("".concat(r,": SESSION_PING failed")),l=!1,c(!1)}))}},f=function navigatorStateUpdate(){"undefined"!==typeof navigator.onLine&&(navigator.onLine?c(!0):c(!1))};t.addEventListener("".concat(e.OFFLINE),(function(){c(!1)})),t.addEventListener("".concat(e.ONLINE),(function(){c(!0)})),t.addEventListener("".concat(e.LOADED),f),t.addEventListener("".concat(e.AJAX),f)}(window);function image_defineProperties(e,t){for(var n=0;n0;){if("_owner"===(p=u[c])){var d=isReactElement(t),m=isReactElement(r);if((d||m)&&d!==m)return!1}if(!i(r,p)||!a(t[p],r[p],p,p,t,r,l))return!1}return!0}var l="function"===typeof Map,u="function"===typeof Set;function createComparator(t){var r="function"===typeof t?t(comparator):function(t,r,o,a,i,l,u){return comparator(t,r,u)};function comparator(t,o,a){if(t===o)return!0;if(t&&o&&"object"===_typeof(t)&&"object"===_typeof(o)){if(isPlainObject(t)&&isPlainObject(o))return areObjectsEqual(t,o,r,a);var i=Array.isArray(t),c=Array.isArray(o);return i||c?i===c&&function areArraysEqual(t,r,o,a){var i=t.length;if(r.length!==i)return!1;for(;i-- >0;)if(!o(t[i],r[i],i,i,t,r,a))return!1;return!0}(t,o,r,a):(i=t instanceof Date,c=o instanceof Date,i||c?i===c&&sameValueZeroEqual(t.getTime(),o.getTime()):(i=t instanceof RegExp,c=o instanceof RegExp,i||c?i===c&&function areRegExpsEqual(t,r){return t.source===r.source&&t.global===r.global&&t.ignoreCase===r.ignoreCase&&t.multiline===r.multiline&&t.unicode===r.unicode&&t.sticky===r.sticky&&t.lastIndex===r.lastIndex}(t,o):isPromiseLike(t)||isPromiseLike(o)?t===o:l&&(i=t instanceof Map,c=o instanceof Map,i||c)?i===c&&function areMapsEqual(t,r,o,a){var i=t.size===r.size;if(i&&t.size){var l={},u=0;t.forEach((function(c,p){if(i){var d=!1,m=0;r.forEach((function(i,g){d||l[m]||(d=o(p,g,u,m,t,r,a)&&o(c,i,p,g,t,r,a))&&(l[m]=!0),m++})),u++,i=d}}))}return i}(t,o,r,a):u&&(i=t instanceof Set,c=o instanceof Set,i||c)?i===c&&function areSetsEqual(t,r,o,a){var i=t.size===r.size;if(i&&t.size){var l={};t.forEach((function(u,c){if(i){var p=!1,d=0;r.forEach((function(i,m){p||l[d]||(p=o(u,i,c,m,t,r,a))&&(l[d]=!0),d++})),i=p}}))}return i}(t,o,r,a):areObjectsEqual(t,o,r,a)))}return t!==t&&o!==o}return comparator}var c=createComparator(),p=createComparator((function(){return sameValueZeroEqual})),d=createComparator(createCircularEqualCreator()),m=createComparator(createCircularEqualCreator(sameValueZeroEqual));t.circularDeepEqual=d,t.circularShallowEqual=m,t.createCustomEqual=createComparator,t.deepEqual=c,t.sameValueZeroEqual=sameValueZeroEqual,t.shallowEqual=p,Object.defineProperty(t,"__esModule",{value:!0})},"object"===_typeof(r)?l(r):(a=[r],void 0===(i="function"===typeof(o=l)?o.apply(r,a):o)||(t.exports=i))}},r={};function __webpack_require__(o){var a=r[o];if(void 0!==a)return a.exports;var i=r[o]={exports:{}};return t[o].call(i.exports,i,i.exports,__webpack_require__),i.exports}!function(){"use strict";var t="ajax-load",r="load-ready",o="map-loaded",a="map-api-loaded",i="map-marker-click",l="map-popup-close";function sortKD(t,r,o,a,i,l){if(!(i-a<=o)){var u=a+i>>1;sort_select(t,r,u,a,i,l%2),sortKD(t,r,o,a,u-1,l+1),sortKD(t,r,o,u+1,i,l+1)}}function sort_select(t,r,o,a,i,l){for(;i>a;){if(i-a>600){var u=i-a+1,c=o-a+1,p=Math.log(u),d=.5*Math.exp(2*p/3),m=.5*Math.sqrt(p*d*(u-d)/u)*(c-u/2<0?-1:1);sort_select(t,r,o,Math.max(a,Math.floor(o-c*d/u+m)),Math.min(i,Math.floor(o+(u-c)*d/u+m)),l)}var g=r[2*o+l],h=a,y=i;for(swapItem(t,r,a,o),r[2*i+l]>g&&swapItem(t,r,a,i);hg;)y--}r[2*a+l]===g?swapItem(t,r,a,y):swapItem(t,r,++y,i),y<=o&&(a=y+1),o<=y&&(i=y-1)}}function swapItem(t,r,o,a){swap(t,o,a),swap(r,2*o,2*a),swap(r,2*o+1,2*a+1)}function swap(t,r,o){var a=t[r];t[r]=t[o],t[o]=a}function sqDist(t,r,o,a){var i=t-o,l=r-a;return i*i+l*l}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:u,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Float64Array;_classCallCheck(this,KDBush),this.nodeSize=a,this.points=t;for(var l=t.length<65536?Uint16Array:Uint32Array,p=this.ids=new l(t.length),d=this.coords=new i(2*t.length),m=0;m=o&&c<=i&&p>=a&&p<=l&&m.push(t[v]);else{var _=Math.floor((y+h)/2);c=r[2*_],p=r[2*_+1],c>=o&&c<=i&&p>=a&&p<=l&&m.push(t[_]);var k=(g+1)%2;(0===g?o<=c:a<=p)&&(d.push(y),d.push(_-1),d.push(k)),(0===g?i>=c:l>=p)&&(d.push(_+1),d.push(h),d.push(k))}}return m}(this.ids,this.coords,t,r,o,a,this.nodeSize)}},{key:"within",value:function within(t,r,o){return function within_within(t,r,o,a,i,l){for(var u=[0,t.length-1,0],c=[],p=i*i;u.length;){var d=u.pop(),m=u.pop(),g=u.pop();if(m-g<=l)for(var h=g;h<=m;h++)sqDist(r[2*h],r[2*h+1],o,a)<=p&&c.push(t[h]);else{var y=Math.floor((g+m)/2),v=r[2*y],_=r[2*y+1];sqDist(v,_,o,a)<=p&&c.push(t[y]);var k=(d+1)%2;(0===d?o-i<=v:a-i<=_)&&(u.push(g),u.push(y-1),u.push(k)),(0===d?o+i>=v:a+i>=_)&&(u.push(y+1),u.push(m),u.push(k))}}return c}(this.ids,this.coords,t,r,o,this.nodeSize)}}]),KDBush}();function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var o=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==o)return;var a,i,l=[],u=!0,c=!1;try{for(o=o.call(t);!(u=(a=o.next()).done)&&(l.push(a.value),!r||l.length!==r);u=!0);}catch(p){c=!0,i=p}finally{try{u||null==o.return||o.return()}finally{if(c)throw i}}return l}(t,r)||_unsupportedIterableToArray(t,r)||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,r){var o="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=_unsupportedIterableToArray(t))||r&&t&&"number"===typeof t.length){o&&(t=o);var a=0,i=function F(){};return{s:i,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:i}}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,c=!1;return{s:function s(){o=o.call(t)},n:function n(){var t=o.next();return u=t.done,t},e:function e(t){c=!0,l=t},f:function f(){try{u||null==o.return||o.return()}finally{if(c)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"===typeof t)return _arrayLikeToArray(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var o=0,a=new Array(r);o=a;k--){var b=+Date.now();v=this._cluster(v,k),this.trees[k]=new p(v,getX,getY,l,Float32Array),o&&console.log("z%d: %d clusters in %dms",k,v.length,+Date.now()-b)}return o&&console.timeEnd("total time"),this}},{key:"getClusters",value:function getClusters(t,r){var o=((t[0]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,l=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)o=-180,i=180;else if(o>i){var u=this.getClusters([o,a,180,l],r),c=this.getClusters([-180,a,i,l],r);return u.concat(c)}var p,d=this.trees[this._limitZoom(r)],m=[],g=_createForOfIteratorHelper(d.range(lngX(o),latY(l),lngX(i),latY(a)));try{for(g.s();!(p=g.n()).done;){var h=p.value,y=d.points[h];m.push(y.numPoints?getClusterJSON(y):this.points[y.index])}}catch(v){g.e(v)}finally{g.f()}return m}},{key:"getChildren",value:function getChildren(t){var r=this._getOriginId(t),o=this._getOriginZoom(t),a="No cluster with the specified id.",i=this.trees[o];if(!i)throw new Error(a);var l=i.points[r];if(!l)throw new Error(a);var u,c=this.options.radius/(this.options.extent*Math.pow(2,o-1)),p=[],d=_createForOfIteratorHelper(i.within(l.x,l.y,c));try{for(d.s();!(u=d.n()).done;){var m=u.value,g=i.points[m];g.parentId===t&&p.push(g.numPoints?getClusterJSON(g):this.points[g.index])}}catch(h){d.e(h)}finally{d.f()}if(0===p.length)throw new Error(a);return p}},{key:"getLeaves",value:function getLeaves(t,r,o){r=r||10,o=o||0;var a=[];return this._appendLeaves(a,t,r,o,0),a}},{key:"getTile",value:function getTile(t,r,o){var a=this.trees[this._limitZoom(t)],i=Math.pow(2,t),l=this.options,u=l.extent,c=l.radius/u,p=(o-c)/i,d=(o+1+c)/i,m={features:[]};return this._addTileFeatures(a.range((r-c)/i,p,(r+1+c)/i,d),a.points,r,o,i,m),0===r&&this._addTileFeatures(a.range(1-c/i,p,1,d),a.points,i,o,i,m),r===i-1&&this._addTileFeatures(a.range(0,p,c/i,d),a.points,-1,o,i,m),m.features.length?m:null}},{key:"getClusterExpansionZoom",value:function getClusterExpansionZoom(t){for(var r=this._getOriginZoom(t)-1;r<=this.options.maxZoom;){var o=this.getChildren(t);if(r++,1!==o.length)break;t=o[0].properties.cluster_id}return r}},{key:"_appendLeaves",value:function _appendLeaves(t,r,o,a,i){var l,u=_createForOfIteratorHelper(this.getChildren(r));try{for(u.s();!(l=u.n()).done;){var c=l.value,p=c.properties;if(p&&p.cluster?i+p.point_count<=a?i+=p.point_count:i=this._appendLeaves(t,p.cluster_id,o,a,i):ir&&(_+=C.numPoints||1)}}catch(Z){k.e(Z)}finally{k.f()}if(_>v&&_>=c){var x,w=m.x*v,P=m.y*v,M=u&&v>1?this._map(m,!0):null,O=(d<<5)+(r+1)+this.points.length,E=_createForOfIteratorHelper(y);try{for(E.s();!(x=E.n()).done;){var S=x.value,A=h.points[S];if(!(A.zoom<=r)){A.zoom=r;var I=A.numPoints||1;w+=A.x*I,P+=A.y*I,A.parentId=O,u&&(M||(M=this._map(m,!0)),u(M,this._map(A)))}}}catch(Z){E.e(Z)}finally{E.f()}m.parentId=O,o.push(createCluster(w/_,P/_,O,_,M))}else if(o.push(m),_>1){var j,L=_createForOfIteratorHelper(y);try{for(L.s();!(j=L.n()).done;){var T=j.value,D=h.points[T];D.zoom<=r||(D.zoom=r,o.push(D))}}catch(Z){L.e(Z)}finally{L.f()}}}}return o}},{key:"_getOriginId",value:function _getOriginId(t){return t-this.points.length>>5}},{key:"_getOriginZoom",value:function _getOriginZoom(t){return(t-this.points.length)%32}},{key:"_map",value:function _map(t,r){if(t.numPoints)return r?extend({},t.properties):t.properties;var o=this.points[t.index].properties,a=this.options.map(o);return r&&a===o?extend({},a):a}}]),Supercluster}();function createCluster(t,r,o,a,i){return{x:g(t),y:g(r),zoom:1/0,id:o,parentId:-1,numPoints:a,properties:i}}function getClusterJSON(t){return{type:"Feature",id:t.id,properties:getClusterProperties(t),geometry:{type:"Point",coordinates:[(a=t.x,360*(a-.5)),(r=t.y,o=(180-360*r)*Math.PI/180,360*Math.atan(Math.exp(o))/Math.PI-90)]}};var r,o,a}function getClusterProperties(t){var r=t.numPoints,o=r>=1e4?"".concat(Math.round(r/1e3),"k"):r>=1e3?"".concat(Math.round(r/100)/10,"k"):r;return extend(extend({},t.properties),{cluster:!0,cluster_id:t.id,point_count:r,point_count_abbreviated:o})}function lngX(t){return t/360+.5}function latY(t){var r=Math.sin(t*Math.PI/180),o=.5-.25*Math.log((1+r)/(1-r))/Math.PI;return o<0?0:o>1?1:o}function extend(t,r){for(var o in r)t[o]=r[o];return t}function getX(t){return t.x}function getY(t){return t.y}var y=__webpack_require__(519);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 index_esm_slicedToArray(t,r){return function index_esm_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function index_esm_iterableToArrayLimit(t,r){var o=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==o)return;var a,i,l=[],u=!0,c=!1;try{for(o=o.call(t);!(u=(a=o.next()).done)&&(l.push(a.value),!r||l.length!==r);u=!0);}catch(p){c=!0,i=p}finally{try{u||null==o.return||o.return()}finally{if(c)throw i}}return l}(t,r)||index_esm_unsupportedIterableToArray(t,r)||function index_esm_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 _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return index_esm_arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||index_esm_unsupportedIterableToArray(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 index_esm_unsupportedIterableToArray(t,r){if(t){if("string"===typeof t)return index_esm_arrayLikeToArray(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?index_esm_arrayLikeToArray(t,r):void 0}}function index_esm_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var o=0,a=new Array(r);othis.maxZoom&&a.zoom>this.maxZoom||(r=r||!(0,y.deepEqual)(this.state,a)),this.state=a,r&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:r}}},{key:"cluster",value:function cluster(t){var r=t.map;return this.superCluster.getClusters([-180,-90,180,90],Math.round(r.getZoom())).map(this.transformCluster.bind(this))}},{key:"transformCluster",value:function transformCluster(t){var r=index_esm_slicedToArray(t.geometry.coordinates,2),o=r[0],a=r[1],i=t.properties;if(i.cluster)return new v({markers:this.superCluster.getLeaves(i.cluster_id,1/0).map((function(t){return t.properties.marker})),position:new google.maps.LatLng({lat:a,lng:o})});var l=i.marker;return new v({markers:[l],position:l.getPosition()})}}]),SuperClusterAlgorithm}(_),C=index_esm_createClass((function ClusterStats(t,r){index_esm_classCallCheck(this,ClusterStats),this.markers={sum:t.length};var o=r.map((function(t){return t.count})),a=o.reduce((function(t,r){return t+r}),0);this.clusters={count:r.length,markers:{mean:a/r.length,sum:a,min:Math.min.apply(Math,_toConsumableArray(o)),max:Math.max.apply(Math,_toConsumableArray(o))}}})),x=function(){function DefaultRenderer(){index_esm_classCallCheck(this,DefaultRenderer)}return index_esm_createClass(DefaultRenderer,[{key:"render",value:function render(t,r){var o=t.count,a=t.position,i=o>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff",l=window.btoa('\n \n \n \n \n '));return new google.maps.Marker({position:a,icon:{url:"data:image/svg+xml;base64,".concat(l),scaledSize:new google.maps.Size(45,45)},label:{text:String(o),color:"rgba(255,255,255,0.9)",fontSize:"12px"},title:"Cluster of ".concat(o," markers"),zIndex:Number(google.maps.Marker.MAX_ZINDEX)+o})}}]),DefaultRenderer}();var w,P=index_esm_createClass((function OverlayViewSafe(){index_esm_classCallCheck(this,OverlayViewSafe),function index_esm_extend(t,r){for(var o in r.prototype)t.prototype[o]=r.prototype[o]}(OverlayViewSafe,google.maps.OverlayView)}));!function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"}(w||(w={}));var M=function defaultOnClusterClickHandler(t,r,o){o.fitBounds(r.bounds)},O=function(t){_inherits(MarkerClusterer,t);var r=_createSuper(MarkerClusterer);function MarkerClusterer(t){var o,a=t.map,i=t.markers,l=void 0===i?[]:i,u=t.algorithm,c=void 0===u?new b({}):u,p=t.renderer,d=void 0===p?new x:p,m=t.onClusterClick,g=void 0===m?M:m;return index_esm_classCallCheck(this,MarkerClusterer),(o=r.call(this)).markers=_toConsumableArray(l),o.clusters=[],o.algorithm=c,o.renderer=d,o.onClusterClick=g,a&&o.setMap(a),o}return index_esm_createClass(MarkerClusterer,[{key:"addMarker",value:function addMarker(t,r){this.markers.includes(t)||(this.markers.push(t),r||this.render())}},{key:"addMarkers",value:function addMarkers(t,r){var o=this;t.forEach((function(t){o.addMarker(t,!0)})),r||this.render()}},{key:"removeMarker",value:function removeMarker(t,r){var o=this.markers.indexOf(t);return-1!==o&&(t.setMap(null),this.markers.splice(o,1),r||this.render(),!0)}},{key:"removeMarkers",value:function removeMarkers(t,r){var o=this,a=!1;return t.forEach((function(t){a=o.removeMarker(t,!0)||a})),a&&!r&&this.render(),a}},{key:"clearMarkers",value:function clearMarkers(t){this.markers.length=0,t||this.render()}},{key:"render",value:function render(){var t=this.getMap();if(t instanceof google.maps.Map&&this.getProjection()){google.maps.event.trigger(this,w.CLUSTERING_BEGIN,this);var r=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()}),o=r.clusters,a=r.changed;(a||void 0==a)&&(this.reset(),this.clusters=o,this.renderClusters()),google.maps.event.trigger(this,w.CLUSTERING_END,this)}}},{key:"onAdd",value:function onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}},{key:"onRemove",value:function onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}},{key:"reset",value:function reset(){this.markers.forEach((function(t){return t.setMap(null)})),this.clusters.forEach((function(t){return t.delete()})),this.clusters=[]}},{key:"renderClusters",value:function renderClusters(){var t=this,r=new C(this.markers,this.clusters),o=this.getMap();this.clusters.forEach((function(a){1===a.markers.length?a.marker=a.markers[0]:(a.marker=t.renderer.render(a,r),t.onClusterClick&&a.marker.addListener("click",(function(r){google.maps.event.trigger(t,w.CLUSTER_CLICK,a),t.onClusterClick(r,a,o)}))),a.marker.setMap(o)}))}}]),MarkerClusterer}(P);function map_google_marker_typeof(t){return map_google_marker_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},map_google_marker_typeof(t)}function map_google_marker_defineProperties(t,r){for(var o=0;o',a.divClass=t.divClass,a.align=t.align,a.isDebugMode=t.debug,a.onClick=t.onClick,a.onMouseOver=t.onMouseOver,a.isBoolean=function(t){return"boolean"===typeof t},a.isNotUndefined=function(t){return"undefined"!==typeof t},a.hasContent=function(t){return t.length>0},a.isString=function(t){return"string"===typeof t},a.isFunction=function(t){return"function"===typeof t},o}return function map_google_marker_createClass(t,r,o){return r&&map_google_marker_defineProperties(t.prototype,r),o&&map_google_marker_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(GoogleMapsHtmlOverlay,[{key:"onAdd",value:function onAdd(){var t=this;t.div=document.createElement("div"),t.div.style.position="absolute",t.isNotUndefined(t.divClass)&&t.hasContent(t.divClass)&&(t.div.className=t.divClass),t.isNotUndefined(t.html)&&t.hasContent(t.html)&&t.isString(t.html)&&(t.div.innerHTML=t.html),t.isBoolean(t.isDebugMode)&&t.isDebugMode&&(t.div.className="debug-mode",t.div.innerHTML='
Debug mode
',t.div.setAttribute("style","position: absolute;border: 5px dashed red;height: 150px;width: 150px;display: flex;justify-content: center;align-items: center;")),t.getPanes().overlayMouseTarget.appendChild(t.div),google.maps.event.addDomListener(t.div,"click",(function(r){google.maps.event.trigger(t,"click"),t.isFunction(t.onClick)&&t.onClick(),r.stopPropagation()})),google.maps.event.addDomListener(t.div,"mouseover",(function(r){google.maps.event.trigger(t,"mouseover"),t.isFunction(t.onMouseOver)&&t.onMouseOver(),r.stopPropagation()}))}},{key:"draw",value:function draw(){var t=this,r=document.querySelector(".popup");r.length||(r=t.div);var o=t.getProjection();if(!o)return console.log("GoogleMapsHtmlOverlay: current map is missing"),null;var a=o.fromLatLngToDivPixel(t.getPosition()),i={y:void 0,x:void 0},l=r.offsetWidth,u=r.offsetHeight;switch(Array.isArray(t.align)?t.align.join(" "):""){case"left top":i.y=u,i.x=l;break;case"left center":i.y=u/2,i.x=l;break;case"left bottom":i.y=0,i.x=l;break;case"center top":i.y=u,i.x=l/2;break;case"center center":default:i.y=u/2,i.x=l/2;break;case"center bottom":i.y=0,i.x=l/2;break;case"right top":i.y=u,i.x=0;break;case"right center":i.y=u/2,i.x=0;break;case"right bottom":i.y=0,i.x=0}t.div.style.top="".concat(a.y-i.y,"px"),t.div.style.left="".concat(a.x-i.x,"px")}},{key:"getPosition",value:function getPosition(){return new google.maps.LatLng(this.position)}},{key:"getDiv",value:function getDiv(){return this.div}},{key:"setPosition",value:function setPosition(t,r){var o=this;o.position=t,o.align=r,o.draw()}},{key:"remove",value:function remove(){this.setMap(null),this.div.remove()}},{key:"getDraggable",value:function getDraggable(){return!1}}]),GoogleMapsHtmlOverlay}()}};function map_google_defineProperties(t,r){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:[],a=this;a.el=r,a.config=o,a.markers=[],t["init".concat(a.getName())]=function(){a.googleApiLoaded()};var i=document.createElement("script");i.src="https://maps.googleapis.com/maps/api/js?key=".concat(o.key,"&callback=init").concat(a.getName()),i.async=!0,i.defer=!0,document.head.appendChild(i)}},{key:"googleApiLoaded",value:function googleApiLoaded(){var t=this,r=t.el,o=t.config,i=r.querySelector(".mapAPI-map"),l=o.mapZoom&&"0"!==o.mapZoom?parseInt(o.mapZoom):10,u=o.center&&","!==o.center?{lat:o.center[1],lng:o.center[0]}:{lat:0,lng:0},c=o.style?o.style:null;console.log("".concat(t.getName(),": API is loaded")),t.MarkerUI=E.init(),t.map=new google.maps.Map(i,{zoom:l,center:u,fullscreenControl:!0,styles:c}),t.default_zoom=l,i.classList.add("mapboxgl-map"),t.popup=new t.MarkerUI({map:t.map,align:["center","top"],divClass:"mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none",html:'
\xd7
'}),t.popup.setMap(t.map),t.geocoder=new google.maps.Geocoder,t.cluster=new O(t.map,null,{styles:[{width:30,height:30,className:"mapboxgl-cluster"}]}),r.dispatchEvent(new Event(a))}},{key:"addMarker",value:function addMarker(t,r){var o=this,a={lat:t[1],lng:t[0]},l=new o.MarkerUI({position:a,map:o.map,align:["center","top"],html:'
').concat(r.icon,"
"),onClick:function onClick(){var t=document.querySelector("#Marker".concat(r.id));o.showPopup(a,r.content),t.dispatchEvent(new Event(i))}});return o.markers.push(l),o.cluster.addMarker(l),l}},{key:"showPopup",value:function showPopup(t,r){var o=this,a=o.popup.getDiv();o.config.flyToMarker&&(o.map.setCenter(t),o.config.noZoom||o.map.setZoom(18)),a.style.opacity="0",a.classList.remove("d-none"),a.querySelector(".mapboxgl-popup-content .html").innerHTML=r,a.querySelector(".mapboxgl-popup-close-button").addEventListener("click",(function(t){t.preventDefault(),o.hidePopup()})),o.popup.setPosition(t,["center","top"]),a.style.opacity="1",a.style["margin-top"]="-1rem"}},{key:"hidePopup",value:function hidePopup(){var t=this;t.popup.getDiv().classList.add("d-none"),t.config.noRestoreBounds&&!t.config.flyToBounds||t.restoreBounds(),t.el.dispatchEvent(new Event(l))}},{key:"geocode",value:function geocode(t,r){var o=this;o.geocoder.geocode({address:t},(function(t,a){if("OK"===a)return"function"===typeof r&&r(t),t;console.error("".concat(o.getName(),": Geocode was not successful for the following reason: ").concat(a))}))}},{key:"reverseGeocode",value:function reverseGeocode(t,r){var o=this;o.geocoder.geocode({location:latlng},(function(t,a){if("OK"===a)return"function"===typeof r&&r(t),t;console.error("".concat(o.getName(),": Reverse Geocoding was not successful for the following reason: ").concat(a))}))}},{key:"addGeoJson",value:function addGeoJson(t){var r=this,o=JSON.parse(t.geojson),a=(o.features[0].geometry.coordinates,new google.maps.LatLngBounds);o.features.forEach((function(o){var i=o.id,l=o.geometry.coordinates,u=o.properties.content;r.addMarker(l,{id:i,content:u,icon:o.icon,flyToMarker:t.flyToMarker}),a.extend({lat:l[1],lng:l[0]})})),r.markers.length>1?r.map.fitBounds(a,{padding:30}):r.markers[0]&&r.map.setCenter(r.markers[0].getPosition()),r.default_bounds=a,r.default_zoom=r.map.getZoom()}},{key:"getMap",value:function getMap(){return this.map}},{key:"getPopup",value:function getPopup(){return this.popup}},{key:"restoreBounds",value:function restoreBounds(){var t=this;t.default_bounds&&t.markers.length>1?t.map.fitBounds(t.default_bounds,{padding:30}):(t.markers[0]&&t.map.setCenter(t.markers[0].getPosition()),t.restoreZoom())}},{key:"restoreZoom",value:function restoreZoom(){this.map.setZoom(this.default_zoom)}}]),GoogleMapsDriver}();return r}(window),A={ENVS:["xs","sm","md","lg","xl","xxl","xxxl"],MAP_DRIVER:S};function map_api_defineProperties(t,r){for(var o=0;o'),console.log("".concat(l,": init ").concat(o.getName(),"...")),r.drv=o,r.el=t,r.config=c,o.init(t,c),t.addEventListener(a,(function(){r.addMarkers()}))}return function map_api_createClass(t,r,o){return r&&map_api_defineProperties(t.prototype,r),o&&map_api_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(MapAPI,[{key:"getMap",value:function getMap(){return ui.map}},{key:"dispose",value:function dispose(){this.el=null,this.el.classList.remove("".concat(l,"-active"))}},{key:"addMarkers",value:function addMarkers(){console.log("".concat(l,": addMarkers"));var t=this,r=t.el,a=t.drv,i=t.config;if(t.map=a.getMap(),i.geojson)console.log("".concat(l,": setting up geocode data")),a.addGeoJson(i);else if(i.address)console.log(i.address),console.log("".concat(l,": setting up address marker")),a.geocode(i.address,(function(r){console.log(r);var o=r[0].geometry.location.lat(),u=r[0].geometry.location.lng();console.log("".concat(l,": setting up single lat/lng marker lat: ").concat(o," lng: ").concat(u)),a.addMarker([u,o],i),t.map.setCenter({lat:o,lng:u})}));else if(i.lat&&i.lng){var u=i.lat,c=i.lng;console.log("".concat(l,": setting up single lat/lng marker lat: ").concat(u," lng: ").concat(c)),a.addMarker([c,u],i)}r.classList.add("".concat(l,"-active")),r.dispatchEvent(new Event(o)),console.log("".concat(l,": Map is loaded"))}}]),MapAPI}(),p=function init(){console.log("".concat(l,": init")),document.querySelectorAll(".".concat(l)).forEach((function(t,r){new c(t)}))};i.addEventListener("".concat(r),p),i.addEventListener("".concat(t),p)}(window)}()}(); \ No newline at end of file +!function(){var t={937:function(t,r){var o,a,i,l;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)}l=function(t){"use strict";var r="function"===typeof WeakSet,o=Object.keys;function sameValueZeroEqual(t,r){return t===r||t!==t&&r!==r}function isPlainObject(t){return t.constructor===Object||null==t.constructor}function isPromiseLike(t){return!!t&&"function"===typeof t.then}function isReactElement(t){return!(!t||!t.$$typeof)}function getNewCacheFallback(){var t=[];return{add:function add(r){t.push(r)},has:function has(r){return-1!==t.indexOf(r)}}}var a=r?function _getNewCache(){return new WeakSet}:getNewCacheFallback;function createCircularEqualCreator(t){return function createCircularEqual(r){var o=t||r;return function circularEqual(t,r,i,l,u,c,p){void 0===p&&(p=a());var d=!!t&&"object"===_typeof(t),m=!!r&&"object"===_typeof(r);if(d||m){var g=d&&p.has(t),h=m&&p.has(r);if(g||h)return g&&h;d&&p.add(t),m&&p.add(r)}return o(t,r,p)}}}var i=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function areObjectsEqual(t,r,a,l){var u=o(t),c=u.length;if(o(r).length!==c)return!1;if(c)for(var p=void 0;c-- >0;){if("_owner"===(p=u[c])){var d=isReactElement(t),m=isReactElement(r);if((d||m)&&d!==m)return!1}if(!i(r,p)||!a(t[p],r[p],p,p,t,r,l))return!1}return!0}var l="function"===typeof Map,u="function"===typeof Set;function createComparator(t){var r="function"===typeof t?t(comparator):function(t,r,o,a,i,l,u){return comparator(t,r,u)};function comparator(t,o,a){if(t===o)return!0;if(t&&o&&"object"===_typeof(t)&&"object"===_typeof(o)){if(isPlainObject(t)&&isPlainObject(o))return areObjectsEqual(t,o,r,a);var i=Array.isArray(t),c=Array.isArray(o);return i||c?i===c&&function areArraysEqual(t,r,o,a){var i=t.length;if(r.length!==i)return!1;for(;i-- >0;)if(!o(t[i],r[i],i,i,t,r,a))return!1;return!0}(t,o,r,a):(i=t instanceof Date,c=o instanceof Date,i||c?i===c&&sameValueZeroEqual(t.getTime(),o.getTime()):(i=t instanceof RegExp,c=o instanceof RegExp,i||c?i===c&&function areRegExpsEqual(t,r){return t.source===r.source&&t.global===r.global&&t.ignoreCase===r.ignoreCase&&t.multiline===r.multiline&&t.unicode===r.unicode&&t.sticky===r.sticky&&t.lastIndex===r.lastIndex}(t,o):isPromiseLike(t)||isPromiseLike(o)?t===o:l&&(i=t instanceof Map,c=o instanceof Map,i||c)?i===c&&function areMapsEqual(t,r,o,a){var i=t.size===r.size;if(i&&t.size){var l={},u=0;t.forEach((function(c,p){if(i){var d=!1,m=0;r.forEach((function(i,g){d||l[m]||(d=o(p,g,u,m,t,r,a)&&o(c,i,p,g,t,r,a))&&(l[m]=!0),m++})),u++,i=d}}))}return i}(t,o,r,a):u&&(i=t instanceof Set,c=o instanceof Set,i||c)?i===c&&function areSetsEqual(t,r,o,a){var i=t.size===r.size;if(i&&t.size){var l={};t.forEach((function(u,c){if(i){var p=!1,d=0;r.forEach((function(i,m){p||l[d]||(p=o(u,i,c,m,t,r,a))&&(l[d]=!0),d++})),i=p}}))}return i}(t,o,r,a):areObjectsEqual(t,o,r,a)))}return t!==t&&o!==o}return comparator}var c=createComparator(),p=createComparator((function(){return sameValueZeroEqual})),d=createComparator(createCircularEqualCreator()),m=createComparator(createCircularEqualCreator(sameValueZeroEqual));t.circularDeepEqual=d,t.circularShallowEqual=m,t.createCustomEqual=createComparator,t.deepEqual=c,t.sameValueZeroEqual=sameValueZeroEqual,t.shallowEqual=p,Object.defineProperty(t,"__esModule",{value:!0})},"object"===_typeof(r)?l(r):(a=[r],void 0===(i="function"===typeof(o=l)?o.apply(r,a):o)||(t.exports=i))}},r={};function __webpack_require__(o){var a=r[o];if(void 0!==a)return a.exports;var i=r[o]={exports:{}};return t[o].call(i.exports,i,i.exports,__webpack_require__),i.exports}!function(){"use strict";var t="ajax-load",r="load-ready",o="map-loaded",a="map-api-loaded",i="map-marker-click",l="map-popup-close";function sortKD(t,r,o,a,i,l){if(!(i-a<=o)){var u=a+i>>1;sort_select(t,r,u,a,i,l%2),sortKD(t,r,o,a,u-1,l+1),sortKD(t,r,o,u+1,i,l+1)}}function sort_select(t,r,o,a,i,l){for(;i>a;){if(i-a>600){var u=i-a+1,c=o-a+1,p=Math.log(u),d=.5*Math.exp(2*p/3),m=.5*Math.sqrt(p*d*(u-d)/u)*(c-u/2<0?-1:1);sort_select(t,r,o,Math.max(a,Math.floor(o-c*d/u+m)),Math.min(i,Math.floor(o+(u-c)*d/u+m)),l)}var g=r[2*o+l],h=a,y=i;for(swapItem(t,r,a,o),r[2*i+l]>g&&swapItem(t,r,a,i);hg;)y--}r[2*a+l]===g?swapItem(t,r,a,y):swapItem(t,r,++y,i),y<=o&&(a=y+1),o<=y&&(i=y-1)}}function swapItem(t,r,o,a){swap(t,o,a),swap(r,2*o,2*a),swap(r,2*o+1,2*a+1)}function swap(t,r,o){var a=t[r];t[r]=t[o],t[o]=a}function sqDist(t,r,o,a){var i=t-o,l=r-a;return i*i+l*l}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:u,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Float64Array;_classCallCheck(this,KDBush),this.nodeSize=a,this.points=t;for(var l=t.length<65536?Uint16Array:Uint32Array,p=this.ids=new l(t.length),d=this.coords=new i(2*t.length),m=0;m=o&&c<=i&&p>=a&&p<=l&&m.push(t[v]);else{var _=Math.floor((y+h)/2);c=r[2*_],p=r[2*_+1],c>=o&&c<=i&&p>=a&&p<=l&&m.push(t[_]);var k=(g+1)%2;(0===g?o<=c:a<=p)&&(d.push(y),d.push(_-1),d.push(k)),(0===g?i>=c:l>=p)&&(d.push(_+1),d.push(h),d.push(k))}}return m}(this.ids,this.coords,t,r,o,a,this.nodeSize)}},{key:"within",value:function within(t,r,o){return function within_within(t,r,o,a,i,l){for(var u=[0,t.length-1,0],c=[],p=i*i;u.length;){var d=u.pop(),m=u.pop(),g=u.pop();if(m-g<=l)for(var h=g;h<=m;h++)sqDist(r[2*h],r[2*h+1],o,a)<=p&&c.push(t[h]);else{var y=Math.floor((g+m)/2),v=r[2*y],_=r[2*y+1];sqDist(v,_,o,a)<=p&&c.push(t[y]);var k=(d+1)%2;(0===d?o-i<=v:a-i<=_)&&(u.push(g),u.push(y-1),u.push(k)),(0===d?o+i>=v:a+i>=_)&&(u.push(y+1),u.push(m),u.push(k))}}return c}(this.ids,this.coords,t,r,o,this.nodeSize)}}]),KDBush}();function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var o=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==o)return;var a,i,l=[],u=!0,c=!1;try{for(o=o.call(t);!(u=(a=o.next()).done)&&(l.push(a.value),!r||l.length!==r);u=!0);}catch(p){c=!0,i=p}finally{try{u||null==o.return||o.return()}finally{if(c)throw i}}return l}(t,r)||_unsupportedIterableToArray(t,r)||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,r){var o="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=_unsupportedIterableToArray(t))||r&&t&&"number"===typeof t.length){o&&(t=o);var a=0,i=function F(){};return{s:i,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:i}}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,c=!1;return{s:function s(){o=o.call(t)},n:function n(){var t=o.next();return u=t.done,t},e:function e(t){c=!0,l=t},f:function f(){try{u||null==o.return||o.return()}finally{if(c)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"===typeof t)return _arrayLikeToArray(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var o=0,a=new Array(r);o=a;k--){var b=+Date.now();v=this._cluster(v,k),this.trees[k]=new p(v,getX,getY,l,Float32Array),o&&console.log("z%d: %d clusters in %dms",k,v.length,+Date.now()-b)}return o&&console.timeEnd("total time"),this}},{key:"getClusters",value:function getClusters(t,r){var o=((t[0]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,l=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)o=-180,i=180;else if(o>i){var u=this.getClusters([o,a,180,l],r),c=this.getClusters([-180,a,i,l],r);return u.concat(c)}var p,d=this.trees[this._limitZoom(r)],m=[],g=_createForOfIteratorHelper(d.range(lngX(o),latY(l),lngX(i),latY(a)));try{for(g.s();!(p=g.n()).done;){var h=p.value,y=d.points[h];m.push(y.numPoints?getClusterJSON(y):this.points[y.index])}}catch(v){g.e(v)}finally{g.f()}return m}},{key:"getChildren",value:function getChildren(t){var r=this._getOriginId(t),o=this._getOriginZoom(t),a="No cluster with the specified id.",i=this.trees[o];if(!i)throw new Error(a);var l=i.points[r];if(!l)throw new Error(a);var u,c=this.options.radius/(this.options.extent*Math.pow(2,o-1)),p=[],d=_createForOfIteratorHelper(i.within(l.x,l.y,c));try{for(d.s();!(u=d.n()).done;){var m=u.value,g=i.points[m];g.parentId===t&&p.push(g.numPoints?getClusterJSON(g):this.points[g.index])}}catch(h){d.e(h)}finally{d.f()}if(0===p.length)throw new Error(a);return p}},{key:"getLeaves",value:function getLeaves(t,r,o){r=r||10,o=o||0;var a=[];return this._appendLeaves(a,t,r,o,0),a}},{key:"getTile",value:function getTile(t,r,o){var a=this.trees[this._limitZoom(t)],i=Math.pow(2,t),l=this.options,u=l.extent,c=l.radius/u,p=(o-c)/i,d=(o+1+c)/i,m={features:[]};return this._addTileFeatures(a.range((r-c)/i,p,(r+1+c)/i,d),a.points,r,o,i,m),0===r&&this._addTileFeatures(a.range(1-c/i,p,1,d),a.points,i,o,i,m),r===i-1&&this._addTileFeatures(a.range(0,p,c/i,d),a.points,-1,o,i,m),m.features.length?m:null}},{key:"getClusterExpansionZoom",value:function getClusterExpansionZoom(t){for(var r=this._getOriginZoom(t)-1;r<=this.options.maxZoom;){var o=this.getChildren(t);if(r++,1!==o.length)break;t=o[0].properties.cluster_id}return r}},{key:"_appendLeaves",value:function _appendLeaves(t,r,o,a,i){var l,u=_createForOfIteratorHelper(this.getChildren(r));try{for(u.s();!(l=u.n()).done;){var c=l.value,p=c.properties;if(p&&p.cluster?i+p.point_count<=a?i+=p.point_count:i=this._appendLeaves(t,p.cluster_id,o,a,i):ir&&(_+=C.numPoints||1)}}catch(Z){k.e(Z)}finally{k.f()}if(_>v&&_>=c){var x,w=m.x*v,M=m.y*v,P=u&&v>1?this._map(m,!0):null,O=(d<<5)+(r+1)+this.points.length,E=_createForOfIteratorHelper(y);try{for(E.s();!(x=E.n()).done;){var S=x.value,A=h.points[S];if(!(A.zoom<=r)){A.zoom=r;var I=A.numPoints||1;w+=A.x*I,M+=A.y*I,A.parentId=O,u&&(P||(P=this._map(m,!0)),u(P,this._map(A)))}}}catch(Z){E.e(Z)}finally{E.f()}m.parentId=O,o.push(createCluster(w/_,M/_,O,_,P))}else if(o.push(m),_>1){var j,L=_createForOfIteratorHelper(y);try{for(L.s();!(j=L.n()).done;){var T=j.value,D=h.points[T];D.zoom<=r||(D.zoom=r,o.push(D))}}catch(Z){L.e(Z)}finally{L.f()}}}}return o}},{key:"_getOriginId",value:function _getOriginId(t){return t-this.points.length>>5}},{key:"_getOriginZoom",value:function _getOriginZoom(t){return(t-this.points.length)%32}},{key:"_map",value:function _map(t,r){if(t.numPoints)return r?extend({},t.properties):t.properties;var o=this.points[t.index].properties,a=this.options.map(o);return r&&a===o?extend({},a):a}}]),Supercluster}();function createCluster(t,r,o,a,i){return{x:g(t),y:g(r),zoom:1/0,id:o,parentId:-1,numPoints:a,properties:i}}function getClusterJSON(t){return{type:"Feature",id:t.id,properties:getClusterProperties(t),geometry:{type:"Point",coordinates:[(a=t.x,360*(a-.5)),(r=t.y,o=(180-360*r)*Math.PI/180,360*Math.atan(Math.exp(o))/Math.PI-90)]}};var r,o,a}function getClusterProperties(t){var r=t.numPoints,o=r>=1e4?"".concat(Math.round(r/1e3),"k"):r>=1e3?"".concat(Math.round(r/100)/10,"k"):r;return extend(extend({},t.properties),{cluster:!0,cluster_id:t.id,point_count:r,point_count_abbreviated:o})}function lngX(t){return t/360+.5}function latY(t){var r=Math.sin(t*Math.PI/180),o=.5-.25*Math.log((1+r)/(1-r))/Math.PI;return o<0?0:o>1?1:o}function extend(t,r){for(var o in r)t[o]=r[o];return t}function getX(t){return t.x}function getY(t){return t.y}var y=__webpack_require__(937);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 index_esm_slicedToArray(t,r){return function index_esm_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function index_esm_iterableToArrayLimit(t,r){var o=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==o)return;var a,i,l=[],u=!0,c=!1;try{for(o=o.call(t);!(u=(a=o.next()).done)&&(l.push(a.value),!r||l.length!==r);u=!0);}catch(p){c=!0,i=p}finally{try{u||null==o.return||o.return()}finally{if(c)throw i}}return l}(t,r)||index_esm_unsupportedIterableToArray(t,r)||function index_esm_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 _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return index_esm_arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||index_esm_unsupportedIterableToArray(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 index_esm_unsupportedIterableToArray(t,r){if(t){if("string"===typeof t)return index_esm_arrayLikeToArray(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?index_esm_arrayLikeToArray(t,r):void 0}}function index_esm_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var o=0,a=new Array(r);othis.maxZoom&&a.zoom>this.maxZoom||(r=r||!(0,y.deepEqual)(this.state,a)),this.state=a,r&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:r}}},{key:"cluster",value:function cluster(t){var r=t.map;return this.superCluster.getClusters([-180,-90,180,90],Math.round(r.getZoom())).map(this.transformCluster.bind(this))}},{key:"transformCluster",value:function transformCluster(t){var r=index_esm_slicedToArray(t.geometry.coordinates,2),o=r[0],a=r[1],i=t.properties;if(i.cluster)return new v({markers:this.superCluster.getLeaves(i.cluster_id,1/0).map((function(t){return t.properties.marker})),position:new google.maps.LatLng({lat:a,lng:o})});var l=i.marker;return new v({markers:[l],position:l.getPosition()})}}]),SuperClusterAlgorithm}(_),C=index_esm_createClass((function ClusterStats(t,r){index_esm_classCallCheck(this,ClusterStats),this.markers={sum:t.length};var o=r.map((function(t){return t.count})),a=o.reduce((function(t,r){return t+r}),0);this.clusters={count:r.length,markers:{mean:a/r.length,sum:a,min:Math.min.apply(Math,_toConsumableArray(o)),max:Math.max.apply(Math,_toConsumableArray(o))}}})),x=function(){function DefaultRenderer(){index_esm_classCallCheck(this,DefaultRenderer)}return index_esm_createClass(DefaultRenderer,[{key:"render",value:function render(t,r){var o=t.count,a=t.position,i=o>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff",l=window.btoa('\n \n \n \n \n '));return new google.maps.Marker({position:a,icon:{url:"data:image/svg+xml;base64,".concat(l),scaledSize:new google.maps.Size(45,45)},label:{text:String(o),color:"rgba(255,255,255,0.9)",fontSize:"12px"},title:"Cluster of ".concat(o," markers"),zIndex:Number(google.maps.Marker.MAX_ZINDEX)+o})}}]),DefaultRenderer}();var w,M=index_esm_createClass((function OverlayViewSafe(){index_esm_classCallCheck(this,OverlayViewSafe),function index_esm_extend(t,r){for(var o in r.prototype)t.prototype[o]=r.prototype[o]}(OverlayViewSafe,google.maps.OverlayView)}));!function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"}(w||(w={}));var P=function defaultOnClusterClickHandler(t,r,o){o.fitBounds(r.bounds)},O=function(t){_inherits(MarkerClusterer,t);var r=_createSuper(MarkerClusterer);function MarkerClusterer(t){var o,a=t.map,i=t.markers,l=void 0===i?[]:i,u=t.algorithm,c=void 0===u?new b({}):u,p=t.renderer,d=void 0===p?new x:p,m=t.onClusterClick,g=void 0===m?P:m;return index_esm_classCallCheck(this,MarkerClusterer),(o=r.call(this)).markers=_toConsumableArray(l),o.clusters=[],o.algorithm=c,o.renderer=d,o.onClusterClick=g,a&&o.setMap(a),o}return index_esm_createClass(MarkerClusterer,[{key:"addMarker",value:function addMarker(t,r){this.markers.includes(t)||(this.markers.push(t),r||this.render())}},{key:"addMarkers",value:function addMarkers(t,r){var o=this;t.forEach((function(t){o.addMarker(t,!0)})),r||this.render()}},{key:"removeMarker",value:function removeMarker(t,r){var o=this.markers.indexOf(t);return-1!==o&&(t.setMap(null),this.markers.splice(o,1),r||this.render(),!0)}},{key:"removeMarkers",value:function removeMarkers(t,r){var o=this,a=!1;return t.forEach((function(t){a=o.removeMarker(t,!0)||a})),a&&!r&&this.render(),a}},{key:"clearMarkers",value:function clearMarkers(t){this.markers.length=0,t||this.render()}},{key:"render",value:function render(){var t=this.getMap();if(t instanceof google.maps.Map&&this.getProjection()){google.maps.event.trigger(this,w.CLUSTERING_BEGIN,this);var r=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()}),o=r.clusters,a=r.changed;(a||void 0==a)&&(this.reset(),this.clusters=o,this.renderClusters()),google.maps.event.trigger(this,w.CLUSTERING_END,this)}}},{key:"onAdd",value:function onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}},{key:"onRemove",value:function onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}},{key:"reset",value:function reset(){this.markers.forEach((function(t){return t.setMap(null)})),this.clusters.forEach((function(t){return t.delete()})),this.clusters=[]}},{key:"renderClusters",value:function renderClusters(){var t=this,r=new C(this.markers,this.clusters),o=this.getMap();this.clusters.forEach((function(a){1===a.markers.length?a.marker=a.markers[0]:(a.marker=t.renderer.render(a,r),t.onClusterClick&&a.marker.addListener("click",(function(r){google.maps.event.trigger(t,w.CLUSTER_CLICK,a),t.onClusterClick(r,a,o)}))),a.marker.setMap(o)}))}}]),MarkerClusterer}(M);function map_google_marker_typeof(t){return map_google_marker_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},map_google_marker_typeof(t)}function map_google_marker_defineProperties(t,r){for(var o=0;o',a.divClass=t.divClass,a.align=t.align,a.isDebugMode=t.debug,a.onClick=t.onClick,a.onMouseOver=t.onMouseOver,a.isBoolean=function(t){return"boolean"===typeof t},a.isNotUndefined=function(t){return"undefined"!==typeof t},a.hasContent=function(t){return t.length>0},a.isString=function(t){return"string"===typeof t},a.isFunction=function(t){return"function"===typeof t},o}return function map_google_marker_createClass(t,r,o){return r&&map_google_marker_defineProperties(t.prototype,r),o&&map_google_marker_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(GoogleMapsHtmlOverlay,[{key:"onAdd",value:function onAdd(){var t=this;t.div=document.createElement("div"),t.div.style.position="absolute",t.isNotUndefined(t.divClass)&&t.hasContent(t.divClass)&&(t.div.className=t.divClass),t.isNotUndefined(t.html)&&t.hasContent(t.html)&&t.isString(t.html)&&(t.div.innerHTML=t.html),t.isBoolean(t.isDebugMode)&&t.isDebugMode&&(t.div.className="debug-mode",t.div.innerHTML='
Debug mode
',t.div.setAttribute("style","position: absolute;border: 5px dashed red;height: 150px;width: 150px;display: flex;justify-content: center;align-items: center;")),t.getPanes().overlayMouseTarget.appendChild(t.div),google.maps.event.addDomListener(t.div,"click",(function(r){google.maps.event.trigger(t,"click"),t.isFunction(t.onClick)&&t.onClick(),r.stopPropagation()})),google.maps.event.addDomListener(t.div,"mouseover",(function(r){google.maps.event.trigger(t,"mouseover"),t.isFunction(t.onMouseOver)&&t.onMouseOver(),r.stopPropagation()}))}},{key:"draw",value:function draw(){var t=this,r=document.querySelector(".popup");r.length||(r=t.div);var o=t.getProjection();if(!o)return console.log("GoogleMapsHtmlOverlay: current map is missing"),null;var a=o.fromLatLngToDivPixel(t.getPosition()),i={y:void 0,x:void 0},l=r.offsetWidth,u=r.offsetHeight;switch(Array.isArray(t.align)?t.align.join(" "):""){case"left top":i.y=u,i.x=l;break;case"left center":i.y=u/2,i.x=l;break;case"left bottom":i.y=0,i.x=l;break;case"center top":i.y=u,i.x=l/2;break;case"center center":default:i.y=u/2,i.x=l/2;break;case"center bottom":i.y=0,i.x=l/2;break;case"right top":i.y=u,i.x=0;break;case"right center":i.y=u/2,i.x=0;break;case"right bottom":i.y=0,i.x=0}t.div.style.top="".concat(a.y-i.y,"px"),t.div.style.left="".concat(a.x-i.x,"px")}},{key:"getPosition",value:function getPosition(){return new google.maps.LatLng(this.position)}},{key:"getDiv",value:function getDiv(){return this.div}},{key:"setPosition",value:function setPosition(t,r){var o=this;o.position=t,o.align=r,o.draw()}},{key:"remove",value:function remove(){this.setMap(null),this.div.remove()}},{key:"getDraggable",value:function getDraggable(){return!1}}]),GoogleMapsHtmlOverlay}()}};function map_google_defineProperties(t,r){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:[],a=this;a.el=r,a.config=o,a.markers=[],t["init".concat(a.getName())]=function(){a.googleApiLoaded()};var i=document.createElement("script");i.src="https://maps.googleapis.com/maps/api/js?key=".concat(o.key,"&callback=init").concat(a.getName()),i.async=!0,i.defer=!0,document.head.appendChild(i)}},{key:"googleApiLoaded",value:function googleApiLoaded(){var t=this,r=t.el,o=t.config,i=r.querySelector(".mapAPI-map"),l=o.mapZoom&&"0"!==o.mapZoom?parseInt(o.mapZoom):10,u=o.center&&","!==o.center?{lat:o.center[1],lng:o.center[0]}:{lat:0,lng:0},c=o.style?o.style:null;console.log("".concat(t.getName(),": API is loaded")),t.MarkerUI=E.init(),t.map=new google.maps.Map(i,{zoom:l,center:u,fullscreenControl:!0,styles:c}),t.default_zoom=l,i.classList.add("mapboxgl-map"),t.popup=new t.MarkerUI({map:t.map,align:["center","top"],divClass:"mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none",html:'
\xd7
'}),t.popup.setMap(t.map),t.geocoder=new google.maps.Geocoder,t.cluster=new O(t.map,null,{styles:[{width:30,height:30,className:"mapboxgl-cluster"}]}),r.dispatchEvent(new Event(a))}},{key:"addMarker",value:function addMarker(t,r){var o=this,a={lat:t[1],lng:t[0]},l=new o.MarkerUI({position:a,map:o.map,align:["center","top"],html:'
').concat(r.icon,"
"),onClick:function onClick(){var t=document.querySelector("#Marker".concat(r.id));o.showPopup(a,r.content),t.dispatchEvent(new Event(i))}});return o.markers.push(l),o.cluster.addMarker(l),l}},{key:"showPopup",value:function showPopup(t,r){var o=this,a=o.popup.getDiv();o.config.flyToMarker&&(o.map.setCenter(t),o.config.noZoom||o.map.setZoom(18)),a.style.opacity="0",a.classList.remove("d-none"),a.querySelector(".mapboxgl-popup-content .html").innerHTML=r,a.querySelector(".mapboxgl-popup-close-button").addEventListener("click",(function(t){t.preventDefault(),o.hidePopup()})),o.popup.setPosition(t,["center","top"]),a.style.opacity="1",a.style["margin-top"]="-1rem"}},{key:"hidePopup",value:function hidePopup(){var t=this;t.popup.getDiv().classList.add("d-none"),t.config.noRestoreBounds&&!t.config.flyToBounds||t.restoreBounds(),t.el.dispatchEvent(new Event(l))}},{key:"geocode",value:function geocode(t,r){var o=this;o.geocoder.geocode({address:t},(function(t,a){if("OK"===a)return"function"===typeof r&&r(t),t;console.error("".concat(o.getName(),": Geocode was not successful for the following reason: ").concat(a))}))}},{key:"reverseGeocode",value:function reverseGeocode(t,r){var o=this;o.geocoder.geocode({location:latlng},(function(t,a){if("OK"===a)return"function"===typeof r&&r(t),t;console.error("".concat(o.getName(),": Reverse Geocoding was not successful for the following reason: ").concat(a))}))}},{key:"addGeoJson",value:function addGeoJson(t){var r=this,o=JSON.parse(t.geojson),a=(o.features[0].geometry.coordinates,new google.maps.LatLngBounds);o.features.forEach((function(o){var i=o.id,l=o.geometry.coordinates,u=o.properties.content;r.addMarker(l,{id:i,content:u,icon:o.icon,flyToMarker:t.flyToMarker}),a.extend({lat:l[1],lng:l[0]})})),r.markers.length>1?r.map.fitBounds(a,{padding:30}):r.markers[0]&&r.map.setCenter(r.markers[0].getPosition()),r.default_bounds=a,r.default_zoom=r.map.getZoom()}},{key:"getMap",value:function getMap(){return this.map}},{key:"getPopup",value:function getPopup(){return this.popup}},{key:"restoreBounds",value:function restoreBounds(){var t=this;t.default_bounds&&t.markers.length>1?t.map.fitBounds(t.default_bounds,{padding:30}):(t.markers[0]&&t.map.setCenter(t.markers[0].getPosition()),t.restoreZoom())}},{key:"restoreZoom",value:function restoreZoom(){this.map.setZoom(this.default_zoom)}}]),GoogleMapsDriver}();return r}(window),A={ENVS:["xs","sm","md","lg","xl","xxl","xxxl"],MAP_DRIVER:S};function map_api_defineProperties(t,r){for(var o=0;o'),console.log("".concat(l,": init ").concat(o.getName(),"...")),r.drv=o,r.el=t,r.config=c,o.init(t,c),t.addEventListener(a,(function(){r.addMarkers()}))}return function map_api_createClass(t,r,o){return r&&map_api_defineProperties(t.prototype,r),o&&map_api_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(MapAPI,[{key:"getMap",value:function getMap(){return ui.map}},{key:"dispose",value:function dispose(){this.el=null,this.el.classList.remove("".concat(l,"-active"))}},{key:"addMarkers",value:function addMarkers(){console.log("".concat(l,": addMarkers"));var t=this,r=t.el,a=t.drv,i=t.config;if(t.map=a.getMap(),i.geojson)console.log("".concat(l,": setting up geocode data")),a.addGeoJson(i);else if(i.address)console.log(i.address),console.log("".concat(l,": setting up address marker")),a.geocode(i.address,(function(r){console.log(r);var o=r[0].geometry.location.lat(),u=r[0].geometry.location.lng();console.log("".concat(l,": setting up single lat/lng marker lat: ").concat(o," lng: ").concat(u)),a.addMarker([u,o],i),t.map.setCenter({lat:o,lng:u})}));else if(i.lat&&i.lng){var u=i.lat,c=i.lng;console.log("".concat(l,": setting up single lat/lng marker lat: ").concat(u," lng: ").concat(c)),a.addMarker([c,u],i)}r.classList.add("".concat(l,"-active")),r.dispatchEvent(new Event(o)),console.log("".concat(l,": Map is loaded"))}}]),MapAPI}(),p=function init(){console.log("".concat(l,": init")),document.querySelectorAll(".".concat(l)).forEach((function(t,r){new c(t)}))};i.addEventListener("".concat(r),p),i.addEventListener("".concat(t),p)}(window)}()}(); \ No newline at end of file diff --git a/app/client/dist/js/sample.js b/app/client/dist/js/sample.js index 73101ac..3b569e0 100644 --- a/app/client/dist/js/sample.js +++ b/app/client/dist/js/sample.js @@ -1 +1 @@ -!function(){var e={103:function(e,t,n){var r={"./bg.png":669,"./logo.png":152,"./logo.svg":704,"./original.png":4,"./original2.png":129,"./photo1.png":203,"./photo2.jpg":755,"./photo3.svg":162,"app/client/src/img/bg.png":669,"app/client/src/img/logo.png":152,"app/client/src/img/logo.svg":704,"app/client/src/img/original.png":4,"app/client/src/img/original2.png":129,"app/client/src/img/photo1.png":203,"app/client/src/img/photo2.jpg":755,"app/client/src/img/photo3.svg":162,"bg.png":669,"img/bg.png":669,"img/logo.png":152,"img/logo.svg":704,"img/original.png":4,"img/original2.png":129,"img/photo1.png":203,"img/photo2.jpg":755,"img/photo3.svg":162,"logo.png":152,"logo.svg":704,"original.png":4,"original2.png":129,"photo1.png":203,"photo2.jpg":755,"photo3.svg":162};function webpackContext(e){var t=webpackContextResolve(e);return n(t)}function webpackContextResolve(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}webpackContext.keys=function webpackContextKeys(){return Object.keys(r)},webpackContext.resolve=webpackContextResolve,e.exports=webpackContext,webpackContext.id=103},398:function(e,t,n){"use strict";var r={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(e){var t="_main.visibility",n=document,o=n.body;n.addEventListener("visibilitychange",(function(){"hidden"===n.visibilityState?(console.log("".concat(t,": Tab: hidden")),o.classList.add("is-hidden"),o.classList.remove("is-focused"),e.dispatchEvent(new Event(r.TABHIDDEN))):(console.log("".concat(t,": Tab: focused")),o.classList.add("is-focused"),o.classList.remove("is-hidden"),e.dispatchEvent(new Event(r.TABFOCUSED)))}))}(window),function(e){var t,n,o="_main.touch",i=document,a=i.body,s=function SET_TOUCH_SCREEN(i,s){n||s===t||(i?(console.log("".concat(o,": Touch screen enabled")),a.classList.add("is-touch"),a.classList.remove("is-mouse"),e.dispatchEvent(new Event(r.TOUCHENABLE))):(console.log("".concat(o,": Touch screen disabled")),a.classList.add("is-mouse"),a.classList.remove("is-touch"),e.dispatchEvent(new Event(r.TOUCHDISABLED))),t=s,n||(n=setTimeout((function(){clearTimeout(n),n=null}),500)))};s("ontouchstart"in e||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0||e.matchMedia("(hover: none)").matches,"init"),i.addEventListener("touchend",(function(e){var t=!1;"click"!==e.type&&(t=!0),s(t,"click-touchend")})),i.addEventListener("click",(function(e){var t=!1;"click"!==e.type&&(t=!0),s(t,"click-touchend")}))}(window),{ENVS:["xs","sm","md","lg","xl","xxl","xxxl"]});function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function _unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(e,t)}(e)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.innerHeight?(n.classList.add("landscape"),n.classList.remove("portrait")):(u=!1,n.classList.add("portrait"),n.classList.remove("landscape")),console.log("".concat("_main.css-screen-size",": screen size detected ").concat(s," | landscape ").concat(u)),n.removeChild(i),s};e.addEventListener("".concat(r.LOADED),i),e.addEventListener("".concat(r.RESIZE),i)}(window);function _defineProperties(e,t){for(var n=0;n"),"color:yellow;font-size:10px"),console.info("%cENV: ".concat("production"),"color:green;font-size:10px"),console.groupCollapsed("Events"),Object.keys(r).forEach((function(e){console.info("".concat(e,": ").concat(r[e]))})),console.groupEnd("Events"),console.groupCollapsed("Consts"),Object.keys(o).forEach((function(e){console.info("".concat(e,": ").concat(o[e]))})),console.groupEnd("Events"),console.groupCollapsed("Init"),console.time("init");var n=function(){function MainUI(){!function main_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,MainUI)}return function main_createClass(e,t,n){return t&&main_defineProperties(e.prototype,t),n&&main_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(MainUI,null,[{key:"init",value:function init(){e.history.replaceState({landing:e.location.href},document.title,e.location.href),this.loaded()}},{key:"loaded",value:function loaded(){console.log("".concat("_main",": loaded"))}}]),MainUI}(),i=function documentInit(){n.init(),t.classList.add("loaded"),c.hide(),console.groupEnd("init"),console.timeEnd("init"),e.addEventListener("".concat(r.LOADED),(function(t){e.dispatchEvent(new Event(r.LODEDANDREADY))}))};"loading"===document.readyState?document.addEventListener("".concat(r.DOMLOADED),i):i(),e.addEventListener("".concat(r.AJAX),(function(){n.loaded()})),e.MainUI=n}(window);var l="ajax-load",u="load-ready";function window_toConsumableArray(e){return function window_arrayWithoutHoles(e){if(Array.isArray(e))return window_arrayLikeToArray(e)}(e)||function window_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function window_unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return window_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return window_arrayLikeToArray(e,t)}(e)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{shown:!1},r=arguments.length>1?arguments[1]:void 0;window_classCallCheck(this,MetaWindow),_defineProperty(this,"state",{content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1,collections:[],current:null,target:null,extraClass:null}),_defineProperty(this,"show",(function(){var t=e;console.log("".concat(t.name,": show")),t.setState({shown:!0}),f.dispatchEvent(new Event("{ui.name}.show"))})),_defineProperty(this,"hide",(function(){var t=e;console.log("".concat(t.name,": hide")),t.setState({shown:!1}),f.dispatchEvent(new Event("{ui.name}.hide"))})),_defineProperty(this,"next",(function(){var t=e,n=t.state.current.getAttribute("data-gallery"),r=t._currIndex();r0?r--:r=t.state.collections[n].length-1,t.state.collections[n][r].click(),console.log("".concat(t.name,": prev")),f.dispatchEvent(new Event("{ui.name}.prev"))})),_defineProperty(this,"reset",(function(){e.setState({content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1})})),_defineProperty(this,"load",(function(t){var n=e,r=n.axios;n.reset(),n.setState({loading:!0}),n.show(),r.get(t,{responseType:"arraybuffer"}).then((function(e){console.log("".concat(n.name,": response content-type: ").concat(e.headers["content-type"]));switch(e.headers["content-type"]){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":n.setContent(''),"meta-".concat(n.name,"--image"));break;case"application/json":case"application/ld+json":case"application/json; charset=UTF-8":n.setContent("".concat((!1).Content),["meta-".concat(n.name,"--text"),"meta-".concat(n.name,"--html"),"meta-".concat(n.name,"--json")]);break;case"video/mp4":n.setContent(''),["meta-".concat(n.name,"--image"),"meta-".concat(n.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":n.setContent(n._abToString(e.data),["meta-".concat(n.name,"--text"),"meta-".concat(n.name,"--html"),"meta-".concat(n.name,"--pajax")]);break;default:console.warn("".concat(n.name,": Unknown response content-type!"))}f.dispatchEvent(new Event("{ui.name}.loaded"))})).catch((function(e){console.error(e);var t="";if(e.response)switch(e.response.status){case 404:t="Not Found.";break;case 500:t="Server issue, please try again latter.";break;default:t="Something went wrong."}else e.request?t="No response received":console.warn("Error",e.message);n.setState({error:t}),f.dispatchEvent(new Event("{ui.name}.error"))})).then((function(){n.setState({loading:!1}),setTimeout((function(){n.state.current.classList.remove("loading")}),3e3)}))})),_defineProperty(this,"_currIndex",(function(){var t=e,n=t.state.current,r=n.getAttribute("data-gallery");return t.state.collections[r].indexOf(n)})),_defineProperty(this,"embed",(function(t){var n=e;console.log("".concat(n.name,": embed")),n.reset(),n.setState({embed:t,loading:!1,type:["meta-".concat(n.name,"--embed"),"meta-".concat(n.name,"--video")]}),n.show()})),_defineProperty(this,"setCaption",(function(t){var n=e;console.log("".concat(n.name,": setCaption")),n.state.caption=t})),_defineProperty(this,"addExtraClass",(function(t){var n=e;t.length&&(console.log("".concat(n.name,": addExtraClass(").concat(t,")")),n.state.extraClass=t)})),_defineProperty(this,"getCaption",(function(){return e.state.caption})),_defineProperty(this,"_abToString",(function(e){return String.fromCharCode.apply(null,new Uint8Array(e))})),_defineProperty(this,"_imageEncode",(function(e){new Uint8Array(e);return btoa([].reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),""))})),_defineProperty(this,"setContent",(function(t,n){var r=e;console.log("".concat(r.name,": setContent"));var o=n||["meta-".concat(r.name,"--html"),"meta-".concat(r.name,"--text")];Array.isArray(o)||(o=n.split(" ")),r.setState({content:t,type:o})})),_defineProperty(this,"getHtml",(function(){var t=e;if(t.state.embed){var r=n(979)(t.state.embed);t.state.content='')}return t.state.content}));var o=this;switch(o.name=o.constructor.name,console.log("".concat(o.name,": init")),o.axios=p,o.setState(t),r){case"show":case"hide":o.hide()}f.dispatchEvent(new Event("{ui.name}.init"))}return function window_createClass(e,t,n){return t&&window_defineProperties(e.prototype,t),n&&window_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(MetaWindow,[{key:"init",value:function init(){var e=this;console.log("MetaWindow: [links] init"),document.querySelectorAll('[data-toggle="lightbox"],[data-gallery="${gallery}"]').forEach((function(t){var n=t.getAttribute("data-gallery");n&&(e.state.collections[n]=[],document.querySelectorAll('[data-toggle="lightbox"][data-gallery="'.concat(n,'"]')).forEach((function(t){e.state.collections[n].push(t)}))),t.addEventListener("click",(function(t){t.preventDefault(),console.log("MetaWindow: [link] click");var n=t.currentTarget,r=n.getAttribute("href")||n.getAttribute("data-href"),o=n.getAttribute("data-embed");n.classList.add("loading"),e.state.current=n,o?e.embed(r):e.load(r);var i=n.getAttribute("data-title");i&&e.setCaption(i),e.addExtraClass(n.getAttribute("data-lightbox-class"))}))}))}},{key:"setState",value:function setState(e){var t=this;t.state=Object.assign({},t.state,e),t.render()}},{key:"render",value:function render(){var e,t=this,n=t.name,r=t.state.current;t.state.target.innerHTML="";var o=document.createElement("div");o.classList.add("meta-".concat(n)),(e=o.classList).add.apply(e,window_toConsumableArray(t.state.type)),t.state.target.append(o);var i=document.createElement("div");i.classList.add("meta-".concat(n,"-overlay")),t.state.shown&&i.classList.add("meta-".concat(n,"-overlay--open")),t.state.loading&&i.classList.add("meta-".concat(n,"-overlay--loading")),t.state.error&&i.classList.add("meta-".concat(n,"-overlay--error")),o.append(i);var a=document.createElement("div");a.classList.add("meta-content"),i.append(a);var s=document.createElement("button");if(s.classList.add("meta-nav","meta-close","a"),s.innerHTML=' Close',s.addEventListener("click",(function(e){e.preventDefault(),t.hide()})),a.append(s),r){var c=r.getAttribute("data-gallery");if(c&&t.state.collections[c].length>1){var l=document.createElement("nav");l.classList.add("meta-navs");var u=document.createElement("button");u.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__prev","a"),u.innerHTML=' Previous',u.addEventListener("click",(function(e){e.preventDefault(),t.prev()})),l.append(u);var f=document.createElement("button");f.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__next","a"),f.innerHTML=' Next',f.addEventListener("click",(function(e){e.preventDefault(),t.next()})),l.append(f),a.append(l)}}var p=document.createElement("section");if(p.classList.add("meta-wrap","typography"),t.state.extraClass&&p.classList.add(t.state.extraClass),p.innerHTML=t.getHtml(),a.append(p),t.state.error){var h=document.createElement("div");h.classList.add("meta-error"),h.innerHTML=t.state.error,a.append(h)}else if(t.state.caption){var g=document.createElement("div");g.classList.add("meta-caption"),g.innerHTML=t.getCaption(),a.append(g)}return"undefined"!==typeof window.FontAwesome&&window.FontAwesome.dom.i2svg(),t}}]),MetaWindow}(),g=h,v=document.getElementById("MetaLightboxApp");v||console.log("MetaWindow: missing container #MetaLightboxApp");var b=function init(){var e=window.MetaWindow;"undefined"===typeof e&&(e=new g({target:v}),window.MetaWindow=e),e.init()};window.addEventListener("".concat(u),b),window.addEventListener("".concat(l),b),window.addEventListener("MetaWindow.initLinks",b);function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var w="transitionend",_=function getSelector(e){var t=e.getAttribute("data-bs-target");if(!t||"#"===t){var n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n="#".concat(n.split("#")[1])),t=n&&"#"!==n?n.trim():null}return t},k=function getSelectorFromElement(e){var t=_(e);return t&&document.querySelector(t)?t:null},E=function getElementFromSelector(e){var t=_(e);return t?document.querySelector(t):null},A=function getTransitionDurationFromElement(e){if(!e)return 0;var t=window.getComputedStyle(e),n=t.transitionDuration,r=t.transitionDelay,o=Number.parseFloat(n),i=Number.parseFloat(r);return o||i?(n=n.split(",")[0],r=r.split(",")[0],1e3*(Number.parseFloat(n)+Number.parseFloat(r))):0},O=function triggerTransitionEnd(e){e.dispatchEvent(new Event(w))},S=function isElement(e){return!(!e||"object"!==_typeof(e))&&("undefined"!==typeof e.jquery&&(e=e[0]),"undefined"!==typeof e.nodeType)},C=function getElement(e){return S(e)?e.jquery?e[0]:e:"string"===typeof e&&e.length>0?document.querySelector(e):null},T=function typeCheckConfig(e,t,n){Object.keys(n).forEach((function(r){var o=n[r],i=t[r],a=i&&S(i)?"element":function toType(e){return null===e||void 0===e?"".concat(e):{}.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase()}(i);if(!new RegExp(o).test(a))throw new TypeError("".concat(e.toUpperCase(),': Option "').concat(r,'" provided type "').concat(a,'" but expected type "').concat(o,'".'))}))},P=function isVisible(e){return!(!S(e)||0===e.getClientRects().length)&&"visible"===getComputedStyle(e).getPropertyValue("visibility")},L=function reflow(e){e.offsetHeight},x=function getjQuery(){var jQuery=window.jQuery;return jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?jQuery:null},V=[],I=function isRTL(){return"rtl"===document.documentElement.dir},j=function defineJQueryPlugin(e){!function onDOMContentLoaded(e){"loading"===document.readyState?(V.length||document.addEventListener("DOMContentLoaded",(function(){V.forEach((function(e){return e()}))})),V.push(e)):e()}((function(){var $=x();if($){var t=e.NAME,n=$.fn[t];$.fn[t]=e.jQueryInterface,$.fn[t].Constructor=e,$.fn[t].noConflict=function(){return $.fn[t]=n,e.jQueryInterface}}}))},N=function execute(e){"function"===typeof e&&e()},R=function executeAfterTransition(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(n){var r=5,o=A(t)+r,i=!1,a=function handler(n){n.target===t&&(i=!0,t.removeEventListener(w,handler),N(e))};t.addEventListener(w,a),setTimeout((function(){i||O(t)}),o)}else N(e)},B=new Map,F=function set(e,t,n){B.has(e)||B.set(e,new Map);var r=B.get(e);r.has(t)||0===r.size?r.set(t,n):console.error("Bootstrap doesn't allow more than one instance per element. Bound instance: ".concat(Array.from(r.keys())[0],"."))},Y=function get(e,t){return B.has(e)&&B.get(e).get(t)||null},U=function remove(e,t){if(B.has(e)){var n=B.get(e);n.delete(t),0===n.size&&B.delete(e)}};function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function event_handler_unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return event_handler_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return event_handler_arrayLikeToArray(e,t)}(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function event_handler_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:null,r=Object.keys(e),o=0,i=r.length;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return(t=[]).concat.apply(t,selector_engine_toConsumableArray(Element.prototype.querySelectorAll.call(n,e)))},findOne:function findOne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return Element.prototype.querySelector.call(t,e)},children:function children(e,t){var n;return(n=[]).concat.apply(n,selector_engine_toConsumableArray(e.children)).filter((function(e){return e.matches(t)}))},parents:function parents(e,t){for(var parents=[],n=e.parentNode;n&&n.nodeType===Node.ELEMENT_NODE&&3!==n.nodeType;)n.matches(t)&&parents.push(n),n=n.parentNode;return parents},prev:function prev(e,t){for(var n=e.previousElementSibling;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next:function next(e,t){for(var next=e.nextElementSibling;next;){if(next.matches(t))return[next];next=next.nextElementSibling}return[]},focusableChildren:function focusableChildren(e){var t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((function(e){return"".concat(e,':not([tabindex^="-"])')})).join(", ");return this.find(t,e).filter((function(e){return!function isDisabled(e){return!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||("undefined"!==typeof e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))}(e)&&P(e)}))}},ne=te;function base_component_typeof(e){return base_component_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},base_component_typeof(e)}function base_component_defineProperties(e,t){for(var n=0;n2&&void 0!==arguments[2])||arguments[2];R(e,t,n)}}],[{key:"getInstance",value:function getInstance(e){return Y(C(e),this.DATA_KEY)}},{key:"getOrCreateInstance",value:function getOrCreateInstance(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getInstance(e)||new this(e,"object"===base_component_typeof(t)?t:null)}},{key:"VERSION",get:function get(){return"5.1.3"}},{key:"NAME",get:function get(){throw new Error('You have to implement the static method "NAME", for each component!')}},{key:"DATA_KEY",get:function get(){return"bs.".concat(this.NAME)}},{key:"EVENT_KEY",get:function get(){return".".concat(this.DATA_KEY)}}]),BaseComponent}(),oe=re;function collapse_typeof(e){return collapse_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},collapse_typeof(e)}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:this._element;return e.classList.contains(ye)}},{key:"_getConfig",value:function _getConfig(e){return(e=_objectSpread(_objectSpread(_objectSpread({},ce),ee.getDataAttributes(this._element)),e)).toggle=Boolean(e.toggle),e.parent=C(e.parent),T(ie,e,le),e}},{key:"_getDimension",value:function _getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}},{key:"_initializeChildren",value:function _initializeChildren(){var e=this;if(this._config.parent){var t=ne.find(be,this._config.parent);ne.find(we,this._config.parent).filter((function(e){return!t.includes(e)})).forEach((function(t){var n=E(t);n&&e._addAriaAndCollapsedClass([t],e._isShown(n))}))}}},{key:"_addAriaAndCollapsedClass",value:function _addAriaAndCollapsedClass(e,t){e.length&&e.forEach((function(e){t?e.classList.remove(ve):e.classList.add(ve),e.setAttribute("aria-expanded",t)}))}}],[{key:"Default",get:function get(){return ce}},{key:"NAME",get:function get(){return ie}},{key:"jQueryInterface",value:function jQueryInterface(e){return this.each((function(){var t={};"string"===typeof e&&/show|hide/.test(e)&&(t.toggle=!1);var n=Collapse.getOrCreateInstance(this,t);if("string"===typeof e){if("undefined"===typeof n[e])throw new TypeError('No method named "'.concat(e,'"'));n[e]()}}))}}]),Collapse}(oe);Q.on(document,he,we,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();var t=k(this);ne.find(t).forEach((function(e){_e.getOrCreateInstance(e,{toggle:!1}).toggle()}))})),j(_e);var ke;!function(e){var t="js-dropdown",n=function HideAll(){document.querySelectorAll(".dropdown-menu").forEach((function(e,t){e.classList.remove("show")}))},o=function Show(e){e.currentTarget.querySelector(".dropdown-menu").classList.add("show")},i=function Hide(e){e.currentTarget.querySelector(".dropdown-menu").classList.remove("show")},a=function init(){console.log("".concat(t,": init"));var e=document.querySelectorAll(".".concat(t,',[data-bs-toggle="dropdown"]')),r=document.querySelectorAll('[data-bs-toggle="hover"]'),a=function attachClickEvents(e){e.addEventListener("click",(function(e){e.preventDefault(),function Toggle(e){n(),e.querySelector(".dropdown-menu").classList.toggle("show")}(e.currentTarget.closest(".dropdown"))})),e.classList.add("".concat(t,"-active"))};document.addEventListener("click",(function(e){var t=!1,r=e.path||e.composedPath&&e.composedPath();r||console.warn("Browser does not provide event path to hide dropdowns on outside click"),r.forEach((function(e,r){t||(e===document&&n(),e.classList&&e.classList.contains("dropdown-toggle")&&(t=!0))}))})),r.forEach((function(e,n){!function attachHoverEvents(e){e.addEventListener("mouseover",o,!1),e.addEventListener("mouseout",i,!1),e.classList.add("".concat(t,"-active"))}(e.closest(".dropdown"))})),e.forEach((function(e,t){a(e)}))};e.addEventListener("".concat(r.LODEDANDREADY),a),e.addEventListener("".concat(r.AJAX),a)}(window);function carousel_typeof(e){return carousel_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},carousel_typeof(e)}function carousel_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function carousel_objectSpread(e){for(var t=1;t0,r._pointerEvent=Boolean(window.PointerEvent),r._addEventListeners(),r}return function carousel_createClass(e,t,n){return t&&carousel_defineProperties(e.prototype,t),n&&carousel_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(Carousel,[{key:"next",value:function next(){this._slide(Ce)}},{key:"nextWhenVisible",value:function nextWhenVisible(){!document.hidden&&P(this._element)&&this.next()}},{key:"prev",value:function prev(){this._slide(Te)}},{key:"pause",value:function pause(e){e||(this._isPaused=!0),ne.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(O(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}},{key:"cycle",value:function cycle(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}},{key:"to",value:function to(e){var t=this;this._activeElement=ne.findOne(Ke,this._element);var n=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)Q.one(this._element,Me,(function(){return t.to(e)}));else{if(n===e)return this.pause(),void this.cycle();var r=e>n?Ce:Te;this._slide(r,this._items[e])}}},{key:"_getConfig",value:function _getConfig(e){return e=carousel_objectSpread(carousel_objectSpread(carousel_objectSpread({},Oe),ee.getDataAttributes(this._element)),"object"===carousel_typeof(e)?e:{}),T(Ee,e,Se),e}},{key:"_handleSwipe",value:function _handleSwipe(){var e=Math.abs(this.touchDeltaX);if(!(e<=40)){var t=e/this.touchDeltaX;this.touchDeltaX=0,t&&this._slide(t>0?Le:Pe)}}},{key:"_addEventListeners",value:function _addEventListeners(){var e=this;this._config.keyboard&&Q.on(this._element,Ie,(function(t){return e._keydown(t)})),"hover"===this._config.pause&&(Q.on(this._element,je,(function(t){return e.pause(t)})),Q.on(this._element,Ne,(function(t){return e.cycle(t)}))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}},{key:"_addTouchEventListeners",value:function _addTouchEventListeners(){var e=this,t=function hasPointerPenTouch(t){return e._pointerEvent&&("pen"===t.pointerType||"touch"===t.pointerType)},n=function start(n){t(n)?e.touchStartX=n.clientX:e._pointerEvent||(e.touchStartX=n.touches[0].clientX)},r=function end(n){t(n)&&(e.touchDeltaX=n.clientX-e.touchStartX),e._handleSwipe(),"hover"===e._config.pause&&(e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout((function(t){return e.cycle(t)}),500+e._config.interval))};ne.find(".carousel-item img",this._element).forEach((function(e){Q.on(e,He,(function(e){return e.preventDefault()}))})),this._pointerEvent?(Q.on(this._element,Ye,(function(e){return n(e)})),Q.on(this._element,Ue,(function(e){return r(e)})),this._element.classList.add("pointer-event")):(Q.on(this._element,Re,(function(e){return n(e)})),Q.on(this._element,Be,(function(t){return function move(t){e.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-e.touchStartX}(t)})),Q.on(this._element,Fe,(function(e){return r(e)})))}},{key:"_keydown",value:function _keydown(e){if(!/input|textarea/i.test(e.target.tagName)){var t=xe[e.key];t&&(e.preventDefault(),this._slide(t))}}},{key:"_getItemIndex",value:function _getItemIndex(e){return this._items=e&&e.parentNode?ne.find(".carousel-item",e.parentNode):[],this._items.indexOf(e)}},{key:"_getItemByOrder",value:function _getItemByOrder(e,t){var n=e===Ce;return function getNextActiveElement(e,t,n,r){var o=e.indexOf(t);if(-1===o)return e[!n&&r?e.length-1:0];var i=e.length;return o+=n?1:-1,r&&(o=(o+i)%i),e[Math.max(0,Math.min(o,i-1))]}(this._items,t,n,this._config.wrap)}},{key:"_triggerSlideEvent",value:function _triggerSlideEvent(e,t){var n=this._getItemIndex(e),r=this._getItemIndex(ne.findOne(Ke,this._element));return Q.trigger(this._element,Ve,{relatedTarget:e,direction:t,from:r,to:n})}},{key:"_setActiveIndicatorElement",value:function _setActiveIndicatorElement(e){if(this._indicatorsElement){var t=ne.findOne(".active",this._indicatorsElement);t.classList.remove(ze),t.removeAttribute("aria-current");for(var n=ne.find("[data-bs-target]",this._indicatorsElement),r=0;r1?t-1:0),r=1;r=t)&&(void 0===n||e<=n)}function limitToRange(e,t,n){return en?n:e}function createTagRepeat(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=Object.keys(n).reduce((function(e,t){var o=n[t];return"function"===typeof o&&(o=o(r)),"".concat(e," ").concat(t,'="').concat(o,'"')}),e);o+="<".concat(i,">");var a=r+1;return a\s+/g,">").replace(/\s+2&&void 0!==arguments[2]?arguments[2]:0,r=new Date(e).getDay();return addDays(e,dayDiff(t,n)-dayDiff(r,n))}function startOfYearPeriod(e,t){var n=new Date(e).getFullYear();return Math.floor(n/t)*t}function regularizeDate(e,t,n){if(1!==t&&2!==t)return e;var r=new Date(e);return 1===t?n?r.setMonth(r.getMonth()+1,0):r.setDate(1):n?r.setFullYear(r.getFullYear()+1,0,0):r.setMonth(0,1),r.setHours(0,0,0,0)}var $e=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,Ze=/[\s!-/:-@[-`{-~\u5e74\u6708\u65e5]+/,Ge={},Qe={y:function y(e,t){return new Date(e).setFullYear(parseInt(t,10))},m:function m(e,t,n){var r=new Date(e),o=parseInt(t,10)-1;if(isNaN(o)){if(!t)return NaN;var i=t.toLowerCase(),a=function compareNames(e){return e.toLowerCase().startsWith(i)};if((o=n.monthsShort.findIndex(a))<0&&(o=n.months.findIndex(a)),o<0)return NaN}return r.setMonth(o),r.getMonth()!==normalizeMonth(o)?r.setDate(0):r.getTime()},d:function d(e,t){return new Date(e).setDate(parseInt(t,10))}},et={d:function d(e){return e.getDate()},dd:function dd(e){return padZero(e.getDate(),2)},D:function D(e,t){return t.daysShort[e.getDay()]},DD:function DD(e,t){return t.days[e.getDay()]},m:function m(e){return e.getMonth()+1},mm:function mm(e){return padZero(e.getMonth()+1,2)},M:function M(e,t){return t.monthsShort[e.getMonth()]},MM:function MM(e,t){return t.months[e.getMonth()]},y:function y(e){return e.getFullYear()},yy:function yy(e){return padZero(e.getFullYear(),2).slice(-2)},yyyy:function yyyy(e){return padZero(e.getFullYear(),4)}};function normalizeMonth(e){return e>-1?e%12:normalizeMonth(e+12)}function padZero(e,t){return e.toString().padStart(t,"0")}function parseFormatString(e){if("string"!==typeof e)throw new Error("Invalid date format.");if(e in Ge)return Ge[e];var t=e.split($e),n=e.match(new RegExp($e,"g"));if(0===t.length||!n)throw new Error("Invalid date format.");var r=n.map((function(e){return et[e]})),o=Object.keys(Qe).reduce((function(e,t){return n.find((function(e){return"D"!==e[0]&&e[0].toLowerCase()===t}))&&e.push(t),e}),[]);return Ge[e]={parser:function parser(e,t){var r=e.split(Ze).reduce((function(e,t,r){if(t.length>0&&n[r]){var o=n[r][0];"M"===o?e.m=t:"D"!==o&&(e[o]=t)}return e}),{});return o.reduce((function(e,n){var o=Qe[n](e,r[n],t);return isNaN(o)?e:o}),today())},formatter:function formatter(e,n){return r.reduce((function(r,o,i){return r+"".concat(t[i]).concat(o(e,n))}),"")+lastItemOf(t)}}}function date_format_parseDate(e,t,n){if(e instanceof Date||"number"===typeof e){var r=stripTime(e);return isNaN(r)?void 0:r}if(e){if("today"===e)return today();if(t&&t.toValue){var o=t.toValue(e,t,n);return isNaN(o)?void 0:stripTime(o)}return parseFormatString(t).parser(e,n)}}function date_format_formatDate(e,t,n){if(isNaN(e)||!e&&0!==e)return"";var r="number"===typeof e?new Date(e):e;return t.toDisplay?t.toDisplay(r,t,n):parseFormatString(t).formatter(r,n)}var tt=document.createRange();function parseHTML(e){return tt.createContextualFragment(e)}function getParent(e){return e.parentElement||(e.parentNode instanceof ShadowRoot?e.parentNode.host:void 0)}function isActiveElement(e){return e.getRootNode().activeElement===e}function hideElement(e){"none"!==e.style.display&&(e.style.display&&(e.dataset.styleDisplay=e.style.display),e.style.display="none")}function showElement(e){"none"===e.style.display&&(e.dataset.styleDisplay?(e.style.display=e.dataset.styleDisplay,delete e.dataset.styleDisplay):e.style.display="")}function emptyChildNodes(e){e.firstChild&&(e.removeChild(e.firstChild),emptyChildNodes(e))}function _toArray(e){return function event_arrayWithHoles(e){if(Array.isArray(e))return e}(e)||event_iterableToArray(e)||event_unsupportedIterableToArray(e)||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(e){return function event_arrayWithoutHoles(e){if(Array.isArray(e))return event_arrayLikeToArray(e)}(e)||event_iterableToArray(e)||event_unsupportedIterableToArray(e)||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(e,t){if(e){if("string"===typeof e)return event_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?event_arrayLikeToArray(e,t):void 0}}function event_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function event_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:[];return n.push(e),e.parentNode?t=e.parentNode:e.host?t=e.host:e.defaultView&&(t=e.defaultView),t?getComposedPath(t,n):n};Event.prototype.composedPath=function(){return at(this.target)}}function findFromPath(e,t,n){var r=_toArray(e),o=r[0],i=r.slice(1);return t(o)?o:o!==n&&"HTML"!==o.tagName&&0!==i.length?findFromPath(i,t,n):void 0}function findElementInEventPath(e,t){var n="function"===typeof t?t:function(e){return e instanceof Element&&e.matches(t)};return findFromPath(e.composedPath(),n,e.currentTarget)}var st={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"}},ct={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:"\xbb",orientation:"auto",pickLevel:0,prevArrow:"\xab",showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0},lt=ct.language,ut=ct.format,dt=ct.weekStart;function sanitizeDOW(e,t){return e.length<6&&t>=0&&t<7?pushUnique(e,t):e}function calcEndOfWeek(e){return(e+6)%7}function validateDate(e,t,n,r){var o=date_format_parseDate(e,t,n);return void 0!==o?o:r}function validateViewId(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=parseInt(e,10);return r>=0&&r<=n?r:t}function processOptions(e,t){var n,r=Object.assign({},e),o={},i=t.constructor.locales,a=t.rangeSideIndex,s=t.config||{},c=s.format,l=s.language,u=s.locale,f=s.maxDate,p=s.maxView,h=s.minDate,g=s.pickLevel,v=s.startView,b=s.weekStart;if(r.language&&(r.language!==l&&(i[r.language]?n=r.language:void 0===i[n=r.language.split("-")[0]]&&(n=!1)),delete r.language,n)){l=o.language=n;var w=u||i[lt];u=Object.assign({format:ut,weekStart:dt},i[lt]),l!==lt&&Object.assign(u,i[l]),o.locale=u,c===w.format&&(c=o.format=u.format),b===w.weekStart&&(b=o.weekStart=u.weekStart,o.weekEnd=calcEndOfWeek(u.weekStart))}if(r.format){var _="function"===typeof r.format.toDisplay,k="function"===typeof r.format.toValue,E=$e.test(r.format);(_&&k||E)&&(c=o.format=r.format),delete r.format}var A=g;void 0!==r.pickLevel&&(A=validateViewId(r.pickLevel,2),delete r.pickLevel),A!==g&&(A>g&&(void 0===r.minDate&&(r.minDate=h),void 0===r.maxDate&&(r.maxDate=f)),r.datesDisabled||(r.datesDisabled=[]),g=o.pickLevel=A);var O=h,S=f;if(void 0!==r.minDate){var C=dateValue(0,0,1);(O=null===r.minDate?C:validateDate(r.minDate,c,u,O))!==C&&(O=regularizeDate(O,g,!1)),delete r.minDate}if(void 0!==r.maxDate&&(void 0!==(S=null===r.maxDate?void 0:validateDate(r.maxDate,c,u,S))&&(S=regularizeDate(S,g,!0)),delete r.maxDate),S=0&&(o.maxNumberOfDates=L,o.multidate=1!==L),delete r.maxNumberOfDates}r.dateDelimiter&&(o.dateDelimiter=String(r.dateDelimiter),delete r.dateDelimiter);var x=p;void 0!==r.maxView&&(x=validateViewId(r.maxView,p),delete r.maxView),(x=g>x?g:x)!==p&&(p=o.maxView=x);var V=v;if(void 0!==r.startView&&(V=validateViewId(r.startView,V),delete r.startView),Vp&&(V=p),V!==v&&(o.startView=V),r.prevArrow){var I=parseHTML(r.prevArrow);I.childNodes.length>0&&(o.prevArrow=I.childNodes),delete r.prevArrow}if(r.nextArrow){var j=parseHTML(r.nextArrow);j.childNodes.length>0&&(o.nextArrow=j.childNodes),delete r.nextArrow}if(void 0!==r.disableTouchKeyboard&&(o.disableTouchKeyboard="ontouchstart"in document&&!!r.disableTouchKeyboard,delete r.disableTouchKeyboard),r.orientation){var N=r.orientation.toLowerCase().split(/\s+/g);o.orientation={x:N.find((function(e){return"left"===e||"right"===e}))||"auto",y:N.find((function(e){return"top"===e||"bottom"===e}))||"auto"},delete r.orientation}if(void 0!==r.todayBtnMode){switch(r.todayBtnMode){case 0:case 1:o.todayBtnMode=r.todayBtnMode}delete r.todayBtnMode}return Object.keys(r).forEach((function(e){void 0!==r[e]&&hasProperty(ct,e)&&(o[e]=r[e])})),o}var ft=optimizeTemplateHTML('
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n \n
\n
'),pt=optimizeTemplateHTML('
\n
'.concat(createTagRepeat("span",7,{class:"dow"}),'
\n
').concat(createTagRepeat("span",42),"
\n
")),ht=optimizeTemplateHTML('
\n
\n
'.concat(createTagRepeat("span",6,{class:"week"}),"
\n
"));function View_toConsumableArray(e){return function View_arrayWithoutHoles(e){if(Array.isArray(e))return View_arrayLikeToArray(e)}(e)||function View_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function View_unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return View_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return View_arrayLikeToArray(e,t)}(e)||function View_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function View_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}return function View_createClass(e,t,n){return t&&View_defineProperties(e.prototype,t),n&&View_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(View,[{key:"init",value:function init(e){void 0!==e.pickLevel&&(this.isMinView=this.id===e.pickLevel),this.setOptions(e),this.updateFocus(),this.updateSelection()}},{key:"performBeforeHook",value:function performBeforeHook(e,t,n){var r=this.beforeShow(new Date(n));switch(View_typeof(r)){case"boolean":r={enabled:r};break;case"string":r={classes:r}}if(r){if(!1===r.enabled&&(e.classList.add("disabled"),pushUnique(this.disabled,t)),r.classes){var o,i=r.classes.split(/\s+/);(o=e.classList).add.apply(o,View_toConsumableArray(i)),i.includes("disabled")&&pushUnique(this.disabled,t)}r.content&&function replaceChildNodes(e,t){emptyChildNodes(e),t instanceof DocumentFragment?e.appendChild(t):"string"===typeof t?e.appendChild(parseHTML(t)):"function"===typeof t.forEach&&t.forEach((function(t){e.appendChild(t)}))}(e,r.content)}}}]),View}();function DaysView_typeof(e){return DaysView_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},DaysView_typeof(e)}function DaysView_slicedToArray(e,t){return function DaysView_arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function DaysView_iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||DaysView_unsupportedIterableToArray(e,t)||function DaysView_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DaysView_toConsumableArray(e){return function DaysView_arrayWithoutHoles(e){if(Array.isArray(e))return DaysView_arrayLikeToArray(e)}(e)||function DaysView_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||DaysView_unsupportedIterableToArray(e)||function DaysView_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DaysView_unsupportedIterableToArray(e,t){if(e){if("string"===typeof e)return DaysView_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?DaysView_arrayLikeToArray(e,t):void 0}}function DaysView_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1])||arguments[1];if(t){var n=parseHTML(pt).firstChild;this.dow=n.firstChild,this.grid=n.lastChild,this.element.appendChild(n)}_get(DaysView_getPrototypeOf(DaysView.prototype),"init",this).call(this,e)}},{key:"setOptions",value:function setOptions(e){var t,n=this;if(hasProperty(e,"minDate")&&(this.minDate=e.minDate),hasProperty(e,"maxDate")&&(this.maxDate=e.maxDate),e.datesDisabled&&(this.datesDisabled=e.datesDisabled),e.daysOfWeekDisabled&&(this.daysOfWeekDisabled=e.daysOfWeekDisabled,t=!0),e.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=e.daysOfWeekHighlighted),void 0!==e.todayHighlight&&(this.todayHighlight=e.todayHighlight),void 0!==e.weekStart&&(this.weekStart=e.weekStart,this.weekEnd=e.weekEnd,t=!0),e.locale){var r=this.locale=e.locale;this.dayNames=r.daysMin,this.switchLabelFormat=r.titleFormat,t=!0}if(void 0!==e.beforeShowDay&&(this.beforeShow="function"===typeof e.beforeShowDay?e.beforeShowDay:void 0),void 0!==e.calendarWeeks)if(e.calendarWeeks&&!this.calendarWeeks){var o=parseHTML(ht).firstChild;this.calendarWeeks={element:o,dow:o.firstChild,weeks:o.lastChild},this.element.insertBefore(o,this.element.firstChild)}else this.calendarWeeks&&!e.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);void 0!==e.showDaysOfWeek&&(e.showDaysOfWeek?(showElement(this.dow),this.calendarWeeks&&showElement(this.calendarWeeks.dow)):(hideElement(this.dow),this.calendarWeeks&&hideElement(this.calendarWeeks.dow))),t&&Array.from(this.dow.children).forEach((function(e,t){var r=(n.weekStart+t)%7;e.textContent=n.dayNames[r],e.className=n.daysOfWeekDisabled.includes(r)?"dow disabled":"dow"}))}},{key:"updateFocus",value:function updateFocus(){var e=new Date(this.picker.viewDate),t=e.getFullYear(),n=e.getMonth(),r=dateValue(t,n,1),o=dayOfTheWeekOf(r,this.weekStart,this.weekStart);this.first=r,this.last=dateValue(t,n+1,0),this.start=o,this.focused=this.picker.viewDate}},{key:"updateSelection",value:function updateSelection(){var e=this.picker.datepicker,t=e.dates,n=e.rangepicker;this.selected=t,n&&(this.range=n.dates)}},{key:"render",value:function render(){var e=this;this.today=this.todayHighlight?today():void 0,this.disabled=DaysView_toConsumableArray(this.datesDisabled);var t=date_format_formatDate(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(t),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){var n=dayOfTheWeekOf(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach((function(e,t){e.textContent=function getWeek(e){var t=dayOfTheWeekOf(e,4,1),n=dayOfTheWeekOf(new Date(t).setMonth(0,4),4,1);return Math.round((t-n)/6048e5)+1}(function addWeeks(e,t){return addDays(e,7*t)}(n,t))}))}Array.from(this.grid.children).forEach((function(t,n){var r=t.classList,o=addDays(e.start,n),i=new Date(o),a=i.getDay();if(t.className="datepicker-cell ".concat(e.cellClass),t.dataset.date=o,t.textContent=i.getDate(),oe.last&&r.add("next"),e.today===o&&r.add("today"),(oe.maxDate||e.disabled.includes(o))&&r.add("disabled"),e.daysOfWeekDisabled.includes(a)&&(r.add("disabled"),pushUnique(e.disabled,o)),e.daysOfWeekHighlighted.includes(a)&&r.add("highlighted"),e.range){var s=DaysView_slicedToArray(e.range,2),c=s[0],l=s[1];o>c&&on&&oe.length)&&(t=e.length);for(var n=0,r=new Array(t);nt||s1&&void 0!==arguments[1])||arguments[1];t&&(this.grid=this.element,this.element.classList.add("months","datepicker-grid"),this.grid.appendChild(parseHTML(createTagRepeat("span",12,{"data-month":function dataMonth(e){return e}})))),MonthsView_get(MonthsView_getPrototypeOf(MonthsView.prototype),"init",this).call(this,e)}},{key:"setOptions",value:function setOptions(e){if(e.locale&&(this.monthNames=e.locale.monthsShort),hasProperty(e,"minDate"))if(void 0===e.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{var t=new Date(e.minDate);this.minYear=t.getFullYear(),this.minMonth=t.getMonth(),this.minDate=t.setDate(1)}if(hasProperty(e,"maxDate"))if(void 0===e.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{var n=new Date(e.maxDate);this.maxYear=n.getFullYear(),this.maxMonth=n.getMonth(),this.maxDate=dateValue(this.maxYear,this.maxMonth+1,0)}this.isMinView?e.datesDisabled&&(this.datesDisabled=e.datesDisabled):this.datesDisabled=[],void 0!==e.beforeShowMonth&&(this.beforeShow="function"===typeof e.beforeShowMonth?e.beforeShowMonth:void 0)}},{key:"updateFocus",value:function updateFocus(){var e=new Date(this.picker.viewDate);this.year=e.getFullYear(),this.focused=e.getMonth()}},{key:"updateSelection",value:function updateSelection(){var e=this.picker.datepicker,t=e.dates,n=e.rangepicker;this.selected=t.reduce((function(e,t){var n=new Date(t),r=n.getFullYear(),o=n.getMonth();return void 0===e[r]?e[r]=[o]:pushUnique(e[r],o),e}),{}),n&&n.dates&&(this.range=n.dates.map((function(e){var t=new Date(e);return isNaN(t)?void 0:[t.getFullYear(),t.getMonth()]})))}},{key:"render",value:function render(){var e=this;this.disabled=this.datesDisabled.reduce((function(t,n){var r=new Date(n);return e.year===r.getFullYear()&&t.push(r.getMonth()),t}),[]),this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);var t=this.selected[this.year]||[],n=this.yearthis.maxYear,r=this.year===this.minYear,o=this.year===this.maxYear,i=computeMonthRange(this.range,this.year);Array.from(this.grid.children).forEach((function(a,s){var c=a.classList,l=dateValue(e.year,s,1);if(a.className="datepicker-cell ".concat(e.cellClass),e.isMinView&&(a.dataset.date=l),a.textContent=e.monthNames[s],(n||r&&se.maxMonth||e.disabled.includes(s))&&c.add("disabled"),i){var u=MonthsView_slicedToArray(i,2),f=u[0],p=u[1];s>f&&sr&&ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1])||arguments[1];t&&(this.navStep=10*this.step,this.beforeShowOption="beforeShow".concat(toTitleCase(this.cellClass)),this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid"),this.grid.appendChild(parseHTML(createTagRepeat("span",12)))),YearsView_get(YearsView_getPrototypeOf(YearsView.prototype),"init",this).call(this,e)}},{key:"setOptions",value:function setOptions(e){if(hasProperty(e,"minDate")&&(void 0===e.minDate?this.minYear=this.minDate=void 0:(this.minYear=startOfYearPeriod(e.minDate,this.step),this.minDate=dateValue(this.minYear,0,1))),hasProperty(e,"maxDate")&&(void 0===e.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=startOfYearPeriod(e.maxDate,this.step),this.maxDate=dateValue(this.maxYear,11,31))),this.isMinView?e.datesDisabled&&(this.datesDisabled=e.datesDisabled):this.datesDisabled=[],void 0!==e[this.beforeShowOption]){var t=e[this.beforeShowOption];this.beforeShow="function"===typeof t?t:void 0}}},{key:"updateFocus",value:function updateFocus(){var e=new Date(this.picker.viewDate),t=startOfYearPeriod(e,this.navStep),n=t+9*this.step;this.first=t,this.last=n,this.start=t-this.step,this.focused=startOfYearPeriod(e,this.step)}},{key:"updateSelection",value:function updateSelection(){var e=this,t=this.picker.datepicker,n=t.dates,r=t.rangepicker;this.selected=n.reduce((function(t,n){return pushUnique(t,startOfYearPeriod(n,e.step))}),[]),r&&r.dates&&(this.range=r.dates.map((function(t){if(void 0!==t)return startOfYearPeriod(t,e.step)})))}},{key:"render",value:function render(){var e=this;this.disabled=this.datesDisabled.map((function(e){return new Date(e).getFullYear()})),this.picker.setViewSwitchLabel("".concat(this.first,"-").concat(this.last)),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach((function(t,n){var r=t.classList,o=e.start+n*e.step,i=dateValue(o,0,1);if(t.className="datepicker-cell ".concat(e.cellClass),e.isMinView&&(t.dataset.date=i),t.textContent=t.dataset.year=o,0===n?r.add("prev"):11===n&&r.add("next"),(oe.maxYear||e.disabled.includes(o))&&r.add("disabled"),e.range){var a=YearsView_slicedToArray(e.range,2),s=a[0],c=a[1];o>s&&on&&oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?lastItemOf(t):n.defaultViewDate,n.minDate,n.maxDate)}function setViewDate(e,t){var n=new Date(e.viewDate),r=new Date(t),o=e.currentView,i=o.id,a=o.year,s=o.first,c=o.last,l=r.getFullYear();switch(e.viewDate=t,l!==n.getFullYear()&&triggerDatepickerEvent(e.datepicker,"changeYear"),r.getMonth()!==n.getMonth()&&triggerDatepickerEvent(e.datepicker,"changeMonth"),i){case 0:return tc;case 1:return l!==a;default:return lc}}function getTextDirection(e){return window.getComputedStyle(e).direction}function findScrollParents(e){var t=getParent(e);if(t!==document.body&&t)return"visible"!==window.getComputedStyle(t).overflow?t:findScrollParents(t)}var _t=function(){function Picker(e){!function Picker_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Picker);var t=(this.datepicker=e).config,n=ft.replace(/%buttonClass%/g,t.buttonClass),r=this.element=parseHTML(n).firstChild,o=Picker_slicedToArray(r.firstChild.children,3),i=o[0],a=o[1],s=o[2],c=i.firstElementChild,l=Picker_slicedToArray(i.lastElementChild.children,3),u=l[0],f=l[1],p=l[2],h=Picker_slicedToArray(s.firstChild.children,2),g={title:c,prevBtn:u,viewSwitch:f,nextBtn:p,todayBtn:h[0],clearBtn:h[1]};this.main=a,this.controls=g;var v=e.inline?"inline":"dropdown";r.classList.add("datepicker-".concat(v)),processPickerOptions(this,t),this.viewDate=computeResetViewDate(e),registerListeners(e,[[r,"mousedown",onMousedownPicker],[a,"click",onClickView.bind(null,e)],[g.viewSwitch,"click",onClickViewSwitch.bind(null,e)],[g.prevBtn,"click",onClickPrevBtn.bind(null,e)],[g.nextBtn,"click",onClickNextBtn.bind(null,e)],[g.todayBtn,"click",onClickTodayBtn.bind(null,e)],[g.clearBtn,"click",onClickClearBtn.bind(null,e)]]),this.views=[new mt(this),new gt(this),new vt(this,{id:2,name:"years",cellClass:"year",step:1}),new vt(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[t.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),t.container?t.container.appendChild(this.element):e.inputField.after(this.element)}return function Picker_createClass(e,t,n){return t&&Picker_defineProperties(e.prototype,t),n&&Picker_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(Picker,[{key:"setOptions",value:function setOptions(e){processPickerOptions(this,e),this.views.forEach((function(t){t.init(e,!1)})),this.currentView.render()}},{key:"detach",value:function detach(){this.element.remove()}},{key:"show",value:function show(){if(!this.active){var e=this.datepicker,t=this.element;if(e.inline)t.classList.add("active");else{var n=getTextDirection(e.inputField);n!==getTextDirection(getParent(t))?t.dir=n:t.dir&&t.removeAttribute("dir"),t.style.visiblity="hidden",t.classList.add("active"),this.place(),t.style.visiblity="",e.config.disableTouchKeyboard&&e.inputField.blur()}this.active=!0,triggerDatepickerEvent(e,"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 e=this.element,t=e.classList,n=e.offsetParent,r=e.style,o=this.datepicker,i=o.config,a=o.inputField,s=this.element.getBoundingClientRect(),c=s.width,l=s.height,u=a.getBoundingClientRect(),f=u.left,p=u.top,h=u.right,g=u.bottom,v=u.width,b=u.height,w=i.orientation,_=w.x,k=w.y,E=f,A=p;if(n!==document.body&&n){var O=n.getBoundingClientRect();E-=O.left-n.scrollLeft,A-=O.top-n.scrollTop}else E+=window.scrollX,A+=window.scrollY;var S=findScrollParents(a),C=0,T=0,P=document.documentElement,L=P.clientWidth,x=P.clientHeight;if(S){var V=S.getBoundingClientRect();V.top>0&&(T=V.top),V.left>0&&(C=V.left),V.rightL?(_="right",LT&&g+l>x?"top":"bottom"),"top"===k?A-=l:A+=b,t.remove.apply(t,Picker_toConsumableArray(Object.values(bt))),t.add(bt[_],bt[k]),r.left=wt(E),r.top=wt(A)}},{key:"setViewSwitchLabel",value:function setViewSwitchLabel(e){this.controls.viewSwitch.textContent=e}},{key:"setPrevBtnDisabled",value:function setPrevBtnDisabled(e){this.controls.prevBtn.disabled=e}},{key:"setNextBtnDisabled",value:function setNextBtnDisabled(e){this.controls.nextBtn.disabled=e}},{key:"changeView",value:function changeView(e){var t=this.currentView,n=this.views[e];return n.id!==t.id&&(this.currentView=n,this._renderMethod="render",triggerDatepickerEvent(this.datepicker,"changeView"),this.main.replaceChild(n.element,t.element)),this}},{key:"changeFocus",value:function changeFocus(e){return this._renderMethod=setViewDate(this,e)?"render":"refreshFocus",this.views.forEach((function(e){e.updateFocus()})),this}},{key:"update",value:function update(){var e=computeResetViewDate(this.datepicker);return this._renderMethod=setViewDate(this,e)?"render":"refresh",this.views.forEach((function(e){e.updateFocus(),e.updateSelection()})),this}},{key:"render",value:function render(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e&&this._renderMethod||"render";delete this._renderMethod,this.currentView[t]()}}]),Picker}();function findNextAvailableOne(e,t,n,r,o,i){if(isInRange(e,o,i))return r(e)?findNextAvailableOne(t(e,n),t,n,r,o,i):e}function moveByArrowKey(e,t,n,r){var o,i,a=e.picker,s=a.currentView,c=s.step||1,l=a.viewDate;switch(s.id){case 0:l=r?addDays(l,7*n):t.ctrlKey||t.metaKey?addYears(l,n):addDays(l,n),o=addDays,i=function testFn(e){return s.disabled.includes(e)};break;case 1:l=addMonths(l,r?4*n:n),o=addMonths,i=function testFn(e){var t=new Date(e),n=s.year,r=s.disabled;return t.getFullYear()===n&&r.includes(t.getMonth())};break;default:l=addYears(l,n*(r?4:1)*c),o=addYears,i=function testFn(e){return s.disabled.includes(startOfYearPeriod(e,c))}}void 0!==(l=findNextAvailableOne(l,o,n<0?-c:c,i,s.minDate,s.maxDate))&&a.changeFocus(l).render()}function onKeydown(e,t){var n=t.key;if("Tab"!==n){var r=e.picker,o=r.currentView,i=o.id,a=o.isMinView;if(r.active){if(e.editMode)return void("Enter"===n?e.exitEditMode({update:!0,autohide:e.config.autohide}):"Escape"===n&&r.hide());if("ArrowLeft"===n)if(t.ctrlKey||t.metaKey)goToPrevOrNext(e,-1);else{if(t.shiftKey)return void e.enterEditMode();moveByArrowKey(e,t,-1,!1)}else if("ArrowRight"===n)if(t.ctrlKey||t.metaKey)goToPrevOrNext(e,1);else{if(t.shiftKey)return void e.enterEditMode();moveByArrowKey(e,t,1,!1)}else if("ArrowUp"===n)if(t.ctrlKey||t.metaKey)switchView(e);else{if(t.shiftKey)return void e.enterEditMode();moveByArrowKey(e,t,-1,!0)}else if("ArrowDown"===n){if(t.shiftKey&&!t.ctrlKey&&!t.metaKey)return void e.enterEditMode();moveByArrowKey(e,t,1,!0)}else{if("Enter"!==n)return void("Escape"===n?r.hide():"Backspace"!==n&&"Delete"!==n&&(1!==n.length||t.ctrlKey||t.metaKey)||e.enterEditMode());if(a)return void e.setDate(r.viewDate);r.changeView(i-1).render()}}else{if("ArrowDown"!==n)return void("Enter"===n?e.update():"Escape"===n&&r.show());r.show()}t.preventDefault()}else unfocus(e)}function onFocus(e){e.config.showOnFocus&&!e._showing&&e.show()}function onMousedown(e,t){var n=t.target;(e.picker.active||e.config.showOnClick)&&(n._active=isActiveElement(n),n._clicking=setTimeout((function(){delete n._active,delete n._clicking}),2e3))}function onClickInput(e,t){var n=t.target;n._clicking&&(clearTimeout(n._clicking),delete n._clicking,n._active&&e.enterEditMode(),delete n._active,e.config.showOnClick&&e.show())}function onPaste(e,t){t.clipboardData.types.includes("text/plain")&&e.enterEditMode()}function onClickOutside(e,t){var n=e.element,r=e.picker;if(r.active||isActiveElement(n)){var o=r.element;findElementInEventPath(t,(function(e){return e===n||e===o}))||unfocus(e)}}function Datepicker_typeof(e){return Datepicker_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Datepicker_typeof(e)}function Datepicker_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Datepicker_defineProperties(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=e.config,o=e.dates,i=e.rangeSideIndex;if(0===t.length)return n?[]:void 0;var a=t.reduce((function(e,t){var n=date_format_parseDate(t,r.format,r.locale);return void 0===n||!isInRange(n=regularizeDate(n,r.pickLevel,i),r.minDate,r.maxDate)||e.includes(n)||r.datesDisabled.includes(n)||!(r.pickLevel>0)&&r.daysOfWeekDisabled.includes(new Date(n).getDay())||e.push(n),e}),[]);return 0!==a.length?(r.multidate&&!n&&(a=a.reduce((function(e,t){return o.includes(t)||e.push(t),e}),o.filter((function(e){return!a.includes(e)})))),r.maxNumberOfDates&&a.length>r.maxNumberOfDates?a.slice(-1*r.maxNumberOfDates):a):void 0}function refreshUI(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e.config,o=e.picker,i=e.inputField;if(2&t){var a=o.active?r.pickLevel:r.startView;o.update().changeView(a).render(n)}1&t&&i&&(i.value=stringifyDates(e.dates,r))}function _setDate(e,t,n){var r=n.clear,o=n.render,i=n.autohide,a=n.revert;void 0===o&&(o=!0),o?void 0===i&&(i=e.config.autohide):i=!1;var s=processInputDates(e,t,r);(s||a)&&(s&&s.toString()!==e.dates.toString()?(e.dates=s,refreshUI(e,o?3:1),triggerDatepickerEvent(e,"changeDate")):refreshUI(e,1),i&&e.hide())}var kt=function(){function Datepicker(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;Datepicker_classCallCheck(this,Datepicker),e.datepicker=this,this.element=e;var r,o,i=this.config=Object.assign({buttonClass:t.buttonClass&&String(t.buttonClass)||"button",container:null,defaultViewDate:today(),maxDate:void 0,minDate:void 0},processOptions(ct,this)),a=this.inline="INPUT"!==e.tagName;if(a?i.container=e:(t.container&&(i.container=t.container instanceof HTMLElement?t.container:document.querySelector(t.container)),(r=this.inputField=e).classList.add("datepicker-input")),n){var s=n.inputs.indexOf(r),c=n.datepickers;if(s<0||s>1||!Array.isArray(c))throw Error("Invalid rangepicker object.");c[s]=this,Object.defineProperty(this,"rangepicker",{get:function get(){return n}}),Object.defineProperty(this,"rangeSideIndex",{get:function get(){return s}})}this._options=t,Object.assign(i,processOptions(t,this)),a?(o=stringToArray(e.dataset.date,i.dateDelimiter),delete e.dataset.date):o=stringToArray(r.value,i.dateDelimiter),this.dates=[];var l=processInputDates(this,o);l&&l.length>0&&(this.dates=l),r&&(r.value=stringifyDates(this.dates,i));var u=this.picker=new _t(this);if(a)this.show();else{var f=onClickOutside.bind(null,this),p=[[r,"keydown",onKeydown.bind(null,this)],[r,"focus",onFocus.bind(null,this)],[r,"mousedown",onMousedown.bind(null,this)],[r,"click",onClickInput.bind(null,this)],[r,"paste",onPaste.bind(null,this)],[document,"mousedown",f],[document,"touchstart",f],[window,"resize",u.place.bind(u)]];registerListeners(this,p)}}return function Datepicker_createClass(e,t,n){return t&&Datepicker_defineProperties(e.prototype,t),n&&Datepicker_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(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(e){var t=this.picker,n=processOptions(e,this);Object.assign(this._options,e),Object.assign(this.config,n),t.setOptions(n),refreshUI(this,3)}},{key:"show",value:function show(){if(this.inputField){if(this.inputField.disabled)return;isActiveElement(this.inputField)||this.config.disableTouchKeyboard||(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}},{key:"hide",value:function hide(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}},{key:"destroy",value:function destroy(){return this.hide(),function unregisterListeners(e){var t=nt.get(e);t&&(t.forEach((function(e){it.call.apply(it,event_toConsumableArray(e))})),nt.delete(e))}(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}},{key:"getDate",value:function getDate(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=t?function(n){return date_format_formatDate(n,t,e.config.locale)}:function(e){return new Date(e)};return this.config.multidate?this.dates.map(n):this.dates.length>0?n(this.dates[0]):void 0}},{key:"setDate",value:function setDate(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline){var t=Object.assign(e||{},{clear:!0,render:!0}),n=stringToArray(this.inputField.value,this.config.dateDelimiter);_setDate(this,n,t)}}},{key:"refresh",value:function refresh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&"string"!==typeof e&&(t=e,e=void 0),refreshUI(this,"picker"===e?2:"input"===e?1:3,!t)}},{key:"enterEditMode",value:function enterEditMode(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit"))}},{key:"exitEditMode",value:function exitEditMode(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline&&this.editMode){var t=Object.assign({update:!1},e);delete this.editMode,this.inputField.classList.remove("in-edit"),t.update&&this.update(t)}}}],[{key:"formatDate",value:function formatDate(e,t,n){return date_format_formatDate(e,t,n&&st[n]||st.en)}},{key:"parseDate",value:function parseDate(e,t,n){return date_format_parseDate(e,t,n&&st[n]||st.en)}},{key:"locales",get:function get(){return st}}]),Datepicker}(),Et=function init(){document.querySelectorAll(".js-datepicker").forEach((function(e,t){var n=new kt(e);e.ui=n}))};window.addEventListener("".concat(r.LODEDANDREADY),Et),window.addEventListener("".concat(r.AJAX),Et);var Dt=n(641);!function(e){var t,n="main.online",o=document,i=o.body,a=o.querySelector('meta[name="ping"]'),s=!1,c=function UPDATE_ONLINE_STATUS(o){s||(s=!0,o?(i.classList.contains("is-offline")?(console.log("".concat(n,": back Online")),e.dispatchEvent(new Event(r.BACKONLINE))):(console.log("".concat(n,": Online")),e.dispatchEvent(new Event(r.ONLINE))),i.classList.add("is-online"),i.classList.remove("is-offline"),a&&!t&&(console.log("".concat(n,": SESSION_PING is active")),t=setInterval(u,3e5))):(console.log("".concat(n,": Offline")),i.classList.add("is-offline"),i.classList.remove("is-online"),clearInterval(t),t=null,e.dispatchEvent(new Event(r.OFFLINE))),s=!1)},l=!1,u=function SESSION_PING(){if(!l&&!i.classList.contains("is-offline")){var e=a.getAttribute("content");console.log("".concat(n,": session ping")),l=!0,Dt.post(e,{}).then((function(e){l=!1,c(!0)})).catch((function(e){console.error(e),console.warn("".concat(n,": SESSION_PING failed")),l=!1,c(!1)}))}},f=function navigatorStateUpdate(){"undefined"!==typeof navigator.onLine&&(navigator.onLine?c(!0):c(!1))};e.addEventListener("".concat(r.OFFLINE),(function(){c(!1)})),e.addEventListener("".concat(r.ONLINE),(function(){c(!0)})),e.addEventListener("".concat(r.LOADED),f),e.addEventListener("".concat(r.AJAX),f)}(window);function image_defineProperties(e,t){for(var n=0;n=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function forEachMethodNoData(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function forEachMethodWithData(e){c.headers[e]=r.merge(s)})),e.exports=c},985:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},853:function(e){e.exports={version:"0.26.1"}},344:function(e){"use strict";e.exports=function bind(e,t){return function wrap(){for(var n=new Array(arguments.length),r=0;r=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},314:function(e){"use strict";e.exports=function spread(e){return function wrap(t){return e.apply(null,t)}}},62:function(e,t,n){"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var r=n(853).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function validator(n){return _typeof(n)===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function transitional(e,t,n){function formatMessage(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,o){if(!1===e)throw new Error(formatMessage(r," has been removed"+(t?" in "+t:"")));return t&&!i[r]&&(i[r]=!0,console.warn(formatMessage(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}},e.exports={assertOptions:function assertOptions(e,t,n){if("object"!==_typeof(e))throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],c=void 0===s||a(s,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},642:function(e,t,n){"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var r=n(344),o=Object.prototype.toString;function isArray(e){return Array.isArray(e)}function isUndefined(e){return"undefined"===typeof e}function isArrayBuffer(e){return"[object ArrayBuffer]"===o.call(e)}function isObject(e){return null!==e&&"object"===_typeof(e)}function isPlainObject(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function isFunction(e){return"[object Function]"===o.call(e)}function forEach(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==_typeof(e)&&(e=[e]),isArray(e))for(var n=0,r=e.length;n0||navigator.msMaxTouchPoints>0||e.matchMedia("(hover: none)").matches,"init"),i.addEventListener("touchend",(function(e){var t=!1;"click"!==e.type&&(t=!0),s(t,"click-touchend")})),i.addEventListener("click",(function(e){var t=!1;"click"!==e.type&&(t=!0),s(t,"click-touchend")}))}(window),{ENVS:["xs","sm","md","lg","xl","xxl","xxxl"]});function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function _unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(e,t)}(e)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.innerHeight?(n.classList.add("landscape"),n.classList.remove("portrait")):(u=!1,n.classList.add("portrait"),n.classList.remove("landscape")),console.log("".concat("_main.css-screen-size",": screen size detected ").concat(s," | landscape ").concat(u)),n.removeChild(i),s};e.addEventListener("".concat(r.LOADED),i),e.addEventListener("".concat(r.RESIZE),i)}(window);function _defineProperties(e,t){for(var n=0;n"),"color:yellow;font-size:10px"),console.info("%cENV: ".concat("production"),"color:green;font-size:10px"),console.groupCollapsed("Events"),Object.keys(r).forEach((function(e){console.info("".concat(e,": ").concat(r[e]))})),console.groupEnd("Events"),console.groupCollapsed("Consts"),Object.keys(o).forEach((function(e){console.info("".concat(e,": ").concat(o[e]))})),console.groupEnd("Events"),console.groupCollapsed("Init"),console.time("init");var n=function(){function MainUI(){!function main_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,MainUI)}return function main_createClass(e,t,n){return t&&main_defineProperties(e.prototype,t),n&&main_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(MainUI,null,[{key:"init",value:function init(){e.history.replaceState({landing:e.location.href},document.title,e.location.href),this.loaded()}},{key:"loaded",value:function loaded(){console.log("".concat("_main",": loaded"))}}]),MainUI}(),i=function documentInit(){n.init(),t.classList.add("loaded"),c.hide(),console.groupEnd("init"),console.timeEnd("init"),e.addEventListener("".concat(r.LOADED),(function(t){e.dispatchEvent(new Event(r.LODEDANDREADY))}))};"loading"===document.readyState?document.addEventListener("".concat(r.DOMLOADED),i):i(),e.addEventListener("".concat(r.AJAX),(function(){n.loaded()})),e.MainUI=n}(window);var l="ajax-load",u="load-ready";function window_toConsumableArray(e){return function window_arrayWithoutHoles(e){if(Array.isArray(e))return window_arrayLikeToArray(e)}(e)||function window_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function window_unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return window_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return window_arrayLikeToArray(e,t)}(e)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{shown:!1},r=arguments.length>1?arguments[1]:void 0;window_classCallCheck(this,MetaWindow),_defineProperty(this,"state",{content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1,collections:[],current:null,target:null,extraClass:null}),_defineProperty(this,"show",(function(){var t=e;console.log("".concat(t.name,": show")),t.setState({shown:!0}),f.dispatchEvent(new Event("{ui.name}.show"))})),_defineProperty(this,"hide",(function(){var t=e;console.log("".concat(t.name,": hide")),t.setState({shown:!1}),f.dispatchEvent(new Event("{ui.name}.hide"))})),_defineProperty(this,"next",(function(){var t=e,n=t.state.current.getAttribute("data-gallery"),r=t._currIndex();r0?r--:r=t.state.collections[n].length-1,t.state.collections[n][r].click(),console.log("".concat(t.name,": prev")),f.dispatchEvent(new Event("{ui.name}.prev"))})),_defineProperty(this,"reset",(function(){e.setState({content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1})})),_defineProperty(this,"load",(function(t){var n=e,r=n.axios;n.reset(),n.setState({loading:!0}),n.show(),r.get(t,{responseType:"arraybuffer"}).then((function(e){console.log("".concat(n.name,": response content-type: ").concat(e.headers["content-type"]));switch(e.headers["content-type"]){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":n.setContent(''),"meta-".concat(n.name,"--image"));break;case"application/json":case"application/ld+json":case"application/json; charset=UTF-8":n.setContent("".concat((!1).Content),["meta-".concat(n.name,"--text"),"meta-".concat(n.name,"--html"),"meta-".concat(n.name,"--json")]);break;case"video/mp4":n.setContent(''),["meta-".concat(n.name,"--image"),"meta-".concat(n.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":n.setContent(n._abToString(e.data),["meta-".concat(n.name,"--text"),"meta-".concat(n.name,"--html"),"meta-".concat(n.name,"--pajax")]);break;default:console.warn("".concat(n.name,": Unknown response content-type!"))}f.dispatchEvent(new Event("{ui.name}.loaded"))})).catch((function(e){console.error(e);var t="";if(e.response)switch(e.response.status){case 404:t="Not Found.";break;case 500:t="Server issue, please try again latter.";break;default:t="Something went wrong."}else e.request?t="No response received":console.warn("Error",e.message);n.setState({error:t}),f.dispatchEvent(new Event("{ui.name}.error"))})).then((function(){n.setState({loading:!1}),setTimeout((function(){n.state.current.classList.remove("loading")}),3e3)}))})),_defineProperty(this,"_currIndex",(function(){var t=e,n=t.state.current,r=n.getAttribute("data-gallery");return t.state.collections[r].indexOf(n)})),_defineProperty(this,"embed",(function(t){var n=e;console.log("".concat(n.name,": embed")),n.reset(),n.setState({embed:t,loading:!1,type:["meta-".concat(n.name,"--embed"),"meta-".concat(n.name,"--video")]}),n.show()})),_defineProperty(this,"setCaption",(function(t){var n=e;console.log("".concat(n.name,": setCaption")),n.state.caption=t})),_defineProperty(this,"addExtraClass",(function(t){var n=e;t.length&&(console.log("".concat(n.name,": addExtraClass(").concat(t,")")),n.state.extraClass=t)})),_defineProperty(this,"getCaption",(function(){return e.state.caption})),_defineProperty(this,"_abToString",(function(e){return String.fromCharCode.apply(null,new Uint8Array(e))})),_defineProperty(this,"_imageEncode",(function(e){new Uint8Array(e);return btoa([].reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),""))})),_defineProperty(this,"setContent",(function(t,n){var r=e;console.log("".concat(r.name,": setContent"));var o=n||["meta-".concat(r.name,"--html"),"meta-".concat(r.name,"--text")];Array.isArray(o)||(o=n.split(" ")),r.setState({content:t,type:o})})),_defineProperty(this,"getHtml",(function(){var t=e;if(t.state.embed){var r=n(758)(t.state.embed);t.state.content='')}return t.state.content}));var o=this;switch(o.name=o.constructor.name,console.log("".concat(o.name,": init")),o.axios=p,o.setState(t),r){case"show":case"hide":o.hide()}f.dispatchEvent(new Event("{ui.name}.init"))}return function window_createClass(e,t,n){return t&&window_defineProperties(e.prototype,t),n&&window_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(MetaWindow,[{key:"init",value:function init(){var e=this;console.log("MetaWindow: [links] init"),document.querySelectorAll('[data-toggle="lightbox"],[data-gallery="${gallery}"]').forEach((function(t){var n=t.getAttribute("data-gallery");n&&(e.state.collections[n]=[],document.querySelectorAll('[data-toggle="lightbox"][data-gallery="'.concat(n,'"]')).forEach((function(t){e.state.collections[n].push(t)}))),t.addEventListener("click",(function(t){t.preventDefault(),console.log("MetaWindow: [link] click");var n=t.currentTarget,r=n.getAttribute("href")||n.getAttribute("data-href"),o=n.getAttribute("data-embed");n.classList.add("loading"),e.state.current=n,o?e.embed(r):e.load(r);var i=n.getAttribute("data-title");i&&e.setCaption(i),e.addExtraClass(n.getAttribute("data-lightbox-class"))}))}))}},{key:"setState",value:function setState(e){var t=this;t.state=Object.assign({},t.state,e),t.render()}},{key:"render",value:function render(){var e,t=this,n=t.name,r=t.state.current;t.state.target.innerHTML="";var o=document.createElement("div");o.classList.add("meta-".concat(n)),(e=o.classList).add.apply(e,window_toConsumableArray(t.state.type)),t.state.target.append(o);var i=document.createElement("div");i.classList.add("meta-".concat(n,"-overlay")),t.state.shown&&i.classList.add("meta-".concat(n,"-overlay--open")),t.state.loading&&i.classList.add("meta-".concat(n,"-overlay--loading")),t.state.error&&i.classList.add("meta-".concat(n,"-overlay--error")),o.append(i);var a=document.createElement("div");a.classList.add("meta-content"),i.append(a);var s=document.createElement("button");if(s.classList.add("meta-nav","meta-close","a"),s.innerHTML=' Close',s.addEventListener("click",(function(e){e.preventDefault(),t.hide()})),a.append(s),r){var c=r.getAttribute("data-gallery");if(c&&t.state.collections[c].length>1){var l=document.createElement("nav");l.classList.add("meta-navs");var u=document.createElement("button");u.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__prev","a"),u.innerHTML=' Previous',u.addEventListener("click",(function(e){e.preventDefault(),t.prev()})),l.append(u);var f=document.createElement("button");f.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__next","a"),f.innerHTML=' Next',f.addEventListener("click",(function(e){e.preventDefault(),t.next()})),l.append(f),a.append(l)}}var p=document.createElement("section");if(p.classList.add("meta-wrap","typography"),t.state.extraClass&&p.classList.add(t.state.extraClass),p.innerHTML=t.getHtml(),a.append(p),t.state.error){var h=document.createElement("div");h.classList.add("meta-error"),h.innerHTML=t.state.error,a.append(h)}else if(t.state.caption){var g=document.createElement("div");g.classList.add("meta-caption"),g.innerHTML=t.getCaption(),a.append(g)}return"undefined"!==typeof window.FontAwesome&&window.FontAwesome.dom.i2svg(),t}}]),MetaWindow}(),g=h,v=document.getElementById("MetaLightboxApp");v||console.log("MetaWindow: missing container #MetaLightboxApp");var b=function init(){var e=window.MetaWindow;"undefined"===typeof e&&(e=new g({target:v}),window.MetaWindow=e),e.init()};window.addEventListener("".concat(u),b),window.addEventListener("".concat(l),b),window.addEventListener("MetaWindow.initLinks",b);function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var w="transitionend",_=function getSelector(e){var t=e.getAttribute("data-bs-target");if(!t||"#"===t){var n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n="#".concat(n.split("#")[1])),t=n&&"#"!==n?n.trim():null}return t},k=function getSelectorFromElement(e){var t=_(e);return t&&document.querySelector(t)?t:null},E=function getElementFromSelector(e){var t=_(e);return t?document.querySelector(t):null},A=function getTransitionDurationFromElement(e){if(!e)return 0;var t=window.getComputedStyle(e),n=t.transitionDuration,r=t.transitionDelay,o=Number.parseFloat(n),i=Number.parseFloat(r);return o||i?(n=n.split(",")[0],r=r.split(",")[0],1e3*(Number.parseFloat(n)+Number.parseFloat(r))):0},O=function triggerTransitionEnd(e){e.dispatchEvent(new Event(w))},S=function isElement(e){return!(!e||"object"!==_typeof(e))&&("undefined"!==typeof e.jquery&&(e=e[0]),"undefined"!==typeof e.nodeType)},C=function getElement(e){return S(e)?e.jquery?e[0]:e:"string"===typeof e&&e.length>0?document.querySelector(e):null},T=function typeCheckConfig(e,t,n){Object.keys(n).forEach((function(r){var o=n[r],i=t[r],a=i&&S(i)?"element":function toType(e){return null===e||void 0===e?"".concat(e):{}.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase()}(i);if(!new RegExp(o).test(a))throw new TypeError("".concat(e.toUpperCase(),': Option "').concat(r,'" provided type "').concat(a,'" but expected type "').concat(o,'".'))}))},P=function isVisible(e){return!(!S(e)||0===e.getClientRects().length)&&"visible"===getComputedStyle(e).getPropertyValue("visibility")},L=function reflow(e){e.offsetHeight},x=function getjQuery(){var jQuery=window.jQuery;return jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?jQuery:null},V=[],I=function isRTL(){return"rtl"===document.documentElement.dir},j=function defineJQueryPlugin(e){!function onDOMContentLoaded(e){"loading"===document.readyState?(V.length||document.addEventListener("DOMContentLoaded",(function(){V.forEach((function(e){return e()}))})),V.push(e)):e()}((function(){var $=x();if($){var t=e.NAME,n=$.fn[t];$.fn[t]=e.jQueryInterface,$.fn[t].Constructor=e,$.fn[t].noConflict=function(){return $.fn[t]=n,e.jQueryInterface}}}))},N=function execute(e){"function"===typeof e&&e()},R=function executeAfterTransition(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(n){var r=5,o=A(t)+r,i=!1,a=function handler(n){n.target===t&&(i=!0,t.removeEventListener(w,handler),N(e))};t.addEventListener(w,a),setTimeout((function(){i||O(t)}),o)}else N(e)},B=new Map,F=function set(e,t,n){B.has(e)||B.set(e,new Map);var r=B.get(e);r.has(t)||0===r.size?r.set(t,n):console.error("Bootstrap doesn't allow more than one instance per element. Bound instance: ".concat(Array.from(r.keys())[0],"."))},Y=function get(e,t){return B.has(e)&&B.get(e).get(t)||null},U=function remove(e,t){if(B.has(e)){var n=B.get(e);n.delete(t),0===n.size&&B.delete(e)}};function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function event_handler_unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return event_handler_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return event_handler_arrayLikeToArray(e,t)}(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function event_handler_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:null,r=Object.keys(e),o=0,i=r.length;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return(t=[]).concat.apply(t,selector_engine_toConsumableArray(Element.prototype.querySelectorAll.call(n,e)))},findOne:function findOne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return Element.prototype.querySelector.call(t,e)},children:function children(e,t){var n;return(n=[]).concat.apply(n,selector_engine_toConsumableArray(e.children)).filter((function(e){return e.matches(t)}))},parents:function parents(e,t){for(var parents=[],n=e.parentNode;n&&n.nodeType===Node.ELEMENT_NODE&&3!==n.nodeType;)n.matches(t)&&parents.push(n),n=n.parentNode;return parents},prev:function prev(e,t){for(var n=e.previousElementSibling;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next:function next(e,t){for(var next=e.nextElementSibling;next;){if(next.matches(t))return[next];next=next.nextElementSibling}return[]},focusableChildren:function focusableChildren(e){var t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((function(e){return"".concat(e,':not([tabindex^="-"])')})).join(", ");return this.find(t,e).filter((function(e){return!function isDisabled(e){return!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||("undefined"!==typeof e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))}(e)&&P(e)}))}},ne=te;function base_component_typeof(e){return base_component_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},base_component_typeof(e)}function base_component_defineProperties(e,t){for(var n=0;n2&&void 0!==arguments[2])||arguments[2];R(e,t,n)}}],[{key:"getInstance",value:function getInstance(e){return Y(C(e),this.DATA_KEY)}},{key:"getOrCreateInstance",value:function getOrCreateInstance(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getInstance(e)||new this(e,"object"===base_component_typeof(t)?t:null)}},{key:"VERSION",get:function get(){return"5.1.3"}},{key:"NAME",get:function get(){throw new Error('You have to implement the static method "NAME", for each component!')}},{key:"DATA_KEY",get:function get(){return"bs.".concat(this.NAME)}},{key:"EVENT_KEY",get:function get(){return".".concat(this.DATA_KEY)}}]),BaseComponent}(),oe=re;function collapse_typeof(e){return collapse_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},collapse_typeof(e)}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:this._element;return e.classList.contains(ye)}},{key:"_getConfig",value:function _getConfig(e){return(e=_objectSpread(_objectSpread(_objectSpread({},ce),ee.getDataAttributes(this._element)),e)).toggle=Boolean(e.toggle),e.parent=C(e.parent),T(ie,e,le),e}},{key:"_getDimension",value:function _getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}},{key:"_initializeChildren",value:function _initializeChildren(){var e=this;if(this._config.parent){var t=ne.find(be,this._config.parent);ne.find(we,this._config.parent).filter((function(e){return!t.includes(e)})).forEach((function(t){var n=E(t);n&&e._addAriaAndCollapsedClass([t],e._isShown(n))}))}}},{key:"_addAriaAndCollapsedClass",value:function _addAriaAndCollapsedClass(e,t){e.length&&e.forEach((function(e){t?e.classList.remove(ve):e.classList.add(ve),e.setAttribute("aria-expanded",t)}))}}],[{key:"Default",get:function get(){return ce}},{key:"NAME",get:function get(){return ie}},{key:"jQueryInterface",value:function jQueryInterface(e){return this.each((function(){var t={};"string"===typeof e&&/show|hide/.test(e)&&(t.toggle=!1);var n=Collapse.getOrCreateInstance(this,t);if("string"===typeof e){if("undefined"===typeof n[e])throw new TypeError('No method named "'.concat(e,'"'));n[e]()}}))}}]),Collapse}(oe);Q.on(document,he,we,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();var t=k(this);ne.find(t).forEach((function(e){_e.getOrCreateInstance(e,{toggle:!1}).toggle()}))})),j(_e);var ke;!function(e){var t="js-dropdown",n=function HideAll(){document.querySelectorAll(".dropdown-menu").forEach((function(e,t){e.classList.remove("show")}))},o=function Show(e){e.currentTarget.querySelector(".dropdown-menu").classList.add("show")},i=function Hide(e){e.currentTarget.querySelector(".dropdown-menu").classList.remove("show")},a=function init(){console.log("".concat(t,": init"));var e=document.querySelectorAll(".".concat(t,',[data-bs-toggle="dropdown"]')),r=document.querySelectorAll('[data-bs-toggle="hover"]'),a=function attachClickEvents(e){e.addEventListener("click",(function(e){e.preventDefault(),function Toggle(e){n(),e.querySelector(".dropdown-menu").classList.toggle("show")}(e.currentTarget.closest(".dropdown"))})),e.classList.add("".concat(t,"-active"))};document.addEventListener("click",(function(e){var t=!1,r=e.path||e.composedPath&&e.composedPath();r||console.warn("Browser does not provide event path to hide dropdowns on outside click"),r.forEach((function(e,r){t||(e===document&&n(),e.classList&&e.classList.contains("dropdown-toggle")&&(t=!0))}))})),r.forEach((function(e,n){!function attachHoverEvents(e){e.addEventListener("mouseover",o,!1),e.addEventListener("mouseout",i,!1),e.classList.add("".concat(t,"-active"))}(e.closest(".dropdown"))})),e.forEach((function(e,t){a(e)}))};e.addEventListener("".concat(r.LODEDANDREADY),a),e.addEventListener("".concat(r.AJAX),a)}(window);function carousel_typeof(e){return carousel_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},carousel_typeof(e)}function carousel_ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function carousel_objectSpread(e){for(var t=1;t0,r._pointerEvent=Boolean(window.PointerEvent),r._addEventListeners(),r}return function carousel_createClass(e,t,n){return t&&carousel_defineProperties(e.prototype,t),n&&carousel_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(Carousel,[{key:"next",value:function next(){this._slide(Ce)}},{key:"nextWhenVisible",value:function nextWhenVisible(){!document.hidden&&P(this._element)&&this.next()}},{key:"prev",value:function prev(){this._slide(Te)}},{key:"pause",value:function pause(e){e||(this._isPaused=!0),ne.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(O(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}},{key:"cycle",value:function cycle(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}},{key:"to",value:function to(e){var t=this;this._activeElement=ne.findOne(Ke,this._element);var n=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)Q.one(this._element,Me,(function(){return t.to(e)}));else{if(n===e)return this.pause(),void this.cycle();var r=e>n?Ce:Te;this._slide(r,this._items[e])}}},{key:"_getConfig",value:function _getConfig(e){return e=carousel_objectSpread(carousel_objectSpread(carousel_objectSpread({},Oe),ee.getDataAttributes(this._element)),"object"===carousel_typeof(e)?e:{}),T(Ee,e,Se),e}},{key:"_handleSwipe",value:function _handleSwipe(){var e=Math.abs(this.touchDeltaX);if(!(e<=40)){var t=e/this.touchDeltaX;this.touchDeltaX=0,t&&this._slide(t>0?Le:Pe)}}},{key:"_addEventListeners",value:function _addEventListeners(){var e=this;this._config.keyboard&&Q.on(this._element,Ie,(function(t){return e._keydown(t)})),"hover"===this._config.pause&&(Q.on(this._element,je,(function(t){return e.pause(t)})),Q.on(this._element,Ne,(function(t){return e.cycle(t)}))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}},{key:"_addTouchEventListeners",value:function _addTouchEventListeners(){var e=this,t=function hasPointerPenTouch(t){return e._pointerEvent&&("pen"===t.pointerType||"touch"===t.pointerType)},n=function start(n){t(n)?e.touchStartX=n.clientX:e._pointerEvent||(e.touchStartX=n.touches[0].clientX)},r=function end(n){t(n)&&(e.touchDeltaX=n.clientX-e.touchStartX),e._handleSwipe(),"hover"===e._config.pause&&(e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout((function(t){return e.cycle(t)}),500+e._config.interval))};ne.find(".carousel-item img",this._element).forEach((function(e){Q.on(e,He,(function(e){return e.preventDefault()}))})),this._pointerEvent?(Q.on(this._element,Ye,(function(e){return n(e)})),Q.on(this._element,Ue,(function(e){return r(e)})),this._element.classList.add("pointer-event")):(Q.on(this._element,Re,(function(e){return n(e)})),Q.on(this._element,Be,(function(t){return function move(t){e.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-e.touchStartX}(t)})),Q.on(this._element,Fe,(function(e){return r(e)})))}},{key:"_keydown",value:function _keydown(e){if(!/input|textarea/i.test(e.target.tagName)){var t=xe[e.key];t&&(e.preventDefault(),this._slide(t))}}},{key:"_getItemIndex",value:function _getItemIndex(e){return this._items=e&&e.parentNode?ne.find(".carousel-item",e.parentNode):[],this._items.indexOf(e)}},{key:"_getItemByOrder",value:function _getItemByOrder(e,t){var n=e===Ce;return function getNextActiveElement(e,t,n,r){var o=e.indexOf(t);if(-1===o)return e[!n&&r?e.length-1:0];var i=e.length;return o+=n?1:-1,r&&(o=(o+i)%i),e[Math.max(0,Math.min(o,i-1))]}(this._items,t,n,this._config.wrap)}},{key:"_triggerSlideEvent",value:function _triggerSlideEvent(e,t){var n=this._getItemIndex(e),r=this._getItemIndex(ne.findOne(Ke,this._element));return Q.trigger(this._element,Ve,{relatedTarget:e,direction:t,from:r,to:n})}},{key:"_setActiveIndicatorElement",value:function _setActiveIndicatorElement(e){if(this._indicatorsElement){var t=ne.findOne(".active",this._indicatorsElement);t.classList.remove(ze),t.removeAttribute("aria-current");for(var n=ne.find("[data-bs-target]",this._indicatorsElement),r=0;r1?t-1:0),r=1;r=t)&&(void 0===n||e<=n)}function limitToRange(e,t,n){return en?n:e}function createTagRepeat(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=Object.keys(n).reduce((function(e,t){var o=n[t];return"function"===typeof o&&(o=o(r)),"".concat(e," ").concat(t,'="').concat(o,'"')}),e);o+="<".concat(i,">");var a=r+1;return a\s+/g,">").replace(/\s+2&&void 0!==arguments[2]?arguments[2]:0,r=new Date(e).getDay();return addDays(e,dayDiff(t,n)-dayDiff(r,n))}function startOfYearPeriod(e,t){var n=new Date(e).getFullYear();return Math.floor(n/t)*t}function regularizeDate(e,t,n){if(1!==t&&2!==t)return e;var r=new Date(e);return 1===t?n?r.setMonth(r.getMonth()+1,0):r.setDate(1):n?r.setFullYear(r.getFullYear()+1,0,0):r.setMonth(0,1),r.setHours(0,0,0,0)}var $e=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,Ze=/[\s!-/:-@[-`{-~\u5e74\u6708\u65e5]+/,Ge={},Qe={y:function y(e,t){return new Date(e).setFullYear(parseInt(t,10))},m:function m(e,t,n){var r=new Date(e),o=parseInt(t,10)-1;if(isNaN(o)){if(!t)return NaN;var i=t.toLowerCase(),a=function compareNames(e){return e.toLowerCase().startsWith(i)};if((o=n.monthsShort.findIndex(a))<0&&(o=n.months.findIndex(a)),o<0)return NaN}return r.setMonth(o),r.getMonth()!==normalizeMonth(o)?r.setDate(0):r.getTime()},d:function d(e,t){return new Date(e).setDate(parseInt(t,10))}},et={d:function d(e){return e.getDate()},dd:function dd(e){return padZero(e.getDate(),2)},D:function D(e,t){return t.daysShort[e.getDay()]},DD:function DD(e,t){return t.days[e.getDay()]},m:function m(e){return e.getMonth()+1},mm:function mm(e){return padZero(e.getMonth()+1,2)},M:function M(e,t){return t.monthsShort[e.getMonth()]},MM:function MM(e,t){return t.months[e.getMonth()]},y:function y(e){return e.getFullYear()},yy:function yy(e){return padZero(e.getFullYear(),2).slice(-2)},yyyy:function yyyy(e){return padZero(e.getFullYear(),4)}};function normalizeMonth(e){return e>-1?e%12:normalizeMonth(e+12)}function padZero(e,t){return e.toString().padStart(t,"0")}function parseFormatString(e){if("string"!==typeof e)throw new Error("Invalid date format.");if(e in Ge)return Ge[e];var t=e.split($e),n=e.match(new RegExp($e,"g"));if(0===t.length||!n)throw new Error("Invalid date format.");var r=n.map((function(e){return et[e]})),o=Object.keys(Qe).reduce((function(e,t){return n.find((function(e){return"D"!==e[0]&&e[0].toLowerCase()===t}))&&e.push(t),e}),[]);return Ge[e]={parser:function parser(e,t){var r=e.split(Ze).reduce((function(e,t,r){if(t.length>0&&n[r]){var o=n[r][0];"M"===o?e.m=t:"D"!==o&&(e[o]=t)}return e}),{});return o.reduce((function(e,n){var o=Qe[n](e,r[n],t);return isNaN(o)?e:o}),today())},formatter:function formatter(e,n){return r.reduce((function(r,o,i){return r+"".concat(t[i]).concat(o(e,n))}),"")+lastItemOf(t)}}}function date_format_parseDate(e,t,n){if(e instanceof Date||"number"===typeof e){var r=stripTime(e);return isNaN(r)?void 0:r}if(e){if("today"===e)return today();if(t&&t.toValue){var o=t.toValue(e,t,n);return isNaN(o)?void 0:stripTime(o)}return parseFormatString(t).parser(e,n)}}function date_format_formatDate(e,t,n){if(isNaN(e)||!e&&0!==e)return"";var r="number"===typeof e?new Date(e):e;return t.toDisplay?t.toDisplay(r,t,n):parseFormatString(t).formatter(r,n)}var tt=document.createRange();function parseHTML(e){return tt.createContextualFragment(e)}function getParent(e){return e.parentElement||(e.parentNode instanceof ShadowRoot?e.parentNode.host:void 0)}function isActiveElement(e){return e.getRootNode().activeElement===e}function hideElement(e){"none"!==e.style.display&&(e.style.display&&(e.dataset.styleDisplay=e.style.display),e.style.display="none")}function showElement(e){"none"===e.style.display&&(e.dataset.styleDisplay?(e.style.display=e.dataset.styleDisplay,delete e.dataset.styleDisplay):e.style.display="")}function emptyChildNodes(e){e.firstChild&&(e.removeChild(e.firstChild),emptyChildNodes(e))}function _toArray(e){return function event_arrayWithHoles(e){if(Array.isArray(e))return e}(e)||event_iterableToArray(e)||event_unsupportedIterableToArray(e)||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(e){return function event_arrayWithoutHoles(e){if(Array.isArray(e))return event_arrayLikeToArray(e)}(e)||event_iterableToArray(e)||event_unsupportedIterableToArray(e)||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(e,t){if(e){if("string"===typeof e)return event_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?event_arrayLikeToArray(e,t):void 0}}function event_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function event_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:[];return n.push(e),e.parentNode?t=e.parentNode:e.host?t=e.host:e.defaultView&&(t=e.defaultView),t?getComposedPath(t,n):n};Event.prototype.composedPath=function(){return at(this.target)}}function findFromPath(e,t,n){var r=_toArray(e),o=r[0],i=r.slice(1);return t(o)?o:o!==n&&"HTML"!==o.tagName&&0!==i.length?findFromPath(i,t,n):void 0}function findElementInEventPath(e,t){var n="function"===typeof t?t:function(e){return e instanceof Element&&e.matches(t)};return findFromPath(e.composedPath(),n,e.currentTarget)}var st={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"}},ct={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:"\xbb",orientation:"auto",pickLevel:0,prevArrow:"\xab",showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0},lt=ct.language,ut=ct.format,dt=ct.weekStart;function sanitizeDOW(e,t){return e.length<6&&t>=0&&t<7?pushUnique(e,t):e}function calcEndOfWeek(e){return(e+6)%7}function validateDate(e,t,n,r){var o=date_format_parseDate(e,t,n);return void 0!==o?o:r}function validateViewId(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=parseInt(e,10);return r>=0&&r<=n?r:t}function processOptions(e,t){var n,r=Object.assign({},e),o={},i=t.constructor.locales,a=t.rangeSideIndex,s=t.config||{},c=s.format,l=s.language,u=s.locale,f=s.maxDate,p=s.maxView,h=s.minDate,g=s.pickLevel,v=s.startView,b=s.weekStart;if(r.language&&(r.language!==l&&(i[r.language]?n=r.language:void 0===i[n=r.language.split("-")[0]]&&(n=!1)),delete r.language,n)){l=o.language=n;var w=u||i[lt];u=Object.assign({format:ut,weekStart:dt},i[lt]),l!==lt&&Object.assign(u,i[l]),o.locale=u,c===w.format&&(c=o.format=u.format),b===w.weekStart&&(b=o.weekStart=u.weekStart,o.weekEnd=calcEndOfWeek(u.weekStart))}if(r.format){var _="function"===typeof r.format.toDisplay,k="function"===typeof r.format.toValue,E=$e.test(r.format);(_&&k||E)&&(c=o.format=r.format),delete r.format}var A=g;void 0!==r.pickLevel&&(A=validateViewId(r.pickLevel,2),delete r.pickLevel),A!==g&&(A>g&&(void 0===r.minDate&&(r.minDate=h),void 0===r.maxDate&&(r.maxDate=f)),r.datesDisabled||(r.datesDisabled=[]),g=o.pickLevel=A);var O=h,S=f;if(void 0!==r.minDate){var C=dateValue(0,0,1);(O=null===r.minDate?C:validateDate(r.minDate,c,u,O))!==C&&(O=regularizeDate(O,g,!1)),delete r.minDate}if(void 0!==r.maxDate&&(void 0!==(S=null===r.maxDate?void 0:validateDate(r.maxDate,c,u,S))&&(S=regularizeDate(S,g,!0)),delete r.maxDate),S=0&&(o.maxNumberOfDates=L,o.multidate=1!==L),delete r.maxNumberOfDates}r.dateDelimiter&&(o.dateDelimiter=String(r.dateDelimiter),delete r.dateDelimiter);var x=p;void 0!==r.maxView&&(x=validateViewId(r.maxView,p),delete r.maxView),(x=g>x?g:x)!==p&&(p=o.maxView=x);var V=v;if(void 0!==r.startView&&(V=validateViewId(r.startView,V),delete r.startView),Vp&&(V=p),V!==v&&(o.startView=V),r.prevArrow){var I=parseHTML(r.prevArrow);I.childNodes.length>0&&(o.prevArrow=I.childNodes),delete r.prevArrow}if(r.nextArrow){var j=parseHTML(r.nextArrow);j.childNodes.length>0&&(o.nextArrow=j.childNodes),delete r.nextArrow}if(void 0!==r.disableTouchKeyboard&&(o.disableTouchKeyboard="ontouchstart"in document&&!!r.disableTouchKeyboard,delete r.disableTouchKeyboard),r.orientation){var N=r.orientation.toLowerCase().split(/\s+/g);o.orientation={x:N.find((function(e){return"left"===e||"right"===e}))||"auto",y:N.find((function(e){return"top"===e||"bottom"===e}))||"auto"},delete r.orientation}if(void 0!==r.todayBtnMode){switch(r.todayBtnMode){case 0:case 1:o.todayBtnMode=r.todayBtnMode}delete r.todayBtnMode}return Object.keys(r).forEach((function(e){void 0!==r[e]&&hasProperty(ct,e)&&(o[e]=r[e])})),o}var ft=optimizeTemplateHTML('
\n
\n
\n
\n
\n \n \n \n
\n
\n
\n \n
\n
'),pt=optimizeTemplateHTML('
\n
'.concat(createTagRepeat("span",7,{class:"dow"}),'
\n
').concat(createTagRepeat("span",42),"
\n
")),ht=optimizeTemplateHTML('
\n
\n
'.concat(createTagRepeat("span",6,{class:"week"}),"
\n
"));function View_toConsumableArray(e){return function View_arrayWithoutHoles(e){if(Array.isArray(e))return View_arrayLikeToArray(e)}(e)||function View_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function View_unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return View_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return View_arrayLikeToArray(e,t)}(e)||function View_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function View_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}return function View_createClass(e,t,n){return t&&View_defineProperties(e.prototype,t),n&&View_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(View,[{key:"init",value:function init(e){void 0!==e.pickLevel&&(this.isMinView=this.id===e.pickLevel),this.setOptions(e),this.updateFocus(),this.updateSelection()}},{key:"performBeforeHook",value:function performBeforeHook(e,t,n){var r=this.beforeShow(new Date(n));switch(View_typeof(r)){case"boolean":r={enabled:r};break;case"string":r={classes:r}}if(r){if(!1===r.enabled&&(e.classList.add("disabled"),pushUnique(this.disabled,t)),r.classes){var o,i=r.classes.split(/\s+/);(o=e.classList).add.apply(o,View_toConsumableArray(i)),i.includes("disabled")&&pushUnique(this.disabled,t)}r.content&&function replaceChildNodes(e,t){emptyChildNodes(e),t instanceof DocumentFragment?e.appendChild(t):"string"===typeof t?e.appendChild(parseHTML(t)):"function"===typeof t.forEach&&t.forEach((function(t){e.appendChild(t)}))}(e,r.content)}}}]),View}();function DaysView_typeof(e){return DaysView_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},DaysView_typeof(e)}function DaysView_slicedToArray(e,t){return function DaysView_arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function DaysView_iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||DaysView_unsupportedIterableToArray(e,t)||function DaysView_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DaysView_toConsumableArray(e){return function DaysView_arrayWithoutHoles(e){if(Array.isArray(e))return DaysView_arrayLikeToArray(e)}(e)||function DaysView_iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||DaysView_unsupportedIterableToArray(e)||function DaysView_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DaysView_unsupportedIterableToArray(e,t){if(e){if("string"===typeof e)return DaysView_arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?DaysView_arrayLikeToArray(e,t):void 0}}function DaysView_arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1])||arguments[1];if(t){var n=parseHTML(pt).firstChild;this.dow=n.firstChild,this.grid=n.lastChild,this.element.appendChild(n)}_get(DaysView_getPrototypeOf(DaysView.prototype),"init",this).call(this,e)}},{key:"setOptions",value:function setOptions(e){var t,n=this;if(hasProperty(e,"minDate")&&(this.minDate=e.minDate),hasProperty(e,"maxDate")&&(this.maxDate=e.maxDate),e.datesDisabled&&(this.datesDisabled=e.datesDisabled),e.daysOfWeekDisabled&&(this.daysOfWeekDisabled=e.daysOfWeekDisabled,t=!0),e.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=e.daysOfWeekHighlighted),void 0!==e.todayHighlight&&(this.todayHighlight=e.todayHighlight),void 0!==e.weekStart&&(this.weekStart=e.weekStart,this.weekEnd=e.weekEnd,t=!0),e.locale){var r=this.locale=e.locale;this.dayNames=r.daysMin,this.switchLabelFormat=r.titleFormat,t=!0}if(void 0!==e.beforeShowDay&&(this.beforeShow="function"===typeof e.beforeShowDay?e.beforeShowDay:void 0),void 0!==e.calendarWeeks)if(e.calendarWeeks&&!this.calendarWeeks){var o=parseHTML(ht).firstChild;this.calendarWeeks={element:o,dow:o.firstChild,weeks:o.lastChild},this.element.insertBefore(o,this.element.firstChild)}else this.calendarWeeks&&!e.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);void 0!==e.showDaysOfWeek&&(e.showDaysOfWeek?(showElement(this.dow),this.calendarWeeks&&showElement(this.calendarWeeks.dow)):(hideElement(this.dow),this.calendarWeeks&&hideElement(this.calendarWeeks.dow))),t&&Array.from(this.dow.children).forEach((function(e,t){var r=(n.weekStart+t)%7;e.textContent=n.dayNames[r],e.className=n.daysOfWeekDisabled.includes(r)?"dow disabled":"dow"}))}},{key:"updateFocus",value:function updateFocus(){var e=new Date(this.picker.viewDate),t=e.getFullYear(),n=e.getMonth(),r=dateValue(t,n,1),o=dayOfTheWeekOf(r,this.weekStart,this.weekStart);this.first=r,this.last=dateValue(t,n+1,0),this.start=o,this.focused=this.picker.viewDate}},{key:"updateSelection",value:function updateSelection(){var e=this.picker.datepicker,t=e.dates,n=e.rangepicker;this.selected=t,n&&(this.range=n.dates)}},{key:"render",value:function render(){var e=this;this.today=this.todayHighlight?today():void 0,this.disabled=DaysView_toConsumableArray(this.datesDisabled);var t=date_format_formatDate(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(t),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){var n=dayOfTheWeekOf(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach((function(e,t){e.textContent=function getWeek(e){var t=dayOfTheWeekOf(e,4,1),n=dayOfTheWeekOf(new Date(t).setMonth(0,4),4,1);return Math.round((t-n)/6048e5)+1}(function addWeeks(e,t){return addDays(e,7*t)}(n,t))}))}Array.from(this.grid.children).forEach((function(t,n){var r=t.classList,o=addDays(e.start,n),i=new Date(o),a=i.getDay();if(t.className="datepicker-cell ".concat(e.cellClass),t.dataset.date=o,t.textContent=i.getDate(),oe.last&&r.add("next"),e.today===o&&r.add("today"),(oe.maxDate||e.disabled.includes(o))&&r.add("disabled"),e.daysOfWeekDisabled.includes(a)&&(r.add("disabled"),pushUnique(e.disabled,o)),e.daysOfWeekHighlighted.includes(a)&&r.add("highlighted"),e.range){var s=DaysView_slicedToArray(e.range,2),c=s[0],l=s[1];o>c&&on&&oe.length)&&(t=e.length);for(var n=0,r=new Array(t);nt||s1&&void 0!==arguments[1])||arguments[1];t&&(this.grid=this.element,this.element.classList.add("months","datepicker-grid"),this.grid.appendChild(parseHTML(createTagRepeat("span",12,{"data-month":function dataMonth(e){return e}})))),MonthsView_get(MonthsView_getPrototypeOf(MonthsView.prototype),"init",this).call(this,e)}},{key:"setOptions",value:function setOptions(e){if(e.locale&&(this.monthNames=e.locale.monthsShort),hasProperty(e,"minDate"))if(void 0===e.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{var t=new Date(e.minDate);this.minYear=t.getFullYear(),this.minMonth=t.getMonth(),this.minDate=t.setDate(1)}if(hasProperty(e,"maxDate"))if(void 0===e.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{var n=new Date(e.maxDate);this.maxYear=n.getFullYear(),this.maxMonth=n.getMonth(),this.maxDate=dateValue(this.maxYear,this.maxMonth+1,0)}this.isMinView?e.datesDisabled&&(this.datesDisabled=e.datesDisabled):this.datesDisabled=[],void 0!==e.beforeShowMonth&&(this.beforeShow="function"===typeof e.beforeShowMonth?e.beforeShowMonth:void 0)}},{key:"updateFocus",value:function updateFocus(){var e=new Date(this.picker.viewDate);this.year=e.getFullYear(),this.focused=e.getMonth()}},{key:"updateSelection",value:function updateSelection(){var e=this.picker.datepicker,t=e.dates,n=e.rangepicker;this.selected=t.reduce((function(e,t){var n=new Date(t),r=n.getFullYear(),o=n.getMonth();return void 0===e[r]?e[r]=[o]:pushUnique(e[r],o),e}),{}),n&&n.dates&&(this.range=n.dates.map((function(e){var t=new Date(e);return isNaN(t)?void 0:[t.getFullYear(),t.getMonth()]})))}},{key:"render",value:function render(){var e=this;this.disabled=this.datesDisabled.reduce((function(t,n){var r=new Date(n);return e.year===r.getFullYear()&&t.push(r.getMonth()),t}),[]),this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);var t=this.selected[this.year]||[],n=this.yearthis.maxYear,r=this.year===this.minYear,o=this.year===this.maxYear,i=computeMonthRange(this.range,this.year);Array.from(this.grid.children).forEach((function(a,s){var c=a.classList,l=dateValue(e.year,s,1);if(a.className="datepicker-cell ".concat(e.cellClass),e.isMinView&&(a.dataset.date=l),a.textContent=e.monthNames[s],(n||r&&se.maxMonth||e.disabled.includes(s))&&c.add("disabled"),i){var u=MonthsView_slicedToArray(i,2),f=u[0],p=u[1];s>f&&sr&&ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1])||arguments[1];t&&(this.navStep=10*this.step,this.beforeShowOption="beforeShow".concat(toTitleCase(this.cellClass)),this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid"),this.grid.appendChild(parseHTML(createTagRepeat("span",12)))),YearsView_get(YearsView_getPrototypeOf(YearsView.prototype),"init",this).call(this,e)}},{key:"setOptions",value:function setOptions(e){if(hasProperty(e,"minDate")&&(void 0===e.minDate?this.minYear=this.minDate=void 0:(this.minYear=startOfYearPeriod(e.minDate,this.step),this.minDate=dateValue(this.minYear,0,1))),hasProperty(e,"maxDate")&&(void 0===e.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=startOfYearPeriod(e.maxDate,this.step),this.maxDate=dateValue(this.maxYear,11,31))),this.isMinView?e.datesDisabled&&(this.datesDisabled=e.datesDisabled):this.datesDisabled=[],void 0!==e[this.beforeShowOption]){var t=e[this.beforeShowOption];this.beforeShow="function"===typeof t?t:void 0}}},{key:"updateFocus",value:function updateFocus(){var e=new Date(this.picker.viewDate),t=startOfYearPeriod(e,this.navStep),n=t+9*this.step;this.first=t,this.last=n,this.start=t-this.step,this.focused=startOfYearPeriod(e,this.step)}},{key:"updateSelection",value:function updateSelection(){var e=this,t=this.picker.datepicker,n=t.dates,r=t.rangepicker;this.selected=n.reduce((function(t,n){return pushUnique(t,startOfYearPeriod(n,e.step))}),[]),r&&r.dates&&(this.range=r.dates.map((function(t){if(void 0!==t)return startOfYearPeriod(t,e.step)})))}},{key:"render",value:function render(){var e=this;this.disabled=this.datesDisabled.map((function(e){return new Date(e).getFullYear()})),this.picker.setViewSwitchLabel("".concat(this.first,"-").concat(this.last)),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach((function(t,n){var r=t.classList,o=e.start+n*e.step,i=dateValue(o,0,1);if(t.className="datepicker-cell ".concat(e.cellClass),e.isMinView&&(t.dataset.date=i),t.textContent=t.dataset.year=o,0===n?r.add("prev"):11===n&&r.add("next"),(oe.maxYear||e.disabled.includes(o))&&r.add("disabled"),e.range){var a=YearsView_slicedToArray(e.range,2),s=a[0],c=a[1];o>s&&on&&oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?lastItemOf(t):n.defaultViewDate,n.minDate,n.maxDate)}function setViewDate(e,t){var n=new Date(e.viewDate),r=new Date(t),o=e.currentView,i=o.id,a=o.year,s=o.first,c=o.last,l=r.getFullYear();switch(e.viewDate=t,l!==n.getFullYear()&&triggerDatepickerEvent(e.datepicker,"changeYear"),r.getMonth()!==n.getMonth()&&triggerDatepickerEvent(e.datepicker,"changeMonth"),i){case 0:return tc;case 1:return l!==a;default:return lc}}function getTextDirection(e){return window.getComputedStyle(e).direction}function findScrollParents(e){var t=getParent(e);if(t!==document.body&&t)return"visible"!==window.getComputedStyle(t).overflow?t:findScrollParents(t)}var _t=function(){function Picker(e){!function Picker_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Picker);var t=(this.datepicker=e).config,n=ft.replace(/%buttonClass%/g,t.buttonClass),r=this.element=parseHTML(n).firstChild,o=Picker_slicedToArray(r.firstChild.children,3),i=o[0],a=o[1],s=o[2],c=i.firstElementChild,l=Picker_slicedToArray(i.lastElementChild.children,3),u=l[0],f=l[1],p=l[2],h=Picker_slicedToArray(s.firstChild.children,2),g={title:c,prevBtn:u,viewSwitch:f,nextBtn:p,todayBtn:h[0],clearBtn:h[1]};this.main=a,this.controls=g;var v=e.inline?"inline":"dropdown";r.classList.add("datepicker-".concat(v)),processPickerOptions(this,t),this.viewDate=computeResetViewDate(e),registerListeners(e,[[r,"mousedown",onMousedownPicker],[a,"click",onClickView.bind(null,e)],[g.viewSwitch,"click",onClickViewSwitch.bind(null,e)],[g.prevBtn,"click",onClickPrevBtn.bind(null,e)],[g.nextBtn,"click",onClickNextBtn.bind(null,e)],[g.todayBtn,"click",onClickTodayBtn.bind(null,e)],[g.clearBtn,"click",onClickClearBtn.bind(null,e)]]),this.views=[new mt(this),new gt(this),new vt(this,{id:2,name:"years",cellClass:"year",step:1}),new vt(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[t.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),t.container?t.container.appendChild(this.element):e.inputField.after(this.element)}return function Picker_createClass(e,t,n){return t&&Picker_defineProperties(e.prototype,t),n&&Picker_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(Picker,[{key:"setOptions",value:function setOptions(e){processPickerOptions(this,e),this.views.forEach((function(t){t.init(e,!1)})),this.currentView.render()}},{key:"detach",value:function detach(){this.element.remove()}},{key:"show",value:function show(){if(!this.active){var e=this.datepicker,t=this.element;if(e.inline)t.classList.add("active");else{var n=getTextDirection(e.inputField);n!==getTextDirection(getParent(t))?t.dir=n:t.dir&&t.removeAttribute("dir"),t.style.visiblity="hidden",t.classList.add("active"),this.place(),t.style.visiblity="",e.config.disableTouchKeyboard&&e.inputField.blur()}this.active=!0,triggerDatepickerEvent(e,"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 e=this.element,t=e.classList,n=e.offsetParent,r=e.style,o=this.datepicker,i=o.config,a=o.inputField,s=this.element.getBoundingClientRect(),c=s.width,l=s.height,u=a.getBoundingClientRect(),f=u.left,p=u.top,h=u.right,g=u.bottom,v=u.width,b=u.height,w=i.orientation,_=w.x,k=w.y,E=f,A=p;if(n!==document.body&&n){var O=n.getBoundingClientRect();E-=O.left-n.scrollLeft,A-=O.top-n.scrollTop}else E+=window.scrollX,A+=window.scrollY;var S=findScrollParents(a),C=0,T=0,P=document.documentElement,L=P.clientWidth,x=P.clientHeight;if(S){var V=S.getBoundingClientRect();V.top>0&&(T=V.top),V.left>0&&(C=V.left),V.rightL?(_="right",LT&&g+l>x?"top":"bottom"),"top"===k?A-=l:A+=b,t.remove.apply(t,Picker_toConsumableArray(Object.values(bt))),t.add(bt[_],bt[k]),r.left=wt(E),r.top=wt(A)}},{key:"setViewSwitchLabel",value:function setViewSwitchLabel(e){this.controls.viewSwitch.textContent=e}},{key:"setPrevBtnDisabled",value:function setPrevBtnDisabled(e){this.controls.prevBtn.disabled=e}},{key:"setNextBtnDisabled",value:function setNextBtnDisabled(e){this.controls.nextBtn.disabled=e}},{key:"changeView",value:function changeView(e){var t=this.currentView,n=this.views[e];return n.id!==t.id&&(this.currentView=n,this._renderMethod="render",triggerDatepickerEvent(this.datepicker,"changeView"),this.main.replaceChild(n.element,t.element)),this}},{key:"changeFocus",value:function changeFocus(e){return this._renderMethod=setViewDate(this,e)?"render":"refreshFocus",this.views.forEach((function(e){e.updateFocus()})),this}},{key:"update",value:function update(){var e=computeResetViewDate(this.datepicker);return this._renderMethod=setViewDate(this,e)?"render":"refresh",this.views.forEach((function(e){e.updateFocus(),e.updateSelection()})),this}},{key:"render",value:function render(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e&&this._renderMethod||"render";delete this._renderMethod,this.currentView[t]()}}]),Picker}();function findNextAvailableOne(e,t,n,r,o,i){if(isInRange(e,o,i))return r(e)?findNextAvailableOne(t(e,n),t,n,r,o,i):e}function moveByArrowKey(e,t,n,r){var o,i,a=e.picker,s=a.currentView,c=s.step||1,l=a.viewDate;switch(s.id){case 0:l=r?addDays(l,7*n):t.ctrlKey||t.metaKey?addYears(l,n):addDays(l,n),o=addDays,i=function testFn(e){return s.disabled.includes(e)};break;case 1:l=addMonths(l,r?4*n:n),o=addMonths,i=function testFn(e){var t=new Date(e),n=s.year,r=s.disabled;return t.getFullYear()===n&&r.includes(t.getMonth())};break;default:l=addYears(l,n*(r?4:1)*c),o=addYears,i=function testFn(e){return s.disabled.includes(startOfYearPeriod(e,c))}}void 0!==(l=findNextAvailableOne(l,o,n<0?-c:c,i,s.minDate,s.maxDate))&&a.changeFocus(l).render()}function onKeydown(e,t){var n=t.key;if("Tab"!==n){var r=e.picker,o=r.currentView,i=o.id,a=o.isMinView;if(r.active){if(e.editMode)return void("Enter"===n?e.exitEditMode({update:!0,autohide:e.config.autohide}):"Escape"===n&&r.hide());if("ArrowLeft"===n)if(t.ctrlKey||t.metaKey)goToPrevOrNext(e,-1);else{if(t.shiftKey)return void e.enterEditMode();moveByArrowKey(e,t,-1,!1)}else if("ArrowRight"===n)if(t.ctrlKey||t.metaKey)goToPrevOrNext(e,1);else{if(t.shiftKey)return void e.enterEditMode();moveByArrowKey(e,t,1,!1)}else if("ArrowUp"===n)if(t.ctrlKey||t.metaKey)switchView(e);else{if(t.shiftKey)return void e.enterEditMode();moveByArrowKey(e,t,-1,!0)}else if("ArrowDown"===n){if(t.shiftKey&&!t.ctrlKey&&!t.metaKey)return void e.enterEditMode();moveByArrowKey(e,t,1,!0)}else{if("Enter"!==n)return void("Escape"===n?r.hide():"Backspace"!==n&&"Delete"!==n&&(1!==n.length||t.ctrlKey||t.metaKey)||e.enterEditMode());if(a)return void e.setDate(r.viewDate);r.changeView(i-1).render()}}else{if("ArrowDown"!==n)return void("Enter"===n?e.update():"Escape"===n&&r.show());r.show()}t.preventDefault()}else unfocus(e)}function onFocus(e){e.config.showOnFocus&&!e._showing&&e.show()}function onMousedown(e,t){var n=t.target;(e.picker.active||e.config.showOnClick)&&(n._active=isActiveElement(n),n._clicking=setTimeout((function(){delete n._active,delete n._clicking}),2e3))}function onClickInput(e,t){var n=t.target;n._clicking&&(clearTimeout(n._clicking),delete n._clicking,n._active&&e.enterEditMode(),delete n._active,e.config.showOnClick&&e.show())}function onPaste(e,t){t.clipboardData.types.includes("text/plain")&&e.enterEditMode()}function onClickOutside(e,t){var n=e.element,r=e.picker;if(r.active||isActiveElement(n)){var o=r.element;findElementInEventPath(t,(function(e){return e===n||e===o}))||unfocus(e)}}function Datepicker_typeof(e){return Datepicker_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Datepicker_typeof(e)}function Datepicker_classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Datepicker_defineProperties(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=e.config,o=e.dates,i=e.rangeSideIndex;if(0===t.length)return n?[]:void 0;var a=t.reduce((function(e,t){var n=date_format_parseDate(t,r.format,r.locale);return void 0===n||!isInRange(n=regularizeDate(n,r.pickLevel,i),r.minDate,r.maxDate)||e.includes(n)||r.datesDisabled.includes(n)||!(r.pickLevel>0)&&r.daysOfWeekDisabled.includes(new Date(n).getDay())||e.push(n),e}),[]);return 0!==a.length?(r.multidate&&!n&&(a=a.reduce((function(e,t){return o.includes(t)||e.push(t),e}),o.filter((function(e){return!a.includes(e)})))),r.maxNumberOfDates&&a.length>r.maxNumberOfDates?a.slice(-1*r.maxNumberOfDates):a):void 0}function refreshUI(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e.config,o=e.picker,i=e.inputField;if(2&t){var a=o.active?r.pickLevel:r.startView;o.update().changeView(a).render(n)}1&t&&i&&(i.value=stringifyDates(e.dates,r))}function _setDate(e,t,n){var r=n.clear,o=n.render,i=n.autohide,a=n.revert;void 0===o&&(o=!0),o?void 0===i&&(i=e.config.autohide):i=!1;var s=processInputDates(e,t,r);(s||a)&&(s&&s.toString()!==e.dates.toString()?(e.dates=s,refreshUI(e,o?3:1),triggerDatepickerEvent(e,"changeDate")):refreshUI(e,1),i&&e.hide())}var kt=function(){function Datepicker(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;Datepicker_classCallCheck(this,Datepicker),e.datepicker=this,this.element=e;var r,o,i=this.config=Object.assign({buttonClass:t.buttonClass&&String(t.buttonClass)||"button",container:null,defaultViewDate:today(),maxDate:void 0,minDate:void 0},processOptions(ct,this)),a=this.inline="INPUT"!==e.tagName;if(a?i.container=e:(t.container&&(i.container=t.container instanceof HTMLElement?t.container:document.querySelector(t.container)),(r=this.inputField=e).classList.add("datepicker-input")),n){var s=n.inputs.indexOf(r),c=n.datepickers;if(s<0||s>1||!Array.isArray(c))throw Error("Invalid rangepicker object.");c[s]=this,Object.defineProperty(this,"rangepicker",{get:function get(){return n}}),Object.defineProperty(this,"rangeSideIndex",{get:function get(){return s}})}this._options=t,Object.assign(i,processOptions(t,this)),a?(o=stringToArray(e.dataset.date,i.dateDelimiter),delete e.dataset.date):o=stringToArray(r.value,i.dateDelimiter),this.dates=[];var l=processInputDates(this,o);l&&l.length>0&&(this.dates=l),r&&(r.value=stringifyDates(this.dates,i));var u=this.picker=new _t(this);if(a)this.show();else{var f=onClickOutside.bind(null,this),p=[[r,"keydown",onKeydown.bind(null,this)],[r,"focus",onFocus.bind(null,this)],[r,"mousedown",onMousedown.bind(null,this)],[r,"click",onClickInput.bind(null,this)],[r,"paste",onPaste.bind(null,this)],[document,"mousedown",f],[document,"touchstart",f],[window,"resize",u.place.bind(u)]];registerListeners(this,p)}}return function Datepicker_createClass(e,t,n){return t&&Datepicker_defineProperties(e.prototype,t),n&&Datepicker_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(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(e){var t=this.picker,n=processOptions(e,this);Object.assign(this._options,e),Object.assign(this.config,n),t.setOptions(n),refreshUI(this,3)}},{key:"show",value:function show(){if(this.inputField){if(this.inputField.disabled)return;isActiveElement(this.inputField)||this.config.disableTouchKeyboard||(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}},{key:"hide",value:function hide(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}},{key:"destroy",value:function destroy(){return this.hide(),function unregisterListeners(e){var t=nt.get(e);t&&(t.forEach((function(e){it.call.apply(it,event_toConsumableArray(e))})),nt.delete(e))}(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}},{key:"getDate",value:function getDate(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=t?function(n){return date_format_formatDate(n,t,e.config.locale)}:function(e){return new Date(e)};return this.config.multidate?this.dates.map(n):this.dates.length>0?n(this.dates[0]):void 0}},{key:"setDate",value:function setDate(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline){var t=Object.assign(e||{},{clear:!0,render:!0}),n=stringToArray(this.inputField.value,this.config.dateDelimiter);_setDate(this,n,t)}}},{key:"refresh",value:function refresh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&"string"!==typeof e&&(t=e,e=void 0),refreshUI(this,"picker"===e?2:"input"===e?1:3,!t)}},{key:"enterEditMode",value:function enterEditMode(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit"))}},{key:"exitEditMode",value:function exitEditMode(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline&&this.editMode){var t=Object.assign({update:!1},e);delete this.editMode,this.inputField.classList.remove("in-edit"),t.update&&this.update(t)}}}],[{key:"formatDate",value:function formatDate(e,t,n){return date_format_formatDate(e,t,n&&st[n]||st.en)}},{key:"parseDate",value:function parseDate(e,t,n){return date_format_parseDate(e,t,n&&st[n]||st.en)}},{key:"locales",get:function get(){return st}}]),Datepicker}(),Et=function init(){document.querySelectorAll(".js-datepicker").forEach((function(e,t){var n=new kt(e);e.ui=n}))};window.addEventListener("".concat(r.LODEDANDREADY),Et),window.addEventListener("".concat(r.AJAX),Et);var Dt=n(754);!function(e){var t,n="main.online",o=document,i=o.body,a=o.querySelector('meta[name="ping"]'),s=!1,c=function UPDATE_ONLINE_STATUS(o){s||(s=!0,o?(i.classList.contains("is-offline")?(console.log("".concat(n,": back Online")),e.dispatchEvent(new Event(r.BACKONLINE))):(console.log("".concat(n,": Online")),e.dispatchEvent(new Event(r.ONLINE))),i.classList.add("is-online"),i.classList.remove("is-offline"),a&&!t&&(console.log("".concat(n,": SESSION_PING is active")),t=setInterval(u,3e5))):(console.log("".concat(n,": Offline")),i.classList.add("is-offline"),i.classList.remove("is-online"),clearInterval(t),t=null,e.dispatchEvent(new Event(r.OFFLINE))),s=!1)},l=!1,u=function SESSION_PING(){if(!l&&!i.classList.contains("is-offline")){var e=a.getAttribute("content");console.log("".concat(n,": session ping")),l=!0,Dt.post(e,{}).then((function(e){l=!1,c(!0)})).catch((function(e){console.error(e),console.warn("".concat(n,": SESSION_PING failed")),l=!1,c(!1)}))}},f=function navigatorStateUpdate(){"undefined"!==typeof navigator.onLine&&(navigator.onLine?c(!0):c(!1))};e.addEventListener("".concat(r.OFFLINE),(function(){c(!1)})),e.addEventListener("".concat(r.ONLINE),(function(){c(!0)})),e.addEventListener("".concat(r.LOADED),f),e.addEventListener("".concat(r.AJAX),f)}(window);function image_defineProperties(e,t){for(var n=0;n=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function forEachMethodNoData(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function forEachMethodWithData(e){c.headers[e]=r.merge(s)})),e.exports=c},146:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},106:function(e){e.exports={version:"0.26.1"}},770:function(e){"use strict";e.exports=function bind(e,t){return function wrap(){for(var n=new Array(arguments.length),r=0;r=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},175:function(e){"use strict";e.exports=function spread(e){return function wrap(t){return e.apply(null,t)}}},667:function(e,t,n){"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var r=n(106).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function validator(n){return _typeof(n)===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function transitional(e,t,n){function formatMessage(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,o){if(!1===e)throw new Error(formatMessage(r," has been removed"+(t?" in "+t:"")));return t&&!i[r]&&(i[r]=!0,console.warn(formatMessage(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}},e.exports={assertOptions:function assertOptions(e,t,n){if("object"!==_typeof(e))throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],c=void 0===s||a(s,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},780:function(e,t,n){"use strict";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var r=n(770),o=Object.prototype.toString;function isArray(e){return Array.isArray(e)}function isUndefined(e){return"undefined"===typeof e}function isArrayBuffer(e){return"[object ArrayBuffer]"===o.call(e)}function isObject(e){return null!==e&&"object"===_typeof(e)}function isPlainObject(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function isFunction(e){return"[object Function]"===o.call(e)}function forEach(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==_typeof(e)&&(e=[e]),isArray(e))for(var n=0,r=e.length;n - ss-webpack-boilerplate [29 Mar 2022 at 13:43] + ss-webpack-boilerplate [8 Apr 2022 at 15:20] diff --git a/app/templates/Sheadawson/Linkable/Models/Link.ss b/app/templates/Sheadawson/Linkable/Models/Link.ss index 0cdfe27..8981cda 100644 --- a/app/templates/Sheadawson/Linkable/Models/Link.ss +++ b/app/templates/Sheadawson/Linkable/Models/Link.ss @@ -5,6 +5,8 @@ <% else_if $Type == 'Email' %> <% end_if %> - $Title + + $Title + -<% end_if %> \ No newline at end of file +<% end_if %> diff --git a/composer.json b/composer.json index b50491d..bdbb57d 100755 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ ], "license": "BSD-3-Clause", "require": { - "php": ">=7.1.0", + "php": ">=7.4.0", "ext-json": "*", "silverstripe/recipe-cms": "^4", "silverstripe/recipe-plugin": "*", diff --git a/package.json b/package.json index e174fe1..2a7f499 100755 --- a/package.json +++ b/package.json @@ -36,11 +36,11 @@ "dependencies": { "@a2nt/meta-lightbox-js": "^4.1.9", "@a2nt/ss-bootstrap-ui-webpack-boilerplate-react": "^4.5.2", - "@angular/common": "^13.3.0", - "@angular/core": "^13.3.0", + "@angular/common": "^13.3.2", + "@angular/core": "^13.3.2", "@apollo/client": "^3.5.10", "@jsanahuja/instagramfeed": "github:jsanahuja/instagramfeed", - "@popperjs/core": "^2.11.4", + "@popperjs/core": "^2.11.5", "@turf/clone": "^6.5.0", "@turf/clusters-dbscan": "^6.5.0", "@turf/clusters-kmeans": "^6.5.0", @@ -68,26 +68,26 @@ "localforage-cordovasqlitedriver": "^1.8.0", "lodash.debounce": "^4.0.8", "lodash.throttle": "^4.1.1", - "mapbox-gl": "^2.7.1", + "mapbox-gl": "^2.8.0", "material-design-color": "^2.3.2", "minimatch": "^5.0.1", - "moment": "^2.29.1", - "react": "^17.0.2", - "react-dom": "^17.0.2", + "moment": "^2.29.2", + "react": "^18.0.0", + "react-dom": "^18.0.0", "react-easy-swipe": "^0.0.22", "react-tiny-oembed": "^1.1.0", "rxjs": "^7.5.5", "select2": "^4.0.13", "setimmediate": "^1.0.5", "skmeans": "^0.11.3", - "supercluster": "^7.1.4", + "supercluster": "^7.1.5", "vanilla-calendar": "^1.0.30", "vanillajs-datepicker": "^1.2.0", "youtube-embed": "^1.0.0" }, "devDependencies": { "@a2nt/image-sprite-webpack-plugin": "^0.2.5", - "@babel/core": "^7.17.8", + "@babel/core": "^7.17.9", "@babel/eslint-parser": "^7.17.0", "@babel/plugin-proposal-class-properties": "^7.16.7", "@babel/plugin-proposal-object-rest-spread": "^7.17.3", @@ -98,7 +98,7 @@ "@babel/plugin-transform-typescript": "^7.16.8", "@babel/preset-env": "^7.16.11", "@babel/preset-react": "^7.16.7", - "@babel/runtime": "^7.17.8", + "@babel/runtime": "^7.17.9", "@googlemaps/markerclusterer": "*", "@sucrase/webpack-loader": "^2.0.0", "@ungap/global-this": "^0.4.4", @@ -118,13 +118,13 @@ "css-loader": "^6.7.1", "css-minimizer-webpack-plugin": "^3.4.1", "eslint": "^8.12.0", - "eslint-plugin-import": "^2.25.4", + "eslint-plugin-import": "^2.26.0", "eslint-plugin-jquery": "^1.5.1", "eslint-plugin-react": "^7.29.4", "events": "^3.3.0", "exif-js": "^2.3.0", "exports-loader": "^3.1.0", - "fast-equals": "^3.0.0", + "fast-equals": "^3.0.1", "fast-json-stable-stringify": "^2.1.0", "fast-levenshtein": "^3.0.0", "fastest-levenshtein": "^1.0.12", @@ -136,7 +136,7 @@ "html-dom-parser": "^1.1.1", "html-entities": "^2.3.3", "html-loader": "^3.1.0", - "html-react-parser": "^1.4.9", + "html-react-parser": "^1.4.10", "html-webpack-plugin": "^5.5.0", "img-optimize-loader": "^1.0.7", "js-yaml": "^4.1.0", @@ -153,7 +153,7 @@ "querystring": "^0.2.1", "raw-loader": "^4.0.2", "react-hot-loader": "^4.13.0", - "react-is": "^17.0.2", + "react-is": "^18.0.0", "react-lifecycles-compat": "^3.0.4", "regenerator-runtime": "^0.13.9", "resolve-url-loader": "^5.0.0", @@ -164,11 +164,11 @@ "sass-lint-auto-fix": "^0.21.2", "sass-lint-fix": "^1.12.1", "sass-loader": "^12.6.0", - "scheduler": "^0.20.2", + "scheduler": "^0.21.0", "shallowequal": "^1.1.0", "strip-ansi": "^7.0.1", "style-loader": "^3.3.1", - "sucrase": "^3.20.3", + "sucrase": "^3.21.0", "svg-url-loader": "^7.1.1", "symbol-observable": "^4.0.0", "terser-webpack-plugin": "^5.3.1", @@ -176,10 +176,10 @@ "tslib": "^2.3.1", "url": "^0.11.0", "url-loader": "^4.1.1", - "webpack": "^5.70.0", + "webpack": "^5.72.0", "webpack-bundle-analyzer": "^4.5.0", "webpack-cli": "^4.9.2", - "webpack-dev-server": "^4.7.4", + "webpack-dev-server": "^4.8.1", "webpack-manifest-plugin": "^5.0.0", "webpack-merge": "^5.8.0", "yarn": "^1.22.18",