@speckle/ui-components 2.18.8 → 2.18.10

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/lib.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var Ge=Object.defineProperty;var Xe=(t,n,r)=>n in t?Ge(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r;var q=(t,n,r)=>(Xe(t,typeof n!="symbol"?n+"":n,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("lodash"),T=require("@heroicons/vue/24/solid"),W=require("@heroicons/vue/24/outline"),M=require("@heroicons/vue/20/solid"),X=require("@speckle/shared"),le=require("vee-validate"),ie=require("nanoid"),A=require("@vueuse/core"),D=require("@headlessui/vue"),Se=require("vue-tippy"),Ze=require("v3-infinite-loading");const Qe=e.defineComponent({__name:"Button",props:{to:{type:String,required:!1,default:void 0},size:{type:String,default:"base"},fullWidth:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},link:{type:Boolean,default:!1},color:{type:String,default:"default"},textColor:{type:String,default:"default"},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},submit:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1},linkComponent:{type:[Object,Function],default:null},loading:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const r=n,o=t,a=e.resolveDynamicComponent("NuxtLink"),l=e.resolveDynamicComponent("RouterLink"),d=e.computed(()=>o.linkComponent?o.linkComponent:o.external?"a":w.isObjectLike(a)?a:w.isObjectLike(l)?l:"a"),u=e.computed(()=>{if(!o.to)return o.submit?"submit":"button"}),i=e.computed(()=>o.disabled||o.loading),s=e.computed(()=>o.loading?T.ArrowPathIcon:o.iconLeft),m=e.computed(()=>{const g=[];if(g.push("border-2"),i.value)g.push(o.outlined?"border-foreground-disabled":"bg-foundation-disabled border-transparent");else switch(o.color){case"invert":g.push(o.outlined?"border-foundation dark:border-foreground":"bg-foundation dark:bg-foreground border-transparent");break;case"card":g.push(o.outlined?"border-foundation-2 shadow":"bg-foundation-2 dark:bg-foundation-2 border-foundation shadow");break;case"danger":g.push(o.outlined?"border-danger":"bg-danger border-danger");break;case"secondary":g.push(o.outlined?"border-foundation":"bg-foundation border-foundation-2");break;case"warning":g.push(o.outlined?"border-warning":"bg-warning border-warning");break;case"info":g.push(o.outlined?"border-info":"bg-info border-info");break;case"success":g.push(o.outlined?"border-success":"bg-success border-success");break;case"default":default:g.push(o.outlined?"border-primary hover:border-primary-focus":"bg-primary hover:bg-primary-focus border-transparent");break}return g.join(" ")}),f=e.computed(()=>{const g=[],$=o.textColor!=="default";if($&&!i.value)switch(o.textColor){case"primary":g.push("text-primary");break;case"warning":g.push("text-warning");break;case"success":g.push("text-success");break;case"danger":g.push("text-danger");break;case"info":g.push("text-info");break}if(!o.text&&!o.link){if(i.value)g.push("text-foreground-disabled");else if(!$)switch(o.color){case"invert":g.push(o.outlined?"text-foundation dark:text-foreground":"text-primary");break;case"card":g.push((o.outlined,"text-foreground"));break;case"danger":g.push(o.outlined?"text-danger":"text-foundation dark:text-foreground");break;case"warning":g.push(o.outlined?"text-warning":"text-foundation dark:text-foreground");break;case"info":g.push(o.outlined?"text-info":"text-foundation dark:text-foreground");break;case"success":g.push(o.outlined?"text-success":"text-foundation dark:text-foreground");break;case"secondary":g.push((o.outlined,"text-foreground hover:text-primary"));break;case"default":default:g.push(o.outlined?"text-primary hover:text-primary-focus":"text-foundation dark:text-foreground");break}}else i.value?g.push("text-foreground-disabled"):$||(o.color==="invert"?g.push("text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"):o.color==="secondary"?g.push("text-foreground-2 hover:text-primary-focus"):o.color==="success"?g.push("text-success"):o.color==="warning"?g.push("text-warning"):o.color==="info"?g.push("text-info"):o.color==="danger"?g.push("text-danger"):g.push("text-primary hover:text-primary-focus"));return g.join(" ")}),p=e.computed(()=>{const g=[];return g.push(o.rounded?"rounded-full":"rounded-md"),g.join(" ")}),h=e.computed(()=>{const g=[];if(!i.value)switch(o.color){case"invert":g.push("hover:ring-4 ring-white/50");break;case"danger":g.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");break;case"warning":g.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");break;case"info":g.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");break;case"success":g.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");break;case"default":default:g.push("hover:ring-2");break}return g.join(" ")}),c=e.computed(()=>{switch(o.size){case"xs":return"h-5 text-xs font-medium xxx-tracking-wide";case"sm":return"h-6 text-sm font-medium xxx-tracking-wide";case"lg":return"h-10 text-lg font-semibold xxx-tracking-wide";case"xl":return"h-14 text-xl font-bold xxx-tracking-wide";default:case"base":return"h-8 text-sm sm:text-base font-medium xxx-tracking-wide"}}),b=e.computed(()=>{switch(o.size){case"xs":return"px-1";case"sm":return"px-2";case"lg":return"px-4";case"xl":return"px-5";default:case"base":return"px-3"}}),v=e.computed(()=>{const g=[];return o.fullWidth&&g.push("w-full"),i.value&&g.push("cursor-not-allowed"),g.join(" ")}),k=e.computed(()=>{const g=[];return!i.value&&!o.link&&!o.text&&g.push("active:scale-[0.97]"),!i.value&&o.link&&g.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),g.join(" ")}),x=e.computed(()=>{const g=o.link||o.text;return["transition inline-flex justify-center text-center items-center outline-none select-none leading-[0.9rem]",v.value,c.value,f.value,g?"":m.value,g?"":p.value,g?"":h.value,o.link?"":b.value,k.value].join(" ")}),E=e.computed(()=>{const g=[""];switch(o.loading&&g.push("animate-spin"),o.size){case"xs":g.push("h-3 w-3");break;case"sm":g.push("h-4 w-4");break;case"lg":g.push("h-6 w-6");break;case"xl":g.push("h-8 w-8");break;case"base":default:g.push("h-5 w-5");break}return g.join(" ")}),C=g=>{if(i.value){g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation();return}r("click",g)};return(g,$)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?d.value:"button"),{href:t.to,to:t.to,type:u.value,external:t.external,class:e.normalizeClass(x.value),disabled:i.value,role:"button",onClick:C},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{key:0,class:e.normalizeClass(`${E.value} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?e.createCommentVNode("",!0):e.renderSlot(g.$slots,"default",{key:1},()=>[e.createTextVNode("Button")],!0),t.iconRight||!t.loading?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconRight),{key:2,class:e.normalizeClass(`${E.value} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const ce=(t,n)=>{const r=t.__vccOpts||t;for(const[o,a]of n)r[o]=a;return r},F=ce(Qe,[["__scopeId","data-v-ee26d682"]]),ze=e.defineComponent({__name:"Link",props:{to:{type:String,required:!1,default:void 0},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},size:{type:String,default:"base"},foregroundLink:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1},noUnderline:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const r=n,o=t,a=l=>{if(o.disabled){l.preventDefault(),l.stopPropagation(),l.stopImmediatePropagation();return}r("click",l)};return(l,d)=>(e.openBlock(),e.createBlock(F,{link:!t.noUnderline,text:t.noUnderline,to:t.to,external:t.external,disabled:t.disabled,size:t.size,"foreground-link":t.foregroundLink,"icon-left":t.iconLeft,"icon-right":t.iconRight,"hide-text":t.hideText,role:"link",onClickCapture:a},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["link","text","to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var Y=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(Y||{});const Je={"aria-live":"assertive",class:"pointer-events-none fixed inset-0 flex items-end px-4 py-6 mt-10 sm:items-start sm:p-6 z-50"},Ye={class:"flex w-full flex-col items-center gap-4 sm:items-end"},et={class:"flex-shrink-0"},tt={class:"w-full min-w-[10rem]"},nt={key:1,class:"label label--light text-foreground-2 text-sm"},ot={key:2},lt=e.createElementVNode("span",{class:"sr-only"},"Close",-1),at=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:n}){const r=n,o=t,a=e.computed(()=>{var u,i;return!((u=o.notification)!=null&&u.description)&&!((i=o.notification)!=null&&i.cta)}),l=()=>{r("update:notification",null)},d=u=>{var i,s,m;(m=(s=(i=o.notification)==null?void 0:i.cta)==null?void 0:s.onClick)==null||m.call(s,u),l()};return(u,i)=>(e.openBlock(),e.createElementBlock("div",Je,[e.createElementVNode("div",Ye,[e.createVNode(e.Transition,{"enter-active-class":"transform ease-out duration-300 transition","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2","enter-to-class":"translate-y-0 opacity-100 sm:translate-x-0","leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[t.notification?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["pointer-events-auto w-full max-w-[20rem] overflow-hidden rounded-lg bg-foundation text-foreground shadow-lg ring-1 ring-primary-muted ring-opacity-5",a.value?"p-2":"p-3"])},[e.createElementVNode("div",{class:e.normalizeClass(["flex gap-2",a.value?"items-center":"items-start"])},[e.createElementVNode("div",et,[t.notification.type===e.unref(Y).Success?(e.openBlock(),e.createBlock(e.unref(W.CheckCircleIcon),{key:0,class:e.normalizeClass(["text-success",a.value?"h-5 w-5":"h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])):t.notification.type===e.unref(Y).Danger?(e.openBlock(),e.createBlock(e.unref(W.XCircleIcon),{key:1,class:e.normalizeClass(["text-danger",a.value?"h-5 w-5":"h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])):t.notification.type===e.unref(Y).Warning?(e.openBlock(),e.createBlock(e.unref(W.ExclamationCircleIcon),{key:2,class:e.normalizeClass(["text-warning",a.value?"h-5 w-5":"h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])):t.notification.type===e.unref(Y).Info?(e.openBlock(),e.createBlock(e.unref(W.InformationCircleIcon),{key:3,class:e.normalizeClass(["text-info",a.value?"h-5 w-5":"h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",tt,[t.notification.title?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(["text-foreground font-bold",a.value?"text-sm":"text-base"])},e.toDisplayString(t.notification.title),3)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",nt,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",ot,[e.createVNode(ze,{to:t.notification.cta.url,class:"label",size:"xs",primary:"",onClick:d},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.notification.cta.title),1)]),_:1},8,["to"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["ml-2 flex-shrink-0",a.value?"mt-1.5":""])},[e.createElementVNode("button",{type:"button",class:"inline-flex rounded-md bg-foundation text-foreground-2 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",onClick:l},[lt,e.createVNode(e.unref(M.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})])],2)],2)],2)):e.createCommentVNode("",!0)]),_:1})])]))}}),st="Enter";function ke(t){return n=>{n.code===st&&t(n)}}const rt=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),it=[rt],ue=e.defineComponent({__name:"Badge",props:{size:null,colorClasses:null,dot:{type:Boolean},dotIconColorClasses:null,iconLeft:null,rounded:{type:Boolean},clickableIcon:{type:Boolean}},emits:["click-icon"],setup(t,{emit:n}){const r=n,o=t,a=e.computed(()=>o.colorClasses||"bg-blue-100 text-blue-800"),l=e.computed(()=>o.dotIconColorClasses||"text-blue-400"),d=e.computed(()=>{const m=["inline-flex items-center",a.value,o.size==="lg"?"px-3 py-0.5 label":"px-2.5 py-0.5 caption font-medium"];return o.rounded?(m.push("rounded"),m.push(o.size==="lg"?"px-2 py-0.5 label":"px-2.5 py-0.5 caption font-medium")):(m.push("rounded-full"),m.push(o.size==="lg"?"px-2.5 py-0.5 label":"px-2.5 py-0.5 caption font-medium")),m.join(" ")}),u=e.computed(()=>{const m=["mt-0.5 ml-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full focus:outline-none"];return o.clickableIcon?m.push("cursor-pointer"):m.push("cursor-default"),m.join(" ")}),i=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",l.value].join(" ")),s=m=>{if(!o.clickableIcon){m.stopPropagation(),m.stopImmediatePropagation(),m.preventDefault();return}r("click-icon",m)};return(m,f)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(d.value)},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(i.value),fill:"currentColor",viewBox:"0 0 8 8"},it,2)):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(u.value),onClick:f[0]||(f[0]=p=>s(p))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",l.value])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});let $e=[];function ct(t){$e=$e?t:t.slice()}var ee=(t=>(t[t.sm=640]="sm",t[t.md=746]="md",t[t.lg=1024]="lg",t[t.xl=1280]="xl",t[t["2xl"]=1536]="2xl",t))(ee||{});function Ie(t){const{props:{modelValue:n,steps:r,orientation:o,goVerticalBelow:a,nonInteractive:l,stepsPadding:d},emit:u}=t,i=e.computed(()=>(o==null?void 0:o.value)==="vertical"?"vertical":"horizontal"),s=e.computed({get:()=>w.clamp((n==null?void 0:n.value)||0,-1,r.value.length),set:v=>u("update:modelValue",w.clamp(v,0,r.value.length))}),m=v=>`${v+1}`,f=v=>v===s.value,p=v=>v<s.value,h=(v,k)=>{var E;if(l!=null&&l.value){k==null||k.preventDefault(),k==null||k.stopPropagation(),k==null||k.stopImmediatePropagation();return}s.value=v;const x=r.value[s.value];(E=x==null?void 0:x.onClick)==null||E.call(x)},c=e.computed(()=>{const v=["flex"];let k,x;return(d==null?void 0:d.value)==="xs"?(k="space-x-2",x="space-y-1"):(d==null?void 0:d.value)==="sm"?(k="space-x-4",x="space-y-1"):(k="space-x-8",x="space-y-4"),v.push("flex"),i.value==="vertical"||a!=null&&a.value?(v.push(`flex-col ${x} justify-center`),(a==null?void 0:a.value)===ee.sm?v.push(`sm:flex-row sm:space-y-0 sm:justify-start sm:${k} sm:items-center`):(a==null?void 0:a.value)===ee.md?v.push(`md:flex-row md:space-y-0 md:justify-start md:${k} md:items-center`):(a==null?void 0:a.value)===ee.lg?v.push(`lg:flex-row lg:space-y-0 lg:justify-start lg:${k} lg:items-center`):(a==null?void 0:a.value)===ee.xl&&v.push(`xl:flex-row xl:space-y-0 xl:justify-start xl:${k} xl:items-center`)):v.push(`flex-row ${k} items-center`),v.join(" ")}),b=e.computed(()=>{const v=["flex items-center"];return l!=null&&l.value||v.push("cursor-pointer"),v.join(" ")});return{value:s,isCurrentStep:f,isFinishedStep:p,switchStep:h,getStepDisplayValue:m,listClasses:c,linkClasses:b,orientation:i}}ct(["sm:space-x-8","md:space-x-8","lg:space-x-8","xl:space-x-8","sm:space-x-2","md:space-x-2","lg:space-x-2","xl:space-x-2","sm:space-x-4","md:space-x-4","lg:space-x-4","xl:space-x-4"]);const ut=["aria-label"],dt=["href","onClick"],mt={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},ft={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},pt={class:"flex flex-col"},ht={key:0,class:"label label--light text-foreground"},vt=["href","onClick"],gt={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},yt={class:"shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center"},kt={class:"flex flex-col"},bt={key:0,class:"label label--light text-foreground"},xt=["href","onClick"],Ct={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},wt={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},Bt={class:"flex flex-col"},Vt={key:0,class:"label label--light"},Et=e.defineComponent({__name:"Number",props:{ariaLabel:null,orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:n}){const r=n,o=t,{isCurrentStep:a,isFinishedStep:l,switchStep:d,getStepDisplayValue:u,listClasses:i,linkClasses:s}=Ie({props:e.toRefs(o),emit:r});return(m,f)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(i))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(p,h)=>(e.openBlock(),e.createElementBlock("li",{key:p.name},[e.unref(l)(h)?(e.openBlock(),e.createElementBlock("a",{key:0,href:p.href,class:e.normalizeClass(e.unref(s)),onClick:c=>e.unref(d)(h,c)},[e.createElementVNode("div",mt,[e.createElementVNode("div",ft,[e.createVNode(e.unref(M.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",pt,[e.createElementVNode("div",null,e.toDisplayString(p.name),1),p.description?(e.openBlock(),e.createElementBlock("div",ht,e.toDisplayString(p.description),1)):e.createCommentVNode("",!0)])])],10,dt)):e.unref(a)(h)?(e.openBlock(),e.createElementBlock("a",{key:1,href:p.href,class:e.normalizeClass(e.unref(s)),"aria-current":"step",onClick:c=>e.unref(d)(h,c)},[e.createElementVNode("div",gt,[e.createElementVNode("div",yt,e.toDisplayString(e.unref(u)(h)),1),e.createElementVNode("div",kt,[e.createElementVNode("div",null,e.toDisplayString(p.name),1),p.description?(e.openBlock(),e.createElementBlock("div",bt,e.toDisplayString(p.description),1)):e.createCommentVNode("",!0)])])],10,vt)):(e.openBlock(),e.createElementBlock("a",{key:2,href:p.href,class:e.normalizeClass(e.unref(s)),onClick:c=>e.unref(d)(h,c)},[e.createElementVNode("div",Ct,[e.createElementVNode("div",wt,e.toDisplayString(e.unref(u)(h)),1),e.createElementVNode("div",Bt,[e.createElementVNode("div",null,e.toDisplayString(p.name),1),p.description?(e.openBlock(),e.createElementBlock("div",Vt,e.toDisplayString(p.description),1)):e.createCommentVNode("",!0)])])],10,xt))]))),128))],2)],8,ut))}}),Nt=["aria-label"],$t=["href","onClick"],St={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},zt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},It=["href","onClick"],Lt={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},Dt={key:0,class:"h-3 w-3 rounded-full bg-foreground"},Mt=e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1),Tt=e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1),Ot=["href","onClick"],At={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},Pt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},jt={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},Ft=e.defineComponent({__name:"Bullet",props:{ariaLabel:null,basic:{type:Boolean},orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:n}){const r=n,o=t,{isCurrentStep:a,isFinishedStep:l,switchStep:d,listClasses:u,linkClasses:i}=Ie({props:e.toRefs(o),emit:r}),s=e.computed(()=>{const f=["h6 font-medium leading-7"];let p;return o.stepsPadding==="xs"?p="ml-1":o.stepsPadding==="sm"?p="ml-2":p="ml-3",f.push(p),o.basic&&f.push("sr-only"),f.join(" ")}),m=e.computed(()=>{const f=[];return o.basic&&f.push("basic"),f.join(" ")});return(f,p)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass([e.unref(u),m.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(h,c)=>(e.openBlock(),e.createElementBlock("li",{key:h.name},[e.unref(l)(c)?(e.openBlock(),e.createElementBlock("a",{key:0,href:h.href,class:e.normalizeClass(e.unref(i)),onClick:b=>e.unref(d)(c,b)},[e.createElementVNode("span",St,[t.basic?(e.openBlock(),e.createElementBlock("span",zt)):(e.openBlock(),e.createBlock(e.unref(M.CheckCircleIcon),{key:1,class:"h-full w-full text-primary","aria-hidden":"true"}))]),e.createElementVNode("span",{class:e.normalizeClass(["text-foreground",s.value])},e.toDisplayString(h.name),3)],10,$t)):e.unref(a)(c)?(e.openBlock(),e.createElementBlock("a",{key:1,href:h.href,class:e.normalizeClass(e.unref(i)),"aria-current":"step",onClick:b=>e.unref(d)(c,b)},[e.createElementVNode("span",Lt,[t.basic?(e.openBlock(),e.createElementBlock("span",Dt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[Mt,Tt],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",s.value])},e.toDisplayString(h.name),3)],10,It)):(e.openBlock(),e.createElementBlock("a",{key:2,href:h.href,class:e.normalizeClass(e.unref(i)),onClick:b=>e.unref(d)(c,b)},[e.createElementVNode("div",At,[t.basic?(e.openBlock(),e.createElementBlock("span",Pt)):(e.openBlock(),e.createElementBlock("div",jt))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",s.value])},e.toDisplayString(h.name),3)],10,Ot))]))),128))],2)],8,Nt))}}),_t={},Rt={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-pointer",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"rgba(255,255,255,0.8)","stroke-linecap":"round","stroke-linejoin":"round"},Ut=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),qt=e.createElementVNode("path",{d:"M7.904 17.563a1.2 1.2 0 0 0 2.228 .308l2.09 -3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047 -1.047a1.067 1.067 0 0 0 0 -1.509l-4.907 -4.907l3.113 -2.09a1.2 1.2 0 0 0 -.309 -2.228l-13.582 -3.904l3.904 13.563z"},null,-1),Wt=[Ut,qt];function Ht(t,n){return e.openBlock(),e.createElementBlock("svg",Rt,Wt)}const Kt=ce(_t,[["render",Ht]]),Gt={},Xt={viewBox:"0 0 18 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Zt=e.createElementVNode("path",{d:"M9 1.25V3.5M14.834 3.666L13.243 5.257M17.25 9.5H15M4.757 13.743L3.167 15.333M3 9.5H0.75M4.757 5.257L3.167 3.667",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Qt=[Zt];function Jt(t,n){return e.openBlock(),e.createElementBlock("svg",Xt,Qt)}const Yt=ce(Gt,[["render",Jt]]),en={class:"relative aspect-square w-full h-full max-w-[250px] mx-auto mb-8 border-t border-r border-outline-3 select-none"},tn={class:"w-full h-full overflow-hidden"},nn=e.defineComponent({__name:"Instructional",props:{actions:Array,initialPosition:{type:Object},slotsConfig:Array},setup(t){const n=t,r=e.ref(!0),o=e.ref({...n.initialPosition}),a=e.ref(!1),l=e.ref(500),d=e.ref(!0),u=e.ref(n.slotsConfig||[]);async function i(f){await X.wait(f.duration)}function s(f){const p=u.value.find(h=>h.name===f.slot);p&&(p.visible=!p.visible)}function m(f){switch(f.type){case"animation":o.value={top:f.top,left:f.left},l.value=f.duration;break;case"click":a.value=!0,setTimeout(()=>a.value=!1,500);break;case"delay":return i(f);case"slot":s(f);break}}return e.onMounted(()=>{(async()=>{for(;r.value;){await i({type:"delay",duration:800}),d.value=!0;for(const p of n.actions||[])await m(p);d.value=!1,o.value={...n.initialPosition},await i({type:"delay",duration:200})}})()}),e.onBeforeUnmount(()=>{r.value=!1}),(f,p)=>(e.openBlock(),e.createElementBlock("div",en,[e.createElementVNode("div",{class:"absolute z-50 text-foreground dark:text-foundation",style:e.normalizeStyle({transitionProperty:"all",top:o.value.top+"%",left:o.value.left+"%",transitionDuration:l.value+"ms"})},[e.createVNode(Yt,{class:e.normalizeClass(["absolute -top-5 -left-4 h-12 w-12 -rotate-12 text-foreground",[{hidden:!a.value}]])},null,8,["class"]),e.createVNode(Kt,{class:"absolute inset-0 h-11 w-11"})],4),e.createElementVNode("div",tn,[e.renderSlot(f.$slots,"background"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,h=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h.name},[h.visible?e.renderSlot(f.$slots,h.name,{key:0}):e.createCommentVNode("",!0)],64))),128))])]))}}),on=["disabled"],ln=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:n}){const r=n,o=t,a=e.computed(()=>{const d=["h-20 bg-foundation-2 inline-flex justify-center items-center outline-none","normal px-16 py-5 shadow rounded transition active:scale-95"];return o.disabled?d.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed"):(d.push(o.modelValue?"bg-primary-focus text-foreground-on-primary":"bg-foundation text-foreground"),d.push("ring-outline-2 hover:ring-4")),d.join(" ")}),l=d=>{if(o.disabled){d.preventDefault(),d.stopPropagation(),d.stopImmediatePropagation();return}r("update:modelValue",!o.modelValue),r("click",d)};return(d,u)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(a.value),disabled:t.disabled,onClick:l},[e.renderSlot(d.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,on))}}),an={class:"relative flex items-start"},sn={class:"flex h-6 items-center"},rn=["id","checked","aria-describedby","name","disabled","value"],cn={class:"ml-2 text-sm",style:{"padding-top":"2px"}},un=["for"],dn={key:0,class:"text-danger ml-1"},mn=["id"],fn=e.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},label:{type:String,default:void 0},description:{type:String,default:void 0},inlineDescription:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1},modelValue:{type:[String,Boolean],default:void 0},value:{type:[String,Boolean],default:!0},id:{type:String,default:void 0},hideLabel:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const n=t,r=v=>`${v}-${ie.nanoid()}`,o=e.computed(()=>n.value||n.name),{checked:a,errorMessage:l,handleChange:d,value:u}=le.useField(n.name,n.rules,{validateOnMount:n.validateOnMount,type:"checkbox",checkedValue:o,initialValue:n.modelValue||void 0}),i=e.computed(()=>n.label||n.name),s=e.computed(()=>l.value?"border-danger-lighter":"border-foreground-4 "),m=e.computed(()=>n.description||l.value),f=e.computed(()=>`${n.name}-description`),p=e.computed(()=>{const v=[];return n.inlineDescription?v.push("inline ml-2"):v.push("block"),l.value?v.push("text-danger"):v.push("text-foreground-2"),v.join(" ")}),h=e.ref(r("checkbox")),c=e.computed(()=>n.id||h.value),b=v=>{n.disabled||d(v)};return e.onMounted(()=>{const v=n.modelValue,k=u.value,x=Array.isArray(v)?v.includes(n.value):v===n.value,E=Array.isArray(k)?k.includes(n.value):k===n.value;x!==E&&d(v)}),(v,k)=>(e.openBlock(),e.createElementBlock("div",an,[e.createElementVNode("div",sn,[e.createElementVNode("input",e.mergeProps({id:c.value,checked:e.unref(a),"aria-describedby":f.value,name:t.name,disabled:t.disabled,value:o.value,type:"checkbox",class:["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",s.value]},v.$attrs,{onChange:b}),null,16,rn)]),e.createElementVNode("div",cn,[e.createElementVNode("label",{for:c.value,class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(i.value),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",dn,"*")):e.createCommentVNode("",!0)],10,un),m.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:f.value,class:e.normalizeClass(p.value)},e.toDisplayString(m.value),11,mn)):e.createCommentVNode("",!0)])]))}}),pn={class:"flex h-6 items-center"},hn=["id","checked","aria-describedby","name","disabled","value"],vn=["for"],gn={key:0,class:"text-sm"},yn={class:"flex flex-col"},kn=["id"],bn={key:1,class:"text-danger ml-1"},xn=["id"],Cn=e.defineComponent({inheritAttrs:!1,__name:"Radio",props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},label:{type:String,default:void 0},description:{type:String,default:void 0},inlineDescription:{type:Boolean,default:!1},icon:{type:Object,default:void 0},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1},modelValue:{type:[String,Boolean],default:void 0},value:{type:[String,Boolean],default:!0},id:{type:String,default:void 0},hideLabel:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const n=t,r=v=>`${v}-${ie.nanoid()}`,o=e.computed(()=>n.value||n.name),{checked:a,errorMessage:l,handleChange:d,value:u}=le.useField(n.name,n.rules,{validateOnMount:n.validateOnMount,type:"radio",checkedValue:o,initialValue:n.modelValue||void 0}),i=e.computed(()=>n.label||n.name),s=e.computed(()=>l.value?"border-danger-lighter":"border-foreground-4 "),m=e.computed(()=>n.description||l.value),f=e.computed(()=>`${n.name}-description`),p=e.computed(()=>{const v=["text-xs"];return l.value?v.push("text-danger"):v.push("text-foreground-2"),v.join(" ")}),h=e.ref(r("radio")),c=e.computed(()=>n.id||h.value),b=v=>{n.disabled||d(v)};return e.onMounted(()=>{const v=n.modelValue,k=u.value,x=Array.isArray(v)?v.includes(n.value):v===n.value,E=Array.isArray(k)?k.includes(n.value):k===n.value;x!==E&&d(v)}),(v,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative flex gap-2 mb-2 last:mb-0",t.description&&t.inlineDescription?"items-start":"items-center"])},[e.createElementVNode("div",pn,[e.createElementVNode("input",e.mergeProps({id:c.value,checked:e.unref(a),"aria-describedby":f.value,name:t.name,disabled:t.disabled,value:o.value,type:"radio",class:["h-4 w-4 rounded-full text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",s.value]},v.$attrs,{onChange:b}),null,16,hn)]),e.createElementVNode("div",{class:e.normalizeClass(["text-xs sm:text-sm",t.inlineDescription?"flex gap-2 items-center":""])},[e.createElementVNode("label",{for:c.value,class:e.normalizeClass(["text-foreground flex gap-2 items-center",{"sr-only":t.hideLabel}])},[t.icon?(e.openBlock(),e.createElementBlock("div",gn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{class:"h-8 sm:h-10 w-8 sm:w-10"}))])):e.createCommentVNode("",!0),e.createElementVNode("div",yn,[e.createElementVNode("span",null,e.toDisplayString(i.value),1),m.value&&!t.inlineDescription?(e.openBlock(),e.createElementBlock("p",{key:0,id:f.value,class:e.normalizeClass(p.value)},e.toDisplayString(m.value),11,kn)):e.createCommentVNode("",!0)]),t.showRequired?(e.openBlock(),e.createElementBlock("span",bn,"*")):e.createCommentVNode("",!0)],10,vn),m.value&&t.inlineDescription?(e.openBlock(),e.createElementBlock("p",{key:0,id:f.value,class:e.normalizeClass(p.value)},e.toDisplayString(m.value),11,xn)):e.createCommentVNode("",!0)],2)],2))}});function be(t){const{props:n,inputEl:r,emit:o,options:a}=t,{value:l,errorMessage:d}=le.useField(n.name,n.rules,{validateOnMount:e.unref(n.validateOnMount),validateOnValueUpdate:e.unref(n.validateOnValueUpdate),initialValue:e.unref(n.modelValue)||void 0}),u=e.computed(()=>{const C=["block label text-foreground-2 mb-2"];return e.unref(n.showLabel)||C.push("sr-only"),C.join(" ")}),i=e.computed(()=>["focus:outline-none disabled:cursor-not-allowed disabled:bg-foundation-disabled","disabled:text-disabled-muted placeholder:text-foreground-2","rounded"].join(" ")),s=e.computed(()=>{const C=["block w-full text-foreground transition-all",i.value];d.value?C.push("focus:border-danger focus:ring-danger border-2 border-danger text-danger-darker"):C.push("border-0 focus:ring-2 focus:ring-outline-2");const g=e.unref(n.color);return g==="foundation"?C.push("bg-foundation shadow-sm hover:shadow"):g==="transparent"?C.push("bg-transparent"):C.push("bg-foundation-page"),C.join(" ")}),m=e.ref(ie.nanoid()),f=e.computed(()=>e.unref(n.label)||e.unref(n.name)),p=e.computed(()=>{const C=d.value;return!C||!e.unref(n.useLabelInErrors)?C:C.replace("Value",f.value)}),h=e.computed(()=>p.value&&e.unref(n.hideErrorMessage)),c=e.computed(()=>p.value||e.unref(n.help)),b=e.computed(()=>!!c.value),v=e.computed(()=>b.value?`${e.unref(n.name)}-${m.value}`:void 0),k=e.computed(()=>{const C=["mt-2 text-xs sm:text-sm"];return C.push(d.value?"text-danger":"text-foreground-2"),C.join(" ")}),x=()=>{var C;(C=r.value)==null||C.focus()},E=()=>{var C;l.value=w.isArray(l.value)?[]:"",(C=a==null?void 0:a.customClear)==null||C.call(a),o("change",{value:l.value}),o("clear")};return e.onMounted(()=>{e.unref(n.autoFocus)&&x()}),{coreInputClasses:i,coreClasses:s,title:f,value:l,helpTipId:v,helpTipClasses:k,helpTip:c,hideHelpTip:h,errorMessage:p,clear:E,focus:x,labelClasses:u}}const wn=["for"],Bn={class:"relative"},Vn=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],En=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Nn=["id"],$n=e.defineComponent({__name:"TextArea",props:{name:null,showLabel:{type:Boolean},help:null,placeholder:null,label:null,disabled:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},autoFocus:{type:Boolean},modelValue:{default:""},showClear:{type:Boolean},fullWidth:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"},textareaClasses:null},emits:["update:modelValue","change","input","clear"],setup(t,{expose:n,emit:r}){const o=r,a=t,l=e.ref(null),{coreClasses:d,title:u,value:i,helpTipId:s,helpTipClasses:m,helpTip:f,errorMessage:p,labelClasses:h,clear:c,focus:b}=be({props:e.toRefs(a),emit:o,inputEl:l}),v=e.computed(()=>{const k=["pl-2"];return a.showClear&&p.value?k.push("pr-12"):(a.showClear||p.value)&&k.push("pr-8"),k.join(" ")});return n({focus:b}),(k,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":""])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(h))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(u)),1)],10,wn),e.createElementVNode("div",Bn,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:l,"onUpdate:modelValue":x[0]||(x[0]=E=>e.isRef(i)?i.value=E:null),name:t.name,class:[e.unref(d),v.value,t.textareaClasses||"","min-h-[3rem] simple-scrollbar text-sm"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(p)?"true":"false","aria-describedby":e.unref(s)},k.$attrs,{onChange:x[1]||(x[1]=E=>k.$emit("change",{event:E,value:e.unref(i)})),onInput:x[2]||(x[2]=E=>k.$emit("input",{event:E,value:e.unref(i)}))}),null,16,Vn),[[e.vModelText,e.unref(i)]]),t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute top-2 right-0 flex items-center pr-2 cursor-pointer",onClick:x[3]||(x[3]=(...E)=>e.unref(c)&&e.unref(c)(...E)),onKeydown:x[4]||(x[4]=(...E)=>e.unref(c)&&e.unref(c)(...E))},[En,e.createVNode(e.unref(M.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-start mt-2",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref(M.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(p)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 mt-0.5 text-4xl right-0 flex items-start text-danger opacity-50",[t.showClear?"pr-8":"pr-2"]])}," * ",2)):e.createCommentVNode("",!0)]),e.unref(s)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(s),class:e.normalizeClass(e.unref(m))},e.toDisplayString(e.unref(f)),11,Nn)):e.createCommentVNode("",!0)],2))}}),Sn=["for"],zn={class:"relative"},In={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},Ln=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],Dn=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Mn=["id"],Le=e.defineComponent({inheritAttrs:!1,__name:"TextInput",props:{type:{type:String,default:"text"},name:{type:String,required:!0},showLabel:{type:Boolean,required:!1},help:{type:String,default:void 0},placeholder:{type:String,default:void 0},label:{type:String,default:void 0},showRequired:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},customIcon:{type:[Object,Function],default:void 0},autoFocus:{type:Boolean,default:!1},modelValue:{type:String,default:""},size:{type:String,default:"base"},showClear:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},inputClasses:{type:String,default:null},hideErrorMessage:{type:Boolean,default:!1},wrapperClasses:{type:String,default:()=>""},color:{type:String,default:"page"}},emits:["update:modelValue","change","input","clear","focus","blur"],setup(t,{expose:n,emit:r}){const o=t,a=r,l=e.useSlots(),d=e.ref(null),{coreClasses:u,title:i,value:s,helpTipId:m,helpTipClasses:f,helpTip:p,hideHelpTip:h,errorMessage:c,clear:b,focus:v,labelClasses:k}=be({props:e.toRefs(o),emit:a,inputEl:d}),x=e.computed(()=>{const $=["h-5 w-5"];return c.value?$.push("text-danger"):$.push("text-foreground-2"),$.join(" ")}),E=e.computed(()=>["email","password"].includes(o.type)||o.customIcon),C=e.computed(()=>{const $=[];return E.value?$.push("pl-8"):$.push("pl-2"),l["input-right"]||(c.value||o.showClear)&&(c.value&&o.showClear?$.push("pr-12"):$.push("pr-8")),$.join(" ")}),g=e.computed(()=>{switch(o.size){case"sm":return"h-6 text-sm";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8 text-sm"}});return n({focus:v}),($,z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":"",t.wrapperClasses])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(k))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(i)),1)],10,Sn),e.createElementVNode("div",zn,[E.value?(e.openBlock(),e.createElementBlock("div",In,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(x.value),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref(M.EnvelopeIcon),{key:1,class:e.normalizeClass(x.value),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref(M.KeyIcon),{key:2,class:e.normalizeClass(x.value),"aria-hidden":"true"},null,8,["class"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:t.name,ref_key:"inputElement",ref:d,"onUpdate:modelValue":z[0]||(z[0]=S=>e.isRef(s)?s.value=S:null),type:t.type,name:t.name,class:[e.unref(u),C.value,g.value,t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(c)?"true":"false","aria-describedby":e.unref(m),role:"textbox"},$.$attrs,{onChange:z[1]||(z[1]=S=>$.$emit("change",{event:S,value:e.unref(s)})),onInput:z[2]||(z[2]=S=>$.$emit("input",{event:S,value:e.unref(s)})),onFocus:z[3]||(z[3]=S=>$.$emit("focus")),onBlur:z[4]||(z[4]=S=>$.$emit("blur"))}),null,16,Ln),[[e.vModelDynamic,e.unref(s)]]),e.renderSlot($.$slots,"input-right",{},()=>[t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer",onClick:z[5]||(z[5]=(...S)=>e.unref(b)&&e.unref(b)(...S)),onKeydown:z[6]||(z[6]=(...S)=>e.unref(b)&&e.unref(b)(...S))},[Dn,e.createVNode(e.unref(M.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(c)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-center",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref(M.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(c)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center text-danger opacity-50",[t.showClear?"pr-8":"pr-2"]])}," * ",2)):e.createCommentVNode("",!0)])]),e.unref(m)&&!e.unref(h)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(m),class:e.normalizeClass(e.unref(f))},e.toDisplayString(e.unref(p)),11,Mn)):e.createCommentVNode("",!0)],2))}}),De=/^https?:\/\//,xe=/^[\w-_.+]+@[\w-_.+]+$/,Tn=t=>(t||"").match(xe)?!0:"Value should be a valid e-mail address",On=t=>(t||"").split(",").map(o=>o.trim()).every(o=>o.match(xe))||"Value should be one or multiple comma-delimited e-mail addresses",An=t=>(w.isString(t)&&(t=t.trim()),t?!0:"Value is required"),Pn=(t,n)=>(r,o)=>r===o.form[t]?!0:`Value must be the same as in field '${n||t}'`,jn=t=>n=>{const{minLength:r,maxLength:o}=t;return n=X.isNullOrUndefined(n)?"":n,w.isString(n)?!w.isUndefined(r)&&n.length<r?`Value needs to be at least ${r} characters long`:!w.isUndefined(o)&&n.length>o?`Value needs to be no more than ${o} characters long`:!0:"Value should be a text string"},Fn=t=>n=>{const{match:r,message:o}=t;return w.isString(n)?r?w.isString(r)?n.includes(r)?!0:o:r.test(n)?!0:o:!0:"Value should be a text string"},_n=t=>De.test(t)?!0:"Value is not a valid URL",Rn=t=>Array.isArray(t)&&t.length>0?!0:"Value should have at least a single item selected",Un=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:xe,VALID_HTTP_URL:De,isEmail:Tn,isItemSelected:Rn,isOneOrMultipleEmails:On,isRequired:An,isSameAs:Pn,isStringOfLength:jn,isUrl:_n,stringContains:Fn},Symbol.toStringTag,{value:"Module"}));function Ce(t){const{skipCalculation:n,elementToWatchForChanges:r,itemContainer:o,trackResize:a=!1,trackMutations:l=!0}=t||{},d=e.ref(0),u=()=>{const i=o.value;if(n!=null&&n.value||!i)return;const s=i.children;let m=0,f=0,p;for(const h of s){const c=h.offsetTop;w.isUndefined(p)?(p=c,m+=1):c===p&&(m+=1),f+=1}d.value=f-m};return a&&A.useResizeObserver(r,u),l&&A.useMutationObserver(r,u,{childList:!0,subtree:!0}),{hiddenItemCount:d}}function we(t){const{props:n,emit:r,dynamicVisibility:o}=t;let a;if(o){const{elementToWatchForChanges:s,itemContainer:m}=o;a=Ce({skipCalculation:e.computed(()=>{var p;return!((p=n.multiple)!=null&&p.value)}),elementToWatchForChanges:s,itemContainer:m}).hiddenItemCount}else a=e.ref(0);const l=e.computed({get:()=>{var m,f;const s=(m=n.modelValue)==null?void 0:m.value;return(f=n.multiple)!=null&&f.value?w.isArray(s)?s:[]:w.isArray(s)?void 0:s},set:s=>{var m,f,p;if((m=n.multiple)!=null&&m.value&&!w.isArray(s)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((f=n.multiple)!=null&&f.value)&&w.isArray(s)){console.warn("Attempting to set array value in selector w/ multiple=false");return}r("update:modelValue",(p=n.multiple)!=null&&p.value?s||[]:s)}}),d=s=>w.isArray(s);return{selectedValue:l,hiddenSelectedItemCount:a,isArrayValue:d,isMultiItemArrayValue:s=>w.isArray(s)&&s.length>1,firstItem:s=>d(s)?s[0]:s}}const qn=t=>(e.pushScopeId("data-v-89e77cae"),t=t(),e.popScopeId(),t),Wn=qn(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),Hn=[Wn],Kn=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",t.loading?"opacity-100":"opacity-0"])},Hn,2))}});const de=ce(Kn,[["__scopeId","data-v-89e77cae"]]),Gn={class:"flex items-center justify-between w-full"},Xn={class:"block truncate grow text-left text-xs sm:text-sm"},Zn={class:"pointer-events-none shrink-0 ml-1 flex items-center space-x-2"},Qn={key:1,class:"text-4xl text-danger opacity-50 h-4 w-4 leading-6"},Jn=["disabled"],Yn={key:0,class:"flex flex-col mx-1 mb-1"},eo=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),to={class:"relative"},no={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},oo=["placeholder"],lo={key:0,class:"px-1"},ao={key:1},so=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷‍♂️",-1),ro={class:e.normalizeClass(["block truncate"])},io=["id"],Be=e.defineComponent({__name:"Base",props:{multiple:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},modelValue:{type:[Object,Array,String],default:void 0},search:{type:Boolean,default:!1},filterPredicate:{type:Function,default:void 0},disabledItemPredicate:{type:Function,default:void 0},getSearchResults:{type:Function,default:void 0},searchPlaceholder:{type:String,default:"Search"},label:{type:String,required:!0},placeholder:{type:String},showLabel:{type:Boolean,default:!1},name:{type:String,required:!0},by:{type:String,required:!1},disabled:{type:Boolean,default:!1},buttonStyle:{type:String,default:"base"},hideCheckmarks:{type:Boolean,default:!1},allowUnset:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},help:{type:String,default:void 0},fixedHeight:{type:Boolean,default:!1},fullyControlValue:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1},mountMenuOnBody:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{expose:n,emit:r}){const o=y=>w.isObjectLike(y),a=r,l=t,{value:d,errorMessage:u}=le.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,validateOnValueUpdate:l.validateOnValueUpdate,initialValue:l.modelValue}),i=A.useMounted(),s=e.ref(null),m=e.ref(null),f=e.ref(null),p=e.ref(""),h=e.ref([]),c=e.ref(!1),b=e.ref(1),v=e.ref(ie.nanoid()),k=A.useElementBounding(e.computed(()=>{var y;return(y=f.value)==null?void 0:y.el}),{windowResize:!0,windowScroll:!0,immediate:!0});A.useIntersectionObserver(e.computed(()=>{var y;return(y=m.value)==null?void 0:y.el}),([{isIntersecting:y}])=>{y&&l.mountMenuOnBody&&k.update()});const x=e.computed(()=>e.unref(l.label)||e.unref(l.name)),E=e.computed(()=>{const y=u.value;return!y||!e.unref(l.useLabelInErrors)?y:y.replace("Value",x.value)}),C=e.computed(()=>E.value||e.unref(l.help)),g=e.computed(()=>!!C.value),$=e.computed(()=>g.value?`${e.unref(l.name)}-${v.value}`:void 0),z=e.computed(()=>u.value?"text-danger":"text-foreground-2"),S=e.computed(()=>l.buttonStyle!=="simple"&&l.clearable&&!l.disabled),fe=e.computed(()=>{const y=["relative flex group"];return u.value?(y.push("hover:shadow rounded-md"),y.push("text-danger-darker focus:border-danger focus:ring-danger"),l.buttonStyle!=="simple"&&y.push("outline outline-2 outline-danger")):l.buttonStyle!=="simple"&&(y.push("hover:shadow rounded-md"),y.push("outline outline-2 outline-primary-muted")),l.fixedHeight&&y.push("h-8"),y.join(" ")}),K=e.computed(()=>{const y=[];return l.buttonStyle!=="simple"&&y.push(Z.value?"bg-foundation-disabled text-foreground-disabled":""),Z.value&&y.push("cursor-not-allowed"),y.join(" ")}),pe=e.computed(()=>{const y=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all","text-foreground",J.value?`w-6 ${K.value}`:"w-0"];return Z.value||(y.push("hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"),l.buttonStyle==="tinted"?y.push("bg-outline-3"):y.push("bg-primary-muted")),y.join(" ")}),he=e.computed(()=>{const y=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",K.value];return l.buttonStyle!=="simple"&&(y.push("py-2 px-3"),Z.value||(l.buttonStyle==="tinted"?y.push("bg-foundation-page text-foreground"):y.push("bg-foundation text-foreground"))),S.value&&J.value&&y.push("rounded-r-none"),y.join(" ")}),Q=e.computed(()=>!!(l.search&&(l.filterPredicate||l.getSearchResults))),_=e.computed(()=>Q.value&&l.getSearchResults),Z=e.computed(()=>l.disabled||!l.items.length&&!_.value),O=e.computed({get:()=>{const y=d.value;return l.multiple?w.isArray(y)?y:[]:w.isArray(y)?void 0:y},set:y=>{if(l.multiple&&!w.isArray(y)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!l.multiple&&w.isArray(y)){console.warn("Attempting to set array value in selector w/ multiple=false");return}let L;if(l.multiple)L=y||[];else{const I=d.value;L=l.allowUnset&&I&&y&&V(I)===V(y)?void 0:y}l.fullyControlValue?a("update:modelValue",L):d.value=L,b.value+=1}}),J=e.computed(()=>l.multiple&&w.isArray(O.value)?O.value.length!==0:!!O.value),ve=()=>{l.multiple?O.value=[]:O.value=void 0},ge=e.computed(()=>{const y=p.value;return!Q.value||!(y!=null&&y.length)?h.value:l.filterPredicate?h.value.filter(L=>{var I;return((I=l.filterPredicate)==null?void 0:I.call(l,L,y))||!1}):h.value}),ne=e.computed(()=>{const y=["rounded-md bg-foundation-2 py-1 label label--light outline outline-2 outline-primary-muted focus:outline-none shadow mt-1 "];return l.mountMenuOnBody?y.push("fixed z-50"):y.push("absolute top-[100%] w-full z-10"),y.join(" ")}),B=e.computed(()=>{const y={};if(l.mountMenuOnBody){const L=k.top.value,I=k.left.value,j=k.width.value,U=k.height.value;y.top=`${L+U}px`,y.left=`${I}px`,y.width=`${j}px`}return y}),N=y=>JSON.stringify(y),V=y=>o(y)?y[l.by||"id"]:y,P=async()=>{if(!(!_.value||!l.getSearchResults)){c.value=!0;try{h.value=await l.getSearchResults(p.value)}finally{c.value=!1}}},R=w.debounce(P,1e3),oe=y=>{const{active:L,disabled:I}=y||{},{hideCheckmarks:j}=l,U=["relative transition cursor-pointer select-none py-1.5 pl-3",j?"":"pr-9"];return I?U.push("opacity-50 cursor-not-allowed"):U.push(L?"text-primary":"text-foreground"),U.join(" ")};return e.watch(()=>l.items,y=>{h.value=y.slice()},{immediate:!0}),e.watch(p,()=>{_.value&&R()}),e.onMounted(()=>{_.value&&!l.items.length&&P()}),n({triggerSearch:P}),(y,L)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.unref(D.Listbox),{key:b.value,modelValue:O.value,"onUpdate:modelValue":L[4]||(L[4]=I=>O.value=I),name:t.name,multiple:t.multiple,by:t.by,disabled:Z.value,as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref(D.ListboxLabel),{class:e.normalizeClass(["block label text-foreground-2 mb-2",{"sr-only":!t.showLabel}])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["class"]),e.createElementVNode("div",{class:e.normalizeClass(fe.value)},[e.createVNode(e.unref(D.ListboxButton),{ref_key:"listboxButton",ref:f,class:e.normalizeClass(he.value)},{default:e.withCtx(({open:I})=>[e.createElementVNode("div",Gn,[e.createElementVNode("div",Xn,[!O.value||e.unref(w.isArray)(O.value)&&!O.value.length?e.renderSlot(y.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.placeholder?t.placeholder:t.label),1)]):e.renderSlot(y.$slots,"something-selected",{key:1,value:O.value},()=>[e.createTextVNode(e.toDisplayString(N(O.value)),1)])]),e.createElementVNode("div",Zn,[E.value?(e.openBlock(),e.createBlock(e.unref(T.ExclamationCircleIcon),{key:0,class:"h-4 w-4 text-danger","aria-hidden":"true"})):t.showRequired?(e.openBlock(),e.createElementBlock("div",Qn," * ")):e.createCommentVNode("",!0),I?(e.openBlock(),e.createBlock(e.unref(T.ChevronUpIcon),{key:2,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref(T.ChevronDownIcon),{key:3,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),S.value?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(pe.value),disabled:t.disabled,onClick:L[0]||(L[0]=I=>ve())},[e.createVNode(e.unref(T.XMarkIcon),{class:"w-3 h-3"})],10,Jn)),[[e.unref(Se.directive),"Clear"]]):e.createCommentVNode("",!0),e.unref(i)?(e.openBlock(),e.createBlock(e.Transition,{key:1,"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:!t.mountMenuOnBody},[e.createVNode(e.unref(D.ListboxOptions),{ref_key:"menuEl",ref:m,class:e.normalizeClass(ne.value),style:e.normalizeStyle(B.value),onFocus:L[3]||(L[3]=I=>{var j;return(j=s.value)==null?void 0:j.focus()})},{default:e.withCtx(()=>[Q.value?(e.openBlock(),e.createElementBlock("label",Yn,[eo,e.createElementVNode("div",to,[e.createElementVNode("div",no,[e.createVNode(e.unref(T.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:s,"onUpdate:modelValue":L[1]||(L[1]=I=>p.value=I),type:"text",class:"pl-9 w-full border-0 bg-foundation-page rounded placeholder:font-normal normal placeholder:text-foreground-2 focus:outline-none focus:ring-1 focus:border-outline-1 focus:ring-outline-1",placeholder:t.searchPlaceholder,onKeydown:L[2]||(L[2]=e.withModifiers(()=>{},["stop"]))},null,40,oo),[[e.vModelText,p.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[Q.value?"max-h-52":"max-h-40"]])},[_.value&&c.value?(e.openBlock(),e.createElementBlock("div",lo,[e.createVNode(de,{loading:!0})])):_.value&&!h.value.length?(e.openBlock(),e.createElementBlock("div",ao,[e.renderSlot(y.$slots,"nothing-found",{},()=>[so])])):e.createCommentVNode("",!0),!_.value||!c.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(ge.value,I=>{var j;return e.openBlock(),e.createBlock(e.unref(D.ListboxOption),{key:V(I),value:I,disabled:((j=t.disabledItemPredicate)==null?void 0:j.call(t,I))||!1},{default:e.withCtx(({active:U,selected:Ve})=>{var Ee,Ne;return[e.createElementVNode("li",{class:e.normalizeClass(oe({active:U,disabled:((Ee=t.disabledItemPredicate)==null?void 0:Ee.call(t,I))||!1}))},[e.createElementVNode("span",ro,[e.renderSlot(y.$slots,"option",{item:I,active:U,selected:Ve,disabled:((Ne=t.disabledItemPredicate)==null?void 0:Ne.call(t,I))||!1},()=>[e.createTextVNode(e.toDisplayString(N(I)),1)])]),!t.hideCheckmarks&&Ve?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([U?"text-primary":"text-foreground","absolute inset-y-0 right-0 flex items-center pr-4"])},[e.createVNode(e.unref(T.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]}),_:2},1032,["value","disabled"])}),128)):e.createCommentVNode("",!0)],2)]),_:3},8,["class","style"])],8,["disabled"]))]),_:3})):e.createCommentVNode("",!0)],2)]),_:3},8,["modelValue","name","multiple","by","disabled"])),$.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:$.value,class:e.normalizeClass(["mt-2 text-xs sm:text-sm",z.value])},e.toDisplayString(C.value),11,io)):e.createCommentVNode("",!0)]))}}),Me=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(n,r)=>(e.openBlock(),e.createBlock(ue,{"color-classes":"text-foreground-on-primary",rounded:"",style:e.normalizeStyle({backgroundColor:t.sourceApp.bgColor})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.sourceApp.short),1)]),_:1},8,["style"]))}}),co={key:0,class:"text-foreground-2 normal"},uo={key:1,class:"flex items-center"},mo={class:"truncate"},fo={class:"flex items-center"},po={class:"truncate"},ho=e.defineComponent({__name:"SourceApps",props:{multiple:{type:Boolean,default:!1},modelValue:{type:[Object,Array],default:void 0},search:{type:Boolean,default:!1},searchPlaceholder:{type:String,default:"Search apps"},selectorPlaceholder:{type:String,default:void 0},label:{type:String,required:!0},showLabel:{type:Boolean,default:!1},name:{type:String,default:void 0},items:{type:Array,default:void 0},clearable:{type:Boolean},help:{type:String}},emits:["update:modelValue"],setup(t,{emit:n}){const r=n,o=t,a=e.ref(null),l=e.ref(null),{selectedValue:d,hiddenSelectedItemCount:u,isMultiItemArrayValue:i,firstItem:s}=we({props:e.toRefs(o),emit:r,dynamicVisibility:{elementToWatchForChanges:a,itemContainer:l}}),m=(f,p)=>f.name.toLocaleLowerCase().includes(p.toLocaleLowerCase());return(f,p)=>(e.openBlock(),e.createBlock(Be,{modelValue:e.unref(d),"onUpdate:modelValue":p[0]||(p[0]=h=>e.isRef(d)?d.value=h:null),multiple:t.multiple,items:t.items??e.unref(X.SourceApps),search:t.search,"search-placeholder":t.searchPlaceholder,label:t.label,"show-label":t.showLabel,name:t.name||"sourceApps","filter-predicate":m,clearable:t.clearable,help:t.help,by:"name"},{"nothing-selected":e.withCtx(()=>[t.selectorPlaceholder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.selectorPlaceholder),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.multiple?"Select apps":"Select an app"),1)],64))]),"something-selected":e.withCtx(({value:h})=>[e.unref(i)(h)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"elementToWatchForChanges",ref:a,class:"flex items-center space-x-0.5 h-5"},[e.createElementVNode("div",{ref_key:"itemContainer",ref:l,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h,c=>(e.openBlock(),e.createBlock(Me,{key:c.name,"source-app":c},null,8,["source-app"]))),128))],512),e.unref(u)>0?(e.openBlock(),e.createElementBlock("div",co," +"+e.toDisplayString(e.unref(u)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",uo,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(s)(h).bgColor})},null,4),e.createElementVNode("span",mo,e.toDisplayString(e.unref(s)(h).name),1)]))]),option:e.withCtx(({item:h})=>[e.createElementVNode("div",fo,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:h.bgColor})},null,4),e.createElementVNode("span",po,e.toDisplayString(h.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name","clearable","help"]))}}),vo={class:"flex flex-wrap gap-1.5 text-xs"},go=e.defineComponent({__name:"Badges",props:{items:null,label:null,name:null,help:null,modelValue:null,multiple:{type:Boolean},rules:null,by:null},emits:["update:modelValue"],setup(t,{emit:n}){const r=n,o=t,{selectedValue:a,isArrayValue:l}=we({props:e.toRefs(o),emit:r}),d=u=>{l(a.value)?a.value=a.value.filter(i=>i.id!==u.id):a.value=void 0};return(u,i)=>(e.openBlock(),e.createBlock(Be,{modelValue:e.unref(a),"onUpdate:modelValue":i[0]||(i[0]=s=>e.isRef(a)?a.value=s:null),multiple:t.multiple,items:t.items,label:t.label,name:t.name,help:t.help,rules:t.rules,by:t.by},{"something-selected":e.withCtx(({value:s})=>[e.createElementVNode("ul",vo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l)(s)?s:[s],m=>(e.openBlock(),e.createElementBlock("li",{key:m[t.by]},[e.createVNode(ue,{size:"lg","clickable-icon":!0,"icon-left":e.unref(T.XMarkIcon),onClickIcon:e.withModifiers(f=>d(m),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.text),1)]),_:2},1032,["icon-left","onClickIcon"])]))),128))])]),option:e.withCtx(({item:s})=>[e.createTextVNode(e.toDisplayString(s.text),1)]),_:1},8,["modelValue","multiple","items","label","name","help","rules","by"]))}}),yo={class:"flex items-center"},ko={class:"absolute inset-0 flex items-center gap-2 px-1 text-white"},bo=e.defineComponent({__name:"Switch",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue");return(r,o)=>(e.openBlock(),e.createElementBlock("div",yo,[e.createVNode(e.unref(D.Switch),{modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=a=>n.value=a),class:e.normalizeClass(["relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary",{"bg-primary":n.value,"bg-primary-muted":!n.value}])},{default:e.withCtx(()=>[e.createElementVNode("div",ko,[e.createVNode(e.unref(T.CheckIcon),{class:"h-5 w-5 drop-shadow-md"}),e.createVNode(e.unref(T.XMarkIcon),{class:"h-5 w-5 drop-shadow-md"})]),e.createElementVNode("span",{class:e.normalizeClass(["scale-95 pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200",{"translate-x-5":n.value,"translate-x-0":!n.value}])},null,2)]),_:1},8,["modelValue","class"])]))}}),xo={class:"relative group bg-foundation-page p-2 rounded-lg pr-12"},Co={class:"absolute inset-0 right-2 flex justify-end items-center"},wo=e.defineComponent({__name:"ClipboardInput",props:{value:null,isMultiline:{type:Boolean,default:!1},rows:null},emits:["copy"],setup(t,{emit:n}){const r=t,o=n,{copy:a}=A.useClipboard({legacy:!0}),l=e.ref(!1),d=async()=>{r.value&&(await a(r.value),l.value=!0,o("copy",r.value),setTimeout(()=>{l.value=!1},2e3))},u=i=>{const s=i.target,m=window.getSelection();if(m){const f=document.createRange();f.selectNodeContents(s),m.removeAllRanges(),m.addRange(f)}};return(i,s)=>(e.openBlock(),e.createElementBlock("div",xo,[t.isMultiline?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative z-10 text-xs sm:text-sm text-foreground font-mono break-all p-2 pl-3 max-h-[4.8rem] simple-scrollbar overflow-y-auto",onKeypress:s[0]||(s[0]=m=>e.unref(ke)(u))},e.toDisplayString(t.value),33)):(e.openBlock(),e.createBlock(e.unref(Le),{key:1,color:"transparent",name:"contentInput",readonly:"","model-value":t.value,class:"relative z-10 text-sm text-foreground font-mono"},null,8,["model-value"])),e.createElementVNode("div",Co,[e.createVNode(e.unref(F),{color:"invert",size:"sm","icon-left":l.value?e.unref(W.ClipboardDocumentCheckIcon):e.unref(W.ClipboardDocumentIcon),"hide-text":"",onClick:d},null,8,["icon-left"])])]))}});var te=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(te||{});const ae=X.getClientOperatingSystem(),Bo={"cmd-or-ctrl":ae===X.OperatingSystem.Mac?"Cmd":"Ctrl","alt-or-opt":ae===X.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function Vo(t){const n=r=>Object.values(te).includes(r);return t.map(r=>n(r)?Bo[r]:r).join("+")}function Eo(t,...n){A.onKeyDown(n[0],r=>{const o=r.getModifierState("Alt"),a=ae===X.OperatingSystem.Mac?r.getModifierState("Meta"):r.getModifierState("Control"),l=r.getModifierState("Shift");for(const d of t)switch(d){case te.CtrlOrCmd:if(!a)return;break;case te.AltOrOpt:if(!o)return;break;case te.Shift:if(!l)return;break}n[1](r)},n[2])}function No(t){const n=(t==null?void 0:t.model)||e.ref(),r=e.computed({get:()=>!!n.value,set:o=>n.value=o?!0:void 0});return{model:n,isChecked:r}}const $o=e.createElementVNode("div",{class:"fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity backdrop-blur-xs"},null,-1),So={class:"fixed inset-0 z-10 h-[100dvh] w-screen"},zo={class:"flex justify-center items-center h-full w-full p-4 sm:p-0"},Io={key:0,class:"flex items-center justify-start rounded-t-lg shrink-0 min-h-[2rem] sm:min-h-[4rem] py-2 px-4 sm:px-8 truncate text-lg sm:text-2xl font-bold"},Lo={class:"w-full truncate pr-12"},Do=e.defineComponent({__name:"Dialog",props:{open:{type:Boolean},maxWidth:null,hideCloser:{type:Boolean},preventCloseOnClickOutside:{type:Boolean},title:null,buttons:null,onSubmit:{type:Function}},emits:["update:open","fully-closed"],setup(t,{emit:n}){const r=n,o=t,a=e.useSlots(),l=e.ref(!1),d=e.ref(!0),u=e.computed(()=>!!o.onSubmit),i=e.computed(()=>o.buttons||a.buttons),s=e.computed(()=>o.title||a.header),m=e.computed({get:()=>o.open,set:b=>r("update:open",b)}),f=e.computed(()=>{switch(o.maxWidth){case"sm":return 0;case"md":return 1;case"lg":return 2;case"xl":return 3;default:return 1e4}}),p=e.computed(()=>{const b=["w-full","sm:w-full sm:max-w-2xl"];return f.value>=1&&b.push("md:max-w-2xl"),f.value>=2&&b.push("lg:max-w-4xl"),f.value>=3&&b.push("xl:max-w-6xl"),f.value>=4&&b.push("2xl:max-w-7xl"),b.join(" ")}),h=()=>{o.preventCloseOnClickOutside||(m.value=!1)},c=w.throttle(b=>{const v=b.target,{scrollTop:k,offsetHeight:x,scrollHeight:E}=v;l.value=k>0,d.value=k+x>=E},60);return(b,v)=>(e.openBlock(),e.createBlock(e.unref(D.TransitionRoot),{as:"template",show:m.value},{default:e.withCtx(()=>[e.createVNode(e.unref(D.Dialog),{as:"div",class:"relative z-40",onClose:h},{default:e.withCtx(()=>[e.createVNode(e.unref(D.TransitionChild),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:e.withCtx(()=>[$o]),_:1}),e.createElementVNode("div",So,[e.createElementVNode("div",zo,[e.createVNode(e.unref(D.TransitionChild),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",onAfterLeave:v[2]||(v[2]=k=>b.$emit("fully-closed"))},{default:e.withCtx(()=>[e.createVNode(e.unref(D.DialogPanel),{class:e.normalizeClass(["transform rounded-lg text-foreground overflow-hidden bg-foundation text-left shadow-xl transition-all flex flex-col max-h-[90dvh]",p.value]),as:u.value?"form":"div",onSubmit:e.withModifiers(t.onSubmit,["prevent"])},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(l.value&&"relative z-20 shadow-lg")},[s.value?(e.openBlock(),e.createElementBlock("div",Io,[e.createElementVNode("div",Lo,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),e.renderSlot(b.$slots,"header")])])):e.createCommentVNode("",!0)],2),t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["absolute z-20 bg-foundation rounded-full p-1",s.value?"top-2 right-3 sm:top-4":"right-4 top-3"]),onClick:v[0]||(v[0]=k=>m.value=!1)},[e.createVNode(e.unref(W.XMarkIcon),{class:"h-5 sm:h-6 w-5 sm:w-6"})],2)),e.createElementVNode("div",{class:e.normalizeClass(["flex-1 simple-scrollbar overflow-y-auto",s.value?"p-3 sm:py-6 sm:px-8":"p-10"]),onScroll:v[1]||(v[1]=(...k)=>e.unref(c)&&e.unref(c)(...k))},[e.renderSlot(b.$slots,"default",{},()=>[e.createTextVNode("Put your content here!")])],34),i.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["relative z-50 flex px-4 py-2 sm:py-4 sm:px-6 gap-2 shrink-0 bg-foundation",!d.value&&"shadow-t"])},[t.buttons?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.buttons,(k,x)=>(e.openBlock(),e.createBlock(e.unref(F),e.mergeProps({key:x},k.props,{disabled:k.disabled,type:k.submit&&"submit",onClick:k.onClick}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.text),1)]),_:2},1040,["disabled","type","onClick"]))),128)):e.renderSlot(b.$slots,"buttons",{key:1})],2)):e.createCommentVNode("",!0)]),_:3},8,["class","as","onSubmit"])]),_:3})])])]),_:3})]),_:3},8,["show"]))}}),Mo={class:"h-4 sm:h-5 h-4 sm:w-5 empty:h-0 empty:w-0"},To=e.defineComponent({__name:"DialogSection",props:{title:String,borderT:Boolean,borderB:Boolean,allowOverflow:Boolean,titleColor:{type:String,default:"default"},button:Object,alwaysOpen:Boolean,lazyLoad:{type:Boolean,default:!1}},setup(t){const n=t,r=e.ref(null),o=e.ref(0),a=e.ref(!1),l=e.computed(()=>{const i=[];return!n.button&&!n.alwaysOpen&&i.push("cursor-pointer","hover:bg-foundation"),a.value&&i.push("bg-foundation"),i}),d=e.computed(()=>{switch(n.titleColor){case"danger":return"text-danger";case"warning":return"text-warning";case"success":return"text-success";case"secondary":return"text-secondary";case"info":return"text-info";default:return"text-foreground"}}),u=async()=>{var i;a.value=!a.value,a.value&&(await e.nextTick(),o.value=(((i=e.unref(r))==null?void 0:i.scrollHeight)||0)+64)};return(i,s)=>{var m,f;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col border-primary-muted",{"border-t":t.borderT,"border-b":t.borderB,"relative z-10":a.value}])},[e.createElementVNode("div",e.mergeProps({class:["flex justify-between items-center gap-4 sm:gap-8 py-3 sm:py-4 px-2",l.value],tabindex:"0"},e.toHandlers(!t.button&&!t.alwaysOpen?{click:u,keypress:e.unref(ke)(u)}:{},!0)),[e.createElementVNode("div",{class:e.normalizeClass(["text-sm sm:text-base font-bold flex items-center gap-1 sm:gap-2 select-none",d.value])},[e.createElementVNode("div",Mo,[e.renderSlot(i.$slots,"icon")]),e.createElementVNode("span",null,e.toDisplayString(t.title),1)],2),e.createElementVNode("div",null,[!t.button&&!t.alwaysOpen?(e.openBlock(),e.createBlock(e.unref(W.ChevronDownIcon),{key:0,class:e.normalizeClass(["w-4 h-4 sm:w-5 sm:h-5 transition-all duration-400",a.value&&"rotate-180"])},null,8,["class"])):e.createCommentVNode("",!0),t.button?(e.openBlock(),e.createBlock(e.unref(F),e.mergeProps({key:1,size:"sm",to:t.button.expandContent?void 0:t.button.to,color:t.button.expandContent&&a.value?"invert":t.button.color,"icon-right":t.button.expandContent&&a.value?void 0:t.button.iconRight,onClick:(m=t.button)==null?void 0:m.onClick},e.toHandlers((f=t.button)!=null&&f.expandContent?{click:u}:{})),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.button.expandContent&&a.value?"Cancel":t.button.text),1)]),_:1},16,["to","color","icon-right","onClick"])):e.createCommentVNode("",!0)])],16),e.createElementVNode("div",{class:e.normalizeClass(["transition-all duration-700 overflow-hidden",[t.allowOverflow&&a.value?"!overflow-visible":"",a.value?"mb-3 mt-1":"",!t.button&&!t.alwaysOpen?"cursor-pointer hover:bg-foundation":""]]),style:e.normalizeStyle(t.alwaysOpen?"max-height: none;":`max-height: ${a.value?o.value+"px":"0px"}`)},[n.lazyLoad?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.value||n.alwaysOpen?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"content",ref:r,class:"rounded-md text-sm pb-3 px-2 mt-1"},[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])],512)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"content",ref:r,class:"rounded-md text-sm pb-3 px-2 mt-1"},[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])],512))],6)],2)}}}),Oo={class:"inline-flex items-center space-x-2"},Ao={class:"label-light"},Po=e.defineComponent({__name:"Disclosure",props:{title:null,icon:null,color:{default:"default"}},setup(t){const n=t,r=e.computed(()=>{const a=["pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition","ring-1 font-medium"];switch(n.color){case"warning":a.push("border-warning text-warning ring-warning-lighter hover:ring-warning");break;case"success":a.push("border-success text-success ring-success-lighter hover:ring-success");break;case"danger":a.push("border-danger text-danger ring-danger-lighter hover:ring-danger");break;case"default":default:a.push("border-primary text-primary ring-primary-muted hover:ring-primary");break}return a.join(" ")}),o=e.computed(()=>{const a=["p-3 border-x border-b rounded-b-md"];switch(n.color){case"warning":a.push("border-warning-lighter");break;case"success":a.push("border-success-lighter");break;case"danger":a.push("border-danger-lighter");break;case"default":default:a.push("border-primary-muted");break}return a.join(" ")});return(a,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(D.Disclosure),null,{default:e.withCtx(({open:d})=>[e.createVNode(e.unref(D.DisclosureButton),{class:e.normalizeClass(r.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Oo,[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.title),1)]),e.createVNode(e.unref(T.ChevronUpIcon),{class:e.normalizeClass([d?"":"rotate-180 transform","h-5 w-5"])},null,8,["class"])]),_:2},1032,["class"]),e.createVNode(e.unref(D.DisclosurePanel),{class:e.normalizeClass(o.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Ao,[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])])]),_:3},8,["class"])]),_:3})]))}});var G=(t=>(t.Grid="grid",t.List="list",t))(G||{});const jo={class:"relative flex bg-foundation rounded-md"},Fo={class:"relative z-10 flex gap-1 items-center p-1 rounded-l"},_o={class:"relative z-10 flex gap-1 items-center p-1 rounded-r"},Ro=e.defineComponent({__name:"GridListToggle",props:{modelValue:null},emits:["click","update:modelValue"],setup(t,{emit:n}){const r=n,o=t,a=e.computed({get:()=>o.modelValue||G.Grid,set:d=>r("update:modelValue",d)}),l=d=>{r("click",d);const u=a.value===G.Grid?G.List:G.Grid;a.value=u};return(d,u)=>(e.openBlock(),e.createElementBlock("button",{class:"max-w-max transition flex justify-center items-center gap-2 outline-none select-none h-8 text-foreground border-2 bg-foundation border-foundation-2 rounded-md hover:ring-2 active:scale-[0.97] grow",onClick:l},[e.createElementVNode("div",jo,[e.createElementVNode("div",{class:e.normalizeClass(["absolute -top-[2px] -left-[2px] transition",{"translate-x-7":a.value!==e.unref(G).Grid}])},[e.createElementVNode("div",{class:e.normalizeClass([a.value!==e.unref(G).Grid?"rounded-r-md":"rounded-l-md","w-8 h-8 bg-primary-muted shadow-inner transition"])},null,2)],2),e.createElementVNode("div",Fo,[e.createVNode(e.unref(T.Squares2X2Icon),{class:"h-5 w-5"})]),e.createElementVNode("div",_o,[e.createVNode(e.unref(T.Bars3Icon),{class:"h-5 w-5"})])])]))}});var Te=(t=>(t[t.Throttle=0]="Throttle",t[t.Debounce=1]="Debounce",t))(Te||{}),se=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(se||{});function Oe(t,n){if(!A.isClient)return;const{wait:r=100,throttleOrDebounce:o=0}=n||{},a=r?o===0?w.throttle(t,r):w.debounce(t,r):t;e.onMounted(()=>window.addEventListener("resize",a)),e.onBeforeUnmount(()=>window.removeEventListener("resize",a))}function Uo(t){e.onMounted(()=>{window.addEventListener("beforeunload",t)}),e.onBeforeUnmount(()=>{window.removeEventListener("beforeunload",t)})}function Ae(t){const{el:n,defaultDirection:r}=t,o=e.ref(w.isUndefined(r)?1:r),a=e.computed(()=>{const d=e.unref(t.stopUpdatesBelowWidth);if(!w.isUndefined(d))return d;const u=e.unref(n);return u!=null&&u.offsetWidth?u.offsetWidth*2:void 0}),l=()=>{if(!A.isClient)return;const d=e.unref(n);if(!d)return;const u=d.getBoundingClientRect(),i=u.x+u.width>window.innerWidth,s=u.x<0;i&&s||!w.isUndefined(a.value)&&window.innerWidth<a.value||(i?o.value=0:s&&(o.value=1))};return Oe(()=>l()),e.watch(()=>e.unref(n),d=>{d&&l()}),{direction:e.computed(()=>o.value),recalculateDirection:l}}const qo=["disabled","onClick"],Wo=e.defineComponent({__name:"Menu",props:{open:{type:Boolean},items:null},emits:["update:open","chosen"],setup(t,{emit:n}){const r=n,o=t,a=e.ref(null),{direction:l}=Ae({el:e.computed(()=>{var h;return((h=a.value)==null?void 0:h.el)||null}),defaultDirection:se.Left,stopUpdatesBelowWidth:300}),d=e.ref(null),u=e.ref(!1),i=e.computed({get:()=>o.open||!1,set:h=>r("update:open",h)}),s=h=>{const{active:c,disabled:b,color:v}=h,k=["group flex gap-3 w-full items-center rounded-md px-2 py-1.5 text-sm"];return c&&!v?k.push("bg-foundation-focus text-foreground"):b?k.push("text-foreground-disabled"):v==="danger"&&c?k.push("text-foreground-on-primary bg-danger"):v==="danger"&&!c?k.push("text-danger"):v==="info"&&c?k.push("text-foreground-on-primary bg-info"):v==="info"&&!c?k.push("text-info"):k.push("text-foreground"),k.join(" ")},m=(h,c)=>{r("chosen",{item:h,event:c})},f=()=>{var h;return(h=d.value)==null?void 0:h.el.click()},p=h=>{const c=!!h;return u.value=c,c};return e.watch(u,(h,c)=>{h!==c&&(i.value=h)}),e.watch(i,h=>{(h&&!u.value||!h&&u.value)&&f()}),(h,c)=>(e.openBlock(),e.createBlock(e.unref(D.Menu),{as:"div",class:"relative inline-block"},{default:e.withCtx(({open:b})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(D.MenuButton),{ref_key:"menuButton",ref:d,class:"hidden",onClick:c[0]||(c[0]=e.withModifiers(()=>{},["stop","prevent"]))},null,512),e.createElementVNode("div",{class:e.normalizeClass(b?"pointer-events-none":"")},[e.renderSlot(h.$slots,"default",{toggle:f,open:p(b)})],2)]),e.createVNode(e.Transition,{"enter-active-class":"transition duration-100 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-75 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(D.MenuItems),{ref_key:"menuItems",ref:a,class:e.normalizeClass(["absolute mt-2 w-48 origin-top-right divide-y divide-outline-3 rounded-md bg-foundation shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-40",e.unref(l)===e.unref(se).Left?"right-0":""])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(v,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"p-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v,x=>(e.openBlock(),e.createBlock(e.unref(D.MenuItem),{key:x.id,disabled:x.disabled,color:x.color},{default:e.withCtx(({active:E,disabled:C})=>[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.createElementVNode("button",{class:e.normalizeClass(s({active:E,disabled:C,color:x.color})),disabled:C,onClick:g=>m(x,g)},[x.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.icon),{key:0,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"item",{item:x},()=>[e.createTextVNode(e.toDisplayString(x.title),1)])],10,qo)])),[[e.unref(Se.directive),x.disabled&&x.disabledTooltip]])]),_:2},1032,["disabled","color"]))),128))]))),128))]),_:3},8,["class"])]),_:3})]),_:3}))}}),Ho={class:"flex flex-col gap-y-0 sm:gap-y-4"},Ko={class:"flex gap-x-6"},Go=e.defineComponent({__name:"Tabs",props:{items:null},setup(t){const n=t,r=e.ref(null),o=e.computed(()=>r.value&&n.items.find(l=>l.id===r.value)||n.items[0]),a=l=>{r.value=l.id};return(l,d)=>(e.openBlock(),e.createElementBlock("div",Ho,[e.createElementVNode("div",Ko,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,u=>(e.openBlock(),e.createBlock(F,{key:u.id,link:"",color:o.value.id===u.id?"default":"secondary",onClick:i=>a(u)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.title),1)]),_:2},1032,["color","onClick"]))),128))]),e.renderSlot(l.$slots,"default",{activeItem:o.value})]))}}),Xo=e.createElementVNode("div",{class:"hidden lg:block absolute bottom-0 left-0 h-px w-full bg-outline-3"},null,-1),Zo=["data-tab-id","onClick"],Qo={class:"min-w-6"},Jo={key:2,class:"text-[10px] leading-tight py-0.5 text-foreground-on-primary font-medium px-1.5 rounded-full bg-gradient-to-tr from-[#7025EB] to-primary select-none mt-0.5"},Yo=e.defineComponent({__name:"PageTabs",props:{items:null,vertical:{type:Boolean},title:null},setup(t){const n=t,r=e.ref(null),o=e.ref(null),a=e.computed(()=>n.items.find(m=>m.id===o.value)||n.items[0]),l=e.computed(()=>{const s=o.value;if(!s)return null;const m=r.value;return m&&[...m.getElementsByClassName("tab-button")].find(p=>p.dataset.tabId===s)||null}),d=e.computed(()=>{const s=l.value;return{left:`${(s==null?void 0:s.offsetLeft)||0}px`,width:`${(s==null?void 0:s.clientWidth)||0}px`}}),u=s=>{o.value=s.id},i=s=>{!A.isClient||!(s!=null&&s.id)||(o.value=s.id)};return e.watch(()=>n.items,s=>{i(s[0])},{immediate:!0}),(s,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative z-10 flex gap-4",t.vertical?"sm:gap-8 flex-col sm:flex-row":"sm:gap-10 flex-col"])},[e.createElementVNode("div",{class:e.normalizeClass(["relative flex sm:justify-between overflow-x-auto",t.vertical?"items-center sm:items-start sm:flex-col sm:w-2/12 border-r border-outline gap-4 pl-4":"border-b border-outline-3 lg:border-none gap-8 w-full"])},[t.vertical?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Xo,e.createElementVNode("div",{style:e.normalizeStyle(d.value),class:"h-[2px] absolute bottom-0 z-20 bg-primary transition-all duration-300"},null,4)],64)),e.createElementVNode("div",{ref_key:"buttonContainer",ref:r,class:e.normalizeClass(["flex",t.vertical?"flex-wrap sm:flex-nowrap flex-row sm:flex-col gap-4":"gap-6"])},[t.title?(e.openBlock(),e.createElementBlock("h1",{key:0,class:e.normalizeClass(["font-bold h4",t.vertical?"w-full sm:w-auto -ml-4 mb-4":"mb-2"])},e.toDisplayString(t.title),3)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,f=>(e.openBlock(),e.createElementBlock("button",{key:f.id,"data-tab-id":f.id,class:e.normalizeClass(["tab-button relative z-10 flex items-center gap-1.5 pb-2 border-b-[2px] border-transparent text-base max-w-max px-2",[a.value.id===f.id?"text-primary hover:text-primary":"text-foreground",t.vertical?"hover:border-outline":"hover:border-outline-2"]]),onClick:p=>u(f)},[f.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.icon),{key:0,class:"shrink-0 h-4 w-4 stroke-[2px]"})):e.createCommentVNode("",!0),e.createElementVNode("span",Qo,e.toDisplayString(f.title),1),f.count?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["rounded-full px-2 text-[11px] transition-all min-w-6",a.value.id===f.id?"text-primary bg-blue-100":"text-foreground-2 bg-gray-200 dark:bg-foundation"])},[e.createElementVNode("span",null,e.toDisplayString(f.count),1)],2)):e.createCommentVNode("",!0),f.tag?(e.openBlock(),e.createElementBlock("div",Jo,e.toDisplayString(f.tag),1)):e.createCommentVNode("",!0)],10,Zo))),128))],2)],2),e.createElementVNode("div",{class:e.normalizeClass(t.vertical?"sm:w-10/12":"")},[e.renderSlot(s.$slots,"default",{activeItem:a.value})],2)],2))}}),el={class:"text-foreground"},tl={class:"w-full text-sm overflow-x-auto overflow-y-visible simple-scrollbar"},nl=["onClick","onKeypress"],ol=e.createElementVNode("div",{class:"text-gray-900 font-medium order-1"},"Placeholder",-1),ll={class:"absolute right-1.5 gap-1 flex items-center p-0 h-full"},al=e.defineComponent({__name:"Table",props:{items:null,buttons:null,columns:null,overflowCells:{type:Boolean},onRowClick:{type:Function},rowItemsAlign:{default:"center"}},setup(t){const n=t,r=e.computed(()=>{const u=(n.buttons||[]).length;let i=16;return u>0&&(i=48+(u-1)*42),`${i}px`}),o=e.computed(()=>{const u=["relative grid grid-cols-12 items-center gap-6 px-4 py-1 min-w-[900px] bg-foundation"];switch(n.onRowClick&&u.push("cursor-pointer hover:bg-primary-muted"),n.rowItemsAlign){case"center":u.push("items-center");break;case"stretch":u.push("items-stretch");break}return u.join(" ")}),a=u=>{var i;return((i=n.columns.find(s=>s.id===u))==null?void 0:i.classes)||""},l=(u,i)=>{const s=a(u);return i===0?`bg-transparent py-3 pr-5 px-1 ${s}`:`lg:p-0 px-1 my-2 ${s}`},d=u=>{var i;(i=n.onRowClick)==null||i.call(n,u)};return(u,i)=>(e.openBlock(),e.createElementBlock("div",el,[e.createElementVNode("div",tl,[t.items.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"grid z-10 grid-cols-12 items-center gap-6 font-semibold bg-foundation rounded-t-lg w-full border-b border-outline-3 pb-2 pt-4 px-4 min-w-[900px]",style:e.normalizeStyle({paddingRight:r.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,class:e.normalizeClass([a(s.id),"capitalize"])},e.toDisplayString(s.header),3))),128))],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["divide-y divide-outline-3 h-full overflow-visible",{"pb-32":t.overflowCells}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,style:e.normalizeStyle({paddingRight:r.value}),class:e.normalizeClass(o.value),tabindex:"0",onClick:m=>d(s),onKeypress:m=>d(s)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,(m,f)=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:e.normalizeClass(l(m.id,f)),tabindex:"0"},[e.renderSlot(u.$slots,m.id,{item:s},()=>[ol])],2))),128)),e.createElementVNode("div",ll,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.buttons,m=>(e.openBlock(),e.createElementBlock("div",{key:m.label},[e.createVNode(e.unref(F),{"icon-left":m.icon,size:"sm",color:"secondary","hide-text":"",class:e.normalizeClass(m.class),"text-color":m.textColor,to:e.unref(w.isString)(m.action)?m.action:void 0,onClick:e.withModifiers(f=>e.unref(w.isString)(m.action)?e.unref(w.noop):m.action(s),["stop"])},null,8,["icon-left","class","text-color","to","onClick"])]))),128))])],46,nl))),128))],2)])]))}}),sl=e.createElementVNode("div",{class:"h-8"},null,-1),rl={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},il={class:"inline-flex items-center space-x-1"},cl=e.createElementVNode("span",{class:"text-foreground-2"},"An error occurred while loading",-1),ul=e.defineComponent({__name:"InfiniteLoading",props:{settings:null,allowRetry:{type:Boolean}},emits:["infinite"],setup(t){const n=e.ref(null),r=e.ref(!1);return A.isClient&&e.onMounted(()=>{const o=setInterval(()=>{var a;(a=n.value)!=null&&a.isConnected&&(r.value=!0,clearInterval(o))},200)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:n},[r.value?(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps({key:0},o.$props.settings||{},{onInfinite:a[0]||(a[0]=l=>o.$emit("infinite",l))}),{spinner:e.withCtx(()=>[e.createVNode(de,{loading:!0,class:"my-2"})]),complete:e.withCtx(()=>[sl]),error:e.withCtx(({retry:l})=>[e.createElementVNode("div",rl,[e.createElementVNode("div",il,[e.createVNode(e.unref(W.ExclamationTriangleIcon),{class:"w-5 h-5 text-danger"}),cl]),t.allowRetry?(e.openBlock(),e.createBlock(F,{key:0,onClick:l},{default:e.withCtx(()=>[e.createTextVNode("Retry")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:1},16)):e.createCommentVNode("",!0)],512))}}),dl={class:"relative group"},ml={key:0,class:"absolute -inset-1 bg-blue-300 dark:bg-blue-500 opacity-5 dark:opacity-0 rounded-md blur-sm group-hover:opacity-60 dark:group-hover:opacity-30 transition duration-500"},fl=e.defineComponent({__name:"Panel",props:{form:{type:Boolean,default:!1},ring:{type:Boolean,default:!1},fancyGlow:{type:Boolean,default:!1},customPadding:{type:Boolean,default:!1},noShadow:{type:Boolean,default:!1},panelClasses:{type:String}},emits:["submit"],setup(t,{emit:n}){const r=n,o=t,a=e.computed(()=>o.customPadding?"":"px-4 py-4 sm:px-6"),l=e.computed(()=>o.customPadding?"":"px-4 py-4 sm:p-6"),d=e.computed(()=>{const u=["rounded-lg"];return o.noShadow||u.push("shadow"),o.ring&&u.push("ring-outline-2 hover:ring-2"),o.panelClasses&&u.push(o.panelClasses),u.join(" ")});return(u,i)=>(e.openBlock(),e.createElementBlock("div",dl,[t.fancyGlow?(e.openBlock(),e.createElementBlock("div",ml)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.form?"form":"div"),{class:e.normalizeClass(["relative divide-outline-3 bg-foundation text-foreground flex flex-col divide-y overflow-hidden",d.value]),onSubmit:i[0]||(i[0]=s=>r("submit",s))},{default:e.withCtx(()=>[u.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.value)},[e.renderSlot(u.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grow",l.value])},[e.renderSlot(u.$slots,"default")],2),u.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(a.value)},[e.renderSlot(u.$slots,"footer")],2)):e.createCommentVNode("",!0)]),_:3},40,["class"]))]))}}),pl={class:"flex-shrink-0"},hl=e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),vl=e.defineComponent({__name:"Alert",props:{color:{default:"success"},withDismiss:{type:Boolean},actions:null,customIcon:null,size:{default:"default"}},emits:["dismiss"],setup(t){const n=t,r=e.useSlots(),o=e.computed(()=>!!r.description),a=e.computed(()=>{if(n.customIcon)return n.customIcon;switch(n.color){case"info":return M.InformationCircleIcon;case"warning":return M.ExclamationCircleIcon;case"danger":return M.XCircleIcon;case"success":default:return M.CheckCircleIcon}}),l=e.computed(()=>{const c=[];switch(n.size){case"xs":c.push("p-1");break;case"default":default:c.push(o.value?"p-3 sm:p-4":"p-2");break}switch(n.color){case"success":c.push("bg-success-lighter border-l-4 border-success");break;case"info":c.push("bg-info-lighter border-l-4 border-info");break;case"danger":c.push("bg-danger-lighter border-l-4 border-danger");break;case"warning":c.push("bg-warning-lighter border-l-4 border-warning");break}return c.join(" ")}),d=e.computed(()=>{const c=[];if(o.value)c.push("");else switch(c.push("items-center"),n.size){case"xs":c.push("space-x-1");break;case"default":default:c.push("space-x-2");break}return c.join(" ")}),u=e.computed(()=>{const c=["grow"];switch(o.value||c.push("flex items-center space-x-2"),n.size){case"xs":c.push("ml-1");break;case"default":default:c.push("ml-3");break}return c.join(" ")}),i=e.computed(()=>{const c=[];switch(n.size){case"xs":c.push("text-xs");break;case"default":default:c.push("mt-1 sm:mt-2 text-xs sm:text-sm");break}return c.join(" ")}),s=e.computed(()=>{var v;const c=["flex"];o.value||c.push("grow justify-end");const b=o.value&&((v=n.actions)==null?void 0:v.length);switch(n.size){case"xs":c.push("space-x-1"),b&&c.push("mt-1");break;case"default":default:c.push("space-x-2"),b&&c.push("mt-4");break}return c.join(" ")}),m=e.computed(()=>{const c=[];switch(n.color){case"success":c.push("text-success-darker");break;case"info":c.push("text-info-darker");break;case"danger":c.push("text-danger-darker");break;case"warning":c.push("text-warning-darker");break}return c.join(" ")}),f=e.computed(()=>{const c=[];switch(n.size){case"xs":c.push("h-4 w-4"),c.push(o.value?"mt-0.5":"");break;case"default":default:c.push("h-5 w-5");break}switch(n.color){case"success":c.push("text-success");break;case"info":c.push("text-info");break;case"danger":c.push("text-danger");break;case"warning":c.push("text-warning");break}return c.join(" ")}),p=e.computed(()=>{const c=[];switch(n.color){case"success":c.push("bg-success-lighter ring-success");break;case"info":c.push("bg-info-lighter ring-info");break;case"danger":c.push("bg-danger-lighter ring-danger");break;case"warning":c.push("bg-warning-lighter ring-warning");break}return c.join(" ")}),h=e.computed(()=>{switch(n.size){case"xs":return"xs";case"default":default:return"sm"}});return(c,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded-md",[l.value,m.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",d.value])},[e.createElementVNode("div",pl,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),{class:e.normalizeClass(f.value),"aria-hidden":"true"},null,8,["class"]))]),e.createElementVNode("div",{class:e.normalizeClass(u.value)},[e.createElementVNode("h3",{class:e.normalizeClass(["text-sm",[o.value?"font-medium":""]])},[e.renderSlot(c.$slots,"title",{},()=>[e.createTextVNode("Title")])],2),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(i.value)},[e.renderSlot(c.$slots,"description",{},()=>[e.createTextVNode(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(s.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions||[],(v,k)=>(e.openBlock(),e.createBlock(F,{key:k,color:t.color,size:h.value,to:v.url,external:v.externalUrl||!1,onClick:x=>v.onClick||e.unref(w.noop)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.title),1)]),_:2},1032,["color","size","to","external","onClick"]))),128))],2)],2),t.withDismiss?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex",[o.value?"items-start":"items-center"]])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["inline-flex rounded-md focus:outline-none focus:ring-2",p.value]),onClick:b[0]||(b[0]=v=>c.$emit("dismiss"))},[hl,e.createVNode(e.unref(M.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)],2)):e.createCommentVNode("",!0)],2)],2))}});function gl(t){var c,b;const{get:n,initialState:r,readOptions:o,set:a,asyncRead:l=!0,debugging:d}=t,u=d==null?void 0:d.log,i=()=>(new Error("Trace:").stack||"").substring(7),s=((b=(c=t.debugging)==null?void 0:c.log)==null?void 0:b.logger)||console.debug,m=u&&!u.writesOnly?()=>{const v=n();return s(`debugging: '${u.name}' read`,v,i()),v}:n,f=u&&!u.readsOnly?v=>(s(`debugging: '${u.name}' written to`,v,i()),a(v)):a,p=l?A.computedAsync(m,r,o):e.computed(m),h=e.computed(()=>p.value);return h.update=f,h}const yl=e.defineComponent({__name:"ContextManager",setup(t,{expose:n}){const o=e.getCurrentInstance().provides,a=Object.getOwnPropertySymbols(o).find(p=>p.description==="ComboboxContext");a||console.error("FormTagsContextManager ctx key not found!");const l=e.inject(a||"__undefined");return l||console.error("FormTagsContextManager ctx not found!"),n({goUp:()=>{l==null||l.goToOption(1)},goDown:()=>{l==null||l.goToOption(2)},open:()=>{l&&l.openCombobox()},close:()=>{l==null||l.closeCombobox()},selectActive:()=>{l==null||l.selectActiveOption()},isOpen:()=>(l==null?void 0:l.comboboxState.value)===0}),(p,h)=>e.renderSlot(p.$slots,"default")}}),kl=["for"],bl=["disabled","placeholder","onKeydown"],xl=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Cl={key:1},wl=e.createElementVNode("div",{class:"text-foreground-2 text-center"},[e.createTextVNode(" Press "),e.createElementVNode("strong",null,"Enter"),e.createTextVNode(" to create tag ⚡ ")],-1),Bl=[wl],Vl=["id"],El=e.defineComponent({__name:"Tags",props:{name:null,help:null,label:null,showLabel:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},autoFocus:{type:Boolean},showClear:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"},wrapperClasses:null,size:{default:"base"},placeholder:null,disabled:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},getAutocompleteItems:{type:Function},modelValue:null},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:r}){const o=B=>B.type==="input",a=r,l=t,d=e.ref(null),{focused:u}=A.useFocus(d),i=e.ref(null),{coreInputClasses:s,coreClasses:m,labelClasses:f,title:p,helpTip:h,helpTipId:c,hideHelpTip:b,helpTipClasses:v,errorMessage:k,clear:x,value:E}=be({props:e.toRefs(l),emit:a,inputEl:d}),C=e.ref([]),g=e.ref(!1),$=e.ref(!1),z=e.ref(""),S=e.computed({get:()=>E.value||[],set:B=>{E.value=w.uniq(B).filter(N=>!!N.length)}}),fe=e.computed(()=>{switch(l.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}}),K=e.computed(()=>l.showClear&&!!S.value.length),pe=e.computed(()=>{const B=[m.value,l.disabled?"cursor-not-allowed !bg-foundation-disabled !text-disabled-muted":""];return K.value&&(k.value||l.showRequired)?B.push("pr-14"):(K.value||k.value||l.showRequired)&&B.push("pr-8"),k.value?(B.push("border-2 border-danger text-danger-darker"),u.value&&B.push("ring-1 ring-danger")):(B.push("border-2 border-transparent"),u.value&&B.push("ring-2 ring-outline-2")),B.join(" ")}),he=B=>{if(l.disabled)return;const N=S.value.indexOf(B);if(N!==-1){const V=S.value.slice();V.splice(N,1),S.value=V}},Q=()=>{var B;(B=d.value)==null||B.blur(),$.value=!1},_=B=>{if(B.key!=="Backspace"||z.value.length)return;const N=S.value.slice();N.pop(),S.value=N,$.value=!1},Z=()=>{var B,N,V;(B=i.value)!=null&&B.isOpen()?(N=i.value)==null||N.goUp():(V=i.value)==null||V.open()},O=()=>{var B,N,V;(B=i.value)!=null&&B.isOpen()?(N=i.value)==null||N.goDown():(V=i.value)==null||V.open()},J=async()=>{l.getAutocompleteItems&&(g.value=!0,C.value=await Promise.resolve(l.getAutocompleteItems(z.value)),g.value=!1)},ve=w.debounce(J,1e3),ge=()=>{g.value=!0,ve()},ne=(B,N)=>{var P,R;if(o(B)?B.data===" "||B.data===","||B.data===";":!0){let oe=!1;if((P=i.value)!=null&&P.isOpen()&&C.value.length&&!N)(R=i.value)==null||R.selectActive(),oe=!0;else{const y=z.value.trim().substring(0,z.value.length-(o(B)?1:0)),L=S.value.includes(y);y.length>0&&!L&&(S.value=[...S.value,y],oe=!0)}oe&&(z.value="",$.value=!1)}else $.value=!!z.value.length};return e.watch($,(B,N)=>{var V,P;B&&!N?l.getAutocompleteItems&&((V=i.value)==null||V.open()):!B&&N&&((P=i.value)==null||P.close())}),e.watch(z,()=>{ge()}),e.onMounted(()=>{J()}),n({resolveAutocompleteItems:J}),(B,N)=>(e.openBlock(),e.createBlock(e.unref(D.Combobox),{modelValue:S.value,"onUpdate:modelValue":N[5]||(N[5]=V=>S.value=V),as:"div",multiple:"",clearable:"",class:e.normalizeClass([t.wrapperClasses])},{default:e.withCtx(()=>[e.createVNode(yl,{ref_key:"ctxManager",ref:i},{default:e.withCtx(()=>[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(f))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(p)),1)],10,kl),e.createElementVNode("div",{class:e.normalizeClass(["relative flex flex-wrap items-center space-x-1 px-2 py-1",pe.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,V=>(e.openBlock(),e.createBlock(ue,{key:V,"icon-left":t.disabled?void 0:e.unref(M.XMarkIcon),"clickable-icon":"",size:"lg",onClickIcon:()=>he(V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V),1)]),_:2},1032,["icon-left","onClickIcon"]))),128)),e.withDirectives(e.createElementVNode("input",{ref_key:"inputEl",ref:d,"onUpdate:modelValue":N[0]||(N[0]=V=>z.value=V),disabled:t.disabled,class:e.normalizeClass(["bg-transparent grow shrink border-0 focus:ring-0 p-0",[e.unref(s),fe.value]]),style:{"flex-basis":"70px","min-width":"70px"},placeholder:S.value.length?void 0:t.placeholder,onInput:ne,onKeydown:[e.withKeys(Q,["escape"]),N[1]||(N[1]=e.withKeys(e.withModifiers(V=>ne(V,!0),["stop","prevent"]),["enter"])),e.withKeys(ne,["tab"]),e.withKeys(_,["backspace"]),e.withKeys(Z,["arrow-up"]),e.withKeys(O,["arrow-down"])],onBlur:N[2]||(N[2]=V=>$.value=!1)},null,42,bl),[[e.vModelText,z.value]]),K.value?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute top-2 right-0 flex items-center pr-2 cursor-pointer",onClick:N[3]||(N[3]=(...V)=>e.unref(x)&&e.unref(x)(...V)),onKeydown:N[4]||(N[4]=(...V)=>e.unref(x)&&e.unref(x)(...V))},[xl,e.createVNode(e.unref(M.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute top-[10px] right-0 flex items-center",K.value?"pr-8":"pr-2"])},[e.createVNode(e.unref(M.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(k)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute top-[2px] text-4xl right-0 flex items-center text-danger opacity-50",K.value?"pr-8":"pr-2"])}," * ",2)):e.createCommentVNode("",!0)],2),e.createVNode(e.unref(D.TransitionRoot),{leave:"transition ease-in duration-100","leave-from":"opacity-100","leave-to":"opacity-0",class:"relative px-0.5"},{default:e.withCtx(()=>[e.createVNode(e.unref(D.ComboboxOptions),{class:"absolute top-1 max-h-60 w-full overflow-auto simple-scrollbar rounded-md bg-foundation-2 py-1 shadow label label--light outline outline-2 outline-primary-muted focus:outline-none"},{default:e.withCtx(()=>[g.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["px-1",C.value.length?"mb-1":""])},[e.createVNode(de,{loading:!0})],2)):e.createCommentVNode("",!0),!C.value.length&&!g.value?(e.openBlock(),e.createElementBlock("div",Cl,Bl)):e.createCommentVNode("",!0),C.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(C.value,V=>(e.openBlock(),e.createBlock(e.unref(D.ComboboxOption),{key:V,as:"template",value:V},{default:e.withCtx(({selected:P,active:R})=>[e.createElementVNode("li",{class:e.normalizeClass(["relative cursor-pointer select-none py-1.5 pl-3",{"text-primary":R,"text-foreground":!R}])},[e.createElementVNode("span",{class:e.normalizeClass(["block truncate",{"font-medium":P,"font-normal":!P}])},e.toDisplayString(V),3),P?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["absolute inset-y-0 right-0 flex items-center pr-4",{"text-primary":R,"text-foreground":!R}])},[e.createVNode(e.unref(M.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]),_:2},1032,["value"]))),128)):e.createCommentVNode("",!0)]),_:1})]),_:1}),e.unref(c)&&!e.unref(b)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(c),class:e.normalizeClass(e.unref(v))},e.toDisplayString(e.unref(h)),11,Vl)):e.createCommentVNode("",!0)]),_:1},512)]),_:1},8,["modelValue","class"]))}});function Pe(t){const{props:n}=t,r=e.computed(()=>{var i;switch((i=n.size)==null?void 0:i.value){case"xs":return"h-5";case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"xxl":return"h-32";case"editable":return"h-60";case"base":default:return"h-8"}}),o=e.computed(()=>{var i;switch((i=n.size)==null?void 0:i.value){case"xs":return"w-5";case"sm":return"w-6";case"lg":return"w-10";case"xl":return"w-14";case"xxl":return"w-32";case"editable":return"w-60";case"base":default:return"w-8"}}),a=e.computed(()=>{var i;switch((i=n.size)==null?void 0:i.value){case"xs":return"text-tiny";case"sm":return"text-xs";case"lg":return"text-md";case"xl":return"text-2xl";case"xxl":return"text-3xl";case"editable":return"h1";case"base":default:return"text-sm"}}),l=e.computed(()=>{var i;switch((i=n.size)==null?void 0:i.value){case"xs":return"w-3 h-3";case"sm":return"w-3 h-3";case"lg":return"w-5 h-5";case"xl":return"w-8 h-8";case"xxl":return"w-10 h-10";case"editable":return"w-20 h-20";case"base":default:return"w-4 h-4"}}),d=e.computed(()=>`${o.value} ${r.value} ${a.value}`);return{heightClasses:r,widthClasses:o,sizeClasses:d,iconClasses:l}}const Nl={key:1,class:"flex h-full w-full select-none items-center justify-center"},$l={key:2},re=e.defineComponent({__name:"Avatar",props:{user:{default:null},size:{default:"base"},hoverEffect:{type:Boolean,default:!1},active:{type:Boolean},noBorder:{type:Boolean},noBg:{type:Boolean}},setup(t){const n=t,{sizeClasses:r,iconClasses:o}=Pe({props:e.toRefs(n)}),a=e.computed(()=>{var p,h,c;if(!((p=n.user)!=null&&p.name.length))return;const s=n.user.name.split(" "),m=((h=s[0])==null?void 0:h[0])||"",f=((c=s[1])==null?void 0:c[0])||"";return n.size==="sm"||n.size==="xs"?m:m+f}),l=e.computed(()=>n.noBorder?"":"border-2 border-foundation"),d=e.computed(()=>n.noBg?"":"bg-primary"),u=e.computed(()=>n.hoverEffect?"hover:border-primary focus:border-primary active:scale-95":""),i=e.computed(()=>n.active?"border-primary":"");return(s,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["text-foreground-on-primary flex shrink-0 items-center justify-center overflow-hidden rounded-full font-semibold uppercase transition",e.unref(r),d.value,l.value,u.value,i.value])},[e.renderSlot(s.$slots,"default",{},()=>{var f;return[(f=t.user)!=null&&f.avatar?(e.openBlock(),e.createElementBlock("div",{key:0,class:"h-full w-full bg-cover bg-center bg-no-repeat",style:e.normalizeStyle({backgroundImage:`url('${t.user.avatar}')`})},null,4)):a.value?(e.openBlock(),e.createElementBlock("div",Nl,e.toDisplayString(a.value),1)):(e.openBlock(),e.createElementBlock("div",$l,[e.createVNode(e.unref(T.UserCircleIcon),{class:e.normalizeClass(e.unref(o))},null,8,["class"])]))]}),e.renderSlot(s.$slots,"absolute-anchor")],2))}}),Sl=e.defineComponent({__name:"AvatarGroup",props:{users:{default:()=>[]},overlap:{type:Boolean,default:!0},size:{default:"base"},maxCount:{default:void 0}},setup(t){const n=t,r=e.ref(null),o=e.ref(null),{hiddenItemCount:a}=Ce({elementToWatchForChanges:r,itemContainer:o,trackResize:!0,trackMutations:!0}),{heightClasses:l}=Pe({props:e.toRefs(n)}),d=e.computed(()=>n.maxCount?Math.max(n.users.length-n.maxCount,0):0),u=e.computed(()=>a.value+d.value),i=e.computed(()=>n.maxCount?n.users.slice(0,n.maxCount):n.users);return(s,m)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"elementToWatchForChanges",ref:r,class:e.normalizeClass(`flex ${t.overlap?"-space-x-2":""}`)},[e.createElementVNode("div",{ref_key:"itemContainer",ref:o,class:e.normalizeClass(`flex flex-wrap overflow-hidden ${t.overlap?"-space-x-2 ":""} ${e.unref(l)}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(f,p)=>(e.openBlock(),e.createBlock(re,{key:f.id||p,user:f,size:t.size},null,8,["user","size"]))),128))],2),u.value?(e.openBlock(),e.createBlock(re,{key:0,size:t.size},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(u.value),1)]),_:1},8,["size"])):e.createCommentVNode("",!0)],2))}}),je=e.defineComponent({__name:"Icon",props:{loading:{type:Boolean,default:!0},size:{default:"base"}},setup(t){const n=t,r=e.computed(()=>{const o=["text-primary transition-all animate-spin"];switch(o.push(n.loading?"opacity-100":"opacity-0"),n.size){case"base":o.push("h-8 w-8");break;case"sm":o.push("h-5 w-5");break;case"lg":o.push("h-12 w-12");break}return o.join(" ")});return(o,a)=>(e.openBlock(),e.createBlock(e.unref(T.ArrowPathIcon),{class:e.normalizeClass(r.value)},null,8,["class"]))}}),zl={class:"flex flex-col items-center space-y-2"},Il={key:1,class:"relative group"},Ll={class:"opacity-0 transition-all absolute group-hover:opacity-100 inset-0 flex items-end justify-center bottom-4"},Dl={key:2,class:"w-full text-center text-danger text-sm"},Ml=e.defineComponent({__name:"AvatarEditable",props:e.mergeModels({modelValue:null,placeholder:null,name:null,rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},disabled:{type:Boolean},size:null},{editMode:{type:Boolean,local:!0}}),emits:e.mergeModels(["save","update:modelValue"],["update:editMode"]),setup(t,{expose:n,emit:r}){const o=e.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>require("./AvatarEditor-25bff065.cjs")),loadingComponent:je,delay:100}),a=r,l=t,{value:d,errorMessage:u}=le.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,validateOnValueUpdate:l.validateOnValueUpdate,initialValue:l.modelValue||void 0}),i=e.useModel(t,"editMode",{local:!0}),s=e.computed(()=>({avatar:d.value,name:l.placeholder})),m=h=>{d.value=h,a("save",h)};return n({open:()=>i.value=!0,close:()=>i.value=!1}),(h,c)=>(e.openBlock(),e.createElementBlock("div",zl,[i.value?(e.openBlock(),e.createBlock(e.unref(o),{key:0,user:s.value,disabled:t.disabled,size:t.size,onCancel:c[0]||(c[0]=b=>i.value=!1),onSave:m},null,8,["user","disabled","size"])):(e.openBlock(),e.createElementBlock("div",Il,[e.createVNode(re,{user:s.value,size:t.size},null,8,["user","size"]),e.createElementVNode("div",Ll,[e.createVNode(F,{disabled:t.disabled,color:"secondary",onClick:c[1]||(c[1]=b=>i.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(" Change ")]),_:1},8,["disabled"])])])),e.unref(u)?(e.openBlock(),e.createElementBlock("div",Dl,e.toDisplayString(e.unref(u)),1)):e.createCommentVNode("",!0)]))}});class H extends Error{constructor(n,r){n||(n=new.target.defaultMessage),super(n,r)}}q(H,"defaultMessage","Unexpected error occurred");class Fe extends H{}q(Fe,"defaultMessage","An unexpected logic error occurred!");class _e extends H{}q(_e,"defaultMessage","Attempting to access an uninitialized resource");class Re extends H{}q(Re,"defaultMessage","getCurrentInstance() returned null. Method must be called at the top of a setup function");class Ue extends H{}q(Ue,"defaultMessage","Operation not supported in current (server or client) environment");var me=(t=>(t.AnyAudio="audio/*",t.AnyVideo="video/*",t.AnyImage="image/*",t))(me||{});function Tl(t,n){const r=w.intersection(Object.values(me),n);for(const l of r)switch(l){case"audio/*":if(t.type.startsWith("audio"))return!0;break;case"image/*":if(t.type.startsWith("image"))return!0;break;case"video/*":if(t.type.startsWith("video"))return!0;break}const o=w.difference(n,r),a=Ol(t.name);if(!a)return new qe;for(const l of o)if(l.toLowerCase()===a.toLowerCase())return!0;return new We}function Ol(t){const n=t.split(".").pop()||null;return n?`.${n}`:null}function Al(t){return t.startsWith(".")||Object.values(me).includes(t)}function ye(t){const n=l=>parseFloat(l.toFixed(2)).toString();if(t<1024)return`${t}bytes`;const r=t/1024;if(r<1024)return`${n(r)}KB`;const o=r/1024;if(o<1024)return`${n(o)}MB`;const a=o/1024;return`${n(a)}GB`}function Pl(t){const n={name:t.name,lastModified:t.lastModified,size:t.size,type:t.type};return X.md5(JSON.stringify(n))}class qe extends H{}q(qe,"defaultMessage","The selected file has a missing extension");class We extends H{}q(We,"defaultMessage","The selected file type is forbidden");var He=(t=>(t[t.Success=1]="Success",t[t.Failure=2]="Failure",t))(He||{});function jl(t){if(!t)return;const n=t.split(",").map(r=>Al(r)?r:null).filter(r=>r!==null);return n.length?n:void 0}function Fl(t){const{disabled:n,accept:r,multiple:o,sizeLimit:a,countLimit:l}=t,d=e.computed(()=>jl(e.unref(r))),u=i=>{const s=[],m=d.value;for(const f of i){const p=Pl(f),h=e.unref(o)?e.unref(l):1;if(!s.find(c=>c.id===p)){if(h&&s.length>=h)break;if(m){const c=Tl(f,m);if(c instanceof Error){s.push({file:f,id:p,error:c});continue}}if(f.size>e.unref(a)){s.push({file:f,id:p,error:new Ke(`The selected file's size (${ye(f.size)}) is too big (over ${ye(e.unref(a))})`)});continue}s.push({file:f,id:p,error:null})}}return s};return{buildUploadableFiles:i=>{if(!e.unref(n||!1))return u(i)}}}class Ke extends H{}q(Ke,"defaultMessage","The selected file's size is too large");const _l=["accept","multiple"],Rl=e.defineComponent({__name:"Zone",props:{accept:null,multiple:{type:Boolean},sizeLimit:{default:1024*1024*100},countLimit:null,disabled:{type:Boolean}},emits:["files-selected"],setup(t,{expose:n,emit:r}){const o=r,a=t,l=e.ref(null),d=e.ref(null),{buildUploadableFiles:u}=Fl({sizeLimit:e.computed(()=>a.sizeLimit),countLimit:e.computed(()=>a.countLimit),accept:e.computed(()=>a.accept),multiple:e.computed(()=>a.multiple),disabled:e.computed(()=>a.disabled)}),i=p=>{const h=u(p);h!=null&&h.length&&o("files-selected",{files:h})},{isOverDropZone:s}=A.useDropZone(l,p=>{p!=null&&p.length&&i(p)}),m=()=>{const p=d.value;if(!p)return;const h=[...p.files||[]];p.value="",h.length&&i(h)},f=()=>{var p;(p=d.value)==null||p.click()};return n({triggerPicker:f}),(p,h)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"fileUploadZone",ref:l,class:"file-upload-zone"},[e.renderSlot(p.$slots,"default",{isDraggingFiles:e.unref(s),openFilePicker:f,activatorOn:{click:f}}),e.createElementVNode("input",{ref_key:"fileInput",ref:d,type:"file",class:"hidden",accept:t.accept,multiple:t.multiple,onClick:h[0]||(h[0]=e.withModifiers(()=>{},["stop"])),onChange:m},null,40,_l)],512))}});exports.BaseError=H;exports.BlobUploadStatus=He;exports.CommonAlert=vl;exports.CommonAnimationInstructional=nn;exports.CommonBadge=ue;exports.CommonLoadingBar=de;exports.CommonLoadingIcon=je;exports.CommonStepsBullet=Ft;exports.CommonStepsNumber=Et;exports.CommonTextLink=ze;exports.ComposableInvokedOutOfScopeError=Re;exports.FormButton=F;exports.FormCardButton=ln;exports.FormCheckbox=fn;exports.FormClipboardInput=wo;exports.FormFileUploadZone=Rl;exports.FormRadio=Cn;exports.FormSelectBadges=go;exports.FormSelectBase=Be;exports.FormSelectSourceApps=ho;exports.FormSwitch=bo;exports.FormTags=El;exports.FormTextArea=$n;exports.FormTextInput=Le;exports.GlobalToastRenderer=at;exports.GridListToggleValue=G;exports.HorizontalDirection=se;exports.InfiniteLoading=ul;exports.LayoutDialog=Do;exports.LayoutDialogSection=To;exports.LayoutDisclosure=Po;exports.LayoutGridListToggle=Ro;exports.LayoutMenu=Wo;exports.LayoutPageTabs=Yo;exports.LayoutPanel=fl;exports.LayoutTable=al;exports.LayoutTabs=Go;exports.LogicError=Fe;exports.ModifierKeys=te;exports.SourceAppBadge=Me;exports.TailwindBreakpoints=ee;exports.ThrottleOrDebounce=Te;exports.ToastNotificationType=Y;exports.UninitializedResourceAccessError=_e;exports.UniqueFileTypeSpecifier=me;exports.UnsupportedEnvironmentError=Ue;exports.UserAvatar=re;exports.UserAvatarEditable=Ml;exports.UserAvatarGroup=Sl;exports.ValidationHelpers=Un;exports.clientOs=ae;exports.getKeyboardShortcutTitle=Vo;exports.keyboardClick=ke;exports.onKeyboardShortcut=Eo;exports.prettyFileSize=ye;exports.useFormCheckboxModel=No;exports.useFormSelectChildInternals=we;exports.useOnBeforeWindowUnload=Uo;exports.useResponsiveHorizontalDirectionCalculation=Ae;exports.useWindowResizeHandler=Oe;exports.useWrappingContainerHiddenCount=Ce;exports.writableAsyncComputed=gl;
1
+ "use strict";var Ge=Object.defineProperty;var Xe=(t,n,r)=>n in t?Ge(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r;var q=(t,n,r)=>(Xe(t,typeof n!="symbol"?n+"":n,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("lodash"),T=require("@heroicons/vue/24/solid"),W=require("@heroicons/vue/24/outline"),M=require("@heroicons/vue/20/solid"),G=require("@speckle/shared"),le=require("vee-validate"),ie=require("nanoid"),A=require("@vueuse/core"),L=require("@headlessui/vue"),Se=require("vue-tippy"),Ze=require("v3-infinite-loading");const Qe=e.defineComponent({__name:"Button",props:{to:{type:String,required:!1,default:void 0},size:{type:String,default:"base"},fullWidth:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},link:{type:Boolean,default:!1},color:{type:String,default:"default"},textColor:{type:String,default:"default"},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},submit:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1},linkComponent:{type:[Object,Function],default:null},loading:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const r=n,o=t,a=e.resolveDynamicComponent("NuxtLink"),l=e.resolveDynamicComponent("RouterLink"),d=e.computed(()=>o.linkComponent?o.linkComponent:o.external?"a":w.isObjectLike(a)?a:w.isObjectLike(l)?l:"a"),u=e.computed(()=>{if(!o.to)return o.submit?"submit":"button"}),i=e.computed(()=>o.disabled||o.loading),s=e.computed(()=>o.loading?T.ArrowPathIcon:o.iconLeft),m=e.computed(()=>{const g=[];if(g.push("border-2"),i.value)g.push(o.outlined?"border-foreground-disabled":"bg-foundation-disabled border-transparent");else switch(o.color){case"invert":g.push(o.outlined?"border-foundation dark:border-foreground":"bg-foundation dark:bg-foreground border-transparent");break;case"card":g.push(o.outlined?"border-foundation-2 shadow":"bg-foundation-2 dark:bg-foundation-2 border-foundation shadow");break;case"danger":g.push(o.outlined?"border-danger":"bg-danger border-danger");break;case"secondary":g.push(o.outlined?"border-foundation":"bg-foundation border-foundation-2");break;case"warning":g.push(o.outlined?"border-warning":"bg-warning border-warning");break;case"info":g.push(o.outlined?"border-info":"bg-info border-info");break;case"success":g.push(o.outlined?"border-success":"bg-success border-success");break;case"default":default:g.push(o.outlined?"border-primary hover:border-primary-focus":"bg-primary hover:bg-primary-focus border-transparent");break}return g.join(" ")}),f=e.computed(()=>{const g=[],$=o.textColor!=="default";if($&&!i.value)switch(o.textColor){case"primary":g.push("text-primary");break;case"warning":g.push("text-warning");break;case"success":g.push("text-success");break;case"danger":g.push("text-danger");break;case"info":g.push("text-info");break}if(!o.text&&!o.link){if(i.value)g.push("text-foreground-disabled");else if(!$)switch(o.color){case"invert":g.push(o.outlined?"text-foundation dark:text-foreground":"text-primary");break;case"card":g.push((o.outlined,"text-foreground"));break;case"danger":g.push(o.outlined?"text-danger":"text-foundation dark:text-foreground");break;case"warning":g.push(o.outlined?"text-warning":"text-foundation dark:text-foreground");break;case"info":g.push(o.outlined?"text-info":"text-foundation dark:text-foreground");break;case"success":g.push(o.outlined?"text-success":"text-foundation dark:text-foreground");break;case"secondary":g.push((o.outlined,"text-foreground hover:text-primary"));break;case"default":default:g.push(o.outlined?"text-primary hover:text-primary-focus":"text-foundation dark:text-foreground");break}}else i.value?g.push("text-foreground-disabled"):$||(o.color==="invert"?g.push("text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"):o.color==="secondary"?g.push("text-foreground-2 hover:text-primary-focus"):o.color==="success"?g.push("text-success"):o.color==="warning"?g.push("text-warning"):o.color==="info"?g.push("text-info"):o.color==="danger"?g.push("text-danger"):g.push("text-primary hover:text-primary-focus"));return g.join(" ")}),p=e.computed(()=>{const g=[];return g.push(o.rounded?"rounded-full":"rounded-md"),g.join(" ")}),h=e.computed(()=>{const g=[];if(!i.value)switch(o.color){case"invert":g.push("hover:ring-4 ring-white/50");break;case"danger":g.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");break;case"warning":g.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");break;case"info":g.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");break;case"success":g.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");break;case"default":default:g.push("hover:ring-2");break}return g.join(" ")}),c=e.computed(()=>{switch(o.size){case"xs":return"h-5 text-xs font-medium xxx-tracking-wide";case"sm":return"h-6 text-sm font-medium xxx-tracking-wide";case"lg":return"h-10 text-lg font-semibold xxx-tracking-wide";case"xl":return"h-14 text-xl font-bold xxx-tracking-wide";default:case"base":return"h-8 text-sm sm:text-base font-medium xxx-tracking-wide"}}),b=e.computed(()=>{switch(o.size){case"xs":return"px-1";case"sm":return"px-2";case"lg":return"px-4";case"xl":return"px-5";default:case"base":return"px-3"}}),v=e.computed(()=>{const g=[];return o.fullWidth&&g.push("w-full"),i.value&&g.push("cursor-not-allowed"),g.join(" ")}),k=e.computed(()=>{const g=[];return!i.value&&!o.link&&!o.text&&g.push("active:scale-[0.97]"),!i.value&&o.link&&g.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),g.join(" ")}),x=e.computed(()=>{const g=o.link||o.text;return["transition inline-flex justify-center text-center items-center outline-none select-none leading-[0.9rem]",v.value,c.value,f.value,g?"":m.value,g?"":p.value,g?"":h.value,o.link?"":b.value,k.value].join(" ")}),E=e.computed(()=>{const g=[""];switch(o.loading&&g.push("animate-spin"),o.size){case"xs":g.push("h-3 w-3");break;case"sm":g.push("h-4 w-4");break;case"lg":g.push("h-6 w-6");break;case"xl":g.push("h-8 w-8");break;case"base":default:g.push("h-5 w-5");break}return g.join(" ")}),C=g=>{if(i.value){g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation();return}r("click",g)};return(g,$)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?d.value:"button"),{href:t.to,to:t.to,type:u.value,external:t.external,class:e.normalizeClass(x.value),disabled:i.value,role:"button",onClick:C},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{key:0,class:e.normalizeClass(`${E.value} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?e.createCommentVNode("",!0):e.renderSlot(g.$slots,"default",{key:1},()=>[e.createTextVNode("Button")],!0),t.iconRight||!t.loading?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconRight),{key:2,class:e.normalizeClass(`${E.value} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const ce=(t,n)=>{const r=t.__vccOpts||t;for(const[o,a]of n)r[o]=a;return r},F=ce(Qe,[["__scopeId","data-v-ee26d682"]]),ze=e.defineComponent({__name:"Link",props:{to:{type:String,required:!1,default:void 0},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},size:{type:String,default:"base"},foregroundLink:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1},noUnderline:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:n}){const r=n,o=t,a=l=>{if(o.disabled){l.preventDefault(),l.stopPropagation(),l.stopImmediatePropagation();return}r("click",l)};return(l,d)=>(e.openBlock(),e.createBlock(F,{link:!t.noUnderline,text:t.noUnderline,to:t.to,external:t.external,disabled:t.disabled,size:t.size,"foreground-link":t.foregroundLink,"icon-left":t.iconLeft,"icon-right":t.iconRight,"hide-text":t.hideText,role:"link",onClickCapture:a},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["link","text","to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var Y=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(Y||{});const Je={"aria-live":"assertive",class:"pointer-events-none fixed inset-0 flex items-end px-4 py-6 mt-10 sm:items-start sm:p-6 z-50"},Ye={class:"flex w-full flex-col items-center gap-4 sm:items-end"},et={class:"flex-shrink-0"},tt={class:"w-full min-w-[10rem]"},nt={key:1,class:"label label--light text-foreground-2 text-sm"},ot={key:2},lt=e.createElementVNode("span",{class:"sr-only"},"Close",-1),at=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:n}){const r=n,o=t,a=e.computed(()=>{var u,i;return!((u=o.notification)!=null&&u.description)&&!((i=o.notification)!=null&&i.cta)}),l=()=>{r("update:notification",null)},d=u=>{var i,s,m;(m=(s=(i=o.notification)==null?void 0:i.cta)==null?void 0:s.onClick)==null||m.call(s,u),l()};return(u,i)=>(e.openBlock(),e.createElementBlock("div",Je,[e.createElementVNode("div",Ye,[e.createVNode(e.Transition,{"enter-active-class":"transform ease-out duration-300 transition","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2","enter-to-class":"translate-y-0 opacity-100 sm:translate-x-0","leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[t.notification?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["pointer-events-auto w-full max-w-[20rem] overflow-hidden rounded-lg bg-foundation text-foreground shadow-lg ring-1 ring-primary-muted ring-opacity-5",a.value?"p-2":"p-3"])},[e.createElementVNode("div",{class:e.normalizeClass(["flex gap-2",a.value?"items-center":"items-start"])},[e.createElementVNode("div",et,[t.notification.type===e.unref(Y).Success?(e.openBlock(),e.createBlock(e.unref(W.CheckCircleIcon),{key:0,class:e.normalizeClass(["text-success",a.value?"h-5 w-5":"h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])):t.notification.type===e.unref(Y).Danger?(e.openBlock(),e.createBlock(e.unref(W.XCircleIcon),{key:1,class:e.normalizeClass(["text-danger",a.value?"h-5 w-5":"h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])):t.notification.type===e.unref(Y).Warning?(e.openBlock(),e.createBlock(e.unref(W.ExclamationCircleIcon),{key:2,class:e.normalizeClass(["text-warning",a.value?"h-5 w-5":"h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])):t.notification.type===e.unref(Y).Info?(e.openBlock(),e.createBlock(e.unref(W.InformationCircleIcon),{key:3,class:e.normalizeClass(["text-info",a.value?"h-5 w-5":"h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",tt,[t.notification.title?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(["text-foreground font-bold",a.value?"text-sm":"text-base"])},e.toDisplayString(t.notification.title),3)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",nt,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",ot,[e.createVNode(ze,{to:t.notification.cta.url,class:"label",size:"xs",primary:"",onClick:d},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.notification.cta.title),1)]),_:1},8,["to"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["ml-2 flex-shrink-0",a.value?"mt-1.5":""])},[e.createElementVNode("button",{type:"button",class:"inline-flex rounded-md bg-foundation text-foreground-2 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",onClick:l},[lt,e.createVNode(e.unref(M.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})])],2)],2)],2)):e.createCommentVNode("",!0)]),_:1})])]))}}),st="Enter";function ke(t){return n=>{n.code===st&&t(n)}}const rt=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),it=[rt],ue=e.defineComponent({__name:"Badge",props:{size:null,colorClasses:null,dot:{type:Boolean},dotIconColorClasses:null,iconLeft:null,rounded:{type:Boolean},clickableIcon:{type:Boolean}},emits:["click-icon"],setup(t,{emit:n}){const r=n,o=t,a=e.computed(()=>o.colorClasses||"bg-blue-100 text-blue-800"),l=e.computed(()=>o.dotIconColorClasses||"text-blue-400"),d=e.computed(()=>{const m=["inline-flex items-center",a.value,o.size==="lg"?"px-3 py-0.5 label":"px-2.5 py-0.5 caption font-medium"];return o.rounded?(m.push("rounded"),m.push(o.size==="lg"?"px-2 py-0.5 label":"px-2.5 py-0.5 caption font-medium")):(m.push("rounded-full"),m.push(o.size==="lg"?"px-2.5 py-0.5 label":"px-2.5 py-0.5 caption font-medium")),m.join(" ")}),u=e.computed(()=>{const m=["mt-0.5 ml-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full focus:outline-none"];return o.clickableIcon?m.push("cursor-pointer"):m.push("cursor-default"),m.join(" ")}),i=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",l.value].join(" ")),s=m=>{if(!o.clickableIcon){m.stopPropagation(),m.stopImmediatePropagation(),m.preventDefault();return}r("click-icon",m)};return(m,f)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(d.value)},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(i.value),fill:"currentColor",viewBox:"0 0 8 8"},it,2)):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(u.value),onClick:f[0]||(f[0]=p=>s(p))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",l.value])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});let $e=[];function ct(t){$e=$e?t:t.slice()}var ee=(t=>(t[t.sm=640]="sm",t[t.md=746]="md",t[t.lg=1024]="lg",t[t.xl=1280]="xl",t[t["2xl"]=1536]="2xl",t))(ee||{});function Ie(t){const{props:{modelValue:n,steps:r,orientation:o,goVerticalBelow:a,nonInteractive:l,stepsPadding:d},emit:u}=t,i=e.computed(()=>(o==null?void 0:o.value)==="vertical"?"vertical":"horizontal"),s=e.computed({get:()=>w.clamp((n==null?void 0:n.value)||0,-1,r.value.length),set:v=>u("update:modelValue",w.clamp(v,0,r.value.length))}),m=v=>`${v+1}`,f=v=>v===s.value,p=v=>v<s.value,h=(v,k)=>{var E;if(l!=null&&l.value){k==null||k.preventDefault(),k==null||k.stopPropagation(),k==null||k.stopImmediatePropagation();return}s.value=v;const x=r.value[s.value];(E=x==null?void 0:x.onClick)==null||E.call(x)},c=e.computed(()=>{const v=["flex"];let k,x;return(d==null?void 0:d.value)==="xs"?(k="space-x-2",x="space-y-1"):(d==null?void 0:d.value)==="sm"?(k="space-x-4",x="space-y-1"):(k="space-x-8",x="space-y-4"),v.push("flex"),i.value==="vertical"||a!=null&&a.value?(v.push(`flex-col ${x} justify-center`),(a==null?void 0:a.value)===ee.sm?v.push(`sm:flex-row sm:space-y-0 sm:justify-start sm:${k} sm:items-center`):(a==null?void 0:a.value)===ee.md?v.push(`md:flex-row md:space-y-0 md:justify-start md:${k} md:items-center`):(a==null?void 0:a.value)===ee.lg?v.push(`lg:flex-row lg:space-y-0 lg:justify-start lg:${k} lg:items-center`):(a==null?void 0:a.value)===ee.xl&&v.push(`xl:flex-row xl:space-y-0 xl:justify-start xl:${k} xl:items-center`)):v.push(`flex-row ${k} items-center`),v.join(" ")}),b=e.computed(()=>{const v=["flex items-center"];return l!=null&&l.value||v.push("cursor-pointer"),v.join(" ")});return{value:s,isCurrentStep:f,isFinishedStep:p,switchStep:h,getStepDisplayValue:m,listClasses:c,linkClasses:b,orientation:i}}ct(["sm:space-x-8","md:space-x-8","lg:space-x-8","xl:space-x-8","sm:space-x-2","md:space-x-2","lg:space-x-2","xl:space-x-2","sm:space-x-4","md:space-x-4","lg:space-x-4","xl:space-x-4"]);const ut=["aria-label"],dt=["href","onClick"],mt={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},ft={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},pt={class:"flex flex-col"},ht={key:0,class:"label label--light text-foreground"},vt=["href","onClick"],gt={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},yt={class:"shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center"},kt={class:"flex flex-col"},bt={key:0,class:"label label--light text-foreground"},xt=["href","onClick"],Ct={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},wt={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},Bt={class:"flex flex-col"},Vt={key:0,class:"label label--light"},Et=e.defineComponent({__name:"Number",props:{ariaLabel:null,orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:n}){const r=n,o=t,{isCurrentStep:a,isFinishedStep:l,switchStep:d,getStepDisplayValue:u,listClasses:i,linkClasses:s}=Ie({props:e.toRefs(o),emit:r});return(m,f)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(i))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(p,h)=>(e.openBlock(),e.createElementBlock("li",{key:p.name},[e.unref(l)(h)?(e.openBlock(),e.createElementBlock("a",{key:0,href:p.href,class:e.normalizeClass(e.unref(s)),onClick:c=>e.unref(d)(h,c)},[e.createElementVNode("div",mt,[e.createElementVNode("div",ft,[e.createVNode(e.unref(M.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",pt,[e.createElementVNode("div",null,e.toDisplayString(p.name),1),p.description?(e.openBlock(),e.createElementBlock("div",ht,e.toDisplayString(p.description),1)):e.createCommentVNode("",!0)])])],10,dt)):e.unref(a)(h)?(e.openBlock(),e.createElementBlock("a",{key:1,href:p.href,class:e.normalizeClass(e.unref(s)),"aria-current":"step",onClick:c=>e.unref(d)(h,c)},[e.createElementVNode("div",gt,[e.createElementVNode("div",yt,e.toDisplayString(e.unref(u)(h)),1),e.createElementVNode("div",kt,[e.createElementVNode("div",null,e.toDisplayString(p.name),1),p.description?(e.openBlock(),e.createElementBlock("div",bt,e.toDisplayString(p.description),1)):e.createCommentVNode("",!0)])])],10,vt)):(e.openBlock(),e.createElementBlock("a",{key:2,href:p.href,class:e.normalizeClass(e.unref(s)),onClick:c=>e.unref(d)(h,c)},[e.createElementVNode("div",Ct,[e.createElementVNode("div",wt,e.toDisplayString(e.unref(u)(h)),1),e.createElementVNode("div",Bt,[e.createElementVNode("div",null,e.toDisplayString(p.name),1),p.description?(e.openBlock(),e.createElementBlock("div",Vt,e.toDisplayString(p.description),1)):e.createCommentVNode("",!0)])])],10,xt))]))),128))],2)],8,ut))}}),Nt=["aria-label"],$t=["href","onClick"],St={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},zt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},It=["href","onClick"],Dt={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},Lt={key:0,class:"h-3 w-3 rounded-full bg-foreground"},Mt=e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1),Tt=e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1),Ot=["href","onClick"],At={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},Pt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},jt={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},Ft=e.defineComponent({__name:"Bullet",props:{ariaLabel:null,basic:{type:Boolean},orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:n}){const r=n,o=t,{isCurrentStep:a,isFinishedStep:l,switchStep:d,listClasses:u,linkClasses:i}=Ie({props:e.toRefs(o),emit:r}),s=e.computed(()=>{const f=["h6 font-medium leading-7"];let p;return o.stepsPadding==="xs"?p="ml-1":o.stepsPadding==="sm"?p="ml-2":p="ml-3",f.push(p),o.basic&&f.push("sr-only"),f.join(" ")}),m=e.computed(()=>{const f=[];return o.basic&&f.push("basic"),f.join(" ")});return(f,p)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass([e.unref(u),m.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(h,c)=>(e.openBlock(),e.createElementBlock("li",{key:h.name},[e.unref(l)(c)?(e.openBlock(),e.createElementBlock("a",{key:0,href:h.href,class:e.normalizeClass(e.unref(i)),onClick:b=>e.unref(d)(c,b)},[e.createElementVNode("span",St,[t.basic?(e.openBlock(),e.createElementBlock("span",zt)):(e.openBlock(),e.createBlock(e.unref(M.CheckCircleIcon),{key:1,class:"h-full w-full text-primary","aria-hidden":"true"}))]),e.createElementVNode("span",{class:e.normalizeClass(["text-foreground",s.value])},e.toDisplayString(h.name),3)],10,$t)):e.unref(a)(c)?(e.openBlock(),e.createElementBlock("a",{key:1,href:h.href,class:e.normalizeClass(e.unref(i)),"aria-current":"step",onClick:b=>e.unref(d)(c,b)},[e.createElementVNode("span",Dt,[t.basic?(e.openBlock(),e.createElementBlock("span",Lt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[Mt,Tt],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",s.value])},e.toDisplayString(h.name),3)],10,It)):(e.openBlock(),e.createElementBlock("a",{key:2,href:h.href,class:e.normalizeClass(e.unref(i)),onClick:b=>e.unref(d)(c,b)},[e.createElementVNode("div",At,[t.basic?(e.openBlock(),e.createElementBlock("span",Pt)):(e.openBlock(),e.createElementBlock("div",jt))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",s.value])},e.toDisplayString(h.name),3)],10,Ot))]))),128))],2)],8,Nt))}}),_t={},Rt={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-pointer",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"rgba(255,255,255,0.8)","stroke-linecap":"round","stroke-linejoin":"round"},Ut=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),qt=e.createElementVNode("path",{d:"M7.904 17.563a1.2 1.2 0 0 0 2.228 .308l2.09 -3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047 -1.047a1.067 1.067 0 0 0 0 -1.509l-4.907 -4.907l3.113 -2.09a1.2 1.2 0 0 0 -.309 -2.228l-13.582 -3.904l3.904 13.563z"},null,-1),Wt=[Ut,qt];function Ht(t,n){return e.openBlock(),e.createElementBlock("svg",Rt,Wt)}const Kt=ce(_t,[["render",Ht]]),Gt={},Xt={viewBox:"0 0 18 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Zt=e.createElementVNode("path",{d:"M9 1.25V3.5M14.834 3.666L13.243 5.257M17.25 9.5H15M4.757 13.743L3.167 15.333M3 9.5H0.75M4.757 5.257L3.167 3.667",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Qt=[Zt];function Jt(t,n){return e.openBlock(),e.createElementBlock("svg",Xt,Qt)}const Yt=ce(Gt,[["render",Jt]]),en={class:"relative aspect-square w-full h-full max-w-[250px] mx-auto mb-8 border-t border-r border-outline-3 select-none"},tn={class:"w-full h-full overflow-hidden"},nn=e.defineComponent({__name:"Instructional",props:{actions:Array,initialPosition:{type:Object},slotsConfig:Array},setup(t){const n=t,r=e.ref(!0),o=e.ref({...n.initialPosition}),a=e.ref(!1),l=e.ref(500),d=e.ref(!0),u=e.ref(n.slotsConfig||[]);async function i(f){await G.wait(f.duration)}function s(f){const p=u.value.find(h=>h.name===f.slot);p&&(p.visible=!p.visible)}function m(f){switch(f.type){case"animation":o.value={top:f.top,left:f.left},l.value=f.duration;break;case"click":a.value=!0,setTimeout(()=>a.value=!1,500);break;case"delay":return i(f);case"slot":s(f);break}}return e.onMounted(()=>{(async()=>{for(;r.value;){await i({type:"delay",duration:800}),d.value=!0;for(const p of n.actions||[])await m(p);d.value=!1,o.value={...n.initialPosition},await i({type:"delay",duration:200})}})()}),e.onBeforeUnmount(()=>{r.value=!1}),(f,p)=>(e.openBlock(),e.createElementBlock("div",en,[e.createElementVNode("div",{class:"absolute z-50 text-foreground dark:text-foundation",style:e.normalizeStyle({transitionProperty:"all",top:o.value.top+"%",left:o.value.left+"%",transitionDuration:l.value+"ms"})},[e.createVNode(Yt,{class:e.normalizeClass(["absolute -top-5 -left-4 h-12 w-12 -rotate-12 text-foreground",[{hidden:!a.value}]])},null,8,["class"]),e.createVNode(Kt,{class:"absolute inset-0 h-11 w-11"})],4),e.createElementVNode("div",tn,[e.renderSlot(f.$slots,"background"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,h=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h.name},[h.visible?e.renderSlot(f.$slots,h.name,{key:0}):e.createCommentVNode("",!0)],64))),128))])]))}}),on=["disabled"],ln=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:n}){const r=n,o=t,a=e.computed(()=>{const d=["h-20 bg-foundation-2 inline-flex justify-center items-center outline-none","normal px-16 py-5 shadow rounded transition active:scale-95"];return o.disabled?d.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed"):(d.push(o.modelValue?"bg-primary-focus text-foreground-on-primary":"bg-foundation text-foreground"),d.push("ring-outline-2 hover:ring-4")),d.join(" ")}),l=d=>{if(o.disabled){d.preventDefault(),d.stopPropagation(),d.stopImmediatePropagation();return}r("update:modelValue",!o.modelValue),r("click",d)};return(d,u)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(a.value),disabled:t.disabled,onClick:l},[e.renderSlot(d.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,on))}}),an={class:"relative flex items-start"},sn={class:"flex h-6 items-center"},rn=["id","checked","aria-describedby","name","disabled","value"],cn={class:"ml-2 text-sm",style:{"padding-top":"2px"}},un=["for"],dn={key:0,class:"text-danger ml-1"},mn=["id"],fn=e.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},label:{type:String,default:void 0},description:{type:String,default:void 0},inlineDescription:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1},modelValue:{type:[String,Boolean],default:void 0},value:{type:[String,Boolean],default:!0},id:{type:String,default:void 0},hideLabel:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const n=t,r=v=>`${v}-${ie.nanoid()}`,o=e.computed(()=>n.value||n.name),{checked:a,errorMessage:l,handleChange:d,value:u}=le.useField(n.name,n.rules,{validateOnMount:n.validateOnMount,type:"checkbox",checkedValue:o,initialValue:n.modelValue||void 0}),i=e.computed(()=>n.label||n.name),s=e.computed(()=>l.value?"border-danger-lighter":"border-foreground-4 "),m=e.computed(()=>n.description||l.value),f=e.computed(()=>`${n.name}-description`),p=e.computed(()=>{const v=[];return n.inlineDescription?v.push("inline ml-2"):v.push("block"),l.value?v.push("text-danger"):v.push("text-foreground-2"),v.join(" ")}),h=e.ref(r("checkbox")),c=e.computed(()=>n.id||h.value),b=v=>{n.disabled||d(v)};return e.onMounted(()=>{const v=n.modelValue,k=u.value,x=Array.isArray(v)?v.includes(n.value):v===n.value,E=Array.isArray(k)?k.includes(n.value):k===n.value;x!==E&&d(v)}),(v,k)=>(e.openBlock(),e.createElementBlock("div",an,[e.createElementVNode("div",sn,[e.createElementVNode("input",e.mergeProps({id:c.value,checked:e.unref(a),"aria-describedby":f.value,name:t.name,disabled:t.disabled,value:o.value,type:"checkbox",class:["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",s.value]},v.$attrs,{onChange:b}),null,16,rn)]),e.createElementVNode("div",cn,[e.createElementVNode("label",{for:c.value,class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(i.value),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",dn,"*")):e.createCommentVNode("",!0)],10,un),m.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:f.value,class:e.normalizeClass(p.value)},e.toDisplayString(m.value),11,mn)):e.createCommentVNode("",!0)])]))}}),pn={class:"flex h-6 items-center"},hn=["id","checked","aria-describedby","name","disabled","value"],vn=["for"],gn={key:0,class:"text-sm"},yn={class:"flex flex-col"},kn=["id"],bn={key:1,class:"text-danger ml-1"},xn=["id"],Cn=e.defineComponent({inheritAttrs:!1,__name:"Radio",props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},label:{type:String,default:void 0},description:{type:String,default:void 0},inlineDescription:{type:Boolean,default:!1},icon:{type:Object,default:void 0},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1},modelValue:{type:[String,Boolean],default:void 0},value:{type:[String,Boolean],default:!0},id:{type:String,default:void 0},hideLabel:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const n=t,r=v=>`${v}-${ie.nanoid()}`,o=e.computed(()=>n.value||n.name),{checked:a,errorMessage:l,handleChange:d,value:u}=le.useField(n.name,n.rules,{validateOnMount:n.validateOnMount,type:"radio",checkedValue:o,initialValue:n.modelValue||void 0}),i=e.computed(()=>n.label||n.name),s=e.computed(()=>l.value?"border-danger-lighter":"border-foreground-4 "),m=e.computed(()=>n.description||l.value),f=e.computed(()=>`${n.name}-description`),p=e.computed(()=>{const v=["text-xs"];return l.value?v.push("text-danger"):v.push("text-foreground-2"),v.join(" ")}),h=e.ref(r("radio")),c=e.computed(()=>n.id||h.value),b=v=>{n.disabled||d(v)};return e.onMounted(()=>{const v=n.modelValue,k=u.value,x=Array.isArray(v)?v.includes(n.value):v===n.value,E=Array.isArray(k)?k.includes(n.value):k===n.value;x!==E&&d(v)}),(v,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative flex gap-2 mb-2 last:mb-0",t.description&&t.inlineDescription?"items-start":"items-center"])},[e.createElementVNode("div",pn,[e.createElementVNode("input",e.mergeProps({id:c.value,checked:e.unref(a),"aria-describedby":f.value,name:t.name,disabled:t.disabled,value:o.value,type:"radio",class:["h-4 w-4 rounded-full text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",s.value]},v.$attrs,{onChange:b}),null,16,hn)]),e.createElementVNode("div",{class:e.normalizeClass(["text-xs sm:text-sm",t.inlineDescription?"flex gap-2 items-center":""])},[e.createElementVNode("label",{for:c.value,class:e.normalizeClass(["text-foreground flex gap-2 items-center",{"sr-only":t.hideLabel}])},[t.icon?(e.openBlock(),e.createElementBlock("div",gn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{class:"h-8 sm:h-10 w-8 sm:w-10"}))])):e.createCommentVNode("",!0),e.createElementVNode("div",yn,[e.createElementVNode("span",null,e.toDisplayString(i.value),1),m.value&&!t.inlineDescription?(e.openBlock(),e.createElementBlock("p",{key:0,id:f.value,class:e.normalizeClass(p.value)},e.toDisplayString(m.value),11,kn)):e.createCommentVNode("",!0)]),t.showRequired?(e.openBlock(),e.createElementBlock("span",bn,"*")):e.createCommentVNode("",!0)],10,vn),m.value&&t.inlineDescription?(e.openBlock(),e.createElementBlock("p",{key:0,id:f.value,class:e.normalizeClass(p.value)},e.toDisplayString(m.value),11,xn)):e.createCommentVNode("",!0)],2)],2))}});function be(t){const{props:n,inputEl:r,emit:o,options:a}=t,{value:l,errorMessage:d}=le.useField(n.name,n.rules,{validateOnMount:e.unref(n.validateOnMount),validateOnValueUpdate:e.unref(n.validateOnValueUpdate),initialValue:e.unref(n.modelValue)||void 0}),u=e.computed(()=>{const C=["block label text-foreground-2 mb-2"];return e.unref(n.showLabel)||C.push("sr-only"),C.join(" ")}),i=e.computed(()=>["focus:outline-none disabled:cursor-not-allowed disabled:bg-foundation-disabled","disabled:text-disabled-muted placeholder:text-foreground-2","rounded"].join(" ")),s=e.computed(()=>{const C=["block w-full text-foreground transition-all",i.value];d.value?C.push("focus:border-danger focus:ring-danger border-2 border-danger text-danger-darker"):C.push("border-0 focus:ring-2 focus:ring-outline-2");const g=e.unref(n.color);return g==="foundation"?C.push("bg-foundation shadow-sm hover:shadow"):g==="transparent"?C.push("bg-transparent"):C.push("bg-foundation-page"),C.join(" ")}),m=e.ref(ie.nanoid()),f=e.computed(()=>e.unref(n.label)||e.unref(n.name)),p=e.computed(()=>{const C=d.value;return!C||!e.unref(n.useLabelInErrors)?C:C.replace("Value",f.value)}),h=e.computed(()=>p.value&&e.unref(n.hideErrorMessage)),c=e.computed(()=>p.value||e.unref(n.help)),b=e.computed(()=>!!c.value),v=e.computed(()=>b.value?`${e.unref(n.name)}-${m.value}`:void 0),k=e.computed(()=>{const C=["mt-2 text-xs sm:text-sm"];return C.push(d.value?"text-danger":"text-foreground-2"),C.join(" ")}),x=()=>{var C;(C=r.value)==null||C.focus()},E=()=>{var C;l.value=w.isArray(l.value)?[]:"",(C=a==null?void 0:a.customClear)==null||C.call(a),o("change",{value:l.value}),o("clear")};return e.onMounted(()=>{e.unref(n.autoFocus)&&x()}),{coreInputClasses:i,coreClasses:s,title:f,value:l,helpTipId:v,helpTipClasses:k,helpTip:c,hideHelpTip:h,errorMessage:p,clear:E,focus:x,labelClasses:u}}const wn=["for"],Bn={class:"relative"},Vn=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],En=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Nn=["id"],$n=e.defineComponent({__name:"TextArea",props:{name:null,showLabel:{type:Boolean},help:null,placeholder:null,label:null,disabled:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},autoFocus:{type:Boolean},modelValue:{default:""},showClear:{type:Boolean},fullWidth:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"},textareaClasses:null},emits:["update:modelValue","change","input","clear"],setup(t,{expose:n,emit:r}){const o=r,a=t,l=e.ref(null),{coreClasses:d,title:u,value:i,helpTipId:s,helpTipClasses:m,helpTip:f,errorMessage:p,labelClasses:h,clear:c,focus:b}=be({props:e.toRefs(a),emit:o,inputEl:l}),v=e.computed(()=>{const k=["pl-2"];return a.showClear&&p.value?k.push("pr-12"):(a.showClear||p.value)&&k.push("pr-8"),k.join(" ")});return n({focus:b}),(k,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":""])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(h))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(u)),1)],10,wn),e.createElementVNode("div",Bn,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:l,"onUpdate:modelValue":x[0]||(x[0]=E=>e.isRef(i)?i.value=E:null),name:t.name,class:[e.unref(d),v.value,t.textareaClasses||"","min-h-[3rem] simple-scrollbar text-sm"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(p)?"true":"false","aria-describedby":e.unref(s)},k.$attrs,{onChange:x[1]||(x[1]=E=>k.$emit("change",{event:E,value:e.unref(i)})),onInput:x[2]||(x[2]=E=>k.$emit("input",{event:E,value:e.unref(i)}))}),null,16,Vn),[[e.vModelText,e.unref(i)]]),t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute top-2 right-0 flex items-center pr-2 cursor-pointer",onClick:x[3]||(x[3]=(...E)=>e.unref(c)&&e.unref(c)(...E)),onKeydown:x[4]||(x[4]=(...E)=>e.unref(c)&&e.unref(c)(...E))},[En,e.createVNode(e.unref(M.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-start mt-2",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref(M.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(p)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 mt-0.5 text-4xl right-0 flex items-start text-danger opacity-50",[t.showClear?"pr-8":"pr-2"]])}," * ",2)):e.createCommentVNode("",!0)]),e.unref(s)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(s),class:e.normalizeClass(e.unref(m))},e.toDisplayString(e.unref(f)),11,Nn)):e.createCommentVNode("",!0)],2))}}),Sn=["for"],zn={class:"relative"},In={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},Dn=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],Ln=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Mn=["id"],De=e.defineComponent({inheritAttrs:!1,__name:"TextInput",props:{type:{type:String,default:"text"},name:{type:String,required:!0},showLabel:{type:Boolean,required:!1},help:{type:String,default:void 0},placeholder:{type:String,default:void 0},label:{type:String,default:void 0},showRequired:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},customIcon:{type:[Object,Function],default:void 0},autoFocus:{type:Boolean,default:!1},modelValue:{type:String,default:""},size:{type:String,default:"base"},showClear:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},inputClasses:{type:String,default:null},hideErrorMessage:{type:Boolean,default:!1},wrapperClasses:{type:String,default:()=>""},color:{type:String,default:"page"}},emits:["update:modelValue","change","input","clear","focus","blur"],setup(t,{expose:n,emit:r}){const o=t,a=r,l=e.useSlots(),d=e.ref(null),{coreClasses:u,title:i,value:s,helpTipId:m,helpTipClasses:f,helpTip:p,hideHelpTip:h,errorMessage:c,clear:b,focus:v,labelClasses:k}=be({props:e.toRefs(o),emit:a,inputEl:d}),x=e.computed(()=>{const $=["h-5 w-5"];return c.value?$.push("text-danger"):$.push("text-foreground-2"),$.join(" ")}),E=e.computed(()=>["email","password"].includes(o.type)||o.customIcon),C=e.computed(()=>{const $=[];return E.value?$.push("pl-8"):$.push("pl-2"),l["input-right"]||(c.value||o.showClear)&&(c.value&&o.showClear?$.push("pr-12"):$.push("pr-8")),$.join(" ")}),g=e.computed(()=>{switch(o.size){case"sm":return"h-6 text-sm";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8 text-sm"}});return n({focus:v}),($,z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":"",t.wrapperClasses])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(k))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(i)),1)],10,Sn),e.createElementVNode("div",zn,[E.value?(e.openBlock(),e.createElementBlock("div",In,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(x.value),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref(M.EnvelopeIcon),{key:1,class:e.normalizeClass(x.value),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref(M.KeyIcon),{key:2,class:e.normalizeClass(x.value),"aria-hidden":"true"},null,8,["class"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:t.name,ref_key:"inputElement",ref:d,"onUpdate:modelValue":z[0]||(z[0]=S=>e.isRef(s)?s.value=S:null),type:t.type,name:t.name,class:[e.unref(u),C.value,g.value,t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(c)?"true":"false","aria-describedby":e.unref(m),role:"textbox"},$.$attrs,{onChange:z[1]||(z[1]=S=>$.$emit("change",{event:S,value:e.unref(s)})),onInput:z[2]||(z[2]=S=>$.$emit("input",{event:S,value:e.unref(s)})),onFocus:z[3]||(z[3]=S=>$.$emit("focus")),onBlur:z[4]||(z[4]=S=>$.$emit("blur"))}),null,16,Dn),[[e.vModelDynamic,e.unref(s)]]),e.renderSlot($.$slots,"input-right",{},()=>[t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer",onClick:z[5]||(z[5]=(...S)=>e.unref(b)&&e.unref(b)(...S)),onKeydown:z[6]||(z[6]=(...S)=>e.unref(b)&&e.unref(b)(...S))},[Ln,e.createVNode(e.unref(M.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(c)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-center",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref(M.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(c)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center text-danger opacity-50",[t.showClear?"pr-8":"pr-2"]])}," * ",2)):e.createCommentVNode("",!0)])]),e.unref(m)&&!e.unref(h)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(m),class:e.normalizeClass(e.unref(f))},e.toDisplayString(e.unref(p)),11,Mn)):e.createCommentVNode("",!0)],2))}}),Le=/^https?:\/\//,xe=/^[\w-_.+]+@[\w-_.+]+$/,Tn=t=>(t||"").match(xe)?!0:"Value should be a valid e-mail address",On=t=>(t||"").split(",").map(o=>o.trim()).every(o=>o.match(xe))||"Value should be one or multiple comma-delimited e-mail addresses",An=t=>(w.isString(t)&&(t=t.trim()),t?!0:"Value is required"),Pn=(t,n)=>(r,o)=>r===o.form[t]?!0:`Value must be the same as in field '${n||t}'`,jn=t=>n=>{const{minLength:r,maxLength:o}=t;return n=G.isNullOrUndefined(n)?"":n,w.isString(n)?!w.isUndefined(r)&&n.length<r?`Value needs to be at least ${r} characters long`:!w.isUndefined(o)&&n.length>o?`Value needs to be no more than ${o} characters long`:!0:"Value should be a text string"},Fn=t=>n=>{const{match:r,message:o}=t;return w.isString(n)?r?w.isString(r)?n.includes(r)?!0:o:r.test(n)?!0:o:!0:"Value should be a text string"},_n=t=>Le.test(t)?!0:"Value is not a valid URL",Rn=t=>Array.isArray(t)&&t.length>0?!0:"Value should have at least a single item selected",Un=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:xe,VALID_HTTP_URL:Le,isEmail:Tn,isItemSelected:Rn,isOneOrMultipleEmails:On,isRequired:An,isSameAs:Pn,isStringOfLength:jn,isUrl:_n,stringContains:Fn},Symbol.toStringTag,{value:"Module"}));function Ce(t){const{skipCalculation:n,elementToWatchForChanges:r,itemContainer:o,trackResize:a=!1,trackMutations:l=!0}=t||{},d=e.ref(0),u=()=>{const i=o.value;if(n!=null&&n.value||!i)return;const s=i.children;let m=0,f=0,p;for(const h of s){const c=h.offsetTop;w.isUndefined(p)?(p=c,m+=1):c===p&&(m+=1),f+=1}d.value=f-m};return a&&A.useResizeObserver(r,u),l&&A.useMutationObserver(r,u,{childList:!0,subtree:!0}),{hiddenItemCount:d}}function we(t){const{props:n,emit:r,dynamicVisibility:o}=t;let a;if(o){const{elementToWatchForChanges:s,itemContainer:m}=o;a=Ce({skipCalculation:e.computed(()=>{var p;return!((p=n.multiple)!=null&&p.value)}),elementToWatchForChanges:s,itemContainer:m}).hiddenItemCount}else a=e.ref(0);const l=e.computed({get:()=>{var m,f;const s=(m=n.modelValue)==null?void 0:m.value;return(f=n.multiple)!=null&&f.value?w.isArray(s)?s:[]:w.isArray(s)?void 0:s},set:s=>{var m,f,p;if((m=n.multiple)!=null&&m.value&&!w.isArray(s)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((f=n.multiple)!=null&&f.value)&&w.isArray(s)){console.warn("Attempting to set array value in selector w/ multiple=false");return}r("update:modelValue",(p=n.multiple)!=null&&p.value?s||[]:s)}}),d=s=>w.isArray(s);return{selectedValue:l,hiddenSelectedItemCount:a,isArrayValue:d,isMultiItemArrayValue:s=>w.isArray(s)&&s.length>1,firstItem:s=>d(s)?s[0]:s}}const qn=t=>(e.pushScopeId("data-v-89e77cae"),t=t(),e.popScopeId(),t),Wn=qn(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),Hn=[Wn],Kn=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",t.loading?"opacity-100":"opacity-0"])},Hn,2))}});const de=ce(Kn,[["__scopeId","data-v-89e77cae"]]),Gn={class:"flex items-center justify-between w-full"},Xn={class:"block truncate grow text-left text-xs sm:text-sm"},Zn={class:"pointer-events-none shrink-0 ml-1 flex items-center space-x-2"},Qn={key:1,class:"text-4xl text-danger opacity-50 h-4 w-4 leading-6"},Jn=["disabled"],Yn={key:0,class:"flex flex-col mx-1 mb-1"},eo=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),to={class:"relative"},no={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},oo=["placeholder"],lo={key:0,class:"px-1"},ao={key:1},so=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷‍♂️",-1),ro={class:e.normalizeClass(["block truncate"])},io=["id"],Be=e.defineComponent({__name:"Base",props:{multiple:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},modelValue:{type:[Object,Array,String],default:void 0},search:{type:Boolean,default:!1},filterPredicate:{type:Function,default:void 0},disabledItemPredicate:{type:Function,default:void 0},getSearchResults:{type:Function,default:void 0},searchPlaceholder:{type:String,default:"Search"},label:{type:String,required:!0},placeholder:{type:String},showLabel:{type:Boolean,default:!1},name:{type:String,required:!0},by:{type:String,required:!1},disabled:{type:Boolean,default:!1},buttonStyle:{type:String,default:"base"},hideCheckmarks:{type:Boolean,default:!1},allowUnset:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},help:{type:String,default:void 0},fixedHeight:{type:Boolean,default:!1},fullyControlValue:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1},mountMenuOnBody:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{expose:n,emit:r}){const o=y=>w.isObjectLike(y),a=r,l=t,{value:d,errorMessage:u}=le.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,validateOnValueUpdate:l.validateOnValueUpdate,initialValue:l.modelValue}),i=A.useMounted(),s=e.ref(null),m=e.ref(null),f=e.ref(null),p=e.ref(""),h=e.ref([]),c=e.ref(!1),b=e.ref(1),v=e.ref(ie.nanoid()),k=A.useElementBounding(e.computed(()=>{var y;return(y=f.value)==null?void 0:y.el}),{windowResize:!0,windowScroll:!0,immediate:!0});A.useIntersectionObserver(e.computed(()=>{var y;return(y=m.value)==null?void 0:y.el}),([{isIntersecting:y}])=>{y&&l.mountMenuOnBody&&k.update()});const x=e.computed(()=>e.unref(l.label)||e.unref(l.name)),E=e.computed(()=>{const y=u.value;return!y||!e.unref(l.useLabelInErrors)?y:y.replace("Value",x.value)}),C=e.computed(()=>E.value||e.unref(l.help)),g=e.computed(()=>!!C.value),$=e.computed(()=>g.value?`${e.unref(l.name)}-${v.value}`:void 0),z=e.computed(()=>u.value?"text-danger":"text-foreground-2"),S=e.computed(()=>l.buttonStyle!=="simple"&&l.clearable&&!l.disabled),fe=e.computed(()=>{const y=["relative flex group"];return u.value?(y.push("hover:shadow rounded-md"),y.push("text-danger-darker focus:border-danger focus:ring-danger"),l.buttonStyle!=="simple"&&y.push("outline outline-2 outline-danger")):l.buttonStyle!=="simple"&&(y.push("hover:shadow rounded-md"),y.push("outline outline-2 outline-primary-muted")),l.fixedHeight&&y.push("h-8"),y.join(" ")}),K=e.computed(()=>{const y=[];return l.buttonStyle!=="simple"&&y.push(X.value?"bg-foundation-disabled text-foreground-disabled":""),X.value&&y.push("cursor-not-allowed"),y.join(" ")}),pe=e.computed(()=>{const y=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all","text-foreground",J.value?`w-6 ${K.value}`:"w-0"];return X.value||(y.push("hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"),l.buttonStyle==="tinted"?y.push("bg-outline-3"):y.push("bg-primary-muted")),y.join(" ")}),he=e.computed(()=>{const y=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",K.value];return l.buttonStyle!=="simple"&&(y.push("py-2 px-3"),X.value||(l.buttonStyle==="tinted"?y.push("bg-foundation-page text-foreground"):y.push("bg-foundation text-foreground"))),S.value&&J.value&&y.push("rounded-r-none"),y.join(" ")}),Q=e.computed(()=>!!(l.search&&(l.filterPredicate||l.getSearchResults))),_=e.computed(()=>Q.value&&l.getSearchResults),X=e.computed(()=>l.disabled||!l.items.length&&!_.value),O=e.computed({get:()=>{const y=d.value;return l.multiple?w.isArray(y)?y:[]:w.isArray(y)?void 0:y},set:y=>{if(l.multiple&&!w.isArray(y)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!l.multiple&&w.isArray(y)){console.warn("Attempting to set array value in selector w/ multiple=false");return}let D;if(l.multiple)D=y||[];else{const I=d.value;D=l.allowUnset&&I&&y&&V(I)===V(y)?void 0:y}l.fullyControlValue?a("update:modelValue",D):d.value=D,b.value+=1}}),J=e.computed(()=>l.multiple&&w.isArray(O.value)?O.value.length!==0:!!O.value),ve=()=>{l.multiple?O.value=[]:O.value=void 0},ge=e.computed(()=>{const y=p.value;return!Q.value||!(y!=null&&y.length)?h.value:l.filterPredicate?h.value.filter(D=>{var I;return((I=l.filterPredicate)==null?void 0:I.call(l,D,y))||!1}):h.value}),ne=e.computed(()=>{const y=["rounded-md bg-foundation-2 py-1 label label--light outline outline-2 outline-primary-muted focus:outline-none shadow mt-1 "];return l.mountMenuOnBody?y.push("fixed z-50"):y.push("absolute top-[100%] w-full z-10"),y.join(" ")}),B=e.computed(()=>{const y={};if(l.mountMenuOnBody){const D=k.top.value,I=k.left.value,j=k.width.value,U=k.height.value;y.top=`${D+U}px`,y.left=`${I}px`,y.width=`${j}px`}return y}),N=y=>JSON.stringify(y),V=y=>o(y)?y[l.by||"id"]:y,P=async()=>{if(!(!_.value||!l.getSearchResults)){c.value=!0;try{h.value=await l.getSearchResults(p.value)}finally{c.value=!1}}},R=w.debounce(P,1e3),oe=y=>{const{active:D,disabled:I}=y||{},{hideCheckmarks:j}=l,U=["relative transition cursor-pointer select-none py-1.5 pl-3",j?"":"pr-9"];return I?U.push("opacity-50 cursor-not-allowed"):U.push(D?"text-primary":"text-foreground"),U.join(" ")};return e.watch(()=>l.items,y=>{h.value=y.slice()},{immediate:!0}),e.watch(p,()=>{_.value&&R()}),e.onMounted(()=>{_.value&&!l.items.length&&P()}),n({triggerSearch:P}),(y,D)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.unref(L.Listbox),{key:b.value,modelValue:O.value,"onUpdate:modelValue":D[4]||(D[4]=I=>O.value=I),name:t.name,multiple:t.multiple,by:t.by,disabled:X.value,as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.ListboxLabel),{class:e.normalizeClass(["block label text-foreground-2 mb-2",{"sr-only":!t.showLabel}])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["class"]),e.createElementVNode("div",{class:e.normalizeClass(fe.value)},[e.createVNode(e.unref(L.ListboxButton),{ref_key:"listboxButton",ref:f,class:e.normalizeClass(he.value)},{default:e.withCtx(({open:I})=>[e.createElementVNode("div",Gn,[e.createElementVNode("div",Xn,[!O.value||e.unref(w.isArray)(O.value)&&!O.value.length?e.renderSlot(y.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.placeholder?t.placeholder:t.label),1)]):e.renderSlot(y.$slots,"something-selected",{key:1,value:O.value},()=>[e.createTextVNode(e.toDisplayString(N(O.value)),1)])]),e.createElementVNode("div",Zn,[E.value?(e.openBlock(),e.createBlock(e.unref(T.ExclamationCircleIcon),{key:0,class:"h-4 w-4 text-danger","aria-hidden":"true"})):t.showRequired?(e.openBlock(),e.createElementBlock("div",Qn," * ")):e.createCommentVNode("",!0),I?(e.openBlock(),e.createBlock(e.unref(T.ChevronUpIcon),{key:2,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref(T.ChevronDownIcon),{key:3,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),S.value?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(pe.value),disabled:t.disabled,onClick:D[0]||(D[0]=I=>ve())},[e.createVNode(e.unref(T.XMarkIcon),{class:"w-3 h-3"})],10,Jn)),[[e.unref(Se.directive),"Clear"]]):e.createCommentVNode("",!0),e.unref(i)?(e.openBlock(),e.createBlock(e.Transition,{key:1,"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:!t.mountMenuOnBody},[e.createVNode(e.unref(L.ListboxOptions),{ref_key:"menuEl",ref:m,class:e.normalizeClass(ne.value),style:e.normalizeStyle(B.value),onFocus:D[3]||(D[3]=I=>{var j;return(j=s.value)==null?void 0:j.focus()})},{default:e.withCtx(()=>[Q.value?(e.openBlock(),e.createElementBlock("label",Yn,[eo,e.createElementVNode("div",to,[e.createElementVNode("div",no,[e.createVNode(e.unref(T.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:s,"onUpdate:modelValue":D[1]||(D[1]=I=>p.value=I),type:"text",class:"pl-9 w-full border-0 bg-foundation-page rounded placeholder:font-normal normal placeholder:text-foreground-2 focus:outline-none focus:ring-1 focus:border-outline-1 focus:ring-outline-1",placeholder:t.searchPlaceholder,onKeydown:D[2]||(D[2]=e.withModifiers(()=>{},["stop"]))},null,40,oo),[[e.vModelText,p.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[Q.value?"max-h-52":"max-h-40"]])},[_.value&&c.value?(e.openBlock(),e.createElementBlock("div",lo,[e.createVNode(de,{loading:!0})])):_.value&&!h.value.length?(e.openBlock(),e.createElementBlock("div",ao,[e.renderSlot(y.$slots,"nothing-found",{},()=>[so])])):e.createCommentVNode("",!0),!_.value||!c.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(ge.value,I=>{var j;return e.openBlock(),e.createBlock(e.unref(L.ListboxOption),{key:V(I),value:I,disabled:((j=t.disabledItemPredicate)==null?void 0:j.call(t,I))||!1},{default:e.withCtx(({active:U,selected:Ve})=>{var Ee,Ne;return[e.createElementVNode("li",{class:e.normalizeClass(oe({active:U,disabled:((Ee=t.disabledItemPredicate)==null?void 0:Ee.call(t,I))||!1}))},[e.createElementVNode("span",ro,[e.renderSlot(y.$slots,"option",{item:I,active:U,selected:Ve,disabled:((Ne=t.disabledItemPredicate)==null?void 0:Ne.call(t,I))||!1},()=>[e.createTextVNode(e.toDisplayString(N(I)),1)])]),!t.hideCheckmarks&&Ve?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([U?"text-primary":"text-foreground","absolute inset-y-0 right-0 flex items-center pr-4"])},[e.createVNode(e.unref(T.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]}),_:2},1032,["value","disabled"])}),128)):e.createCommentVNode("",!0)],2)]),_:3},8,["class","style"])],8,["disabled"]))]),_:3})):e.createCommentVNode("",!0)],2)]),_:3},8,["modelValue","name","multiple","by","disabled"])),$.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:$.value,class:e.normalizeClass(["mt-2 text-xs sm:text-sm",z.value])},e.toDisplayString(C.value),11,io)):e.createCommentVNode("",!0)]))}}),Me=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(n,r)=>(e.openBlock(),e.createBlock(ue,{"color-classes":"text-foreground-on-primary",rounded:"",style:e.normalizeStyle({backgroundColor:t.sourceApp.bgColor})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.sourceApp.short),1)]),_:1},8,["style"]))}}),co={key:0,class:"text-foreground-2 normal"},uo={key:1,class:"flex items-center"},mo={class:"truncate"},fo={class:"flex items-center"},po={class:"truncate"},ho=e.defineComponent({__name:"SourceApps",props:{multiple:{type:Boolean,default:!1},modelValue:{type:[Object,Array],default:void 0},search:{type:Boolean,default:!1},searchPlaceholder:{type:String,default:"Search apps"},selectorPlaceholder:{type:String,default:void 0},label:{type:String,required:!0},showLabel:{type:Boolean,default:!1},name:{type:String,default:void 0},items:{type:Array,default:void 0},clearable:{type:Boolean},help:{type:String}},emits:["update:modelValue"],setup(t,{emit:n}){const r=n,o=t,a=e.ref(null),l=e.ref(null),{selectedValue:d,hiddenSelectedItemCount:u,isMultiItemArrayValue:i,firstItem:s}=we({props:e.toRefs(o),emit:r,dynamicVisibility:{elementToWatchForChanges:a,itemContainer:l}}),m=(f,p)=>f.name.toLocaleLowerCase().includes(p.toLocaleLowerCase());return(f,p)=>(e.openBlock(),e.createBlock(Be,{modelValue:e.unref(d),"onUpdate:modelValue":p[0]||(p[0]=h=>e.isRef(d)?d.value=h:null),multiple:t.multiple,items:t.items??e.unref(G.SourceApps),search:t.search,"search-placeholder":t.searchPlaceholder,label:t.label,"show-label":t.showLabel,name:t.name||"sourceApps","filter-predicate":m,clearable:t.clearable,help:t.help,by:"name"},{"nothing-selected":e.withCtx(()=>[t.selectorPlaceholder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.selectorPlaceholder),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.multiple?"Select apps":"Select an app"),1)],64))]),"something-selected":e.withCtx(({value:h})=>[e.unref(i)(h)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"elementToWatchForChanges",ref:a,class:"flex items-center space-x-0.5 h-5"},[e.createElementVNode("div",{ref_key:"itemContainer",ref:l,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h,c=>(e.openBlock(),e.createBlock(Me,{key:c.name,"source-app":c},null,8,["source-app"]))),128))],512),e.unref(u)>0?(e.openBlock(),e.createElementBlock("div",co," +"+e.toDisplayString(e.unref(u)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",uo,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(s)(h).bgColor})},null,4),e.createElementVNode("span",mo,e.toDisplayString(e.unref(s)(h).name),1)]))]),option:e.withCtx(({item:h})=>[e.createElementVNode("div",fo,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:h.bgColor})},null,4),e.createElementVNode("span",po,e.toDisplayString(h.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name","clearable","help"]))}}),vo={class:"flex flex-wrap gap-1.5 text-xs"},go=e.defineComponent({__name:"Badges",props:{items:null,label:null,name:null,help:null,modelValue:null,multiple:{type:Boolean},rules:null,by:null},emits:["update:modelValue"],setup(t,{emit:n}){const r=n,o=t,{selectedValue:a,isArrayValue:l}=we({props:e.toRefs(o),emit:r}),d=u=>{l(a.value)?a.value=a.value.filter(i=>i.id!==u.id):a.value=void 0};return(u,i)=>(e.openBlock(),e.createBlock(Be,{modelValue:e.unref(a),"onUpdate:modelValue":i[0]||(i[0]=s=>e.isRef(a)?a.value=s:null),multiple:t.multiple,items:t.items,label:t.label,name:t.name,help:t.help,rules:t.rules,by:t.by},{"something-selected":e.withCtx(({value:s})=>[e.createElementVNode("ul",vo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l)(s)?s:[s],m=>(e.openBlock(),e.createElementBlock("li",{key:m[t.by]},[e.createVNode(ue,{size:"lg","clickable-icon":!0,"icon-left":e.unref(T.XMarkIcon),onClickIcon:e.withModifiers(f=>d(m),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.text),1)]),_:2},1032,["icon-left","onClickIcon"])]))),128))])]),option:e.withCtx(({item:s})=>[e.createTextVNode(e.toDisplayString(s.text),1)]),_:1},8,["modelValue","multiple","items","label","name","help","rules","by"]))}}),yo={class:"flex items-center"},ko={class:"absolute inset-0 flex items-center gap-2 px-1 text-white"},bo=e.defineComponent({__name:"Switch",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue");return(r,o)=>(e.openBlock(),e.createElementBlock("div",yo,[e.createVNode(e.unref(L.Switch),{modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=a=>n.value=a),class:e.normalizeClass(["relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary",{"bg-primary":n.value,"bg-primary-muted":!n.value}])},{default:e.withCtx(()=>[e.createElementVNode("div",ko,[e.createVNode(e.unref(T.CheckIcon),{class:"h-5 w-5 drop-shadow-md"}),e.createVNode(e.unref(T.XMarkIcon),{class:"h-5 w-5 drop-shadow-md"})]),e.createElementVNode("span",{class:e.normalizeClass(["scale-95 pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200",{"translate-x-5":n.value,"translate-x-0":!n.value}])},null,2)]),_:1},8,["modelValue","class"])]))}}),xo={class:"relative group bg-foundation-page p-2 rounded-lg pr-12"},Co={class:"absolute inset-0 right-2 flex justify-end items-center"},wo=e.defineComponent({__name:"ClipboardInput",props:{value:null,isMultiline:{type:Boolean,default:!1},rows:null},emits:["copy"],setup(t,{emit:n}){const r=t,o=n,{copy:a}=A.useClipboard({legacy:!0}),l=e.ref(!1),d=async()=>{r.value&&(await a(r.value),l.value=!0,o("copy",r.value),setTimeout(()=>{l.value=!1},2e3))},u=i=>{const s=i.target,m=window.getSelection();if(m){const f=document.createRange();f.selectNodeContents(s),m.removeAllRanges(),m.addRange(f)}};return(i,s)=>(e.openBlock(),e.createElementBlock("div",xo,[t.isMultiline?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative z-10 text-xs sm:text-sm text-foreground font-mono break-all p-2 pl-3 max-h-[4.8rem] simple-scrollbar overflow-y-auto",onKeypress:s[0]||(s[0]=m=>e.unref(ke)(u))},e.toDisplayString(t.value),33)):(e.openBlock(),e.createBlock(e.unref(De),{key:1,color:"transparent",name:"contentInput",readonly:"","model-value":t.value,class:"relative z-10 text-sm text-foreground font-mono"},null,8,["model-value"])),e.createElementVNode("div",Co,[e.createVNode(e.unref(F),{color:"invert",size:"sm","icon-left":l.value?e.unref(W.ClipboardDocumentCheckIcon):e.unref(W.ClipboardDocumentIcon),"hide-text":"",onClick:d},null,8,["icon-left"])])]))}});var te=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(te||{});const ae=G.getClientOperatingSystem(),Bo={"cmd-or-ctrl":ae===G.OperatingSystem.Mac?"Cmd":"Ctrl","alt-or-opt":ae===G.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function Vo(t){const n=r=>Object.values(te).includes(r);return t.map(r=>n(r)?Bo[r]:r).join("+")}function Eo(t,...n){A.onKeyDown(n[0],r=>{const o=r.getModifierState("Alt"),a=ae===G.OperatingSystem.Mac?r.getModifierState("Meta"):r.getModifierState("Control"),l=r.getModifierState("Shift");for(const d of t)switch(d){case te.CtrlOrCmd:if(!a)return;break;case te.AltOrOpt:if(!o)return;break;case te.Shift:if(!l)return;break}n[1](r)},n[2])}function No(t){const n=(t==null?void 0:t.model)||e.ref(),r=e.computed({get:()=>!!n.value,set:o=>n.value=o?!0:void 0});return{model:n,isChecked:r}}const $o=e.createElementVNode("div",{class:"fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity backdrop-blur-xs"},null,-1),So={class:"fixed inset-0 z-10 h-[100dvh] w-screen"},zo={class:"flex justify-center items-center h-full w-full p-4 sm:p-0"},Io={key:0,class:"flex items-center justify-start rounded-t-lg shrink-0 min-h-[2rem] sm:min-h-[4rem] py-2 px-4 sm:px-8 truncate text-lg sm:text-2xl font-bold"},Do={class:"w-full truncate pr-12"},Lo=e.defineComponent({__name:"Dialog",props:{open:{type:Boolean},maxWidth:null,hideCloser:{type:Boolean},preventCloseOnClickOutside:{type:Boolean},title:null,buttons:null,onSubmit:{type:Function}},emits:["update:open","fully-closed"],setup(t,{emit:n}){const r=n,o=t,a=e.useSlots(),l=e.ref(!1),d=e.ref(!0),u=e.computed(()=>!!o.onSubmit),i=e.computed(()=>o.buttons||a.buttons),s=e.computed(()=>o.title||a.header),m=e.computed({get:()=>o.open,set:b=>r("update:open",b)}),f=e.computed(()=>{switch(o.maxWidth){case"sm":return 0;case"md":return 1;case"lg":return 2;case"xl":return 3;default:return 1e4}}),p=e.computed(()=>{const b=["w-full","sm:w-full sm:max-w-2xl"];return f.value>=1&&b.push("md:max-w-2xl"),f.value>=2&&b.push("lg:max-w-4xl"),f.value>=3&&b.push("xl:max-w-6xl"),f.value>=4&&b.push("2xl:max-w-7xl"),b.join(" ")}),h=()=>{o.preventCloseOnClickOutside||(m.value=!1)},c=w.throttle(b=>{const v=b.target,{scrollTop:k,offsetHeight:x,scrollHeight:E}=v;l.value=k>0,d.value=k+x>=E},60);return(b,v)=>(e.openBlock(),e.createBlock(e.unref(L.TransitionRoot),{as:"template",show:m.value},{default:e.withCtx(()=>[e.createVNode(e.unref(L.Dialog),{as:"div",class:"relative z-40",onClose:h},{default:e.withCtx(()=>[e.createVNode(e.unref(L.TransitionChild),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:e.withCtx(()=>[$o]),_:1}),e.createElementVNode("div",So,[e.createElementVNode("div",zo,[e.createVNode(e.unref(L.TransitionChild),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",onAfterLeave:v[2]||(v[2]=k=>b.$emit("fully-closed"))},{default:e.withCtx(()=>[e.createVNode(e.unref(L.DialogPanel),{class:e.normalizeClass(["transform rounded-lg text-foreground overflow-hidden bg-foundation text-left shadow-xl transition-all flex flex-col max-h-[90dvh]",p.value]),as:u.value?"form":"div",onSubmit:e.withModifiers(t.onSubmit,["prevent"])},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(l.value&&"relative z-20 shadow-lg")},[s.value?(e.openBlock(),e.createElementBlock("div",Io,[e.createElementVNode("div",Do,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),e.renderSlot(b.$slots,"header")])])):e.createCommentVNode("",!0)],2),t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["absolute z-20 bg-foundation rounded-full p-1",s.value?"top-2 right-3 sm:top-4":"right-4 top-3"]),onClick:v[0]||(v[0]=k=>m.value=!1)},[e.createVNode(e.unref(W.XMarkIcon),{class:"h-5 sm:h-6 w-5 sm:w-6"})],2)),e.createElementVNode("div",{class:e.normalizeClass(["flex-1 simple-scrollbar overflow-y-auto",s.value?"p-3 sm:py-6 sm:px-8":"p-10"]),onScroll:v[1]||(v[1]=(...k)=>e.unref(c)&&e.unref(c)(...k))},[e.renderSlot(b.$slots,"default",{},()=>[e.createTextVNode("Put your content here!")])],34),i.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["relative z-50 flex px-4 py-2 sm:py-4 sm:px-6 gap-2 shrink-0 bg-foundation",!d.value&&"shadow-t"])},[t.buttons?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.buttons,(k,x)=>(e.openBlock(),e.createBlock(e.unref(F),e.mergeProps({key:x},k.props,{disabled:k.disabled,type:k.submit&&"submit",onClick:k.onClick}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.text),1)]),_:2},1040,["disabled","type","onClick"]))),128)):e.renderSlot(b.$slots,"buttons",{key:1})],2)):e.createCommentVNode("",!0)]),_:3},8,["class","as","onSubmit"])]),_:3})])])]),_:3})]),_:3},8,["show"]))}}),Mo={class:"h-4 sm:h-5 h-4 sm:w-5 empty:h-0 empty:w-0"},To=e.defineComponent({__name:"DialogSection",props:{title:String,borderT:Boolean,borderB:Boolean,allowOverflow:Boolean,titleColor:{type:String,default:"default"},button:Object,alwaysOpen:Boolean,lazyLoad:{type:Boolean,default:!1}},setup(t){const n=t,r=e.ref(null),o=e.ref(0),a=e.ref(!1),l=e.computed(()=>{const i=[];return!n.button&&!n.alwaysOpen&&i.push("cursor-pointer","hover:bg-foundation"),a.value&&i.push("bg-foundation"),i}),d=e.computed(()=>{switch(n.titleColor){case"danger":return"text-danger";case"warning":return"text-warning";case"success":return"text-success";case"secondary":return"text-secondary";case"info":return"text-info";default:return"text-foreground"}}),u=async()=>{var i;a.value=!a.value,a.value&&(await e.nextTick(),o.value=(((i=e.unref(r))==null?void 0:i.scrollHeight)||0)+64)};return(i,s)=>{var m,f;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col border-primary-muted",{"border-t":t.borderT,"border-b":t.borderB,"relative z-10":a.value}])},[e.createElementVNode("div",e.mergeProps({class:["flex justify-between items-center gap-4 sm:gap-8 py-3 sm:py-4 px-2",l.value],tabindex:"0"},e.toHandlers(!t.button&&!t.alwaysOpen?{click:u,keypress:e.unref(ke)(u)}:{},!0)),[e.createElementVNode("div",{class:e.normalizeClass(["text-sm sm:text-base font-bold flex items-center gap-1 sm:gap-2 select-none",d.value])},[e.createElementVNode("div",Mo,[e.renderSlot(i.$slots,"icon")]),e.createElementVNode("span",null,e.toDisplayString(t.title),1)],2),e.createElementVNode("div",null,[!t.button&&!t.alwaysOpen?(e.openBlock(),e.createBlock(e.unref(W.ChevronDownIcon),{key:0,class:e.normalizeClass(["w-4 h-4 sm:w-5 sm:h-5 transition-all duration-400",a.value&&"rotate-180"])},null,8,["class"])):e.createCommentVNode("",!0),t.button?(e.openBlock(),e.createBlock(e.unref(F),e.mergeProps({key:1,size:"sm",to:t.button.expandContent?void 0:t.button.to,color:t.button.expandContent&&a.value?"invert":t.button.color,"icon-right":t.button.expandContent&&a.value?void 0:t.button.iconRight,onClick:(m=t.button)==null?void 0:m.onClick},e.toHandlers((f=t.button)!=null&&f.expandContent?{click:u}:{})),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.button.expandContent&&a.value?"Cancel":t.button.text),1)]),_:1},16,["to","color","icon-right","onClick"])):e.createCommentVNode("",!0)])],16),e.createElementVNode("div",{class:e.normalizeClass(["transition-all duration-700 overflow-hidden",[t.allowOverflow&&a.value?"!overflow-visible":"",a.value?"mb-3 mt-1":"",!t.button&&!t.alwaysOpen?"cursor-pointer hover:bg-foundation":""]]),style:e.normalizeStyle(t.alwaysOpen?"max-height: none;":`max-height: ${a.value?o.value+"px":"0px"}`)},[n.lazyLoad?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.value||n.alwaysOpen?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"content",ref:r,class:"rounded-md text-sm pb-3 px-2 mt-1"},[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])],512)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"content",ref:r,class:"rounded-md text-sm pb-3 px-2 mt-1"},[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])],512))],6)],2)}}}),Oo={class:"inline-flex items-center space-x-2"},Ao={class:"label-light"},Po=e.defineComponent({__name:"Disclosure",props:{title:null,icon:null,color:{default:"default"}},setup(t){const n=t,r=e.computed(()=>{const a=["pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition","ring-1 font-medium"];switch(n.color){case"warning":a.push("border-warning text-warning ring-warning-lighter hover:ring-warning");break;case"success":a.push("border-success text-success ring-success-lighter hover:ring-success");break;case"danger":a.push("border-danger text-danger ring-danger-lighter hover:ring-danger");break;case"default":default:a.push("border-primary text-primary ring-primary-muted hover:ring-primary");break}return a.join(" ")}),o=e.computed(()=>{const a=["p-3 border-x border-b rounded-b-md"];switch(n.color){case"warning":a.push("border-warning-lighter");break;case"success":a.push("border-success-lighter");break;case"danger":a.push("border-danger-lighter");break;case"default":default:a.push("border-primary-muted");break}return a.join(" ")});return(a,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(L.Disclosure),null,{default:e.withCtx(({open:d})=>[e.createVNode(e.unref(L.DisclosureButton),{class:e.normalizeClass(r.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Oo,[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.title),1)]),e.createVNode(e.unref(T.ChevronUpIcon),{class:e.normalizeClass([d?"":"rotate-180 transform","h-5 w-5"])},null,8,["class"])]),_:2},1032,["class"]),e.createVNode(e.unref(L.DisclosurePanel),{class:e.normalizeClass(o.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Ao,[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])])]),_:3},8,["class"])]),_:3})]))}});var Z=(t=>(t.Grid="grid",t.List="list",t))(Z||{});const jo={class:"relative flex bg-primary-muted rounded-md"},Fo=e.createElementVNode("div",{class:"w-7 h-7 bg-foundation dark:bg-foundation-2 transition rounded shadow"},null,-1),_o=[Fo],Ro={class:"relative z-10 flex gap-1 items-center p-1 rounded-l"},Uo={class:"relative z-10 flex gap-1 items-center p-1 rounded-r"},qo=e.defineComponent({__name:"GridListToggle",props:{modelValue:null},emits:["click","update:modelValue"],setup(t,{emit:n}){const r=n,o=t,a=e.computed({get:()=>o.modelValue||Z.Grid,set:d=>r("update:modelValue",d)}),l=d=>{r("click",d);const u=a.value===Z.Grid?Z.List:Z.Grid;a.value=u};return(d,u)=>{const i=e.resolveDirective("tippy");return e.openBlock(),e.createElementBlock("button",{class:"max-w-max transition flex justify-center items-center gap-2 outline-none select-none h-8 text-foreground border-2 border-primary-muted dark:border-foundation bg-primary-muted rounded-md active:scale-[0.97] grow",onClick:l},[e.createElementVNode("div",jo,[e.createElementVNode("div",{class:e.normalizeClass(["absolute transition",{"translate-x-7":a.value!==e.unref(Z).Grid}])},_o,2),e.withDirectives((e.openBlock(),e.createElementBlock("div",Ro,[e.createVNode(e.unref(T.Squares2X2Icon),{class:"h-5 w-5"})])),[[i,"Grid View"]]),e.withDirectives((e.openBlock(),e.createElementBlock("div",Uo,[e.createVNode(e.unref(T.Bars3Icon),{class:"h-5 w-5"})])),[[i,"List View"]])])])}}});var Te=(t=>(t[t.Throttle=0]="Throttle",t[t.Debounce=1]="Debounce",t))(Te||{}),se=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(se||{});function Oe(t,n){if(!A.isClient)return;const{wait:r=100,throttleOrDebounce:o=0}=n||{},a=r?o===0?w.throttle(t,r):w.debounce(t,r):t;e.onMounted(()=>window.addEventListener("resize",a)),e.onBeforeUnmount(()=>window.removeEventListener("resize",a))}function Wo(t){e.onMounted(()=>{window.addEventListener("beforeunload",t)}),e.onBeforeUnmount(()=>{window.removeEventListener("beforeunload",t)})}function Ae(t){const{el:n,defaultDirection:r}=t,o=e.ref(w.isUndefined(r)?1:r),a=e.computed(()=>{const d=e.unref(t.stopUpdatesBelowWidth);if(!w.isUndefined(d))return d;const u=e.unref(n);return u!=null&&u.offsetWidth?u.offsetWidth*2:void 0}),l=()=>{if(!A.isClient)return;const d=e.unref(n);if(!d)return;const u=d.getBoundingClientRect(),i=u.x+u.width>window.innerWidth,s=u.x<0;i&&s||!w.isUndefined(a.value)&&window.innerWidth<a.value||(i?o.value=0:s&&(o.value=1))};return Oe(()=>l()),e.watch(()=>e.unref(n),d=>{d&&l()}),{direction:e.computed(()=>o.value),recalculateDirection:l}}const Ho=["disabled","onClick"],Ko=e.defineComponent({__name:"Menu",props:{open:{type:Boolean},items:null},emits:["update:open","chosen"],setup(t,{emit:n}){const r=n,o=t,a=e.ref(null),{direction:l}=Ae({el:e.computed(()=>{var h;return((h=a.value)==null?void 0:h.el)||null}),defaultDirection:se.Left,stopUpdatesBelowWidth:300}),d=e.ref(null),u=e.ref(!1),i=e.computed({get:()=>o.open||!1,set:h=>r("update:open",h)}),s=h=>{const{active:c,disabled:b,color:v}=h,k=["group flex gap-3 w-full items-center rounded-md px-2 py-1.5 text-sm"];return c&&!v?k.push("bg-foundation-focus text-foreground"):b?k.push("text-foreground-disabled"):v==="danger"&&c?k.push("text-foreground-on-primary bg-danger"):v==="danger"&&!c?k.push("text-danger"):v==="info"&&c?k.push("text-foreground-on-primary bg-info"):v==="info"&&!c?k.push("text-info"):k.push("text-foreground"),k.join(" ")},m=(h,c)=>{r("chosen",{item:h,event:c})},f=()=>{var h;return(h=d.value)==null?void 0:h.el.click()},p=h=>{const c=!!h;return u.value=c,c};return e.watch(u,(h,c)=>{h!==c&&(i.value=h)}),e.watch(i,h=>{(h&&!u.value||!h&&u.value)&&f()}),(h,c)=>(e.openBlock(),e.createBlock(e.unref(L.Menu),{as:"div",class:"relative inline-block"},{default:e.withCtx(({open:b})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(L.MenuButton),{ref_key:"menuButton",ref:d,class:"hidden",onClick:c[0]||(c[0]=e.withModifiers(()=>{},["stop","prevent"]))},null,512),e.createElementVNode("div",{class:e.normalizeClass(b?"pointer-events-none":"")},[e.renderSlot(h.$slots,"default",{toggle:f,open:p(b)})],2)]),e.createVNode(e.Transition,{"enter-active-class":"transition duration-100 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-75 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.MenuItems),{ref_key:"menuItems",ref:a,class:e.normalizeClass(["absolute mt-2 w-48 origin-top-right divide-y divide-outline-3 rounded-md bg-foundation shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-40",e.unref(l)===e.unref(se).Left?"right-0":""])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(v,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"p-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v,x=>(e.openBlock(),e.createBlock(e.unref(L.MenuItem),{key:x.id,disabled:x.disabled,color:x.color},{default:e.withCtx(({active:E,disabled:C})=>[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.createElementVNode("button",{class:e.normalizeClass(s({active:E,disabled:C,color:x.color})),disabled:C,onClick:g=>m(x,g)},[x.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.icon),{key:0,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"item",{item:x},()=>[e.createTextVNode(e.toDisplayString(x.title),1)])],10,Ho)])),[[e.unref(Se.directive),x.disabled&&x.disabledTooltip]])]),_:2},1032,["disabled","color"]))),128))]))),128))]),_:3},8,["class"])]),_:3})]),_:3}))}}),Go={class:"flex flex-col gap-y-0 sm:gap-y-4"},Xo={class:"flex gap-x-6"},Zo=e.defineComponent({__name:"Tabs",props:{items:null},setup(t){const n=t,r=e.ref(null),o=e.computed(()=>r.value&&n.items.find(l=>l.id===r.value)||n.items[0]),a=l=>{r.value=l.id};return(l,d)=>(e.openBlock(),e.createElementBlock("div",Go,[e.createElementVNode("div",Xo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,u=>(e.openBlock(),e.createBlock(F,{key:u.id,link:"",color:o.value.id===u.id?"default":"secondary",onClick:i=>a(u)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.title),1)]),_:2},1032,["color","onClick"]))),128))]),e.renderSlot(l.$slots,"default",{activeItem:o.value})]))}}),Qo=e.createElementVNode("div",{class:"hidden lg:block absolute bottom-0 left-0 h-px w-full bg-outline-3"},null,-1),Jo=["data-tab-id","onClick"],Yo={class:"min-w-6"},el={key:2,class:"text-[10px] leading-tight py-0.5 text-foreground-on-primary font-medium px-1.5 rounded-full bg-gradient-to-tr from-[#7025EB] to-primary select-none mt-0.5"},tl=e.defineComponent({__name:"PageTabs",props:{items:null,vertical:{type:Boolean},title:null},setup(t){const n=t,r=e.ref(null),o=e.ref(null),a=e.computed(()=>n.items.find(m=>m.id===o.value)||n.items[0]),l=e.computed(()=>{const s=o.value;if(!s)return null;const m=r.value;return m&&[...m.getElementsByClassName("tab-button")].find(p=>p.dataset.tabId===s)||null}),d=e.computed(()=>{const s=l.value;return{left:`${(s==null?void 0:s.offsetLeft)||0}px`,width:`${(s==null?void 0:s.clientWidth)||0}px`}}),u=s=>{o.value=s.id},i=s=>{!A.isClient||!(s!=null&&s.id)||(o.value=s.id)};return e.watch(()=>n.items,s=>{i(s[0])},{immediate:!0}),(s,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative z-10 flex gap-4",t.vertical?"sm:gap-8 flex-col sm:flex-row":"sm:gap-10 flex-col"])},[e.createElementVNode("div",{class:e.normalizeClass(["relative flex sm:justify-between overflow-x-auto",t.vertical?"items-center sm:items-start sm:flex-col sm:w-2/12 border-r border-outline gap-4 pl-4":"border-b border-outline-3 lg:border-none gap-8 w-full"])},[t.vertical?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Qo,e.createElementVNode("div",{style:e.normalizeStyle(d.value),class:"h-[2px] absolute bottom-0 z-20 bg-primary transition-all duration-300"},null,4)],64)),e.createElementVNode("div",{ref_key:"buttonContainer",ref:r,class:e.normalizeClass(["flex",t.vertical?"flex-wrap sm:flex-nowrap flex-row sm:flex-col gap-4":"gap-6"])},[t.title?(e.openBlock(),e.createElementBlock("h1",{key:0,class:e.normalizeClass(["font-bold h4",t.vertical?"w-full sm:w-auto -ml-4 mb-4":"mb-2"])},e.toDisplayString(t.title),3)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,f=>(e.openBlock(),e.createElementBlock("button",{key:f.id,"data-tab-id":f.id,class:e.normalizeClass(["tab-button relative z-10 flex items-center gap-1.5 pb-2 border-b-[2px] border-transparent text-base max-w-max px-2",[a.value.id===f.id?"text-primary hover:text-primary":"text-foreground",t.vertical?"hover:border-outline":"hover:border-outline-2"]]),onClick:p=>u(f)},[f.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.icon),{key:0,class:"shrink-0 h-4 w-4 stroke-[2px]"})):e.createCommentVNode("",!0),e.createElementVNode("span",Yo,e.toDisplayString(f.title),1),f.count?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["rounded-full px-2 text-[11px] transition-all min-w-6",a.value.id===f.id?"text-primary bg-blue-100":"text-foreground-2 bg-gray-200 dark:bg-foundation"])},[e.createElementVNode("span",null,e.toDisplayString(f.count),1)],2)):e.createCommentVNode("",!0),f.tag?(e.openBlock(),e.createElementBlock("div",el,e.toDisplayString(f.tag),1)):e.createCommentVNode("",!0)],10,Jo))),128))],2)],2),e.createElementVNode("div",{class:e.normalizeClass(t.vertical?"sm:w-10/12":"")},[e.renderSlot(s.$slots,"default",{activeItem:a.value})],2)],2))}}),nl={class:"text-foreground"},ol={class:"w-full text-sm overflow-x-auto overflow-y-visible simple-scrollbar"},ll=["onClick","onKeypress"],al=e.createElementVNode("div",{class:"text-gray-900 font-medium order-1"},"Placeholder",-1),sl={class:"absolute right-1.5 gap-1 flex items-center p-0 h-full"},rl=e.defineComponent({__name:"Table",props:{items:null,buttons:null,columns:null,overflowCells:{type:Boolean},onRowClick:{type:Function},rowItemsAlign:{default:"center"}},setup(t){const n=t,r=e.computed(()=>{const u=(n.buttons||[]).length;let i=16;return u>0&&(i=48+(u-1)*42),`${i}px`}),o=e.computed(()=>{const u=["relative grid grid-cols-12 items-center gap-6 px-4 py-1 min-w-[900px] bg-foundation"];switch(n.onRowClick&&u.push("cursor-pointer hover:bg-primary-muted"),n.rowItemsAlign){case"center":u.push("items-center");break;case"stretch":u.push("items-stretch");break}return u.join(" ")}),a=u=>{var i;return((i=n.columns.find(s=>s.id===u))==null?void 0:i.classes)||""},l=(u,i)=>{const s=a(u);return i===0?`bg-transparent py-3 pr-5 px-1 ${s}`:`lg:p-0 px-1 my-2 ${s}`},d=u=>{var i;(i=n.onRowClick)==null||i.call(n,u)};return(u,i)=>(e.openBlock(),e.createElementBlock("div",nl,[e.createElementVNode("div",ol,[t.items.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"grid z-10 grid-cols-12 items-center gap-6 font-semibold bg-foundation rounded-t-lg w-full border-b border-outline-3 pb-2 pt-4 px-4 min-w-[900px]",style:e.normalizeStyle({paddingRight:r.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,class:e.normalizeClass([a(s.id),"capitalize"])},e.toDisplayString(s.header),3))),128))],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["divide-y divide-outline-3 h-full overflow-visible",{"pb-32":t.overflowCells}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,style:e.normalizeStyle({paddingRight:r.value}),class:e.normalizeClass(o.value),tabindex:"0",onClick:m=>d(s),onKeypress:m=>d(s)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,(m,f)=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:e.normalizeClass(l(m.id,f)),tabindex:"0"},[e.renderSlot(u.$slots,m.id,{item:s},()=>[al])],2))),128)),e.createElementVNode("div",sl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.buttons,m=>(e.openBlock(),e.createElementBlock("div",{key:m.label},[e.createVNode(e.unref(F),{"icon-left":m.icon,size:"sm",color:"secondary","hide-text":"",class:e.normalizeClass(m.class),"text-color":m.textColor,to:e.unref(w.isString)(m.action)?m.action:void 0,onClick:e.withModifiers(f=>e.unref(w.isString)(m.action)?e.unref(w.noop):m.action(s),["stop"])},null,8,["icon-left","class","text-color","to","onClick"])]))),128))])],46,ll))),128))],2)])]))}}),il=e.createElementVNode("div",{class:"h-8"},null,-1),cl={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},ul={class:"inline-flex items-center space-x-1"},dl=e.createElementVNode("span",{class:"text-foreground-2"},"An error occurred while loading",-1),ml=e.defineComponent({__name:"InfiniteLoading",props:{settings:null,allowRetry:{type:Boolean}},emits:["infinite"],setup(t){const n=e.ref(null),r=e.ref(!1);return A.isClient&&e.onMounted(()=>{const o=setInterval(()=>{var a;(a=n.value)!=null&&a.isConnected&&(r.value=!0,clearInterval(o))},200)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:n},[r.value?(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps({key:0},o.$props.settings||{},{onInfinite:a[0]||(a[0]=l=>o.$emit("infinite",l))}),{spinner:e.withCtx(()=>[e.createVNode(de,{loading:!0,class:"my-2"})]),complete:e.withCtx(()=>[il]),error:e.withCtx(({retry:l})=>[e.createElementVNode("div",cl,[e.createElementVNode("div",ul,[e.createVNode(e.unref(W.ExclamationTriangleIcon),{class:"w-5 h-5 text-danger"}),dl]),t.allowRetry?(e.openBlock(),e.createBlock(F,{key:0,onClick:l},{default:e.withCtx(()=>[e.createTextVNode("Retry")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:1},16)):e.createCommentVNode("",!0)],512))}}),fl={class:"relative group"},pl={key:0,class:"absolute -inset-1 bg-blue-300 dark:bg-blue-500 opacity-5 dark:opacity-0 rounded-md blur-sm group-hover:opacity-60 dark:group-hover:opacity-30 transition duration-500"},hl=e.defineComponent({__name:"Panel",props:{form:{type:Boolean,default:!1},ring:{type:Boolean,default:!1},fancyGlow:{type:Boolean,default:!1},customPadding:{type:Boolean,default:!1},noShadow:{type:Boolean,default:!1},panelClasses:{type:String}},emits:["submit"],setup(t,{emit:n}){const r=n,o=t,a=e.computed(()=>o.customPadding?"":"px-4 py-4 sm:px-6"),l=e.computed(()=>o.customPadding?"":"px-4 py-4 sm:p-6"),d=e.computed(()=>{const u=["rounded-lg"];return o.noShadow||u.push("shadow"),o.ring&&u.push("ring-outline-2 hover:ring-2"),o.panelClasses&&u.push(o.panelClasses),u.join(" ")});return(u,i)=>(e.openBlock(),e.createElementBlock("div",fl,[t.fancyGlow?(e.openBlock(),e.createElementBlock("div",pl)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.form?"form":"div"),{class:e.normalizeClass(["relative divide-outline-3 bg-foundation text-foreground flex flex-col divide-y overflow-hidden",d.value]),onSubmit:i[0]||(i[0]=s=>r("submit",s))},{default:e.withCtx(()=>[u.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.value)},[e.renderSlot(u.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grow",l.value])},[e.renderSlot(u.$slots,"default")],2),u.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(a.value)},[e.renderSlot(u.$slots,"footer")],2)):e.createCommentVNode("",!0)]),_:3},40,["class"]))]))}}),vl={class:"flex-shrink-0"},gl=e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),yl=e.defineComponent({__name:"Alert",props:{color:{default:"success"},withDismiss:{type:Boolean},actions:null,customIcon:null,size:{default:"default"}},emits:["dismiss"],setup(t){const n=t,r=e.useSlots(),o=e.computed(()=>!!r.description),a=e.computed(()=>{if(n.customIcon)return n.customIcon;switch(n.color){case"info":return M.InformationCircleIcon;case"warning":return M.ExclamationCircleIcon;case"danger":return M.XCircleIcon;case"success":default:return M.CheckCircleIcon}}),l=e.computed(()=>{const c=[];switch(n.size){case"xs":c.push("p-1");break;case"default":default:c.push(o.value?"p-3 sm:p-4":"p-2");break}switch(n.color){case"success":c.push("bg-success-lighter border-l-4 border-success");break;case"info":c.push("bg-info-lighter border-l-4 border-info");break;case"danger":c.push("bg-danger-lighter border-l-4 border-danger");break;case"warning":c.push("bg-warning-lighter border-l-4 border-warning");break}return c.join(" ")}),d=e.computed(()=>{const c=[];if(o.value)c.push("");else switch(c.push("items-center"),n.size){case"xs":c.push("space-x-1");break;case"default":default:c.push("space-x-2");break}return c.join(" ")}),u=e.computed(()=>{const c=["grow"];switch(o.value||c.push("flex items-center space-x-2"),n.size){case"xs":c.push("ml-1");break;case"default":default:c.push("ml-3");break}return c.join(" ")}),i=e.computed(()=>{const c=[];switch(n.size){case"xs":c.push("text-xs");break;case"default":default:c.push("mt-1 sm:mt-2 text-xs sm:text-sm");break}return c.join(" ")}),s=e.computed(()=>{var v;const c=["flex"];o.value||c.push("grow justify-end");const b=o.value&&((v=n.actions)==null?void 0:v.length);switch(n.size){case"xs":c.push("space-x-1"),b&&c.push("mt-1");break;case"default":default:c.push("space-x-2"),b&&c.push("mt-4");break}return c.join(" ")}),m=e.computed(()=>{const c=[];switch(n.color){case"success":c.push("text-success-darker");break;case"info":c.push("text-info-darker");break;case"danger":c.push("text-danger-darker");break;case"warning":c.push("text-warning-darker");break}return c.join(" ")}),f=e.computed(()=>{const c=[];switch(n.size){case"xs":c.push("h-4 w-4"),c.push(o.value?"mt-0.5":"");break;case"default":default:c.push("h-5 w-5");break}switch(n.color){case"success":c.push("text-success");break;case"info":c.push("text-info");break;case"danger":c.push("text-danger");break;case"warning":c.push("text-warning");break}return c.join(" ")}),p=e.computed(()=>{const c=[];switch(n.color){case"success":c.push("bg-success-lighter ring-success");break;case"info":c.push("bg-info-lighter ring-info");break;case"danger":c.push("bg-danger-lighter ring-danger");break;case"warning":c.push("bg-warning-lighter ring-warning");break}return c.join(" ")}),h=e.computed(()=>{switch(n.size){case"xs":return"xs";case"default":default:return"sm"}});return(c,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded-md",[l.value,m.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",d.value])},[e.createElementVNode("div",vl,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),{class:e.normalizeClass(f.value),"aria-hidden":"true"},null,8,["class"]))]),e.createElementVNode("div",{class:e.normalizeClass(u.value)},[e.createElementVNode("h3",{class:e.normalizeClass(["text-sm",[o.value?"font-medium":""]])},[e.renderSlot(c.$slots,"title",{},()=>[e.createTextVNode("Title")])],2),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(i.value)},[e.renderSlot(c.$slots,"description",{},()=>[e.createTextVNode(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(s.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions||[],(v,k)=>(e.openBlock(),e.createBlock(F,{key:k,color:t.color,size:h.value,to:v.url,external:v.externalUrl||!1,onClick:x=>v.onClick||e.unref(w.noop)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.title),1)]),_:2},1032,["color","size","to","external","onClick"]))),128))],2)],2),t.withDismiss?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex",[o.value?"items-start":"items-center"]])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["inline-flex rounded-md focus:outline-none focus:ring-2",p.value]),onClick:b[0]||(b[0]=v=>c.$emit("dismiss"))},[gl,e.createVNode(e.unref(M.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)],2)):e.createCommentVNode("",!0)],2)],2))}});function kl(t){var c,b;const{get:n,initialState:r,readOptions:o,set:a,asyncRead:l=!0,debugging:d}=t,u=d==null?void 0:d.log,i=()=>(new Error("Trace:").stack||"").substring(7),s=((b=(c=t.debugging)==null?void 0:c.log)==null?void 0:b.logger)||console.debug,m=u&&!u.writesOnly?()=>{const v=n();return s(`debugging: '${u.name}' read`,v,i()),v}:n,f=u&&!u.readsOnly?v=>(s(`debugging: '${u.name}' written to`,v,i()),a(v)):a,p=l?A.computedAsync(m,r,o):e.computed(m),h=e.computed(()=>p.value);return h.update=f,h}const bl=e.defineComponent({__name:"ContextManager",setup(t,{expose:n}){const o=e.getCurrentInstance().provides,a=Object.getOwnPropertySymbols(o).find(p=>p.description==="ComboboxContext");a||console.error("FormTagsContextManager ctx key not found!");const l=e.inject(a||"__undefined");return l||console.error("FormTagsContextManager ctx not found!"),n({goUp:()=>{l==null||l.goToOption(1)},goDown:()=>{l==null||l.goToOption(2)},open:()=>{l&&l.openCombobox()},close:()=>{l==null||l.closeCombobox()},selectActive:()=>{l==null||l.selectActiveOption()},isOpen:()=>(l==null?void 0:l.comboboxState.value)===0}),(p,h)=>e.renderSlot(p.$slots,"default")}}),xl=["for"],Cl=["disabled","placeholder","onKeydown"],wl=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Bl={key:1},Vl=e.createElementVNode("div",{class:"text-foreground-2 text-center"},[e.createTextVNode(" Press "),e.createElementVNode("strong",null,"Enter"),e.createTextVNode(" to create tag ⚡ ")],-1),El=[Vl],Nl=["id"],$l=e.defineComponent({__name:"Tags",props:{name:null,help:null,label:null,showLabel:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},autoFocus:{type:Boolean},showClear:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"},wrapperClasses:null,size:{default:"base"},placeholder:null,disabled:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},getAutocompleteItems:{type:Function},modelValue:null},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:r}){const o=B=>B.type==="input",a=r,l=t,d=e.ref(null),{focused:u}=A.useFocus(d),i=e.ref(null),{coreInputClasses:s,coreClasses:m,labelClasses:f,title:p,helpTip:h,helpTipId:c,hideHelpTip:b,helpTipClasses:v,errorMessage:k,clear:x,value:E}=be({props:e.toRefs(l),emit:a,inputEl:d}),C=e.ref([]),g=e.ref(!1),$=e.ref(!1),z=e.ref(""),S=e.computed({get:()=>E.value||[],set:B=>{E.value=w.uniq(B).filter(N=>!!N.length)}}),fe=e.computed(()=>{switch(l.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}}),K=e.computed(()=>l.showClear&&!!S.value.length),pe=e.computed(()=>{const B=[m.value,l.disabled?"cursor-not-allowed !bg-foundation-disabled !text-disabled-muted":""];return K.value&&(k.value||l.showRequired)?B.push("pr-14"):(K.value||k.value||l.showRequired)&&B.push("pr-8"),k.value?(B.push("border-2 border-danger text-danger-darker"),u.value&&B.push("ring-1 ring-danger")):(B.push("border-2 border-transparent"),u.value&&B.push("ring-2 ring-outline-2")),B.join(" ")}),he=B=>{if(l.disabled)return;const N=S.value.indexOf(B);if(N!==-1){const V=S.value.slice();V.splice(N,1),S.value=V}},Q=()=>{var B;(B=d.value)==null||B.blur(),$.value=!1},_=B=>{if(B.key!=="Backspace"||z.value.length)return;const N=S.value.slice();N.pop(),S.value=N,$.value=!1},X=()=>{var B,N,V;(B=i.value)!=null&&B.isOpen()?(N=i.value)==null||N.goUp():(V=i.value)==null||V.open()},O=()=>{var B,N,V;(B=i.value)!=null&&B.isOpen()?(N=i.value)==null||N.goDown():(V=i.value)==null||V.open()},J=async()=>{l.getAutocompleteItems&&(g.value=!0,C.value=await Promise.resolve(l.getAutocompleteItems(z.value)),g.value=!1)},ve=w.debounce(J,1e3),ge=()=>{g.value=!0,ve()},ne=(B,N)=>{var P,R;if(o(B)?B.data===" "||B.data===","||B.data===";":!0){let oe=!1;if((P=i.value)!=null&&P.isOpen()&&C.value.length&&!N)(R=i.value)==null||R.selectActive(),oe=!0;else{const y=z.value.trim().substring(0,z.value.length-(o(B)?1:0)),D=S.value.includes(y);y.length>0&&!D&&(S.value=[...S.value,y],oe=!0)}oe&&(z.value="",$.value=!1)}else $.value=!!z.value.length};return e.watch($,(B,N)=>{var V,P;B&&!N?l.getAutocompleteItems&&((V=i.value)==null||V.open()):!B&&N&&((P=i.value)==null||P.close())}),e.watch(z,()=>{ge()}),e.onMounted(()=>{J()}),n({resolveAutocompleteItems:J}),(B,N)=>(e.openBlock(),e.createBlock(e.unref(L.Combobox),{modelValue:S.value,"onUpdate:modelValue":N[5]||(N[5]=V=>S.value=V),as:"div",multiple:"",clearable:"",class:e.normalizeClass([t.wrapperClasses])},{default:e.withCtx(()=>[e.createVNode(bl,{ref_key:"ctxManager",ref:i},{default:e.withCtx(()=>[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(f))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(p)),1)],10,xl),e.createElementVNode("div",{class:e.normalizeClass(["relative flex flex-wrap items-center space-x-1 px-2 py-1",pe.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,V=>(e.openBlock(),e.createBlock(ue,{key:V,"icon-left":t.disabled?void 0:e.unref(M.XMarkIcon),"clickable-icon":"",size:"lg",onClickIcon:()=>he(V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V),1)]),_:2},1032,["icon-left","onClickIcon"]))),128)),e.withDirectives(e.createElementVNode("input",{ref_key:"inputEl",ref:d,"onUpdate:modelValue":N[0]||(N[0]=V=>z.value=V),disabled:t.disabled,class:e.normalizeClass(["bg-transparent grow shrink border-0 focus:ring-0 p-0",[e.unref(s),fe.value]]),style:{"flex-basis":"70px","min-width":"70px"},placeholder:S.value.length?void 0:t.placeholder,onInput:ne,onKeydown:[e.withKeys(Q,["escape"]),N[1]||(N[1]=e.withKeys(e.withModifiers(V=>ne(V,!0),["stop","prevent"]),["enter"])),e.withKeys(ne,["tab"]),e.withKeys(_,["backspace"]),e.withKeys(X,["arrow-up"]),e.withKeys(O,["arrow-down"])],onBlur:N[2]||(N[2]=V=>$.value=!1)},null,42,Cl),[[e.vModelText,z.value]]),K.value?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute top-2 right-0 flex items-center pr-2 cursor-pointer",onClick:N[3]||(N[3]=(...V)=>e.unref(x)&&e.unref(x)(...V)),onKeydown:N[4]||(N[4]=(...V)=>e.unref(x)&&e.unref(x)(...V))},[wl,e.createVNode(e.unref(M.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute top-[10px] right-0 flex items-center",K.value?"pr-8":"pr-2"])},[e.createVNode(e.unref(M.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(k)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute top-[2px] text-4xl right-0 flex items-center text-danger opacity-50",K.value?"pr-8":"pr-2"])}," * ",2)):e.createCommentVNode("",!0)],2),e.createVNode(e.unref(L.TransitionRoot),{leave:"transition ease-in duration-100","leave-from":"opacity-100","leave-to":"opacity-0",class:"relative px-0.5"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.ComboboxOptions),{class:"absolute top-1 max-h-60 w-full overflow-auto simple-scrollbar rounded-md bg-foundation-2 py-1 shadow label label--light outline outline-2 outline-primary-muted focus:outline-none"},{default:e.withCtx(()=>[g.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["px-1",C.value.length?"mb-1":""])},[e.createVNode(de,{loading:!0})],2)):e.createCommentVNode("",!0),!C.value.length&&!g.value?(e.openBlock(),e.createElementBlock("div",Bl,El)):e.createCommentVNode("",!0),C.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(C.value,V=>(e.openBlock(),e.createBlock(e.unref(L.ComboboxOption),{key:V,as:"template",value:V},{default:e.withCtx(({selected:P,active:R})=>[e.createElementVNode("li",{class:e.normalizeClass(["relative cursor-pointer select-none py-1.5 pl-3",{"text-primary":R,"text-foreground":!R}])},[e.createElementVNode("span",{class:e.normalizeClass(["block truncate",{"font-medium":P,"font-normal":!P}])},e.toDisplayString(V),3),P?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["absolute inset-y-0 right-0 flex items-center pr-4",{"text-primary":R,"text-foreground":!R}])},[e.createVNode(e.unref(M.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]),_:2},1032,["value"]))),128)):e.createCommentVNode("",!0)]),_:1})]),_:1}),e.unref(c)&&!e.unref(b)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(c),class:e.normalizeClass(e.unref(v))},e.toDisplayString(e.unref(h)),11,Nl)):e.createCommentVNode("",!0)]),_:1},512)]),_:1},8,["modelValue","class"]))}});function Pe(t){const{props:n}=t,r=e.computed(()=>{var i;switch((i=n.size)==null?void 0:i.value){case"xs":return"h-5";case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"xxl":return"h-32";case"editable":return"h-60";case"base":default:return"h-8"}}),o=e.computed(()=>{var i;switch((i=n.size)==null?void 0:i.value){case"xs":return"w-5";case"sm":return"w-6";case"lg":return"w-10";case"xl":return"w-14";case"xxl":return"w-32";case"editable":return"w-60";case"base":default:return"w-8"}}),a=e.computed(()=>{var i;switch((i=n.size)==null?void 0:i.value){case"xs":return"text-tiny";case"sm":return"text-xs";case"lg":return"text-md";case"xl":return"text-2xl";case"xxl":return"text-3xl";case"editable":return"h1";case"base":default:return"text-sm"}}),l=e.computed(()=>{var i;switch((i=n.size)==null?void 0:i.value){case"xs":return"w-3 h-3";case"sm":return"w-3 h-3";case"lg":return"w-5 h-5";case"xl":return"w-8 h-8";case"xxl":return"w-10 h-10";case"editable":return"w-20 h-20";case"base":default:return"w-4 h-4"}}),d=e.computed(()=>`${o.value} ${r.value} ${a.value}`);return{heightClasses:r,widthClasses:o,sizeClasses:d,iconClasses:l}}const Sl={key:1,class:"flex h-full w-full select-none items-center justify-center"},zl={key:2},re=e.defineComponent({__name:"Avatar",props:{user:{default:null},size:{default:"base"},hoverEffect:{type:Boolean,default:!1},active:{type:Boolean},noBorder:{type:Boolean},noBg:{type:Boolean}},setup(t){const n=t,{sizeClasses:r,iconClasses:o}=Pe({props:e.toRefs(n)}),a=e.computed(()=>{var p,h,c;if(!((p=n.user)!=null&&p.name.length))return;const s=n.user.name.split(" "),m=((h=s[0])==null?void 0:h[0])||"",f=((c=s[1])==null?void 0:c[0])||"";return n.size==="sm"||n.size==="xs"?m:m+f}),l=e.computed(()=>n.noBorder?"":"border-2 border-foundation"),d=e.computed(()=>n.noBg?"":"bg-primary"),u=e.computed(()=>n.hoverEffect?"hover:border-primary focus:border-primary active:scale-95":""),i=e.computed(()=>n.active?"border-primary":"");return(s,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["text-foreground-on-primary flex shrink-0 items-center justify-center overflow-hidden rounded-full font-semibold uppercase transition",e.unref(r),d.value,l.value,u.value,i.value])},[e.renderSlot(s.$slots,"default",{},()=>{var f;return[(f=t.user)!=null&&f.avatar?(e.openBlock(),e.createElementBlock("div",{key:0,class:"h-full w-full bg-cover bg-center bg-no-repeat",style:e.normalizeStyle({backgroundImage:`url('${t.user.avatar}')`})},null,4)):a.value?(e.openBlock(),e.createElementBlock("div",Sl,e.toDisplayString(a.value),1)):(e.openBlock(),e.createElementBlock("div",zl,[e.createVNode(e.unref(T.UserCircleIcon),{class:e.normalizeClass(e.unref(o))},null,8,["class"])]))]}),e.renderSlot(s.$slots,"absolute-anchor")],2))}}),Il=e.defineComponent({__name:"AvatarGroup",props:{users:{default:()=>[]},overlap:{type:Boolean,default:!0},size:{default:"base"},maxCount:{default:void 0}},setup(t){const n=t,r=e.ref(null),o=e.ref(null),{hiddenItemCount:a}=Ce({elementToWatchForChanges:r,itemContainer:o,trackResize:!0,trackMutations:!0}),{heightClasses:l}=Pe({props:e.toRefs(n)}),d=e.computed(()=>n.maxCount?Math.max(n.users.length-n.maxCount,0):0),u=e.computed(()=>a.value+d.value),i=e.computed(()=>n.maxCount?n.users.slice(0,n.maxCount):n.users);return(s,m)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"elementToWatchForChanges",ref:r,class:e.normalizeClass(`flex ${t.overlap?"-space-x-2":""}`)},[e.createElementVNode("div",{ref_key:"itemContainer",ref:o,class:e.normalizeClass(`flex flex-wrap overflow-hidden ${t.overlap?"-space-x-2 ":""} ${e.unref(l)}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(f,p)=>(e.openBlock(),e.createBlock(re,{key:f.id||p,user:f,size:t.size},null,8,["user","size"]))),128))],2),u.value?(e.openBlock(),e.createBlock(re,{key:0,size:t.size},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(u.value),1)]),_:1},8,["size"])):e.createCommentVNode("",!0)],2))}}),je=e.defineComponent({__name:"Icon",props:{loading:{type:Boolean,default:!0},size:{default:"base"}},setup(t){const n=t,r=e.computed(()=>{const o=["text-primary transition-all animate-spin"];switch(o.push(n.loading?"opacity-100":"opacity-0"),n.size){case"base":o.push("h-8 w-8");break;case"sm":o.push("h-5 w-5");break;case"lg":o.push("h-12 w-12");break}return o.join(" ")});return(o,a)=>(e.openBlock(),e.createBlock(e.unref(T.ArrowPathIcon),{class:e.normalizeClass(r.value)},null,8,["class"]))}}),Dl={class:"flex flex-col items-center space-y-2"},Ll={key:1,class:"relative group"},Ml={class:"opacity-0 transition-all absolute group-hover:opacity-100 inset-0 flex items-end justify-center bottom-4"},Tl={key:2,class:"w-full text-center text-danger text-sm"},Ol=e.defineComponent({__name:"AvatarEditable",props:e.mergeModels({modelValue:null,placeholder:null,name:null,rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},disabled:{type:Boolean},size:null},{editMode:{type:Boolean,local:!0}}),emits:e.mergeModels(["save","update:modelValue"],["update:editMode"]),setup(t,{expose:n,emit:r}){const o=e.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>require("./AvatarEditor-25bff065.cjs")),loadingComponent:je,delay:100}),a=r,l=t,{value:d,errorMessage:u}=le.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,validateOnValueUpdate:l.validateOnValueUpdate,initialValue:l.modelValue||void 0}),i=e.useModel(t,"editMode",{local:!0}),s=e.computed(()=>({avatar:d.value,name:l.placeholder})),m=h=>{d.value=h,a("save",h)};return n({open:()=>i.value=!0,close:()=>i.value=!1}),(h,c)=>(e.openBlock(),e.createElementBlock("div",Dl,[i.value?(e.openBlock(),e.createBlock(e.unref(o),{key:0,user:s.value,disabled:t.disabled,size:t.size,onCancel:c[0]||(c[0]=b=>i.value=!1),onSave:m},null,8,["user","disabled","size"])):(e.openBlock(),e.createElementBlock("div",Ll,[e.createVNode(re,{user:s.value,size:t.size},null,8,["user","size"]),e.createElementVNode("div",Ml,[e.createVNode(F,{disabled:t.disabled,color:"secondary",onClick:c[1]||(c[1]=b=>i.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(" Change ")]),_:1},8,["disabled"])])])),e.unref(u)?(e.openBlock(),e.createElementBlock("div",Tl,e.toDisplayString(e.unref(u)),1)):e.createCommentVNode("",!0)]))}});class H extends Error{constructor(n,r){n||(n=new.target.defaultMessage),super(n,r)}}q(H,"defaultMessage","Unexpected error occurred");class Fe extends H{}q(Fe,"defaultMessage","An unexpected logic error occurred!");class _e extends H{}q(_e,"defaultMessage","Attempting to access an uninitialized resource");class Re extends H{}q(Re,"defaultMessage","getCurrentInstance() returned null. Method must be called at the top of a setup function");class Ue extends H{}q(Ue,"defaultMessage","Operation not supported in current (server or client) environment");var me=(t=>(t.AnyAudio="audio/*",t.AnyVideo="video/*",t.AnyImage="image/*",t))(me||{});function Al(t,n){const r=w.intersection(Object.values(me),n);for(const l of r)switch(l){case"audio/*":if(t.type.startsWith("audio"))return!0;break;case"image/*":if(t.type.startsWith("image"))return!0;break;case"video/*":if(t.type.startsWith("video"))return!0;break}const o=w.difference(n,r),a=Pl(t.name);if(!a)return new qe;for(const l of o)if(l.toLowerCase()===a.toLowerCase())return!0;return new We}function Pl(t){const n=t.split(".").pop()||null;return n?`.${n}`:null}function jl(t){return t.startsWith(".")||Object.values(me).includes(t)}function ye(t){const n=l=>parseFloat(l.toFixed(2)).toString();if(t<1024)return`${t}bytes`;const r=t/1024;if(r<1024)return`${n(r)}KB`;const o=r/1024;if(o<1024)return`${n(o)}MB`;const a=o/1024;return`${n(a)}GB`}function Fl(t){const n={name:t.name,lastModified:t.lastModified,size:t.size,type:t.type};return G.md5(JSON.stringify(n))}class qe extends H{}q(qe,"defaultMessage","The selected file has a missing extension");class We extends H{}q(We,"defaultMessage","The selected file type is forbidden");var He=(t=>(t[t.Success=1]="Success",t[t.Failure=2]="Failure",t))(He||{});function _l(t){if(!t)return;const n=t.split(",").map(r=>jl(r)?r:null).filter(r=>r!==null);return n.length?n:void 0}function Rl(t){const{disabled:n,accept:r,multiple:o,sizeLimit:a,countLimit:l}=t,d=e.computed(()=>_l(e.unref(r))),u=i=>{const s=[],m=d.value;for(const f of i){const p=Fl(f),h=e.unref(o)?e.unref(l):1;if(!s.find(c=>c.id===p)){if(h&&s.length>=h)break;if(m){const c=Al(f,m);if(c instanceof Error){s.push({file:f,id:p,error:c});continue}}if(f.size>e.unref(a)){s.push({file:f,id:p,error:new Ke(`The selected file's size (${ye(f.size)}) is too big (over ${ye(e.unref(a))})`)});continue}s.push({file:f,id:p,error:null})}}return s};return{buildUploadableFiles:i=>{if(!e.unref(n||!1))return u(i)}}}class Ke extends H{}q(Ke,"defaultMessage","The selected file's size is too large");const Ul=["accept","multiple"],ql=e.defineComponent({__name:"Zone",props:{accept:null,multiple:{type:Boolean},sizeLimit:{default:1024*1024*100},countLimit:null,disabled:{type:Boolean}},emits:["files-selected"],setup(t,{expose:n,emit:r}){const o=r,a=t,l=e.ref(null),d=e.ref(null),{buildUploadableFiles:u}=Rl({sizeLimit:e.computed(()=>a.sizeLimit),countLimit:e.computed(()=>a.countLimit),accept:e.computed(()=>a.accept),multiple:e.computed(()=>a.multiple),disabled:e.computed(()=>a.disabled)}),i=p=>{const h=u(p);h!=null&&h.length&&o("files-selected",{files:h})},{isOverDropZone:s}=A.useDropZone(l,p=>{p!=null&&p.length&&i(p)}),m=()=>{const p=d.value;if(!p)return;const h=[...p.files||[]];p.value="",h.length&&i(h)},f=()=>{var p;(p=d.value)==null||p.click()};return n({triggerPicker:f}),(p,h)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"fileUploadZone",ref:l,class:"file-upload-zone"},[e.renderSlot(p.$slots,"default",{isDraggingFiles:e.unref(s),openFilePicker:f,activatorOn:{click:f}}),e.createElementVNode("input",{ref_key:"fileInput",ref:d,type:"file",class:"hidden",accept:t.accept,multiple:t.multiple,onClick:h[0]||(h[0]=e.withModifiers(()=>{},["stop"])),onChange:m},null,40,Ul)],512))}});exports.BaseError=H;exports.BlobUploadStatus=He;exports.CommonAlert=yl;exports.CommonAnimationInstructional=nn;exports.CommonBadge=ue;exports.CommonLoadingBar=de;exports.CommonLoadingIcon=je;exports.CommonStepsBullet=Ft;exports.CommonStepsNumber=Et;exports.CommonTextLink=ze;exports.ComposableInvokedOutOfScopeError=Re;exports.FormButton=F;exports.FormCardButton=ln;exports.FormCheckbox=fn;exports.FormClipboardInput=wo;exports.FormFileUploadZone=ql;exports.FormRadio=Cn;exports.FormSelectBadges=go;exports.FormSelectBase=Be;exports.FormSelectSourceApps=ho;exports.FormSwitch=bo;exports.FormTags=$l;exports.FormTextArea=$n;exports.FormTextInput=De;exports.GlobalToastRenderer=at;exports.GridListToggleValue=Z;exports.HorizontalDirection=se;exports.InfiniteLoading=ml;exports.LayoutDialog=Lo;exports.LayoutDialogSection=To;exports.LayoutDisclosure=Po;exports.LayoutGridListToggle=qo;exports.LayoutMenu=Ko;exports.LayoutPageTabs=tl;exports.LayoutPanel=hl;exports.LayoutTable=rl;exports.LayoutTabs=Zo;exports.LogicError=Fe;exports.ModifierKeys=te;exports.SourceAppBadge=Me;exports.TailwindBreakpoints=ee;exports.ThrottleOrDebounce=Te;exports.ToastNotificationType=Y;exports.UninitializedResourceAccessError=_e;exports.UniqueFileTypeSpecifier=me;exports.UnsupportedEnvironmentError=Ue;exports.UserAvatar=re;exports.UserAvatarEditable=Ol;exports.UserAvatarGroup=Il;exports.ValidationHelpers=Un;exports.clientOs=ae;exports.getKeyboardShortcutTitle=Vo;exports.keyboardClick=ke;exports.onKeyboardShortcut=Eo;exports.prettyFileSize=ye;exports.useFormCheckboxModel=No;exports.useFormSelectChildInternals=we;exports.useOnBeforeWindowUnload=Wo;exports.useResponsiveHorizontalDirectionCalculation=Ae;exports.useWindowResizeHandler=Oe;exports.useWrappingContainerHiddenCount=Ce;exports.writableAsyncComputed=kl;
2
2
  //# sourceMappingURL=lib.cjs.map