vrembem 1.40.2 → 1.40.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dev/scripts.esm.js +44 -43
- package/dev/scripts.esm.js.map +1 -1
- package/dev/scripts.js +44 -43
- package/dev/scripts.js.map +1 -1
- package/dev/scripts.modern.js +46 -43
- package/dev/scripts.modern.js.map +1 -1
- package/dev/scripts.umd.js +44 -43
- package/dev/scripts.umd.js.map +1 -1
- package/dist/scripts.esm.js +1 -1
- package/dist/scripts.esm.js.map +1 -1
- package/dist/scripts.js +1 -1
- package/dist/scripts.js.map +1 -1
- package/dist/scripts.modern.js +1 -1
- package/dist/scripts.modern.js.map +1 -1
- package/dist/scripts.umd.js +1 -1
- package/dist/scripts.umd.js.map +1 -1
- package/package.json +3 -3
package/dist/scripts.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t=function(t,e){e&&document.querySelectorAll(e).forEach(function(e){t?(e.inert=!0,e.setAttribute("aria-hidden",!0)):(e.inert=null,e.removeAttribute("aria-hidden"))})},e=function(t,e){e&&document.querySelectorAll(e).forEach(function(e){t?e.style.overflow="hidden":e.style.removeProperty("overflow")})},n=function(t){t&&document.querySelectorAll(t).forEach(function(t){t.setAttribute("tabindex","-1")})},i=function(t){var e=arguments;(t=t.forEach?t:[t]).forEach(function(t){var n;(n=t.classList).add.apply(n,[].slice.call(e,1))})},r=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'],s=function(t,e){var n=t.querySelector("[data-"+e.dataFocus+"]");if(n)n.focus();else{var i=t.querySelector('[tabindex="-1"]');i&&i.focus()}},o=function(t){void 0===t&&(t=null),t&&t.memory&&t.memory.trigger&&(t.memory.trigger.focus(),t.memory.trigger=null)},a=/*#__PURE__*/function(){function t(){this.target=null,this.__handlerFocusTrap=this.handlerFocusTrap.bind(this)}var e=t.prototype;return e.init=function(t){this.target=t,this.inner=this.target.querySelector('[tabindex="-1"]'),this.focusable=this.getFocusable(),this.focusable.length?(this.focusableFirst=this.focusable[0],this.focusableLast=this.focusable[this.focusable.length-1],this.target.addEventListener("keydown",this.__handlerFocusTrap)):this.target.addEventListener("keydown",this.handlerFocusLock)},e.destroy=function(){this.target&&(this.inner=null,this.focusable=null,this.focusableFirst=null,this.focusableLast=null,this.target.removeEventListener("keydown",this.__handlerFocusTrap),this.target.removeEventListener("keydown",this.handlerFocusLock),this.target=null)},e.refresh=function(){this.target&&(this.target.removeEventListener("keydown",this.__handlerFocusTrap),this.target.removeEventListener("keydown",this.handlerFocusLock),this.focusable=this.getFocusable(),this.focusable.length?(this.focusableFirst=this.focusable[0],this.focusableLast=this.focusable[this.focusable.length-1],this.target.addEventListener("keydown",this.__handlerFocusTrap)):(this.focusableFirst=null,this.focusableLast=null,this.target.addEventListener("keydown",this.handlerFocusLock)))},e.handlerFocusTrap=function(t){("Tab"===t.key||9===t.keyCode)&&(t.shiftKey?document.activeElement!==this.focusableFirst&&document.activeElement!==this.inner||(this.focusableLast.focus(),t.preventDefault()):document.activeElement!==this.focusableLast&&document.activeElement!==this.inner||(this.focusableFirst.focus(),t.preventDefault()))},e.handlerFocusLock=function(t){("Tab"===t.key||9===t.keyCode)&&t.preventDefault()},e.getFocusable=function(){var t=[],e=document.activeElement,n=this.inner?this.inner.scrollTop:0;return this.target.querySelectorAll(r.join(",")).forEach(function(e){e.focus(),e===document.activeElement&&t.push(e)}),this.inner&&(this.inner.scrollTop=n),e.focus(),t},t}(),c=function(t,e){return void 0===e&&(e=0),"string"!=typeof t?t:e?document.querySelector(t):document.querySelectorAll(t)},l=function(t){return t=[].slice.call(t=t.forEach?t:[t]),[].slice.call(arguments,1).some(function(e){return t.some(function(t){if(t.classList.contains(e))return!0})})};function u(t,e,n){if(void 0===n&&(n=!1),n){var i=c(t);if(!i.length)throw new Error('Move target element "'+t+'" not found!');var r=c(n,1);if(!r)throw new Error('Move reference element "'+n+'" not found!');i.forEach(function(t){switch(e){case"after":return r.after(t),{ref:r,el:t,type:e};case"before":return r.before(t),{ref:r,el:t,type:e};case"append":return r.append(t),{ref:r,el:t,type:e};case"prepend":return r.prepend(t),{ref:r,el:t,type:e};default:throw new Error('Move type "'+e+'" does not exist!')}})}}var d=function(t){var e=arguments;(t=t.forEach?t:[t]).forEach(function(t){var n;(n=t.classList).remove.apply(n,[].slice.call(e,1))})},f=function(t,e){return new Promise(function(n){e.transition?(t.classList.remove(e.stateClosed),t.classList.add(e.stateOpening),t.addEventListener("transitionend",function i(){t.classList.add(e.stateOpened),t.classList.remove(e.stateOpening),n(t),this.removeEventListener("transitionend",i)})):(t.classList.add(e.stateOpened),t.classList.remove(e.stateClosed),n(t))})},h=function(t,e){return new Promise(function(n){e.transition?(t.classList.add(e.stateClosing),t.classList.remove(e.stateOpened),t.addEventListener("transitionend",function i(){t.classList.remove(e.stateClosing),t.classList.add(e.stateClosed),n(t),this.removeEventListener("transitionend",i)})):(t.classList.add(e.stateClosed),t.classList.remove(e.stateOpened),n(t))})},p={__proto__:null,setInert:t,setOverflowHidden:e,setTabindex:n,addClass:i,camelCase:function(t){return t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})},focusTarget:s,focusTrigger:o,FocusTrap:a,getElement:c,hasClass:l,hyphenCase:function(t){return t.replace(/([a-z][A-Z])/g,function(t){return t[0]+"-"+t[1].toLowerCase()})},moveElement:u,removeClass:d,toggleClass:function(t){var e=arguments;(t=t.forEach?t:[t]).forEach(function(t){[].slice.call(e,1).forEach(function(e){t.classList.toggle(e)})})},openTransition:f,closeTransition:h};function g(){return(g=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var v=/*#__PURE__*/function(){function t(t){this.defaults={autoInit:!1,stateAttr:"aria-checked",stateValue:"mixed"},this.settings=g({},this.defaults,t),this.__handlerClick=this.handlerClick.bind(this),this.settings.autoInit&&this.init()}var e=t.prototype;return e.init=function(t){void 0===t&&(t=null),t&&(this.settings=g({},this.settings,t));var e=document.querySelectorAll("["+this.settings.stateAttr+'="'+this.settings.stateValue+'"]');this.setIndeterminate(e),document.addEventListener("click",this.__handlerClick,!1)},e.destroy=function(){document.removeEventListener("click",this.__handlerClick,!1)},e.handlerClick=function(t){var e=t.target.closest("["+this.settings.stateAttr+'="'+this.settings.stateValue+'"]');e&&(this.removeAriaState(e),this.setIndeterminate(e))},e.setAriaState=function(t,e){var n=this;void 0===e&&(e=this.settings.stateValue),(t=t.forEach?t:[t]).forEach(function(t){t.setAttribute(n.settings.stateAttr,e)})},e.removeAriaState=function(t){var e=this;(t=t.forEach?t:[t]).forEach(function(t){t.removeAttribute(e.settings.stateAttr)})},e.setIndeterminate=function(t){var e=this;(t=t.forEach?t:[t]).forEach(function(t){t.indeterminate=!!t.hasAttribute(e.settings.stateAttr)})},t}(),m={autoInit:!1,dataDrawer:"drawer",dataDialog:"drawer-dialog",dataToggle:"drawer-toggle",dataOpen:"drawer-open",dataClose:"drawer-close",dataBreakpoint:"drawer-breakpoint",dataFocus:"drawer-focus",stateOpened:"is-opened",stateOpening:"is-opening",stateClosing:"is-closing",stateClosed:"is-closed",classModal:"drawer_modal",selectorInert:null,selectorOverflow:null,breakpoints:null,customEventPrefix:"drawer:",eventListeners:!0,stateSave:!0,stateKey:"DrawerState",setTabindex:!0,transition:!0},y=/*#__PURE__*/function(){function t(t){this.mediaQueryLists=[],this.parent=t,this.prefix=this.getVariablePrefix(),this.__check=this.check.bind(this)}var e=t.prototype;return e.init=function(){var t=this;document.querySelectorAll("[data-"+this.parent.settings.dataBreakpoint+"]").forEach(function(e){var n=e.getAttribute("data-"+t.parent.settings.dataDrawer),i=e.getAttribute("data-"+t.parent.settings.dataBreakpoint),r=t.getBreakpoint(i),s=window.matchMedia("(min-width:"+r+")");t.match(s,e),s.addEventListener("change",t.__check),t.mediaQueryLists.push({mql:s,drawer:n})})},e.destroy=function(){var t=this;this.mediaQueryLists&&this.mediaQueryLists.length&&this.mediaQueryLists.forEach(function(e){e.mql.removeListener(t.__check)}),this.mediaQueryLists=null},e.check=function(t){var e=this;void 0===t&&(t=null),this.mediaQueryLists&&this.mediaQueryLists.length&&(this.mediaQueryLists.forEach(function(n){if(!t||t.media==n.mql.media){var i=document.querySelector("[data-"+e.parent.settings.dataDrawer+'="'+n.drawer+'"]');i&&e.match(n.mql,i)}}),document.dispatchEvent(new CustomEvent(this.parent.settings.customEventPrefix+"breakpoint",{bubbles:!0})))},e.match=function(t,e){t.matches?this.parent.switchToDefault(e):this.parent.switchToModal(e)},e.getBreakpoint=function(t){var e=t;return this.parent.settings.breakpoints&&this.parent.settings.breakpoints[t]?e=this.parent.settings.breakpoints[t]:getComputedStyle(document.body).getPropertyValue(this.prefix+t)&&(e=getComputedStyle(document.body).getPropertyValue(this.prefix+t)),e},e.getVariablePrefix=function(){var t="--";return(t+=getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix"))+"breakpoint-"},t}();function b(t){return"string"!=typeof t?t:document.querySelector("[data-"+this.settings.dataDrawer+'="'+t+'"]')}function w(t){return Promise.reject(new Error('Did not find drawer with key: "'+t+'"'))}var E=function(n){try{var i=this,r=i.getDrawer(n);return r?l(r,i.settings.stateOpened)?(i.working=!0,l(r,i.settings.classModal)&&(t(!1,i.settings.selectorInert),e(!1,i.settings.selectorOverflow)),Promise.resolve(h(r,i.settings)).then(function(){return i.stateSave(r),o(i),i.focusTrap.destroy(),r.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"closed",{detail:i,bubbles:!0})),i.working=!1,r})):Promise.resolve(r):Promise.resolve(w(n))}catch(t){return Promise.reject(t)}};function x(t){if(!this.working){var e=t.target.closest("[data-"+this.settings.dataToggle+"]");if(e){var n=e.getAttribute("data-"+this.settings.dataToggle);return this.memory.trigger=e,this.toggle(n),void t.preventDefault()}if(e=t.target.closest("[data-"+this.settings.dataOpen+"]")){var i=e.getAttribute("data-"+this.settings.dataOpen);return this.memory.trigger=e,this.open(i),void t.preventDefault()}if(e=t.target.closest("[data-"+this.settings.dataClose+"]")){var r=e.getAttribute("data-"+this.settings.dataClose);if(r)this.memory.trigger=e,this.close(r);else{var s=t.target.closest("[data-"+this.settings.dataDrawer+"]");s&&this.close(s)}t.preventDefault()}else t.target.hasAttribute("data-"+this.settings.dataDrawer)&&this.close(t.target)}}function O(t){if(!this.working&&"Escape"===t.key){var e=document.querySelector("."+this.settings.classModal+"."+this.settings.stateOpened);e&&this.close(e)}}var L=function(n){try{var i=this,r=i.getDrawer(n);if(!r)return Promise.resolve(w(n));if(l(r,i.settings.stateOpened))return s(r,i.settings),Promise.resolve(r);i.working=!0;var o=l(r,i.settings.classModal);return o&&e(!0,i.settings.selectorOverflow),Promise.resolve(f(r,i.settings)).then(function(){return i.stateSave(r),o&&(i.focusTrap.init(r),t(!0,i.settings.selectorInert)),s(r,i.settings),r.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"opened",{detail:i,bubbles:!0})),i.working=!1,r})}catch(t){return Promise.reject(t)}};function k(t,e){if(!e.stateSave)return _(e);var n=localStorage.getItem(e.stateKey)?JSON.parse(localStorage.getItem(e.stateKey)):{};return(t?[t]:document.querySelectorAll("[data-"+e.dataDrawer+"]")).forEach(function(t){if(!l(t,e.classModal)){var i=t.getAttribute("data-"+e.dataDrawer);n[i]=l(t,e.stateOpened)?e.stateOpened:e.stateClosed}}),localStorage.setItem(e.stateKey,JSON.stringify(n)),n}function _(t){return localStorage.getItem(t.stateKey)&&localStorage.removeItem(t.stateKey),{}}var A=function(n){try{var r=this,s=r.getDrawer(n);return s?l(s,r.settings.classModal)?(t(!1,r.settings.selectorInert),e(!1,r.settings.selectorOverflow),d(s,r.settings.classModal),r.focusTrap.destroy(),n=s.getAttribute("data-"+r.settings.dataDrawer),r.state[n]==r.settings.stateOpened&&(i(s,r.settings.stateOpened),d(s,r.settings.stateClosed)),s.dispatchEvent(new CustomEvent(r.settings.customEventPrefix+"toDefault",{bubbles:!0})),Promise.resolve(s)):Promise.resolve():Promise.resolve(w(n))}catch(t){return Promise.reject(t)}},P=function(t){try{var e=this,n=e.getDrawer(t);return n?l(n,e.settings.classModal)?Promise.resolve():(i(n,e.settings.classModal),i(n,e.settings.stateClosed),d(n,e.settings.stateOpened),n.dispatchEvent(new CustomEvent(e.settings.customEventPrefix+"toModal",{bubbles:!0})),Promise.resolve(n)):Promise.resolve(w(t))}catch(t){return Promise.reject(t)}},C=function(t){try{var e=this,n=e.getDrawer(t);if(!n)return Promise.resolve(w(t));var i=!l(n,e.settings.stateOpened);return Promise.resolve(i?e.open(n):e.close(n))}catch(t){return Promise.reject(t)}},S=/*#__PURE__*/function(){function t(t){this.defaults=m,this.settings=g({},this.defaults,t),this.working=!1,this.memory={},this.state={},this.focusTrap=new a,this.breakpoint=new y(this),this.__handlerClick=x.bind(this),this.__handlerKeydown=O.bind(this),this.settings.autoInit&&this.init()}var e=t.prototype;return e.init=function(t){void 0===t&&(t=null),t&&(this.settings=g({},this.settings,t)),this.stateSet(),this.settings.setTabindex&&this.setTabindex(),this.breakpoint.init(),this.settings.eventListeners&&this.initEventListeners()},e.destroy=function(){this.breakpoint.destroy(),this.memory={},this.state={},localStorage.removeItem(this.settings.stateKey),this.settings.eventListeners&&this.destroyEventListeners()},e.initEventListeners=function(){document.addEventListener("click",this.__handlerClick,!1),document.addEventListener("touchend",this.__handlerClick,!1),document.addEventListener("keydown",this.__handlerKeydown,!1)},e.destroyEventListeners=function(){document.removeEventListener("click",this.__handlerClick,!1),document.removeEventListener("touchend",this.__handlerClick,!1),document.removeEventListener("keydown",this.__handlerKeydown,!1)},e.getDrawer=function(t){return b.call(this,t)},e.setTabindex=function(){return n("\n [data-"+this.settings.dataDrawer+"]\n [data-"+this.settings.dataDialog+"]\n ")},e.stateSet=function(){this.state=function(t){if(!t.stateSave)return _(t);var e=localStorage.getItem(t.stateKey);if(!e||e&&0===Object.keys(JSON.parse(e)).length)return k(null,t);var n=JSON.parse(localStorage.getItem(t.stateKey));return Object.keys(n).forEach(function(e){var r=document.querySelector("[data-"+t.dataDrawer+'="'+e+'"]');r&&(n[e]==t.stateOpened?i(r,t.stateOpened):d(r,t.stateOpened))}),n}(this.settings)},e.stateSave=function(t){void 0===t&&(t=null),this.state=k(t,this.settings)},e.stateClear=function(){this.state=_(this.settings)},e.switchToDefault=function(t){return A.call(this,t)},e.switchToModal=function(t){return P.call(this,t)},e.toggle=function(t){return C.call(this,t)},e.open=function(t){return L.call(this,t)},e.close=function(t){return E.call(this,t)},t}(),T={autoInit:!1,dataModal:"modal",dataDialog:"modal-dialog",dataOpen:"modal-open",dataClose:"modal-close",dataFocus:"modal-focus",dataRequired:"modal-required",stateOpened:"is-opened",stateOpening:"is-opening",stateClosing:"is-closing",stateClosed:"is-closed",selectorInert:null,selectorOverflow:"body",customEventPrefix:"modal:",eventListeners:!0,moveModals:{ref:null,type:null},setTabindex:!0,transition:!0},D=function(n){void 0===n&&(n=!0);try{var i=this,r=document.querySelector("[data-"+i.settings.dataModal+"]."+i.settings.stateOpened);return r?(i.working=!0,t(!1,i.settings.selectorInert),e(!1,i.settings.selectorOverflow),Promise.resolve(h(r,i.settings)).then(function(){return n&&o(i),i.focusTrap.destroy(),r.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"closed",{detail:i,bubbles:!0})),i.working=!1,r})):Promise.resolve(r)}catch(t){return Promise.reject(t)}},M=function(t){try{var e,n=function(n){return e?n:t.target.closest("[data-"+i.settings.dataClose+"]")?(t.preventDefault(),void i.close()):void(t.target.hasAttribute("data-"+i.settings.dataModal)&&!t.target.hasAttribute("data-"+i.settings.dataRequired)&&i.close())},i=this;if(i.working)return Promise.resolve();var r=t.target.closest("[data-"+i.settings.dataOpen+"]"),s=function(){if(r){t.preventDefault();var n=r.getAttribute("data-"+i.settings.dataOpen),s=t.target.closest("[data-"+i.settings.dataModal+"]");return s||(i.memory.trigger=r),Promise.resolve(i.close(!s)).then(function(){i.open(n),e=1})}}();return Promise.resolve(s&&s.then?s.then(n):n(s))}catch(t){return Promise.reject(t)}};function j(t){if(!this.working&&"Escape"===t.key){var e=document.querySelector("[data-"+this.settings.dataModal+"]."+this.settings.stateOpened);e&&!e.hasAttribute("data-"+this.settings.dataRequired)&&this.close()}}function q(t){return"string"!=typeof t?t:document.querySelector("[data-"+this.settings.dataModal+'="'+t+'"]')}function I(t,e){void 0===t&&(t=this.settings.moveModals.type),void 0===e&&(e=this.settings.moveModals.ref);var n=document.querySelectorAll("[data-"+this.settings.dataModal+"]");n.length&&u(n,t,e)}function F(){var n=this;document.querySelectorAll("[data-"+this.settings.dataModal+"]").forEach(function(r){r.classList.contains(n.settings.stateOpened)&&(t(!1,n.settings.selectorInert),e(!1,n.settings.selectorOverflow),o(n),n.focusTrap.destroy()),d(r,n.settings.stateOpened,n.settings.stateOpening,n.settings.stateClosing),i(r,n.settings.stateClosed)})}var B=function(n){try{var i=this,r=q.call(i,n);return r?l(r,i.settings.stateClosed)?(i.working=!0,e(!0,i.settings.selectorOverflow),Promise.resolve(f(r,i.settings)).then(function(){return i.focusTrap.init(r),s(r,i.settings),t(!0,i.settings.selectorInert),r.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"opened",{detail:i,bubbles:!0})),i.working=!1,r})):Promise.resolve(r):Promise.resolve(Promise.reject(new Error('Did not find modal with key: "'+n+'"')))}catch(t){return Promise.reject(t)}},V=/*#__PURE__*/function(){function t(t){this.defaults=T,this.settings=g({},this.defaults,t),this.working=!1,this.memory={},this.focusTrap=new a,this.__handlerClick=M.bind(this),this.__handlerKeydown=j.bind(this),this.settings.autoInit&&this.init()}var e=t.prototype;return e.init=function(t){void 0===t&&(t=null),t&&(this.settings=g({},this.settings,t)),this.moveModals(),this.setInitialState(),this.settings.setTabindex&&this.setTabindex(),this.settings.eventListeners&&this.initEventListeners()},e.destroy=function(){this.memory={},this.settings.eventListeners&&this.destroyEventListeners()},e.initEventListeners=function(){document.addEventListener("click",this.__handlerClick,!1),document.addEventListener("touchend",this.__handlerClick,!1),document.addEventListener("keydown",this.__handlerKeydown,!1)},e.destroyEventListeners=function(){document.removeEventListener("click",this.__handlerClick,!1),document.removeEventListener("touchend",this.__handlerClick,!1),document.removeEventListener("keydown",this.__handlerKeydown,!1)},e.getModal=function(t){return q.call(this,t)},e.setTabindex=function(){return n("\n [data-"+this.settings.dataModal+"]\n [data-"+this.settings.dataDialog+"]\n ")},e.setInitialState=function(){return F.call(this)},e.moveModals=function(t,e){return I.call(this,t,e)},e.open=function(t){return B.call(this,t)},e.close=function(t){return D.call(this,t)},t}(),K={autoInit:!1,dataPopover:"popover",dataTrigger:"popover-trigger",dataArrow:"popover-arrow",dataEventType:"popover-event",dataPlacement:"popover-placement",stateActive:"is-active",eventType:"click",eventListeners:!0,placement:"bottom-start"};function W(t){t.target.classList.remove(this.settings.stateActive),t.trigger.setAttribute("aria-expanded","false"),t.popper.setOptions({modifiers:[{name:"eventListeners",enabled:!1}]});var e=this.collection.findIndex(function(e){return e.target===t.target});return this.collection[e].state="closed",t.trigger===this.memory.trigger&&(this.memory.trigger=null),t}function R(){var t=this;return this.collection.forEach(function(e){"opened"===e.state&&t.close(e)}),this.collection}function H(t){var e=this;"opened"==t.state&&setTimeout(function(){var n=t.target.closest(":hover")===t.target||t.trigger.closest(":hover")===t.trigger,i=document.activeElement.closest("[data-"+e.settings.dataPopover+"]")===t.target||document.activeElement.closest("[data-"+e.settings.dataTrigger+"]")===t.trigger;return n||i||e.close(t),t},1)}function N(t){t.target.classList.contains(this.settings.stateActive)?this.close(t):(this.memory.trigger=t.trigger,this.open(t),z.call(this,t))}function Q(t){var e=this;switch(t.key){case"Escape":return this.memory.trigger&&this.memory.trigger.focus(),void this.closeAll();case"Tab":return void this.collection.forEach(function(t){H.call(e,t)});default:return}}function z(t){var e=this;document.addEventListener("click",function n(i){var r=i.target.closest("[data-"+e.settings.dataPopover+"], [data-"+e.settings.dataTrigger+"]");r===t.target||r===t.trigger?t.target.classList.contains(e.settings.stateActive)||this.removeEventListener("click",n):(t.target.classList.contains(e.settings.stateActive)&&e.close(t),this.removeEventListener("click",n))})}function U(t,e){var n=getComputedStyle(t),i={placement:e.placement,event:e.eventType,offset:0,"overflow-padding":0,"flip-padding":0,"arrow-element":"[data-"+e.dataArrow+"]","arrow-padding":0};for(var r in i){var s=getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix"),o=n.getPropertyValue("--"+s+"popover-"+r).trim();o&&(i[r]=o)}return i}function J(t,e,n){return void 0===n&&(n=!1),t.hasAttribute("data-"+e)?t.getAttribute("data-"+e):n}function X(t){var e,n="string"==typeof t?t.trim().split(" "):[t];switch(n.forEach(function(t,e){n[e]=parseInt(t,10)}),n.length){case 1:e=n[0];break;case 2:e={top:n[0],right:n[1],bottom:n[0],left:n[1]};break;case 3:e={top:n[0],right:n[1],bottom:n[2],left:n[1]};break;case 4:e={top:n[0],right:n[1],bottom:n[2],left:n[3]};break;default:e=!1}return e}function Y(t){var e;t.target.classList.add(this.settings.stateActive),t.trigger.setAttribute("aria-expanded","true"),t.config=U(t.target,this.settings),t.popper.setOptions({placement:J(t.target,this.settings.dataPlacement,t.config.placement),modifiers:[{name:"eventListeners",enabled:!0}].concat((e=t.config,[{name:"offset",options:{offset:[0,parseInt(e.offset,10)]}},{name:"preventOverflow",options:{padding:X(e["overflow-padding"])}},{name:"flip",options:{padding:X(e["flip-padding"])}},{name:"arrow",options:{element:e["arrow-element"],padding:X(e["arrow-padding"])}}]))}),t.popper.update();var n=this.collection.findIndex(function(e){return e.target===t.target});return this.collection[n].state="opened",t}var Z="top",G="bottom",$="right",tt="left",et=[Z,G,$,tt],nt=/*#__PURE__*/et.reduce(function(t,e){return t.concat([e+"-start",e+"-end"])},[]),it=/*#__PURE__*/[].concat(et,["auto"]).reduce(function(t,e){return t.concat([e,e+"-start",e+"-end"])},[]),rt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function st(t){return t?(t.nodeName||"").toLowerCase():null}function ot(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function at(t){return t instanceof ot(t).Element||t instanceof Element}function ct(t){return t instanceof ot(t).HTMLElement||t instanceof HTMLElement}function lt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ot(t).ShadowRoot||t instanceof ShadowRoot)}function ut(t){return t.split("-")[0]}var dt=Math.max,ft=Math.min,ht=Math.round;function pt(t,e){void 0===e&&(e=!1);var n=t.getBoundingClientRect(),i=1,r=1;if(ct(t)&&e){var s=t.offsetHeight,o=t.offsetWidth;o>0&&(i=ht(n.width)/o||1),s>0&&(r=ht(n.height)/s||1)}return{width:n.width/i,height:n.height/r,top:n.top/r,right:n.right/i,bottom:n.bottom/r,left:n.left/i,x:n.left/i,y:n.top/r}}function gt(t){var e=pt(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function vt(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&<(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function mt(t){return ot(t).getComputedStyle(t)}function yt(t){return["table","td","th"].indexOf(st(t))>=0}function bt(t){return((at(t)?t.ownerDocument:t.document)||window.document).documentElement}function wt(t){return"html"===st(t)?t:t.assignedSlot||t.parentNode||(lt(t)?t.host:null)||bt(t)}function Et(t){return ct(t)&&"fixed"!==mt(t).position?t.offsetParent:null}function xt(t){for(var e=ot(t),n=Et(t);n&&yt(n)&&"static"===mt(n).position;)n=Et(n);return n&&("html"===st(n)||"body"===st(n)&&"static"===mt(n).position)?e:n||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&ct(t)&&"fixed"===mt(t).position)return null;for(var n=wt(t);ct(n)&&["html","body"].indexOf(st(n))<0;){var i=mt(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function Ot(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Lt(t,e,n){return dt(t,ft(e,n))}function kt(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function _t(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}function At(t){return t.split("-")[1]}var Pt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ct(t){var e,n=t.popper,i=t.popperRect,r=t.placement,s=t.variation,o=t.offsets,a=t.position,c=t.gpuAcceleration,l=t.adaptive,u=t.roundOffsets,d=t.isFixed,f=o.x,h=void 0===f?0:f,p=o.y,g=void 0===p?0:p,v="function"==typeof u?u({x:h,y:g}):{x:h,y:g};h=v.x,g=v.y;var m=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),b=tt,w=Z,E=window;if(l){var x=xt(n),O="clientHeight",L="clientWidth";x===ot(n)&&"static"!==mt(x=bt(n)).position&&"absolute"===a&&(O="scrollHeight",L="scrollWidth"),x=x,(r===Z||(r===tt||r===$)&&"end"===s)&&(w=G,g-=(d&&E.visualViewport?E.visualViewport.height:x[O])-i.height,g*=c?1:-1),r!==tt&&(r!==Z&&r!==G||"end"!==s)||(b=$,h-=(d&&E.visualViewport?E.visualViewport.width:x[L])-i.width,h*=c?1:-1)}var k,_=Object.assign({position:a},l&&Pt),A=!0===u?function(t){var e=t.y,n=window.devicePixelRatio||1;return{x:ht(t.x*n)/n||0,y:ht(e*n)/n||0}}({x:h,y:g}):{x:h,y:g};return h=A.x,g=A.y,Object.assign({},_,c?((k={})[w]=y?"0":"",k[b]=m?"0":"",k.transform=(E.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",k):((e={})[w]=y?g+"px":"",e[b]=m?h+"px":"",e.transform="",e))}var St={passive:!0},Tt={left:"right",right:"left",bottom:"top",top:"bottom"};function Dt(t){return t.replace(/left|right|bottom|top/g,function(t){return Tt[t]})}var Mt={start:"end",end:"start"};function jt(t){return t.replace(/start|end/g,function(t){return Mt[t]})}function qt(t){var e=ot(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function It(t){return pt(bt(t)).left+qt(t).scrollLeft}function Ft(t){var e=mt(t);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function Bt(t){return["html","body","#document"].indexOf(st(t))>=0?t.ownerDocument.body:ct(t)&&Ft(t)?t:Bt(wt(t))}function Vt(t,e){var n;void 0===e&&(e=[]);var i=Bt(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),s=ot(i),o=r?[s].concat(s.visualViewport||[],Ft(i)?i:[]):i,a=e.concat(o);return r?a:a.concat(Vt(wt(o)))}function Kt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Wt(t,e){return"viewport"===e?Kt(function(t){var e=ot(t),n=bt(t),i=e.visualViewport,r=n.clientWidth,s=n.clientHeight,o=0,a=0;return i&&(r=i.width,s=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=i.offsetLeft,a=i.offsetTop)),{width:r,height:s,x:o+It(t),y:a}}(t)):at(e)?function(t){var e=pt(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):Kt(function(t){var e,n=bt(t),i=qt(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=dt(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=dt(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+It(t),c=-i.scrollTop;return"rtl"===mt(r||n).direction&&(a+=dt(n.clientWidth,r?r.clientWidth:0)-s),{width:s,height:o,x:a,y:c}}(bt(t)))}function Rt(t){var e,n=t.reference,i=t.element,r=t.placement,s=r?ut(r):null,o=r?At(r):null,a=n.x+n.width/2-i.width/2,c=n.y+n.height/2-i.height/2;switch(s){case Z:e={x:a,y:n.y-i.height};break;case G:e={x:a,y:n.y+n.height};break;case $:e={x:n.x+n.width,y:c};break;case tt:e={x:n.x-i.width,y:c};break;default:e={x:n.x,y:n.y}}var l=s?Ot(s):null;if(null!=l){var u="y"===l?"height":"width";switch(o){case"start":e[l]=e[l]-(n[u]/2-i[u]/2);break;case"end":e[l]=e[l]+(n[u]/2-i[u]/2)}}return e}function Ht(t,e){void 0===e&&(e={});var n=e.placement,i=void 0===n?t.placement:n,r=e.boundary,s=void 0===r?"clippingParents":r,o=e.rootBoundary,a=void 0===o?"viewport":o,c=e.elementContext,l=void 0===c?"popper":c,u=e.altBoundary,d=void 0!==u&&u,f=e.padding,h=void 0===f?0:f,p=kt("number"!=typeof h?h:_t(h,et)),g=t.rects.popper,v=t.elements[d?"popper"===l?"reference":"popper":l],m=function(t,e,n){var i="clippingParents"===e?function(t){var e=Vt(wt(t)),n=["absolute","fixed"].indexOf(mt(t).position)>=0&&ct(t)?xt(t):t;return at(n)?e.filter(function(t){return at(t)&&vt(t,n)&&"body"!==st(t)}):[]}(t):[].concat(e),r=[].concat(i,[n]),s=r.reduce(function(e,n){var i=Wt(t,n);return e.top=dt(i.top,e.top),e.right=ft(i.right,e.right),e.bottom=ft(i.bottom,e.bottom),e.left=dt(i.left,e.left),e},Wt(t,r[0]));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(at(v)?v:v.contextElement||bt(t.elements.popper),s,a),y=pt(t.elements.reference),b=Rt({reference:y,element:g,strategy:"absolute",placement:i}),w=Kt(Object.assign({},g,b)),E="popper"===l?w:y,x={top:m.top-E.top+p.top,bottom:E.bottom-m.bottom+p.bottom,left:m.left-E.left+p.left,right:E.right-m.right+p.right},O=t.modifiersData.offset;if("popper"===l&&O){var L=O[i];Object.keys(x).forEach(function(t){var e=[$,G].indexOf(t)>=0?1:-1,n=[Z,G].indexOf(t)>=0?"y":"x";x[t]+=L[n]*e})}return x}function Nt(t,e){void 0===e&&(e={});var n=e.boundary,i=e.rootBoundary,r=e.padding,s=e.flipVariations,o=e.allowedAutoPlacements,a=void 0===o?it:o,c=At(e.placement),l=c?s?nt:nt.filter(function(t){return At(t)===c}):et,u=l.filter(function(t){return a.indexOf(t)>=0});0===u.length&&(u=l);var d=u.reduce(function(e,s){return e[s]=Ht(t,{placement:s,boundary:n,rootBoundary:i,padding:r})[ut(s)],e},{});return Object.keys(d).sort(function(t,e){return d[t]-d[e]})}function Qt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function zt(t){return[Z,$,G,tt].some(function(e){return t[e]>=0})}function Ut(t,e,n){void 0===n&&(n=!1);var i,r,s=ct(e),o=ct(e)&&function(t){var e=t.getBoundingClientRect(),n=ht(e.width)/t.offsetWidth||1,i=ht(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),a=bt(e),c=pt(t,o),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(s||!s&&!n)&&(("body"!==st(e)||Ft(a))&&(l=(i=e)!==ot(i)&&ct(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:qt(i)),ct(e)?((u=pt(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):a&&(u.x=It(a))),{x:c.left+l.scrollLeft-u.x,y:c.top+l.scrollTop-u.y,width:c.width,height:c.height}}function Jt(t){var e=new Map,n=new Set,i=[];function r(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var i=e.get(t);i&&r(i)}}),i.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||r(t)}),i}var Xt={placement:"bottom",modifiers:[],strategy:"absolute"};function Yt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function Zt(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,i=t.defaultOptions,r=void 0===i?Xt:i;return function(t,e,i){void 0===i&&(i=r);var s,o,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Xt,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],l=!1,u={state:a,setOptions:function(i){var s="function"==typeof i?i(a.options):i;d(),a.options=Object.assign({},r,a.options,s),a.scrollParents={reference:at(t)?Vt(t):t.contextElement?Vt(t.contextElement):[],popper:Vt(e)};var o,l,f=function(t){var e=Jt(t);return rt.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[])}((o=[].concat(n,a.options.modifiers),l=o.reduce(function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t},{}),Object.keys(l).map(function(t){return l[t]})));return a.orderedModifiers=f.filter(function(t){return t.enabled}),a.orderedModifiers.forEach(function(t){var e=t.options,n=t.effect;if("function"==typeof n){var i=n({state:a,name:t.name,instance:u,options:void 0===e?{}:e});c.push(i||function(){})}}),u.update()},forceUpdate:function(){if(!l){var t=a.elements,e=t.reference,n=t.popper;if(Yt(e,n)){a.rects={reference:Ut(e,xt(n),"fixed"===a.options.strategy),popper:gt(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(t){return a.modifiersData[t.name]=Object.assign({},t.data)});for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var r=a.orderedModifiers[i],s=r.fn,o=r.options;"function"==typeof s&&(a=s({state:a,options:void 0===o?{}:o,name:r.name,instance:u})||a)}else a.reset=!1,i=-1}}},update:(s=function(){return new Promise(function(t){u.forceUpdate(),t(a)})},function(){return o||(o=new Promise(function(t){Promise.resolve().then(function(){o=void 0,t(s())})})),o}),destroy:function(){d(),l=!0}};if(!Yt(t,e))return u;function d(){c.forEach(function(t){return t()}),c=[]}return u.setOptions(i).then(function(t){!l&&i.onFirstUpdate&&i.onFirstUpdate(t)}),u}}var Gt=/*#__PURE__*/Zt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,s=void 0===r||r,o=i.resize,a=void 0===o||o,c=ot(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&l.forEach(function(t){t.addEventListener("scroll",n.update,St)}),a&&c.addEventListener("resize",n.update,St),function(){s&&l.forEach(function(t){t.removeEventListener("scroll",n.update,St)}),a&&c.removeEventListener("resize",n.update,St)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state;e.modifiersData[t.name]=Rt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=void 0===i||i,s=n.adaptive,o=void 0===s||s,a=n.roundOffsets,c=void 0===a||a,l={placement:ut(e.placement),variation:At(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Ct(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Ct(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},r=e.elements[t];ct(r)&&st(r)&&(Object.assign(r.style,n),Object.keys(i).forEach(function(t){var e=i[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var i=e.elements[t],r=e.attributes[t]||{},s=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});ct(i)&&st(i)&&(Object.assign(i.style,s),Object.keys(r).forEach(function(t){i.removeAttribute(t)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.name,i=t.options.offset,r=void 0===i?[0,0]:i,s=it.reduce(function(t,n){return t[n]=function(t,e,n){var i=ut(t),r=[tt,Z].indexOf(i)>=0?-1:1,s="function"==typeof n?n(Object.assign({},e,{placement:t})):n,o=s[0],a=s[1];return o=o||0,a=(a||0)*r,[tt,$].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}(n,e.rects,r),t},{}),o=s[e.placement],a=o.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=o.x,e.modifiersData.popperOffsets.y+=a),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var r=n.mainAxis,s=void 0===r||r,o=n.altAxis,a=void 0===o||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=void 0===h||h,g=n.allowedAutoPlacements,v=e.options.placement,m=ut(v),y=c||(m!==v&&p?function(t){if("auto"===ut(t))return[];var e=Dt(t);return[jt(t),e,jt(e)]}(v):[Dt(v)]),b=[v].concat(y).reduce(function(t,n){return t.concat("auto"===ut(n)?Nt(e,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:p,allowedAutoPlacements:g}):n)},[]),w=e.rects.reference,E=e.rects.popper,x=new Map,O=!0,L=b[0],k=0;k<b.length;k++){var _=b[k],A=ut(_),P="start"===At(_),C=[Z,G].indexOf(A)>=0,S=C?"width":"height",T=Ht(e,{placement:_,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),D=C?P?$:tt:P?G:Z;w[S]>E[S]&&(D=Dt(D));var M=Dt(D),j=[];if(s&&j.push(T[A]<=0),a&&j.push(T[D]<=0,T[M]<=0),j.every(function(t){return t})){L=_,O=!1;break}x.set(_,j)}if(O)for(var q=function(t){var e=b.find(function(e){var n=x.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return L=e,"break"},I=p?3:1;I>0&&"break"!==q(I);I--);e.placement!==L&&(e.modifiersData[i]._skip=!0,e.placement=L,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,r=n.mainAxis,s=void 0===r||r,o=n.altAxis,a=void 0!==o&&o,c=n.tether,l=void 0===c||c,u=n.tetherOffset,d=void 0===u?0:u,f=Ht(e,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),h=ut(e.placement),p=At(e.placement),g=!p,v=Ot(h),m="x"===v?"y":"x",y=e.modifiersData.popperOffsets,b=e.rects.reference,w=e.rects.popper,E="function"==typeof d?d(Object.assign({},e.rects,{placement:e.placement})):d,x="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),O=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,L={x:0,y:0};if(y){if(s){var k,_="y"===v?Z:tt,A="y"===v?G:$,P="y"===v?"height":"width",C=y[v],S=C+f[_],T=C-f[A],D=l?-w[P]/2:0,M="start"===p?b[P]:w[P],j="start"===p?-w[P]:-b[P],q=e.elements.arrow,I=l&&q?gt(q):{width:0,height:0},F=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=F[_],V=F[A],K=Lt(0,b[P],I[P]),W=g?b[P]/2-D-K-B-x.mainAxis:M-K-B-x.mainAxis,R=g?-b[P]/2+D+K+V+x.mainAxis:j+K+V+x.mainAxis,H=e.elements.arrow&&xt(e.elements.arrow),N=null!=(k=null==O?void 0:O[v])?k:0,Q=C+R-N,z=Lt(l?ft(S,C+W-N-(H?"y"===v?H.clientTop||0:H.clientLeft||0:0)):S,C,l?dt(T,Q):T);y[v]=z,L[v]=z-C}if(a){var U,J=y[m],X="y"===m?"height":"width",Y=J+f["x"===v?Z:tt],et=J-f["x"===v?G:$],nt=-1!==[Z,tt].indexOf(h),it=null!=(U=null==O?void 0:O[m])?U:0,rt=nt?Y:J-b[X]-w[X]-it+x.altAxis,st=nt?J+b[X]+w[X]-it-x.altAxis:et,ot=l&&nt?function(t,e,n){var i=Lt(t,e,n);return i>n?n:i}(rt,J,st):Lt(l?rt:Y,J,l?st:et);y[m]=ot,L[m]=ot-J}e.modifiersData[i]=L}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,r=t.options,s=n.elements.arrow,o=n.modifiersData.popperOffsets,a=ut(n.placement),c=Ot(a),l=[tt,$].indexOf(a)>=0?"height":"width";if(s&&o){var u=function(t,e){return kt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:_t(t,et))}(r.padding,n),d=gt(s),f="y"===c?Z:tt,h="y"===c?G:$,p=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],g=o[c]-n.rects.reference[c],v=xt(s),m=v?"y"===c?v.clientHeight||0:v.clientWidth||0:0,y=m/2-d[l]/2+(p/2-g/2),b=Lt(u[f],y,m-d[l]-u[h]);n.modifiersData[i]=((e={})[c]=b,e.centerOffset=b-y,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&vt(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,s=e.modifiersData.preventOverflow,o=Ht(e,{elementContext:"reference"}),a=Ht(e,{altBoundary:!0}),c=Qt(o,i),l=Qt(a,r,s),u=zt(c),d=zt(l);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]});function $t(t,e){if(!e&&!(e=function(t,e){var n=t.getAttribute("data-"+e.dataTrigger).trim();return n?document.querySelector("[data-"+e.dataPopover+'="'+n+'"]'):!(!t.nextElementSibling||!t.nextElementSibling.hasAttribute("data-"+e.dataPopover))&&t.nextElementSibling}(t,this.settings)))return console.error("No popover associated with the provided trigger:",t),!1;var n,i=this.collection.findIndex(function(n){return n.trigger===t&&n.target===e});if(i>=0)n=this.collection[i];else{var r=Gt(t,e);n={state:"closed",trigger:t,target:e,popper:r,config:U(e,this.settings)},this.collection.push(n)}return ee.call(this,n),n.target.classList.contains(this.settings.stateActive)?(this.open(n),z.call(this,n)):this.close(n),n}function te(t){var e=this.collection.findIndex(function(e){return e.trigger===t.trigger&&e.target===t.target});return e>=0&&("opened"===t.state&&this.close(t),t.popper.destroy(),ne(t),this.collection.splice(e,1)),this.collection}function ee(t){return t.__eventListeners||("hover"===J(t.target,this.settings.dataEventType,t.config.event)?(t.__eventListeners=[{el:["trigger"],type:["mouseenter","focus"],listener:Y.bind(this,t)},{el:["trigger","target"],type:["mouseleave","focusout"],listener:H.bind(this,t)}],t.__eventListeners.forEach(function(e){e.el.forEach(function(n){e.type.forEach(function(i){t[n].addEventListener(i,e.listener,!1)})})})):(t.__eventListeners=[{el:["trigger"],type:["click"],listener:N.bind(this,t)}],t.__eventListeners.forEach(function(e){e.el.forEach(function(n){e.type.forEach(function(i){t[n].addEventListener(i,e.listener,!1)})})}))),t}function ne(t){return t.__eventListeners&&(t.__eventListeners.forEach(function(e){e.el.forEach(function(n){e.type.forEach(function(i){t[n].removeEventListener(i,e.listener,!1)})})}),delete t.__eventListeners),t}function ie(){var t=this;return document.querySelectorAll("[data-"+this.settings.dataTrigger+"]").forEach(function(e){t.register(e,!1)}),this.collection}function re(){for(;this.collection.length>0;)this.deregister(this.collection[0]);return this.collection}var se=/*#__PURE__*/function(){function t(t){this.defaults=K,this.settings=g({},this.defaults,t),this.collection=[],this.memory={trigger:null},this.__handlerKeydown=Q.bind(this),this.settings.autoInit&&this.init()}var e=t.prototype;return e.init=function(t){void 0===t&&(t=null),t&&(this.settings=g({},this.settings,t)),this.registerCollection(),this.settings.eventListeners&&this.initEventListeners(!1)},e.destroy=function(){this.deregisterCollection(),this.settings.eventListeners&&this.destroyEventListeners(!1)},e.initEventListeners=function(t){var e=this;void 0===t&&(t=!0),t&&this.collection.forEach(function(t){ee.call(e,t)}),document.addEventListener("keydown",this.__handlerKeydown,!1)},e.destroyEventListeners=function(t){void 0===t&&(t=!0),t&&this.collection.forEach(function(t){ne(t)}),document.removeEventListener("keydown",this.__handlerKeydown,!1)},e.register=function(t,e){return void 0===e&&(e=!1),$t.call(this,t,e)},e.deregister=function(t){return te.call(this,t)},e.registerCollection=function(){return ie.call(this)},e.deregisterCollection=function(){return re.call(this)},e.open=function(t){return Y.call(this,t)},e.close=function(t){return W.call(this,t)},e.closeAll=function(){return R.call(this)},t}();export{v as Checkbox,S as Drawer,V as Modal,se as Popover,p as core};
|
|
1
|
+
var t=function(t,e){e&&document.querySelectorAll(e).forEach(function(e){t?(e.inert=!0,e.setAttribute("aria-hidden",!0)):(e.inert=null,e.removeAttribute("aria-hidden"))})},e=function(t,e){e&&document.querySelectorAll(e).forEach(function(e){t?e.style.overflow="hidden":e.style.removeProperty("overflow")})},n=function(t){t&&document.querySelectorAll(t).forEach(function(t){t.setAttribute("tabindex","-1")})},i=function(t){var e=arguments;(t=t.forEach?t:[t]).forEach(function(t){var n;(n=t.classList).add.apply(n,[].slice.call(e,1))})},r=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'],s=function(t,e){var n=t.querySelector("[data-"+e.dataFocus+"]");if(n)n.focus();else{var i=t.querySelector('[tabindex="-1"]');i&&i.focus()}},o=function(t){void 0===t&&(t=null),t&&t.memory&&t.memory.trigger&&(t.memory.trigger.focus(),t.memory.trigger=null)},a=/*#__PURE__*/function(){function t(){this.target=null,this.__handlerFocusTrap=this.handlerFocusTrap.bind(this)}var e=t.prototype;return e.init=function(t){this.target=t,this.inner=this.target.querySelector('[tabindex="-1"]'),this.focusable=this.getFocusable(),this.focusable.length?(this.focusableFirst=this.focusable[0],this.focusableLast=this.focusable[this.focusable.length-1],this.target.addEventListener("keydown",this.__handlerFocusTrap)):this.target.addEventListener("keydown",this.handlerFocusLock)},e.destroy=function(){this.target&&(this.inner=null,this.focusable=null,this.focusableFirst=null,this.focusableLast=null,this.target.removeEventListener("keydown",this.__handlerFocusTrap),this.target.removeEventListener("keydown",this.handlerFocusLock),this.target=null)},e.refresh=function(){this.target&&(this.target.removeEventListener("keydown",this.__handlerFocusTrap),this.target.removeEventListener("keydown",this.handlerFocusLock),this.focusable=this.getFocusable(),this.focusable.length?(this.focusableFirst=this.focusable[0],this.focusableLast=this.focusable[this.focusable.length-1],this.target.addEventListener("keydown",this.__handlerFocusTrap)):(this.focusableFirst=null,this.focusableLast=null,this.target.addEventListener("keydown",this.handlerFocusLock)))},e.handlerFocusTrap=function(t){("Tab"===t.key||9===t.keyCode)&&(t.shiftKey?document.activeElement!==this.focusableFirst&&document.activeElement!==this.inner||(this.focusableLast.focus(),t.preventDefault()):document.activeElement!==this.focusableLast&&document.activeElement!==this.inner||(this.focusableFirst.focus(),t.preventDefault()))},e.handlerFocusLock=function(t){("Tab"===t.key||9===t.keyCode)&&t.preventDefault()},e.getFocusable=function(){var t=[],e=document.activeElement,n=this.inner?this.inner.scrollTop:0;return this.target.querySelectorAll(r.join(",")).forEach(function(e){e.focus(),e===document.activeElement&&t.push(e)}),this.inner&&(this.inner.scrollTop=n),e.focus(),t},t}(),c=function(t,e){return void 0===e&&(e=0),"string"!=typeof t?t:e?document.querySelector(t):document.querySelectorAll(t)},l=function(t){return t=[].slice.call(t=t.forEach?t:[t]),[].slice.call(arguments,1).some(function(e){return t.some(function(t){if(t.classList.contains(e))return!0})})};function u(t,e,n){if(void 0===n&&(n=!1),n){var i=c(t);if(!i.length)throw new Error('Move target element "'+t+'" not found!');var r=c(n,1);if(!r)throw new Error('Move reference element "'+n+'" not found!');i.forEach(function(t){switch(e){case"after":return r.after(t),{ref:r,el:t,type:e};case"before":return r.before(t),{ref:r,el:t,type:e};case"append":return r.append(t),{ref:r,el:t,type:e};case"prepend":return r.prepend(t),{ref:r,el:t,type:e};default:throw new Error('Move type "'+e+'" does not exist!')}})}}var d=function(t){var e=arguments;(t=t.forEach?t:[t]).forEach(function(t){var n;(n=t.classList).remove.apply(n,[].slice.call(e,1))})},f=function(t,e){return new Promise(function(n){e.transition?(t.classList.remove(e.stateClosed),t.classList.add(e.stateOpening),t.addEventListener("transitionend",function i(){t.classList.add(e.stateOpened),t.classList.remove(e.stateOpening),n(t),this.removeEventListener("transitionend",i)})):(t.classList.add(e.stateOpened),t.classList.remove(e.stateClosed),n(t))})},h=function(t,e){return new Promise(function(n){e.transition?(t.classList.add(e.stateClosing),t.classList.remove(e.stateOpened),t.addEventListener("transitionend",function i(){t.classList.remove(e.stateClosing),t.classList.add(e.stateClosed),n(t),this.removeEventListener("transitionend",i)})):(t.classList.add(e.stateClosed),t.classList.remove(e.stateOpened),n(t))})},p={__proto__:null,setInert:t,setOverflowHidden:e,setTabindex:n,addClass:i,camelCase:function(t){return t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})},focusTarget:s,focusTrigger:o,FocusTrap:a,getElement:c,hasClass:l,hyphenCase:function(t){return t.replace(/([a-z][A-Z])/g,function(t){return t[0]+"-"+t[1].toLowerCase()})},moveElement:u,removeClass:d,toggleClass:function(t){var e=arguments;(t=t.forEach?t:[t]).forEach(function(t){[].slice.call(e,1).forEach(function(e){t.classList.toggle(e)})})},openTransition:f,closeTransition:h};function g(){return(g=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var v={autoInit:!1,stateAttr:"aria-checked",stateValue:"mixed"},m=/*#__PURE__*/function(){function t(t){this.defaults=v,this.settings=g({},this.defaults,t),this.__handlerClick=this.handlerClick.bind(this),this.settings.autoInit&&this.init()}var e=t.prototype;return e.init=function(t){void 0===t&&(t=null),t&&(this.settings=g({},this.settings,t));var e=document.querySelectorAll("["+this.settings.stateAttr+'="'+this.settings.stateValue+'"]');this.setIndeterminate(e),document.addEventListener("click",this.__handlerClick,!1)},e.destroy=function(){document.removeEventListener("click",this.__handlerClick,!1)},e.handlerClick=function(t){var e=t.target.closest("["+this.settings.stateAttr+'="'+this.settings.stateValue+'"]');e&&(this.removeAriaState(e),this.setIndeterminate(e))},e.setAriaState=function(t,e){var n=this;void 0===e&&(e=this.settings.stateValue),(t=t.forEach?t:[t]).forEach(function(t){t.setAttribute(n.settings.stateAttr,e)})},e.removeAriaState=function(t){var e=this;(t=t.forEach?t:[t]).forEach(function(t){t.removeAttribute(e.settings.stateAttr)})},e.setIndeterminate=function(t){var e=this;(t=t.forEach?t:[t]).forEach(function(t){t.indeterminate=!!t.hasAttribute(e.settings.stateAttr)})},t}(),y={autoInit:!1,dataDrawer:"drawer",dataDialog:"drawer-dialog",dataToggle:"drawer-toggle",dataOpen:"drawer-open",dataClose:"drawer-close",dataBreakpoint:"drawer-breakpoint",dataFocus:"drawer-focus",stateOpened:"is-opened",stateOpening:"is-opening",stateClosing:"is-closing",stateClosed:"is-closed",classModal:"drawer_modal",selectorInert:null,selectorOverflow:null,breakpoints:null,customEventPrefix:"drawer:",eventListeners:!0,stateSave:!0,stateKey:"DrawerState",setTabindex:!0,transition:!0},b=/*#__PURE__*/function(){function t(t){this.mediaQueryLists=[],this.parent=t,this.prefix=this.getVariablePrefix(),this.__check=this.check.bind(this)}var e=t.prototype;return e.init=function(){var t=this;document.querySelectorAll("[data-"+this.parent.settings.dataBreakpoint+"]").forEach(function(e){var n=e.getAttribute("data-"+t.parent.settings.dataDrawer),i=e.getAttribute("data-"+t.parent.settings.dataBreakpoint),r=t.getBreakpoint(i),s=window.matchMedia("(min-width:"+r+")");t.match(s,e),"function"==typeof s.addEventListener?s.addEventListener("change",t.__check):s.addListener(t.__check),t.mediaQueryLists.push({mql:s,drawer:n})})},e.destroy=function(){var t=this;this.mediaQueryLists&&this.mediaQueryLists.length&&this.mediaQueryLists.forEach(function(e){e.mql.removeListener(t.__check)}),this.mediaQueryLists=null},e.check=function(t){var e=this;void 0===t&&(t=null),this.mediaQueryLists&&this.mediaQueryLists.length&&(this.mediaQueryLists.forEach(function(n){if(!t||t.media==n.mql.media){var i=document.querySelector("[data-"+e.parent.settings.dataDrawer+'="'+n.drawer+'"]');i&&e.match(n.mql,i)}}),document.dispatchEvent(new CustomEvent(this.parent.settings.customEventPrefix+"breakpoint",{bubbles:!0})))},e.match=function(t,e){t.matches?this.parent.switchToDefault(e):this.parent.switchToModal(e)},e.getBreakpoint=function(t){var e=t;return this.parent.settings.breakpoints&&this.parent.settings.breakpoints[t]?e=this.parent.settings.breakpoints[t]:getComputedStyle(document.body).getPropertyValue(this.prefix+t)&&(e=getComputedStyle(document.body).getPropertyValue(this.prefix+t)),e},e.getVariablePrefix=function(){var t="--";return(t+=getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix"))+"breakpoint-"},t}();function w(t){return"string"!=typeof t?t:document.querySelector("[data-"+this.settings.dataDrawer+'="'+t+'"]')}function E(t){return Promise.reject(new Error('Did not find drawer with key: "'+t+'"'))}var x=function(n){try{var i=this,r=i.getDrawer(n);return r?l(r,i.settings.stateOpened)?(i.working=!0,l(r,i.settings.classModal)&&(t(!1,i.settings.selectorInert),e(!1,i.settings.selectorOverflow)),Promise.resolve(h(r,i.settings)).then(function(){return i.stateSave(r),o(i),i.focusTrap.destroy(),r.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"closed",{detail:i,bubbles:!0})),i.working=!1,r})):Promise.resolve(r):Promise.resolve(E(n))}catch(t){return Promise.reject(t)}};function L(t){if(!this.working){var e=t.target.closest("[data-"+this.settings.dataToggle+"]");if(e){var n=e.getAttribute("data-"+this.settings.dataToggle);return this.memory.trigger=e,this.toggle(n),void t.preventDefault()}if(e=t.target.closest("[data-"+this.settings.dataOpen+"]")){var i=e.getAttribute("data-"+this.settings.dataOpen);return this.memory.trigger=e,this.open(i),void t.preventDefault()}if(e=t.target.closest("[data-"+this.settings.dataClose+"]")){var r=e.getAttribute("data-"+this.settings.dataClose);if(r)this.memory.trigger=e,this.close(r);else{var s=t.target.closest("[data-"+this.settings.dataDrawer+"]");s&&this.close(s)}t.preventDefault()}else t.target.hasAttribute("data-"+this.settings.dataDrawer)&&this.close(t.target)}}function O(t){if(!this.working&&"Escape"===t.key){var e=document.querySelector("."+this.settings.classModal+"."+this.settings.stateOpened);e&&this.close(e)}}var k=function(n){try{var i=this,r=i.getDrawer(n);if(!r)return Promise.resolve(E(n));if(l(r,i.settings.stateOpened))return s(r,i.settings),Promise.resolve(r);i.working=!0;var o=l(r,i.settings.classModal);return o&&e(!0,i.settings.selectorOverflow),Promise.resolve(f(r,i.settings)).then(function(){return i.stateSave(r),o&&(i.focusTrap.init(r),t(!0,i.settings.selectorInert)),s(r,i.settings),r.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"opened",{detail:i,bubbles:!0})),i.working=!1,r})}catch(t){return Promise.reject(t)}};function _(t,e){if(!e.stateSave)return A(e);var n=localStorage.getItem(e.stateKey)?JSON.parse(localStorage.getItem(e.stateKey)):{};return(t?[t]:document.querySelectorAll("[data-"+e.dataDrawer+"]")).forEach(function(t){if(!l(t,e.classModal)){var i=t.getAttribute("data-"+e.dataDrawer);n[i]=l(t,e.stateOpened)?e.stateOpened:e.stateClosed}}),localStorage.setItem(e.stateKey,JSON.stringify(n)),n}function A(t){return localStorage.getItem(t.stateKey)&&localStorage.removeItem(t.stateKey),{}}var P=function(n){try{var r=this,s=r.getDrawer(n);return s?l(s,r.settings.classModal)?(t(!1,r.settings.selectorInert),e(!1,r.settings.selectorOverflow),d(s,r.settings.classModal),r.focusTrap.destroy(),n=s.getAttribute("data-"+r.settings.dataDrawer),r.state[n]==r.settings.stateOpened&&(i(s,r.settings.stateOpened),d(s,r.settings.stateClosed)),s.dispatchEvent(new CustomEvent(r.settings.customEventPrefix+"toDefault",{bubbles:!0})),Promise.resolve(s)):Promise.resolve():Promise.resolve(E(n))}catch(t){return Promise.reject(t)}},C=function(t){try{var e=this,n=e.getDrawer(t);return n?l(n,e.settings.classModal)?Promise.resolve():(i(n,e.settings.classModal),i(n,e.settings.stateClosed),d(n,e.settings.stateOpened),n.dispatchEvent(new CustomEvent(e.settings.customEventPrefix+"toModal",{bubbles:!0})),Promise.resolve(n)):Promise.resolve(E(t))}catch(t){return Promise.reject(t)}},S=function(t){try{var e=this,n=e.getDrawer(t);if(!n)return Promise.resolve(E(t));var i=!l(n,e.settings.stateOpened);return Promise.resolve(i?e.open(n):e.close(n))}catch(t){return Promise.reject(t)}},T=/*#__PURE__*/function(){function t(t){this.defaults=y,this.settings=g({},this.defaults,t),this.working=!1,this.memory={},this.state={},this.focusTrap=new a,this.breakpoint=new b(this),this.__handlerClick=L.bind(this),this.__handlerKeydown=O.bind(this),this.settings.autoInit&&this.init()}var e=t.prototype;return e.init=function(t){void 0===t&&(t=null),t&&(this.settings=g({},this.settings,t)),this.stateSet(),this.settings.setTabindex&&this.setTabindex(),this.breakpoint.init(),this.settings.eventListeners&&this.initEventListeners()},e.destroy=function(){this.breakpoint.destroy(),this.memory={},this.state={},localStorage.removeItem(this.settings.stateKey),this.settings.eventListeners&&this.destroyEventListeners()},e.initEventListeners=function(){document.addEventListener("click",this.__handlerClick,!1),document.addEventListener("touchend",this.__handlerClick,!1),document.addEventListener("keydown",this.__handlerKeydown,!1)},e.destroyEventListeners=function(){document.removeEventListener("click",this.__handlerClick,!1),document.removeEventListener("touchend",this.__handlerClick,!1),document.removeEventListener("keydown",this.__handlerKeydown,!1)},e.getDrawer=function(t){return w.call(this,t)},e.setTabindex=function(){return n("\n [data-"+this.settings.dataDrawer+"]\n [data-"+this.settings.dataDialog+"]\n ")},e.stateSet=function(){this.state=function(t){if(!t.stateSave)return A(t);var e=localStorage.getItem(t.stateKey);if(!e||e&&0===Object.keys(JSON.parse(e)).length)return _(null,t);var n=JSON.parse(localStorage.getItem(t.stateKey));return Object.keys(n).forEach(function(e){var r=document.querySelector("[data-"+t.dataDrawer+'="'+e+'"]');r&&(n[e]==t.stateOpened?i(r,t.stateOpened):d(r,t.stateOpened))}),n}(this.settings)},e.stateSave=function(t){void 0===t&&(t=null),this.state=_(t,this.settings)},e.stateClear=function(){this.state=A(this.settings)},e.switchToDefault=function(t){return P.call(this,t)},e.switchToModal=function(t){return C.call(this,t)},e.toggle=function(t){return S.call(this,t)},e.open=function(t){return k.call(this,t)},e.close=function(t){return x.call(this,t)},t}(),D={autoInit:!1,dataModal:"modal",dataDialog:"modal-dialog",dataOpen:"modal-open",dataClose:"modal-close",dataFocus:"modal-focus",dataRequired:"modal-required",stateOpened:"is-opened",stateOpening:"is-opening",stateClosing:"is-closing",stateClosed:"is-closed",selectorInert:null,selectorOverflow:"body",customEventPrefix:"modal:",eventListeners:!0,moveModals:{ref:null,type:null},setTabindex:!0,transition:!0},M=function(n){void 0===n&&(n=!0);try{var i=this,r=document.querySelector("[data-"+i.settings.dataModal+"]."+i.settings.stateOpened);return r?(i.working=!0,t(!1,i.settings.selectorInert),e(!1,i.settings.selectorOverflow),Promise.resolve(h(r,i.settings)).then(function(){return n&&o(i),i.focusTrap.destroy(),r.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"closed",{detail:i,bubbles:!0})),i.working=!1,r})):Promise.resolve(r)}catch(t){return Promise.reject(t)}},j=function(t){try{var e,n=function(n){return e?n:t.target.closest("[data-"+i.settings.dataClose+"]")?(t.preventDefault(),void i.close()):void(t.target.hasAttribute("data-"+i.settings.dataModal)&&!t.target.hasAttribute("data-"+i.settings.dataRequired)&&i.close())},i=this;if(i.working)return Promise.resolve();var r=t.target.closest("[data-"+i.settings.dataOpen+"]"),s=function(){if(r){t.preventDefault();var n=r.getAttribute("data-"+i.settings.dataOpen),s=t.target.closest("[data-"+i.settings.dataModal+"]");return s||(i.memory.trigger=r),Promise.resolve(i.close(!s)).then(function(){i.open(n),e=1})}}();return Promise.resolve(s&&s.then?s.then(n):n(s))}catch(t){return Promise.reject(t)}};function q(t){if(!this.working&&"Escape"===t.key){var e=document.querySelector("[data-"+this.settings.dataModal+"]."+this.settings.stateOpened);e&&!e.hasAttribute("data-"+this.settings.dataRequired)&&this.close()}}function I(t){return"string"!=typeof t?t:document.querySelector("[data-"+this.settings.dataModal+'="'+t+'"]')}function F(t,e){void 0===t&&(t=this.settings.moveModals.type),void 0===e&&(e=this.settings.moveModals.ref);var n=document.querySelectorAll("[data-"+this.settings.dataModal+"]");n.length&&u(n,t,e)}function B(){var n=this;document.querySelectorAll("[data-"+this.settings.dataModal+"]").forEach(function(r){r.classList.contains(n.settings.stateOpened)&&(t(!1,n.settings.selectorInert),e(!1,n.settings.selectorOverflow),o(n),n.focusTrap.destroy()),d(r,n.settings.stateOpened,n.settings.stateOpening,n.settings.stateClosing),i(r,n.settings.stateClosed)})}var V=function(n){try{var i=this,r=I.call(i,n);return r?l(r,i.settings.stateClosed)?(i.working=!0,e(!0,i.settings.selectorOverflow),Promise.resolve(f(r,i.settings)).then(function(){return i.focusTrap.init(r),s(r,i.settings),t(!0,i.settings.selectorInert),r.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"opened",{detail:i,bubbles:!0})),i.working=!1,r})):Promise.resolve(r):Promise.resolve(Promise.reject(new Error('Did not find modal with key: "'+n+'"')))}catch(t){return Promise.reject(t)}},K=/*#__PURE__*/function(){function t(t){this.defaults=D,this.settings=g({},this.defaults,t),this.working=!1,this.memory={},this.focusTrap=new a,this.__handlerClick=j.bind(this),this.__handlerKeydown=q.bind(this),this.settings.autoInit&&this.init()}var e=t.prototype;return e.init=function(t){void 0===t&&(t=null),t&&(this.settings=g({},this.settings,t)),this.moveModals(),this.setInitialState(),this.settings.setTabindex&&this.setTabindex(),this.settings.eventListeners&&this.initEventListeners()},e.destroy=function(){this.memory={},this.settings.eventListeners&&this.destroyEventListeners()},e.initEventListeners=function(){document.addEventListener("click",this.__handlerClick,!1),document.addEventListener("touchend",this.__handlerClick,!1),document.addEventListener("keydown",this.__handlerKeydown,!1)},e.destroyEventListeners=function(){document.removeEventListener("click",this.__handlerClick,!1),document.removeEventListener("touchend",this.__handlerClick,!1),document.removeEventListener("keydown",this.__handlerKeydown,!1)},e.getModal=function(t){return I.call(this,t)},e.setTabindex=function(){return n("\n [data-"+this.settings.dataModal+"]\n [data-"+this.settings.dataDialog+"]\n ")},e.setInitialState=function(){return B.call(this)},e.moveModals=function(t,e){return F.call(this,t,e)},e.open=function(t){return V.call(this,t)},e.close=function(t){return M.call(this,t)},t}(),W={autoInit:!1,dataPopover:"popover",dataTrigger:"popover-trigger",dataArrow:"popover-arrow",dataEventType:"popover-event",dataPlacement:"popover-placement",stateActive:"is-active",eventType:"click",eventListeners:!0,placement:"bottom-start"};function R(t){t.target.classList.remove(this.settings.stateActive),t.trigger.setAttribute("aria-expanded","false"),t.popper.setOptions({modifiers:[{name:"eventListeners",enabled:!1}]});var e=this.collection.findIndex(function(e){return e.target===t.target});return this.collection[e].state="closed",t.trigger===this.memory.trigger&&(this.memory.trigger=null),t}function H(){var t=this;return this.collection.forEach(function(e){"opened"===e.state&&t.close(e)}),this.collection}function N(t){var e=this;"opened"==t.state&&setTimeout(function(){var n=t.target.closest(":hover")===t.target||t.trigger.closest(":hover")===t.trigger,i=document.activeElement.closest("[data-"+e.settings.dataPopover+"]")===t.target||document.activeElement.closest("[data-"+e.settings.dataTrigger+"]")===t.trigger;return n||i||e.close(t),t},1)}function Q(t){t.target.classList.contains(this.settings.stateActive)?this.close(t):(this.memory.trigger=t.trigger,this.open(t),U.call(this,t))}function z(t){var e=this;switch(t.key){case"Escape":return this.memory.trigger&&this.memory.trigger.focus(),void this.closeAll();case"Tab":return void this.collection.forEach(function(t){N.call(e,t)});default:return}}function U(t){var e=this;document.addEventListener("click",function n(i){var r=i.target.closest("[data-"+e.settings.dataPopover+"], [data-"+e.settings.dataTrigger+"]");r===t.target||r===t.trigger?t.target.classList.contains(e.settings.stateActive)||this.removeEventListener("click",n):(t.target.classList.contains(e.settings.stateActive)&&e.close(t),this.removeEventListener("click",n))})}function J(t,e){var n=getComputedStyle(t),i={placement:e.placement,event:e.eventType,offset:0,"overflow-padding":0,"flip-padding":0,"arrow-element":"[data-"+e.dataArrow+"]","arrow-padding":0};for(var r in i){var s=getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix"),o=n.getPropertyValue("--"+s+"popover-"+r).trim();o&&(i[r]=o)}return i}function X(t,e,n){return void 0===n&&(n=!1),t.hasAttribute("data-"+e)?t.getAttribute("data-"+e):n}function Y(t){var e,n="string"==typeof t?t.trim().split(" "):[t];switch(n.forEach(function(t,e){n[e]=parseInt(t,10)}),n.length){case 1:e=n[0];break;case 2:e={top:n[0],right:n[1],bottom:n[0],left:n[1]};break;case 3:e={top:n[0],right:n[1],bottom:n[2],left:n[1]};break;case 4:e={top:n[0],right:n[1],bottom:n[2],left:n[3]};break;default:e=!1}return e}function Z(t){var e;t.target.classList.add(this.settings.stateActive),t.trigger.setAttribute("aria-expanded","true"),t.config=J(t.target,this.settings),t.popper.setOptions({placement:X(t.target,this.settings.dataPlacement,t.config.placement),modifiers:[{name:"eventListeners",enabled:!0}].concat((e=t.config,[{name:"offset",options:{offset:[0,parseInt(e.offset,10)]}},{name:"preventOverflow",options:{padding:Y(e["overflow-padding"])}},{name:"flip",options:{padding:Y(e["flip-padding"])}},{name:"arrow",options:{element:e["arrow-element"],padding:Y(e["arrow-padding"])}}]))}),t.popper.update();var n=this.collection.findIndex(function(e){return e.target===t.target});return this.collection[n].state="opened",t}var G="top",$="bottom",tt="right",et="left",nt=[G,$,tt,et],it=/*#__PURE__*/nt.reduce(function(t,e){return t.concat([e+"-start",e+"-end"])},[]),rt=/*#__PURE__*/[].concat(nt,["auto"]).reduce(function(t,e){return t.concat([e,e+"-start",e+"-end"])},[]),st=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ot(t){return t?(t.nodeName||"").toLowerCase():null}function at(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ct(t){return t instanceof at(t).Element||t instanceof Element}function lt(t){return t instanceof at(t).HTMLElement||t instanceof HTMLElement}function ut(t){return"undefined"!=typeof ShadowRoot&&(t instanceof at(t).ShadowRoot||t instanceof ShadowRoot)}function dt(t){return t.split("-")[0]}var ft=Math.max,ht=Math.min,pt=Math.round;function gt(t,e){void 0===e&&(e=!1);var n=t.getBoundingClientRect(),i=1,r=1;if(lt(t)&&e){var s=t.offsetHeight,o=t.offsetWidth;o>0&&(i=pt(n.width)/o||1),s>0&&(r=pt(n.height)/s||1)}return{width:n.width/i,height:n.height/r,top:n.top/r,right:n.right/i,bottom:n.bottom/r,left:n.left/i,x:n.left/i,y:n.top/r}}function vt(t){var e=gt(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function mt(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&ut(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function yt(t){return at(t).getComputedStyle(t)}function bt(t){return["table","td","th"].indexOf(ot(t))>=0}function wt(t){return((ct(t)?t.ownerDocument:t.document)||window.document).documentElement}function Et(t){return"html"===ot(t)?t:t.assignedSlot||t.parentNode||(ut(t)?t.host:null)||wt(t)}function xt(t){return lt(t)&&"fixed"!==yt(t).position?t.offsetParent:null}function Lt(t){for(var e=at(t),n=xt(t);n&&bt(n)&&"static"===yt(n).position;)n=xt(n);return n&&("html"===ot(n)||"body"===ot(n)&&"static"===yt(n).position)?e:n||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&<(t)&&"fixed"===yt(t).position)return null;for(var n=Et(t);lt(n)&&["html","body"].indexOf(ot(n))<0;){var i=yt(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function Ot(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function kt(t,e,n){return ft(t,ht(e,n))}function _t(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function At(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}function Pt(t){return t.split("-")[1]}var Ct={top:"auto",right:"auto",bottom:"auto",left:"auto"};function St(t){var e,n=t.popper,i=t.popperRect,r=t.placement,s=t.variation,o=t.offsets,a=t.position,c=t.gpuAcceleration,l=t.adaptive,u=t.roundOffsets,d=t.isFixed,f=o.x,h=void 0===f?0:f,p=o.y,g=void 0===p?0:p,v="function"==typeof u?u({x:h,y:g}):{x:h,y:g};h=v.x,g=v.y;var m=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),b=et,w=G,E=window;if(l){var x=Lt(n),L="clientHeight",O="clientWidth";x===at(n)&&"static"!==yt(x=wt(n)).position&&"absolute"===a&&(L="scrollHeight",O="scrollWidth"),x=x,(r===G||(r===et||r===tt)&&"end"===s)&&(w=$,g-=(d&&E.visualViewport?E.visualViewport.height:x[L])-i.height,g*=c?1:-1),r!==et&&(r!==G&&r!==$||"end"!==s)||(b=tt,h-=(d&&E.visualViewport?E.visualViewport.width:x[O])-i.width,h*=c?1:-1)}var k,_=Object.assign({position:a},l&&Ct),A=!0===u?function(t){var e=t.y,n=window.devicePixelRatio||1;return{x:pt(t.x*n)/n||0,y:pt(e*n)/n||0}}({x:h,y:g}):{x:h,y:g};return h=A.x,g=A.y,Object.assign({},_,c?((k={})[w]=y?"0":"",k[b]=m?"0":"",k.transform=(E.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",k):((e={})[w]=y?g+"px":"",e[b]=m?h+"px":"",e.transform="",e))}var Tt={passive:!0},Dt={left:"right",right:"left",bottom:"top",top:"bottom"};function Mt(t){return t.replace(/left|right|bottom|top/g,function(t){return Dt[t]})}var jt={start:"end",end:"start"};function qt(t){return t.replace(/start|end/g,function(t){return jt[t]})}function It(t){var e=at(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ft(t){return gt(wt(t)).left+It(t).scrollLeft}function Bt(t){var e=yt(t);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function Vt(t){return["html","body","#document"].indexOf(ot(t))>=0?t.ownerDocument.body:lt(t)&&Bt(t)?t:Vt(Et(t))}function Kt(t,e){var n;void 0===e&&(e=[]);var i=Vt(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),s=at(i),o=r?[s].concat(s.visualViewport||[],Bt(i)?i:[]):i,a=e.concat(o);return r?a:a.concat(Kt(Et(o)))}function Wt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Rt(t,e){return"viewport"===e?Wt(function(t){var e=at(t),n=wt(t),i=e.visualViewport,r=n.clientWidth,s=n.clientHeight,o=0,a=0;return i&&(r=i.width,s=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=i.offsetLeft,a=i.offsetTop)),{width:r,height:s,x:o+Ft(t),y:a}}(t)):ct(e)?function(t){var e=gt(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):Wt(function(t){var e,n=wt(t),i=It(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=ft(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=ft(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+Ft(t),c=-i.scrollTop;return"rtl"===yt(r||n).direction&&(a+=ft(n.clientWidth,r?r.clientWidth:0)-s),{width:s,height:o,x:a,y:c}}(wt(t)))}function Ht(t){var e,n=t.reference,i=t.element,r=t.placement,s=r?dt(r):null,o=r?Pt(r):null,a=n.x+n.width/2-i.width/2,c=n.y+n.height/2-i.height/2;switch(s){case G:e={x:a,y:n.y-i.height};break;case $:e={x:a,y:n.y+n.height};break;case tt:e={x:n.x+n.width,y:c};break;case et:e={x:n.x-i.width,y:c};break;default:e={x:n.x,y:n.y}}var l=s?Ot(s):null;if(null!=l){var u="y"===l?"height":"width";switch(o){case"start":e[l]=e[l]-(n[u]/2-i[u]/2);break;case"end":e[l]=e[l]+(n[u]/2-i[u]/2)}}return e}function Nt(t,e){void 0===e&&(e={});var n=e.placement,i=void 0===n?t.placement:n,r=e.boundary,s=void 0===r?"clippingParents":r,o=e.rootBoundary,a=void 0===o?"viewport":o,c=e.elementContext,l=void 0===c?"popper":c,u=e.altBoundary,d=void 0!==u&&u,f=e.padding,h=void 0===f?0:f,p=_t("number"!=typeof h?h:At(h,nt)),g=t.rects.popper,v=t.elements[d?"popper"===l?"reference":"popper":l],m=function(t,e,n){var i="clippingParents"===e?function(t){var e=Kt(Et(t)),n=["absolute","fixed"].indexOf(yt(t).position)>=0&<(t)?Lt(t):t;return ct(n)?e.filter(function(t){return ct(t)&&mt(t,n)&&"body"!==ot(t)}):[]}(t):[].concat(e),r=[].concat(i,[n]),s=r.reduce(function(e,n){var i=Rt(t,n);return e.top=ft(i.top,e.top),e.right=ht(i.right,e.right),e.bottom=ht(i.bottom,e.bottom),e.left=ft(i.left,e.left),e},Rt(t,r[0]));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(ct(v)?v:v.contextElement||wt(t.elements.popper),s,a),y=gt(t.elements.reference),b=Ht({reference:y,element:g,strategy:"absolute",placement:i}),w=Wt(Object.assign({},g,b)),E="popper"===l?w:y,x={top:m.top-E.top+p.top,bottom:E.bottom-m.bottom+p.bottom,left:m.left-E.left+p.left,right:E.right-m.right+p.right},L=t.modifiersData.offset;if("popper"===l&&L){var O=L[i];Object.keys(x).forEach(function(t){var e=[tt,$].indexOf(t)>=0?1:-1,n=[G,$].indexOf(t)>=0?"y":"x";x[t]+=O[n]*e})}return x}function Qt(t,e){void 0===e&&(e={});var n=e.boundary,i=e.rootBoundary,r=e.padding,s=e.flipVariations,o=e.allowedAutoPlacements,a=void 0===o?rt:o,c=Pt(e.placement),l=c?s?it:it.filter(function(t){return Pt(t)===c}):nt,u=l.filter(function(t){return a.indexOf(t)>=0});0===u.length&&(u=l);var d=u.reduce(function(e,s){return e[s]=Nt(t,{placement:s,boundary:n,rootBoundary:i,padding:r})[dt(s)],e},{});return Object.keys(d).sort(function(t,e){return d[t]-d[e]})}function zt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Ut(t){return[G,tt,$,et].some(function(e){return t[e]>=0})}function Jt(t,e,n){void 0===n&&(n=!1);var i,r,s=lt(e),o=lt(e)&&function(t){var e=t.getBoundingClientRect(),n=pt(e.width)/t.offsetWidth||1,i=pt(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),a=wt(e),c=gt(t,o),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(s||!s&&!n)&&(("body"!==ot(e)||Bt(a))&&(l=(i=e)!==at(i)&<(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:It(i)),lt(e)?((u=gt(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):a&&(u.x=Ft(a))),{x:c.left+l.scrollLeft-u.x,y:c.top+l.scrollTop-u.y,width:c.width,height:c.height}}function Xt(t){var e=new Map,n=new Set,i=[];function r(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var i=e.get(t);i&&r(i)}}),i.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||r(t)}),i}var Yt={placement:"bottom",modifiers:[],strategy:"absolute"};function Zt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function Gt(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,i=t.defaultOptions,r=void 0===i?Yt:i;return function(t,e,i){void 0===i&&(i=r);var s,o,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Yt,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],l=!1,u={state:a,setOptions:function(i){var s="function"==typeof i?i(a.options):i;d(),a.options=Object.assign({},r,a.options,s),a.scrollParents={reference:ct(t)?Kt(t):t.contextElement?Kt(t.contextElement):[],popper:Kt(e)};var o,l,f=function(t){var e=Xt(t);return st.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[])}((o=[].concat(n,a.options.modifiers),l=o.reduce(function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t},{}),Object.keys(l).map(function(t){return l[t]})));return a.orderedModifiers=f.filter(function(t){return t.enabled}),a.orderedModifiers.forEach(function(t){var e=t.options,n=t.effect;if("function"==typeof n){var i=n({state:a,name:t.name,instance:u,options:void 0===e?{}:e});c.push(i||function(){})}}),u.update()},forceUpdate:function(){if(!l){var t=a.elements,e=t.reference,n=t.popper;if(Zt(e,n)){a.rects={reference:Jt(e,Lt(n),"fixed"===a.options.strategy),popper:vt(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(t){return a.modifiersData[t.name]=Object.assign({},t.data)});for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var r=a.orderedModifiers[i],s=r.fn,o=r.options;"function"==typeof s&&(a=s({state:a,options:void 0===o?{}:o,name:r.name,instance:u})||a)}else a.reset=!1,i=-1}}},update:(s=function(){return new Promise(function(t){u.forceUpdate(),t(a)})},function(){return o||(o=new Promise(function(t){Promise.resolve().then(function(){o=void 0,t(s())})})),o}),destroy:function(){d(),l=!0}};if(!Zt(t,e))return u;function d(){c.forEach(function(t){return t()}),c=[]}return u.setOptions(i).then(function(t){!l&&i.onFirstUpdate&&i.onFirstUpdate(t)}),u}}var $t=/*#__PURE__*/Gt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,s=void 0===r||r,o=i.resize,a=void 0===o||o,c=at(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&l.forEach(function(t){t.addEventListener("scroll",n.update,Tt)}),a&&c.addEventListener("resize",n.update,Tt),function(){s&&l.forEach(function(t){t.removeEventListener("scroll",n.update,Tt)}),a&&c.removeEventListener("resize",n.update,Tt)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state;e.modifiersData[t.name]=Ht({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=void 0===i||i,s=n.adaptive,o=void 0===s||s,a=n.roundOffsets,c=void 0===a||a,l={placement:dt(e.placement),variation:Pt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,St(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,St(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},r=e.elements[t];lt(r)&&ot(r)&&(Object.assign(r.style,n),Object.keys(i).forEach(function(t){var e=i[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var i=e.elements[t],r=e.attributes[t]||{},s=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});lt(i)&&ot(i)&&(Object.assign(i.style,s),Object.keys(r).forEach(function(t){i.removeAttribute(t)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.name,i=t.options.offset,r=void 0===i?[0,0]:i,s=rt.reduce(function(t,n){return t[n]=function(t,e,n){var i=dt(t),r=[et,G].indexOf(i)>=0?-1:1,s="function"==typeof n?n(Object.assign({},e,{placement:t})):n,o=s[0],a=s[1];return o=o||0,a=(a||0)*r,[et,tt].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}(n,e.rects,r),t},{}),o=s[e.placement],a=o.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=o.x,e.modifiersData.popperOffsets.y+=a),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var r=n.mainAxis,s=void 0===r||r,o=n.altAxis,a=void 0===o||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=void 0===h||h,g=n.allowedAutoPlacements,v=e.options.placement,m=dt(v),y=c||(m!==v&&p?function(t){if("auto"===dt(t))return[];var e=Mt(t);return[qt(t),e,qt(e)]}(v):[Mt(v)]),b=[v].concat(y).reduce(function(t,n){return t.concat("auto"===dt(n)?Qt(e,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:p,allowedAutoPlacements:g}):n)},[]),w=e.rects.reference,E=e.rects.popper,x=new Map,L=!0,O=b[0],k=0;k<b.length;k++){var _=b[k],A=dt(_),P="start"===Pt(_),C=[G,$].indexOf(A)>=0,S=C?"width":"height",T=Nt(e,{placement:_,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),D=C?P?tt:et:P?$:G;w[S]>E[S]&&(D=Mt(D));var M=Mt(D),j=[];if(s&&j.push(T[A]<=0),a&&j.push(T[D]<=0,T[M]<=0),j.every(function(t){return t})){O=_,L=!1;break}x.set(_,j)}if(L)for(var q=function(t){var e=b.find(function(e){var n=x.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return O=e,"break"},I=p?3:1;I>0&&"break"!==q(I);I--);e.placement!==O&&(e.modifiersData[i]._skip=!0,e.placement=O,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,r=n.mainAxis,s=void 0===r||r,o=n.altAxis,a=void 0!==o&&o,c=n.tether,l=void 0===c||c,u=n.tetherOffset,d=void 0===u?0:u,f=Nt(e,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),h=dt(e.placement),p=Pt(e.placement),g=!p,v=Ot(h),m="x"===v?"y":"x",y=e.modifiersData.popperOffsets,b=e.rects.reference,w=e.rects.popper,E="function"==typeof d?d(Object.assign({},e.rects,{placement:e.placement})):d,x="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),L=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,O={x:0,y:0};if(y){if(s){var k,_="y"===v?G:et,A="y"===v?$:tt,P="y"===v?"height":"width",C=y[v],S=C+f[_],T=C-f[A],D=l?-w[P]/2:0,M="start"===p?b[P]:w[P],j="start"===p?-w[P]:-b[P],q=e.elements.arrow,I=l&&q?vt(q):{width:0,height:0},F=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=F[_],V=F[A],K=kt(0,b[P],I[P]),W=g?b[P]/2-D-K-B-x.mainAxis:M-K-B-x.mainAxis,R=g?-b[P]/2+D+K+V+x.mainAxis:j+K+V+x.mainAxis,H=e.elements.arrow&&Lt(e.elements.arrow),N=null!=(k=null==L?void 0:L[v])?k:0,Q=C+R-N,z=kt(l?ht(S,C+W-N-(H?"y"===v?H.clientTop||0:H.clientLeft||0:0)):S,C,l?ft(T,Q):T);y[v]=z,O[v]=z-C}if(a){var U,J=y[m],X="y"===m?"height":"width",Y=J+f["x"===v?G:et],Z=J-f["x"===v?$:tt],nt=-1!==[G,et].indexOf(h),it=null!=(U=null==L?void 0:L[m])?U:0,rt=nt?Y:J-b[X]-w[X]-it+x.altAxis,st=nt?J+b[X]+w[X]-it-x.altAxis:Z,ot=l&&nt?function(t,e,n){var i=kt(t,e,n);return i>n?n:i}(rt,J,st):kt(l?rt:Y,J,l?st:Z);y[m]=ot,O[m]=ot-J}e.modifiersData[i]=O}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,r=t.options,s=n.elements.arrow,o=n.modifiersData.popperOffsets,a=dt(n.placement),c=Ot(a),l=[et,tt].indexOf(a)>=0?"height":"width";if(s&&o){var u=function(t,e){return _t("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:At(t,nt))}(r.padding,n),d=vt(s),f="y"===c?G:et,h="y"===c?$:tt,p=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],g=o[c]-n.rects.reference[c],v=Lt(s),m=v?"y"===c?v.clientHeight||0:v.clientWidth||0:0,y=m/2-d[l]/2+(p/2-g/2),b=kt(u[f],y,m-d[l]-u[h]);n.modifiersData[i]=((e={})[c]=b,e.centerOffset=b-y,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&mt(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,s=e.modifiersData.preventOverflow,o=Nt(e,{elementContext:"reference"}),a=Nt(e,{altBoundary:!0}),c=zt(o,i),l=zt(a,r,s),u=Ut(c),d=Ut(l);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]});function te(t,e){if(!e&&!(e=function(t,e){var n=t.getAttribute("data-"+e.dataTrigger).trim();return n?document.querySelector("[data-"+e.dataPopover+'="'+n+'"]'):!(!t.nextElementSibling||!t.nextElementSibling.hasAttribute("data-"+e.dataPopover))&&t.nextElementSibling}(t,this.settings)))return console.error("No popover associated with the provided trigger:",t),!1;var n,i=this.collection.findIndex(function(n){return n.trigger===t&&n.target===e});if(i>=0)n=this.collection[i];else{var r=$t(t,e);n={state:"closed",trigger:t,target:e,popper:r,config:J(e,this.settings)},this.collection.push(n)}return ne.call(this,n),n.target.classList.contains(this.settings.stateActive)?(this.open(n),U.call(this,n)):this.close(n),n}function ee(t){var e=this.collection.findIndex(function(e){return e.trigger===t.trigger&&e.target===t.target});return e>=0&&("opened"===t.state&&this.close(t),t.popper.destroy(),ie(t),this.collection.splice(e,1)),this.collection}function ne(t){return t.__eventListeners||("hover"===X(t.target,this.settings.dataEventType,t.config.event)?(t.__eventListeners=[{el:["trigger"],type:["mouseenter","focus"],listener:Z.bind(this,t)},{el:["trigger","target"],type:["mouseleave","focusout"],listener:N.bind(this,t)}],t.__eventListeners.forEach(function(e){e.el.forEach(function(n){e.type.forEach(function(i){t[n].addEventListener(i,e.listener,!1)})})})):(t.__eventListeners=[{el:["trigger"],type:["click"],listener:Q.bind(this,t)}],t.__eventListeners.forEach(function(e){e.el.forEach(function(n){e.type.forEach(function(i){t[n].addEventListener(i,e.listener,!1)})})}))),t}function ie(t){return t.__eventListeners&&(t.__eventListeners.forEach(function(e){e.el.forEach(function(n){e.type.forEach(function(i){t[n].removeEventListener(i,e.listener,!1)})})}),delete t.__eventListeners),t}function re(){var t=this;return document.querySelectorAll("[data-"+this.settings.dataTrigger+"]").forEach(function(e){t.register(e,!1)}),this.collection}function se(){for(;this.collection.length>0;)this.deregister(this.collection[0]);return this.collection}var oe=/*#__PURE__*/function(){function t(t){this.defaults=W,this.settings=g({},this.defaults,t),this.collection=[],this.memory={trigger:null},this.__handlerKeydown=z.bind(this),this.settings.autoInit&&this.init()}var e=t.prototype;return e.init=function(t){void 0===t&&(t=null),t&&(this.settings=g({},this.settings,t)),this.registerCollection(),this.settings.eventListeners&&this.initEventListeners(!1)},e.destroy=function(){this.deregisterCollection(),this.settings.eventListeners&&this.destroyEventListeners(!1)},e.initEventListeners=function(t){var e=this;void 0===t&&(t=!0),t&&this.collection.forEach(function(t){ne.call(e,t)}),document.addEventListener("keydown",this.__handlerKeydown,!1)},e.destroyEventListeners=function(t){void 0===t&&(t=!0),t&&this.collection.forEach(function(t){ie(t)}),document.removeEventListener("keydown",this.__handlerKeydown,!1)},e.register=function(t,e){return void 0===e&&(e=!1),te.call(this,t,e)},e.deregister=function(t){return ee.call(this,t)},e.registerCollection=function(){return re.call(this)},e.deregisterCollection=function(){return se.call(this)},e.open=function(t){return Z.call(this,t)},e.close=function(t){return R.call(this,t)},e.closeAll=function(){return H.call(this)},t}();export{m as Checkbox,T as Drawer,K as Modal,oe as Popover,p as core};
|
|
2
2
|
//# sourceMappingURL=scripts.esm.js.map
|