PageSourceSearch

https://www.betterstudio.io/assets/product-scoring-Ds7GTJN9.js

js betterstudio.io collected 2026-10-04 05:10:09 UTC 51,181 bytes, 26 lines download raw bytes

1import{d as _,E as ce,r as m,j as e,S as de,N as xe,F as me,ak as p,ap as R,ag as Z,l as ee,ao as $,K as se,J as ue}from"./index-D4PCjVzM.js";import{L as K}from"./link-BLwo-a88.js";import{E as te}from"./eye-B4DpBxJ0.js";import{S as V}from"./shirt-C2hJA4zX.js";import{P as U}from"./package-BJMMoJjB.js";import{P as X}from"./palette-DOrjGPUa.js";import{I as pe}from"./image-CGx8Okvb.js";import{C as le}from"./circle-check-B699A7wq.js";/**
2 * @license lucide-react v0.453.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const he=_("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
7 * @license lucide-react v0.453.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const ae=_("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
12 * @license lucide-react v0.453.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const ge=_("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);/**
17 * @license lucide-react v0.453.0 - ISC
18 *
19 * This source code is licensed under the ISC license.
20 * See the LICENSE file in the root directory of this source tree.
21 */const re=_("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
22 * @license lucide-react v0.453.0 - ISC
23 *
24 * This source code is licensed under the ISC license.
25 * See the LICENSE file in the root directory of this source tree.
26 */const fe=_("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),n={initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,ease:"easeOut"}};function J(r,a=!1){return a?r<=.3?"#27B32C":r<=.6?"#FFB800":"#E51C00":r>=70?"#27B32C":r>=30?"#FFB800":"#E51C00"}function oe(r){return r<=30?"#27B32C":r<=60?"#FFB800":"#E51C00"}function ne(r,a){return a?a.replace(/_/g," "):r<=.25?"easy":r<=.5?"moderate":r<=.75?"hard":"very hard"}const ie={COLOR:{bg:"#FFF2F5",text:"#FF2551"},STRUCTURE:{bg:"#E8F8E8",text:"#27B32C"},MATERIAL:{bg:"#FCE8F3",text:"#D72278"},HARDWARE:{bg:"#E8F8E8",text:"#27B32C"},LOGO:{bg:"#F1E9FB",text:"#8A43E1"},TEXT:{bg:"#FFF8E6",text:"#C28800"},PRINTS:{bg:"#FFF2F5",text:"#FF2551"},ACCESSORIES:{bg:"#E8F0FE",text:"#3B72DE"},SPECIAL_FEATURES:{bg:"#F5F0FF",text:"#7C3AED"}};function Q({value:r,segments:a=3,color:i}){const d=Math.round(r/100*a);return e.jsx("div",{className:"flex gap-1 w-full",children:Array.from({length:a}).map((h,s)=>e.jsx("div",{className:"h-2 flex-1 rounded-full",style:{backgroundColor:s<d?i:"#F2EEEB"}},s))})}function Te(){const[,r]=ce("/tools/product-scoring/:shareId"),a=r==null?void 0:r.shareId,[i,d]=m.useState("input"),[h,s]=m.useState("image"),[F,A]=m.useState(""),[k,E]=m.useState(null),[C,o]=m.useState(!1),[w,t]=m.useState(null),[b,g]=m.useState(""),N=m.useRef(null),[P,D]=m.useState([]),[M,B]=m.useState([]),[q,O]=m.useState({}),[G,L]=m.useState(null),[H,z]=m.useState(!1);m.useEffect(()=>{a&&(L(a),fetch(`/api/tools/scoring-results/${a}`).then(c=>c.json()).then(c=>{c.success&&c.data?(t(c.data),d("results")):(g("This scoring result was not found or has expired."),d("error"))}).catch(()=>{g("Failed to load scoring results."),d("error")}))},[a]);const W=m.useCallback(()=>{t({productName:"Fleece Funny Fleece Fz Uni",brand:"A.S.Adventure",category:"fleece_midlayer",subCategory:"fleece_midlayer",classification:{gender:"Unisex",ageGroup:"Adult",garmentType:"Jacket",subType:"Full-Zip Fleece"}
26,color:{name:"Navy Blue / Orange / Light Sage",hex:"#3B4F78"},material:"Fleece",pattern:"Art",scores:{quality:95,visibility:100,challenge:.75},difficultyLevel:"hard",challengeAssessment:{confidence:78,reasoning:"The reference image is clean, sharp, and front-facing with the full garment visible, which helps AI alignment and feature transfer. However, the jacket is moderately hard for virtual try-on because the sherpa fleece has high-frequency pile texture that must remain consistent under deformation, and the all-over print spans seams and panels (raglan shoulders, center zip), requiring accurate warping without pattern drift. Multiple zippers and bindings add additional edge-precision needs around the center front, pockets, and chest pocket. Overall difficulty is moderate-to-high due to texture + print + hardware combined."},difficultyFactors:{text:0,logo:0,hardware:55,structure:50,pattern:85,material:80,referenceQuality:95},detectedFeatures:[{category:"MATERIAL",description:"High-pile sherpa/teddy fleece texture with visible looped pile across the entire garment",tags:["sherpa","teddy","high-pile","textured","polyester-fleece"]},{category:"PATTERN",description:"All-over abstract scenic/landscape motif with large blocks and linework across body and sleeves",tags:["all-over-print","abstract","scenic","large-scale","multi-color"]},{category:"STRUCTURE",description:"Stand collar with full-length center-front zipper; raglan sleeve construction",tags:["stand-collar","full-zip","raglan","outerwear"]},{category:"HARDWARE",description:"Center-front zipper plus zippered chest pocket and two zippered hand pockets",tags:["zipper","coil-zip","chest-pocket","hand-pockets","pull-tabs"]},{category:"STRUCTURE",description:"Binding/trim at hem and cuffs for clean edges and shape retention",tags:["binding","hem-trim","cuff-trim","edge-finish"]},{category:"COLOR",description:"Dominant navy/steel blue with orange and light sage/cream accents",tags:["navy","orange","sage","multi-tone"]}],scoringModules:["COLOR_ANALYSIS","MATERIAL_ASSESSMENT","PATTERN_COMPLEXITY","HARDWARE_ANALYSIS","STRUCTURAL_ANALYSIS","LOGO_DETECTION"],fitProfile:{fit:"Regular",length:"Regular",silhouette:"Boxy fleece jacket with straight hem and moderate ease through torso and sleeves"},constructionDetails:{neckline:"Stand collar (mock neck) with zipper guard",sleeveType:"Long sleeve, raglan",buildFinish:"Mid-to-high quality outdoor fleece finishing; consistent stitching and clean bindings; multiple pocket zipper installations",structure:"Medium-structure outerwear: plush pile adds volume; collar stands; seams/panels and zipper tape create rigid edges that must stay straight in try-on"},metadata:{analyzedAt:new Date().toISOString(),imageSource:"demo",productImages:["/images/demo/fleece-front.jpg","/images/demo/fleece-back.jpg","/images/demo/fleece-detail.jpg"]}}),d("results")},[]),l=m.useCallback(async()=>{g("");try{if(h==="url"){if(!F.trim())throw new Error("Please enter a product URL");d("scraping");const c=await fetch("/api/tools/scrape-images",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:F.trim()})});if(!c.ok){const S=await c.json().catch(()=>({}));throw new Error(S.error||`Failed to scan page (${c.status})`)}const x=await c.json();if(!x.success)throw new Error(x.error||"Failed to scan page");const y=x.images||[],v=x.metadata||{};if(O({productName:v.productName,brand:v.brand,sourceUrl:v.sourceUrl}),y.length===0)throw new Error("No product images found on this page");y.length===1?(d("loading"),await u({url:F.trim(),selectedImageUrls:[y[0]]})):(D(y),B([]),d("select-images"))}else{if(!k)throw new Error("Please select an image file");d("loading");const c=await new Promise((x,y)=>{const v=new FileReader;v.onload=()=>{const S=v.result;x(S.split(",")[1])},v.onerror=y,v.readAsDataURL(k)});await u({imageBase64:c})}}catch(c){g(c.message||"Something went wrong. Please try again."),d("error")}},[h,F,k]),u=m.useCallback(async c=>{const x=await fetch("/api/tools/analyze-garment",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)});if(!x.ok){const v=await x.json().catch(()=>({}));throw new Error(v.message||v.error||`Analysis failed (${x.status})`)}const y=await x.json();if(!y.success||!y.data)throw new Error(y.error||"Analysis returned no data");t(y.data),d("results");try{const S=await(await fetch("/api/tools/scoring-results",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({results:y.data})})).json();S.success&&S.shareId&&(L(S.shareId),window.history.replaceState(null,"",`/tools/product-scoring/${S.shareId}`))}catch{}},[]),j=m.useCallback(async()=>{d("loading"),g("");try{await u({url:F.trim(),selectedImageUrls:M})}catch(c){g(c.message||"Something went wrong. Please try again."),d("error")}},[F,M,u]),f=()=>{d("input"),t(null),A(""),E(null),g(""),D([]),B([]),O({}),L(null),z(!1),window.history.replaceState(null,"","/tools/product-scoring")},I=m.useCallback(c=>{c.preventDefault(),o(!1);const x=c.dataTransfer.files[0];x&&/\.(jpg|jpeg|png|webp)$/i.test(x.name)&&E(x)},[]),Y=m.useCallback(c=>{var y;const x=(y=c.target.files)==null?void 0:y[0];x&&E(x)},[]);return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsx(de,{title:"AI Garment Difficulty Scorer | Better Studio",description:"Discover how challenging your garments are for AI fashion photography. Get detailed difficulty scores, factor breakdowns, and smart recommendations.",url:"https://betterstudio.io/tools/product-scoring"}),e.jsx(xe,{}),i==="input"&&e.jsx(ye,{inputMode:h,setInputMode:s,url:F,setUrl:A,selectedFile:k,setSelectedFile:E,dragOver:C,setDragOver:o,handleFileDrop:I,handleFileSelect:Y,fileInputRef:N,handleAnalyze:l,onLoadDemo:W}),i==="scraping"&&e.jsx(be,{}),i==="select-images"&&e.jsx(Fe,{images:P,selectedImages:M,onToggleImage:c=>{B(x=>x.includes(c)?x.filter(y=>y!==c):x.length<3?[...x,c]:x)},onConfirm:j,onBack:()=>{d("input"),D([]),B([])},metadata:q}),i==="loading"&&e.jsx(je,{}),i==="error"&&e.jsx(Ne,{errorMsg:b,onRetry:f}),i==="results"&&w&&e.jsx(ve,{results:w,onReset:f,shareId:G,shareCopied:H,setShareCopied:z}),e.jsx(me,{})]})}function ye({inputMode:r,setInputMode:a,url:i,setUrl:d,selectedFile:h,setSelectedFile:s,dragOver:F,setDragOver:A,handleFileDrop:k,handleFileSelect:E,fileInputRef:C,handleAnalyze:o,onLoadDemo:w}){return e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"pt-32 pb-12 px-4 sm:px-6",children:e.jsxs(p.div,{...n,className:"max-w-3xl mx-auto text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-1.5 rounded-full text-xs font-semibold tracking-wider up
26percase mb-6",style:{backgroundColor:"#FFF2F5",color:"#FF2551"},children:[e.jsx(R,{className:"w-3.5 h-3.5"}),"Built by the AI Fashion Experts"]}),e.jsxs("h2",{className:"font-figtree text-4xl sm:text-5xl font-extrabold leading-[1.1] tracking-tight mb-5",style:{color:"#17172D"},children:["Test Your Garment",e.jsx("br",{}),"Before AI Production"]}),e.jsx("div",{className:"w-20 h-1 mx-auto rounded-full mb-6",style:{background:"linear-gradient(90deg, #FF2551, #FFB800)"}}),e.jsx("p",{className:"text-lg leading-relaxed max-w-xl mx-auto",style:{color:"#62627E"},children:"We know AI isn't perfect. Every garment brings its own complexity. That's why we built this tool. Upload your product and instantly see how it will perform in AI production, scored by the same technology we use every day for millions of garmets. "})]})}),e.jsx("section",{className:"pb-12 px-4 sm:px-6",children:e.jsx(p.div,{...n,className:"max-w-2xl mx-auto",children:e.jsxs("div",{className:"rounded-xl p-5",style:{border:"1px solid #F2EEEB",backgroundColor:"#FFFFFF"},children:[e.jsxs("div",{className:"flex gap-1 p-1 rounded-lg mb-5",style:{backgroundColor:"#FAF7F5"},children:[e.jsxs("button",{onClick:()=>a("url"),className:"flex-1 flex items-center justify-center gap-2 py-2.5 rounded-lg text-sm font-medium transition-all duration-200",style:{backgroundColor:r==="url"?"#FFFFFF":"transparent",color:r==="url"?"#17172D":"#9292A6",border:r==="url"?"1px solid #F2EEEB":"1px solid transparent"},children:[e.jsx(K,{className:"w-4 h-4"}),"Paste URL",e.jsx("span",{className:"text-[10px] font-semibold uppercase px-1.5 py-0.5 rounded",style:{backgroundColor:"#FFF2F5",color:"#FF2551",letterSpacing:"0.05em"},children:"Beta"})]}),e.jsxs("button",{onClick:()=>a("image"),className:"flex-1 flex items-center justify-center gap-2 py-2.5 rounded-lg text-sm font-medium transition-all duration-200",style:{backgroundColor:r==="image"?"#FFFFFF":"transparent",color:r==="image"?"#17172D":"#9292A6",border:r==="image"?"1px solid #F2EEEB":"1px solid transparent"},children:[e.jsx(Z,{className:"w-4 h-4"}),"Upload Image"]})]}),r==="url"?e.jsxs("div",{className:"space-y-4",children:[e.jsx("input",{type:"url",value:i,onChange:t=>d(t.target.value),placeholder:"https://example.com/product/your-garment",className:"w-full px-4 py-3 rounded-lg text-sm outline-none transition-all",style:{border:"1px solid #E5DDD6",color:"#17172D",fontFamily:"Figtree, sans-serif"},onFocus:t=>{t.target.style.borderColor="#FF2551",t.target.style.boxShadow="0 0 0 3px #FFF2F5"},onBlur:t=>{t.target.style.borderColor="#E5DDD6",t.target.style.boxShadow="none"},onKeyDown:t=>{t.key==="Enter"&&o()}}),e.jsxs("button",{onClick:o,disabled:!i.trim(),className:"w-full py-3 rounded-lg text-white font-medium text-sm flex items-center justify-center gap-2 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed",style:{backgroundColor:i.trim()?"#FF2551":"#FFDCE3",color:i.trim()?"#FFFFFF":"#FF9CB0"},onMouseEnter:t=>{i.trim()&&(t.target.style.backgroundColor="#D91D43")},onMouseLeave:t=>{i.trim()&&(t.target.style.backgroundColor="#FF2551")},children:[e.jsx(R,{className:"w-4 h-4"}),"Score My Product"]})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{onDragOver:t=>{t.preventDefault(),A(!0)},onDragLeave:()=>A(!1),onDrop:k,onClick:()=>{var t;return(t=C.current)==null?void 0:t.click()},className:"rounded-xl p-8 text-center cursor-pointer transition-all duration-200",style:{border:`2px dashed ${F?"#FF2551":"#E5DDD6"}`,backgroundColor:F?"#FFF2F5":"#FAF7F5"},children:[e.jsx("input",{ref:C,type:"file",accept:".jpg,.jpeg,.png,.webp",onChange:E,className:"hidden"}),e.jsx(Z,{className:"w-10 h-10 mx-auto mb-3",style:{color:"#9292A6"}}),h?e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",style:{color:"#17172D"},children:h.name}),e.jsxs("p",{className:"text-xs mt-1",style:{color:"#9292A6"},children:[(h.size/1024/1024).toFixed(2)," MB"]}),e.jsx("button",{onClick:t=>{t.stopPropagation(),s(null)},className:"text-xs mt-2 underline",style:{color:"#FF2551"},children:"Remove"})]}):e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",style:{color:"#17172D"},children:"Drop your product image here"}),e.jsx("p",{className:"text-xs mt-1",style:{color:"#9292A6"},children:"or click to browse · JPG, PNG, WebP"})]})]}),e.jsxs("button",{onClick:o,disabled:!h,className:"w-full py-3 rounded-lg text-white font-medium text-sm flex items-center justify-center gap-2 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed",style:{backgroundColor:h?"#FF2551":"#FFDCE3",color:h?"#FFFFFF":"#FF9CB0"},onMouseEnter:t=>{h&&(t.target.style.backgroundColor="#D91D43")},onMouseLeave:t=>{h&&(t.target.style.backgroundColor="#FF2551")},children:[e.jsx(R,{className:"w-4 h-4"}),"Score My Product"]})]})]})})}),e.jsx("section",{className:"pb-20 px-4 sm:px-6",children:e.jsxs("div",{className:"max-w-6xl mx-auto 
26space-y-8",children:[e.jsxs(p.div,{...n,className:"text-center mb-2",children:[e.jsx("h3",{className:"font-figtree text-3xl sm:text-4xl font-extrabold leading-tight tracking-tight mb-3",style:{color:"#17172D"},children:"What Our Analysis Reveals"}),e.jsx("div",{className:"w-16 h-1 mx-auto rounded-full mb-4",style:{background:"linear-gradient(90deg, #FF2551, #FFB800)"}}),e.jsx("p",{className:"text-base leading-relaxed max-w-2xl mx-auto",style:{color:"#62627E"},children:"Every garment tells a different story in AI production. Our scoring engine, trained on thousands of real fashion shoots, breaks down exactly what makes yours easy or challenging."})]}),e.jsxs(p.div,{...n,transition:{...n.transition,delay:.1},className:"rounded-xl p-5",style:{border:"1px solid #F2EEEB"},children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider mb-4",style:{color:"#9292A6",letterSpacing:"0.08em"},children:"AI Difficulty Scores"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[{label:"Quality",value:95,icon:e.jsx(ee,{className:"w-5 h-5"}),pct:!0},{label:"Visibility",value:100,icon:e.jsx(te,{className:"w-5 h-5"}),pct:!0},{label:"Challenge",value:.75,icon:e.jsx(re,{className:"w-5 h-5"}),pct:!1}].map((t,b)=>{const g=t.pct?`${Math.round(t.value)}%`:t.value.toFixed(2),N=t.pct?J(t.value):J(t.value,!0),P=t.pct?t.value:t.value*100,D=t.pct?3:2;return e.jsxs("div",{className:"rounded-xl p-4",style:{backgroundColor:"#FAF7F5",border:"1px solid #F2EEEB"},children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("span",{style:{color:N},children:t.icon}),e.jsx("span",{className:"text-sm font-medium",style:{color:"#62627E"},children:t.label})]}),e.jsxs("div",{className:"flex items-baseline gap-2 mb-3",children:[e.jsx("span",{className:"font-figtree text-3xl font-extrabold",style:{color:"#17172D"},children:g}),!t.pct&&e.jsx("span",{className:"text-xs font-medium px-2 py-0.5 rounded-full",style:{backgroundColor:N+"20",color:N},children:ne(t.value)})]}),e.jsx(Q,{value:P,segments:D,color:N})]},t.label)})})]}),e.jsxs(p.div,{...n,transition:{...n.transition,delay:.2},className:"rounded-xl p-5",style:{border:"1px solid #F2EEEB"},children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider mb-4",style:{color:"#9292A6",letterSpacing:"0.08em"},children:"Product Identification"}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-5",children:[e.jsx("div",{className:"sm:w-40 flex-shrink-0",children:e.jsx("div",{className:"rounded-xl overflow-hidden aspect-square",style:{backgroundColor:"#FAF7F5"},children:e.jsx("img",{src:"/images/demo/fleece-front.jpg",alt:"Fleece Funny Fleece Fz Uni",className:"w-full h-full object-cover"})})}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wider mb-1",style:{color:"#FF2551"},children:"fleece_midlayer"}),e.jsx("p",{className:"text-xs",style:{color:"#9292A6"},children:"A.S.Adventure"}),e.jsx("h4",{className:"font-figtree text-lg font-bold mt-0.5",style:{color:"#17172D"},children:"Fleece Funny Fleece Fz Uni"})]}),e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[e.jsx("span",{className:"px-3 py-1 rounded-full text-xs font-medium",style:{border:"1px solid #F2EEEB",color:"#17172D"},children:"Unisex"}),e.jsx("span",{className:"px-3 py-1 rounded-full text-xs font-medium",style:{border:"1px solid #F2EEEB",color:"#17172D"},children:"Adult"}),e.jsx("span",{className:"px-3 py-1 rounded-full text-xs font-semibold",style:{border:"1px solid #F2EEEB",color:"#17172D"},children:"fleece_midlayer / fleece_midlayer"})]}),e.jsx("div",{className:"rounded-xl p-3",style:{backgroundColor:"#FAF7F5",border:"1px solid #F2EEEB"},children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"w-8 h-8 rounded-full flex-shrink-0",style:{backgroundColor:"#3B4F78",border:"1px solid #E5DDD6"}}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] uppercase tracking-wider",style:{color:"#9292A6"},children:"Primary Color"}),e.jsx("p",{className:"text-sm font-bold",style:{color:"#17172D"},children:"Navy Blue / Orange / Light Sage"}),e.jsx("p",{className:"text-xs",style:{color:"#9292A6"},children:"#3B4F78"})]})]})})]})]})]}),e.jsxs(p.div,{...n,transition:{...n.transition,delay:.3},className:"rounded-xl p-5",style:{border:"1px solid #F2EEEB"},children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider mb-4",style:{color:"#9292A6",letterSpacing:"0.08em"},children:"Factor Breakdown"}),e.jsx("div",{className:"space-y-4",children:[{label:"Text",value:0},{label:"Logo",value:0},{label:"Hardware",value:55},{label:"Structure",value:50},{label:"Pattern",value:85},{label:"Material",value:80},{label:"Reference Quality",value:95}].map(t=>{const b=oe(t.value);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx("span",{className:"text-sm font-medium",style:{color:"#17172D"},children:t.label}),e.jsxs("span",{className:"text-xs font-semibold",style:{color:b},children:[Math.round(t.value),"%"]})]}),e.jsx(Q,{value:t.value,segments:5,color:b})]},t.label)})})]}),e.jsxs(p.div,{...n,transition:{...n.transition,delay:.4},className:"rounded-xl p-5",style:{border:"1px solid #F2EEEB"},children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider mb-4",style:{color:"#9292A6",letterSpacing:"0.08em"},children:"Detected Features"}),e.jsxs("div",{className:"space-y-3",children:[[{category:"MATERIAL",description:"High-pile sherpa/teddy fleece texture with visible looped pile across the entire garment",tags:["sherpa","teddy","high-pile","textured"]},{category:"PATTERN",description:"All-over abstract scenic/landscape motif with large blocks and linework across body and sleeves",tags:["all-over-print","abstract","scenic","large-scale"]},{category:"STRUCTURE",description:"Stand collar with full-length center-front zipper; raglan sleeve construction",tags:["stand-collar","full-zip","raglan","outerwear"]},{category:"HARDWARE",description:"Center-front zipper plus zippered chest pocket and two zippered hand pockets",tags:["zipper","coil-zip","chest-pocket","hand-pockets"]}].map((t,b)=>{const g=ie[t.category]||{bg:"#F2EEEB",text:"#62627E"};return e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-2 pb-3",style:{borderBottom:b<3?"1px solid #F2EEEB":"none"},children:[e.jsx("span",{className:"inline-flex px-2.5 py-0.5 rounded-full text-xs font-semibold flex-shrink-0 w-fit",style:{backgroundColor:g.bg,color:g.text},children:t.category}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm",style:{color:"#17172D"},children:t.description}),e.jsx("div",{className:"flex flex-wrap gap-1 mt-1.5",children:t.tags.map(N=>e.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs",style:{backgroundColor:"#FAF7F5",color:"#9292A6",border:"1px solid #F2EEEB"},children:N},N))})]})]},b)}),e.jsx("p",{className:"text-xs font-medium pt-1",style:{color:"#9292A6"},children:"… and 2 more features detected"})]})]}),e.jsxs(p.div,{...n,transition:{...n.transition,delay:.5},className:"rounded-xl p-5",style:{border:"1px solid #F2EEEB"},children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider mb-4",style:{color:"#9292A6",letterSpacing:"0.08em"},children:"Fit & Construction Analysis"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wider",style:{color:"#17172D"},children:"Fit Profile"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[e.jsxs("div",{className:"rounded-xl p-3",style:{backgroundColor:"#FAF7F5",border:"1px solid #F2EEEB"},children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[e.jsx(V,{className:"w-3.5 h-3.5",style:{color:"#9292A6"}}),e.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"#9292A6"},children:"Fit"})]}),e.jsx("p",{className:"text-sm font-bold leading-snug",style:{color:"#17172D"},children:"Regular"})]}),e.jsxs("div",{className:"rounded-xl p-3",style:{backgroundColor:"#FAF7F5",border:"1px solid #F2EEEB"},children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[e.jsx($,{className:"w-3.5 h-3.5 rotate-90",style:{color:"#9292A6"}}),e.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"#9292A6"},children:"Length"})]}),e.jsx("p",{className:"text-sm font-bold leading-snug",style:{color:"#17172D"},children:"Regular"})]}),e.jsxs("div",{className:"rounded-xl p-3 sm:col-span-1",style:{backgroundColor:"#FAF7F5",border:"1px solid #F2EEEB"},children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[e.jsx(U,{className:"w-3.5 h-3.5",style:{color:"#9292A6"}}),e.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"#9292A6"},children:"Silhouette"})]}),e.jsx("p",{className:"text-xs font-bold leading-snug",style:{color:"#17172D"},children:"Boxy fleece jacket"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wider",style:{color:"#17172D"},children:"Construction Details"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:[e.jsxs("div",{className:"rounded-xl p-3",style:{backgroundColor:"#FAF7F5",border:"1px solid #F2EEEB"},children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[e.jsx("span",{className:"w-3.5 h-3.5 rounded-full",style:{border:"1.5px solid #9292A6"}}),e.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"#9292A6"},children:"Neckline"})]}),e.jsx("p",{className:"text-xs font-bold leading-snug",style:{color:"#17172D"},children:"Stand collar (mock neck)"})]}),e.jsxs("div",{className:"rounded-xl p-3",style:{backgroundColor:"#FAF7F5",border:"1px solid #F2EEEB"},children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[e.jsx(V,{className:"w-3.5 h-3.5",style:{color:"#9292A6"}}),e.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"#9292A6"},children:"Sleeve"})]}),e.jsx("p",{className:"text-xs font-bold leading-snug",style:{color:"#17172D"},children:"Long sleeve, raglan"})]}),e.jsxs("div",{className:"rounded-xl p-3",style:{backgroundColor:"#FAF7F5",border:"1px solid #F2EEEB"},children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[e.jsx(X,{className:"w-3.5 h-3.5",style:{color:"#9292A6"}}),e.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"#9292A6"},children:"Build"})]}),e.jsx("p",{className:"text-xs font-bold leading-snug",style:{color:"#17172D"},children:"Mid-to-high quality"})]}),e.jsxs("div",{className:"rounded-xl p-3",style:{backgroundColor:"#FAF7F5",border:"1px solid #F2EEEB"},children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[e.jsx(U,{className:"w-3.5 h-3.5",style:{color:"#9292A6"}}),e.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"#9292A6"},children:"Structure"})]}),e.jsx("p",{className:"text-xs font-bold leading-snug",style:{color:"#17172D"},children:"Medium-structure outerwear"})]})]})]})]})]}),e.jsxs(p.div,{...n,transition:{...n.transition,delay:.6},className:"rounded-xl p-8 text-center",style:{backgroundColor:"#FAF7F5",border:"1px solid #F2EEEB"},children:[e.jsx("h3",{className:"font-figtree text-xl font-bold mb-2",style:{color:"#17172D"},children:"Ready to score your own product?"}),e.jsx("p",{className:"text-sm mb-5 max-w-lg mx-auto",style:{color:"#62627E"},children:"Drop your garment image above and get a full complexity breakdown in seconds — the same insights our production team uses before every shoot."}),e.jsxs("button",{onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),className:"inline-flex items-center gap-2 px-6 py-3 rounded-lg text-white text-sm font-medium transition-colors",style:{backgroundColor:"#FF2551"},onMouseEnter:t=>{t.target.style.backgroundColor="#D91D43"},onMouseLeave:t=>{t.target.style.backgroundColor="#FF2551"},children:[e.jsx(R,{className:"w-4 h-4"}),"Score my garment — it's free",e.jsx($,{className:"w-4 h-4"})]})]})]})})]})}function be(){return e.jsx("section",{className:"pt-32 pb-20 px-4 sm:px-6",children:e.jsxs("div",{className:"max-w-md mx-auto text-center",children:[e.jsxs("div",{className:"relative w-24 h-24 mx-auto mb-8",children:[e.jsx("div",{className:"absolute inset-0 rounded-full animate-spin",style:{background:"conic-gradient(from 0deg, #FF2551, #FFB800, #FF2551)",maskImage:"radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px))",WebkitMaskImage:"radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px))",animationDuration:"1.5s"}}),e.jsx("div",{className:"absolute inset-3 rounded-full flex items-center justify-center",style:{backgroundColor:"#FFFFFF"},children:e.jsx(pe,{className:"w-8 h-8 animate-pulse",style:{color:"#FF2551"}})})]}),e.jsx("h3",{className:"font-figtree text-xl font-bold mb-2",style:{color:"#17172D"},children:"Scanning your product page..."}),e.jsx("p",{className:"text-sm",style:{color:"#9292A6"}
26,children:"Detecting garment images so we can assess complexity"})]})})}function Fe({images:r,selectedImages:a,onToggleImage:i,onConfirm:d,onBack:h,metadata:s}){const[F,A]=m.useState(new Set),k=r.filter(o=>!F.has(o)),E=3,C=a.length>=E;return e.jsx("section",{className:"pt-32 pb-20 px-4 sm:px-6",children:e.jsxs(p.div,{...n,className:"max-w-4xl mx-auto",children:[(s.productName||s.brand)&&e.jsxs("div",{className:"text-center mb-4",children:[s.brand&&e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider",style:{color:"#9292A6"},children:s.brand}),s.productName&&e.jsx("h2",{className:"font-figtree text-2xl sm:text-3xl font-extrabold leading-tight tracking-tight mt-1",style:{color:"#17172D"},children:s.productName})]}),e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-base font-medium",style:{color:"#17172D"},children:"Select the best angles — we'll assess each one for AI complexity"}),e.jsxs("p",{className:"text-sm mt-1",style:{color:"#9292A6"},children:[a.length," of ",E," selected (up to ",E,")"]})]}),e.jsxs("button",{onClick:d,disabled:a.length===0,className:"inline-flex items-center gap-2 px-6 py-2.5 rounded-lg text-white text-sm font-medium transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex-shrink-0",style:{backgroundColor:a.length>0?"#FF2551":"#FFDCE3",color:a.length>0?"#FFFFFF":"#FF9CB0"},onMouseEnter:o=>{a.length>0&&(o.currentTarget.style.backgroundColor="#D91D43")},onMouseLeave:o=>{a.length>0&&(o.currentTarget.style.backgroundColor="#FF2551")},children:[e.jsx(R,{className:"w-4 h-4"}),"Score Selected (",a.length,")"]})]}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3 overflow-y-auto pb-4",style:{maxHeight:"60vh"},children:k.map(o=>{const w=a.includes(o),t=!w&&C;return e.jsxs("div",{onClick:()=>!t&&i(o),className:"relative rounded-xl overflow-hidden transition-all duration-200",style:{border:w?"2px solid #FF2551":"2px solid #F2EEEB",cursor:t?"not-allowed":"pointer",opacity:t?.5:1},onMouseEnter:b=>{!t&&!w&&(b.currentTarget.style.borderColor="#FFB800")},onMouseLeave:b=>{w||(b.currentTarget.style.borderColor="#F2EEEB")},children:[e.jsx("div",{className:"aspect-square",style:{backgroundColor:"#FAF7F5"},children:e.jsx("img",{src:o,alt:"Product image",className:"w-full h-full object-cover",loading:"lazy",onError:()=>A(b=>new Set(b).add(o))})}),w&&e.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full flex items-center justify-center",style:{backgroundColor:"#FF2551"},children:e.jsx(le,{className:"w-4 h-4 text-white"})})]},o)})}),e.jsxs("div",{className:"flex items-center justify-between gap-4 pt-4",style:{borderTop:"1px solid #F2EEEB"},children:[e.jsxs("button",{onClick:h,className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-lg text-sm font-medium transition-colors",style:{border:"1px solid #E5DDD6",color:"#17172D"},onMouseEnter:o=>{o.currentTarget.style.borderColor="#FF2551"},onMouseLeave:o=>{o.currentTarget.style.borderColor="#E5DDD6"},children:[e.jsx(se,{className:"w-4 h-4"}),"Back"]}),e.jsxs("button",{onClick:d,disabled:a.length===0,className:"inline-flex items-center gap-2 px-6 py-2.5 rounded-lg text-white text-sm font-medium transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed",style:{backgroundColor:a.length>0?"#FF2551":"#FFDCE3",color:a.length>0?"#FFFFFF":"#FF9CB0"},onMouseEnter:o=>{a.length>0&&(o.currentTarget.style.backgroundColor="#D91D43")},onMouseLeave:o=>{a.length>0&&(o.currentTarget.style.backgroundColor="#FF2551")},children:[e.jsx(R,{className:"w-4 h-4"}),"Score Selected (",a.length,")"]})]})]})})}function je(){return e.jsx("section",{className:"pt-32 pb-20 px-4 sm:px-6",children:e.jsxs("div",{className:"max-w-md mx-auto text-center",children:[e.jsxs("div",{className:"relative w-24 h-24 mx-auto mb-8",children:[e.jsx("div",{className:"absolute inset-0 rounded-full animate-spin",style:{background:"conic-gradient(from 0deg, #FF2551, #FFB800, #FF2551)",maskImage:"radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px))",WebkitMaskImage:"radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px))",animationDuration:"1.5s"}}),e.jsx("div",{className:"absolute inset-3 rounded-full flex items-center justify-center",style:{backgroundColor:"#FFFFFF"},children:e.jsx(R,{className:"w-8 h-8 animate-pulse",style:{color:"#FF2551"}})})]}),e.jsx("h3",{className:"font-figtree text-xl font-bold mb-2",style:{color:"#17172D"},children:"Analyzing your garment..."}),e.jsx("p",{className:"text-sm",style:{color:"#9292A6"},children:"Running our proprietary scoring model to assess AI production complexity"})]})})}function Ne({errorMsg:r,onRetry:a}){return e.jsx("section",{className:"pt-32 pb-20 px-4 sm:px-6",children:e.jsx(p.div,{...n,className:"max-w-lg mx-auto",children:e.jsxs("div",{className:"rounded-xl p-6 text-center",style:{border:"1px solid #FADDDC",backgroundColor:"#FFF8F7"},children:[e.jsx(fe,{className:"w-10 h-10 mx-auto mb-4",style:{color:"#E51C00"}}),e.jsx("h3",{className:"font-figtree text-lg font-bold mb-2",style:{color:"#17172D"},children:"Analysis Failed"}),e.jsx("p",{className:"text-sm mb-5",style:{color:"#62627E"},children:r}),e.jsxs("button",{onClick:a,className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-lg text-white text-sm font-medium transition-colors",style:{backgroundColor:"#FF2551"},onMouseEnter:i=>{i.target.style.backgroundColor="#D91D43"},onMouseLeave:i=>{i.target.style.backgroundColor="#FF2551"},children:[e.jsx(ae,{className:"w-4 h-4"}),"Try Again"]})]})})})}function ve({results:r,onReset:a,shareId:i,shareCopied:d,setShareCopied:h}){var D,M,B,q,O,G,L,H,z,W;const s=r,F=((D=s.scores)==null?void 0:D.quality)??0,A=((M=s.scores)==null?void 0:M.visibility)??0,k=((B=s.scores)==null?void 0:B.challenge)??0,E=ne(k,s.difficultyLevel),C=s.productName||((q=s.metadata)==null?void 0:q.productName),o=s.brand||((O=s.metadata)==null?void 0:O.brand),w=(G=s.metadata)==null?void 0:G.sourceUrl,t=((L=s.metadata)==null?void 0:L.productImages)??[],b=[s.category,s.subCategory].filter(
26Boolean).join(" > "),[g,N]=m.useState(0),P=(l,u)=>u===1?"MAIN":u===2?l===0?"MAIN":"FRONT":l===0?"MAIN":l===1?"FRONT":"DETAIL";return e.jsx("section",{className:"pt-32 pb-16 px-4 sm:px-6",children:e.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[i&&e.jsxs(p.div,{...n,className:"flex items-center justify-between rounded-xl p-4",style:{border:"1px solid #F2EEEB",backgroundColor:"#FAF7F5"},children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:"#FFF2F5"},children:e.jsx(K,{className:"w-4 h-4",style:{color:"#FF2551"}})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-xs font-medium",style:{color:"#9292A6"},children:"Shareable link"}),e.jsxs("p",{className:"text-sm font-medium truncate",style:{color:"#17172D"},children:[window.location.origin,"/tools/product-scoring/",i]})]})]}),e.jsx("button",{onClick:()=>{navigator.clipboard.writeText(`${window.location.origin}/tools/product-scoring/${i}`),h(!0),setTimeout(()=>h(!1),2e3)},className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-all flex-shrink-0 ml-4",style:{backgroundColor:d?"#E8F8E8":"#FF2551",color:d?"#27B32C":"#FFFFFF"},children:d?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4"}),"Copied"]}):e.jsxs(e.Fragment,{children:[e.jsx(ge,{className:"w-4 h-4"}),"Share"]})})]}),e.jsxs(p.div,{...n,className:"rounded-xl overflow-hidden",style:{border:"1px solid #F2EEEB"},children:[e.jsxs("div",{className:"flex flex-col lg:flex-row",children:[t.length>0&&e.jsxs("div",{className:"lg:w-[420px] flex-shrink-0 p-5",children:[e.jsx("div",{className:"rounded-xl overflow-hidden aspect-square relative",style:{backgroundColor:"#FAF7F5"},children:e.jsx("img",{src:t[g]||t[0],alt:C||"Product",className:"w-full h-full object-cover"})}),t.length>1&&e.jsxs("div",{className:"flex items-center gap-1.5 mt-2",children:[e.jsx("button",{onClick:()=>N(l=>Math.max(0,l-1)),disabled:g===0,className:"w-6 h-6 rounded flex items-center justify-center flex-shrink-0 transition-colors disabled:opacity-30",style:{border:"1px solid #F2EEEB",color:"#62627E"},children:e.jsx(se,{className:"w-3 h-3"})}),e.jsx("div",{className:"flex gap-1.5 flex-1 overflow-x-auto",children:t.map((l,u)=>{const j=u===g,f=P(u,t.length);return e.jsxs("button",{onClick:()=>N(u),className:"flex-1 min-w-0 max-w-[80px] rounded overflow-hidden flex flex-col items-center transition-all",style:{border:j?"2px solid #FF2551":"1px solid #F2EEEB",opacity:j?1:.7},children:[e.jsx("div",{className:"w-full aspect-square overflow-hidden",style:{backgroundColor:"#FAF7F5"},children:e.jsx("img",{src:l,alt:f,className:"w-full h-full object-cover"})}),e.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-wider py-1 w-full text-center",style:{color:j?"#F
26F2551":"#9292A6",backgroundColor:j?"#FFF2F5":"#FFFFFF"},children:f})]},u)})}),e.jsx("button",{onClick:()=>N(l=>Math.min(t.length-1,l+1)),disabled:g===t.length-1,className:"w-6 h-6 rounded flex items-center justify-center flex-shrink-0 transition-colors disabled:opacity-30",style:{border:"1px solid #F2EEEB",color:"#62627E"},children:e.jsx(ue,{className:"w-3 h-3"})})]})]}),e.jsxs("div",{className:"flex-1 min-w-0 p-5 lg:pl-0 space-y-4",children:[e.jsxs("div",{children:[s.category&&e.jsx("p",{className:"text-xs font-bold uppercase tracking-wider mb-1.5",style:{color:"#FF2551"},children:s.category}),o&&e.jsx("p",{className:"text-xs",style:{color:"#9292A6"},children:o}),C&&e.jsx("h2",{className:"font-figtree text-2xl font-bold mt-1",style:{color:"#17172D"},children:C}),w&&e.jsxs("a",{href:w,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs mt-2 hover:underline",style:{color:"#FF2551"},children:[e.jsx(K,{className:"w-3 h-3"})," View source"]})]}),s.classification&&e.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[s.classification.gender&&e.jsx("span",{className:"px-3 py-1 rounded-full text-xs font-medium",style:{border:"1px solid #F2EEEB",color:"#17172D"},children:s.classification.gender}),s.classification.ageGroup&&e.jsx("span",{className:"px-3 py-1 rounded-full text-xs font-medium",style:{border:"1px solid #F2EEEB",color:"#17172D"},children:s.classification.ageGroup}),s.category&&e.jsx("span",{className:"px-3 py-1 rounded-full text-xs font-semibold",style:{border:"1px solid #F2EEEB",color:"#17172D"},children:[s.category,s.subCategory].filter(Boolean).join(" / ")})]}),((H=s.color)==null?void 0:H.hex)&&e.jsxs("div",{className:"rounded-xl p-4",style:{backgroundColor:"#FAF7F5",border:"1px solid #F2EEEB"},children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider mb-2.5",style:{color:"#9292A6"},children:"Color"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"w-10 h-10 rounded-full flex-shrink-0",style:{backgroundColor:s.color.hex,border:"1px solid #E5DDD6"}}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wider",style:{color:"#9292A6"},children:"Primary"}),e.jsx("p",{className:"text-sm font-bold",style:{color:"#17172D"},children:s.color.name||"—"}),e.jsx("p",{className:"text-xs",style:{color:"#9292A6"},children:s.color.hex})]})]})]}),(s.material||s.pattern)&&e.jsxs("div",{className:"rounded-xl p-4",style:{backgroundColor:"#FAF7F5",border:"1px solid #F2EEEB"},children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider mb-2.5",style:{color:"#9292A6"},children:"Material & Pattern"}),e.jsxs("div",{className:"flex items-center gap-6",children:[s.material&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(X,{className:"w-4 h-4",style:{color:"#D72278"}}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] uppercase tracking-wider",style:{color:"#9292A6"},children:"Material"}),e.jsx("p",{className:"text-sm font-bold",style:{color:"#17172D"},children:s.material})]})]}),s.pattern&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(U,{className:"w-4 h-4",style:{color:"#8A43E1"}}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] uppercase tracking-wider",style:{color:"#9292A6"},children:"Pattern"}),e.jsx("p",{className:"text-sm font-bold",style:{color:"#17172D"},children:s.pattern})]})]})]})]}),b&&e.jsxs("div",{className:"rounded-xl p-4",style:{backgroundColor:"#FAF7F5",border:"1px solid #F2EEEB"},children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider mb-2",style:{color:"#9292A6"},children:"Category Path"}),e.jsxs("p",{className:"text-sm font-medium",style:{color:"#17172D"},children:[s.category&&e.jsx("span",{children:s.category}),s.subCategory&&e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{color:"#9292A6"},children:" › "}),e.jsx("span",{style:{color:"#FF2551"},children:s.subCategory})]})]})]})]})]}),t.length>0&&e.jsxs("div",{className:"grid grid-cols-3 border-t",style:{borderColor:"#F2EEEB"},children:[e.jsxs("div",{className:"py-4 text-center",style:{borderRight:"1px solid #F2EEEB"},children:[e.jsx("p",{className:"font-figtree text-2xl font-extrabold",style:{color:"#17172D"},children:t.length}),e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider",style:{color:"#9292A6"},children:"Images"})]}),e.jsxs("div",{className:"py-4 text-center",style:{borderRight:"1px solid #F2EEEB"},children:[e.jsx("p",{className:"font-figtree text-2xl font-extrabold",style:{color:"#17172D"},children:((z=s.detectedFeatures)==null?void 0:z.length)??0}),e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider",style:{color:"#9292A6"},children:"Features"})]}),e.jsxs("div",{className:"py-4 text-center",children:[e.jsx("p",{className:"font-figtree text-2xl font-extrabold",style:{color:"#17172D"},children:Object.values(s.difficultyFactors??{}).filter(l=>l!=null).length}),e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider",style:{color:"#9292A6"},children:"Factors"})]})]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[{label:"Quality",value:F,icon:e.jsx(ee,{className:"w-5 h-5"}),pct:!0},{label:"Visibility",value:A,icon:e.jsx(te,{className:"w-5 h-5"}),pct:!0},{label:"Challenge",value:k,icon:e.jsx(re,{className:"w-5 h-5"}),pct:!1}].map((l,u)=>{const j=l.pct?`${Math.round(l.value)}%`:l.value.toFixed(2),f=l.pct?J(l.value):J(l.value,!0),I=l.pct?l.value:l.value*100,Y=l.pct?3:2;return e.jsxs(p.div,{...n,transition:{...n.transition,delay:u*.1},className:"rounded-xl p-5",style:{border:"1px solid #F2EEEB"},children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("span",{style:{color:f},children:l.icon}),e.jsx("span",{className:"text-sm font-medium",style:{color:"#62627E"},children:l.label})]}),e.jsxs("div",{className:"flex items-baseline gap-2 mb-3",children:[e.jsx("span",{className:"font-figtree text-3xl font-extrabold",style:{color:"#17172D"},children:j}),!l.pct&&e.jsx("span",{className:"text-xs font-medium px-2 py-0.5 rounded-full",style:{backgroundColor:f+"20",color:f},children:E})]}
26),e.jsx(Q,{value:I,segments:Y,color:f})]},l.label)})}),((W=s.challengeAssessment)==null?void 0:W.reasoning)&&e.jsxs(p.div,{...n,className:"rounded-xl p-5",style:{border:"1px solid #F2EEEB"},children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(he,{className:"w-4 h-4",style:{color:"#9292A6"}}),e.jsx("h3",{className:"text-sm font-bold",style:{color:"#17172D"},children:"Challenge Assessment"}),s.challengeAssessment.confidence!=null&&e.jsxs("span",{className:"ml-auto text-xs font-medium px-2.5 py-0.5 rounded-full",style:{backgroundColor:"#FFF2F5",color:"#FF2551"},children:[Math.round(s.challengeAssessment.confidence),"% confidence"]})]}),e.jsx("div",{className:"rounded-lg p-4",style:{backgroundColor:"#FAF7F5",borderLeft:"3px solid #FFB800"},children:e.jsx("p",{className:"text-sm leading-relaxed",style:{color:"#62627E"},children:s.challengeAssessment.reasoning})})]}),s.difficultyFactors&&e.jsxs(p.div,{...n,className:"rounded-xl p-5",style:{border:"1px solid #F2EEEB"},children:[e.jsx("h3",{className:"text-sm font-bold mb-4",style:{color:"#17172D"},children:"Difficulty Factors"}),e.jsx("div",{className:"space-y-4",children:[{label:"Text",value:s.difficultyFactors.text},{label:"Logo",value:s.difficultyFactors.logo},{label:"Hardware",value:s.difficultyFactors.hardware},{label:"Structure",value:s.difficultyFactors.structure},{label:"Pattern",value:s.difficultyFactors.pattern},{label:"Material",value:s.difficultyFactors.material},{label:"Reference Quality",value:s.difficultyFactors.referenceQuality}].filter(l=>l.value!=null).map(l=>{const u=l.value,j=oe(u);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx("span",{className:"text-sm font-medium",style:{color:"#17172D"},children:l.label}),e.jsxs("span",{className:"text-xs font-semibold",style:{color:j},children:[Math.round(u),"%"]})]}),e.jsx(Q,{value:u,segments:5,color:j})]},l.label)})})]}),s.detectedFeatures&&s.detectedFeatures.length>0&&e.jsxs(p.div,{...n,className:"rounded-xl p-5",style:{border:"1px solid #F2EEEB"},children:[e.jsx("h3",{className:"text-sm font-bold mb-4",style:{color:"#17172D"},children:"Detected Features"}),e.jsx("div",{className:"space-y-3",children:s.detectedFeatures.map((l,u)=>{const j=ie[l.category.toUpperCase()]||{bg:"#F2EEEB",text:"#62627E"};return e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-2 pb-3",style:{borderBottom:u<s.detectedFeatures.length-1?"1px solid #F2EEEB":"none"},children:[e.jsx("span",{className:"inline-flex px-2.5 py-0.5 rounded-full text-xs font-semibold flex-shrink-0 w-fit",style:{backgroundColor:j.bg,color:j.text},children:l.category}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm",style:{color:"#17172D"},children:l.description}),e.jsxs("div",{className:"flex flex-wrap gap-1 mt-1.5",children:[l.subcategory&&e.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium",style:{backgroundColor:"#FAF7F5",color:"#62627E",border:"1px solid #F2EEEB"},children:l.subcategory.replace(/_/g," ")}),l.location&&e.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs",style:{backgroundColor:"#FAF7F5",color:"#9292A6",border:"1px solid #F2EEEB"},children:l.location.replace(/_/g," ")}),l.tags&&l.tags.filter(f=>{var I;return f!==l.subcategory&&f!==l.location&&f!==((I=l.category)==null?void 0:I.toLowerCase())}).map(f=>e.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs",style:{backgroundColor:"#FAF7F5",color:"#9292A6",border:"1px solid #F2EEEB"},children:f},f))]})]})]},u)})})]}),s.fitProfile&&e.jsxs(p.div,{...n,children:[e.jsx("h3",{className:"font-figtree text-base font-bold mb-3",style:{color:"#17172D"},children:"Fit Profile"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[s.fitProfile.fit&&e.jsx(T,{icon:e.jsx(V,{className:"w-3.5 h-3.5"}),label:"Fit",value:s.fitProfile.fit}),s.fitProfile.length&&e.jsx(T,{icon:e.jsx($,{className:"w-3.5 h-3.5 rotate-90"}),label:"Length",value:s.fitProfile.length}),s.fitProfile.silhouette&&e.jsx(T,{icon:e.jsx(U,{className:"w-3.5 h-3.5"}),label:"Silhouette",value:s.fitProfile.silhouette})]})]}
26),s.constructionDetails&&e.jsxs(p.div,{...n,children:[e.jsx("h3",{className:"font-figtree text-base font-bold mb-3",style:{color:"#17172D"},children:"Construction Details"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[s.constructionDetails.neckline&&e.jsx(T,{icon:e.jsx("span",{className:"w-3.5 h-3.5 rounded-full",style:{border:"1.5px solid currentColor"}}),label:"Neckline",value:s.constructionDetails.neckline}),s.constructionDetails.sleeveType&&e.jsx(T,{icon:e.jsx(V,{className:"w-3.5 h-3.5"}),label:"Sleeve Type",value:s.constructionDetails.sleeveType}),s.constructionDetails.buildFinish&&e.jsx(T,{icon:e.jsx(X,{className:"w-3.5 h-3.5"}),label:"Build & Finish",value:s.constructionDetails.buildFinish}),s.constructionDetails.structure&&e.jsx(T,{icon:e.jsx(U,{className:"w-3.5 h-3.5"}),label:"Structure",value:s.constructionDetails.structure})]})]}),e.jsx(p.div,{...n,className:"text-center pt-4",children:e.jsxs("button",{onClick:a,className:"inline-flex items-center gap-2 px-6 py-3 rounded-lg text-sm font-medium transition-colors",style:{border:"1px solid #E5DDD6",color:"#17172D"},onMouseEnter:l=>{l.target.style.borderColor="#FF2551",l.target.style.color="#FF2551"},onMouseLeave:l=>{l.target.style.borderColor="#E5DDD6",l.target.style.color="#17172D"},children:[e.jsx(ae,{className:"w-4 h-4"}),"Score Another Product"]})}),e.jsxs(p.div,{...n,className:"rounded-xl p-8 text-center mt-6",style:{backgroundColor:"#FAF7F5",border:"1px solid #F2EEEB"},children:[e.jsx("h3",{className:"font-figtree text-xl font-bold mb-2",style:{color:"#17172D"},children:"We've scored it, now let us help you shoot it."}),e.jsx("p",{className:"text-sm mb-5",style:{color:"#62627E"},children:"Our team handles garments of every complexity, every day. Book a demo and see how BetterStudio brings your catalog to life at scale."}),e.jsxs("a",{href:"/demo-request",className:"inline-flex items-center gap-2 px-6 py-3 rounded-lg text-white text-sm font-medium transition-colors",style:{backgroundColor:"#FF2551"},onMouseEnter:l=>{l.target.style.backgroundColor="#D91D43"},onMouseLeave:l=>{l.target.style.backgroundColor="#FF2551"},children:["Book a Demo",e.jsx($,{className:"w-4 h-4"})]})]})]})})}function T({icon:r,label:a,value:i}){return e.jsxs("div",{className:"rounded-xl p-4",style:{backgroundColor:"#FAF7F5",border:"1px solid #F2EEEB"},children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx("span",{style:{color:"#9292A6"},children:r}),e.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider",style:{color:"#9292A6"},children:a})]}),e.jsx("p",{className:"text-sm font-bold leading-snug",style:{color:"#17172D"},children:i})]})}export{Te as default};

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.