import{u as S}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{m as A}from"./vendor-vueform-slider-CCH9_7pb.js";import{u as B}from"./useAppearanceTypography-BBl5RU11.js";import{d as P,e as m,f as n,i,x as o,j as R,t as f,F as _,r as x}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{u,t as z}from"./vendor-vue-reactivity-CheHbvBM.js";import{t as v,b as D,a as h}from"./vendor-vue-shared-DrzsEcag.js";import"./useAppearanceStore-IzenP-G4.js";import"./vendor-pinia-BSPefQhS.js";import"./vendor-axios-xsH4HHeE.js";import"./vendor-vue3-toastify-DBGjcIyK.js";const E={class:"slider-min-max"},L={class:"slider-min-max-item first"},$={class:"label"},q={class:"slider-min-max-item"},G={class:"label"},H={class:"custom-ticks"},I={key:0,class:"custom-marks"},ee=P({__name:"Modern",props:{field:{}},setup(k){S(a=>({"521405dc":u(y),"2af8575f":u(C),"4133afce":u(g),"79ecd88c":u(b)}));const{borderColor:b,textColor:g,accentColor:y,containerColor:C}=B(),N=k,{field:s}=z(N),c=(a,t)=>{const e=Number(a);return Number.isFinite(e)?e:t},l=m(()=>c(s.value.min??s.value.minValue,0)),r=m(()=>{const a=c(s.value.max??s.value.maxValue,l.value+100);return a>l.value?a:l.value+1}),V=m(()=>{if(s.value.jump)return 1;const a=c(s.value.step,1);return a>0?a:1}),d=m(()=>{const a=Array.isArray(s.value.values)?s.value.values:[],t=a[0]??s.value.default??s.value.defaultValue??l.value,e=a[1]??r.value,p=Math.min(r.value,Math.max(l.value,c(t,l.value))),j=Math.min(r.value,Math.max(p,c(e,r.value)));return[p,j]}),M=a=>{const t=a.toFixed(2);return parseFloat(t).toString()},w=m(()=>{var t;return(((t=s.value.scalePoints)==null?void 0:t.trim())||"").split(",").map(e=>Number(e.trim())).filter(e=>!isNaN(e)&&e>=l.value&&e<=r.value)}),F=a=>{const t=Math.max(1,r.value-l.value);return{left:`${(a-l.value)/t*100}%`}};return(a,t)=>(i(),n("div",{class:h(["slider-wrapper ccb-modern-multi-range-field",{jump:u(s).jump}])},[o("div",E,[o("div",L,[o("span",$,v(l.value),1)]),o("div",q,[o("span",G,v(r.value),1)])]),R(u(A),{style:{margin:"10px 0"},format:M,min:l.value,max:r.value,step:V.value,disabled:!0,"model-value":d.value,"show-tooltip":"focus"},null,8,["min","max","step","model-value"]),o("div",H,[(i(),n(_,null,x(25,e=>o("div",{key:e,class:"tick"})),64))]),u(s).scalePoints?(i(),n("div",I,[t[0]||(t[0]=o("div",{class:"stick-line"},[o("div",{class:"stick-line-item"})],-1)),(i(!0),n(_,null,x(w.value,e=>(i(),n("div",{key:e,class:"mark",style:D(F(e))},[e!==l.value&&e!==r.value?(i(),n("div",{key:0,class:h(["label",{"label-passed":e<=d.value[0]}])},v(e),3)):f("",!0)],4))),128))])):f("",!0)],2))}});export{ee as default};
//# sourceMappingURL=Modern-C7XHnWa8.js.map
