vue-tui-components
Version:
TUI-styled Vue3 components with Pip-Boy aesthetics - retro terminal UI components for Vue 3
1 lines • 67.3 kB
JavaScript
(function(b,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(b=typeof globalThis<"u"?globalThis:b||self,e(b.VueTuiComponents={},b.Vue))})(this,function(b,e){"use strict";const N=(t,i)=>{const l=t.__vccOpts||t;for(const[a,n]of i)l[a]=n;return l},ye=["aria-label"],ge=["src","alt"],ke={key:1,class:"avatar-initials"},he={key:2,class:"avatar-icon"},be={key:3,class:"avatar-placeholder"},Be=["aria-label"],P=N({__name:"TuiAvatar",props:{src:{type:String,default:""},alt:{type:String,default:"Avatar"},initials:{type:String,default:""},icon:{type:String,default:""},size:{type:String,default:"medium",validator:t=>["small","medium","large","xlarge"].includes(t)},shape:{type:String,default:"circle",validator:t=>["circle","square"].includes(t)},status:{type:String,default:"",validator:t=>!t||["online","offline","away","busy"].includes(t)}},setup(t){const i=t,l=e.ref(!1),a=e.computed(()=>i.initials?i.initials.slice(0,2).toUpperCase():""),n=e.computed(()=>i.alt!=="Avatar"?i.alt:i.initials?`Avatar: ${i.initials}`:i.icon?`Avatar with icon: ${i.icon}`:"Avatar"),o=()=>{l.value=!0};return(u,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tui-avatar",[t.size,t.shape,{"has-status":t.status}]]),"aria-label":n.value},[t.src?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.src,alt:t.alt,class:"avatar-image",onError:o},null,40,ge)):t.initials?(e.openBlock(),e.createElementBlock("span",ke,e.toDisplayString(a.value),1)):t.icon?(e.openBlock(),e.createElementBlock("span",he,e.toDisplayString(t.icon),1)):(e.openBlock(),e.createElementBlock("span",be,"?")),t.status?(e.openBlock(),e.createElementBlock("span",{key:4,class:e.normalizeClass(["avatar-status",t.status]),"aria-label":`Status: ${t.status}`},null,10,Be)):e.createCommentVNode("",!0)],10,ye))}},[["__scopeId","data-v-84d07ae3"]]),Ee=["aria-label"],Ve={key:0,class:"badge-content"},$e={key:0},Ne={key:1},Y=N({__name:"TuiBadge",props:{content:{type:[String,Number],default:""},variant:{type:String,default:"primary",validator:t=>["primary","secondary","success","error","warning","info"].includes(t)},size:{type:String,default:"medium",validator:t=>["small","medium","large"].includes(t)},placement:{type:String,default:"top-right",validator:t=>["top-right","top-left","bottom-right","bottom-left"].includes(t)},max:{type:Number,default:99},dot:{type:Boolean,default:!1},icon:{type:String,default:""},visible:{type:Boolean,default:!0}},setup(t){const i=t,l=e.useSlots(),a=e.computed(()=>!!l.default),n=e.computed(()=>typeof i.content=="number"&&i.content>i.max?`${i.max}+`:i.content),o=e.computed(()=>i.dot?"Notification indicator":i.icon?`Badge with icon: ${i.icon}`:`Badge: ${n.value}`);return(u,r)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["tui-badge-wrapper",{standalone:!a.value}])},[e.renderSlot(u.$slots,"default",{},void 0,!0),t.visible?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["tui-badge",[t.variant,t.size,t.placement,{dot:t.dot}]]),"aria-label":o.value},[t.dot?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Ve,[t.icon?(e.openBlock(),e.createElementBlock("span",$e,e.toDisplayString(t.icon),1)):t.content?(e.openBlock(),e.createElementBlock("span",Ne,e.toDisplayString(n.value),1)):e.createCommentVNode("",!0)]))],10,Ee)):e.createCommentVNode("",!0)],2))}},[["__scopeId","data-v-bd1fb1e4"]]),Se={class:"banner-content"},Te={key:0,class:"banner-icon"},we={class:"banner-message"},Ce={key:0,class:"banner-title"},_e={class:"banner-text"},De={class:"banner-actions"},Ie=["href"],K=N({__name:"TuiBanner",props:{message:{type:String,required:!0},title:{type:String,default:""},variant:{type:String,default:"info",validator:t=>["primary","success","error","warning","info"].includes(t)},icon:{type:String,default:""},dismissible:{type:Boolean,default:!0},linkText:{type:String,default:""},linkUrl:{type:String,default:""},modelValue:{type:Boolean,default:!0}},emits:["update:modelValue","dismiss","link-click"],setup(t,{emit:i}){const l=t,a=i,n=e.ref(l.modelValue),o=()=>{n.value=!1,a("update:modelValue",!1),a("dismiss")},u=r=>{a("link-click",r)};return(r,c)=>(e.openBlock(),e.createBlock(e.Transition,{name:"banner-slide"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["tui-banner",t.variant]),role:"banner"},[e.createElementVNode("div",Se,[t.icon?(e.openBlock(),e.createElementBlock("span",Te,e.toDisplayString(t.icon),1)):e.createCommentVNode("",!0),e.createElementVNode("div",we,[t.title?(e.openBlock(),e.createElementBlock("strong",Ce,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.createElementVNode("span",_e,e.toDisplayString(t.message),1)])]),e.createElementVNode("div",De,[e.renderSlot(r.$slots,"actions",{},()=>[t.linkText&&t.linkUrl?(e.openBlock(),e.createElementBlock("a",{key:0,href:t.linkUrl,class:"banner-link",onClick:u},e.toDisplayString(t.linkText),9,Ie)):e.createCommentVNode("",!0)],!0),t.dismissible?(e.openBlock(),e.createElementBlock("button",{key:0,class:"banner-close",type:"button",onClick:o,"aria-label":"Dismiss banner"}," ✕ ")):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0)]),_:3}))}},[["__scopeId","data-v-c1d3534c"]]),xe=["disabled"],Me={class:"button-text"},L=N({__name:"TuiButton",props:{label:{type:String,required:!0},variant:{type:String,default:"primary",validator:t=>["primary","warning","info","success","secondary","danger"].includes(t)},disabled:{type:Boolean,default:!1},pulse:{type:Boolean,default:!1}},emits:["click"],setup(t){return(i,l)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["tui-button",[t.variant,{disabled:t.disabled,pulse:t.pulse}]]),disabled:t.disabled,onClick:l[0]||(l[0]=a=>i.$emit("click",a))},[l[1]||(l[1]=e.createElementVNode("span",{class:"button-brackets"},"[",-1)),e.createElementVNode("span",Me,e.toDisplayString(t.label),1),l[2]||(l[2]=e.createElementVNode("span",{class:"button-brackets"},"]",-1))],10,xe))}},[["__scopeId","data-v-9ad134c2"]]),ze={key:0,class:"card-header"},Ae={key:0,class:"card-title"},Le=["title","aria-expanded","aria-label"],Re=["aria-hidden"],Fe={class:"card-body"},Oe={key:0,class:"card-footer"},U=N({__name:"TuiCard",props:{title:{type:String,default:""},glowing:{type:Boolean,default:!1},fadeIn:{type:Boolean,default:!1},slideIn:{type:Boolean,default:!1},animationDelay:{type:Number,default:0},animationDuration:{type:Number,default:500},minimizable:{type:Boolean,default:!1}},setup(t){const i=t,l=e.useSlots(),a=e.computed(()=>{var c;const r=(c=l.footer)==null?void 0:c.call(l);return Array.isArray(r)?r.length>0:!!r}),n=e.ref(!1),o=()=>{n.value=!n.value},u=e.computed(()=>!i.fadeIn&&!i.slideIn?{}:{animationDelay:`${i.animationDelay}ms`,animationDuration:`${i.animationDuration}ms`});return(r,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tui-card",{glowing:t.glowing,"animate-fade-in":t.fadeIn,"animate-slide-in":t.slideIn,minimized:n.value}]),style:e.normalizeStyle(u.value)},[t.title||t.minimizable?(e.openBlock(),e.createElementBlock("div",ze,[t.title?(e.openBlock(),e.createElementBlock("h3",Ae,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.minimizable?(e.openBlock(),e.createElementBlock("button",{key:1,class:"minimize-button",type:"button",onClick:o,title:n.value?"Expand":"Minimize","aria-expanded":(!n.value).toString(),"aria-label":n.value?"Expand card":"Minimize card"},e.toDisplayString(n.value?"▼":"▲"),9,Le)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["card-content",{collapsed:n.value}]),"aria-hidden":n.value?"true":"false"},[e.createElementVNode("div",Fe,[e.renderSlot(r.$slots,"default",{},void 0,!0)]),a.value?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(r.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],10,Re)],6))}},[["__scopeId","data-v-d497e929"]]),qe={class:"tui-carousel"},Pe={class:"carousel-container"},Ye=["disabled"],Ke={class:"carousel-viewport"},Ue={class:"carousel-track"},He=["src","alt"],je={key:1,class:"carousel-caption"},Ge=["disabled"],We={key:0,class:"carousel-indicators"},Xe=["onClick","aria-label","aria-current"],H=N({__name:"TuiCarousel",props:{items:{type:Array,required:!0},autoplay:{type:Boolean,default:!1},interval:{type:Number,default:3e3},loop:{type:Boolean,default:!0},showControls:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},transition:{type:String,default:"slide",validator:t=>["slide","fade"].includes(t)}},emits:["change"],setup(t,{emit:i}){const l=t,a=i,n=e.ref(0),o=e.ref("next");let u=null;const r=e.computed(()=>l.transition==="fade"?"carousel-fade":o.value==="next"?"carousel-slide-next":"carousel-slide-prev"),c=()=>{n.value<l.items.length-1?(o.value="next",n.value++,a("change",n.value)):l.loop&&(o.value="next",n.value=0,a("change",n.value))},f=()=>{n.value>0?(o.value="prev",n.value--,a("change",n.value)):l.loop&&(o.value="prev",n.value=l.items.length-1,a("change",n.value))},y=s=>{o.value=s>n.value?"next":"prev",n.value=s,a("change",n.value)},d=()=>{l.autoplay&&(u=setInterval(()=>{c()},l.interval))},p=()=>{u&&(clearInterval(u),u=null)};return e.onMounted(()=>{d()}),e.onUnmounted(()=>{p()}),(s,m)=>(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("div",Pe,[t.showControls?(e.openBlock(),e.createElementBlock("button",{key:0,class:"carousel-control prev",onClick:f,"aria-label":"Previous slide",disabled:n.value===0&&!t.loop}," ◄ ",8,Ye)):e.createCommentVNode("",!0),e.createElementVNode("div",Ke,[e.createElementVNode("div",Ue,[e.createVNode(e.Transition,{name:r.value,mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{key:n.value,class:"carousel-slide"},[e.renderSlot(s.$slots,"default",{item:t.items[n.value],index:n.value},()=>[t.items[n.value].image?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.items[n.value].image,alt:t.items[n.value].caption||"",class:"carousel-image"},null,8,He)):e.createCommentVNode("",!0),t.items[n.value].caption?(e.openBlock(),e.createElementBlock("div",je,e.toDisplayString(t.items[n.value].caption),1)):e.createCommentVNode("",!0)],!0)]))]),_:3},8,["name"])])]),t.showControls?(e.openBlock(),e.createElementBlock("button",{key:1,class:"carousel-control next",onClick:c,"aria-label":"Next slide",disabled:n.value===t.items.length-1&&!t.loop}," ► ",8,Ge)):e.createCommentVNode("",!0)]),t.showIndicators?(e.openBlock(),e.createElementBlock("div",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(g,S)=>(e.openBlock(),e.createElementBlock("button",{key:S,class:e.normalizeClass(["indicator",{active:S===n.value}]),onClick:h=>y(S),"aria-label":`Go to slide ${S+1}`,"aria-current":S===n.value}," ■ ",10,Xe))),128))])):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-27747afa"]]),Je={class:"tui-checkbox"},Qe=["checked"],Ze={class:"checkbox-box"},ve={key:0,class:"checkbox-check"},et={key:1,class:"checkbox-empty"},tt={class:"checkbox-label"},j=N({__name:"TuiCheckbox",props:{modelValue:{type:Boolean,default:!1},label:{type:String,required:!0}},emits:["update:modelValue"],setup(t){return(i,l)=>(e.openBlock(),e.createElementBlock("label",Je,[e.createElementVNode("input",{type:"checkbox",checked:t.modelValue,onChange:l[0]||(l[0]=a=>i.$emit("update:modelValue",a.target.checked)),class:"checkbox-input"},null,40,Qe),e.createElementVNode("span",Ze,[t.modelValue?(e.openBlock(),e.createElementBlock("span",ve,"✓")):(e.openBlock(),e.createElementBlock("span",et,"[ ]"))]),e.createElementVNode("span",tt,e.toDisplayString(t.label),1)]))}},[["__scopeId","data-v-7e8d4e28"]]),at={key:0,class:"chip-icon"},lt={key:1,class:"chip-avatar"},nt=["src","alt"],ot={key:1},st={class:"chip-label"},G=N({__name:"TuiChip",props:{label:{type:String,required:!0},variant:{type:String,default:"primary",validator:t=>["primary","secondary","success","error","warning","info"].includes(t)},size:{type:String,default:"medium",validator:t=>["small","medium","large"].includes(t)},closable:{type:Boolean,default:!1},icon:{type:String,default:""},avatar:{type:Boolean,default:!1},avatarSrc:{type:String,default:""},avatarText:{type:String,default:""}},emits:["close"],setup(t,{emit:i}){const l=i,a=n=>{n.stopPropagation(),l("close")};return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tui-chip",[t.variant,t.size,{closable:t.closable}]])},[t.icon?(e.openBlock(),e.createElementBlock("span",at,e.toDisplayString(t.icon),1)):e.createCommentVNode("",!0),t.avatar?(e.openBlock(),e.createElementBlock("span",lt,[t.avatarSrc?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.avatarSrc,alt:t.label},null,8,nt)):(e.openBlock(),e.createElementBlock("span",ot,e.toDisplayString(t.avatarText),1))])):e.createCommentVNode("",!0),e.createElementVNode("span",st,e.toDisplayString(t.label),1),t.closable?(e.openBlock(),e.createElementBlock("button",{key:2,class:"chip-close",type:"button",onClick:a,"aria-label":"Remove chip"}," ✕ ")):e.createCommentVNode("",!0)],2))}},[["__scopeId","data-v-87d00535"]]),it={class:"tui-datepicker"},rt={key:0,class:"datepicker-label"},ct={class:"datepicker-input-wrapper"},dt=["placeholder"],mt={class:"datepicker-header"},ut={class:"current-month"},pt={class:"datepicker-calendar"},ft={class:"calendar-weekdays"},yt={class:"calendar-days"},gt=["disabled","onClick"],W=N({__name:"TuiDatepicker",props:{modelValue:{type:[Date,Array,null],default:null},label:{type:String,default:""},placeholder:{type:String,default:"Select date"},format:{type:String,default:"YYYY-MM-DD"},range:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:i}){const l=t,a=i,n=e.ref(!1),o=e.ref(""),u=e.ref(new Date().getMonth()),r=e.ref(new Date().getFullYear()),c=e.ref(l.modelValue),f=e.ref(null),y=e.ref(null),d=["Su","Mo","Tu","We","Th","Fr","Sa"],p=e.computed(()=>new Date(r.value,u.value).toLocaleDateString("en-US",{month:"long",year:"numeric"})),s=e.computed(()=>{const k=[],B=new Date(r.value,u.value,1),w=new Date(r.value,u.value+1,0),I=new Date(r.value,u.value,0),q=B.getDay(),ql=w.getDate(),fe=I.getDate();for(let x=q-1;x>=0;x--)k.push({date:fe-x,month:u.value-1,year:r.value,currentMonth:!1,key:`prev-${fe-x}`});for(let x=1;x<=ql;x++)k.push({date:x,month:u.value,year:r.value,currentMonth:!0,key:`current-${x}`});const Pl=42-k.length;for(let x=1;x<=Pl;x++)k.push({date:x,month:u.value+1,year:r.value,currentMonth:!1,key:`next-${x}`});return k}),m=k=>{if(!k)return"";const B=new Date(k),w=B.getFullYear(),I=String(B.getMonth()+1).padStart(2,"0"),q=String(B.getDate()).padStart(2,"0");return l.format.replace("YYYY",w).replace("MM",I).replace("DD",q)},g=()=>{l.range&&f.value?y.value?o.value=`${m(f.value)} - ${m(y.value)}`:o.value=m(f.value):c.value?o.value=m(c.value):o.value=""},S=k=>{if(!k.currentMonth)return!1;const B=new Date(k.year,k.month,k.date);if(l.range){if(f.value&&y.value){const w=new Date(f.value),I=new Date(y.value);return w.setHours(0,0,0,0),I.setHours(0,0,0,0),B.setHours(0,0,0,0),B.getTime()===w.getTime()||B.getTime()===I.getTime()}return f.value&&B.getTime()===new Date(f.value).setHours(0,0,0,0)}return c.value&&B.getTime()===new Date(c.value).setHours(0,0,0,0)},h=k=>{if(!k.currentMonth)return!1;const B=new Date;return k.date===B.getDate()&&k.month===B.getMonth()&&k.year===B.getFullYear()},E=k=>{if(!l.range||!f.value||!y.value||!k.currentMonth)return!1;const B=new Date(k.year,k.month,k.date),w=new Date(f.value),I=new Date(y.value);return B.setHours(0,0,0,0),w.setHours(0,0,0,0),I.setHours(0,0,0,0),B>w&&B<I},V=k=>{const B=new Date(k.year,k.month,k.date);l.range?!f.value||f.value&&y.value?(f.value=B,y.value=null):(B<f.value?(y.value=f.value,f.value=B):y.value=B,a("update:modelValue",[f.value,y.value]),a("change",[f.value,y.value])):(c.value=B,a("update:modelValue",B),a("change",B),A()),g()},_=()=>{u.value===0?(u.value=11,r.value--):u.value--},M=()=>{u.value===11?(u.value=0,r.value++):u.value++},C=()=>{n.value=!0},A=()=>{n.value=!1},D=()=>{n.value=!n.value},$=()=>{setTimeout(()=>{n.value=!1},200)},T=()=>{c.value=null,f.value=null,y.value=null,o.value="",a("update:modelValue",null),a("change",null)};return e.watch(()=>l.modelValue,k=>{l.range&&Array.isArray(k)?(f.value=k[0]||null,y.value=k[1]||null):c.value=k,g()},{immediate:!0}),(k,B)=>(e.openBlock(),e.createElementBlock("div",it,[t.label?(e.openBlock(),e.createElementBlock("label",rt,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",ct,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":B[0]||(B[0]=w=>o.value=w),type:"text",class:"datepicker-input",placeholder:t.placeholder,onFocus:C,onBlur:$,readonly:""},null,40,dt),[[e.vModelText,o.value]]),e.createElementVNode("button",{type:"button",class:"datepicker-toggle",onClick:D,"aria-label":"Toggle date picker"}," ▼ ")]),e.createVNode(e.Transition,{name:"picker-fade"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"datepicker-popup",onMousedown:B[1]||(B[1]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",mt,[e.createElementVNode("button",{type:"button",onClick:_,class:"nav-button","aria-label":"Previous month"},"◄"),e.createElementVNode("span",ut,e.toDisplayString(p.value),1),e.createElementVNode("button",{type:"button",onClick:M,class:"nav-button","aria-label":"Next month"},"►")]),e.createElementVNode("div",pt,[e.createElementVNode("div",ft,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(d,w=>e.createElementVNode("span",{key:w,class:"weekday"},e.toDisplayString(w),1)),64))]),e.createElementVNode("div",yt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,w=>(e.openBlock(),e.createElementBlock("button",{key:w.key,type:"button",class:e.normalizeClass(["calendar-day",{"other-month":!w.currentMonth,selected:S(w),today:h(w),"in-range":E(w)}]),disabled:!w.currentMonth,onClick:I=>V(w)},e.toDisplayString(w.date),11,gt))),128))])]),e.createElementVNode("div",{class:"datepicker-actions"},[e.createElementVNode("button",{type:"button",onClick:T,class:"action-button"},"Clear"),e.createElementVNode("button",{type:"button",onClick:A,class:"action-button primary"},"Done")])],32)):e.createCommentVNode("",!0)]),_:1})]))}},[["__scopeId","data-v-cba7510f"]]),kt=["aria-labelledby"],ht={key:0,class:"dialog-header"},bt={key:0,id:"dialog-title",class:"dialog-title"},Bt={class:"dialog-body"},Et={key:1,class:"dialog-footer"},Vt={key:0,class:"dialog-actions"},X=N({__name:"TuiDialog",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},closable:{type:Boolean,default:!0},closeOnOverlay:{type:Boolean,default:!0},overlayOpacity:{type:Number,default:.8},showActions:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},showCancel:{type:Boolean,default:!0},confirmText:{type:String,default:"Confirm"},cancelText:{type:String,default:"Cancel"},confirmVariant:{type:String,default:"primary",validator:t=>["primary","success","danger","warning","info"].includes(t)}},emits:["update:modelValue","confirm","cancel","close"],setup(t,{emit:i}){const l=t,a=i,n=()=>{a("update:modelValue",!1),a("close")},o=()=>{l.closeOnOverlay&&l.closable&&n()},u=()=>{a("confirm"),n()},r=()=>{a("cancel"),n()};return e.watch(()=>l.modelValue,c=>{c?document.body.style.overflow="hidden":document.body.style.overflow=""}),(c,f)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"dialog-fade"},{default:e.withCtx(()=>[t.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tui-dialog-overlay",style:e.normalizeStyle({"--overlay-opacity":t.overlayOpacity}),onClick:e.withModifiers(o,["self"])},[e.createElementVNode("div",{class:e.normalizeClass(["tui-dialog",{"no-close":!t.closable}]),role:"dialog","aria-modal":"true","aria-labelledby":t.title?"dialog-title":void 0},[t.title||t.closable?(e.openBlock(),e.createElementBlock("div",ht,[t.title?(e.openBlock(),e.createElementBlock("h3",bt,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.closable?(e.openBlock(),e.createElementBlock("button",{key:1,class:"dialog-close",type:"button",onClick:n,"aria-label":"Close dialog"}," ✕ ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Bt,[e.renderSlot(c.$slots,"default",{},void 0,!0)]),c.$slots.footer||t.showActions?(e.openBlock(),e.createElementBlock("div",Et,[e.renderSlot(c.$slots,"footer",{},()=>[t.showActions?(e.openBlock(),e.createElementBlock("div",Vt,[t.showCancel?(e.openBlock(),e.createBlock(L,{key:0,label:t.cancelText,variant:"secondary",onClick:r},null,8,["label"])):e.createCommentVNode("",!0),t.showConfirm?(e.openBlock(),e.createBlock(L,{key:1,label:t.confirmText,variant:t.confirmVariant,onClick:u},null,8,["label","variant"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)],10,kt)],4)):e.createCommentVNode("",!0)]),_:3})]))}},[["__scopeId","data-v-ecc5e202"]]),$t=["onKeydown","tabindex"],Nt={class:"default-trigger"},St={class:"dropdown-inner"},Tt=["onClick","onMouseenter"],wt={key:0,class:"dropdown-separator"},Ct={key:0,class:"item-icon"},_t={class:"item-label"},Dt={key:1,class:"item-shortcut"},It={key:2,class:"item-arrow"},R=N({__name:"TuiDropdown",props:{label:{type:String,default:""},items:{type:Array,required:!0},disabled:{type:Boolean,default:!1},align:{type:String,default:"left",validator:t=>["left","right"].includes(t)}},emits:["item-click","open","close"],setup(t,{expose:i,emit:l}){const a=t,n=l,o=e.ref(null),u=e.ref(null),r=e.ref(!1),c=e.ref(-1),f=e.ref({}),y=()=>{a.disabled||(r.value?p():d())},d=async()=>{if(!a.disabled){if(o.value){const h=o.value.querySelector(".dropdown-trigger").getBoundingClientRect();f.value={position:"fixed",top:`${h.bottom+2}px`,left:`${h.left}px`,minWidth:`${h.width}px`,zIndex:9999}}r.value=!0,c.value=-1,n("open"),await e.nextTick(),requestAnimationFrame(()=>{requestAnimationFrame(()=>{m()})}),document.addEventListener("click",s)}},p=()=>{r.value=!1,c.value=-1,n("close"),document.removeEventListener("click",s)},s=h=>{o.value&&!o.value.contains(h.target)&&u.value&&!u.value.contains(h.target)&&p()},m=()=>{if(!o.value||!u.value)return;const h=o.value.querySelector(".dropdown-trigger").getBoundingClientRect(),E=u.value.getBoundingClientRect();if(E.width===0||E.height===0){requestAnimationFrame(()=>m());return}const V=window.innerWidth,_=window.innerHeight;let M=h.bottom+2,C=h.left;a.align==="right"&&(C=h.right-E.width),C+E.width>V&&(C=V-E.width-10),C<10&&(C=10),M+E.height>_&&(M=h.top-E.height-2,M<10&&(M=10)),f.value={position:"fixed",top:`${M}px`,left:`${C}px`,minWidth:`${h.width}px`,zIndex:9999}},g=h=>{h.disabled||h.separator||(n("item-click",h),h.action&&h.action(),h.submenu||p())},S=h=>{if(!r.value){d();return}let E=c.value+h;for(;E>=0&&E<a.items.length;){const V=a.items[E];if(!V.separator&&!V.disabled){c.value=E;return}E+=h}E<0?c.value=a.items.length-1:E>=a.items.length&&(c.value=0)};return e.onMounted(()=>{window.addEventListener("resize",m)}),e.onUnmounted(()=>{document.removeEventListener("click",s),window.removeEventListener("resize",m)}),i({open:d,close:p,toggle:y}),(h,E)=>(e.openBlock(),e.createElementBlock("div",{class:"tui-dropdown",ref_key:"dropdownRef",ref:o},[e.createElementVNode("div",{class:e.normalizeClass(["dropdown-trigger",{"is-open":r.value,"is-disabled":t.disabled}]),onClick:y,onKeydown:[e.withKeys(p,["escape"]),e.withKeys(e.withModifiers(y,["prevent"]),["enter"]),e.withKeys(e.withModifiers(y,["prevent"]),["space"]),E[0]||(E[0]=e.withKeys(e.withModifiers(V=>S(-1),["prevent"]),["up"])),E[1]||(E[1]=e.withKeys(e.withModifiers(V=>S(1),["prevent"]),["down"]))],tabindex:t.disabled?-1:0},[e.renderSlot(h.$slots,"trigger",{isOpen:r.value},()=>[e.createElementVNode("span",Nt,e.toDisplayString(t.label),1)],!0)],42,$t),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"dropdown"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"dropdown-menu",style:e.normalizeStyle(f.value),ref_key:"menuRef",ref:u},[e.createElementVNode("div",St,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(V,_)=>(e.openBlock(),e.createElementBlock("div",{key:V.id||_,class:e.normalizeClass(["dropdown-item",{"is-highlighted":_===c.value,"is-disabled":V.disabled,"is-separator":V.separator,"has-submenu":V.submenu}]),onClick:M=>!V.disabled&&!V.separator&&g(V),onMouseenter:M=>c.value=_},[V.separator?(e.openBlock(),e.createElementBlock("div",wt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[V.icon?(e.openBlock(),e.createElementBlock("span",Ct,e.toDisplayString(V.icon),1)):e.createCommentVNode("",!0),e.createElementVNode("span",_t,e.toDisplayString(V.label),1),V.shortcut?(e.openBlock(),e.createElementBlock("span",Dt,e.toDisplayString(V.shortcut),1)):e.createCommentVNode("",!0),V.submenu?(e.openBlock(),e.createElementBlock("span",It,"►")):e.createCommentVNode("",!0)],64))],42,Tt))),128))])],4)):e.createCommentVNode("",!0)]),_:1})]))],512))}},[["__scopeId","data-v-d6fd60c2"]]),xt={class:"tui-header"},Mt={class:"header-content"},zt={class:"header-title"},At={key:0,class:"header-subtitle"},Lt={class:"header-timestamp"},J=N({__name:"TuiHeader",props:{title:{type:String,required:!0},subtitle:{type:String,default:""}},setup(t){const i=e.ref(""),l=()=>{const n=new Date;i.value=n.toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})};let a;return e.onMounted(()=>{l(),a=setInterval(l,1e3)}),e.onUnmounted(()=>{clearInterval(a)}),(n,o)=>(e.openBlock(),e.createElementBlock("header",xt,[o[0]||(o[0]=e.createElementVNode("div",{class:"header-top"},[e.createElementVNode("span",{class:"corner"},"╔"),e.createElementVNode("div",{class:"header-line"}),e.createElementVNode("span",{class:"corner"},"╗")],-1)),e.createElementVNode("div",Mt,[e.createElementVNode("h1",zt,e.toDisplayString(t.title),1),t.subtitle?(e.openBlock(),e.createElementBlock("p",At,e.toDisplayString(t.subtitle),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Lt,e.toDisplayString(i.value),1)]),o[1]||(o[1]=e.createElementVNode("div",{class:"header-bottom"},[e.createElementVNode("span",{class:"corner"},"╚"),e.createElementVNode("div",{class:"header-line"}),e.createElementVNode("span",{class:"corner"},"╝")],-1))]))}},[["__scopeId","data-v-40df859c"]]),Rt=["aria-label","role"],Q=N({__name:"TuiIcon",props:{icon:{type:String,required:!0},type:{type:String,default:"unicode",validator:t=>["unicode","material"].includes(t)},materialVariant:{type:String,default:"outlined",validator:t=>["filled","outlined","round","sharp"].includes(t)},size:{type:String,default:"medium",validator:t=>["small","medium","large","xlarge"].includes(t)},variant:{type:String,default:"primary",validator:t=>["primary","secondary","success","error","warning","info","inherit"].includes(t)},spin:{type:Boolean,default:!1},pulse:{type:Boolean,default:!1},ariaLabel:{type:String,default:""},customSize:{type:String,default:""}},setup(t){const i=t,l=e.computed(()=>i.type==="material"?{filled:"material-icons",outlined:"material-icons-outlined",round:"material-icons-round",sharp:"material-icons-sharp"}[i.materialVariant]:""),a=e.computed(()=>i.customSize?{fontSize:i.customSize}:{});return(n,o)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["tui-icon",[t.size,t.variant,{spin:t.spin,pulse:t.pulse},l.value]]),style:e.normalizeStyle(a.value),"aria-label":t.ariaLabel,role:t.ariaLabel?"img":void 0},e.toDisplayString(t.icon),15,Rt))}},[["__scopeId","data-v-48751b1e"]]),Ft=["src","alt"],Ot={key:1,class:"image-placeholder"},qt={class:"loading-text"},Pt={key:2,class:"image-loading"},Yt={key:3,class:"image-error"},Kt={class:"error-text"},Ut={key:0,class:"image-caption"},Z=N({__name:"TuiImage",props:{src:{type:String,required:!0},alt:{type:String,default:""},lazy:{type:Boolean,default:!1},aspectRatio:{type:String,default:"",validator:t=>!t||["1:1","4:3","16:9","21:9","3:2"].includes(t)},overlay:{type:Boolean,default:!1},overlayOpacity:{type:Number,default:.7},caption:{type:String,default:""},loadingText:{type:String,default:"Loading..."},errorText:{type:String,default:"Failed to load image"}},emits:["load","error"],setup(t,{emit:i}){const l=t,a=i,n=e.ref(!l.lazy),o=e.ref(!1),u=e.ref(!1);let r=null;const c=e.computed(()=>l.aspectRatio?{paddingBottom:{"1:1":"100%","4:3":"75%","16:9":"56.25%","21:9":"42.86%","3:2":"66.67%"}[l.aspectRatio],position:"relative"}:{}),f=e.computed(()=>({backgroundColor:`rgba(0, 0, 0, ${l.overlayOpacity})`})),y=()=>{o.value=!0,a("load")},d=()=>{u.value=!0,o.value=!1,a("error")};return e.onMounted(()=>{if(l.lazy&&"IntersectionObserver"in window){r=new IntersectionObserver(s=>{s.forEach(m=>{m.isIntersecting&&(n.value=!0,r==null||r.disconnect())})},{rootMargin:"50px"});const p=document.querySelector(".tui-image");p&&r.observe(p)}}),e.onUnmounted(()=>{r==null||r.disconnect()}),(p,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tui-image",{"has-overlay":t.overlay||t.caption}]),style:e.normalizeStyle(c.value)},[!t.lazy||n.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.src,alt:t.alt,class:e.normalizeClass(["image-element",{loaded:o.value,error:u.value}]),onLoad:y,onError:d},null,42,Ft)):(e.openBlock(),e.createElementBlock("div",Ot,[e.createElementVNode("span",qt,e.toDisplayString(t.loadingText),1)])),!o.value&&!u.value?(e.openBlock(),e.createElementBlock("div",Pt,[...s[0]||(s[0]=[e.createElementVNode("span",{class:"loading-spinner"},"◐",-1)])])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("div",Yt,[s[1]||(s[1]=e.createElementVNode("span",null,"✕",-1)),e.createElementVNode("span",Kt,e.toDisplayString(t.errorText),1)])):e.createCommentVNode("",!0),(t.overlay||t.caption)&&o.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"image-overlay",style:e.normalizeStyle(f.value)},[e.renderSlot(p.$slots,"overlay",{},()=>[t.caption?(e.openBlock(),e.createElementBlock("div",Ut,e.toDisplayString(t.caption),1)):e.createCommentVNode("",!0)],!0)],4)):e.createCommentVNode("",!0)],6))}},[["__scopeId","data-v-29b0ea40"]]),Ht={class:"tui-input-wrapper"},jt={key:0,class:"tui-label"},Gt={class:"input-container"},Wt=["type","value","placeholder","disabled"],v=N({__name:"TuiInput",props:{modelValue:{type:[String,Number],default:""},label:{type:String,default:""},type:{type:String,default:"text"},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){return(i,l)=>(e.openBlock(),e.createElementBlock("div",Ht,[t.label?(e.openBlock(),e.createElementBlock("label",jt,[l[1]||(l[1]=e.createElementVNode("span",{class:"label-bracket"},">",-1)),e.createTextVNode(" "+e.toDisplayString(t.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",Gt,[l[2]||(l[2]=e.createElementVNode("span",{class:"input-prompt"},">>",-1)),e.createElementVNode("input",{type:t.type,value:t.modelValue,placeholder:t.placeholder,disabled:t.disabled,class:"tui-input",onInput:l[0]||(l[0]=a=>i.$emit("update:modelValue",a.target.value))},null,40,Wt),l[3]||(l[3]=e.createElementVNode("span",{class:"input-cursor"},"_",-1))])]))}},[["__scopeId","data-v-808aff2f"]]),Xt={class:"menubar-inner"},Jt={class:"menubar-left"},Qt={class:"menu-label"},Zt={key:0,class:"menubar-right"},ee=N({__name:"TuiMenubar",props:{menus:{type:Array,required:!0},compact:{type:Boolean,default:!1}},emits:["menu-item-click"],setup(t,{emit:i}){const l=i,a=n=>{l("menu-item-click",n)};return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tui-menubar",{"is-compact":t.compact}])},[e.createElementVNode("div",Xt,[e.createElementVNode("div",Jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menus,u=>(e.openBlock(),e.createBlock(R,{key:u.id,items:u.items,onItemClick:a,class:"menubar-item"},{trigger:e.withCtx(({isOpen:r})=>[e.createElementVNode("div",{class:e.normalizeClass(["menu-trigger",{"is-open":r}])},[o[0]||(o[0]=e.createElementVNode("span",{class:"menu-prompt"},"►",-1)),e.createElementVNode("span",Qt,e.toDisplayString(u.label),1)],2)]),_:2},1032,["items"]))),128))]),n.$slots.right?(e.openBlock(),e.createElementBlock("div",Zt,[e.renderSlot(n.$slots,"right",{},void 0,!0)])):e.createCommentVNode("",!0)])],2))}},[["__scopeId","data-v-ca7b423d"]]),vt={class:"otp-inputs"},ea=["onUpdate:modelValue","aria-label","onInput","onKeydown","disabled"],ta={key:0,class:"otp-error"},te=N({__name:"TuiOTP",props:{modelValue:{type:String,default:""},length:{type:Number,default:6,validator:t=>t>0&&t<=10},masked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},error:{type:String,default:""},autoFocus:{type:Boolean,default:!0}},emits:["update:modelValue","complete"],setup(t,{emit:i}){const l=t,a=i,n=e.ref(Array(l.length).fill("")),o=e.ref([]),u=e.ref(!1);e.watch(()=>l.modelValue,d=>{if(d){const p=d.split("").slice(0,l.length);n.value=[...p,...Array(l.length-p.length).fill("")]}},{immediate:!0}),e.watch(()=>l.error,d=>{u.value=!!d});const r=(d,p)=>{const s=p.target.value;if(!/^\d*$/.test(s)){n.value[d]="";return}n.value[d]=s.slice(-1),y(),s&&d<l.length-1&&e.nextTick(()=>{var m;(m=o.value[d+1])==null||m.focus()})},c=(d,p)=>{var s,m;p.key==="Backspace"?!n.value[d]&&d>0?e.nextTick(()=>{var g;(g=o.value[d-1])==null||g.focus()}):(n.value[d]="",y()):p.key==="ArrowLeft"&&d>0?(p.preventDefault(),(s=o.value[d-1])==null||s.focus()):p.key==="ArrowRight"&&d<l.length-1&&(p.preventDefault(),(m=o.value[d+1])==null||m.focus())},f=d=>{var m;d.preventDefault();const s=(((m=d.clipboardData)==null?void 0:m.getData("text"))||"").replace(/\D/g,"").slice(0,l.length);if(s){const g=s.split("");n.value=[...g,...Array(l.length-g.length).fill("")],y();const S=Math.min(g.length,l.length-1);e.nextTick(()=>{var h;(h=o.value[S])==null||h.focus()})}},y=()=>{const d=n.value.join("");a("update:modelValue",d),d.length===l.length&&a("complete",d)};return e.onMounted(()=>{l.autoFocus&&e.nextTick(()=>{var d;(d=o.value[0])==null||d.focus()})}),(d,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tui-otp",{error:u.value}])},[e.createElementVNode("div",vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(s,m)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:m,ref_for:!0,ref:g=>o.value[m]=g,"onUpdate:modelValue":g=>n.value[m]=g,type:"text",inputmode:"numeric",maxlength:"1",class:e.normalizeClass(["otp-input",{filled:n.value[m]}]),"aria-label":`Digit ${m+1}`,onInput:g=>r(m,g),onKeydown:g=>c(m,g),onPaste:f,disabled:t.disabled},null,42,ea)),[[e.vModelText,n.value[m]]])),128))]),t.error?(e.openBlock(),e.createElementBlock("p",ta,e.toDisplayString(t.error),1)):e.createCommentVNode("",!0)],2))}},[["__scopeId","data-v-ca0fbb71"]]),aa={class:"tui-progress-wrapper"},la={key:0,class:"progress-header"},na={class:"progress-label"},oa={class:"progress-value"},sa={class:"progress-bar-container"},ia={class:"progress-segments"},ae=N({__name:"TuiProgressBar",props:{value:{type:Number,required:!0,validator:t=>t>=0&&t<=100},label:{type:String,default:""},animated:{type:Boolean,default:!0}},setup(t){return(i,l)=>(e.openBlock(),e.createElementBlock("div",aa,[t.label?(e.openBlock(),e.createElementBlock("div",la,[e.createElementVNode("span",na,e.toDisplayString(t.label),1),e.createElementVNode("span",oa,e.toDisplayString(t.value)+"%",1)])):e.createCommentVNode("",!0),e.createElementVNode("div",sa,[e.createElementVNode("div",{class:"progress-bar",style:e.normalizeStyle({width:t.value+"%"})},[e.createElementVNode("div",{class:e.normalizeClass(["progress-fill",{animated:t.animated}])},null,2)],4),e.createElementVNode("div",ia,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(20,a=>e.createElementVNode("span",{key:a,class:"segment"})),64))])])]))}},[["__scopeId","data-v-06bb074d"]]),ra={class:"tui-radio-group"},ca={key:0,class:"group-label"},da=["value","checked","onChange"],ma={class:"radio-circle"},ua={key:0,class:"radio-dot"},pa={key:1,class:"radio-empty"},fa={class:"radio-label"},le=N({__name:"TuiRadio",props:{modelValue:{type:[String,Number],default:""},options:{type:Array,required:!0},groupLabel:{type:String,default:""}},emits:["update:modelValue"],setup(t){return(i,l)=>(e.openBlock(),e.createElementBlock("div",ra,[t.groupLabel?(e.openBlock(),e.createElementBlock("label",ca,[l[0]||(l[0]=e.createElementVNode("span",{class:"label-bracket"},">",-1)),e.createTextVNode(" "+e.toDisplayString(t.groupLabel),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,a=>(e.openBlock(),e.createElementBlock("label",{key:a.value,class:"tui-radio"},[e.createElementVNode("input",{type:"radio",value:a.value,checked:t.modelValue===a.value,onChange:n=>i.$emit("update:modelValue",a.value),class:"radio-input"},null,40,da),e.createElementVNode("span",ma,[t.modelValue===a.value?(e.openBlock(),e.createElementBlock("span",ua,"●")):(e.openBlock(),e.createElementBlock("span",pa,"○"))]),e.createElementVNode("span",fa,e.toDisplayString(a.label),1)]))),128))]))}},[["__scopeId","data-v-75d211d9"]]),ya={key:0,class:"tui-label"},ga=["onKeydown"],ka={class:"select-display"},ha={key:0,class:"dropdown-menu"},ba={class:"dropdown-inner"},Ba=["onClick","onMouseenter"],Ea={class:"option-bracket"},ne=N({__name:"TuiSelect",props:{modelValue:{type:[String,Number],default:""},label:{type:String,default:""},options:{type:Array,required:!0},placeholder:{type:String,default:"SELECT OPTION"}},emits:["update:modelValue"],setup(t,{emit:i}){const l=t,a=i,n=e.ref(!1),o=e.ref(-1),u=e.ref(null),r=e.computed(()=>{if(!l.modelValue)return l.placeholder;const p=l.options.find(s=>s.value===l.modelValue);return p?p.label:l.placeholder}),c=()=>{if(n.value=!n.value,n.value){const p=l.options.findIndex(s=>s.value===l.modelValue);o.value=p>=0?p:0}},f=()=>{n.value=!1,o.value=-1},y=p=>{a("update:modelValue",p),f()},d=p=>{if(!n.value){n.value=!0,o.value=0;return}o.value+=p,o.value<0?o.value=l.options.length-1:o.value>=l.options.length&&(o.value=0),o.value>=0&&o.value<l.options.length&&a("update:modelValue",l.options[o.value].value)};return e.watch(()=>l.modelValue,()=>{if(n.value){const p=l.options.findIndex(s=>s.value===l.modelValue);p>=0&&(o.value=p)}}),(p,s)=>(e.openBlock(),e.createElementBlock("div",{class:"tui-select-wrapper",ref_key:"selectWrapper",ref:u},[t.label?(e.openBlock(),e.createElementBlock("label",ya,[s[2]||(s[2]=e.createElementVNode("span",{class:"label-bracket"},">",-1)),e.createTextVNode(" "+e.toDisplayString(t.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["select-container",{"is-open":n.value}]),onClick:c,tabindex:"0",onBlur:f,onKeydown:[e.withKeys(f,["escape"]),e.withKeys(e.withModifiers(c,["prevent"]),["enter"]),e.withKeys(e.withModifiers(c,["prevent"]),["space"]),s[0]||(s[0]=e.withKeys(e.withModifiers(m=>d(-1),["prevent"]),["up"])),s[1]||(s[1]=e.withKeys(e.withModifiers(m=>d(1),["prevent"]),["down"]))]},[s[3]||(s[3]=e.createElementVNode("span",{class:"select-prompt"},">>",-1)),e.createElementVNode("div",ka,e.toDisplayString(r.value),1),e.createElementVNode("span",{class:e.normalizeClass(["select-arrow",{"is-open":n.value}])},"▼",2)],42,ga),e.createVNode(e.Transition,{name:"dropdown"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",ha,[e.createElementVNode("div",ba,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(m,g)=>(e.openBlock(),e.createElementBlock("div",{key:m.value,class:e.normalizeClass(["dropdown-option",{"is-selected":m.value===t.modelValue,"is-highlighted":g===o.value}]),onClick:e.withModifiers(S=>y(m.value),["stop"]),onMouseenter:S=>o.value=g},[e.createElementVNode("span",Ea,e.toDisplayString(m.value===t.modelValue?"►":" "),1),e.createTextVNode(" "+e.toDisplayString(m.label),1)],42,Ba))),128))])])):e.createCommentVNode("",!0)]),_:1})],512))}},[["__scopeId","data-v-67162f64"]]),Va={key:0,class:"slider-label"},$a={class:"slider-container"},Na={key:0,class:"slider-value-label min-label"},Sa={class:"slider-track"},Ta=["aria-valuenow","aria-valuemin","aria-valuemax","aria-label"],wa={key:0,class:"slider-tooltip"},Ca={key:1,class:"slider-value-label max-label"},_a={key:1,class:"slider-current-value"},oe=N({__name:"TuiSlider",props:{modelValue:{type:Number,default:50},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},orientation:{type:String,default:"horizontal",validator:t=>["horizontal","vertical"].includes(t)},label:{type:String,default:""},showValue:{type:Boolean,default:!0},showTooltip:{type:Boolean,default:!0},prefix:{type:String,default:""},suffix:{type:String,default:""}},emits:["update:modelValue","change"],setup(t,{emit:i}){const l=t,a=i,n=e.ref(null),o=e.ref(!1),u=e.computed(()=>(l.modelValue-l.min)/(l.max-l.min)*100),r=e.computed(()=>l.orientation==="horizontal"?{width:`${u.value}%`}:{height:`${u.value}%`}),c=e.computed(()=>l.orientation==="horizontal"?{left:`${u.value}%`}:{bottom:`${u.value}%`}),f=(m,g)=>{if(!n.value)return;const S=n.value.getBoundingClientRect();let h;l.orientation==="horizontal"?h=(m-S.left)/S.width:h=(S.bottom-g)/S.height,h=Math.max(0,Math.min(1,h));const E=l.min+h*(l.max-l.min),V=Math.round(E/l.step)*l.step,_=Math.max(l.min,Math.min(l.max,V));a("update:modelValue",_)},y=m=>{f(m.clientX,m.clientY),a("change",l.modelValue)},d=m=>{m.preventDefault(),o.value=!0;const g=h=>{f(h.clientX,h.clientY)},S=()=>{o.value=!1,a("change",l.modelValue),document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",S)};document.addEventListener("mousemove",g),document.addEventListener("mouseup",S)},p=m=>{m.preventDefault(),o.value=!0;const g=h=>{const E=h.touches[0];f(E.clientX,E.clientY)},S=()=>{o.value=!1,a("change",l.modelValue),document.removeEventListener("touchmove",g),document.removeEventListener("touchend",S)};document.addEventListener("touchmove",g),document.addEventListener("touchend",S)},s=m=>{let g=l.modelValue;m.key==="ArrowRight"||m.key==="ArrowUp"?(m.preventDefault(),g=Math.min(l.max,l.modelValue+l.step)):m.key==="ArrowLeft"||m.key==="ArrowDown"?(m.preventDefault(),g=Math.max(l.min,l.modelValue-l.step)):m.key==="Home"?(m.preventDefault(),g=l.min):m.key==="End"&&(m.preventDefault(),g=l.max),g!==l.modelValue&&(a("update:modelValue",g),a("change",g))};return(m,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tui-slider",[t.orientation,{"show-tooltip":t.showTooltip}]])},[t.label?(e.openBlock(),e.createElementBlock("label",Va,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",$a,[t.showValue&&t.orientation==="horizontal"?(e.openBlock(),e.createElementBlock("span",Na,e.toDisplayString(t.min),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["slider-track-wrapper",t.orientation]),onClick:y,ref_key:"trackRef",ref:n},[e.createElementVNode("div",Sa,[e.createElementVNode("div",{class:"slider-fill",style:e.normalizeStyle(r.value)},null,4),e.createElementVNode("div",{class:"slider-thumb",style:e.normalizeStyle(c.value),onMousedown:d,onTouchstart:p,tabindex:"0",role:"slider","aria-valuenow":t.modelValue,"aria-valuemin":t.min,"aria-valuemax":t.max,"aria-label":t.label||"Slider",onKeydown:s},[e.createVNode(e.Transition,{name:"tooltip-fade"},{default:e.withCtx(()=>[t.showTooltip&&o.value?(e.openBlock(),e.createElementBlock("div",wa,e.toDisplayString(t.modelValue),1)):e.createCommentVNode("",!0)]),_:1})],44,Ta)])],2),t.showValue&&t.orientation==="horizontal"?(e.openBlock(),e.createElementBlock("span",Ca,e.toDisplayString(t.max),1)):e.createCommentVNode("",!0)]),t.showValue&&t.orientation==="horizontal"?(e.openBlock(),e.createElementBlock("div",_a,e.toDisplayString(t.prefix)+e.toDisplayString(t.modelValue)+e.toDisplayString(t.suffix),1)):e.createCommentVNode("",!0)],2))}},[["__scopeId","data-v-6622f93e"]]),Da={class:"tui-table-wrapper"},Ia={class:"tui-table"},se=N({__name:"TuiTable",props:{columns:{type:Array,required:!0},data:{type:Array,required:!0}},setup(t){return(i,l)=>(e.openBlock(),e.createElementBlock("div",Da,[e.createElementVNode("table",Ia,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,a=>(e.openBlock(),e.createElementBlock("th",{key:a.key,class:"table-header"},e.toDisplayString(a.label),1))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data,(a,n)=>(e.openBlock(),e.createElementBlock("tr",{key:n,class:"table-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,o=>(e.openBlock(),e.createElementBlock("td",{key:o.key,class:"table-cell"},e.toDisplayString(a[o.key]),1))),128))]))),128))])])]))}},[["__scopeId","data-v-966ed94a"]]),xa={class:"tui-tabs"},Ma={class:"tabs-header"},za=["onClick"],Aa={class:"tabs-content"},ie=N({__name:"TuiTabs",props:{tabs:{type:Array,required:!0},defaultTab:{type:String,default:""}},setup(t){var n;const i=t,l=e.ref(i.defaultTab||((n=i.tabs[0])==null?void 0:n.id)),a=o=>{l.value=o};return(o,u)=>(e.openBlock(),e.createElementBlock("div",xa,[e.createElementVNode("div",Ma,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabs,r=>(e.openBlock(),e.createElementBlock("button",{key:r.id,class:e.normalizeClass(["tab-button",{active:l.value===r.id}]),onClick:c=>a(r.id)},[u[0]||(u[0]=e.createElementVNode("span",{class:"tab-bracket"},"[",-1)),e.createTextVNode(" "+e.toDisplayString(r.label)+" ",1),u[1]||(u[1]=e.createElementVNode("span",{class:"tab-bracket"},"]",-1))],10,za))),128))]),e.createElementVNode("div",Aa,[e.renderSlot(o.$slots,l.value,{},void 0,!0)])]))}},[["__scopeId","data-v-af385654"]]),La={class:"tui-terminal"},Ra={class:"terminal-header"},Fa={class:"terminal-title"},Oa={class:"terminal-status"},qa={key:0,class:"line-prompt"},Pa={key:0,class:"terminal-input-line"},re=N({__name:"TuiTerminal",props:{title:{type:String,default:"TERMINAL"},status:{type:String,default:"ONLINE"},lines:{type:Array,default:()=>[]},interactive:{type:Boolean,default:!1}},emits:["command"],setup(t,{expose:i,emit:l}){const a=l,n=e.ref(""),o=e.ref(null),u=e.ref(null),r=()=>{n.value.trim()&&(a("command",n.value),n.value="")};return i({scrollToBottom:()=>{e.nextTick(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})}}),(f,y)=>(e.openBlock(),e.createElementBlock("div",La,[e.createElementVNode("div",Ra,[e.createElementVNode("span",Fa,e.toDisplayString(t.title),1),e.createElementVNode("span",Oa,e.toDisplayString(t.status),1)]),e.createElementVNode("div",{class:"terminal-body",ref_key:"terminalBody",ref:o},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lines,(d,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:"terminal-line"},[d.type==="input"?(e.openBlock(),e.createElementBlock("span",qa,">")):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(["line-text",d.type])},e.toDisplayString(d.text),3)]))),128)),t.interactive?(e.openBlock(),e.createElementBlock("div",Pa,[y[1]||(y[1]=e.createElementVNode("span",{class:"line-prompt"},">",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":y[0]||(y[0]=d=>n.value=d),class:"terminal-input",onKeyup:e.withKeys(r,["enter"]),ref_key:"terminalInput",ref:u},null,544),[[e.vModelText,n.value]]),y[2]||(y[2]=e.createElementVNode("span",{class:"cursor"},"_",-1))])):e.createCommentVNode("",!0)],512)]))}},[["__scopeId","data-v-c408105f"]]);function ce(t,i={}){const{speed:l=50,enabled:a=!0,delay:n=0,cursor:o=!0,onComplete:u=null}=i,r=e.ref(""),c=e.ref(!1),f=e.ref(0);let y=null;const d=()=>{if(!a){r.value=t.value||t,c.value=!1;return}const s=t.value||t;f.value<s.length?(c.value=!0,r.value=s.substring(0,f.value+1),f.value++,y=setTimeout(d,l)):(c.value=!1,u&&u())},p=()=>{y&&clearTimeout(y),f.value=0,r.value="",c.value=!1,n>0?setTimeout(d,n):d()};return e.watch(()=>t.value||t,()=>{p()}),e.onMounted(()=>{a?n>0?setTimeout(d,n):d():r.value=t.value||t}),{displayText:r,isTyping:c,resetTypewriter:p}}const Ya={key:0,class:"text-prefix"},Ka={class:"text-content"},Ua={key:0,class:"typing-cursor"},F=N({__name:"TuiText",props:{text:{type:String,required:!0},typewriter:{type:Boolean,default:!1},typewriterSpeed:{type:Number,default:50},typewriterDelay:{type:Number,default:0},showCursor:{type:Boolean,default:!0},prefix:{type:String,default:""},glow:{type:Boolean,default:!1},inheritColor:{type:Boolean,default:!1}},emits:["typewriter-complete"],setup(t,{emit:i}){const l=t,a=i,{displayText:n,isTyping:o}=ce(e.computed(()=>l.text),{speed:l.typewriterSpeed,enabled:l.typewriter,delay:l.typewriterDelay,cursor:l.showCursor,onComplete:()=>a("typewriter-complete")}),u=e.computed(()=>({"is-typing":o.value,"inherit-color":l.inheritColor}));return(r,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tui-text",u.value])},[t.prefix?(e.openBlock(),e.createElementBlock("span",Ya,e.toDisplayString(t.prefix),1)):e.createCommentVNode("",!0),e.createElementVNode("span",Ka,[e.createTextVNode(e.toDisplayString(e.unref(n)),1),t.showCursor&&e.unref(o)?(e.openBlock(),e.createElementBlock("span",Ua,"█")):e.createCommentVNode("",!0)])],2))}},[["__scopeId","data-v-d73aa019"]]),Ha={class:"tui-terminal-typewriter"},ja={class:"terminal-header"},Ga={class:"terminal-title"},Wa={class:"terminal-status"},Xa={key:0,class:"line-prompt"},Ja={key:1},Qa={key:0,class:"terminal-input-line"},Za=["disabled"],de=N({__name:"TuiTerminalTypewriter",props:{title:{type:String,default:"TERMINAL"},status:{type:String,default:"ONLINE"},lines:{type:Array,default:()=>[]},interactive:{type:Boolean,default:!1},typewriterSpeed:{type:Number,default:30},typewriterStagger:{type:Number,default:500},autoType:{type:Boolean,default:!0},typingStatus:{type:String,default:"TYPING"},idleStatus:{type:String,default:null},lockInputDuringTy