@speckle/ui-components 2.17.4 → 2.17.6

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