1import{A as e,Ct as t,E as n,H as r,I as i,J as a,Ln as o,Mn as s,N as c,O as l,Ot as u,P as d,Pt as f,Zt as p,ct as m,it as h,k as g,kn as _,lt as v,q as y,un as b,y as x,yt as S}from"./vue.runtime.esm-bundler-DK-ieOMu.mjs";import{o as C}from"./is-equal-CdQM1mL-.mjs";import{a as w,b as T,h as E,i as D,o as O,z as k}from"./useFieldGroup-BjrnXgPF.mjs";import{O as A,h as j,q as M}from"./usePortal-BXyysH4I.mjs";import{n as N}from"./useLocale-hvizExQD.mjs";r(),f();var P=100,[F,I]=T(`ProgressRoot`),L=e=>typeof e==`number`;function R(e,t){return A(e)||L(e)&&!Number.isNaN(e)&&e<=t&&e>=0?e:(console.error(`Invalid prop \`value\` of value \`${e}\` supplied to \`ProgressRoot\`. The \`value\` prop must be: 2 - a positive number 3 - less than the value passed to \`max\` (or ${P} if no \`max\` prop is set) 4 - \`null\` or \`undefined\` if the progress is indeterminate. 5 6Defaulting to \`null\`.`),null)}function z(e){return L(e)&&!Number.isNaN(e)&&e>0?e:(console.error(`Invalid prop \`max\` of value \`${e}\` supplied to \`ProgressRoot\`. Only numbers greater than 0 are valid max values. Defaulting to \`${P}\`.`),P)}var B=i({__name:`ProgressRoot`,props:{modelValue:{type:[Number,null],required:!1},max:{type:Number,required:!1,default:P},getValueLabel:{type:Function,required:!1,default:(e,t)=>L(e)?`${Math.round(e/t*P)}%`:void 0},getValueText:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`update:modelValue`,`update:max`],setup(e,{emit:r}){let i=e,o=r;j();let s=M(i,`modelValue`,o,{passive:i.modelValue===void 0}),c=M(i,`max`,o,{passive:i.max===void 0});t(()=>s.value,async e=>{let t=R(e,i.max);t!==e&&(await a(),s.value=t)},{immediate:!0}),t(()=>i.max,e=>{let t=z(i.max);t!==e&&(c.value=t)},{immediate:!0});let d=n(()=>A(s.value)?`indeterminate`:s.value===c.value?`complete`:`loading`);return I({modelValue:s,max:c,progressState:d}),(e,t)=>(h(),l(p(E),{"as-child":e.asChild,as:e.as,"aria-valuemax":p(c),"aria-valuemin":0,"aria-valuenow":L(p(s))?p(s):void 0,"aria-valuetext":e.getValueText?.(p(s),p(c)),"aria-label":e.getValueLabel(p(s),p(c)),role:`progressbar`,"data-state":d.value,"data-value":p(s)??void 0,"data-max":p(c)},{default:u(()=>[v(e.$slots,`default`,{modelValue:p(s)})]),_:3},8,[`as-child`,`as`,`aria-valuemax`,`aria-valuenow`,`aria-valuetext`,`aria-label`,`data-state`,`data-value`,`data-max`]))}});r(),f();var V=i({__name:`ProgressIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=F();return j(),(e,r)=>(h(),l(p(E),y(t,{"data-state":p(n).progressState.value,"data-value":p(n).modelValue?.value??void 0,"data-max":p(n).max.value}),{default:u(()=>[v(e.$slots,`default`)]),_:3},16,[`data-state`,`data-value`,`data-max`]))}}),H={slots:{root:`gap-2`,base:`relative overflow-hidden rounded-full bg-accented`,indicator:`rounded-full size-full transition-transform duration-200 ease-out motion-reduce:transition-none motion-reduce:data-[state=indeterminate]:animate-pulse`,status:`flex text-dimmed duration-200 ease-out motion-reduce:transition-none`,steps:`grid items-end`,step:`truncate text-end row-start-1 col-start-1 transition-opacity ease-out`},variants:{animation:{carousel:``,"carousel-inverse":``,swing:``,elastic:``},color:{primary:{indicator:`bg-primary`,steps:`text-primary`},secondary:{indicator:`bg-secondary`,steps:`text-secondary`},success:{indicator:`bg-success`,steps:`text-success`},info:{indicator:`bg-info`,steps:`text-info`},warning:{indicator:`bg-warning`,steps:`text-warning`},error:{indicator:`bg-error`,steps:`text-error`},neutral:{indicator:`bg-inverted`,steps:`text-highlighted`}},size:{"2xs":{status:`text-xs`,steps:`text-xs`},xs:{status:`text-xs`,steps:`text-xs`},sm:{status:`text-sm`,steps:`text-sm`},md:{status:`text-sm`,steps:`text-sm`},lg:{status:`text-sm`,steps:`text-sm`},xl:{status:`text-base`,steps:`text-base`},"2xl":{status:`text-base`,steps:`text-base`}},step:{active:{step:`opacity-100`},first:{step:`opacity-100 text-muted`},other:{step:`opacity-0`},last:{step:``}},orientation:{horizontal:{root:`w-full flex flex-col`,base:`w-full`,status:`flex-row items-center justify-end w-(--percent) min-w-fit transition-[width]`}
6,vertical:{root:`h-full flex flex-row-reverse`,base:`h-full`,status:`flex-col justify-end h-(--percent) min-h-fit transition-[height]`}},inverted:{true:{status:`self-end`}}},compoundVariants:[{inverted:!0,orientation:`horizontal`,class:{step:`text-start`,status:`flex-row-reverse`}},{inverted:!0,orientation:`vertical`,class:{steps:`items-start`,status:`flex-col-reverse`}},{orientation:`horizontal`,size:`2xs`,class:`h-px`},{orientation:`horizontal`,size:`xs`,class:`h-0.5`},{orientation:`horizontal`,size:`sm`,class:`h-1`},{orientation:`horizontal`,size:`md`,class:`h-2`},{orientation:`horizontal`,size:`lg`,class:`h-3`},{orientation:`horizontal`,size:`xl`,class:`h-4`},{orientation:`horizontal`,size:`2xl`,class:`h-5`},{orientation:`vertical`,size:`2xs`,class:`w-px`},{orientation:`vertical`,size:`xs`,class:`w-0.5`},{orientation:`vertical`,size:`sm`,class:`w-1`},{orientation:`vertical`,size:`md`,class:`w-2`},{orientation:`vertical`,size:`lg`,class:`w-3`},{orientation:`vertical`,size:`xl`,class:`w-4`},{orientation:`vertical`,size:`2xl`,class:`w-5`},{orientation:`horizontal`,animation:`carousel`,class:{indicator:`motion-safe:data-[state=indeterminate]:animate-[carousel_2s_linear_infinite] motion-safe:data-[state=indeterminate]:rtl:animate-[carousel-rtl_2s_linear_infinite]`}},{orientation:`vertical`,animation:`carousel`,class:{indicator:`motion-safe:data-[state=indeterminate]:animate-[carousel-vertical_2s_linear_infinite]`}},{orientation:`horizontal`,animation:`carousel-inverse`,class:{indicator:`motion-safe:data-[state=indeterminate]:animate-[carousel-inverse_2s_linear_infinite] motion-safe:data-[state=indeterminate]:rtl:animate-[carousel-inverse-rtl_2s_linear_infinite]`}},{orientation:`vertical`,animation:`carousel-inverse`,class:{indicator:`motion-safe:data-[state=indeterminate]:animate-[carousel-inverse-vertical_2s_linear_infinite]`}},{orientation:`horizontal`,animation:`swing`,class:{indicator:`motion-safe:data-[state=indeterminate]:animate-[swing_2s_var(--ease-in-out)_infinite]`}},{orientation:`vertical`,animation:`swing`,class:{indicator:`motion-safe:data-[state=indeterminate]:animate-[swing-vertical_2s_var(--ease-in-out)_infinite]`}},{orientation:`horizontal`,animation:`elastic`,class:{indicator:`relative motion-safe:data-[state=indeterminate]:animate-[elastic_2s_var(--ease-in-out)_infinite]`}},{orientation:`vertical`,animation:`elastic`,class:{indicator:`relative motion-safe:data-[state=indeterminate]:animate-[elastic-vertical_2s_var(--ease-in-out)_infinite]`}}],defaultVariants:{animation:`carousel`,color:`primary`,size:`md`}};r(),f(),b();var U={__name:`UProgress`,props:{as:{type:null,required:!1},max:{type:[Number,Array],required:!1},status:{type:Boolean,required:!1},inverted:{type:Boolean,required:!1,default:!1},size:{type:null,required:!1},color:{type:null,required:!1},orientation:{type:null,required:!1,default:`horizontal`},animation:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},getValueLabel:{type:Function,required:!1},getValueText:{type:Function,required:!1},modelValue:{type:[Number,null],required:!1,default:null}},emits:[`update:modelValue`,`update:max`],setup(t,{emit:r}){let i=t,a=r,f=S(),b=O(`progress`,i),{dir:T}=N(),A=C(),j=w(k(b,`getValueLabel`,`getValueText`,`modelValue`),a),M=n(()=>j.value.modelValue===null),P=n(()=>Array.isArray(b.max)),F=n(()=>
6{if(!M.value&&b.max)return Array.isArray(b.max)?b.max.length-1:Number(b.max)}),I=n(()=>{if(!M.value)switch(!0){case j.value.modelValue<0:return 0;case j.value.modelValue>(F.value??100):return 100;default:return Math.round(j.value.modelValue/(F.value??100)*100)}}),L=n(()=>{if(I.value!==void 0)return b.orientation===`vertical`?{transform:`translateY(${b.inverted?``:`-`}${100-I.value}%)`}:T.value===`rtl`?{transform:`translateX(${b.inverted?`-`:``}${100-I.value}%)`}:{transform:`translateX(${b.inverted?``:`-`}${100-I.value}%)`}}),R=n(()=>({"--percent":`${Math.max(I.value??0,0)}%`}));function z(e){return e===Number(b.modelValue)}function U(e){return e===0}function W(e){return e===F.value}function G(e){return e=Number(e),z(e)&&!U(e)?`active`:U(e)&&z(e)?`first`:W(e)&&z(e)?`last`:`other`}let K=n(()=>D({extend:H,...A.ui?.progress||{}})({animation:b.animation,size:b.size,color:b.color,orientation:b.orientation,inverted:b.inverted})),q=n(()=>Object.keys({...H.variants?.color,...A.ui?.progress?.variants?.color})),J=n(()=>b.color&&!q.value.includes(b.color)?b.color:void 0);return(t,n)=>(h(),l(p(E),{as:p(b).as,"data-orientation":p(b).orientation,"data-slot":`root`,class:_(K.value.root({class:[p(b).ui?.root,p(b).class]}))},{default:u(()=>[!M.value&&(p(b).status||f.status)?(h(),e(`div`,{key:0,"data-slot":`status`,class:_(K.value.status({class:p(b).ui?.status})),style:s(R.value)},[v(t.$slots,`status`,{percent:I.value},()=>[c(o(I.value)+`% `,1)])],6)):g(``,!0),d(p(B),y(p(j),{max:F.value,"data-slot":`base`,class:K.value.base({class:p(b).ui?.base}),style:{transform:`translateZ(0)`}}),{default:u(()=>[d(p(V),{"data-slot":`indicator`,class:_(K.value.indicator({class:p(b).ui?.indicator})),style:s([L.value,J.value?{backgroundColor:J.value}:void 0])},null,8,[`class`,`style`])]),_:1},16,[`max`,`class`]),P.value?(h(),e(`div`,{key:1,"data-slot":`steps`,class:_(K.value.steps({class:p(b).ui?.steps})),style:s(J.value?{color:J.value}:void 0)},[(h(!0),e(x,null,m(p(b).max,(n,r)=>(h(),e(`div`,{key:r,"data-slot":`step`,class:_(K.value.step({class:p(b).ui?.step,step:G(r)}))},[v(t.$slots,`step-${r}`,{step:n},()=>[c(o(n),1)])],2))),128))],6)):g(``,!0)]),_:3},8,[`as`,`data-orientation`,`class`]))}};export{U as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.