@contentstudio/ui 0.1.40 → 0.1.41
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 +8 -3
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4433,6 +4433,10 @@ const TC = /* @__PURE__ */ O({
|
|
|
4433
4433
|
value: {
|
|
4434
4434
|
type: String,
|
|
4435
4435
|
required: !0
|
|
4436
|
+
},
|
|
4437
|
+
KeepAlive: {
|
|
4438
|
+
type: Boolean,
|
|
4439
|
+
default: !1
|
|
4436
4440
|
}
|
|
4437
4441
|
},
|
|
4438
4442
|
setup(t) {
|
|
@@ -4442,13 +4446,14 @@ const TC = /* @__PURE__ */ O({
|
|
|
4442
4446
|
`tabs-panel-${c.value}`,
|
|
4443
4447
|
`tabs-panel-placement-${n.value}`
|
|
4444
4448
|
]);
|
|
4445
|
-
return (r, h) => F2((k(), g("div", {
|
|
4449
|
+
return (r, h) => t.KeepAlive || l(i) ? F2((k(), g("div", {
|
|
4450
|
+
key: 0,
|
|
4446
4451
|
class: I(l(d))
|
|
4447
4452
|
}, [
|
|
4448
4453
|
H(r.$slots, "default")
|
|
4449
4454
|
], 2)), [
|
|
4450
|
-
[yv, l(
|
|
4451
|
-
]);
|
|
4455
|
+
[yv, l(i)]
|
|
4456
|
+
]) : L("", !0);
|
|
4452
4457
|
}
|
|
4453
4458
|
});
|
|
4454
4459
|
Xv.List = jC;
|
package/dist/index.umd.cjs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
opacity: 0 !important;
|
|
10
10
|
transition: opacity 0.15s linear;
|
|
11
11
|
}
|
|
12
|
-
`,document.head.appendChild(Xx);const bC=["id"],SC=["id","aria-labelledby"],zC=e.createElementVNode("span",{tabindex:"0"},null,-1),qC=["aria-label"],AC=["id"],BC=["aria-label"],VC=[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)],HC={key:0},PC=e.createElementVNode("span",{tabindex:"0"},null,-1),FC=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}},emits:["update:modelValue","show","shown","hide","hidden","ok","cancel","close"],setup(a,{expose:o,emit:c}){const n=a;class r{constructor(L,A={}){Ie(this,"type");Ie(this,"cancelable",!0);Ie(this,"target",null);Ie(this,"vueTarget",null);Ie(this,"defaultPrevented",!1);Ie(this,"componentId","");Ie(this,"trigger","programmatic");this.type=L,Object.assign(this,A)}preventDefault(){this.defaultPrevented=!0}}const i=e.ref(!1),l=e.ref(null),d=e.ref(null),h=e.ref(n.zIndex),s=e.ref(!1),u=e.ref(0),y=e.computed(()=>n.zIndex!==1050?n.zIndex:h.value);function p(){if(n.zIndex!==1050){h.value=n.zIndex;return}const b=document.querySelectorAll(".cstu-modal");let L=1050;b.forEach(A=>{const E=parseInt(window.getComputedStyle(A).zIndex,10);!isNaN(E)&&E>L&&(L=E)}),h.value=L+10}const k=e.computed(()=>n.fullscreen?"":g(n.radius));function g(b){const L={none:"",sm:"cstu-rounded-sm",md:"cstu-rounded-md",lg:"cstu-rounded-lg",xl:"cstu-rounded-xl",full:"cstu-rounded-full"};return L[b||n.size]||L.md}function C(){if(i.value)return;const b=new r("show",{trigger:"programmatic",target:null,vueTarget:null,componentId:n.id});c("show",b),!b.defaultPrevented&&(l.value=document.activeElement,i.value=!0,u.value++,p(),document.body.classList.add("cstu-modal-open"),c("update:modelValue",!0),e.nextTick(()=>{I(),c("shown",b)}))}function M(b="programmatic"){if(!i.value)return;const L=new r("hide",{trigger:b,target:null,vueTarget:null,componentId:n.id});c("hide",L),!L.defaultPrevented&&(i.value=!1,s.value=!1,document.body.classList.remove("cstu-modal-open"),c("update:modelValue",!1),e.nextTick(()=>{z(l.value),c("hidden",L)}))}function v(b){b&&(l.value=typeof b=="string"?document.querySelector(b):b),i.value?M():C()}function x(b){b==="ok"?c("ok"):b==="cancel"&&c("cancel"),M(b)}function f(b){const L=b.target,A=L.closest(".cstu-dropdown-menu"),E=L.tagName&&["input","select","textarea","button"].includes(L.tagName.toLowerCase()),$=L.closest(".cstu-modal-content");A||E||$&&L!==b.currentTarget||!n.noCloseOnBackdrop&&L===b.currentTarget&&M("backdrop")}function m(b){b.key==="Escape"&&i.value&&!n.noCloseOnEsc&&!n.busy&&M("esc")}function I(){e.nextTick(()=>{if(!d.value)return;const b=d.value,L=D(b);L.length>0&&L[0].focus()})}function z(b){if(b&&i.value===!1)try{b.focus()}catch{}}function P(b){if(i.value&&d.value&&b.target){const L=b.target,A=d.value,E=!!L.closest(".cstu-modal-content");if(A!==L&&!A.contains(L)&&!E){if(s.value)return;s.value=!0;try{const $=D(A);$.length>0?$[0].focus():A.focus()}finally{setTimeout(()=>{s.value=!1},0)}}}}function D(b){return Array.from(b.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))}return e.watch(()=>n.modelValue,b=>{b!==i.value&&(b?C():M())}),e.watch(()=>n.id,()=>{Gx(n.id),Wx(n.id,{show:C,hide:M,toggle:v})}),e.onMounted(()=>{Wx(n.id,{show:C,hide:M,toggle:v}),document.addEventListener("keydown",m),document.addEventListener("focusin",P),n.modelValue&&(C(),i.value&&e.nextTick(()=>{setTimeout(()=>{const b=document.getElementById(n.id);let L=null;b&&b.parentNode&&(L=b.parentNode.querySelector(".cstu-modal-backdrop")),b&&window.getComputedStyle(b).display==="none"&&(b.style.display="block"),L&&window.getComputedStyle(L).display==="none"&&(L.style.display="block")},50)}))}),e.onBeforeUnmount(()=>{Gx(n.id),document.removeEventListener("keydown",m),document.removeEventListener("focusin",P),i.value&&(i.value=!1,c("update:modelValue",!1))}),o({hide:M,show:C,close:x,toggle:v}),(b,L)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:n.static||n.teleport===!1},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value&&a.backdrop!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${n.id}-backdrop`,class:e.normalizeClass(["cstu-modal-backdrop",a.backdropClass]),style:e.normalizeStyle({zIndex:e.unref(y)-10})},null,14,bC)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:n.id,class:e.normalizeClass(["cstu-modal",[{"cstu-modal-static":n.static,"cstu-modal-scrollable":n.scrollable},n.modalClass]]),tabindex:"-1",role:"dialog","aria-modal":"true",style:e.normalizeStyle({zIndex:e.unref(y)}),"aria-labelledby":!a.hideHeader&&a.title?`modal-title-${n.id}`:void 0,onClick:f,onMousedown:L[5]||(L[5]=e.withModifiers(()=>{},["stop"]))},[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:L[4]||(L[4]=e.withModifiers(A=>A.target===A.currentTarget&&A.stopPropagation(),["stop"]))},[zC,e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",a.contentClass,{"cstu-modal-content-fullscreen":a.fullscreen},e.unref(k)]),tabindex:"-1",ref_key:"modalElement",ref:d,"aria-label":a.ariaLabel,onClick:L[3]||(L[3]=A=>A.target===A.currentTarget&&A.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(b.$slots,"modal-header",{},()=>[e.renderSlot(b.$slots,"modal-title",{},()=>[e.createElementVNode("h5",{id:`modal-title-${n.id}`,class:e.normalizeClass([n.titleClass||"cstu-modal-title",{"sr-only":a.titleSrOnly}])},e.toDisplayString(a.title),11,AC)]),a.hideHeaderClose?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,type:"button","aria-label":a.closeTitle,class:"cstu-close",onClick:L[0]||(L[0]=A=>x("headerClose"))},VC,8,BC))])],2)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",a.bodyClass,{"cstu-modal-body-scrollable":a.scrollable}])},[e.renderSlot(b.$slots,"default",{},()=>[a.content?(e.openBlock(),e.createElementBlock("div",HC,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(b.$slots,"modal-footer",{},()=>[a.okOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J,{key:0,variant:a.cancelVariant,color:a.cancelColor,disabled:a.cancelDisabled||a.busy,onClick:L[1]||(L[1]=A=>x("cancel"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.cancelTitle),1)]),_:1},8,["variant","color","disabled"])),e.createVNode(J,{variant:a.okVariant,color:a.okColor,disabled:a.okDisabled||a.busy,loading:a.busy,onClick:L[2]||(L[2]=A=>x("ok"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])])],2))],10,qC),PC],2)],46,SC)):e.createCommentVNode("",!0)]),_:3})],8,["disabled"]))}}),Gb="",jC={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",()=>{Zx.show(c)}),a.tagName!=="BUTTON"&&(a.setAttribute("role","button"),a.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),Zx.show(c))}),a.hasAttribute("tabindex")||a.setAttribute("tabindex","0"))}},DC={install:a=>{a.directive("cstu-modal",jC)}},TC=["primary","secondary","success","warning","info"];function Kx(a,o=TC){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 Jx(a){return!a||typeof a!="string"?"":a.trim().split(" ").slice(0,2).map(o=>o.charAt(0).toUpperCase()).join("")}const EC=["src","alt"],RC=["title"],OC={key:1,"data-avatar-placeholder-icon":"true",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},NC=[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)],Qx=e.defineComponent({__name:"Avatar",props:{size:{default:"md"},radius:{default:"full"},color:{default:"primary"},gradient:null,src:{default:null},alt:null,imageProps:null,children:null,autoContrast:{type:Boolean,default:!0},name:null,allowedInitialsColors:null,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?Jx(o.name):""),i=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}),l=e.computed(()=>pe(o.radius)),d=e.computed(()=>{if(o.src&&!c.value||!n(o.color)&&o.color!=="initials")return"";if(o.color==="initials"&&o.name){const g=Kx(o.name,o.allowedInitialsColors||["primary","secondary","success","warning","info"]);return g?R(g,"filled",{}):R("primary","filled",{})}const y=o.variant==="transparent"?"default":o.variant==="gradient"?"filled":o.variant,p=o.color&&o.color!=="initials"?o.color:"primary",k=R(p,y,{});return o.variant==="transparent"?"bg-transparent":k}),h=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}`:fx(o.variant)),s=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}),u=y=>{var p;c.value=!0,(p=o.imageProps)!=null&&p.onError&&o.imageProps.onError(y)};return(y,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component||"div"),{class:e.normalizeClass(["avatar",e.unref(i),e.unref(l),!c.value&&a.src?"":e.unref(d),!c.value&&a.src?"":e.unref(h),{"avatar--with-image":!c.value&&a.src},{"hover:opacity-80 transition-opacity":a.hover},a.customClasses]),style:e.normalizeStyle(e.unref(s))},{default:e.withCtx(()=>[!c.value&&a.src?(e.openBlock(),e.createElementBlock("img",e.mergeProps({key:0,class:"avatar__image",src:a.src,alt:a.alt},a.imageProps,{onError:u}),null,16,EC)):(e.openBlock(),e.createElementBlock("span",{key:1,class:"avatar__placeholder",title:a.alt},[e.renderSlot(y.$slots,"default",{},()=>[a.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(r)),1)],64)):(e.openBlock(),e.createElementBlock("svg",OC,NC))])],8,RC))]),_:3},8,["class","style"]))}}),Kb="",$C=e.defineComponent({__name:"AvatarGroup",props:{spacing:{default:"sm"},gap:{default:"none"},outlineWidth:{default:"normal"},outlineColor:{default:"white"},outlineOffset:{default:"small"},customClasses:{default:""},max:null,hover:{type:Boolean,default:!1}},setup(a){const o=a,c=e.computed(()=>{if(typeof o.spacing=="number")return`${o.spacing}px`;const s={xs:"-1rem",sm:"-0.75rem",md:"-0.5rem",lg:"-0.25rem",xl:"0"};return s[o.spacing]||s.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 s={none:"0",xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem"};return s[o.gap]||s.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 s={none:"0",thin:"1px",normal:"2px",medium:"3px",thick:"4px"};return s[o.outlineWidth]||s.normal}),i=e.computed(()=>{if(typeof o.outlineOffset=="number")return`${o.outlineOffset}px`;if(typeof o.outlineOffset=="string"&&!isNaN(parseFloat(o.outlineOffset)))return o.outlineOffset;const s={none:"0",inset:"-2px",small:"1px",medium:"2px",large:"3px"};return s[o.outlineOffset]||s.small}),l=e.computed(()=>typeof o.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(o.outlineColor)?`outline-${o.outlineColor}`:""),d=e.computed(()=>typeof o.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(o.outlineColor)?"var(--color-"+o.outlineColor+")":o.outlineColor),h=e.computed(()=>({"--avatar-group-spacing":c.value,"--avatar-group-gap":n.value,"--avatar-group-outline-width":r.value,"--avatar-group-outline-color":d.value,"--avatar-group-outline-offset":i.value}));return(s,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["avatar-group",a.customClasses,e.unref(l),{"avatar-group--hover":a.hover}]),style:e.normalizeStyle(e.unref(h))},[e.renderSlot(s.$slots,"default",{},void 0,!0)],6))}}),Jb="",Yx=Zg($C,[["__scopeId","data-v-f582d4fb"]]);Qx.Group=Yx;const P2=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),i=e.computed(()=>c.variant),l=e.ref(c.value!==void 0?c.value:c.defaultValue);e.watch(()=>c.value,h=>{h!==void 0&&(l.value=h)});const d=h=>{c.value!==void 0?o("change",h):l.value=h};return e.provide("activeTab",l),e.provide("setActiveTab",d),e.provide("tabsOrientation",r),e.provide("tabsPlacement",n),(h,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-tabs",`cstu-tabs-${e.unref(r)}`,`cstu-tabs-placement-${e.unref(n)}`,`cstu-tabs-variant-${e.unref(i)}`])},[e.renderSlot(h.$slots,"default")],2))}}),Qb="",_x=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":""]),i=d=>{if(["space-between","space-around","space-evenly"].includes(d))return d;switch(d){case"flex-start":return"flex-start";case"flex-end":return"flex-end";case"center":return"center";default:return"flex-start"}},l=e.computed(()=>c.value==="horizontal"?{justifyContent:o.justify}:{justifyContent:i(o.justify)});return(d,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r)),style:e.normalizeStyle(e.unref(l))},[e.renderSlot(d.$slots,"default")],6))}}),Yb="",eI=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")),i=e.inject("tabsPlacement",e.ref("top")),l=e.computed(()=>c.value),d=e.computed(()=>r.value),h=e.computed(()=>i.value),s=e.computed(()=>l.value===o.value),u=e.computed(()=>d.value==="vertical"),y=e.computed(()=>o.fullWidth&&d.value==="horizontal"),p=()=>{!o.disabled&&!o.loading&&n(o.value)};return(k,g)=>(e.openBlock(),e.createBlock(e.unref(J),{class:e.normalizeClass(["tabs-tab",e.unref(s)?"tabs-tab-active":"tabs-tab-inactive",`tabs-tab-${o.variant}`,o.color?`tabs-tab-color-${o.color}`:"",`tabs-tab-orientation-${e.unref(d)}`,`tabs-tab-placement-${e.unref(h)}`,{"tabs-tab-full-width":e.unref(y)}]),disabled:o.disabled,loading:o.loading,color:e.unref(s)?o.color:"secondary",variant:e.unref(s)?o.variant:"subtle",size:o.size,radius:o.variant==="text"?"none":o.radius,"full-width":e.unref(u),onClick:p},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"]))}}),_b="",tI=e.defineComponent({__name:"TabsPanel",props:{value:{type:String,required:!0}},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")),i=e.computed(()=>c.value===o.value),l=e.computed(()=>["tabs-panel",i.value?"tabs-panel-active":"tabs-panel-inactive",`tabs-panel-${n.value}`,`tabs-panel-placement-${r.value}`]);return(d,h)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l))},[e.renderSlot(d.$slots,"default")],2)),[[e.vShow,e.unref(c)===o.value]])}}),eS="";P2.List=_x,P2.Tab=eI,P2.Panel=tI;const UC=e.createElementVNode("span",{class:"cstu-sr-only"},"First page",-1),ZC=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),WC=e.createElementVNode("span",{class:"cstu-sr-only"},"Previous page",-1),GC=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),XC={key:2,class:"cstu-flex cstu-items-center cstu-gap-2"},KC=[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)],JC=e.createElementVNode("span",{class:"cstu-sr-only"},"Next page",-1),QC=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),YC=e.createElementVNode("span",{class:"cstu-sr-only"},"Last page",-1),_C=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),ev=e.defineComponent({__name:"Pagination",props:{modelValue:{default:1},total:null,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:null},emits:["update:modelValue"],setup(a,{emit:o}){const c=a,n=e.ref(c.modelValue);e.watch(()=>c.modelValue,p=>{n.value=p});const r=e.computed(()=>n.value===1),i=e.computed(()=>n.value===c.total),l=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"}}),d=e.computed(()=>["cstu-flex cstu-items-center cstu-justify-center",u(c.size)]),h=e.computed(()=>{const p=[],k=c.total;if(c.siblings*2+3+c.boundaries*2>=k)return Array.from({length:k},(m,I)=>I+1);const C=Math.max(n.value-c.siblings,c.boundaries+1),M=Math.min(n.value+c.siblings,k-c.boundaries),v=C>c.boundaries+2,x=M<k-(c.boundaries+1),f=new Set;for(let m=1;m<=c.boundaries;m++)p.push(m),f.add(m);if(v)p.push("dots");else if(!v&&C>c.boundaries)for(let m=c.boundaries+1;m<C;m++)f.has(m)||(p.push(m),f.add(m));for(let m=C;m<=M;m++)f.has(m)||(p.push(m),f.add(m));if(x)p.push("dots");else if(!x&&M<k-c.boundaries)for(let m=M+1;m<k-c.boundaries+1;m++)f.has(m)||(p.push(m),f.add(m));for(let m=k-c.boundaries+1;m<=k;m++)f.has(m)||(p.push(m),f.add(m));return p}),s=p=>{p<1||p>c.total||c.disabled||(n.value=p,o("update:modelValue",p))};function u(p){const k={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 k[p]||k.md}const y=e.computed(()=>c.variant==="filled"?"subtle":"bordered-transparent");return(p,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-items-center cstu-gap-2",[c.class]])},[c.withEdges?(e.openBlock(),e.createBlock(J,{key:0,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(r)||c.disabled,onClick:k[0]||(k[0]=g=>s(1)),"aria-label":"Go to first page",class:e.normalizeClass(e.unref(l))},{default:e.withCtx(()=>[UC,ZC]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withControls?(e.openBlock(),e.createBlock(J,{key:1,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(r)||c.disabled,onClick:k[1]||(k[1]=g=>s(n.value-1)),"aria-label":"Go to previous page",class:e.normalizeClass(e.unref(l))},{default:e.withCtx(()=>[WC,GC]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withPages?(e.openBlock(),e.createElementBlock("div",XC,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(h),(g,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:C},[g!=="dots"?(e.openBlock(),e.createBlock(J,{key:0,variant:g===n.value?"filled":e.unref(y),color:g===n.value?c.color:"light",size:c.size,disabled:c.disabled,onClick:M=>s(Number(g)),"aria-current":g===n.value?"page":void 0,"aria-label":`Page ${g}`,class:e.normalizeClass(e.unref(l))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g),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",[e.unref(d),e.unref(l)]])},KC,2))],64))),128))])):e.createCommentVNode("",!0),c.withControls?(e.openBlock(),e.createBlock(J,{key:3,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(i)||c.disabled,onClick:k[2]||(k[2]=g=>s(n.value+1)),"aria-label":"Go to next page",class:e.normalizeClass(e.unref(l))},{default:e.withCtx(()=>[JC,QC]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withEdges?(e.openBlock(),e.createBlock(J,{key:4,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(i)||c.disabled,onClick:k[3]||(k[3]=g=>s(c.total)),"aria-label":"Go to last page",class:e.normalizeClass(e.unref(l))},{default:e.withCtx(()=>[YC,_C]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0)],2))}}),aI={mounted(a,o){a._clickOutside=c=>{const n=c.target;if(!(a===n||a.contains(n))){const r=c.target,i=r.tagName&&r.tagName.toLowerCase()==="input",l=r.closest(".cstu-dropdown-menu");!i&&!l&&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))}},tv=["id","aria-labelledby","aria-modal","onKeydown"],av={class:"cstu-popover-inner"},ov=["id"],cv=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:null},emits:["update:open","open","close"],setup(a,{emit:o}){const c=a,n=e.ref(c.defaultOpen),r=e.ref(null),i=e.ref(null),l=e.ref(null),d=e.ref(null),h=e.ref(c.zIndex);c.open!==void 0&&(n.value=c.open);const s=e.computed(()=>{if(c.placement!=="auto")return c.placement}),u=e.computed(()=>{const w=[q2(c.offsetDistance)];return l.value&&w.push(Ex({element:l})),c.placement==="auto"?w.push(Tx({padding:8})):w.push(B2({fallbackPlacements:["top","bottom","left","right"],padding:8})),w.push(A2({padding:8})),w}),{floatingStyles:y,update:p}=V2(r,i,{placement:s,middleware:u,whileElementsMounted:Dx}),k=w=>{c.disabled||(c.trigger==="click"||c.trigger==="manual")&&z()},g=()=>{c.disabled||c.trigger==="hover"&&m()},C=()=>{c.disabled||c.trigger==="hover"&&setTimeout(()=>{I("hover")},100)},M=w=>{c.closeOnClick&&I("popoverClick"),w.stopPropagation()},v=w=>{c.closeOnClickOutside&&n.value&&i.value&&!i.value.contains(w.target)&&r.value&&!r.value.contains(w.target)&&I("clickAway")},x=()=>{c.closeOnClickOutside&&I("backdrop")},f=w=>{c.closeOnEscape&&w.key==="Escape"&&(w.preventDefault(),I("escape"))},m=()=>{c.disabled||n.value||(d.value=document.activeElement,n.value=!0,e.nextTick(()=>{p(),c.trapFocus&&P()}),o("open"),o("update:open",!0))},I=(w="programmatic")=>{n.value&&(n.value=!1,c.trapFocus&&D(d.value),o("close",w),o("update:open",!1))},z=()=>{n.value?I():m()},P=()=>{if(!i.value)return;const w=b(i.value);w.length>0?w[0].focus():i.value.focus()},D=w=>{w&&typeof w.focus=="function"&&w.focus()},b=w=>Array.from(w.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).filter(q=>!q.hasAttribute("disabled")&&!q.getAttribute("aria-hidden")),L=w=>{if(!n.value||!c.trapFocus||!i.value)return;const q=w.target;i.value.contains(q)||(w.preventDefault(),P())};e.watch(()=>c.open,w=>{w!==n.value&&(w?m():I())}),e.watch(r,w=>{w&&p()}),e.onMounted(()=>{document.addEventListener("keydown",f),c.trapFocus&&document.addEventListener("focusin",L)}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",f),c.trapFocus&&document.removeEventListener("focusin",L)});const A=e.computed(()=>[pe(c.radius),!c.variant||c.variant==="shadow"?c.shadow?`cstu-shadow-${c.shadow}`:"cstu-shadow-md":"",c.popoverClass]),E=e.computed(()=>{const w=[...A.value.filter(Boolean)];let q=!1;const O=c.color;if(O&&G(O)&&c.variant==="color"){const j=R(O,"filled",{disabled:c.disabled});typeof j=="string"&&j.trim()&&(w.push(...j.split(" ").filter(Boolean)),q=!0)}return q||(w.push("cstu-bg-white"),c.variant==="outline"&&w.push("cstu-border","cstu-border-gray-300"),w.push("cstu-text-gray-700")),w.filter(Boolean).map(j=>typeof j=="string"?j:Object.keys(j).filter(o2=>j[o2]).join(" ")).join(" ")}),$=e.computed(()=>{const w={width:typeof c.width=="number"?`${c.width}px`:c.width},q=c.color;if(q&&!G(q)&&c.variant==="color"){w.backgroundColor=q;const O=F(q);w.color=O>128?"#000000":"#FFFFFF"}return{...y.value,...w}});e.computed(()=>{const w={backgroundColor:"white"},q=c.color;return c.variant==="color"&&q?G(q)?(w.borderWidth="1px",w.borderStyle="solid",w.borderColor=`var(--${q}-500)`):w.backgroundColor=q:c.variant==="outline"&&(w.borderWidth="1px",w.borderStyle="solid",w.borderColor="#e2e8f0"),w});function F(w){if(w.startsWith("#"))try{const q=parseInt(w.substring(1,3),16),O=parseInt(w.substring(3,5),16),j=parseInt(w.substring(5,7),16);return(q*299+O*587+j*114)/1e3}catch{return 128}else if(w.startsWith("rgb"))try{const q=w.match(/\d+/g);if(q&&q.length>=3){const O=parseInt(q[0],10),j=parseInt(q[1],10),o2=parseInt(q[2],10);return(O*299+j*587+o2*114)/1e3}}catch{return 128}return 128}const X=e.computed(()=>{const w=c.color,q=!(w&&G(w)),O=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"],we(c.size||"md"),"cstu-flex cstu-items-center cstu-justify-between",O||q?"cstu-border-b cstu-border-gray-200 dark:cstu-border-gray-700":"",c.headerClass].filter(Boolean).join(" ")}),K=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"],we(c.size||"sm"),c.bodyClass].filter(Boolean).join(" ")),W=e.computed(()=>{const w=c.color,q=!(w&&G(w)),O=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"],O||q?"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(w,q)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"triggerRef",ref:r,class:e.normalizeClass(["cstu-inline-block cstu-popover-trigger",{"cstu-cursor-not-allowed cstu-opacity-70":a.disabled}]),onClick:k,onMouseenter:g,onMouseleave:C},[e.renderSlot(w.$slots,"trigger")],34),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade",appear:""},{default:e.withCtx(()=>[n.value&&a.backdrop!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-popover-backdrop",{"cstu-bg-black/50":a.backdrop===!0,"cstu-bg-transparent":a.backdrop==="transparent"}]),style:e.normalizeStyle({zIndex:a.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(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-popover-container",style:e.normalizeStyle({zIndex:h.value})},[e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"popoverRef",ref:i,id:c.id,class:e.normalizeClass(e.unref(E)),style:e.normalizeStyle([e.unref(y),e.unref($)]),role:"dialog","aria-labelledby":c.title?`${c.id}-title`:void 0,"aria-modal":c.trapFocus,tabindex:"-1",onClick:M,onKeydown:e.withKeys(f,["esc"])},[e.createElementVNode("div",av,[c.hideHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(X))},[e.renderSlot(w.$slots,"header",{},()=>[e.createElementVNode("h3",{id:`${c.id}-title`,class:e.normalizeClass(["cstu-popover-title cstu-font-medium",e.unref(we)(c.size||"md")])},e.toDisplayString(c.title),11,ov),c.showCloseIcon?(e.openBlock(),e.createBlock(J,{key:0,icon:"X",variant:"text",size:"xs",color:c.color&&e.unref(G)(c.color)?"white":"gray",class:"cstu-ml-auto","aria-label":"Close popover",onClick:q[0]||(q[0]=e.withModifiers(O=>I("headerClose"),["stop"]))},null,8,["color"])):e.createCommentVNode("",!0)])],2)),e.createElementVNode("div",{class:e.normalizeClass(e.unref(K))},[e.renderSlot(w.$slots,"default",{},()=>[a.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(we)(c.size||"sm"))},e.toDisplayString(a.content),3)):e.createCommentVNode("",!0)])],2),c.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(W))},[e.renderSlot(w.$slots,"footer",{},()=>[e.createVNode(J,{size:"sm",variant:"subtle",onClick:q[1]||(q[1]=O=>I("cancel"))},{default:e.withCtx(()=>[e.createTextVNode(" Close ")]),_:1})])],2))])],46,tv)),[[e.unref(aI),v]])],4)):e.createCommentVNode("",!0)]),_:3})]))],64))}}),aS="",nv=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:null,separatorClass:null,activeClass:null},setup(a){const o=a,c=e.useSlots(),n=e.computed(()=>!!c.default),r=e.computed(()=>c.default?c.default():[]),i=y=>y===r.value.length-1,l=y=>y?["primary","secondary","success","warning","danger","info","dark","light"].includes(y):!0,d=y=>{if(!i(y)||!o.highlightActive)return"";if(l(o.color)){const p=Q[o.color];if(p)return`cstu-text-${p.base}-${p.main}`}return""},h=y=>!i(y)||!o.highlightActive?{}:l(o.color)?{}:{color:o.color},s=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}),u=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,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-breadcrumbs",o.class])},[e.unref(n)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(e.unref(r),(k,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-breadcrumb-item",e.unref(s),i(g)?"cstu-breadcrumb-active":"cstu-breadcrumb-inactive",i(g)?o.activeClass:"",i(g)&&o.highlightActive?d(g):""]),style:e.normalizeStyle(h(g))},[e.renderSlot(y.$slots,`item-${g}`,{isActive:i(g)},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k)))])],6),i(g)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-breadcrumb-separator",e.unref(u),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))}}),oS="",rv={key:0,class:"cstu-flex cstu-justify-between cstu-items-center cstu-mb-1"},iv=["for"],dv={key:0,class:"cstu-text-red-500 cstu-ml-1"},lv={key:0,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px] cstu-mt-1"},sv=["id","value","placeholder","disabled","required","readonly","rows","maxlength"],hv={key:1,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px] cstu-mt-1"},yv=e.defineComponent({__name:"Textarea",props:{id:null,modelValue:null,placeholder:null,disabled:{type:Boolean},readonly:{type:Boolean},label:null,labelProps:null,description:null,descriptionProps:null,error:null,errorProps:null,hasError:{type:Boolean},showBothErrorAndDescription:{type:Boolean},textareaProps:null,size:null,radius:null,variant:null,required:{type:Boolean},withAsterisk:{type:Boolean},rows:null,resize:null,fullWidth:{type:Boolean},color:null,class:null,inputClass:null,maxLength:null},emits:["update:modelValue","focus","blur","change"],setup(a,{expose:o,emit:c}){const{id:n,modelValue:r,placeholder:i,label:l,description:d,error:h,hasError:s=!1,disabled:u=!1,readonly:y=!1,required:p=!1,withAsterisk:k=!1,showBothErrorAndDescription:g=!1,textareaProps:C,labelProps:M,descriptionProps:v,errorProps:x,size:f="md",variant:m="default",radius:I="md",color:z="primary",class:P,fullWidth:D=!1,inputClass:b="",rows:L=3,resize:A="none",maxLength:E=void 0}=a,$=`textarea-${Math.random().toString(36).substring(2,11)}`,F=e.ref(null),X={xs:{inputClass:`cstu-min-h-8 ${D?"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 ${D?"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 ${D?"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 ${D?"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 ${D?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-base cstu-font-medium",descriptionSize:"cstu-text-sm"}},K=e.computed(()=>`${X[f].inputClass.split(" ")[0]} cstu-transition-all cstu-duration-300`),W=e.computed(()=>X[f].labelSize),w=e.computed(()=>X[f].descriptionSize),q=e.computed(()=>{switch(f){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"}}),O=e.computed(()=>pe(I)),j=e.computed(()=>h!==void 0&&h!==""||s),o2=e.computed(()=>m==="unstyled"||!G(z)&&!j.value?"":j.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":m==="default"||m==="outline"?`cstu-border-${z}-500 hover:cstu-border-${z}-600 focus-within:cstu-border-${z}-500 focus-within:cstu-ring-1 focus-within:cstu-ring-${z}-500`:m==="filled"?`cstu-bg-${z}-50 hover:cstu-bg-${z}-100`:m==="light"?`cstu-bg-${z}-50 cstu-text-${z}-500 hover:cstu-bg-${z}-100`:m==="subtle"?`cstu-text-${z}-500 hover:cstu-bg-${z}-50`:""),mx=e.computed(()=>m==="unstyled"?{}:G(z)||j.value?{}:m==="default"||m==="outline"?{"--border-color":z,"border-color":"var(--border-color)"}:m==="filled"?{"--bg-color":`${z}10`,"background-color":"var(--bg-color)"}:m==="light"?{"--bg-color":`${z}10`,"--text-color":z,"background-color":"var(--bg-color)",color:"var(--text-color)"}:m==="subtle"?{"--text-color":z,color:"var(--text-color)"}:{}),V=e.computed(()=>{const H={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(m==="unstyled")return[H[m]];const ye=j.value?"":m==="default"||m==="outline"?"cstu-border-gray-300/45":"",y2=j.value?"cstu-border-red-500":"";return[H[m],ye,y2,j.value?"hover:cstu-border-red-500":"hover:cstu-border-blue-450",j.value?"focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500":"focus-within:cstu-border-blue-450 focus-within:cstu-ring-1 focus-within:cstu-ring-blue-450"]}),ee=e.ref(!1),xe=H=>{ee.value=!0,c("focus",H)},Sb=H=>{ee.value=!1,c("blur",H)},zb=H=>{c("change",H)};return o({textarea:F,focus:()=>{var H;return(H=F.value)==null?void 0:H.focus()},blur:()=>{var H;return(H=F.value)==null?void 0:H.blur()},select:()=>{var H;return(H=F.value)==null?void 0:H.select()},setSelectionRange:(H,ye)=>{var y2;return(y2=F.value)==null?void 0:y2.setSelectionRange(H,ye)},setRangeText:H=>{var ye;return(ye=F.value)==null?void 0:ye.setRangeText(H)},get value(){var H;return(H=F.value)==null?void 0:H.value},set value(H){F.value&&H!==void 0&&(F.value.value=H)}}),(H,ye)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-flex-col cstu-transition-all cstu-duration-300",[H.customClass,a.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"]])},[a.label||H.$slots.label?(e.openBlock(),e.createElementBlock("div",rv,[e.createElementVNode("label",e.mergeProps({for:a.id||$,class:["cstu-flex cstu-items-center",e.unref(W)]},a.labelProps),[e.renderSlot(H.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(a.label)+" ",1),a.withAsterisk||a.required?(e.openBlock(),e.createElementBlock("span",dv,"*")):e.createCommentVNode("",!0)])],16,iv),e.renderSlot(H.$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",e.unref(K),e.unref(O),e.unref(V),e.unref(o2),{"cstu-opacity-50 cstu-pointer-events-none cstu-cursor-not-allowed":a.disabled}]),style:e.normalizeStyle(e.unref(mx))},[H.$slots.leftSection?(e.openBlock(),e.createElementBlock("div",lv,[e.renderSlot(H.$slots,"leftSection")])):e.createCommentVNode("",!0),e.createElementVNode("textarea",e.mergeProps({ref_key:"textareaRef",ref:F,id:a.id||$,value:a.modelValue,placeholder:a.placeholder,disabled:a.disabled,required:a.required,readonly:a.readonly,rows:a.rows,maxlength:a.maxLength,class:["cstu-flex-1 cstu-bg-transparent cstu-outline-none cstu-w-full",e.unref(q),a.inputClass,{"cstu-text-gray-500":a.modelValue,"cstu-text-red-500":e.unref(j)&&!a.modelValue}],style:{resize:a.resize},onInput:ye[0]||(ye[0]=y2=>H.$emit("update:modelValue",y2.target.value)),onFocus:xe,onBlur:Sb,onChange:zb},a.textareaProps),null,16,sv),H.$slots.rightSection?(e.openBlock(),e.createElementBlock("div",hv,[e.renderSlot(H.$slots,"rightSection")])):e.createCommentVNode("",!0)],6)]),a.description&&!e.unref(j)||H.$slots.description&&!e.unref(j)||a.showBothErrorAndDescription&&a.description||a.showBothErrorAndDescription&&H.$slots.description?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1,class:"cstu-mt-1"},a.descriptionProps),[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-gray-500",e.unref(w)])},[e.renderSlot(H.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(a.description),1)])],2)],16)):e.createCommentVNode("",!0),e.unref(j)&&a.error||e.unref(j)&&H.$slots.error||a.showBothErrorAndDescription&&a.error||a.showBothErrorAndDescription&&H.$slots.error?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:2,class:"cstu-mt-1"},a.errorProps),[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-red-500",e.unref(w)])},[e.renderSlot(H.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(a.error),1)])],2)],16)):e.createCommentVNode("",!0)],2))}});/**
|
|
12
|
+
`,document.head.appendChild(Xx);const bC=["id"],SC=["id","aria-labelledby"],zC=e.createElementVNode("span",{tabindex:"0"},null,-1),qC=["aria-label"],AC=["id"],BC=["aria-label"],VC=[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)],HC={key:0},PC=e.createElementVNode("span",{tabindex:"0"},null,-1),FC=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}},emits:["update:modelValue","show","shown","hide","hidden","ok","cancel","close"],setup(a,{expose:o,emit:c}){const n=a;class r{constructor(L,A={}){Ie(this,"type");Ie(this,"cancelable",!0);Ie(this,"target",null);Ie(this,"vueTarget",null);Ie(this,"defaultPrevented",!1);Ie(this,"componentId","");Ie(this,"trigger","programmatic");this.type=L,Object.assign(this,A)}preventDefault(){this.defaultPrevented=!0}}const i=e.ref(!1),l=e.ref(null),d=e.ref(null),h=e.ref(n.zIndex),s=e.ref(!1),u=e.ref(0),y=e.computed(()=>n.zIndex!==1050?n.zIndex:h.value);function p(){if(n.zIndex!==1050){h.value=n.zIndex;return}const b=document.querySelectorAll(".cstu-modal");let L=1050;b.forEach(A=>{const E=parseInt(window.getComputedStyle(A).zIndex,10);!isNaN(E)&&E>L&&(L=E)}),h.value=L+10}const k=e.computed(()=>n.fullscreen?"":g(n.radius));function g(b){const L={none:"",sm:"cstu-rounded-sm",md:"cstu-rounded-md",lg:"cstu-rounded-lg",xl:"cstu-rounded-xl",full:"cstu-rounded-full"};return L[b||n.size]||L.md}function C(){if(i.value)return;const b=new r("show",{trigger:"programmatic",target:null,vueTarget:null,componentId:n.id});c("show",b),!b.defaultPrevented&&(l.value=document.activeElement,i.value=!0,u.value++,p(),document.body.classList.add("cstu-modal-open"),c("update:modelValue",!0),e.nextTick(()=>{I(),c("shown",b)}))}function M(b="programmatic"){if(!i.value)return;const L=new r("hide",{trigger:b,target:null,vueTarget:null,componentId:n.id});c("hide",L),!L.defaultPrevented&&(i.value=!1,s.value=!1,document.body.classList.remove("cstu-modal-open"),c("update:modelValue",!1),e.nextTick(()=>{z(l.value),c("hidden",L)}))}function v(b){b&&(l.value=typeof b=="string"?document.querySelector(b):b),i.value?M():C()}function x(b){b==="ok"?c("ok"):b==="cancel"&&c("cancel"),M(b)}function f(b){const L=b.target,A=L.closest(".cstu-dropdown-menu"),E=L.tagName&&["input","select","textarea","button"].includes(L.tagName.toLowerCase()),$=L.closest(".cstu-modal-content");A||E||$&&L!==b.currentTarget||!n.noCloseOnBackdrop&&L===b.currentTarget&&M("backdrop")}function m(b){b.key==="Escape"&&i.value&&!n.noCloseOnEsc&&!n.busy&&M("esc")}function I(){e.nextTick(()=>{if(!d.value)return;const b=d.value,L=D(b);L.length>0&&L[0].focus()})}function z(b){if(b&&i.value===!1)try{b.focus()}catch{}}function P(b){if(i.value&&d.value&&b.target){const L=b.target,A=d.value,E=!!L.closest(".cstu-modal-content");if(A!==L&&!A.contains(L)&&!E){if(s.value)return;s.value=!0;try{const $=D(A);$.length>0?$[0].focus():A.focus()}finally{setTimeout(()=>{s.value=!1},0)}}}}function D(b){return Array.from(b.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))}return e.watch(()=>n.modelValue,b=>{b!==i.value&&(b?C():M())}),e.watch(()=>n.id,()=>{Gx(n.id),Wx(n.id,{show:C,hide:M,toggle:v})}),e.onMounted(()=>{Wx(n.id,{show:C,hide:M,toggle:v}),document.addEventListener("keydown",m),document.addEventListener("focusin",P),n.modelValue&&(C(),i.value&&e.nextTick(()=>{setTimeout(()=>{const b=document.getElementById(n.id);let L=null;b&&b.parentNode&&(L=b.parentNode.querySelector(".cstu-modal-backdrop")),b&&window.getComputedStyle(b).display==="none"&&(b.style.display="block"),L&&window.getComputedStyle(L).display==="none"&&(L.style.display="block")},50)}))}),e.onBeforeUnmount(()=>{Gx(n.id),document.removeEventListener("keydown",m),document.removeEventListener("focusin",P),i.value&&(i.value=!1,c("update:modelValue",!1))}),o({hide:M,show:C,close:x,toggle:v}),(b,L)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:n.static||n.teleport===!1},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value&&a.backdrop!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${n.id}-backdrop`,class:e.normalizeClass(["cstu-modal-backdrop",a.backdropClass]),style:e.normalizeStyle({zIndex:e.unref(y)-10})},null,14,bC)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:n.id,class:e.normalizeClass(["cstu-modal",[{"cstu-modal-static":n.static,"cstu-modal-scrollable":n.scrollable},n.modalClass]]),tabindex:"-1",role:"dialog","aria-modal":"true",style:e.normalizeStyle({zIndex:e.unref(y)}),"aria-labelledby":!a.hideHeader&&a.title?`modal-title-${n.id}`:void 0,onClick:f,onMousedown:L[5]||(L[5]=e.withModifiers(()=>{},["stop"]))},[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:L[4]||(L[4]=e.withModifiers(A=>A.target===A.currentTarget&&A.stopPropagation(),["stop"]))},[zC,e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-content",a.contentClass,{"cstu-modal-content-fullscreen":a.fullscreen},e.unref(k)]),tabindex:"-1",ref_key:"modalElement",ref:d,"aria-label":a.ariaLabel,onClick:L[3]||(L[3]=A=>A.target===A.currentTarget&&A.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(b.$slots,"modal-header",{},()=>[e.renderSlot(b.$slots,"modal-title",{},()=>[e.createElementVNode("h5",{id:`modal-title-${n.id}`,class:e.normalizeClass([n.titleClass||"cstu-modal-title",{"sr-only":a.titleSrOnly}])},e.toDisplayString(a.title),11,AC)]),a.hideHeaderClose?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,type:"button","aria-label":a.closeTitle,class:"cstu-close",onClick:L[0]||(L[0]=A=>x("headerClose"))},VC,8,BC))])],2)),e.createElementVNode("div",{class:e.normalizeClass(["cstu-modal-body",a.bodyClass,{"cstu-modal-body-scrollable":a.scrollable}])},[e.renderSlot(b.$slots,"default",{},()=>[a.content?(e.openBlock(),e.createElementBlock("div",HC,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(b.$slots,"modal-footer",{},()=>[a.okOnly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J,{key:0,variant:a.cancelVariant,color:a.cancelColor,disabled:a.cancelDisabled||a.busy,onClick:L[1]||(L[1]=A=>x("cancel"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.cancelTitle),1)]),_:1},8,["variant","color","disabled"])),e.createVNode(J,{variant:a.okVariant,color:a.okColor,disabled:a.okDisabled||a.busy,loading:a.busy,onClick:L[2]||(L[2]=A=>x("ok"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.okTitle),1)]),_:1},8,["variant","color","disabled","loading"])])],2))],10,qC),PC],2)],46,SC)):e.createCommentVNode("",!0)]),_:3})],8,["disabled"]))}}),Gb="",jC={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",()=>{Zx.show(c)}),a.tagName!=="BUTTON"&&(a.setAttribute("role","button"),a.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),Zx.show(c))}),a.hasAttribute("tabindex")||a.setAttribute("tabindex","0"))}},DC={install:a=>{a.directive("cstu-modal",jC)}},TC=["primary","secondary","success","warning","info"];function Kx(a,o=TC){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 Jx(a){return!a||typeof a!="string"?"":a.trim().split(" ").slice(0,2).map(o=>o.charAt(0).toUpperCase()).join("")}const EC=["src","alt"],RC=["title"],OC={key:1,"data-avatar-placeholder-icon":"true",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},NC=[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)],Qx=e.defineComponent({__name:"Avatar",props:{size:{default:"md"},radius:{default:"full"},color:{default:"primary"},gradient:null,src:{default:null},alt:null,imageProps:null,children:null,autoContrast:{type:Boolean,default:!0},name:null,allowedInitialsColors:null,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?Jx(o.name):""),i=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}),l=e.computed(()=>pe(o.radius)),d=e.computed(()=>{if(o.src&&!c.value||!n(o.color)&&o.color!=="initials")return"";if(o.color==="initials"&&o.name){const g=Kx(o.name,o.allowedInitialsColors||["primary","secondary","success","warning","info"]);return g?R(g,"filled",{}):R("primary","filled",{})}const y=o.variant==="transparent"?"default":o.variant==="gradient"?"filled":o.variant,p=o.color&&o.color!=="initials"?o.color:"primary",k=R(p,y,{});return o.variant==="transparent"?"bg-transparent":k}),h=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}`:fx(o.variant)),s=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}),u=y=>{var p;c.value=!0,(p=o.imageProps)!=null&&p.onError&&o.imageProps.onError(y)};return(y,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component||"div"),{class:e.normalizeClass(["avatar",e.unref(i),e.unref(l),!c.value&&a.src?"":e.unref(d),!c.value&&a.src?"":e.unref(h),{"avatar--with-image":!c.value&&a.src},{"hover:opacity-80 transition-opacity":a.hover},a.customClasses]),style:e.normalizeStyle(e.unref(s))},{default:e.withCtx(()=>[!c.value&&a.src?(e.openBlock(),e.createElementBlock("img",e.mergeProps({key:0,class:"avatar__image",src:a.src,alt:a.alt},a.imageProps,{onError:u}),null,16,EC)):(e.openBlock(),e.createElementBlock("span",{key:1,class:"avatar__placeholder",title:a.alt},[e.renderSlot(y.$slots,"default",{},()=>[a.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(r)),1)],64)):(e.openBlock(),e.createElementBlock("svg",OC,NC))])],8,RC))]),_:3},8,["class","style"]))}}),Kb="",$C=e.defineComponent({__name:"AvatarGroup",props:{spacing:{default:"sm"},gap:{default:"none"},outlineWidth:{default:"normal"},outlineColor:{default:"white"},outlineOffset:{default:"small"},customClasses:{default:""},max:null,hover:{type:Boolean,default:!1}},setup(a){const o=a,c=e.computed(()=>{if(typeof o.spacing=="number")return`${o.spacing}px`;const s={xs:"-1rem",sm:"-0.75rem",md:"-0.5rem",lg:"-0.25rem",xl:"0"};return s[o.spacing]||s.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 s={none:"0",xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem"};return s[o.gap]||s.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 s={none:"0",thin:"1px",normal:"2px",medium:"3px",thick:"4px"};return s[o.outlineWidth]||s.normal}),i=e.computed(()=>{if(typeof o.outlineOffset=="number")return`${o.outlineOffset}px`;if(typeof o.outlineOffset=="string"&&!isNaN(parseFloat(o.outlineOffset)))return o.outlineOffset;const s={none:"0",inset:"-2px",small:"1px",medium:"2px",large:"3px"};return s[o.outlineOffset]||s.small}),l=e.computed(()=>typeof o.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(o.outlineColor)?`outline-${o.outlineColor}`:""),d=e.computed(()=>typeof o.outlineColor=="string"&&["primary","secondary","success","danger","warning","info","dark","light"].includes(o.outlineColor)?"var(--color-"+o.outlineColor+")":o.outlineColor),h=e.computed(()=>({"--avatar-group-spacing":c.value,"--avatar-group-gap":n.value,"--avatar-group-outline-width":r.value,"--avatar-group-outline-color":d.value,"--avatar-group-outline-offset":i.value}));return(s,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["avatar-group",a.customClasses,e.unref(l),{"avatar-group--hover":a.hover}]),style:e.normalizeStyle(e.unref(h))},[e.renderSlot(s.$slots,"default",{},void 0,!0)],6))}}),Jb="",Yx=Zg($C,[["__scopeId","data-v-f582d4fb"]]);Qx.Group=Yx;const P2=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),i=e.computed(()=>c.variant),l=e.ref(c.value!==void 0?c.value:c.defaultValue);e.watch(()=>c.value,h=>{h!==void 0&&(l.value=h)});const d=h=>{c.value!==void 0?o("change",h):l.value=h};return e.provide("activeTab",l),e.provide("setActiveTab",d),e.provide("tabsOrientation",r),e.provide("tabsPlacement",n),(h,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-tabs",`cstu-tabs-${e.unref(r)}`,`cstu-tabs-placement-${e.unref(n)}`,`cstu-tabs-variant-${e.unref(i)}`])},[e.renderSlot(h.$slots,"default")],2))}}),Qb="",_x=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":""]),i=d=>{if(["space-between","space-around","space-evenly"].includes(d))return d;switch(d){case"flex-start":return"flex-start";case"flex-end":return"flex-end";case"center":return"center";default:return"flex-start"}},l=e.computed(()=>c.value==="horizontal"?{justifyContent:o.justify}:{justifyContent:i(o.justify)});return(d,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r)),style:e.normalizeStyle(e.unref(l))},[e.renderSlot(d.$slots,"default")],6))}}),Yb="",eI=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")),i=e.inject("tabsPlacement",e.ref("top")),l=e.computed(()=>c.value),d=e.computed(()=>r.value),h=e.computed(()=>i.value),s=e.computed(()=>l.value===o.value),u=e.computed(()=>d.value==="vertical"),y=e.computed(()=>o.fullWidth&&d.value==="horizontal"),p=()=>{!o.disabled&&!o.loading&&n(o.value)};return(k,g)=>(e.openBlock(),e.createBlock(e.unref(J),{class:e.normalizeClass(["tabs-tab",e.unref(s)?"tabs-tab-active":"tabs-tab-inactive",`tabs-tab-${o.variant}`,o.color?`tabs-tab-color-${o.color}`:"",`tabs-tab-orientation-${e.unref(d)}`,`tabs-tab-placement-${e.unref(h)}`,{"tabs-tab-full-width":e.unref(y)}]),disabled:o.disabled,loading:o.loading,color:e.unref(s)?o.color:"secondary",variant:e.unref(s)?o.variant:"subtle",size:o.size,radius:o.variant==="text"?"none":o.radius,"full-width":e.unref(u),onClick:p},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"]))}}),_b="",tI=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")),i=e.computed(()=>c.value===o.value),l=e.computed(()=>["tabs-panel",i.value?"tabs-panel-active":"tabs-panel-inactive",`tabs-panel-${n.value}`,`tabs-panel-placement-${r.value}`]);return(d,h)=>a.KeepAlive||e.unref(i)?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l))},[e.renderSlot(d.$slots,"default")],2)),[[e.vShow,e.unref(i)]]):e.createCommentVNode("",!0)}}),eS="";P2.List=_x,P2.Tab=eI,P2.Panel=tI;const UC=e.createElementVNode("span",{class:"cstu-sr-only"},"First page",-1),ZC=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),WC=e.createElementVNode("span",{class:"cstu-sr-only"},"Previous page",-1),GC=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),XC={key:2,class:"cstu-flex cstu-items-center cstu-gap-2"},KC=[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)],JC=e.createElementVNode("span",{class:"cstu-sr-only"},"Next page",-1),QC=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),YC=e.createElementVNode("span",{class:"cstu-sr-only"},"Last page",-1),_C=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),ev=e.defineComponent({__name:"Pagination",props:{modelValue:{default:1},total:null,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:null},emits:["update:modelValue"],setup(a,{emit:o}){const c=a,n=e.ref(c.modelValue);e.watch(()=>c.modelValue,p=>{n.value=p});const r=e.computed(()=>n.value===1),i=e.computed(()=>n.value===c.total),l=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"}}),d=e.computed(()=>["cstu-flex cstu-items-center cstu-justify-center",u(c.size)]),h=e.computed(()=>{const p=[],k=c.total;if(c.siblings*2+3+c.boundaries*2>=k)return Array.from({length:k},(m,I)=>I+1);const C=Math.max(n.value-c.siblings,c.boundaries+1),M=Math.min(n.value+c.siblings,k-c.boundaries),v=C>c.boundaries+2,x=M<k-(c.boundaries+1),f=new Set;for(let m=1;m<=c.boundaries;m++)p.push(m),f.add(m);if(v)p.push("dots");else if(!v&&C>c.boundaries)for(let m=c.boundaries+1;m<C;m++)f.has(m)||(p.push(m),f.add(m));for(let m=C;m<=M;m++)f.has(m)||(p.push(m),f.add(m));if(x)p.push("dots");else if(!x&&M<k-c.boundaries)for(let m=M+1;m<k-c.boundaries+1;m++)f.has(m)||(p.push(m),f.add(m));for(let m=k-c.boundaries+1;m<=k;m++)f.has(m)||(p.push(m),f.add(m));return p}),s=p=>{p<1||p>c.total||c.disabled||(n.value=p,o("update:modelValue",p))};function u(p){const k={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 k[p]||k.md}const y=e.computed(()=>c.variant==="filled"?"subtle":"bordered-transparent");return(p,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-items-center cstu-gap-2",[c.class]])},[c.withEdges?(e.openBlock(),e.createBlock(J,{key:0,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(r)||c.disabled,onClick:k[0]||(k[0]=g=>s(1)),"aria-label":"Go to first page",class:e.normalizeClass(e.unref(l))},{default:e.withCtx(()=>[UC,ZC]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withControls?(e.openBlock(),e.createBlock(J,{key:1,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(r)||c.disabled,onClick:k[1]||(k[1]=g=>s(n.value-1)),"aria-label":"Go to previous page",class:e.normalizeClass(e.unref(l))},{default:e.withCtx(()=>[WC,GC]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withPages?(e.openBlock(),e.createElementBlock("div",XC,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(h),(g,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:C},[g!=="dots"?(e.openBlock(),e.createBlock(J,{key:0,variant:g===n.value?"filled":e.unref(y),color:g===n.value?c.color:"light",size:c.size,disabled:c.disabled,onClick:M=>s(Number(g)),"aria-current":g===n.value?"page":void 0,"aria-label":`Page ${g}`,class:e.normalizeClass(e.unref(l))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g),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",[e.unref(d),e.unref(l)]])},KC,2))],64))),128))])):e.createCommentVNode("",!0),c.withControls?(e.openBlock(),e.createBlock(J,{key:3,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(i)||c.disabled,onClick:k[2]||(k[2]=g=>s(n.value+1)),"aria-label":"Go to next page",class:e.normalizeClass(e.unref(l))},{default:e.withCtx(()=>[JC,QC]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0),c.withEdges?(e.openBlock(),e.createBlock(J,{key:4,variant:e.unref(y),color:"light",size:c.size,disabled:e.unref(i)||c.disabled,onClick:k[3]||(k[3]=g=>s(c.total)),"aria-label":"Go to last page",class:e.normalizeClass(e.unref(l))},{default:e.withCtx(()=>[YC,_C]),_:1},8,["variant","size","disabled","class"])):e.createCommentVNode("",!0)],2))}}),aI={mounted(a,o){a._clickOutside=c=>{const n=c.target;if(!(a===n||a.contains(n))){const r=c.target,i=r.tagName&&r.tagName.toLowerCase()==="input",l=r.closest(".cstu-dropdown-menu");!i&&!l&&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))}},tv=["id","aria-labelledby","aria-modal","onKeydown"],av={class:"cstu-popover-inner"},ov=["id"],cv=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:null},emits:["update:open","open","close"],setup(a,{emit:o}){const c=a,n=e.ref(c.defaultOpen),r=e.ref(null),i=e.ref(null),l=e.ref(null),d=e.ref(null),h=e.ref(c.zIndex);c.open!==void 0&&(n.value=c.open);const s=e.computed(()=>{if(c.placement!=="auto")return c.placement}),u=e.computed(()=>{const w=[q2(c.offsetDistance)];return l.value&&w.push(Ex({element:l})),c.placement==="auto"?w.push(Tx({padding:8})):w.push(B2({fallbackPlacements:["top","bottom","left","right"],padding:8})),w.push(A2({padding:8})),w}),{floatingStyles:y,update:p}=V2(r,i,{placement:s,middleware:u,whileElementsMounted:Dx}),k=w=>{c.disabled||(c.trigger==="click"||c.trigger==="manual")&&z()},g=()=>{c.disabled||c.trigger==="hover"&&m()},C=()=>{c.disabled||c.trigger==="hover"&&setTimeout(()=>{I("hover")},100)},M=w=>{c.closeOnClick&&I("popoverClick"),w.stopPropagation()},v=w=>{c.closeOnClickOutside&&n.value&&i.value&&!i.value.contains(w.target)&&r.value&&!r.value.contains(w.target)&&I("clickAway")},x=()=>{c.closeOnClickOutside&&I("backdrop")},f=w=>{c.closeOnEscape&&w.key==="Escape"&&(w.preventDefault(),I("escape"))},m=()=>{c.disabled||n.value||(d.value=document.activeElement,n.value=!0,e.nextTick(()=>{p(),c.trapFocus&&P()}),o("open"),o("update:open",!0))},I=(w="programmatic")=>{n.value&&(n.value=!1,c.trapFocus&&D(d.value),o("close",w),o("update:open",!1))},z=()=>{n.value?I():m()},P=()=>{if(!i.value)return;const w=b(i.value);w.length>0?w[0].focus():i.value.focus()},D=w=>{w&&typeof w.focus=="function"&&w.focus()},b=w=>Array.from(w.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')).filter(q=>!q.hasAttribute("disabled")&&!q.getAttribute("aria-hidden")),L=w=>{if(!n.value||!c.trapFocus||!i.value)return;const q=w.target;i.value.contains(q)||(w.preventDefault(),P())};e.watch(()=>c.open,w=>{w!==n.value&&(w?m():I())}),e.watch(r,w=>{w&&p()}),e.onMounted(()=>{document.addEventListener("keydown",f),c.trapFocus&&document.addEventListener("focusin",L)}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",f),c.trapFocus&&document.removeEventListener("focusin",L)});const A=e.computed(()=>[pe(c.radius),!c.variant||c.variant==="shadow"?c.shadow?`cstu-shadow-${c.shadow}`:"cstu-shadow-md":"",c.popoverClass]),E=e.computed(()=>{const w=[...A.value.filter(Boolean)];let q=!1;const O=c.color;if(O&&G(O)&&c.variant==="color"){const j=R(O,"filled",{disabled:c.disabled});typeof j=="string"&&j.trim()&&(w.push(...j.split(" ").filter(Boolean)),q=!0)}return q||(w.push("cstu-bg-white"),c.variant==="outline"&&w.push("cstu-border","cstu-border-gray-300"),w.push("cstu-text-gray-700")),w.filter(Boolean).map(j=>typeof j=="string"?j:Object.keys(j).filter(o2=>j[o2]).join(" ")).join(" ")}),$=e.computed(()=>{const w={width:typeof c.width=="number"?`${c.width}px`:c.width},q=c.color;if(q&&!G(q)&&c.variant==="color"){w.backgroundColor=q;const O=F(q);w.color=O>128?"#000000":"#FFFFFF"}return{...y.value,...w}});e.computed(()=>{const w={backgroundColor:"white"},q=c.color;return c.variant==="color"&&q?G(q)?(w.borderWidth="1px",w.borderStyle="solid",w.borderColor=`var(--${q}-500)`):w.backgroundColor=q:c.variant==="outline"&&(w.borderWidth="1px",w.borderStyle="solid",w.borderColor="#e2e8f0"),w});function F(w){if(w.startsWith("#"))try{const q=parseInt(w.substring(1,3),16),O=parseInt(w.substring(3,5),16),j=parseInt(w.substring(5,7),16);return(q*299+O*587+j*114)/1e3}catch{return 128}else if(w.startsWith("rgb"))try{const q=w.match(/\d+/g);if(q&&q.length>=3){const O=parseInt(q[0],10),j=parseInt(q[1],10),o2=parseInt(q[2],10);return(O*299+j*587+o2*114)/1e3}}catch{return 128}return 128}const X=e.computed(()=>{const w=c.color,q=!(w&&G(w)),O=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"],we(c.size||"md"),"cstu-flex cstu-items-center cstu-justify-between",O||q?"cstu-border-b cstu-border-gray-200 dark:cstu-border-gray-700":"",c.headerClass].filter(Boolean).join(" ")}),K=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"],we(c.size||"sm"),c.bodyClass].filter(Boolean).join(" ")),W=e.computed(()=>{const w=c.color,q=!(w&&G(w)),O=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"],O||q?"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(w,q)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"triggerRef",ref:r,class:e.normalizeClass(["cstu-inline-block cstu-popover-trigger",{"cstu-cursor-not-allowed cstu-opacity-70":a.disabled}]),onClick:k,onMouseenter:g,onMouseleave:C},[e.renderSlot(w.$slots,"trigger")],34),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade",appear:""},{default:e.withCtx(()=>[n.value&&a.backdrop!==!1?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-popover-backdrop",{"cstu-bg-black/50":a.backdrop===!0,"cstu-bg-transparent":a.backdrop==="transparent"}]),style:e.normalizeStyle({zIndex:a.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(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"cstu-popover-container",style:e.normalizeStyle({zIndex:h.value})},[e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"popoverRef",ref:i,id:c.id,class:e.normalizeClass(e.unref(E)),style:e.normalizeStyle([e.unref(y),e.unref($)]),role:"dialog","aria-labelledby":c.title?`${c.id}-title`:void 0,"aria-modal":c.trapFocus,tabindex:"-1",onClick:M,onKeydown:e.withKeys(f,["esc"])},[e.createElementVNode("div",av,[c.hideHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(X))},[e.renderSlot(w.$slots,"header",{},()=>[e.createElementVNode("h3",{id:`${c.id}-title`,class:e.normalizeClass(["cstu-popover-title cstu-font-medium",e.unref(we)(c.size||"md")])},e.toDisplayString(c.title),11,ov),c.showCloseIcon?(e.openBlock(),e.createBlock(J,{key:0,icon:"X",variant:"text",size:"xs",color:c.color&&e.unref(G)(c.color)?"white":"gray",class:"cstu-ml-auto","aria-label":"Close popover",onClick:q[0]||(q[0]=e.withModifiers(O=>I("headerClose"),["stop"]))},null,8,["color"])):e.createCommentVNode("",!0)])],2)),e.createElementVNode("div",{class:e.normalizeClass(e.unref(K))},[e.renderSlot(w.$slots,"default",{},()=>[a.content?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(we)(c.size||"sm"))},e.toDisplayString(a.content),3)):e.createCommentVNode("",!0)])],2),c.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(W))},[e.renderSlot(w.$slots,"footer",{},()=>[e.createVNode(J,{size:"sm",variant:"subtle",onClick:q[1]||(q[1]=O=>I("cancel"))},{default:e.withCtx(()=>[e.createTextVNode(" Close ")]),_:1})])],2))])],46,tv)),[[e.unref(aI),v]])],4)):e.createCommentVNode("",!0)]),_:3})]))],64))}}),aS="",nv=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:null,separatorClass:null,activeClass:null},setup(a){const o=a,c=e.useSlots(),n=e.computed(()=>!!c.default),r=e.computed(()=>c.default?c.default():[]),i=y=>y===r.value.length-1,l=y=>y?["primary","secondary","success","warning","danger","info","dark","light"].includes(y):!0,d=y=>{if(!i(y)||!o.highlightActive)return"";if(l(o.color)){const p=Q[o.color];if(p)return`cstu-text-${p.base}-${p.main}`}return""},h=y=>!i(y)||!o.highlightActive?{}:l(o.color)?{}:{color:o.color},s=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}),u=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,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-breadcrumbs",o.class])},[e.unref(n)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(e.unref(r),(k,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g},[e.createElementVNode("div",{class:e.normalizeClass(["cstu-breadcrumb-item",e.unref(s),i(g)?"cstu-breadcrumb-active":"cstu-breadcrumb-inactive",i(g)?o.activeClass:"",i(g)&&o.highlightActive?d(g):""]),style:e.normalizeStyle(h(g))},[e.renderSlot(y.$slots,`item-${g}`,{isActive:i(g)},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k)))])],6),i(g)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["cstu-breadcrumb-separator",e.unref(u),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))}}),oS="",rv={key:0,class:"cstu-flex cstu-justify-between cstu-items-center cstu-mb-1"},iv=["for"],dv={key:0,class:"cstu-text-red-500 cstu-ml-1"},lv={key:0,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px] cstu-mt-1"},sv=["id","value","placeholder","disabled","required","readonly","rows","maxlength"],hv={key:1,class:"cstu-flex cstu-items-center cstu-justify-center cstu-w-[15px] cstu-h-[15px] cstu-mt-1"},yv=e.defineComponent({__name:"Textarea",props:{id:null,modelValue:null,placeholder:null,disabled:{type:Boolean},readonly:{type:Boolean},label:null,labelProps:null,description:null,descriptionProps:null,error:null,errorProps:null,hasError:{type:Boolean},showBothErrorAndDescription:{type:Boolean},textareaProps:null,size:null,radius:null,variant:null,required:{type:Boolean},withAsterisk:{type:Boolean},rows:null,resize:null,fullWidth:{type:Boolean},color:null,class:null,inputClass:null,maxLength:null},emits:["update:modelValue","focus","blur","change"],setup(a,{expose:o,emit:c}){const{id:n,modelValue:r,placeholder:i,label:l,description:d,error:h,hasError:s=!1,disabled:u=!1,readonly:y=!1,required:p=!1,withAsterisk:k=!1,showBothErrorAndDescription:g=!1,textareaProps:C,labelProps:M,descriptionProps:v,errorProps:x,size:f="md",variant:m="default",radius:I="md",color:z="primary",class:P,fullWidth:D=!1,inputClass:b="",rows:L=3,resize:A="none",maxLength:E=void 0}=a,$=`textarea-${Math.random().toString(36).substring(2,11)}`,F=e.ref(null),X={xs:{inputClass:`cstu-min-h-8 ${D?"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 ${D?"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 ${D?"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 ${D?"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 ${D?"cstu-w-full":"cstu-max-w-[20.5rem]"}`,labelSize:"cstu-text-base cstu-font-medium",descriptionSize:"cstu-text-sm"}},K=e.computed(()=>`${X[f].inputClass.split(" ")[0]} cstu-transition-all cstu-duration-300`),W=e.computed(()=>X[f].labelSize),w=e.computed(()=>X[f].descriptionSize),q=e.computed(()=>{switch(f){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"}}),O=e.computed(()=>pe(I)),j=e.computed(()=>h!==void 0&&h!==""||s),o2=e.computed(()=>m==="unstyled"||!G(z)&&!j.value?"":j.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":m==="default"||m==="outline"?`cstu-border-${z}-500 hover:cstu-border-${z}-600 focus-within:cstu-border-${z}-500 focus-within:cstu-ring-1 focus-within:cstu-ring-${z}-500`:m==="filled"?`cstu-bg-${z}-50 hover:cstu-bg-${z}-100`:m==="light"?`cstu-bg-${z}-50 cstu-text-${z}-500 hover:cstu-bg-${z}-100`:m==="subtle"?`cstu-text-${z}-500 hover:cstu-bg-${z}-50`:""),mx=e.computed(()=>m==="unstyled"?{}:G(z)||j.value?{}:m==="default"||m==="outline"?{"--border-color":z,"border-color":"var(--border-color)"}:m==="filled"?{"--bg-color":`${z}10`,"background-color":"var(--bg-color)"}:m==="light"?{"--bg-color":`${z}10`,"--text-color":z,"background-color":"var(--bg-color)",color:"var(--text-color)"}:m==="subtle"?{"--text-color":z,color:"var(--text-color)"}:{}),V=e.computed(()=>{const H={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(m==="unstyled")return[H[m]];const ye=j.value?"":m==="default"||m==="outline"?"cstu-border-gray-300/45":"",y2=j.value?"cstu-border-red-500":"";return[H[m],ye,y2,j.value?"hover:cstu-border-red-500":"hover:cstu-border-blue-450",j.value?"focus-within:cstu-border-red-500 focus-within:cstu-ring-1 focus-within:cstu-ring-red-500":"focus-within:cstu-border-blue-450 focus-within:cstu-ring-1 focus-within:cstu-ring-blue-450"]}),ee=e.ref(!1),xe=H=>{ee.value=!0,c("focus",H)},Sb=H=>{ee.value=!1,c("blur",H)},zb=H=>{c("change",H)};return o({textarea:F,focus:()=>{var H;return(H=F.value)==null?void 0:H.focus()},blur:()=>{var H;return(H=F.value)==null?void 0:H.blur()},select:()=>{var H;return(H=F.value)==null?void 0:H.select()},setSelectionRange:(H,ye)=>{var y2;return(y2=F.value)==null?void 0:y2.setSelectionRange(H,ye)},setRangeText:H=>{var ye;return(ye=F.value)==null?void 0:ye.setRangeText(H)},get value(){var H;return(H=F.value)==null?void 0:H.value},set value(H){F.value&&H!==void 0&&(F.value.value=H)}}),(H,ye)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cstu-flex cstu-flex-col cstu-transition-all cstu-duration-300",[H.customClass,a.fullWidth?"cstu-w-full":"cstu-max-w-[20.5rem]"]])},[a.label||H.$slots.label?(e.openBlock(),e.createElementBlock("div",rv,[e.createElementVNode("label",e.mergeProps({for:a.id||$,class:["cstu-flex cstu-items-center",e.unref(W)]},a.labelProps),[e.renderSlot(H.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(a.label)+" ",1),a.withAsterisk||a.required?(e.openBlock(),e.createElementBlock("span",dv,"*")):e.createCommentVNode("",!0)])],16,iv),e.renderSlot(H.$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",e.unref(K),e.unref(O),e.unref(V),e.unref(o2),{"cstu-opacity-50 cstu-pointer-events-none cstu-cursor-not-allowed":a.disabled}]),style:e.normalizeStyle(e.unref(mx))},[H.$slots.leftSection?(e.openBlock(),e.createElementBlock("div",lv,[e.renderSlot(H.$slots,"leftSection")])):e.createCommentVNode("",!0),e.createElementVNode("textarea",e.mergeProps({ref_key:"textareaRef",ref:F,id:a.id||$,value:a.modelValue,placeholder:a.placeholder,disabled:a.disabled,required:a.required,readonly:a.readonly,rows:a.rows,maxlength:a.maxLength,class:["cstu-flex-1 cstu-bg-transparent cstu-outline-none cstu-w-full",e.unref(q),a.inputClass,{"cstu-text-gray-500":a.modelValue,"cstu-text-red-500":e.unref(j)&&!a.modelValue}],style:{resize:a.resize},onInput:ye[0]||(ye[0]=y2=>H.$emit("update:modelValue",y2.target.value)),onFocus:xe,onBlur:Sb,onChange:zb},a.textareaProps),null,16,sv),H.$slots.rightSection?(e.openBlock(),e.createElementBlock("div",hv,[e.renderSlot(H.$slots,"rightSection")])):e.createCommentVNode("",!0)],6)]),a.description&&!e.unref(j)||H.$slots.description&&!e.unref(j)||a.showBothErrorAndDescription&&a.description||a.showBothErrorAndDescription&&H.$slots.description?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1,class:"cstu-mt-1"},a.descriptionProps),[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-gray-500",e.unref(w)])},[e.renderSlot(H.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(a.description),1)])],2)],16)):e.createCommentVNode("",!0),e.unref(j)&&a.error||e.unref(j)&&H.$slots.error||a.showBothErrorAndDescription&&a.error||a.showBothErrorAndDescription&&H.$slots.error?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:2,class:"cstu-mt-1"},a.errorProps),[e.createElementVNode("p",{class:e.normalizeClass(["cstu-text-red-500",e.unref(w)])},[e.renderSlot(H.$slots,"error",{},()=>[e.createTextVNode(e.toDisplayString(a.error),1)])],2)],16)):e.createCommentVNode("",!0)],2))}});/**
|
|
13
13
|
* @license lucide-vue-next v0.468.0 - ISC
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the ISC license.
|