var CarbonComponents=function(e){"use strict";var t={prefix:"bx",selectorTabbable:"\n    a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n    button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n    textarea:not([disabled]):not([tabindex='-1']),\n    iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]\n  ",selectorFocusable:"\n    a[href], area[href], input:not([disabled]),\n    button:not([disabled]),select:not([disabled]),\n    textarea:not([disabled]),\n    iframe, object, embed, *[tabindex], *[contenteditable=true]\n  "};function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?u(e):t}function p(e,t,n){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(n):a.value}})(e,t,n||e)}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],o=!0,a=!1,i=void 0;try{for(var r,s=e[Symbol.iterator]();!(o=(r=s.next()).done)&&(n.push(r.value),!t||n.length!==t);o=!0);}catch(e){a=!0,i=e}finally{try{o||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function f(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function m(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function e(t){return t.reduce(function(t,n){return Array.isArray(n)?t.push.apply(t,f(e(n))):t.push(n),t},[])}(t).reduce(function(e,t){return t(e)},function(){return function e(){n(this,e)}}())}function g(e){return function(t){function o(e){var t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,o),i(u(t=d(this,c(o).call(this,e,a))),"children",[]),!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");return t.element=e,t.options=Object.assign(Object.create(t.constructor.options),a),t.constructor.components.set(t.element,u(t)),t}return s(o,e),a(o,[{key:"release",value:function(){for(var e=this.children.pop();e;e=this.children.pop())e.release();return this.constructor.components.delete(this.element),null}}],[{key:"create",value:function(e,t){return this.components.get(e)||new this(e,t)}}]),o}()}function v(e){return function(t){function o(){return n(this,o),d(this,c(o).apply(this,arguments))}return s(o,e),a(o,null,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=Object.assign(Object.create(this.options),n);if(!t||t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");t.nodeType===Node.ELEMENT_NODE&&t.matches(o.selectorInit)?this.create(t,n):Array.prototype.forEach.call(t.querySelectorAll(o.selectorInit),function(t){return e.create(t,n)})}}]),o}()}function b(e){return function(t){function o(){var e,t;n(this,o);for(var a=arguments.length,r=new Array(a),s=0;s<a;s++)r[s]=arguments[s];return i(u(t=d(this,(e=c(o)).call.apply(e,[this].concat(r)))),"handles",new Set),t}return s(o,e),a(o,[{key:"manage",value:function(e){return this.handles.add(e),e}},{key:"unmanage",value:function(e){return this.handles.delete(e),e}},{key:"release",value:function(){var e=this;return this.handles.forEach(function(t){t.release(),e.handles.delete(t)}),p(c(o.prototype),"release",this).call(this)}}]),o}()}function y(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return e.addEventListener.apply(e,n),{release:function(){return e.removeEventListener.apply(e,n),null}}}var w={true:"true",false:"false",mixed:"mixed"},S=function(e){function o(e,t){var a;return n(this,o),(a=d(this,c(o).call(this,e,t))).manage(y(a.element,"click",function(e){a._handleClick(e)})),a.manage(y(a.element,"focus",function(e){a._handleFocus(e)})),a.manage(y(a.element,"blur",function(e){a._handleBlur(e)})),a._indeterminateCheckbox(),a._initCheckbox(),a}return s(o,m(g,v,b)),a(o,[{key:"_handleClick",value:function(){!0===this.element.checked?(this.element.setAttribute("checked",""),this.element.setAttribute("aria-checked","true"),this.element.checked=!0,this.element.parentElement.classList.contains(this.options.classLabel)&&this.element.parentElement.setAttribute(this.options.attribContainedCheckboxState,"true")):!1===this.element.checked&&(this.element.removeAttribute("checked"),this.element.setAttribute("aria-checked","false"),this.element.checked=!1,this.element.parentElement.classList.contains(this.options.classLabel)&&this.element.parentElement.setAttribute(this.options.attribContainedCheckboxState,"false"))}},{key:"_handleFocus",value:function(){this.element.parentElement.classList.contains(this.options.classLabel)&&this.element.parentElement.classList.add(this.options.classLabelFocused)}},{key:"_handleBlur",value:function(){this.element.parentElement.classList.contains(this.options.classLabel)&&this.element.parentElement.classList.remove(this.options.classLabelFocused)}},{key:"setState",value:function(e){if(void 0===e||void 0===w[e])throw new TypeError("setState expects a value of true, false or mixed.");this.element.setAttribute("aria-checked",e),this.element.indeterminate=e===w.mixed,this.element.checked=e===w.true;var t=this.element.closest(this.options.selectorContainedCheckboxState);t&&t.setAttribute(this.options.attribContainedCheckboxState,e)}},{key:"setDisabled",value:function(e){if(void 0===e)throw new TypeError("setDisabled expects a boolean value of true or false");!0===e?this.element.setAttribute("disabled",!0):!1===e&&this.element.removeAttribute("disabled");var t=this.element.closest(this.options.selectorContainedCheckboxDisabled);t&&t.setAttribute(this.options.attribContainedCheckboxDisabled,e)}},{key:"_indeterminateCheckbox",value:function(){"mixed"===this.element.getAttribute("aria-checked")&&(this.element.indeterminate=!0),!0===this.element.indeterminate&&this.element.setAttribute("aria-checked","mixed"),this.element.parentElement.classList.contains(this.options.classLabel)&&!0===this.element.indeterminate&&this.element.parentElement.setAttribute(this.options.attribContainedCheckboxState,"mixed")}},{key:"_initCheckbox",value:function(){!0===this.element.checked&&this.element.setAttribute("aria-checked","true"),this.element.parentElement.classList.contains(this.options.classLabel)&&this.element.checked&&this.element.parentElement.setAttribute(this.options.attribContainedCheckboxState,"true"),this.element.parentElement.classList.contains(this.options.classLabel)&&this.element.parentElement.setAttribute(this.options.attribContainedCheckboxDisabled,"false"),this.element.parentElement.classList.contains(this.options.classLabel)&&this.element.disabled&&this.element.parentElement.setAttribute(this.options.attribContainedCheckboxDisabled,"true")}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:".".concat(e,"--checkbox"),selectorContainedCheckboxState:"[data-contained-checkbox-state]",selectorContainedCheckboxDisabled:"[data-contained-checkbox-disabled]",classLabel:"".concat(e,"--checkbox-label"),classLabelFocused:"".concat(e,"--checkbox-label__focus"),attribContainedCheckboxState:"data-contained-checkbox-state",attribContainedCheckboxDisabled:"data-contained-checkbox-disabled"}}}]),o}();function C(e){return function(t){function o(){return n(this,o),d(this,c(o).apply(this,arguments))}return s(o,e),a(o,[{key:"_changeState",value:function(){throw new Error("_changeState() should be overriden to perform actual change in state.")}},{key:"changeState",value:function(){for(var e=this,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var a="string"==typeof n[0]?n.shift():void 0,i=Object(n[0])===n[0]&&"function"!=typeof n[0]?n.shift():void 0,r="function"==typeof n[0]?n.shift():void 0;if("function"!=typeof this.shouldStateBeChanged||this.shouldStateBeChanged(a,i)){var s={group:i&&i.group,state:a},c=[s.group,a].filter(Boolean).join("-").split("-").map(function(e){return e[0].toUpperCase()+e.substr(1)}).join(""),l=new CustomEvent(this.options["eventBefore".concat(c)],{bubbles:!0,cancelable:!0,detail:i}),u=i&&i.delegatorNode||this.element,d=!u.dispatchEvent(l);if(d){if(r){var p=new Error("Changing state (".concat(JSON.stringify(s),") has been canceled."));p.canceled=!0,r(p)}}else{var h=[a,i].filter(Boolean);this._changeState.apply(this,f(h).concat([function(){u.dispatchEvent(new CustomEvent(e.options["eventAfter".concat(c)],{bubbles:!0,cancelable:!0,detail:i})),r&&r()}]))}}else r&&r(null,!0)}}]),o}()}function k(e,t){var n=e.target,o=e.currentTarget;if("function"==typeof n.matches){if(n.matches(t))return n;if(n.matches("".concat(t," *"))){var a=n.closest(t);if((o.nodeType===Node.DOCUMENT_NODE?o.documentElement:o).contains(a))return a}}}i(S,"components",new WeakMap),i(S,"stateChangeTypes",w);var E=function(e){return Array.prototype.slice.call(e)},_=function(e){function o(e){var t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n(this,o),i(u(t=d(this,c(o).call(this,e,a))),"_changeState",function(e,n,o){"delete-filename-fileuploader"===e&&t.container.removeChild(n.filenameElement),"function"==typeof o&&o()}),i(u(t),"_handleDeleteButton",function(e){var n=k(e,t.options.selectorCloseButton);n&&t.changeState("delete-filename-fileuploader",{initialEvt:e,filenameElement:n.closest(t.options.selectorSelectedFile)})}),i(u(t),"_handleDragDrop",function(e){var n=t.element.contains(e.target);if(Array.prototype.indexOf.call(e.dataTransfer.types,"Files")>=0&&!k(e,t.options.selectorOtherDropContainers)){var o=n&&k(e,t.options.selectorDropContainer);if("dragover"===e.type){e.preventDefault();var a=o?"copy":"none";Array.isArray(e.dataTransfer.types)&&(e.dataTransfer.effectAllowed=a),e.dataTransfer.dropEffect=a,t.dropContainer.classList.toggle(t.options.classDragOver,Boolean(o))}"dragleave"===e.type&&t.dropContainer.classList.toggle(t.options.classDragOver,!1),o&&"drop"===e.type&&(e.preventDefault(),t._displayFilenames(e.dataTransfer.files),t.dropContainer.classList.remove(t.options.classDragOver))}}),t.input=t.element.querySelector(t.options.selectorInput),t.container=t.element.querySelector(t.options.selectorContainer),t.dropContainer=t.element.querySelector(t.options.selectorDropContainer),!t.input)throw new TypeError("Cannot find the file input box.");if(!t.container)throw new TypeError("Cannot find the file names container.");return t.inputId=t.input.getAttribute("id"),t.manage(y(t.input,"change",function(){return t._displayFilenames()})),t.manage(y(t.container,"click",t._handleDeleteButton)),t.manage(y(t.element.ownerDocument,"dragleave",t._handleDragDrop)),t.manage(y(t.dropContainer,"dragover",t._handleDragDrop)),t.manage(y(t.dropContainer,"drop",t._handleDragDrop)),t}return s(o,m(g,v,C,b)),a(o,[{key:"_filenamesHTML",value:function(e,t){return'<span class="'.concat(this.options.classSelectedFile,'">\n      <p class="').concat(this.options.classFileName,'">').concat(e,'</p>\n      <span data-for="').concat(t,'" class="').concat(this.options.classStateContainer,'"></span>\n    </span>')}},{key:"_uploadHTML",value:function(){return'\n      <div class="'.concat(this.options.classLoadingAnimation,'">\n        <div data-inline-loading-spinner class="').concat(this.options.classLoading,'">\n          <svg class="').concat(this.options.classLoadingSvg,'" viewBox="-75 -75 150 150">\n            <circle class="').concat(this.options.classLoadingBackground,'" cx="0" cy="0" r="37.5" />\n            <circle class="').concat(this.options.classLoadingStroke,'" cx="0" cy="0" r="37.5" />\n          </svg>\n        </div>\n      </div>')}},{key:"_closeButtonHTML",value:function(){return'\n      <button class="'.concat(this.options.classFileClose,'" type="button" aria-label="close">\n      <svg aria-hidden="true" viewBox="0 0 16 16" width="16" height="16">\n      <path fill="#231F20" d="M12 4.7l-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z"/>\n      </svg>\n      </button>')}},{key:"_checkmarkHTML",value:function(){return'\n      <svg focusable="false"\n        preserveAspectRatio="xMidYMid meet"\n        style="will-change: transform;"\n        xmlns="http://www.w3.org/2000/svg"\n        class="'.concat(this.options.classFileComplete,'"\n        width="16" height="16" viewBox="0 0 16 16"\n        aria-hidden="true">\n        <path d="M8 1C4.1 1 1 4.1 1 8s3.1 7 7 7 7-3.1 7-7-3.1-7-7-7zM7 11L4.3 8.3l.9-.8L7 9.3l4-3.9.9.8L7 11z"></path>\n        <path d="M7 11L4.3 8.3l.9-.8L7 9.3l4-3.9.9.8L7 11z" data-icon-path="inner-path" opacity="0"></path>\n      </svg>\n    ')}},{key:"_getStateContainers",value:function(){var e=E(this.element.querySelectorAll("[data-for=".concat(this.inputId,"]")));if(0===e.length)throw new TypeError("State container elements not found; invoke _displayFilenames() first");if(e[0].dataset.for!==this.inputId)throw new TypeError("File input id must equal [data-for] attribute");return e}},{key:"_displayFilenames",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.input.files,n=this.element.querySelector(this.options.selectorContainer),o=E(t).map(function(t){return e._filenamesHTML(t.name,e.inputId)}).join("");n.insertAdjacentHTML("afterbegin",o)}},{key:"_removeState",value:function(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");for(;e.firstChild;)e.removeChild(e.firstChild)}},{key:"_handleStateChange",value:function(e,t,n){var o=this;void 0===t?e.forEach(function(e){o._removeState(e),e.insertAdjacentHTML("beforeend",n)}):e.forEach(function(e,a){a===t&&(o._removeState(e),e.insertAdjacentHTML("beforeend",n))})}},{key:"setState",value:function(e,t){var n=this._getStateContainers();"edit"===e&&this._handleStateChange(n,t,this._closeButtonHTML()),"upload"===e&&this._handleStateChange(n,t,this._uploadHTML()),"complete"===e&&this._handleStateChange(n,t,this._checkmarkHTML())}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-file]",selectorInput:'input[type="file"].'.concat(e,"--file-input"),selectorContainer:"[data-file-container]",selectorCloseButton:".".concat(e,"--file-close"),selectorSelectedFile:".".concat(e,"--file__selected-file"),selectorDropContainer:"[data-file-drop-container]",selectorOtherDropContainers:"[data-drop-container]",classLoading:"".concat(e,"--loading ").concat(e,"--loading--small"),classLoadingAnimation:"".concat(e,"--inline-loading__animation"),classLoadingSvg:"".concat(e,"--loading__svg"),classLoadingBackground:"".concat(e,"--loading__background"),classLoadingStroke:"".concat(e,"--loading__stroke"),classFileName:"".concat(e,"--file-filename"),classFileClose:"".concat(e,"--file-close"),classFileComplete:"".concat(e,"--file-complete"),classSelectedFile:"".concat(e,"--file__selected-file"),classStateContainer:"".concat(e,"--file__state-container"),classDragOver:"".concat(e,"--file__drop-container--drag-over"),eventBeforeDeleteFilenameFileuploader:"fileuploader-before-delete-filename",eventAfterDeleteFilenameFileuploader:"fileuploader-after-delete-filename"}}}]),o}();i(_,"components",new WeakMap);var D=function(e){return Array.prototype.slice.call(e)},x=function(e){function o(e,t){var a;return n(this,o),(a=d(this,c(o).call(this,e,t))).manage(y(a.element,"click",function(e){a._handleClick(e)})),a}return s(o,m(g,v,C,b)),a(o,[{key:"_handleClick",value:function(e){var t=k(e,this.options.selectorButton);t&&this.changeState({group:"selected",item:t,launchingEvent:e})}},{key:"_changeState",value:function(e,t){var n=this,o=e.item,a=o.querySelector(this.options.selectorLink);a&&(D(this.element.querySelectorAll(this.options.selectorLink)).forEach(function(e){e!==a&&e.setAttribute("aria-selected","false")}),a.setAttribute("aria-selected","true")),D(this.element.querySelectorAll(this.options.selectorButton)).forEach(function(e){e!==o&&(e.setAttribute("aria-selected",!1),e.classList.toggle(n.options.classActive,!1),D(e.ownerDocument.querySelectorAll(e.dataset.target)).forEach(function(e){e.setAttribute("hidden",""),e.setAttribute("aria-hidden","true")}))}),o.classList.toggle(this.options.classActive,!0),o.setAttribute("aria-selected",!0),D(o.ownerDocument.querySelectorAll(o.dataset.target)).forEach(function(e){e.removeAttribute("hidden"),e.setAttribute("aria-hidden","false")}),t&&t()}},{key:"setActive",value:function(e,t){this.changeState({group:"selected",item:e},function(n){n?t&&t(Object.assign(n,{item:e})):t&&t(null,e)})}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-content-switcher]",selectorButton:'input[type="radio"], .'.concat(e,"--content-switcher-btn"),classActive:"".concat(e,"--content-switcher--selected"),eventBeforeSelected:"content-switcher-beingselected",eventAfterSelected:"content-switcher-selected"}}}]),o}();i(x,"components",new WeakMap);var A=function(e){function o(e,t){var a;n(this,o),(a=d(this,c(o).call(this,e,t))).manage(y(a.element,"keydown",function(e){a._handleKeyDown(e)})),a.manage(y(a.element.ownerDocument,"click",function(e){a._handleDocumentClick(e)}));var i=a.element.querySelector(a.options.selectorButtonSelected);return i&&a._updateTriggerText(i),a}return s(o,x),a(o,[{key:"_changeState",value:function(e,t){var n=this;p(c(o.prototype),"_changeState",this).call(this,e,function(o){o||n._updateTriggerText(e.item);for(var a=arguments.length,i=new Array(a>1?a-1:0),r=1;r<a;r++)i[r-1]=arguments[r];t.apply(void 0,[o].concat(i))})}},{key:"_handleClick",value:function(e){var t=k(e,this.options.selectorButton),n=k(e,this.options.selectorTrigger);t&&!t.classList.contains(this.options.classButtonDisabled)&&(p(c(o.prototype),"_handleClick",this).call(this,e),this._updateMenuState(!1)),n&&this._updateMenuState()}},{key:"_handleDocumentClick",value:function(e){this.element.contains(e.target)||this._updateMenuState(!1)}},{key:"_handleKeyDown",value:function(e){var t=this;if(k(e,this.options.selectorTrigger))13===e.which&&this._updateMenuState();else{var n,o={37:this.constructor.NAVIGATE.BACKWARD,39:this.constructor.NAVIGATE.FORWARD}[e.which];if(o){var a=(n=this.element.querySelectorAll(this.options.selectorButtonEnabled),Array.prototype.slice.call(n)),i=this.element.querySelector(this.options.selectorButtonSelected),r=Math.max(a.indexOf(i)+o,-1),s=r>=0&&r<a.length?r:r-Math.sign(r)*a.length;this.setActive(a[s],function(e,n){if(n){var o=n.querySelector(t.options.selectorLink);o&&o.focus()}}),e.preventDefault()}}}},{key:"_updateMenuState",value:function(e){var t=this.element.querySelector(this.options.selectorMenu),n=this.element.querySelector(this.options.selectorTrigger);t&&(t.classList.toggle(this.options.classHidden,void 0===e?e:!e),t.classList.contains(this.options.classHidden)?n.classList.remove(this.options.classOpen):n.classList.add(this.options.classOpen))}},{key:"_updateTriggerText",value:function(e){var t=this.element.querySelector(this.options.selectorTriggerText);t&&(t.textContent=e.textContent)}}],[{key:"options",get:function(){var e=t.prefix;return Object.assign(Object.create(x.options),{selectorInit:"[data-tabs]",selectorMenu:".".concat(e,"--tabs__nav"),selectorTrigger:".".concat(e,"--tabs-trigger"),selectorTriggerText:".".concat(e,"--tabs-trigger-text"),selectorButton:".".concat(e,"--tabs__nav-item"),selectorButtonEnabled:".".concat(e,"--tabs__nav-item:not(.").concat(e,"--tabs__nav-item--disabled)"),selectorButtonSelected:".".concat(e,"--tabs__nav-item--selected"),selectorLink:".".concat(e,"--tabs__nav-link"),classActive:"".concat(e,"--tabs__nav-item--selected"),classHidden:"".concat(e,"--tabs__nav--hidden"),classOpen:"".concat(e,"--tabs-trigger--open"),classButtonDisabled:"".concat(e,"--tabs__nav-item--disabled"),eventBeforeSelected:"tab-beingselected",eventAfterSelected:"tab-selected"})}}]),o}();function T(e){if(!e||"function"==typeof e)return{launchingElement:null,launchingEvent:null};var t=e.delegateTarget||e.currentTarget||e,n=e.currentTarget&&e;if(t&&!t.nodeType)throw new TypeError("DOM Node should be given for launching element.");if(n&&!n.type)throw new TypeError("DOM event should be given for launching event.");return{launchingElement:t,launchingEvent:n}}i(A,"components",new WeakMap),i(A,"NAVIGATE",{BACKWARD:-1,FORWARD:1});var M=[C,function(e){return function(t){function o(){return n(this,o),d(this,c(o).apply(this,arguments))}return s(o,e),a(o,[{key:"show",value:function(e,t){e&&"function"!=typeof e||(t=e),this.changeState("shown",T(e),t)}},{key:"hide",value:function(e,t){e&&"function"!=typeof e||(t=e),this.changeState("hidden",T(e),t)}}]),o}()}];var N=[b,function(e){return function(t){function o(e,t){var a;n(this,o),a=d(this,c(o).call(this,e,t));var i="onfocusin"in window,r=i?"focusin":"focus",s=i?"focusout":"blur";return a.manage(y(a.element.ownerDocument,r,function(e){(a.options.contentNode||a.element).contains(e.target)||a.handleBlur(e)},!i)),a.manage(y(a.element.ownerDocument,s,function(e){e.relatedTarget||a.handleBlur(e)},!i)),a}return s(o,e),a(o,[{key:"handleBlur",value:function(){throw new Error("Components inheriting TrackBlur mix-in must implement handleBlur() method.")}}]),o}()}],L=function(){var e=[],t=!1;function n(){e.forEach(function(e){e()}),t=!1}function o(){t||(t=!0,window.requestAnimationFrame(n))}return{add:function(t){return e.length||window.addEventListener("resize",o),function(t){t&&e.indexOf(t)<0&&e.push(t)}(t),{release:function(){var n=e.indexOf(t);n>=0&&e.splice(n,1)}}}}}(),I=function(e){function o(e,t){var a;n(this,o);var i=(a=d(this,c(o).call(this,e,t))).element.getAttribute(a.options.attribDirection);return a.options.direction||(a.options.direction=i||"bottom"),i||a.element.setAttribute(a.options.attribDirection,a.options.direction),a.manage(y(a.element.ownerDocument,"keydown",function(e){a._handleKeydown(e)})),a}return s(o,m(g,M,N,b)),a(o,[{key:"_handleKeydown",value:function(e){var t=e.which,n=this.options,o=n.triggerNode,a=n.refNode,i=this.element.contains(e.target);switch(t){case 27:this.changeState("hidden",T(e),function(){i&&(o||a).focus()})}}},{key:"handleBlur",value:function(e){if(this.element.classList.contains(this.options.classShown)){this.changeState("hidden",T(e));var t=this.options,n=t.refNode,o=t.triggerNode;(null===e.relatedTarget||this.element.contains(e.relatedTarget))&&n&&e.target!==n&&HTMLElement.prototype.focus.call(o||n)}}},{key:"_getContainer",value:function(){return this.element.closest(this.options.selectorContainer)||this.element.ownerDocument.body}},{key:"_getPos",value:function(){var e=this.element,t=this.options,n=t.refNode,o=t.offset,a=t.direction;if(!n)throw new Error("Cannot find the reference node for positioning floating menu.");return function(e){var t,n=e.menuSize,o=e.refPosition,a=e.offset,r=void 0===a?{}:a,s=e.direction,c=void 0===s?"bottom":s,l=e.scrollX,u=void 0===l?0:l,d=e.scrollY,p=void 0===d?0:d,h=o.left,f=void 0===h?0:h,m=o.top,g=void 0===m?0:m,v=o.right,b=void 0===v?0:v,y=o.bottom,w=void 0===y?0:y,S=n.width,C=n.height,k=r.top,E=void 0===k?0:k,_=r.left,D=void 0===_?0:_,x=(f+b)/2,A=(g+w)/2;return(t={},i(t,"left",{left:f-S+u-D,top:A-C/2+p+E}),i(t,"top",{left:x-S/2+u+D,top:g-C+p-E}),i(t,"right",{left:b+u+D,top:A-C/2+p+E}),i(t,"bottom",{left:x-S/2+u+D,top:w+p+E}),t)[c]}({menuSize:e.getBoundingClientRect(),refPosition:n.getBoundingClientRect(),offset:"function"!=typeof o?o:o(e,a,n),direction:a,scrollX:n.ownerDocument.defaultView.pageXOffset,scrollY:n.ownerDocument.defaultView.pageYOffset})}},{key:"_testStyles",value:function(){if(this.options.debugStyle){var e=this.element,t=e.ownerDocument.defaultView.getComputedStyle(e),n={position:"absolute",right:"auto",margin:0};Object.keys(n).forEach(function(e){("number"==typeof n[e]?parseFloat(n[e]):n[e])!==t.getPropertyValue(e)&&console.warn("Floating menu component expects ".concat(e,": ").concat(n[e]," style."))})}}},{key:"_place",value:function(){var e=this.element,t=this._getPos(),n=t.left,o=t.top;e.style.left="".concat(n,"px"),e.style.top="".concat(o,"px"),this._testStyles()}},{key:"shouldStateBeChanged",value:function(e){return("shown"===e||"hidden"===e)&&e!==(this.element.classList.contains(this.options.classShown)?"shown":"hidden")}},{key:"_changeState",value:function(e,n,o){var a=this,i="shown"===e,r=this.options,s=r.refNode,c=r.classShown,l=r.classRefShown,u=r.triggerNode;if(!s)throw new TypeError("Cannot find the reference node for changing the style.");if("shown"===e&&(this.hResize||(this.hResize=L.add(function(){a._place()})),this._getContainer().appendChild(this.element)),this.element.setAttribute("aria-hidden",(!i).toString()),(u||s).setAttribute("aria-expanded",i.toString()),this.element.classList.toggle(c,i),l&&s.classList.toggle(l,i),"shown"===e&&(this._place(),!this.element.hasAttribute(this.options.attribAvoidFocusOnOpen))){var d=this.element.querySelector(this.options.selectorPrimaryFocus),p=this.options.contentNode||this.element,h=p.querySelector(t.selectorTabbable),f=p.matches(t.selectorFocusable)?p:p.querySelector(t.selectorFocusable);d?d.focus():h?h.focus():f?f.focus():this.element.focus()}"hidden"===e&&this.hResize&&(this.hResize.release(),this.hResize=null),o()}},{key:"release",value:function(){this.hResize&&(this.hResize.release(),this.hResize=null),p(c(o.prototype),"release",this).call(this)}}]),o}();i(I,"options",{selectorContainer:"[data-floating-menu-container]",selectorPrimaryFocus:"[data-floating-menu-primary-focus]",attribDirection:"data-floating-menu-direction",attribAvoidFocusOnOpen:"data-avoid-focus-on-open",classShown:"",classRefShown:"",eventBeforeShown:"floating-menu-beingshown",eventAfterShown:"floating-menu-shown",eventBeforeHidden:"floating-menu-beinghidden",eventAfterHidden:"floating-menu-hidden",refNode:null,offset:{left:0,top:0}}),i(I,"components",new WeakMap);var O=function(){var e;return i(e={},"top","bottom"),i(e,"bottom","top"),i(e,"left","left"),i(e,"right","right"),e}(),F=function(){var e;return i(e={},"top",-2),i(e,"bottom",-1),i(e,"left",-2),i(e,"right",-1),e}(),P=function(e,t,n){var o=O[t],a=F[t];o&&a||console.warn("Wrong floating menu direction:",t);var i=e.offsetWidth,r=e.offsetHeight,s=q.components.get(n);if(!s)throw new TypeError("Overflow menu instance cannot be found.");var c=e.classList.contains(s.options.classMenuFlip);return"top"===o||"bottom"===o?{left:(c?-1:1)*(i/2-n.offsetWidth/2),top:0}:"left"===o||"right"===o?{left:0,top:(c?-1:1)*(r/2-n.offsetHeight/2)}:void 0},q=function(e){function o(e,t){var a;return n(this,o),i(u(a=d(this,c(o).call(this,e,t))),"getCurrentNavigation",function(){var e=a.element.ownerDocument.activeElement;return e.nodeType===Node.ELEMENT_NODE&&e.matches(a.options.selectorItem)?e:null}),i(u(a),"navigate",function(e){for(var t=f(a.element.ownerDocument.querySelectorAll(a.options.selectorItem)),n=a.getCurrentNavigation()||a.element.querySelector(a.options.selectorItemSelected),o=function(n){var o=Math.max(t.indexOf(n)+e,-1);return t[function(e,t){return e+(e>=0?0:t)}(function(e,t){return e-(e<t?0:t)}(o,t.length),t.length)]},i=o(n);i&&i!==n;i=o(i))if(!i.matches(a.options.selectorItemHidden)&&!i.parentNode.matches(a.options.selectorItemHidden)&&!i.matches(a.options.selectorItemSelected)){i.focus();break}}),"button"!==a.element.getAttribute("role")&&(a.triggerNode=a.element.querySelector(a.options.selectorTrigger)),a.manage(y(a.element.ownerDocument,"click",function(e){a._handleDocumentClick(e),a.wasOpenBeforeClick=void 0})),a.manage(y(a.element.ownerDocument,"keydown",function(e){a._handleKeyPress(e)})),a.manage(y(a.element,"mousedown",function(){a.wasOpenBeforeClick=e.classList.contains(a.options.classShown)})),a}return s(o,m(g,v,M,b)),a(o,[{key:"changeState",value:function(e,t,n){if(!this.optionMenu){var o=this.element.querySelector(this.options.selectorOptionMenu);if(!o)throw new Error("Cannot find the target menu.");this.optionMenu=I.create(o,{refNode:this.element,classShown:this.options.classMenuShown,classRefShown:this.options.classShown,offset:this.options.objMenuOffset,triggerNode:this.triggerNode,contentNode:this.element.querySelector(this.options.selectorContent)}),this.children.push(this.optionMenu)}this.optionMenu.element.classList.contains(this.options.classMenuFlip)&&(this.optionMenu.options.offset=this.options.objMenuOffsetFlip),this.optionMenu.changeState(e,Object.assign(t,{delegatorNode:this.element}),n)}},{key:"_handleDocumentClick",value:function(e){var t=this,n=this.element,o=this.optionMenu,a=this.wasOpenBeforeClick,i=this.triggerNode,r=n.contains(e.target),s=o&&o.element.contains(e.target),c=r&&!a?"shown":"hidden";r&&("A"===n.tagName&&e.preventDefault(),e.delegateTarget=n),s&&!k(e,this.options.selectorItem)||this.changeState(c,T(e),function(){"hidden"===c&&s&&t[i?"triggerNode":"element"].focus()})}},{key:"_handleKeyPress",value:function(e){var t=this,n=e.which,o=this.element,a=this.optionMenu,i=this.options,r=this.triggerNode,s=a&&a.element.contains(e.target),c=this.element.classList.contains(this.options.classShown),l=r?"triggerNode":"element";switch(n){case 13:case 32:if(!c&&this.element.ownerDocument.activeElement!==this.element)return;var u=o.contains(e.target),d=u&&!o.classList.contains(i.classShown)?"shown":"hidden";u&&(e.delegateTarget=o,e.preventDefault(),this.changeState(d,T(e),function(){"hidden"===d&&s&&t[l].focus()}));break;case 38:case 40:if(!c)return;e.preventDefault();var p={38:-1,40:1}[e.which];this.navigate(p)}}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-overflow-menu]",selectorOptionMenu:".".concat(e,"--overflow-menu-options"),selectorTrigger:"button[aria-haspopup]",selectorContent:".".concat(e,"--overflow-menu-options__content"),selectorItem:"\n        .".concat(e,"--overflow-menu-options--open\n        .").concat(e,"--overflow-menu-options__option:not(.").concat(e,"--overflow-menu-options__option--disabled) >\n        .").concat(e,"--overflow-menu-options__btn\n      "),classShown:"".concat(e,"--overflow-menu--open"),classMenuShown:"".concat(e,"--overflow-menu-options--open"),classMenuFlip:"".concat(e,"--overflow-menu--flip"),objMenuOffset:P,objMenuOffsetFlip:P}}}]),o}();function B(e){var t=function(t){function o(){return n(this,o),d(this,c(o).apply(this,arguments))}return s(o,e),a(o,null,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=Object.assign(Object.create(this.options),n);if(!t||t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");if(t.nodeType!==Node.ELEMENT_NODE||!t.matches(o.selectorInit)){var a=o.initEventNames.map(function(a){return y(t,a,function(t){var a=k(t,"[".concat(o.attribInitTarget,"]"));if(a){t.delegateTarget=a;var i=a.ownerDocument.querySelectorAll(a.getAttribute(o.attribInitTarget));if(i.length>1)throw new Error("Target widget must be unique.");if(1===i.length){"A"===a.tagName&&t.preventDefault();var r=e.create(i[0],n);"function"==typeof r.createdByLauncher&&r.createdByLauncher(t)}}})});return{release:function(){for(var e=a.pop();e;e=a.pop())e.release()}}}return this.create(t,n),""}}]),o}();return i(t,"forLazyInit",!0),t}i(q,"components",new WeakMap);var H=function(e){function o(e,a){var r;return n(this,o),i(u(r=d(this,c(o).call(this,e,a))),"_handleFocusinListener",void 0),i(u(r),"_handleKeydownListener",void 0),i(u(r),"_handleFocusin",function(e){var n=r.element.querySelector(r.options.selectorModalContainer)||r.element;r.element.classList.contains(r.options.classVisible)&&!n.contains(e.target)&&r.options.selectorsFloatingMenus.every(function(t){return!k(e,t)})&&r.element.querySelector(t.selectorTabbable).focus()}),r._hookCloseActions(),r}return s(o,m(g,B,M,b)),a(o,[{key:"createdByLauncher",value:function(e){this.show(e)}},{key:"shouldStateBeChanged",value:function(e){return"shown"===e?!this.element.classList.contains(this.options.classVisible):this.element.classList.contains(this.options.classVisible)}},{key:"_changeState",value:function(e,n,o){var a,i=this;if(this._handleFocusinListener&&(this._handleFocusinListener=this.unmanage(this._handleFocusinListener).release()),"shown"===e){var r="onfocusin"in this.element.ownerDocument.defaultView,s=r?"focusin":"focus";this._handleFocusinListener=this.manage(y(this.element.ownerDocument,s,this._handleFocusin,!r))}"hidden"===e?(this.element.classList.toggle(this.options.classVisible,!1),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!1),(this.options.selectorFocusOnClose||this.previouslyFocusedNode)&&(this.element.ownerDocument.querySelector(this.options.selectorFocusOnClose)||this.previouslyFocusedNode).focus()):"shown"===e&&(this.element.classList.toggle(this.options.classVisible,!0),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!0)),a=this.manage(y(this.element,"transitionend",function(){a&&(a=i.unmanage(a).release()),"shown"===e&&i.element.offsetWidth>0&&i.element.offsetHeight>0&&(i.previouslyFocusedNode=i.element.ownerDocument.activeElement,(i.element.querySelector(i.options.selectorPrimaryFocus)||i.element.querySelector(t.selectorTabbable)).focus());o()}))}},{key:"_hookCloseActions",value:function(){var e=this;this.manage(y(this.element,"click",function(t){var n=k(t,e.options.selectorModalClose);n&&(t.delegateTarget=n),(n||t.target===e.element)&&e.hide(t)})),this._handleKeydownListener&&(this._handleKeydownListener=this.unmanage(this._handleKeydownListener).release()),this._handleKeydownListener=this.manage(y(this.element.ownerDocument.body,"keydown",function(t){27===t.which&&e.shouldStateBeChanged("hidden")&&(t.stopPropagation(),e.hide(t))}))}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-modal]",selectorModalClose:"[data-modal-close]",selectorPrimaryFocus:"[data-modal-primary-focus]",selectorsFloatingMenus:[".".concat(e,"--overflow-menu-options"),".".concat(e,"--tooltip"),".flatpickr-calendar"],selectorModalContainer:".".concat(e,"--modal-container"),classVisible:"is-visible",classBody:"".concat(e,"--body--with-modal-open"),attribInitTarget:"data-modal-target",initEventNames:["click"],eventBeforeShown:"modal-beingshown",eventAfterShown:"modal-shown",eventBeforeHidden:"modal-beinghidden",eventAfterHidden:"modal-hidden"}}}]),o}();i(H,"components",new WeakMap);var j=function(e){function o(e,t){var a;return n(this,o),(a=d(this,c(o).call(this,e,t))).active=a.options.active,a.set(a.active),a}return s(o,m(g,v,b)),a(o,[{key:"set",value:function(e){if("boolean"!=typeof e)throw new TypeError("set expects a boolean.");this.active=e,this.element.classList.toggle(this.options.classLoadingStop,!this.active);var t=this.element.parentNode;return t&&t.classList.contains(this.options.classLoadingOverlay)&&t.classList.toggle(this.options.classLoadingOverlayStop,!this.active),this}},{key:"toggle",value:function(){return this.set(!this.active)}},{key:"isActive",value:function(){return this.active}},{key:"end",value:function(){var e=this;this.set(!1);var t=this.manage(y(this.element,"animationend",function(n){t&&(t=e.unmanage(t).release()),"rotate-end-p2"===n.animationName&&e._deleteElement()}))}},{key:"_deleteElement",value:function(){var e=this.element.parentNode;e.removeChild(this.element),e.classList.contains(this.options.selectorLoadingOverlay)&&e.remove()}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-loading]",selectorLoadingOverlay:".".concat(e,"--loading-overlay"),classLoadingOverlay:"".concat(e,"--loading-overlay"),classLoadingStop:"".concat(e,"--loading--stop"),classLoadingOverlayStop:"".concat(e,"--loading-overlay--stop"),active:!0}}}]),o}();function R(e,t,n){n?e.setAttribute(t,""):e.removeAttribute(t)}i(j,"components",new WeakMap);var Y=function(e){function o(e,t){var a;n(this,o);var i=(a=d(this,c(o).call(this,e,t))).options.initialState;return i&&a.setState(i),a}return s(o,m(g,v,b)),a(o,[{key:"setState",value:function(e){var t=this.constructor.states,n=Object.keys(t).map(function(e){return t[e]});if(n.indexOf(e)<0)throw new Error("One of the following value should be given as the state: ".concat(n.join(", ")));var o=this.element,a=this.options,i=a.selectorSpinner,r=a.selectorFinished,s=a.selectorError,c=a.selectorTextActive,l=a.selectorTextFinished,u=a.selectorTextError,d=o.querySelector(i),p=o.querySelector(r),h=o.querySelector(s),f=o.querySelector(c),m=o.querySelector(l),g=o.querySelector(u);return d&&(d.classList.toggle(this.options.classLoadingStop,e!==t.ACTIVE),R(d,"hidden",e!==t.INACTIVE&&e!==t.ACTIVE)),p&&R(p,"hidden",e!==t.FINISHED),h&&R(h,"hidden",e!==t.ERROR),f&&R(f,"hidden",e!==t.ACTIVE),m&&R(m,"hidden",e!==t.FINISHED),g&&R(g,"hidden",e!==t.ERROR),this}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-inline-loading]",selectorSpinner:"[data-inline-loading-spinner]",selectorFinished:"[data-inline-loading-finished]",selectorError:"[data-inline-loading-error]",selectorTextActive:"[data-inline-loading-text-active]",selectorTextFinished:"[data-inline-loading-text-finished]",selectorTextError:"[data-inline-loading-text-error]",classLoadingStop:"".concat(e,"--loading--stop")}}}]),o}();i(Y,"states",{INACTIVE:"inactive",ACTIVE:"active",FINISHED:"finished",ERROR:"error"}),i(Y,"components",new WeakMap);var V=function(e){return Array.prototype.slice.call(e)},W=function(e){function o(e,t){var a;return n(this,o),(a=d(this,c(o).call(this,e,t))).manage(y(a.element.ownerDocument,"click",function(e){a._toggle(e)})),a.manage(y(a.element,"keydown",function(e){a._handleKeyDown(e)})),a.manage(y(a.element,"click",function(e){var t=k(e,a.options.selectorItem);t&&a.select(t)})),a.element.querySelector(a.options.selectorTrigger)&&a.element.querySelector(a.options.selectorMenu)&&a.manage(y(a.element,"mouseover",function(e){var t=k(e,a.options.selectorItem);t&&a._updateFocus(t)})),a}return s(o,m(g,v,N)),a(o,[{key:"_handleKeyDown",value:function(e){var t=this.element.classList.contains(this.options.classOpen),n={38:this.constructor.NAVIGATE.BACKWARD,40:this.constructor.NAVIGATE.FORWARD}[e.which];if(t&&void 0!==n)this.navigate(n),e.preventDefault();else{var o=this.getCurrentNavigation();!o||!t||13!==e.which&&32!==e.which||this.element.ownerDocument.activeElement.matches(this.options.selectorItem)||(e.preventDefault(),this.select(o)),this._toggle(e)}}},{key:"_focusCleanup",value:function(){var e=this.element.querySelector(this.options.selectorTrigger)?this.element.querySelector(this.options.selectorMenu):null;if(e){e.removeAttribute("aria-activedescendant");var t=this.element.querySelector(this.options.selectorItemFocused);t&&t.classList.remove(this.options.classFocused)}}},{key:"_updateFocus",value:function(e){var t=this.element.querySelector(this.options.selectorTrigger)?this.element.querySelector(this.options.selectorMenu):null,n=t.querySelector(this.options.selectorItemFocused);e.classList.add(this.options.classFocused),t.setAttribute("aria-activedescendant",e.id),n&&n.classList.remove(this.options.classFocused)}},{key:"_toggle",value:function(e){var t=this;if(!this.element.classList.contains(this.options.classDisabled)){var n=this.element.querySelector(this.options.selectorTrigger);if(40===e.which&&!e.target.matches(this.options.selectorItem)||(!n||!n.contains(e.target))&&[13,32].indexOf(e.which)>=0&&!e.target.matches(this.options.selectorItem)||27===e.which||"click"===e.type){var o=this.element.classList.contains(this.options.classOpen),a=this.element.contains(e.target),i={add:a&&40===e.which&&!o,remove:(!a||27===e.which)&&o,toggle:a&&27!==e.which&&40!==e.which},r=!1;Object.keys(i).forEach(function(e){i[e]&&(r=!0,t.element.classList[e](t.options.classOpen))});var s=V(this.element.querySelectorAll(this.options.selectorItem)),c=n?this.element.querySelector(this.options.selectorMenu):null;if(r&&this.element.classList.contains(this.options.classOpen)){if(n&&n.setAttribute("aria-expanded","true"),(c||this.element).focus(),c){var l=c.querySelector(this.options.selectorLinkSelected);c.setAttribute("aria-activedescendant",(l||s[0]).id),(l||s[0]).classList.add(this.options.classFocused)}}else r&&(a||i.remove)&&(setTimeout(function(){return(n||t.element).focus()},0),n&&n.setAttribute("aria-expanded","false"),this._focusCleanup());n||s.forEach(function(e){t.element.classList.contains(t.options.classOpen)?e.tabIndex=0:e.tabIndex=-1})}}}},{key:"getCurrentNavigation",value:function(){var e;if(this.element.querySelector(this.options.selectorTrigger)){var t=this.element.querySelector(this.options.selectorMenu),n=t.getAttribute("aria-activedescendant");e=n?t.querySelector("#".concat(n)):null}else{var o=this.element.ownerDocument.activeElement;e=o.nodeType===Node.ELEMENT_NODE&&o.matches(this.options.selectorItem)?o:null}return e}},{key:"navigate",value:function(e){for(var t=V(this.element.querySelectorAll(this.options.selectorItem)),n=this.getCurrentNavigation()||this.element.querySelector(this.options.selectorLinkSelected),o=function(n){var o,a,i=Math.max(t.indexOf(n)+e,-1);return t[function(e,t){return e+(e>=0?0:t)}((o=i,a=t.length,o-(o<a?0:a)),t.length)]},a=this.element.classList.contains(this.options.classShowSelected),i=o(n);i&&i!==n;i=o(i))if(!i.matches(this.options.selectorItemHidden)&&!i.parentNode.matches(this.options.selectorItemHidden)&&(a||!a&&!i.parentElement.matches(this.options.selectorItemSelected))){this.element.querySelector(this.options.selectorTrigger)?this._updateFocus(i):i.focus();break}}},{key:"select",value:function(e){var t=this,n=new CustomEvent(this.options.eventBeforeSelected,{bubbles:!0,cancelable:!0,detail:{item:e}});if(this.element.dispatchEvent(n)){if("navigation"!==this.element.dataset.dropdownType){var o=this.element.querySelector(this.options.selectorTrigger)||"inline"===this.element.dataset.dropdownType?this.options.selectorTextInner:this.options.selectorText,a=this.element.querySelector(o);a&&(a.innerHTML=e.innerHTML),e.parentElement.classList.add(this.options.classSelected)}this.element.dataset.value=e.parentElement.dataset.value,V(this.element.querySelectorAll(this.options.selectorLinkSelected)).forEach(function(n){e!==n&&n.parentElement.classList.remove(t.options.classSelected)}),this.element.dispatchEvent(new CustomEvent(this.options.eventAfterSelected,{bubbles:!0,cancelable:!0,detail:{item:e}}))}}},{key:"handleBlur",value:function(){this.element.classList.remove(this.options.classOpen),this._focusCleanup()}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-dropdown]",selectorTrigger:"button.".concat(e,"--dropdown-text"),selectorMenu:".".concat(e,"--dropdown-list"),selectorText:".".concat(e,"--dropdown-text"),selectorTextInner:".".concat(e,"--dropdown-text__inner"),selectorItem:".".concat(e,"--dropdown-link"),selectorItemSelected:".".concat(e,"--dropdown--selected"),selectorItemFocused:".".concat(e,"--dropdown--focused"),selectorItemHidden:'[hidden],[aria-hidden="true"]',selectorLinkSelected:".".concat(e,"--dropdown--selected .").concat(e,"--dropdown-link"),classShowSelected:"".concat(e,"--dropdown--show-selected"),classSelected:"".concat(e,"--dropdown--selected"),classFocused:"".concat(e,"--dropdown--focused"),classOpen:"".concat(e,"--dropdown--open"),classDisabled:"".concat(e,"--dropdown--disabled"),eventBeforeSelected:"dropdown-beingselected",eventAfterSelected:"dropdown-selected"}}}]),o}();i(W,"components",new WeakMap),i(W,"NAVIGATE",{BACKWARD:-1,FORWARD:1});var U=function(e){function o(e,t){var a;return n(this,o),(a=d(this,c(o).call(this,e,t))).manage(y(a.element.querySelector(".up-icon"),"click",function(e){a._handleClick(e)})),a.manage(y(a.element.querySelector(".down-icon"),"click",function(e){a._handleClick(e)})),a}return s(o,m(g,v,b)),a(o,[{key:"_handleClick",value:function(e){var t=this.element.querySelector(this.options.selectorInput),n=e.currentTarget.getAttribute("class").split(" ");n.indexOf("up-icon")>=0?++t.value:n.indexOf("down-icon")>=0&&--t.value,t.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1}))}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-numberinput]",selectorInput:".".concat(e,"--number input")}}}]),o}();i(U,"components",new WeakMap);var K=function(e){return Array.prototype.slice.call(e)},G=function(e){function o(e,t){var a;return n(this,o),i(u(a=d(this,c(o).call(this,e,t))),"_sortToggle",function(e){var t=e.element,n=e.previousValue;K(a.tableHeaders).forEach(function(e){var n=e.querySelector(a.options.selectorTableSort);null!==n&&n!==t&&(n.classList.remove(a.options.classTableSortActive),n.classList.remove(a.options.classTableSortAscending))}),n?"ascending"===n?(t.dataset.previousValue="descending",t.classList.add(a.options.classTableSortActive),t.classList.remove(a.options.classTableSortAscending)):"descending"===n&&(t.removeAttribute("data-previous-value"),t.classList.remove(a.options.classTableSortActive),t.classList.remove(a.options.classTableSortAscending)):(t.dataset.previousValue="ascending",t.classList.add(a.options.classTableSortActive),t.classList.add(a.options.classTableSortAscending))}),i(u(a),"_selectToggle",function(e){var t=e.element,n=t.checked;a.state.checkboxCount+=n?1:-1,a.countEl.textContent=a.state.checkboxCount,t.parentNode.parentNode.classList.toggle(a.options.classTableSelected),a._actionBarToggle(a.state.checkboxCount>0)}),i(u(a),"_selectAllToggle",function(e){var t=e.element.checked,n=K(a.element.querySelectorAll(a.options.selectorCheckbox));a.state.checkboxCount=t?n.length-1:0,n.forEach(function(e){e.checked=t;var n=e.parentNode.parentNode;t&&n?n.classList.add(a.options.classTableSelected):n.classList.remove(a.options.classTableSelected)}),a._actionBarToggle(a.state.checkboxCount>0),a.batchActionEl&&(a.countEl.textContent=a.state.checkboxCount)}),i(u(a),"_actionBarCancel",function(){var e=K(a.element.querySelectorAll(a.options.selectorCheckbox));K(a.element.querySelectorAll(a.options.selectorTableSelected)).forEach(function(e){e.classList.remove(a.options.classTableSelected)}),e.forEach(function(e){e.checked=!1}),a.state.checkboxCount=0,a._actionBarToggle(!1),a.batchActionEl&&(a.countEl.textContent=a.state.checkboxCount)}),i(u(a),"_actionBarToggle",function(e){e?(a.batchActionEl.dataset.active=!0,a.batchActionEl.classList.add(a.options.classActionBarActive)):a.batchActionEl&&(a.batchActionEl.dataset.active=!1,a.batchActionEl.classList.remove(a.options.classActionBarActive)),a.batchActionEl&&a.batchActionEl.addEventListener("transitionend",function e(t){a.batchActionEl.removeEventListener("transitionend",e),t.target.matches(a.options.selectorActions)&&("false"===a.batchActionEl.dataset.active?a.batchActionEl.setAttribute("tabIndex",-1):a.batchActionEl.setAttribute("tabIndex",0))})}),i(u(a),"_rowExpandToggle",function(e){var t=e.element,n=e.forceExpand,o=t.closest(a.options.eventParentContainer);if(null!=n?n:void 0===t.dataset.previousValue||"expanded"===t.dataset.previousValue)t.dataset.previousValue="collapsed",o.classList.add(a.options.classExpandableRow);else{o.classList.remove(a.options.classExpandableRow),t.dataset.previousValue="expanded";var i=a.element.querySelector(a.options.selectorExpandHeader);i&&(i.dataset.previousValue="expanded")}}),i(u(a),"_rowExpandToggleAll",function(e){var t=e.element,n=void 0===t.dataset.previousValue||"expanded"===t.dataset.previousValue;t.dataset.previousValue=n?"collapsed":"expanded";var o=a.element.querySelectorAll(a.options.selectorExpandCells);Array.prototype.forEach.call(o,function(e){a._rowExpandToggle({element:e,forceExpand:n})})}),i(u(a),"_expandableHoverToggle",function(e){e.previousElementSibling.classList.add(a.options.classExpandableRowHover);e.addEventListener("mouseout",function t(){e.previousElementSibling.classList.remove(a.options.classExpandableRowHover),e.removeEventListener("mouseout",t)})}),i(u(a),"_toggleState",function(e,t){var n=e.dataset,o=n.label?n.label:"",i=n.previousValue?n.previousValue:"",r=t;a.changeState({group:n.event,element:e,label:o,previousValue:i,initialEvt:r})}),i(u(a),"_keydownHandler",function(e){var t=a.element.querySelector(a.options.selectorToolbarSearchContainer),n=k(e,a.options.selectorSearchMagnifier),o=t.classList.contains(a.options.classToolbarSearchActive);27===e.which&&a._actionBarCancel(),t&&n&&13===e.which&&a.activateSearch(t),o&&27===e.which&&a.deactivateSearch(t,e)}),i(u(a),"refreshRows",function(){var e=K(a.element.querySelectorAll(a.options.selectorExpandCells)),t=K(a.element.querySelectorAll(a.options.selectorExpandableRows)),n=K(a.element.querySelectorAll(a.options.selectorParentRows));if(a.parentRows.length>0){var o=n.filter(function(e){return!a.parentRows.some(function(t){return t===e})});if(t.length>0){var i=o.map(function(e){return e.nextElementSibling}),r=[].concat(f(K(a.expandableRows)),f(K(i)));a.expandableRows=r}}else t.length>0&&(a.expandableRows=t);a.expandCells=e,a.parentRows=n}),a.container=e.parentNode,a.toolbarEl=a.element.querySelector(a.options.selectorToolbar),a.batchActionEl=a.element.querySelector(a.options.selectorActions),a.countEl=a.element.querySelector(a.options.selectorCount),a.cancelEl=a.element.querySelector(a.options.selectorActionCancel),a.tableHeaders=a.element.querySelectorAll("th"),a.tableBody=a.element.querySelector(a.options.selectorTableBody),a.expandCells=[],a.expandableRows=[],a.parentRows=[],a.refreshRows(),a.element.addEventListener("mouseover",function(e){var t=k(e,a.options.selectorChildRow);t&&a._expandableHoverToggle(t,!0)}),a.element.addEventListener("click",function(e){var t=k(e,a.options.eventTrigger),n=a.element.querySelector(a.options.selectorToolbarSearchContainer);t&&a._toggleState(t,e),n&&a._handleDocumentClick(e)}),a.element.addEventListener("keydown",a._keydownHandler),a.state={checkboxCount:0},a}return s(o,m(g,v,C)),a(o,[{key:"_handleDocumentClick",value:function(e){var t=this.element.querySelector(this.options.selectorToolbarSearchContainer),n=k(e,this.options.selectorSearchMagnifier),o=t.classList.contains(this.options.classToolbarSearchActive);t&&n&&this.activateSearch(t),o&&this.deactivateSearch(t,e)}},{key:"activateSearch",value:function(e){var t=e.querySelector(this.options.selectorSearchInput);e.classList.add(this.options.classToolbarSearchActive),t.focus()}},{key:"deactivateSearch",value:function(e,t){var n=e.querySelector(this.options.selectorSearchMagnifier),o=e.querySelector(this.options.selectorSearchInput),a=n.querySelector("svg");0===o.value.length&&t.target!==o&&t.target!==n&&t.target!==a&&(e.classList.remove(this.options.classToolbarSearchActive),n.focus()),27===t.which&&t.target===o&&(e.classList.remove(this.options.classToolbarSearchActive),n.focus())}},{key:"_changeState",value:function(e,t){this[this.constructor.eventHandlers[e.group]](e),t()}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-table]",selectorToolbar:".".concat(e,"--table--toolbar"),selectorActions:".".concat(e,"--batch-actions"),selectorCount:"[data-items-selected]",selectorActionCancel:".".concat(e,"--batch-summary__cancel"),selectorCheckbox:".".concat(e,"--checkbox"),selectorExpandHeader:"th.".concat(e,"--table-expand"),selectorExpandCells:"td.".concat(e,"--table-expand"),selectorExpandableRows:".".concat(e,"--expandable-row"),selectorParentRows:".".concat(e,"--parent-row"),selectorChildRow:"[data-child-row]",selectorTableBody:"tbody",selectorTableSort:".".concat(e,"--table-sort"),selectorTableSelected:".".concat(e,"--data-table--selected"),selectorToolbarSearchContainer:".".concat(e,"--toolbar-search-container-expandable"),selectorSearchMagnifier:".".concat(e,"--search-magnifier"),selectorSearchInput:".".concat(e,"--search-input"),classExpandableRow:"".concat(e,"--expandable-row"),classExpandableRowHidden:"".concat(e,"--expandable-row--hidden"),classExpandableRowHover:"".concat(e,"--expandable-row--hover"),classTableSortAscending:"".concat(e,"--table-sort--ascending"),classTableSortActive:"".concat(e,"--table-sort--active"),classToolbarSearchActive:"".concat(e,"--toolbar-search-container-active"),classActionBarActive:"".concat(e,"--batch-actions--active"),classTableSelected:"".concat(e,"--data-table--selected"),eventBeforeExpand:"data-table-beforetoggleexpand",eventAfterExpand:"data-table-aftertoggleexpand",eventBeforeExpandAll:"data-table-beforetoggleexpandall",eventAfterExpandAll:"data-table-aftertoggleexpandall",eventBeforeSort:"data-table-beforetogglesort",eventAfterSort:"data-table-aftertogglesort",eventTrigger:"[data-event]",eventParentContainer:"[data-parent-row]"}}}]),o}();i(G,"components",new WeakMap),i(G,"eventHandlers",{expand:"_rowExpandToggle",expandAll:"_rowExpandToggleAll",sort:"_sortToggle",select:"_selectToggle","select-all":"_selectAllToggle","action-bar-cancel":"_actionBarCancel"});"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var z=function(e,t){return e(t={exports:{}},t.exports),t.exports}(function(e,t){e.exports=function(){var e=function(){return(e=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},t=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],n={_disable:[],_enable:[],allowInput:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enable:[],enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},o={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",time_24hr:!1},a=function(e){return("0"+e).slice(-2)},i=function(e){return!0===e?1:0};function r(e,t,n){var o;return void 0===n&&(n=!1),function(){var a=this,i=arguments;null!==o&&clearTimeout(o),o=window.setTimeout(function(){o=null,n||e.apply(a,i)},t),n&&!o&&e.apply(a,i)}}var s=function(e){return e instanceof Array?e:[e]};function c(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function l(e,t,n){var o=window.document.createElement(e);return t=t||"",n=n||"",o.className=t,void 0!==n&&(o.textContent=n),o}function u(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function d(e,t){var n=l("div","numInputWrapper"),o=l("input","numInput "+e),a=l("span","arrowUp"),i=l("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?o.type="number":(o.type="text",o.pattern="\\d*"),void 0!==t)for(var r in t)o.setAttribute(r,t[r]);return n.appendChild(o),n.appendChild(a),n.appendChild(i),n}var p=function(){},h=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},f={D:p,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*i(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var o=parseInt(t),a=new Date(e.getFullYear(),0,2+7*(o-1),0,0,0,0);return a.setDate(a.getDate()-a.getDay()+n.firstDayOfWeek),a},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:p,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:p,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},m={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},g={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[g.w(e,t,n)]},F:function(e,t,n){return h(g.n(e,t,n)-1,!1,t)},G:function(e,t,n){return a(g.h(e,t,n))},H:function(e){return a(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[i(e.getHours()>11)]},M:function(e,t){return h(e.getMonth(),!0,t)},S:function(e){return a(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return a(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return a(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return a(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},v=function(e){var t=e.config,a=void 0===t?n:t,i=e.l10n,r=void 0===i?o:i;return function(e,t,n){var o=n||r;return void 0!==a.formatDate?a.formatDate(e,t,o):t.split("").map(function(t,n,i){return g[t]&&"\\"!==i[n-1]?g[t](e,o,a):"\\"!==t?t:""}).join("")}},b=function(e){var t=e.config,a=void 0===t?n:t,i=e.l10n,r=void 0===i?o:i;return function(e,t,o,i){if(0===e||e){var s,c=i||r,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var u=t||(a||n).dateFormat,d=String(e).trim();if("today"===d)s=new Date,o=!0;else if(/Z$/.test(d)||/GMT$/.test(d))s=new Date(e);else if(a&&a.parseDate)s=a.parseDate(e,u);else{s=a&&a.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var p=void 0,h=[],g=0,v=0,b="";g<u.length;g++){var y=u[g],w="\\"===y,S="\\"===u[g-1]||w;if(m[y]&&!S){b+=m[y];var C=new RegExp(b).exec(e);C&&(p=!0)&&h["Y"!==y?"push":"unshift"]({fn:f[y],val:C[++v]})}else w||(b+=".");h.forEach(function(e){var t=e.fn,n=e.val;return s=t(s,n,c)||s})}s=p?s:void 0}}if(s instanceof Date&&!isNaN(s.getTime()))return!0===o&&s.setHours(0,0,0,0),s;a.errorHandler(new Error("Invalid date provided: "+l))}}};function y(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var w=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},S={DAY:864e5};"function"!=typeof Object.assign&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var o=function(t){t&&Object.keys(t).forEach(function(n){return e[n]=t[n]})},a=0,i=t;a<i.length;a++){var r=i[a];o(r)}return e});var C=300;function k(p,f){var g={config:e({},n,_.defaultConfig),l10n:o};function k(e){return e.bind(g)}function E(){var e=g.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame(function(){if(void 0!==g.calendarContainer&&(g.calendarContainer.style.visibility="hidden",g.calendarContainer.style.display="block"),void 0!==g.daysContainer){var t=(g.days.offsetWidth+1)*e.showMonths;g.daysContainer.style.width=t+"px",g.calendarContainer.style.width=t+(void 0!==g.weekWrapper?g.weekWrapper.offsetWidth:0)+"px",g.calendarContainer.style.removeProperty("visibility"),g.calendarContainer.style.removeProperty("display")}})}function D(e){0===g.selectedDates.length&&re(),void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,n=e.target;void 0!==g.amPM&&e.target===g.amPM&&(g.amPM.textContent=g.l10n.amPM[i(g.amPM.textContent===g.l10n.amPM[0])]);var o=parseFloat(n.getAttribute("min")),r=parseFloat(n.getAttribute("max")),s=parseFloat(n.getAttribute("step")),c=parseInt(n.value,10),l=e.delta||(t?38===e.which?1:-1:0),u=c+s*l;if(void 0!==n.value&&2===n.value.length){var d=n===g.hourElement,p=n===g.minuteElement;u<o?(u=r+u+i(!d)+(i(d)&&i(!g.amPM)),p&&B(void 0,-1,g.hourElement)):u>r&&(u=n===g.hourElement?u-r-i(!g.amPM):o,p&&B(void 0,1,g.hourElement)),g.amPM&&d&&(1===s?u+c===23:Math.abs(u-c)>s)&&(g.amPM.textContent=g.l10n.amPM[i(g.amPM.textContent===g.l10n.amPM[0])]),n.value=a(u)}}(e);var t=g._input.value;x(),Se(),g._input.value!==t&&g._debouncedChange()}function x(){if(void 0!==g.hourElement&&void 0!==g.minuteElement){var e,t,n=(parseInt(g.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(g.minuteElement.value,10)||0)%60,a=void 0!==g.secondElement?(parseInt(g.secondElement.value,10)||0)%60:0;void 0!==g.amPM&&(e=n,t=g.amPM.textContent,n=e%12+12*i(t===g.l10n.amPM[1]));var r=void 0!==g.config.minTime||g.config.minDate&&g.minDateHasTime&&g.latestSelectedDateObj&&0===y(g.latestSelectedDateObj,g.config.minDate,!0),s=void 0!==g.config.maxTime||g.config.maxDate&&g.maxDateHasTime&&g.latestSelectedDateObj&&0===y(g.latestSelectedDateObj,g.config.maxDate,!0);if(s){var c=void 0!==g.config.maxTime?g.config.maxTime:g.config.maxDate;(n=Math.min(n,c.getHours()))===c.getHours()&&(o=Math.min(o,c.getMinutes())),o===c.getMinutes()&&(a=Math.min(a,c.getSeconds()))}if(r){var l=void 0!==g.config.minTime?g.config.minTime:g.config.minDate;(n=Math.max(n,l.getHours()))===l.getHours()&&(o=Math.max(o,l.getMinutes())),o===l.getMinutes()&&(a=Math.max(a,l.getSeconds()))}M(n,o,a)}}function A(e){var t=e||g.latestSelectedDateObj;t&&M(t.getHours(),t.getMinutes(),t.getSeconds())}function T(){var e=g.config.defaultHour,t=g.config.defaultMinute,n=g.config.defaultSeconds;if(void 0!==g.config.minDate){var o=g.config.minDate.getHours(),a=g.config.minDate.getMinutes();(e=Math.max(e,o))===o&&(t=Math.max(a,t)),e===o&&t===a&&(n=g.config.minDate.getSeconds())}if(void 0!==g.config.maxDate){var i=g.config.maxDate.getHours(),r=g.config.maxDate.getMinutes();(e=Math.min(e,i))===i&&(t=Math.min(r,t)),e===i&&t===r&&(n=g.config.maxDate.getSeconds())}M(e,t,n)}function M(e,t,n){void 0!==g.latestSelectedDateObj&&g.latestSelectedDateObj.setHours(e%24,t,n||0,0),g.hourElement&&g.minuteElement&&!g.isMobile&&(g.hourElement.value=a(g.config.time_24hr?e:(12+e)%12+12*i(e%12==0)),g.minuteElement.value=a(t),void 0!==g.amPM&&(g.amPM.textContent=g.l10n.amPM[i(e>=12)]),void 0!==g.secondElement&&(g.secondElement.value=a(n)))}function N(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&ee(t)}function L(e,t,n,o){return t instanceof Array?t.forEach(function(t){return L(e,t,n,o)}):e instanceof Array?e.forEach(function(e){return L(e,t,n,o)}):(e.addEventListener(t,n,o),void g._handlers.push({element:e,event:t,handler:n,options:o}))}function I(e){return function(t){1===t.which&&e(t)}}function O(){ge("onChange")}function F(){if(g.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(g.element.querySelectorAll("[data-"+e+"]"),function(t){return L(t,"click",g[e])})}),g.isMobile)!function(){var e=g.config.enableTime?g.config.noCalendar?"time":"datetime-local":"date";g.mobileInput=l("input",g.input.className+" flatpickr-mobile"),g.mobileInput.step=g.input.getAttribute("step")||"any",g.mobileInput.tabIndex=1,g.mobileInput.type=e,g.mobileInput.disabled=g.input.disabled,g.mobileInput.required=g.input.required,g.mobileInput.placeholder=g.input.placeholder,g.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",g.selectedDates.length>0&&(g.mobileInput.defaultValue=g.mobileInput.value=g.formatDate(g.selectedDates[0],g.mobileFormatStr)),g.config.minDate&&(g.mobileInput.min=g.formatDate(g.config.minDate,"Y-m-d")),g.config.maxDate&&(g.mobileInput.max=g.formatDate(g.config.maxDate,"Y-m-d")),g.input.type="hidden",void 0!==g.altInput&&(g.altInput.type="hidden");try{g.input.parentNode&&g.input.parentNode.insertBefore(g.mobileInput,g.input.nextSibling)}catch(e){}L(g.mobileInput,"change",function(e){g.setDate(e.target.value,!1,g.mobileFormatStr),ge("onChange"),ge("onClose")})}();else{var e=r(ie,50);g._debouncedChange=r(O,C),g.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&L(g.daysContainer,"mouseover",function(e){"range"===g.config.mode&&ae(e.target)}),L(window.document.body,"keydown",oe),g.config.inline||g.config.static||L(window,"resize",e),void 0!==window.ontouchstart?L(window.document,"touchstart",Q):L(window.document,"mousedown",I(Q)),L(window.document,"focus",Q,{capture:!0}),!0===g.config.clickOpens&&(L(g._input,"focus",g.open),L(g._input,"mousedown",I(g.open))),void 0!==g.daysContainer&&(L(g.monthNav,"mousedown",I(Ce)),L(g.monthNav,["keyup","increment"],N),L(g.daysContainer,"mousedown",I(pe))),void 0!==g.timeContainer&&void 0!==g.minuteElement&&void 0!==g.hourElement&&(L(g.timeContainer,["increment"],D),L(g.timeContainer,"blur",D,{capture:!0}),L(g.timeContainer,"mousedown",I(q)),L([g.hourElement,g.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==g.secondElement&&L(g.secondElement,"focus",function(){return g.secondElement&&g.secondElement.select()}),void 0!==g.amPM&&L(g.amPM,"mousedown",I(function(e){D(e),O()})))}}function P(e,t){var n=void 0!==e?g.parseDate(e):g.latestSelectedDateObj||(g.config.minDate&&g.config.minDate>g.now?g.config.minDate:g.config.maxDate&&g.config.maxDate<g.now?g.config.maxDate:g.now),o=g.currentYear,a=g.currentMonth;try{void 0!==n&&(g.currentYear=n.getFullYear(),g.currentMonth=n.getMonth())}catch(e){e.message="Invalid date supplied: "+n,g.config.errorHandler(e)}t&&g.currentYear!==o&&(ge("onYearChange"),K()),!t||g.currentYear===o&&g.currentMonth===a||ge("onMonthChange"),g.redraw()}function q(e){~e.target.className.indexOf("arrow")&&B(e,e.target.classList.contains("arrowUp")?1:-1)}function B(e,t,n){var o=e&&e.target,a=n||o&&o.parentNode&&o.parentNode.firstChild,i=ve("increment");i.delta=t,a&&a.dispatchEvent(i)}function H(){var e=window.document.createDocumentFragment();if(g.calendarContainer=l("div","flatpickr-calendar"),g.calendarContainer.tabIndex=-1,!g.config.noCalendar){if(e.appendChild((g.monthNav=l("div","flatpickr-months"),g.yearElements=[],g.monthElements=[],g.prevMonthNav=l("span","flatpickr-prev-month"),g.prevMonthNav.innerHTML=g.config.prevArrow,g.nextMonthNav=l("span","flatpickr-next-month"),g.nextMonthNav.innerHTML=g.config.nextArrow,z(),Object.defineProperty(g,"_hidePrevMonthArrow",{get:function(){return g.__hidePrevMonthArrow},set:function(e){g.__hidePrevMonthArrow!==e&&(c(g.prevMonthNav,"flatpickr-disabled",e),g.__hidePrevMonthArrow=e)}}),Object.defineProperty(g,"_hideNextMonthArrow",{get:function(){return g.__hideNextMonthArrow},set:function(e){g.__hideNextMonthArrow!==e&&(c(g.nextMonthNav,"flatpickr-disabled",e),g.__hideNextMonthArrow=e)}}),g.currentYearElement=g.yearElements[0],ye(),g.monthNav)),g.innerContainer=l("div","flatpickr-innerContainer"),g.config.weekNumbers){var t=function(){g.calendarContainer.classList.add("hasWeeks");var e=l("div","flatpickr-weekwrapper");e.appendChild(l("span","flatpickr-weekday",g.l10n.weekAbbreviation));var t=l("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,o=t.weekNumbers;g.innerContainer.appendChild(n),g.weekNumbers=o,g.weekWrapper=n}g.rContainer=l("div","flatpickr-rContainer"),g.rContainer.appendChild(J()),g.daysContainer||(g.daysContainer=l("div","flatpickr-days"),g.daysContainer.tabIndex=-1),U(),g.rContainer.appendChild(g.daysContainer),g.innerContainer.appendChild(g.rContainer),e.appendChild(g.innerContainer)}g.config.enableTime&&e.appendChild(function(){g.calendarContainer.classList.add("hasTime"),g.config.noCalendar&&g.calendarContainer.classList.add("noCalendar"),g.timeContainer=l("div","flatpickr-time"),g.timeContainer.tabIndex=-1;var e=l("span","flatpickr-time-separator",":"),t=d("flatpickr-hour");g.hourElement=t.getElementsByTagName("input")[0];var n=d("flatpickr-minute");if(g.minuteElement=n.getElementsByTagName("input")[0],g.hourElement.tabIndex=g.minuteElement.tabIndex=-1,g.hourElement.value=a(g.latestSelectedDateObj?g.latestSelectedDateObj.getHours():g.config.time_24hr?g.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(g.config.defaultHour)),g.minuteElement.value=a(g.latestSelectedDateObj?g.latestSelectedDateObj.getMinutes():g.config.defaultMinute),g.hourElement.setAttribute("step",g.config.hourIncrement.toString()),g.minuteElement.setAttribute("step",g.config.minuteIncrement.toString()),g.hourElement.setAttribute("min",g.config.time_24hr?"0":"1"),g.hourElement.setAttribute("max",g.config.time_24hr?"23":"12"),g.minuteElement.setAttribute("min","0"),g.minuteElement.setAttribute("max","59"),g.timeContainer.appendChild(t),g.timeContainer.appendChild(e),g.timeContainer.appendChild(n),g.config.time_24hr&&g.timeContainer.classList.add("time24hr"),g.config.enableSeconds){g.timeContainer.classList.add("hasSeconds");var o=d("flatpickr-second");g.secondElement=o.getElementsByTagName("input")[0],g.secondElement.value=a(g.latestSelectedDateObj?g.latestSelectedDateObj.getSeconds():g.config.defaultSeconds),g.secondElement.setAttribute("step",g.minuteElement.getAttribute("step")),g.secondElement.setAttribute("min","0"),g.secondElement.setAttribute("max","59"),g.timeContainer.appendChild(l("span","flatpickr-time-separator",":")),g.timeContainer.appendChild(o)}return g.config.time_24hr||(g.amPM=l("span","flatpickr-am-pm",g.l10n.amPM[i((g.latestSelectedDateObj?g.hourElement.value:g.config.defaultHour)>11)]),g.amPM.title=g.l10n.toggleTitle,g.amPM.tabIndex=-1,g.timeContainer.appendChild(g.amPM)),g.timeContainer}()),c(g.calendarContainer,"rangeMode","range"===g.config.mode),c(g.calendarContainer,"animate",!0===g.config.animate),c(g.calendarContainer,"multiMonth",g.config.showMonths>1),g.calendarContainer.appendChild(e);var r=void 0!==g.config.appendTo&&void 0!==g.config.appendTo.nodeType;if((g.config.inline||g.config.static)&&(g.calendarContainer.classList.add(g.config.inline?"inline":"static"),g.config.inline&&(!r&&g.element.parentNode?g.element.parentNode.insertBefore(g.calendarContainer,g._input.nextSibling):void 0!==g.config.appendTo&&g.config.appendTo.appendChild(g.calendarContainer)),g.config.static)){var s=l("div","flatpickr-wrapper");g.element.parentNode&&g.element.parentNode.insertBefore(s,g.element),s.appendChild(g.element),g.altInput&&s.appendChild(g.altInput),s.appendChild(g.calendarContainer)}g.config.static||g.config.inline||(void 0!==g.config.appendTo?g.config.appendTo:window.document.body).appendChild(g.calendarContainer)}function j(e,t,n,o){var a=te(t,!0),i=l("span","flatpickr-day "+e,t.getDate().toString());return i.dateObj=t,i.$i=o,i.setAttribute("aria-label",g.formatDate(t,g.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===y(t,g.now)&&(g.todayDateElem=i,i.classList.add("today"),i.setAttribute("aria-current","date")),a?(i.tabIndex=-1,be(t)&&(i.classList.add("selected"),g.selectedDateElem=i,"range"===g.config.mode&&(c(i,"startRange",g.selectedDates[0]&&0===y(t,g.selectedDates[0],!0)),c(i,"endRange",g.selectedDates[1]&&0===y(t,g.selectedDates[1],!0)),"nextMonthDay"===e&&i.classList.add("inRange")))):i.classList.add("flatpickr-disabled"),"range"===g.config.mode&&function(e){return!("range"!==g.config.mode||g.selectedDates.length<2)&&y(e,g.selectedDates[0])>=0&&y(e,g.selectedDates[1])<=0}(t)&&!be(t)&&i.classList.add("inRange"),g.weekNumbers&&1===g.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&g.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+g.config.getWeek(t)+"</span>"),ge("onDayCreate",i),i}function R(e){e.focus(),"range"===g.config.mode&&ae(e)}function Y(e){for(var t=e>0?0:g.config.showMonths-1,n=e>0?g.config.showMonths:-1,o=t;o!=n;o+=e)for(var a=g.daysContainer.children[o],i=e>0?0:a.children.length-1,r=e>0?a.children.length:-1,s=i;s!=r;s+=e){var c=a.children[s];if(-1===c.className.indexOf("hidden")&&te(c.dateObj))return c}}function V(e,t){var n=ne(document.activeElement||document.body),o=void 0!==e?e:n?document.activeElement:void 0!==g.selectedDateElem&&ne(g.selectedDateElem)?g.selectedDateElem:void 0!==g.todayDateElem&&ne(g.todayDateElem)?g.todayDateElem:Y(t>0?1:-1);return void 0===o?g._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():g.currentMonth,o=t>0?g.config.showMonths:-1,a=t>0?1:-1,i=n-g.currentMonth;i!=o;i+=a)for(var r=g.daysContainer.children[i],s=n-g.currentMonth===i?e.$i+t:t<0?r.children.length-1:0,c=r.children.length,l=s;l>=0&&l<c&&l!=(t>0?c:-1);l+=a){var u=r.children[l];if(-1===u.className.indexOf("hidden")&&te(u.dateObj)&&Math.abs(e.$i-l)>=Math.abs(t))return R(u)}g.changeMonth(a),V(Y(a),0)}(o,t):R(o)}function W(e,t){for(var n=(new Date(e,t,1).getDay()-g.l10n.firstDayOfWeek+7)%7,o=g.utils.getDaysInMonth((t-1+12)%12),a=g.utils.getDaysInMonth(t),i=window.document.createDocumentFragment(),r=g.config.showMonths>1,s=r?"prevMonthDay hidden":"prevMonthDay",c=r?"nextMonthDay hidden":"nextMonthDay",u=o+1-n,d=0;u<=o;u++,d++)i.appendChild(j(s,new Date(e,t-1,u),u,d));for(u=1;u<=a;u++,d++)i.appendChild(j("",new Date(e,t,u),u,d));for(var p=a+1;p<=42-n&&(1===g.config.showMonths||d%7!=0);p++,d++)i.appendChild(j(c,new Date(e,t+1,p%a),p,d));var h=l("div","dayContainer");return h.appendChild(i),h}function U(){if(void 0!==g.daysContainer){u(g.daysContainer),g.weekNumbers&&u(g.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<g.config.showMonths;t++){var n=new Date(g.currentYear,g.currentMonth,1);n.setMonth(g.currentMonth+t),e.appendChild(W(n.getFullYear(),n.getMonth()))}g.daysContainer.appendChild(e),g.days=g.daysContainer.firstChild,"range"===g.config.mode&&1===g.selectedDates.length&&ae()}}function K(){if(!(g.config.showMonths>1)){var e=function(e){return!(void 0!==g.config.minDate&&g.currentYear===g.config.minDate.getFullYear()&&e<g.config.minDate.getMonth()||void 0!==g.config.maxDate&&g.currentYear===g.config.maxDate.getFullYear()&&e>g.config.maxDate.getMonth())};g.monthsDropdownContainer.tabIndex=-1,g.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var n=l("option","flatpickr-monthDropdown-month");n.value=new Date(g.currentYear,t).getMonth().toString(),n.textContent=h(t,!1,g.l10n),n.tabIndex=-1,g.currentMonth===t&&(n.selected=!0),g.monthsDropdownContainer.appendChild(n)}}}function G(){var e,t=l("div","flatpickr-month"),n=window.document.createDocumentFragment();g.config.showMonths>1?e=l("span","cur-month"):(g.monthsDropdownContainer=l("select","flatpickr-monthDropdown-months"),L(g.monthsDropdownContainer,"change",function(e){var t=e.target,n=parseInt(t.value,10);g.changeMonth(n-g.currentMonth),ge("onMonthChange")}),K(),e=g.monthsDropdownContainer);var o=d("cur-year",{tabindex:"-1"}),a=o.getElementsByTagName("input")[0];a.setAttribute("aria-label",g.l10n.yearAriaLabel),g.config.minDate&&a.setAttribute("min",g.config.minDate.getFullYear().toString()),g.config.maxDate&&(a.setAttribute("max",g.config.maxDate.getFullYear().toString()),a.disabled=!!g.config.minDate&&g.config.minDate.getFullYear()===g.config.maxDate.getFullYear());var i=l("div","flatpickr-current-month");return i.appendChild(e),i.appendChild(o),n.appendChild(i),t.appendChild(n),{container:t,yearElement:a,monthElement:e}}function z(){u(g.monthNav),g.monthNav.appendChild(g.prevMonthNav),g.config.showMonths&&(g.yearElements=[],g.monthElements=[]);for(var e=g.config.showMonths;e--;){var t=G();g.yearElements.push(t.yearElement),g.monthElements.push(t.monthElement),g.monthNav.appendChild(t.container)}g.monthNav.appendChild(g.nextMonthNav)}function J(){g.weekdayContainer?u(g.weekdayContainer):g.weekdayContainer=l("div","flatpickr-weekdays");for(var e=g.config.showMonths;e--;){var t=l("div","flatpickr-weekdaycontainer");g.weekdayContainer.appendChild(t)}return X(),g.weekdayContainer}function X(){var e=g.l10n.firstDayOfWeek,t=g.l10n.weekdays.shorthand.slice();e>0&&e<t.length&&(t=t.splice(e,t.length).concat(t.splice(0,e)));for(var n=g.config.showMonths;n--;)g.weekdayContainer.children[n].innerHTML="\n      <span class='flatpickr-weekday'>\n        "+t.join("</span><span class='flatpickr-weekday'>")+"\n      </span>\n      "}function $(e,t){void 0===t&&(t=!0);var n=t?e:e-g.currentMonth;n<0&&!0===g._hidePrevMonthArrow||n>0&&!0===g._hideNextMonthArrow||(g.currentMonth+=n,(g.currentMonth<0||g.currentMonth>11)&&(g.currentYear+=g.currentMonth>11?1:-1,g.currentMonth=(g.currentMonth+12)%12,ge("onYearChange"),K()),U(),ge("onMonthChange"),ye())}function Z(e){return!(!g.config.appendTo||!g.config.appendTo.contains(e))||g.calendarContainer.contains(e)}function Q(e){if(g.isOpen&&!g.config.inline){var t=function(e){if("function"==typeof e.composedPath){var t=e.composedPath();return t[0]}return e.target}(e),n=Z(t),o=t===g.input||t===g.altInput||g.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(g.input)||~e.path.indexOf(g.altInput)),a="blur"===e.type?o&&e.relatedTarget&&!Z(e.relatedTarget):!o&&!n&&!Z(e.relatedTarget),i=!g.config.ignoredFocusElements.some(function(e){return e.contains(t)});a&&i&&(g.close(),"range"===g.config.mode&&1===g.selectedDates.length&&(g.clear(!1),g.redraw()))}}function ee(e){if(!(!e||g.config.minDate&&e<g.config.minDate.getFullYear()||g.config.maxDate&&e>g.config.maxDate.getFullYear())){var t=e,n=g.currentYear!==t;g.currentYear=t||g.currentYear,g.config.maxDate&&g.currentYear===g.config.maxDate.getFullYear()?g.currentMonth=Math.min(g.config.maxDate.getMonth(),g.currentMonth):g.config.minDate&&g.currentYear===g.config.minDate.getFullYear()&&(g.currentMonth=Math.max(g.config.minDate.getMonth(),g.currentMonth)),n&&(g.redraw(),ge("onYearChange"),K())}}function te(e,t){void 0===t&&(t=!0);var n=g.parseDate(e,void 0,t);if(g.config.minDate&&n&&y(n,g.config.minDate,void 0!==t?t:!g.minDateHasTime)<0||g.config.maxDate&&n&&y(n,g.config.maxDate,void 0!==t?t:!g.maxDateHasTime)>0)return!1;if(0===g.config.enable.length&&0===g.config.disable.length)return!0;if(void 0===n)return!1;for(var o=g.config.enable.length>0,a=o?g.config.enable:g.config.disable,i=0,r=void 0;i<a.length;i++){if("function"==typeof(r=a[i])&&r(n))return o;if(r instanceof Date&&void 0!==n&&r.getTime()===n.getTime())return o;if("string"==typeof r&&void 0!==n){var s=g.parseDate(r,void 0,!0);return s&&s.getTime()===n.getTime()?o:!o}if("object"==typeof r&&void 0!==n&&r.from&&r.to&&n.getTime()>=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function ne(e){return void 0!==g.daysContainer&&-1===e.className.indexOf("hidden")&&g.daysContainer.contains(e)}function oe(e){var t=e.target===g._input,n=g.config.allowInput,o=g.isOpen&&(!n||!t),a=g.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return g.setDate(g._input.value,!0,e.target===g.altInput?g.config.altFormat:g.config.dateFormat),e.target.blur();g.open()}else if(Z(e.target)||o||a){var i=!!g.timeContainer&&g.timeContainer.contains(e.target);switch(e.keyCode){case 13:i?(e.preventDefault(),D(),de()):pe(e);break;case 27:e.preventDefault(),de();break;case 8:case 46:t&&!g.config.allowInput&&(e.preventDefault(),g.clear());break;case 37:case 39:if(i||t)g.hourElement&&g.hourElement.focus();else if(e.preventDefault(),void 0!==g.daysContainer&&(!1===n||document.activeElement&&ne(document.activeElement))){var r=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),$(r),V(Y(1),0)):V(void 0,r)}break;case 38:case 40:e.preventDefault();var s=40===e.keyCode?1:-1;g.daysContainer&&void 0!==e.target.$i||e.target===g.input?e.ctrlKey?(e.stopPropagation(),ee(g.currentYear-s),V(Y(1),0)):i||V(void 0,7*s):e.target===g.currentYearElement?ee(g.currentYear-s):g.config.enableTime&&(!i&&g.hourElement&&g.hourElement.focus(),D(e),g._debouncedChange());break;case 9:if(i){var c=[g.hourElement,g.minuteElement,g.secondElement,g.amPM].concat(g.pluginElements).filter(function(e){return e}),l=c.indexOf(e.target);if(-1!==l){var u=c[l+(e.shiftKey?-1:1)];e.preventDefault(),(u||g._input).focus()}}else!g.config.noCalendar&&g.daysContainer&&g.daysContainer.contains(e.target)&&e.shiftKey&&(e.preventDefault(),g._input.focus())}}if(void 0!==g.amPM&&e.target===g.amPM)switch(e.key){case g.l10n.amPM[0].charAt(0):case g.l10n.amPM[0].charAt(0).toLowerCase():g.amPM.textContent=g.l10n.amPM[0],x(),Se();break;case g.l10n.amPM[1].charAt(0):case g.l10n.amPM[1].charAt(0).toLowerCase():g.amPM.textContent=g.l10n.amPM[1],x(),Se()}(t||Z(e.target))&&ge("onKeyDown",e)}function ae(e){if(1===g.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled"))){for(var t=e?e.dateObj.getTime():g.days.firstElementChild.dateObj.getTime(),n=g.parseDate(g.selectedDates[0],void 0,!0).getTime(),o=Math.min(t,g.selectedDates[0].getTime()),a=Math.max(t,g.selectedDates[0].getTime()),i=!1,r=0,s=0,c=o;c<a;c+=S.DAY)te(new Date(c),!0)||(i=i||c>o&&c<a,c<n&&(!r||c>r)?r=c:c>n&&(!s||c<s)&&(s=c));for(var l=0;l<g.config.showMonths;l++)for(var u=g.daysContainer.children[l],d=function(o,a){var c=u.children[o],l=c.dateObj,d=l.getTime(),p=r>0&&d<r||s>0&&d>s;return p?(c.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){c.classList.remove(e)}),"continue"):i&&!p?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){c.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t<=g.selectedDates[0].getTime()?"startRange":"endRange"),n<t&&d===n?c.classList.add("startRange"):n>t&&d===n&&c.classList.add("endRange"),d>=r&&(0===s||d<=s)&&w(d,n,t)&&c.classList.add("inRange"))))},p=0,h=u.children.length;p<h;p++)d(p)}}function ie(){!g.isOpen||g.config.static||g.config.inline||le()}function re(){g.setDate(void 0!==g.config.minDate?new Date(g.config.minDate.getTime()):new Date,!0),T(),Se()}function se(e){return function(t){var n=g.config["_"+e+"Date"]=g.parseDate(t,g.config.dateFormat),o=g.config["_"+("min"===e?"max":"min")+"Date"];void 0!==n&&(g["min"===e?"minDateHasTime":"maxDateHasTime"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),g.selectedDates&&(g.selectedDates=g.selectedDates.filter(function(e){return te(e)}),g.selectedDates.length||"min"!==e||A(n),Se()),g.daysContainer&&(ue(),void 0!==n?g.currentYearElement[e]=n.getFullYear().toString():g.currentYearElement.removeAttribute(e),g.currentYearElement.disabled=!!o&&void 0!==n&&o.getFullYear()===n.getFullYear())}}function ce(){"object"!=typeof g.config.locale&&void 0===_.l10ns[g.config.locale]&&g.config.errorHandler(new Error("flatpickr: invalid locale "+g.config.locale)),g.l10n=e({},_.l10ns.default,"object"==typeof g.config.locale?g.config.locale:"default"!==g.config.locale?_.l10ns[g.config.locale]:void 0),m.K="("+g.l10n.amPM[0]+"|"+g.l10n.amPM[1]+"|"+g.l10n.amPM[0].toLowerCase()+"|"+g.l10n.amPM[1].toLowerCase()+")";var t=e({},f,JSON.parse(JSON.stringify(p.dataset||{})));void 0===t.time_24hr&&void 0===_.defaultConfig.time_24hr&&(g.config.time_24hr=g.l10n.time_24hr),g.formatDate=v(g),g.parseDate=b({config:g.config,l10n:g.l10n})}function le(e){if(void 0!==g.calendarContainer){ge("onPreCalendarPosition");var t=e||g._positionElement,n=Array.prototype.reduce.call(g.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),o=g.calendarContainer.offsetWidth,a=g.config.position.split(" "),i=a[0],r=a.length>1?a[1]:null,s=t.getBoundingClientRect(),l=window.innerHeight-s.bottom,u="above"===i||"below"!==i&&l<n&&s.top>n,d=window.pageYOffset+s.top+(u?-n-2:t.offsetHeight+2);if(c(g.calendarContainer,"arrowTop",!u),c(g.calendarContainer,"arrowBottom",u),!g.config.inline){var p=window.pageXOffset+s.left-(null!=r&&"center"===r?(o-s.width)/2:0),h=window.document.body.offsetWidth-s.right,f=p+o>window.document.body.offsetWidth,m=h+o>window.document.body.offsetWidth;if(c(g.calendarContainer,"rightMost",f),!g.config.static)if(g.calendarContainer.style.top=d+"px",f)if(m){var v=document.styleSheets[0];if(void 0===v)return;var b=window.document.body.offsetWidth,y=Math.max(0,b/2-o/2),w=v.cssRules.length,S="{left:"+s.left+"px;right:auto;}";c(g.calendarContainer,"rightMost",!1),c(g.calendarContainer,"centerMost",!0),v.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+S,w),g.calendarContainer.style.left=y+"px",g.calendarContainer.style.right="auto"}else g.calendarContainer.style.left="auto",g.calendarContainer.style.right=h+"px";else g.calendarContainer.style.left=p+"px",g.calendarContainer.style.right="auto"}}}function ue(){g.config.noCalendar||g.isMobile||(ye(),U())}function de(){g._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(g.close,0):g.close()}function pe(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,o=g.latestSelectedDateObj=new Date(n.dateObj.getTime()),a=(o.getMonth()<g.currentMonth||o.getMonth()>g.currentMonth+g.config.showMonths-1)&&"range"!==g.config.mode;if(g.selectedDateElem=n,"single"===g.config.mode)g.selectedDates=[o];else if("multiple"===g.config.mode){var i=be(o);i?g.selectedDates.splice(parseInt(i),1):g.selectedDates.push(o)}else"range"===g.config.mode&&(2===g.selectedDates.length&&g.clear(!1,!1),g.latestSelectedDateObj=o,g.selectedDates.push(o),0!==y(o,g.selectedDates[0],!0)&&g.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(x(),a){var r=g.currentYear!==o.getFullYear();g.currentYear=o.getFullYear(),g.currentMonth=o.getMonth(),r&&(ge("onYearChange"),K()),ge("onMonthChange")}if(ye(),U(),Se(),g.config.enableTime&&setTimeout(function(){return g.showTimeInput=!0},50),a||"range"===g.config.mode||1!==g.config.showMonths?void 0!==g.selectedDateElem&&void 0===g.hourElement&&g.selectedDateElem&&g.selectedDateElem.focus():R(n),void 0!==g.hourElement&&void 0!==g.hourElement&&g.hourElement.focus(),g.config.closeOnSelect){var s="single"===g.config.mode&&!g.config.enableTime,c="range"===g.config.mode&&2===g.selectedDates.length&&!g.config.enableTime;(s||c)&&de()}O()}}g.parseDate=b({config:g.config,l10n:g.l10n}),g._handlers=[],g.pluginElements=[],g.loadedPlugins=[],g._bind=L,g._setHoursFromDate=A,g._positionCalendar=le,g.changeMonth=$,g.changeYear=ee,g.clear=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0),g.input.value="",void 0!==g.altInput&&(g.altInput.value=""),void 0!==g.mobileInput&&(g.mobileInput.value=""),g.selectedDates=[],g.latestSelectedDateObj=void 0,!0===t&&(g.currentYear=g._initialDate.getFullYear(),g.currentMonth=g._initialDate.getMonth()),g.showTimeInput=!1,!0===g.config.enableTime&&T(),g.redraw(),e&&ge("onChange")},g.close=function(){g.isOpen=!1,g.isMobile||(void 0!==g.calendarContainer&&g.calendarContainer.classList.remove("open"),void 0!==g._input&&g._input.classList.remove("active")),ge("onClose")},g._createElement=l,g.destroy=function(){void 0!==g.config&&ge("onDestroy");for(var e=g._handlers.length;e--;){var t=g._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(g._handlers=[],g.mobileInput)g.mobileInput.parentNode&&g.mobileInput.parentNode.removeChild(g.mobileInput),g.mobileInput=void 0;else if(g.calendarContainer&&g.calendarContainer.parentNode)if(g.config.static&&g.calendarContainer.parentNode){var n=g.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else g.calendarContainer.parentNode.removeChild(g.calendarContainer);g.altInput&&(g.input.type="text",g.altInput.parentNode&&g.altInput.parentNode.removeChild(g.altInput),delete g.altInput),g.input&&(g.input.type=g.input._type,g.input.classList.remove("flatpickr-input"),g.input.removeAttribute("readonly"),g.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete g[e]}catch(e){}})},g.isEnabled=te,g.jumpToDate=P,g.open=function(e,t){if(void 0===t&&(t=g._positionElement),!0===g.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==g.mobileInput&&(g.mobileInput.focus(),g.mobileInput.click()),void ge("onOpen");if(!g._input.disabled&&!g.config.inline){var n=g.isOpen;g.isOpen=!0,n||(g.calendarContainer.classList.add("open"),g._input.classList.add("active"),ge("onOpen"),le(t)),!0===g.config.enableTime&&!0===g.config.noCalendar&&(0===g.selectedDates.length&&re(),!1!==g.config.allowInput||void 0!==e&&g.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return g.hourElement.select()},50))}},g.redraw=ue,g.set=function(e,n){if(null!==e&&"object"==typeof e)for(var o in Object.assign(g.config,e),e)void 0!==he[o]&&he[o].forEach(function(e){return e()});else g.config[e]=n,void 0!==he[e]?he[e].forEach(function(e){return e()}):t.indexOf(e)>-1&&(g.config[e]=s(n));g.redraw(),Se(!1)},g.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=g.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return g.clear(t);fe(e,n),g.showTimeInput=g.selectedDates.length>0,g.latestSelectedDateObj=g.selectedDates[g.selectedDates.length-1],g.redraw(),P(),A(),0===g.selectedDates.length&&g.clear(!1),Se(t),t&&ge("onChange")},g.toggle=function(e){if(!0===g.isOpen)return g.close();g.open(e)};var he={locale:[ce,X],showMonths:[z,E,J],minDate:[P],maxDate:[P]};function fe(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return g.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[g.parseDate(e,t)];else if("string"==typeof e)switch(g.config.mode){case"single":case"time":n=[g.parseDate(e,t)];break;case"multiple":n=e.split(g.config.conjunction).map(function(e){return g.parseDate(e,t)});break;case"range":n=e.split(g.l10n.rangeSeparator).map(function(e){return g.parseDate(e,t)})}else g.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));g.selectedDates=n.filter(function(e){return e instanceof Date&&te(e,!1)}),"range"===g.config.mode&&g.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function me(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?g.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:g.parseDate(e.from,void 0),to:g.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function ge(e,t){if(void 0!==g.config){var n=g.config[e];if(void 0!==n&&n.length>0)for(var o=0;n[o]&&o<n.length;o++)n[o](g.selectedDates,g.input.value,g,t);"onChange"===e&&(g.input.dispatchEvent(ve("change")),g.input.dispatchEvent(ve("input")))}}function ve(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function be(e){for(var t=0;t<g.selectedDates.length;t++)if(0===y(g.selectedDates[t],e))return""+t;return!1}function ye(){g.config.noCalendar||g.isMobile||!g.monthNav||(g.yearElements.forEach(function(e,t){var n=new Date(g.currentYear,g.currentMonth,1);n.setMonth(g.currentMonth+t),g.config.showMonths>1?g.monthElements[t].textContent=h(n.getMonth(),g.config.shorthandCurrentMonth,g.l10n)+" ":g.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()}),g._hidePrevMonthArrow=void 0!==g.config.minDate&&(g.currentYear===g.config.minDate.getFullYear()?g.currentMonth<=g.config.minDate.getMonth():g.currentYear<g.config.minDate.getFullYear()),g._hideNextMonthArrow=void 0!==g.config.maxDate&&(g.currentYear===g.config.maxDate.getFullYear()?g.currentMonth+1>g.config.maxDate.getMonth():g.currentYear>g.config.maxDate.getFullYear()))}function we(e){return g.selectedDates.map(function(t){return g.formatDate(t,e)}).filter(function(e,t,n){return"range"!==g.config.mode||g.config.enableTime||n.indexOf(e)===t}).join("range"!==g.config.mode?g.config.conjunction:g.l10n.rangeSeparator)}function Se(e){void 0===e&&(e=!0),void 0!==g.mobileInput&&g.mobileFormatStr&&(g.mobileInput.value=void 0!==g.latestSelectedDateObj?g.formatDate(g.latestSelectedDateObj,g.mobileFormatStr):""),g.input.value=we(g.config.dateFormat),void 0!==g.altInput&&(g.altInput.value=we(g.config.altFormat)),!1!==e&&ge("onValueUpdate")}function Ce(e){var t=g.prevMonthNav.contains(e.target),n=g.nextMonthNav.contains(e.target);t||n?$(t?-1:1):g.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?g.changeYear(g.currentYear+1):e.target.classList.contains("arrowDown")&&g.changeYear(g.currentYear-1)}return function(){g.element=g.input=p,g.isOpen=!1,function(){var o=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],a=e({},f,JSON.parse(JSON.stringify(p.dataset||{}))),i={};g.config.parseDate=a.parseDate,g.config.formatDate=a.formatDate,Object.defineProperty(g.config,"enable",{get:function(){return g.config._enable},set:function(e){g.config._enable=me(e)}}),Object.defineProperty(g.config,"disable",{get:function(){return g.config._disable},set:function(e){g.config._disable=me(e)}});var r="time"===a.mode;if(!a.dateFormat&&(a.enableTime||r)){var c=_.defaultConfig.dateFormat||n.dateFormat;i.dateFormat=a.noCalendar||r?"H:i"+(a.enableSeconds?":S":""):c+" H:i"+(a.enableSeconds?":S":"")}if(a.altInput&&(a.enableTime||r)&&!a.altFormat){var l=_.defaultConfig.altFormat||n.altFormat;i.altFormat=a.noCalendar||r?"h:i"+(a.enableSeconds?":S K":" K"):l+" h:i"+(a.enableSeconds?":S":"")+" K"}a.altInputClass||(g.config.altInputClass=g.input.className+" "+g.config.altInputClass),Object.defineProperty(g.config,"minDate",{get:function(){return g.config._minDate},set:se("min")}),Object.defineProperty(g.config,"maxDate",{get:function(){return g.config._maxDate},set:se("max")});var u=function(e){return function(t){g.config["min"===e?"_minTime":"_maxTime"]=g.parseDate(t,"H:i")}};Object.defineProperty(g.config,"minTime",{get:function(){return g.config._minTime},set:u("min")}),Object.defineProperty(g.config,"maxTime",{get:function(){return g.config._maxTime},set:u("max")}),"time"===a.mode&&(g.config.noCalendar=!0,g.config.enableTime=!0),Object.assign(g.config,i,a);for(var d=0;d<o.length;d++)g.config[o[d]]=!0===g.config[o[d]]||"true"===g.config[o[d]];t.filter(function(e){return void 0!==g.config[e]}).forEach(function(e){g.config[e]=s(g.config[e]||[]).map(k)}),g.isMobile=!g.config.disableMobile&&!g.config.inline&&"single"===g.config.mode&&!g.config.disable.length&&!g.config.enable.length&&!g.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var d=0;d<g.config.plugins.length;d++){var h=g.config.plugins[d](g)||{};for(var m in h)t.indexOf(m)>-1?g.config[m]=s(h[m]).map(k).concat(g.config[m]):void 0===a[m]&&(g.config[m]=h[m])}ge("onParseConfig")}(),ce(),g.input=g.config.wrap?p.querySelector("[data-input]"):p,g.input?(g.input._type=g.input.type,g.input.type="text",g.input.classList.add("flatpickr-input"),g._input=g.input,g.config.altInput&&(g.altInput=l(g.input.nodeName,g.config.altInputClass),g._input=g.altInput,g.altInput.placeholder=g.input.placeholder,g.altInput.disabled=g.input.disabled,g.altInput.required=g.input.required,g.altInput.tabIndex=g.input.tabIndex,g.altInput.type="text",g.input.setAttribute("type","hidden"),!g.config.static&&g.input.parentNode&&g.input.parentNode.insertBefore(g.altInput,g.input.nextSibling)),g.config.allowInput||g._input.setAttribute("readonly","readonly"),g._positionElement=g.config.positionElement||g._input):g.config.errorHandler(new Error("Invalid input element specified")),function(){g.selectedDates=[],g.now=g.parseDate(g.config.now)||new Date;var e=g.config.defaultDate||("INPUT"!==g.input.nodeName&&"TEXTAREA"!==g.input.nodeName||!g.input.placeholder||g.input.value!==g.input.placeholder?g.input.value:null);e&&fe(e,g.config.dateFormat),g._initialDate=g.selectedDates.length>0?g.selectedDates[0]:g.config.minDate&&g.config.minDate.getTime()>g.now.getTime()?g.config.minDate:g.config.maxDate&&g.config.maxDate.getTime()<g.now.getTime()?g.config.maxDate:g.now,g.currentYear=g._initialDate.getFullYear(),g.currentMonth=g._initialDate.getMonth(),g.selectedDates.length>0&&(g.latestSelectedDateObj=g.selectedDates[0]),void 0!==g.config.minTime&&(g.config.minTime=g.parseDate(g.config.minTime,"H:i")),void 0!==g.config.maxTime&&(g.config.maxTime=g.parseDate(g.config.maxTime,"H:i")),g.minDateHasTime=!!g.config.minDate&&(g.config.minDate.getHours()>0||g.config.minDate.getMinutes()>0||g.config.minDate.getSeconds()>0),g.maxDateHasTime=!!g.config.maxDate&&(g.config.maxDate.getHours()>0||g.config.maxDate.getMinutes()>0||g.config.maxDate.getSeconds()>0),Object.defineProperty(g,"showTimeInput",{get:function(){return g._showTimeInput},set:function(e){g._showTimeInput=e,g.calendarContainer&&c(g.calendarContainer,"showTimeInput",e),g.isOpen&&le()}})}(),g.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=g.currentMonth),void 0===t&&(t=g.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:g.l10n.daysInMonth[e]}},g.isMobile||H(),F(),(g.selectedDates.length||g.config.noCalendar)&&(g.config.enableTime&&A(g.config.noCalendar?g.latestSelectedDateObj||g.config.minDate:void 0),Se(!1)),E(),g.showTimeInput=g.selectedDates.length>0||g.config.noCalendar;var o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!g.isMobile&&o&&le(),ge("onReady")}(),g}function E(e,t){for(var n=Array.prototype.slice.call(e).filter(function(e){return e instanceof HTMLElement}),o=[],a=0;a<n.length;a++){var i=n[a];try{if(null!==i.getAttribute("data-fp-omit"))continue;void 0!==i._flatpickr&&(i._flatpickr.destroy(),i._flatpickr=void 0),i._flatpickr=k(i,t||{}),o.push(i._flatpickr)}catch(e){console.error(e)}}return 1===o.length?o[0]:o}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return E(this,e)},HTMLElement.prototype.flatpickr=function(e){return E([this],e)});var _=function(e,t){return"string"==typeof e?E(window.document.querySelectorAll(e),t):e instanceof Node?E([e],t):E(e,t)};return _.defaultConfig={},_.l10ns={en:e({},o),default:e({},o)},_.localize=function(t){_.l10ns.default=e({},_.l10ns.default,t)},_.setDefaults=function(t){_.defaultConfig=e({},_.defaultConfig,t)},_.parseDate=b({}),_.formatDate=v({}),_.compareDates=y,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return E(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=_),_}()});z.l10ns.en.weekdays.shorthand.forEach(function(e,t){var n=z.l10ns.en.weekdays.shorthand;"Thu"===n[t]||"Th"===n[t]?n[t]="Th":n[t]=n[t].charAt(0)});var J=function(e){return Array.prototype.slice.call(e)},X=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},$=function(e){return function(t){var n=function(){var n=X(t.currentMonth,!0===e.shorthand,t.l10n);t.yearElements.forEach(function(t){var o=t.closest(e.selectorFlatpickrMonthYearContainer);Array.prototype.forEach.call(o.querySelectorAll(".cur-month"),function(e){e.textContent=n})})};return{onMonthChange:n,onValueUpdate:n,onOpen:n,onReady:[function(){var n;t.monthElements&&(t.monthElements.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),(n=t.monthElements).splice.apply(n,[0,t.monthElements.length].concat(f(t.monthElements.map(function(){var n=t._createElement("span",e.classFlatpickrCurrentMonth);return n.textContent=X(t.currentMonth,!0===e.shorthand,t.l10n),t.yearElements[0].closest(e.selectorFlatpickrMonthYearContainer).insertBefore(n,t.yearElements[0].closest(e.selectorFlatpickrYearContainer)),n})))))},n,function(){t.loadedPlugins.push("carbonFlatpickrMonthSelectPlugin")}]}}},Z=function(e){function o(e,t){var a;n(this,o),i(u(a=d(this,c(o).call(this,e,t))),"_handleFocus",function(){a.calendar&&a.calendar.open()}),i(u(a),"_handleBlur",function(e){if(a.calendar){var t=e.relatedTarget;t&&(a.element.contains(t)||a.calendar.calendarContainer&&a.calendar.calendarContainer.contains(t))||a.calendar.close()}}),i(u(a),"_initDatePicker",function(e){if("range"===e){var t=a.element.ownerDocument,n=t.createElement("input");n.className=a.options.classVisuallyHidden,n.setAttribute("aria-hidden","true"),a.element.appendChild(n),a._rangeInput=n;var o=t.defaultView,i="onfocusin"in o,r="onfocusout"in o,s=i?"focusin":"focus",c=r?"focusout":"blur";a.manage(y(a.element,s,a._handleFocus,!i)),a.manage(y(a.element,c,a._handleBlur,!r)),a.manage(y(a.element.querySelector(a.options.selectorDatePickerIcon),c,a._handleBlur,!r))}var l=u(a),d="range"===e?a._rangeInput:a.element.querySelector(a.options.selectorDatePickerInput),p=a.options,h=p.onClose,m=p.onChange,g=p.onMonthChange,v=p.onYearChange,b=p.onOpen,w=p.onValueUpdate,S=new z(d,Object.assign(function(e){var t={};for(var n in e)t[n]=e[n];return t}(a.options),{allowInput:!0,mode:e,disableMobile:!0,positionElement:"range"===e&&a.element.querySelector(a.options.selectorDatePickerInputFrom),onClose:function(t){l.shouldForceOpen&&(l.calendar.calendarContainer&&l.calendar.calendarContainer.classList.add("open"),l.calendar.isOpen=!0);for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];h&&!1===h.call.apply(h,[this,t].concat(o))||(l._updateClassNames(S),l._updateInputFields(t,e))},onChange:function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];m&&!1===m.call.apply(m,[this].concat(n))||(l._updateClassNames(S),"range"===e&&(1===S.selectedDates.length&&S.isOpen?l.element.querySelector(l.options.selectorDatePickerInputTo).classList.add(l.options.classFocused):l.element.querySelector(l.options.selectorDatePickerInputTo).classList.remove(l.options.classFocused)))},onMonthChange:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];g&&!1===g.call.apply(g,[this].concat(t))||l._updateClassNames(S)},onYearChange:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];v&&!1===v.call.apply(v,[this].concat(t))||l._updateClassNames(S)},onOpen:function(){l.shouldForceOpen=!0,setTimeout(function(){l.shouldForceOpen=!1},0);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];b&&!1===b.call.apply(b,[this].concat(t))||l._updateClassNames(S)},onValueUpdate:function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];w&&!1===w.call.apply(w,[this].concat(n))||"range"!==e||l._updateInputFields(l.calendar.selectedDates,e)},nextArrow:a._rightArrowHTML(),prevArrow:a._leftArrowHTML(),plugins:[].concat(f(a.options.plugins||[]),[$(a.options)])}));return"range"===e&&(a._addInputLogic(a.element.querySelector(a.options.selectorDatePickerInputFrom),0),a._addInputLogic(a.element.querySelector(a.options.selectorDatePickerInputTo),1)),a.manage(y(a.element.querySelector(a.options.selectorDatePickerIcon),"click",function(){S.open()})),a._updateClassNames(S),"range"!==e&&a._addInputLogic(d),S}),i(u(a),"_addInputLogic",function(e,t){if(!isNaN(t)&&(t<0||t>1))throw new RangeError("The index of <input> (".concat(t,") is out of range."));var n=e;a.manage(y(n,"change",function(e){if(e.isTrusted||e.detail&&e.detail.isNotFromFlatpickr){var o=a.calendar.parseDate(n.value);if(o&&!isNaN(o.valueOf()))if(isNaN(t))a.calendar.setDate(o);else{var i=a.calendar.selectedDates;i[t]=o,a.calendar.setDate(i)}}a._updateClassNames(a.calendar)})),a.manage(y(n,"keydown",function(e){var t=a.calendar._input;a.calendar._input=e.target,setTimeout(function(){a.calendar._input=t})}))}),i(u(a),"_updateClassNames",function(e){var t=e.calendarContainer,n=e.selectedDates;t&&(t.classList.add(a.options.classCalendarContainer),t.querySelector(".flatpickr-month").classList.add(a.options.classMonth),t.querySelector(".flatpickr-weekdays").classList.add(a.options.classWeekdays),t.querySelector(".flatpickr-days").classList.add(a.options.classDays),J(t.querySelectorAll(".flatpickr-weekday")).forEach(function(e){var t=e;t.innerHTML=t.innerHTML.replace(/\s+/g,""),t.classList.add(a.options.classWeekday)}),J(t.querySelectorAll(".flatpickr-day")).forEach(function(e){e.classList.add(a.options.classDay),e.classList.contains("today")&&n.length>0?e.classList.add("no-border"):e.classList.contains("today")&&0===n.length&&e.classList.remove("no-border")}))}),i(u(a),"_updateInputFields",function(e,t){"range"===t?2===e.length?(a.element.querySelector(a.options.selectorDatePickerInputFrom).value=a._formatDate(e[0]),a.element.querySelector(a.options.selectorDatePickerInputTo).value=a._formatDate(e[1])):1===e.length&&(a.element.querySelector(a.options.selectorDatePickerInputFrom).value=a._formatDate(e[0])):1===e.length&&(a.element.querySelector(a.options.selectorDatePickerInput).value=a._formatDate(e[0])),a._updateClassNames(a.calendar)}),i(u(a),"_formatDate",function(e){return a.calendar.formatDate(e,a.calendar.config.dateFormat)});var r=a.element.getAttribute(a.options.attribType);return a.calendar=a._initDatePicker(r),a.calendar.calendarContainer&&(a.manage(y(a.element,"keydown",function(e){40===e.which&&(e.preventDefault(),(a.calendar.selectedDateElem||a.calendar.todayDateElem||a.calendar.calendarContainer).focus())})),a.manage(y(a.calendar.calendarContainer,"keydown",function(e){9===e.which&&"range"===r&&(a._updateClassNames(a.calendar),a.element.querySelector(a.options.selectorDatePickerInputFrom).focus())}))),a}return s(o,m(g,v,b)),a(o,[{key:"_rightArrowHTML",value:function(){return'\n      <svg\n        focusable="false"\n        preserveAspectRatio="xMidYMid meet"\n        style="will-change: transform;"\n        xmlns="http://www.w3.org/2000/svg"\n        width="16"\n        height="16"\n        viewBox="0 0 16 16"\n        aria-hidden="true">\n          <path d="M11 8l-5 5-.7-.7L9.6 8 5.3 3.7 6 3z"></path>\n      </svg>'}},{key:"_leftArrowHTML",value:function(){return'\n      <svg\n        focusable="false"\n        preserveAspectRatio="xMidYMid meet"\n        style="will-change: transform;"\n        xmlns="http://www.w3.org/2000/svg"\n        width="16"\n        height="16"\n        viewBox="0 0 16 16"\n        aria-hidden="true"\n      >\n        <path d="M5 8l5-5 .7.7L6.4 8l4.3 4.3-.7.7z"></path>\n      </svg>'}},{key:"release",value:function(){if(this._rangeInput&&this._rangeInput.parentNode&&this._rangeInput.parentNode.removeChild(this._rangeInput),this.calendar){try{this.calendar.destroy()}catch(e){}this.calendar=null}return p(c(o.prototype),"release",this).call(this)}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-date-picker]",selectorDatePickerInput:"[data-date-picker-input]",selectorDatePickerInputFrom:"[data-date-picker-input-from]",selectorDatePickerInputTo:"[data-date-picker-input-to]",selectorDatePickerIcon:"[data-date-picker-icon]",selectorFlatpickrMonthYearContainer:".flatpickr-current-month",selectorFlatpickrYearContainer:".numInputWrapper",selectorFlatpickrCurrentMonth:".cur-month",classCalendarContainer:"".concat(e,"--date-picker__calendar"),classMonth:"".concat(e,"--date-picker__month"),classWeekdays:"".concat(e,"--date-picker__weekdays"),classDays:"".concat(e,"--date-picker__days"),classWeekday:"".concat(e,"--date-picker__weekday"),classDay:"".concat(e,"--date-picker__day"),classFocused:"".concat(e,"--focused"),classVisuallyHidden:"".concat(e,"--visually-hidden"),classFlatpickrCurrentMonth:"cur-month",attribType:"data-date-picker-type",dateFormat:"m/d/Y"}}}]),o}();i(Z,"components",new WeakMap);var Q=function(e){function t(e,o){var a;return n(this,t),i(u(a=d(this,c(t).call(this,e,o))),"_emitEvent",function(e,t){var n=new CustomEvent("".concat(e),{bubbles:!0,cancelable:!0,detail:t});a.element.dispatchEvent(n)}),a.manage(y(a.element,"click",function(e){if(k(e,a.options.selectorPageBackward)){var t={initialEvt:e,element:e.target,direction:"backward"};a._emitEvent(a.options.eventPageChange,t)}else if(k(e,a.options.selectorPageForward)){var n={initialEvt:e,element:e.target,direction:"forward"};a._emitEvent(a.options.eventPageChange,n)}})),a.manage(y(a.element,"input",function(e){if(k(e,a.options.selectorItemsPerPageInput)){var t={initialEvt:e,element:e.target,value:e.target.value};a._emitEvent(a.options.eventItemsPerPage,t)}else if(k(e,a.options.selectorPageNumberInput)){var n={initialEvt:e,element:e.target,value:e.target.value};a._emitEvent(a.options.eventPageNumber,n)}})),a}return s(t,m(g,v,b)),t}();function ee(e,t,n){var o=e.getAttribute("class").trim().split(/\s+/),a=Object.keys(o.reduce(function(e,t){return Object.assign(e,i({},t,1))},{})),r=a.indexOf(t),s=r>=0,c=void 0===n?!s:n;s===!c&&(c?a.push(t):a.splice(r,1),e.setAttribute("class",a.join(" ")))}i(Q,"components",new WeakMap),i(Q,"options",{selectorInit:"[data-pagination]",selectorItemsPerPageInput:"[data-items-per-page]",selectorPageNumberInput:"[data-page-number-input]",selectorPageBackward:"[data-page-backward]",selectorPageForward:"[data-page-forward]",eventItemsPerPage:"itemsPerPage",eventPageNumber:"pageNumber",eventPageChange:"pageChange"});var te=function(e){function o(e,t){var a;n(this,o);var i=(a=d(this,c(o).call(this,e,t))).element.querySelector(a.options.selectorClearIcon),r=a.element.querySelector(a.options.selectorSearchInput);if(!r)throw new Error("Cannot find the search input.");return i&&a.manage(y(i,"click",function(){ee(i,a.options.classClearHidden,!0),r.value="",r.focus()})),a.manage(y(a.element,"click",function(e){var t=k(e,a.options.selectorIconContainer);t&&a.toggleLayout(t)})),a.manage(y(r,"input",function(e){i&&a.showClear(e.target.value,i)})),a}return s(o,m(g,v,b)),a(o,[{key:"toggleLayout",value:function(e){var t,n=this;(t=e.querySelectorAll(this.options.selectorSearchView),Array.prototype.slice.call(t)).forEach(function(e){e.classList.toggle(n.options.classLayoutHidden)})}},{key:"showClear",value:function(e,t){ee(t,this.options.classClearHidden,0===e.length)}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-search]",selectorSearchView:"[data-search-view]",selectorSearchInput:".".concat(e,"--search-input"),selectorClearIcon:".".concat(e,"--search-close"),selectorIconContainer:".".concat(e,"--search-button[data-search-toggle]"),classClearHidden:"".concat(e,"--search-close--hidden"),classLayoutHidden:"".concat(e,"--search-view--hidden")}}}]),o}();i(te,"components",new WeakMap);var ne=function(e){function o(e,t){var a;return n(this,o),(a=d(this,c(o).call(this,e,t))).manage(y(a.element,"click",function(e){var t=k(e,a.options.selectorAccordionItem);t&&!k(e,a.options.selectorAccordionContent)&&a._toggle(t)})),a._checkIfButton()||a.manage(y(a.element,"keypress",function(e){k(e,a.options.selectorAccordionItem)&&!k(e,a.options.selectorAccordionContent)&&a._handleKeypress(e)})),a}return s(o,m(g,v,b)),a(o,[{key:"_checkIfButton",value:function(){return"BUTTON"===this.element.firstElementChild.firstElementChild.nodeName}},{key:"_handleKeypress",value:function(e){13!==e.which&&32!==e.which||this._toggle(e.target)}},{key:"_toggle",value:function(e){var t=e.querySelector(this.options.selectorAccordionItemHeading),n=t.getAttribute("aria-expanded");null!==n&&t.setAttribute("aria-expanded","true"===n?"false":"true"),e.classList.toggle(this.options.classActive)}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-accordion]",selectorAccordionItem:".".concat(e,"--accordion__item"),selectorAccordionItemHeading:".".concat(e,"--accordion__heading"),selectorAccordionContent:".".concat(e,"--accordion__content"),classActive:"".concat(e,"--accordion__item--active")}}}]),o}();i(ne,"components",new WeakMap);var oe=function(e){function o(e,t){var a;return n(this,o),(a=d(this,c(o).call(this,e,t))).manage(y(a.element,"click",function(){return a.handleClick()})),a.manage(y(a.element,"animationend",function(e){return a.handleAnimationEnd(e)})),a}return s(o,m(g,v,b)),a(o,[{key:"handleAnimationEnd",value:function(e){"hide-feedback"===e.animationName&&(this.element.classList.remove(this.options.classAnimating),this.element.classList.remove(this.options.classFadeOut))}},{key:"handleClick",value:function(){var e=this,t=this.element.querySelector(this.options.feedbackTooltip);t?(t.classList.add(this.options.classShowFeedback),setTimeout(function(){t.classList.remove(e.options.classShowFeedback)},this.options.timeoutValue)):(this.element.classList.add(this.options.classAnimating),this.element.classList.add(this.options.classFadeIn),setTimeout(function(){e.element.classList.remove(e.options.classFadeIn),e.element.classList.add(e.options.classFadeOut)},this.options.timeoutValue))}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-copy-btn]",feedbackTooltip:"[data-feedback]",classShowFeedback:"".concat(e,"--btn--copy__feedback--displayed"),classAnimating:"".concat(e,"--copy-btn--animating"),classFadeIn:"".concat(e,"--copy-btn--fade-in"),classFadeOut:"".concat(e,"--copy-btn--fade-out"),timeoutValue:2e3}}}]),o}();i(oe,"components",new WeakMap);var ae=function(e){function t(e,o){var a;return n(this,t),i(u(a=d(this,c(t).call(this,e,o))),"_changeState",function(e,t){"delete-notification"===e&&(a.element.parentNode.removeChild(a.element),a.release()),t()}),a.button=e.querySelector(a.options.selectorButton),a.button&&a.manage(y(a.button,"click",function(e){e.currentTarget===a.button&&a.remove()})),a}return s(t,m(g,v,C,b)),a(t,[{key:"remove",value:function(){this.changeState("delete-notification")}}]),t}();i(ae,"components",new WeakMap),i(ae,"options",{selectorInit:"[data-notification]",selectorButton:"[data-notification-btn]",eventBeforeDeleteNotification:"notification-before-delete",eventAfterDeleteNotification:"notification-after-delete"});var ie=function(e){function o(e,t){var a;if(n(this,o),(a=d(this,c(o).call(this,e,t))).element.dataset.tableTarget){var i=a.element.ownerDocument.querySelector(a.element.dataset.tableTarget),r=a.element.querySelector(a.options.selectorRowHeight);r&&a.manage(y(r,"click",function(e){a._handleRowHeightChange(e,i)}))}else console.warn("There is no table bound to this toolbar!");return a.manage(y(a.element.ownerDocument,"keydown",function(e){a._handleKeyDown(e)})),a.manage(y(a.element.ownerDocument,"click",function(e){a._handleDocumentClick(e)})),a}return s(o,m(g,v,b)),a(o,[{key:"_handleDocumentClick",value:function(e){var t=this,n=k(e,this.options.selectorSearch),o=n&&this.element.contains(n);if(o){var a=o&&!this.element.classList.contains(this.options.classSearchActive);n.classList.toggle(this.options.classSearchActive,a),a&&n.querySelector("input").focus()}var i,r=k(e,this.options.selectorInit);(i=this.element.ownerDocument.querySelectorAll(this.options.selectorSearch),Array.prototype.slice.call(i)).forEach(function(e){r&&r.contains(e)||e.classList.remove(t.options.classSearchActive)})}},{key:"_handleKeyDown",value:function(e){var t=k(e,this.options.selectorSearch);t&&27===e.which&&t.classList.remove(this.options.classSearchActive)}},{key:"_handleRowHeightChange",value:function(e,t){"tall"===e.currentTarget.querySelector("input:checked").value?t.classList.add(this.options.classTallRows):t.classList.remove(this.options.classTallRows)}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-toolbar]",selectorSearch:"[data-toolbar-search]",selectorRowHeight:"[data-row-height]",classTallRows:"".concat(e,"--responsive-table--tall"),classSearchActive:"".concat(e,"--toolbar-search--active")}}}]),o}();function re(e){var t=function(t){function o(){return n(this,o),d(this,c(o).apply(this,arguments))}return s(o,e),a(o,null,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=Object.assign(Object.create(this.options),n);if(!t||t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");if(t.nodeType!==Node.ELEMENT_NODE||!t.matches(o.selectorInit)){var a="onfocusin"in(t.nodeType===Node.ELEMENT_NODE?t.ownerDocument:t).defaultView,i=o.initEventNames.map(function(i){return y(t,"focus"===i&&a?"focusin":i,function(t){var a=k(t,o.selectorInit);if(a&&!e.components.has(a)){var i=e.create(a,n);"function"==typeof i.createdByEvent&&i.createdByEvent(t)}},"focus"===i&&!a)});return{release:function(){for(var e=i.pop();e;e=i.pop())e.release()}}}return this.create(t,n),""}}]),o}();return i(t,"forLazyInit",!0),t}i(ie,"components",new WeakMap);var se=function(e,t){var n,o,a=e.ownerDocument.defaultView.getComputedStyle(e,":before"),s=(n={},i(n,"left","right"),i(n,"top","bottom"),i(n,"right","left"),i(n,"bottom","top"),n)[t],c=(o={},i(o,"left","left"),i(o,"top","top"),i(o,"right","left"),i(o,"bottom","top"),o)[t],l=[s,"border-bottom-width"].reduce(function(e,t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e,i({},t,Number((/^([\d-.]+)px$/.exec(a.getPropertyValue(t))||[])[1])))},{}),u=0;if("bottom"!==t){var d=e.ownerDocument.defaultView.getComputedStyle(e);u=Number((/^([\d-.]+)px$/.exec(d.getPropertyValue("margin-top"))||[])[1])}if(l[s]=l[s]||-6,Object.keys(l).every(function(e){return!isNaN(l[e])})){var p=l[s],h=l["border-bottom-width"];return i({left:0,top:0},c,Math.sqrt(2*Math.pow(h,2))-p+u*("top"===t?2:1))}},ce=[32,13],le=function(e){function o(e,t){var a;return n(this,o),i(u(a=d(this,c(o).call(this,e,t))),"_hasContextMenu",!1),a._hookOn(e),a}return s(o,m(g,re,M,b)),a(o,[{key:"createdByEvent",value:function(e){var t=e.relatedTarget,n=e.type,o=e.which;("click"===n||ce.includes(o))&&this._handleClick({relatedTarget:t,type:n,details:T(e)})}},{key:"changeState",value:function(e,t,n){if(!this.tooltip){var o=this.element.ownerDocument.querySelector(this.element.getAttribute(this.options.attribTooltipTarget));if(!o)throw new Error("Cannot find the target tooltip.");this.tooltip=I.create(o,{refNode:this.element,classShown:this.options.classShown,offset:this.options.objMenuOffset,contentNode:o.querySelector(this.options.selectorContent)}),this._hookOn(o),this.children.push(this.tooltip)}this.tooltip.changeState(e,Object.assign(t,{delegatorNode:this.element}),n)}},{key:"_hookOn",value:function(e){var t=this,n=function(e,n){var o=e.relatedTarget,a=e.type,i=e.which;if(void 0===n||n.includes(i)){var r=t._hasContextMenu;t._hasContextMenu="contextmenu"===a,t._handleClick({relatedTarget:o,type:a,hadContextMenu:r,details:T(e)})}};this.manage(y(e,"click",n,!1)),"BUTTON"!==this.element.tagName&&this.manage(y(this.element,"keydown",function(e){n(e,ce)},!1))}},{key:"_handleClick",value:function(e){var t,n=e.relatedTarget,o=e.type,a=e.hadContextMenu,i=e.details,r={click:"shown",keydown:"shown",blur:"hidden",touchleave:"hidden",touchcancel:"hidden"}[o];if("blur"===o){var s=n&&this.element.contains&&this.element.contains(n)||this.tooltip&&this.tooltip.element.contains(n);t=a||s}t||this.changeState(r,i)}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-tooltip-trigger]",selectorContent:".".concat(e,"--tooltip__content"),classShown:"".concat(e,"--tooltip--shown"),attribTooltipTarget:"data-tooltip-target",objMenuOffset:se,initEventNames:["click","keydown"]}}}]),o}();i(le,"components",new WeakMap);var ue=function(e){return Array.prototype.slice.call(e)},de=function(e){function o(e,t){var a;return n(this,o),(a=d(this,c(o).call(this,e,t))).state={currentIndex:a.getCurrent().index,totalSteps:a.getSteps().length},a.addOverflowTooltip(),a}return s(o,m(g,v)),a(o,[{key:"getSteps",value:function(){return ue(this.element.querySelectorAll(this.options.selectorStepElement)).map(function(e,t){return{element:e,index:t}})}},{key:"getCurrent",value:function(){var e=this.element.querySelector(this.options.selectorCurrent);return this.getSteps().filter(function(t){return t.element===e})[0]}},{key:"setCurrent",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.currentIndex,n=!1;t!==this.state.currentIndex&&(this.state.currentIndex=t,n=!0),n&&this.getSteps().forEach(function(n){n.index<t&&e._updateStep({element:n.element,className:e.options.classComplete,html:e._getSVGComplete()}),n.index===t&&e._updateStep({element:n.element,className:e.options.classCurrent,html:e._getCurrentSVG()}),n.index>t&&e._updateStep({element:n.element,className:e.options.classIncomplete,html:e._getIncompleteSVG()})})}},{key:"_updateStep",value:function(e){var t=e.element,n=e.className,o=e.html;t.firstElementChild&&t.removeChild(t.firstElementChild),t.classList.contains(n)||(t.setAttribute("class",this.options.classStep),t.classList.add(n)),t.insertAdjacentHTML("afterbegin",o)}},{key:"_getSVGComplete",value:function(){return'<svg width="24px" height="24px" viewBox="0 0 24 24">\n        <circle cx="12" cy="12" r="12"></circle>\n        <polygon points="10.3 13.6 7.7 11 6.3 12.4 10.3 16.4 17.8 9 16.4 7.6"></polygon>\n      </svg>'}},{key:"_getCurrentSVG",value:function(){return'<svg>\n        <circle cx="12" cy="12" r="12"></circle>\n        <circle cx="12" cy="12" r="6"></circle>\n      </svg>'}},{key:"_getIncompleteSVG",value:function(){return'<svg>\n        <circle cx="12" cy="12" r="12"></circle>\n      </svg>'}},{key:"addOverflowTooltip",value:function(){var e=this,t=ue(this.element.querySelectorAll(this.options.selectorLabel)),n=ue(this.element.querySelectorAll(this.options.selectorTooltip));t.forEach(function(t){t.scrollWidth>e.options.maxWidth&&t.classList.add(e.options.classOverflowLabel)}),n.forEach(function(t){t.querySelector(e.options.selectorTooltipText).scrollHeight>e.options.tooltipMaxHeight&&t.classList.add(e.options.classTooltipMulti)})}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-progress]",selectorStepElement:".".concat(e,"--progress-step"),selectorCurrent:".".concat(e,"--progress-step--current"),selectorIncomplete:".".concat(e,"--progress-step--incomplete"),selectorComplete:".".concat(e,"--progress-step--complete"),selectorLabel:".".concat(e,"--progress-label"),selectorTooltip:".".concat(e,"--tooltip"),selectorTooltipText:".".concat(e,"--tooltip__text"),classStep:"".concat(e,"--progress-step"),classComplete:"".concat(e,"--progress-step--complete"),classCurrent:"".concat(e,"--progress-step--current"),classIncomplete:"".concat(e,"--progress-step--incomplete"),classOverflowLabel:"".concat(e,"--progress-label-overflow"),classTooltipMulti:"".concat(e,"--tooltip_multi"),maxWidth:87,tooltipMaxHeight:21}}}]),o}();i(de,"components",new WeakMap);var pe=function(e){return Array.prototype.slice.call(e)},he=function(e){function o(e,t){var a;return n(this,o),(a=d(this,c(o).call(this,e,t))).manage(y(a.element,"keydown",function(e){37!==e.which&&38!==e.which&&39!==e.which&&40!==e.which||a._handleKeydownArrow(e),13!==e.which&&32!==e.which||a._handleKeydownChecked(e)})),a.manage(y(a.element,"click",function(e){a._handleClick(e)})),a}return s(o,m(g,v,b)),a(o,[{key:"_direction",value:function(e){return{37:-1,38:-1,39:1,40:1}[e.which]}},{key:"_nextIndex",value:function(e,t,n){return e.indexOf(t)+n}},{key:"_getInput",value:function(e){var t=pe(this.element.querySelectorAll(this.options.selectorRow));return this.element.ownerDocument.querySelector(this.options.selectorListInput(t[e].getAttribute("for")))}},{key:"_handleInputChecked",value:function(e){var t=this.element.querySelectorAll(this.options.selectorRow);(this.getInput(e)||t[e].querySelector("input")).checked=!0}},{key:"_handleClick",value:function(e){var t=this,n=k(e,this.options.selectorRow);pe(this.element.querySelectorAll(this.options.selectorRow)).forEach(function(e){return e.classList.remove(t.options.classActive)}),n&&n.classList.add(this.options.classActive)}},{key:"_handleKeydownChecked",value:function(e){var t=this;e.preventDefault();var n=k(e,this.options.selectorRow);(pe(this.element.querySelectorAll(this.options.selectorRow)).forEach(function(e){return e.classList.remove(t.options.classActive)}),n)&&(n.classList.add(this.options.classActive),(n.querySelector(this.options.selectorListInput(n.getAttribute("for")))||n.querySelector("input")).checked=!0)}},{key:"_handleKeydownArrow",value:function(e){var t=this;e.preventDefault();var n=k(e,this.options.selectorRow),o=this._direction(e);if(o&&void 0!==n){var a=pe(this.element.querySelectorAll(this.options.selectorRow));a.forEach(function(e){return e.classList.remove(t.options.classActive)});var i=this._nextIndex(a,n,o),r=a.length-1,s=function(){switch(i){case-1:return r;case a.length:return 0;default:return i}}();a[s].classList.add(this.options.classActive),a[s].focus(),this._handleInputChecked(s)}}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-structured-list]",selectorRow:"[data-structured-list] .".concat(e,"--structured-list-tbody > label.").concat(e,"--structured-list-row"),selectorListInput:function(t){return"#".concat(t,".").concat(e,"--structured-list-input")},classActive:"".concat(e,"--structured-list-row--selected")}}}]),o}();i(he,"components",new WeakMap);var fe=function(e){function o(e,t){var a;return n(this,o),i(u(a=d(this,c(o).call(this,e,t))),"_changeState",function(e,t,n){n()}),a.sliderActive=!1,a.dragging=!1,a.track=a.element.querySelector(a.options.selectorTrack),a.filledTrack=a.element.querySelector(a.options.selectorFilledTrack),a.thumb=a.element.querySelector(a.options.selectorThumb),a.input=a.element.querySelector(a.options.selectorInput),a.element.dataset.sliderInputBox&&(a.boundInput=a.element.ownerDocument.querySelector(a.element.dataset.sliderInputBox),a._updateInput(),a.manage(y(a.boundInput,"change",function(e){a.setValue(e.target.value)})),a.manage(y(a.boundInput,"focus",function(e){e.target.select()})),a.manage(y(a.boundInput,"mouseup",function(e){e.preventDefault()}))),a._updatePosition(),a.manage(y(a.thumb,"mousedown",function(){a.sliderActive=!0})),a.manage(y(a.element.ownerDocument,"mouseup",function(){a.sliderActive=!1})),a.manage(y(a.element.ownerDocument,"mousemove",function(e){var t=a.element.classList.contains(a.options.classDisabled);!0!==a.sliderActive||t||a._updatePosition(e)})),a.manage(y(a.thumb,"keydown",function(e){a.element.classList.contains(a.options.classDisabled)||a._updatePosition(e)})),a.manage(y(a.track,"click",function(e){a.element.classList.contains(a.options.classDisabled)||a._updatePosition(e)})),a}return s(o,m(g,v,C,b)),a(o,[{key:"_updatePosition",value:function(e){var t=this,n=this._calcValue(e),o=n.left,a=n.newValue;this.dragging||(this.dragging=!0,requestAnimationFrame(function(){t.dragging=!1,t.thumb.style.left="".concat(o,"%"),t.filledTrack.style.transform="translate(0%, -50%) scaleX(".concat(o/100,")"),t.input.value=a,t._updateInput(),t.changeState("slider-value-change",{value:a})}))}},{key:"_calcValue",value:function(e){var t,n,o=this.getInputProps(),a=o.value,i=o.min,r=o.max,s=o.step,c=r-i,l=(a-i)/c*100;if(t=l,n=a,e){var u=e.type;if("keydown"===u){var d={40:-1,37:-1,38:1,39:1}[e.which];if(void 0!==d){var p=s*(!0===e.shiftKey?c/s/this.options.stepMultiplier:1);t=l+p/c*100*d,n=Number(a)+p*d}}if("mousemove"===u||"click"===u){"click"===u?this.element.querySelector(this.options.selectorThumb).classList.add(this.options.classThumbClicked):this.element.querySelector(this.options.selectorThumb).classList.remove(this.options.classThumbClicked);var h=this.track.getBoundingClientRect(),f=(e.clientX-h.left)/h.width,m=Math.round(c*f/s)*s;t=m/c*100,n=m+i}}return n<=Number(i)&&(t=0,n=i),n>=Number(r)&&(t=100,n=r),{left:t,newValue:n}}},{key:"_updateInput",value:function(){this.boundInput&&(this.boundInput.value=this.input.value)}},{key:"getInputProps",value:function(){return{value:Number(this.input.value),min:Number(this.input.min),max:Number(this.input.max),step:this.input.step?Number(this.input.step):1}}},{key:"setValue",value:function(e){this.input.value=e,this._updatePosition()}},{key:"stepUp",value:function(){this.input.stepUp(),this._updatePosition()}},{key:"stepDown",value:function(){this.input.stepDown(),this._updatePosition()}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-slider]",selectorTrack:".".concat(e,"--slider__track"),selectorFilledTrack:".".concat(e,"--slider__filled-track"),selectorThumb:".".concat(e,"--slider__thumb"),selectorInput:".".concat(e,"--slider__input"),classDisabled:"".concat(e,"--slider--disabled"),classThumbClicked:"".concat(e,"--slider__thumb--clicked"),eventBeforeSliderValueChange:"slider-before-value-change",eventAfterSliderValueChange:"slider-after-value-change",stepMultiplier:4}}}]),o}();i(fe,"components",new WeakMap);var me=function(e){function o(e,t){var a;return n(this,o),i(u(a=d(this,c(o).call(this,e,t))),"_getClass",function(e){return{expandable:a.options.classExpandedTile,clickable:a.options.classClickableTile,selectable:a.options.classSelectableTile}[e]}),i(u(a),"_hookActions",function(e){var t="expandable"===a.tileType;if(t){var n=a.element.querySelector(a.options.selectorAboveTheFold),o=a.element.ownerDocument.defaultView.getComputedStyle(a.element,null),i=parseInt(o.getPropertyValue("padding-top"),10)+parseInt(o.getPropertyValue("padding-bottom"),10);n&&(a.tileHeight=a.element.getBoundingClientRect().height,a.atfHeight=n.getBoundingClientRect().height+i,a.element.style.maxHeight="".concat(a.atfHeight,"px")),a.element.classList.contains(a.options.classExpandedTile)&&a._setTileHeight()}a.element.addEventListener("click",function(n){k(n,a.options.selectorTileInput)||a.element.classList.toggle(e),t&&a._setTileHeight()}),a.element.addEventListener("keydown",function(n){var o=a.element.querySelector(a.options.selectorTileInput);o&&(13!==n.which&&32!==n.which||t||(a.element.classList.toggle(e),o.checked=!o.checked))})}),i(u(a),"_setTileHeight",function(){var e=a.element.classList.contains(a.options.classExpandedTile);a.element.style.maxHeight="".concat(e?a.tileHeight:a.atfHeight,"px")}),a.tileType=a.element.dataset.tile,a.tileHeight=0,a.atfHeight=0,a._hookActions(a._getClass(a.tileType)),a}return s(o,m(g,v)),a(o,[{key:"release",value:function(){p(c(o.prototype),"release",this).call(this)}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-tile]",selectorAboveTheFold:"[data-tile-atf]",selectorTileInput:"[data-tile-input]",classExpandedTile:"".concat(e,"--tile--is-expanded"),classClickableTile:"".concat(e,"--tile--is-clicked"),classSelectableTile:"".concat(e,"--tile--is-selected")}}}]),o}();i(me,"components",new WeakMap);var ge=function(e){function o(e,t){var a;return n(this,o),(a=d(this,c(o).call(this,e,t)))._initCodeSnippet(),a.element.querySelector(a.options.classExpandBtn).addEventListener("click",function(e){return a._handleClick(e)}),a}return s(o,m(g,v,b)),a(o,[{key:"_handleClick",value:function(){var e=this.element.querySelector(this.options.classExpandText);this.element.classList.toggle(this.options.classExpanded),this.element.classList.contains(this.options.classExpanded)?e.textContent=e.getAttribute(this.options.attribShowLessText):e.textContent=e.getAttribute(this.options.attribShowMoreText)}},{key:"_initCodeSnippet",value:function(){var e=this.element.querySelector(this.options.classExpandText);if(!e)throw new TypeError("Cannot find the expand button.");e.textContent=e.getAttribute(this.options.attribShowMoreText),this.element.offsetHeight<this.options.minHeight&&this.element.classList.add(this.options.classHideExpand)}}],[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-code-snippet]",attribShowMoreText:"data-show-more-text",attribShowLessText:"data-show-less-text",minHeight:288,classExpanded:"".concat(e,"--snippet--expand"),classExpandBtn:".".concat(e,"--snippet-btn--expand"),classExpandText:".".concat(e,"--snippet-btn--text"),classHideExpand:"".concat(e,"--snippet-btn--expand--hide")}}}]),o}();i(ge,"components",new WeakMap);var ve=function(e){function o(e,t){var a;return n(this,o),i(u(a=d(this,c(o).call(this,e,t))),"_setIconVisibility",function(e){var t=e.iconVisibilityOn,n=e.iconVisibilityOff,o=e.passwordIsVisible,a=e.selectorPasswordVisibilityTooltip;if(o)return t.setAttribute("hidden",!0),n.removeAttribute("hidden"),void(a.textContent="Hide password");t.removeAttribute("hidden"),n.setAttribute("hidden",!0),a.textContent="Show password"}),i(u(a),"_toggle",function(e){var t=e.element,n=e.button;t.classList.toggle(a.options.passwordIsVisible);var o=t.classList.contains(a.options.passwordIsVisible),i=n.querySelector(a.options.svgIconVisibilityOn),r=n.querySelector(a.options.svgIconVisibilityOff),s=t.querySelector(a.options.selectorPasswordField),c=t.querySelector(a.options.selectorPasswordVisibilityTooltip);a._setIconVisibility({iconVisibilityOn:i,iconVisibilityOff:r,passwordIsVisible:o,selectorPasswordVisibilityTooltip:c}),s.type=o?"text":"password"}),a.manage(y(a.element,"click",function(t){var n=k(t,a.options.selectorPasswordVisibilityButton);n&&a._toggle({element:e,button:n})})),a}return s(o,m(g,v,b)),a(o,null,[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-text-input]",selectorPasswordField:".".concat(e,"--text-input[data-toggle-password-visibility]"),selectorPasswordVisibilityButton:".".concat(e,"--text-input--password__visibility__toggle"),selectorPasswordVisibilityTooltip:".".concat(e,"--text-input--password__visibility__toggle > .").concat(e,"--assistive-text"),passwordIsVisible:"".concat(e,"--text-input--password-visible"),svgIconVisibilityOn:"svg.".concat(e,"--icon--visibility-on"),svgIconVisibilityOff:"svg.".concat(e,"--icon--visibility-off")}}}]),o}();i(ve,"components",new WeakMap);var be=t.prefix,ye=function(e){function t(e,o){var a;return n(this,t),i(u(a=d(this,c(t).call(this,e,o))),"_handleClick",function(e){var t=k(e,a.options.selectorSideNavToggle),n=k(e,a.options.selectorSideNavSubmenu),o=k(e,a.options.selectorSideNavLink);if(t||n||o)if(t)a.changeState(a.isNavExpanded()?a.constructor.state.COLLAPSED:a.constructor.state.EXPANDED);else if(n){var i="true"===n.getAttribute("aria-expanded");n.setAttribute("aria-expanded","".concat(!i))}else if(o){f(a.element.querySelectorAll(a.options.selectorSideNavLinkCurrent)).forEach(function(e){e.classList.remove(a.options.classSideNavItemActive,a.options.classSideNavLinkCurrent),e.removeAttribute("aria-current")}),o.classList.add(a.options.classSideNavLinkCurrent);var r=o.closest(a.options.selectorSideNavItem);r&&r.classList.add(a.options.classSideNavItemActive)}}),a.manage(y(e,"click",a._handleClick)),a}return s(t,m(g,v,b)),a(t,[{key:"isNavExpanded",value:function(){return this.element.classList.contains(this.options.classSideNavExpanded)}},{key:"changeState",value:function(e){this.element.classList.toggle(this.options.classSideNavExpanded,e===this.constructor.state.EXPANDED)}}]),t}();i(ye,"components",new WeakMap),i(ye,"state",{EXPANDED:"expanded",COLLAPSED:"collapsed"}),i(ye,"options",{selectorInit:"[data-side-nav]",selectorSideNavToggle:".".concat(be,"--side-nav__toggle"),selectorSideNavSubmenu:".".concat(be,"--side-nav__submenu"),selectorSideNavItem:".".concat(be,"--side-nav__item"),selectorSideNavLink:".".concat(be,"--side-nav__link"),selectorSideNavLinkCurrent:'[aria-current="page"],.'.concat(be,"--side-nav__link--current,.").concat(be,"--side-nav__item--active"),classSideNavExpanded:"".concat(be,"--side-nav--expanded"),classSideNavItemActive:"".concat(be,"--side-nav__item--active"),classSideNavLinkCurrent:"".concat(be,"--side-nav__link--current")});var we=function(){return Array.prototype.forEach}(),Se=function(e){return Array.prototype.slice.call(e)},Ce=function(e){function o(e,t){var a;n(this,o),i(u(a=d(this,c(o).call(this,e,t))),"_getAction",function(e){if(k(e,a.options.selectorFlyoutMenu))return a.constructor.actions.DELEGATE_TO_FLYOUT_MENU;switch(e.type){case"keydown":return{32:a.constructor.actions.TOGGLE_SUBMENU_WITH_FOCUS,13:a.constructor.actions.TOGGLE_SUBMENU_WITH_FOCUS,27:a.constructor.actions.CLOSE_SUBMENU}[e.which];case"click":return k(e,a.options.selectorItem)?a.constructor.actions.CLOSE_SUBMENU:null;case"blur":case"focusout":return a.element.contains(e.relatedTarget)?null:a.constructor.actions.CLOSE_SUBMENU;case"mouseenter":return a.constructor.actions.OPEN_SUBMENU;case"mouseleave":return a.constructor.actions.CLOSE_SUBMENU;default:return null}}),i(u(a),"_getNewState",function(e){var t="true"===a.element.querySelector(a.options.selectorTrigger).getAttribute(a.options.attribExpanded);switch(e){case a.constructor.actions.CLOSE_SUBMENU:return!1;case a.constructor.actions.OPEN_SUBMENU:return!0;case a.constructor.actions.TOGGLE_SUBMENU_WITH_FOCUS:return!t;default:return t}}),i(u(a),"_setState",function(e){var t=e.shouldBeExpanded,n=e.shouldFocusOnOpen;a.element.querySelector(a.options.selectorTrigger).setAttribute(a.options.attribExpanded,t),we.call(a.element.querySelectorAll(a.options.selectorItem),function(e){e.tabIndex=t?0:-1}),t&&n&&a.element.querySelector(a.options.selectorItem).focus()}),i(u(a),"getCurrentNavigation",function(){var e=a.element.ownerDocument.activeElement;return e.nodeType===Node.ELEMENT_NODE&&e.matches(a.options.selectorItem)?e:null}),i(u(a),"navigate",function(e){for(var t=Se(a.element.querySelectorAll(a.options.selectorItem)),n=a.getCurrentNavigation()||a.element.querySelector(a.options.selectorItemSelected),o=function(n){var o=Math.max(t.indexOf(n)+e,-1);return t[function(e,t){return e+(e>=0?0:t)}(function(e,t){return e-(e<t?0:t)}(o,t.length),t.length)]},i=o(n);i&&i!==n;i=o(i))if(!i.matches(a.options.selectorItemHidden)&&!i.parentNode.matches(a.options.selectorItemHidden)&&!i.matches(a.options.selectorItemSelected)){i.focus();break}}),i(u(a),"_handleEvent",function(e){if(a.element.querySelector(a.options.selectorTrigger)){var t=a._getAction(e);if(t){var n=a._getNewState(t);a._setState({shouldBeExpanded:n})}}}),i(u(a),"_handleKeyDown",function(e){var t=a.element.querySelector(a.options.selectorTrigger);if(t){var n=a._getAction(e);switch(32===e.which&&e.preventDefault(),n){case a.constructor.actions.DELEGATE_TO_FLYOUT_MENU:break;case a.constructor.actions.CLOSE_SUBMENU:var o=a._getNewState(n);a._setState({shouldBeExpanded:o});break;case a.constructor.actions.TOGGLE_SUBMENU_WITH_FOCUS:var i=a._getNewState(n);a._setState({shouldBeExpanded:i,shouldFocusOnOpen:!0});break;default:if("true"===t.getAttribute(a.options.attribExpanded)){var r={38:a.constructor.NAVIGATE.BACKWARD,40:a.constructor.NAVIGATE.FORWARD}[e.which];switch(e.which){case 35:e.preventDefault();var s=a.element.querySelectorAll(a.options.selectorItem),c=s[s.length-1];c&&c.focus();break;case 36:e.preventDefault();var l=h(a.element.querySelectorAll(a.options.selectorItem),1)[0];l&&l.focus();break;case 38:case 40:a.navigate(r),e.preventDefault()}}}}});var r="onfocusout"in window;return a.manage(y(a.element,r?"focusout":"blur",a._handleEvent,!r)),a.manage(y(a.element,"mouseenter",a._handleEvent)),a.manage(y(a.element,"mouseleave",a._handleEvent)),a.manage(y(a.element,"click",a._handleEvent)),a.manage(y(a.element,"keydown",a._handleKeyDown)),a}return s(o,m(g,v,b)),a(o,null,[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-header-submenu]",selectorTrigger:".".concat(e,"--header__menu-title"),selectorItem:".".concat(e,"--header__menu .").concat(e,"--header__menu-item"),attribExpanded:"aria-expanded"}}}]),o}();i(Ce,"components",new WeakMap),i(Ce,"actions",{CLOSE_SUBMENU:"CLOSE_SUBMENU",OPEN_SUBMENU:"OPEN_SUBMENU",TOGGLE_SUBMENU_WITH_FOCUS:"TOGGLE_SUBMENU_WITH_FOCUS",DELEGATE_TO_FLYOUT_MENU:"DELEGATE_TO_FLYOUT_MENU"}),i(Ce,"NAVIGATE",{BACKWARD:-1,FORWARD:1});var ke=function(e){return Array.prototype.slice.call(e)},Ee=function(e){function o(e,t){var a;return n(this,o),i(u(a=d(this,c(o).call(this,e,t))),"getCurrentNavigation",function(){var e=a.element.ownerDocument.activeElement.closest(a.options.selectorSubmenu);return e&&e.nodeType===Node.ELEMENT_NODE?e.querySelector(a.options.selectorSubmenuLink):null}),i(u(a),"navigate",function(e){var t,n,o=ke(a.element.querySelectorAll(a.options.selectorSubmenuLink)),i=a.getCurrentNavigation();(t=i,n=Math.max(o.indexOf(t)+e,-1),o[function(e,t){return e+(e>=0?0:t)}(function(e,t){return e-(e<t?0:t)}(n,o.length),o.length)]).focus()}),i(u(a),"_handleKeyDown",function(e){var t={37:a.constructor.NAVIGATE.BACKWARD,39:a.constructor.NAVIGATE.FORWARD}[e.which];t&&a.navigate(t)}),a.manage(y(a.element,"keydown",a._handleKeyDown)),a}return s(o,m(g,v,b)),a(o,null,[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-header-nav]",selectorNavKind:"[data-header-nav-kind]",selectorSubmenu:".".concat(e,"--header__submenu"),selectorSubmenuLink:".".concat(e,"--header__menu-title"),selectorSubmenuItem:".".concat(e,"--header__menu-title > .").concat(e,"--header__menu-item")}}}]),o}();i(Ee,"components",new WeakMap),i(Ee,"NAVIGATE",{BACKWARD:-1,FORWARD:1});var _e=function(e){function o(){var e,t;n(this,o);for(var a=arguments.length,r=new Array(a),s=0;s<a;s++)r[s]=arguments[s];return i(u(t=d(this,(e=c(o)).call.apply(e,[this].concat(r)))),"createdByLauncher",function(e){var n=!t.element.hasAttribute("hidden")?"collapsed":"expanded";t.triggerButton=e.delegateTarget,t.changeState(n)}),i(u(t),"shouldStateBeChanged",function(e){return"expanded"===e===t.element.hasAttribute("hidden")}),i(u(t),"_changeState",function(e,n){if(R(t.element,"hidden","expanded"!==e),t.triggerButton){if("expanded"===e){var o=t.element.querySelector(t.options.selectorFocusableMenuItem);o&&o.focus()}var a="expanded"===e?t.triggerButton.getAttribute(t.options.attribLabelCollapse):t.triggerButton.getAttribute(t.options.attribLabelExpand);t.triggerButton.classList.toggle(t.options.classNavigationMenuPanelHeaderActionActive,"expanded"===e),t.triggerButton.setAttribute("aria-label",a),t.triggerButton.setAttribute("title",a)}n()}),t}return s(o,m(g,B,M,b,C)),a(o,null,[{key:"options",get:function(){var e=t.prefix;return{initEventNames:["click"],eventBeforeExpanded:"navigation-menu-being-expanded",eventAfterExpanded:"navigation-menu-expanded",eventBeforeCollapsed:"navigation-menu-being-collapsed",eventAfterCollapsed:"navigation-menu-collapsed",selectorFocusableMenuItem:".".concat(e,"--navigation__category-toggle, .").concat(e,"--navigation-link"),classNavigationMenuPanelHeaderActionActive:"".concat(e,"--header__action--active"),attribLabelExpand:"data-navigation-menu-panel-label-expand",attribLabelCollapse:"data-navigation-menu-panel-label-collapse"}}}]),o}();i(_e,"components",new WeakMap);var De=function(e){function o(e,t){var a;n(this,o),i(u(a=d(this,c(o).call(this,e,t))),"getCurrentNavigation",function(){return a.element.ownerDocument.activeElement}),i(u(a),"navigate",function(e){var t,n,o=f(a.element.querySelectorAll(a.options.selectorFocusableNavItems)),i=a.getCurrentNavigation();(t=i,n=Math.max(o.indexOf(t)+e,-1),o[function(e,t){return e+(e>=0?0:t)}(function(e,t){return e-(e<t?0:t)}(n,o.length),o.length)]).focus()}),i(u(a),"_handleKeyDown",function(e){var t=!a.element.hasAttribute("hidden");if(27===e.which&&t)return a.changeState("collapsed"),void(a.triggerButton&&a.triggerButton.focus());var n=k(e,a.options.selectorShellNavSubmenu),o=k(e,a.options.selectorShellNavLink);if(n||o){var i={38:a.constructor.NAVIGATE.BACKWARD,40:a.constructor.NAVIGATE.FORWARD}[e.which];i&&(e.preventDefault(),a.navigate(i))}}),i(u(a),"_handleFocusOut",function(e){var t=a.element.contains(e.relatedTarget)||e.relatedTarget===a.triggerButton||!e.relatedTarget;a.element.contains(e.target)&&!t&&(a.changeState("collapsed"),a.triggerButton.focus())}),i(u(a),"changeNavSubmenuState",function(e){var t=e.matchesNavSubmenu,n=e.shouldBeCollapsed,o=t.closest(a.options.selectorShellNavCategory);o&&(t.setAttribute("aria-expanded",!n),o.classList.toggle(a.options.classShellNavCategoryExpanded),Array.prototype.forEach.call(o.querySelectorAll(a.options.selectorShellNavLink),function(e){e.tabIndex=n?-1:0}))}),i(u(a),"_handleClick",function(e){var t=k(e,a.options.selectorShellNavSubmenu),n=k(e,a.options.selectorShellNavLink),o=k(e,a.options.selectorShellNestedNavLink);if(t||n){if(o)return f(a.element.querySelectorAll(a.options.selectorShellNavLinkCurrent)).forEach(function(e){e.classList.remove(a.options.classShellNavItemActive,a.options.classShellNavLinkCurrent)}),void o.closest(a.options.selectorShellNavNestedCategory).classList.add(a.options.classShellNavItemActive);if(t){var i="true"===t.getAttribute("aria-expanded");a.changeNavSubmenuState({matchesNavSubmenu:t,isExpanded:i})}else n&&(f(a.element.querySelectorAll(a.options.selectorShellNavLinkCurrent)).forEach(function(e){e.classList.remove(a.options.classShellNavItemActive,a.options.classShellNavLinkCurrent)}),n.closest(a.options.selectorShellNavItem).classList.add(a.options.classShellNavItemActive))}}),a.manage(y(e,"click",a._handleClick)),a.manage(y(e,"keydown",a._handleKeyDown)),a.manage(y(a.element.ownerDocument,"click",function(e){a.element.hasAttribute("hidden")||a.triggerButton.contains(e.target)||a.element.contains(e.target)||a.changeState("collapsed")}));var r="onfocusout"in window;return a.manage(y(a.element,r?"focusout":"blur",a._handleFocusOut,!r)),a}return s(o,_e),a(o,null,[{key:"options",get:function(){var e=t.prefix;return Object.assign(Object.create(_e.options),{selectorInit:"[data-navigation-menu]",attribInitTarget:"data-navigation-menu-target",selectorShellNavSubmenu:".".concat(e,"--navigation__category-toggle"),selectorShellNavLink:".".concat(e,"--navigation-link"),selectorShellNestedNavLink:".".concat(e,"--navigation__category-item > a.").concat(e,"--navigation-link"),selectorShellNavLinkCurrent:".".concat(e,"--navigation-item--active,.").concat(e,"--navigation__category-item--active"),selectorFocusableNavItems:"\n        .".concat(e,"--navigation__category-toggle,\n        .").concat(e,"--navigation-item > .").concat(e,"--navigation-link,\n        .").concat(e,'--navigation-link[tabindex="0"]\n      '),selectorShellNavItem:".".concat(e,"--navigation-item"),selectorShellNavCategory:".".concat(e,"--navigation__category"),selectorShellNavNestedCategory:".".concat(e,"--navigation__category-item"),classShellNavItemActive:"".concat(e,"--navigation-item--active"),classShellNavLinkCurrent:"".concat(e,"--navigation__category-item--active"),classShellNavCategoryExpanded:"".concat(e,"--navigation__category--expanded")})}}]),o}();i(De,"components",new WeakMap),i(De,"NAVIGATE",{BACKWARD:-1,FORWARD:1});var xe=0,Ae=function(e){function o(e,t){var a;return n(this,o),i(u(a=d(this,c(o).call(this,e,t))),"current",""),i(u(a),"triggerButtonIds",new Set),i(u(a),"_handleFocusOut",function(e){if(!a.element.contains(e.relatedTarget)){var t=a.element.ownerDocument.getElementById(a.current);t&&e.relatedTarget&&!e.relatedTarget.matches(a.options.selectorFloatingMenus)&&t.focus()}}),i(u(a),"_handleKeyDown",function(e){var t=!a.element.hasAttribute("hidden");if(27===e.which&&t){var n=a.current;a.changeState(a.constructor.SELECT_NONE),a.element.ownerDocument.getElementById(n).focus()}}),i(u(a),"createdByLauncher",function(e){var t=a.element.classList.contains(a.options.classProductSwitcherExpanded),n=e.delegateTarget;n.id||(n.id="__carbon-product-switcher-launcher-".concat(xe++));var o=n.id;a.changeState(t&&a.current===o?a.constructor.SELECT_NONE:o)}),i(u(a),"shouldStateBeChanged",function(e){return a.current!==e}),i(u(a),"_changeState",function(e,t){a.element.classList.toggle(a.options.classProductSwitcherExpanded,e!==a.constructor.SELECT_NONE),a.current=e,a.current!==a.constructor.SELECT_NONE&&a.triggerButtonIds.add(a.current),a.triggerButtonIds.forEach(function(e){var t=a.element.ownerDocument.getElementById(e),n=t.getAttribute(a.options.attribLabelExpand);t.classList.remove(a.options.classNavigationMenuPanelHeaderActionActive),t.setAttribute("aria-label",n),t.setAttribute("title",n)});var n=a.element.ownerDocument.getElementById(a.current);if(n){var o=n.getAttribute(a.options.attribLabelCollapse);n.classList.toggle(a.options.classNavigationMenuPanelHeaderActionActive),n.setAttribute("aria-label",o),n.setAttribute("title",o)}e!==a.constructor.SELECT_NONE?(a.element.setAttribute("tabindex","0"),a.element.focus()):a.element.setAttribute("tabindex","-1"),t()}),a.manage(y(e,"keydown",a._handleKeyDown)),a.manage(function(e,t,n){var o,a="onfocusout"in window,i={focus:a?"focusin":"focus",blur:a?"focusout":"blur"}[t];if(!i)throw new Error("Unsupported event!");var r=function(){o=!0,requestAnimationFrame(function(){o=!1})},s=function(e){o||n(e)};return e.ownerDocument.addEventListener("mousedown",r),e.addEventListener(i,s,!a),{release:function(){return s&&(e.removeEventListener(i,s,!a),s=null),r&&(e.ownerDocument.removeEventListener("mousedown",r),r=null),null}}}(e,"blur",a._handleFocusOut)),a}return s(o,_e),a(o,[{key:"release",value:function(){return this.triggerButtonIds.clear(),p(c(o.prototype),"release",this).call(this)}}],[{key:"options",get:function(){var e=t.prefix;return Object.assign(Object.create(_e.options),{selectorInit:"[data-product-switcher]",selectorFloatingMenus:"\n        .".concat(e,"--overflow-menu-options,\n        .").concat(e,"--overflow-menu-options *,\n        .").concat(e,"--tooltip,\n        .").concat(e,"--tooltip *,\n        .flatpicker-calendar,\n        .flatpicker-calendar *\n        "),attribInitTarget:"data-product-switcher-target",classProductSwitcherExpanded:"".concat(e,"--panel--expanded")})}}]),o}();i(Ae,"SELECT_NONE","__carbon-product-switcher-launcher-NONE"),i(Ae,"components",new WeakMap);var Te=function(e){function o(e,t){var a;return n(this,o),i(u(a=d(this,c(o).call(this,e,t))),"getActivePageNumber",function(){var e,t=a.element.querySelector(a.options.selectorPageActive);return t&&(e=Number(t.getAttribute(a.options.attribPage))),e}),i(u(a),"clearActivePage",function(e){var t=a.element.querySelectorAll(a.options.selectorPageButton),n=a.element.querySelector(a.options.selectorPageSelect);if(Array.prototype.forEach.call(t,function(e){e.classList.remove(a.options.classActive,a.options.classDisabled),e.removeAttribute(a.options.attribActive),e.removeAttribute("aria-disabled"),e.removeAttribute("aria-current")}),n){n.removeAttribute("aria-current");var o=n.options;Array.prototype.forEach.call(o,function(e){e.removeAttribute(a.options.attribActive)}),e.target.matches(a.options.selectorPageSelect)||(n.classList.remove(a.options.classActive),n.value="")}}),i(u(a),"handleClick",function(e){if(!0==!e.target.getAttribute("aria-disabled")){var t=a.getActivePageNumber(),n=a.element.querySelectorAll(a.options.selectorPageElement),o=a.element.querySelector(a.options.selectorPageSelect);a.clearActivePage(e),e.target.matches(a.options.selectorPageButton)&&(t=Number(e.target.getAttribute(a.options.attribPage))),e.target.matches(a.options.selectorPagePrevious)&&(t-=1),e.target.matches(a.options.selectorPageNext)&&(t+=1);var i=n[t-1];i.setAttribute(a.options.attribActive,!0),"OPTION"===i.tagName?(o.value=a.getActivePageNumber(),o.classList.add(a.options.classActive),o.setAttribute("aria-current","page")):(i.classList.add(a.options.classActive,a.options.classDisabled),i.setAttribute("aria-disabled",!0),i.setAttribute("aria-current","page")),a.setPrevNextStates()}}),i(u(a),"handleSelectChange",function(e){a.clearActivePage(e);var t=a.element.querySelector(a.options.selectorPageSelect).options;t[t.selectedIndex].setAttribute(a.options.attribActive,!0),e.target.setAttribute("aria-current","page"),e.target.classList.add(a.options.classActive),a.setPrevNextStates()}),i(u(a),"setPrevNextStates",function(){var e=a.element.querySelectorAll(a.options.selectorPageElement).length,t=a.element.querySelector(a.options.selectorPagePrevious),n=a.element.querySelector(a.options.selectorPageNext);t&&(a.getActivePageNumber()<=1?(t.setAttribute("aria-disabled",!0),t.classList.add(a.options.classDisabled)):(t.removeAttribute("aria-disabled"),t.classList.remove(a.options.classDisabled))),n&&(a.getActivePageNumber()>=e?(n.setAttribute("aria-disabled",!0),n.classList.add(a.options.classDisabled)):(n.removeAttribute("aria-disabled"),n.classList.remove(a.options.classDisabled)))}),a.manage(y(a.element,"click",function(e){return a.handleClick(e)})),a.manage(y(a.element,"change",function(e){e.target.matches(a.options.selectorPageSelect)&&a.handleSelectChange(e)})),a}return s(o,m(g,v,b)),a(o,null,[{key:"options",get:function(){var e=t.prefix;return{selectorInit:"[data-pagination-nav]",selectorPageElement:"[data-page]",selectorPageButton:"[data-page-button]",selectorPagePrevious:"[data-page-previous]",selectorPageNext:"[data-page-next]",selectorPageSelect:"[data-page-select]",selectorPageActive:'[data-page-active="true"]',attribPage:"data-page",attribActive:"data-page-active",classActive:"".concat(e,"--pagination-nav__page--active"),classDisabled:"".concat(e,"--pagination-nav__page--disabled")}}}]),o}();i(Te,"components",new WeakMap);var Me=Object.freeze({Checkbox:S,FileUploader:_,ContentSwitcher:x,Tab:A,OverflowMenu:q,Modal:H,Loading:j,InlineLoading:Y,Dropdown:W,NumberInput:U,DataTableV2:G,DataTable:G,DatePicker:Z,Pagination:Q,Search:te,Accordion:ne,CopyButton:oe,Notification:ae,Toolbar:ie,Tooltip:le,ProgressIndicator:de,FloatingMenu:I,StructuredList:he,Slider:fe,Tile:me,CodeSnippet:ge,TextInput:ve,SideNav:ye,HeaderSubmenu:Ce,HeaderNav:Ee,NavigationMenu:De,ProductSwitcher:Ae,PaginationNav:Te}),Ne=Me,Le=function(){var e=Object.keys(Ne).map(function(e){return Ne[e]}).filter(function(e){return"function"==typeof e.init});t.disableAutoInit||e.forEach(function(e){e.init()})};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Le):setTimeout(Le,0);var Ie=Array.prototype.forEach,Oe=function(e,t,n,o){e.forEach(function(e){Ie.call(e.addedNodes,function(e){e.nodeType===Node.ELEMENT_NODE&&n.forEach(function(t){t.init(e,o)})}),Ie.call(e.removedNodes,function(e){e.nodeType===Node.ELEMENT_NODE&&t.forEach(function(t){if(e.matches(t.options.selectorInit)){var n=t.components.get(e);n&&n.release()}else Ie.call(e.querySelectorAll(t.options.selectorInit),function(e){var n=t.components.get(e);n&&n.release()})})})})};return e.Accordion=ne,e.Checkbox=S,e.CodeSnippet=ge,e.ContentSwitcher=x,e.CopyButton=oe,e.DataTable=G,e.DataTableV2=G,e.DatePicker=Z,e.Dropdown=W,e.FileUploader=_,e.FloatingMenu=I,e.HeaderNav=Ee,e.HeaderSubmenu=Ce,e.InlineLoading=Y,e.Loading=j,e.Modal=H,e.NavigationMenu=De,e.Notification=ae,e.NumberInput=U,e.OverflowMenu=q,e.Pagination=Q,e.PaginationNav=Te,e.ProductSwitcher=Ae,e.ProgressIndicator=de,e.Search=te,e.SideNav=ye,e.Slider=fe,e.StructuredList=he,e.Tab=A,e.TextInput=ve,e.Tile=me,e.Toolbar=ie,e.Tooltip=le,e.settings=t,e.watch=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to watch for DOM node to create/release components.");var n=Object.keys(Me).map(function(e){return Me[e]}).filter(function(e){return"function"==typeof e.init}),o=n.map(function(n){return n.init(e,t)}).filter(Boolean),a=n.filter(function(e){return!e.forLazyInit}),i=new MutationObserver(function(e){Oe(e,n,a,t)});return i.observe(e,{childList:!0,subtree:!0}),{release:function(){for(var e=o.pop();e;e=o.pop())e.release();i&&(i.disconnect(),i=null)}}},e}({});