@bagelink/vue 1.7.67 → 1.7.69

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/dist/index.cjs CHANGED
@@ -182,4 +182,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
182
182
  background: rgba(0, 0, 0, 0.1);
183
183
  cursor: ns-resize;
184
184
  transition: background 0.2s;
185
- `,e.appendChild(o))):o=e,o.addEventListener(`mouseenter`,()=>{o!==e&&(o.style.background=`rgba(0, 0, 0, 0.2)`)}),o.addEventListener(`mouseleave`,()=>{o!==e&&!r&&(o.style.background=`rgba(0, 0, 0, 0.1)`)}),o.style.cursor=`ns-resize`,o.style.userSelect=`none`;function s(e){return{clientY:e,deltaY:e-i,initialHeight:a}}function c(e){return n.gridSize?Math.round(e/n.gridSize)*n.gridSize:e}function l(t){if(!r)return;t.preventDefault();let i=s(`touches`in t?t.touches[0].clientY:t.clientY),l=a+i.deltaY;n.minHeight!==void 0&&(l=Math.max(l,n.minHeight)),n.maxHeight!==void 0&&(l=Math.min(l,n.maxHeight)),l=c(l),e.style.height=`${l}px`,n.onResize&&n.onResize(i),o!==e&&(o.style.background=`rgba(0, 0, 0, 0.3)`)}function u(t){if(!r)return;let i=s(`touches`in t?t.changedTouches[0].clientY:t.clientY);r=!1,document.body.style.cursor=``,document.body.style.userSelect=``,o!==e&&(o.style.background=`rgba(0, 0, 0, 0.1)`),n.onEnd&&n.onEnd(i),document.removeEventListener(`mousemove`,l),document.removeEventListener(`mouseup`,u),document.removeEventListener(`touchmove`,l),document.removeEventListener(`touchend`,u),document.removeEventListener(`touchcancel`,u)}function d(t){t instanceof MouseEvent&&t.button!==0||(t.preventDefault(),r=!0,i=`touches`in t?t.touches[0].clientY:t.clientY,a=e.offsetHeight,n.onStart&&n.onStart(t),document.body.style.cursor=`ns-resize`,document.body.style.userSelect=`none`,document.addEventListener(`mousemove`,l,{passive:!1}),document.addEventListener(`mouseup`,u),document.addEventListener(`touchmove`,l,{passive:!1}),document.addEventListener(`touchend`,u),document.addEventListener(`touchcancel`,u))}o.addEventListener(`mousedown`,d),o.addEventListener(`touchstart`,d,{passive:!1}),e[Mk]=()=>{o!==e&&e.removeChild(o),o.removeEventListener(`mousedown`,d),o.removeEventListener(`touchstart`,d),o.removeEventListener(`mouseenter`,d),o.removeEventListener(`mouseleave`,d),document.removeEventListener(`mousemove`,l),document.removeEventListener(`mouseup`,u),document.removeEventListener(`touchmove`,l),document.removeEventListener(`touchend`,u),document.removeEventListener(`touchcancel`,u)}}const Pk={mounted(e,t){Nk(e,t)},unmounted(e){let t=e[Mk];typeof t==`function`&&(t(),delete e[Mk])},updated(e,t){if(t.value!==t.oldValue){let n=e[Mk];typeof n==`function`&&(n(),delete e[Mk]),Nk(e,t)}}};var Fk={key:0,class:`center`},Ik={key:3},Lk={class:`bgl-lightbox-item`},Rk={key:2,class:`lightbox-pdf`},zk=[`src`,`title`],Bk={key:3,class:`lightbox-file`},Vk={class:`file-info txt-white flex m_block align-items-start gap-025`},Hk={class:`txt-start`},Uk={class:`mx-0 light`},Wk={class:`semi word-break-all`},Gk={class:`mx-0`},Kk={class:`semi`},qk=(0,n.defineComponent)({__name:`Lightbox`,setup(e,{expose:t}){let r=(0,n.ref)(!1),i=(0,n.ref)([]),a=(0,n.ref)(0),o=(0,n.computed)(()=>i.value[a.value]),s=(0,n.ref)(1),c=(0,n.computed)(()=>s.value===1),l=(0,n.computed)(()=>({allowTouchMove:s.value===1,touchRatio:s.value===1?1:0,simulateTouch:s.value===1}));function u(e,t){r.value=!0,i.value=t||[e],a.value=i.value.findIndex(t=>{let n=e.src!==void 0&&e.src!==null&&e.src!==``&&t.src===e.src,r=e.pathKey!==void 0&&e.pathKey!==null&&e.pathKey!==``&&t.pathKey===e.pathKey;return n||r}),a.value===-1&&(a.value=0),s.value=1,document.addEventListener(`keydown`,p)}function d(){r.value=!1,document.removeEventListener(`keydown`,p)}function f(e){a.value=e,s.value=1}(0,n.watch)(()=>r.value,e=>{e?document.body.style.overflow=`hidden`:document.body.style.overflow=``}),(0,n.watch)(()=>a.value,()=>{s.value=1});function p(e){e.key===`Escape`&&d()}return t({open:u,close:d}),(e,t)=>((0,n.openBlock)(),(0,n.createBlock)(n.Transition,{name:`fade`},{default:(0,n.withCtx)(()=>[r.value?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:0,class:`bgl-lightbox-overlay`,onKeydown:(0,n.withKeys)(d,[`esc`])},[(0,n.createElementVNode)(`div`,{class:`flex start w-100 space-between p-025 z-9`,onClick:d},[(0,n.createVNode)((0,n.unref)(b),{flat:``,class:`color-white`,icon:`close`,onClick:d}),o.value?.enableZoom&&o.value?.type===`image`?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,Fk,[(0,n.createVNode)((0,n.unref)(b),{flat:``,class:`color-white`,icon:`remove`,disabled:s.value===1,onClick:t[0]||=e=>s.value--},null,8,[`disabled`]),(0,n.createVNode)((0,n.unref)(b),{flat:``,class:`color-white`,icon:`zoom_in`,disabled:s.value===1,onClick:t[1]||=e=>s.value=1},null,8,[`disabled`]),(0,n.createVNode)((0,n.unref)(b),{flat:``,class:`color-white`,icon:`add`,disabled:s.value===3,onClick:t[2]||=e=>s.value++},null,8,[`disabled`])])):(0,n.createCommentVNode)(``,!0),o.value?.openFile&&o.value?.src?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(b),{key:1,class:`color-white`,round:``,thin:``,flat:``,iconEnd:`arrow_outward`,value:`Open File`,href:o.value?.src,target:`_blank`},null,8,[`href`])):(0,n.createCommentVNode)(``,!0),o.value?.download&&o.value?.src?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(b),{key:2,class:`color-white`,round:``,thin:``,flat:``,icon:`download`,value:`Download File`,onClick:t[3]||=e=>(0,n.unref)(Ks)(o.value?.src)})):(0,n.createCommentVNode)(``,!0),!o.value?.openFile&&!o.value?.download?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,Ik)):(0,n.createCommentVNode)(``,!0)]),i.value&&i.value.length>0?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(OO),{key:0,index:a.value,"onUpdate:index":t[6]||=e=>a.value=e,items:i.value,"initial-slide":a.value,class:(0,n.normalizeClass)([`bgl-lightbox-swiper`,{zoomed:s.value>1}]),navigation:i.value.length>1,"grab-cursor":c.value,keyboard:!0,loop:!1,speed:400,"slides-per-view":1,"space-between":0,effect:`slide`,"advanced-options":l.value,onClick:t[7]||=(0,n.withModifiers)(()=>{},[`stop`])},{default:(0,n.withCtx)(({item:e})=>[(0,n.createElementVNode)(`div`,Lk,[e.type===`image`?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(VO),{key:0,zoom:s.value,"onUpdate:zoom":t[4]||=e=>s.value=e,disabled:!e?.enableZoom,"mouse-wheel-to-zoom":!1,"double-click-to-zoom":!0,"max-scale":5,"min-scale":1,"aspect-ratio":0,"limit-translation":!0,onClick:t[5]||=(0,n.withModifiers)(()=>{},[`stop`])},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(pS),{draggable:!1,src:e?.src,alt:`Preview`,class:`lightbox-image`},null,8,[`src`])]),_:2},1032,[`zoom`,`disabled`])):e?.type===`video`&&e?.src?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(tn),{key:1,src:e?.src,autoplay:``,controls:``,class:`lightbox-video`},null,8,[`src`])):e?.type===`pdf`&&e?.src?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,Rk,[(0,n.createElementVNode)(`embed`,{src:(0,n.unref)(zs)(e?.src),type:`application/pdf`,width:`100%`,height:`1080`,title:e?.name},null,8,zk)])):((0,n.openBlock)(),(0,n.createElementBlock)(`div`,Bk,[(0,n.createElementVNode)(`div`,Vk,[(0,n.createVNode)((0,n.unref)($),{class:`m-0 m_none`,icon:`draft`,size:10,weight:`12`}),(0,n.createVNode)((0,n.unref)($),{class:`m-0 none m_block m_-mb-1`,icon:`draft`,size:4,weight:`2`}),(0,n.createElementVNode)(`div`,Hk,[(0,n.createElementVNode)(`p`,Uk,[t[9]||=(0,n.createTextVNode)(` File: `),(0,n.createElementVNode)(`span`,Wk,(0,n.toDisplayString)(e?.name),1)]),(0,n.createElementVNode)(`p`,Gk,[t[10]||=(0,n.createTextVNode)(` Type: `),(0,n.createElementVNode)(`span`,Kk,(0,n.toDisplayString)(e?.type),1)]),(0,n.createVNode)((0,n.unref)(b),{href:e?.src,target:`_blank`,round:``,thin:``,class:`mt-1`,value:`Open file`},null,8,[`href`])])])]))])]),"prev-button":(0,n.withCtx)(({prev:e})=>[(0,n.createVNode)((0,n.unref)(b),{icon:`arrow_back`,color:`black`,onClick:e},null,8,[`onClick`])]),"next-button":(0,n.withCtx)(({next:e})=>[(0,n.createVNode)((0,n.unref)(b),{icon:`arrow_forward`,color:`black`,onClick:e},null,8,[`onClick`])]),_:1},8,[`index`,`items`,`initial-slide`,`class`,`navigation`,`grab-cursor`,`advanced-options`])):(0,n.createCommentVNode)(``,!0),i.value&&i.value.length>1?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:1,class:`lightbox-thumbnails`,onClick:t[8]||=(0,n.withModifiers)(()=>{},[`stop`])},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(i.value,(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:t},[e.type===`image`?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(pS),{key:0,class:(0,n.normalizeClass)([`thumbnail`,{active:a.value===t}]),src:e.src,alt:``,onClick:(0,n.withModifiers)(e=>f(t),[`stop`])},null,8,[`src`,`class`,`onClick`])):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)($),{key:1,class:(0,n.normalizeClass)([`thumbnail thumbnail-icon`,{active:a.value===t}]),icon:`description`,onClick:(0,n.withModifiers)(e=>f(t),[`stop`])},null,8,[`class`,`onClick`]))],64))),128))])):(0,n.createCommentVNode)(``,!0)],32)):(0,n.createCommentVNode)(``,!0)]),_:1}))}}),Jk=qk,Yk={},Xk=e=>void 0,Zk={mounted(e,t){Qk(eA(t,e)),Xk=n=>{$k(n,e,t)},e.addEventListener(`click`,Xk)},updated(e,t){Qk(eA(t,e)),e.removeEventListener(`click`,Xk),Xk=n=>{$k(n,e,t)},e.addEventListener(`click`,Xk)},unmounted(e){e.removeEventListener(`click`,Xk)}};function Qk(e){e.group&&(Yk[e.group]||(Yk[e.group]=[]),Yk[e.group].findIndex(t=>t.src===e.src)===-1&&Yk[e.group].push(e))}function $k(e,t,n){e.stopPropagation();let r=eA(n,t),i=oA();if(!i||!i.open)return;let a=i.open;a(r,r&&r.group?Yk[r.group]:void 0)}function eA(e,t){let{group:n,src:r,type:i,name:a,thumbnail:o,enableZoom:s,openFile:c,download:l,pathKey:u}=e.value||{};return r=Hs(r||u)||e.value||t.getAttribute(`src`)||``,i||=iA(r),a=a||rA(r)||t.getAttribute(`alt`)||``,{src:r,type:i,name:a,thumbnail:o,group:n,enableZoom:s,openFile:c,download:l}}var tA=/youtube\.com|youtu\.be/,nA=/vimeo\.com/;function rA(e){return!e||typeof e!=`string`?``:(e.split(`/`).pop()||``).replace(/\.[^/.]+$/,``)}function iA(e){if(typeof e!=`string`||!e)return`unknown`;let t=(e.split(`.`).pop()||``).toLowerCase(),n=e.split(`?`)[0].split(`.`).pop()?.toLowerCase()||``;return sl.test(t)||sl.test(n)?`image`:ll.test(t)||tA.test(e)||nA.test(e)?`video`:[`pdf`].includes(t)?`pdf`:t??`unknown`}var aA;function oA(){if(!aA){let e=document.createElement(`div`);document.body.prepend(e),aA=(0,n.createApp)(Jk).mount(e)}return aA}var sA={install(e){e.directive(`lightbox`,Zk)}},cA=sA,lA={beforeMount(e,t){e.clickOutsideEvent=n=>{e===n.target||e.contains(n.target)||t.value(n)},document.addEventListener(`click`,e.clickOutsideEvent)},unmounted(e){document.removeEventListener(`click`,e.clickOutsideEvent)}};const uA=Symbol(`modal`);var dA=null;function fA(){let e=(0,n.inject)(uA,null);if(!e){if(dA)return dA;throw Error(`Modal API not provided. Make sure ModalPlugin is installed via app.use(ModalPlugin)`)}return e}const pA={install:e=>{let t=(0,n.reactive)([]),r=e=>{e===void 0||e>=t.length-1?t.splice(t.length-1,1):t.splice(e,1)},i=()=>{t.splice(0,t.length)},a=e=>new Promise(r=>{let i=typeof e==`string`?{title:``,message:e}:e;t.push({modalOptions:(0,n.reactive)({...i,resolve:r}),modalType:`confirmModal`,componentSlots:{}})}),o=(e,r,i={})=>{let a=(0,n.reactive)(r);`visible`in a||(a.visible=!0);let o={modalOptions:a,modalType:e,componentSlots:i};return t.push(o),o},s={showModal:(e,t)=>o(`modal`,e,t),showModalForm:(e,t)=>o(`modalForm`,e,t),confirmModal:e=>a(e),hideModal:r,hideAllModals:i};dA||=s,e.provide(uA,s);let c=(0,n.defineComponent)({name:`ModalContainer`,setup(){return{modalStack:t,handleEscape:e=>{e.key===`Escape`&&t.length>0&&t[t.length-1].modalOptions.dismissable!==!1&&r()}}},mounted(){document.addEventListener(`keydown`,this.handleEscape)},unmounted(){document.removeEventListener(`keydown`,this.handleEscape)},render(){return this.modalStack.map((e,t)=>{let i=1e3+t*10;if(!e||!e.modalOptions)return console.error(`[BageLink Modal] Invalid modal in stack:`,e),null;let a={...e.modalOptions,visible:!0,zIndex:i,"onUpdate:visible":()=>{r(t)}};switch(e.modalType){case`modalForm`:return e.modalOptions.schema?(0,n.h)(kw,a,e.componentSlots):(console.error(`[BageLink Modal] ModalForm requires a schema`,e.modalOptions),null);case`confirmModal`:return(0,n.h)(Tw,a,{});default:return(0,n.h)(Sw,a,e.componentSlots)}})}});if(e.component(`ModalContainer`,c),typeof document<`u`&&typeof window<`u`){let t=()=>{if(!document.getElementById(`bagelink-modal-root`)){let t=document.createElement(`div`);t.id=`bagelink-modal-root`,document.body.appendChild(t);let r=(0,n.createApp)(c);r._context=e._context,r.mount(t)}};document.body&&t(),e.mixin({mounted(){this.$root===this&&t()}})}}};var mA=Object.defineProperty,hA=Object.getOwnPropertySymbols,gA=Object.prototype.hasOwnProperty,_A=Object.prototype.propertyIsEnumerable,vA=(e,t,n)=>t in e?mA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yA=(e,t)=>{for(var n in t||={})gA.call(t,n)&&vA(e,n,t[n]);if(hA)for(var n of hA(t))_A.call(t,n)&&vA(e,n,t[n]);return e},bA=e=>typeof e==`function`,xA=e=>typeof e==`string`,SA=e=>xA(e)&&e.trim().length>0,CA=e=>typeof e==`number`,wA=e=>e===void 0,TA=e=>typeof e==`object`&&!!e,EA=e=>MA(e,`tag`)&&SA(e.tag),DA=e=>window.TouchEvent&&e instanceof TouchEvent,OA=e=>MA(e,`component`)&&AA(e.component),kA=e=>bA(e)||TA(e),AA=e=>!wA(e)&&(xA(e)||kA(e)||OA(e)),jA=e=>TA(e)&&[`height`,`width`,`right`,`left`,`top`,`bottom`].every(t=>CA(e[t])),MA=(e,t)=>(TA(e)||bA(e))&&t in e,NA=(e=>()=>e++)(0);function PA(e){return DA(e)?e.targetTouches[0].clientX:e.clientX}function FA(e){return DA(e)?e.targetTouches[0].clientY:e.clientY}var IA=e=>{wA(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},LA=e=>OA(e)?LA(e.component):EA(e)?(0,n.defineComponent)({render(){return e}}):typeof e==`string`?e:(0,n.toRaw)((0,n.unref)(e)),RA=e=>{if(typeof e==`string`)return e;let t=MA(e,`props`)&&TA(e.props)?e.props:{},n=MA(e,`listeners`)&&TA(e.listeners)?e.listeners:{};return{component:LA(e),props:t,listeners:n}},zA=()=>typeof window<`u`,BA=class{constructor(){this.allHandlers={}}getHandlers(e){return this.allHandlers[e]||[]}on(e,t){let n=this.getHandlers(e);n.push(t),this.allHandlers[e]=n}off(e,t){let n=this.getHandlers(e);n.splice(n.indexOf(t)>>>0,1)}emit(e,t){this.getHandlers(e).forEach(e=>e(t))}},VA=e=>[`on`,`off`,`emit`].every(t=>MA(e,t)&&bA(e[t])),HA;(function(e){e.SUCCESS=`success`,e.ERROR=`error`,e.WARNING=`warning`,e.INFO=`info`,e.DEFAULT=`default`})(HA||={});var UA;(function(e){e.TOP_LEFT=`top-left`,e.TOP_CENTER=`top-center`,e.TOP_RIGHT=`top-right`,e.BOTTOM_LEFT=`bottom-left`,e.BOTTOM_CENTER=`bottom-center`,e.BOTTOM_RIGHT=`bottom-right`})(UA||={});var WA;(function(e){e.ADD=`add`,e.DISMISS=`dismiss`,e.UPDATE=`update`,e.CLEAR=`clear`,e.UPDATE_DEFAULTS=`update_defaults`})(WA||={});var GA=`Vue-Toastification`,KA={type:{type:String,default:HA.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},qA={type:KA.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},JA={component:{type:[String,Object,Function,Boolean],default:`button`},classNames:KA.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:`close`}},YA={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},XA={transition:{type:[Object,String],default:`${GA}__bounce`}},ZA={CORE_TOAST:{position:{type:String,default:UA.TOP_RIGHT},draggable:KA.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:KA.trueBoolean,pauseOnHover:KA.trueBoolean,closeOnClick:KA.trueBoolean,timeout:YA.timeout,hideProgressBar:YA.hideProgressBar,toastClassName:KA.classNames,bodyClassName:KA.classNames,icon:qA.customIcon,closeButton:JA.component,closeButtonClassName:JA.classNames,showCloseButtonOnHover:JA.showOnHover,accessibility:{type:Object,default:()=>({toastRole:`alert`,closeButtonLabel:`close`})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new BA}},TOAST:{id:{type:[String,Number],required:!0,default:0},type:KA.type,content:{type:[String,Object,Function],required:!0,default:``},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},CONTAINER:{container:{type:[Object,Function],default:()=>document.body},newestOnTop:KA.trueBoolean,maxToasts:{type:Number,default:20},transition:XA.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:KA.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},PROGRESS_BAR:YA,ICON:qA,TRANSITION:XA,CLOSE_BUTTON:JA},QA=(0,n.defineComponent)({name:`VtProgressBar`,props:ZA.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?`running`:`paused`,opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${GA}__progress-bar`:``}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener(`animationend`,this.animationEnded)},beforeUnmount(){this.$el.removeEventListener(`animationend`,this.animationEnded)},methods:{animationEnded(){this.$emit(`close-toast`)}}});function $A(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,{style:(0,n.normalizeStyle)(e.style),class:(0,n.normalizeClass)(e.cpClass)},null,6)}QA.render=$A;var ej=QA,tj=(0,n.defineComponent)({name:`VtCloseButton`,props:ZA.CLOSE_BUTTON,computed:{buttonComponent(){return this.component===!1?`button`:LA(this.component)},classes(){let e=[`${GA}__close-button`];return this.showOnHover&&e.push(`show-on-hover`),e.concat(this.classNames)}}}),nj=(0,n.createTextVNode)(` × `);function rj(e,t){return(0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.buttonComponent),(0,n.mergeProps)({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:(0,n.withCtx)(()=>[nj]),_:1},16,[`aria-label`,`class`])}tj.render=rj;var ij=tj,aj={},oj={"aria-hidden":`true`,focusable:`false`,"data-prefix":`fas`,"data-icon":`check-circle`,class:`svg-inline--fa fa-check-circle fa-w-16`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},sj=[(0,n.createElementVNode)(`path`,{fill:`currentColor`,d:`M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z`},null,-1)];function cj(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)(`svg`,oj,sj)}aj.render=cj;var lj=aj,uj={},dj={"aria-hidden":`true`,focusable:`false`,"data-prefix":`fas`,"data-icon":`info-circle`,class:`svg-inline--fa fa-info-circle fa-w-16`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},fj=[(0,n.createElementVNode)(`path`,{fill:`currentColor`,d:`M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z`},null,-1)];function pj(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)(`svg`,dj,fj)}uj.render=pj;var mj=uj,hj={},gj={"aria-hidden":`true`,focusable:`false`,"data-prefix":`fas`,"data-icon":`exclamation-circle`,class:`svg-inline--fa fa-exclamation-circle fa-w-16`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},_j=[(0,n.createElementVNode)(`path`,{fill:`currentColor`,d:`M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z`},null,-1)];function vj(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)(`svg`,gj,_j)}hj.render=vj;var yj=hj,bj={},xj={"aria-hidden":`true`,focusable:`false`,"data-prefix":`fas`,"data-icon":`exclamation-triangle`,class:`svg-inline--fa fa-exclamation-triangle fa-w-18`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 576 512`},Sj=[(0,n.createElementVNode)(`path`,{fill:`currentColor`,d:`M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z`},null,-1)];function Cj(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)(`svg`,xj,Sj)}bj.render=Cj;var wj=bj,Tj=(0,n.defineComponent)({name:`VtIcon`,props:ZA.ICON,computed:{customIconChildren(){return MA(this.customIcon,`iconChildren`)?this.trimValue(this.customIcon.iconChildren):``},customIconClass(){return xA(this.customIcon)?this.trimValue(this.customIcon):MA(this.customIcon,`iconClass`)?this.trimValue(this.customIcon.iconClass):``},customIconTag(){return MA(this.customIcon,`iconTag`)?this.trimValue(this.customIcon.iconTag,`i`):`i`},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:AA(this.customIcon)?LA(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[HA.DEFAULT]:mj,[HA.INFO]:mj,[HA.SUCCESS]:lj,[HA.ERROR]:wj,[HA.WARNING]:yj}[this.type]},iconClasses(){let e=[`${GA}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,t=``){return SA(e)?e.trim():t}}});function Ej(e,t){return(0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.component),{class:(0,n.normalizeClass)(e.iconClasses)},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(e.customIconChildren),1)]),_:1},8,[`class`])}Tj.render=Ej;var Dj=(0,n.defineComponent)({name:`VtToast`,components:{ProgressBar:ej,CloseButton:ij,Icon:Tj},inheritAttrs:!1,props:Object.assign({},ZA.CORE_TOAST,ZA.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){let e=[`${GA}__toast`,`${GA}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push(`disable-transition`),this.rtl&&e.push(`${GA}__toast--rtl`),e},bodyClasses(){return[`${GA}__toast-${xA(this.content)?`body`:`component-body`}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:`transform 0.2s, opacity 0.2s`,transform:`translateX(0)`,opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return jA(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:MA,getVueComponentFromObj:LA,closeToast(){this.eventBus.emit(WA.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener(`blur`,this.focusPause),addEventListener(`focus`,this.focusPlay)},focusCleanup(){removeEventListener(`blur`,this.focusPause),removeEventListener(`focus`,this.focusPlay)},draggableSetup(){let e=this.$el;e.addEventListener(`touchstart`,this.onDragStart,{passive:!0}),e.addEventListener(`mousedown`,this.onDragStart),addEventListener(`touchmove`,this.onDragMove,{passive:!1}),addEventListener(`mousemove`,this.onDragMove),addEventListener(`touchend`,this.onDragEnd),addEventListener(`mouseup`,this.onDragEnd)},draggableCleanup(){let e=this.$el;e.removeEventListener(`touchstart`,this.onDragStart),e.removeEventListener(`mousedown`,this.onDragStart),removeEventListener(`touchmove`,this.onDragMove),removeEventListener(`mousemove`,this.onDragMove),removeEventListener(`touchend`,this.onDragEnd),removeEventListener(`mouseup`,this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:PA(e),y:FA(e)},this.dragStart=PA(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&=!1,this.dragPos={x:PA(e),y:FA(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,jA(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),Oj=[`role`];function kj(e,t){let r=(0,n.resolveComponent)(`Icon`),i=(0,n.resolveComponent)(`CloseButton`),a=(0,n.resolveComponent)(`ProgressBar`);return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,{class:(0,n.normalizeClass)(e.classes),style:(0,n.normalizeStyle)(e.draggableStyle),onClick:t[0]||=(...t)=>e.clickHandler&&e.clickHandler(...t),onMouseenter:t[1]||=(...t)=>e.hoverPause&&e.hoverPause(...t),onMouseleave:t[2]||=(...t)=>e.hoverPlay&&e.hoverPlay(...t)},[e.icon?((0,n.openBlock)(),(0,n.createBlock)(r,{key:0,"custom-icon":e.icon,type:e.type},null,8,[`custom-icon`,`type`])):(0,n.createCommentVNode)(`v-if`,!0),(0,n.createElementVNode)(`div`,{role:e.accessibility.toastRole||`alert`,class:(0,n.normalizeClass)(e.bodyClasses)},[typeof e.content==`string`?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[(0,n.createTextVNode)((0,n.toDisplayString)(e.content),1)],2112)):((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.getVueComponentFromObj(e.content)),(0,n.mergeProps)({key:1,"toast-id":e.id},e.hasProp(e.content,`props`)?e.content.props:{},(0,n.toHandlers)(e.hasProp(e.content,`listeners`)?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,[`toast-id`,`onCloseToast`]))],10,Oj),e.closeButton?((0,n.openBlock)(),(0,n.createBlock)(i,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:(0,n.withModifiers)(e.closeToast,[`stop`])},null,8,[`component`,`class-names`,`show-on-hover`,`aria-label`,`onClick`])):(0,n.createCommentVNode)(`v-if`,!0),e.timeout?((0,n.openBlock)(),(0,n.createBlock)(a,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,[`is-running`,`hide-progress-bar`,`timeout`,`onCloseToast`])):(0,n.createCommentVNode)(`v-if`,!0)],38)}Dj.render=kj;var Aj=Dj,jj=(0,n.defineComponent)({name:`VtTransition`,props:ZA.TRANSITION,emits:[`leave`],methods:{hasProp:MA,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+`px`,e.style.top=e.offsetTop+`px`,e.style.width=getComputedStyle(e).width,e.style.position=`absolute`)}}});function Mj(e,t){return(0,n.openBlock)(),(0,n.createBlock)(n.TransitionGroup,{tag:`div`,"enter-active-class":e.transition.enter?e.transition.enter:`${e.transition}-enter-active`,"move-class":e.transition.move?e.transition.move:`${e.transition}-move`,"leave-active-class":e.transition.leave?e.transition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`default`)]),_:3},8,[`enter-active-class`,`move-class`,`leave-active-class`,`onLeave`])}jj.render=Mj;var Nj=(0,n.defineComponent)({name:`VueToastification`,devtools:{hide:!0},components:{Toast:Aj,VtTransition:jj},props:Object.assign({},ZA.CORE_TOAST,ZA.CONTAINER,ZA.TRANSITION),data(){return{count:0,positions:Object.values(UA),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){let e=this.eventBus;e.on(WA.ADD,this.addToast),e.on(WA.CLEAR,this.clearToasts),e.on(WA.DISMISS,this.dismissToast),e.on(WA.UPDATE,this.updateToast),e.on(WA.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(e){bA(e)&&(e=await e()),IA(this.$el),e.appendChild(this.$el)},setToast(e){wA(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=RA(e.content);let t=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),n=this.defaults.filterBeforeCreate(t,this.toastArray);n&&this.setToast(n)},dismissToast(e){let t=this.toasts[e];!wA(t)&&!wA(t.onClose)&&t.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach(e=>{this.dismissToast(e)})},getPositionToasts(e){let t=this.filteredToasts.filter(t=>t.position===e).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?t.reverse():t},updateDefaults(e){wA(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:t,create:n}){this.toasts[e]?(t.timeout&&t.timeout===this.toasts[e].timeout&&t.timeout++,this.setToast(Object.assign({},this.toasts[e],t))):n&&this.addToast(Object.assign({},{id:e},t))},getClasses(e){return[`${GA}__container`,e].concat(this.defaults.containerClassName)}}});function Pj(e,t){let r=(0,n.resolveComponent)(`Toast`),i=(0,n.resolveComponent)(`VtTransition`);return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,null,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.positions,t=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:t},[(0,n.createVNode)(i,{transition:e.defaults.transition,class:(0,n.normalizeClass)(e.getClasses(t))},{default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.getPositionToasts(t),e=>((0,n.openBlock)(),(0,n.createBlock)(r,(0,n.mergeProps)({key:e.id},e),null,16))),128))]),_:2},1032,[`transition`,`class`])]))),128))])}Nj.render=Pj;var Fj=Nj,Ij=(e={},t=!0)=>{let r=e.eventBus=e.eventBus||new BA;t&&(0,n.nextTick)(()=>{let t=(0,n.createApp)(Fj,yA({},e)),r=t.mount(document.createElement(`div`)),i=e.onMounted;if(wA(i)||i(r,t),e.shareAppContext){let n=e.shareAppContext;n===!0?console.warn(`[${GA}] App to share context with was not provided.`):(t._context.components=n._context.components,t._context.directives=n._context.directives,t._context.mixins=n._context.mixins,t._context.provides=n._context.provides,t.config.globalProperties=n.config.globalProperties)}});let i=(e,t)=>{let n=Object.assign({},{id:NA(),type:HA.DEFAULT},t,{content:e});return r.emit(WA.ADD,n),n.id};i.clear=()=>r.emit(WA.CLEAR,void 0),i.updateDefaults=e=>{r.emit(WA.UPDATE_DEFAULTS,e)},i.dismiss=e=>{r.emit(WA.DISMISS,e)};function a(e,{content:t,options:n},i=!1){let a=Object.assign({},n,{content:t});r.emit(WA.UPDATE,{id:e,options:a,create:i})}return i.update=a,i.success=(e,t)=>i(e,Object.assign({},t,{type:HA.SUCCESS})),i.info=(e,t)=>i(e,Object.assign({},t,{type:HA.INFO})),i.error=(e,t)=>i(e,Object.assign({},t,{type:HA.ERROR})),i.warning=(e,t)=>i(e,Object.assign({},t,{type:HA.WARNING})),i},Lj=()=>{let e=()=>console.warn(`[${GA}] This plugin does not support SSR!`);return new Proxy(e,{get(){return e}})};function Rj(e){return zA()?VA(e)?Ij({eventBus:e},!1):Ij(e,!0):Lj()}var zj=Symbol(`VueToastification`),Bj=new BA,Vj=(e,t)=>{t?.shareAppContext===!0&&(t.shareAppContext=e);let n=Rj(yA({eventBus:Bj},t));e.provide(zj,n)},Hj=e=>e?Rj(e):((0,n.getCurrentInstance)()?(0,n.inject)(zj,void 0):void 0)||Rj(Bj),Uj=Vj;const Wj=Symbol(`toast`);var Gj=null;function Kj(){let e=(0,n.inject)(Wj,null);if(!e){if(Gj)return Gj;throw Error(`Toast API not provided. Make sure ToastPlugin is installed via app.use(ToastPlugin)`)}return e}const qj={install:(e,t={})=>{let n={position:UA.TOP_RIGHT,timeout:3e3,closeOnClick:!0,pauseOnFocusLoss:!0,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!1,closeButton:`button`,icon:!0,rtl:!1,transition:`Vue-Toastification__fade`,maxToasts:5,newestOnTop:!0,...t};e.use(Uj,n);let r={success:(e,t)=>Hj().success(e,t),error:(e,t)=>Hj().error(e,t),info:(e,t)=>Hj().info(e,t),warning:(e,t)=>Hj().warning(e,t),show:(e,t)=>Hj()(e,t),clear:()=>{Hj().clear()}};Gj||=r,e.provide(Wj,r)}},Jj=Symbol(`bagel`);function Yj(e=Jj){let t=(0,n.inject)(e);if(!t)throw Error(`No i18nT provided`);return t}const Xj={install:(e,t={})=>{e.directive(`click-outside`,lA),e.directive(`ripple`,jk),e.directive(`pattern`,kk),e.use(cA),e.use(pA),e.use(qj,t.toast||{}),e.use(Uo,{themes:{"bgl-theme":{triggers:[`click`],autoHide:!0,placement:`bottom`}}});let{availableLangs:n,defaultLang:r,lang:i}=bs();t.availableLangs&&(n.value=t.availableLangs),t.defaultLang&&(r.value=t.defaultLang),t.language&&(i.value=t.language),e.config.globalProperties.$i18T=t.i18nT||(e=>e),e.provide(Jj,t.i18nT||(e=>e))}};var Zj=[[`Afghanistan (افغانستان)`,`AF`,`93`],[`Albania (Shqipëri)`,`AL`,`355`],[`Algeria (الجزائر)`,`DZ`,`213`],[`American Samoa`,`AS`,`1`,5,[`684`]],[`Andorra`,`AD`,`376`],[`Angola`,`AO`,`244`],[`Anguilla`,`AI`,`1`,6,[`264`]],[`Antigua and Barbuda`,`AG`,`1`,7,[`268`]],[`Argentina`,`AR`,`54`],[`Armenia (Հայաստան)`,`AM`,`374`],[`Aruba`,`AW`,`297`],[`Ascension Island`,`AC`,`247`],[`Australia`,`AU`,`61`,0],[`Austria (Österreich)`,`AT`,`43`],[`Azerbaijan (Azərbaycan)`,`AZ`,`994`],[`Bahamas`,`BS`,`1`,8,[`242`]],[`Bahrain (البحرين)`,`BH`,`973`],[`Bangladesh (বাংলাদেশ)`,`BD`,`880`],[`Barbados`,`BB`,`1`,9,[`246`]],[`Belarus (Беларусь)`,`BY`,`375`],[`Belgium (België)`,`BE`,`32`],[`Belize`,`BZ`,`501`],[`Benin (Bénin)`,`BJ`,`229`],[`Bermuda`,`BM`,`1`,10,[`441`]],[`Bhutan (འབྲུག)`,`BT`,`975`],[`Bolivia`,`BO`,`591`],[`Bosnia and Herzegovina (Босна и Херцеговина)`,`BA`,`387`],[`Botswana`,`BW`,`267`],[`Brazil (Brasil)`,`BR`,`55`],[`British Indian Ocean Territory`,`IO`,`246`],[`British Virgin Islands`,`VG`,`1`,11,[`284`]],[`Brunei`,`BN`,`673`],[`Bulgaria (България)`,`BG`,`359`],[`Burkina Faso`,`BF`,`226`],[`Burundi (Uburundi)`,`BI`,`257`],[`Cambodia (កម្ពុជា)`,`KH`,`855`],[`Cameroon (Cameroun)`,`CM`,`237`],[`Canada`,`CA`,`1`,1,`204.226.236.249.250.263.289.306.343.354.365.367.368.382.387.403.416.418.428.431.437.438.450.584.468.474.506.514.519.548.579.581.584.587.604.613.639.647.672.683.705.709.742.753.778.780.782.807.819.825.867.873.902.905`.split(`.`)],[`Cape Verde (Kabu Verdi)`,`CV`,`238`],[`Caribbean Netherlands`,`BQ`,`599`,1,[`3`,`4`,`7`]],[`Cayman Islands`,`KY`,`1`,12,[`345`]],[`Central African Republic (République centrafricaine)`,`CF`,`236`],[`Chad (Tchad)`,`TD`,`235`],[`Chile`,`CL`,`56`],[`China (中国)`,`CN`,`86`],[`Christmas Island`,`CX`,`61`,2,[`89164`]],[`Cocos (Keeling) Islands`,`CC`,`61`,1,[`89162`]],[`Colombia`,`CO`,`57`],[`Comoros (جزر القمر)`,`KM`,`269`],[`Congo (DRC) (République démocratique du Congo)`,`CD`,`243`],[`Congo (Republic) (Congo-Brazzaville)`,`CG`,`242`],[`Cook Islands`,`CK`,`682`],[`Costa Rica`,`CR`,`506`],[`Côte d’Ivoire`,`CI`,`225`],[`Croatia (Hrvatska)`,`HR`,`385`],[`Cuba`,`CU`,`53`],[`Curaçao`,`CW`,`599`,0],[`Cyprus (Κύπρος)`,`CY`,`357`],[`Czech Republic (Česká republika)`,`CZ`,`420`],[`Denmark (Danmark)`,`DK`,`45`],[`Djibouti`,`DJ`,`253`],[`Dominica`,`DM`,`1`,13,[`767`]],[`Dominican Republic (República Dominicana)`,`DO`,`1`,2,[`809`,`829`,`849`]],[`Ecuador`,`EC`,`593`],[`Egypt (مصر)`,`EG`,`20`],[`El Salvador`,`SV`,`503`],[`Equatorial Guinea (Guinea Ecuatorial)`,`GQ`,`240`],[`Eritrea`,`ER`,`291`],[`Estonia (Eesti)`,`EE`,`372`],[`Eswatini`,`SZ`,`268`],[`Ethiopia`,`ET`,`251`],[`Falkland Islands (Islas Malvinas)`,`FK`,`500`],[`Faroe Islands (Føroyar)`,`FO`,`298`],[`Fiji`,`FJ`,`679`],[`Finland (Suomi)`,`FI`,`358`,0],[`France`,`FR`,`33`],[`French Guiana (Guyane française)`,`GF`,`594`],[`French Polynesia (Polynésie française)`,`PF`,`689`],[`Gabon`,`GA`,`241`],[`Gambia`,`GM`,`220`],[`Georgia (საქართველო)`,`GE`,`995`],[`Germany (Deutschland)`,`DE`,`49`],[`Ghana (Gaana)`,`GH`,`233`],[`Gibraltar`,`GI`,`350`],[`Greece (Ελλάδα)`,`GR`,`30`],[`Greenland (Kalaallit Nunaat)`,`GL`,`299`],[`Grenada`,`GD`,`1`,14,[`473`]],[`Guadeloupe`,`GP`,`590`,0],[`Guam`,`GU`,`1`,15,[`671`]],[`Guatemala`,`GT`,`502`],[`Guernsey`,`GG`,`44`,1,[`1481`,`7781`,`7839`,`7911`]],[`Guinea (Guinée)`,`GN`,`224`],[`Guinea-Bissau (Guiné Bissau)`,`GW`,`245`],[`Guyana`,`GY`,`592`],[`Haiti`,`HT`,`509`],[`Honduras`,`HN`,`504`],[`Hong Kong (香港)`,`HK`,`852`],[`Hungary (Magyarország)`,`HU`,`36`],[`Iceland (Ísland)`,`IS`,`354`],[`India (भारत)`,`IN`,`91`],[`Indonesia`,`ID`,`62`],[`Iran (ایران)`,`IR`,`98`],[`Iraq (العراق)`,`IQ`,`964`],[`Ireland`,`IE`,`353`],[`Isle of Man`,`IM`,`44`,2,[`1624`,`74576`,`7524`,`7924`,`7624`]],[`Israel (ישראל)`,`IL`,`972`],[`Italy (Italia)`,`IT`,`39`,0],[`Jamaica`,`JM`,`1`,4,[`876`,`658`]],[`Japan (日本)`,`JP`,`81`],[`Jersey`,`JE`,`44`,3,[`1534`,`7509`,`7700`,`7797`,`7829`,`7937`]],[`Jordan (الأردن)`,`JO`,`962`],[`Kazakhstan (Казахстан)`,`KZ`,`7`,1,[`33`,`7`]],[`Kenya`,`KE`,`254`],[`Kiribati`,`KI`,`686`],[`Kosovo`,`XK`,`383`],[`Kuwait (الكويت)`,`KW`,`965`],[`Kyrgyzstan (Кыргызстан)`,`KG`,`996`],[`Laos (ລາວ)`,`LA`,`856`],[`Latvia (Latvija)`,`LV`,`371`],[`Lebanon (لبنان)`,`LB`,`961`],[`Lesotho`,`LS`,`266`],[`Liberia`,`LR`,`231`],[`Libya (ليبيا)`,`LY`,`218`],[`Liechtenstein`,`LI`,`423`],[`Lithuania (Lietuva)`,`LT`,`370`],[`Luxembourg`,`LU`,`352`],[`Macau (澳門)`,`MO`,`853`],[`Madagascar (Madagasikara)`,`MG`,`261`],[`Malawi`,`MW`,`265`],[`Malaysia`,`MY`,`60`],[`Maldives`,`MV`,`960`],[`Mali`,`ML`,`223`],[`Malta`,`MT`,`356`],[`Marshall Islands`,`MH`,`692`],[`Martinique`,`MQ`,`596`],[`Mauritania (موريتانيا)`,`MR`,`222`],[`Mauritius (Moris)`,`MU`,`230`],[`Mayotte`,`YT`,`262`,1,[`269`,`639`]],[`Mexico (México)`,`MX`,`52`],[`Micronesia`,`FM`,`691`],[`Moldova (Republica Moldova)`,`MD`,`373`],[`Monaco`,`MC`,`377`],[`Mongolia (Монгол)`,`MN`,`976`],[`Montenegro (Crna Gora)`,`ME`,`382`],[`Montserrat`,`MS`,`1`,16,[`664`]],[`Morocco (المغرب)`,`MA`,`212`,0],[`Mozambique (Moçambique)`,`MZ`,`258`],[`Myanmar (Burma) (မြန်မာ)`,`MM`,`95`],[`Namibia (Namibië)`,`NA`,`264`],[`Nauru`,`NR`,`674`],[`Nepal (नेपाल)`,`NP`,`977`],[`Netherlands (Nederland)`,`NL`,`31`],[`New Caledonia (Nouvelle-Calédonie)`,`NC`,`687`],[`New Zealand`,`NZ`,`64`],[`Nicaragua`,`NI`,`505`],[`Niger (Nijar)`,`NE`,`227`],[`Nigeria`,`NG`,`234`],[`Niue`,`NU`,`683`],[`Norfolk Island`,`NF`,`672`],[`North Korea (조선 민주주의 인민 공화국)`,`KP`,`850`],[`North Macedonia (Северна Македонија)`,`MK`,`389`],[`Northern Mariana Islands`,`MP`,`1`,17,[`670`]],[`Norway (Norge)`,`NO`,`47`,0],[`Oman (عُمان)`,`OM`,`968`],[`Pakistan (پاکستان)`,`PK`,`92`],[`Palau`,`PW`,`680`],[`Palestine (فلسطين)`,`PS`,`970`],[`Panama (Panamá)`,`PA`,`507`],[`Papua New Guinea`,`PG`,`675`],[`Paraguay`,`PY`,`595`],[`Peru (Perú)`,`PE`,`51`],[`Philippines`,`PH`,`63`],[`Poland (Polska)`,`PL`,`48`],[`Portugal`,`PT`,`351`],[`Puerto Rico`,`PR`,`1`,3,[`787`,`939`]],[`Qatar (قطر)`,`QA`,`974`],[`Réunion (La Réunion)`,`RE`,`262`,0],[`Romania (România)`,`RO`,`40`],[`Russia (Россия)`,`RU`,`7`,0],[`Rwanda`,`RW`,`250`],[`Saint Barthélemy`,`BL`,`590`,1],[`Saint Helena`,`SH`,`290`],[`Saint Kitts and Nevis`,`KN`,`1`,18,[`869`]],[`Saint Lucia`,`LC`,`1`,19,[`758`]],[`Saint Martin (Saint-Martin (partie française))`,`MF`,`590`,2],[`Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)`,`PM`,`508`],[`Saint Vincent and the Grenadines`,`VC`,`1`,20,[`784`]],[`Samoa`,`WS`,`685`],[`San Marino`,`SM`,`378`],[`São Tomé and Príncipe (São Tomé e Príncipe)`,`ST`,`239`],[`Saudi Arabia (المملكة العربية السعودية)`,`SA`,`966`],[`Senegal (Sénégal)`,`SN`,`221`],[`Serbia (Србија)`,`RS`,`381`],[`Seychelles`,`SC`,`248`],[`Sierra Leone`,`SL`,`232`],[`Singapore`,`SG`,`65`],[`Sint Maarten`,`SX`,`1`,21,[`721`]],[`Slovakia (Slovensko)`,`SK`,`421`],[`Slovenia (Slovenija)`,`SI`,`386`],[`Solomon Islands`,`SB`,`677`],[`Somalia (Soomaaliya)`,`SO`,`252`],[`South Africa`,`ZA`,`27`],[`South Korea (대한민국)`,`KR`,`82`],[`South Sudan (جنوب السودان)`,`SS`,`211`],[`Spain (España)`,`ES`,`34`],[`Sri Lanka (ශ්‍රී ලංකාව)`,`LK`,`94`],[`Sudan (السودان)`,`SD`,`249`],[`Suriname`,`SR`,`597`],[`Svalbard and Jan Mayen`,`SJ`,`47`,1,[`79`]],[`Sweden (Sverige)`,`SE`,`46`],[`Switzerland (Schweiz)`,`CH`,`41`],[`Syria (سوريا)`,`SY`,`963`],[`Taiwan (台灣)`,`TW`,`886`],[`Tajikistan`,`TJ`,`992`],[`Tanzania`,`TZ`,`255`],[`Thailand (ไทย)`,`TH`,`66`],[`Timor-Leste`,`TL`,`670`],[`Togo`,`TG`,`228`],[`Tokelau`,`TK`,`690`],[`Tonga`,`TO`,`676`],[`Trinidad and Tobago`,`TT`,`1`,22,[`868`]],[`Tunisia (تونس)`,`TN`,`216`],[`Turkey (Türkiye)`,`TR`,`90`],[`Turkmenistan`,`TM`,`993`],[`Turks and Caicos Islands`,`TC`,`1`,23,[`649`]],[`Tuvalu`,`TV`,`688`],[`U.S. Virgin Islands`,`VI`,`1`,24,[`340`]],[`Uganda`,`UG`,`256`],[`Ukraine (Україна)`,`UA`,`380`],[`United Arab Emirates (الإمارات العربية المتحدة)`,`AE`,`971`],[`United Kingdom`,`GB`,`44`,0],[`United States`,`US`,`1`,0],[`Uruguay`,`UY`,`598`],[`Uzbekistan (Oʻzbekiston)`,`UZ`,`998`],[`Vanuatu`,`VU`,`678`],[`Vatican City (Città del Vaticano)`,`VA`,`39`,1,[`06698`]],[`Venezuela`,`VE`,`58`],[`Vietnam (Việt Nam)`,`VN`,`84`],[`Wallis and Futuna (Wallis-et-Futuna)`,`WF`,`681`],[`Western Sahara (الصحراء الغربية)`,`EH`,`212`,1,[`5288`,`5289`]],[`Yemen (اليمن)`,`YE`,`967`],[`Zambia`,`ZM`,`260`],[`Zimbabwe`,`ZW`,`263`],[`Åland Islands`,`AX`,`358`,1,[`18`]]];const Qj=Zj.map(([e,t,n,r=0,i=[]])=>({name:e,iso2:t,dialCode:n,priority:r,areaCodes:i}));function $j(e,t){console.log(`date`,e),e=new Date(e),console.log(`date`,e);let n=t.Day||t.day||t.days||0,r=t.Hour||t.hour||t.hours||0,i=t.Minute||t.minute||t.minutes||0,a=t.Second||t.second||t.seconds||0,o=t.Week||t.week||t.weeks||0,s=t.Month||t.month||t.months||0,c=t.Year||t.year||t.years||0;return n&&e.setDate(e.getDate()+n),r&&e.setHours(e.getHours()+r),i&&e.setMinutes(e.getMinutes()+i),a&&e.setSeconds(e.getSeconds()+a),o&&e.setDate(e.getDate()+o*7),s&&e.setMonth(e.getMonth()+s),c&&e.setFullYear(e.getFullYear()+c),e}var eM={en:{year:`year`,month:`month`,week:`week`,day:`day`,hour:`hour`,minute:`minute`,second:`second`,ago:`ago`,in:`in`,justNow:`Just now`},es:{year:`año`,month:`mes`,week:`semana`,day:`día`,hour:`hora`,minute:`minuto`,second:`segundo`,ago:`hace`,in:`en`,justNow:`Justo ahora`},fr:{year:`an`,month:`mois`,week:`semaine`,day:`jour`,hour:`heure`,minute:`minute`,second:`seconde`,ago:`il y a`,in:`dans`,justNow:`À l'instant`},he:{year:{singular:`שנה`,plural:`שנים`},month:{singular:`חודש`,plural:`חודשים`},week:{singular:`שבוע`,plural:`שבועות`},day:{singular:`יום`,plural:`ימים`},hour:{singular:`שעה`,plural:`שעות`},minute:{singular:`דקה`,plural:`דקות`},second:{singular:`שנייה`,plural:`שניות`},ago:`לפני`,in:`בעוד`,justNow:`זה עתה`}};function tM(e,t=`en`){if(!e)return``;typeof e==`string`&&(e=new Date(e));let n=new Date().getTime(),r=e.getTime(),i=Math.floor((r-n)/1e3),a=[{label:`year`,seconds:31536e3},{label:`month`,seconds:2592e3},{label:`week`,seconds:604800},{label:`day`,seconds:86400},{label:`hour`,seconds:3600},{label:`minute`,seconds:60},{label:`second`,seconds:1}],o=eM[t];for(let e of a){let n=Math.floor(Math.abs(i)/e.seconds);if(n>=1){let r=i<0?` ${o.ago}`:``,a=i>0&&o.in!==`in`?`${o.in} `:``;if(t===`he`){let t=o[e.label],r=n===1?t.singular:t.plural,a=i<0?`${o.ago} `:i>0?`${o.in} `:``;if(e.label===`day`&&i>0){let e=Math.floor(Math.abs(i)%86400/3600),t=o.hour,s=e===1?t.singular:t.plural;return`${a}${n===1?r:`${n} ${r}`}${e>0?e===1?` ${s}`:` ${e} ${s}`:``}`}return`${a}${n===1?r:`${n} ${r}`}`}if(e.label===`day`&&i>0){let t=Math.floor(Math.abs(i)%86400/3600),s=t>1?`${o.hour}s`:o.hour;return`${a}${n} ${o[e.label]}${t>0?` ${t} ${s}`:``}${r}`}return`${a}${n} ${o[e.label]}${r}`}}return o.justNow}function nM(){return typeof navigator==`object`?navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language:`en-US`}function rM(e,t){if(t.timeZone===`UTC`){let t=new Date(e.getTime());return t.setMinutes(t.getMinutes()+e.getTimezoneOffset()),t}try{let n=new Intl.DateTimeFormat(`en-US`,{...t,month:`numeric`}).formatToParts(e),r={};return n.forEach(e=>{e.type!==`literal`&&e.type!==`timeZoneName`&&(r[e.type]=Number.parseInt(e.value,10))}),new Date(r.year,(r.month||1)-1,r.day,r.hour||0,r.minute||0,r.second||0)}catch(n){return console.warn(`Error handling timezone ${t.timeZone}:`,n),e}}function iM(e,t,n){let r=n?.timeZone?rM(e,n):e,i=r.getFullYear().toString();return{AmPm:r.toLocaleString(t,{hour:`numeric`,hour12:!0,minute:`numeric`}).split(` `)[1],DD:String(r.getDate()).padStart(2,`0`),DDD:r.toLocaleString(t,{weekday:`short`}),DDDD:r.toLocaleString(t,{weekday:`long`}),HH:String(r.getHours()).padStart(2,`0`),mm:String(r.getMinutes()).padStart(2,`0`),MM:String(r.getMonth()+1).padStart(2,`0`),MMM:r.toLocaleString(t,{month:`short`}),MMMM:r.toLocaleString(t,{month:`long`}),ss:String(r.getSeconds()).padStart(2,`0`),sss:String(r.getMilliseconds()).padStart(3,`0`),YY:i.slice(-2),YYYY:i}}var aM=iM(new Date,nM()),oM=Object.keys(aM).sort((e,t)=>t.length-e.length),sM=new RegExp(oM.map(e=>e).join(`|`),`g`);function cM(e,t){let n,r,i,a={};if(typeof t==`string`?n=t:t&&typeof t==`object`&&(n=t.fmt,r=t.locale,i=t.tz,a=t),!e)return``;n||=`DD.MM.YY`,r||=nM();try{let t=typeof e==`string`||typeof e==`number`?new Date(e):e;if(Number.isNaN(t.getTime()))return console.warn(`Invalid date provided to formatDate:`,e),``;let o={day:`numeric`,hour:`2-digit`,hour12:a.hour12===void 0?!0:a.hour12,minute:`2-digit`,month:`long`,second:`2-digit`,timeZone:i,weekday:`long`,year:`numeric`},s=iM(t,r,o),c=new Intl.DateTimeFormat(r,o).formatToParts(t),l={};return c.forEach(e=>{e.type!==`literal`&&(l[e.type]=e.value)}),l.month&&(s.MMM=l.month.substring(0,3),s.MMMM=l.month),l.weekday&&(s.DDD=l.weekday.substring(0,3),s.DDDD=l.weekday),l.dayPeriod&&(s.AmPm=l.dayPeriod),n.replace(sM,e=>s[e])}catch(t){return console.warn(`Error formatting date: ${e} with format: ${n}`,t),``}}const lM=cM;function uM(e,t,n){let r,i=``,a,o={};if(typeof e==`object`&&e){o=e;let{id:t,text:n,icon:s}=o;r=t,i=n??``,a=s}else r=e,t!=null&&(typeof t==`string`&&t.length<=30&&!t.includes(` `)&&(t.includes(`-`)||t.includes(`_`)||t.length<=12)&&t===t.toLowerCase()?(a=t,n&&(o=n)):(i=t,n&&(o=n)));return{$el:`btn`,id:r,class:o.class,vIf:o.vIf,style:o.style,onClick:o.onClick,attrs:{value:i||(o.text??``)||``,variant:o.variant,size:o.size,disabled:o.disabled,loading:o.loading,icon:a??o.icon,iconPosition:o.iconPosition,href:o.href,target:o.target}}}function dM(e,t,n={}){return{$el:e,id:t,class:n.class,vIf:n.vIf,style:n.style,attrs:n.attrs||{},onClick:n.onClick}}function fM(e,t,n){return t!=null&&e!=null?uM(e,t,n||{}):uM({id:e,icon:t,...n})}function pM(e,t,n){let r,i={};if(typeof e==`object`&&e){i=e;let{id:t}=i;r=t}else r=e,t!=null&&(i=typeof n==`string`?{tag:n,text:t}:n?{...n,text:t}:{text:t});return{$el:i.tag||`p`,id:r,class:i.class,vIf:i.vIf,style:i.style,attrs:{text:i.text??``,size:i.size,weight:i.weight,color:i.color,align:i.align},transform:i.transform}}function mM(e,t,n){let r,i={};if(typeof e==`object`&&e){i=e;let{id:t}=i;r=t}else r=e,t!=null&&(typeof n==`string`?i={alt:n}:n&&(i=n));return{$el:`img`,id:r,class:i.class,vIf:i.vIf,style:i.style,transform:i.transform,attrs:{alt:i.alt,width:i.width,height:i.height,loading:i.loading,fit:i.fit,rounded:i.rounded,fallback:i.fallback}}}function hM(e){return{$el:`pill`,id:e?.id,class:e?.class,vIf:e?.vIf,style:e?.style,attrs:e?.attrs||{}}}function gM(...e){let t,r=[];if(e.length>0){let n=e[0];typeof n==`object`&&n&&`$el`in n?r=e:(t=n,r=e.slice(1))}let i={};return t?.attrs&&Object.assign(i,t.attrs),t&&(t.options!=null&&(i.options=t.options),t.placeholder!=null&&(i.placeholder=t.placeholder),t.searchable!=null&&(i.searchable=t.searchable),t.multiselect!=null&&(i.multiselect=t.multiselect),t.clearable!=null&&(i.clearable=t.clearable),t.onSelect!=null&&(i.onSelect=t.onSelect),t.onSearch!=null&&(i.onSearch=t.onSearch)),{$el:(0,n.markRaw)(Go),class:t?.class,vIf:t?.vIf,style:t?.style,attrs:i,children:r}}function _M(e,t){return{$el:(0,n.markRaw)(YC),id:t?.id,class:t?.class,vIf:t?.vIf,style:t?.style,onClick:t?.onClick,attrs:{thin:!0,title:e??t?.title??``,subtitle:t?.subtitle,icon:t?.icon,avatar:t?.avatar,badge:t?.badge,actions:t?.actions,clickable:t?.clickable,divider:t?.divider}}}function vM(e,t,n){return{$el:`div`,id:e,class:n?.class??`flex gap-2`,vIf:n?.vIf,style:n?.style,attrs:n?.attrs||{},children:t}}function yM(e,t){for(let n of t){if(n.id===e)return n;if(n.children&&n.children.length>0){let t=yM(e,n.children);if(t)return t}}}function bM(e,t,n){let r;return typeof t==`string`?r=t:n=t,{$el:`div`,id:e,class:n?.class??`column-class`,vIf:n?.vIf,style:n?.style,transform:n?.transform,attrs:{...n?.attrs,label:r??n?.attrs?.label??``},children:n?.children}}const xM=bM;function SM(){return{btn:uM,iconBtn:fM,txt:pM,img:mM,dropdown:gM,listItem:_M,container:vM,findElementById:yM,getBaseElementField:dM,col:xM,column:bM}}async function CM(){let e=sessionStorage.getItem(`ipapi`);return e||(e=(await kx.get(`https://ipapi.co/json/`)).data,e=JSON.stringify(e),sessionStorage.setItem(`ipapi`,e)),JSON.parse(e)}var wM={"":/<[^>]*>?/g," ":/&nbsp;/g,'"':/&quot;/g,"'":/&apos;/g,"&":/&amp;/g,"<":/&lt;/g,">":/&gt;/g};function TM(e){return e?Object.entries(wM).reduce((e,[t,n])=>e.replace(n,t),e):``}var EM=/[\p{N}\p{L}\s]/gu;function DM(e){return e.match(EM)?.join(``).toLowerCase()??``}function OM(e,t){let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r}function kM(e,t){let n=0;if(e.length===0)return 0;let r=0;for(let i of t)if(e.includes(i)){let t=new RegExp(i,`g`),a=e.match(t);a&&(r+=a.length*i.length),n+=1,e.split(/\s+/).includes(i)&&(n+=.5),e.startsWith(i)&&(n+=.5)}let i=Math.min(1,r/e.length);return n*=1+i*2,n}function AM(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`}function jM(e){return e==null?``:typeof e==`string`?TM(e):typeof e==`number`||typeof e==`boolean`?String(e):typeof e==`object`&&e instanceof Date?e.toISOString():``}function MM(e){let{searchTerm:t,items:r=[],keysToSearch:i,fieldWeights:a={},minChars:o=2}=e,s=(0,n.toValue)(t),c=(0,n.toValue)(r)||[];if(!s||s.length<o)return c;let l=DM(s).split(/\s+/).filter(e=>e.length>1);if(l.length===0)return c;let u={name:2,first_name:2,last_name:2,title:2,headline:2,description:.7,subtitle:.7,bio:.7,content:.7,body:.7,email:.7,phone:.7,id:.3,created_at:.3,updated_at:.3};function d(e){if(e in a){let t=a[e];if(typeof t==`number`)return t}let t=e.split(`.`).pop()||``;return t in u?u[t]:1}function f(e,t=``){return!e||typeof e!=`object`?[]:Object.keys(e).flatMap(n=>{let r=e[n],i=t?`${t}.${n}`:n;return r&&typeof r==`object`&&!Array.isArray(r)?[i,...f(r,i)]:[i]})}function p(e){let t=0;if(AM(e))return kM(DM(String(e)),l);if(Array.isArray(e)){for(let n of e)if(AM(n)){let e=DM(String(n));t+=kM(e,l)}return t}let n=i||f(e);for(let r of n){let n=OM(e,String(r));if(n==null)continue;if(Array.isArray(n)){for(let e of n)if(AM(e)){let n=kM(DM(TM(String(e))),l),i=d(String(r));t+=n*i}continue}if(typeof n==`object`&&!AM(n))continue;let i=kM(DM(jM(n)),l),a=d(String(r));t+=i*a}return t}let m=c.map(e=>[e,p(e)]).filter(([,e])=>e>0),h=m;if(m.length>0){let e=Math.max(...m.map(([,e])=>e));if(e>5){let t=e*.25;h=m.filter(([,e])=>e>=t)}else if(e>2){let t=e*.15;h=m.filter(([,e])=>e>=t)}}return h.sort(([,e],[,t])=>t-e).map(([e])=>e)}function NM(e,t){let r,i,a=Array.isArray(e),o=typeof e==`function`,s=typeof e==`object`&&!!e&&`value`in e&&!(`items`in e);a||o||s?(i=(0,n.ref)(``),r={items:e,searchTerm:i,...t}):r=e;let{searchTerm:c,minChars:l=2,serverSearch:u,debounceMs:d=300}=r,f=(0,n.ref)(!1),p=(0,n.ref)([]),m=null;u&&(0,n.watch)(()=>(0,n.toValue)(c),async e=>{m!==null&&clearTimeout(m);let t=typeof e==`string`?e:``;if(t.length<l&&l>0){p.value=[];return}m=window.setTimeout(async()=>{try{f.value=!0,p.value=await u(t)}catch(e){console.error(`Server search error:`,e),p.value=[]}finally{f.value=!1}},d)},{immediate:!0});let h=()=>(0,n.toValue)(c),g=()=>{let e=h();return u&&(e&&typeof e==`string`&&e.length>=l||l===0)?p.value:MM(r)},_=(0,n.computed)(()=>g()),v=(0,n.computed)(()=>_.value.length),y={results:_,resultCount:v,hasResults:(0,n.computed)(()=>v.value>0),isSearching:(0,n.computed)(()=>{let e=h();return!!e&&typeof e==`string`&&e.length>=l}),isLoading:(0,n.computed)(()=>f.value)};return i&&(y.searchTerm=i),y}exports.Accordion=a,exports.AccordionItem=d,exports.AddToCalendar=_,exports.AddressSearch=m,exports.Alert=w,exports.AppContent=sC,exports.AppLayout=dC,exports.AppSidebar=yC,exports.ArrayInput=hc,exports.Avatar=We,exports.Badge=Ke,exports.BagelForm=Js,exports.BglForm=Js,exports.BagelMultiStepForm=rc,exports.BagelVue=Xj,exports.BarChart=j,exports.BglVideo=tn,exports.BottomMenu=SC,exports.Btn=b,exports.Calendar=er,exports.Card=rr,exports.Carousel=ur,exports.CheckInput=Cc,exports.Checkbox=vc,exports.CodeEditor=jc,exports.ColorInput=Fc,exports.DataPreview=Sr,exports.DataTable=Pr,exports.TableSchema=Pr,exports.DateInput=al,exports.DatePicker=el,exports.DragOver=Vr,exports.Draggable=Lr,exports.Dropdown=Go,exports.EMAIL_REGEX=ul,exports.EmailInput=yl,exports.FORM_STATE_KEY=HO,exports.FieldArray=dc,exports.FieldSetVue=Yo,exports.Flag=Zo,exports.IMAGE_FORMATS=ol,exports.IMAGE_FORMATS_REGEXP=sl,exports.Icon=$,exports.IframeVue=cS,exports.Image=pS,exports.ImportData=nC,exports.JSONInput=wl,exports.KpiCard=ne,exports.Layout=wC,exports.LineChart=ge,exports.ListItem=YC,exports.ListView=tw,exports.Loading=sw,exports.MapEmbed=fw,exports.Menu=yw,exports.Modal=Sw,exports.ModalConfirm=Tw,exports.ModalForm=kw,exports.ModalPlugin=pA,exports.NavBar=Lw,exports.NumberInput=jl,exports.OTP=Pl,exports.PageTitle=Vw,exports.Pagination=Gw,exports.PasswordInput=Rl,exports.PieChart=Ve,exports.Pill=nT,exports.RadioGroup=Kl,exports.RadioPillsInput=$l,exports.RangeInput=cu,exports.Rating=aT,exports.RichText=Hd,exports.RouterWrapper=cT,exports.SelectBtn=Gd,exports.SelectInput=yu,exports.SidebarMenu=DC,exports.SignaturePad=ef,exports.Skeleton=kC,exports.Slider=hT,exports.Spreadsheet=RT,exports.Swiper=OO,exports.TabbedLayout=PC,exports.TableField=Hm,exports.Tabs=zC,exports.TabsBody=VC,exports.TabsNav=WC,exports.TelInput=dv,exports.TextInput=Du,exports.Title=AO,exports.ToastPlugin=qj,exports.ToggleInput=gv,exports.ToolBar=PO,exports.TopBar=RO,exports.UploadInput=tS,exports.VIDEO_FORMATS=cl,exports.VIDEO_FORMATS_REGEXP=ll,exports.Zoomer=VO,exports.allCountries=Qj,exports.appendScript=Ls,exports.appendStyle=Rs,exports.arrField=hs,Object.defineProperty(exports,`bagelFormUtils`,{enumerable:!0,get:function(){return Qo}}),exports.bglForm=ds,exports.bindAttrs=As,exports.btn=uM,exports.checkField=is,exports.classify=ks,exports.clearHtml=TM,exports.col=xM,exports.colorField=ps,exports.column=bM,exports.container=vM,exports.copyText=Es,exports.createSchema=gs,exports.dateField=os,exports.debounce=Cs,exports.denullify=Ms,exports.downloadFile=Ks,exports.dropdown=gM,exports.emailField=as,exports.findBglFieldById=ms,exports.findElementById=yM,exports.fmtDate=lM,exports.formatDate=cM,exports.formatString=xs,exports.frmRow=cs,exports.getBaseElementField=dM,exports.getBaseField=$o,exports.getDatePartsMap=iM,exports.getFallbackSchema=Ps,exports.getNestedValue=Us,exports.handleTimezone=rM,exports.i18nTInjectionKey=Jj,exports.iconBtn=fM,exports.iffer=js,exports.img=mM,exports.initials=Ds,exports.injectI18nT=Yj,exports.ipapi=CM,exports.isDate=Ns,exports.keyToLabel=Ts,exports.listItem=_M,exports.localRef=pk,exports.normalizeDimension=Bs,exports.normalizeText=DM,exports.normalizeURL=zs,exports.numField=ss,exports.pathKeyToURL=Hs,exports.pattern=kk,exports.pill=hM,exports.provideBagelFormState=WO,exports.rangeField=us,exports.richText=es,exports.ripple=jk,exports.searchItems=MM,exports.selectField=ns,exports.slctField=rs,exports.sleep=Fs,exports.slugify=ws,exports.telField=fs,exports.timeAgo=tM,exports.timeDelta=$j,exports.tryRun=Gs,exports.txt=pM,exports.txtField=ts,exports.uploadField=ls,exports.useAddToCalendar=h,exports.useBagelFormState=GO,exports.useBglSchema=fk,exports.useDebounceFn=ht,exports.useDevice=KO,exports.useDraggable=Fr,exports.useElements=SM,exports.useEscape=Os,exports.useExcel=ZO,exports.useFileUpload=Mx,exports.useForm=_s,exports.useLang=bs,exports.useLocalStorage=mk,exports.useModal=fA,exports.usePolling=ek,exports.useSearch=NM,exports.useTheme=uk,exports.useToast=Kj,exports.useValidateFieldValue=dk,exports.vDraggable=Rr,exports.vResize=Pk;
185
+ `,e.appendChild(o))):o=e,o.addEventListener(`mouseenter`,()=>{o!==e&&(o.style.background=`rgba(0, 0, 0, 0.2)`)}),o.addEventListener(`mouseleave`,()=>{o!==e&&!r&&(o.style.background=`rgba(0, 0, 0, 0.1)`)}),o.style.cursor=`ns-resize`,o.style.userSelect=`none`;function s(e){return{clientY:e,deltaY:e-i,initialHeight:a}}function c(e){return n.gridSize?Math.round(e/n.gridSize)*n.gridSize:e}function l(t){if(!r)return;t.preventDefault();let i=s(`touches`in t?t.touches[0].clientY:t.clientY),l=a+i.deltaY;n.minHeight!==void 0&&(l=Math.max(l,n.minHeight)),n.maxHeight!==void 0&&(l=Math.min(l,n.maxHeight)),l=c(l),e.style.height=`${l}px`,n.onResize&&n.onResize(i),o!==e&&(o.style.background=`rgba(0, 0, 0, 0.3)`)}function u(t){if(!r)return;let i=s(`touches`in t?t.changedTouches[0].clientY:t.clientY);r=!1,document.body.style.cursor=``,document.body.style.userSelect=``,o!==e&&(o.style.background=`rgba(0, 0, 0, 0.1)`),n.onEnd&&n.onEnd(i),document.removeEventListener(`mousemove`,l),document.removeEventListener(`mouseup`,u),document.removeEventListener(`touchmove`,l),document.removeEventListener(`touchend`,u),document.removeEventListener(`touchcancel`,u)}function d(t){t instanceof MouseEvent&&t.button!==0||(t.preventDefault(),r=!0,i=`touches`in t?t.touches[0].clientY:t.clientY,a=e.offsetHeight,n.onStart&&n.onStart(t),document.body.style.cursor=`ns-resize`,document.body.style.userSelect=`none`,document.addEventListener(`mousemove`,l,{passive:!1}),document.addEventListener(`mouseup`,u),document.addEventListener(`touchmove`,l,{passive:!1}),document.addEventListener(`touchend`,u),document.addEventListener(`touchcancel`,u))}o.addEventListener(`mousedown`,d),o.addEventListener(`touchstart`,d,{passive:!1}),e[Mk]=()=>{o!==e&&e.removeChild(o),o.removeEventListener(`mousedown`,d),o.removeEventListener(`touchstart`,d),o.removeEventListener(`mouseenter`,d),o.removeEventListener(`mouseleave`,d),document.removeEventListener(`mousemove`,l),document.removeEventListener(`mouseup`,u),document.removeEventListener(`touchmove`,l),document.removeEventListener(`touchend`,u),document.removeEventListener(`touchcancel`,u)}}const Pk={mounted(e,t){Nk(e,t)},unmounted(e){let t=e[Mk];typeof t==`function`&&(t(),delete e[Mk])},updated(e,t){if(t.value!==t.oldValue){let n=e[Mk];typeof n==`function`&&(n(),delete e[Mk]),Nk(e,t)}}};var Fk={key:0,class:`center`},Ik={key:3},Lk={class:`bgl-lightbox-item`},Rk={key:2,class:`lightbox-pdf`},zk=[`src`,`title`],Bk={key:3,class:`lightbox-file`},Vk={class:`file-info txt-white flex m_block align-items-start gap-025`},Hk={class:`txt-start`},Uk={class:`mx-0 light`},Wk={class:`semi word-break-all`},Gk={class:`mx-0`},Kk={class:`semi`},qk=(0,n.defineComponent)({__name:`Lightbox`,setup(e,{expose:t}){let r=(0,n.ref)(!1),i=(0,n.ref)([]),a=(0,n.ref)(0),o=(0,n.computed)(()=>i.value[a.value]),s=(0,n.ref)(1),c=(0,n.computed)(()=>s.value===1),l=(0,n.computed)(()=>({allowTouchMove:s.value===1,touchRatio:s.value===1?1:0,simulateTouch:s.value===1}));function u(e,t){r.value=!0,i.value=t||[e],a.value=i.value.findIndex(t=>{let n=e.src!==void 0&&e.src!==null&&e.src!==``&&t.src===e.src,r=e.pathKey!==void 0&&e.pathKey!==null&&e.pathKey!==``&&t.pathKey===e.pathKey;return n||r}),a.value===-1&&(a.value=0),s.value=1,document.addEventListener(`keydown`,p)}function d(){r.value=!1,document.removeEventListener(`keydown`,p)}function f(e){a.value=e,s.value=1}(0,n.watch)(()=>r.value,e=>{e?document.body.style.overflow=`hidden`:document.body.style.overflow=``}),(0,n.watch)(()=>a.value,()=>{s.value=1});function p(e){e.key===`Escape`&&d()}return t({open:u,close:d}),(e,t)=>((0,n.openBlock)(),(0,n.createBlock)(n.Transition,{name:`fade`},{default:(0,n.withCtx)(()=>[r.value?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:0,class:`bgl-lightbox-overlay`,onKeydown:(0,n.withKeys)(d,[`esc`])},[(0,n.createElementVNode)(`div`,{class:`flex start w-100 space-between p-025 z-9`,onClick:d},[(0,n.createVNode)((0,n.unref)(b),{flat:``,class:`color-white`,icon:`close`,onClick:d}),o.value?.enableZoom&&o.value?.type===`image`?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,Fk,[(0,n.createVNode)((0,n.unref)(b),{flat:``,class:`color-white`,icon:`remove`,disabled:s.value===1,onClick:t[0]||=e=>s.value--},null,8,[`disabled`]),(0,n.createVNode)((0,n.unref)(b),{flat:``,class:`color-white`,icon:`zoom_in`,disabled:s.value===1,onClick:t[1]||=e=>s.value=1},null,8,[`disabled`]),(0,n.createVNode)((0,n.unref)(b),{flat:``,class:`color-white`,icon:`add`,disabled:s.value===3,onClick:t[2]||=e=>s.value++},null,8,[`disabled`])])):(0,n.createCommentVNode)(``,!0),o.value?.openFile&&o.value?.src?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(b),{key:1,class:`color-white`,round:``,thin:``,flat:``,iconEnd:`arrow_outward`,value:`Open File`,href:o.value?.src,target:`_blank`},null,8,[`href`])):(0,n.createCommentVNode)(``,!0),o.value?.download&&o.value?.src?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(b),{key:2,class:`color-white`,round:``,thin:``,flat:``,icon:`download`,value:`Download File`,onClick:t[3]||=e=>(0,n.unref)(Ks)(o.value?.src)})):(0,n.createCommentVNode)(``,!0),!o.value?.openFile&&!o.value?.download?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,Ik)):(0,n.createCommentVNode)(``,!0)]),i.value&&i.value.length>0?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(OO),{key:0,index:a.value,"onUpdate:index":t[6]||=e=>a.value=e,items:i.value,"initial-slide":a.value,class:(0,n.normalizeClass)([`bgl-lightbox-swiper`,{zoomed:s.value>1}]),navigation:i.value.length>1,"grab-cursor":c.value,keyboard:!0,loop:!1,speed:400,"slides-per-view":1,"space-between":0,effect:`slide`,"advanced-options":l.value,onClick:t[7]||=(0,n.withModifiers)(()=>{},[`stop`])},{default:(0,n.withCtx)(({item:e})=>[(0,n.createElementVNode)(`div`,Lk,[e.type===`image`?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(VO),{key:0,zoom:s.value,"onUpdate:zoom":t[4]||=e=>s.value=e,disabled:!e?.enableZoom,"mouse-wheel-to-zoom":!1,"double-click-to-zoom":!0,"max-scale":5,"min-scale":1,"aspect-ratio":0,"limit-translation":!0,onClick:t[5]||=(0,n.withModifiers)(()=>{},[`stop`])},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(pS),{draggable:!1,src:e?.src,alt:`Preview`,class:`lightbox-image`},null,8,[`src`])]),_:2},1032,[`zoom`,`disabled`])):e?.type===`video`&&e?.src?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(tn),{key:1,src:e?.src,autoplay:``,controls:``,class:`lightbox-video`},null,8,[`src`])):e?.type===`pdf`&&e?.src?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,Rk,[(0,n.createElementVNode)(`embed`,{src:(0,n.unref)(zs)(e?.src),type:`application/pdf`,width:`100%`,height:`1080`,title:e?.name},null,8,zk)])):((0,n.openBlock)(),(0,n.createElementBlock)(`div`,Bk,[(0,n.createElementVNode)(`div`,Vk,[(0,n.createVNode)((0,n.unref)($),{class:`m-0 m_none`,icon:`draft`,size:10,weight:`12`}),(0,n.createVNode)((0,n.unref)($),{class:`m-0 none m_block m_-mb-1`,icon:`draft`,size:4,weight:`2`}),(0,n.createElementVNode)(`div`,Hk,[(0,n.createElementVNode)(`p`,Uk,[t[9]||=(0,n.createTextVNode)(` File: `),(0,n.createElementVNode)(`span`,Wk,(0,n.toDisplayString)(e?.name),1)]),(0,n.createElementVNode)(`p`,Gk,[t[10]||=(0,n.createTextVNode)(` Type: `),(0,n.createElementVNode)(`span`,Kk,(0,n.toDisplayString)(e?.type),1)]),(0,n.createVNode)((0,n.unref)(b),{href:e?.src,target:`_blank`,round:``,thin:``,class:`mt-1`,value:`Open file`},null,8,[`href`])])])]))])]),"prev-button":(0,n.withCtx)(({prev:e})=>[(0,n.createVNode)((0,n.unref)(b),{icon:`arrow_back`,color:`black`,onClick:e},null,8,[`onClick`])]),"next-button":(0,n.withCtx)(({next:e})=>[(0,n.createVNode)((0,n.unref)(b),{icon:`arrow_forward`,color:`black`,onClick:e},null,8,[`onClick`])]),_:1},8,[`index`,`items`,`initial-slide`,`class`,`navigation`,`grab-cursor`,`advanced-options`])):(0,n.createCommentVNode)(``,!0),i.value&&i.value.length>1?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:1,class:`lightbox-thumbnails`,onClick:t[8]||=(0,n.withModifiers)(()=>{},[`stop`])},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(i.value,(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:t},[e.type===`image`?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(pS),{key:0,class:(0,n.normalizeClass)([`thumbnail`,{active:a.value===t}]),src:e.src,alt:``,onClick:(0,n.withModifiers)(e=>f(t),[`stop`])},null,8,[`src`,`class`,`onClick`])):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)($),{key:1,class:(0,n.normalizeClass)([`thumbnail thumbnail-icon`,{active:a.value===t}]),icon:`description`,onClick:(0,n.withModifiers)(e=>f(t),[`stop`])},null,8,[`class`,`onClick`]))],64))),128))])):(0,n.createCommentVNode)(``,!0)],32)):(0,n.createCommentVNode)(``,!0)]),_:1}))}}),Jk=qk,Yk={},Xk=e=>void 0,Zk={mounted(e,t){Qk(eA(t,e)),Xk=n=>{$k(n,e,t)},e.addEventListener(`click`,Xk)},updated(e,t){Qk(eA(t,e)),e.removeEventListener(`click`,Xk),Xk=n=>{$k(n,e,t)},e.addEventListener(`click`,Xk)},unmounted(e){e.removeEventListener(`click`,Xk)}};function Qk(e){e.group&&(Yk[e.group]||(Yk[e.group]=[]),Yk[e.group].findIndex(t=>t.src===e.src)===-1&&Yk[e.group].push(e))}function $k(e,t,n){e.stopPropagation();let r=eA(n,t),i=oA();if(!i||!i.open)return;let a=i.open;a(r,r&&r.group?Yk[r.group]:void 0)}function eA(e,t){let{group:n,src:r,type:i,name:a,thumbnail:o,enableZoom:s,openFile:c,download:l,pathKey:u}=e.value||{};return r=Hs(r||u)||e.value||t.getAttribute(`src`)||``,i||=iA(r),a=a||rA(r)||t.getAttribute(`alt`)||``,{src:r,type:i,name:a,thumbnail:o,group:n,enableZoom:s,openFile:c,download:l}}var tA=/youtube\.com|youtu\.be/,nA=/vimeo\.com/;function rA(e){return!e||typeof e!=`string`?``:(e.split(`/`).pop()||``).replace(/\.[^/.]+$/,``)}function iA(e){if(typeof e!=`string`||!e)return`unknown`;let t=(e.split(`.`).pop()||``).toLowerCase(),n=e.split(`?`)[0].split(`.`).pop()?.toLowerCase()||``;return sl.test(t)||sl.test(n)?`image`:ll.test(t)||tA.test(e)||nA.test(e)?`video`:[`pdf`].includes(t)?`pdf`:t??`unknown`}var aA;function oA(){if(!aA){let e=document.createElement(`div`);document.body.prepend(e),aA=(0,n.createApp)(Jk).mount(e)}return aA}var sA={install(e){e.directive(`lightbox`,Zk)}},cA=sA,lA={beforeMount(e,t){e.clickOutsideEvent=n=>{e===n.target||e.contains(n.target)||t.value(n)},document.addEventListener(`click`,e.clickOutsideEvent)},unmounted(e){document.removeEventListener(`click`,e.clickOutsideEvent)}};const uA=Symbol(`modal`);var dA=null;function fA(){let e=(0,n.inject)(uA,null);if(!e){if(dA)return dA;throw Error(`Modal API not provided. Make sure ModalPlugin is installed via app.use(ModalPlugin)`)}return e}const pA={install:e=>{let t=(0,n.reactive)([]),r=e=>{e===void 0||e>=t.length-1?t.splice(t.length-1,1):t.splice(e,1)},i=()=>{t.splice(0,t.length)},a=e=>new Promise(r=>{let i=typeof e==`string`?{title:``,message:e}:e;t.push({modalOptions:(0,n.reactive)({...i,resolve:r}),modalType:`confirmModal`,componentSlots:{}})}),o=(e,r,i={})=>{let a=(0,n.reactive)(r);`visible`in a||(a.visible=!0);let o={modalOptions:a,modalType:e,componentSlots:i};return t.push(o),o},s={showModal:(e,t)=>o(`modal`,e,t),showModalForm:(e,t)=>o(`modalForm`,e,t),confirmModal:e=>a(e),hideModal:r,hideAllModals:i};dA||=s,e.provide(uA,s);let c=(0,n.defineComponent)({name:`ModalContainer`,setup(){return{modalStack:t,handleEscape:e=>{e.key===`Escape`&&t.length>0&&t[t.length-1].modalOptions.dismissable!==!1&&r()}}},mounted(){document.addEventListener(`keydown`,this.handleEscape)},unmounted(){document.removeEventListener(`keydown`,this.handleEscape)},render(){return this.modalStack.map((e,t)=>{let i=1e3+t*10;if(!e||!e.modalOptions)return console.error(`[BageLink Modal] Invalid modal in stack:`,e),null;let a={...e.modalOptions,visible:!0,zIndex:i,"onUpdate:visible":()=>{r(t)}};switch(e.modalType){case`modalForm`:return e.modalOptions.schema?(0,n.h)(kw,a,e.componentSlots):(console.error(`[BageLink Modal] ModalForm requires a schema`,e.modalOptions),null);case`confirmModal`:return(0,n.h)(Tw,a,{});default:return(0,n.h)(Sw,a,e.componentSlots)}})}});if(e.component(`ModalContainer`,c),typeof document<`u`&&typeof window<`u`){let t=()=>{if(!document.getElementById(`bagelink-modal-root`)){let t=document.createElement(`div`);t.id=`bagelink-modal-root`,document.body.appendChild(t);let r=(0,n.createApp)(c);r._context=e._context,r.mount(t)}};document.body&&t(),e.mixin({mounted(){this.$root===this&&t()}})}}};var mA=Object.defineProperty,hA=Object.getOwnPropertySymbols,gA=Object.prototype.hasOwnProperty,_A=Object.prototype.propertyIsEnumerable,vA=(e,t,n)=>t in e?mA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yA=(e,t)=>{for(var n in t||={})gA.call(t,n)&&vA(e,n,t[n]);if(hA)for(var n of hA(t))_A.call(t,n)&&vA(e,n,t[n]);return e},bA=e=>typeof e==`function`,xA=e=>typeof e==`string`,SA=e=>xA(e)&&e.trim().length>0,CA=e=>typeof e==`number`,wA=e=>e===void 0,TA=e=>typeof e==`object`&&!!e,EA=e=>MA(e,`tag`)&&SA(e.tag),DA=e=>window.TouchEvent&&e instanceof TouchEvent,OA=e=>MA(e,`component`)&&AA(e.component),kA=e=>bA(e)||TA(e),AA=e=>!wA(e)&&(xA(e)||kA(e)||OA(e)),jA=e=>TA(e)&&[`height`,`width`,`right`,`left`,`top`,`bottom`].every(t=>CA(e[t])),MA=(e,t)=>(TA(e)||bA(e))&&t in e,NA=(e=>()=>e++)(0);function PA(e){return DA(e)?e.targetTouches[0].clientX:e.clientX}function FA(e){return DA(e)?e.targetTouches[0].clientY:e.clientY}var IA=e=>{wA(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},LA=e=>OA(e)?LA(e.component):EA(e)?(0,n.defineComponent)({render(){return e}}):typeof e==`string`?e:(0,n.toRaw)((0,n.unref)(e)),RA=e=>{if(typeof e==`string`)return e;let t=MA(e,`props`)&&TA(e.props)?e.props:{},n=MA(e,`listeners`)&&TA(e.listeners)?e.listeners:{};return{component:LA(e),props:t,listeners:n}},zA=()=>typeof window<`u`,BA=class{constructor(){this.allHandlers={}}getHandlers(e){return this.allHandlers[e]||[]}on(e,t){let n=this.getHandlers(e);n.push(t),this.allHandlers[e]=n}off(e,t){let n=this.getHandlers(e);n.splice(n.indexOf(t)>>>0,1)}emit(e,t){this.getHandlers(e).forEach(e=>e(t))}},VA=e=>[`on`,`off`,`emit`].every(t=>MA(e,t)&&bA(e[t])),HA;(function(e){e.SUCCESS=`success`,e.ERROR=`error`,e.WARNING=`warning`,e.INFO=`info`,e.DEFAULT=`default`})(HA||={});var UA;(function(e){e.TOP_LEFT=`top-left`,e.TOP_CENTER=`top-center`,e.TOP_RIGHT=`top-right`,e.BOTTOM_LEFT=`bottom-left`,e.BOTTOM_CENTER=`bottom-center`,e.BOTTOM_RIGHT=`bottom-right`})(UA||={});var WA;(function(e){e.ADD=`add`,e.DISMISS=`dismiss`,e.UPDATE=`update`,e.CLEAR=`clear`,e.UPDATE_DEFAULTS=`update_defaults`})(WA||={});var GA=`Vue-Toastification`,KA={type:{type:String,default:HA.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},qA={type:KA.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},JA={component:{type:[String,Object,Function,Boolean],default:`button`},classNames:KA.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:`close`}},YA={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},XA={transition:{type:[Object,String],default:`${GA}__bounce`}},ZA={CORE_TOAST:{position:{type:String,default:UA.TOP_RIGHT},draggable:KA.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:KA.trueBoolean,pauseOnHover:KA.trueBoolean,closeOnClick:KA.trueBoolean,timeout:YA.timeout,hideProgressBar:YA.hideProgressBar,toastClassName:KA.classNames,bodyClassName:KA.classNames,icon:qA.customIcon,closeButton:JA.component,closeButtonClassName:JA.classNames,showCloseButtonOnHover:JA.showOnHover,accessibility:{type:Object,default:()=>({toastRole:`alert`,closeButtonLabel:`close`})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new BA}},TOAST:{id:{type:[String,Number],required:!0,default:0},type:KA.type,content:{type:[String,Object,Function],required:!0,default:``},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},CONTAINER:{container:{type:[Object,Function],default:()=>document.body},newestOnTop:KA.trueBoolean,maxToasts:{type:Number,default:20},transition:XA.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:KA.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},PROGRESS_BAR:YA,ICON:qA,TRANSITION:XA,CLOSE_BUTTON:JA},QA=(0,n.defineComponent)({name:`VtProgressBar`,props:ZA.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?`running`:`paused`,opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${GA}__progress-bar`:``}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener(`animationend`,this.animationEnded)},beforeUnmount(){this.$el.removeEventListener(`animationend`,this.animationEnded)},methods:{animationEnded(){this.$emit(`close-toast`)}}});function $A(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,{style:(0,n.normalizeStyle)(e.style),class:(0,n.normalizeClass)(e.cpClass)},null,6)}QA.render=$A;var ej=QA,tj=(0,n.defineComponent)({name:`VtCloseButton`,props:ZA.CLOSE_BUTTON,computed:{buttonComponent(){return this.component===!1?`button`:LA(this.component)},classes(){let e=[`${GA}__close-button`];return this.showOnHover&&e.push(`show-on-hover`),e.concat(this.classNames)}}}),nj=(0,n.createTextVNode)(` × `);function rj(e,t){return(0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.buttonComponent),(0,n.mergeProps)({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:(0,n.withCtx)(()=>[nj]),_:1},16,[`aria-label`,`class`])}tj.render=rj;var ij=tj,aj={},oj={"aria-hidden":`true`,focusable:`false`,"data-prefix":`fas`,"data-icon":`check-circle`,class:`svg-inline--fa fa-check-circle fa-w-16`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},sj=[(0,n.createElementVNode)(`path`,{fill:`currentColor`,d:`M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z`},null,-1)];function cj(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)(`svg`,oj,sj)}aj.render=cj;var lj=aj,uj={},dj={"aria-hidden":`true`,focusable:`false`,"data-prefix":`fas`,"data-icon":`info-circle`,class:`svg-inline--fa fa-info-circle fa-w-16`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},fj=[(0,n.createElementVNode)(`path`,{fill:`currentColor`,d:`M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z`},null,-1)];function pj(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)(`svg`,dj,fj)}uj.render=pj;var mj=uj,hj={},gj={"aria-hidden":`true`,focusable:`false`,"data-prefix":`fas`,"data-icon":`exclamation-circle`,class:`svg-inline--fa fa-exclamation-circle fa-w-16`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},_j=[(0,n.createElementVNode)(`path`,{fill:`currentColor`,d:`M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z`},null,-1)];function vj(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)(`svg`,gj,_j)}hj.render=vj;var yj=hj,bj={},xj={"aria-hidden":`true`,focusable:`false`,"data-prefix":`fas`,"data-icon":`exclamation-triangle`,class:`svg-inline--fa fa-exclamation-triangle fa-w-18`,role:`img`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 576 512`},Sj=[(0,n.createElementVNode)(`path`,{fill:`currentColor`,d:`M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z`},null,-1)];function Cj(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)(`svg`,xj,Sj)}bj.render=Cj;var wj=bj,Tj=(0,n.defineComponent)({name:`VtIcon`,props:ZA.ICON,computed:{customIconChildren(){return MA(this.customIcon,`iconChildren`)?this.trimValue(this.customIcon.iconChildren):``},customIconClass(){return xA(this.customIcon)?this.trimValue(this.customIcon):MA(this.customIcon,`iconClass`)?this.trimValue(this.customIcon.iconClass):``},customIconTag(){return MA(this.customIcon,`iconTag`)?this.trimValue(this.customIcon.iconTag,`i`):`i`},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:AA(this.customIcon)?LA(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[HA.DEFAULT]:mj,[HA.INFO]:mj,[HA.SUCCESS]:lj,[HA.ERROR]:wj,[HA.WARNING]:yj}[this.type]},iconClasses(){let e=[`${GA}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,t=``){return SA(e)?e.trim():t}}});function Ej(e,t){return(0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.component),{class:(0,n.normalizeClass)(e.iconClasses)},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(e.customIconChildren),1)]),_:1},8,[`class`])}Tj.render=Ej;var Dj=(0,n.defineComponent)({name:`VtToast`,components:{ProgressBar:ej,CloseButton:ij,Icon:Tj},inheritAttrs:!1,props:Object.assign({},ZA.CORE_TOAST,ZA.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){let e=[`${GA}__toast`,`${GA}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push(`disable-transition`),this.rtl&&e.push(`${GA}__toast--rtl`),e},bodyClasses(){return[`${GA}__toast-${xA(this.content)?`body`:`component-body`}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:`transform 0.2s, opacity 0.2s`,transform:`translateX(0)`,opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return jA(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:MA,getVueComponentFromObj:LA,closeToast(){this.eventBus.emit(WA.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener(`blur`,this.focusPause),addEventListener(`focus`,this.focusPlay)},focusCleanup(){removeEventListener(`blur`,this.focusPause),removeEventListener(`focus`,this.focusPlay)},draggableSetup(){let e=this.$el;e.addEventListener(`touchstart`,this.onDragStart,{passive:!0}),e.addEventListener(`mousedown`,this.onDragStart),addEventListener(`touchmove`,this.onDragMove,{passive:!1}),addEventListener(`mousemove`,this.onDragMove),addEventListener(`touchend`,this.onDragEnd),addEventListener(`mouseup`,this.onDragEnd)},draggableCleanup(){let e=this.$el;e.removeEventListener(`touchstart`,this.onDragStart),e.removeEventListener(`mousedown`,this.onDragStart),removeEventListener(`touchmove`,this.onDragMove),removeEventListener(`mousemove`,this.onDragMove),removeEventListener(`touchend`,this.onDragEnd),removeEventListener(`mouseup`,this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:PA(e),y:FA(e)},this.dragStart=PA(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&=!1,this.dragPos={x:PA(e),y:FA(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,jA(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),Oj=[`role`];function kj(e,t){let r=(0,n.resolveComponent)(`Icon`),i=(0,n.resolveComponent)(`CloseButton`),a=(0,n.resolveComponent)(`ProgressBar`);return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,{class:(0,n.normalizeClass)(e.classes),style:(0,n.normalizeStyle)(e.draggableStyle),onClick:t[0]||=(...t)=>e.clickHandler&&e.clickHandler(...t),onMouseenter:t[1]||=(...t)=>e.hoverPause&&e.hoverPause(...t),onMouseleave:t[2]||=(...t)=>e.hoverPlay&&e.hoverPlay(...t)},[e.icon?((0,n.openBlock)(),(0,n.createBlock)(r,{key:0,"custom-icon":e.icon,type:e.type},null,8,[`custom-icon`,`type`])):(0,n.createCommentVNode)(`v-if`,!0),(0,n.createElementVNode)(`div`,{role:e.accessibility.toastRole||`alert`,class:(0,n.normalizeClass)(e.bodyClasses)},[typeof e.content==`string`?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[(0,n.createTextVNode)((0,n.toDisplayString)(e.content),1)],2112)):((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.getVueComponentFromObj(e.content)),(0,n.mergeProps)({key:1,"toast-id":e.id},e.hasProp(e.content,`props`)?e.content.props:{},(0,n.toHandlers)(e.hasProp(e.content,`listeners`)?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,[`toast-id`,`onCloseToast`]))],10,Oj),e.closeButton?((0,n.openBlock)(),(0,n.createBlock)(i,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:(0,n.withModifiers)(e.closeToast,[`stop`])},null,8,[`component`,`class-names`,`show-on-hover`,`aria-label`,`onClick`])):(0,n.createCommentVNode)(`v-if`,!0),e.timeout?((0,n.openBlock)(),(0,n.createBlock)(a,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,[`is-running`,`hide-progress-bar`,`timeout`,`onCloseToast`])):(0,n.createCommentVNode)(`v-if`,!0)],38)}Dj.render=kj;var Aj=Dj,jj=(0,n.defineComponent)({name:`VtTransition`,props:ZA.TRANSITION,emits:[`leave`],methods:{hasProp:MA,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+`px`,e.style.top=e.offsetTop+`px`,e.style.width=getComputedStyle(e).width,e.style.position=`absolute`)}}});function Mj(e,t){return(0,n.openBlock)(),(0,n.createBlock)(n.TransitionGroup,{tag:`div`,"enter-active-class":e.transition.enter?e.transition.enter:`${e.transition}-enter-active`,"move-class":e.transition.move?e.transition.move:`${e.transition}-move`,"leave-active-class":e.transition.leave?e.transition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`default`)]),_:3},8,[`enter-active-class`,`move-class`,`leave-active-class`,`onLeave`])}jj.render=Mj;var Nj=(0,n.defineComponent)({name:`VueToastification`,devtools:{hide:!0},components:{Toast:Aj,VtTransition:jj},props:Object.assign({},ZA.CORE_TOAST,ZA.CONTAINER,ZA.TRANSITION),data(){return{count:0,positions:Object.values(UA),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){let e=this.eventBus;e.on(WA.ADD,this.addToast),e.on(WA.CLEAR,this.clearToasts),e.on(WA.DISMISS,this.dismissToast),e.on(WA.UPDATE,this.updateToast),e.on(WA.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(e){bA(e)&&(e=await e()),IA(this.$el),e.appendChild(this.$el)},setToast(e){wA(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=RA(e.content);let t=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),n=this.defaults.filterBeforeCreate(t,this.toastArray);n&&this.setToast(n)},dismissToast(e){let t=this.toasts[e];!wA(t)&&!wA(t.onClose)&&t.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach(e=>{this.dismissToast(e)})},getPositionToasts(e){let t=this.filteredToasts.filter(t=>t.position===e).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?t.reverse():t},updateDefaults(e){wA(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:t,create:n}){this.toasts[e]?(t.timeout&&t.timeout===this.toasts[e].timeout&&t.timeout++,this.setToast(Object.assign({},this.toasts[e],t))):n&&this.addToast(Object.assign({},{id:e},t))},getClasses(e){return[`${GA}__container`,e].concat(this.defaults.containerClassName)}}});function Pj(e,t){let r=(0,n.resolveComponent)(`Toast`),i=(0,n.resolveComponent)(`VtTransition`);return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,null,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.positions,t=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:t},[(0,n.createVNode)(i,{transition:e.defaults.transition,class:(0,n.normalizeClass)(e.getClasses(t))},{default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.getPositionToasts(t),e=>((0,n.openBlock)(),(0,n.createBlock)(r,(0,n.mergeProps)({key:e.id},e),null,16))),128))]),_:2},1032,[`transition`,`class`])]))),128))])}Nj.render=Pj;var Fj=Nj,Ij=(e={},t=!0)=>{let r=e.eventBus=e.eventBus||new BA;t&&(0,n.nextTick)(()=>{let t=(0,n.createApp)(Fj,yA({},e)),r=t.mount(document.createElement(`div`)),i=e.onMounted;if(wA(i)||i(r,t),e.shareAppContext){let n=e.shareAppContext;n===!0?console.warn(`[${GA}] App to share context with was not provided.`):(t._context.components=n._context.components,t._context.directives=n._context.directives,t._context.mixins=n._context.mixins,t._context.provides=n._context.provides,t.config.globalProperties=n.config.globalProperties)}});let i=(e,t)=>{let n=Object.assign({},{id:NA(),type:HA.DEFAULT},t,{content:e});return r.emit(WA.ADD,n),n.id};i.clear=()=>r.emit(WA.CLEAR,void 0),i.updateDefaults=e=>{r.emit(WA.UPDATE_DEFAULTS,e)},i.dismiss=e=>{r.emit(WA.DISMISS,e)};function a(e,{content:t,options:n},i=!1){let a=Object.assign({},n,{content:t});r.emit(WA.UPDATE,{id:e,options:a,create:i})}return i.update=a,i.success=(e,t)=>i(e,Object.assign({},t,{type:HA.SUCCESS})),i.info=(e,t)=>i(e,Object.assign({},t,{type:HA.INFO})),i.error=(e,t)=>i(e,Object.assign({},t,{type:HA.ERROR})),i.warning=(e,t)=>i(e,Object.assign({},t,{type:HA.WARNING})),i},Lj=()=>{let e=()=>console.warn(`[${GA}] This plugin does not support SSR!`);return new Proxy(e,{get(){return e}})};function Rj(e){return zA()?VA(e)?Ij({eventBus:e},!1):Ij(e,!0):Lj()}var zj=Symbol(`VueToastification`),Bj=new BA,Vj=(e,t)=>{t?.shareAppContext===!0&&(t.shareAppContext=e);let n=Rj(yA({eventBus:Bj},t));e.provide(zj,n)},Hj=e=>e?Rj(e):((0,n.getCurrentInstance)()?(0,n.inject)(zj,void 0):void 0)||Rj(Bj),Uj=Vj;const Wj=Symbol(`toast`);var Gj=null;function Kj(){let e=(0,n.inject)(Wj,null);if(!e){if(Gj)return Gj;throw Error(`Toast API not provided. Make sure ToastPlugin is installed via app.use(ToastPlugin)`)}return e}const qj={install:(e,t={})=>{let n={position:UA.TOP_RIGHT,timeout:3e3,closeOnClick:!0,pauseOnFocusLoss:!0,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!1,closeButton:`button`,icon:!0,rtl:!1,transition:`Vue-Toastification__fade`,maxToasts:5,newestOnTop:!0,...t};e.use(Uj,n);let r={success:(e,t)=>Hj().success(e,t),error:(e,t)=>Hj().error(e,t),info:(e,t)=>Hj().info(e,t),warning:(e,t)=>Hj().warning(e,t),show:(e,t)=>Hj()(e,t),clear:()=>{Hj().clear()}};Gj||=r,e.provide(Wj,r)}},Jj=Symbol(`bagel`);function Yj(e=Jj){let t=(0,n.inject)(e);if(!t)throw Error(`No i18nT provided`);return t}const Xj={install:(e,t={})=>{e.directive(`click-outside`,lA),e.directive(`ripple`,jk),e.directive(`pattern`,kk),e.use(cA),e.use(pA),e.use(qj,t.toast||{}),e.use(Uo,{themes:{"bgl-theme":{triggers:[`click`],autoHide:!0,placement:`bottom`}}});let{availableLangs:n,defaultLang:r,lang:i}=bs();t.availableLangs&&(n.value=t.availableLangs),t.defaultLang&&(r.value=t.defaultLang),t.language&&(i.value=t.language),e.config.globalProperties.$i18T=t.i18nT||(e=>e),e.provide(Jj,t.i18nT||(e=>e))}};var Zj=[[`Afghanistan (افغانستان)`,`AF`,`93`],[`Albania (Shqipëri)`,`AL`,`355`],[`Algeria (الجزائر)`,`DZ`,`213`],[`American Samoa`,`AS`,`1`,5,[`684`]],[`Andorra`,`AD`,`376`],[`Angola`,`AO`,`244`],[`Anguilla`,`AI`,`1`,6,[`264`]],[`Antigua and Barbuda`,`AG`,`1`,7,[`268`]],[`Argentina`,`AR`,`54`],[`Armenia (Հայաստան)`,`AM`,`374`],[`Aruba`,`AW`,`297`],[`Ascension Island`,`AC`,`247`],[`Australia`,`AU`,`61`,0],[`Austria (Österreich)`,`AT`,`43`],[`Azerbaijan (Azərbaycan)`,`AZ`,`994`],[`Bahamas`,`BS`,`1`,8,[`242`]],[`Bahrain (البحرين)`,`BH`,`973`],[`Bangladesh (বাংলাদেশ)`,`BD`,`880`],[`Barbados`,`BB`,`1`,9,[`246`]],[`Belarus (Беларусь)`,`BY`,`375`],[`Belgium (België)`,`BE`,`32`],[`Belize`,`BZ`,`501`],[`Benin (Bénin)`,`BJ`,`229`],[`Bermuda`,`BM`,`1`,10,[`441`]],[`Bhutan (འབྲུག)`,`BT`,`975`],[`Bolivia`,`BO`,`591`],[`Bosnia and Herzegovina (Босна и Херцеговина)`,`BA`,`387`],[`Botswana`,`BW`,`267`],[`Brazil (Brasil)`,`BR`,`55`],[`British Indian Ocean Territory`,`IO`,`246`],[`British Virgin Islands`,`VG`,`1`,11,[`284`]],[`Brunei`,`BN`,`673`],[`Bulgaria (България)`,`BG`,`359`],[`Burkina Faso`,`BF`,`226`],[`Burundi (Uburundi)`,`BI`,`257`],[`Cambodia (កម្ពុជា)`,`KH`,`855`],[`Cameroon (Cameroun)`,`CM`,`237`],[`Canada`,`CA`,`1`,1,`204.226.236.249.250.263.289.306.343.354.365.367.368.382.387.403.416.418.428.431.437.438.450.584.468.474.506.514.519.548.579.581.584.587.604.613.639.647.672.683.705.709.742.753.778.780.782.807.819.825.867.873.902.905`.split(`.`)],[`Cape Verde (Kabu Verdi)`,`CV`,`238`],[`Caribbean Netherlands`,`BQ`,`599`,1,[`3`,`4`,`7`]],[`Cayman Islands`,`KY`,`1`,12,[`345`]],[`Central African Republic (République centrafricaine)`,`CF`,`236`],[`Chad (Tchad)`,`TD`,`235`],[`Chile`,`CL`,`56`],[`China (中国)`,`CN`,`86`],[`Christmas Island`,`CX`,`61`,2,[`89164`]],[`Cocos (Keeling) Islands`,`CC`,`61`,1,[`89162`]],[`Colombia`,`CO`,`57`],[`Comoros (جزر القمر)`,`KM`,`269`],[`Congo (DRC) (République démocratique du Congo)`,`CD`,`243`],[`Congo (Republic) (Congo-Brazzaville)`,`CG`,`242`],[`Cook Islands`,`CK`,`682`],[`Costa Rica`,`CR`,`506`],[`Côte d’Ivoire`,`CI`,`225`],[`Croatia (Hrvatska)`,`HR`,`385`],[`Cuba`,`CU`,`53`],[`Curaçao`,`CW`,`599`,0],[`Cyprus (Κύπρος)`,`CY`,`357`],[`Czech Republic (Česká republika)`,`CZ`,`420`],[`Denmark (Danmark)`,`DK`,`45`],[`Djibouti`,`DJ`,`253`],[`Dominica`,`DM`,`1`,13,[`767`]],[`Dominican Republic (República Dominicana)`,`DO`,`1`,2,[`809`,`829`,`849`]],[`Ecuador`,`EC`,`593`],[`Egypt (مصر)`,`EG`,`20`],[`El Salvador`,`SV`,`503`],[`Equatorial Guinea (Guinea Ecuatorial)`,`GQ`,`240`],[`Eritrea`,`ER`,`291`],[`Estonia (Eesti)`,`EE`,`372`],[`Eswatini`,`SZ`,`268`],[`Ethiopia`,`ET`,`251`],[`Falkland Islands (Islas Malvinas)`,`FK`,`500`],[`Faroe Islands (Føroyar)`,`FO`,`298`],[`Fiji`,`FJ`,`679`],[`Finland (Suomi)`,`FI`,`358`,0],[`France`,`FR`,`33`],[`French Guiana (Guyane française)`,`GF`,`594`],[`French Polynesia (Polynésie française)`,`PF`,`689`],[`Gabon`,`GA`,`241`],[`Gambia`,`GM`,`220`],[`Georgia (საქართველო)`,`GE`,`995`],[`Germany (Deutschland)`,`DE`,`49`],[`Ghana (Gaana)`,`GH`,`233`],[`Gibraltar`,`GI`,`350`],[`Greece (Ελλάδα)`,`GR`,`30`],[`Greenland (Kalaallit Nunaat)`,`GL`,`299`],[`Grenada`,`GD`,`1`,14,[`473`]],[`Guadeloupe`,`GP`,`590`,0],[`Guam`,`GU`,`1`,15,[`671`]],[`Guatemala`,`GT`,`502`],[`Guernsey`,`GG`,`44`,1,[`1481`,`7781`,`7839`,`7911`]],[`Guinea (Guinée)`,`GN`,`224`],[`Guinea-Bissau (Guiné Bissau)`,`GW`,`245`],[`Guyana`,`GY`,`592`],[`Haiti`,`HT`,`509`],[`Honduras`,`HN`,`504`],[`Hong Kong (香港)`,`HK`,`852`],[`Hungary (Magyarország)`,`HU`,`36`],[`Iceland (Ísland)`,`IS`,`354`],[`India (भारत)`,`IN`,`91`],[`Indonesia`,`ID`,`62`],[`Iran (ایران)`,`IR`,`98`],[`Iraq (العراق)`,`IQ`,`964`],[`Ireland`,`IE`,`353`],[`Isle of Man`,`IM`,`44`,2,[`1624`,`74576`,`7524`,`7924`,`7624`]],[`Israel (ישראל)`,`IL`,`972`],[`Italy (Italia)`,`IT`,`39`,0],[`Jamaica`,`JM`,`1`,4,[`876`,`658`]],[`Japan (日本)`,`JP`,`81`],[`Jersey`,`JE`,`44`,3,[`1534`,`7509`,`7700`,`7797`,`7829`,`7937`]],[`Jordan (الأردن)`,`JO`,`962`],[`Kazakhstan (Казахстан)`,`KZ`,`7`,1,[`33`,`7`]],[`Kenya`,`KE`,`254`],[`Kiribati`,`KI`,`686`],[`Kosovo`,`XK`,`383`],[`Kuwait (الكويت)`,`KW`,`965`],[`Kyrgyzstan (Кыргызстан)`,`KG`,`996`],[`Laos (ລາວ)`,`LA`,`856`],[`Latvia (Latvija)`,`LV`,`371`],[`Lebanon (لبنان)`,`LB`,`961`],[`Lesotho`,`LS`,`266`],[`Liberia`,`LR`,`231`],[`Libya (ليبيا)`,`LY`,`218`],[`Liechtenstein`,`LI`,`423`],[`Lithuania (Lietuva)`,`LT`,`370`],[`Luxembourg`,`LU`,`352`],[`Macau (澳門)`,`MO`,`853`],[`Madagascar (Madagasikara)`,`MG`,`261`],[`Malawi`,`MW`,`265`],[`Malaysia`,`MY`,`60`],[`Maldives`,`MV`,`960`],[`Mali`,`ML`,`223`],[`Malta`,`MT`,`356`],[`Marshall Islands`,`MH`,`692`],[`Martinique`,`MQ`,`596`],[`Mauritania (موريتانيا)`,`MR`,`222`],[`Mauritius (Moris)`,`MU`,`230`],[`Mayotte`,`YT`,`262`,1,[`269`,`639`]],[`Mexico (México)`,`MX`,`52`],[`Micronesia`,`FM`,`691`],[`Moldova (Republica Moldova)`,`MD`,`373`],[`Monaco`,`MC`,`377`],[`Mongolia (Монгол)`,`MN`,`976`],[`Montenegro (Crna Gora)`,`ME`,`382`],[`Montserrat`,`MS`,`1`,16,[`664`]],[`Morocco (المغرب)`,`MA`,`212`,0],[`Mozambique (Moçambique)`,`MZ`,`258`],[`Myanmar (Burma) (မြန်မာ)`,`MM`,`95`],[`Namibia (Namibië)`,`NA`,`264`],[`Nauru`,`NR`,`674`],[`Nepal (नेपाल)`,`NP`,`977`],[`Netherlands (Nederland)`,`NL`,`31`],[`New Caledonia (Nouvelle-Calédonie)`,`NC`,`687`],[`New Zealand`,`NZ`,`64`],[`Nicaragua`,`NI`,`505`],[`Niger (Nijar)`,`NE`,`227`],[`Nigeria`,`NG`,`234`],[`Niue`,`NU`,`683`],[`Norfolk Island`,`NF`,`672`],[`North Korea (조선 민주주의 인민 공화국)`,`KP`,`850`],[`North Macedonia (Северна Македонија)`,`MK`,`389`],[`Northern Mariana Islands`,`MP`,`1`,17,[`670`]],[`Norway (Norge)`,`NO`,`47`,0],[`Oman (عُمان)`,`OM`,`968`],[`Pakistan (پاکستان)`,`PK`,`92`],[`Palau`,`PW`,`680`],[`Palestine (فلسطين)`,`PS`,`970`],[`Panama (Panamá)`,`PA`,`507`],[`Papua New Guinea`,`PG`,`675`],[`Paraguay`,`PY`,`595`],[`Peru (Perú)`,`PE`,`51`],[`Philippines`,`PH`,`63`],[`Poland (Polska)`,`PL`,`48`],[`Portugal`,`PT`,`351`],[`Puerto Rico`,`PR`,`1`,3,[`787`,`939`]],[`Qatar (قطر)`,`QA`,`974`],[`Réunion (La Réunion)`,`RE`,`262`,0],[`Romania (România)`,`RO`,`40`],[`Russia (Россия)`,`RU`,`7`,0],[`Rwanda`,`RW`,`250`],[`Saint Barthélemy`,`BL`,`590`,1],[`Saint Helena`,`SH`,`290`],[`Saint Kitts and Nevis`,`KN`,`1`,18,[`869`]],[`Saint Lucia`,`LC`,`1`,19,[`758`]],[`Saint Martin (Saint-Martin (partie française))`,`MF`,`590`,2],[`Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)`,`PM`,`508`],[`Saint Vincent and the Grenadines`,`VC`,`1`,20,[`784`]],[`Samoa`,`WS`,`685`],[`San Marino`,`SM`,`378`],[`São Tomé and Príncipe (São Tomé e Príncipe)`,`ST`,`239`],[`Saudi Arabia (المملكة العربية السعودية)`,`SA`,`966`],[`Senegal (Sénégal)`,`SN`,`221`],[`Serbia (Србија)`,`RS`,`381`],[`Seychelles`,`SC`,`248`],[`Sierra Leone`,`SL`,`232`],[`Singapore`,`SG`,`65`],[`Sint Maarten`,`SX`,`1`,21,[`721`]],[`Slovakia (Slovensko)`,`SK`,`421`],[`Slovenia (Slovenija)`,`SI`,`386`],[`Solomon Islands`,`SB`,`677`],[`Somalia (Soomaaliya)`,`SO`,`252`],[`South Africa`,`ZA`,`27`],[`South Korea (대한민국)`,`KR`,`82`],[`South Sudan (جنوب السودان)`,`SS`,`211`],[`Spain (España)`,`ES`,`34`],[`Sri Lanka (ශ්‍රී ලංකාව)`,`LK`,`94`],[`Sudan (السودان)`,`SD`,`249`],[`Suriname`,`SR`,`597`],[`Svalbard and Jan Mayen`,`SJ`,`47`,1,[`79`]],[`Sweden (Sverige)`,`SE`,`46`],[`Switzerland (Schweiz)`,`CH`,`41`],[`Syria (سوريا)`,`SY`,`963`],[`Taiwan (台灣)`,`TW`,`886`],[`Tajikistan`,`TJ`,`992`],[`Tanzania`,`TZ`,`255`],[`Thailand (ไทย)`,`TH`,`66`],[`Timor-Leste`,`TL`,`670`],[`Togo`,`TG`,`228`],[`Tokelau`,`TK`,`690`],[`Tonga`,`TO`,`676`],[`Trinidad and Tobago`,`TT`,`1`,22,[`868`]],[`Tunisia (تونس)`,`TN`,`216`],[`Turkey (Türkiye)`,`TR`,`90`],[`Turkmenistan`,`TM`,`993`],[`Turks and Caicos Islands`,`TC`,`1`,23,[`649`]],[`Tuvalu`,`TV`,`688`],[`U.S. Virgin Islands`,`VI`,`1`,24,[`340`]],[`Uganda`,`UG`,`256`],[`Ukraine (Україна)`,`UA`,`380`],[`United Arab Emirates (الإمارات العربية المتحدة)`,`AE`,`971`],[`United Kingdom`,`GB`,`44`,0],[`United States`,`US`,`1`,0],[`Uruguay`,`UY`,`598`],[`Uzbekistan (Oʻzbekiston)`,`UZ`,`998`],[`Vanuatu`,`VU`,`678`],[`Vatican City (Città del Vaticano)`,`VA`,`39`,1,[`06698`]],[`Venezuela`,`VE`,`58`],[`Vietnam (Việt Nam)`,`VN`,`84`],[`Wallis and Futuna (Wallis-et-Futuna)`,`WF`,`681`],[`Western Sahara (الصحراء الغربية)`,`EH`,`212`,1,[`5288`,`5289`]],[`Yemen (اليمن)`,`YE`,`967`],[`Zambia`,`ZM`,`260`],[`Zimbabwe`,`ZW`,`263`],[`Åland Islands`,`AX`,`358`,1,[`18`]]];const Qj=Zj.map(([e,t,n,r=0,i=[]])=>({name:e,iso2:t,dialCode:n,priority:r,areaCodes:i}));function $j(e,t){console.log(`date`,e),e=new Date(e),console.log(`date`,e);let n=t.Day||t.day||t.days||0,r=t.Hour||t.hour||t.hours||0,i=t.Minute||t.minute||t.minutes||0,a=t.Second||t.second||t.seconds||0,o=t.Week||t.week||t.weeks||0,s=t.Month||t.month||t.months||0,c=t.Year||t.year||t.years||0;return n&&e.setDate(e.getDate()+n),r&&e.setHours(e.getHours()+r),i&&e.setMinutes(e.getMinutes()+i),a&&e.setSeconds(e.getSeconds()+a),o&&e.setDate(e.getDate()+o*7),s&&e.setMonth(e.getMonth()+s),c&&e.setFullYear(e.getFullYear()+c),e}var eM={en:{year:`year`,month:`month`,week:`week`,day:`day`,hour:`hour`,minute:`minute`,second:`second`,ago:`ago`,in:`in`,justNow:`Just now`},es:{year:`año`,month:`mes`,week:`semana`,day:`día`,hour:`hora`,minute:`minuto`,second:`segundo`,ago:`hace`,in:`en`,justNow:`Justo ahora`},fr:{year:`an`,month:`mois`,week:`semaine`,day:`jour`,hour:`heure`,minute:`minute`,second:`seconde`,ago:`il y a`,in:`dans`,justNow:`À l'instant`},he:{year:{singular:`שנה`,plural:`שנים`},month:{singular:`חודש`,plural:`חודשים`},week:{singular:`שבוע`,plural:`שבועות`},day:{singular:`יום`,plural:`ימים`},hour:{singular:`שעה`,plural:`שעות`},minute:{singular:`דקה`,plural:`דקות`},second:{singular:`שנייה`,plural:`שניות`},ago:`לפני`,in:`בעוד`,justNow:`זה עתה`}};function tM(e,t){if(!e)return``;typeof e==`string`&&(e=new Date(e));let n=typeof t==`string`?t:t?.lang||`en`,r=(typeof t==`object`&&t.mode||`relative`)===`relative`,i=new Date().getTime(),a=e.getTime(),o=Math.floor((a-i)/1e3),s=[{label:`year`,seconds:31536e3},{label:`month`,seconds:2592e3},{label:`week`,seconds:604800},{label:`day`,seconds:86400},{label:`hour`,seconds:3600},{label:`minute`,seconds:60},{label:`second`,seconds:1}],c=eM[n];for(let e of s){let t=Math.floor(Math.abs(o)/e.seconds);if(t>=1){let i=r&&o<0?` ${c.ago}`:``,a=r&&o>0&&c.in!==`in`?`${c.in} `:``;if(n===`he`){let n=c[e.label],i=t===1?n.singular:n.plural,a=r?o<0?`${c.ago} `:o>0?`${c.in} `:``:``;if(e.label===`day`&&o>0){let e=Math.floor(Math.abs(o)%86400/3600),n=c.hour,r=e===1?n.singular:n.plural;return`${a}${t===1?i:`${t} ${i}`}${e>0?e===1?` ${r}`:` ${e} ${r}`:``}`}return`${a}${t===1?i:`${t} ${i}`}`}if(e.label===`day`&&o>0){let n=Math.floor(Math.abs(o)%86400/3600),r=n>1?`${c.hour}s`:c.hour;return`${a}${t} ${c[e.label]}${n>0?` ${n} ${r}`:``}${i}`}return`${a}${t} ${c[e.label]}${i}`}}return c.justNow}function nM(){return typeof navigator==`object`?navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language:`en-US`}function rM(e,t){if(t.timeZone===`UTC`){let t=new Date(e.getTime());return t.setMinutes(t.getMinutes()+e.getTimezoneOffset()),t}try{let n=new Intl.DateTimeFormat(`en-US`,{...t,month:`numeric`}).formatToParts(e),r={};return n.forEach(e=>{e.type!==`literal`&&e.type!==`timeZoneName`&&(r[e.type]=Number.parseInt(e.value,10))}),new Date(r.year,(r.month||1)-1,r.day,r.hour||0,r.minute||0,r.second||0)}catch(n){return console.warn(`Error handling timezone ${t.timeZone}:`,n),e}}function iM(e,t,n){let r=n?.timeZone?rM(e,n):e,i=r.getFullYear().toString();return{AmPm:r.toLocaleString(t,{hour:`numeric`,hour12:!0,minute:`numeric`}).split(` `)[1],DD:String(r.getDate()).padStart(2,`0`),DDD:r.toLocaleString(t,{weekday:`short`}),DDDD:r.toLocaleString(t,{weekday:`long`}),HH:String(r.getHours()).padStart(2,`0`),mm:String(r.getMinutes()).padStart(2,`0`),MM:String(r.getMonth()+1).padStart(2,`0`),MMM:r.toLocaleString(t,{month:`short`}),MMMM:r.toLocaleString(t,{month:`long`}),ss:String(r.getSeconds()).padStart(2,`0`),sss:String(r.getMilliseconds()).padStart(3,`0`),YY:i.slice(-2),YYYY:i}}var aM=iM(new Date,nM()),oM=Object.keys(aM).sort((e,t)=>t.length-e.length),sM=new RegExp(oM.map(e=>e).join(`|`),`g`);function cM(e,t){let n,r,i,a={};if(typeof t==`string`?n=t:t&&typeof t==`object`&&(n=t.fmt,r=t.locale,i=t.tz,a=t),!e)return``;n||=`DD.MM.YY`,r||=nM();try{let t=typeof e==`string`||typeof e==`number`?new Date(e):e;if(Number.isNaN(t.getTime()))return console.warn(`Invalid date provided to formatDate:`,e),``;let o={day:`numeric`,hour:`2-digit`,hour12:a.hour12===void 0?!0:a.hour12,minute:`2-digit`,month:`long`,second:`2-digit`,timeZone:i,weekday:`long`,year:`numeric`},s=iM(t,r,o),c=new Intl.DateTimeFormat(r,o).formatToParts(t),l={};return c.forEach(e=>{e.type!==`literal`&&(l[e.type]=e.value)}),l.month&&(s.MMM=l.month.substring(0,3),s.MMMM=l.month),l.weekday&&(s.DDD=l.weekday.substring(0,3),s.DDDD=l.weekday),l.dayPeriod&&(s.AmPm=l.dayPeriod),n.replace(sM,e=>s[e])}catch(t){return console.warn(`Error formatting date: ${e} with format: ${n}`,t),``}}const lM=cM;function uM(e,t,n){let r,i=``,a,o={};if(typeof e==`object`&&e){o=e;let{id:t,text:n,icon:s}=o;r=t,i=n??``,a=s}else r=e,t!=null&&(typeof t==`string`&&t.length<=30&&!t.includes(` `)&&(t.includes(`-`)||t.includes(`_`)||t.length<=12)&&t===t.toLowerCase()?(a=t,n&&(o=n)):(i=t,n&&(o=n)));return{$el:`btn`,id:r,class:o.class,vIf:o.vIf,style:o.style,onClick:o.onClick,attrs:{value:i||(o.text??``)||``,variant:o.variant,size:o.size,disabled:o.disabled,loading:o.loading,icon:a??o.icon,iconPosition:o.iconPosition,href:o.href,target:o.target}}}function dM(e,t,n={}){return{$el:e,id:t,class:n.class,vIf:n.vIf,style:n.style,attrs:n.attrs||{},onClick:n.onClick}}function fM(e,t,n){return t!=null&&e!=null?uM(e,t,n||{}):uM({id:e,icon:t,...n})}function pM(e,t,n){let r,i={};if(typeof e==`object`&&e){i=e;let{id:t}=i;r=t}else r=e,t!=null&&(i=typeof n==`string`?{tag:n,text:t}:n?{...n,text:t}:{text:t});return{$el:i.tag||`p`,id:r,class:i.class,vIf:i.vIf,style:i.style,attrs:{text:i.text??``,size:i.size,weight:i.weight,color:i.color,align:i.align},transform:i.transform}}function mM(e,t,n){let r,i={};if(typeof e==`object`&&e){i=e;let{id:t}=i;r=t}else r=e,t!=null&&(typeof n==`string`?i={alt:n}:n&&(i=n));return{$el:`img`,id:r,class:i.class,vIf:i.vIf,style:i.style,transform:i.transform,attrs:{alt:i.alt,width:i.width,height:i.height,loading:i.loading,fit:i.fit,rounded:i.rounded,fallback:i.fallback}}}function hM(e){return{$el:`pill`,id:e?.id,class:e?.class,vIf:e?.vIf,style:e?.style,attrs:e?.attrs||{}}}function gM(...e){let t,r=[];if(e.length>0){let n=e[0];typeof n==`object`&&n&&`$el`in n?r=e:(t=n,r=e.slice(1))}let i={};return t?.attrs&&Object.assign(i,t.attrs),t&&(t.options!=null&&(i.options=t.options),t.placeholder!=null&&(i.placeholder=t.placeholder),t.searchable!=null&&(i.searchable=t.searchable),t.multiselect!=null&&(i.multiselect=t.multiselect),t.clearable!=null&&(i.clearable=t.clearable),t.onSelect!=null&&(i.onSelect=t.onSelect),t.onSearch!=null&&(i.onSearch=t.onSearch)),{$el:(0,n.markRaw)(Go),class:t?.class,vIf:t?.vIf,style:t?.style,attrs:i,children:r}}function _M(e,t){return{$el:(0,n.markRaw)(YC),id:t?.id,class:t?.class,vIf:t?.vIf,style:t?.style,onClick:t?.onClick,attrs:{thin:!0,title:e??t?.title??``,subtitle:t?.subtitle,icon:t?.icon,avatar:t?.avatar,badge:t?.badge,actions:t?.actions,clickable:t?.clickable,divider:t?.divider}}}function vM(e,t,n){return{$el:`div`,id:e,class:n?.class??`flex gap-2`,vIf:n?.vIf,style:n?.style,attrs:n?.attrs||{},children:t}}function yM(e,t){for(let n of t){if(n.id===e)return n;if(n.children&&n.children.length>0){let t=yM(e,n.children);if(t)return t}}}function bM(e,t,n){let r;return typeof t==`string`?r=t:n=t,{$el:`div`,id:e,class:n?.class??`column-class`,vIf:n?.vIf,style:n?.style,transform:n?.transform,attrs:{...n?.attrs,label:r??n?.attrs?.label??``},children:n?.children}}const xM=bM;function SM(){return{btn:uM,iconBtn:fM,txt:pM,img:mM,dropdown:gM,listItem:_M,container:vM,findElementById:yM,getBaseElementField:dM,col:xM,column:bM}}async function CM(){let e=sessionStorage.getItem(`ipapi`);return e||(e=(await kx.get(`https://ipapi.co/json/`)).data,e=JSON.stringify(e),sessionStorage.setItem(`ipapi`,e)),JSON.parse(e)}var wM={"":/<[^>]*>?/g," ":/&nbsp;/g,'"':/&quot;/g,"'":/&apos;/g,"&":/&amp;/g,"<":/&lt;/g,">":/&gt;/g};function TM(e){return e?Object.entries(wM).reduce((e,[t,n])=>e.replace(n,t),e):``}var EM=/[\p{N}\p{L}\s]/gu;function DM(e){return e.match(EM)?.join(``).toLowerCase()??``}function OM(e,t){let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r}function kM(e,t){let n=0;if(e.length===0)return 0;let r=0;for(let i of t)if(e.includes(i)){let t=new RegExp(i,`g`),a=e.match(t);a&&(r+=a.length*i.length),n+=1,e.split(/\s+/).includes(i)&&(n+=.5),e.startsWith(i)&&(n+=.5)}let i=Math.min(1,r/e.length);return n*=1+i*2,n}function AM(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`}function jM(e){return e==null?``:typeof e==`string`?TM(e):typeof e==`number`||typeof e==`boolean`?String(e):typeof e==`object`&&e instanceof Date?e.toISOString():``}function MM(e){let{searchTerm:t,items:r=[],keysToSearch:i,fieldWeights:a={},minChars:o=2}=e,s=(0,n.toValue)(t),c=(0,n.toValue)(r)||[];if(!s||s.length<o)return c;let l=DM(s).split(/\s+/).filter(e=>e.length>1);if(l.length===0)return c;let u={name:2,first_name:2,last_name:2,title:2,headline:2,description:.7,subtitle:.7,bio:.7,content:.7,body:.7,email:.7,phone:.7,id:.3,created_at:.3,updated_at:.3};function d(e){if(e in a){let t=a[e];if(typeof t==`number`)return t}let t=e.split(`.`).pop()||``;return t in u?u[t]:1}function f(e,t=``){return!e||typeof e!=`object`?[]:Object.keys(e).flatMap(n=>{let r=e[n],i=t?`${t}.${n}`:n;return r&&typeof r==`object`&&!Array.isArray(r)?[i,...f(r,i)]:[i]})}function p(e){let t=0;if(AM(e))return kM(DM(String(e)),l);if(Array.isArray(e)){for(let n of e)if(AM(n)){let e=DM(String(n));t+=kM(e,l)}return t}let n=i||f(e);for(let r of n){let n=OM(e,String(r));if(n==null)continue;if(Array.isArray(n)){for(let e of n)if(AM(e)){let n=kM(DM(TM(String(e))),l),i=d(String(r));t+=n*i}continue}if(typeof n==`object`&&!AM(n))continue;let i=kM(DM(jM(n)),l),a=d(String(r));t+=i*a}return t}let m=c.map(e=>[e,p(e)]).filter(([,e])=>e>0),h=m;if(m.length>0){let e=Math.max(...m.map(([,e])=>e));if(e>5){let t=e*.25;h=m.filter(([,e])=>e>=t)}else if(e>2){let t=e*.15;h=m.filter(([,e])=>e>=t)}}return h.sort(([,e],[,t])=>t-e).map(([e])=>e)}function NM(e,t){let r,i,a=Array.isArray(e),o=typeof e==`function`,s=typeof e==`object`&&!!e&&`value`in e&&!(`items`in e);a||o||s?(i=(0,n.ref)(``),r={items:e,searchTerm:i,...t}):r=e;let{searchTerm:c,minChars:l=2,serverSearch:u,debounceMs:d=300}=r,f=(0,n.ref)(!1),p=(0,n.ref)([]),m=null;u&&(0,n.watch)(()=>(0,n.toValue)(c),async e=>{m!==null&&clearTimeout(m);let t=typeof e==`string`?e:``;if(t.length<l&&l>0){p.value=[];return}m=window.setTimeout(async()=>{try{f.value=!0,p.value=await u(t)}catch(e){console.error(`Server search error:`,e),p.value=[]}finally{f.value=!1}},d)},{immediate:!0});let h=()=>(0,n.toValue)(c),g=()=>{let e=h();return u&&(e&&typeof e==`string`&&e.length>=l||l===0)?p.value:MM(r)},_=(0,n.computed)(()=>g()),v=(0,n.computed)(()=>_.value.length),y={results:_,resultCount:v,hasResults:(0,n.computed)(()=>v.value>0),isSearching:(0,n.computed)(()=>{let e=h();return!!e&&typeof e==`string`&&e.length>=l}),isLoading:(0,n.computed)(()=>f.value)};return i&&(y.searchTerm=i),y}exports.Accordion=a,exports.AccordionItem=d,exports.AddToCalendar=_,exports.AddressSearch=m,exports.Alert=w,exports.AppContent=sC,exports.AppLayout=dC,exports.AppSidebar=yC,exports.ArrayInput=hc,exports.Avatar=We,exports.Badge=Ke,exports.BagelForm=Js,exports.BglForm=Js,exports.BagelMultiStepForm=rc,exports.BagelVue=Xj,exports.BarChart=j,exports.BglVideo=tn,exports.BottomMenu=SC,exports.Btn=b,exports.Calendar=er,exports.Card=rr,exports.Carousel=ur,exports.CheckInput=Cc,exports.Checkbox=vc,exports.CodeEditor=jc,exports.ColorInput=Fc,exports.DataPreview=Sr,exports.DataTable=Pr,exports.TableSchema=Pr,exports.DateInput=al,exports.DatePicker=el,exports.DragOver=Vr,exports.Draggable=Lr,exports.Dropdown=Go,exports.EMAIL_REGEX=ul,exports.EmailInput=yl,exports.FORM_STATE_KEY=HO,exports.FieldArray=dc,exports.FieldSetVue=Yo,exports.Flag=Zo,exports.IMAGE_FORMATS=ol,exports.IMAGE_FORMATS_REGEXP=sl,exports.Icon=$,exports.IframeVue=cS,exports.Image=pS,exports.ImportData=nC,exports.JSONInput=wl,exports.KpiCard=ne,exports.Layout=wC,exports.LineChart=ge,exports.ListItem=YC,exports.ListView=tw,exports.Loading=sw,exports.MapEmbed=fw,exports.Menu=yw,exports.Modal=Sw,exports.ModalConfirm=Tw,exports.ModalForm=kw,exports.ModalPlugin=pA,exports.NavBar=Lw,exports.NumberInput=jl,exports.OTP=Pl,exports.PageTitle=Vw,exports.Pagination=Gw,exports.PasswordInput=Rl,exports.PieChart=Ve,exports.Pill=nT,exports.RadioGroup=Kl,exports.RadioPillsInput=$l,exports.RangeInput=cu,exports.Rating=aT,exports.RichText=Hd,exports.RouterWrapper=cT,exports.SelectBtn=Gd,exports.SelectInput=yu,exports.SidebarMenu=DC,exports.SignaturePad=ef,exports.Skeleton=kC,exports.Slider=hT,exports.Spreadsheet=RT,exports.Swiper=OO,exports.TabbedLayout=PC,exports.TableField=Hm,exports.Tabs=zC,exports.TabsBody=VC,exports.TabsNav=WC,exports.TelInput=dv,exports.TextInput=Du,exports.Title=AO,exports.ToastPlugin=qj,exports.ToggleInput=gv,exports.ToolBar=PO,exports.TopBar=RO,exports.UploadInput=tS,exports.VIDEO_FORMATS=cl,exports.VIDEO_FORMATS_REGEXP=ll,exports.Zoomer=VO,exports.allCountries=Qj,exports.appendScript=Ls,exports.appendStyle=Rs,exports.arrField=hs,Object.defineProperty(exports,`bagelFormUtils`,{enumerable:!0,get:function(){return Qo}}),exports.bglForm=ds,exports.bindAttrs=As,exports.btn=uM,exports.checkField=is,exports.classify=ks,exports.clearHtml=TM,exports.col=xM,exports.colorField=ps,exports.column=bM,exports.container=vM,exports.copyText=Es,exports.createSchema=gs,exports.dateField=os,exports.debounce=Cs,exports.denullify=Ms,exports.downloadFile=Ks,exports.dropdown=gM,exports.emailField=as,exports.findBglFieldById=ms,exports.findElementById=yM,exports.fmtDate=lM,exports.formatDate=cM,exports.formatString=xs,exports.frmRow=cs,exports.getBaseElementField=dM,exports.getBaseField=$o,exports.getDatePartsMap=iM,exports.getFallbackSchema=Ps,exports.getNestedValue=Us,exports.handleTimezone=rM,exports.i18nTInjectionKey=Jj,exports.iconBtn=fM,exports.iffer=js,exports.img=mM,exports.initials=Ds,exports.injectI18nT=Yj,exports.ipapi=CM,exports.isDate=Ns,exports.keyToLabel=Ts,exports.listItem=_M,exports.localRef=pk,exports.normalizeDimension=Bs,exports.normalizeText=DM,exports.normalizeURL=zs,exports.numField=ss,exports.pathKeyToURL=Hs,exports.pattern=kk,exports.pill=hM,exports.provideBagelFormState=WO,exports.rangeField=us,exports.richText=es,exports.ripple=jk,exports.searchItems=MM,exports.selectField=ns,exports.slctField=rs,exports.sleep=Fs,exports.slugify=ws,exports.telField=fs,exports.timeAgo=tM,exports.timeDelta=$j,exports.tryRun=Gs,exports.txt=pM,exports.txtField=ts,exports.uploadField=ls,exports.useAddToCalendar=h,exports.useBagelFormState=GO,exports.useBglSchema=fk,exports.useDebounceFn=ht,exports.useDevice=KO,exports.useDraggable=Fr,exports.useElements=SM,exports.useEscape=Os,exports.useExcel=ZO,exports.useFileUpload=Mx,exports.useForm=_s,exports.useLang=bs,exports.useLocalStorage=mk,exports.useModal=fA,exports.usePolling=ek,exports.useSearch=NM,exports.useTheme=uk,exports.useToast=Kj,exports.useValidateFieldValue=dk,exports.vDraggable=Rr,exports.vResize=Pk;
package/dist/index.mjs CHANGED
@@ -38069,10 +38069,10 @@ var translations = {
38069
38069
  justNow: "זה עתה"
38070
38070
  }
38071
38071
  };
38072
- function timeAgo(e, t = "en") {
38072
+ function timeAgo(e, t) {
38073
38073
  if (!e) return "";
38074
38074
  typeof e == "string" && (e = new Date(e));
38075
- let j = (/* @__PURE__ */ new Date()).getTime(), M = e.getTime(), N = Math.floor((M - j) / 1e3), I = [
38075
+ let j = typeof t == "string" ? t : t?.lang || "en", M = (typeof t == "object" && t.mode || "relative") === "relative", N = (/* @__PURE__ */ new Date()).getTime(), I = e.getTime(), V = Math.floor((I - N) / 1e3), U = [
38076
38076
  {
38077
38077
  label: "year",
38078
38078
  seconds: 31536e3
@@ -38101,27 +38101,27 @@ function timeAgo(e, t = "en") {
38101
38101
  label: "second",
38102
38102
  seconds: 1
38103
38103
  }
38104
- ], V = translations[t];
38105
- for (let e of I) {
38106
- let j = Math.floor(Math.abs(N) / e.seconds);
38107
- if (j >= 1) {
38108
- let M = N < 0 ? ` ${V.ago}` : "", I = N > 0 && V.in !== "in" ? `${V.in} ` : "";
38109
- if (t === "he") {
38110
- let t = V[e.label], M = j === 1 ? t.singular : t.plural, I = N < 0 ? `${V.ago} ` : N > 0 ? `${V.in} ` : "";
38111
- if (e.label === "day" && N > 0) {
38112
- let e = Math.floor(Math.abs(N) % 86400 / 3600), t = V.hour, U = e === 1 ? t.singular : t.plural;
38113
- return `${I}${j === 1 ? M : `${j} ${M}`}${e > 0 ? e === 1 ? ` ${U}` : ` ${e} ${U}` : ""}`;
38104
+ ], J = translations[j];
38105
+ for (let e of U) {
38106
+ let t = Math.floor(Math.abs(V) / e.seconds);
38107
+ if (t >= 1) {
38108
+ let N = M && V < 0 ? ` ${J.ago}` : "", I = M && V > 0 && J.in !== "in" ? `${J.in} ` : "";
38109
+ if (j === "he") {
38110
+ let j = J[e.label], N = t === 1 ? j.singular : j.plural, I = M ? V < 0 ? `${J.ago} ` : V > 0 ? `${J.in} ` : "" : "";
38111
+ if (e.label === "day" && V > 0) {
38112
+ let e = Math.floor(Math.abs(V) % 86400 / 3600), j = J.hour, M = e === 1 ? j.singular : j.plural;
38113
+ return `${I}${t === 1 ? N : `${t} ${N}`}${e > 0 ? e === 1 ? ` ${M}` : ` ${e} ${M}` : ""}`;
38114
38114
  }
38115
- return `${I}${j === 1 ? M : `${j} ${M}`}`;
38115
+ return `${I}${t === 1 ? N : `${t} ${N}`}`;
38116
38116
  }
38117
- if (e.label === "day" && N > 0) {
38118
- let t = Math.floor(Math.abs(N) % 86400 / 3600), U = t > 1 ? `${V.hour}s` : V.hour;
38119
- return `${I}${j} ${V[e.label]}${t > 0 ? ` ${t} ${U}` : ""}${M}`;
38117
+ if (e.label === "day" && V > 0) {
38118
+ let j = Math.floor(Math.abs(V) % 86400 / 3600), M = j > 1 ? `${J.hour}s` : J.hour;
38119
+ return `${I}${t} ${J[e.label]}${j > 0 ? ` ${j} ${M}` : ""}${N}`;
38120
38120
  }
38121
- return `${I}${j} ${V[e.label]}${M}`;
38121
+ return `${I}${t} ${J[e.label]}${N}`;
38122
38122
  }
38123
38123
  }
38124
- return V.justNow;
38124
+ return J.justNow;
38125
38125
  }
38126
38126
  function getBrowserNavigatorLocale() {
38127
38127
  return typeof navigator == "object" ? navigator.languages && navigator.languages.length ? navigator.languages[0] : navigator.language : "en-US";
@@ -24,7 +24,10 @@ interface TimeDeltaOptions {
24
24
  year?: number;
25
25
  }
26
26
  export declare function timeDelta(date: string | Date, options: TimeDeltaOptions): Date;
27
- export declare function timeAgo(date: string | Date, lang?: AvailableTimeLanguages): string;
27
+ export declare function timeAgo(date: string | Date, langOrConfig?: AvailableTimeLanguages | {
28
+ lang?: AvailableTimeLanguages;
29
+ mode?: 'relative' | 'absolute';
30
+ }): string;
28
31
  /**
29
32
  * Adjust a date for a specific timezone
30
33
  * @param date The date to adjust
@@ -1 +1 @@
1
- {"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/calendar/dateUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAkC,MAAM,sBAAsB,CAAA;AAE3H,UAAU,gBAAgB;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAiCvE;AAqDD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,GAAE,sBAA6B,UAwD/E;AASD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,qBAAqB,GAAG,IAAI,CA2CtF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,qBAAqB;;;;;;;;;;;;;;EAyB/G;AAcD,MAAM,WAAW,iBAAkB,SAAQ,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC;IAC7F,GAAG,CAAC,EAAE,uBAAuB,CAAA;IAC7B,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAA;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAA;CACX;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,uBAAuB,GAAG,MAAM,CAAA;AAErF;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAAA;AAkG7E,eAAO,MAAM,OAAO,mBAAa,CAAA"}
1
+ {"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/calendar/dateUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAkC,MAAM,sBAAsB,CAAA;AAE3H,UAAU,gBAAgB;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAiCvE;AAqDD,wBAAgB,OAAO,CACtB,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,YAAY,CAAC,EAAE,sBAAsB,GAAG;IAAE,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAAC,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,CAAA;CAAE,UAiEzG;AASD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,qBAAqB,GAAG,IAAI,CA2CtF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,qBAAqB;;;;;;;;;;;;;;EAyB/G;AAcD,MAAM,WAAW,iBAAkB,SAAQ,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC;IAC7F,GAAG,CAAC,EAAE,uBAAuB,CAAA;IAC7B,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAA;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAA;CACX;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,uBAAuB,GAAG,MAAM,CAAA;AAErF;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAAA;AAkG7E,eAAO,MAAM,OAAO,mBAAa,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.7.67",
4
+ "version": "1.7.69",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
@@ -111,9 +111,18 @@ const translations: Record<AvailableTimeLanguages, LanguageTranslations> = {
111
111
  }
112
112
  }
113
113
 
114
- export function timeAgo(date: string | Date, lang: AvailableTimeLanguages = 'en') {
114
+ export function timeAgo(
115
+ date: string | Date,
116
+ langOrConfig?: AvailableTimeLanguages | { lang?: AvailableTimeLanguages, mode?: 'relative' | 'absolute' }
117
+ ) {
115
118
  if (!date) { return '' }
116
119
  if (typeof date === 'string') { date = new Date(date) }
120
+
121
+ // Parse config
122
+ const lang = typeof langOrConfig === 'string' ? langOrConfig : (langOrConfig?.lang || 'en')
123
+ const mode = typeof langOrConfig === 'object' ? (langOrConfig.mode || 'relative') : 'relative'
124
+ const isRelative = mode === 'relative'
125
+
117
126
  const now: Date = new Date()
118
127
  const nowNumber = now.getTime()
119
128
  const dateNumber = date.getTime()
@@ -134,8 +143,8 @@ export function timeAgo(date: string | Date, lang: AvailableTimeLanguages = 'en'
134
143
  for (const interval of intervals) {
135
144
  const count = Math.floor(Math.abs(seconds) / interval.seconds)
136
145
  if (count >= 1) {
137
- const suffix = seconds < 0 ? ` ${selectedLang.ago}` : ''
138
- const prefix = seconds > 0 && selectedLang.in !== 'in' ? `${selectedLang.in} ` : ''
146
+ const suffix = isRelative && seconds < 0 ? ` ${selectedLang.ago}` : ''
147
+ const prefix = isRelative && seconds > 0 && selectedLang.in !== 'in' ? `${selectedLang.in} ` : ''
139
148
 
140
149
  // Handle Hebrew plural forms
141
150
  if (lang === 'he') {
@@ -143,7 +152,9 @@ export function timeAgo(date: string | Date, lang: AvailableTimeLanguages = 'en'
143
152
  const form = count === 1 ? timeUnit.singular : timeUnit.plural
144
153
 
145
154
  // For Hebrew, we place the prefix/suffix before the number
146
- const hebrewPrefix = seconds < 0 ? `${selectedLang.ago} ` : (seconds > 0 ? `${selectedLang.in} ` : '')
155
+ const hebrewPrefix = isRelative
156
+ ? (seconds < 0 ? `${selectedLang.ago} ` : (seconds > 0 ? `${selectedLang.in} ` : ''))
157
+ : ''
147
158
 
148
159
  if (interval.label === 'day' && seconds > 0) {
149
160
  const hours = Math.floor((Math.abs(seconds) % 86400) / 3600)