import{r as t,h as r,g as i,c as e,H as n}from"./p-c063aff1.js";import{L as o,a as s}from"./p-f286a346.js";import{f as a,O as h}from"./p-9158fc11.js";import{d as u,T as f}from"./p-6cd35191.js";import{c,g as l}from"./p-284c5358.js";import{S as d,T as p}from"./p-d997ff1d.js";const v=class{constructor(r){t(this,r)}static get style(){return"anj-arrow,anj-arrow:after{position:absolute;display:block;font-size:.975rem;width:0;height:0;border-color:transparent;border-style:solid}anj-arrow{border-bottom-color:var(--anj-border-dark);border-width:11px;border-top-width:0}anj-arrow:after{border-width:10px;border-top-width:0;border-bottom-color:var(--anj-light);content:\"\";top:1px;margin-left:-10px}"}},m=class{constructor(r){t(this,r),this.locale="en-US"}getLanguage(){const t=this.element.getAttribute("lang")?this.element:this.element.closest("[lang]");return t?t.getAttribute("lang"):this.locale.split("-")[0]}getDateFormat(){if(!this.locale)return"dd/MM/yyyy";let t=d[this.locale];if(!t){const r=Object.keys(d).find(t=>t.includes(this.locale));t=r?d[r]:"dd/MM/yyyy"}return t}getDictionary(){return this.dictionary?this.dictionary:p[this.getLanguage()]||p.en}translateFactory(t){return(r,i={})=>{if(!t[r])return r;let e=t[r];Object.keys(i).forEach(t=>{const r=new RegExp(`{${t}}`,"g");e=e.replace(r,i[t])});const n=new RegExp("\\{([^}]+)\\}","g"),o=new RegExp("\\s{2,}","g");return e=e.replace(n,"").replace(o," ").trim(),e}}componentWillLoad(){this.render()}render(){const t=this.getLanguage(),i={dictionary:this.getDictionary(),dateFormat:this.getDateFormat(),dateFormatter:Intl.DateTimeFormat(this.locale).format,datetimeFormatter:Intl.DateTimeFormat(this.locale,u).format,language:t,locale:this.locale,numberFormatter:Intl.NumberFormat(this.locale).format,timezoneOverride:this.timezone,translator:this.translateFactory(this.getDictionary())};return r(f.Provider,{state:i},r("slot",null))}get element(){return i(this)}},g=class{constructor(r){t(this,r),this.observer=new MutationObserver(this.onChange.bind(this)),this.incattrs=!0,this.debounce=0,this.anjContentChange=e(this,"anjContentChange",7)}connectedCallback(){this.debounce&&(this.anjContentChange=a(this.anjContentChange,this.debounce)),this.observer.observe(this.element,{attributes:this.incattrs,childList:!0,subtree:!0})}disconnectedCallback(){this.observer.disconnect()}onChange(t){this.anjContentChange.emit(t)}get element(){return i(this)}};for(
/**!
 * @fileOverview Kickass library to create and place poppers near their reference elements.
 * @version 1.14.7
 * @license
 * Copyright (c) 2016 Federico Zivolo and contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
var b="undefined"!=typeof window&&"undefined"!=typeof document,w=["Edge","Trident","Firefox"],y=0,j=0;j<w.length;j+=1)if(b&&navigator.userAgent.indexOf(w[j])>=0){y=1;break}var O=b&&window.Promise?function(t){var r=!1;return function(){r||(r=!0,window.Promise.resolve().then((function(){r=!1,t()})))}}:function(t){var r=!1;return function(){r||(r=!0,setTimeout((function(){r=!1,t()}),y))}};function L(t){return t&&"[object Function]"==={}.toString.call(t)}function M(t,r){if(1!==t.nodeType)return[];var i=t.ownerDocument.defaultView.getComputedStyle(t,null);return r?i[r]:i}function T(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function F(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var r=M(t);return/(auto|scroll|overlay)/.test(r.overflow+r.overflowY+r.overflowX)?t:F(T(t))}var k=b&&!(!window.MSInputMethodContext||!document.documentMode),x=b&&/MSIE 10/.test(navigator.userAgent);function D(t){return 11===t?k:10===t?x:k||x}function E(t){if(!t)return document.documentElement;for(var r=D(10)?document.body:null,i=t.offsetParent||null;i===r&&t.nextElementSibling;)i=(t=t.nextElementSibling).offsetParent;var e=i&&i.nodeName;return e&&"BODY"!==e&&"HTML"!==e?-1!==["TH","TD","TABLE"].indexOf(i.nodeName)&&"static"===M(i,"position")?E(i):i:t?t.ownerDocument.documentElement:document.documentElement}function H(t){return null!==t.parentNode?H(t.parentNode):t}function S(t,r){if(!(t&&t.nodeType&&r&&r.nodeType))return document.documentElement;var i=t.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING,e=i?t:r,n=i?r:t,o=document.createRange();o.setStart(e,0),o.setEnd(n,0);var s,a,h=o.commonAncestorContainer;if(t!==h&&r!==h||e.contains(n))return"BODY"===(a=(s=h).nodeName)||"HTML"!==a&&E(s.firstElementChild)!==s?E(h):h;var u=H(t);return u.host?S(u.host,r):S(t,H(r).host)}function C(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",i="top"===r?"scrollTop":"scrollLeft",e=t.nodeName;if("BODY"===e||"HTML"===e){var n=t.ownerDocument.documentElement,o=t.ownerDocument.scrollingElement||n;return o[i]}return t[i]}function A(t,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e=C(r,"top"),n=C(r,"left"),o=i?-1:1;return t.top+=e*o,t.bottom+=e*o,t.left+=n*o,t.right+=n*o,t}function W(t,r){var i="x"===r?"Left":"Top",e="Left"===i?"Right":"Bottom";return parseFloat(t["border"+i+"Width"],10)+parseFloat(t["border"+e+"Width"],10)}function B(t,r,i,e){return Math.max(r["offset"+t],r["scroll"+t],i["client"+t],i["offset"+t],i["scroll"+t],D(10)?parseInt(i["offset"+t])+parseInt(e["margin"+("Height"===t?"Top":"Left")])+parseInt(e["margin"+("Height"===t?"Bottom":"Right")]):0)}function P(t){var r=t.body,i=t.documentElement,e=D(10)&&getComputedStyle(i);return{height:B("Height",r,i,e),width:B("Width",r,i,e)}}var Y=function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")},_=function(){function t(t,r){for(var i=0;i<r.length;i++){var e=r[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}return function(r,i,e){return i&&t(r.prototype,i),e&&t(r,e),r}}(),I=function(t,r,i){return r in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t},R=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t};function N(t){return R({},t,{right:t.left+t.width,bottom:t.top+t.height})}function z(t){var r={};try{if(D(10)){r=t.getBoundingClientRect();var i=C(t,"top"),e=C(t,"left");r.top+=i,r.left+=e,r.bottom+=i,r.right+=e}else r=t.getBoundingClientRect()}catch(u){}var n={left:r.left,top:r.top,width:r.right-r.left,height:r.bottom-r.top},o="HTML"===t.nodeName?P(t.ownerDocument):{},s=t.offsetWidth-(o.width||t.clientWidth||n.right-n.left),a=t.offsetHeight-(o.height||t.clientHeight||n.bottom-n.top);if(s||a){var h=M(t);s-=W(h,"x"),a-=W(h,"y"),n.width-=s,n.height-=a}return N(n)}function q(t,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e=D(10),n="HTML"===r.nodeName,o=z(t),s=z(r),a=F(t),h=M(r),u=parseFloat(h.borderTopWidth,10),f=parseFloat(h.borderLeftWidth,10);i&&n&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var c=N({top:o.top-s.top-u,left:o.left-s.left-f,width:o.width,height:o.height});if(c.marginTop=0,c.marginLeft=0,!e&&n){var l=parseFloat(h.marginTop,10),d=parseFloat(h.marginLeft,10);c.top-=u-l,c.bottom-=u-l,c.left-=f-d,c.right-=f-d,c.marginTop=l,c.marginLeft=d}return(e&&!i?r.contains(a):r===a&&"BODY"!==a.nodeName)&&(c=A(c,r)),c}function G(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.ownerDocument.documentElement,e=q(t,i),n=Math.max(i.clientWidth,window.innerWidth||0),o=Math.max(i.clientHeight,window.innerHeight||0),s=r?0:C(i),a=r?0:C(i,"left"),h={top:s-e.top+e.marginTop,left:a-e.left+e.marginLeft,width:n,height:o};return N(h)}function U(t){var r=t.nodeName;if("BODY"===r||"HTML"===r)return!1;if("fixed"===M(t,"position"))return!0;var i=T(t);return!!i&&U(i)}function X(t){if(!t||!t.parentElement||D())return document.documentElement;for(var r=t.parentElement;r&&"none"===M(r,"transform");)r=r.parentElement;return r||document.documentElement}function K(t,r,i,e){var n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},s=n?X(t):S(t,r);if("viewport"===e)o=G(s,n);else{var a=void 0;"scrollParent"===e?"BODY"===(a=F(T(r))).nodeName&&(a=t.ownerDocument.documentElement):a="window"===e?t.ownerDocument.documentElement:e;var h=q(a,s,n);if("HTML"!==a.nodeName||U(s))o=h;else{var u=P(t.ownerDocument),f=u.height,c=u.width;o.top+=h.top-h.marginTop,o.bottom=f+h.top,o.left+=h.left-h.marginLeft,o.right=c+h.left}}var l="number"==typeof(i=i||0);return o.left+=l?i:i.left||0,o.top+=l?i:i.top||0,o.right-=l?i:i.right||0,o.bottom-=l?i:i.bottom||0,o}function $(t){return t.width*t.height}function J(t,r,i,e,n){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var s=K(i,e,o,n),a={top:{width:s.width,height:r.top-s.top},right:{width:s.right-r.right,height:s.height},bottom:{width:s.width,height:s.bottom-r.bottom},left:{width:r.left-s.left,height:s.height}},h=Object.keys(a).map((function(t){return R({key:t},a[t],{area:$(a[t])})})).sort((function(t,r){return r.area-t.area})),u=h.filter((function(t){return t.width>=i.clientWidth&&t.height>=i.clientHeight})),f=u.length>0?u[0].key:h[0].key,c=t.split("-")[1];return f+(c?"-"+c:"")}function Q(t,r,i){var e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=e?X(r):S(r,i);return q(i,n,e)}function V(t){var r=t.ownerDocument.defaultView.getComputedStyle(t),i=parseFloat(r.marginTop||0)+parseFloat(r.marginBottom||0),e=parseFloat(r.marginLeft||0)+parseFloat(r.marginRight||0);return{width:t.offsetWidth+e,height:t.offsetHeight+i}}function Z(t){var r={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return r[t]}))}function tt(t,r,i){i=i.split("-")[0];var e=V(t),n={width:e.width,height:e.height},o=-1!==["right","left"].indexOf(i),s=o?"top":"left",a=o?"left":"top",h=o?"height":"width",u=o?"width":"height";return n[s]=r[s]+r[h]/2-e[h]/2,n[a]=i===a?r[a]-e[u]:r[Z(a)],n}function rt(t,r){return Array.prototype.find?t.find(r):t.filter(r)[0]}function it(t,r,i){return(void 0===i?t:t.slice(0,function(t,r,i){if(Array.prototype.findIndex)return t.findIndex((function(t){return t.name===i}));var e=rt(t,(function(t){return t.name===i}));return t.indexOf(e)}(t,0,i))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=t.function||t.fn;t.enabled&&L(i)&&(r.offsets.popper=N(r.offsets.popper),r.offsets.reference=N(r.offsets.reference),r=i(r,t))})),r}function et(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=Q(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=J(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=tt(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=it(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function nt(t,r){return t.some((function(t){return t.enabled&&t.name===r}))}function ot(t){for(var r=[!1,"ms","Webkit","Moz","O"],i=t.charAt(0).toUpperCase()+t.slice(1),e=0;e<r.length;e++){var n=r[e],o=n?""+n+i:t;if(void 0!==document.body.style[o])return o}return null}function st(){return this.state.isDestroyed=!0,nt(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[ot("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function at(t){var r=t.ownerDocument;return r?r.defaultView:window}function ht(){this.state.eventsEnabled||(this.state=function(t,r,i,e){i.updateBound=e,at(t).addEventListener("resize",i.updateBound,{passive:!0});var n=F(t);return function t(r,i,e,n){var o="BODY"===r.nodeName,s=o?r.ownerDocument.defaultView:r;s.addEventListener(i,e,{passive:!0}),o||t(F(s.parentNode),i,e,n),n.push(s)}(n,"scroll",i.updateBound,i.scrollParents),i.scrollElement=n,i.eventsEnabled=!0,i}(this.reference,0,this.state,this.scheduleUpdate))}function ut(){var t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.state,at(this.reference).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(r){r.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function ft(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function ct(t,r){Object.keys(r).forEach((function(i){var e="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&ft(r[i])&&(e="px"),t.style[i]=r[i]+e}))}var lt=b&&/Firefox/i.test(navigator.userAgent);function dt(t,r,i){var e=rt(t,(function(t){return t.name===r})),n=!!e&&t.some((function(t){return t.name===i&&t.enabled&&t.order<e.order}));if(!n){var o="`"+r+"`";console.warn("`"+i+"` modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return n}var pt=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],vt=pt.slice(3);function mt(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=vt.indexOf(t),e=vt.slice(i+1).concat(vt.slice(0,i));return r?e.reverse():e}var gt={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var r=t.placement,i=r.split("-")[0],e=r.split("-")[1];if(e){var n=t.offsets,o=n.reference,s=n.popper,a=-1!==["bottom","top"].indexOf(i),h=a?"left":"top",u=a?"width":"height",f={start:I({},h,o[h]),end:I({},h,o[h]+o[u]-s[u])};t.offsets.popper=R({},s,f[e])}return t}},offset:{order:200,enabled:!0,fn:function(t,r){var i,e=r.offset,n=t.offsets,o=n.popper,s=n.reference,a=t.placement.split("-")[0];return i=ft(+e)?[+e,0]:function(t,r,i,e){var n=[0,0],o=-1!==["right","left"].indexOf(e),s=t.split(/(\+|\-)/).map((function(t){return t.trim()})),a=s.indexOf(rt(s,(function(t){return-1!==t.search(/,|\s/)})));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var h=/\s*,\s*|\s+/,u=-1!==a?[s.slice(0,a).concat([s[a].split(h)[0]]),[s[a].split(h)[1]].concat(s.slice(a+1))]:[s];return(u=u.map((function(t,e){var n=(1===e?!o:o)?"height":"width",s=!1;return t.reduce((function(t,r){return""===t[t.length-1]&&-1!==["+","-"].indexOf(r)?(t[t.length-1]=r,s=!0,t):s?(t[t.length-1]+=r,s=!1,t):t.concat(r)}),[]).map((function(t){return function(t,r,i,e){var n=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+n[1],s=n[2];if(!o)return t;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=i;break;case"%":case"%r":default:a=e}return N(a)[r]/100*o}return"vh"===s||"vw"===s?("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o:o}(t,n,r,i)}))}))).forEach((function(t,r){t.forEach((function(i,e){ft(i)&&(n[r]+=i*("-"===t[e-1]?-1:1))}))})),n}(e,o,s,a),"left"===a?(o.top+=i[0],o.left-=i[1]):"right"===a?(o.top+=i[0],o.left+=i[1]):"top"===a?(o.left+=i[0],o.top-=i[1]):"bottom"===a&&(o.left+=i[0],o.top+=i[1]),t.popper=o,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,r){var i=r.boundariesElement||E(t.instance.popper);t.instance.reference===i&&(i=E(i));var e=ot("transform"),n=t.instance.popper.style,o=n.top,s=n.left,a=n[e];n.top="",n.left="",n[e]="";var h=K(t.instance.popper,t.instance.reference,r.padding,i,t.positionFixed);n.top=o,n.left=s,n[e]=a,r.boundaries=h;var u=t.offsets.popper,f={primary:function(t){var i=u[t];return u[t]<h[t]&&!r.escapeWithReference&&(i=Math.max(u[t],h[t])),I({},t,i)},secondary:function(t){var i="right"===t?"left":"top",e=u[i];return u[t]>h[t]&&!r.escapeWithReference&&(e=Math.min(u[i],h[t]-("right"===t?u.width:u.height))),I({},i,e)}};return r.priority.forEach((function(t){var r=-1!==["left","top"].indexOf(t)?"primary":"secondary";u=R({},u,f[r](t))})),t.offsets.popper=u,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var r=t.offsets,i=r.popper,e=r.reference,n=t.placement.split("-")[0],o=Math.floor,s=-1!==["top","bottom"].indexOf(n),a=s?"right":"bottom",h=s?"left":"top",u=s?"width":"height";return i[a]<o(e[h])&&(t.offsets.popper[h]=o(e[h])-i[u]),i[h]>o(e[a])&&(t.offsets.popper[h]=o(e[a])),t}},arrow:{order:500,enabled:!0,fn:function(t,r){var i;if(!dt(t.instance.modifiers,"arrow","keepTogether"))return t;var e=r.element;if("string"==typeof e){if(!(e=t.instance.popper.querySelector(e)))return t}else if(!t.instance.popper.contains(e))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var n=t.placement.split("-")[0],o=t.offsets,s=o.popper,a=o.reference,h=-1!==["left","right"].indexOf(n),u=h?"height":"width",f=h?"Top":"Left",c=f.toLowerCase(),l=h?"left":"top",d=h?"bottom":"right",p=V(e)[u];a[d]-p<s[c]&&(t.offsets.popper[c]-=s[c]-(a[d]-p)),a[c]+p>s[d]&&(t.offsets.popper[c]+=a[c]+p-s[d]),t.offsets.popper=N(t.offsets.popper);var v=a[c]+a[u]/2-p/2,m=M(t.instance.popper),g=parseFloat(m["margin"+f],10),b=parseFloat(m["border"+f+"Width"],10),w=v-t.offsets.popper[c]-g-b;return w=Math.max(Math.min(s[u]-p,w),0),t.arrowElement=e,t.offsets.arrow=(I(i={},c,Math.round(w)),I(i,l,""),i),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,r){if(nt(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var i=K(t.instance.popper,t.instance.reference,r.padding,r.boundariesElement,t.positionFixed),e=t.placement.split("-")[0],n=Z(e),o=t.placement.split("-")[1]||"",s=[];switch(r.behavior){case"flip":s=[e,n];break;case"clockwise":s=mt(e);break;case"counterclockwise":s=mt(e,!0);break;default:s=r.behavior}return s.forEach((function(a,h){if(e!==a||s.length===h+1)return t;e=t.placement.split("-")[0],n=Z(e);var u=t.offsets.popper,f=t.offsets.reference,c=Math.floor,l="left"===e&&c(u.right)>c(f.left)||"right"===e&&c(u.left)<c(f.right)||"top"===e&&c(u.bottom)>c(f.top)||"bottom"===e&&c(u.top)<c(f.bottom),d=c(u.left)<c(i.left),p=c(u.right)>c(i.right),v=c(u.top)<c(i.top),m=c(u.bottom)>c(i.bottom),g="left"===e&&d||"right"===e&&p||"top"===e&&v||"bottom"===e&&m,b=-1!==["top","bottom"].indexOf(e),w=!!r.flipVariations&&(b&&"start"===o&&d||b&&"end"===o&&p||!b&&"start"===o&&v||!b&&"end"===o&&m);(l||g||w)&&(t.flipped=!0,(l||g)&&(e=s[h+1]),w&&(o=function(t){return"end"===t?"start":"start"===t?"end":t}(o)),t.placement=e+(o?"-"+o:""),t.offsets.popper=R({},t.offsets.popper,tt(t.instance.popper,t.offsets.reference,t.placement)),t=it(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(t){var r=t.placement,i=r.split("-")[0],e=t.offsets,n=e.popper,o=e.reference,s=-1!==["left","right"].indexOf(i),a=-1===["top","left"].indexOf(i);return n[s?"left":"top"]=o[i]-(a?n[s?"width":"height"]:0),t.placement=Z(r),t.offsets.popper=N(n),t}},hide:{order:800,enabled:!0,fn:function(t){if(!dt(t.instance.modifiers,"hide","preventOverflow"))return t;var r=t.offsets.reference,i=rt(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(r.bottom<i.top||r.left>i.right||r.top>i.bottom||r.right<i.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,r){var i=r.x,e=r.y,n=t.offsets.popper,o=rt(t.instance.modifiers,(function(t){return"applyStyle"===t.name})).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s,a,h=void 0!==o?o:r.gpuAcceleration,u=E(t.instance.popper),f=z(u),c={position:n.position},l=function(t,r){var i=t.offsets,e=i.popper,n=Math.round,o=Math.floor,s=function(t){return t},a=n(i.reference.width),h=n(e.width),u=-1!==["left","right"].indexOf(t.placement),f=-1!==t.placement.indexOf("-"),c=r?u||f||a%2==h%2?n:o:s,l=r?n:s;return{left:c(a%2==1&&h%2==1&&!f&&r?e.left-1:e.left),top:l(e.top),bottom:l(e.bottom),right:c(e.right)}}(t,window.devicePixelRatio<2||!lt),d="bottom"===i?"top":"bottom",p="right"===e?"left":"right",v=ot("transform");if(a="bottom"===d?"HTML"===u.nodeName?-u.clientHeight+l.bottom:-f.height+l.bottom:l.top,s="right"===p?"HTML"===u.nodeName?-u.clientWidth+l.right:-f.width+l.right:l.left,h&&v)c[v]="translate3d("+s+"px, "+a+"px, 0)",c[d]=0,c[p]=0,c.willChange="transform";else{var m="right"===p?-1:1;c[d]=a*("bottom"===d?-1:1),c[p]=s*m,c.willChange=d+", "+p}return t.attributes=R({},{"x-placement":t.placement},t.attributes),t.styles=R({},c,t.styles),t.arrowStyles=R({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var r,i;return ct(t.instance.popper,t.styles),r=t.instance.popper,i=t.attributes,Object.keys(i).forEach((function(t){!1!==i[t]?r.setAttribute(t,i[t]):r.removeAttribute(t)})),t.arrowElement&&Object.keys(t.arrowStyles).length&&ct(t.arrowElement,t.arrowStyles),t},onLoad:function(t,r,i,e,n){var o=Q(n,r,t,i.positionFixed),s=J(i.placement,o,r,t,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return r.setAttribute("x-placement",s),ct(r,{position:i.positionFixed?"fixed":"absolute"}),i},gpuAcceleration:void 0}}},bt=function(){function t(r,i){var e=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Y(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(e.update)},this.update=O(this.update.bind(this)),this.options=R({},t.Defaults,n),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=r&&r.jquery?r[0]:r,this.popper=i&&i.jquery?i[0]:i,this.options.modifiers={},Object.keys(R({},t.Defaults.modifiers,n.modifiers)).forEach((function(r){e.options.modifiers[r]=R({},t.Defaults.modifiers[r]||{},n.modifiers?n.modifiers[r]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return R({name:t},e.options.modifiers[t])})).sort((function(t,r){return t.order-r.order})),this.modifiers.forEach((function(t){t.enabled&&L(t.onLoad)&&t.onLoad(e.reference,e.popper,e.options,t,e.state)})),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return _(t,[{key:"update",value:function(){return et.call(this)}},{key:"destroy",value:function(){return st.call(this)}},{key:"enableEventListeners",value:function(){return ht.call(this)}},{key:"disableEventListeners",value:function(){return ut.call(this)}}]),t}();bt.Utils=("undefined"!=typeof window?window:global).PopperUtils,bt.placements=pt,bt.Defaults=gt;const wt=class{constructor(r){t(this,r),this.isChildOverlay=!1,this.clickObserver=t=>this.onClick(t),this.active=!1,this.showing=!1,this.dismiss="explicit",this.scrollable=!1,this.nested=!1,this.offset="0, 0",this.placement="top",this.trapFocus=!1,this.anjWillOpen=e(this,"anjWillOpen",7),this.anjDidOpen=e(this,"anjDidOpen",7),this.anjWillDismiss=e(this,"anjWillDismiss",7),this.anjDidDismiss=e(this,"anjDidDismiss",7)}componentWillLoad(){this.parentEl=this.element.parentElement,this.bodyEl=this.element.ownerDocument.body,this.scrollParentEl=this.getScrollParentEl()}disconnectedCallback(){this.bodyEl&&!this.isChildOverlay&&this.bodyEl.removeEventListener("click",this.clickObserver),this._popper&&(this._popper.destroy(),this._popper=null)}onChildDismiss(t){t.target!==this.element&&t.stopPropagation()}async onKeyDown(t){if(this.trapFocus)if(t.stopPropagation(),"Escape"===t.key){if(this.element.focus(),this.anjWillDismiss.emit(),"auto"===this.dismiss)return this.close()}else"Tab"===t.key&&c(t,this.element)}async onClick(t){const r=t.target,i=r.closest(this.element.tagName);if(r&&!i&&i!==this.element){if(this.anjWillDismiss.emit(),"auto"===this.dismiss)return this.close()}else this.nested&&this.isChildOverlay&&Array.from(i.children||[]).find(t=>t===r)&&this.anjWillDismiss.emit()}async open(t){if(!this.showing&&this.bodyEl)return window.clearTimeout(this.timerClose),this.anjWillOpen.emit(),this.isChildOverlay=this.determineChildOverlay(),this.element.remove(),this.scrollable||this.isChildOverlay||this.bodyEl.classList.add(h),this.scrollParentEl&&this.scrollParentEl.classList.add(h),this.bodyEl.appendChild(this.element),this.active=!0,new Promise(r=>{window.setTimeout(()=>{this._popper=new bt(t,this.element,this.popperOptions()),this.showing=!0,this.bodyEl.addEventListener("mousedown",this.clickObserver,{passive:!0});const i=l(this.element)[0];this.trapFocus&&i&&i.focus(),this.anjDidOpen.emit(),r()},wt.openDelay)})}async close(){return this.showing=!1,this.scrollParentEl&&this.scrollParentEl.classList.remove(h),new Promise(t=>{this.timerClose=window.setTimeout(()=>{this.bodyEl.removeEventListener("click",this.clickObserver,{passive:!0}),this.active=!1,this.element.remove(),this.parentEl.appendChild(this.element),this.anjDidDismiss.emit(),t()},wt.closeDelay)})}async popper(){return Promise.resolve(this._popper)}popperOptions(){return{placement:this.placement,positionFixed:!0,modifiers:{offset:{offset:this.offset}}}}determineChildOverlay(){return!(!this.element.parentElement||!this.element.closest("anj-modal")&&!this.element.parentElement.closest("anj-overlay"))}getScrollParentEl(){return this.element.closest("anj-modal-body")||this.element.ownerDocument.body}render(){return r(n,{class:{"anj-show":this.showing},style:{display:this.active?"block":"none"},tabindex:this.trapFocus?-1:void 0})}get element(){return i(this)}static get style(){return"anj-overlay{display:none;font-size:.875rem;font-family:var(--anj-font-family);font-weight:400;line-height:1.5;outline:none;background-color:var(--anj-light);background-clip:padding-box;border:1px solid var(--anj-border-dark);max-width:300px;opacity:0;position:fixed;-webkit-transition:opacity .2s ease,-webkit-transform .2s ease;transition:opacity .2s ease,-webkit-transform .2s ease;transition:opacity .2s ease,transform .2s ease;transition:opacity .2s ease,transform .2s ease,-webkit-transform .2s ease;z-index:1060}anj-overlay,anj-overlay:after,anj-overlay:before{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none}anj-overlay:active,anj-overlay :active,anj-overlay:focus,anj-overlay :focus{outline:none}\@media (min-width:576px){anj-overlay{max-width:350px}}\@media (min-width:768px){anj-overlay{max-width:500px}}\@media (min-width:992px){anj-overlay{max-width:700px}}anj-overlay.anj-show{opacity:1;-webkit-transition:opacity .2s ease .2s,-webkit-transform .2s ease;transition:opacity .2s ease .2s,-webkit-transform .2s ease;transition:opacity .2s ease .2s,transform .2s ease;transition:opacity .2s ease .2s,transform .2s ease,-webkit-transform .2s ease}anj-overlay[x-placement=bottom]>anj-arrow{left:50%;margin-left:-11px;top:-11px}anj-overlay[x-placement=bottom-end]>anj-arrow{right:1rem;margin-right:-11px;top:-11px}anj-overlay[x-placement=bottom-start]>anj-arrow{left:1rem;margin-left:-11px;top:-11px}anj-overlay[x-placement=left]>anj-arrow{margin-top:-8px;right:-16px;top:50%;-webkit-transform:rotate(90deg);transform:rotate(90deg)}anj-overlay[x-placement=left-end]>anj-arrow{bottom:1rem;margin-top:-8px;right:-16px;-webkit-transform:rotate(90deg);transform:rotate(90deg)}anj-overlay[x-placement=left-start]>anj-arrow{margin-top:-8px;right:-16px;top:1rem;-webkit-transform:rotate(90deg);transform:rotate(90deg)}anj-overlay[x-placement=right]>anj-arrow{left:-16px;margin-top:-8px;top:50%;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}anj-overlay[x-placement=right-end]>anj-arrow{bottom:1rem;left:-16px;margin-top:-8px;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}anj-overlay[x-placement=right-start]>anj-arrow{left:-16px;margin-top:-8px;top:1rem;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}anj-overlay[x-placement=top]>anj-arrow{left:50%;margin-left:-11px;bottom:-11px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}anj-overlay[x-placement=top-end]>anj-arrow{right:1rem;margin-right:-11px;bottom:-11px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}anj-overlay[x-placement=top-start]>anj-arrow{left:1rem;margin-left:-11px;bottom:-11px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.anj-popover{display:block;font-size:.875rem;font-family:var(--anj-font-family);font-weight:400;line-height:1.5;outline:none;-webkit-box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.2);box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.2);font-size:.75rem;min-height:1.5rem;min-width:60px}.anj-popover,.anj-popover:after,.anj-popover:before{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none}.anj-popover:active,.anj-popover :active,.anj-popover:focus,.anj-popover :focus{outline:none}.anj-popover .anj-popover-content{padding:1rem}.anj-dropdown-menu{display:none;font-size:.875rem;font-family:var(--anj-font-family);font-weight:400;line-height:1.5;outline:none;-webkit-box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2);box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2);border-radius:0;background-color:var(--anj-light);z-index:1060;min-width:10rem;text-align:left}.anj-dropdown-menu,.anj-dropdown-menu:after,.anj-dropdown-menu:before{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none}.anj-dropdown-menu:active,.anj-dropdown-menu :active,.anj-dropdown-menu:focus,.anj-dropdown-menu :focus{outline:none}.anj-select-menu{max-width:none}.anj-select-menu[x-placement^=bottom]{border-top:0;-webkit-box-shadow:0 3px 8px -1px var(--anj-shadow);box-shadow:0 3px 8px -1px var(--anj-shadow)}.anj-select-menu[x-placement^=top]{border-bottom:0;-webkit-box-shadow:0 -3px 8px -1px var(--anj-shadow);box-shadow:0 -3px 8px -1px var(--anj-shadow)}"}};wt.openDelay=100,wt.closeDelay=200;const yt=class{constructor(r){t(this,r),this.storeKey="anjState",this.type="session",this.anjStateStoreDidLoad=e(this,"anjStateStoreDidLoad",7)}componentWillLoad(){this.store="local"===this.type?new o:new s}componentDidLoad(){this.anjStateStoreDidLoad.emit()}async get(){return this.store.getItem(this.storeKey)}async set(t){return this.store.setItem(this.storeKey,t)}async clear(){return this.store.removeItem(this.storeKey)}};export{v as anj_arrow,m as anj_locale,g as anj_observer,wt as anj_overlay,yt as anj_state_store};