@speckle/ui-components 2.15.2-alpha5 → 2.16.0

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.
@@ -1,5 +1,11 @@
1
+ import { ConcreteComponent } from 'vue';
1
2
  type AlertColor = 'success' | 'danger' | 'warning' | 'info';
3
+ type Size = 'default' | 'xs';
2
4
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
5
+ size: {
6
+ type: import("vue").PropType<Size>;
7
+ default: string;
8
+ };
3
9
  color: {
4
10
  type: import("vue").PropType<AlertColor>;
5
11
  default: string;
@@ -15,9 +21,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
15
21
  externalUrl?: boolean | undefined;
16
22
  }[]>;
17
23
  };
24
+ customIcon: {
25
+ type: import("vue").PropType<ConcreteComponent>;
26
+ };
18
27
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
28
  dismiss: () => void;
20
29
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
30
+ size: {
31
+ type: import("vue").PropType<Size>;
32
+ default: string;
33
+ };
21
34
  color: {
22
35
  type: import("vue").PropType<AlertColor>;
23
36
  default: string;
@@ -33,9 +46,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
33
46
  externalUrl?: boolean | undefined;
34
47
  }[]>;
35
48
  };
49
+ customIcon: {
50
+ type: import("vue").PropType<ConcreteComponent>;
51
+ };
36
52
  }>> & {
37
53
  onDismiss?: (() => any) | undefined;
38
54
  }, {
55
+ size: Size;
39
56
  color: AlertColor;
40
57
  }, {}>, {
41
58
  title?(_: {}): any;
@@ -301,6 +301,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
301
301
  type: string;
302
302
  placeholder: Optional<string>;
303
303
  label: Optional<string>;
304
+ customIcon: Optional<ConcreteComponent>;
304
305
  modelValue: string;
305
306
  rules: RuleExpression<string>;
306
307
  validateOnMount: boolean;
@@ -312,7 +313,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
312
313
  showClear: boolean;
313
314
  useLabelInErrors: boolean;
314
315
  hideErrorMessage: boolean;
315
- customIcon: Optional<ConcreteComponent>;
316
316
  inputClasses: string;
317
317
  wrapperClasses: string;
318
318
  }, {}>, {
package/dist/lib.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),x=require("lodash"),_=require("@heroicons/vue/24/solid"),O=require("@heroicons/vue/24/outline"),z=require("@heroicons/vue/20/solid"),X=require("vee-validate"),J=require("nanoid"),R=require("@speckle/shared"),T=require("@vueuse/core"),E=require("@headlessui/vue"),ae=require("vue-tippy"),Ce=require("v3-infinite-loading");const Be={key:2,style:{margin:"0 !important",width:"0.01px"}},we=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:l}){const n=t,o=e.resolveDynamicComponent("NuxtLink"),a=e.resolveDynamicComponent("RouterLink"),r=e.computed(()=>n.linkComponent?n.linkComponent:n.external?"a":x.isObjectLike(o)?o:x.isObjectLike(a)?a:"a"),i=e.computed(()=>{if(!n.to)return n.submit?"submit":"button"}),c=e.computed(()=>n.disabled||n.loading),s=e.computed(()=>n.loading?_.ArrowPathIcon:n.iconLeft),u=e.computed(()=>{const m=[];if(m.push("border-2"),c.value)m.push(n.outlined?"border-foreground-disabled":"bg-foundation-disabled border-transparent");else switch(n.color){case"invert":m.push(n.outlined?"border-foundation dark:border-foreground":"bg-foundation dark:bg-foreground border-transparent");break;case"card":m.push(n.outlined?"border-foundation-2 shadow":"bg-foundation-2 dark:bg-foundation-2 border-foundation shadow");break;case"danger":m.push(n.outlined?"border-danger":"bg-danger border-danger");break;case"secondary":m.push(n.outlined?"border-foundation":"bg-foundation border-foundation-2");break;case"warning":m.push(n.outlined?"border-warning":"bg-warning border-warning");break;case"info":m.push(n.outlined?"border-info":"bg-info border-info");break;case"success":m.push(n.outlined?"border-success":"bg-success border-success");break;case"default":default:m.push(n.outlined?"border-primary hover:border-primary-focus":"bg-primary hover:bg-primary-focus border-transparent");break}return m.join(" ")}),p=e.computed(()=>{const m=[];if(!n.text&&!n.link)if(c.value)m.push((n.outlined,"text-foreground-disabled"));else switch(n.color){case"invert":m.push(n.outlined?"text-foundation dark:text-foreground":"text-primary");break;case"card":m.push((n.outlined,"text-foreground"));break;case"danger":m.push(n.outlined?"text-danger":"text-foundation dark:text-foreground");break;case"warning":m.push(n.outlined?"text-warning":"text-foundation dark:text-foreground");break;case"info":m.push(n.outlined?"text-info":"text-foundation dark:text-foreground");break;case"success":m.push(n.outlined?"text-success":"text-foundation dark:text-foreground");break;case"secondary":m.push((n.outlined,"text-foreground hover:text-primary"));break;case"default":default:m.push(n.outlined?"text-primary hover:text-primary-focus":"text-foundation dark:text-foreground");break}else c.value?m.push("text-foreground-disabled"):n.color==="invert"?m.push("text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"):n.color==="secondary"?m.push("text-foreground-2 hover:text-primary-focus"):n.color==="success"?m.push("text-success"):n.color==="warning"?m.push("text-warning"):n.color==="info"?m.push("text-info"):n.color==="danger"?m.push("text-danger"):m.push("text-primary hover:text-primary-focus");return m.join(" ")}),f=e.computed(()=>{const m=[];return m.push(n.rounded?"rounded-full":"rounded-md"),m.join(" ")}),d=e.computed(()=>{const m=[];if(!c.value)switch(n.color){case"invert":m.push("hover:ring-4 ring-white/50");break;case"danger":m.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");break;case"warning":m.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");break;case"info":m.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");break;case"success":m.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");break;case"default":default:m.push("hover:ring-2");break}return m.join(" ")}),g=e.computed(()=>{switch(n.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-base font-medium xxx-tracking-wide"}}),b=e.computed(()=>{switch(n.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"}}),C=e.computed(()=>{const m=[];return n.fullWidth&&m.push("w-full"),c.value&&m.push("cursor-not-allowed"),m.join(" ")}),h=e.computed(()=>{const m=[];return!c.value&&!n.link&&!n.text&&m.push("active:scale-[0.97]"),!c.value&&n.link&&m.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),m.join(" ")}),y=e.computed(()=>{const m=n.link||n.text;return["transition inline-flex justify-center items-center space-x-2 outline-none select-none",C.value,g.value,p.value,m?"":u.value,m?"":f.value,m?"":d.value,n.link?"":b.value,h.value].join(" ")}),k=e.computed(()=>{const m=[""];switch(n.loading&&m.push("animate-spin"),n.size){case"xs":m.push("h-3 w-3");break;case"sm":m.push("h-4 w-4");break;case"lg":m.push("h-6 w-6");break;case"xl":m.push("h-8 w-8");break;case"base":default:m.push("h-5 w-5");break}return m.join(" ")}),S=m=>{if(c.value){m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation();return}l("click",m)};return(m,V)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?r.value:"button"),{href:t.to,to:t.to,type:i.value,external:t.external,class:e.normalizeClass(y.value),disabled:c.value,role:"button",onClick:S},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{key:0,class:e.normalizeClass(`${k.value} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?(e.openBlock(),e.createElementBlock("div",Be,"   ")):e.renderSlot(m.$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(`${k.value} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const se=(t,l)=>{const n=t.__vccOpts||t;for(const[o,a]of l)n[o]=a;return n},U=se(we,[["__scopeId","data-v-38aa371e"]]),re=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:l}){const n=t,o=a=>{if(n.disabled){a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation();return}l("click",a)};return(a,r)=>(e.openBlock(),e.createBlock(U,{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:o},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var M=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(M||{});const Ve={"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"},Ee={class:"flex w-full flex-col items-center space-y-4 sm:items-end"},Se={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"},Ne={class:"p-4"},$e={class:"flex items-start"},Ie={class:"flex-shrink-0"},ze={class:"ml-2 w-0 flex-1 flex flex-col"},_e={key:0,class:"text-foreground font-bold"},Le={key:1,class:"label label--light text-foreground-2"},De={key:2,class:"flex justify-start mt-2"},Pe=e.createElementVNode("span",{class:"sr-only"},"Close",-1),je=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:l}){const n=t,o=e.computed(()=>{var i,c;return!((i=n.notification)!=null&&i.description)&&!((c=n.notification)!=null&&c.cta)}),a=()=>{l("update:notification",null)},r=i=>{var c,s,u;(u=(s=(c=n.notification)==null?void 0:c.cta)==null?void 0:s.onClick)==null||u.call(s,i),a()};return(i,c)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ee,[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",Se,[e.createElementVNode("div",Ne,[e.createElementVNode("div",$e,[e.createElementVNode("div",Ie,[t.notification.type===e.unref(M).Success?(e.openBlock(),e.createBlock(e.unref(O.CheckCircleIcon),{key:0,class:"h-6 w-6 text-success","aria-hidden":"true"})):t.notification.type===e.unref(M).Danger?(e.openBlock(),e.createBlock(e.unref(O.XCircleIcon),{key:1,class:"h-6 w-6 text-danger","aria-hidden":"true"})):t.notification.type===e.unref(M).Warning?(e.openBlock(),e.createBlock(e.unref(O.ExclamationCircleIcon),{key:2,class:"h-6 w-6 text-warning","aria-hidden":"true"})):t.notification.type===e.unref(M).Info?(e.openBlock(),e.createBlock(e.unref(O.InformationCircleIcon),{key:3,class:"h-6 w-6 text-info","aria-hidden":"true"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",ze,[t.notification.title?(e.openBlock(),e.createElementBlock("p",_e,e.toDisplayString(t.notification.title),1)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",Le,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",De,[e.createVNode(re,{to:t.notification.cta.url,class:"label",primary:"",onClick:r},{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":o.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:a},[Pe,e.createVNode(e.unref(z.XMarkIcon),{class:"h-6 w-6","aria-hidden":"true"})])],2)])])])):e.createCommentVNode("",!0)]),_:1})])]))}}),Oe=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),Te=[Oe],ie=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:l}){const n=t,o=e.computed(()=>n.colorClasses||"bg-blue-100 text-blue-800"),a=e.computed(()=>n.dotIconColorClasses||"text-blue-400"),r=e.computed(()=>{const u=["inline-flex items-center",o.value,n.size==="lg"?"px-3 py-0.5 label":"px-2.5 py-0.5 caption font-medium"];return n.rounded?(u.push("rounded"),u.push(n.size==="lg"?"px-2 py-0.5 label":"px-2.5 py-0.5 caption font-medium")):(u.push("rounded-full"),u.push(n.size==="lg"?"px-2.5 py-0.5 label":"px-2.5 py-0.5 caption font-medium")),u.join(" ")}),i=e.computed(()=>{const u=["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 n.clickableIcon?u.push("cursor-pointer"):u.push("cursor-default"),u.join(" ")}),c=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",a.value].join(" ")),s=u=>{if(!n.clickableIcon){u.stopPropagation(),u.stopImmediatePropagation(),u.preventDefault();return}l("click-icon",u)};return(u,p)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(r.value)},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(c.value),fill:"currentColor",viewBox:"0 0 8 8"},Te,2)):e.createCommentVNode("",!0),e.renderSlot(u.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(i.value),onClick:p[0]||(p[0]=f=>s(f))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",a.value])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});let le=[];function Me(t){le=le?t:t.slice()}var A=(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))(A||{});function ce(t){const{props:{modelValue:l,steps:n,orientation:o,goVerticalBelow:a,nonInteractive:r,stepsPadding:i},emit:c}=t,s=e.computed(()=>(o==null?void 0:o.value)==="vertical"?"vertical":"horizontal"),u=e.computed({get:()=>x.clamp((l==null?void 0:l.value)||0,-1,n.value.length),set:h=>c("update:modelValue",x.clamp(h,0,n.value.length))}),p=h=>`${h+1}`,f=h=>h===u.value,d=h=>h<u.value,g=(h,y)=>{var S;if(r!=null&&r.value){y==null||y.preventDefault(),y==null||y.stopPropagation(),y==null||y.stopImmediatePropagation();return}u.value=h;const k=n.value[u.value];(S=k==null?void 0:k.onClick)==null||S.call(k)},b=e.computed(()=>{const h=["flex"];let y,k;return(i==null?void 0:i.value)==="xs"?(y="space-x-2",k="space-y-1"):(i==null?void 0:i.value)==="sm"?(y="space-x-4",k="space-y-1"):(y="space-x-8",k="space-y-4"),h.push("flex"),s.value==="vertical"||a!=null&&a.value?(h.push(`flex-col ${k} justify-center`),(a==null?void 0:a.value)===A.sm?h.push(`sm:flex-row sm:space-y-0 sm:justify-start sm:${y} sm:items-center`):(a==null?void 0:a.value)===A.md?h.push(`md:flex-row md:space-y-0 md:justify-start md:${y} md:items-center`):(a==null?void 0:a.value)===A.lg?h.push(`lg:flex-row lg:space-y-0 lg:justify-start lg:${y} lg:items-center`):(a==null?void 0:a.value)===A.xl&&h.push(`xl:flex-row xl:space-y-0 xl:justify-start xl:${y} xl:items-center`)):h.push(`flex-row ${y} items-center`),h.join(" ")}),C=e.computed(()=>{const h=["flex items-center"];return r!=null&&r.value||h.push("cursor-pointer"),h.join(" ")});return{value:u,isCurrentStep:f,isFinishedStep:d,switchStep:g,getStepDisplayValue:p,listClasses:b,linkClasses:C,orientation:s}}Me(["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 Ae=["aria-label"],Fe=["href","onClick"],Re={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Ue={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},qe={class:"flex flex-col"},We={key:0,class:"label label--light text-foreground"},He=["href","onClick"],Ge={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Ke={class:"shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center"},Xe={class:"flex flex-col"},Je={key:0,class:"label label--light text-foreground"},Qe=["href","onClick"],Ye={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},Ze={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},et={class:"flex flex-col"},tt={key:0,class:"label label--light"},nt=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:l}){const n=t,{isCurrentStep:o,isFinishedStep:a,switchStep:r,getStepDisplayValue:i,listClasses:c,linkClasses:s}=ce({props:e.toRefs(n),emit:l});return(u,p)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(c))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(f,d)=>(e.openBlock(),e.createElementBlock("li",{key:f.name},[e.unref(a)(d)?(e.openBlock(),e.createElementBlock("a",{key:0,href:f.href,class:e.normalizeClass(e.unref(s)),onClick:g=>e.unref(r)(d,g)},[e.createElementVNode("div",Re,[e.createElementVNode("div",Ue,[e.createVNode(e.unref(z.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",qe,[e.createElementVNode("div",null,e.toDisplayString(f.name),1),f.description?(e.openBlock(),e.createElementBlock("div",We,e.toDisplayString(f.description),1)):e.createCommentVNode("",!0)])])],10,Fe)):e.unref(o)(d)?(e.openBlock(),e.createElementBlock("a",{key:1,href:f.href,class:e.normalizeClass(e.unref(s)),"aria-current":"step",onClick:g=>e.unref(r)(d,g)},[e.createElementVNode("div",Ge,[e.createElementVNode("div",Ke,e.toDisplayString(e.unref(i)(d)),1),e.createElementVNode("div",Xe,[e.createElementVNode("div",null,e.toDisplayString(f.name),1),f.description?(e.openBlock(),e.createElementBlock("div",Je,e.toDisplayString(f.description),1)):e.createCommentVNode("",!0)])])],10,He)):(e.openBlock(),e.createElementBlock("a",{key:2,href:f.href,class:e.normalizeClass(e.unref(s)),onClick:g=>e.unref(r)(d,g)},[e.createElementVNode("div",Ye,[e.createElementVNode("div",Ze,e.toDisplayString(e.unref(i)(d)),1),e.createElementVNode("div",et,[e.createElementVNode("div",null,e.toDisplayString(f.name),1),f.description?(e.openBlock(),e.createElementBlock("div",tt,e.toDisplayString(f.description),1)):e.createCommentVNode("",!0)])])],10,Qe))]))),128))],2)],8,Ae))}}),ot=["aria-label"],lt=["href","onClick"],at={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},st={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},rt=["href","onClick"],it={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},ct={key:0,class:"h-3 w-3 rounded-full bg-foreground"},ut=e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1),dt=e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1),mt=["href","onClick"],ft={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},pt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},ht={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},gt=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:l}){const n=t,{isCurrentStep:o,isFinishedStep:a,switchStep:r,listClasses:i,linkClasses:c}=ce({props:e.toRefs(n),emit:l}),s=e.computed(()=>{const p=["h6 font-medium leading-7"];let f;return n.stepsPadding==="xs"?f="ml-1":n.stepsPadding==="sm"?f="ml-2":f="ml-3",p.push(f),n.basic&&p.push("sr-only"),p.join(" ")}),u=e.computed(()=>{const p=[];return n.basic&&p.push("basic"),p.join(" ")});return(p,f)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass([e.unref(i),u.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(d,g)=>(e.openBlock(),e.createElementBlock("li",{key:d.name},[e.unref(a)(g)?(e.openBlock(),e.createElementBlock("a",{key:0,href:d.href,class:e.normalizeClass(e.unref(c)),onClick:b=>e.unref(r)(g,b)},[e.createElementVNode("span",at,[t.basic?(e.openBlock(),e.createElementBlock("span",st)):(e.openBlock(),e.createBlock(e.unref(z.CheckCircleIcon),{key:1,class:"h-full w-full text-primary","aria-hidden":"true"}))]),e.createElementVNode("span",{class:e.normalizeClass(["text-foreground",s.value])},e.toDisplayString(d.name),3)],10,lt)):e.unref(o)(g)?(e.openBlock(),e.createElementBlock("a",{key:1,href:d.href,class:e.normalizeClass(e.unref(c)),"aria-current":"step",onClick:b=>e.unref(r)(g,b)},[e.createElementVNode("span",it,[t.basic?(e.openBlock(),e.createElementBlock("span",ct)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[ut,dt],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",s.value])},e.toDisplayString(d.name),3)],10,rt)):(e.openBlock(),e.createElementBlock("a",{key:2,href:d.href,class:e.normalizeClass(e.unref(c)),onClick:b=>e.unref(r)(g,b)},[e.createElementVNode("div",ft,[t.basic?(e.openBlock(),e.createElementBlock("span",pt)):(e.openBlock(),e.createElementBlock("div",ht))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",s.value])},e.toDisplayString(d.name),3)],10,mt))]))),128))],2)],8,ot))}}),vt=["disabled"],yt=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:l}){const n=t,o=e.computed(()=>{const r=["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 n.disabled?r.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed"):(r.push(n.modelValue?"bg-primary-focus text-foreground-on-primary":"bg-foundation text-foreground"),r.push("ring-outline-2 hover:ring-4")),r.join(" ")}),a=r=>{if(n.disabled){r.preventDefault(),r.stopPropagation(),r.stopImmediatePropagation();return}l("update:modelValue",!n.modelValue),l("click",r)};return(r,i)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(o.value),disabled:t.disabled,onClick:a},[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,vt))}}),kt={class:"relative flex items-start"},bt={class:"flex h-6 items-center"},xt=["id","checked","aria-describedby","name","disabled","value"],Ct={class:"ml-2 text-sm",style:{"padding-top":"2px"}},Bt=["for"],wt={key:0,class:"text-danger ml-1"},Vt=["id"],Et=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 l=t,n=h=>`${h}-${J.nanoid()}`,o=e.computed(()=>l.value||l.name),{checked:a,errorMessage:r,handleChange:i,value:c}=X.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,type:"checkbox",checkedValue:o,initialValue:l.modelValue||void 0}),s=e.computed(()=>l.label||l.name),u=e.computed(()=>r.value?"border-danger-lighter":"border-foreground-4 "),p=e.computed(()=>l.description||r.value),f=e.computed(()=>`${l.name}-description`),d=e.computed(()=>{const h=[];return l.inlineDescription?h.push("inline ml-2"):h.push("block"),r.value?h.push("text-danger"):h.push("text-foreground-2"),h.join(" ")}),g=e.ref(n("checkbox")),b=e.computed(()=>l.id||g.value),C=h=>{l.disabled||i(h)};return e.onMounted(()=>{const h=l.modelValue,y=c.value,k=Array.isArray(h)?h.includes(l.value):h===l.value,S=Array.isArray(y)?y.includes(l.value):y===l.value;k!==S&&i(h)}),(h,y)=>(e.openBlock(),e.createElementBlock("div",kt,[e.createElementVNode("div",bt,[e.createElementVNode("input",e.mergeProps({id:b.value,checked:e.unref(a),"aria-describedby":f.value,name:t.name,disabled:t.disabled,value:o.value,type:"checkbox",class:["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",u.value]},h.$attrs,{onChange:C}),null,16,xt)]),e.createElementVNode("div",Ct,[e.createElementVNode("label",{for:b.value,class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(s.value),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",wt,"*")):e.createCommentVNode("",!0)],10,Bt),p.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:f.value,class:e.normalizeClass(d.value)},e.toDisplayString(p.value),11,Vt)):e.createCommentVNode("",!0)])]))}});function ue(t){const{props:l,inputEl:n,emit:o}=t,{value:a,errorMessage:r}=X.useField(l.name,l.rules,{validateOnMount:e.unref(l.validateOnMount),validateOnValueUpdate:e.unref(l.validateOnValueUpdate),initialValue:e.unref(l.modelValue)||void 0}),i=e.computed(()=>{const k=["block label text-foreground-2 mb-2"];return e.unref(l.showLabel)||k.push("sr-only"),k.join(" ")}),c=e.computed(()=>{const k=["block w-full rounded focus:outline-none text-foreground transition-all","disabled:cursor-not-allowed disabled:bg-foundation-disabled disabled:text-disabled-muted","placeholder:text-foreground-2"];return r.value?k.push("border-2 border-danger text-danger-darker focus:border-danger focus:ring-danger"):k.push("border-0 focus:ring-2 focus:ring-outline-2"),e.unref(l.color)==="foundation"?k.push("bg-foundation shadow-sm hover:shadow"):k.push("bg-foundation-page"),k.join(" ")}),s=e.ref(J.nanoid()),u=e.computed(()=>e.unref(l.label)||e.unref(l.name)),p=e.computed(()=>{const k=r.value;return!k||!e.unref(l.useLabelInErrors)?k:k.replace("Value",u.value)}),f=e.computed(()=>p.value&&e.unref(l.hideErrorMessage)),d=e.computed(()=>p.value||e.unref(l.help)),g=e.computed(()=>!!d.value),b=e.computed(()=>g.value?`${e.unref(l.name)}-${s.value}`:void 0),C=e.computed(()=>{const k=["mt-2 text-sm"];return k.push(r.value?"text-danger":"text-foreground-2"),k.join(" ")}),h=()=>{var k;(k=n.value)==null||k.focus()},y=()=>{a.value="",o("change",{value:""}),o("clear")};return e.onMounted(()=>{e.unref(l.autoFocus)&&h()}),{coreClasses:c,title:u,value:a,helpTipId:b,helpTipClasses:C,helpTip:d,hideHelpTip:f,errorMessage:p,clear:y,focus:h,labelClasses:i}}const St=["for"],Nt={class:"relative"},$t=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],It=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),zt={key:2,class:"pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"},_t=["id"],Lt=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"}},emits:["update:modelValue","change","input","clear"],setup(t,{expose:l,emit:n}){const o=t,a=e.ref(null),{coreClasses:r,title:i,value:c,helpTipId:s,helpTipClasses:u,helpTip:p,errorMessage:f,labelClasses:d,clear:g,focus:b}=ue({props:e.toRefs(o),emit:n,inputEl:a}),C=e.computed(()=>{const h=["pl-2"];return o.showClear&&f.value?h.push("pr-12"):(o.showClear||f.value)&&h.push("pr-8"),h.join(" ")});return l({focus:b}),(h,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":""])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(d))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(i)),1)],10,St),e.createElementVNode("div",Nt,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:a,"onUpdate:modelValue":y[0]||(y[0]=k=>e.isRef(c)?c.value=k:null),name:t.name,class:[e.unref(r),C.value,"min-h-[4rem]"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(f)?"true":"false","aria-describedby":e.unref(s)},h.$attrs,{onChange:y[1]||(y[1]=k=>h.$emit("change",{event:k,value:e.unref(c)})),onInput:y[2]||(y[2]=k=>h.$emit("input",{event:k,value:e.unref(c)}))}),null,16,$t),[[e.vModelText,e.unref(c)]]),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:y[3]||(y[3]=(...k)=>e.unref(g)&&e.unref(g)(...k)),onKeydown:y[4]||(y[4]=(...k)=>e.unref(g)&&e.unref(g)(...k))},[It,e.createVNode(e.unref(z.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(f)?(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(z.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(f)?(e.openBlock(),e.createElementBlock("div",zt," * ")):e.createCommentVNode("",!0)]),e.unref(s)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(s),class:e.normalizeClass(e.unref(u))},e.toDisplayString(e.unref(p)),11,_t)):e.createCommentVNode("",!0)],2))}}),Dt=["for"],Pt={class:"relative"},jt={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},Ot=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],Tt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Mt={key:2,class:"pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"},At=["id"],Ft=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","focusin","focusout"],setup(t,{expose:l,emit:n}){const o=t,a=e.useSlots(),r=e.ref(null),{coreClasses:i,title:c,value:s,helpTipId:u,helpTipClasses:p,helpTip:f,hideHelpTip:d,errorMessage:g,clear:b,focus:C,labelClasses:h}=ue({props:e.toRefs(o),emit:n,inputEl:r}),y=e.computed(()=>{const V=["h-5 w-5"];return g.value?V.push("text-danger"):V.push("text-foreground-2"),V.join(" ")}),k=e.computed(()=>["email","password"].includes(o.type)||o.customIcon),S=e.computed(()=>{const V=[];return k.value?V.push("pl-8"):V.push("pl-2"),a["input-right"]||(g.value||o.showClear)&&(g.value&&o.showClear?V.push("pr-12"):V.push("pr-8")),V.join(" ")}),m=e.computed(()=>{switch(o.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}});return l({focus:C}),(V,$)=>(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(h))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(c)),1)],10,Dt),e.createElementVNode("div",Pt,[k.value?(e.openBlock(),e.createElementBlock("div",jt,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref(z.EnvelopeIcon),{key:1,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref(z.KeyIcon),{key:2,class:e.normalizeClass(y.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:r,"onUpdate:modelValue":$[0]||($[0]=N=>e.isRef(s)?s.value=N:null),type:t.type,name:t.name,class:[e.unref(i),S.value,m.value,t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(g)?"true":"false","aria-describedby":e.unref(u),role:"textbox"},V.$attrs,{onChange:$[1]||($[1]=N=>V.$emit("change",{event:N,value:e.unref(s)})),onInput:$[2]||($[2]=N=>V.$emit("input",{event:N,value:e.unref(s)}))}),null,16,Ot),[[e.vModelDynamic,e.unref(s)]]),e.renderSlot(V.$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:$[3]||($[3]=(...N)=>e.unref(b)&&e.unref(b)(...N)),onKeydown:$[4]||($[4]=(...N)=>e.unref(b)&&e.unref(b)(...N))},[Tt,e.createVNode(e.unref(z.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(g)?(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(z.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(g)?(e.openBlock(),e.createElementBlock("div",Mt," * ")):e.createCommentVNode("",!0)])]),e.unref(u)&&!e.unref(d)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(u),class:e.normalizeClass(e.unref(p))},e.toDisplayString(e.unref(f)),11,At)):e.createCommentVNode("",!0)],2))}}),Rt=/^https?:\/\//,Q=/^[\w-_.+]+@[\w-_.+]+$/,Ut=t=>(t||"").match(Q)?!0:"Value should be a valid e-mail address",qt=t=>(t||"").split(",").map(o=>o.trim()).every(o=>o.match(Q))||"Value should be one or multiple comma-delimited e-mail addresses",Wt=t=>(x.isString(t)&&(t=t.trim()),t?!0:"Value is required"),Ht=(t,l)=>(n,o)=>n===o.form[t]?!0:`Value must be the same as in field '${l||t}'`,Gt=t=>l=>{const{minLength:n,maxLength:o}=t;return l=R.isNullOrUndefined(l)?"":l,x.isString(l)?!x.isUndefined(n)&&l.length<n?`Value needs to be at least ${n} characters long`:!x.isUndefined(o)&&l.length>o?`Value needs to be no more than ${o} characters long`:!0:"Value should be a text string"},Kt=t=>l=>{const{match:n,message:o}=t;return x.isString(l)?n?x.isString(n)?l.includes(n)?!0:o:n.test(l)?!0:o:!0:"Value should be a text string"},Xt=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:Q,VALID_HTTP_URL:Rt,isEmail:Ut,isOneOrMultipleEmails:qt,isRequired:Wt,isSameAs:Ht,isStringOfLength:Gt,stringContains:Kt},Symbol.toStringTag,{value:"Module"}));function de(t){const{skipCalculation:l,elementToWatchForChanges:n,itemContainer:o,trackResize:a=!1,trackMutations:r=!0}=t||{},i=e.ref(0),c=()=>{const s=o.value;if(l!=null&&l.value||!s)return;const u=s.children;let p=0,f=0,d;for(const g of u){const b=g.offsetTop;x.isUndefined(d)?(d=b,p+=1):b===d&&(p+=1),f+=1}i.value=f-p};return a&&T.useResizeObserver(n,c),r&&T.useMutationObserver(n,c,{childList:!0,subtree:!0}),{hiddenItemCount:i}}function me(t){const{props:l,emit:n,dynamicVisibility:o}=t;let a;if(o){const{elementToWatchForChanges:u,itemContainer:p}=o;a=de({skipCalculation:e.computed(()=>{var d;return!((d=l.multiple)!=null&&d.value)}),elementToWatchForChanges:u,itemContainer:p}).hiddenItemCount}else a=e.ref(0);const r=e.computed({get:()=>{var p,f;const u=(p=l.modelValue)==null?void 0:p.value;return(f=l.multiple)!=null&&f.value?x.isArray(u)?u:[]:x.isArray(u)?void 0:u},set:u=>{var p,f,d;if((p=l.multiple)!=null&&p.value&&!x.isArray(u)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((f=l.multiple)!=null&&f.value)&&x.isArray(u)){console.warn("Attempting to set array value in selector w/ multiple=false");return}n("update:modelValue",(d=l.multiple)!=null&&d.value?u||[]:u)}}),i=u=>x.isArray(u);return{selectedValue:r,hiddenSelectedItemCount:a,isArrayValue:i,isMultiItemArrayValue:u=>x.isArray(u)&&u.length>1,firstItem:u=>i(u)?u[0]:u}}const Jt=t=>(e.pushScopeId("data-v-60cf597b"),t=t(),e.popScopeId(),t),Qt=Jt(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),Yt=[Qt],Zt=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(l,n)=>(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"])},Yt,2))}});const Y=se(Zt,[["__scopeId","data-v-60cf597b"]]),en={class:"flex items-center justify-between w-full"},tn={class:"block truncate grow text-left"},nn={class:"pointer-events-none shrink-0 ml-1 flex items-center"},on=["disabled"],ln={key:0,class:"flex flex-col mx-1 mb-1"},an=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),sn={class:"relative"},rn={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},cn=["placeholder"],un={key:0,class:"px-1"},dn={key:1},mn=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷‍♂️",-1),fn={class:e.normalizeClass(["block truncate"])},pn=["id"],fe=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},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}},emits:["update:modelValue"],setup(t,{expose:l,emit:n}){const o=t,{value:a,errorMessage:r}=X.useField(o.name,o.rules,{validateOnMount:o.validateOnMount,validateOnValueUpdate:o.validateOnValueUpdate,initialValue:o.modelValue}),i=e.ref(null),c=e.ref(""),s=e.ref([]),u=e.ref(!1),p=e.ref(1),f=e.ref(J.nanoid()),d=e.computed(()=>e.unref(o.label)||e.unref(o.name)),g=e.computed(()=>{const v=r.value;return!v||!e.unref(o.useLabelInErrors)?v:v.replace("Value",d.value)}),b=e.computed(()=>g.value||e.unref(o.help)),C=e.computed(()=>!!b.value),h=e.computed(()=>C.value?`${e.unref(o.name)}-${f.value}`:void 0),y=e.computed(()=>r.value?"text-danger":"text-foreground-2"),k=e.computed(()=>o.buttonStyle!=="simple"&&o.clearable&&!o.disabled),S=e.computed(()=>{const v=["relative flex group"];return o.buttonStyle!=="simple"&&(v.push("hover:shadow rounded-md"),v.push("outline outline-2 outline-primary-muted")),o.fixedHeight&&v.push("h-8"),v.join(" ")}),m=e.computed(()=>{const v=[];return o.buttonStyle!=="simple"&&v.push(q.value?"bg-foundation-disabled text-foreground-disabled":""),q.value&&v.push("cursor-not-allowed"),v.join(" ")}),V=e.computed(()=>{const v=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all","text-foreground",Z.value?`w-6 ${m.value}`:"w-0"];return q.value||(v.push("hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"),o.buttonStyle==="tinted"?v.push("bg-outline-3"):v.push("bg-primary-muted")),v.join(" ")}),$=e.computed(()=>{const v=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",m.value];return o.buttonStyle!=="simple"&&(v.push("py-2 px-3"),q.value||(o.buttonStyle==="tinted"?v.push("bg-foundation-page text-foreground"):v.push("bg-foundation text-foreground"))),k.value&&Z.value&&v.push("rounded-r-none"),v.join(" ")}),N=e.computed(()=>!!(o.search&&(o.filterPredicate||o.getSearchResults))),D=e.computed(()=>N.value&&o.getSearchResults),q=e.computed(()=>o.disabled||!o.items.length&&!D.value),I=e.computed({get:()=>{const v=a.value;return o.multiple?x.isArray(v)?v:[]:x.isArray(v)?void 0:v},set:v=>{if(o.multiple&&!x.isArray(v)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!o.multiple&&x.isArray(v)){console.warn("Attempting to set array value in selector w/ multiple=false");return}let w;if(o.multiple)w=v||[];else{const B=a.value;w=o.allowUnset&&B&&v&&G(B)===G(v)?void 0:v}o.fullyControlValue?n("update:modelValue",w):a.value=w,p.value+=1}}),Z=e.computed(()=>o.multiple?I.value.length!==0:!!I.value),ye=()=>{o.multiple?I.value=[]:I.value=void 0},ke=e.computed(()=>{const v=c.value;return!N.value||!(v!=null&&v.length)?s.value:o.filterPredicate?s.value.filter(w=>{var B;return((B=o.filterPredicate)==null?void 0:B.call(o,w,v))||!1}):s.value}),ee=v=>JSON.stringify(v),G=v=>o.by?v[o.by]:v,K=async()=>{if(!(!D.value||!o.getSearchResults)){u.value=!0;try{s.value=await o.getSearchResults(c.value)}finally{u.value=!1}}},be=x.debounce(K,1e3),xe=v=>{const{active:w,disabled:B}=v||{},{hideCheckmarks:L}=o,P=["relative transition cursor-pointer select-none py-1.5 pl-3",L?"":"pr-9"];return B?P.push("opacity-50 cursor-not-allowed"):P.push(w?"text-primary":"text-foreground"),P.join(" ")};return e.watch(()=>o.items,v=>{s.value=v.slice()},{immediate:!0}),e.watch(c,()=>{D.value&&be()}),e.onMounted(()=>{D.value&&!o.items.length&&K()}),l({triggerSearch:K}),(v,w)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.unref(E.Listbox),{key:p.value,modelValue:I.value,"onUpdate:modelValue":w[4]||(w[4]=B=>I.value=B),name:t.name,multiple:t.multiple,by:t.by,disabled:q.value,as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.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(S.value)},[e.createVNode(e.unref(E.ListboxButton),{class:e.normalizeClass($.value)},{default:e.withCtx(({open:B})=>[e.createElementVNode("div",en,[e.createElementVNode("div",tn,[!I.value||e.unref(x.isArray)(I.value)&&!I.value.length?e.renderSlot(v.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.label),1)]):e.renderSlot(v.$slots,"something-selected",{key:1,value:I.value},()=>[e.createTextVNode(e.toDisplayString(ee(I.value)),1)])]),e.createElementVNode("div",nn,[B?(e.openBlock(),e.createBlock(e.unref(_.ChevronUpIcon),{key:0,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref(_.ChevronDownIcon),{key:1,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),k.value?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(V.value),disabled:t.disabled,onClick:w[0]||(w[0]=B=>ye())},[e.createVNode(e.unref(_.XMarkIcon),{class:"w-3 h-3"})],10,on)),[[e.unref(ae.directive),"Clear"]]):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.ListboxOptions),{class:"absolute top-[100%] z-10 mt-1 w-full rounded-md bg-foundation-2 py-1 label label--light outline outline-2 outline-primary-muted focus:outline-none shadow",onFocus:w[3]||(w[3]=B=>{var L;return(L=i.value)==null?void 0:L.focus()})},{default:e.withCtx(()=>[N.value?(e.openBlock(),e.createElementBlock("label",ln,[an,e.createElementVNode("div",sn,[e.createElementVNode("div",rn,[e.createVNode(e.unref(_.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:i,"onUpdate:modelValue":w[1]||(w[1]=B=>c.value=B),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:w[2]||(w[2]=e.withModifiers(()=>{},["stop"]))},null,40,cn),[[e.vModelText,c.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[N.value?"max-h-52":"max-h-60"]])},[D.value&&u.value?(e.openBlock(),e.createElementBlock("div",un,[e.createVNode(Y,{loading:!0})])):D.value&&!s.value.length?(e.openBlock(),e.createElementBlock("div",dn,[e.renderSlot(v.$slots,"nothing-found",{},()=>[mn])])):e.createCommentVNode("",!0),!D.value||!u.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(ke.value,B=>{var L;return e.openBlock(),e.createBlock(e.unref(E.ListboxOption),{key:G(B),value:B,disabled:((L=t.disabledItemPredicate)==null?void 0:L.call(t,B))||!1},{default:e.withCtx(({active:P,selected:te})=>{var ne,oe;return[e.createElementVNode("li",{class:e.normalizeClass(xe({active:P,disabled:((ne=t.disabledItemPredicate)==null?void 0:ne.call(t,B))||!1}))},[e.createElementVNode("span",fn,[e.renderSlot(v.$slots,"option",{item:B,active:P,selected:te,disabled:((oe=t.disabledItemPredicate)==null?void 0:oe.call(t,B))||!1},()=>[e.createTextVNode(e.toDisplayString(ee(B)),1)])]),!t.hideCheckmarks&&te?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([P?"text-primary":"text-foreground","absolute inset-y-0 right-0 flex items-center pr-4"])},[e.createVNode(e.unref(_.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]}),_:2},1032,["value","disabled"])}),128)):e.createCommentVNode("",!0)],2)]),_:3})]),_:3})],2)]),_:3},8,["modelValue","name","multiple","by","disabled"])),h.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:h.value,class:e.normalizeClass(["mt-2 text-sm",y.value])},e.toDisplayString(b.value),11,pn)):e.createCommentVNode("",!0)]))}}),pe=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(l,n)=>(e.openBlock(),e.createBlock(ie,{"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"]))}}),hn={key:0,class:"text-foreground-2 normal"},gn={key:1,class:"flex items-center"},vn={class:"truncate"},yn={class:"flex items-center"},kn={class:"truncate"},bn=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}},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,o=e.ref(null),a=e.ref(null),{selectedValue:r,hiddenSelectedItemCount:i,isMultiItemArrayValue:c,firstItem:s}=me({props:e.toRefs(n),emit:l,dynamicVisibility:{elementToWatchForChanges:o,itemContainer:a}}),u=(p,f)=>p.name.toLocaleLowerCase().includes(f.toLocaleLowerCase());return(p,f)=>(e.openBlock(),e.createBlock(fe,{modelValue:e.unref(r),"onUpdate:modelValue":f[0]||(f[0]=d=>e.isRef(r)?r.value=d:null),multiple:t.multiple,items:t.items??e.unref(R.SourceApps),search:t.search,"search-placeholder":t.searchPlaceholder,label:t.label,"show-label":t.showLabel,name:t.name||"sourceApps","filter-predicate":u,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:d})=>[e.unref(c)(d)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"elementToWatchForChanges",ref:o,class:"flex items-center space-x-0.5 h-5"},[e.createElementVNode("div",{ref_key:"itemContainer",ref:a,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d,g=>(e.openBlock(),e.createBlock(pe,{key:g.name,"source-app":g},null,8,["source-app"]))),128))],512),e.unref(i)>0?(e.openBlock(),e.createElementBlock("div",hn," +"+e.toDisplayString(e.unref(i)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",gn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(s)(d).bgColor})},null,4),e.createElementVNode("span",vn,e.toDisplayString(e.unref(s)(d).name),1)]))]),option:e.withCtx(({item:d})=>[e.createElementVNode("div",yn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:d.bgColor})},null,4),e.createElementVNode("span",kn,e.toDisplayString(d.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name"]))}});var F=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(F||{});const W=R.getClientOperatingSystem(),xn={["cmd-or-ctrl"]:W===R.OperatingSystem.Mac?"Cmd":"Ctrl",["alt-or-opt"]:W===R.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function Cn(t){const l=n=>Object.values(F).includes(n);return t.map(n=>l(n)?xn[n]:n).join("+")}function Bn(t,...l){T.onKeyDown(l[0],n=>{const o=n.getModifierState("Alt"),a=W===R.OperatingSystem.Mac?n.getModifierState("Meta"):n.getModifierState("Control"),r=n.getModifierState("Shift");for(const i of t)switch(i){case F.CtrlOrCmd:if(!a)return;break;case F.AltOrOpt:if(!o)return;break;case F.Shift:if(!r)return;break}l[1](n)},l[2])}function wn(t){const l=(t==null?void 0:t.model)||e.ref(),n=e.computed({get:()=>!!l.value,set:o=>l.value=o?!0:void 0});return{model:l,isChecked:n}}const Vn=e.createElementVNode("div",{class:"fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity"},null,-1),En={class:"fixed inset-0 z-10 overflow-y-auto"},Sn={class:"flex min-h-full justify-center p-4 text-center items-center sm:p-0"},Nn={key:0,class:"flex items-center justify-center shadow p-4 relative z-10 bg-foundation rounded-t-lg"},$n={class:"text-2xl font-bold"},In={class:"p-4 sm:p-6"},zn={key:2,class:"flex p-4 sm:px-6 sm:py-5 border-t gap-2 border-outline-3"},_n=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:l}){const n=t,o=e.useSlots(),a=e.computed(()=>!!n.onSubmit),r=e.computed(()=>n.buttons||o.buttons),i=e.computed({get:()=>n.open,set:p=>l("update:open",p)}),c=e.computed(()=>{switch(n.maxWidth){case"sm":return 0;case"md":return 1;case"lg":return 2;case"xl":return 3;default:return 1e4}}),s=e.computed(()=>{const p=["w-full","sm:my-8 sm:w-full sm:max-w-xl"];return!n.title&&!r.value&&p.push("px-4 pt-4 pb-4","sm:p-6"),c.value>=1&&p.push("md:max-w-2xl"),c.value>=2&&p.push("lg:max-w-4xl"),c.value>=3&&p.push("xl:max-w-6xl"),c.value>=4&&p.push("2xl:max-w-7xl"),p.join(" ")}),u=()=>{n.preventCloseOnClickOutside||(i.value=!1)};return(p,f)=>(e.openBlock(),e.createBlock(e.unref(E.TransitionRoot),{as:"template",show:i.value},{default:e.withCtx(()=>[e.createVNode(e.unref(E.Dialog),{as:"div",class:"relative z-40",onClose:u},{default:e.withCtx(()=>[e.createVNode(e.unref(E.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(()=>[Vn]),_:1}),e.createElementVNode("div",En,[e.createElementVNode("div",Sn,[e.createVNode(e.unref(E.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:f[1]||(f[1]=d=>p.$emit("fully-closed"))},{default:e.withCtx(()=>[e.createVNode(e.unref(E.DialogPanel),{class:e.normalizeClass(["transform rounded-lg bg-foundation text-left shadow-xl transition-all",s.value]),as:a.value?"form":"div",onSubmit:e.withModifiers(t.onSubmit,["prevent"])},{default:e.withCtx(()=>[t.title?(e.openBlock(),e.createElementBlock("div",Nn,[e.createElementVNode("h4",$n,e.toDisplayString(t.title),1)])):e.createCommentVNode("",!0),t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,class:"absolute z-20 top-5 right-4 text-foreground",onClick:f[0]||(f[0]=d=>i.value=!1)},[e.createVNode(e.unref(O.XMarkIcon),{class:"h-6 w-6"})])),e.createElementVNode("div",In,[e.renderSlot(p.$slots,"default",{},()=>[e.createTextVNode("Put your content here!")])]),r.value?(e.openBlock(),e.createElementBlock("div",zn,[t.buttons?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.buttons,(d,g)=>(e.openBlock(),e.createBlock(e.unref(U),e.mergeProps({key:g},d.props,{onClick:d.onClick}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.text),1)]),_:2},1040,["onClick"]))),128)):e.renderSlot(p.$slots,"buttons",{key:1})])):e.createCommentVNode("",!0)]),_:3},8,["class","as","onSubmit"])]),_:3})])])]),_:3})]),_:3},8,["show"]))}}),Ln={class:"inline-flex items-center space-x-2"},Dn={class:"label-light"},Pn=e.defineComponent({__name:"Disclosure",props:{title:null,icon:null,color:{default:"default"}},setup(t){const l=t,n=e.computed(()=>{const a=["pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition","ring-1 font-medium"];switch(l.color){case"warning":a.push("border-warning text-warning ring-warning-lighter hover:ring-warning");break;case"success":a.push("border-success text-success ring-success-lighter hover:ring-success");break;case"danger":a.push("border-danger text-danger ring-danger-lighter hover:ring-danger");break;case"default":default:a.push("border-primary text-primary ring-primary-muted hover:ring-primary");break}return a.join(" ")}),o=e.computed(()=>{const a=["mt-4 px-3 py-1 border-x "];switch(l.color){case"warning":a.push("border-warning-lighter");break;case"success":a.push("border-success-lighter");break;case"danger":a.push("border-danger-lighter");break;case"default":default:a.push("border-primary-muted");break}return a.join(" ")});return(a,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(E.Disclosure),null,{default:e.withCtx(({open:i})=>[e.createVNode(e.unref(E.DisclosureButton),{class:e.normalizeClass(n.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Ln,[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"h-4 w-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.title),1)]),e.createVNode(e.unref(_.ChevronUpIcon),{class:e.normalizeClass([i?"":"rotate-180 transform","h-5 w-5"])},null,8,["class"])]),_:2},1032,["class"]),e.createVNode(e.unref(E.DisclosurePanel),{class:e.normalizeClass(o.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Dn,[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])])]),_:3},8,["class"])]),_:3})]))}});var j=(t=>(t.Grid="grid",t.List="list",t))(j||{});const jn=e.defineComponent({__name:"GridListToggle",props:{modelValue:null},emits:["click","update:modelValue"],setup(t,{emit:l}){const n=t,o=e.computed({get:()=>n.modelValue||j.Grid,set:i=>l("update:modelValue",i)}),a=e.computed(()=>o.value===j.Grid?_.Bars3Icon:_.Squares2X2Icon),r=i=>{l("click",i);const c=o.value===j.Grid?j.List:j.Grid;o.value=c};return(i,c)=>(e.openBlock(),e.createElementBlock("button",{class:"flex items-center justify-center rounded bg-foundation h-8 w-8 shadow cursor-pointer text-foreground",onClick:r},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),{class:"h-6 w-6"}))]))}});var he=(t=>(t[t.Throttle=0]="Throttle",t[t.Debounce=1]="Debounce",t))(he||{}),H=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(H||{});function ge(t,l){if(!T.isClient)return;const{wait:n=100,throttleOrDebounce:o=0}=l||{},a=n?o===0?x.throttle(t,n):x.debounce(t,n):t;e.onMounted(()=>window.addEventListener("resize",a)),e.onBeforeUnmount(()=>window.removeEventListener("resize",a))}function On(t){e.onMounted(()=>{window.addEventListener("beforeunload",t)}),e.onBeforeUnmount(()=>{window.removeEventListener("beforeunload",t)})}function ve(t){const{el:l,defaultDirection:n}=t,o=e.ref(x.isUndefined(n)?1:n),a=e.computed(()=>{const i=e.unref(t.stopUpdatesBelowWidth);if(!x.isUndefined(i))return i;const c=e.unref(l);return c!=null&&c.offsetWidth?c.offsetWidth*2:void 0}),r=()=>{if(!T.isClient)return;const i=e.unref(l);if(!i)return;const c=i.getBoundingClientRect(),s=c.x+c.width>window.innerWidth,u=c.x<0;s&&u||!x.isUndefined(a.value)&&window.innerWidth<a.value||(s?o.value=0:u&&(o.value=1))};return ge(()=>r()),e.watch(()=>e.unref(l),i=>{i&&r()}),{direction:e.computed(()=>o.value),recalculateDirection:r}}const Tn=["disabled","onClick"],Mn=e.defineComponent({__name:"Menu",props:{open:{type:Boolean},items:null},emits:["update:open","chosen"],setup(t,{emit:l}){const n=t,o=e.ref(null),{direction:a}=ve({el:e.computed(()=>{var d;return((d=o.value)==null?void 0:d.el)||null}),defaultDirection:H.Left,stopUpdatesBelowWidth:300}),r=e.ref(null),i=e.ref(!1),c=e.computed({get:()=>n.open||!1,set:d=>l("update:open",d)}),s=d=>{const{active:g,disabled:b}=d,C=["group flex w-full items-center rounded-md px-2 py-2 text-sm"];return g?C.push("bg-primary text-foreground-on-primary"):b?C.push("text-foreground-disabled"):C.push("text-foreground"),C.join(" ")},u=(d,g)=>{l("chosen",{item:d,event:g})},p=()=>{var d;return(d=r.value)==null?void 0:d.el.click()},f=d=>{const g=!!d;return i.value=g,g};return e.watch(i,(d,g)=>{d!==g&&(c.value=d)}),e.watch(c,d=>{(d&&!i.value||!d&&i.value)&&p()}),(d,g)=>(e.openBlock(),e.createBlock(e.unref(E.Menu),{as:"div",class:"relative inline-block"},{default:e.withCtx(({open:b})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(E.MenuButton),{ref_key:"menuButton",ref:r,class:"hidden",onClick:g[0]||(g[0]=e.withModifiers(()=>{},["stop","prevent"]))},null,512),e.createElementVNode("div",{class:e.normalizeClass(b?"pointer-events-none":"")},[e.renderSlot(d.$slots,"default",{toggle:p,open:f(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(E.MenuItems),{ref_key:"menuItems",ref:o,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(a)===e.unref(H).Left?"right-0":""])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(C,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:"px-1 py-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C,y=>(e.openBlock(),e.createBlock(e.unref(E.MenuItem),{key:y.id,disabled:y.disabled},{default:e.withCtx(({active:k,disabled:S})=>[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.createElementVNode("button",{class:e.normalizeClass(s({active:k,disabled:S})),disabled:S,onClick:m=>u(y,m)},[e.renderSlot(d.$slots,"item",{item:y},()=>[e.createTextVNode(e.toDisplayString(y.title),1)])],10,Tn)])),[[e.unref(ae.directive),y.disabled&&y.disabledTooltip]])]),_:2},1032,["disabled"]))),128))]))),128))]),_:3},8,["class"])]),_:3})]),_:3}))}}),An={class:"flex flex-col space-y-4"},Fn={class:"flex space-x-6"},Rn=e.defineComponent({__name:"Tabs",props:{items:null},setup(t){const l=t,n=e.ref(null),o=e.computed(()=>n.value&&l.items.find(r=>r.id===n.value)||l.items[0]),a=r=>{n.value=r.id};return(r,i)=>(e.openBlock(),e.createElementBlock("div",An,[e.createElementVNode("div",Fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,c=>(e.openBlock(),e.createBlock(U,{key:c.id,link:"",color:o.value.id===c.id?"default":"secondary",onClick:s=>a(c)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.title),1)]),_:2},1032,["color","onClick"]))),128))]),e.renderSlot(r.$slots,"default",{activeItem:o.value})]))}}),Un={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},qn={class:"inline-flex items-center space-x-1"},Wn=e.createElementVNode("span",{class:"text-foreground-2"},"That's it, you've loaded everything!",-1),Hn={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},Gn={class:"inline-flex items-center space-x-1"},Kn=e.createElementVNode("span",{class:"text-foreground-2"},"An error occurred while loading",-1),Xn=e.defineComponent({__name:"InfiniteLoading",props:{settings:null,allowRetry:{type:Boolean}},emits:["infinite"],setup(t){const l=e.ref(null),n=e.ref(!1);return T.isClient&&e.onMounted(()=>{const o=setInterval(()=>{var a;(a=l.value)!=null&&a.isConnected&&(n.value=!0,clearInterval(o))},200)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:l},[n.value?(e.openBlock(),e.createBlock(e.unref(Ce),e.mergeProps({key:0},o.$props.settings||{},{onInfinite:a[0]||(a[0]=r=>o.$emit("infinite",r))}),{spinner:e.withCtx(()=>[e.createVNode(Y,{loading:!0,class:"my-2"})]),complete:e.withCtx(()=>[e.createElementVNode("div",Un,[e.createElementVNode("div",qn,[e.createVNode(e.unref(O.CheckIcon),{class:"w-5 h-5 text-success"}),Wn])])]),error:e.withCtx(({retry:r})=>[e.createElementVNode("div",Hn,[e.createElementVNode("div",Gn,[e.createVNode(e.unref(O.ExclamationTriangleIcon),{class:"w-5 h-5 text-danger"}),Kn]),t.allowRetry?(e.openBlock(),e.createBlock(U,{key:0,onClick:r},{default:e.withCtx(()=>[e.createTextVNode("Retry")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:1},16)):e.createCommentVNode("",!0)],512))}}),Jn={class:"relative group"},Qn={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"},Yn=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:l}){const n=t,o=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:px-6"),a=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:p-6"),r=e.computed(()=>{const i=["rounded-lg"];return n.noShadow||i.push("shadow"),n.ring&&i.push("ring-outline-2 hover:ring-2"),n.panelClasses&&i.push(n.panelClasses),i.join(" ")});return(i,c)=>(e.openBlock(),e.createElementBlock("div",Jn,[t.fancyGlow?(e.openBlock(),e.createElementBlock("div",Qn)):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",r.value]),onSubmit:c[0]||(c[0]=s=>l("submit",s))},{default:e.withCtx(()=>[i.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.value)},[e.renderSlot(i.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grow",a.value])},[e.renderSlot(i.$slots,"default")],2),i.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(o.value)},[e.renderSlot(i.$slots,"footer")],2)):e.createCommentVNode("",!0)]),_:3},40,["class"]))]))}}),Zn={class:"flex-shrink-0"},eo={key:0,class:"mt-2 text-sm"},to=e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),no=e.defineComponent({__name:"Alert",props:{color:{default:"success"},withDismiss:{type:Boolean},actions:null},emits:["dismiss"],setup(t){const l=t,n=e.useSlots(),o=e.computed(()=>!!n.description),a=e.computed(()=>{const s=[];switch(s.push(o.value?"p-4":"p-2"),l.color){case"success":s.push("bg-success-lighter border-l-4 border-success");break;case"info":s.push("bg-info-lighter border-l-4 border-info");break;case"danger":s.push("bg-danger-lighter border-l-4 border-danger");break;case"warning":s.push("bg-warning-lighter border-l-4 border-warning");break}return s.join(" ")}),r=e.computed(()=>{const s=[];switch(l.color){case"success":s.push("text-success-darker");break;case"info":s.push("text-info-darker");break;case"danger":s.push("text-danger-darker");break;case"warning":s.push("text-warning-darker");break}return s.join(" ")}),i=e.computed(()=>{const s=[];switch(l.color){case"success":s.push("text-success");break;case"info":s.push("text-info");break;case"danger":s.push("text-danger");break;case"warning":s.push("text-warning");break}return s.join(" ")}),c=e.computed(()=>{const s=[];switch(l.color){case"success":s.push("bg-success-lighter ring-success");break;case"info":s.push("bg-info-lighter ring-info");break;case"danger":s.push("bg-danger-lighter ring-danger");break;case"warning":s.push("bg-warning-lighter ring-warning");break}return s.join(" ")});return(s,u)=>{var p;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded-md",[a.value,r.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",[o.value?"":"items-center space-x-2"]])},[e.createElementVNode("div",Zn,[e.createVNode(e.unref(z.CheckCircleIcon),{class:e.normalizeClass(["h-5 w-5",i.value]),"aria-hidden":"true"},null,8,["class"])]),e.createElementVNode("div",{class:e.normalizeClass(["ml-3 grow",[o.value?"":"flex items-center space-x-2"]])},[e.createElementVNode("h3",{class:e.normalizeClass(["text-sm",[o.value?"font-medium":""]])},[e.renderSlot(s.$slots,"title",{},()=>[e.createTextVNode("Title")])],2),o.value?(e.openBlock(),e.createElementBlock("div",eo,[e.renderSlot(s.$slots,"description",{},()=>[e.createTextVNode(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([o.value?(p=t.actions)!=null&&p.length?"mt-4":"":"grow flex"])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",["space-x-2",o.value?"":"grow justify-end"]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions||[],(f,d)=>(e.openBlock(),e.createBlock(U,{key:d,color:t.color,size:"sm",to:f.url,external:f.externalUrl||!1,onClick:g=>f.onClick||e.unref(x.noop)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.title),1)]),_:2},1032,["color","to","external","onClick"]))),128))],2)],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",c.value]),onClick:u[0]||(u[0]=f=>s.$emit("dismiss"))},[to,e.createVNode(e.unref(z.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)],2)):e.createCommentVNode("",!0)],2)],2)}}});function oo(t){var b,C;const{get:l,initialState:n,readOptions:o,set:a,asyncRead:r=!0,debugging:i}=t,c=i==null?void 0:i.log,s=()=>(new Error("Trace:").stack||"").substring(7),u=((C=(b=t.debugging)==null?void 0:b.log)==null?void 0:C.logger)||console.debug,p=c&&!c.writesOnly?()=>{const h=l();return u(`debugging: '${c.name}' read`,h,s()),h}:l,f=c&&!c.readsOnly?h=>(u(`debugging: '${c.name}' written to`,h,s()),a(h)):a,d=r?T.computedAsync(p,n,o):e.computed(p),g=e.computed(()=>d.value);return g.update=f,g}exports.CommonAlert=no;exports.CommonBadge=ie;exports.CommonLoadingBar=Y;exports.CommonStepsBullet=gt;exports.CommonStepsNumber=nt;exports.CommonTextLink=re;exports.FormButton=U;exports.FormCardButton=yt;exports.FormCheckbox=Et;exports.FormSelectBase=fe;exports.FormSelectSourceApps=bn;exports.FormTextArea=Lt;exports.FormTextInput=Ft;exports.GlobalToastRenderer=je;exports.GridListToggleValue=j;exports.HorizontalDirection=H;exports.InfiniteLoading=Xn;exports.LayoutDialog=_n;exports.LayoutDisclosure=Pn;exports.LayoutGridListToggle=jn;exports.LayoutMenu=Mn;exports.LayoutPanel=Yn;exports.LayoutTabs=Rn;exports.ModifierKeys=F;exports.SourceAppBadge=pe;exports.TailwindBreakpoints=A;exports.ThrottleOrDebounce=he;exports.ToastNotificationType=M;exports.ValidationHelpers=Xt;exports.clientOs=W;exports.getKeyboardShortcutTitle=Cn;exports.onKeyboardShortcut=Bn;exports.useFormCheckboxModel=wn;exports.useFormSelectChildInternals=me;exports.useOnBeforeWindowUnload=On;exports.useResponsiveHorizontalDirectionCalculation=ve;exports.useWindowResizeHandler=ge;exports.useWrappingContainerHiddenCount=de;exports.writableAsyncComputed=oo;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("lodash"),_=require("@heroicons/vue/24/solid"),O=require("@heroicons/vue/24/outline"),$=require("@heroicons/vue/20/solid"),X=require("vee-validate"),J=require("nanoid"),R=require("@speckle/shared"),T=require("@vueuse/core"),E=require("@headlessui/vue"),se=require("vue-tippy"),Ce=require("v3-infinite-loading");const Be={key:2,style:{margin:"0 !important",width:"0.01px"}},we=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:l}){const n=t,o=e.resolveDynamicComponent("NuxtLink"),s=e.resolveDynamicComponent("RouterLink"),r=e.computed(()=>n.linkComponent?n.linkComponent:n.external?"a":C.isObjectLike(o)?o:C.isObjectLike(s)?s:"a"),i=e.computed(()=>{if(!n.to)return n.submit?"submit":"button"}),c=e.computed(()=>n.disabled||n.loading),g=e.computed(()=>n.loading?_.ArrowPathIcon:n.iconLeft),u=e.computed(()=>{const f=[];if(f.push("border-2"),c.value)f.push(n.outlined?"border-foreground-disabled":"bg-foundation-disabled border-transparent");else switch(n.color){case"invert":f.push(n.outlined?"border-foundation dark:border-foreground":"bg-foundation dark:bg-foreground border-transparent");break;case"card":f.push(n.outlined?"border-foundation-2 shadow":"bg-foundation-2 dark:bg-foundation-2 border-foundation shadow");break;case"danger":f.push(n.outlined?"border-danger":"bg-danger border-danger");break;case"secondary":f.push(n.outlined?"border-foundation":"bg-foundation border-foundation-2");break;case"warning":f.push(n.outlined?"border-warning":"bg-warning border-warning");break;case"info":f.push(n.outlined?"border-info":"bg-info border-info");break;case"success":f.push(n.outlined?"border-success":"bg-success border-success");break;case"default":default:f.push(n.outlined?"border-primary hover:border-primary-focus":"bg-primary hover:bg-primary-focus border-transparent");break}return f.join(" ")}),p=e.computed(()=>{const f=[];if(!n.text&&!n.link)if(c.value)f.push((n.outlined,"text-foreground-disabled"));else switch(n.color){case"invert":f.push(n.outlined?"text-foundation dark:text-foreground":"text-primary");break;case"card":f.push((n.outlined,"text-foreground"));break;case"danger":f.push(n.outlined?"text-danger":"text-foundation dark:text-foreground");break;case"warning":f.push(n.outlined?"text-warning":"text-foundation dark:text-foreground");break;case"info":f.push(n.outlined?"text-info":"text-foundation dark:text-foreground");break;case"success":f.push(n.outlined?"text-success":"text-foundation dark:text-foreground");break;case"secondary":f.push((n.outlined,"text-foreground hover:text-primary"));break;case"default":default:f.push(n.outlined?"text-primary hover:text-primary-focus":"text-foundation dark:text-foreground");break}else c.value?f.push("text-foreground-disabled"):n.color==="invert"?f.push("text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"):n.color==="secondary"?f.push("text-foreground-2 hover:text-primary-focus"):n.color==="success"?f.push("text-success"):n.color==="warning"?f.push("text-warning"):n.color==="info"?f.push("text-info"):n.color==="danger"?f.push("text-danger"):f.push("text-primary hover:text-primary-focus");return f.join(" ")}),h=e.computed(()=>{const f=[];return f.push(n.rounded?"rounded-full":"rounded-md"),f.join(" ")}),d=e.computed(()=>{const f=[];if(!c.value)switch(n.color){case"invert":f.push("hover:ring-4 ring-white/50");break;case"danger":f.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");break;case"warning":f.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");break;case"info":f.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");break;case"success":f.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");break;case"default":default:f.push("hover:ring-2");break}return f.join(" ")}),v=e.computed(()=>{switch(n.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-base font-medium xxx-tracking-wide"}}),a=e.computed(()=>{switch(n.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"}}),x=e.computed(()=>{const f=[];return n.fullWidth&&f.push("w-full"),c.value&&f.push("cursor-not-allowed"),f.join(" ")}),m=e.computed(()=>{const f=[];return!c.value&&!n.link&&!n.text&&f.push("active:scale-[0.97]"),!c.value&&n.link&&f.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),f.join(" ")}),y=e.computed(()=>{const f=n.link||n.text;return["transition inline-flex justify-center items-center space-x-2 outline-none select-none",x.value,v.value,p.value,f?"":u.value,f?"":h.value,f?"":d.value,n.link?"":a.value,m.value].join(" ")}),b=e.computed(()=>{const f=[""];switch(n.loading&&f.push("animate-spin"),n.size){case"xs":f.push("h-3 w-3");break;case"sm":f.push("h-4 w-4");break;case"lg":f.push("h-6 w-6");break;case"xl":f.push("h-8 w-8");break;case"base":default:f.push("h-5 w-5");break}return f.join(" ")}),S=f=>{if(c.value){f.preventDefault(),f.stopPropagation(),f.stopImmediatePropagation();return}l("click",f)};return(f,V)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?r.value:"button"),{href:t.to,to:t.to,type:i.value,external:t.external,class:e.normalizeClass(y.value),disabled:c.value,role:"button",onClick:S},{default:e.withCtx(()=>[g.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.value),{key:0,class:e.normalizeClass(`${b.value} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?(e.openBlock(),e.createElementBlock("div",Be,"   ")):e.renderSlot(f.$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(`${b.value} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const ae=(t,l)=>{const n=t.__vccOpts||t;for(const[o,s]of l)n[o]=s;return n},U=ae(we,[["__scopeId","data-v-38aa371e"]]),re=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:l}){const n=t,o=s=>{if(n.disabled){s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation();return}l("click",s)};return(s,r)=>(e.openBlock(),e.createBlock(U,{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:o},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var A=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(A||{});const Ve={"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"},Ee={class:"flex w-full flex-col items-center space-y-4 sm:items-end"},Se={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"},Ne={class:"p-4"},$e={class:"flex items-start"},Ie={class:"flex-shrink-0"},ze={class:"ml-2 w-0 flex-1 flex flex-col"},_e={key:0,class:"text-foreground font-bold"},De={key:1,class:"label label--light text-foreground-2"},Le={key:2,class:"flex justify-start mt-2"},Pe=e.createElementVNode("span",{class:"sr-only"},"Close",-1),je=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:l}){const n=t,o=e.computed(()=>{var i,c;return!((i=n.notification)!=null&&i.description)&&!((c=n.notification)!=null&&c.cta)}),s=()=>{l("update:notification",null)},r=i=>{var c,g,u;(u=(g=(c=n.notification)==null?void 0:c.cta)==null?void 0:g.onClick)==null||u.call(g,i),s()};return(i,c)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ee,[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",Se,[e.createElementVNode("div",Ne,[e.createElementVNode("div",$e,[e.createElementVNode("div",Ie,[t.notification.type===e.unref(A).Success?(e.openBlock(),e.createBlock(e.unref(O.CheckCircleIcon),{key:0,class:"h-6 w-6 text-success","aria-hidden":"true"})):t.notification.type===e.unref(A).Danger?(e.openBlock(),e.createBlock(e.unref(O.XCircleIcon),{key:1,class:"h-6 w-6 text-danger","aria-hidden":"true"})):t.notification.type===e.unref(A).Warning?(e.openBlock(),e.createBlock(e.unref(O.ExclamationCircleIcon),{key:2,class:"h-6 w-6 text-warning","aria-hidden":"true"})):t.notification.type===e.unref(A).Info?(e.openBlock(),e.createBlock(e.unref(O.InformationCircleIcon),{key:3,class:"h-6 w-6 text-info","aria-hidden":"true"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",ze,[t.notification.title?(e.openBlock(),e.createElementBlock("p",_e,e.toDisplayString(t.notification.title),1)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",De,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",Le,[e.createVNode(re,{to:t.notification.cta.url,class:"label",primary:"",onClick:r},{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":o.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:s},[Pe,e.createVNode(e.unref($.XMarkIcon),{class:"h-6 w-6","aria-hidden":"true"})])],2)])])])):e.createCommentVNode("",!0)]),_:1})])]))}}),Oe=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),Te=[Oe],ie=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:l}){const n=t,o=e.computed(()=>n.colorClasses||"bg-blue-100 text-blue-800"),s=e.computed(()=>n.dotIconColorClasses||"text-blue-400"),r=e.computed(()=>{const u=["inline-flex items-center",o.value,n.size==="lg"?"px-3 py-0.5 label":"px-2.5 py-0.5 caption font-medium"];return n.rounded?(u.push("rounded"),u.push(n.size==="lg"?"px-2 py-0.5 label":"px-2.5 py-0.5 caption font-medium")):(u.push("rounded-full"),u.push(n.size==="lg"?"px-2.5 py-0.5 label":"px-2.5 py-0.5 caption font-medium")),u.join(" ")}),i=e.computed(()=>{const u=["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 n.clickableIcon?u.push("cursor-pointer"):u.push("cursor-default"),u.join(" ")}),c=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",s.value].join(" ")),g=u=>{if(!n.clickableIcon){u.stopPropagation(),u.stopImmediatePropagation(),u.preventDefault();return}l("click-icon",u)};return(u,p)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(r.value)},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(c.value),fill:"currentColor",viewBox:"0 0 8 8"},Te,2)):e.createCommentVNode("",!0),e.renderSlot(u.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(i.value),onClick:p[0]||(p[0]=h=>g(h))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",s.value])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});let le=[];function Ae(t){le=le?t:t.slice()}var M=(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))(M||{});function ce(t){const{props:{modelValue:l,steps:n,orientation:o,goVerticalBelow:s,nonInteractive:r,stepsPadding:i},emit:c}=t,g=e.computed(()=>(o==null?void 0:o.value)==="vertical"?"vertical":"horizontal"),u=e.computed({get:()=>C.clamp((l==null?void 0:l.value)||0,-1,n.value.length),set:m=>c("update:modelValue",C.clamp(m,0,n.value.length))}),p=m=>`${m+1}`,h=m=>m===u.value,d=m=>m<u.value,v=(m,y)=>{var S;if(r!=null&&r.value){y==null||y.preventDefault(),y==null||y.stopPropagation(),y==null||y.stopImmediatePropagation();return}u.value=m;const b=n.value[u.value];(S=b==null?void 0:b.onClick)==null||S.call(b)},a=e.computed(()=>{const m=["flex"];let y,b;return(i==null?void 0:i.value)==="xs"?(y="space-x-2",b="space-y-1"):(i==null?void 0:i.value)==="sm"?(y="space-x-4",b="space-y-1"):(y="space-x-8",b="space-y-4"),m.push("flex"),g.value==="vertical"||s!=null&&s.value?(m.push(`flex-col ${b} justify-center`),(s==null?void 0:s.value)===M.sm?m.push(`sm:flex-row sm:space-y-0 sm:justify-start sm:${y} sm:items-center`):(s==null?void 0:s.value)===M.md?m.push(`md:flex-row md:space-y-0 md:justify-start md:${y} md:items-center`):(s==null?void 0:s.value)===M.lg?m.push(`lg:flex-row lg:space-y-0 lg:justify-start lg:${y} lg:items-center`):(s==null?void 0:s.value)===M.xl&&m.push(`xl:flex-row xl:space-y-0 xl:justify-start xl:${y} xl:items-center`)):m.push(`flex-row ${y} items-center`),m.join(" ")}),x=e.computed(()=>{const m=["flex items-center"];return r!=null&&r.value||m.push("cursor-pointer"),m.join(" ")});return{value:u,isCurrentStep:h,isFinishedStep:d,switchStep:v,getStepDisplayValue:p,listClasses:a,linkClasses:x,orientation:g}}Ae(["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 Me=["aria-label"],Fe=["href","onClick"],Re={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Ue={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},qe={class:"flex flex-col"},We={key:0,class:"label label--light text-foreground"},He=["href","onClick"],Ge={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Ke={class:"shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center"},Xe={class:"flex flex-col"},Je={key:0,class:"label label--light text-foreground"},Qe=["href","onClick"],Ye={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},Ze={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},et={class:"flex flex-col"},tt={key:0,class:"label label--light"},nt=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:l}){const n=t,{isCurrentStep:o,isFinishedStep:s,switchStep:r,getStepDisplayValue:i,listClasses:c,linkClasses:g}=ce({props:e.toRefs(n),emit:l});return(u,p)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(c))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(h,d)=>(e.openBlock(),e.createElementBlock("li",{key:h.name},[e.unref(s)(d)?(e.openBlock(),e.createElementBlock("a",{key:0,href:h.href,class:e.normalizeClass(e.unref(g)),onClick:v=>e.unref(r)(d,v)},[e.createElementVNode("div",Re,[e.createElementVNode("div",Ue,[e.createVNode(e.unref($.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",qe,[e.createElementVNode("div",null,e.toDisplayString(h.name),1),h.description?(e.openBlock(),e.createElementBlock("div",We,e.toDisplayString(h.description),1)):e.createCommentVNode("",!0)])])],10,Fe)):e.unref(o)(d)?(e.openBlock(),e.createElementBlock("a",{key:1,href:h.href,class:e.normalizeClass(e.unref(g)),"aria-current":"step",onClick:v=>e.unref(r)(d,v)},[e.createElementVNode("div",Ge,[e.createElementVNode("div",Ke,e.toDisplayString(e.unref(i)(d)),1),e.createElementVNode("div",Xe,[e.createElementVNode("div",null,e.toDisplayString(h.name),1),h.description?(e.openBlock(),e.createElementBlock("div",Je,e.toDisplayString(h.description),1)):e.createCommentVNode("",!0)])])],10,He)):(e.openBlock(),e.createElementBlock("a",{key:2,href:h.href,class:e.normalizeClass(e.unref(g)),onClick:v=>e.unref(r)(d,v)},[e.createElementVNode("div",Ye,[e.createElementVNode("div",Ze,e.toDisplayString(e.unref(i)(d)),1),e.createElementVNode("div",et,[e.createElementVNode("div",null,e.toDisplayString(h.name),1),h.description?(e.openBlock(),e.createElementBlock("div",tt,e.toDisplayString(h.description),1)):e.createCommentVNode("",!0)])])],10,Qe))]))),128))],2)],8,Me))}}),ot=["aria-label"],lt=["href","onClick"],st={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},at={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},rt=["href","onClick"],it={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},ct={key:0,class:"h-3 w-3 rounded-full bg-foreground"},ut=e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1),dt=e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1),ft=["href","onClick"],mt={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},pt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},ht={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},gt=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:l}){const n=t,{isCurrentStep:o,isFinishedStep:s,switchStep:r,listClasses:i,linkClasses:c}=ce({props:e.toRefs(n),emit:l}),g=e.computed(()=>{const p=["h6 font-medium leading-7"];let h;return n.stepsPadding==="xs"?h="ml-1":n.stepsPadding==="sm"?h="ml-2":h="ml-3",p.push(h),n.basic&&p.push("sr-only"),p.join(" ")}),u=e.computed(()=>{const p=[];return n.basic&&p.push("basic"),p.join(" ")});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(i),u.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(d,v)=>(e.openBlock(),e.createElementBlock("li",{key:d.name},[e.unref(s)(v)?(e.openBlock(),e.createElementBlock("a",{key:0,href:d.href,class:e.normalizeClass(e.unref(c)),onClick:a=>e.unref(r)(v,a)},[e.createElementVNode("span",st,[t.basic?(e.openBlock(),e.createElementBlock("span",at)):(e.openBlock(),e.createBlock(e.unref($.CheckCircleIcon),{key:1,class:"h-full w-full text-primary","aria-hidden":"true"}))]),e.createElementVNode("span",{class:e.normalizeClass(["text-foreground",g.value])},e.toDisplayString(d.name),3)],10,lt)):e.unref(o)(v)?(e.openBlock(),e.createElementBlock("a",{key:1,href:d.href,class:e.normalizeClass(e.unref(c)),"aria-current":"step",onClick:a=>e.unref(r)(v,a)},[e.createElementVNode("span",it,[t.basic?(e.openBlock(),e.createElementBlock("span",ct)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[ut,dt],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",g.value])},e.toDisplayString(d.name),3)],10,rt)):(e.openBlock(),e.createElementBlock("a",{key:2,href:d.href,class:e.normalizeClass(e.unref(c)),onClick:a=>e.unref(r)(v,a)},[e.createElementVNode("div",mt,[t.basic?(e.openBlock(),e.createElementBlock("span",pt)):(e.openBlock(),e.createElementBlock("div",ht))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",g.value])},e.toDisplayString(d.name),3)],10,ft))]))),128))],2)],8,ot))}}),vt=["disabled"],yt=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:l}){const n=t,o=e.computed(()=>{const r=["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 n.disabled?r.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed"):(r.push(n.modelValue?"bg-primary-focus text-foreground-on-primary":"bg-foundation text-foreground"),r.push("ring-outline-2 hover:ring-4")),r.join(" ")}),s=r=>{if(n.disabled){r.preventDefault(),r.stopPropagation(),r.stopImmediatePropagation();return}l("update:modelValue",!n.modelValue),l("click",r)};return(r,i)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(o.value),disabled:t.disabled,onClick:s},[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,vt))}}),kt={class:"relative flex items-start"},bt={class:"flex h-6 items-center"},xt=["id","checked","aria-describedby","name","disabled","value"],Ct={class:"ml-2 text-sm",style:{"padding-top":"2px"}},Bt=["for"],wt={key:0,class:"text-danger ml-1"},Vt=["id"],Et=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 l=t,n=m=>`${m}-${J.nanoid()}`,o=e.computed(()=>l.value||l.name),{checked:s,errorMessage:r,handleChange:i,value:c}=X.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,type:"checkbox",checkedValue:o,initialValue:l.modelValue||void 0}),g=e.computed(()=>l.label||l.name),u=e.computed(()=>r.value?"border-danger-lighter":"border-foreground-4 "),p=e.computed(()=>l.description||r.value),h=e.computed(()=>`${l.name}-description`),d=e.computed(()=>{const m=[];return l.inlineDescription?m.push("inline ml-2"):m.push("block"),r.value?m.push("text-danger"):m.push("text-foreground-2"),m.join(" ")}),v=e.ref(n("checkbox")),a=e.computed(()=>l.id||v.value),x=m=>{l.disabled||i(m)};return e.onMounted(()=>{const m=l.modelValue,y=c.value,b=Array.isArray(m)?m.includes(l.value):m===l.value,S=Array.isArray(y)?y.includes(l.value):y===l.value;b!==S&&i(m)}),(m,y)=>(e.openBlock(),e.createElementBlock("div",kt,[e.createElementVNode("div",bt,[e.createElementVNode("input",e.mergeProps({id:a.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]},m.$attrs,{onChange:x}),null,16,xt)]),e.createElementVNode("div",Ct,[e.createElementVNode("label",{for:a.value,class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(g.value),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",wt,"*")):e.createCommentVNode("",!0)],10,Bt),p.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:h.value,class:e.normalizeClass(d.value)},e.toDisplayString(p.value),11,Vt)):e.createCommentVNode("",!0)])]))}});function ue(t){const{props:l,inputEl:n,emit:o}=t,{value:s,errorMessage:r}=X.useField(l.name,l.rules,{validateOnMount:e.unref(l.validateOnMount),validateOnValueUpdate:e.unref(l.validateOnValueUpdate),initialValue:e.unref(l.modelValue)||void 0}),i=e.computed(()=>{const b=["block label text-foreground-2 mb-2"];return e.unref(l.showLabel)||b.push("sr-only"),b.join(" ")}),c=e.computed(()=>{const b=["block w-full rounded focus:outline-none text-foreground transition-all","disabled:cursor-not-allowed disabled:bg-foundation-disabled disabled:text-disabled-muted","placeholder:text-foreground-2"];return r.value?b.push("border-2 border-danger text-danger-darker focus:border-danger focus:ring-danger"):b.push("border-0 focus:ring-2 focus:ring-outline-2"),e.unref(l.color)==="foundation"?b.push("bg-foundation shadow-sm hover:shadow"):b.push("bg-foundation-page"),b.join(" ")}),g=e.ref(J.nanoid()),u=e.computed(()=>e.unref(l.label)||e.unref(l.name)),p=e.computed(()=>{const b=r.value;return!b||!e.unref(l.useLabelInErrors)?b:b.replace("Value",u.value)}),h=e.computed(()=>p.value&&e.unref(l.hideErrorMessage)),d=e.computed(()=>p.value||e.unref(l.help)),v=e.computed(()=>!!d.value),a=e.computed(()=>v.value?`${e.unref(l.name)}-${g.value}`:void 0),x=e.computed(()=>{const b=["mt-2 text-sm"];return b.push(r.value?"text-danger":"text-foreground-2"),b.join(" ")}),m=()=>{var b;(b=n.value)==null||b.focus()},y=()=>{s.value="",o("change",{value:""}),o("clear")};return e.onMounted(()=>{e.unref(l.autoFocus)&&m()}),{coreClasses:c,title:u,value:s,helpTipId:a,helpTipClasses:x,helpTip:d,hideHelpTip:h,errorMessage:p,clear:y,focus:m,labelClasses:i}}const St=["for"],Nt={class:"relative"},$t=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],It=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),zt={key:2,class:"pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"},_t=["id"],Dt=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"}},emits:["update:modelValue","change","input","clear"],setup(t,{expose:l,emit:n}){const o=t,s=e.ref(null),{coreClasses:r,title:i,value:c,helpTipId:g,helpTipClasses:u,helpTip:p,errorMessage:h,labelClasses:d,clear:v,focus:a}=ue({props:e.toRefs(o),emit:n,inputEl:s}),x=e.computed(()=>{const m=["pl-2"];return o.showClear&&h.value?m.push("pr-12"):(o.showClear||h.value)&&m.push("pr-8"),m.join(" ")});return l({focus:a}),(m,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":""])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(d))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(i)),1)],10,St),e.createElementVNode("div",Nt,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:s,"onUpdate:modelValue":y[0]||(y[0]=b=>e.isRef(c)?c.value=b:null),name:t.name,class:[e.unref(r),x.value,"min-h-[4rem]"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(h)?"true":"false","aria-describedby":e.unref(g)},m.$attrs,{onChange:y[1]||(y[1]=b=>m.$emit("change",{event:b,value:e.unref(c)})),onInput:y[2]||(y[2]=b=>m.$emit("input",{event:b,value:e.unref(c)}))}),null,16,$t),[[e.vModelText,e.unref(c)]]),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:y[3]||(y[3]=(...b)=>e.unref(v)&&e.unref(v)(...b)),onKeydown:y[4]||(y[4]=(...b)=>e.unref(v)&&e.unref(v)(...b))},[It,e.createVNode(e.unref($.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(h)?(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($.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(h)?(e.openBlock(),e.createElementBlock("div",zt," * ")):e.createCommentVNode("",!0)]),e.unref(g)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(g),class:e.normalizeClass(e.unref(u))},e.toDisplayString(e.unref(p)),11,_t)):e.createCommentVNode("",!0)],2))}}),Lt=["for"],Pt={class:"relative"},jt={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},Ot=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],Tt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),At={key:2,class:"pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"},Mt=["id"],Ft=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","focusin","focusout"],setup(t,{expose:l,emit:n}){const o=t,s=e.useSlots(),r=e.ref(null),{coreClasses:i,title:c,value:g,helpTipId:u,helpTipClasses:p,helpTip:h,hideHelpTip:d,errorMessage:v,clear:a,focus:x,labelClasses:m}=ue({props:e.toRefs(o),emit:n,inputEl:r}),y=e.computed(()=>{const V=["h-5 w-5"];return v.value?V.push("text-danger"):V.push("text-foreground-2"),V.join(" ")}),b=e.computed(()=>["email","password"].includes(o.type)||o.customIcon),S=e.computed(()=>{const V=[];return b.value?V.push("pl-8"):V.push("pl-2"),s["input-right"]||(v.value||o.showClear)&&(v.value&&o.showClear?V.push("pr-12"):V.push("pr-8")),V.join(" ")}),f=e.computed(()=>{switch(o.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}});return l({focus:x}),(V,I)=>(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(m))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(c)),1)],10,Lt),e.createElementVNode("div",Pt,[b.value?(e.openBlock(),e.createElementBlock("div",jt,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref($.EnvelopeIcon),{key:1,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref($.KeyIcon),{key:2,class:e.normalizeClass(y.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:r,"onUpdate:modelValue":I[0]||(I[0]=N=>e.isRef(g)?g.value=N:null),type:t.type,name:t.name,class:[e.unref(i),S.value,f.value,t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(v)?"true":"false","aria-describedby":e.unref(u),role:"textbox"},V.$attrs,{onChange:I[1]||(I[1]=N=>V.$emit("change",{event:N,value:e.unref(g)})),onInput:I[2]||(I[2]=N=>V.$emit("input",{event:N,value:e.unref(g)}))}),null,16,Ot),[[e.vModelDynamic,e.unref(g)]]),e.renderSlot(V.$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:I[3]||(I[3]=(...N)=>e.unref(a)&&e.unref(a)(...N)),onKeydown:I[4]||(I[4]=(...N)=>e.unref(a)&&e.unref(a)(...N))},[Tt,e.createVNode(e.unref($.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(v)?(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($.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(v)?(e.openBlock(),e.createElementBlock("div",At," * ")):e.createCommentVNode("",!0)])]),e.unref(u)&&!e.unref(d)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(u),class:e.normalizeClass(e.unref(p))},e.toDisplayString(e.unref(h)),11,Mt)):e.createCommentVNode("",!0)],2))}}),Rt=/^https?:\/\//,Q=/^[\w-_.+]+@[\w-_.+]+$/,Ut=t=>(t||"").match(Q)?!0:"Value should be a valid e-mail address",qt=t=>(t||"").split(",").map(o=>o.trim()).every(o=>o.match(Q))||"Value should be one or multiple comma-delimited e-mail addresses",Wt=t=>(C.isString(t)&&(t=t.trim()),t?!0:"Value is required"),Ht=(t,l)=>(n,o)=>n===o.form[t]?!0:`Value must be the same as in field '${l||t}'`,Gt=t=>l=>{const{minLength:n,maxLength:o}=t;return l=R.isNullOrUndefined(l)?"":l,C.isString(l)?!C.isUndefined(n)&&l.length<n?`Value needs to be at least ${n} characters long`:!C.isUndefined(o)&&l.length>o?`Value needs to be no more than ${o} characters long`:!0:"Value should be a text string"},Kt=t=>l=>{const{match:n,message:o}=t;return C.isString(l)?n?C.isString(n)?l.includes(n)?!0:o:n.test(l)?!0:o:!0:"Value should be a text string"},Xt=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:Q,VALID_HTTP_URL:Rt,isEmail:Ut,isOneOrMultipleEmails:qt,isRequired:Wt,isSameAs:Ht,isStringOfLength:Gt,stringContains:Kt},Symbol.toStringTag,{value:"Module"}));function de(t){const{skipCalculation:l,elementToWatchForChanges:n,itemContainer:o,trackResize:s=!1,trackMutations:r=!0}=t||{},i=e.ref(0),c=()=>{const g=o.value;if(l!=null&&l.value||!g)return;const u=g.children;let p=0,h=0,d;for(const v of u){const a=v.offsetTop;C.isUndefined(d)?(d=a,p+=1):a===d&&(p+=1),h+=1}i.value=h-p};return s&&T.useResizeObserver(n,c),r&&T.useMutationObserver(n,c,{childList:!0,subtree:!0}),{hiddenItemCount:i}}function fe(t){const{props:l,emit:n,dynamicVisibility:o}=t;let s;if(o){const{elementToWatchForChanges:u,itemContainer:p}=o;s=de({skipCalculation:e.computed(()=>{var d;return!((d=l.multiple)!=null&&d.value)}),elementToWatchForChanges:u,itemContainer:p}).hiddenItemCount}else s=e.ref(0);const r=e.computed({get:()=>{var p,h;const u=(p=l.modelValue)==null?void 0:p.value;return(h=l.multiple)!=null&&h.value?C.isArray(u)?u:[]:C.isArray(u)?void 0:u},set:u=>{var p,h,d;if((p=l.multiple)!=null&&p.value&&!C.isArray(u)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((h=l.multiple)!=null&&h.value)&&C.isArray(u)){console.warn("Attempting to set array value in selector w/ multiple=false");return}n("update:modelValue",(d=l.multiple)!=null&&d.value?u||[]:u)}}),i=u=>C.isArray(u);return{selectedValue:r,hiddenSelectedItemCount:s,isArrayValue:i,isMultiItemArrayValue:u=>C.isArray(u)&&u.length>1,firstItem:u=>i(u)?u[0]:u}}const Jt=t=>(e.pushScopeId("data-v-60cf597b"),t=t(),e.popScopeId(),t),Qt=Jt(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),Yt=[Qt],Zt=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(l,n)=>(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"])},Yt,2))}});const Y=ae(Zt,[["__scopeId","data-v-60cf597b"]]),en={class:"flex items-center justify-between w-full"},tn={class:"block truncate grow text-left"},nn={class:"pointer-events-none shrink-0 ml-1 flex items-center"},on=["disabled"],ln={key:0,class:"flex flex-col mx-1 mb-1"},sn=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),an={class:"relative"},rn={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},cn=["placeholder"],un={key:0,class:"px-1"},dn={key:1},fn=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷‍♂️",-1),mn={class:e.normalizeClass(["block truncate"])},pn=["id"],me=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},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}},emits:["update:modelValue"],setup(t,{expose:l,emit:n}){const o=t,{value:s,errorMessage:r}=X.useField(o.name,o.rules,{validateOnMount:o.validateOnMount,validateOnValueUpdate:o.validateOnValueUpdate,initialValue:o.modelValue}),i=e.ref(null),c=e.ref(""),g=e.ref([]),u=e.ref(!1),p=e.ref(1),h=e.ref(J.nanoid()),d=e.computed(()=>e.unref(o.label)||e.unref(o.name)),v=e.computed(()=>{const k=r.value;return!k||!e.unref(o.useLabelInErrors)?k:k.replace("Value",d.value)}),a=e.computed(()=>v.value||e.unref(o.help)),x=e.computed(()=>!!a.value),m=e.computed(()=>x.value?`${e.unref(o.name)}-${h.value}`:void 0),y=e.computed(()=>r.value?"text-danger":"text-foreground-2"),b=e.computed(()=>o.buttonStyle!=="simple"&&o.clearable&&!o.disabled),S=e.computed(()=>{const k=["relative flex group"];return o.buttonStyle!=="simple"&&(k.push("hover:shadow rounded-md"),k.push("outline outline-2 outline-primary-muted")),o.fixedHeight&&k.push("h-8"),k.join(" ")}),f=e.computed(()=>{const k=[];return o.buttonStyle!=="simple"&&k.push(q.value?"bg-foundation-disabled text-foreground-disabled":""),q.value&&k.push("cursor-not-allowed"),k.join(" ")}),V=e.computed(()=>{const k=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all","text-foreground",Z.value?`w-6 ${f.value}`:"w-0"];return q.value||(k.push("hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"),o.buttonStyle==="tinted"?k.push("bg-outline-3"):k.push("bg-primary-muted")),k.join(" ")}),I=e.computed(()=>{const k=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",f.value];return o.buttonStyle!=="simple"&&(k.push("py-2 px-3"),q.value||(o.buttonStyle==="tinted"?k.push("bg-foundation-page text-foreground"):k.push("bg-foundation text-foreground"))),b.value&&Z.value&&k.push("rounded-r-none"),k.join(" ")}),N=e.computed(()=>!!(o.search&&(o.filterPredicate||o.getSearchResults))),L=e.computed(()=>N.value&&o.getSearchResults),q=e.computed(()=>o.disabled||!o.items.length&&!L.value),z=e.computed({get:()=>{const k=s.value;return o.multiple?C.isArray(k)?k:[]:C.isArray(k)?void 0:k},set:k=>{if(o.multiple&&!C.isArray(k)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!o.multiple&&C.isArray(k)){console.warn("Attempting to set array value in selector w/ multiple=false");return}let w;if(o.multiple)w=k||[];else{const B=s.value;w=o.allowUnset&&B&&k&&G(B)===G(k)?void 0:k}o.fullyControlValue?n("update:modelValue",w):s.value=w,p.value+=1}}),Z=e.computed(()=>o.multiple?z.value.length!==0:!!z.value),ye=()=>{o.multiple?z.value=[]:z.value=void 0},ke=e.computed(()=>{const k=c.value;return!N.value||!(k!=null&&k.length)?g.value:o.filterPredicate?g.value.filter(w=>{var B;return((B=o.filterPredicate)==null?void 0:B.call(o,w,k))||!1}):g.value}),ee=k=>JSON.stringify(k),G=k=>o.by?k[o.by]:k,K=async()=>{if(!(!L.value||!o.getSearchResults)){u.value=!0;try{g.value=await o.getSearchResults(c.value)}finally{u.value=!1}}},be=C.debounce(K,1e3),xe=k=>{const{active:w,disabled:B}=k||{},{hideCheckmarks:D}=o,P=["relative transition cursor-pointer select-none py-1.5 pl-3",D?"":"pr-9"];return B?P.push("opacity-50 cursor-not-allowed"):P.push(w?"text-primary":"text-foreground"),P.join(" ")};return e.watch(()=>o.items,k=>{g.value=k.slice()},{immediate:!0}),e.watch(c,()=>{L.value&&be()}),e.onMounted(()=>{L.value&&!o.items.length&&K()}),l({triggerSearch:K}),(k,w)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.unref(E.Listbox),{key:p.value,modelValue:z.value,"onUpdate:modelValue":w[4]||(w[4]=B=>z.value=B),name:t.name,multiple:t.multiple,by:t.by,disabled:q.value,as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.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(S.value)},[e.createVNode(e.unref(E.ListboxButton),{class:e.normalizeClass(I.value)},{default:e.withCtx(({open:B})=>[e.createElementVNode("div",en,[e.createElementVNode("div",tn,[!z.value||e.unref(C.isArray)(z.value)&&!z.value.length?e.renderSlot(k.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.label),1)]):e.renderSlot(k.$slots,"something-selected",{key:1,value:z.value},()=>[e.createTextVNode(e.toDisplayString(ee(z.value)),1)])]),e.createElementVNode("div",nn,[B?(e.openBlock(),e.createBlock(e.unref(_.ChevronUpIcon),{key:0,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref(_.ChevronDownIcon),{key:1,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),b.value?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(V.value),disabled:t.disabled,onClick:w[0]||(w[0]=B=>ye())},[e.createVNode(e.unref(_.XMarkIcon),{class:"w-3 h-3"})],10,on)),[[e.unref(se.directive),"Clear"]]):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.ListboxOptions),{class:"absolute top-[100%] z-10 mt-1 w-full rounded-md bg-foundation-2 py-1 label label--light outline outline-2 outline-primary-muted focus:outline-none shadow",onFocus:w[3]||(w[3]=B=>{var D;return(D=i.value)==null?void 0:D.focus()})},{default:e.withCtx(()=>[N.value?(e.openBlock(),e.createElementBlock("label",ln,[sn,e.createElementVNode("div",an,[e.createElementVNode("div",rn,[e.createVNode(e.unref(_.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:i,"onUpdate:modelValue":w[1]||(w[1]=B=>c.value=B),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:w[2]||(w[2]=e.withModifiers(()=>{},["stop"]))},null,40,cn),[[e.vModelText,c.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[N.value?"max-h-52":"max-h-60"]])},[L.value&&u.value?(e.openBlock(),e.createElementBlock("div",un,[e.createVNode(Y,{loading:!0})])):L.value&&!g.value.length?(e.openBlock(),e.createElementBlock("div",dn,[e.renderSlot(k.$slots,"nothing-found",{},()=>[fn])])):e.createCommentVNode("",!0),!L.value||!u.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(ke.value,B=>{var D;return e.openBlock(),e.createBlock(e.unref(E.ListboxOption),{key:G(B),value:B,disabled:((D=t.disabledItemPredicate)==null?void 0:D.call(t,B))||!1},{default:e.withCtx(({active:P,selected:te})=>{var ne,oe;return[e.createElementVNode("li",{class:e.normalizeClass(xe({active:P,disabled:((ne=t.disabledItemPredicate)==null?void 0:ne.call(t,B))||!1}))},[e.createElementVNode("span",mn,[e.renderSlot(k.$slots,"option",{item:B,active:P,selected:te,disabled:((oe=t.disabledItemPredicate)==null?void 0:oe.call(t,B))||!1},()=>[e.createTextVNode(e.toDisplayString(ee(B)),1)])]),!t.hideCheckmarks&&te?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([P?"text-primary":"text-foreground","absolute inset-y-0 right-0 flex items-center pr-4"])},[e.createVNode(e.unref(_.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]}),_:2},1032,["value","disabled"])}),128)):e.createCommentVNode("",!0)],2)]),_:3})]),_:3})],2)]),_:3},8,["modelValue","name","multiple","by","disabled"])),m.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:m.value,class:e.normalizeClass(["mt-2 text-sm",y.value])},e.toDisplayString(a.value),11,pn)):e.createCommentVNode("",!0)]))}}),pe=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(l,n)=>(e.openBlock(),e.createBlock(ie,{"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"]))}}),hn={key:0,class:"text-foreground-2 normal"},gn={key:1,class:"flex items-center"},vn={class:"truncate"},yn={class:"flex items-center"},kn={class:"truncate"},bn=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}},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,o=e.ref(null),s=e.ref(null),{selectedValue:r,hiddenSelectedItemCount:i,isMultiItemArrayValue:c,firstItem:g}=fe({props:e.toRefs(n),emit:l,dynamicVisibility:{elementToWatchForChanges:o,itemContainer:s}}),u=(p,h)=>p.name.toLocaleLowerCase().includes(h.toLocaleLowerCase());return(p,h)=>(e.openBlock(),e.createBlock(me,{modelValue:e.unref(r),"onUpdate:modelValue":h[0]||(h[0]=d=>e.isRef(r)?r.value=d:null),multiple:t.multiple,items:t.items??e.unref(R.SourceApps),search:t.search,"search-placeholder":t.searchPlaceholder,label:t.label,"show-label":t.showLabel,name:t.name||"sourceApps","filter-predicate":u,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:d})=>[e.unref(c)(d)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"elementToWatchForChanges",ref:o,class:"flex items-center space-x-0.5 h-5"},[e.createElementVNode("div",{ref_key:"itemContainer",ref:s,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d,v=>(e.openBlock(),e.createBlock(pe,{key:v.name,"source-app":v},null,8,["source-app"]))),128))],512),e.unref(i)>0?(e.openBlock(),e.createElementBlock("div",hn," +"+e.toDisplayString(e.unref(i)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",gn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(g)(d).bgColor})},null,4),e.createElementVNode("span",vn,e.toDisplayString(e.unref(g)(d).name),1)]))]),option:e.withCtx(({item:d})=>[e.createElementVNode("div",yn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:d.bgColor})},null,4),e.createElementVNode("span",kn,e.toDisplayString(d.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name"]))}});var F=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(F||{});const W=R.getClientOperatingSystem(),xn={["cmd-or-ctrl"]:W===R.OperatingSystem.Mac?"Cmd":"Ctrl",["alt-or-opt"]:W===R.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function Cn(t){const l=n=>Object.values(F).includes(n);return t.map(n=>l(n)?xn[n]:n).join("+")}function Bn(t,...l){T.onKeyDown(l[0],n=>{const o=n.getModifierState("Alt"),s=W===R.OperatingSystem.Mac?n.getModifierState("Meta"):n.getModifierState("Control"),r=n.getModifierState("Shift");for(const i of t)switch(i){case F.CtrlOrCmd:if(!s)return;break;case F.AltOrOpt:if(!o)return;break;case F.Shift:if(!r)return;break}l[1](n)},l[2])}function wn(t){const l=(t==null?void 0:t.model)||e.ref(),n=e.computed({get:()=>!!l.value,set:o=>l.value=o?!0:void 0});return{model:l,isChecked:n}}const Vn=e.createElementVNode("div",{class:"fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity"},null,-1),En={class:"fixed inset-0 z-10 overflow-y-auto"},Sn={class:"flex min-h-full justify-center p-4 text-center items-center sm:p-0"},Nn={key:0,class:"flex items-center justify-center shadow p-4 relative z-10 bg-foundation rounded-t-lg"},$n={class:"text-2xl font-bold"},In={class:"p-4 sm:p-6"},zn={key:2,class:"flex p-4 sm:px-6 sm:py-5 border-t gap-2 border-outline-3"},_n=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:l}){const n=t,o=e.useSlots(),s=e.computed(()=>!!n.onSubmit),r=e.computed(()=>n.buttons||o.buttons),i=e.computed({get:()=>n.open,set:p=>l("update:open",p)}),c=e.computed(()=>{switch(n.maxWidth){case"sm":return 0;case"md":return 1;case"lg":return 2;case"xl":return 3;default:return 1e4}}),g=e.computed(()=>{const p=["w-full","sm:my-8 sm:w-full sm:max-w-xl"];return!n.title&&!r.value&&p.push("px-4 pt-4 pb-4","sm:p-6"),c.value>=1&&p.push("md:max-w-2xl"),c.value>=2&&p.push("lg:max-w-4xl"),c.value>=3&&p.push("xl:max-w-6xl"),c.value>=4&&p.push("2xl:max-w-7xl"),p.join(" ")}),u=()=>{n.preventCloseOnClickOutside||(i.value=!1)};return(p,h)=>(e.openBlock(),e.createBlock(e.unref(E.TransitionRoot),{as:"template",show:i.value},{default:e.withCtx(()=>[e.createVNode(e.unref(E.Dialog),{as:"div",class:"relative z-40",onClose:u},{default:e.withCtx(()=>[e.createVNode(e.unref(E.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(()=>[Vn]),_:1}),e.createElementVNode("div",En,[e.createElementVNode("div",Sn,[e.createVNode(e.unref(E.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:h[1]||(h[1]=d=>p.$emit("fully-closed"))},{default:e.withCtx(()=>[e.createVNode(e.unref(E.DialogPanel),{class:e.normalizeClass(["transform rounded-lg bg-foundation text-left shadow-xl transition-all",g.value]),as:s.value?"form":"div",onSubmit:e.withModifiers(t.onSubmit,["prevent"])},{default:e.withCtx(()=>[t.title?(e.openBlock(),e.createElementBlock("div",Nn,[e.createElementVNode("h4",$n,e.toDisplayString(t.title),1)])):e.createCommentVNode("",!0),t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,class:"absolute z-20 top-5 right-4 text-foreground",onClick:h[0]||(h[0]=d=>i.value=!1)},[e.createVNode(e.unref(O.XMarkIcon),{class:"h-6 w-6"})])),e.createElementVNode("div",In,[e.renderSlot(p.$slots,"default",{},()=>[e.createTextVNode("Put your content here!")])]),r.value?(e.openBlock(),e.createElementBlock("div",zn,[t.buttons?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.buttons,(d,v)=>(e.openBlock(),e.createBlock(e.unref(U),e.mergeProps({key:v},d.props,{onClick:d.onClick}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.text),1)]),_:2},1040,["onClick"]))),128)):e.renderSlot(p.$slots,"buttons",{key:1})])):e.createCommentVNode("",!0)]),_:3},8,["class","as","onSubmit"])]),_:3})])])]),_:3})]),_:3},8,["show"]))}}),Dn={class:"inline-flex items-center space-x-2"},Ln={class:"label-light"},Pn=e.defineComponent({__name:"Disclosure",props:{title:null,icon:null,color:{default:"default"}},setup(t){const l=t,n=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(l.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=["mt-4 px-3 py-1 border-x "];switch(l.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,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(E.Disclosure),null,{default:e.withCtx(({open:i})=>[e.createVNode(e.unref(E.DisclosureButton),{class:e.normalizeClass(n.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Dn,[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"h-4 w-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.title),1)]),e.createVNode(e.unref(_.ChevronUpIcon),{class:e.normalizeClass([i?"":"rotate-180 transform","h-5 w-5"])},null,8,["class"])]),_:2},1032,["class"]),e.createVNode(e.unref(E.DisclosurePanel),{class:e.normalizeClass(o.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Ln,[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])])]),_:3},8,["class"])]),_:3})]))}});var j=(t=>(t.Grid="grid",t.List="list",t))(j||{});const jn=e.defineComponent({__name:"GridListToggle",props:{modelValue:null},emits:["click","update:modelValue"],setup(t,{emit:l}){const n=t,o=e.computed({get:()=>n.modelValue||j.Grid,set:i=>l("update:modelValue",i)}),s=e.computed(()=>o.value===j.Grid?_.Bars3Icon:_.Squares2X2Icon),r=i=>{l("click",i);const c=o.value===j.Grid?j.List:j.Grid;o.value=c};return(i,c)=>(e.openBlock(),e.createElementBlock("button",{class:"flex items-center justify-center rounded bg-foundation h-8 w-8 shadow cursor-pointer text-foreground",onClick:r},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{class:"h-6 w-6"}))]))}});var he=(t=>(t[t.Throttle=0]="Throttle",t[t.Debounce=1]="Debounce",t))(he||{}),H=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(H||{});function ge(t,l){if(!T.isClient)return;const{wait:n=100,throttleOrDebounce:o=0}=l||{},s=n?o===0?C.throttle(t,n):C.debounce(t,n):t;e.onMounted(()=>window.addEventListener("resize",s)),e.onBeforeUnmount(()=>window.removeEventListener("resize",s))}function On(t){e.onMounted(()=>{window.addEventListener("beforeunload",t)}),e.onBeforeUnmount(()=>{window.removeEventListener("beforeunload",t)})}function ve(t){const{el:l,defaultDirection:n}=t,o=e.ref(C.isUndefined(n)?1:n),s=e.computed(()=>{const i=e.unref(t.stopUpdatesBelowWidth);if(!C.isUndefined(i))return i;const c=e.unref(l);return c!=null&&c.offsetWidth?c.offsetWidth*2:void 0}),r=()=>{if(!T.isClient)return;const i=e.unref(l);if(!i)return;const c=i.getBoundingClientRect(),g=c.x+c.width>window.innerWidth,u=c.x<0;g&&u||!C.isUndefined(s.value)&&window.innerWidth<s.value||(g?o.value=0:u&&(o.value=1))};return ge(()=>r()),e.watch(()=>e.unref(l),i=>{i&&r()}),{direction:e.computed(()=>o.value),recalculateDirection:r}}const Tn=["disabled","onClick"],An=e.defineComponent({__name:"Menu",props:{open:{type:Boolean},items:null},emits:["update:open","chosen"],setup(t,{emit:l}){const n=t,o=e.ref(null),{direction:s}=ve({el:e.computed(()=>{var d;return((d=o.value)==null?void 0:d.el)||null}),defaultDirection:H.Left,stopUpdatesBelowWidth:300}),r=e.ref(null),i=e.ref(!1),c=e.computed({get:()=>n.open||!1,set:d=>l("update:open",d)}),g=d=>{const{active:v,disabled:a}=d,x=["group flex w-full items-center rounded-md px-2 py-2 text-sm"];return v?x.push("bg-primary text-foreground-on-primary"):a?x.push("text-foreground-disabled"):x.push("text-foreground"),x.join(" ")},u=(d,v)=>{l("chosen",{item:d,event:v})},p=()=>{var d;return(d=r.value)==null?void 0:d.el.click()},h=d=>{const v=!!d;return i.value=v,v};return e.watch(i,(d,v)=>{d!==v&&(c.value=d)}),e.watch(c,d=>{(d&&!i.value||!d&&i.value)&&p()}),(d,v)=>(e.openBlock(),e.createBlock(e.unref(E.Menu),{as:"div",class:"relative inline-block"},{default:e.withCtx(({open:a})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(E.MenuButton),{ref_key:"menuButton",ref:r,class:"hidden",onClick:v[0]||(v[0]=e.withModifiers(()=>{},["stop","prevent"]))},null,512),e.createElementVNode("div",{class:e.normalizeClass(a?"pointer-events-none":"")},[e.renderSlot(d.$slots,"default",{toggle:p,open:h(a)})],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(E.MenuItems),{ref_key:"menuItems",ref:o,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(s)===e.unref(H).Left?"right-0":""])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(x,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"px-1 py-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x,y=>(e.openBlock(),e.createBlock(e.unref(E.MenuItem),{key:y.id,disabled:y.disabled},{default:e.withCtx(({active:b,disabled:S})=>[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.createElementVNode("button",{class:e.normalizeClass(g({active:b,disabled:S})),disabled:S,onClick:f=>u(y,f)},[e.renderSlot(d.$slots,"item",{item:y},()=>[e.createTextVNode(e.toDisplayString(y.title),1)])],10,Tn)])),[[e.unref(se.directive),y.disabled&&y.disabledTooltip]])]),_:2},1032,["disabled"]))),128))]))),128))]),_:3},8,["class"])]),_:3})]),_:3}))}}),Mn={class:"flex flex-col space-y-4"},Fn={class:"flex space-x-6"},Rn=e.defineComponent({__name:"Tabs",props:{items:null},setup(t){const l=t,n=e.ref(null),o=e.computed(()=>n.value&&l.items.find(r=>r.id===n.value)||l.items[0]),s=r=>{n.value=r.id};return(r,i)=>(e.openBlock(),e.createElementBlock("div",Mn,[e.createElementVNode("div",Fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,c=>(e.openBlock(),e.createBlock(U,{key:c.id,link:"",color:o.value.id===c.id?"default":"secondary",onClick:g=>s(c)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.title),1)]),_:2},1032,["color","onClick"]))),128))]),e.renderSlot(r.$slots,"default",{activeItem:o.value})]))}}),Un={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},qn={class:"inline-flex items-center space-x-1"},Wn=e.createElementVNode("span",{class:"text-foreground-2"},"That's it, you've loaded everything!",-1),Hn={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},Gn={class:"inline-flex items-center space-x-1"},Kn=e.createElementVNode("span",{class:"text-foreground-2"},"An error occurred while loading",-1),Xn=e.defineComponent({__name:"InfiniteLoading",props:{settings:null,allowRetry:{type:Boolean}},emits:["infinite"],setup(t){const l=e.ref(null),n=e.ref(!1);return T.isClient&&e.onMounted(()=>{const o=setInterval(()=>{var s;(s=l.value)!=null&&s.isConnected&&(n.value=!0,clearInterval(o))},200)}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:l},[n.value?(e.openBlock(),e.createBlock(e.unref(Ce),e.mergeProps({key:0},o.$props.settings||{},{onInfinite:s[0]||(s[0]=r=>o.$emit("infinite",r))}),{spinner:e.withCtx(()=>[e.createVNode(Y,{loading:!0,class:"my-2"})]),complete:e.withCtx(()=>[e.createElementVNode("div",Un,[e.createElementVNode("div",qn,[e.createVNode(e.unref(O.CheckIcon),{class:"w-5 h-5 text-success"}),Wn])])]),error:e.withCtx(({retry:r})=>[e.createElementVNode("div",Hn,[e.createElementVNode("div",Gn,[e.createVNode(e.unref(O.ExclamationTriangleIcon),{class:"w-5 h-5 text-danger"}),Kn]),t.allowRetry?(e.openBlock(),e.createBlock(U,{key:0,onClick:r},{default:e.withCtx(()=>[e.createTextVNode("Retry")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:1},16)):e.createCommentVNode("",!0)],512))}}),Jn={class:"relative group"},Qn={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"},Yn=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:l}){const n=t,o=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:px-6"),s=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:p-6"),r=e.computed(()=>{const i=["rounded-lg"];return n.noShadow||i.push("shadow"),n.ring&&i.push("ring-outline-2 hover:ring-2"),n.panelClasses&&i.push(n.panelClasses),i.join(" ")});return(i,c)=>(e.openBlock(),e.createElementBlock("div",Jn,[t.fancyGlow?(e.openBlock(),e.createElementBlock("div",Qn)):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",r.value]),onSubmit:c[0]||(c[0]=g=>l("submit",g))},{default:e.withCtx(()=>[i.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.value)},[e.renderSlot(i.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grow",s.value])},[e.renderSlot(i.$slots,"default")],2),i.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(o.value)},[e.renderSlot(i.$slots,"footer")],2)):e.createCommentVNode("",!0)]),_:3},40,["class"]))]))}}),Zn={class:"flex-shrink-0"},eo=e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),to=e.defineComponent({__name:"Alert",props:{color:{default:"success"},withDismiss:{type:Boolean},actions:null,customIcon:null,size:{default:"default"}},emits:["dismiss"],setup(t){const l=t,n=e.useSlots(),o=e.computed(()=>!!n.description),s=e.computed(()=>{if(l.customIcon)return l.customIcon;switch(l.color){case"info":return $.InformationCircleIcon;case"warning":return $.ExclamationCircleIcon;case"danger":return $.XCircleIcon;case"success":default:return $.CheckCircleIcon}}),r=e.computed(()=>{const a=[];switch(l.size){case"xs":a.push("p-1");break;case"default":default:a.push(o.value?"p-4":"p-2");break}switch(l.color){case"success":a.push("bg-success-lighter border-l-4 border-success");break;case"info":a.push("bg-info-lighter border-l-4 border-info");break;case"danger":a.push("bg-danger-lighter border-l-4 border-danger");break;case"warning":a.push("bg-warning-lighter border-l-4 border-warning");break}return a.join(" ")}),i=e.computed(()=>{const a=[];if(o.value)a.push("");else switch(a.push("items-center"),l.size){case"xs":a.push("space-x-1");break;case"default":default:a.push("space-x-2");break}return a.join(" ")}),c=e.computed(()=>{const a=["grow"];switch(o.value||a.push("flex items-center space-x-2"),l.size){case"xs":a.push("ml-1");break;case"default":default:a.push("ml-3");break}return a.join(" ")}),g=e.computed(()=>{const a=[];switch(l.size){case"xs":a.push("text-xs");break;case"default":default:a.push("mt-2 text-sm");break}return a.join(" ")}),u=e.computed(()=>{var m;const a=["flex"];o.value||a.push("grow justify-end");const x=o.value&&((m=l.actions)==null?void 0:m.length);switch(l.size){case"xs":a.push("space-x-1"),x&&a.push("mt-1");break;case"default":default:a.push("space-x-2"),x&&a.push("mt-4");break}return a.join(" ")}),p=e.computed(()=>{const a=[];switch(l.color){case"success":a.push("text-success-darker");break;case"info":a.push("text-info-darker");break;case"danger":a.push("text-danger-darker");break;case"warning":a.push("text-warning-darker");break}return a.join(" ")}),h=e.computed(()=>{const a=[];switch(l.size){case"xs":a.push("h-4 w-4"),a.push(o.value?"mt-0.5":"");break;case"default":default:a.push("h-5 w-5");break}switch(l.color){case"success":a.push("text-success");break;case"info":a.push("text-info");break;case"danger":a.push("text-danger");break;case"warning":a.push("text-warning");break}return a.join(" ")}),d=e.computed(()=>{const a=[];switch(l.color){case"success":a.push("bg-success-lighter ring-success");break;case"info":a.push("bg-info-lighter ring-info");break;case"danger":a.push("bg-danger-lighter ring-danger");break;case"warning":a.push("bg-warning-lighter ring-warning");break}return a.join(" ")}),v=e.computed(()=>{switch(l.size){case"xs":return"xs";case"default":default:return"sm"}});return(a,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded-md",[r.value,p.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",i.value])},[e.createElementVNode("div",Zn,[(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(c.value)},[e.createElementVNode("h3",{class:e.normalizeClass(["text-sm",[o.value?"font-medium":""]])},[e.renderSlot(a.$slots,"title",{},()=>[e.createTextVNode("Title")])],2),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(g.value)},[e.renderSlot(a.$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||[],(m,y)=>(e.openBlock(),e.createBlock(U,{key:y,color:t.color,size:v.value,to:m.url,external:m.externalUrl||!1,onClick:b=>m.onClick||e.unref(C.noop)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.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",d.value]),onClick:x[0]||(x[0]=m=>a.$emit("dismiss"))},[eo,e.createVNode(e.unref($.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)],2)):e.createCommentVNode("",!0)],2)],2))}});function no(t){var a,x;const{get:l,initialState:n,readOptions:o,set:s,asyncRead:r=!0,debugging:i}=t,c=i==null?void 0:i.log,g=()=>(new Error("Trace:").stack||"").substring(7),u=((x=(a=t.debugging)==null?void 0:a.log)==null?void 0:x.logger)||console.debug,p=c&&!c.writesOnly?()=>{const m=l();return u(`debugging: '${c.name}' read`,m,g()),m}:l,h=c&&!c.readsOnly?m=>(u(`debugging: '${c.name}' written to`,m,g()),s(m)):s,d=r?T.computedAsync(p,n,o):e.computed(p),v=e.computed(()=>d.value);return v.update=h,v}exports.CommonAlert=to;exports.CommonBadge=ie;exports.CommonLoadingBar=Y;exports.CommonStepsBullet=gt;exports.CommonStepsNumber=nt;exports.CommonTextLink=re;exports.FormButton=U;exports.FormCardButton=yt;exports.FormCheckbox=Et;exports.FormSelectBase=me;exports.FormSelectSourceApps=bn;exports.FormTextArea=Dt;exports.FormTextInput=Ft;exports.GlobalToastRenderer=je;exports.GridListToggleValue=j;exports.HorizontalDirection=H;exports.InfiniteLoading=Xn;exports.LayoutDialog=_n;exports.LayoutDisclosure=Pn;exports.LayoutGridListToggle=jn;exports.LayoutMenu=An;exports.LayoutPanel=Yn;exports.LayoutTabs=Rn;exports.ModifierKeys=F;exports.SourceAppBadge=pe;exports.TailwindBreakpoints=M;exports.ThrottleOrDebounce=he;exports.ToastNotificationType=A;exports.ValidationHelpers=Xt;exports.clientOs=W;exports.getKeyboardShortcutTitle=Cn;exports.onKeyboardShortcut=Bn;exports.useFormCheckboxModel=wn;exports.useFormSelectChildInternals=fe;exports.useOnBeforeWindowUnload=On;exports.useResponsiveHorizontalDirectionCalculation=ve;exports.useWindowResizeHandler=ge;exports.useWrappingContainerHiddenCount=de;exports.writableAsyncComputed=no;