1import{r as g,j as e}from"./main-BMeC9Xn2.js";const j="/assets/small-condition-bike-CWK1JI9L.png",v=["New","Excellent","Very Good","Good","Fair"],y={New:"ð",Excellent:"ð","Very Good":"ð",Good:"ð",Fair:"ð"},S={New:"Never ridden, showroom condition with all original components. The bike is clean, fully functional, and shows no visible wear.",Excellent:"Lightly ridden and exceptionally well maintained. Components are fully functional and cosmetic wear is minimal to none.","Very Good":"Moderately ridden and well maintained. Minor cosmetic wear may be visible but the bike is clean and mechanically sound.",Good:"Regularly ridden with visible wear from normal use. The bike remains rideable and functional, though some parts may show aging.",Fair:"Heavily used with clear cosmetic wear and possible repair needs. The bike may require component service or replacement."};function k({selectedCondition:i,onChange:m,compact:n=!1,showNotes:r=!0,options:a=v,sideContent:p}){const[u,o]=g.useState(!1),c=g.useRef(null),d=Math.max(0,a.indexOf(i)),s=a.length-1,h=t=>{if(!c.current)return;const x=c.current.getBoundingClientRect(),l=(t-x.left)/x.width,w=Math.min(1,Math.max(0,l)),N=Math.round(w*s),b=a[N];b&&m(b)};return a.length<2?null:e.jsxs("div",{className:`rounded-[14px] border border-[#d8dfe8] bg-white ${n?"px-4 py-4":"px-3 py-4 sm:px-6 sm:py-5"}`,children:[e.jsxs("div",{className:`grid gap-5 ${n?"":"sm:grid-cols-[1.5fr_0.6fr] sm:items-center"}`,children:[e.jsx("div",{children:e.jsxs("div",{className:`relative touch-none ${n?"pt-2 pb-10":"pt-3 pb-12 sm:pb-10"}`,onPointerMove:t=>{u&&h(t.clientX)},onPointerUp:()=>o(!1),onPointerLeave:()=>o(!1),children:[e.jsxs("div",{ref:c,className:"relative mx-4 sm:mx-6",children:[e.jsx("div",{className:"h-[16px] rounded-[800px] bg-[#EAF8FF] shadow-[inset_0_2px_6px_rgba(42,131,172,0.2)]"}),e.jsx("input",{type:"range",min:0,max:s,step:1,value:d,"aria-valuetext":i,onChange:t=>{const x=Number(t.target.value),l=a[x];l&&m(l)},className:"absolute inset-x-0 top-[-10px] h-[72px] cursor-pointer opacity-0 sm:h-[76px]","aria-label":"Condition slider"}),e.jsxs("div",{role:"slider","aria-valuenow":d,"aria-valuemin":0,"aria-valuemax":s,className:"absolute top-[-10px] flex h-[48px] w-[36px] -translate-x-1/2 cursor-grab flex-col items-center justify-center rounded-[999px] border border-[#2E8FC4] bg-[#4DA9DF] text-white shadow-[0_6px_14px_rgba(52,140,190,0.24)] active:cursor-grabbing sm:top-[-16px] sm:h-[60px] sm:w-[44px]",style:{left:`${d/s*100}%`},onPointerDown:t=>{t.preventDefault(),o(!0),h(t.clientX)},onClick:t=>t.preventDefault(),"aria-label":`Selected condition ${i}`,children:[e.jsx("span",{className:"text-[16px] leading-none sm:text-[20px]",children:y[i]}),e.jsxs("span",{className:"mt-1 flex items-center gap-[2px] sm:mt-1.5 sm:gap-[3px]",children:[e.jsx("span",{className:"block h-[2.5px] w-[2.5px] rounded-full bg-white/90 sm:h-[3px] sm:w-[3px]"}),e.jsx("span",{className:"block h-[2.5px] w-[2.5px] rounded-full bg-white/90 sm:h-[3px] sm:w-[3px]"}),e.jsx("span",{className:"block h-[2.5px] w-[2.5px] rounded-full bg-white/90 sm:h-[3px] sm:w-[3px]"}),e.jsx("span",{className:"block h-[2.5px] w-[2.5px] rounded-full bg-white/90 sm:h-[3px] sm:w-[3px]"})]})]})]}),e.jsx("div",{className:n?"pt-6":"pt-8 sm:pt-10",children:e.jsx("div",{className:"relative mx-4 mt-3 h-[30px] sm:mx-6 sm:mt-4 sm:h-[34px]",children:a.map((t,x)=>{const l=i===t;return e.jsxs("button",{type:"button",onClick:()=>m(t),className:"absolute top-0 -translate-x-1/2 text-center",style:{left:`${x/s*100}%`},children:[e.jsx("div",{className:`mx-auto h-[6px] w-[6px] rounded-full ${l?"bg-[#4da9df]":"bg-[#1f2530]"}`}),e.jsx("p",{className:`mt-1.5 text-[11px] font-medium whitespace-nowrap sm:mt-2 sm:text-base sm:font-normal ${l?"text-[#2d89be]":"text-[#1f2530]"}`,children:t})]},t)})})})]})}),n?null:e.jsx("div",{className:"flex flex-col items-center justify-center gap-3 text-center sm:flex-row sm:items-center sm:justify-end sm:gap-3 sm:text-left sm:whitespace-nowrap",children:p??e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-lg font-semibold text-[#2b2f38] sm:text-xl",children:i}),e.jsx("img",{src:j,alt:"Bike preview",className:"h-[90px] w-[190p
1x] object-contain sm:h-[84px] sm:w-[140px]"})]})})]}),r?e.jsxs("div",{className:n?"mt-5":"mt-5 rounded-[10px] p-0 sm:p-4",children:[e.jsx("h3",{className:"text-[18px] font-semibold text-[#1f2530] sm:text-2xl sm:font-medium",children:"Condition Notes:"}),e.jsx("p",{className:"mt-2 text-[18px] font-semibold text-[#1f2530] sm:text-xl",children:i}),e.jsx("p",{className:"mt-1 text-sm leading-[1.5] text-[#424851] sm:text-base",children:S[i]})]}):null]})}const f=["XXS","XS","S","SM","M","M/L","L","XL","XXL","XXXL","ONE SIZE","KIDS"],X=["XXS","XS","S","SM","M","M/L","L","XL","XXL","XXXL","One Size","Kids"];function E(i){const m=i.length>0?i:X,n=Array.from(new Set(m.map(s=>s.trim()).filter(Boolean))),r=s=>s.toUpperCase(),a=s=>/"/.test(s),p=s=>/^\d+(\.\d+)?$/.test(s),u=s=>/\bcm\b/i.test(s),o=s=>!a(s)&&!p(s)&&!u(s),c=n.filter(s=>o(s)&&f.includes(r(s))).sort((s,h)=>f.indexOf(r(s))-f.indexOf(r(h))),d=n.filter(s=>o(s)&&!f.includes(r(s)));return[...c,...d,...n.filter(p),...n.filter(u),...n.filter(a)]}export{k as C,v as a,S as c,E as g};
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.