import{u as w}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{m as F}from"./vendor-vueform-slider-CCH9_7pb.js";import{u as j}from"./useAppearanceTypography-BBl5RU11.js";import{d as P,e as v,f as n,i,x as u,j as S,t as p,F as A,r as B}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{u as m,t as R}from"./vendor-vue-reactivity-CheHbvBM.js";import{a as d,t as f,b as z}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 D={class:"slider-min-max"},E={class:"label"},L={class:"label"},$={key:0,class:"custom-marks"},W=P({__name:"MultiPoint",props:{field:{}},setup(k){w(a=>({"40568a6a":m(b),"1777c810":m(y),"4e5d4cc8":m(g)}));const{textColor:g,accentColor:b,containerColor:y}=j(),_=k,{field:l}=R(_),c=(a,s)=>{const e=Number(a);return Number.isFinite(e)?e:s},t=v(()=>c(l.value.min??l.value.minValue,0)),r=v(()=>{const a=c(l.value.max??l.value.maxValue,t.value+100);return a>t.value?a:t.value+1}),h=v(()=>{if(l.value.jump)return 1;const a=c(l.value.step,1);return a>0?a:1}),o=v(()=>{const a=Array.isArray(l.value.values)?l.value.values:[],s=a[0]??l.value.default??l.value.defaultValue??t.value,e=a[1]??r.value,x=Math.min(r.value,Math.max(t.value,c(s,t.value))),M=Math.min(r.value,Math.max(x,c(e,r.value)));return[x,M]}),N=a=>{const s=a.toFixed(2);return parseFloat(s).toString()},C=v(()=>{var s;return(((s=l.value.scalePoints)==null?void 0:s.trim())||"").split(",").map(e=>Number(e.trim())).filter(e=>!isNaN(e)&&e>=t.value&&e<=r.value)}),V=a=>{const s=Math.max(1,r.value-t.value);return{left:`${(a-t.value)/s*100}%`}};return(a,s)=>(i(),n("div",{class:d(["slider-wrapper ccb-multi-point-multi-range-field",{jump:m(l).jump}])},[u("div",D,[u("div",{class:d(["slider-min-max-item",{first:o.value[0]==t.value}])},[s[0]||(s[0]=u("span",{class:"tick"},null,-1)),u("span",E,f(t.value),1)],2),u("div",{class:d(["slider-min-max-item",{done:o.value[0]>=r.value}])},[s[1]||(s[1]=u("span",{class:"tick"},null,-1)),u("span",L,f(r.value),1)],2)]),S(m(F),{style:{margin:"10px 0"},format:N,min:t.value,max:r.value,step:h.value,disabled:!0,"model-value":o.value,"show-tooltip":"focus"},null,8,["min","max","step","model-value"]),m(l).scalePoints?(i(),n("div",$,[(i(!0),n(A,null,B(C.value,e=>(i(),n("div",{key:e,class:"mark",style:z(V(e))},[e!==t.value&&e!==r.value?(i(),n("div",{key:0,class:d(["tick",{"tick-passed":e>=o.value[0]&&e<=o.value[1]}])},null,2)):p("",!0),e!==t.value&&e!==r.value?(i(),n("div",{key:1,class:d(["label",{"label-passed":e<=o.value[0]}])},f(e),3)):p("",!0)],4))),128))])):p("",!0)],2))}});export{W as default};
//# sourceMappingURL=MultiPoint-DtUcgXhT.js.map
