@contentstudio/ui 0.2.9 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1317 -1324
- package/dist/index.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var yb=Object.defineProperty;var kb=(a,o,c)=>o in a?yb(a,o,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[o]=c;var Se=(a,o,c)=>(kb(a,typeof o!="symbol"?o+"":o,c),c);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),F=require("./tailwind-e7334431.cjs"),Le={primary:{base:"primary",light:"50",main:"500",dark:"600",hover:"550",border:"600",focus:"600"},secondary:{base:"secondary",light:"200",main:"575",dark:"700",hover:"600",border:"600",focus:"500"},success:{base:"success",light:"50",main:"500",dark:"700",hover:"600",border:"200",focus:"500"},warning:{base:"warning",light:"50",main:"500",dark:"700",hover:"600",border:"200",focus:"500"},danger:{base:"danger",light:"50",main:"500",dark:"700",hover:"600",border:"200",focus:"500"},info:{base:"info",light:"50",main:"450",dark:"600",hover:"500",border:"200",focus:"550"},dark:{base:"gray",light:"100",main:"900",dark:"950",hover:"800",border:"300",focus:"700"},light:{base:"gray",light:"100",main:"400",dark:"500",hover:"400",border:"200",focus:"300"}},U=(a,o,c={})=>{const{hover:n=!1,active:r=!1,focus:s=!1,disabled:i=!1}=c;if(i)return"cstu-bg-gray-100 cstu-border-gray-200 cstu-text-gray-400 cstu-cursor-not-allowed";const h=Le[a];if(!h)return"";if(o==="text")return[`cstu-text-${h.base}-${h.main}`,n&&`hover:cstu-text-${h.base}-${h.hover}`,r&&`active:cstu-text-${h.base}-${h.dark}`,s&&`focus:cstu-text-${h.base}-${h.focus}`,i&&"cstu-opacity-50 cstu-cursor-not-allowed"].filter(Boolean);const l=[];switch(o){case"filled":l.push(`cstu-bg-${h.base}-${h.main}`),l.push("cstu-text-white"),n&&l.push(`hover:cstu-bg-${h.base}-${h.hover} hover:cstu-shadow-md`),r&&l.push(`active:cstu-bg-${h.base}-${h.dark}`),s&&l.push(`focus:cstu-ring-${h.base}-${h.focus}/20`);break;case"light":l.push(`cstu-bg-${h.base}-${h.light}`),l.push(`cstu-text-${h.base}-${h.main}`),n&&l.push(`hover:cstu-bg-${h.base}-250`),r&&l.push(`active:cstu-bg-${h.base}-300 active:!cstu-text-white`),s&&l.push(`focus:cstu-ring-${h.base}-${h.focus}/20`);break;case"outline":l.push("cstu-bg-white"),l.push(`cstu-text-${h.base}-${h.main}`),l.push(`cstu-border cstu-border-${h.base}-${h.main}`),a==="secondary"?(l.pop(),l.pop(),l.push("cstu-text-secondary-400"),l.push("cstu-border cstu-border-secondary-400/50"),n&&l.push("hover:cstu-bg-secondary-400/[0.06] hover:cstu-text-secondary-500"),r&&l.push("active:cstu-bg-secondary-250 active:cstu-text-secondary-500")):(n&&l.push(`hover:cstu-bg-${h.base}-50`),r&&l.push(`active:cstu-bg-${h.base}-100`)),s&&l.push(`focus:cstu-ring-${h.base}-${h.focus}/20`);break;case"subtle":l.push(`cstu-text-${h.base}-${h.main}`),n&&l.push(`hover:cstu-bg-${h.base}-50`),r&&l.push(`active:cstu-bg-${h.base}-100`),s&&l.push(`focus:cstu-ring-${h.base}-${h.focus}/20`);break}return l.join(" ")},mb=(a,o)=>{if(o==="filled")return"cstu-text-white";const c=Le[a];return`cstu-text-${c.base}-${c.main}`},Tx=a=>{const o=["cstu-shadow-sm","cstu-transition-all cstu-duration-200"];switch(a){case"filled":o.push("cstu-border-transparent");break;case"light":o.push("cstu-border");break;case"outline":o.push("cstu-border");break;case"subtle":o.push("cstu-shadow-none");break;case"text":o.push("cstu-shadow-none");break;default:o.push("cstu-border")}return o.join(" ")},fb=a=>{const o=Le[a];return["focus:cstu-outline-none","focus:cstu-ring-2","focus:cstu-ring-offset-0",`focus:cstu-ring-${o.base}-${o.focus}/20`].join(" ")},oe=a=>a?["primary","secondary","success","warning","danger","info","dark","light","initials"].includes(a):!0,fw={button:{xs:{height:"cstu-h-[30px]",gap:"cstu-gap-[0.55rem]",padding:{x:"cstu-px-[0.67rem]",y:"cstu-py-[0.67rem]"},text:"cstu-text-xs cstu-leading-none",icon:"cstu-w-3 cstu-h-3"},sm:{height:"cstu-h-[36px]",gap:"cstu-gap-[0.66rem]",padding:{x:"cstu-px-[0.8rem]",y:"cstu-py-[0.8rem]"},text:"cstu-text-sm cstu-leading-none",icon:"cstu-w-4 cstu-h-4"},md:{height:"cstu-h-[40px]",gap:"cstu-gap-[0.74rem]",padding:{x:"cstu-px-[0.89rem]",y:"cstu-py-[0.89rem]"},text:"cstu-text-base cstu-leading-none",icon:"cstu-w-5 cstu-h-5"},lg:{height:"cstu-h-[45px]",gap:"cstu-gap-[0.83rem]",padding:{x:"cstu-px-4",y:"cstu-py-4"},text:"cstu-text-lg cstu-leading-none",icon:"cstu-w-6 cstu-h-6"},xl:{height:"cstu-h-[50px]",gap:"cstu-gap-[0.92rem]",padding:{x:"cstu-px-[1.11rem]",y:"cstu-py-[1.11rem]"},text:"cstu-text-xl cstu-leading-none",icon:"cstu-w-7 cstu-h-7"}},badge:{xs:{padding:{x:"cstu-px-2",y:"cstu-py-0.5"},text:"cstu-text-xs",icon:"cstu-w-3 cstu-h-3"},sm:{padding:{x:"cstu-px-2.5",y:"cstu-py-1"},text:"cstu-text-sm",icon:"cstu-w-3.5 cstu-h-3.5"},md:{padding:{x:"cstu-px-3",y:"cstu-py-1.5"},text:"cstu-text-base",icon:"cstu-w-4 cstu-h-4"},lg:{padding:{x:"cstu-px-4",y:"cstu-py-2"},text:"cstu-text-lg",icon:"cstu-w-5 cstu-h-5"},xl:{padding:{x:"cstu-px-5",y:"cstu-py-2.5"},text:"cstu-text-xl",icon:"cstu-w-6 cstu-h-6"}},input:{xs:{padding:{x:"cstu-px-2",y:"cstu-py-1"},text:"cstu-text-xs",height:"cstu-h-7"},sm:{padding:{x:"cstu-px-3",y:"cstu-py-1.5"},text:"cstu-text-sm",height:"cstu-h-8"},md:{padding:{x:"cstu-px-3",y:"cstu-py-2"},text:"cstu-text-base",height:"cstu-h-10"},lg:{padding:{x:"cstu-px-4",y:"cstu-py-2.5"},text:"cstu-text-lg",height:"cstu-h-11"},xl:{padding:{x:"cstu-px-4",y:"cstu-py-3"},text:"cstu-text-xl",height:"cstu-h-12"}},notification:{xs:{padding:{x:"cstu-px-3",y:"cstu-py-2"},text:"cstu-text-xs"},sm:{padding:{x:"cstu-px-4",y:"cstu-py-2.5"},text:"cstu-text-sm"},md:{padding:{x:"cstu-px-4",y:"cstu-py-3"},text:"cstu-text-base"},lg:{padding:{x:"cstu-px-5",y:"cstu-py-4"},text:"cstu-text-lg"},xl:{padding:{x:"cstu-px-6",y:"cstu-py-5"},text:"cstu-text-xl"}},switch:{xs:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-xs",height:"cstu-h-4"},sm:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-sm",height:"cstu-h-5"},md:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-base",height:"cstu-h-6"},lg:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-lg",height:"cstu-h-7"},xl:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-xl",height:"cstu-h-8"}},chip:{xs:{padding:{x:"cstu-px-1.5",y:"cstu-py-0.5"},text:"cstu-text-xs",icon:"cstu-w-2.5 cstu-h-2.5"},sm:{padding:{x:"cstu-px-2",y:"cstu-py-1"},text:"cstu-text-sm",icon:"cstu-w-3 cstu-h-3"},md:{padding:{x:"cstu-px-2.5",y:"cstu-py-1.5"},text:"cstu-text-base",icon:"cstu-w-3.5 cstu-h-3.5"},lg:{padding:{x:"cstu-px-3",y:"cstu-py-2"},text:"cstu-text-lg",icon:"cstu-w-4 cstu-h-4"},xl:{padding:{x:"cstu-px-3.5",y:"cstu-py-2.5"},text:"cstu-text-xl",icon:"cstu-w-4.5 cstu-h-4.5"}},checkbox:{xs:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-xs",icon:"cstu-w-2 cstu-h-2"},sm:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-sm",icon:"cstu-w-2.5 cstu-h-2.5"},md:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-base",icon:"cstu-w-3 cstu-h-3"},lg:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-lg",icon:"cstu-w-4 cstu-h-4"},xl:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-xl",icon:"cstu-w-5 cstu-h-5"}},indicator:{xs:{padding:{x:"cstu-px-0.5",y:"cstu-py-0.5"},text:"cstu-text-[10px]",height:"cstu-h-3.5 cstu-min-w-3.5"},sm:{padding:{x:"cstu-px-1",y:"cstu-py-0.5"},text:"cstu-text-[11px]",height:"cstu-h-4 cstu-min-w-4"},md:{padding:{x:"cstu-px-1.5",y:"cstu-py-0.5"},text:"cstu-text-xs",height:"cstu-h-5 cstu-min-w-5"},lg:{padding:{x:"cstu-px-2",y:"cstu-py-0.5"},text:"cstu-text-xs",height:"cstu-h-6 cstu-min-w-6"},xl:{padding:{x:"cstu-px-2.5",y:"cstu-py-0.5"},text:"cstu-text-sm",height:"cstu-h-7 cstu-min-w-7"}},progress:{xs:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-xs",height:"cstu-h-[0.125rem]"},sm:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-sm",height:"cstu-h-[0.1875rem]"},md:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-base",height:"cstu-h-[0.25rem]"},lg:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-sm",height:"cstu-h-[0.3125rem]"},xl:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-base",height:"cstu-h-[0.375rem]"}},alert:{xs:{padding:{x:"cstu-px-3",y:"cstu-py-2"},text:"cstu-text-xs",icon:"cstu-w-4 cstu-h-4"},sm:{padding:{x:"cstu-px-3",y:"cstu-py-2.5"},text:"cstu-text-sm",icon:"cstu-w-5 cstu-h-5"},md:{padding:{x:"cstu-px-4",y:"cstu-py-3"},text:"cstu-text-base",icon:"cstu-w-5 cstu-h-5"},lg:{padding:{x:"cstu-px-5",y:"cstu-py-4"},text:"cstu-text-lg",icon:"cstu-w-6 cstu-h-6"},xl:{padding:{x:"cstu-px-6",y:"cstu-py-5"},text:"cstu-text-xl",icon:"cstu-w-7 cstu-h-7"}},segmentedControl:{xs:{gap:"cstu-gap-[8px]",padding:{x:"cstu-px-[10.5px]",y:"cstu-py-[3.5px]"},text:"cstu-text-xs",height:"cstu-h-6"},sm:{gap:"cstu-gap-[9px]",padding:{x:"cstu-px-[12px]",y:"cstu-py-[4px]"},text:"cstu-text-sm",height:"cstu-h-8"},md:{gap:"cstu-gap-[10px]",padding:{x:"cstu-px-[13.5px]",y:"cstu-py-[4.5px]"},text:"cstu-text-base",height:"cstu-h-10"},lg:{gap:"cstu-gap-[11px]",padding:{x:"cstu-px-[15px]",y:"cstu-py-[5px]"},text:"cstu-text-lg",height:"cstu-h-12"},xl:{gap:"cstu-gap-[12px]",padding:{x:"cstu-px-[16.5px]",y:"cstu-py-[5.5px]"},text:"cstu-text-xl",height:"cstu-h-14"}},segmentedControlContainer:{xs:{gap:"cstu-gap-[5.25px]",padding:{x:"cstu-px-[5.25px]",y:"cstu-py-[5.25px]"}},sm:{gap:"cstu-gap-[6px]",padding:{x:"cstu-px-[6px]",y:"cstu-py-[6px]"}},md:{gap:"cstu-gap-[6.75px]",padding:{x:"cstu-px-[6.75px]",y:"cstu-py-[6.75px]"}},lg:{gap:"cstu-gap-[7.5px]",padding:{x:"cstu-px-[7.5px]",y:"cstu-py-[7.5px]"}},xl:{gap:"cstu-gap-[8.25px]",padding:{x:"cstu-px-[8.25px]",y:"cstu-py-[8.25px]"}}},dropdown:{xs:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"cstu-text-xs",height:void 0,icon:void 0,gap:"cstu-gap-[9px]"},sm:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"cstu-text-sm",height:void 0,icon:void 0,gap:"cstu-gap-[9px]"},md:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"cstu-text-base",height:void 0,icon:void 0,gap:"cstu-gap-[9px]"},lg:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"cstu-text-lg",height:void 0,icon:void 0,gap:"cstu-gap-[9px]"},xl:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"cstu-text-xl",height:void 0,icon:void 0,gap:"cstu-gap-[9px]"}}},re=(a,o)=>{var c,n;if(typeof o=="string"){const r=fw[o][a];return[(c=r==null?void 0:r.padding)==null?void 0:c.x,(n=r==null?void 0:r.padding)==null?void 0:n.y,r==null?void 0:r.text,r==null?void 0:r.gap].filter(Boolean).join(" ")}return o[a]},Dx=(a,o)=>fw[o][a].height||"",f2=a=>{switch(a){case"xs":return"cstu-text-xs";case"sm":return"cstu-text-sm";case"md":return"cstu-text-base";case"lg":return"cstu-text-lg";case"xl":return"cstu-text-xl";default:return"cstu-text-base"}},vb=a=>{switch(a){case"xs":return"cstu-space-x-1";case"sm":return"cstu-space-x-2";case"md":return"cstu-space-x-3";case"lg":return"cstu-space-x-4";case"xl":return"cstu-space-x-5";default:return"cstu-space-x-3"}},g2=a=>{const o=[];return a.disabled&&o.push("cstu-opacity-50 cstu-cursor-not-allowed cstu-pointer-events-none"),a.loading&&o.push("cstu-cursor-wait"),a.active&&o.push("cstu-ring-2 cstu-ring-offset-2"),a.error&&o.push("cstu-border-red-300 focus:cstu-ring-red-500/20 focus:cstu-border-red-500"),a.success&&o.push("cstu-border-green-300 focus:cstu-ring-green-500/20 focus:cstu-border-green-500"),o.join(" ")},vw=a=>a?"cstu-opacity-50 cstu-cursor-not-allowed cstu-pointer-events-none":"",gb=a=>{const o=[];return a.valid&&o.push("cstu-border-green-300 focus:cstu-ring-green-500/20 focus:cstu-border-green-500"),a.invalid&&o.push("cstu-border-red-300 focus:cstu-ring-red-500/20 focus:cstu-border-red-500"),a.pending&&o.push("cstu-border-yellow-300 focus:cstu-ring-yellow-500/20 focus:cstu-border-yellow-500"),o.join(" ")},Mb=(a,o="primary")=>{const c=[];return a.hover&&c.push(`hover:cstu-bg-${o}-50`),a.active&&c.push(`active:cstu-bg-${o}-100`),a.focus&&c.push(`focus:cstu-outline-none focus:cstu-ring-2 focus:cstu-ring-${o}-500/20 focus:cstu-border-${o}-500`),c.join(" ")},xb=["disabled","type"],wb={key:0},K=e.defineComponent({__name:"Button",props:{variant:{default:"filled"},color:{default:"primary"},size:{default:"md"},radius:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},type:{default:"button"}},emits:{click:a=>!0},setup(a,{emit:o}){const c=a,n=o,r=l=>{!c.disabled&&!c.loading&&n("click",l)},s=l=>({none:"cstu-rounded-none",xs:"cstu-rounded",sm:"cstu-rounded-md",md:"cstu-rounded-lg",lg:"cstu-rounded-xl",xl:"cstu-rounded-2xl",full:"cstu-rounded-full"})[l]||"cstu-rounded-lg",i=e.computed(()=>{if(oe(c.color)||c.disabled)return{};switch(c.variant){case"filled":return{backgroundColor:c.color,color:"white"};case"light":return{backgroundColor:`${c.color}10`,color:c.color};case"outline":return{borderColor:c.color,color:c.color};case"subtle":return{color:c.color};case"text":return{backgroundColor:"transparent",color:c.color,borderColor:"transparent"};default:return{}}}),h=e.computed(()=>{const l="cstu-inline-flex cstu-items-center cstu-justify-center cstu-font-medium cstu-transition-all cstu-duration-200",d=oe(c.color)?U(c.color,c.variant,{hover:!0,active:!0,focus:!0}):"",p=re(c.size,"button"),y=g2({disabled:c.disabled,loading:c.loading}),u=Dx(c.size,"button"),k=s(c.radius),f=!oe(c.color)&&["outline"].includes(c.variant)?"cstu-border":"";return[l,d,p,y,u,k,f,{"cstu-w-full":c.fullWidth,"cstu-cursor-pointer":!c.disabled&&!c.loading,"cstu-border":c.variant==="outline"}]});return(l,d)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(h.value),style:e.normalizeStyle(i.value),disabled:l.disabled||l.loading,type:l.type,onClick:r},[e.renderSlot(l.$slots,"leftSection"),e.renderSlot(l.$slots,"default"),l.loading?(e.openBlock(),e.createElementBlock("span",wb,[e.renderSlot(l.$slots,"loader",{},()=>[d[0]||(d[0]=e.createElementVNode("svg",{class:"cstu-animate-spin cstu-h-4 cstu-w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"cstu-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"cstu-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1))])])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"rightSection")],14,xb))}}),gw=a=>{const o=["cstu-relative"];a.fullWidth&&o.push("cstu-w-full");const c=g2({disabled:a.disabled,error:a.error,required:a.required||a.withAsterisk});return c&&o.push(c),o.join(" ")},Fx=(a,o=!1)=>{const c=["cstu-block","cstu-font-medium"];switch(o||c.push("cstu-mb-1"),a.size){case"xs":c.push("cstu-text-xs");break;case"sm":c.push("cstu-text-sm");break;case"md":c.push("cstu-text-base");break;case"lg":c.push("cstu-text-lg");break;case"xl":c.push("cstu-text-xl");break;default:c.push("cstu-text-sm")}return a.error?c.push("cstu-text-red-500"):a.disabled?c.push("cstu-text-gray-400"):c.push("cstu-text-gray-700"),(a.required||a.withAsterisk)&&c.push('after:cstu-content-["*"] after:cstu-ml-0.5 after:cstu-text-red-500'),c.join(" ")},Mw=a=>{const o=["cstu-mt-1","cstu-text-sm"];return a.error?o.push("cstu-text-red-500"):a.disabled?o.push("cstu-text-gray-400"):o.push("cstu-text-gray-500"),o.join(" ")},bb=["aria-disabled","onKeydown"],Cb={key:2,class:"cstu-text-sm cstu-text-red-500 cstu-mt-0.5"},Lb={name:"Checkbox"},Ib=e.defineComponent({...Lb,props:{modelValue:{type:[Boolean,Array],default:!1},checked:{type:Boolean,default:!1},value:{},id:{},label:{},color:{default:"primary"},size:{default:"md"},labelPosition:{default:"right"},labelSize:{default:"md"},description:{},error:{},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},variant:{default:"filled"},labelClass:{default:""}},emits:["update:modelValue","change"],setup(a,{emit:o}){const c=a,n=o,r=e.computed(()=>c.modelValue||c.checked),s=()=>{if(c.disabled)return;const f=!r.value;n("update:modelValue",f),n("change",f)},i=()=>{s()},h=e.computed(()=>Fx({size:c.labelSize,disabled:c.disabled,error:c.error},!0)),l=e.computed(()=>Mw({color:c.color})),d=e.computed(()=>["cstu-flex","cstu-flex-col",c.labelPosition==="left"?"cstu-order-first":""]),p={primary:"primary-500",secondary:"secondary-500",success:"success-500",warning:"warning-500",danger:"danger-500",info:"info-500",dark:"gray-900",light:"gray-300"},y=e.computed(()=>["cstu-inline-flex","cstu-items-center","cstu-justify-center","cstu-cursor-pointer","cstu-transition-colors","cstu-duration-200","cstu-ease-in-out",c.size==="xs"?"cstu-h-[12px] cstu-w-[12px] cstu-rounded":"",c.size==="sm"?"cstu-h-[14px] cstu-w-[14px] cstu-rounded":"",c.size==="md"?"cstu-h-[16px] cstu-w-[16px] cstu-rounded-md":"",c.size==="lg"?"cstu-h-[18px] cstu-w-[18px] cstu-rounded-md":"",c.size==="xl"?"cstu-h-[20px] cstu-w-[20px] cstu-rounded-md":"",c.disabled?"cstu-bg-gray-200 cstu-border cstu-border-gray-200 cstu-cursor-not-allowed":r.value||c.indeterminate?c.variant==="outlined"?`cstu-bg-transparent cstu-border cstu-border-${p[c.color]}`:`cstu-bg-${p[c.color]} cstu-border-${p[c.color]}`:"cstu-bg-white cstu-border cstu-border-gray-400/50"]),u=e.computed(()=>[c.variant==="outlined"&&(r.value||c.indeterminate)?`cstu-text-${p[c.color]}`:c.disabled?"cstu-text-gray-300":"cstu-text-white",c.size==="xs"?"cstu-h-[6px] cstu-w-[6px]":"",c.size==="sm"?"cstu-h-[7px] cstu-w-[7px]":"",c.size==="md"?"cstu-h-[8px] cstu-w-[8px]":"",c.size==="lg"?"cstu-h-[9px] cstu-w-[9px]":"",c.size==="xl"?"cstu-h-[10px] cstu-w-[10px]":""]),k=e.computed(()=>gw({disabled:c.disabled,error:c.error}));return(f,L)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([k.value,"cstu-flex cstu-items-center cstu-gap-2"])},[e.createElementVNode("div",{class:e.normalizeClass(y.value),onClick:i,role:"checkbox","aria-disabled":f.disabled,tabindex:"0",onKeydown:e.withKeys(e.withModifiers(i,["prevent"]),["space"])},[r.value&&!f.indeterminate?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(u.value),xmlns:"http://www.w3.org/2000/svg",width:"8",height:"6",viewBox:"0 0 8 6",fill:"none"},L[0]||(L[0]=[e.createElementVNode("path",{d:"M6.75 0.75L2.625 5.25L0.75 3.20455",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),2)):e.createCommentVNode("",!0),f.indeterminate?(e.openBlock(),e.createElementBlock("svg",{key:1,class:e.normalizeClass(u.value),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8 7",fill:"none"},L[1]||(L[1]=[e.createElementVNode("path",{d:"M6.80245 3.90741L0.697913 3.8936",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),2)):e.createCommentVNode("",!0)],42,bb),f.label||f.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(d.value)},[f.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass([h.value,f.labelClass]),onClick:i},e.toDisplayString(f.label),3)):e.createCommentVNode("",!0),f.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(l.value)},e.toDisplayString(f.description),3)):e.createCommentVNode("",!0),f.error?(e.openBlock(),e.createElementBlock("div",Cb,e.toDisplayString(f.error),1)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],2))}}),Sb=["aria-checked","aria-disabled"],zb=["id","checked","disabled","value"],qb=["for"],Vb=e.defineComponent({__name:"Radio",props:{modelValue:{default:void 0},value:{default:void 0},id:{default:()=>`radio-${Math.random().toString(36).substr(2,9)}`},label:{},color:{default:"primary"},size:{default:"md"},labelPosition:{default:"right"},description:{},error:{},disabled:{type:Boolean,default:!1},variant:{default:"filled"},labelClass:{default:""}},emits:["update:modelValue","change"],setup(a,{emit:o}){const c=a,n={primary:"primary-500",secondary:"secondary-500",success:"success-500",warning:"warning-500",danger:"danger-500",info:"info-500",dark:"gray-900",light:"gray-300"},r={primary:"primary-300",secondary:"secondary-300",success:"success-300",warning:"warning-300",danger:"danger-300",info:"info-300",dark:"gray-300",light:"gray-300"},s=o,i=e.computed(()=>c.modelValue===c.value),h=()=>{c.disabled||(s("update:modelValue",c.value),s("change",c.value))},l=e.computed(()=>[gw({disabled:c.disabled,error:c.error}),"cstu-flex cstu-items-center cstu-gap-2",c.labelPosition==="left"?"cstu-flex-row-reverse":"cstu-flex-row"]),d=e.computed(()=>["cstu-relative cstu-flex cstu-items-center cstu-justify-center cstu-rounded-full cstu-transition-colors cstu-duration-200",L.value,i.value?c.variant==="outlined"?`cstu-bg-white !cstu-border-2 cstu-border-${r[c.color]}`:`cstu-bg-${n[c.color]} cstu-border cstu-border-${n[c.color]}`:c.variant==="outlined"?`cstu-bg-white !cstu-border-2 cstu-border-${r[c.color]}`:"cstu-bg-white cstu-border cstu-border-gray-300 hover:cstu-border-gray-400",c.disabled?"cstu-opacity-50 cstu-cursor-not-allowed !cstu-bg-gray-200 !cstu-border-gray-300":"cstu-cursor-pointer"]),p=e.computed(()=>["cstu-rounded-full",v.value,c.variant==="outlined"?`cstu-bg-${n[c.color]}`:"cstu-bg-white",c.disabled?`cstu-opacity-50 ${c.variant==="outlined"?"!cstu-bg-gray-300":"!cstu-bg-gray-200"}`:""]),y=e.computed(()=>Fx({size:c.size,disabled:c.disabled,error:c.error},!0)),u=e.computed(()=>Mw({color:c.color})),k=e.computed(()=>["cstu-text-sm cstu-text-red-500 cstu-mt-1"]),f=e.computed(()=>["cstu-flex cstu-flex-col",c.disabled?"cstu-cursor-not-allowed":"cstu-cursor-pointer"]),L=e.computed(()=>({xs:"cstu-w-[8px] cstu-h-[8px]",sm:"cstu-w-[12px] cstu-h-[12px]",md:"cstu-w-[16px] cstu-h-[16px]",lg:"cstu-w-[20px] cstu-h-[20px]",xl:"cstu-w-[24px] cstu-h-[24px]"})[c.size]),v=e.computed(()=>({xs:"cstu-w-[4px] cstu-h-[4px]",sm:"cstu-w-[6px] cstu-h-[6px]",md:"cstu-w-[8px] cstu-h-[8px]",lg:"cstu-w-[10px] cstu-h-[10px]",xl:"cstu-w-[12px] cstu-h-[12px]"})[c.size]);return(g,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.value),onClick:h,"aria-checked":i.value,"aria-disabled":g.disabled,role:"radio"},[e.createElementVNode("input",{ref:"radio",type:"radio",id:g.id,checked:i.value,disabled:g.disabled,value:g.value,onChange:h,class:"cstu-sr-only cstu-border-2"},null,40,zb),e.createElementVNode("div",{class:e.normalizeClass(d.value)},[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([p.value,"cstu-absolute cstu-left-1/2 cstu-top-1/2 cstu--translate-x-1/2 cstu--translate-y-1/2 cstu-transition-transform cstu-duration-200 cstu-ease-in-out"])},null,2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(f.value)},[g.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:g.id,class:e.normalizeClass([y.value,g.labelClass])},[e.renderSlot(g.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(g.label),1)])],10,qb)):e.createCommentVNode("",!0),g.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(u.value)},[e.renderSlot(g.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(g.description),1)])],2)):e.createCommentVNode("",!0),g.error?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(k.value)},[e.renderSlot(g.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(g.error),1)])],2)):e.createCommentVNode("",!0)],2)],10,Sb))}});function se(a){return{none:"cstu-rounded-none",xs:"cstu-rounded",sm:"cstu-rounded-md",md:"cstu-rounded-lg",lg:"cstu-rounded-xl",xl:"cstu-rounded-2xl",full:"cstu-rounded-full"}[a]}const Bb={key:0,class:"cstu-flex cstu-justify-between cstu-items-center cstu-mb-1"},Ab=["for"],Hb={key:0,class:"cstu-text-red-500 cstu-ml-1"},Pb={key:0,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px]"},jb=["id","type","value","placeholder","disabled","required","readonly","pattern","title","maxlength"],Eb={key:1,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px]"},Tb={key:1,class:"cstu-mt-1"},Db={key:2,class:"cstu-mt-1"},Fb=e.defineComponent({__name:"TextInput",props:{id:{},type:{},modelValue:{},placeholder:{},label:{},description:{},error:{},hasError:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},required:{type:Boolean},withAsterisk:{type:Boolean},showBothErrorAndDescription:{type:Boolean},inputProps:{},size:{},variant:{},radius:{},class:{},fullWidth:{type:Boolean},pattern:{},title:{},inputClass:{},inputContainerClass:{},maxLength:{}},emits:["update:modelValue","focus","blur","change"],setup(a,{expose:o,emit:c}){const n=`text-input-${Math.random().toString(36).substring(2,11)}`,r=e.ref(null),s=a,i={xs:{inputClass:`cstu-h-8 ${s.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-xs cstu-font-medium",descriptionSize:"cstu-text-xs"},sm:{inputClass:`cstu-h-9 ${s.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-xs"},md:{inputClass:`cstu-h-10 ${s.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},lg:{inputClass:`cstu-h-11 ${s.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},xl:{inputClass:`cstu-h-12 ${s.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-base cstu-font-medium",descriptionSize:"cstu-text-sm"}},h=e.computed(()=>{const w=`${i[s.size||"md"].inputClass.split(" ")[0]} cstu-transition-all cstu-duration-300`;return s.inputContainerClass?`${w} ${s.inputContainerClass}`:w}),l=e.computed(()=>i[s.size||"md"].labelSize),d=e.computed(()=>i[s.size||"md"].descriptionSize),p=e.computed(()=>"cstu-text-sm"),y=e.computed(()=>se(s.radius||"md")),u=e.computed(()=>{const x=s.variant||"default",m={default:"cstu-bg-white cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",filled:"cstu-bg-gray-100 cstu-border cstu-border-transparent cstu-transition-colors cstu-duration-150 cstu-px-3",unstyled:"cstu-bg-transparent cstu-border-0"},w=k.value?"":x==="default"?"cstu-border-gray-300/45":"",H=k.value?"cstu-border-red-500":"";return x==="unstyled"?[m[x]]:[m[x],w,H,k.value?"hover:cstu-border-red-500":"hover:cstu-border-primary-500",k.value?"focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500":"focus-within:cstu-border-primary-500 focus-within:cstu-ring-1 focus-within:cstu-ring-primary-500"]}),k=e.computed(()=>s.error!==void 0&&s.error!==""||s.hasError),f=c,L=e.ref(!1),v=x=>{L.value=!0,f("focus",x)},g=x=>{L.value=!1,f("blur",x)},b=x=>{f("change",x)};return o({input:r,focus:()=>{var x;return(x=r.value)==null?void 0:x.focus()},blur:()=>{var x;return(x=r.value)==null?void 0:x.blur()},select:()=>{var x;return(x=r.value)==null?void 0:x.select()},setSelectionRange:(x,m)=>{var w;return(w=r.value)==null?void 0:w.setSelectionRange(x,m)},setRangeText:x=>{var m;return(m=r.value)==null?void 0:m.setRangeText(x)},get value(){var x;return(x=r.value)==null?void 0:x.value},set value(x){r.value&&x!==void 0&&(r.value.value=x)}}),(x,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-flex-col cstu-transition-all cstu-duration-300",[s.class,s.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"]])},[s.label||x.$slots.label?(e.openBlock(),e.createElementBlock("div",Bb,[e.createElementVNode("label",{for:s.id||n,class:e.normalizeClass(["cstu-flex cstu-items-center",l.value])},[e.renderSlot(x.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(s.label)+" ",1),s.withAsterisk||s.required?(e.openBlock(),e.createElementBlock("span",Hb,"*")):e.createCommentVNode("",!0)])],10,Ab),e.renderSlot(x.$slots,"labelIcon")])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["cstu-flex cstu-items-center cstu-gap-2 cstu-py-2",h.value,y.value,u.value,{"cstu-opacity-50 cstu-pointer-events-none cstu-cursor-not-allowed":s.disabled}])},[x.$slots.leftSection?(e.openBlock(),e.createElementBlock("div",Pb,[e.renderSlot(x.$slots,"leftSection")])):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({ref_key:"inputRef",ref:r,id:s.id||n,type:s.type||"text",value:s.modelValue,placeholder:s.placeholder,disabled:s.disabled,required:s.required,readonly:s.readonly,pattern:s.pattern||"",title:s.title||"",maxlength:s.maxLength,class:["cstu-flex-1 cstu-bg-transparent cstu-outline-none cstu-w-full",p.value,s.inputClass||"",{"cstu-text-gray-500":s.modelValue,"cstu-text-red-500":k.value&&!s.modelValue}],onInput:m[0]||(m[0]=w=>x.$emit("update:modelValue",w.target.value)),onFocus:v,onBlur:g,onChange:b},s.inputProps),null,16,jb),x.$slots.rightSection?(e.openBlock(),e.createElementBlock("div",Eb,[e.renderSlot(x.$slots,"rightSection")])):e.createCommentVNode("",!0)],2)]),s.description&&!k.value||x.$slots.description&&!k.value||s.description&&s.showBothErrorAndDescription?(e.openBlock(),e.createElementBlock("div",Tb,[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-gray-500",d.value])},[e.renderSlot(x.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(s.description),1)])],2)])):e.createCommentVNode("",!0),k.value&&s.error||k.value&&!s.error&&x.$slots.error?(e.openBlock(),e.createElementBlock("div",Db,[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-red-500",d.value])},[e.renderSlot(x.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(s.error),1)])],2)])):e.createCommentVNode("",!0)],2))}}),$b=["disabled"],Rb={key:0,class:"w-3.5 h-3.5",viewBox:"0 0 20 20",fill:"currentColor"},Nb={key:0,class:"animate-spin"},Ob=e.defineComponent({__name:"Chip",props:{modelValue:{type:Boolean,default:!1},label:{default:""},size:{default:"md"},variant:{default:"filled"},color:{default:"primary"},radius:{default:"xl"},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},withRemoveButton:{type:Boolean,default:!1},withCheckIcon:{type:Boolean,default:!0},checkIconPosition:{default:"left"},allowDeselect:{type:Boolean,default:!0},loading:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:o}){const c=a,n=o,r=e.computed(()=>U(c.color,c.variant)),s=e.computed(()=>re(c.size,"chip")),i=e.computed(()=>g2({disabled:c.disabled,loading:c.loading})),h=e.computed(()=>U(c.color,c.variant)),l=e.computed(()=>d()),d=()=>{switch(c.variant){case"filled":return"cstu-bg-gray-300 cstu-text-gray-300";case"outline":return"cstu-bg-gray-300 cstu-text-gray-300 cstu-border-gray-300";case"light":return"cstu-bg-gray-200 cstu-text-gray-300";default:return U(c.color,c.variant)}},p=()=>{c.disabled||c.loading||c.modelValue&&!c.allowDeselect||n("update:modelValue",!c.modelValue)};return(y,u)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["inline-flex items-center justify-center gap-2 rounded-full transition-colors duration-200 select-none","focus:outline-none",r.value,s.value,i.value,y.modelValue?h.value:l.value,"cursor-pointer"]),disabled:y.disabled||y.loading,onClick:p},[e.renderSlot(y.$slots,"checkIcon",{},()=>[y.withCheckIcon&&y.modelValue?(e.openBlock(),e.createElementBlock("svg",Rb,u[0]||(u[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1)]))):e.createCommentVNode("",!0)]),y.loading?(e.openBlock(),e.createElementBlock("span",Nb,u[1]||(u[1]=[e.createElementVNode("svg",{class:"w-3.5 h-3.5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)]))):e.createCommentVNode("",!0),e.renderSlot(y.$slots,"label",{},()=>[y.label?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["whitespace-nowrap",y.loading?"opacity-75":""])},e.toDisplayString(y.label),3)):e.createCommentVNode("",!0)])],10,$b))}}),Ub={class:"indicator-content-wrapper"},Zb={key:0,class:"indicator-content"},_b={name:"Indicator"},Wb=e.defineComponent({..._b,props:{position:{default:"top-end"},size:{default:"md"},radius:{default:"full"},color:{default:"danger"},offset:{default:0},inline:{type:Boolean,default:!1},withOutline:{type:Boolean,default:!1},outlineWidth:{default:2},outlineColor:{default:void 0},outlineOffset:{default:0},disabled:{type:Boolean,default:!1},processing:{type:Boolean,default:!1},zIndex:{default:200},label:{default:""},variant:{default:"filled"},dot:{type:Boolean,default:!1},autoContrast:{type:Boolean,default:!0},customClasses:{default:""}},setup(a){const o=a,c=u=>u?["primary","secondary","success","warning","danger","info","dark","light"].includes(u):!0,n=e.computed(()=>[o.inline?"inline-block":"block","relative"]),r=e.computed(()=>{if(typeof o.size=="number")return o.size;const u={xs:6,sm:8,md:10,lg:12,xl:14};return u[o.size]||u.md}),s=e.computed(()=>`position-${o.position}`),i=e.computed(()=>({"--indicator-z-index":`${o.zIndex}`,"--indicator-offset":`${o.offset}px`,"--indicator-outline-width":`${o.outlineWidth}px`,"--indicator-outline-offset":`${o.outlineOffset}px`,"--indicator-size":`${r.value}px`})),h=e.computed(()=>{if(!c(o.color))return"";const u={filled:`${U(o.color,"filled")} ${o.autoContrast?"text-white dark:text-white":""}`,light:`${U(o.color,"light")}`,outline:`${U(o.color,"outline")}`};return u[o.variant]||u.filled}),l=e.computed(()=>typeof o.radius=="number"?"":se(o.radius)),d=e.computed(()=>{const u=[o.dot?"indicator--dot":"",o.processing?"indicator--processing":"",o.withOutline?"indicator--with-outline":"",h.value,l.value,typeof o.customClasses=="string"?o.customClasses:""];return Array.isArray(o.customClasses)&&u.push(...o.customClasses),u.filter(Boolean)}),p=e.computed(()=>{const u={};if(typeof o.radius=="number"&&(u.borderRadius=`${o.radius}px`),c(o.color)||(o.variant==="filled"?(u.backgroundColor=o.color,u.color="white"):o.variant==="light"?(u.backgroundColor=`${o.color}20`,u.color=o.color):o.variant==="outline"&&(u.backgroundColor="transparent",u.color=o.color,u.border=`1px solid ${o.color}`)),o.withOutline){const k=o.outlineColor||o.color;o.outlineOffset>0?u.boxShadow=`0 0 0 ${o.outlineOffset}px white, 0 0 0 ${o.outlineOffset+o.outlineWidth}px ${y(k)}`:u.boxShadow=`0 0 0 ${o.outlineWidth}px ${y(k)}`}return u});function y(u){if(c(u)){const k={primary:"#4F46E5",secondary:"#6B7280",success:"#10B981",warning:"#F59E0B",danger:"#EF4444",info:"#3B82F6",dark:"#1F2937",light:"#F3F4F6"};return k[u]||k.primary}else return u}return(u,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["indicator-root",n.value]),style:e.normalizeStyle(i.value)},[e.createElementVNode("div",Ub,[e.renderSlot(u.$slots,"default",{},void 0,!0),u.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["indicator-dot",[d.value,s.value]]),style:e.normalizeStyle(p.value)},[u.label&&!u.dot?(e.openBlock(),e.createElementBlock("span",Zb,e.toDisplayString(u.label),1)):e.createCommentVNode("",!0)],6))])],6))}});const nx=(a,o)=>{const c=a.__vccOpts||a;for(const[n,r]of o)c[n]=r;return c},Gb=nx(Wb,[["__scopeId","data-v-c570d29c"]]),Xb={key:0,class:"cstu-flex cstu-justify-between cstu-mb-1"},Kb={key:0,class:"cstu-text-sm cstu-font-medium cstu-text-gray-500"},Qb=["aria-valuenow"],Jb={key:1,class:"cstu-flex cstu-h-full"},Yb={key:1,class:"cstu-text-sm cstu-font-medium cstu-text-gray-500 cstu-whitespace-nowrap"},eC=e.defineComponent({__name:"Progress",props:{value:{default:0},size:{default:"md"},color:{default:"primary"},striped:{type:Boolean,default:!1},animated:{type:Boolean,default:!1},label:{},showValue:{type:Boolean,default:!1},valuePosition:{default:"top"},radius:{default:"sm"},class:{default:""},sections:{default:()=>[]},minValue:{default:0},showMinValue:{type:Boolean,default:!1},minValueColor:{default:"secondary"}},setup(a){const o=a,c=e.computed(()=>Math.min(100,Math.max(0,o.value))),n=e.computed(()=>typeof o.color=="string"&&(o.color.startsWith("#")||o.color.startsWith("rgb"))),r=e.computed(()=>n.value?"":U(o.color,"filled",{hover:!1,active:!1,focus:!1})),s=e.computed(()=>typeof o.minValueColor=="string"&&(o.minValueColor.startsWith("#")||o.minValueColor.startsWith("rgb"))),i=e.computed(()=>!o.minValueColor||s.value?"":U(o.minValueColor,"filled",{hover:!1,active:!1,focus:!1})),h=e.computed(()=>{const v={width:`${c.value}%`};return n.value&&(v.backgroundColor=o.color),v}),l=e.computed(()=>({left:`${o.minValue}%`})),d=e.computed(()=>{if(!o.sections||o.sections.length===0)return[];const v=o.sections.reduce((g,b)=>g+b.value,0);return o.sections.map(g=>{const b=v>0?g.value/v*100:0;return{...g,percentage:b}})}),p=v=>{if(typeof v.color=="string"&&(v.color.startsWith("#")||v.color.startsWith("rgb")))return"";const g=v.color||o.color;return U(g,"filled",{hover:!1,active:!1,focus:!1})},y=v=>{const g={width:`${v.percentage}%`};return typeof v.color=="string"&&(v.color.startsWith("#")||v.color.startsWith("rgb"))&&(g.backgroundColor=v.color),g},u=e.computed(()=>se(o.radius)),k=e.computed(()=>o.class||""),f=e.computed(()=>{switch(o.size){case"xs":return"cstu-w-1";case"sm":return"cstu-w-1";case"md":return"cstu-w-1.5";case"lg":return"cstu-w-1.5";case"xl":return"cstu-w-1.5";default:return"cstu-w-1.5"}}),L=e.computed(()=>{let v;switch(o.size){case"xs":v=4;break;case"sm":v=4;break;case"md":v=8;break;case"lg":v=8;break;case"xl":v=8;break;default:v=8}return`${v+4}px`});return(v,g)=>(e.openBlock(),e.createElementBlock("div",null,[v.label||v.$slots.label||v.showValue?(e.openBlock(),e.createElementBlock("div",Xb,[v.label&&!v.$slots.label?(e.openBlock(),e.createElementBlock("span",Kb,e.toDisplayString(v.label),1)):e.createCommentVNode("",!0),v.$slots.label?e.renderSlot(v.$slots,"label",{key:1}):e.createCommentVNode("",!0),v.showValue&&v.valuePosition==="top"&&!v.$slots.value?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(["cstu-text-sm cstu-font-medium cstu-text-gray-500",{"flex justify-end w-full":!v.label}])},e.toDisplayString(c.value)+"% ",3)):e.createCommentVNode("",!0),v.showValue&&v.valuePosition==="top"&&v.$slots.value?e.renderSlot(v.$slots,"value",{key:3}):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["cstu-relative",{"cstu-flex cstu-items-center cstu-gap-2":v.showValue&&v.valuePosition==="right"}])},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-overflow-hidden",{"cstu-w-full":!(v.showValue&&v.valuePosition==="right"),"cstu-flex-1":v.showValue&&v.valuePosition==="right"}])},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-relative cstu-overflow-hidden",u.value,"cstu-bg-gray-250",e.unref(Dx)(v.size,"progress"),k.value]),role:"progressbar","aria-valuenow":v.value,"aria-valuemin":"0","aria-valuemax":"100"},[!v.sections||v.sections.length===0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-h-full cstu-transition-all cstu-duration-300 cstu-ease-in-out",r.value,{"bg-striped":v.striped&&!v.animated,"bg-striped animate-progress":v.animated}]),style:e.normalizeStyle(h.value)},null,6)):(e.openBlock(),e.createElementBlock("div",Jb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(b,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,class:e.normalizeClass(["cstu-h-full cstu-transition-all cstu-duration-300 cstu-ease-in-out",p(b),{"bg-striped":b.striped&&!b.animated,"bg-striped animate-progress":b.animated}]),style:e.normalizeStyle(y(b))},null,6))),128))]))],10,Qb)],2),v.showMinValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-absolute cstu-z-10",[f.value]]),style:e.normalizeStyle([l.value,{top:"50%",transform:"translateX(-50%) translateY(-50%)"}])},[e.renderSlot(v.$slots,"minValueMarker",{},()=>[e.createElementVNode("div",{class:e.normalizeClass(["cstu-h-full cstu-w-full cstu-rounded-sm border",i.value]),style:e.normalizeStyle([s.value?{backgroundColor:o.minValueColor}:{},{height:L.value}])},null,6)])],6)):e.createCommentVNode("",!0),v.showValue&&v.valuePosition==="right"&&!v.$slots.value?(e.openBlock(),e.createElementBlock("span",Yb,e.toDisplayString(c.value)+"% ",1)):e.createCommentVNode("",!0),v.showValue&&v.valuePosition==="right"&&v.$slots.value?e.renderSlot(v.$slots,"value",{key:2}):e.createCommentVNode("",!0)],2)]))}});const tC={key:0,class:"flex-shrink-0"},aC={key:0,class:"flex items-center justify-between"},oC={key:1,class:"flex-shrink-0 ml-3"},cC=["disabled"],nC=e.defineComponent({__name:"Alert",props:{title:{},message:{},variant:{default:"outline"},color:{default:"primary"},size:{default:"md"},radius:{default:"md"},closable:{type:Boolean,default:!1},onClose:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},valid:{type:Boolean,default:void 0},invalid:{type:Boolean,default:void 0}},emits:["close"],setup(a,{emit:o}){const c=a,n=o,r=b=>b==="gradient"?"light":b,s=e.computed(()=>U(c.color,r(c.variant),{hover:!1,active:!1,focus:!1,disabled:c.disabled})),i=e.computed(()=>Tx(r(c.variant))),h=e.computed(()=>mb(c.color,r(c.variant))),l=e.computed(()=>re(c.size,"alert")),d=e.computed(()=>f2(c.size)),p=e.computed(()=>vb(c.size)),y=e.computed(()=>g2({disabled:c.disabled,loading:c.loading})),u=e.computed(()=>gb({valid:c.valid,invalid:c.invalid})),k=e.computed(()=>Mb({hover:!0,focus:!0},c.color)),f=e.computed(()=>c.variant==="light"||c.variant==="gradient"?`cstu-border cstu-border-${Le[c.color].base}-100`:""),L=e.computed(()=>{if(c.variant==="gradient"){const b=Le[c.color];return`cstu-bg-gradient-to-r cstu-from-${b.base}-${b.light} cstu-to-white cstu-text-${b.base}-${b.main}`}return""}),v=e.computed(()=>{switch(c.radius){case"none":return"";case"sm":return"cstu-rounded-sm";case"md":return"cstu-rounded-md";case"lg":return"cstu-rounded-lg";case"xl":return"cstu-rounded-xl";case"full":return"cstu-rounded-full";default:return"cstu-rounded-md"}}),g=()=>{n("close")};return(b,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative",v.value,i.value,c.variant!=="gradient"?s.value:L.value,l.value,y.value,u.value,f.value]),role:"alert"},[e.createElementVNode("div",{class:e.normalizeClass(["flex items-start",[p.value]])},[b.$slots.icon?(e.openBlock(),e.createElementBlock("div",tC,[e.renderSlot(b.$slots,"icon")])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["flex-grow",[b.$slots.icon&&"ml-3"]])},[b.title?(e.openBlock(),e.createElementBlock("div",aC,[e.createElementVNode("h3",{class:e.normalizeClass(["font-medium",h.value])},e.toDisplayString(b.title),3)])):e.createCommentVNode("",!0),b.message?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mt-1",b.variant==="filled"?"text-white/90":"text-gray-600",d.value])},e.toDisplayString(b.message),3)):e.createCommentVNode("",!0),e.renderSlot(b.$slots,"default")],2),b.closable?(e.openBlock(),e.createElementBlock("div",oC,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["inline-flex rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2",[b.variant==="filled"?"text-white/80 hover:text-white focus:ring-white":"text-gray-400 hover:text-gray-500 focus:ring-blue-500",k.value]]),disabled:b.disabled,onClick:g},x[0]||(x[0]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})],-1)]),10,cC)])):e.createCommentVNode("",!0)],2)],2))}}),rC={class:"cstu-inline-block"},sC=e.defineComponent({__name:"OvalLoader",props:{size:{default:"md"},radius:{default:"100%"}},setup(a){const o={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},c=a,n=e.computed(()=>{const r=parseInt(o[c.size]);return`${Math.max(2,r/12)}px`});return(r,s)=>(e.openBlock(),e.createElementBlock("span",rC,[e.createElementVNode("span",{class:"cstu-inline-block cstu-rounded-full cstu-border-solid cstu-border-r-transparent cstu-border-current cstu-animate-[oval-spin_1.2s_linear_infinite]",style:e.normalizeStyle({width:o[c.size],height:o[c.size],borderWidth:n.value,borderRadius:c.radius||"100%"})},null,4)]))}});const lC=e.defineComponent({__name:"DotsLoader",props:{size:{default:"md"}},setup(a){const o={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},c=a,n=e.computed(()=>`${parseInt(o[c.size])/3}px`),r=e.computed(()=>`${parseInt(o[c.size])/6}px`);return(s,i)=>(e.openBlock(),e.createElementBlock("span",{class:"cstu-inline-flex cstu-items-center",style:e.normalizeStyle({gap:r.value,height:o[c.size]})},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,h=>e.createElementVNode("span",{key:h,class:"cstu-inline-block cstu-rounded-full cstu-animate-[dots-pulse_0.8s_infinite_linear] cstu-bg-current",style:e.normalizeStyle({width:n.value,height:n.value,animationDelay:`${(h-1)*.16}s`,opacity:1})},null,4)),64))],4))}});const iC=e.defineComponent({__name:"BarsLoader",props:{size:{default:"md"}},setup(a){const o={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},c=a,n=e.computed(()=>`${parseInt(o[c.size])/6}px`);return(r,s)=>(e.openBlock(),e.createElementBlock("span",{class:"cstu-inline-flex",style:e.normalizeStyle({gap:n.value,width:o[c.size],height:`${parseInt(o[c.size])/2}px`})},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,i=>e.createElementVNode("span",{key:i,class:"cstu-flex-1 cstu-rounded-[2px] cstu-animate-[bars-scale_1.2s_cubic-bezier(0,0.5,0.5,1)_infinite] cstu-bg-current",style:e.normalizeStyle({animationDelay:`${(i-1)*-.12}s`,opacity:1})},null,4)),64))],4))}});const xw=e.defineComponent({__name:"Loader",props:{variant:{default:"oval"},color:{default:"primary"},size:{default:"md"},class:{},loading:{type:Boolean,default:!0},radius:{default:void 0}},setup(a){const o=a,c=i=>i?Object.keys(Le).includes(i):!0,n=e.computed(()=>{if(!o.color||!c(o.color))return"";const i=o.color,h=Le[i];return`cstu-text-${h.base}-${h.main}`}),r=e.computed(()=>!o.color||c(o.color)?{}:{color:o.color}),s=e.computed(()=>{switch(o.variant){case"dots":return lC;case"bars":return iC;default:return sC}});return(i,h)=>e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{class:e.normalizeClass(["cstu-inline-block",n.value,o.class]),style:e.normalizeStyle(r.value),size:o.size,radius:o.radius},null,8,["class","style","size","radius"])),[[e.vShow,o.loading]])}}),dC={class:"p-5"},hC={key:0,class:"absolute top-3 right-3"},uC={key:1},pC={class:"dialog-header"},yC={class:"dialog-body"},kC={class:"dialog-footer"},mC={key:2},fC={class:"dialog-header"},vC={class:"mr-3"},gC={key:0,class:"text-lg font-medium text-gray-900"},MC={class:"dialog-body"},xC={class:"dialog-footer"},wC={key:3},bC={class:"dialog-header"},CC={class:"dialog-body"},LC={class:"dialog-footer"},IC=e.defineComponent({__name:"Dialog",props:{title:{},content:{},opened:{type:Boolean},size:{default:"md"},withCloseButton:{type:Boolean,default:!0},onClose:{},position:{default:()=>({bottom:"20px",right:"20px"})},keepMounted:{type:Boolean,default:!1},zIndex:{default:1e3},iconPosition:{default:"none"},centered:{type:Boolean,default:!1},filledCTA:{type:Boolean,default:!1},withDefaultActions:{type:Boolean,default:!1},cancelText:{default:"Cancel"},confirmText:{default:"Confirm"},confirmButtonColor:{default:"primary"},onCancel:{},onConfirm:{}},emits:["close","cancel","confirm"],setup(a,{emit:o}){const c=a,n=o,r=e.computed(()=>({xs:"w-[280px]",sm:"w-[320px]",md:"w-[380px]",lg:"w-[440px]",xl:"w-[520px]"})[c.size]),s=()=>{n("close"),c.onClose&&c.onClose()},i=()=>{n("cancel"),c.onCancel&&c.onCancel(),s()},h=()=>{n("confirm"),c.onConfirm&&c.onConfirm(),s()};return(l,d)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"opacity-0 scale-95","enter-to-class":"opacity-100 scale-100","leave-active-class":"transition duration-200 ease-in","leave-from-class":"opacity-100 scale-100","leave-to-class":"opacity-0 scale-95"},{default:e.withCtx(()=>[l.opened||l.keepMounted?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({position:"fixed",zIndex:l.zIndex||1e3,...l.position,display:l.opened?"block":"none"}),class:"min-w-[200px]"},[e.createElementVNode("div",{class:e.normalizeClass(["rounded-lg bg-white shadow-lg border border-gray-200",[r.value]])},[e.createElementVNode("div",dC,[l.withCloseButton?(e.openBlock(),e.createElementBlock("div",hC,[e.createElementVNode("button",{onClick:s,class:"text-gray-400 hover:text-gray-500 focus:outline-none"},d[0]||(d[0]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]))])):e.createCommentVNode("",!0),c.iconPosition==="top"?(e.openBlock(),e.createElementBlock("div",uC,[e.createElementVNode("div",pC,[e.createElementVNode("div",{class:e.normalizeClass(["flex mb-3",c.centered?"justify-center":""])},[e.renderSlot(l.$slots,"icon")],2),e.renderSlot(l.$slots,"header",{},()=>[l.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["text-lg font-medium text-gray-900 mb-2",c.centered?"text-center":""])},e.toDisplayString(l.title),3)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",yC,[e.renderSlot(l.$slots,"body",{},()=>[l.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["text-sm text-gray-600 mb-2",c.centered?"text-center":""])},e.toDisplayString(l.content),3)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")])]),e.createElementVNode("div",kC,[e.renderSlot(l.$slots,"footer",{},()=>[l.$slots.actions||l.withDefaultActions?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mt-4","flex",c.filledCTA?"space-x-2":"space-x-3",c.centered?"justify-center":"justify-end"])},[e.renderSlot(l.$slots,"actions",{},()=>[l.withDefaultActions?(e.openBlock(),e.createBlock(K,{key:0,onClick:i,variant:"outline",color:"secondary",size:"sm",class:e.normalizeClass(c.filledCTA?"flex-1":"")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.cancelText),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),l.withDefaultActions?(e.openBlock(),e.createBlock(K,{key:1,onClick:h,variant:"filled",color:l.confirmButtonColor,size:"sm",class:e.normalizeClass(c.filledCTA?"flex-1":"")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.confirmText),1)]),_:1},8,["color","class"])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0)])])])):c.iconPosition==="left"?(e.openBlock(),e.createElementBlock("div",mC,[e.createElementVNode("div",fC,[e.renderSlot(l.$slots,"header",{},()=>[e.createElementVNode("div",{class:e.normalizeClass(["flex items-start mb-2",c.centered?"justify-center":""])},[e.createElementVNode("div",vC,[e.renderSlot(l.$slots,"icon")]),l.title?(e.openBlock(),e.createElementBlock("div",gC,e.toDisplayString(l.title),1)):e.createCommentVNode("",!0)],2)])]),e.createElementVNode("div",MC,[e.renderSlot(l.$slots,"body",{},()=>[l.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["text-sm text-gray-600 mb-2",c.centered?"text-center":""])},e.toDisplayString(l.content),3)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")])]),e.createElementVNode("div",xC,[e.renderSlot(l.$slots,"footer",{},()=>[l.$slots.actions||l.withDefaultActions?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mt-4","flex",c.filledCTA?"space-x-2":"space-x-3",c.centered?"justify-center":"justify-end"])},[e.renderSlot(l.$slots,"actions",{},()=>[l.withDefaultActions?(e.openBlock(),e.createBlock(K,{key:0,onClick:i,variant:"outline",color:"secondary",size:"sm",class:e.normalizeClass(c.filledCTA?"flex-1":"")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.cancelText),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),l.withDefaultActions?(e.openBlock(),e.createBlock(K,{key:1,onClick:h,variant:"filled",color:l.confirmButtonColor,size:"sm",class:e.normalizeClass(c.filledCTA?"flex-1":"")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.confirmText),1)]),_:1},8,["color","class"])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0)])])])):(e.openBlock(),e.createElementBlock("div",wC,[e.createElementVNode("div",bC,[e.renderSlot(l.$slots,"header",{},()=>[l.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["text-lg font-medium text-gray-900 mb-2",c.centered?"text-center":""])},e.toDisplayString(l.title),3)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",CC,[e.renderSlot(l.$slots,"body",{},()=>[l.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["text-sm text-gray-600",c.centered?"text-center":""])},e.toDisplayString(l.content),3)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")])]),e.createElementVNode("div",LC,[e.renderSlot(l.$slots,"footer",{},()=>[l.$slots.actions||l.withDefaultActions?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mt-4","flex",c.filledCTA?"space-x-2":"space-x-3",c.centered?"justify-center":"justify-end"])},[e.renderSlot(l.$slots,"actions",{},()=>[l.withDefaultActions?(e.openBlock(),e.createBlock(K,{key:0,onClick:i,variant:"outline",color:"secondary",size:"sm",class:e.normalizeClass(c.filledCTA?"flex-1":"")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.cancelText),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),l.withDefaultActions?(e.openBlock(),e.createBlock(K,{key:1,onClick:h,variant:"filled",color:l.confirmButtonColor,size:"sm",class:e.normalizeClass(c.filledCTA?"flex-1":"")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.confirmText),1)]),_:1},8,["color","class"])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0)])])]))])],2)],4)):e.createCommentVNode("",!0)]),_:3})]))}}),SC=["top","right","bottom","left"],ew=["start","end"],tw=SC.reduce((a,o)=>a.concat(o,o+"-"+ew[0],o+"-"+ew[1]),[]),S2=Math.min,v2=Math.max,QM=Math.round,N2=Math.floor,fe=a=>({x:a,y:a}),zC={left:"right",right:"left",bottom:"top",top:"bottom"},qC={start:"end",end:"start"};function zx(a,o,c){return v2(a,S2(o,c))}function B2(a,o){return typeof a=="function"?a(o):a}function Ie(a){return a.split("-")[0]}function ve(a){return a.split("-")[1]}function ww(a){return a==="x"?"y":"x"}function $x(a){return a==="y"?"height":"width"}function z2(a){return["top","bottom"].includes(Ie(a))?"y":"x"}function Rx(a){return ww(z2(a))}function bw(a,o,c){c===void 0&&(c=!1);const n=ve(a),r=Rx(a),s=$x(r);let i=r==="x"?n===(c?"end":"start")?"right":"left":n==="start"?"bottom":"top";return o.reference[s]>o.floating[s]&&(i=YM(i)),[i,YM(i)]}function VC(a){const o=YM(a);return[JM(a),o,JM(o)]}function JM(a){return a.replace(/start|end/g,o=>qC[o])}function BC(a,o,c){const n=["left","right"],r=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(a){case"top":case"bottom":return c?o?r:n:o?n:r;case"left":case"right":return o?s:i;default:return[]}}function AC(a,o,c,n){const r=ve(a);let s=BC(Ie(a),c==="start",n);return r&&(s=s.map(i=>i+"-"+r),o&&(s=s.concat(s.map(JM)))),s}function YM(a){return a.replace(/left|right|bottom|top/g,o=>zC[o])}function HC(a){return{top:0,right:0,bottom:0,left:0,...a}}function Cw(a){return typeof a!="number"?HC(a):{top:a,right:a,bottom:a,left:a}}function ex(a){const{x:o,y:c,width:n,height:r}=a;return{width:n,height:r,top:c,left:o,right:o+n,bottom:c+r,x:o,y:c}}function aw(a,o,c){let{reference:n,floating:r}=a;const s=z2(o),i=Rx(o),h=$x(i),l=Ie(o),d=s==="y",p=n.x+n.width/2-r.width/2,y=n.y+n.height/2-r.height/2,u=n[h]/2-r[h]/2;let k;switch(l){case"top":k={x:p,y:n.y-r.height};break;case"bottom":k={x:p,y:n.y+n.height};break;case"right":k={x:n.x+n.width,y};break;case"left":k={x:n.x-r.width,y};break;default:k={x:n.x,y:n.y}}switch(ve(o)){case"start":k[i]-=u*(c&&d?-1:1);break;case"end":k[i]+=u*(c&&d?-1:1);break}return k}const PC=async(a,o,c)=>{const{placement:n="bottom",strategy:r="absolute",middleware:s=[],platform:i}=c,h=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(o));let d=await i.getElementRects({reference:a,floating:o,strategy:r}),{x:p,y}=aw(d,n,l),u=n,k={},f=0;for(let L=0;L<h.length;L++){const{name:v,fn:g}=h[L],{x:b,y:x,data:m,reset:w}=await g({x:p,y,initialPlacement:n,placement:u,strategy:r,middlewareData:k,rects:d,platform:i,elements:{reference:a,floating:o}});p=b??p,y=x??y,k={...k,[v]:{...k[v],...m}},w&&f<=50&&(f++,typeof w=="object"&&(w.placement&&(u=w.placement),w.rects&&(d=w.rects===!0?await i.getElementRects({reference:a,floating:o,strategy:r}):w.rects),{x:p,y}=aw(d,u,l)),L=-1)}return{x:p,y,placement:u,strategy:r,middlewareData:k}};async function Nx(a,o){var c;o===void 0&&(o={});const{x:n,y:r,platform:s,rects:i,elements:h,strategy:l}=a,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:y="floating",altBoundary:u=!1,padding:k=0}=B2(o,a),f=Cw(k),v=h[u?y==="floating"?"reference":"floating":y],g=ex(await s.getClippingRect({element:(c=await(s.isElement==null?void 0:s.isElement(v)))==null||c?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(h.floating)),boundary:d,rootBoundary:p,strategy:l})),b=y==="floating"?{x:n,y:r,width:i.floating.width,height:i.floating.height}:i.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h.floating)),m=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},w=ex(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:b,offsetParent:x,strategy:l}):b);return{top:(g.top-w.top+f.top)/m.y,bottom:(w.bottom-g.bottom+f.bottom)/m.y,left:(g.left-w.left+f.left)/m.x,right:(w.right-g.right+f.right)/m.x}}const jC=a=>({name:"arrow",options:a,async fn(o){const{x:c,y:n,placement:r,rects:s,platform:i,elements:h,middlewareData:l}=o,{element:d,padding:p=0}=B2(a,o)||{};if(d==null)return{};const y=Cw(p),u={x:c,y:n},k=Rx(r),f=$x(k),L=await i.getDimensions(d),v=k==="y",g=v?"top":"left",b=v?"bottom":"right",x=v?"clientHeight":"clientWidth",m=s.reference[f]+s.reference[k]-u[k]-s.floating[f],w=u[k]-s.reference[k],H=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let j=H?H[x]:0;(!j||!await(i.isElement==null?void 0:i.isElement(H)))&&(j=h.floating[x]||s.floating[f]);const B=m/2-w/2,$=j/2-L[f]/2-1,S=S2(y[g],$),A=S2(y[b],$),D=S,O=j-L[f]-A,R=j/2-L[f]/2+B,W=zx(D,R,O),ee=!l.arrow&&ve(r)!=null&&R!==W&&s.reference[f]/2-(R<D?S:A)-L[f]/2<0,Y=ee?R<D?R-D:R-O:0;return{[k]:u[k]+Y,data:{[k]:W,centerOffset:R-W-Y,...ee&&{alignmentOffset:Y}},reset:ee}}});function EC(a,o,c){return(a?[...c.filter(r=>ve(r)===a),...c.filter(r=>ve(r)!==a)]:c.filter(r=>Ie(r)===r)).filter(r=>a?ve(r)===a||(o?JM(r)!==r:!1):!0)}const TC=function(a){return a===void 0&&(a={}),{name:"autoPlacement",options:a,async fn(o){var c,n,r;const{rects:s,middlewareData:i,placement:h,platform:l,elements:d}=o,{crossAxis:p=!1,alignment:y,allowedPlacements:u=tw,autoAlignment:k=!0,...f}=B2(a,o),L=y!==void 0||u===tw?EC(y||null,k,u):u,v=await Nx(o,f),g=((c=i.autoPlacement)==null?void 0:c.index)||0,b=L[g];if(b==null)return{};const x=bw(b,s,await(l.isRTL==null?void 0:l.isRTL(d.floating)));if(h!==b)return{reset:{placement:L[0]}};const m=[v[Ie(b)],v[x[0]],v[x[1]]],w=[...((n=i.autoPlacement)==null?void 0:n.overflows)||[],{placement:b,overflows:m}],H=L[g+1];if(H)return{data:{index:g+1,overflows:w},reset:{placement:H}};const j=w.map(S=>{const A=ve(S.placement);return[S.placement,A&&p?S.overflows.slice(0,2).reduce((D,O)=>D+O,0):S.overflows[0],S.overflows]}).sort((S,A)=>S[1]-A[1]),$=((r=j.filter(S=>S[2].slice(0,ve(S[0])?2:3).every(A=>A<=0))[0])==null?void 0:r[0])||j[0][0];return $!==h?{data:{index:g+1,overflows:w},reset:{placement:$}}:{}}}},DC=function(a){return a===void 0&&(a={}),{name:"flip",options:a,async fn(o){var c,n;const{placement:r,middlewareData:s,rects:i,initialPlacement:h,platform:l,elements:d}=o,{mainAxis:p=!0,crossAxis:y=!0,fallbackPlacements:u,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:L=!0,...v}=B2(a,o);if((c=s.arrow)!=null&&c.alignmentOffset)return{};const g=Ie(r),b=z2(h),x=Ie(h)===h,m=await(l.isRTL==null?void 0:l.isRTL(d.floating)),w=u||(x||!L?[YM(h)]:VC(h)),H=f!=="none";!u&&H&&w.push(...AC(h,L,f,m));const j=[h,...w],B=await Nx(o,v),$=[];let S=((n=s.flip)==null?void 0:n.overflows)||[];if(p&&$.push(B[g]),y){const R=bw(r,i,m);$.push(B[R[0]],B[R[1]])}if(S=[...S,{placement:r,overflows:$}],!$.every(R=>R<=0)){var A,D;const R=(((A=s.flip)==null?void 0:A.index)||0)+1,W=j[R];if(W)return{data:{index:R,overflows:S},reset:{placement:W}};let ee=(D=S.filter(Y=>Y.overflows[0]<=0).sort((Y,_)=>Y.overflows[1]-_.overflows[1])[0])==null?void 0:D.placement;if(!ee)switch(k){case"bestFit":{var O;const Y=(O=S.filter(_=>{if(H){const M=z2(_.placement);return M===b||M==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(M=>M>0).reduce((M,P)=>M+P,0)]).sort((_,M)=>_[1]-M[1])[0])==null?void 0:O[0];Y&&(ee=Y);break}case"initialPlacement":ee=h;break}if(r!==ee)return{reset:{placement:ee}}}return{}}}};async function FC(a,o){const{placement:c,platform:n,elements:r}=a,s=await(n.isRTL==null?void 0:n.isRTL(r.floating)),i=Ie(c),h=ve(c),l=z2(c)==="y",d=["left","top"].includes(i)?-1:1,p=s&&l?-1:1,y=B2(o,a);let{mainAxis:u,crossAxis:k,alignmentAxis:f}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return h&&typeof f=="number"&&(k=h==="end"?f*-1:f),l?{x:k*p,y:u*d}:{x:u*d,y:k*p}}const $C=function(a){return a===void 0&&(a=0),{name:"offset",options:a,async fn(o){var c,n;const{x:r,y:s,placement:i,middlewareData:h}=o,l=await FC(o,a);return i===((c=h.offset)==null?void 0:c.placement)&&(n=h.arrow)!=null&&n.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:i}}}}},RC=function(a){return a===void 0&&(a={}),{name:"shift",options:a,async fn(o){const{x:c,y:n,placement:r}=o,{mainAxis:s=!0,crossAxis:i=!1,limiter:h={fn:v=>{let{x:g,y:b}=v;return{x:g,y:b}}},...l}=B2(a,o),d={x:c,y:n},p=await Nx(o,l),y=z2(Ie(r)),u=ww(y);let k=d[u],f=d[y];if(s){const v=u==="y"?"top":"left",g=u==="y"?"bottom":"right",b=k+p[v],x=k-p[g];k=zx(b,k,x)}if(i){const v=y==="y"?"top":"left",g=y==="y"?"bottom":"right",b=f+p[v],x=f-p[g];f=zx(b,f,x)}const L=h.fn({...o,[u]:k,[y]:f});return{...L,data:{x:L.x-c,y:L.y-n,enabled:{[u]:s,[y]:i}}}}}};function rx(){return typeof window<"u"}function x2(a){return Ox(a)?(a.nodeName||"").toLowerCase():"#document"}function ne(a){var o;return(a==null||(o=a.ownerDocument)==null?void 0:o.defaultView)||window}function xe(a){var o;return(o=(Ox(a)?a.ownerDocument:a.document)||window.document)==null?void 0:o.documentElement}function Ox(a){return rx()?a instanceof Node||a instanceof ne(a).Node:!1}function le(a){return rx()?a instanceof Element||a instanceof ne(a).Element:!1}function ge(a){return rx()?a instanceof HTMLElement||a instanceof ne(a).HTMLElement:!1}function ow(a){return!rx()||typeof ShadowRoot>"u"?!1:a instanceof ShadowRoot||a instanceof ne(a).ShadowRoot}function F2(a){const{overflow:o,overflowX:c,overflowY:n,display:r}=ie(a);return/auto|scroll|overlay|hidden|clip/.test(o+n+c)&&!["inline","contents"].includes(r)}function NC(a){return["table","td","th"].includes(x2(a))}function sx(a){return[":popover-open",":modal"].some(o=>{try{return a.matches(o)}catch{return!1}})}function Ux(a){const o=Zx(),c=le(a)?ie(a):a;return["transform","translate","scale","rotate","perspective"].some(n=>c[n]?c[n]!=="none":!1)||(c.containerType?c.containerType!=="normal":!1)||!o&&(c.backdropFilter?c.backdropFilter!=="none":!1)||!o&&(c.filter?c.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(c.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(c.contain||"").includes(n))}function OC(a){let o=Ve(a);for(;ge(o)&&!q2(o);){if(Ux(o))return o;if(sx(o))return null;o=Ve(o)}return null}function Zx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function q2(a){return["html","body","#document"].includes(x2(a))}function ie(a){return ne(a).getComputedStyle(a)}function lx(a){return le(a)?{scrollLeft:a.scrollLeft,scrollTop:a.scrollTop}:{scrollLeft:a.scrollX,scrollTop:a.scrollY}}function Ve(a){if(x2(a)==="html")return a;const o=a.assignedSlot||a.parentNode||ow(a)&&a.host||xe(a);return ow(o)?o.host:o}function Lw(a){const o=Ve(a);return q2(o)?a.ownerDocument?a.ownerDocument.body:a.body:ge(o)&&F2(o)?o:Lw(o)}function E2(a,o,c){var n;o===void 0&&(o=[]),c===void 0&&(c=!0);const r=Lw(a),s=r===((n=a.ownerDocument)==null?void 0:n.body),i=ne(r);if(s){const h=qx(i);return o.concat(i,i.visualViewport||[],F2(r)?r:[],h&&c?E2(h):[])}return o.concat(r,E2(r,[],c))}function qx(a){return a.parent&&Object.getPrototypeOf(a.parent)?a.frameElement:null}function Iw(a){const o=ie(a);let c=parseFloat(o.width)||0,n=parseFloat(o.height)||0;const r=ge(a),s=r?a.offsetWidth:c,i=r?a.offsetHeight:n,h=QM(c)!==s||QM(n)!==i;return h&&(c=s,n=i),{width:c,height:n,$:h}}function _x(a){return le(a)?a:a.contextElement}function L2(a){const o=_x(a);if(!ge(o))return fe(1);const c=o.getBoundingClientRect(),{width:n,height:r,$:s}=Iw(o);let i=(s?QM(c.width):c.width)/n,h=(s?QM(c.height):c.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!h||!Number.isFinite(h))&&(h=1),{x:i,y:h}}const UC=fe(0);function Sw(a){const o=ne(a);return!Zx()||!o.visualViewport?UC:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function ZC(a,o,c){return o===void 0&&(o=!1),!c||o&&c!==ne(a)?!1:o}function M2(a,o,c,n){o===void 0&&(o=!1),c===void 0&&(c=!1);const r=a.getBoundingClientRect(),s=_x(a);let i=fe(1);o&&(n?le(n)&&(i=L2(n)):i=L2(a));const h=ZC(s,c,n)?Sw(s):fe(0);let l=(r.left+h.x)/i.x,d=(r.top+h.y)/i.y,p=r.width/i.x,y=r.height/i.y;if(s){const u=ne(s),k=n&&le(n)?ne(n):n;let f=u,L=qx(f);for(;L&&n&&k!==f;){const v=L2(L),g=L.getBoundingClientRect(),b=ie(L),x=g.left+(L.clientLeft+parseFloat(b.paddingLeft))*v.x,m=g.top+(L.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,d*=v.y,p*=v.x,y*=v.y,l+=x,d+=m,f=ne(L),L=qx(f)}}return ex({width:p,height:y,x:l,y:d})}function Wx(a,o){const c=lx(a).scrollLeft;return o?o.left+c:M2(xe(a)).left+c}function zw(a,o,c){c===void 0&&(c=!1);const n=a.getBoundingClientRect(),r=n.left+o.scrollLeft-(c?0:Wx(a,n)),s=n.top+o.scrollTop;return{x:r,y:s}}function _C(a){let{elements:o,rect:c,offsetParent:n,strategy:r}=a;const s=r==="fixed",i=xe(n),h=o?sx(o.floating):!1;if(n===i||h&&s)return c;let l={scrollLeft:0,scrollTop:0},d=fe(1);const p=fe(0),y=ge(n);if((y||!y&&!s)&&((x2(n)!=="body"||F2(i))&&(l=lx(n)),ge(n))){const k=M2(n);d=L2(n),p.x=k.x+n.clientLeft,p.y=k.y+n.clientTop}const u=i&&!y&&!s?zw(i,l,!0):fe(0);return{width:c.width*d.x,height:c.height*d.y,x:c.x*d.x-l.scrollLeft*d.x+p.x+u.x,y:c.y*d.y-l.scrollTop*d.y+p.y+u.y}}function WC(a){return Array.from(a.getClientRects())}function GC(a){const o=xe(a),c=lx(a),n=a.ownerDocument.body,r=v2(o.scrollWidth,o.clientWidth,n.scrollWidth,n.clientWidth),s=v2(o.scrollHeight,o.clientHeight,n.scrollHeight,n.clientHeight);let i=-c.scrollLeft+Wx(a);const h=-c.scrollTop;return ie(n).direction==="rtl"&&(i+=v2(o.clientWidth,n.clientWidth)-r),{width:r,height:s,x:i,y:h}}function XC(a,o){const c=ne(a),n=xe(a),r=c.visualViewport;let s=n.clientWidth,i=n.clientHeight,h=0,l=0;if(r){s=r.width,i=r.height;const d=Zx();(!d||d&&o==="fixed")&&(h=r.offsetLeft,l=r.offsetTop)}return{width:s,height:i,x:h,y:l}}function KC(a,o){const c=M2(a,!0,o==="fixed"),n=c.top+a.clientTop,r=c.left+a.clientLeft,s=ge(a)?L2(a):fe(1),i=a.clientWidth*s.x,h=a.clientHeight*s.y,l=r*s.x,d=n*s.y;return{width:i,height:h,x:l,y:d}}function cw(a,o,c){let n;if(o==="viewport")n=XC(a,c);else if(o==="document")n=GC(xe(a));else if(le(o))n=KC(o,c);else{const r=Sw(a);n={x:o.x-r.x,y:o.y-r.y,width:o.width,height:o.height}}return ex(n)}function qw(a,o){const c=Ve(a);return c===o||!le(c)||q2(c)?!1:ie(c).position==="fixed"||qw(c,o)}function QC(a,o){const c=o.get(a);if(c)return c;let n=E2(a,[],!1).filter(h=>le(h)&&x2(h)!=="body"),r=null;const s=ie(a).position==="fixed";let i=s?Ve(a):a;for(;le(i)&&!q2(i);){const h=ie(i),l=Ux(i);!l&&h.position==="fixed"&&(r=null),(s?!l&&!r:!l&&h.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||F2(i)&&!l&&qw(a,i))?n=n.filter(p=>p!==i):r=h,i=Ve(i)}return o.set(a,n),n}function JC(a){let{element:o,boundary:c,rootBoundary:n,strategy:r}=a;const i=[...c==="clippingAncestors"?sx(o)?[]:QC(o,this._c):[].concat(c),n],h=i[0],l=i.reduce((d,p)=>{const y=cw(o,p,r);return d.top=v2(y.top,d.top),d.right=S2(y.right,d.right),d.bottom=S2(y.bottom,d.bottom),d.left=v2(y.left,d.left),d},cw(o,h,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function YC(a){const{width:o,height:c}=Iw(a);return{width:o,height:c}}function eL(a,o,c){const n=ge(o),r=xe(o),s=c==="fixed",i=M2(a,!0,s,o);let h={scrollLeft:0,scrollTop:0};const l=fe(0);if(n||!n&&!s)if((x2(o)!=="body"||F2(r))&&(h=lx(o)),n){const u=M2(o,!0,s,o);l.x=u.x+o.clientLeft,l.y=u.y+o.clientTop}else r&&(l.x=Wx(r));const d=r&&!n&&!s?zw(r,h):fe(0),p=i.left+h.scrollLeft-l.x-d.x,y=i.top+h.scrollTop-l.y-d.y;return{x:p,y,width:i.width,height:i.height}}function Cx(a){return ie(a).position==="static"}function nw(a,o){if(!ge(a)||ie(a).position==="fixed")return null;if(o)return o(a);let c=a.offsetParent;return xe(a)===c&&(c=c.ownerDocument.body),c}function Vw(a,o){const c=ne(a);if(sx(a))return c;if(!ge(a)){let r=Ve(a);for(;r&&!q2(r);){if(le(r)&&!Cx(r))return r;r=Ve(r)}return c}let n=nw(a,o);for(;n&&NC(n)&&Cx(n);)n=nw(n,o);return n&&q2(n)&&Cx(n)&&!Ux(n)?c:n||OC(a)||c}const tL=async function(a){const o=this.getOffsetParent||Vw,c=this.getDimensions,n=await c(a.floating);return{reference:eL(a.reference,await o(a.floating),a.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function aL(a){return ie(a).direction==="rtl"}const oL={convertOffsetParentRelativeRectToViewportRelativeRect:_C,getDocumentElement:xe,getClippingRect:JC,getOffsetParent:Vw,getElementRects:tL,getClientRects:WC,getDimensions:YC,getScale:L2,isElement:le,isRTL:aL};function Bw(a,o){return a.x===o.x&&a.y===o.y&&a.width===o.width&&a.height===o.height}function cL(a,o){let c=null,n;const r=xe(a);function s(){var h;clearTimeout(n),(h=c)==null||h.disconnect(),c=null}function i(h,l){h===void 0&&(h=!1),l===void 0&&(l=1),s();const d=a.getBoundingClientRect(),{left:p,top:y,width:u,height:k}=d;if(h||o(),!u||!k)return;const f=N2(y),L=N2(r.clientWidth-(p+u)),v=N2(r.clientHeight-(y+k)),g=N2(p),x={rootMargin:-f+"px "+-L+"px "+-v+"px "+-g+"px",threshold:v2(0,S2(1,l))||1};let m=!0;function w(H){const j=H[0].intersectionRatio;if(j!==l){if(!m)return i();j?i(!1,j):n=setTimeout(()=>{i(!1,1e-7)},1e3)}j===1&&!Bw(d,a.getBoundingClientRect())&&i(),m=!1}try{c=new IntersectionObserver(w,{...x,root:r.ownerDocument})}catch{c=new IntersectionObserver(w,x)}c.observe(a)}return i(!0),s}function Aw(a,o,c,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,d=_x(a),p=r||s?[...d?E2(d):[],...E2(o)]:[];p.forEach(g=>{r&&g.addEventListener("scroll",c,{passive:!0}),s&&g.addEventListener("resize",c)});const y=d&&h?cL(d,c):null;let u=-1,k=null;i&&(k=new ResizeObserver(g=>{let[b]=g;b&&b.target===d&&k&&(k.unobserve(o),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var x;(x=k)==null||x.observe(o)})),c()}),d&&!l&&k.observe(d),k.observe(o));let f,L=l?M2(a):null;l&&v();function v(){const g=M2(a);L&&!Bw(L,g)&&c(),L=g,f=requestAnimationFrame(v)}return c(),()=>{var g;p.forEach(b=>{r&&b.removeEventListener("scroll",c),s&&b.removeEventListener("resize",c)}),y==null||y(),(g=k)==null||g.disconnect(),k=null,l&&cancelAnimationFrame(f)}}const ix=$C,Hw=TC,dx=RC,hx=DC,nL=jC,rL=(a,o,c)=>{const n=new Map,r={platform:oL,...c},s={...r.platform,_c:n};return PC(a,o,{...r,platform:s})};function sL(a){return a!=null&&typeof a=="object"&&"$el"in a}function Vx(a){if(sL(a)){const o=a.$el;return Ox(o)&&x2(o)==="#comment"?null:o}return a}function C2(a){return typeof a=="function"?a():e.unref(a)}function Pw(a){return{name:"arrow",options:a,fn(o){const c=Vx(C2(a.element));return c==null?{}:nL({element:c,padding:a.padding}).fn(o)}}}function jw(a){return typeof window>"u"?1:(a.ownerDocument.defaultView||window).devicePixelRatio||1}function rw(a,o){const c=jw(a);return Math.round(o*c)/c}function ux(a,o,c){c===void 0&&(c={});const n=c.whileElementsMounted,r=e.computed(()=>{var j;return(j=C2(c.open))!=null?j:!0}),s=e.computed(()=>C2(c.middleware)),i=e.computed(()=>{var j;return(j=C2(c.placement))!=null?j:"bottom"}),h=e.computed(()=>{var j;return(j=C2(c.strategy))!=null?j:"absolute"}),l=e.computed(()=>{var j;return(j=C2(c.transform))!=null?j:!0}),d=e.computed(()=>Vx(a.value)),p=e.computed(()=>Vx(o.value)),y=e.ref(0),u=e.ref(0),k=e.ref(h.value),f=e.ref(i.value),L=e.shallowRef({}),v=e.ref(!1),g=e.computed(()=>{const j={position:k.value,left:"0",top:"0"};if(!p.value)return j;const B=rw(p.value,y.value),$=rw(p.value,u.value);return l.value?{...j,transform:"translate("+B+"px, "+$+"px)",...jw(p.value)>=1.5&&{willChange:"transform"}}:{position:k.value,left:B+"px",top:$+"px"}});let b;function x(){if(d.value==null||p.value==null)return;const j=r.value;rL(d.value,p.value,{middleware:s.value,placement:i.value,strategy:h.value}).then(B=>{y.value=B.x,u.value=B.y,k.value=B.strategy,f.value=B.placement,L.value=B.middlewareData,v.value=j!==!1})}function m(){typeof b=="function"&&(b(),b=void 0)}function w(){if(m(),n===void 0){x();return}if(d.value!=null&&p.value!=null){b=n(d.value,p.value,x);return}}function H(){r.value||(v.value=!1)}return e.watch([s,i,h,r],x,{flush:"sync"}),e.watch([d,p],w,{flush:"sync"}),e.watch(r,H,{flush:"sync"}),e.getCurrentScope()&&e.onScopeDispose(m),{x:e.shallowReadonly(y),y:e.shallowReadonly(u),strategy:e.shallowReadonly(k),placement:e.shallowReadonly(f),middlewareData:e.shallowReadonly(L),isPositioned:e.shallowReadonly(v),floatingStyles:g,update:x}}function lL(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}const iL=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function sw(a,o,c={}){const{immediate:n=!0,immediateCallback:r=!1}=c,s=e.shallowRef(!1);let i=null;function h(){i&&(clearTimeout(i),i=null)}function l(){s.value=!1,h()}function d(...p){r&&a(),h(),s.value=!0,i=setTimeout(()=>{s.value=!1,i=null,a(...p)},e.toValue(o))}return n&&(s.value=!0,iL&&d()),lL(l),{isPending:e.readonly(s),start:d,stop:l}}function Ew(a={}){const{openDelay:o=0,closeDelay:c=150,onOpen:n,onClose:r,initiallyOpened:s=!1}=a,i=e.ref(!1),{start:h,stop:l}=sw(()=>{i.value=!0,n==null||n()},o),{start:d,stop:p}=sw(()=>{i.value=!1,r==null||r()},c),y=()=>{p(),o===0?(i.value=!0,n==null||n()):h()},u=()=>{l(),c===0?(i.value=!1,r==null||r()):d()};return s&&y(),{isOpen:i,open:y,close:u}}const Gx=Symbol("hover-card"),Xx=e.defineComponent({__name:"HoverCardTarget",props:{withWrapper:{type:Boolean,default:!1},wrapperClass:{default:""}},setup(a){return e.inject(Gx,null),(o,c)=>o.withWrapper?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.wrapperClass)},[e.renderSlot(o.$slots,"default")],2)):e.renderSlot(o.$slots,"default",{key:1})}}),dL={class:"rounded-lg bg-white shadow-lg border border-gray-200 px-3 py-2"},Tw=e.defineComponent({__name:"HoverCard",props:{initiallyOpened:{type:Boolean,default:!1},openDelay:{default:0},closeDelay:{default:150},placement:{default:"bottom"},onOpen:{},onClose:{},offset:{default:8},disabled:{type:Boolean,default:!1},size:{default:"md"},withArrow:{type:Boolean,default:!0},arrowOffset:{default:8},trapFocus:{type:Boolean,default:!0},zIndex:{default:1e3}},setup(a){const o=a,c=e.ref(!1);e.onMounted(()=>{c.value=!0});const n=e.ref(null),r=e.ref(null),s=e.ref(null),{isOpen:i,open:h,close:l}=Ew({openDelay:o.openDelay,closeDelay:o.closeDelay,initiallyOpened:o.initiallyOpened});e.provide(Gx,{isOpen:i,open:h,close:l});const{x:d,y:p,strategy:y,middlewareData:u,placement:k,update:f}=ux(r,s,{placement:o.placement,middleware:[ix(o.offset),hx({fallbackPlacements:["top","bottom","right","left"].filter(m=>m!==o.placement)}),dx({padding:8}),Pw({element:n})]});e.watch(i,async m=>{m&&await f()});const L=e.computed(()=>{var m,w;return(w=(m=u.value)==null?void 0:m.arrow)==null?void 0:w.x}),v=e.computed(()=>{var m,w;return(w=(m=u.value)==null?void 0:m.arrow)==null?void 0:w.y}),g=e.computed(()=>{switch(k.value){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return"bottom"}}),b=e.computed(()=>{switch(k.value){case"top":return"translate(-50%, 50%)";case"bottom":return"translate(-50%, -50%)";case"left":return"translate(50%, -50%)";case"right":return"translate(-50%, -50%)";default:return"translate(-50%, -50%)"}}),x=e.computed(()=>({xs:"w-[200px]",sm:"w-[240px]",md:"w-[320px]",lg:"w-[400px]",xl:"w-[480px]"})[o.size]);return(m,w)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"reference",ref:r,class:"relative inline-block",onMouseenter:w[2]||(w[2]=H=>!m.disabled&&e.unref(h)()),onMouseleave:w[3]||(w[3]=H=>!m.disabled&&e.unref(l)())},[e.createVNode(Xx,null,{default:e.withCtx(()=>[e.renderSlot(m.$slots,"target")]),_:3}),c.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"opacity-0 translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition duration-150 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 translate-y-1"},{default:e.withCtx(()=>[e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"floating",ref:s,style:e.normalizeStyle({position:e.unref(y),top:`${e.unref(p)??0}px`,left:`${e.unref(d)??0}px`,zIndex:m.zIndex||1e3}),class:e.normalizeClass(["min-w-[200px]",[x.value]]),onMouseenter:w[0]||(w[0]=H=>!m.disabled&&e.unref(h)()),onMouseleave:w[1]||(w[1]=H=>!m.disabled&&e.unref(l)())},[e.createElementVNode("div",dL,[e.renderSlot(m.$slots,"dropdown")]),m.withArrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowRef",ref:n,class:"absolute w-2 h-2 rotate-45 bg-white border border-gray-200",style:e.normalizeStyle({position:"absolute",left:`${L.value??0}px`,top:`${v.value??0}px`,[g.value]:"-1px","z-index":-1,"transform-origin":"center",transform:`rotate(45deg) ${b.value}`})},null,4)):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)],544))}});Object.assign(Tw,{Target:Xx});const hL={class:"cstu-modal-title"},uL=["innerHTML"],pL=e.defineComponent({__name:"MessageBoxOk",props:{message:{type:[String,Object],default:""},title:{type:String,default:"Message"},okTitle:{type:String,default:"OK"},okVariant:{type:String,default:"filled"},okColor:{type:String,default:"primary"},okDisabled:{type:Boolean,default:!1},centered:{type:Boolean,default:!0},scrollable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},size:{type:String,default:"md"},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},contentClass:{type:String,default:""},dialogClass:{type:String,default:""},modalClass:{type:String,default:""},showHeaderDivider:{type:Boolean,default:!1},showFooterDivider:{type:Boolean,default:!1},showDividers:{type:Boolean,default:!1},radius:{type:String,default:""},busy:{type:Boolean,default:!1},zIndex:{type:Number,default:1050}},emits:["close"],setup(a,{emit:o}){const c=a,n=o,r=e.ref(!1),s=e.computed(()=>c.radius?{[`cstu-radius-${c.radius}`]:!0}:{});function i(){h(!1)}function h(l){r.value=!1,setTimeout(()=>{document.body.classList.remove("cstu-modal-open"),n("close",l)},300)}return e.onMounted(()=>{document.body.classList.add("cstu-modal-open"),e.nextTick(()=>{r.value=!0})}),e.onBeforeUnmount(()=>{r.value=!1,document.body.classList.remove("cstu-modal-open")}),(l,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-modal-backdrop",style:e.normalizeStyle({zIndex:a.zIndex-10})},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"cstu-modal"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-modal modal",{"cstu-modal-static":!0,"cstu-modal-scrollable":a.scrollable},a.modalClass]),style:e.normalizeStyle({display:r.value?"block":"none",zIndex:a.zIndex}),tabindex:"-1",role:"dialog","aria-modal":"true",onClick:i},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-dialog",a.dialogClass,{"cstu-modal-fullscreen":a.fullscreen,"cstu-modal-dialog-centered":a.centered&&!a.fullscreen,"cstu-modal-dialog-scrollable":a.scrollable,[`cstu-modal-${a.size}`]:a.size&&!a.fullscreen}]),onClick:d[2]||(d[2]=e.withModifiers(()=>{},["stop"]))},[d[4]||(d[4]=e.createElementVNode("span",{tabindex:"0"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",a.contentClass,{"cstu-modal-content-fullscreen":a.fullscreen},s.value]),tabindex:"-1"},[e.createElementVNode("header",{class:e.normalizeClass(["cstu-modal-header",a.headerClass,{"show-divider":a.showHeaderDivider||a.showDividers}])},[e.createElementVNode("h5",hL,e.toDisplayString(a.title||"Message"),1),e.createElementVNode("button",{type:"button",class:"cstu-close","aria-label":"Close",onClick:d[0]||(d[0]=p=>h(!1))},d[3]||(d[3]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"cstu-size-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})],-1)]))],2),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",a.bodyClass])},[typeof a.message=="string"?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:a.message},null,8,uL)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.message),{key:1}))],2),e.createElementVNode("footer",{class:e.normalizeClass(["cstu-modal-footer",a.footerClass,{"show-divider":a.showFooterDivider||a.showDividers}])},[e.createVNode(K,{variant:a.okVariant,color:a.okColor,disabled:a.okDisabled||a.busy,loading:a.busy,size:"sm",onClick:d[1]||(d[1]=p=>h(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])],2)],2),d[5]||(d[5]=e.createElementVNode("span",{tabindex:"0"},null,-1))],2)],6)):e.createCommentVNode("",!0)]),_:1})],64))}}),yL={class:"cstu-modal-title"},kL=["innerHTML"],mL=e.defineComponent({__name:"MessageBoxConfirm",props:{message:{type:[String,Object],default:""},title:{type:String,default:"Confirm"},okTitle:{type:String,default:"OK"},okVariant:{type:String,default:"filled"},okColor:{type:String,default:"primary"},okDisabled:{type:Boolean,default:!1},cancelTitle:{type:String,default:"Cancel"},cancelVariant:{type:String,default:"outline"},cancelColor:{type:String,default:"secondary"},cancelDisabled:{type:Boolean,default:!1},centered:{type:Boolean,default:!0},scrollable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},size:{type:String,default:"md"},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},contentClass:{type:String,default:""},dialogClass:{type:String,default:""},modalClass:{type:String,default:""},showHeaderDivider:{type:Boolean,default:!1},showFooterDivider:{type:Boolean,default:!1},showDividers:{type:Boolean,default:!1},radius:{type:String,default:""},busy:{type:Boolean,default:!1},onConfirm:{type:Function,default:void 0},onConfirmSuccess:{type:Function,default:void 0},onConfirmError:{type:Function,default:void 0},closeOnConfirmSuccess:{type:Boolean,default:!0},closeOnConfirmError:{type:Boolean,default:!1},zIndex:{type:Number,default:1050}},emits:["close","confirm-success","confirm-error"],setup(a,{emit:o}){const c=a,n=o,r=e.ref(!1),s=e.ref(!1),i=e.computed(()=>c.busy||s.value),h=e.computed(()=>c.radius?{[`cstu-radius-${c.radius}`]:!0}:{});function l(){i.value||d(!1)}function d(u){r.value=!1,setTimeout(()=>{document.body.classList.remove("cstu-modal-open"),n("close",u)},300)}async function p(){if(!c.onConfirm){d(!0);return}try{s.value=!0;const u=await c.onConfirm();n("confirm-success",u),c.onConfirmSuccess&&c.onConfirmSuccess(u),c.closeOnConfirmSuccess&&d(!0)}catch(u){n("confirm-error",u),c.onConfirmError&&c.onConfirmError(u),c.closeOnConfirmError&&d(!1)}finally{s.value=!1}}function y(){i.value||d(!1)}return e.onMounted(()=>{document.body.classList.add("cstu-modal-open"),e.nextTick(()=>{r.value=!0})}),e.onBeforeUnmount(()=>{r.value=!1,document.body.classList.remove("cstu-modal-open")}),(u,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-modal-backdrop",style:e.normalizeStyle({zIndex:a.zIndex-10})},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"cstu-modal"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-modal modal",{"cstu-modal-static":!0,"cstu-modal-scrollable":a.scrollable},a.modalClass]),style:e.normalizeStyle({display:r.value?"block":"none",zIndex:a.zIndex}),tabindex:"-1",role:"dialog","aria-modal":"true",onClick:l},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-dialog",a.dialogClass,{"cstu-modal-fullscreen":a.fullscreen,"cstu-modal-dialog-centered":a.centered&&!a.fullscreen,"cstu-modal-dialog-scrollable":a.scrollable,[`cstu-modal-${a.size}`]:a.size&&!a.fullscreen}]),onClick:k[1]||(k[1]=e.withModifiers(()=>{},["stop"]))},[k[3]||(k[3]=e.createElementVNode("span",{tabindex:"0"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",a.contentClass,{"cstu-modal-content-fullscreen":a.fullscreen},h.value]),tabindex:"-1"},[e.createElementVNode("header",{class:e.normalizeClass(["cstu-modal-header",a.headerClass,{"show-divider":a.showHeaderDivider||a.showDividers}])},[e.createElementVNode("h5",yL,e.toDisplayString(a.title||"Confirm"),1),e.createElementVNode("button",{type:"button",class:"cstu-close","aria-label":"Close",onClick:y},k[2]||(k[2]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"cstu-size-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})],-1)]))],2),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",a.bodyClass])},[typeof a.message=="string"?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:a.message},null,8,kL)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.message),{key:1}))],2),e.createElementVNode("footer",{class:e.normalizeClass(["cstu-modal-footer",a.footerClass,{"show-divider":a.showFooterDivider||a.showDividers}])},[e.createVNode(K,{variant:a.cancelVariant,color:a.cancelColor,disabled:a.cancelDisabled||i.value,size:"sm",onClick:k[0]||(k[0]=f=>d(!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.cancelTitle),1)]),_:1},8,["variant","color","disabled"]),e.createVNode(K,{variant:a.okVariant,color:a.okColor,disabled:a.okDisabled||i.value,size:"sm",loading:i.value,onClick:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])],2)],2),k[4]||(k[4]=e.createElementVNode("span",{tabindex:"0"},null,-1))],2)],6)):e.createCommentVNode("",!0)]),_:1})],64))}}),fL=Symbol("CstuModal"),H2=e.reactive(new Map),tx={show:a=>{const o=H2.get(a);o&&typeof o.show=="function"&&o.show()},hide:a=>{const o=H2.get(a);o&&typeof o.hide=="function"&&o.hide()},toggle:a=>{const o=H2.get(a);o&&typeof o.toggle=="function"&&o.toggle()},msgBoxOk:(a,o={})=>{const c=document.createElement("div");document.body.appendChild(c);const n={...o,message:a};return new Promise(r=>{const s=e.createApp(pL,{...n,onClose:i=>{r(i),setTimeout(()=>{s.unmount(),c.parentNode&&c.parentNode.removeChild(c)},300)}});s.mount(c)})},msgBoxConfirm:(a,o={})=>{const c=document.createElement("div");document.body.appendChild(c);const n={...o,message:a};return new Promise(r=>{const s=e.createApp(mL,{...n,onClose:i=>{r(i),setTimeout(()=>{s.unmount(),c.parentNode&&c.parentNode.removeChild(c)},300)}});s.mount(c)})}},lw=tx;function vL(){return tx}function iw(a,o){H2.set(a,o)}function dw(a){H2.delete(a)}const gL={install:a=>{a.provide(fL,tx),a.config.globalProperties.$cstuModal=tx}},Dw=document.createElement("style");Dw.textContent=`
|
|
1
|
+
"use strict";var yb=Object.defineProperty;var kb=(a,o,c)=>o in a?yb(a,o,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[o]=c;var Se=(a,o,c)=>(kb(a,typeof o!="symbol"?o+"":o,c),c);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),F=require("./tailwind-e7334431.cjs"),Le={primary:{base:"primary",light:"50",main:"500",dark:"600",hover:"550",border:"600",focus:"600"},secondary:{base:"secondary",light:"200",main:"575",dark:"700",hover:"600",border:"600",focus:"500"},success:{base:"success",light:"50",main:"500",dark:"700",hover:"600",border:"200",focus:"500"},warning:{base:"warning",light:"50",main:"500",dark:"700",hover:"600",border:"200",focus:"500"},danger:{base:"danger",light:"50",main:"500",dark:"700",hover:"600",border:"200",focus:"500"},info:{base:"info",light:"50",main:"450",dark:"600",hover:"500",border:"200",focus:"550"},dark:{base:"gray",light:"100",main:"900",dark:"950",hover:"800",border:"300",focus:"700"},light:{base:"gray",light:"100",main:"400",dark:"500",hover:"400",border:"200",focus:"300"}},U=(a,o,c={})=>{const{hover:n=!1,active:r=!1,focus:s=!1,disabled:i=!1}=c;if(i)return"cstu-bg-gray-100 cstu-border-gray-200 cstu-text-gray-400 cstu-cursor-not-allowed";const h=Le[a];if(!h)return"";if(o==="text")return[`cstu-text-${h.base}-${h.main}`,n&&`hover:cstu-text-${h.base}-${h.hover}`,r&&`active:cstu-text-${h.base}-${h.dark}`,s&&`focus:cstu-text-${h.base}-${h.focus}`,i&&"cstu-opacity-50 cstu-cursor-not-allowed"].filter(Boolean);const l=[];switch(o){case"filled":l.push(`cstu-bg-${h.base}-${h.main}`),l.push("cstu-text-white"),n&&l.push(`hover:cstu-bg-${h.base}-${h.hover} hover:cstu-shadow-md`),r&&l.push(`active:cstu-bg-${h.base}-${h.dark}`),s&&l.push(`focus:cstu-ring-${h.base}-${h.focus}/20`);break;case"light":l.push(`cstu-bg-${h.base}-${h.light}`),l.push(`cstu-text-${h.base}-${h.main}`),n&&l.push(`hover:cstu-bg-${h.base}-250`),r&&l.push(`active:cstu-bg-${h.base}-300 active:!cstu-text-white`),s&&l.push(`focus:cstu-ring-${h.base}-${h.focus}/20`);break;case"outline":l.push("cstu-bg-white"),l.push(`cstu-text-${h.base}-${h.main}`),l.push(`cstu-border cstu-border-${h.base}-${h.main}`),a==="secondary"?(l.pop(),l.pop(),l.push("cstu-text-secondary-400"),l.push("cstu-border cstu-border-secondary-400/50"),n&&l.push("hover:cstu-bg-secondary-400/[0.06] hover:cstu-text-secondary-500"),r&&l.push("active:cstu-bg-secondary-250 active:cstu-text-secondary-500")):(n&&l.push(`hover:cstu-bg-${h.base}-50`),r&&l.push(`active:cstu-bg-${h.base}-100`)),s&&l.push(`focus:cstu-ring-${h.base}-${h.focus}/20`);break;case"subtle":l.push(`cstu-text-${h.base}-${h.main}`),n&&l.push(`hover:cstu-bg-${h.base}-50`),r&&l.push(`active:cstu-bg-${h.base}-100`),s&&l.push(`focus:cstu-ring-${h.base}-${h.focus}/20`);break}return l.join(" ")},mb=(a,o)=>{if(o==="filled")return"cstu-text-white";const c=Le[a];return`cstu-text-${c.base}-${c.main}`},Tx=a=>{const o=["cstu-shadow-sm","cstu-transition-all cstu-duration-200"];switch(a){case"filled":o.push("cstu-border-transparent");break;case"light":o.push("cstu-border");break;case"outline":o.push("cstu-border");break;case"subtle":o.push("cstu-shadow-none");break;case"text":o.push("cstu-shadow-none");break;default:o.push("cstu-border")}return o.join(" ")},fb=a=>{const o=Le[a];return["focus:cstu-outline-none","focus:cstu-ring-2","focus:cstu-ring-offset-0",`focus:cstu-ring-${o.base}-${o.focus}/20`].join(" ")},oe=a=>a?["primary","secondary","success","warning","danger","info","dark","light","initials"].includes(a):!0,fw={button:{xs:{height:"cstu-h-[30px]",gap:"cstu-gap-[0.55rem]",padding:{x:"cstu-px-[0.67rem]",y:"cstu-py-[0.67rem]"},text:"cstu-text-xs cstu-leading-none",icon:"cstu-w-3 cstu-h-3"},sm:{height:"cstu-h-[36px]",gap:"cstu-gap-[0.66rem]",padding:{x:"cstu-px-[0.8rem]",y:"cstu-py-[0.8rem]"},text:"cstu-text-sm cstu-leading-none",icon:"cstu-w-4 cstu-h-4"},md:{height:"cstu-h-[40px]",gap:"cstu-gap-[0.74rem]",padding:{x:"cstu-px-[0.89rem]",y:"cstu-py-[0.89rem]"},text:"cstu-text-base cstu-leading-none",icon:"cstu-w-5 cstu-h-5"},lg:{height:"cstu-h-[45px]",gap:"cstu-gap-[0.83rem]",padding:{x:"cstu-px-4",y:"cstu-py-4"},text:"cstu-text-lg cstu-leading-none",icon:"cstu-w-6 cstu-h-6"},xl:{height:"cstu-h-[50px]",gap:"cstu-gap-[0.92rem]",padding:{x:"cstu-px-[1.11rem]",y:"cstu-py-[1.11rem]"},text:"cstu-text-xl cstu-leading-none",icon:"cstu-w-7 cstu-h-7"}},badge:{xs:{padding:{x:"cstu-px-2",y:"cstu-py-0.5"},text:"cstu-text-xs",icon:"cstu-w-3 cstu-h-3"},sm:{padding:{x:"cstu-px-2.5",y:"cstu-py-1"},text:"cstu-text-sm",icon:"cstu-w-3.5 cstu-h-3.5"},md:{padding:{x:"cstu-px-3",y:"cstu-py-1.5"},text:"cstu-text-base",icon:"cstu-w-4 cstu-h-4"},lg:{padding:{x:"cstu-px-4",y:"cstu-py-2"},text:"cstu-text-lg",icon:"cstu-w-5 cstu-h-5"},xl:{padding:{x:"cstu-px-5",y:"cstu-py-2.5"},text:"cstu-text-xl",icon:"cstu-w-6 cstu-h-6"}},input:{xs:{padding:{x:"cstu-px-2",y:"cstu-py-1"},text:"cstu-text-xs",height:"cstu-h-7"},sm:{padding:{x:"cstu-px-3",y:"cstu-py-1.5"},text:"cstu-text-sm",height:"cstu-h-8"},md:{padding:{x:"cstu-px-3",y:"cstu-py-2"},text:"cstu-text-base",height:"cstu-h-10"},lg:{padding:{x:"cstu-px-4",y:"cstu-py-2.5"},text:"cstu-text-lg",height:"cstu-h-11"},xl:{padding:{x:"cstu-px-4",y:"cstu-py-3"},text:"cstu-text-xl",height:"cstu-h-12"}},notification:{xs:{padding:{x:"cstu-px-3",y:"cstu-py-2"},text:"cstu-text-xs"},sm:{padding:{x:"cstu-px-4",y:"cstu-py-2.5"},text:"cstu-text-sm"},md:{padding:{x:"cstu-px-4",y:"cstu-py-3"},text:"cstu-text-base"},lg:{padding:{x:"cstu-px-5",y:"cstu-py-4"},text:"cstu-text-lg"},xl:{padding:{x:"cstu-px-6",y:"cstu-py-5"},text:"cstu-text-xl"}},switch:{xs:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-xs",height:"cstu-h-4"},sm:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-sm",height:"cstu-h-5"},md:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-base",height:"cstu-h-6"},lg:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-lg",height:"cstu-h-7"},xl:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-xl",height:"cstu-h-8"}},chip:{xs:{padding:{x:"cstu-px-1.5",y:"cstu-py-0.5"},text:"cstu-text-xs",icon:"cstu-w-2.5 cstu-h-2.5"},sm:{padding:{x:"cstu-px-2",y:"cstu-py-1"},text:"cstu-text-sm",icon:"cstu-w-3 cstu-h-3"},md:{padding:{x:"cstu-px-2.5",y:"cstu-py-1.5"},text:"cstu-text-base",icon:"cstu-w-3.5 cstu-h-3.5"},lg:{padding:{x:"cstu-px-3",y:"cstu-py-2"},text:"cstu-text-lg",icon:"cstu-w-4 cstu-h-4"},xl:{padding:{x:"cstu-px-3.5",y:"cstu-py-2.5"},text:"cstu-text-xl",icon:"cstu-w-4.5 cstu-h-4.5"}},checkbox:{xs:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-xs",icon:"cstu-w-2 cstu-h-2"},sm:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-sm",icon:"cstu-w-2.5 cstu-h-2.5"},md:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-base",icon:"cstu-w-3 cstu-h-3"},lg:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-lg",icon:"cstu-w-4 cstu-h-4"},xl:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-xl",icon:"cstu-w-5 cstu-h-5"}},indicator:{xs:{padding:{x:"cstu-px-0.5",y:"cstu-py-0.5"},text:"cstu-text-[10px]",height:"cstu-h-3.5 cstu-min-w-3.5"},sm:{padding:{x:"cstu-px-1",y:"cstu-py-0.5"},text:"cstu-text-[11px]",height:"cstu-h-4 cstu-min-w-4"},md:{padding:{x:"cstu-px-1.5",y:"cstu-py-0.5"},text:"cstu-text-xs",height:"cstu-h-5 cstu-min-w-5"},lg:{padding:{x:"cstu-px-2",y:"cstu-py-0.5"},text:"cstu-text-xs",height:"cstu-h-6 cstu-min-w-6"},xl:{padding:{x:"cstu-px-2.5",y:"cstu-py-0.5"},text:"cstu-text-sm",height:"cstu-h-7 cstu-min-w-7"}},progress:{xs:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-xs",height:"cstu-h-[0.125rem]"},sm:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-sm",height:"cstu-h-[0.1875rem]"},md:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-base",height:"cstu-h-[0.25rem]"},lg:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-sm",height:"cstu-h-[0.3125rem]"},xl:{padding:{x:"cstu-px-0",y:"cstu-py-0"},text:"cstu-text-base",height:"cstu-h-[0.375rem]"}},alert:{xs:{padding:{x:"cstu-px-3",y:"cstu-py-2"},text:"cstu-text-xs",icon:"cstu-w-4 cstu-h-4"},sm:{padding:{x:"cstu-px-3",y:"cstu-py-2.5"},text:"cstu-text-sm",icon:"cstu-w-5 cstu-h-5"},md:{padding:{x:"cstu-px-4",y:"cstu-py-3"},text:"cstu-text-base",icon:"cstu-w-5 cstu-h-5"},lg:{padding:{x:"cstu-px-5",y:"cstu-py-4"},text:"cstu-text-lg",icon:"cstu-w-6 cstu-h-6"},xl:{padding:{x:"cstu-px-6",y:"cstu-py-5"},text:"cstu-text-xl",icon:"cstu-w-7 cstu-h-7"}},segmentedControl:{xs:{gap:"cstu-gap-[8px]",padding:{x:"cstu-px-[10.5px]",y:"cstu-py-[3.5px]"},text:"cstu-text-xs",height:"cstu-h-6"},sm:{gap:"cstu-gap-[9px]",padding:{x:"cstu-px-[12px]",y:"cstu-py-[4px]"},text:"cstu-text-sm",height:"cstu-h-8"},md:{gap:"cstu-gap-[10px]",padding:{x:"cstu-px-[13.5px]",y:"cstu-py-[4.5px]"},text:"cstu-text-base",height:"cstu-h-10"},lg:{gap:"cstu-gap-[11px]",padding:{x:"cstu-px-[15px]",y:"cstu-py-[5px]"},text:"cstu-text-lg",height:"cstu-h-12"},xl:{gap:"cstu-gap-[12px]",padding:{x:"cstu-px-[16.5px]",y:"cstu-py-[5.5px]"},text:"cstu-text-xl",height:"cstu-h-14"}},segmentedControlContainer:{xs:{gap:"cstu-gap-[5.25px]",padding:{x:"cstu-px-[5.25px]",y:"cstu-py-[5.25px]"}},sm:{gap:"cstu-gap-[6px]",padding:{x:"cstu-px-[6px]",y:"cstu-py-[6px]"}},md:{gap:"cstu-gap-[6.75px]",padding:{x:"cstu-px-[6.75px]",y:"cstu-py-[6.75px]"}},lg:{gap:"cstu-gap-[7.5px]",padding:{x:"cstu-px-[7.5px]",y:"cstu-py-[7.5px]"}},xl:{gap:"cstu-gap-[8.25px]",padding:{x:"cstu-px-[8.25px]",y:"cstu-py-[8.25px]"}}},dropdown:{xs:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"cstu-text-xs",height:void 0,icon:void 0,gap:"cstu-gap-[9px]"},sm:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"cstu-text-sm",height:void 0,icon:void 0,gap:"cstu-gap-[9px]"},md:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"cstu-text-base",height:void 0,icon:void 0,gap:"cstu-gap-[9px]"},lg:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"cstu-text-lg",height:void 0,icon:void 0,gap:"cstu-gap-[9px]"},xl:{padding:{x:"cstu-px-[12px]",y:"cstu-py-[7px]"},text:"cstu-text-xl",height:void 0,icon:void 0,gap:"cstu-gap-[9px]"}}},re=(a,o)=>{var c,n;if(typeof o=="string"){const r=fw[o][a];return[(c=r==null?void 0:r.padding)==null?void 0:c.x,(n=r==null?void 0:r.padding)==null?void 0:n.y,r==null?void 0:r.text,r==null?void 0:r.gap].filter(Boolean).join(" ")}return o[a]},Dx=(a,o)=>fw[o][a].height||"",f2=a=>{switch(a){case"xs":return"cstu-text-xs";case"sm":return"cstu-text-sm";case"md":return"cstu-text-base";case"lg":return"cstu-text-lg";case"xl":return"cstu-text-xl";default:return"cstu-text-base"}},vb=a=>{switch(a){case"xs":return"cstu-space-x-1";case"sm":return"cstu-space-x-2";case"md":return"cstu-space-x-3";case"lg":return"cstu-space-x-4";case"xl":return"cstu-space-x-5";default:return"cstu-space-x-3"}},g2=a=>{const o=[];return a.disabled&&o.push("cstu-opacity-50 cstu-cursor-not-allowed cstu-pointer-events-none"),a.loading&&o.push("cstu-cursor-wait"),a.active&&o.push("cstu-ring-2 cstu-ring-offset-2"),a.error&&o.push("cstu-border-red-300 focus:cstu-ring-red-500/20 focus:cstu-border-red-500"),a.success&&o.push("cstu-border-green-300 focus:cstu-ring-green-500/20 focus:cstu-border-green-500"),o.join(" ")},vw=a=>a?"cstu-opacity-50 cstu-cursor-not-allowed cstu-pointer-events-none":"",gb=a=>{const o=[];return a.valid&&o.push("cstu-border-green-300 focus:cstu-ring-green-500/20 focus:cstu-border-green-500"),a.invalid&&o.push("cstu-border-red-300 focus:cstu-ring-red-500/20 focus:cstu-border-red-500"),a.pending&&o.push("cstu-border-yellow-300 focus:cstu-ring-yellow-500/20 focus:cstu-border-yellow-500"),o.join(" ")},Mb=(a,o="primary")=>{const c=[];return a.hover&&c.push(`hover:cstu-bg-${o}-50`),a.active&&c.push(`active:cstu-bg-${o}-100`),a.focus&&c.push(`focus:cstu-outline-none focus:cstu-ring-2 focus:cstu-ring-${o}-500/20 focus:cstu-border-${o}-500`),c.join(" ")},xb=["disabled","type"],wb={key:0},K=e.defineComponent({__name:"Button",props:{variant:{default:"filled"},color:{default:"primary"},size:{default:"md"},radius:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},type:{default:"button"}},emits:{click:a=>!0},setup(a,{emit:o}){const c=a,n=o,r=l=>{!c.disabled&&!c.loading&&n("click",l)},s=l=>({none:"cstu-rounded-none",xs:"cstu-rounded",sm:"cstu-rounded-md",md:"cstu-rounded-lg",lg:"cstu-rounded-xl",xl:"cstu-rounded-2xl",full:"cstu-rounded-full"})[l]||"cstu-rounded-lg",i=e.computed(()=>{if(oe(c.color)||c.disabled)return{};switch(c.variant){case"filled":return{backgroundColor:c.color,color:"white"};case"light":return{backgroundColor:`${c.color}10`,color:c.color};case"outline":return{borderColor:c.color,color:c.color};case"subtle":return{color:c.color};case"text":return{backgroundColor:"transparent",color:c.color,borderColor:"transparent"};default:return{}}}),h=e.computed(()=>{const l="cstu-inline-flex cstu-items-center cstu-justify-center cstu-font-medium cstu-transition-all cstu-duration-200",d=oe(c.color)?U(c.color,c.variant,{hover:!0,active:!0,focus:!0}):"",p=re(c.size,"button"),y=g2({disabled:c.disabled,loading:c.loading}),u=Dx(c.size,"button"),k=s(c.radius),f=!oe(c.color)&&["outline"].includes(c.variant)?"cstu-border":"";return[l,d,p,y,u,k,f,{"cstu-w-full":c.fullWidth,"cstu-cursor-pointer":!c.disabled&&!c.loading,"cstu-border":c.variant==="outline"}]});return(l,d)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(h.value),style:e.normalizeStyle(i.value),disabled:l.disabled||l.loading,type:l.type,onClick:r},[e.renderSlot(l.$slots,"leftSection"),e.renderSlot(l.$slots,"default"),l.loading?(e.openBlock(),e.createElementBlock("span",wb,[e.renderSlot(l.$slots,"loader",{},()=>[d[0]||(d[0]=e.createElementVNode("svg",{class:"cstu-animate-spin cstu-h-4 cstu-w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"cstu-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"cstu-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1))])])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"rightSection")],14,xb))}}),gw=a=>{const o=["cstu-relative"];a.fullWidth&&o.push("cstu-w-full");const c=g2({disabled:a.disabled,error:a.error,required:a.required||a.withAsterisk});return c&&o.push(c),o.join(" ")},Fx=(a,o=!1)=>{const c=["cstu-block","cstu-font-medium"];switch(o||c.push("cstu-mb-1"),a.size){case"xs":c.push("cstu-text-xs");break;case"sm":c.push("cstu-text-sm");break;case"md":c.push("cstu-text-base");break;case"lg":c.push("cstu-text-lg");break;case"xl":c.push("cstu-text-xl");break;default:c.push("cstu-text-sm")}return a.error?c.push("cstu-text-red-500"):a.disabled?c.push("cstu-text-gray-400"):c.push("cstu-text-gray-700"),(a.required||a.withAsterisk)&&c.push('after:cstu-content-["*"] after:cstu-ml-0.5 after:cstu-text-red-500'),c.join(" ")},Mw=a=>{const o=["cstu-mt-1","cstu-text-sm"];return a.error?o.push("cstu-text-red-500"):a.disabled?o.push("cstu-text-gray-400"):o.push("cstu-text-gray-500"),o.join(" ")},bb=["aria-disabled","onKeydown"],Cb={key:2,class:"cstu-text-sm cstu-text-red-500 cstu-mt-0.5"},Lb={name:"Checkbox"},Ib=e.defineComponent({...Lb,props:{modelValue:{type:[Boolean,Array],default:!1},checked:{type:Boolean,default:!1},value:{},id:{},label:{},color:{default:"primary"},size:{default:"md"},labelPosition:{default:"right"},labelSize:{default:"md"},description:{},error:{},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},variant:{default:"filled"},labelClass:{default:""}},emits:["update:modelValue","change"],setup(a,{emit:o}){const c=a,n=o,r=e.computed(()=>c.modelValue||c.checked),s=()=>{if(c.disabled)return;const f=!r.value;n("update:modelValue",f),n("change",f)},i=()=>{s()},h=e.computed(()=>Fx({size:c.labelSize,disabled:c.disabled,error:c.error},!0)),l=e.computed(()=>Mw({color:c.color})),d=e.computed(()=>["cstu-flex","cstu-flex-col",c.labelPosition==="left"?"cstu-order-first":""]),p={primary:"primary-500",secondary:"secondary-500",success:"success-500",warning:"warning-500",danger:"danger-500",info:"info-500",dark:"gray-900",light:"gray-300"},y=e.computed(()=>["cstu-inline-flex","cstu-items-center","cstu-justify-center","cstu-cursor-pointer","cstu-transition-colors","cstu-duration-200","cstu-ease-in-out",c.size==="xs"?"cstu-h-[12px] cstu-w-[12px] cstu-rounded":"",c.size==="sm"?"cstu-h-[14px] cstu-w-[14px] cstu-rounded":"",c.size==="md"?"cstu-h-[16px] cstu-w-[16px] cstu-rounded-md":"",c.size==="lg"?"cstu-h-[18px] cstu-w-[18px] cstu-rounded-md":"",c.size==="xl"?"cstu-h-[20px] cstu-w-[20px] cstu-rounded-md":"",c.disabled?"cstu-bg-gray-200 cstu-border cstu-border-gray-200 cstu-cursor-not-allowed":r.value||c.indeterminate?c.variant==="outlined"?`cstu-bg-transparent cstu-border cstu-border-${p[c.color]}`:`cstu-bg-${p[c.color]} cstu-border-${p[c.color]}`:"cstu-bg-white cstu-border cstu-border-gray-400/50"]),u=e.computed(()=>[c.variant==="outlined"&&(r.value||c.indeterminate)?`cstu-text-${p[c.color]}`:c.disabled?"cstu-text-gray-300":"cstu-text-white",c.size==="xs"?"cstu-h-[6px] cstu-w-[6px]":"",c.size==="sm"?"cstu-h-[7px] cstu-w-[7px]":"",c.size==="md"?"cstu-h-[8px] cstu-w-[8px]":"",c.size==="lg"?"cstu-h-[9px] cstu-w-[9px]":"",c.size==="xl"?"cstu-h-[10px] cstu-w-[10px]":""]),k=e.computed(()=>gw({disabled:c.disabled,error:c.error}));return(f,L)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([k.value,"cstu-flex cstu-items-center cstu-gap-2"])},[e.createElementVNode("div",{class:e.normalizeClass(y.value),onClick:i,role:"checkbox","aria-disabled":f.disabled,tabindex:"0",onKeydown:e.withKeys(e.withModifiers(i,["prevent"]),["space"])},[r.value&&!f.indeterminate?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(u.value),xmlns:"http://www.w3.org/2000/svg",width:"8",height:"6",viewBox:"0 0 8 6",fill:"none"},L[0]||(L[0]=[e.createElementVNode("path",{d:"M6.75 0.75L2.625 5.25L0.75 3.20455",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),2)):e.createCommentVNode("",!0),f.indeterminate?(e.openBlock(),e.createElementBlock("svg",{key:1,class:e.normalizeClass(u.value),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8 7",fill:"none"},L[1]||(L[1]=[e.createElementVNode("path",{d:"M6.80245 3.90741L0.697913 3.8936",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),2)):e.createCommentVNode("",!0)],42,bb),f.label||f.description?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(d.value)},[f.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass([h.value,f.labelClass]),onClick:i},e.toDisplayString(f.label),3)):e.createCommentVNode("",!0),f.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(l.value)},e.toDisplayString(f.description),3)):e.createCommentVNode("",!0),f.error?(e.openBlock(),e.createElementBlock("div",Cb,e.toDisplayString(f.error),1)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],2))}}),Sb=["aria-checked","aria-disabled"],zb=["id","checked","disabled","value"],qb=["for"],Vb=e.defineComponent({__name:"Radio",props:{modelValue:{default:void 0},value:{default:void 0},id:{default:()=>`radio-${Math.random().toString(36).substr(2,9)}`},label:{},color:{default:"primary"},size:{default:"md"},labelPosition:{default:"right"},description:{},error:{},disabled:{type:Boolean,default:!1},variant:{default:"filled"},labelClass:{default:""}},emits:["update:modelValue","change"],setup(a,{emit:o}){const c=a,n={primary:"primary-500",secondary:"secondary-500",success:"success-500",warning:"warning-500",danger:"danger-500",info:"info-500",dark:"gray-900",light:"gray-300"},r={primary:"primary-300",secondary:"secondary-300",success:"success-300",warning:"warning-300",danger:"danger-300",info:"info-300",dark:"gray-300",light:"gray-300"},s=o,i=e.computed(()=>c.modelValue===c.value),h=()=>{c.disabled||(s("update:modelValue",c.value),s("change",c.value))},l=e.computed(()=>[gw({disabled:c.disabled,error:c.error}),"cstu-flex cstu-items-center cstu-gap-2",c.labelPosition==="left"?"cstu-flex-row-reverse":"cstu-flex-row"]),d=e.computed(()=>["cstu-relative cstu-flex cstu-items-center cstu-justify-center cstu-rounded-full cstu-transition-colors cstu-duration-200",L.value,i.value?c.variant==="outlined"?`cstu-bg-white !cstu-border-2 cstu-border-${r[c.color]}`:`cstu-bg-${n[c.color]} cstu-border cstu-border-${n[c.color]}`:c.variant==="outlined"?`cstu-bg-white !cstu-border-2 cstu-border-${r[c.color]}`:"cstu-bg-white cstu-border cstu-border-gray-300 hover:cstu-border-gray-400",c.disabled?"cstu-opacity-50 cstu-cursor-not-allowed !cstu-bg-gray-200 !cstu-border-gray-300":"cstu-cursor-pointer"]),p=e.computed(()=>["cstu-rounded-full",v.value,c.variant==="outlined"?`cstu-bg-${n[c.color]}`:"cstu-bg-white",c.disabled?`cstu-opacity-50 ${c.variant==="outlined"?"!cstu-bg-gray-300":"!cstu-bg-gray-200"}`:""]),y=e.computed(()=>Fx({size:c.size,disabled:c.disabled,error:c.error},!0)),u=e.computed(()=>Mw({color:c.color})),k=e.computed(()=>["cstu-text-sm cstu-text-red-500 cstu-mt-1"]),f=e.computed(()=>["cstu-flex cstu-flex-col",c.disabled?"cstu-cursor-not-allowed":"cstu-cursor-pointer"]),L=e.computed(()=>({xs:"cstu-w-[8px] cstu-h-[8px]",sm:"cstu-w-[12px] cstu-h-[12px]",md:"cstu-w-[16px] cstu-h-[16px]",lg:"cstu-w-[20px] cstu-h-[20px]",xl:"cstu-w-[24px] cstu-h-[24px]"})[c.size]),v=e.computed(()=>({xs:"cstu-w-[4px] cstu-h-[4px]",sm:"cstu-w-[6px] cstu-h-[6px]",md:"cstu-w-[8px] cstu-h-[8px]",lg:"cstu-w-[10px] cstu-h-[10px]",xl:"cstu-w-[12px] cstu-h-[12px]"})[c.size]);return(g,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.value),onClick:h,"aria-checked":i.value,"aria-disabled":g.disabled,role:"radio"},[e.createElementVNode("input",{ref:"radio",type:"radio",id:g.id,checked:i.value,disabled:g.disabled,value:g.value,onChange:h,class:"cstu-sr-only cstu-border-2"},null,40,zb),e.createElementVNode("div",{class:e.normalizeClass(d.value)},[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([p.value,"cstu-absolute cstu-left-1/2 cstu-top-1/2 cstu--translate-x-1/2 cstu--translate-y-1/2 cstu-transition-transform cstu-duration-200 cstu-ease-in-out"])},null,2)):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:e.normalizeClass(f.value)},[g.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:g.id,class:e.normalizeClass([y.value,g.labelClass])},[e.renderSlot(g.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(g.label),1)])],10,qb)):e.createCommentVNode("",!0),g.description?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(u.value)},[e.renderSlot(g.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(g.description),1)])],2)):e.createCommentVNode("",!0),g.error?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(k.value)},[e.renderSlot(g.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(g.error),1)])],2)):e.createCommentVNode("",!0)],2)],10,Sb))}});function se(a){return{none:"cstu-rounded-none",xs:"cstu-rounded",sm:"cstu-rounded-md",md:"cstu-rounded-lg",lg:"cstu-rounded-xl",xl:"cstu-rounded-2xl",full:"cstu-rounded-full"}[a]}const Bb={key:0,class:"cstu-flex cstu-justify-between cstu-items-center cstu-mb-1"},Ab=["for"],Hb={key:0,class:"cstu-text-red-500 cstu-ml-1"},Pb={key:0,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px]"},jb=["id","type","value","placeholder","disabled","required","readonly","pattern","title","maxlength"],Eb={key:1,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px]"},Tb={key:1,class:"cstu-mt-1"},Db={key:2,class:"cstu-mt-1"},Fb=e.defineComponent({__name:"TextInput",props:{id:{},type:{},modelValue:{},placeholder:{},label:{},description:{},error:{},hasError:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},required:{type:Boolean},withAsterisk:{type:Boolean},showBothErrorAndDescription:{type:Boolean},inputProps:{},size:{},variant:{},radius:{},class:{},fullWidth:{type:Boolean},pattern:{},title:{},inputClass:{},inputContainerClass:{},maxLength:{}},emits:["update:modelValue","focus","blur","change"],setup(a,{expose:o,emit:c}){const n=`text-input-${Math.random().toString(36).substring(2,11)}`,r=e.ref(null),s=a,i={xs:{inputClass:`cstu-h-8 ${s.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-xs cstu-font-medium",descriptionSize:"cstu-text-xs"},sm:{inputClass:`cstu-h-9 ${s.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-xs"},md:{inputClass:`cstu-h-10 ${s.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},lg:{inputClass:`cstu-h-11 ${s.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},xl:{inputClass:`cstu-h-12 ${s.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-base cstu-font-medium",descriptionSize:"cstu-text-sm"}},h=e.computed(()=>{const w=`${i[s.size||"md"].inputClass.split(" ")[0]} cstu-transition-all cstu-duration-300`;return s.inputContainerClass?`${w} ${s.inputContainerClass}`:w}),l=e.computed(()=>i[s.size||"md"].labelSize),d=e.computed(()=>i[s.size||"md"].descriptionSize),p=e.computed(()=>"cstu-text-sm"),y=e.computed(()=>se(s.radius||"md")),u=e.computed(()=>{const x=s.variant||"default",m={default:"cstu-bg-white cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",filled:"cstu-bg-gray-100 cstu-border cstu-border-transparent cstu-transition-colors cstu-duration-150 cstu-px-3",unstyled:"cstu-bg-transparent cstu-border-0"},w=k.value?"":x==="default"?"cstu-border-gray-300/45":"",H=k.value?"cstu-border-red-500":"";return x==="unstyled"?[m[x]]:[m[x],w,H,k.value?"hover:cstu-border-red-500":"hover:cstu-border-primary-500",k.value?"focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500":"focus-within:cstu-border-primary-500 focus-within:cstu-ring-1 focus-within:cstu-ring-primary-500"]}),k=e.computed(()=>s.error!==void 0&&s.error!==""||s.hasError),f=c,L=e.ref(!1),v=x=>{L.value=!0,f("focus",x)},g=x=>{L.value=!1,f("blur",x)},b=x=>{f("change",x)};return o({input:r,focus:()=>{var x;return(x=r.value)==null?void 0:x.focus()},blur:()=>{var x;return(x=r.value)==null?void 0:x.blur()},select:()=>{var x;return(x=r.value)==null?void 0:x.select()},setSelectionRange:(x,m)=>{var w;return(w=r.value)==null?void 0:w.setSelectionRange(x,m)},setRangeText:x=>{var m;return(m=r.value)==null?void 0:m.setRangeText(x)},get value(){var x;return(x=r.value)==null?void 0:x.value},set value(x){r.value&&x!==void 0&&(r.value.value=x)}}),(x,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-flex-col cstu-transition-all cstu-duration-300",[s.class,s.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"]])},[s.label||x.$slots.label?(e.openBlock(),e.createElementBlock("div",Bb,[e.createElementVNode("label",{for:s.id||n,class:e.normalizeClass(["cstu-flex cstu-items-center",l.value])},[e.renderSlot(x.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(s.label)+" ",1),s.withAsterisk||s.required?(e.openBlock(),e.createElementBlock("span",Hb,"*")):e.createCommentVNode("",!0)])],10,Ab),e.renderSlot(x.$slots,"labelIcon")])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["cstu-flex cstu-items-center cstu-gap-2 cstu-py-2",h.value,y.value,u.value,{"cstu-opacity-50 cstu-pointer-events-none cstu-cursor-not-allowed":s.disabled}])},[x.$slots.leftSection?(e.openBlock(),e.createElementBlock("div",Pb,[e.renderSlot(x.$slots,"leftSection")])):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({ref_key:"inputRef",ref:r,id:s.id||n,type:s.type||"text",value:s.modelValue,placeholder:s.placeholder,disabled:s.disabled,required:s.required,readonly:s.readonly,pattern:s.pattern||"",title:s.title||"",maxlength:s.maxLength,class:["cstu-flex-1 cstu-bg-transparent cstu-outline-none cstu-w-full",p.value,s.inputClass||"",{"cstu-text-gray-500":s.modelValue,"cstu-text-red-500":k.value&&!s.modelValue}],onInput:m[0]||(m[0]=w=>x.$emit("update:modelValue",w.target.value)),onFocus:v,onBlur:g,onChange:b},s.inputProps),null,16,jb),x.$slots.rightSection?(e.openBlock(),e.createElementBlock("div",Eb,[e.renderSlot(x.$slots,"rightSection")])):e.createCommentVNode("",!0)],2)]),s.description&&!k.value||x.$slots.description&&!k.value||s.description&&s.showBothErrorAndDescription?(e.openBlock(),e.createElementBlock("div",Tb,[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-gray-500",d.value])},[e.renderSlot(x.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(s.description),1)])],2)])):e.createCommentVNode("",!0),k.value&&s.error||k.value&&!s.error&&x.$slots.error?(e.openBlock(),e.createElementBlock("div",Db,[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-red-500",d.value])},[e.renderSlot(x.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(s.error),1)])],2)])):e.createCommentVNode("",!0)],2))}}),$b=["disabled"],Rb={key:0,class:"w-3.5 h-3.5",viewBox:"0 0 20 20",fill:"currentColor"},Nb={key:0,class:"animate-spin"},Ob=e.defineComponent({__name:"Chip",props:{modelValue:{type:Boolean,default:!1},label:{default:""},size:{default:"md"},variant:{default:"filled"},color:{default:"primary"},radius:{default:"xl"},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},withRemoveButton:{type:Boolean,default:!1},withCheckIcon:{type:Boolean,default:!0},checkIconPosition:{default:"left"},allowDeselect:{type:Boolean,default:!0},loading:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:o}){const c=a,n=o,r=e.computed(()=>U(c.color,c.variant)),s=e.computed(()=>re(c.size,"chip")),i=e.computed(()=>g2({disabled:c.disabled,loading:c.loading})),h=e.computed(()=>U(c.color,c.variant)),l=e.computed(()=>d()),d=()=>{switch(c.variant){case"filled":return"cstu-bg-gray-300 cstu-text-gray-300";case"outline":return"cstu-bg-gray-300 cstu-text-gray-300 cstu-border-gray-300";case"light":return"cstu-bg-gray-200 cstu-text-gray-300";default:return U(c.color,c.variant)}},p=()=>{c.disabled||c.loading||c.modelValue&&!c.allowDeselect||n("update:modelValue",!c.modelValue)};return(y,u)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["inline-flex items-center justify-center gap-2 rounded-full transition-colors duration-200 select-none","focus:outline-none",r.value,s.value,i.value,y.modelValue?h.value:l.value,"cursor-pointer"]),disabled:y.disabled||y.loading,onClick:p},[e.renderSlot(y.$slots,"checkIcon",{},()=>[y.withCheckIcon&&y.modelValue?(e.openBlock(),e.createElementBlock("svg",Rb,u[0]||(u[0]=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1)]))):e.createCommentVNode("",!0)]),y.loading?(e.openBlock(),e.createElementBlock("span",Nb,u[1]||(u[1]=[e.createElementVNode("svg",{class:"w-3.5 h-3.5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)]))):e.createCommentVNode("",!0),e.renderSlot(y.$slots,"label",{},()=>[y.label?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["whitespace-nowrap",y.loading?"opacity-75":""])},e.toDisplayString(y.label),3)):e.createCommentVNode("",!0)])],10,$b))}}),Ub={class:"indicator-content-wrapper"},Zb={key:0,class:"indicator-content"},_b={name:"Indicator"},Wb=e.defineComponent({..._b,props:{position:{default:"top-end"},size:{default:"md"},radius:{default:"full"},color:{default:"danger"},offset:{default:0},inline:{type:Boolean,default:!1},withOutline:{type:Boolean,default:!1},outlineWidth:{default:2},outlineColor:{default:void 0},outlineOffset:{default:0},disabled:{type:Boolean,default:!1},processing:{type:Boolean,default:!1},zIndex:{default:200},label:{default:""},variant:{default:"filled"},dot:{type:Boolean,default:!1},autoContrast:{type:Boolean,default:!0},customClasses:{default:""}},setup(a){const o=a,c=u=>u?["primary","secondary","success","warning","danger","info","dark","light"].includes(u):!0,n=e.computed(()=>[o.inline?"inline-block":"block","relative"]),r=e.computed(()=>{if(typeof o.size=="number")return o.size;const u={xs:6,sm:8,md:10,lg:12,xl:14};return u[o.size]||u.md}),s=e.computed(()=>`position-${o.position}`),i=e.computed(()=>({"--indicator-z-index":`${o.zIndex}`,"--indicator-offset":`${o.offset}px`,"--indicator-outline-width":`${o.outlineWidth}px`,"--indicator-outline-offset":`${o.outlineOffset}px`,"--indicator-size":`${r.value}px`})),h=e.computed(()=>{if(!c(o.color))return"";const u={filled:`${U(o.color,"filled")} ${o.autoContrast?"text-white dark:text-white":""}`,light:`${U(o.color,"light")}`,outline:`${U(o.color,"outline")}`};return u[o.variant]||u.filled}),l=e.computed(()=>typeof o.radius=="number"?"":se(o.radius)),d=e.computed(()=>{const u=[o.dot?"indicator--dot":"",o.processing?"indicator--processing":"",o.withOutline?"indicator--with-outline":"",h.value,l.value,typeof o.customClasses=="string"?o.customClasses:""];return Array.isArray(o.customClasses)&&u.push(...o.customClasses),u.filter(Boolean)}),p=e.computed(()=>{const u={};if(typeof o.radius=="number"&&(u.borderRadius=`${o.radius}px`),c(o.color)||(o.variant==="filled"?(u.backgroundColor=o.color,u.color="white"):o.variant==="light"?(u.backgroundColor=`${o.color}20`,u.color=o.color):o.variant==="outline"&&(u.backgroundColor="transparent",u.color=o.color,u.border=`1px solid ${o.color}`)),o.withOutline){const k=o.outlineColor||o.color;o.outlineOffset>0?u.boxShadow=`0 0 0 ${o.outlineOffset}px white, 0 0 0 ${o.outlineOffset+o.outlineWidth}px ${y(k)}`:u.boxShadow=`0 0 0 ${o.outlineWidth}px ${y(k)}`}return u});function y(u){if(c(u)){const k={primary:"#4F46E5",secondary:"#6B7280",success:"#10B981",warning:"#F59E0B",danger:"#EF4444",info:"#3B82F6",dark:"#1F2937",light:"#F3F4F6"};return k[u]||k.primary}else return u}return(u,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["indicator-root",n.value]),style:e.normalizeStyle(i.value)},[e.createElementVNode("div",Ub,[e.renderSlot(u.$slots,"default",{},void 0,!0),u.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["indicator-dot",[d.value,s.value]]),style:e.normalizeStyle(p.value)},[u.label&&!u.dot?(e.openBlock(),e.createElementBlock("span",Zb,e.toDisplayString(u.label),1)):e.createCommentVNode("",!0)],6))])],6))}});const nx=(a,o)=>{const c=a.__vccOpts||a;for(const[n,r]of o)c[n]=r;return c},Gb=nx(Wb,[["__scopeId","data-v-c570d29c"]]),Xb={key:0,class:"cstu-flex cstu-justify-between cstu-mb-1"},Kb={key:0,class:"cstu-text-sm cstu-font-medium cstu-text-gray-500"},Qb=["aria-valuenow"],Jb={key:1,class:"cstu-flex cstu-h-full"},Yb={key:1,class:"cstu-text-sm cstu-font-medium cstu-text-gray-500 cstu-whitespace-nowrap"},eC=e.defineComponent({__name:"Progress",props:{value:{default:0},size:{default:"md"},color:{default:"primary"},striped:{type:Boolean,default:!1},animated:{type:Boolean,default:!1},label:{},showValue:{type:Boolean,default:!1},valuePosition:{default:"top"},radius:{default:"sm"},class:{default:""},sections:{default:()=>[]},minValue:{default:0},showMinValue:{type:Boolean,default:!1},minValueColor:{default:"secondary"}},setup(a){const o=a,c=e.computed(()=>Math.min(100,Math.max(0,o.value))),n=e.computed(()=>typeof o.color=="string"&&(o.color.startsWith("#")||o.color.startsWith("rgb"))),r=e.computed(()=>n.value?"":U(o.color,"filled",{hover:!1,active:!1,focus:!1})),s=e.computed(()=>typeof o.minValueColor=="string"&&(o.minValueColor.startsWith("#")||o.minValueColor.startsWith("rgb"))),i=e.computed(()=>!o.minValueColor||s.value?"":U(o.minValueColor,"filled",{hover:!1,active:!1,focus:!1})),h=e.computed(()=>{const v={width:`${c.value}%`};return n.value&&(v.backgroundColor=o.color),v}),l=e.computed(()=>({left:`${o.minValue}%`})),d=e.computed(()=>{if(!o.sections||o.sections.length===0)return[];const v=o.sections.reduce((g,b)=>g+b.value,0);return o.sections.map(g=>{const b=v>0?g.value/v*100:0;return{...g,percentage:b}})}),p=v=>{if(typeof v.color=="string"&&(v.color.startsWith("#")||v.color.startsWith("rgb")))return"";const g=v.color||o.color;return U(g,"filled",{hover:!1,active:!1,focus:!1})},y=v=>{const g={width:`${v.percentage}%`};return typeof v.color=="string"&&(v.color.startsWith("#")||v.color.startsWith("rgb"))&&(g.backgroundColor=v.color),g},u=e.computed(()=>se(o.radius)),k=e.computed(()=>o.class||""),f=e.computed(()=>{switch(o.size){case"xs":return"cstu-w-1";case"sm":return"cstu-w-1";case"md":return"cstu-w-1.5";case"lg":return"cstu-w-1.5";case"xl":return"cstu-w-1.5";default:return"cstu-w-1.5"}}),L=e.computed(()=>{let v;switch(o.size){case"xs":v=4;break;case"sm":v=4;break;case"md":v=8;break;case"lg":v=8;break;case"xl":v=8;break;default:v=8}return`${v+4}px`});return(v,g)=>(e.openBlock(),e.createElementBlock("div",null,[v.label||v.$slots.label||v.showValue?(e.openBlock(),e.createElementBlock("div",Xb,[v.label&&!v.$slots.label?(e.openBlock(),e.createElementBlock("span",Kb,e.toDisplayString(v.label),1)):e.createCommentVNode("",!0),v.$slots.label?e.renderSlot(v.$slots,"label",{key:1}):e.createCommentVNode("",!0),v.showValue&&v.valuePosition==="top"&&!v.$slots.value?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(["cstu-text-sm cstu-font-medium cstu-text-gray-500",{"flex justify-end w-full":!v.label}])},e.toDisplayString(c.value)+"% ",3)):e.createCommentVNode("",!0),v.showValue&&v.valuePosition==="top"&&v.$slots.value?e.renderSlot(v.$slots,"value",{key:3}):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["cstu-relative",{"cstu-flex cstu-items-center cstu-gap-2":v.showValue&&v.valuePosition==="right"}])},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-overflow-hidden",{"cstu-w-full":!(v.showValue&&v.valuePosition==="right"),"cstu-flex-1":v.showValue&&v.valuePosition==="right"}])},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-relative cstu-overflow-hidden",u.value,"cstu-bg-gray-250",e.unref(Dx)(v.size,"progress"),k.value]),role:"progressbar","aria-valuenow":v.value,"aria-valuemin":"0","aria-valuemax":"100"},[!v.sections||v.sections.length===0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-h-full cstu-transition-all cstu-duration-300 cstu-ease-in-out",r.value,{"bg-striped":v.striped&&!v.animated,"bg-striped animate-progress":v.animated}]),style:e.normalizeStyle(h.value)},null,6)):(e.openBlock(),e.createElementBlock("div",Jb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(b,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,class:e.normalizeClass(["cstu-h-full cstu-transition-all cstu-duration-300 cstu-ease-in-out",p(b),{"bg-striped":b.striped&&!b.animated,"bg-striped animate-progress":b.animated}]),style:e.normalizeStyle(y(b))},null,6))),128))]))],10,Qb)],2),v.showMinValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-absolute cstu-z-10",[f.value]]),style:e.normalizeStyle([l.value,{top:"50%",transform:"translateX(-50%) translateY(-50%)"}])},[e.renderSlot(v.$slots,"minValueMarker",{},()=>[e.createElementVNode("div",{class:e.normalizeClass(["cstu-h-full cstu-w-full cstu-rounded-sm border",i.value]),style:e.normalizeStyle([s.value?{backgroundColor:o.minValueColor}:{},{height:L.value}])},null,6)])],6)):e.createCommentVNode("",!0),v.showValue&&v.valuePosition==="right"&&!v.$slots.value?(e.openBlock(),e.createElementBlock("span",Yb,e.toDisplayString(c.value)+"% ",1)):e.createCommentVNode("",!0),v.showValue&&v.valuePosition==="right"&&v.$slots.value?e.renderSlot(v.$slots,"value",{key:2}):e.createCommentVNode("",!0)],2)]))}});const tC={key:0,class:"flex-shrink-0"},aC={key:0,class:"flex items-center justify-between"},oC={key:1,class:"flex-shrink-0 ml-3"},cC=["disabled"],nC=e.defineComponent({__name:"Alert",props:{title:{},message:{},variant:{default:"outline"},color:{default:"primary"},size:{default:"md"},radius:{default:"md"},closable:{type:Boolean,default:!1},onClose:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},valid:{type:Boolean,default:void 0},invalid:{type:Boolean,default:void 0}},emits:["close"],setup(a,{emit:o}){const c=a,n=o,r=b=>b==="gradient"?"light":b,s=e.computed(()=>U(c.color,r(c.variant),{hover:!1,active:!1,focus:!1,disabled:c.disabled})),i=e.computed(()=>Tx(r(c.variant))),h=e.computed(()=>mb(c.color,r(c.variant))),l=e.computed(()=>re(c.size,"alert")),d=e.computed(()=>f2(c.size)),p=e.computed(()=>vb(c.size)),y=e.computed(()=>g2({disabled:c.disabled,loading:c.loading})),u=e.computed(()=>gb({valid:c.valid,invalid:c.invalid})),k=e.computed(()=>Mb({hover:!0,focus:!0},c.color)),f=e.computed(()=>c.variant==="light"||c.variant==="gradient"?`cstu-border cstu-border-${Le[c.color].base}-100`:""),L=e.computed(()=>{if(c.variant==="gradient"){const b=Le[c.color];return`cstu-bg-gradient-to-r cstu-from-${b.base}-${b.light} cstu-to-white cstu-text-${b.base}-${b.main}`}return""}),v=e.computed(()=>{switch(c.radius){case"none":return"";case"sm":return"cstu-rounded-sm";case"md":return"cstu-rounded-md";case"lg":return"cstu-rounded-lg";case"xl":return"cstu-rounded-xl";case"full":return"cstu-rounded-full";default:return"cstu-rounded-md"}}),g=()=>{n("close")};return(b,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative",v.value,i.value,c.variant!=="gradient"?s.value:L.value,l.value,y.value,u.value,f.value]),role:"alert"},[e.createElementVNode("div",{class:e.normalizeClass(["flex items-start",[p.value]])},[b.$slots.icon?(e.openBlock(),e.createElementBlock("div",tC,[e.renderSlot(b.$slots,"icon")])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["flex-grow",[b.$slots.icon&&"ml-3"]])},[b.title?(e.openBlock(),e.createElementBlock("div",aC,[e.createElementVNode("h3",{class:e.normalizeClass(["font-medium",h.value])},e.toDisplayString(b.title),3)])):e.createCommentVNode("",!0),b.message?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mt-1",b.variant==="filled"?"text-white/90":"text-gray-600",d.value])},e.toDisplayString(b.message),3)):e.createCommentVNode("",!0),e.renderSlot(b.$slots,"default")],2),b.closable?(e.openBlock(),e.createElementBlock("div",oC,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["inline-flex rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2",[b.variant==="filled"?"text-white/80 hover:text-white focus:ring-white":"text-gray-400 hover:text-gray-500 focus:ring-blue-500",k.value]]),disabled:b.disabled,onClick:g},x[0]||(x[0]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})],-1)]),10,cC)])):e.createCommentVNode("",!0)],2)],2))}}),rC={class:"cstu-inline-block"},sC=e.defineComponent({__name:"OvalLoader",props:{size:{default:"md"},radius:{default:"100%"}},setup(a){const o={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},c=a,n=e.computed(()=>{const r=parseInt(o[c.size]);return`${Math.max(2,r/12)}px`});return(r,s)=>(e.openBlock(),e.createElementBlock("span",rC,[e.createElementVNode("span",{class:"cstu-inline-block cstu-rounded-full cstu-border-solid cstu-border-r-transparent cstu-border-current cstu-animate-[oval-spin_1.2s_linear_infinite]",style:e.normalizeStyle({width:o[c.size],height:o[c.size],borderWidth:n.value,borderRadius:c.radius||"100%"})},null,4)]))}});const lC=e.defineComponent({__name:"DotsLoader",props:{size:{default:"md"}},setup(a){const o={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},c=a,n=e.computed(()=>`${parseInt(o[c.size])/3}px`),r=e.computed(()=>`${parseInt(o[c.size])/6}px`);return(s,i)=>(e.openBlock(),e.createElementBlock("span",{class:"cstu-inline-flex cstu-items-center",style:e.normalizeStyle({gap:r.value,height:o[c.size]})},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,h=>e.createElementVNode("span",{key:h,class:"cstu-inline-block cstu-rounded-full cstu-animate-[dots-pulse_0.8s_infinite_linear] cstu-bg-current",style:e.normalizeStyle({width:n.value,height:n.value,animationDelay:`${(h-1)*.16}s`,opacity:1})},null,4)),64))],4))}});const iC=e.defineComponent({__name:"BarsLoader",props:{size:{default:"md"}},setup(a){const o={xs:"12px",sm:"16px",md:"24px",lg:"36px",xl:"48px"},c=a,n=e.computed(()=>`${parseInt(o[c.size])/6}px`);return(r,s)=>(e.openBlock(),e.createElementBlock("span",{class:"cstu-inline-flex",style:e.normalizeStyle({gap:n.value,width:o[c.size],height:`${parseInt(o[c.size])/2}px`})},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,i=>e.createElementVNode("span",{key:i,class:"cstu-flex-1 cstu-rounded-[2px] cstu-animate-[bars-scale_1.2s_cubic-bezier(0,0.5,0.5,1)_infinite] cstu-bg-current",style:e.normalizeStyle({animationDelay:`${(i-1)*-.12}s`,opacity:1})},null,4)),64))],4))}});const xw=e.defineComponent({__name:"Loader",props:{variant:{default:"oval"},color:{default:"primary"},size:{default:"md"},class:{},loading:{type:Boolean,default:!0},radius:{default:void 0}},setup(a){const o=a,c=i=>i?Object.keys(Le).includes(i):!0,n=e.computed(()=>{if(!o.color||!c(o.color))return"";const i=o.color,h=Le[i];return`cstu-text-${h.base}-${h.main}`}),r=e.computed(()=>!o.color||c(o.color)?{}:{color:o.color}),s=e.computed(()=>{switch(o.variant){case"dots":return lC;case"bars":return iC;default:return sC}});return(i,h)=>e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{class:e.normalizeClass(["cstu-inline-block",n.value,o.class]),style:e.normalizeStyle(r.value),size:o.size,radius:o.radius},null,8,["class","style","size","radius"])),[[e.vShow,o.loading]])}}),dC={class:"p-5"},hC={key:0,class:"absolute top-3 right-3"},uC={key:1},pC={class:"dialog-header"},yC={class:"dialog-body"},kC={class:"dialog-footer"},mC={key:2},fC={class:"dialog-header"},vC={class:"mr-3"},gC={key:0,class:"text-lg font-medium text-gray-900"},MC={class:"dialog-body"},xC={class:"dialog-footer"},wC={key:3},bC={class:"dialog-header"},CC={class:"dialog-body"},LC={class:"dialog-footer"},IC=e.defineComponent({__name:"Dialog",props:{title:{},content:{},opened:{type:Boolean},size:{default:"md"},withCloseButton:{type:Boolean,default:!0},onClose:{},position:{default:()=>({bottom:"20px",right:"20px"})},keepMounted:{type:Boolean,default:!1},zIndex:{default:1e3},iconPosition:{default:"none"},centered:{type:Boolean,default:!1},filledCTA:{type:Boolean,default:!1},withDefaultActions:{type:Boolean,default:!1},cancelText:{default:"Cancel"},confirmText:{default:"Confirm"},confirmButtonColor:{default:"primary"},onCancel:{},onConfirm:{}},emits:["close","cancel","confirm"],setup(a,{emit:o}){const c=a,n=o,r=e.computed(()=>({xs:"w-[280px]",sm:"w-[320px]",md:"w-[380px]",lg:"w-[440px]",xl:"w-[520px]"})[c.size]),s=()=>{n("close"),c.onClose&&c.onClose()},i=()=>{n("cancel"),c.onCancel&&c.onCancel(),s()},h=()=>{n("confirm"),c.onConfirm&&c.onConfirm(),s()};return(l,d)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"opacity-0 scale-95","enter-to-class":"opacity-100 scale-100","leave-active-class":"transition duration-200 ease-in","leave-from-class":"opacity-100 scale-100","leave-to-class":"opacity-0 scale-95"},{default:e.withCtx(()=>[l.opened||l.keepMounted?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({position:"fixed",zIndex:l.zIndex||1e3,...l.position,display:l.opened?"block":"none"}),class:"min-w-[200px]"},[e.createElementVNode("div",{class:e.normalizeClass(["rounded-lg bg-white shadow-lg border border-gray-200",[r.value]])},[e.createElementVNode("div",dC,[l.withCloseButton?(e.openBlock(),e.createElementBlock("div",hC,[e.createElementVNode("button",{onClick:s,class:"text-gray-400 hover:text-gray-500 focus:outline-none"},d[0]||(d[0]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]))])):e.createCommentVNode("",!0),c.iconPosition==="top"?(e.openBlock(),e.createElementBlock("div",uC,[e.createElementVNode("div",pC,[e.createElementVNode("div",{class:e.normalizeClass(["flex mb-3",c.centered?"justify-center":""])},[e.renderSlot(l.$slots,"icon")],2),e.renderSlot(l.$slots,"header",{},()=>[l.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["text-lg font-medium text-gray-900 mb-2",c.centered?"text-center":""])},e.toDisplayString(l.title),3)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",yC,[e.renderSlot(l.$slots,"body",{},()=>[l.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["text-sm text-gray-600 mb-2",c.centered?"text-center":""])},e.toDisplayString(l.content),3)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")])]),e.createElementVNode("div",kC,[e.renderSlot(l.$slots,"footer",{},()=>[l.$slots.actions||l.withDefaultActions?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mt-4","flex",c.filledCTA?"space-x-2":"space-x-3",c.centered?"justify-center":"justify-end"])},[e.renderSlot(l.$slots,"actions",{},()=>[l.withDefaultActions?(e.openBlock(),e.createBlock(K,{key:0,onClick:i,variant:"outline",color:"secondary",size:"sm",class:e.normalizeClass(c.filledCTA?"flex-1":"")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.cancelText),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),l.withDefaultActions?(e.openBlock(),e.createBlock(K,{key:1,onClick:h,variant:"filled",color:l.confirmButtonColor,size:"sm",class:e.normalizeClass(c.filledCTA?"flex-1":"")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.confirmText),1)]),_:1},8,["color","class"])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0)])])])):c.iconPosition==="left"?(e.openBlock(),e.createElementBlock("div",mC,[e.createElementVNode("div",fC,[e.renderSlot(l.$slots,"header",{},()=>[e.createElementVNode("div",{class:e.normalizeClass(["flex items-start mb-2",c.centered?"justify-center":""])},[e.createElementVNode("div",vC,[e.renderSlot(l.$slots,"icon")]),l.title?(e.openBlock(),e.createElementBlock("div",gC,e.toDisplayString(l.title),1)):e.createCommentVNode("",!0)],2)])]),e.createElementVNode("div",MC,[e.renderSlot(l.$slots,"body",{},()=>[l.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["text-sm text-gray-600 mb-2",c.centered?"text-center":""])},e.toDisplayString(l.content),3)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")])]),e.createElementVNode("div",xC,[e.renderSlot(l.$slots,"footer",{},()=>[l.$slots.actions||l.withDefaultActions?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mt-4","flex",c.filledCTA?"space-x-2":"space-x-3",c.centered?"justify-center":"justify-end"])},[e.renderSlot(l.$slots,"actions",{},()=>[l.withDefaultActions?(e.openBlock(),e.createBlock(K,{key:0,onClick:i,variant:"outline",color:"secondary",size:"sm",class:e.normalizeClass(c.filledCTA?"flex-1":"")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.cancelText),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),l.withDefaultActions?(e.openBlock(),e.createBlock(K,{key:1,onClick:h,variant:"filled",color:l.confirmButtonColor,size:"sm",class:e.normalizeClass(c.filledCTA?"flex-1":"")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.confirmText),1)]),_:1},8,["color","class"])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0)])])])):(e.openBlock(),e.createElementBlock("div",wC,[e.createElementVNode("div",bC,[e.renderSlot(l.$slots,"header",{},()=>[l.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["text-lg font-medium text-gray-900 mb-2",c.centered?"text-center":""])},e.toDisplayString(l.title),3)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",CC,[e.renderSlot(l.$slots,"body",{},()=>[l.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["text-sm text-gray-600",c.centered?"text-center":""])},e.toDisplayString(l.content),3)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")])]),e.createElementVNode("div",LC,[e.renderSlot(l.$slots,"footer",{},()=>[l.$slots.actions||l.withDefaultActions?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mt-4","flex",c.filledCTA?"space-x-2":"space-x-3",c.centered?"justify-center":"justify-end"])},[e.renderSlot(l.$slots,"actions",{},()=>[l.withDefaultActions?(e.openBlock(),e.createBlock(K,{key:0,onClick:i,variant:"outline",color:"secondary",size:"sm",class:e.normalizeClass(c.filledCTA?"flex-1":"")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.cancelText),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),l.withDefaultActions?(e.openBlock(),e.createBlock(K,{key:1,onClick:h,variant:"filled",color:l.confirmButtonColor,size:"sm",class:e.normalizeClass(c.filledCTA?"flex-1":"")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.confirmText),1)]),_:1},8,["color","class"])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0)])])]))])],2)],4)):e.createCommentVNode("",!0)]),_:3})]))}}),SC=["top","right","bottom","left"],ew=["start","end"],tw=SC.reduce((a,o)=>a.concat(o,o+"-"+ew[0],o+"-"+ew[1]),[]),S2=Math.min,v2=Math.max,QM=Math.round,N2=Math.floor,fe=a=>({x:a,y:a}),zC={left:"right",right:"left",bottom:"top",top:"bottom"},qC={start:"end",end:"start"};function zx(a,o,c){return v2(a,S2(o,c))}function B2(a,o){return typeof a=="function"?a(o):a}function Ie(a){return a.split("-")[0]}function ve(a){return a.split("-")[1]}function ww(a){return a==="x"?"y":"x"}function $x(a){return a==="y"?"height":"width"}function z2(a){return["top","bottom"].includes(Ie(a))?"y":"x"}function Rx(a){return ww(z2(a))}function bw(a,o,c){c===void 0&&(c=!1);const n=ve(a),r=Rx(a),s=$x(r);let i=r==="x"?n===(c?"end":"start")?"right":"left":n==="start"?"bottom":"top";return o.reference[s]>o.floating[s]&&(i=YM(i)),[i,YM(i)]}function VC(a){const o=YM(a);return[JM(a),o,JM(o)]}function JM(a){return a.replace(/start|end/g,o=>qC[o])}function BC(a,o,c){const n=["left","right"],r=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(a){case"top":case"bottom":return c?o?r:n:o?n:r;case"left":case"right":return o?s:i;default:return[]}}function AC(a,o,c,n){const r=ve(a);let s=BC(Ie(a),c==="start",n);return r&&(s=s.map(i=>i+"-"+r),o&&(s=s.concat(s.map(JM)))),s}function YM(a){return a.replace(/left|right|bottom|top/g,o=>zC[o])}function HC(a){return{top:0,right:0,bottom:0,left:0,...a}}function Cw(a){return typeof a!="number"?HC(a):{top:a,right:a,bottom:a,left:a}}function ex(a){const{x:o,y:c,width:n,height:r}=a;return{width:n,height:r,top:c,left:o,right:o+n,bottom:c+r,x:o,y:c}}function aw(a,o,c){let{reference:n,floating:r}=a;const s=z2(o),i=Rx(o),h=$x(i),l=Ie(o),d=s==="y",p=n.x+n.width/2-r.width/2,y=n.y+n.height/2-r.height/2,u=n[h]/2-r[h]/2;let k;switch(l){case"top":k={x:p,y:n.y-r.height};break;case"bottom":k={x:p,y:n.y+n.height};break;case"right":k={x:n.x+n.width,y};break;case"left":k={x:n.x-r.width,y};break;default:k={x:n.x,y:n.y}}switch(ve(o)){case"start":k[i]-=u*(c&&d?-1:1);break;case"end":k[i]+=u*(c&&d?-1:1);break}return k}const PC=async(a,o,c)=>{const{placement:n="bottom",strategy:r="absolute",middleware:s=[],platform:i}=c,h=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(o));let d=await i.getElementRects({reference:a,floating:o,strategy:r}),{x:p,y}=aw(d,n,l),u=n,k={},f=0;for(let L=0;L<h.length;L++){const{name:v,fn:g}=h[L],{x:b,y:x,data:m,reset:w}=await g({x:p,y,initialPlacement:n,placement:u,strategy:r,middlewareData:k,rects:d,platform:i,elements:{reference:a,floating:o}});p=b??p,y=x??y,k={...k,[v]:{...k[v],...m}},w&&f<=50&&(f++,typeof w=="object"&&(w.placement&&(u=w.placement),w.rects&&(d=w.rects===!0?await i.getElementRects({reference:a,floating:o,strategy:r}):w.rects),{x:p,y}=aw(d,u,l)),L=-1)}return{x:p,y,placement:u,strategy:r,middlewareData:k}};async function Nx(a,o){var c;o===void 0&&(o={});const{x:n,y:r,platform:s,rects:i,elements:h,strategy:l}=a,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:y="floating",altBoundary:u=!1,padding:k=0}=B2(o,a),f=Cw(k),v=h[u?y==="floating"?"reference":"floating":y],g=ex(await s.getClippingRect({element:(c=await(s.isElement==null?void 0:s.isElement(v)))==null||c?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(h.floating)),boundary:d,rootBoundary:p,strategy:l})),b=y==="floating"?{x:n,y:r,width:i.floating.width,height:i.floating.height}:i.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h.floating)),m=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},w=ex(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:b,offsetParent:x,strategy:l}):b);return{top:(g.top-w.top+f.top)/m.y,bottom:(w.bottom-g.bottom+f.bottom)/m.y,left:(g.left-w.left+f.left)/m.x,right:(w.right-g.right+f.right)/m.x}}const jC=a=>({name:"arrow",options:a,async fn(o){const{x:c,y:n,placement:r,rects:s,platform:i,elements:h,middlewareData:l}=o,{element:d,padding:p=0}=B2(a,o)||{};if(d==null)return{};const y=Cw(p),u={x:c,y:n},k=Rx(r),f=$x(k),L=await i.getDimensions(d),v=k==="y",g=v?"top":"left",b=v?"bottom":"right",x=v?"clientHeight":"clientWidth",m=s.reference[f]+s.reference[k]-u[k]-s.floating[f],w=u[k]-s.reference[k],H=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let j=H?H[x]:0;(!j||!await(i.isElement==null?void 0:i.isElement(H)))&&(j=h.floating[x]||s.floating[f]);const B=m/2-w/2,$=j/2-L[f]/2-1,S=S2(y[g],$),A=S2(y[b],$),D=S,O=j-L[f]-A,R=j/2-L[f]/2+B,W=zx(D,R,O),ee=!l.arrow&&ve(r)!=null&&R!==W&&s.reference[f]/2-(R<D?S:A)-L[f]/2<0,Y=ee?R<D?R-D:R-O:0;return{[k]:u[k]+Y,data:{[k]:W,centerOffset:R-W-Y,...ee&&{alignmentOffset:Y}},reset:ee}}});function EC(a,o,c){return(a?[...c.filter(r=>ve(r)===a),...c.filter(r=>ve(r)!==a)]:c.filter(r=>Ie(r)===r)).filter(r=>a?ve(r)===a||(o?JM(r)!==r:!1):!0)}const TC=function(a){return a===void 0&&(a={}),{name:"autoPlacement",options:a,async fn(o){var c,n,r;const{rects:s,middlewareData:i,placement:h,platform:l,elements:d}=o,{crossAxis:p=!1,alignment:y,allowedPlacements:u=tw,autoAlignment:k=!0,...f}=B2(a,o),L=y!==void 0||u===tw?EC(y||null,k,u):u,v=await Nx(o,f),g=((c=i.autoPlacement)==null?void 0:c.index)||0,b=L[g];if(b==null)return{};const x=bw(b,s,await(l.isRTL==null?void 0:l.isRTL(d.floating)));if(h!==b)return{reset:{placement:L[0]}};const m=[v[Ie(b)],v[x[0]],v[x[1]]],w=[...((n=i.autoPlacement)==null?void 0:n.overflows)||[],{placement:b,overflows:m}],H=L[g+1];if(H)return{data:{index:g+1,overflows:w},reset:{placement:H}};const j=w.map(S=>{const A=ve(S.placement);return[S.placement,A&&p?S.overflows.slice(0,2).reduce((D,O)=>D+O,0):S.overflows[0],S.overflows]}).sort((S,A)=>S[1]-A[1]),$=((r=j.filter(S=>S[2].slice(0,ve(S[0])?2:3).every(A=>A<=0))[0])==null?void 0:r[0])||j[0][0];return $!==h?{data:{index:g+1,overflows:w},reset:{placement:$}}:{}}}},DC=function(a){return a===void 0&&(a={}),{name:"flip",options:a,async fn(o){var c,n;const{placement:r,middlewareData:s,rects:i,initialPlacement:h,platform:l,elements:d}=o,{mainAxis:p=!0,crossAxis:y=!0,fallbackPlacements:u,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:L=!0,...v}=B2(a,o);if((c=s.arrow)!=null&&c.alignmentOffset)return{};const g=Ie(r),b=z2(h),x=Ie(h)===h,m=await(l.isRTL==null?void 0:l.isRTL(d.floating)),w=u||(x||!L?[YM(h)]:VC(h)),H=f!=="none";!u&&H&&w.push(...AC(h,L,f,m));const j=[h,...w],B=await Nx(o,v),$=[];let S=((n=s.flip)==null?void 0:n.overflows)||[];if(p&&$.push(B[g]),y){const R=bw(r,i,m);$.push(B[R[0]],B[R[1]])}if(S=[...S,{placement:r,overflows:$}],!$.every(R=>R<=0)){var A,D;const R=(((A=s.flip)==null?void 0:A.index)||0)+1,W=j[R];if(W)return{data:{index:R,overflows:S},reset:{placement:W}};let ee=(D=S.filter(Y=>Y.overflows[0]<=0).sort((Y,_)=>Y.overflows[1]-_.overflows[1])[0])==null?void 0:D.placement;if(!ee)switch(k){case"bestFit":{var O;const Y=(O=S.filter(_=>{if(H){const M=z2(_.placement);return M===b||M==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(M=>M>0).reduce((M,P)=>M+P,0)]).sort((_,M)=>_[1]-M[1])[0])==null?void 0:O[0];Y&&(ee=Y);break}case"initialPlacement":ee=h;break}if(r!==ee)return{reset:{placement:ee}}}return{}}}};async function FC(a,o){const{placement:c,platform:n,elements:r}=a,s=await(n.isRTL==null?void 0:n.isRTL(r.floating)),i=Ie(c),h=ve(c),l=z2(c)==="y",d=["left","top"].includes(i)?-1:1,p=s&&l?-1:1,y=B2(o,a);let{mainAxis:u,crossAxis:k,alignmentAxis:f}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return h&&typeof f=="number"&&(k=h==="end"?f*-1:f),l?{x:k*p,y:u*d}:{x:u*d,y:k*p}}const $C=function(a){return a===void 0&&(a=0),{name:"offset",options:a,async fn(o){var c,n;const{x:r,y:s,placement:i,middlewareData:h}=o,l=await FC(o,a);return i===((c=h.offset)==null?void 0:c.placement)&&(n=h.arrow)!=null&&n.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:i}}}}},RC=function(a){return a===void 0&&(a={}),{name:"shift",options:a,async fn(o){const{x:c,y:n,placement:r}=o,{mainAxis:s=!0,crossAxis:i=!1,limiter:h={fn:v=>{let{x:g,y:b}=v;return{x:g,y:b}}},...l}=B2(a,o),d={x:c,y:n},p=await Nx(o,l),y=z2(Ie(r)),u=ww(y);let k=d[u],f=d[y];if(s){const v=u==="y"?"top":"left",g=u==="y"?"bottom":"right",b=k+p[v],x=k-p[g];k=zx(b,k,x)}if(i){const v=y==="y"?"top":"left",g=y==="y"?"bottom":"right",b=f+p[v],x=f-p[g];f=zx(b,f,x)}const L=h.fn({...o,[u]:k,[y]:f});return{...L,data:{x:L.x-c,y:L.y-n,enabled:{[u]:s,[y]:i}}}}}};function rx(){return typeof window<"u"}function x2(a){return Ox(a)?(a.nodeName||"").toLowerCase():"#document"}function ne(a){var o;return(a==null||(o=a.ownerDocument)==null?void 0:o.defaultView)||window}function xe(a){var o;return(o=(Ox(a)?a.ownerDocument:a.document)||window.document)==null?void 0:o.documentElement}function Ox(a){return rx()?a instanceof Node||a instanceof ne(a).Node:!1}function le(a){return rx()?a instanceof Element||a instanceof ne(a).Element:!1}function ge(a){return rx()?a instanceof HTMLElement||a instanceof ne(a).HTMLElement:!1}function ow(a){return!rx()||typeof ShadowRoot>"u"?!1:a instanceof ShadowRoot||a instanceof ne(a).ShadowRoot}function F2(a){const{overflow:o,overflowX:c,overflowY:n,display:r}=ie(a);return/auto|scroll|overlay|hidden|clip/.test(o+n+c)&&!["inline","contents"].includes(r)}function NC(a){return["table","td","th"].includes(x2(a))}function sx(a){return[":popover-open",":modal"].some(o=>{try{return a.matches(o)}catch{return!1}})}function Ux(a){const o=Zx(),c=le(a)?ie(a):a;return["transform","translate","scale","rotate","perspective"].some(n=>c[n]?c[n]!=="none":!1)||(c.containerType?c.containerType!=="normal":!1)||!o&&(c.backdropFilter?c.backdropFilter!=="none":!1)||!o&&(c.filter?c.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(c.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(c.contain||"").includes(n))}function OC(a){let o=Ve(a);for(;ge(o)&&!q2(o);){if(Ux(o))return o;if(sx(o))return null;o=Ve(o)}return null}function Zx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function q2(a){return["html","body","#document"].includes(x2(a))}function ie(a){return ne(a).getComputedStyle(a)}function lx(a){return le(a)?{scrollLeft:a.scrollLeft,scrollTop:a.scrollTop}:{scrollLeft:a.scrollX,scrollTop:a.scrollY}}function Ve(a){if(x2(a)==="html")return a;const o=a.assignedSlot||a.parentNode||ow(a)&&a.host||xe(a);return ow(o)?o.host:o}function Lw(a){const o=Ve(a);return q2(o)?a.ownerDocument?a.ownerDocument.body:a.body:ge(o)&&F2(o)?o:Lw(o)}function E2(a,o,c){var n;o===void 0&&(o=[]),c===void 0&&(c=!0);const r=Lw(a),s=r===((n=a.ownerDocument)==null?void 0:n.body),i=ne(r);if(s){const h=qx(i);return o.concat(i,i.visualViewport||[],F2(r)?r:[],h&&c?E2(h):[])}return o.concat(r,E2(r,[],c))}function qx(a){return a.parent&&Object.getPrototypeOf(a.parent)?a.frameElement:null}function Iw(a){const o=ie(a);let c=parseFloat(o.width)||0,n=parseFloat(o.height)||0;const r=ge(a),s=r?a.offsetWidth:c,i=r?a.offsetHeight:n,h=QM(c)!==s||QM(n)!==i;return h&&(c=s,n=i),{width:c,height:n,$:h}}function _x(a){return le(a)?a:a.contextElement}function L2(a){const o=_x(a);if(!ge(o))return fe(1);const c=o.getBoundingClientRect(),{width:n,height:r,$:s}=Iw(o);let i=(s?QM(c.width):c.width)/n,h=(s?QM(c.height):c.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!h||!Number.isFinite(h))&&(h=1),{x:i,y:h}}const UC=fe(0);function Sw(a){const o=ne(a);return!Zx()||!o.visualViewport?UC:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function ZC(a,o,c){return o===void 0&&(o=!1),!c||o&&c!==ne(a)?!1:o}function M2(a,o,c,n){o===void 0&&(o=!1),c===void 0&&(c=!1);const r=a.getBoundingClientRect(),s=_x(a);let i=fe(1);o&&(n?le(n)&&(i=L2(n)):i=L2(a));const h=ZC(s,c,n)?Sw(s):fe(0);let l=(r.left+h.x)/i.x,d=(r.top+h.y)/i.y,p=r.width/i.x,y=r.height/i.y;if(s){const u=ne(s),k=n&&le(n)?ne(n):n;let f=u,L=qx(f);for(;L&&n&&k!==f;){const v=L2(L),g=L.getBoundingClientRect(),b=ie(L),x=g.left+(L.clientLeft+parseFloat(b.paddingLeft))*v.x,m=g.top+(L.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,d*=v.y,p*=v.x,y*=v.y,l+=x,d+=m,f=ne(L),L=qx(f)}}return ex({width:p,height:y,x:l,y:d})}function Wx(a,o){const c=lx(a).scrollLeft;return o?o.left+c:M2(xe(a)).left+c}function zw(a,o,c){c===void 0&&(c=!1);const n=a.getBoundingClientRect(),r=n.left+o.scrollLeft-(c?0:Wx(a,n)),s=n.top+o.scrollTop;return{x:r,y:s}}function _C(a){let{elements:o,rect:c,offsetParent:n,strategy:r}=a;const s=r==="fixed",i=xe(n),h=o?sx(o.floating):!1;if(n===i||h&&s)return c;let l={scrollLeft:0,scrollTop:0},d=fe(1);const p=fe(0),y=ge(n);if((y||!y&&!s)&&((x2(n)!=="body"||F2(i))&&(l=lx(n)),ge(n))){const k=M2(n);d=L2(n),p.x=k.x+n.clientLeft,p.y=k.y+n.clientTop}const u=i&&!y&&!s?zw(i,l,!0):fe(0);return{width:c.width*d.x,height:c.height*d.y,x:c.x*d.x-l.scrollLeft*d.x+p.x+u.x,y:c.y*d.y-l.scrollTop*d.y+p.y+u.y}}function WC(a){return Array.from(a.getClientRects())}function GC(a){const o=xe(a),c=lx(a),n=a.ownerDocument.body,r=v2(o.scrollWidth,o.clientWidth,n.scrollWidth,n.clientWidth),s=v2(o.scrollHeight,o.clientHeight,n.scrollHeight,n.clientHeight);let i=-c.scrollLeft+Wx(a);const h=-c.scrollTop;return ie(n).direction==="rtl"&&(i+=v2(o.clientWidth,n.clientWidth)-r),{width:r,height:s,x:i,y:h}}function XC(a,o){const c=ne(a),n=xe(a),r=c.visualViewport;let s=n.clientWidth,i=n.clientHeight,h=0,l=0;if(r){s=r.width,i=r.height;const d=Zx();(!d||d&&o==="fixed")&&(h=r.offsetLeft,l=r.offsetTop)}return{width:s,height:i,x:h,y:l}}function KC(a,o){const c=M2(a,!0,o==="fixed"),n=c.top+a.clientTop,r=c.left+a.clientLeft,s=ge(a)?L2(a):fe(1),i=a.clientWidth*s.x,h=a.clientHeight*s.y,l=r*s.x,d=n*s.y;return{width:i,height:h,x:l,y:d}}function cw(a,o,c){let n;if(o==="viewport")n=XC(a,c);else if(o==="document")n=GC(xe(a));else if(le(o))n=KC(o,c);else{const r=Sw(a);n={x:o.x-r.x,y:o.y-r.y,width:o.width,height:o.height}}return ex(n)}function qw(a,o){const c=Ve(a);return c===o||!le(c)||q2(c)?!1:ie(c).position==="fixed"||qw(c,o)}function QC(a,o){const c=o.get(a);if(c)return c;let n=E2(a,[],!1).filter(h=>le(h)&&x2(h)!=="body"),r=null;const s=ie(a).position==="fixed";let i=s?Ve(a):a;for(;le(i)&&!q2(i);){const h=ie(i),l=Ux(i);!l&&h.position==="fixed"&&(r=null),(s?!l&&!r:!l&&h.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||F2(i)&&!l&&qw(a,i))?n=n.filter(p=>p!==i):r=h,i=Ve(i)}return o.set(a,n),n}function JC(a){let{element:o,boundary:c,rootBoundary:n,strategy:r}=a;const i=[...c==="clippingAncestors"?sx(o)?[]:QC(o,this._c):[].concat(c),n],h=i[0],l=i.reduce((d,p)=>{const y=cw(o,p,r);return d.top=v2(y.top,d.top),d.right=S2(y.right,d.right),d.bottom=S2(y.bottom,d.bottom),d.left=v2(y.left,d.left),d},cw(o,h,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function YC(a){const{width:o,height:c}=Iw(a);return{width:o,height:c}}function eL(a,o,c){const n=ge(o),r=xe(o),s=c==="fixed",i=M2(a,!0,s,o);let h={scrollLeft:0,scrollTop:0};const l=fe(0);if(n||!n&&!s)if((x2(o)!=="body"||F2(r))&&(h=lx(o)),n){const u=M2(o,!0,s,o);l.x=u.x+o.clientLeft,l.y=u.y+o.clientTop}else r&&(l.x=Wx(r));const d=r&&!n&&!s?zw(r,h):fe(0),p=i.left+h.scrollLeft-l.x-d.x,y=i.top+h.scrollTop-l.y-d.y;return{x:p,y,width:i.width,height:i.height}}function Cx(a){return ie(a).position==="static"}function nw(a,o){if(!ge(a)||ie(a).position==="fixed")return null;if(o)return o(a);let c=a.offsetParent;return xe(a)===c&&(c=c.ownerDocument.body),c}function Vw(a,o){const c=ne(a);if(sx(a))return c;if(!ge(a)){let r=Ve(a);for(;r&&!q2(r);){if(le(r)&&!Cx(r))return r;r=Ve(r)}return c}let n=nw(a,o);for(;n&&NC(n)&&Cx(n);)n=nw(n,o);return n&&q2(n)&&Cx(n)&&!Ux(n)?c:n||OC(a)||c}const tL=async function(a){const o=this.getOffsetParent||Vw,c=this.getDimensions,n=await c(a.floating);return{reference:eL(a.reference,await o(a.floating),a.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function aL(a){return ie(a).direction==="rtl"}const oL={convertOffsetParentRelativeRectToViewportRelativeRect:_C,getDocumentElement:xe,getClippingRect:JC,getOffsetParent:Vw,getElementRects:tL,getClientRects:WC,getDimensions:YC,getScale:L2,isElement:le,isRTL:aL};function Bw(a,o){return a.x===o.x&&a.y===o.y&&a.width===o.width&&a.height===o.height}function cL(a,o){let c=null,n;const r=xe(a);function s(){var h;clearTimeout(n),(h=c)==null||h.disconnect(),c=null}function i(h,l){h===void 0&&(h=!1),l===void 0&&(l=1),s();const d=a.getBoundingClientRect(),{left:p,top:y,width:u,height:k}=d;if(h||o(),!u||!k)return;const f=N2(y),L=N2(r.clientWidth-(p+u)),v=N2(r.clientHeight-(y+k)),g=N2(p),x={rootMargin:-f+"px "+-L+"px "+-v+"px "+-g+"px",threshold:v2(0,S2(1,l))||1};let m=!0;function w(H){const j=H[0].intersectionRatio;if(j!==l){if(!m)return i();j?i(!1,j):n=setTimeout(()=>{i(!1,1e-7)},1e3)}j===1&&!Bw(d,a.getBoundingClientRect())&&i(),m=!1}try{c=new IntersectionObserver(w,{...x,root:r.ownerDocument})}catch{c=new IntersectionObserver(w,x)}c.observe(a)}return i(!0),s}function Aw(a,o,c,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,d=_x(a),p=r||s?[...d?E2(d):[],...E2(o)]:[];p.forEach(g=>{r&&g.addEventListener("scroll",c,{passive:!0}),s&&g.addEventListener("resize",c)});const y=d&&h?cL(d,c):null;let u=-1,k=null;i&&(k=new ResizeObserver(g=>{let[b]=g;b&&b.target===d&&k&&(k.unobserve(o),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{var x;(x=k)==null||x.observe(o)})),c()}),d&&!l&&k.observe(d),k.observe(o));let f,L=l?M2(a):null;l&&v();function v(){const g=M2(a);L&&!Bw(L,g)&&c(),L=g,f=requestAnimationFrame(v)}return c(),()=>{var g;p.forEach(b=>{r&&b.removeEventListener("scroll",c),s&&b.removeEventListener("resize",c)}),y==null||y(),(g=k)==null||g.disconnect(),k=null,l&&cancelAnimationFrame(f)}}const ix=$C,Hw=TC,dx=RC,hx=DC,nL=jC,rL=(a,o,c)=>{const n=new Map,r={platform:oL,...c},s={...r.platform,_c:n};return PC(a,o,{...r,platform:s})};function sL(a){return a!=null&&typeof a=="object"&&"$el"in a}function Vx(a){if(sL(a)){const o=a.$el;return Ox(o)&&x2(o)==="#comment"?null:o}return a}function C2(a){return typeof a=="function"?a():e.unref(a)}function Pw(a){return{name:"arrow",options:a,fn(o){const c=Vx(C2(a.element));return c==null?{}:nL({element:c,padding:a.padding}).fn(o)}}}function jw(a){return typeof window>"u"?1:(a.ownerDocument.defaultView||window).devicePixelRatio||1}function rw(a,o){const c=jw(a);return Math.round(o*c)/c}function ux(a,o,c){c===void 0&&(c={});const n=c.whileElementsMounted,r=e.computed(()=>{var j;return(j=C2(c.open))!=null?j:!0}),s=e.computed(()=>C2(c.middleware)),i=e.computed(()=>{var j;return(j=C2(c.placement))!=null?j:"bottom"}),h=e.computed(()=>{var j;return(j=C2(c.strategy))!=null?j:"absolute"}),l=e.computed(()=>{var j;return(j=C2(c.transform))!=null?j:!0}),d=e.computed(()=>Vx(a.value)),p=e.computed(()=>Vx(o.value)),y=e.ref(0),u=e.ref(0),k=e.ref(h.value),f=e.ref(i.value),L=e.shallowRef({}),v=e.ref(!1),g=e.computed(()=>{const j={position:k.value,left:"0",top:"0"};if(!p.value)return j;const B=rw(p.value,y.value),$=rw(p.value,u.value);return l.value?{...j,transform:"translate("+B+"px, "+$+"px)",...jw(p.value)>=1.5&&{willChange:"transform"}}:{position:k.value,left:B+"px",top:$+"px"}});let b;function x(){if(d.value==null||p.value==null)return;const j=r.value;rL(d.value,p.value,{middleware:s.value,placement:i.value,strategy:h.value}).then(B=>{y.value=B.x,u.value=B.y,k.value=B.strategy,f.value=B.placement,L.value=B.middlewareData,v.value=j!==!1})}function m(){typeof b=="function"&&(b(),b=void 0)}function w(){if(m(),n===void 0){x();return}if(d.value!=null&&p.value!=null){b=n(d.value,p.value,x);return}}function H(){r.value||(v.value=!1)}return e.watch([s,i,h,r],x,{flush:"sync"}),e.watch([d,p],w,{flush:"sync"}),e.watch(r,H,{flush:"sync"}),e.getCurrentScope()&&e.onScopeDispose(m),{x:e.shallowReadonly(y),y:e.shallowReadonly(u),strategy:e.shallowReadonly(k),placement:e.shallowReadonly(f),middlewareData:e.shallowReadonly(L),isPositioned:e.shallowReadonly(v),floatingStyles:g,update:x}}function lL(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}const iL=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function sw(a,o,c={}){const{immediate:n=!0,immediateCallback:r=!1}=c,s=e.shallowRef(!1);let i=null;function h(){i&&(clearTimeout(i),i=null)}function l(){s.value=!1,h()}function d(...p){r&&a(),h(),s.value=!0,i=setTimeout(()=>{s.value=!1,i=null,a(...p)},e.toValue(o))}return n&&(s.value=!0,iL&&d()),lL(l),{isPending:e.readonly(s),start:d,stop:l}}function Ew(a={}){const{openDelay:o=0,closeDelay:c=150,onOpen:n,onClose:r,initiallyOpened:s=!1}=a,i=e.ref(!1),{start:h,stop:l}=sw(()=>{i.value=!0,n==null||n()},o),{start:d,stop:p}=sw(()=>{i.value=!1,r==null||r()},c),y=()=>{p(),o===0?(i.value=!0,n==null||n()):h()},u=()=>{l(),c===0?(i.value=!1,r==null||r()):d()};return s&&y(),{isOpen:i,open:y,close:u}}const Gx=Symbol("hover-card"),Xx=e.defineComponent({__name:"HoverCardTarget",props:{withWrapper:{type:Boolean,default:!1},wrapperClass:{default:""}},setup(a){return e.inject(Gx,null),(o,c)=>o.withWrapper?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.wrapperClass)},[e.renderSlot(o.$slots,"default")],2)):e.renderSlot(o.$slots,"default",{key:1})}}),dL={class:"rounded-lg bg-white shadow-lg border border-gray-200 px-3 py-2"},Tw=e.defineComponent({__name:"HoverCard",props:{initiallyOpened:{type:Boolean,default:!1},openDelay:{default:0},closeDelay:{default:150},placement:{default:"bottom"},onOpen:{},onClose:{},offset:{default:8},disabled:{type:Boolean,default:!1},size:{default:"md"},withArrow:{type:Boolean,default:!0},arrowOffset:{default:8},trapFocus:{type:Boolean,default:!0},zIndex:{default:1e3}},setup(a){const o=a,c=e.ref(!1);e.onMounted(()=>{c.value=!0});const n=e.ref(null),r=e.ref(null),s=e.ref(null),{isOpen:i,open:h,close:l}=Ew({openDelay:o.openDelay,closeDelay:o.closeDelay,initiallyOpened:o.initiallyOpened});e.provide(Gx,{isOpen:i,open:h,close:l});const{x:d,y:p,strategy:y,middlewareData:u,placement:k,update:f}=ux(r,s,{placement:o.placement,middleware:[ix(o.offset),hx({fallbackPlacements:["top","bottom","right","left"].filter(m=>m!==o.placement)}),dx({padding:8}),Pw({element:n})]});e.watch(i,async m=>{m&&await f()});const L=e.computed(()=>{var m,w;return(w=(m=u.value)==null?void 0:m.arrow)==null?void 0:w.x}),v=e.computed(()=>{var m,w;return(w=(m=u.value)==null?void 0:m.arrow)==null?void 0:w.y}),g=e.computed(()=>{switch(k.value){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return"bottom"}}),b=e.computed(()=>{switch(k.value){case"top":return"translate(-50%, 50%)";case"bottom":return"translate(-50%, -50%)";case"left":return"translate(50%, -50%)";case"right":return"translate(-50%, -50%)";default:return"translate(-50%, -50%)"}}),x=e.computed(()=>({xs:"w-[200px]",sm:"w-[240px]",md:"w-[320px]",lg:"w-[400px]",xl:"w-[480px]"})[o.size]);return(m,w)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"reference",ref:r,class:"relative inline-block",onMouseenter:w[2]||(w[2]=H=>!m.disabled&&e.unref(h)()),onMouseleave:w[3]||(w[3]=H=>!m.disabled&&e.unref(l)())},[e.createVNode(Xx,null,{default:e.withCtx(()=>[e.renderSlot(m.$slots,"target")]),_:3}),c.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"opacity-0 translate-y-1","enter-to-class":"opacity-100 translate-y-0","leave-active-class":"transition duration-150 ease-in","leave-from-class":"opacity-100 translate-y-0","leave-to-class":"opacity-0 translate-y-1"},{default:e.withCtx(()=>[e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"floating",ref:s,style:e.normalizeStyle({position:e.unref(y),top:`${e.unref(p)??0}px`,left:`${e.unref(d)??0}px`,zIndex:m.zIndex||1e3}),class:e.normalizeClass(["min-w-[200px]",[x.value]]),onMouseenter:w[0]||(w[0]=H=>!m.disabled&&e.unref(h)()),onMouseleave:w[1]||(w[1]=H=>!m.disabled&&e.unref(l)())},[e.createElementVNode("div",dL,[e.renderSlot(m.$slots,"dropdown")]),m.withArrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowRef",ref:n,class:"absolute w-2 h-2 rotate-45 bg-white border border-gray-200",style:e.normalizeStyle({position:"absolute",left:`${L.value??0}px`,top:`${v.value??0}px`,[g.value]:"-1px","z-index":-1,"transform-origin":"center",transform:`rotate(45deg) ${b.value}`})},null,4)):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)],544))}});Object.assign(Tw,{Target:Xx});const hL={class:"cstu-modal-title"},uL=["innerHTML"],pL=e.defineComponent({__name:"MessageBoxOk",props:{message:{type:[String,Object],default:""},title:{type:String,default:"Message"},okTitle:{type:String,default:"OK"},okVariant:{type:String,default:"filled"},okColor:{type:String,default:"primary"},okDisabled:{type:Boolean,default:!1},centered:{type:Boolean,default:!0},scrollable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},size:{type:String,default:"md"},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},contentClass:{type:String,default:""},dialogClass:{type:String,default:""},modalClass:{type:String,default:""},showHeaderDivider:{type:Boolean,default:!1},showFooterDivider:{type:Boolean,default:!1},showDividers:{type:Boolean,default:!1},radius:{type:String,default:""},busy:{type:Boolean,default:!1},zIndex:{type:Number,default:1050}},emits:["close"],setup(a,{emit:o}){const c=a,n=o,r=e.ref(!1),s=e.computed(()=>c.radius?{[`cstu-radius-${c.radius}`]:!0}:{});function i(){h(!1)}function h(l){r.value=!1,setTimeout(()=>{document.body.classList.remove("cstu-modal-open"),n("close",l)},300)}return e.onMounted(()=>{document.body.classList.add("cstu-modal-open"),e.nextTick(()=>{r.value=!0})}),e.onBeforeUnmount(()=>{r.value=!1,document.body.classList.remove("cstu-modal-open")}),(l,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-modal-backdrop",style:e.normalizeStyle({zIndex:a.zIndex-10})},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"cstu-modal"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-modal modal",{"cstu-modal-static":!0,"cstu-modal-scrollable":a.scrollable},a.modalClass]),style:e.normalizeStyle({display:r.value?"block":"none",zIndex:a.zIndex}),tabindex:"-1",role:"dialog","aria-modal":"true",onClick:i},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-dialog",a.dialogClass,{"cstu-modal-fullscreen":a.fullscreen,"cstu-modal-dialog-centered":a.centered&&!a.fullscreen,"cstu-modal-dialog-scrollable":a.scrollable,[`cstu-modal-${a.size}`]:a.size&&!a.fullscreen}]),onClick:d[2]||(d[2]=e.withModifiers(()=>{},["stop"]))},[d[4]||(d[4]=e.createElementVNode("span",{tabindex:"0"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",a.contentClass,{"cstu-modal-content-fullscreen":a.fullscreen},s.value]),tabindex:"-1"},[e.createElementVNode("header",{class:e.normalizeClass(["cstu-modal-header",a.headerClass,{"show-divider":a.showHeaderDivider||a.showDividers}])},[e.createElementVNode("h5",hL,e.toDisplayString(a.title||"Message"),1),e.createElementVNode("button",{type:"button",class:"cstu-close","aria-label":"Close",onClick:d[0]||(d[0]=p=>h(!1))},d[3]||(d[3]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"cstu-size-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})],-1)]))],2),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",a.bodyClass])},[typeof a.message=="string"?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:a.message},null,8,uL)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.message),{key:1}))],2),e.createElementVNode("footer",{class:e.normalizeClass(["cstu-modal-footer",a.footerClass,{"show-divider":a.showFooterDivider||a.showDividers}])},[e.createVNode(K,{variant:a.okVariant,color:a.okColor,disabled:a.okDisabled||a.busy,loading:a.busy,size:"sm",onClick:d[1]||(d[1]=p=>h(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])],2)],2),d[5]||(d[5]=e.createElementVNode("span",{tabindex:"0"},null,-1))],2)],6)):e.createCommentVNode("",!0)]),_:1})],64))}}),yL={class:"cstu-modal-title"},kL=["innerHTML"],mL=e.defineComponent({__name:"MessageBoxConfirm",props:{message:{type:[String,Object],default:""},title:{type:String,default:"Confirm"},okTitle:{type:String,default:"OK"},okVariant:{type:String,default:"filled"},okColor:{type:String,default:"primary"},okDisabled:{type:Boolean,default:!1},cancelTitle:{type:String,default:"Cancel"},cancelVariant:{type:String,default:"outline"},cancelColor:{type:String,default:"secondary"},cancelDisabled:{type:Boolean,default:!1},centered:{type:Boolean,default:!0},scrollable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},size:{type:String,default:"md"},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},contentClass:{type:String,default:""},dialogClass:{type:String,default:""},modalClass:{type:String,default:""},showHeaderDivider:{type:Boolean,default:!1},showFooterDivider:{type:Boolean,default:!1},showDividers:{type:Boolean,default:!1},radius:{type:String,default:""},busy:{type:Boolean,default:!1},onConfirm:{type:Function,default:void 0},closeOnConfirmSuccess:{type:Boolean,default:!0},closeOnConfirmError:{type:Boolean,default:!1},zIndex:{type:Number,default:1050}},emits:["close","confirm-success","confirm-error"],setup(a,{emit:o}){const c=a,n=o,r=e.ref(!1),s=e.ref(!1),i=e.computed(()=>c.busy||s.value),h=e.computed(()=>c.radius?{[`cstu-radius-${c.radius}`]:!0}:{});function l(){i.value||d(!1)}function d(u){r.value=!1,setTimeout(()=>{document.body.classList.remove("cstu-modal-open"),n("close",u)},300)}async function p(){if(!c.onConfirm){d(!0);return}try{s.value=!0;const u=await c.onConfirm();n("confirm-success",u),c.closeOnConfirmSuccess&&d(!0)}catch(u){n("confirm-error",u),c.closeOnConfirmError&&d(!1)}finally{s.value=!1}}function y(){i.value||d(!1)}return e.onMounted(()=>{document.body.classList.add("cstu-modal-open"),e.nextTick(()=>{r.value=!0})}),e.onBeforeUnmount(()=>{r.value=!1,document.body.classList.remove("cstu-modal-open")}),(u,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-modal-backdrop",style:e.normalizeStyle({zIndex:a.zIndex-10})},null,4)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"cstu-modal"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-modal modal",{"cstu-modal-static":!0,"cstu-modal-scrollable":a.scrollable},a.modalClass]),style:e.normalizeStyle({display:r.value?"block":"none",zIndex:a.zIndex}),tabindex:"-1",role:"dialog","aria-modal":"true",onClick:l},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-dialog",a.dialogClass,{"cstu-modal-fullscreen":a.fullscreen,"cstu-modal-dialog-centered":a.centered&&!a.fullscreen,"cstu-modal-dialog-scrollable":a.scrollable,[`cstu-modal-${a.size}`]:a.size&&!a.fullscreen}]),onClick:k[1]||(k[1]=e.withModifiers(()=>{},["stop"]))},[k[3]||(k[3]=e.createElementVNode("span",{tabindex:"0"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",a.contentClass,{"cstu-modal-content-fullscreen":a.fullscreen},h.value]),tabindex:"-1"},[e.createElementVNode("header",{class:e.normalizeClass(["cstu-modal-header",a.headerClass,{"show-divider":a.showHeaderDivider||a.showDividers}])},[e.createElementVNode("h5",yL,e.toDisplayString(a.title||"Confirm"),1),e.createElementVNode("button",{type:"button",class:"cstu-close","aria-label":"Close",onClick:y},k[2]||(k[2]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"cstu-size-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})],-1)]))],2),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",a.bodyClass])},[typeof a.message=="string"?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:a.message},null,8,kL)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.message),{key:1}))],2),e.createElementVNode("footer",{class:e.normalizeClass(["cstu-modal-footer",a.footerClass,{"show-divider":a.showFooterDivider||a.showDividers}])},[e.createVNode(K,{variant:a.cancelVariant,color:a.cancelColor,disabled:a.cancelDisabled||i.value,size:"sm",onClick:k[0]||(k[0]=f=>d(!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.cancelTitle),1)]),_:1},8,["variant","color","disabled"]),e.createVNode(K,{variant:a.okVariant,color:a.okColor,disabled:a.okDisabled||i.value,size:"sm",loading:i.value,onClick:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])],2)],2),k[4]||(k[4]=e.createElementVNode("span",{tabindex:"0"},null,-1))],2)],6)):e.createCommentVNode("",!0)]),_:1})],64))}}),fL=Symbol("CstuModal"),H2=e.reactive(new Map),tx={show:a=>{const o=H2.get(a);o&&typeof o.show=="function"&&o.show()},hide:a=>{const o=H2.get(a);o&&typeof o.hide=="function"&&o.hide()},toggle:a=>{const o=H2.get(a);o&&typeof o.toggle=="function"&&o.toggle()},msgBoxOk:(a,o={})=>{const c=document.createElement("div");document.body.appendChild(c);const n={...o,message:a};return new Promise(r=>{const s=e.createApp(pL,{...n,onClose:i=>{r(i),setTimeout(()=>{s.unmount(),c.parentNode&&c.parentNode.removeChild(c)},300)}});s.mount(c)})},msgBoxConfirm:(a,o={})=>{const c=document.createElement("div");document.body.appendChild(c);const n={...o,message:a};return new Promise(r=>{const s=e.createApp(mL,{...n,onClose:i=>{r(i),setTimeout(()=>{s.unmount(),c.parentNode&&c.parentNode.removeChild(c)},300)}});s.mount(c)})}},lw=tx;function vL(){return tx}function iw(a,o){H2.set(a,o)}function dw(a){H2.delete(a)}const gL={install:a=>{a.provide(fL,tx),a.config.globalProperties.$cstuModal=tx}},Dw=document.createElement("style");Dw.textContent=`
|
|
2
2
|
.cstu-msgbox-container {
|
|
3
3
|
position: relative;
|
|
4
4
|
z-index: 9999;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
opacity: 0 !important;
|
|
10
10
|
transition: opacity 0.15s linear;
|
|
11
11
|
}
|
|
12
|
-
`;document.head.appendChild(Dw);const ML=["id"],xL=["id","aria-labelledby"],wL=["aria-label"],bL=["id"],CL=["aria-label"],LL={key:0},IL=e.defineComponent({__name:"Modal",props:{id:{type:String,default:()=>`modal-${Date.now()}`},title:{type:String,default:""},modelValue:{type:Boolean,default:!1},size:{type:String,default:"md"},radius:{type:String,default:""},centered:{type:Boolean,default:!0},scrollable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},hideHeaderClose:{type:Boolean,default:!1},titleSrOnly:{type:Boolean,default:!1},ariaLabel:{type:String,default:""},content:{type:String,default:""},okTitle:{type:String,default:"OK"},okVariant:{type:String,default:"filled"},okColor:{type:String,default:"primary"},okDisabled:{type:Boolean,default:!1},cancelTitle:{type:String,default:"Cancel"},cancelVariant:{type:String,default:"outline"},cancelColor:{type:String,default:"secondary"},cancelDisabled:{type:Boolean,default:!1},modalClass:{type:String,default:""},dialogClass:{type:String,default:""},contentClass:{type:String,default:""},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},ariaLabelledby:{type:String,default:""},teleport:{type:Boolean,default:!0},backdrop:{type:Boolean,default:!0},backdropClass:{type:String,default:""},titleClass:{type:String,default:""},showHeaderDivider:{type:Boolean,default:!1},showFooterDivider:{type:Boolean,default:!1},showDividers:{type:Boolean,default:void 0},closeTitle:{type:String,default:"Close"},busy:{type:Boolean,default:!1},noCloseOnBackdrop:{type:Boolean,default:!1},noCloseOnEsc:{type:Boolean,default:!1},static:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},okOnly:{type:Boolean,default:!1},zIndex:{type:Number,default:1050},disableFocusTrap:{type:Boolean,default:!1},ignoreEnforceFocusSelector:{type:String,default:""}},emits:["update:modelValue","show","shown","hide","hidden","ok","cancel","close"],setup(a,{expose:o,emit:c}){class n{constructor(A,D={}){Se(this,"type");Se(this,"cancelable",!0);Se(this,"target",null);Se(this,"vueTarget",null);Se(this,"defaultPrevented",!1);Se(this,"componentId","");Se(this,"trigger","programmatic");this.type=A,Object.assign(this,D)}preventDefault(){this.defaultPrevented=!0}}const r=a,s=c,i=e.ref(!1),h=e.ref(null),l=e.ref(null),d=e.ref(r.zIndex),p=e.ref(!1),y=e.ref(0),u=e.computed(()=>r.zIndex!==1050?r.zIndex:d.value);function k(){if(r.zIndex!==1050){d.value=r.zIndex;return}const S=document.querySelectorAll(".cstu-modal");let A=1050;S.forEach(D=>{const O=parseInt(window.getComputedStyle(D).zIndex,10);!isNaN(O)&&O>A&&(A=O)}),d.value=A+10}const f=e.computed(()=>r.fullscreen?"":L(r.radius));function L(S){const A={none:"",sm:"cstu-rounded-sm",md:"cstu-rounded-md",lg:"cstu-rounded-lg",xl:"cstu-rounded-xl",full:"cstu-rounded-full"};return A[S||r.size]||A.md}function v(){if(i.value)return;const S=new n("show",{trigger:"programmatic",target:null,vueTarget:null,componentId:r.id});s("show",S),!S.defaultPrevented&&(h.value=document.activeElement,i.value=!0,y.value++,k(),document.body.classList.add("cstu-modal-open"),s("update:modelValue",!0),e.nextTick(()=>{r.disableFocusTrap||H(),s("shown",S)}))}function g(S="programmatic"){if(!i.value)return;const A=new n("hide",{trigger:S,target:null,vueTarget:null,componentId:r.id});s("hide",A),!A.defaultPrevented&&(i.value=!1,p.value=!1,document.body.classList.remove("cstu-modal-open"),s("update:modelValue",!1),e.nextTick(()=>{j(h.value),s("hidden",A)}))}function b(S){S&&(h.value=typeof S=="string"?document.querySelector(S):S),i.value?g():v()}function x(S){S==="ok"?s("ok"):S==="cancel"&&s("cancel"),g(S)}function m(S){const A=S.target,D=A.closest(".cstu-dropdown-menu"),O=A.tagName&&["input","select","textarea","button"].includes(A.tagName.toLowerCase()),R=A.closest(".cstu-modal-content");D||O||R&&A!==S.currentTarget||!r.noCloseOnBackdrop&&A===S.currentTarget&&g("backdrop")}function w(S){S.key==="Escape"&&i.value&&!r.noCloseOnEsc&&!r.busy&&g("esc")}function H(){e.nextTick(()=>{if(!l.value)return;const S=l.value,A=$(S);A.length>0&&A[0].focus()})}function j(S){if(S&&i.value===!1)try{S.focus()}catch{}}function B(S){if(r.disableFocusTrap||!l.value||!i.value)return;const A=S.target,D=l.value;if(r.ignoreEnforceFocusSelector&&r.ignoreEnforceFocusSelector.trim()!==""){const R=r.ignoreEnforceFocusSelector.split(",").map(W=>W.trim()).filter(W=>W.length>0);for(const W of R)if(A.closest(W))return}const O=!!A.closest(".cstu-modal-content");if(D!==A&&!D.contains(A)&&!O){if(p.value)return;p.value=!0;try{const R=$(D);R.length>0?R[0].focus():D.focus()}finally{setTimeout(()=>{p.value=!1},0)}}}function $(S){return Array.from(S.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))}return e.watch(()=>r.modelValue,S=>{S!==i.value&&(S?v():g())}),e.watch(()=>r.id,()=>{dw(r.id),iw(r.id,{show:v,hide:g,toggle:b})}),e.onMounted(()=>{iw(r.id,{show:v,hide:g,toggle:b}),document.addEventListener("keydown",w),document.addEventListener("focusin",B),r.modelValue&&(v(),i.value&&e.nextTick(()=>{setTimeout(()=>{const S=document.getElementById(r.id);let A=null;S&&S.parentNode&&(A=S.parentNode.querySelector(".cstu-modal-backdrop")),S&&window.getComputedStyle(S).display==="none"&&(S.style.display="block"),A&&window.getComputedStyle(A).display==="none"&&(A.style.display="block")},50)}))}),e.onBeforeUnmount(()=>{dw(r.id),document.removeEventListener("keydown",w),document.removeEventListener("focusin",B),i.value&&(i.value=!1,s("update:modelValue",!1))}),o({hide:g,show:v,close:x,toggle:b}),(S,A)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:r.static||r.teleport===!1},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value&&a.backdrop!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${r.id}-backdrop`,class:e.normalizeClass(["cstu-modal-backdrop",a.backdropClass]),style:e.normalizeStyle({zIndex:u.value-10})},null,14,ML)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:r.id,class:e.normalizeClass(["cstu-modal",[{"cstu-modal-static":r.static,"cstu-modal-scrollable":r.scrollable},r.modalClass]]),tabindex:"-1",role:"dialog","aria-modal":"true",style:e.normalizeStyle({zIndex:u.value}),"aria-labelledby":!a.hideHeader&&a.title?`modal-title-${r.id}`:void 0,onClick:m},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-dialog",a.dialogClass,{"cstu-modal-fullscreen":a.fullscreen,"cstu-modal-dialog-centered":a.centered&&!a.fullscreen,"cstu-modal-dialog-scrollable":a.scrollable,[`cstu-modal-${a.size}`]:a.size&&!a.fullscreen}]),onClick:A[4]||(A[4]=D=>D.target===D.currentTarget&&D.stopPropagation())},[A[6]||(A[6]=e.createElementVNode("span",{tabindex:"0"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",a.contentClass,{"cstu-modal-content-fullscreen":a.fullscreen},f.value]),tabindex:"-1",ref_key:"modalElement",ref:l,"aria-label":a.ariaLabel,onClick:A[3]||(A[3]=D=>D.target===D.currentTarget&&D.stopPropagation())},[a.hideHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("header",{key:0,class:e.normalizeClass(["cstu-modal-header",a.headerClass,{"show-divider":a.showHeaderDivider||a.showDividers}])},[e.renderSlot(S.$slots,"modal-header",{},()=>[e.renderSlot(S.$slots,"modal-title",{},()=>[e.createElementVNode("h5",{id:`modal-title-${r.id}`,class:e.normalizeClass([r.titleClass||"cstu-modal-title",{"sr-only":a.titleSrOnly}])},e.toDisplayString(a.title),11,bL)]),a.hideHeaderClose?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,type:"button","aria-label":a.closeTitle,class:"cstu-close cstu-self-baseline",onClick:A[0]||(A[0]=D=>x("headerClose"))},A[5]||(A[5]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"cstu-size-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})],-1)]),8,CL))])],2)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",a.bodyClass,{"cstu-modal-body-scrollable":a.scrollable}])},[e.renderSlot(S.$slots,"default",{},()=>[a.content?(e.openBlock(),e.createElementBlock("div",LL,e.toDisplayString(a.content),1)):e.createCommentVNode("",!0)])],2),a.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("footer",{key:1,class:e.normalizeClass(["cstu-modal-footer",a.footerClass,{"show-divider":a.showFooterDivider||a.showDividers}])},[e.renderSlot(S.$slots,"modal-footer",{},()=>[a.okOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(K,{key:0,variant:a.cancelVariant,color:a.cancelColor,disabled:a.cancelDisabled||a.busy,onClick:A[1]||(A[1]=D=>x("cancel"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.cancelTitle),1)]),_:1},8,["variant","color","disabled"])),e.createVNode(K,{variant:a.okVariant,color:a.okColor,disabled:a.okDisabled||a.busy,loading:a.busy,onClick:A[2]||(A[2]=D=>x("ok"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])])],2))],10,wL),A[7]||(A[7]=e.createElementVNode("span",{tabindex:"0"},null,-1))],2)],14,xL)):e.createCommentVNode("",!0)]),_:3})],8,["disabled"]))}});const SL={mounted(a,o){const c=typeof o.value=="string"?o.value:Object.keys(o.modifiers)[0];if(!c){console.warn("v-cstu-modal directive requires a modal ID");return}a.addEventListener("click",()=>{lw.show(c)}),a.tagName!=="BUTTON"&&(a.setAttribute("role","button"),a.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),lw.show(c))}),a.hasAttribute("tabindex")||a.setAttribute("tabindex","0"))}},zL={install:a=>{a.directive("cstu-modal",SL)}},qL=["primary","secondary","success","warning","info"];function Fw(a,o=qL){if(!a||!o||o.length===0)return"primary";let c=0;for(let r=0;r<a.length;r+=1)c=a.charCodeAt(r)+((c<<5)-c);const n=Math.abs(c)%o.length;return o[n]}function $w(a){return!a||typeof a!="string"?"":a.trim().split(" ").slice(0,2).map(o=>o.charAt(0).toUpperCase()).join("")}const VL=["src","alt"],BL=["title"],AL={key:1,"data-avatar-placeholder-icon":"true",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Rw=e.defineComponent({__name:"Avatar",props:{size:{default:"md"},radius:{default:"full"},color:{default:"primary"},gradient:{},src:{default:null},alt:{},imageProps:{},children:{},autoContrast:{type:Boolean,default:!0},name:{},allowedInitialsColors:{},variant:{default:"light"},component:{default:"div"},hover:{type:Boolean,default:!1},customClasses:{default:""}},setup(a){const o=a,c=e.ref(!o.src);e.watch(()=>o.src,y=>{c.value=!y},{immediate:!0});const n=y=>y?["primary","secondary","success","warning","danger","info","dark","light","initials"].includes(y):!0,r=e.computed(()=>o.name?$w(o.name):""),s=e.computed(()=>{const y={sm:"w-5 h-5 text-xs",md:"w-6 h-6 text-xs",lg:"w-[30px] h-[30px] text-sm",xl:"w-[32px] h-[32px] text-sm","2xl":"w-[34px] h-[34px] text-base","3xl":"w-[36px] h-[36px] text-base","4xl":"w-[38px] h-[38px] text-lg","5xl":"w-[52px] h-[52px] text-xl"};return typeof o.size=="string"?y[o.size]||y.md:typeof o.size=="number"?`w-[${o.size}px] h-[${o.size}px]`:y.md}),i=e.computed(()=>se(o.radius)),h=e.computed(()=>{if(o.src&&!c.value||!n(o.color)&&o.color!=="initials")return"";if(o.color==="initials"&&o.name){const f=Fw(o.name,o.allowedInitialsColors||["primary","secondary","success","warning","info"]);return f?U(f,"filled",{}):U("primary","filled",{})}const y=o.variant==="transparent"?"default":o.variant==="gradient"?"filled":o.variant,u=o.color&&o.color!=="initials"?o.color:"primary",k=U(u,y,{});return o.variant==="transparent"?"bg-transparent":k}),l=e.computed(()=>!n(o.color)&&o.color!=="initials"?"":o.variant==="transparent"?"bg-transparent":o.variant==="gradient"&&o.gradient?`bg-gradient-to-r from-${o.gradient.from} to-${o.gradient.to}`:Tx(o.variant)),d=e.computed(()=>{if(o.src&&!c.value||n(o.color)||o.color==="initials")return{};const y={};switch(o.variant){case"filled":y.backgroundColor=o.color,o.autoContrast&&(y.color="white");break;case"light":y.backgroundColor=`${o.color}20`,y.color=o.color;break;case"outline":y.backgroundColor="transparent",y.color=o.color,y.border=`1px solid ${o.color}`;break;case"transparent":y.backgroundColor="transparent",y.color=o.color;break}return y}),p=y=>{var u;c.value=!0,(u=o.imageProps)!=null&&u.onError&&o.imageProps.onError(y)};return(y,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.component||"div"),{class:e.normalizeClass(["avatar",s.value,i.value,!c.value&&y.src?"":h.value,!c.value&&y.src?"":l.value,{"avatar--with-image":!c.value&&y.src},{"hover:opacity-80 transition-opacity":y.hover},y.customClasses]),style:e.normalizeStyle(d.value)},{default:e.withCtx(()=>[!c.value&&y.src?(e.openBlock(),e.createElementBlock("img",e.mergeProps({key:0,class:"avatar__image",src:y.src,alt:y.alt},y.imageProps,{onError:p}),null,16,VL)):(e.openBlock(),e.createElementBlock("span",{key:1,class:"avatar__placeholder",title:y.alt},[e.renderSlot(y.$slots,"default",{},()=>[y.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(r.value),1)],64)):(e.openBlock(),e.createElementBlock("svg",AL,u[0]||(u[0]=[e.createElementVNode("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"},null,-1)])))])],8,BL))]),_:3},8,["class","style"]))}});const Nw=e.defineComponent({__name:"AvatarGroup",props:{spacing:{default:"sm"},gap:{default:"none"},outlineWidth:{default:"normal"},outlineColor:{default:"white"},outlineOffset:{default:"small"},customClasses:{default:""},max:{},hover:{type:Boolean,default:!1}},setup(a){const o=a,c=e.computed(()=>{if(typeof o.spacing=="number")return`${o.spacing}px`;const d={xs:"-1rem",sm:"-0.75rem",md:"-0.5rem",lg:"-0.25rem",xl:"0"};return d[o.spacing]||d.sm}),n=e.computed(()=>{if(typeof o.gap=="number")return`${o.gap}px`;if(typeof o.gap=="string"&&!isNaN(parseFloat(o.gap)))return o.gap;const d={none:"0",xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem"};return d[o.gap]||d.none}),r=e.computed(()=>{if(typeof o.outlineWidth=="number")return`${o.outlineWidth}px`;if(typeof o.outlineWidth=="string"&&!isNaN(parseFloat(o.outlineWidth)))return o.outlineWidth;const d={none:"0",thin:"1px",normal:"2px",medium:"3px",thick:"4px"};return d[o.outlineWidth]||d.normal}),s=e.computed(()=>{if(typeof o.outlineOffset=="number")return`${o.outlineOffset}px`;if(typeof o.outlineOffset=="string"&&!isNaN(parseFloat(o.outlineOffset)))return o.outlineOffset;const d={none:"0",inset:"-2px",small:"1px",medium:"2px",large:"3px"};return d[o.outlineOffset]||d.small}),i=e.computed(()=>typeof o.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(o.outlineColor)?`outline-${o.outlineColor}`:""),h=e.computed(()=>typeof o.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(o.outlineColor)?"var(--color-"+o.outlineColor+")":o.outlineColor),l=e.computed(()=>({"--avatar-group-spacing":c.value,"--avatar-group-gap":n.value,"--avatar-group-outline-width":r.value,"--avatar-group-outline-color":h.value,"--avatar-group-outline-offset":s.value}));return(d,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["avatar-group",d.customClasses,i.value,{"avatar-group--hover":d.hover}]),style:e.normalizeStyle(l.value)},[e.renderSlot(d.$slots,"default")],6))}});Rw.Group=Nw;const px=e.defineComponent({__name:"Tabs",props:{value:{type:String,default:void 0},defaultValue:{type:String,default:"first"},orientation:{type:String,default:"horizontal"},placement:{type:String,default:void 0},variant:{type:String,default:"text"}},emits:["change"],setup(a,{emit:o}){const c=a,n=e.computed(()=>c.placement?c.placement:c.orientation==="horizontal"?"top":"left"),r=e.computed(()=>c.orientation),s=e.computed(()=>c.variant),i=o,h=e.ref(c.value!==void 0?c.value:c.defaultValue);e.watch(()=>c.value,d=>{d!==void 0&&(h.value=d)});const l=d=>{c.value!==void 0?i("change",d):h.value=d};return e.provide("activeTab",h),e.provide("setActiveTab",l),e.provide("tabsOrientation",r),e.provide("tabsPlacement",n),(d,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-tabs",`cstu-tabs-${r.value}`,`cstu-tabs-placement-${n.value}`,`cstu-tabs-variant-${s.value}`])},[e.renderSlot(d.$slots,"default")],2))}});const Ow=e.defineComponent({__name:"TabsList",props:{justify:{type:String,default:"flex-start"},divider:{type:Boolean,default:!1}},setup(a){const o=a,c=e.inject("tabsOrientation",e.ref("horizontal")),n=e.inject("tabsPlacement",e.ref("top")),r=e.computed(()=>["tabs-list",`tabs-list-${c.value}`,`tabs-list-placement-${n.value}`,o.divider?"tabs-list-with-divider":""]),s=h=>{if(["space-between","space-around","space-evenly"].includes(h))return h;switch(h){case"flex-start":return"flex-start";case"flex-end":return"flex-end";case"center":return"center";default:return"flex-start"}},i=e.computed(()=>c.value==="horizontal"?{justifyContent:o.justify}:{justifyContent:s(o.justify)});return(h,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.value),style:e.normalizeStyle(i.value)},[e.renderSlot(h.$slots,"default")],6))}});const Uw=e.defineComponent({__name:"TabsTab",props:{value:{type:String,required:!0},color:{type:String,default:"primary"},variant:{type:String,default:"text"},size:{type:String,default:"md"},radius:{type:String,default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1}},setup(a){const o=a,c=e.inject("activeTab",e.ref("")),n=e.inject("setActiveTab",()=>{}),r=e.inject("tabsOrientation",e.ref("horizontal")),s=e.inject("tabsPlacement",e.ref("top")),i=e.computed(()=>c.value),h=e.computed(()=>r.value),l=e.computed(()=>s.value),d=e.computed(()=>i.value===o.value),p=e.computed(()=>h.value==="vertical"),y=e.computed(()=>o.fullWidth&&h.value==="horizontal"),u=()=>{!o.disabled&&!o.loading&&n(o.value)};return(k,f)=>(e.openBlock(),e.createBlock(e.unref(K),{class:e.normalizeClass(["tabs-tab",d.value?"tabs-tab-active":"tabs-tab-inactive",`tabs-tab-${o.variant}`,o.color?`tabs-tab-color-${o.color}`:"",`tabs-tab-orientation-${h.value}`,`tabs-tab-placement-${l.value}`,{"tabs-tab-full-width":y.value}]),disabled:o.disabled,loading:o.loading,color:d.value?o.color:"light",variant:d.value?o.variant:"subtle",size:o.size,radius:o.variant==="text"?"none":o.radius,"full-width":p.value,onClick:u},e.createSlots({default:e.withCtx(()=>[e.renderSlot(k.$slots,"default")]),_:2},[k.$slots.leftSection?{name:"leftSection",fn:e.withCtx(()=>[e.renderSlot(k.$slots,"leftSection")]),key:"0"}:void 0,k.$slots.rightSection?{name:"rightSection",fn:e.withCtx(()=>[e.renderSlot(k.$slots,"rightSection")]),key:"1"}:void 0]),1032,["class","disabled","loading","color","variant","size","radius","full-width"]))}});const Zw=e.defineComponent({__name:"TabsPanel",props:{value:{type:String,required:!0},KeepAlive:{type:Boolean,default:!1}},setup(a){const o=a,c=e.inject("activeTab",e.ref("")),n=e.inject("tabsOrientation",e.ref("horizontal")),r=e.inject("tabsPlacement",e.ref("top")),s=e.computed(()=>c.value===o.value),i=e.computed(()=>["tabs-panel",s.value?"tabs-panel-active":"tabs-panel-inactive",`tabs-panel-${n.value}`,`tabs-panel-placement-${r.value}`]);return(h,l)=>a.KeepAlive||s.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(i.value)},[e.renderSlot(h.$slots,"default")],2)),[[e.vShow,s.value]]):e.createCommentVNode("",!0)}});px.List=Ow;px.Tab=Uw;px.Panel=Zw;const HL={key:2,class:"cstu-flex cstu-items-center cstu-gap-2"},PL=e.defineComponent({__name:"Pagination",props:{modelValue:{default:1},total:{},siblings:{default:1},boundaries:{default:1},variant:{default:"filled"},color:{default:"primary"},size:{default:"md"},disabled:{type:Boolean,default:!1},withControls:{type:Boolean,default:!0},withEdges:{type:Boolean,default:!1},withPages:{type:Boolean,default:!0},class:{}},emits:["update:modelValue"],setup(a,{emit:o}){const c=a,n=o,r=e.ref(c.modelValue);e.watch(()=>c.modelValue,k=>{r.value=k});const s=e.computed(()=>r.value===1),i=e.computed(()=>r.value===c.total),h=e.computed(()=>{switch(c.size){case"xs":return"cstu-!h-[30px] cstu-!w-[30px] cstu-min-w-[30px] !cstu-p-0";case"sm":return"cstu-!h-[36px] cstu-!w-[36px] cstu-min-w-[36px] !cstu-p-0";case"md":return"cstu-!h-[40px] cstu-!w-[40px] cstu-min-w-[40px] !cstu-p-0";case"lg":return"cstu-!h-[45px] cstu-!w-[45px] cstu-min-w-[45px] !cstu-p-0";case"xl":return"cstu-!h-[50px] cstu-!w-[50px] cstu-min-w-[50px] !cstu-p-0";default:return"cstu-!h-[40px] cstu-!w-[40px] cstu-min-w-[40px] !cstu-p-0"}}),l=e.computed(()=>["cstu-flex cstu-items-center cstu-justify-center",y(c.size)]),d=e.computed(()=>{const k=[],f=c.total;if(c.siblings*2+3+c.boundaries*2>=f)return Array.from({length:f},(w,H)=>H+1);const v=Math.max(r.value-c.siblings,c.boundaries+1),g=Math.min(r.value+c.siblings,f-c.boundaries),b=v>c.boundaries+2,x=g<f-(c.boundaries+1),m=new Set;for(let w=1;w<=c.boundaries;w++)k.push(w),m.add(w);if(b)k.push("dots");else if(!b&&v>c.boundaries)for(let w=c.boundaries+1;w<v;w++)m.has(w)||(k.push(w),m.add(w));for(let w=v;w<=g;w++)m.has(w)||(k.push(w),m.add(w));if(x)k.push("dots");else if(!x&&g<f-c.boundaries)for(let w=g+1;w<f-c.boundaries+1;w++)m.has(w)||(k.push(w),m.add(w));for(let w=f-c.boundaries+1;w<=f;w++)m.has(w)||(k.push(w),m.add(w));return k}),p=k=>{k<1||k>c.total||c.disabled||(r.value=k,n("update:modelValue",k))};function y(k){const f={xs:"cstu-h-6 cstu-w-6 cstu-text-xs",sm:"cstu-h-7 cstu-w-7 cstu-text-sm",md:"cstu-h-8 cstu-w-8 cstu-text-sm",lg:"cstu-h-9 cstu-w-9 cstu-text-base",xl:"cstu-h-10 cstu-w-10 cstu-text-base"};return f[k]||f.md}const u=e.computed(()=>c.variant==="filled"?"subtle":"bordered-transparent");return(k,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-items-center cstu-gap-2",[c.class]])},[c.withEdges?(e.openBlock(),e.createBlock(K,{key:0,variant:u.value,color:"light",size:c.size,disabled:s.value||c.disabled,onClick:f[0]||(f[0]=L=>p(1)),"aria-label":"Go to first page",class:e.normalizeClass(h.value)},{default:e.withCtx(()=>f[4]||(f[4]=[e.createElementVNode("span",{class:"cstu-sr-only"},"First page",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"11 17 6 12 11 7"}),e.createElementVNode("polyline",{points:"18 17 13 12 18 7"})],-1)])),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withControls?(e.openBlock(),e.createBlock(K,{key:1,variant:u.value,color:"light",size:c.size,disabled:s.value||c.disabled,onClick:f[1]||(f[1]=L=>p(r.value-1)),"aria-label":"Go to previous page",class:e.normalizeClass(h.value)},{default:e.withCtx(()=>f[5]||(f[5]=[e.createElementVNode("span",{class:"cstu-sr-only"},"Previous page",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"15 18 9 12 15 6"})],-1)])),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withPages?(e.openBlock(),e.createElementBlock("div",HL,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(L,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:v},[L!=="dots"?(e.openBlock(),e.createBlock(K,{key:0,variant:L===r.value?"filled":u.value,color:L===r.value?c.color:"light",size:c.size,disabled:c.disabled,onClick:g=>p(Number(L)),"aria-current":L===r.value?"page":void 0,"aria-label":`Page ${L}`,class:e.normalizeClass(h.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L),1)]),_:2},1032,["variant","color","size","disabled","onClick","aria-current","aria-label","class"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["pagination-dots",[l.value,h.value]])},f[6]||(f[6]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"1"}),e.createElementVNode("circle",{cx:"19",cy:"12",r:"1"}),e.createElementVNode("circle",{cx:"5",cy:"12",r:"1"})],-1)]),2))],64))),128))])):e.createCommentVNode("",!0),c.withControls?(e.openBlock(),e.createBlock(K,{key:3,variant:u.value,color:"light",size:c.size,disabled:i.value||c.disabled,onClick:f[2]||(f[2]=L=>p(r.value+1)),"aria-label":"Go to next page",class:e.normalizeClass(h.value)},{default:e.withCtx(()=>f[7]||(f[7]=[e.createElementVNode("span",{class:"cstu-sr-only"},"Next page",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"9 18 15 12 9 6"})],-1)])),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withEdges?(e.openBlock(),e.createBlock(K,{key:4,variant:u.value,color:"light",size:c.size,disabled:i.value||c.disabled,onClick:f[3]||(f[3]=L=>p(c.total)),"aria-label":"Go to last page",class:e.normalizeClass(h.value)},{default:e.withCtx(()=>f[8]||(f[8]=[e.createElementVNode("span",{class:"cstu-sr-only"},"Last page",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"13 17 18 12 13 7"}),e.createElementVNode("polyline",{points:"6 17 11 12 6 7"})],-1)])),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0)],2))}}),_w={mounted(a,o){a._clickOutside=c=>{const n=c.target;if(!(a===n||a.contains(n))){const r=c.target,s=r.tagName&&r.tagName.toLowerCase()==="input",i=r.closest(".cstu-dropdown-menu");!s&&!i&&o.value(c)}},document.addEventListener("click",a._clickOutside,!0),document.addEventListener("touchstart",a._clickOutside,!0)},unmounted(a){a._clickOutside&&(document.removeEventListener("click",a._clickOutside,!0),document.removeEventListener("touchstart",a._clickOutside,!0))}},jL=["id","aria-labelledby","aria-modal"],EL={class:"cstu-popover-inner"},TL=["id"],DL=e.defineComponent({__name:"Popover",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},placement:{default:"bottom"},variant:{default:"shadow"},color:{default:"primary"},size:{default:"md"},radius:{default:"md"},hideHeader:{type:Boolean,default:!1},showCloseIcon:{type:Boolean,default:!0},hideFooter:{type:Boolean,default:!0},closeOnClickOutside:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},closeOnClick:{type:Boolean,default:!1},title:{default:""},content:{default:""},zIndex:{default:1e3},trigger:{default:"click"},backdrop:{type:[Boolean,String],default:!1},offsetDistance:{default:8},disabled:{type:Boolean,default:!1},popoverClass:{default:""},headerClass:{default:""},bodyClass:{default:""},footerClass:{default:""},trapFocus:{type:Boolean,default:!1},id:{default:()=>`popover-${Date.now()}`},shadow:{default:"md"},width:{}},emits:["update:open","open","close"],setup(a,{emit:o}){const c=a,n=o,r=e.ref(c.defaultOpen),s=e.ref(null),i=e.ref(null),h=e.ref(null),l=e.ref(null),d=e.ref(c.zIndex);c.open!==void 0&&(r.value=c.open);const p=e.computed(()=>{if(c.placement!=="auto")return c.placement}),y=e.computed(()=>{const M=[ix(c.offsetDistance)];return h.value&&M.push(Pw({element:h})),c.placement==="auto"?M.push(Hw({padding:8})):M.push(hx({fallbackPlacements:["top","bottom","left","right"],padding:8})),M.push(dx({padding:8})),M}),{floatingStyles:u,update:k}=ux(s,i,{placement:p,middleware:y,whileElementsMounted:Aw}),f=M=>{c.disabled||(c.trigger==="click"||c.trigger==="manual")&&j()},L=()=>{c.disabled||c.trigger==="hover"&&w()},v=()=>{c.disabled||c.trigger==="hover"&&setTimeout(()=>{H("hover")},100)},g=M=>{c.closeOnClick&&H("popoverClick"),M.stopPropagation()},b=M=>{c.closeOnClickOutside&&r.value&&i.value&&!i.value.contains(M.target)&&s.value&&!s.value.contains(M.target)&&H("clickAway")},x=()=>{c.closeOnClickOutside&&H("backdrop")},m=M=>{c.closeOnEscape&&M.key==="Escape"&&(M.preventDefault(),H("escape"))},w=()=>{c.disabled||r.value||(l.value=document.activeElement,r.value=!0,e.nextTick(()=>{k(),c.trapFocus&&B()}),n("open"),n("update:open",!0))},H=(M="programmatic")=>{r.value&&(r.value=!1,c.trapFocus&&$(l.value),n("close",M),n("update:open",!1))},j=()=>{r.value?H():w()},B=()=>{if(!i.value)return;const M=S(i.value);M.length>0?M[0].focus():i.value.focus()},$=M=>{M&&typeof M.focus=="function"&&M.focus()},S=M=>Array.from(M.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).filter(P=>!P.hasAttribute("disabled")&&!P.getAttribute("aria-hidden")),A=M=>{if(!r.value||!c.trapFocus||!i.value)return;const P=M.target;i.value.contains(P)||(M.preventDefault(),B())};e.watch(()=>c.open,M=>{M!==r.value&&(M?w():H())}),e.watch(s,M=>{M&&k()}),e.onMounted(()=>{document.addEventListener("keydown",m),c.trapFocus&&document.addEventListener("focusin",A)}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",m),c.trapFocus&&document.removeEventListener("focusin",A)});const D=e.computed(()=>[se(c.radius),!c.variant||c.variant==="shadow"?c.shadow?`cstu-shadow-${c.shadow}`:"cstu-shadow-md":"",c.popoverClass]),O=e.computed(()=>{const M=[...D.value.filter(Boolean)];let P=!1;const N=c.color;if(N&&oe(N)&&c.variant==="color"){const G=U(N,"filled",{disabled:c.disabled});typeof G=="string"&&G.trim()&&(M.push(...G.split(" ").filter(Boolean)),P=!0)}return P||(M.push("cstu-bg-white"),c.variant==="outline"&&M.push("cstu-border","cstu-border-gray-300"),M.push("cstu-text-gray-700")),M.filter(Boolean).map(G=>typeof G=="string"?G:Object.keys(G).filter(Ae=>G[Ae]).join(" ")).join(" ")}),R=e.computed(()=>{const M={width:typeof c.width=="number"?`${c.width}px`:c.width},P=c.color;if(P&&!oe(P)&&c.variant==="color"){M.backgroundColor=P;const N=W(P);M.color=N>128?"#000000":"#FFFFFF"}return{...u.value,...M}});e.computed(()=>{const M={backgroundColor:"white"},P=c.color;return c.variant==="color"&&P?oe(P)?(M.borderWidth="1px",M.borderStyle="solid",M.borderColor=`var(--${P}-500)`):M.backgroundColor=P:c.variant==="outline"&&(M.borderWidth="1px",M.borderStyle="solid",M.borderColor="#e2e8f0"),M});function W(M){if(M.startsWith("#"))try{const P=parseInt(M.substring(1,3),16),N=parseInt(M.substring(3,5),16),G=parseInt(M.substring(5,7),16);return(P*299+N*587+G*114)/1e3}catch{return 128}else if(M.startsWith("rgb"))try{const P=M.match(/\d+/g);if(P&&P.length>=3){const N=parseInt(P[0],10),G=parseInt(P[1],10),Ae=parseInt(P[2],10);return(N*299+G*587+Ae*114)/1e3}}catch{return 128}return 128}const ee=e.computed(()=>{const M=c.color,P=!(M&&oe(M)),N=c.variant==="outline";return["cstu-popover-header",{xs:"cstu-px-2 cstu-py-1.5",sm:"cstu-px-2.5 cstu-py-1.5",md:"cstu-px-3 cstu-py-2",lg:"cstu-px-3.5 cstu-py-2.5",xl:"cstu-px-4 cstu-py-3"}[c.size||"md"],f2(c.size||"md"),"cstu-flex cstu-items-center cstu-justify-between",N||P?"cstu-border-b cstu-border-gray-200 dark:cstu-border-gray-700":"",c.headerClass].filter(Boolean).join(" ")}),Y=e.computed(()=>["cstu-popover-body",{xs:"cstu-p-2",sm:"cstu-p-2.5",md:"cstu-p-3",lg:"cstu-p-3.5",xl:"cstu-p-4"}[c.size||"md"],f2(c.size||"sm"),c.bodyClass].filter(Boolean).join(" ")),_=e.computed(()=>{const M=c.color,P=!(M&&oe(M)),N=c.variant==="outline";return["cstu-popover-footer",{xs:"cstu-px-2 cstu-py-1.5",sm:"cstu-px-2.5 cstu-py-1.5",md:"cstu-px-3 cstu-py-2",lg:"cstu-px-3.5 cstu-py-2.5",xl:"cstu-px-4 cstu-py-3"}[c.size||"md"],N||P?"cstu-border-t cstu-border-gray-200 dark:cstu-border-gray-700":"","cstu-flex cstu-justify-end cstu-space-x-2",c.footerClass].filter(Boolean).join(" ")});return(M,P)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"triggerRef",ref:s,class:e.normalizeClass(["cstu-inline-block cstu-popover-trigger",{"cstu-cursor-not-allowed cstu-opacity-70":M.disabled}]),onClick:f,onMouseenter:L,onMouseleave:v},[e.renderSlot(M.$slots,"trigger")],34),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade",appear:""},{default:e.withCtx(()=>[r.value&&M.backdrop!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-popover-backdrop",{"cstu-bg-black/50":M.backdrop===!0,"cstu-bg-transparent":M.backdrop==="transparent"}]),style:e.normalizeStyle({zIndex:M.zIndex-10}),onClick:x},null,6)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{"enter-active-class":"cstu-transition cstu-ease-out cstu-duration-100","enter-from-class":"cstu-transform cstu-opacity-0 cstu-scale-95","enter-to-class":"cstu-transform cstu-opacity-100 cstu-scale-100","leave-active-class":"cstu-transition cstu-ease-in cstu-duration-75","leave-from-class":"cstu-transform cstu-opacity-100 cstu-scale-100","leave-to-class":"cstu-transform cstu-opacity-0 cstu-scale-95"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-popover-container",style:e.normalizeStyle({zIndex:d.value})},[e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"popoverRef",ref:i,id:c.id,class:e.normalizeClass(O.value),style:e.normalizeStyle([e.unref(u),R.value]),role:"dialog","aria-labelledby":c.title?`${c.id}-title`:void 0,"aria-modal":c.trapFocus,tabindex:"-1",onClick:g,onKeydown:e.withKeys(m,["esc"])},[e.createElementVNode("div",EL,[c.hideHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(ee.value)},[e.renderSlot(M.$slots,"header",{},()=>[e.createElementVNode("h3",{id:`${c.id}-title`,class:e.normalizeClass(["cstu-popover-title cstu-font-medium",e.unref(f2)(c.size||"md")])},e.toDisplayString(c.title),11,TL),c.showCloseIcon?(e.openBlock(),e.createBlock(K,{key:0,icon:"X",variant:"text",size:"xs",color:c.color&&e.unref(oe)(c.color)?"white":"gray",class:"cstu-ml-auto","aria-label":"Close popover",onClick:P[0]||(P[0]=e.withModifiers(N=>H("headerClose"),["stop"]))},null,8,["color"])):e.createCommentVNode("",!0)])],2)),e.createElementVNode("div",{class:e.normalizeClass(Y.value)},[e.renderSlot(M.$slots,"default",{},()=>[M.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(f2)(c.size||"sm"))},e.toDisplayString(M.content),3)):e.createCommentVNode("",!0)])],2),c.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(_.value)},[e.renderSlot(M.$slots,"footer",{},()=>[e.createVNode(K,{size:"sm",variant:"subtle",onClick:P[1]||(P[1]=N=>H("cancel"))},{default:e.withCtx(()=>P[2]||(P[2]=[e.createTextVNode(" Close ")])),_:1})])],2))])],46,jL)),[[e.unref(_w),b]])],4)):e.createCommentVNode("",!0)]),_:3})]))],64))}});const FL=e.defineComponent({__name:"Breadcrumbs",props:{separator:{default:"/"},separatorMargin:{default:"xs"},size:{default:"md"},radius:{default:"md"},color:{default:"primary"},highlightActive:{type:Boolean,default:!0},class:{},separatorClass:{},activeClass:{}},setup(a){const o=a,c=e.useSlots(),n=e.computed(()=>!!c.default),r=e.computed(()=>c.default?c.default():[]),s=y=>y===r.value.length-1,i=y=>y?["primary","secondary","success","warning","danger","info","dark","light"].includes(y):!0,h=y=>{if(!s(y)||!o.highlightActive)return"";if(i(o.color)){const u=Le[o.color];if(u)return`cstu-text-${u.base}-${u.main}`}return""},l=y=>!s(y)||!o.highlightActive?{}:i(o.color)?{}:{color:o.color},d=e.computed(()=>{const y={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"};return y[o.size]||y.md}),p=e.computed(()=>{const y={xs:"mx-1",sm:"mx-2",md:"mx-3",lg:"mx-4",xl:"mx-5"};return y[o.separatorMargin]||y.xs});return(y,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-breadcrumbs",o.class])},[n.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(r.value,(k,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-breadcrumb-item",d.value,s(f)?"cstu-breadcrumb-active":"cstu-breadcrumb-inactive",s(f)?o.activeClass:"",s(f)&&o.highlightActive?h(f):""]),style:e.normalizeStyle(l(f))},[e.renderSlot(y.$slots,`item-${f}`,{isActive:s(f)},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k)))])],6),s(f)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-breadcrumb-separator",p.value,o.separatorClass])},[e.renderSlot(y.$slots,"separator",{},()=>[typeof o.separator=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(o.separator),1)],64)):o.separator?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.separator),{key:1})):e.createCommentVNode("",!0)])],2))],64))),128)):e.renderSlot(y.$slots,"default",{key:0})],2))}});const $L={key:0,class:"cstu-flex cstu-justify-between cstu-items-center cstu-mb-1"},RL=["for"],NL={key:0,class:"cstu-text-red-500 cstu-ml-1"},OL={key:0,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px] cstu-mt-1"},UL=["id","value","placeholder","disabled","required","readonly","rows","maxlength"],ZL={key:1,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px] cstu-mt-1"},_L=e.defineComponent({__name:"Textarea",props:{id:{},modelValue:{},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},label:{},labelProps:{},description:{},descriptionProps:{},error:{},errorProps:{},hasError:{type:Boolean},showBothErrorAndDescription:{type:Boolean},textareaProps:{},size:{},radius:{},variant:{},required:{type:Boolean},withAsterisk:{type:Boolean},rows:{},resize:{},fullWidth:{type:Boolean},color:{},class:{},inputClass:{},maxLength:{}},emits:["update:modelValue","focus","blur","change"],setup(a,{expose:o,emit:c}){const n=`textarea-${Math.random().toString(36).substring(2,11)}`,r=e.ref(null),s=a,i=e.computed(()=>s.hasError??!1),h=e.computed(()=>s.disabled??!1),l=e.computed(()=>s.readonly??!1),d=e.computed(()=>s.required??!1),p=e.computed(()=>s.withAsterisk??!1),y=e.computed(()=>s.showBothErrorAndDescription??!1),u=e.computed(()=>s.size??"md"),k=e.computed(()=>s.variant??"default"),f=e.computed(()=>s.radius??"md"),L=e.computed(()=>s.color??"primary"),v=e.computed(()=>s.fullWidth??!1),g=e.computed(()=>s.inputClass??""),b=e.computed(()=>s.rows??3),x=e.computed(()=>s.resize??"none"),m={xs:{inputClass:`cstu-min-h-8 ${v.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-xs cstu-font-medium",descriptionSize:"cstu-text-xs"},sm:{inputClass:`cstu-min-h-9 ${v.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-xs"},md:{inputClass:`cstu-min-h-10 ${v.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},lg:{inputClass:`cstu-min-h-11 ${v.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},xl:{inputClass:`cstu-min-h-12 ${v.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-base cstu-font-medium",descriptionSize:"cstu-text-sm"}},w=e.computed(()=>`${m[u.value].inputClass.split(" ")[0]} cstu-transition-all cstu-duration-300`),H=e.computed(()=>m[u.value].labelSize),j=e.computed(()=>m[u.value].descriptionSize),B=e.computed(()=>{switch(u.value){case"xs":return"cstu-text-xs";case"sm":return"cstu-text-sm";case"md":return"cstu-text-sm";case"lg":return"cstu-text-base";case"xl":return"cstu-text-base";default:return"cstu-text-sm"}}),$=e.computed(()=>se(f.value)),S=e.computed(()=>s.error!==void 0&&s.error!==""||i.value),A=e.computed(()=>k.value==="unstyled"||!oe(L.value)&&!S.value?"":S.value?"cstu-border-red-500 hover:cstu-border-red-500 focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500":k.value==="default"||k.value==="outline"?`cstu-border-${L.value}-500 hover:cstu-border-${L.value}-600 focus-within:cstu-border-${L.value}-500 focus-within:cstu-ring-1 focus-within:cstu-ring-${L.value}-500`:""),D=e.computed(()=>k.value==="unstyled"?{}:oe(L.value)||S.value?{}:k.value==="default"||k.value==="outline"?{"--border-color":L.value,"border-color":"var(--border-color)"}:k.value==="filled"?{"--bg-color":`${L.value}10`,"background-color":"var(--bg-color)"}:k.value==="light"?{"--bg-color":`${L.value}10`,"--text-color":L.value,"background-color":"var(--bg-color)",color:"var(--text-color)"}:k.value==="subtle"?{"--text-color":L.value,color:"var(--text-color)"}:{}),O=e.computed(()=>{const M={default:"cstu-bg-white cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",filled:"cstu-bg-gray-100 cstu-border cstu-border-transparent cstu-transition-colors cstu-duration-150 cstu-px-3",light:"cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",outline:"cstu-bg-white cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",subtle:"cstu-bg-transparent cstu-transition-colors cstu-duration-150 cstu-px-3",unstyled:"cstu-bg-transparent !cstu-border-0"};if(k.value==="unstyled")return[M[k.value]];const P=S.value?"":k.value==="default"||k.value==="outline"?"cstu-border-gray-300/45":"",N=S.value?"cstu-border-red-500":"";return[M[k.value],P,N,S.value?"hover:cstu-border-red-500":"hover:cstu-border-primary-500",S.value?"focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500":"focus-within:cstu-border-primary-500 focus-within:cstu-ring-1 focus-within:cstu-ring-primary-500"]}),R=c,W=e.ref(!1),ee=M=>{W.value=!0,R("focus",M)},Y=M=>{W.value=!1,R("blur",M)},_=M=>{R("change",M)};return o({textarea:r,focus:()=>{var M;return(M=r.value)==null?void 0:M.focus()},blur:()=>{var M;return(M=r.value)==null?void 0:M.blur()},select:()=>{var M;return(M=r.value)==null?void 0:M.select()},setSelectionRange:(M,P)=>{var N;return(N=r.value)==null?void 0:N.setSelectionRange(M,P)},setRangeText:M=>{var P;return(P=r.value)==null?void 0:P.setRangeText(M)},get value(){var M;return(M=r.value)==null?void 0:M.value},set value(M){r.value&&M!==void 0&&(r.value.value=M)}}),(M,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-flex-col cstu-transition-all cstu-duration-300",[s.class,v.value?"cstu-w-full":"cstu-max-w-[20.5rem]"]])},[s.label||M.$slots.label?(e.openBlock(),e.createElementBlock("div",$L,[e.createElementVNode("label",e.mergeProps({for:s.id||n,class:["cstu-flex cstu-items-center",H.value]},s.labelProps),[e.renderSlot(M.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(s.label)+" ",1),p.value||d.value?(e.openBlock(),e.createElementBlock("span",NL,"*")):e.createCommentVNode("",!0)])],16,RL),e.renderSlot(M.$slots,"labelIcon")])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["cstu-flex cstu-items-start cstu-gap-2 cstu-py-2",w.value,$.value,O.value,A.value,{"cstu-opacity-50 cstu-pointer-events-none cstu-cursor-not-allowed":h.value}]),style:e.normalizeStyle(D.value)},[M.$slots.leftSection?(e.openBlock(),e.createElementBlock("div",OL,[e.renderSlot(M.$slots,"leftSection")])):e.createCommentVNode("",!0),e.createElementVNode("textarea",e.mergeProps({ref_key:"textareaRef",ref:r,id:s.id||n,value:s.modelValue,placeholder:s.placeholder,disabled:h.value,required:d.value,readonly:l.value,rows:b.value,maxlength:s.maxLength,class:["cstu-flex-1 cstu-bg-transparent cstu-outline-none cstu-w-full",B.value,g.value,{"cstu-text-gray-500":s.modelValue,"cstu-text-red-500":S.value&&!s.modelValue}],style:{resize:x.value},onInput:P[0]||(P[0]=N=>M.$emit("update:modelValue",N.target.value)),onFocus:ee,onBlur:Y,onChange:_},s.textareaProps),null,16,UL),M.$slots.rightSection?(e.openBlock(),e.createElementBlock("div",ZL,[e.renderSlot(M.$slots,"rightSection")])):e.createCommentVNode("",!0)],6)]),s.description&&!S.value||M.$slots.description&&!S.value||y.value&&s.description||y.value&&M.$slots.description?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1,class:"cstu-mt-1"},s.descriptionProps),[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-gray-500",j.value])},[e.renderSlot(M.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(s.description),1)])],2)],16)):e.createCommentVNode("",!0),S.value&&s.error||S.value&&M.$slots.error||y.value&&s.error||y.value&&M.$slots.error?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:2,class:"cstu-mt-1"},s.errorProps),[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-red-500",j.value])},[e.renderSlot(M.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(s.error),1)])],2)],16)):e.createCommentVNode("",!0)],2))}});/**
|
|
12
|
+
`;document.head.appendChild(Dw);const ML=["id"],xL=["id","aria-labelledby"],wL=["aria-label"],bL=["id"],CL=["aria-label"],LL={key:0},IL=e.defineComponent({__name:"Modal",props:{id:{type:String,default:()=>`modal-${Date.now()}`},title:{type:String,default:""},modelValue:{type:Boolean,default:!1},size:{type:String,default:"md"},radius:{type:String,default:""},centered:{type:Boolean,default:!0},scrollable:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},hideHeaderClose:{type:Boolean,default:!1},titleSrOnly:{type:Boolean,default:!1},ariaLabel:{type:String,default:""},content:{type:String,default:""},okTitle:{type:String,default:"OK"},okVariant:{type:String,default:"filled"},okColor:{type:String,default:"primary"},okDisabled:{type:Boolean,default:!1},cancelTitle:{type:String,default:"Cancel"},cancelVariant:{type:String,default:"outline"},cancelColor:{type:String,default:"secondary"},cancelDisabled:{type:Boolean,default:!1},modalClass:{type:String,default:""},dialogClass:{type:String,default:""},contentClass:{type:String,default:""},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},ariaLabelledby:{type:String,default:""},teleport:{type:Boolean,default:!0},backdrop:{type:Boolean,default:!0},backdropClass:{type:String,default:""},titleClass:{type:String,default:""},showHeaderDivider:{type:Boolean,default:!1},showFooterDivider:{type:Boolean,default:!1},showDividers:{type:Boolean,default:void 0},closeTitle:{type:String,default:"Close"},busy:{type:Boolean,default:!1},noCloseOnBackdrop:{type:Boolean,default:!1},noCloseOnEsc:{type:Boolean,default:!1},static:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},okOnly:{type:Boolean,default:!1},zIndex:{type:Number,default:1050},disableFocusTrap:{type:Boolean,default:!1},ignoreEnforceFocusSelector:{type:String,default:""}},emits:["update:modelValue","show","shown","hide","hidden","ok","cancel","close"],setup(a,{expose:o,emit:c}){class n{constructor(A,D={}){Se(this,"type");Se(this,"cancelable",!0);Se(this,"target",null);Se(this,"vueTarget",null);Se(this,"defaultPrevented",!1);Se(this,"componentId","");Se(this,"trigger","programmatic");this.type=A,Object.assign(this,D)}preventDefault(){this.defaultPrevented=!0}}const r=a,s=c,i=e.ref(!1),h=e.ref(null),l=e.ref(null),d=e.ref(r.zIndex),p=e.ref(!1),y=e.ref(0),u=e.computed(()=>r.zIndex!==1050?r.zIndex:d.value);function k(){if(r.zIndex!==1050){d.value=r.zIndex;return}const S=document.querySelectorAll(".cstu-modal");let A=1050;S.forEach(D=>{const O=parseInt(window.getComputedStyle(D).zIndex,10);!isNaN(O)&&O>A&&(A=O)}),d.value=A+10}const f=e.computed(()=>r.fullscreen?"":L(r.radius));function L(S){const A={none:"",sm:"cstu-rounded-sm",md:"cstu-rounded-md",lg:"cstu-rounded-lg",xl:"cstu-rounded-xl",full:"cstu-rounded-full"};return A[S||r.size]||A.md}function v(){if(i.value)return;const S=new n("show",{trigger:"programmatic",target:null,vueTarget:null,componentId:r.id});s("show",S),!S.defaultPrevented&&(h.value=document.activeElement,i.value=!0,y.value++,k(),document.body.classList.add("cstu-modal-open"),s("update:modelValue",!0),e.nextTick(()=>{r.disableFocusTrap||H(),s("shown",S)}))}function g(S="programmatic"){if(!i.value)return;const A=new n("hide",{trigger:S,target:null,vueTarget:null,componentId:r.id});s("hide",A),!A.defaultPrevented&&(i.value=!1,p.value=!1,document.body.classList.remove("cstu-modal-open"),s("update:modelValue",!1),e.nextTick(()=>{j(h.value),s("hidden",A)}))}function b(S){S&&(h.value=typeof S=="string"?document.querySelector(S):S),i.value?g():v()}function x(S){S==="ok"?s("ok"):S==="cancel"&&s("cancel"),g(S)}function m(S){const A=S.target,D=A.closest(".cstu-dropdown-menu"),O=A.tagName&&["input","select","textarea","button"].includes(A.tagName.toLowerCase()),R=A.closest(".cstu-modal-content");D||O||R&&A!==S.currentTarget||!r.noCloseOnBackdrop&&A===S.currentTarget&&g("backdrop")}function w(S){S.key==="Escape"&&i.value&&!r.noCloseOnEsc&&!r.busy&&g("esc")}function H(){e.nextTick(()=>{if(!l.value)return;const S=l.value,A=$(S);A.length>0&&A[0].focus()})}function j(S){if(S&&i.value===!1)try{S.focus()}catch{}}function B(S){if(r.disableFocusTrap||!l.value||!i.value)return;const A=S.target,D=l.value;if(r.ignoreEnforceFocusSelector&&r.ignoreEnforceFocusSelector.trim()!==""){const R=r.ignoreEnforceFocusSelector.split(",").map(W=>W.trim()).filter(W=>W.length>0);for(const W of R)if(A.closest(W))return}const O=!!A.closest(".cstu-modal-content");if(D!==A&&!D.contains(A)&&!O){if(p.value)return;p.value=!0;try{const R=$(D);R.length>0?R[0].focus():D.focus()}finally{setTimeout(()=>{p.value=!1},0)}}}function $(S){return Array.from(S.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))}return e.watch(()=>r.modelValue,S=>{S!==i.value&&(S?v():g())}),e.watch(()=>r.id,()=>{dw(r.id),iw(r.id,{show:v,hide:g,toggle:b})}),e.onMounted(()=>{iw(r.id,{show:v,hide:g,toggle:b}),document.addEventListener("keydown",w),document.addEventListener("focusin",B),r.modelValue&&(v(),i.value&&e.nextTick(()=>{setTimeout(()=>{const S=document.getElementById(r.id);let A=null;S&&S.parentNode&&(A=S.parentNode.querySelector(".cstu-modal-backdrop")),S&&window.getComputedStyle(S).display==="none"&&(S.style.display="block"),A&&window.getComputedStyle(A).display==="none"&&(A.style.display="block")},50)}))}),e.onBeforeUnmount(()=>{dw(r.id),document.removeEventListener("keydown",w),document.removeEventListener("focusin",B),i.value&&(i.value=!1,s("update:modelValue",!1))}),o({hide:g,show:v,close:x,toggle:b}),(S,A)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:r.static||r.teleport===!1},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value&&a.backdrop!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${r.id}-backdrop`,class:e.normalizeClass(["cstu-modal-backdrop",a.backdropClass]),style:e.normalizeStyle({zIndex:u.value-10})},null,14,ML)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:r.id,class:e.normalizeClass(["cstu-modal",[{"cstu-modal-static":r.static,"cstu-modal-scrollable":r.scrollable},r.modalClass]]),tabindex:"-1",role:"dialog","aria-modal":"true",style:e.normalizeStyle({zIndex:u.value}),"aria-labelledby":!a.hideHeader&&a.title?`modal-title-${r.id}`:void 0,onClick:m},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-dialog",a.dialogClass,{"cstu-modal-fullscreen":a.fullscreen,"cstu-modal-dialog-centered":a.centered&&!a.fullscreen,"cstu-modal-dialog-scrollable":a.scrollable,[`cstu-modal-${a.size}`]:a.size&&!a.fullscreen}]),onClick:A[4]||(A[4]=D=>D.target===D.currentTarget&&D.stopPropagation())},[A[6]||(A[6]=e.createElementVNode("span",{tabindex:"0"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",a.contentClass,{"cstu-modal-content-fullscreen":a.fullscreen},f.value]),tabindex:"-1",ref_key:"modalElement",ref:l,"aria-label":a.ariaLabel,onClick:A[3]||(A[3]=D=>D.target===D.currentTarget&&D.stopPropagation())},[a.hideHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("header",{key:0,class:e.normalizeClass(["cstu-modal-header",a.headerClass,{"show-divider":a.showHeaderDivider||a.showDividers}])},[e.renderSlot(S.$slots,"modal-header",{},()=>[e.renderSlot(S.$slots,"modal-title",{},()=>[e.createElementVNode("h5",{id:`modal-title-${r.id}`,class:e.normalizeClass([r.titleClass||"cstu-modal-title",{"sr-only":a.titleSrOnly}])},e.toDisplayString(a.title),11,bL)]),a.hideHeaderClose?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,type:"button","aria-label":a.closeTitle,class:"cstu-close cstu-self-baseline",onClick:A[0]||(A[0]=D=>x("headerClose"))},A[5]||(A[5]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"cstu-size-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})],-1)]),8,CL))])],2)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",a.bodyClass,{"cstu-modal-body-scrollable":a.scrollable}])},[e.renderSlot(S.$slots,"default",{},()=>[a.content?(e.openBlock(),e.createElementBlock("div",LL,e.toDisplayString(a.content),1)):e.createCommentVNode("",!0)])],2),a.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("footer",{key:1,class:e.normalizeClass(["cstu-modal-footer",a.footerClass,{"show-divider":a.showFooterDivider||a.showDividers}])},[e.renderSlot(S.$slots,"modal-footer",{},()=>[a.okOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(K,{key:0,variant:a.cancelVariant,color:a.cancelColor,disabled:a.cancelDisabled||a.busy,onClick:A[1]||(A[1]=D=>x("cancel"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.cancelTitle),1)]),_:1},8,["variant","color","disabled"])),e.createVNode(K,{variant:a.okVariant,color:a.okColor,disabled:a.okDisabled||a.busy,loading:a.busy,onClick:A[2]||(A[2]=D=>x("ok"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])])],2))],10,wL),A[7]||(A[7]=e.createElementVNode("span",{tabindex:"0"},null,-1))],2)],14,xL)):e.createCommentVNode("",!0)]),_:3})],8,["disabled"]))}});const SL={mounted(a,o){const c=typeof o.value=="string"?o.value:Object.keys(o.modifiers)[0];if(!c){console.warn("v-cstu-modal directive requires a modal ID");return}a.addEventListener("click",()=>{lw.show(c)}),a.tagName!=="BUTTON"&&(a.setAttribute("role","button"),a.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),lw.show(c))}),a.hasAttribute("tabindex")||a.setAttribute("tabindex","0"))}},zL={install:a=>{a.directive("cstu-modal",SL)}},qL=["primary","secondary","success","warning","info"];function Fw(a,o=qL){if(!a||!o||o.length===0)return"primary";let c=0;for(let r=0;r<a.length;r+=1)c=a.charCodeAt(r)+((c<<5)-c);const n=Math.abs(c)%o.length;return o[n]}function $w(a){return!a||typeof a!="string"?"":a.trim().split(" ").slice(0,2).map(o=>o.charAt(0).toUpperCase()).join("")}const VL=["src","alt"],BL=["title"],AL={key:1,"data-avatar-placeholder-icon":"true",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Rw=e.defineComponent({__name:"Avatar",props:{size:{default:"md"},radius:{default:"full"},color:{default:"primary"},gradient:{},src:{default:null},alt:{},imageProps:{},children:{},autoContrast:{type:Boolean,default:!0},name:{},allowedInitialsColors:{},variant:{default:"light"},component:{default:"div"},hover:{type:Boolean,default:!1},customClasses:{default:""}},setup(a){const o=a,c=e.ref(!o.src);e.watch(()=>o.src,y=>{c.value=!y},{immediate:!0});const n=y=>y?["primary","secondary","success","warning","danger","info","dark","light","initials"].includes(y):!0,r=e.computed(()=>o.name?$w(o.name):""),s=e.computed(()=>{const y={sm:"w-5 h-5 text-xs",md:"w-6 h-6 text-xs",lg:"w-[30px] h-[30px] text-sm",xl:"w-[32px] h-[32px] text-sm","2xl":"w-[34px] h-[34px] text-base","3xl":"w-[36px] h-[36px] text-base","4xl":"w-[38px] h-[38px] text-lg","5xl":"w-[52px] h-[52px] text-xl"};return typeof o.size=="string"?y[o.size]||y.md:typeof o.size=="number"?`w-[${o.size}px] h-[${o.size}px]`:y.md}),i=e.computed(()=>se(o.radius)),h=e.computed(()=>{if(o.src&&!c.value||!n(o.color)&&o.color!=="initials")return"";if(o.color==="initials"&&o.name){const f=Fw(o.name,o.allowedInitialsColors||["primary","secondary","success","warning","info"]);return f?U(f,"filled",{}):U("primary","filled",{})}const y=o.variant==="transparent"?"default":o.variant==="gradient"?"filled":o.variant,u=o.color&&o.color!=="initials"?o.color:"primary",k=U(u,y,{});return o.variant==="transparent"?"bg-transparent":k}),l=e.computed(()=>!n(o.color)&&o.color!=="initials"?"":o.variant==="transparent"?"bg-transparent":o.variant==="gradient"&&o.gradient?`bg-gradient-to-r from-${o.gradient.from} to-${o.gradient.to}`:Tx(o.variant)),d=e.computed(()=>{if(o.src&&!c.value||n(o.color)||o.color==="initials")return{};const y={};switch(o.variant){case"filled":y.backgroundColor=o.color,o.autoContrast&&(y.color="white");break;case"light":y.backgroundColor=`${o.color}20`,y.color=o.color;break;case"outline":y.backgroundColor="transparent",y.color=o.color,y.border=`1px solid ${o.color}`;break;case"transparent":y.backgroundColor="transparent",y.color=o.color;break}return y}),p=y=>{var u;if((u=o.imageProps)!=null&&u.onError){o.imageProps.onError(y);return}c.value=!0};return(y,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.component||"div"),{class:e.normalizeClass(["avatar",s.value,i.value,!c.value&&y.src?"":h.value,!c.value&&y.src?"":l.value,{"avatar--with-image":!c.value&&y.src},{"hover:opacity-80 transition-opacity":y.hover},y.customClasses]),style:e.normalizeStyle(d.value)},{default:e.withCtx(()=>[!c.value&&y.src?(e.openBlock(),e.createElementBlock("img",e.mergeProps({key:0,class:"avatar__image",src:y.src,alt:y.alt},y.imageProps,{onError:p}),null,16,VL)):(e.openBlock(),e.createElementBlock("span",{key:1,class:"avatar__placeholder",title:y.alt},[e.renderSlot(y.$slots,"default",{},()=>[y.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(r.value),1)],64)):(e.openBlock(),e.createElementBlock("svg",AL,u[0]||(u[0]=[e.createElementVNode("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"},null,-1)])))])],8,BL))]),_:3},8,["class","style"]))}});const Nw=e.defineComponent({__name:"AvatarGroup",props:{spacing:{default:"sm"},gap:{default:"none"},outlineWidth:{default:"normal"},outlineColor:{default:"white"},outlineOffset:{default:"small"},customClasses:{default:""},max:{},hover:{type:Boolean,default:!1}},setup(a){const o=a,c=e.computed(()=>{if(typeof o.spacing=="number")return`${o.spacing}px`;const d={xs:"-1rem",sm:"-0.75rem",md:"-0.5rem",lg:"-0.25rem",xl:"0"};return d[o.spacing]||d.sm}),n=e.computed(()=>{if(typeof o.gap=="number")return`${o.gap}px`;if(typeof o.gap=="string"&&!isNaN(parseFloat(o.gap)))return o.gap;const d={none:"0",xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem"};return d[o.gap]||d.none}),r=e.computed(()=>{if(typeof o.outlineWidth=="number")return`${o.outlineWidth}px`;if(typeof o.outlineWidth=="string"&&!isNaN(parseFloat(o.outlineWidth)))return o.outlineWidth;const d={none:"0",thin:"1px",normal:"2px",medium:"3px",thick:"4px"};return d[o.outlineWidth]||d.normal}),s=e.computed(()=>{if(typeof o.outlineOffset=="number")return`${o.outlineOffset}px`;if(typeof o.outlineOffset=="string"&&!isNaN(parseFloat(o.outlineOffset)))return o.outlineOffset;const d={none:"0",inset:"-2px",small:"1px",medium:"2px",large:"3px"};return d[o.outlineOffset]||d.small}),i=e.computed(()=>typeof o.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(o.outlineColor)?`outline-${o.outlineColor}`:""),h=e.computed(()=>typeof o.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(o.outlineColor)?"var(--color-"+o.outlineColor+")":o.outlineColor),l=e.computed(()=>({"--avatar-group-spacing":c.value,"--avatar-group-gap":n.value,"--avatar-group-outline-width":r.value,"--avatar-group-outline-color":h.value,"--avatar-group-outline-offset":s.value}));return(d,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["avatar-group",d.customClasses,i.value,{"avatar-group--hover":d.hover}]),style:e.normalizeStyle(l.value)},[e.renderSlot(d.$slots,"default")],6))}});Rw.Group=Nw;const px=e.defineComponent({__name:"Tabs",props:{value:{type:String,default:void 0},defaultValue:{type:String,default:"first"},orientation:{type:String,default:"horizontal"},placement:{type:String,default:void 0},variant:{type:String,default:"text"}},emits:["change"],setup(a,{emit:o}){const c=a,n=e.computed(()=>c.placement?c.placement:c.orientation==="horizontal"?"top":"left"),r=e.computed(()=>c.orientation),s=e.computed(()=>c.variant),i=o,h=e.ref(c.value!==void 0?c.value:c.defaultValue);e.watch(()=>c.value,d=>{d!==void 0&&(h.value=d)});const l=d=>{c.value!==void 0?i("change",d):h.value=d};return e.provide("activeTab",h),e.provide("setActiveTab",l),e.provide("tabsOrientation",r),e.provide("tabsPlacement",n),(d,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-tabs",`cstu-tabs-${r.value}`,`cstu-tabs-placement-${n.value}`,`cstu-tabs-variant-${s.value}`])},[e.renderSlot(d.$slots,"default")],2))}});const Ow=e.defineComponent({__name:"TabsList",props:{justify:{type:String,default:"flex-start"},divider:{type:Boolean,default:!1}},setup(a){const o=a,c=e.inject("tabsOrientation",e.ref("horizontal")),n=e.inject("tabsPlacement",e.ref("top")),r=e.computed(()=>["tabs-list",`tabs-list-${c.value}`,`tabs-list-placement-${n.value}`,o.divider?"tabs-list-with-divider":""]),s=h=>{if(["space-between","space-around","space-evenly"].includes(h))return h;switch(h){case"flex-start":return"flex-start";case"flex-end":return"flex-end";case"center":return"center";default:return"flex-start"}},i=e.computed(()=>c.value==="horizontal"?{justifyContent:o.justify}:{justifyContent:s(o.justify)});return(h,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.value),style:e.normalizeStyle(i.value)},[e.renderSlot(h.$slots,"default")],6))}});const Uw=e.defineComponent({__name:"TabsTab",props:{value:{type:String,required:!0},color:{type:String,default:"primary"},variant:{type:String,default:"text"},size:{type:String,default:"md"},radius:{type:String,default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1}},setup(a){const o=a,c=e.inject("activeTab",e.ref("")),n=e.inject("setActiveTab",()=>{}),r=e.inject("tabsOrientation",e.ref("horizontal")),s=e.inject("tabsPlacement",e.ref("top")),i=e.computed(()=>c.value),h=e.computed(()=>r.value),l=e.computed(()=>s.value),d=e.computed(()=>i.value===o.value),p=e.computed(()=>h.value==="vertical"),y=e.computed(()=>o.fullWidth&&h.value==="horizontal"),u=()=>{!o.disabled&&!o.loading&&n(o.value)};return(k,f)=>(e.openBlock(),e.createBlock(e.unref(K),{class:e.normalizeClass(["tabs-tab",d.value?"tabs-tab-active":"tabs-tab-inactive",`tabs-tab-${o.variant}`,o.color?`tabs-tab-color-${o.color}`:"",`tabs-tab-orientation-${h.value}`,`tabs-tab-placement-${l.value}`,{"tabs-tab-full-width":y.value}]),disabled:o.disabled,loading:o.loading,color:d.value?o.color:"light",variant:d.value?o.variant:"subtle",size:o.size,radius:o.variant==="text"?"none":o.radius,"full-width":p.value,onClick:u},e.createSlots({default:e.withCtx(()=>[e.renderSlot(k.$slots,"default")]),_:2},[k.$slots.leftSection?{name:"leftSection",fn:e.withCtx(()=>[e.renderSlot(k.$slots,"leftSection")]),key:"0"}:void 0,k.$slots.rightSection?{name:"rightSection",fn:e.withCtx(()=>[e.renderSlot(k.$slots,"rightSection")]),key:"1"}:void 0]),1032,["class","disabled","loading","color","variant","size","radius","full-width"]))}});const Zw=e.defineComponent({__name:"TabsPanel",props:{value:{type:String,required:!0},KeepAlive:{type:Boolean,default:!1}},setup(a){const o=a,c=e.inject("activeTab",e.ref("")),n=e.inject("tabsOrientation",e.ref("horizontal")),r=e.inject("tabsPlacement",e.ref("top")),s=e.computed(()=>c.value===o.value),i=e.computed(()=>["tabs-panel",s.value?"tabs-panel-active":"tabs-panel-inactive",`tabs-panel-${n.value}`,`tabs-panel-placement-${r.value}`]);return(h,l)=>a.KeepAlive||s.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(i.value)},[e.renderSlot(h.$slots,"default")],2)),[[e.vShow,s.value]]):e.createCommentVNode("",!0)}});px.List=Ow;px.Tab=Uw;px.Panel=Zw;const HL={key:2,class:"cstu-flex cstu-items-center cstu-gap-2"},PL=e.defineComponent({__name:"Pagination",props:{modelValue:{default:1},total:{},siblings:{default:1},boundaries:{default:1},variant:{default:"filled"},color:{default:"primary"},size:{default:"md"},disabled:{type:Boolean,default:!1},withControls:{type:Boolean,default:!0},withEdges:{type:Boolean,default:!1},withPages:{type:Boolean,default:!0},class:{}},emits:["update:modelValue"],setup(a,{emit:o}){const c=a,n=o,r=e.ref(c.modelValue);e.watch(()=>c.modelValue,k=>{r.value=k});const s=e.computed(()=>r.value===1),i=e.computed(()=>r.value===c.total),h=e.computed(()=>{switch(c.size){case"xs":return"cstu-!h-[30px] cstu-!w-[30px] cstu-min-w-[30px] !cstu-p-0";case"sm":return"cstu-!h-[36px] cstu-!w-[36px] cstu-min-w-[36px] !cstu-p-0";case"md":return"cstu-!h-[40px] cstu-!w-[40px] cstu-min-w-[40px] !cstu-p-0";case"lg":return"cstu-!h-[45px] cstu-!w-[45px] cstu-min-w-[45px] !cstu-p-0";case"xl":return"cstu-!h-[50px] cstu-!w-[50px] cstu-min-w-[50px] !cstu-p-0";default:return"cstu-!h-[40px] cstu-!w-[40px] cstu-min-w-[40px] !cstu-p-0"}}),l=e.computed(()=>["cstu-flex cstu-items-center cstu-justify-center",y(c.size)]),d=e.computed(()=>{const k=[],f=c.total;if(c.siblings*2+3+c.boundaries*2>=f)return Array.from({length:f},(w,H)=>H+1);const v=Math.max(r.value-c.siblings,c.boundaries+1),g=Math.min(r.value+c.siblings,f-c.boundaries),b=v>c.boundaries+2,x=g<f-(c.boundaries+1),m=new Set;for(let w=1;w<=c.boundaries;w++)k.push(w),m.add(w);if(b)k.push("dots");else if(!b&&v>c.boundaries)for(let w=c.boundaries+1;w<v;w++)m.has(w)||(k.push(w),m.add(w));for(let w=v;w<=g;w++)m.has(w)||(k.push(w),m.add(w));if(x)k.push("dots");else if(!x&&g<f-c.boundaries)for(let w=g+1;w<f-c.boundaries+1;w++)m.has(w)||(k.push(w),m.add(w));for(let w=f-c.boundaries+1;w<=f;w++)m.has(w)||(k.push(w),m.add(w));return k}),p=k=>{k<1||k>c.total||c.disabled||(r.value=k,n("update:modelValue",k))};function y(k){const f={xs:"cstu-h-6 cstu-w-6 cstu-text-xs",sm:"cstu-h-7 cstu-w-7 cstu-text-sm",md:"cstu-h-8 cstu-w-8 cstu-text-sm",lg:"cstu-h-9 cstu-w-9 cstu-text-base",xl:"cstu-h-10 cstu-w-10 cstu-text-base"};return f[k]||f.md}const u=e.computed(()=>c.variant==="filled"?"subtle":"bordered-transparent");return(k,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-items-center cstu-gap-2",[c.class]])},[c.withEdges?(e.openBlock(),e.createBlock(K,{key:0,variant:u.value,color:"light",size:c.size,disabled:s.value||c.disabled,onClick:f[0]||(f[0]=L=>p(1)),"aria-label":"Go to first page",class:e.normalizeClass(h.value)},{default:e.withCtx(()=>f[4]||(f[4]=[e.createElementVNode("span",{class:"cstu-sr-only"},"First page",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"11 17 6 12 11 7"}),e.createElementVNode("polyline",{points:"18 17 13 12 18 7"})],-1)])),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withControls?(e.openBlock(),e.createBlock(K,{key:1,variant:u.value,color:"light",size:c.size,disabled:s.value||c.disabled,onClick:f[1]||(f[1]=L=>p(r.value-1)),"aria-label":"Go to previous page",class:e.normalizeClass(h.value)},{default:e.withCtx(()=>f[5]||(f[5]=[e.createElementVNode("span",{class:"cstu-sr-only"},"Previous page",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"15 18 9 12 15 6"})],-1)])),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withPages?(e.openBlock(),e.createElementBlock("div",HL,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(L,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:v},[L!=="dots"?(e.openBlock(),e.createBlock(K,{key:0,variant:L===r.value?"filled":u.value,color:L===r.value?c.color:"light",size:c.size,disabled:c.disabled,onClick:g=>p(Number(L)),"aria-current":L===r.value?"page":void 0,"aria-label":`Page ${L}`,class:e.normalizeClass(h.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L),1)]),_:2},1032,["variant","color","size","disabled","onClick","aria-current","aria-label","class"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["pagination-dots",[l.value,h.value]])},f[6]||(f[6]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"1"}),e.createElementVNode("circle",{cx:"19",cy:"12",r:"1"}),e.createElementVNode("circle",{cx:"5",cy:"12",r:"1"})],-1)]),2))],64))),128))])):e.createCommentVNode("",!0),c.withControls?(e.openBlock(),e.createBlock(K,{key:3,variant:u.value,color:"light",size:c.size,disabled:i.value||c.disabled,onClick:f[2]||(f[2]=L=>p(r.value+1)),"aria-label":"Go to next page",class:e.normalizeClass(h.value)},{default:e.withCtx(()=>f[7]||(f[7]=[e.createElementVNode("span",{class:"cstu-sr-only"},"Next page",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"9 18 15 12 9 6"})],-1)])),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withEdges?(e.openBlock(),e.createBlock(K,{key:4,variant:u.value,color:"light",size:c.size,disabled:i.value||c.disabled,onClick:f[3]||(f[3]=L=>p(c.total)),"aria-label":"Go to last page",class:e.normalizeClass(h.value)},{default:e.withCtx(()=>f[8]||(f[8]=[e.createElementVNode("span",{class:"cstu-sr-only"},"Last page",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"cstu-h-4 cstu-w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"13 17 18 12 13 7"}),e.createElementVNode("polyline",{points:"6 17 11 12 6 7"})],-1)])),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0)],2))}}),_w={mounted(a,o){a._clickOutside=c=>{const n=c.target;if(!(a===n||a.contains(n))){const r=c.target,s=r.tagName&&r.tagName.toLowerCase()==="input",i=r.closest(".cstu-dropdown-menu");!s&&!i&&o.value(c)}},document.addEventListener("click",a._clickOutside,!0),document.addEventListener("touchstart",a._clickOutside,!0)},unmounted(a){a._clickOutside&&(document.removeEventListener("click",a._clickOutside,!0),document.removeEventListener("touchstart",a._clickOutside,!0))}},jL=["id","aria-labelledby","aria-modal"],EL={class:"cstu-popover-inner"},TL=["id"],DL=e.defineComponent({__name:"Popover",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},placement:{default:"bottom"},variant:{default:"shadow"},color:{default:"primary"},size:{default:"md"},radius:{default:"md"},hideHeader:{type:Boolean,default:!1},showCloseIcon:{type:Boolean,default:!0},hideFooter:{type:Boolean,default:!0},closeOnClickOutside:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},closeOnClick:{type:Boolean,default:!1},title:{default:""},content:{default:""},zIndex:{default:1e3},trigger:{default:"click"},backdrop:{type:[Boolean,String],default:!1},offsetDistance:{default:8},disabled:{type:Boolean,default:!1},popoverClass:{default:""},headerClass:{default:""},bodyClass:{default:""},footerClass:{default:""},trapFocus:{type:Boolean,default:!1},id:{default:()=>`popover-${Date.now()}`},shadow:{default:"md"},width:{}},emits:["update:open","open","close"],setup(a,{emit:o}){const c=a,n=o,r=e.ref(c.defaultOpen),s=e.ref(null),i=e.ref(null),h=e.ref(null),l=e.ref(null),d=e.ref(c.zIndex);c.open!==void 0&&(r.value=c.open);const p=e.computed(()=>{if(c.placement!=="auto")return c.placement}),y=e.computed(()=>{const M=[ix(c.offsetDistance)];return h.value&&M.push(Pw({element:h})),c.placement==="auto"?M.push(Hw({padding:8})):M.push(hx({fallbackPlacements:["top","bottom","left","right"],padding:8})),M.push(dx({padding:8})),M}),{floatingStyles:u,update:k}=ux(s,i,{placement:p,middleware:y,whileElementsMounted:Aw}),f=M=>{c.disabled||(c.trigger==="click"||c.trigger==="manual")&&j()},L=()=>{c.disabled||c.trigger==="hover"&&w()},v=()=>{c.disabled||c.trigger==="hover"&&setTimeout(()=>{H("hover")},100)},g=M=>{c.closeOnClick&&H("popoverClick"),M.stopPropagation()},b=M=>{c.closeOnClickOutside&&r.value&&i.value&&!i.value.contains(M.target)&&s.value&&!s.value.contains(M.target)&&H("clickAway")},x=()=>{c.closeOnClickOutside&&H("backdrop")},m=M=>{c.closeOnEscape&&M.key==="Escape"&&(M.preventDefault(),H("escape"))},w=()=>{c.disabled||r.value||(l.value=document.activeElement,r.value=!0,e.nextTick(()=>{k(),c.trapFocus&&B()}),n("open"),n("update:open",!0))},H=(M="programmatic")=>{r.value&&(r.value=!1,c.trapFocus&&$(l.value),n("close",M),n("update:open",!1))},j=()=>{r.value?H():w()},B=()=>{if(!i.value)return;const M=S(i.value);M.length>0?M[0].focus():i.value.focus()},$=M=>{M&&typeof M.focus=="function"&&M.focus()},S=M=>Array.from(M.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).filter(P=>!P.hasAttribute("disabled")&&!P.getAttribute("aria-hidden")),A=M=>{if(!r.value||!c.trapFocus||!i.value)return;const P=M.target;i.value.contains(P)||(M.preventDefault(),B())};e.watch(()=>c.open,M=>{M!==r.value&&(M?w():H())}),e.watch(s,M=>{M&&k()}),e.onMounted(()=>{document.addEventListener("keydown",m),c.trapFocus&&document.addEventListener("focusin",A)}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",m),c.trapFocus&&document.removeEventListener("focusin",A)});const D=e.computed(()=>[se(c.radius),!c.variant||c.variant==="shadow"?c.shadow?`cstu-shadow-${c.shadow}`:"cstu-shadow-md":"",c.popoverClass]),O=e.computed(()=>{const M=[...D.value.filter(Boolean)];let P=!1;const N=c.color;if(N&&oe(N)&&c.variant==="color"){const G=U(N,"filled",{disabled:c.disabled});typeof G=="string"&&G.trim()&&(M.push(...G.split(" ").filter(Boolean)),P=!0)}return P||(M.push("cstu-bg-white"),c.variant==="outline"&&M.push("cstu-border","cstu-border-gray-300"),M.push("cstu-text-gray-700")),M.filter(Boolean).map(G=>typeof G=="string"?G:Object.keys(G).filter(Ae=>G[Ae]).join(" ")).join(" ")}),R=e.computed(()=>{const M={width:typeof c.width=="number"?`${c.width}px`:c.width},P=c.color;if(P&&!oe(P)&&c.variant==="color"){M.backgroundColor=P;const N=W(P);M.color=N>128?"#000000":"#FFFFFF"}return{...u.value,...M}});e.computed(()=>{const M={backgroundColor:"white"},P=c.color;return c.variant==="color"&&P?oe(P)?(M.borderWidth="1px",M.borderStyle="solid",M.borderColor=`var(--${P}-500)`):M.backgroundColor=P:c.variant==="outline"&&(M.borderWidth="1px",M.borderStyle="solid",M.borderColor="#e2e8f0"),M});function W(M){if(M.startsWith("#"))try{const P=parseInt(M.substring(1,3),16),N=parseInt(M.substring(3,5),16),G=parseInt(M.substring(5,7),16);return(P*299+N*587+G*114)/1e3}catch{return 128}else if(M.startsWith("rgb"))try{const P=M.match(/\d+/g);if(P&&P.length>=3){const N=parseInt(P[0],10),G=parseInt(P[1],10),Ae=parseInt(P[2],10);return(N*299+G*587+Ae*114)/1e3}}catch{return 128}return 128}const ee=e.computed(()=>{const M=c.color,P=!(M&&oe(M)),N=c.variant==="outline";return["cstu-popover-header",{xs:"cstu-px-2 cstu-py-1.5",sm:"cstu-px-2.5 cstu-py-1.5",md:"cstu-px-3 cstu-py-2",lg:"cstu-px-3.5 cstu-py-2.5",xl:"cstu-px-4 cstu-py-3"}[c.size||"md"],f2(c.size||"md"),"cstu-flex cstu-items-center cstu-justify-between",N||P?"cstu-border-b cstu-border-gray-200 dark:cstu-border-gray-700":"",c.headerClass].filter(Boolean).join(" ")}),Y=e.computed(()=>["cstu-popover-body",{xs:"cstu-p-2",sm:"cstu-p-2.5",md:"cstu-p-3",lg:"cstu-p-3.5",xl:"cstu-p-4"}[c.size||"md"],f2(c.size||"sm"),c.bodyClass].filter(Boolean).join(" ")),_=e.computed(()=>{const M=c.color,P=!(M&&oe(M)),N=c.variant==="outline";return["cstu-popover-footer",{xs:"cstu-px-2 cstu-py-1.5",sm:"cstu-px-2.5 cstu-py-1.5",md:"cstu-px-3 cstu-py-2",lg:"cstu-px-3.5 cstu-py-2.5",xl:"cstu-px-4 cstu-py-3"}[c.size||"md"],N||P?"cstu-border-t cstu-border-gray-200 dark:cstu-border-gray-700":"","cstu-flex cstu-justify-end cstu-space-x-2",c.footerClass].filter(Boolean).join(" ")});return(M,P)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"triggerRef",ref:s,class:e.normalizeClass(["cstu-inline-block cstu-popover-trigger",{"cstu-cursor-not-allowed cstu-opacity-70":M.disabled}]),onClick:f,onMouseenter:L,onMouseleave:v},[e.renderSlot(M.$slots,"trigger")],34),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade",appear:""},{default:e.withCtx(()=>[r.value&&M.backdrop!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-popover-backdrop",{"cstu-bg-black/50":M.backdrop===!0,"cstu-bg-transparent":M.backdrop==="transparent"}]),style:e.normalizeStyle({zIndex:M.zIndex-10}),onClick:x},null,6)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{"enter-active-class":"cstu-transition cstu-ease-out cstu-duration-100","enter-from-class":"cstu-transform cstu-opacity-0 cstu-scale-95","enter-to-class":"cstu-transform cstu-opacity-100 cstu-scale-100","leave-active-class":"cstu-transition cstu-ease-in cstu-duration-75","leave-from-class":"cstu-transform cstu-opacity-100 cstu-scale-100","leave-to-class":"cstu-transform cstu-opacity-0 cstu-scale-95"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-popover-container",style:e.normalizeStyle({zIndex:d.value})},[e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"popoverRef",ref:i,id:c.id,class:e.normalizeClass(O.value),style:e.normalizeStyle([e.unref(u),R.value]),role:"dialog","aria-labelledby":c.title?`${c.id}-title`:void 0,"aria-modal":c.trapFocus,tabindex:"-1",onClick:g,onKeydown:e.withKeys(m,["esc"])},[e.createElementVNode("div",EL,[c.hideHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(ee.value)},[e.renderSlot(M.$slots,"header",{},()=>[e.createElementVNode("h3",{id:`${c.id}-title`,class:e.normalizeClass(["cstu-popover-title cstu-font-medium",e.unref(f2)(c.size||"md")])},e.toDisplayString(c.title),11,TL),c.showCloseIcon?(e.openBlock(),e.createBlock(K,{key:0,icon:"X",variant:"text",size:"xs",color:c.color&&e.unref(oe)(c.color)?"white":"gray",class:"cstu-ml-auto","aria-label":"Close popover",onClick:P[0]||(P[0]=e.withModifiers(N=>H("headerClose"),["stop"]))},null,8,["color"])):e.createCommentVNode("",!0)])],2)),e.createElementVNode("div",{class:e.normalizeClass(Y.value)},[e.renderSlot(M.$slots,"default",{},()=>[M.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(f2)(c.size||"sm"))},e.toDisplayString(M.content),3)):e.createCommentVNode("",!0)])],2),c.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(_.value)},[e.renderSlot(M.$slots,"footer",{},()=>[e.createVNode(K,{size:"sm",variant:"subtle",onClick:P[1]||(P[1]=N=>H("cancel"))},{default:e.withCtx(()=>P[2]||(P[2]=[e.createTextVNode(" Close ")])),_:1})])],2))])],46,jL)),[[e.unref(_w),b]])],4)):e.createCommentVNode("",!0)]),_:3})]))],64))}});const FL=e.defineComponent({__name:"Breadcrumbs",props:{separator:{default:"/"},separatorMargin:{default:"xs"},size:{default:"md"},radius:{default:"md"},color:{default:"primary"},highlightActive:{type:Boolean,default:!0},class:{},separatorClass:{},activeClass:{}},setup(a){const o=a,c=e.useSlots(),n=e.computed(()=>!!c.default),r=e.computed(()=>c.default?c.default():[]),s=y=>y===r.value.length-1,i=y=>y?["primary","secondary","success","warning","danger","info","dark","light"].includes(y):!0,h=y=>{if(!s(y)||!o.highlightActive)return"";if(i(o.color)){const u=Le[o.color];if(u)return`cstu-text-${u.base}-${u.main}`}return""},l=y=>!s(y)||!o.highlightActive?{}:i(o.color)?{}:{color:o.color},d=e.computed(()=>{const y={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"};return y[o.size]||y.md}),p=e.computed(()=>{const y={xs:"mx-1",sm:"mx-2",md:"mx-3",lg:"mx-4",xl:"mx-5"};return y[o.separatorMargin]||y.xs});return(y,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-breadcrumbs",o.class])},[n.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(r.value,(k,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-breadcrumb-item",d.value,s(f)?"cstu-breadcrumb-active":"cstu-breadcrumb-inactive",s(f)?o.activeClass:"",s(f)&&o.highlightActive?h(f):""]),style:e.normalizeStyle(l(f))},[e.renderSlot(y.$slots,`item-${f}`,{isActive:s(f)},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k)))])],6),s(f)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-breadcrumb-separator",p.value,o.separatorClass])},[e.renderSlot(y.$slots,"separator",{},()=>[typeof o.separator=="string"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(o.separator),1)],64)):o.separator?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.separator),{key:1})):e.createCommentVNode("",!0)])],2))],64))),128)):e.renderSlot(y.$slots,"default",{key:0})],2))}});const $L={key:0,class:"cstu-flex cstu-justify-between cstu-items-center cstu-mb-1"},RL=["for"],NL={key:0,class:"cstu-text-red-500 cstu-ml-1"},OL={key:0,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px] cstu-mt-1"},UL=["id","value","placeholder","disabled","required","readonly","rows","maxlength"],ZL={key:1,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px] cstu-mt-1"},_L=e.defineComponent({__name:"Textarea",props:{id:{},modelValue:{},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},label:{},labelProps:{},description:{},descriptionProps:{},error:{},errorProps:{},hasError:{type:Boolean},showBothErrorAndDescription:{type:Boolean},textareaProps:{},size:{},radius:{},variant:{},required:{type:Boolean},withAsterisk:{type:Boolean},rows:{},resize:{},fullWidth:{type:Boolean},color:{},class:{},inputClass:{},maxLength:{}},emits:["update:modelValue","focus","blur","change"],setup(a,{expose:o,emit:c}){const n=`textarea-${Math.random().toString(36).substring(2,11)}`,r=e.ref(null),s=a,i=e.computed(()=>s.hasError??!1),h=e.computed(()=>s.disabled??!1),l=e.computed(()=>s.readonly??!1),d=e.computed(()=>s.required??!1),p=e.computed(()=>s.withAsterisk??!1),y=e.computed(()=>s.showBothErrorAndDescription??!1),u=e.computed(()=>s.size??"md"),k=e.computed(()=>s.variant??"default"),f=e.computed(()=>s.radius??"md"),L=e.computed(()=>s.color??"primary"),v=e.computed(()=>s.fullWidth??!1),g=e.computed(()=>s.inputClass??""),b=e.computed(()=>s.rows??3),x=e.computed(()=>s.resize??"none"),m={xs:{inputClass:`cstu-min-h-8 ${v.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-xs cstu-font-medium",descriptionSize:"cstu-text-xs"},sm:{inputClass:`cstu-min-h-9 ${v.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-xs"},md:{inputClass:`cstu-min-h-10 ${v.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},lg:{inputClass:`cstu-min-h-11 ${v.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-sm cstu-font-medium",descriptionSize:"cstu-text-sm"},xl:{inputClass:`cstu-min-h-12 ${v.value?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-base cstu-font-medium",descriptionSize:"cstu-text-sm"}},w=e.computed(()=>`${m[u.value].inputClass.split(" ")[0]} cstu-transition-all cstu-duration-300`),H=e.computed(()=>m[u.value].labelSize),j=e.computed(()=>m[u.value].descriptionSize),B=e.computed(()=>{switch(u.value){case"xs":return"cstu-text-xs";case"sm":return"cstu-text-sm";case"md":return"cstu-text-sm";case"lg":return"cstu-text-base";case"xl":return"cstu-text-base";default:return"cstu-text-sm"}}),$=e.computed(()=>se(f.value)),S=e.computed(()=>s.error!==void 0&&s.error!==""||i.value),A=e.computed(()=>k.value==="unstyled"||!oe(L.value)&&!S.value?"":S.value?"cstu-border-red-500 hover:cstu-border-red-500 focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500":k.value==="default"||k.value==="outline"?`cstu-border-${L.value}-500 hover:cstu-border-${L.value}-600 focus-within:cstu-border-${L.value}-500 focus-within:cstu-ring-1 focus-within:cstu-ring-${L.value}-500`:""),D=e.computed(()=>k.value==="unstyled"?{}:oe(L.value)||S.value?{}:k.value==="default"||k.value==="outline"?{"--border-color":L.value,"border-color":"var(--border-color)"}:k.value==="filled"?{"--bg-color":`${L.value}10`,"background-color":"var(--bg-color)"}:k.value==="light"?{"--bg-color":`${L.value}10`,"--text-color":L.value,"background-color":"var(--bg-color)",color:"var(--text-color)"}:k.value==="subtle"?{"--text-color":L.value,color:"var(--text-color)"}:{}),O=e.computed(()=>{const M={default:"cstu-bg-white cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",filled:"cstu-bg-gray-100 cstu-border cstu-border-transparent cstu-transition-colors cstu-duration-150 cstu-px-3",light:"cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",outline:"cstu-bg-white cstu-border cstu-transition-colors cstu-duration-150 cstu-px-3",subtle:"cstu-bg-transparent cstu-transition-colors cstu-duration-150 cstu-px-3",unstyled:"cstu-bg-transparent !cstu-border-0"};if(k.value==="unstyled")return[M[k.value]];const P=S.value?"":k.value==="default"||k.value==="outline"?"cstu-border-gray-300/45":"",N=S.value?"cstu-border-red-500":"";return[M[k.value],P,N,S.value?"hover:cstu-border-red-500":"hover:cstu-border-primary-500",S.value?"focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500":"focus-within:cstu-border-primary-500 focus-within:cstu-ring-1 focus-within:cstu-ring-primary-500"]}),R=c,W=e.ref(!1),ee=M=>{W.value=!0,R("focus",M)},Y=M=>{W.value=!1,R("blur",M)},_=M=>{R("change",M)};return o({textarea:r,focus:()=>{var M;return(M=r.value)==null?void 0:M.focus()},blur:()=>{var M;return(M=r.value)==null?void 0:M.blur()},select:()=>{var M;return(M=r.value)==null?void 0:M.select()},setSelectionRange:(M,P)=>{var N;return(N=r.value)==null?void 0:N.setSelectionRange(M,P)},setRangeText:M=>{var P;return(P=r.value)==null?void 0:P.setRangeText(M)},get value(){var M;return(M=r.value)==null?void 0:M.value},set value(M){r.value&&M!==void 0&&(r.value.value=M)}}),(M,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-flex-col cstu-transition-all cstu-duration-300",[s.class,v.value?"cstu-w-full":"cstu-max-w-[20.5rem]"]])},[s.label||M.$slots.label?(e.openBlock(),e.createElementBlock("div",$L,[e.createElementVNode("label",e.mergeProps({for:s.id||n,class:["cstu-flex cstu-items-center",H.value]},s.labelProps),[e.renderSlot(M.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(s.label)+" ",1),p.value||d.value?(e.openBlock(),e.createElementBlock("span",NL,"*")):e.createCommentVNode("",!0)])],16,RL),e.renderSlot(M.$slots,"labelIcon")])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["cstu-flex cstu-items-start cstu-gap-2 cstu-py-2",w.value,$.value,O.value,A.value,{"cstu-opacity-50 cstu-pointer-events-none cstu-cursor-not-allowed":h.value}]),style:e.normalizeStyle(D.value)},[M.$slots.leftSection?(e.openBlock(),e.createElementBlock("div",OL,[e.renderSlot(M.$slots,"leftSection")])):e.createCommentVNode("",!0),e.createElementVNode("textarea",e.mergeProps({ref_key:"textareaRef",ref:r,id:s.id||n,value:s.modelValue,placeholder:s.placeholder,disabled:h.value,required:d.value,readonly:l.value,rows:b.value,maxlength:s.maxLength,class:["cstu-flex-1 cstu-bg-transparent cstu-outline-none cstu-w-full",B.value,g.value,{"cstu-text-gray-500":s.modelValue,"cstu-text-red-500":S.value&&!s.modelValue}],style:{resize:x.value},onInput:P[0]||(P[0]=N=>M.$emit("update:modelValue",N.target.value)),onFocus:ee,onBlur:Y,onChange:_},s.textareaProps),null,16,UL),M.$slots.rightSection?(e.openBlock(),e.createElementBlock("div",ZL,[e.renderSlot(M.$slots,"rightSection")])):e.createCommentVNode("",!0)],6)]),s.description&&!S.value||M.$slots.description&&!S.value||y.value&&s.description||y.value&&M.$slots.description?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1,class:"cstu-mt-1"},s.descriptionProps),[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-gray-500",j.value])},[e.renderSlot(M.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(s.description),1)])],2)],16)):e.createCommentVNode("",!0),S.value&&s.error||S.value&&M.$slots.error||y.value&&s.error||y.value&&M.$slots.error?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:2,class:"cstu-mt-1"},s.errorProps),[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-red-500",j.value])},[e.renderSlot(M.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(s.error),1)])],2)],16)):e.createCommentVNode("",!0)],2))}});/**
|
|
13
13
|
* @license lucide-vue-next v0.525.0 - ISC
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the ISC license.
|