1import{p as $,j as e,aQ as _,z as q,r as w,b as U,H as oe,E as de,u as J,t as A,B as v,P as I,v as ge,a1 as Y,ag as xe,C as D,a5 as pe,T as E,L as W,U as me}from"./index-BikKHNi5.js";import{B as V}from"./book-open-DyQedT63.js";import{I as ue}from"./image-Be8yPp1A.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 G=$("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** 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 he=$("ChartNoAxesColumn",[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]]);/** 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 Q=$("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** 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 Z=$("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** 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 X=$("PersonStanding",[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["path",{d:"m9 20 3-6 3 6",key:"se2kox"}],["path",{d:"m6 8 6 2 6-2",key:"4o3us4"}],["path",{d:"M12 10v4",key:"1kjpxc"}]]);/** 27 * @license lucide-react v0.453.0 - ISC 28 * 29 * This source code is licensed under the ISC license. 30 * See the LICENSE file in the root directory of this source tree. 31 */const be=$("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);/** 32 * @license lucide-react v0.453.0 - ISC 33 * 34 * This source code is licensed under the ISC license. 35 * See the LICENSE file in the root directory of this source tree. 36 */const ee=$("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]),M={"actuation-modules":{label:"Actuation Modules",description:"Motors, actuators, and drive systems for physical AI platforms.",descriptionKo:"Physical AI íë«í¼ì ìí 모í°Â·êµ¬ë기·ëë¼ì´ë¸ ìì¤í .",icon:e.jsx(q,{"data-loc":"client/src/pages/KitsCategory.tsx:18",size:40}),color:"from-primary/10 to-primary/5"},"sensor-modules":{label:"Sensor Modules",description:"Sensing components for perception and environmental interaction.",descriptionKo:"ì¸ìê³¼ íê²½ ìí¸ìì©ì ìí ì¼ì± ì»´í¬ëí¸.",icon:e.jsx(_,{"data-loc":"client/src/pages/KitsCategory.tsx:25",size:40}),color:"from-green-500/10 to-green-500/5"},"wearable-robots":{label:"Wearable Robots",description:"Exoskeleton and wearable robotic systems for human augmentation.",descriptionKo:"ì¸ê° ì¦ê°ì ìí ì¸ê³¨ê²© ë° ì¨ì´ë¬ë¸ ë¡ë´ ìì¤í .",icon:e.jsx(X,{"data-loc":"client/src/pages/KitsCategory.tsx:32",size:40}),color:"from-purple-500/10 to-purple-500/5"},manipulators:{label:"Manipulators",description:"Robotic arms and manipulation systems for precise task execution.",descriptionKo:"ì ë°í ìì ìíì ìí ë¡ë´ í ë° ë§¤ëí°ë ì´ì ìì¤í .",icon:e.jsx(ee,{"data-loc":"client/src/pages/KitsCategory.tsx:39",size:40}),color:"from-orange-500/10 to-orange-500/5"},"humanoid-robots":{label:"Humanoid Robots",description:"Full-body humanoid robot platforms and documentation.",descriptionKo:"ì ì í´ë¨¸ë ¸ì´ë ë¡ë´ íë«í¼ ë° ë¬¸ì.",icon:e.jsx(G,{"data-loc":"client/src/pages/KitsCategory.tsx:46",size:40}),color:"from-red-500/10 to-red-500/5"}};function H(t){const g=t.split(` 37`).map(x=>
37x.trim()).filter(Boolean),m=[];let u=null;for(const x of g){const a=x.match(/^([A-Za-zê°-í£\s]+):\s*(.*)$/);if(a&&!x.startsWith("â¢")&&!x.startsWith("-")&&!x.startsWith("â")&&!x.startsWith("â")){const i=a[1].trim(),l=a[2].trim();u={name:i,items:l?l.split(/[,ï¼]/).map(b=>b.trim()).filter(Boolean):[]},m.push(u)}else if(u){const i=x.split(/[,ï¼]/).map(l=>l.trim()).filter(Boolean);u.items.push(...i)}}return m.length>0?{groups:m}:null}function R(t){try{return t?JSON.parse(t):[]}catch{return[]}}function te(t){try{return t?JSON.parse(t):[]}catch{return[]}}function B(t){try{return t?JSON.parse(t):[]}catch{return[]}}const L=["actuation-modules","sensor-modules","wearable-robots","manipulators","humanoid-robots"],T={"actuation-modules":e.jsx(q,{"data-loc":"client/src/pages/KitsPage.tsx:82",size:15}),"sensor-modules":e.jsx(_,{"data-loc":"client/src/pages/KitsPage.tsx:83",size:15}),"wearable-robots":e.jsx(X,{"data-loc":"client/src/pages/KitsPage.tsx:84",size:15}),manipulators:e.jsx(ee,{"data-loc":"client/src/pages/KitsPage.tsx:85",size:15}),"humanoid-robots":e.jsx(G,{"data-loc":"client/src/pages/KitsPage.tsx:86",size:15})};function fe({doc:t,onClose:g}){const m=M[t.category],u=R(t.specs),x=te(t.sections),a=B(t.features),{t:i}=U(),l=()=>{const c=window.location.origin+"/onephai-logo-primary.png",o=m.label,f=new Date,j=f.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),d=document.getElementById("kits-print-iframe");d&&d.remove();const h=document.createElement("iframe");h.id="kits-print-iframe",h.style.cssText="position:fixed;top:-9999px;left:-9999px;width:0;height:0;border:none;",document.body.appendChild(h);const N=h.contentWindow;N&&(N.document.open(),N.document.write(` 38<!DOCTYPE html> 39<html lang="ko"> 40<head> 41 <meta charset="UTF-8" /> 42 <title>${t.title} â PhAI KIT Catalog</title> 43 <style> 44 * { box-sizing: border-box; margin: 0; padding: 0; } 45 body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #1a1a1a; background: white; padding: 0; } 46 @page { size: A4; margin: 14mm 18mm 22mm 18mm; } 47 48 /* í¤ë */ 49 .print-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; margin-bottom: 14px; border-bottom: 2px solid #003F87; } 50 .print-header img { height: 28px; width: auto; } 51 .print-header-category { font-size: 10px; color: #1487C8; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; } 52 53 /* í¸í° - 매 íì´ì§ íë¨ ê³ ì */ 54 .print-footer { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; font-size: 9px; color: #888; border-top: 1px solid #e0e0e0; padding: 4px 0 2px; background: white; } 55 56 /* 본문 */ 57 .content { font-size: 11px; line-height: 1.6; } 58 h1 { color: #003F87; font-size: 20px; font-weight: 700; margin-bottom: 4px; } 59 h2 { color: #003F87; font-size: 13px; font-weight: 700; margin: 14px 0 5px; } 60 h3 { color: #1a1a1a; font-size: 11px; font-weight: 700; } 61 p { font-size: 11px; color: #444; line-height: 1.6; margin-bottom: 6px; } 62 63 /* ì¹´í ê³ ë¦¬ ë°°ì§ */ 64 .category-badge { display: inline-flex; align-items: center; background: #003F87; color: white; font-size: 9px; font-weight: 600; padding: 2px 10px; border-radius: 12px; margin-bottom: 8px; } 65 66 /* ëì ì¬ì©ì */ 67 .audience-section { background: #f4f7fb; border-radius: 6px; padding: 7px 12px; margin-bottom: 10px; } 68 .audience-label { font-size: 9px; font-weight: 700; color: #003F87; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; } 69 .audience-tags { display: flex; flex-wrap: wrap; gap: 6px; } 70 .audience-tag { background: #e8f0fb; color: #003F87; border: 1px solid #b3c9ee; font-size: 9px; padding: 2px 10px; border-radius: 12px; } 71 72 /* í¹ì§ ì¹´ë */ 73 .features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 10px; } 74 .feature-card { background: #f8f9fa; border: 1px solid #e0e0e0; border-radius: 5px; padding: 5px 8px; break-inside: avoid; } 75 .feature-title { font-weight: 600; font-size: 10px; color: #1a1a1a; margin-bottom: 2px; } 76 .feature-desc { font-size: 9px; color: #666; line-height: 1.5; } 77 78 /* ì¤í í ì´ë¸ */ 79 table { border-collapse: collapse; width: 100%; margin-bottom: 10px; } 80 td, th { border: 1px solid #d0d0d0; padding: 3px 8px; font-size: 9.5px; color: #1a1a1a; } 81 tr:nth-child(odd) td { background: #f4f7fb; } 82 tr td:first-child { color: #003F87; font-weight: 600; width: 40%; } 83 84 /* ì¹ì */ 85 .section-block { margin-bottom: 10px; } 86 .section-title { border-left: 3px solid #1487C8; padding-left: 8px; color: #003F87; font-weight: 700; font-size: 11px; margin-bottom: 5px; } 87 .section-content { font-size: 10px; color: #444; white-space: pre-line; line-height: 1.6; } 88 89 /* í¨í¤ì§ 구ì±í */ 90 .package-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; } 91 .package-group { border: 1px solid #d0d0d0; border-radius: 6px; overflow: hidden; break-inside: avoid; } 92 .package-group-header { background: #003F87; color: white; font-size: 9px; font-weight: 700; padding: 3px 8px; } 93 .package-group-item { font-size: 9px; color: #333; padding: 3px 8px; border-top: 1px solid #eee; } 94 95 /* ì í ê°ì (ì¸ë¤ì¼ + ì 목/ì¤ëª ëëí) */ 96 .product-intro { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; } 97 .product-intro-img { width: 200px; min-width: 200px; height: 150px; object-fit: cover; border-radius: 6px; border: 1px solid #e0e0e0; } 98 .product-intro-text { flex: 1; } 99 100 /* ì¹ì ì´ë¯¸ì§+í ì¤í¸ ëëí */ 101 .section-with-img { display: flex; gap: 14px; align-items: flex-start; } 102 .section-img { width: 220px; min-width: 220px; max-height: 170px; object-fit: contain; border-radius: 6px; border: 1px solid #e0e0e0; } 103 .section-text { flex: 1; } 104 105 .divider { border: none; border-top: 1px solid #e0e0e0; margin: 10px 0; } 106 </style> 107</head> 108<body> 109 <div class="print-header"> 110 <img src="${c}" alt="onephai" /> 111 <span class="print-header-category">${o} â PhAI KIT Catalog</span> 112 </div> 113 114 <div class="content"> 115 <div class="product-intro"> 116 ${t.thumbnailUrl?`<img src="${t.thumbnailUrl}" class="product-intro-img" alt="${t.title}" />`:""} 117 <div class="product-intro-text"> 118 <div class="category-badge">${o}</div> 119 <h1>${t.title}</h1> 120 ${t.description?`<p>${t.description}</p>`:""} 121 </div> 122 </div> 123 124 ${y.length>0?` 125 <div class="audience-section"> 126 <div class="audience-label">${i("kits.audience")}</div> 127 <div class="audience-tags"> 128 ${y.map(n=>`<span class="audience-tag">${n}</span>`).join("")} 129 </div> 130 </div>`:""} 131 132 ${a.length>0?` 133 <h2>${i("kits.features")}</h2> 134 <div class="features-grid"> 135 ${a.map(n=>{const P=n.indexOf(" â "),k=P!==-1,C=k?n.slice(0,P):n,S=k?n.slice(P+3):null;return`<div class="feature-card"><div class="feature-title">${C}</div>
135${S?`<div class="feature-desc">${S}</div>`:""}</div>`}).join("")} 136 </div>`:""} 137 138 ${u.length>0?` 139 <h2>${i("kits.specs")}</h2> 140 <table> 141 <tbody> 142 ${u.map(n=>`<tr><td>${n.label}</td><td>${n.value}</td></tr>`).join("")} 143 </tbody> 144 </table>`:""} 145 146 ${x.length>0?` 147 <h2>${i("kits.details")}</h2> 148 ${x.map(n=>{const k=n.title?.includes("í¨í¤ì§")||n.title?.includes("구ì±í")||n.title?.includes("Package")?H(n.content):null;return`<div class="section-block"> 149 ${n.title?`<div class="section-title">${n.title}</div>`:""} 150 ${n.imageUrl&&!k?` 151 <div class="section-with-img"> 152 <img src="${n.imageUrl}" class="section-img" alt="${n.title||""}" /> 153 <div class="section-text">${n.content?`<div class="section-content">${n.content}</div>`:""}</div> 154 </div>`:k?` 155 <div class="package-grid"> 156 ${k.groups.map(C=>` 157 <div class="package-group"> 158 <div class="package-group-header">${C.name}</div> 159 ${C.items.map(S=>`<div class="package-group-item">${S}</div>`).join("")} 160 </div> 161 `).join("")} 162 </div>`:n.content?`<div class="section-content">${n.content}</div>`:""} 163 </div>`}).join("")}`:""} 164 </div> 165 166 <div class="print-footer"> 167 <span>© ${f.getFullYear()} ONEphai. All rights reserved.</span> 168 <span>Printed on ${j}</span> 169 </div> 170 171</body> 172</html>`),N.document.close(),setTimeout(()=>{try{h.contentWindow?.print()}catch(n){console.error("Print error:",n)}setTimeout(()=>{h.remove()},2e3)},500))},y=(c=>{if(!c)return[];try{const o=JSON.parse(c);if(Array.isArray(o))return o.map(String)}catch{}return c.split(/[,ï¼]/).map(o=>o.trim()).filter(Boolean)})(t.targetAudience);return e.jsx(e.Fragment,{children:e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:289",className:"print-modal-root fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",onClick:c=>{c.target===c.currentTarget&&g()},children:e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:293",className:"bg-background rounded-xl shadow-2xl border border-border flex flex-col w-full max-w-4xl overflow-hidden",style:{maxHeight:"92vh"},children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:295",className:"flex items-center justify-between px-6 py-4 border-b border-border shrink-0 no-print",children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:296",className:"flex items-center gap-2 min-w-0",children:[e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:297",className:"text-primary shrink-0",children:T[t.category]}),e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:298",className:"text-xs text-muted-foreground",children:m.label}),e.jsx(ge,{"data-loc":"client/src/pages/KitsPage.tsx:299",size:14,className:"text-muted-foreground"}),e.jsx("h2",{"data-loc":"client/src/pages/KitsPage.tsx:300",className:"text-sm font-semibold text-foreground truncate",children:t.title})]}),e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:302",className:"flex items-center gap-2 shrink-0 ml-3",children:[e.jsxs(v,{"data-loc":"client/src/pages/KitsPage.tsx:303",onClick:l,size:"sm",variant:"outline",className:"flex items-center gap-1.5 text-xs",children:[e.jsx(be,{"data-loc":"client/src/pages/KitsPage.tsx:309",size:14}),i("kits.print")]}),e.jsx(v,{"data-loc":"client/src/pages/KitsPage.tsx:312",variant:"ghost",size:"icon-sm",onClick:g,className:"text-muted-foreground",children:e.jsx(Y,{"data-loc":"client/src/pages/KitsPage.tsx:313",size:18})})]})]}),e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:319",className:"flex-1 overflow-y-auto",children:e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:320",className:"print-content p-6 md:p-8 space-y-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:323",className:"flex flex-col sm:flex-row gap-6",children:[t.thumbnailUrl?e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:325",className:"shrink-0",children:e.jsx("img",{"data-loc":"client/src/pages/KitsPage.tsx:326",src:t.thumbnailUrl,alt:t.title,className:"w-full sm:w-48 h-36 object-cover rounded-xl border border-border"})}):e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:333",className:`shrink-0 w-full sm:w-48 h-36 rounded-xl flex items-center justify-center bg-gradient-to-br ${m.color} border border-border`,children:e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:334",className:"text-primary/40",children:m.icon})}),e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:337",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:338",className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold bg-primary/10 text-primary border border-primary/20 mb-3",children:[T[t.category],m.label]}),e.jsx("h1",{"data-loc":"client/src/pages/KitsPage.tsx:342",className:"text-xl font-semibold text-foreground mb-2",children:t.title}),t.description&&e.jsx("p",{"data-loc":"client/src/pages/KitsPage.tsx:344",className:"text-sm text-muted-foreground leading-relaxed",children:t.description})]})]}),y.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:351",className:"bg-secondary/40 rounded-xl p-4 flex items-start gap-3",children:[e.jsx(xe,{"data-loc":"client/src/pages/KitsPage.tsx:352",size:18,className:"text-primary shrink-0 mt-0.5"}),e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:353",children:[e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:354",className:"text-xs font-semibold text-primary uppercase tracking-wide mb-2",children:i("kits.audience")}),e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:355",className:"flex flex-wrap gap-2",children:y.map((c,o)=>e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:357",className:"audience-tag inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-primary/10 text-primary border border-primary/20",children:c},o))})]})]}),a.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:368",children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:369",className:"flex items-center gap-2 mb-4",children:[e.jsx(D,{"data-loc":"client/src/pages/KitsPage.tsx:370",size:18,className:"text-primary"}),e.jsx("h2",{"data-loc":"client/src/pages/KitsPage.tsx:371",className:"text-base font-bold text-foreground",children:i("kits.features")})]}),e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:374",className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:a.map((c,o)=>{const f=c.indexOf(" â "),j=f!==-1,d=j?c.slice(0,f):c,h=j?c.slice(f+3):null;return e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:381",className:"feature-card flex items-start gap-3 p-3 rounded-xl bg-secondary/30 border border-border/50",children:[e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:382",className:"mt-0.5 shrink-0 w-5 h-5 rounded-full bg-primary/15 flex items-center justify-center",children:e.jsx(D,{"data-loc":"client/src/pages/KitsPage.tsx:383",size:11,className:"text-primary"})}),e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:385",className:"min-w-0",children:[e.jsx("p",{"data-loc":"client/src/pages/KitsPage.tsx:386",className:"feature-title text-sm font-medium text-foreground leading-snug",children:d}),h&&e.jsx("p",{"data-loc":"client/src/pages/KitsPage.tsx:387",className:"feature-desc text-xs text-muted-foreground mt-0.5 leading-relaxed",children:h})]})]},o)})})]}),u.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:398",children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:399",className:"flex items-center gap-2 mb-4",children:[e.jsx(he,{"data-loc":"client/src/pages/KitsPage.tsx:400",size:18,className:"text-primary"}),e.jsx("h2",{"data-loc":"client/src/pages/KitsPage.tsx:401",className:"text-base font-bold text-foreground",children:i("kits.specs")})]}),e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:403",className:"rounded-xl overflow-hidden border border-border",children:e.jsx("table",{"data-loc":"client/src/pages/KitsPage.tsx:404",className:"w-full text-sm",children:e.jsx("tbody",{"data-loc":"client/src/pages/KitsPage.tsx:405",children:u.map((c,o)=>e.jsxs("tr",{"data-loc":"client/src/pages/KitsPage.tsx:407",className:o%2===0?"bg-secondary/30":"bg-background",children:[e.jsx("td",{"data-loc":"client/src/pages/KitsPage.tsx:408",className:"px-4 py-2.5 font-medium text-foreground w-2/5 border-r border-border",children:c.label}),e.jsx("td",{"data-loc":"client/src/pages/KitsPage.tsx:409",className:"px-4 py-2.5 text-muted-foreground",children:c.value})]},o))})})})]}),x.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:420",className:"space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:421",className:"flex items-center gap-2",children:[e.jsx(V,{"data-loc":"client/src/pages/KitsPage.tsx:422",size:18,className:"text-primary"}),e.jsx("h2",{"data-loc":"client/src/pages/KitsPage.tsx:423",className:"text-base font-bold text-foreground",children:i("kits.details")})]}),x.map((c,o)=>{const j=c.title?.includes("í¨í¤ì§")||c.title?.includes("구ì±í")||c.title?.includes("Package")?H(c.content):null;return e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:431",className:"space-y-3",children:[c.title&&e.jsx("h3",{"data-loc":"client/src/pages/KitsPage.tsx:433",className:"section-title text-sm font-bold text-foreground border-l-2 border-primary pl-3",children:c.title}),j?e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:437",className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:j.groups.map((d,h)=>e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:439",className:"package-group rounded-xl border border-border overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:440",className:"package-group-header bg-primary/10 px-3 py-2 flex items-center gap-2",children:[e.jsx(Z,{"data-loc":"client/src/pages/KitsPage.tsx:441",size:13,className:"text-primary print:hidden"}),e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:442",className:"text-xs font-semibold text-primary",children:d.name})]}),e.jsx("ul",{"data-loc":"client/src/pages/KitsPage.tsx:444",className:"divide-y divide-border",children:d.items.map((N,n)=>e.jsxs("li",{"data-loc":"client/src/pages/KitsPage.tsx:446",className:"package-group-item px-3 py-2 text-xs text-foreground flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:447",className:"w-1 h-1 rounded-full bg-primary/50 shrink-0 print:hidden"}),N]},n))})]},h))}):c.content&&e.jsx("p",{"data-loc":"client/src/pages/KitsPage.tsx:457",className:"text-sm text-muted-foreground leading-relaxed whitespace-pre-line",children:c.content}),c.imageUrl&&e.jsx("img",{"data-loc":"client/src/pages/KitsPage.tsx:461",src:c.imageUrl,alt:c.title||`Section ${o+1}`,className:"rounded-xl border border-border max-w-full"})]},o)})]}),!t.targetAudience&&a.length===0&&u.length===0&&x.length===0&&e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:475",className:"text-center py-8 text-muted-foreground",children:[e.jsx(V,{"data-loc":"client/src/pages/KitsPage.tsx:476",size:32,className:"mx-auto mb-3 text-muted-foreground
172/30"}),e.jsx("p",{"data-loc":"client/src/pages/KitsPage.tsx:477",className:"text-sm",children:i("kits.noDetails")})]})]})})]})})})}const ye=()=>({title:"",description:"",thumbnailUrl:"",specs:[],sections:[],features:[],targetAudience:"",order:0});function se({category:t,editDoc:g,onClose:m,onSaved:u}){const{language:x}=U(),a=x==="ko",[i,l]=w.useState(()=>g?{title:g.title,description:g.description??"",thumbnailUrl:g.thumbnailUrl??"",specs:R(g.specs),sections:te(g.sections),features:B(g.features),targetAudience:g.targetAudience??"",order:g.order}:ye()),[b,y]=w.useState(!1),c=w.useRef(null),o=A.kits.uploadThumbnail.useMutation(),f=A.kits.create.useMutation(),j=A.kits.update.useMutation(),d=!!g,h=async r=>{const s=r.target.files?.[0];if(!s)return;y(!0);const p=new FileReader;p.onload=async K=>{const z=(K.target?.result).split(",")[1];try{const F=await o.mutateAsync({base64:z,filename:s.name,mimeType:s.type});l(ne=>({...ne,thumbnailUrl:F.url}))}finally{y(!1)}},p.readAsDataURL(s)},N=()=>l(r=>({...r,specs:[...r.specs,{label:"",value:""}]})),n=(r,s,p)=>l(K=>({...K,specs:K.specs.map((z,F)=>F===r?{...z,[s]:p}:z)})),P=r=>l(s=>({...s,specs:s.specs.filter((p,K)=>K!==r)})),k=()=>l(r=>({...r,sections:[...r.sections,{title:"",content:"",imageUrl:""}]})),C=(r,s,p)=>l(K=>({...K,sections:K.sections.map((z,F)=>F===r?{...z,[s]:p}:z)})),S=r=>l(s=>({...s,sections:s.sections.filter((p,K)=>K!==r)})),ie=()=>l(r=>({...r,features:[...r.features,""]})),re=(r,s)=>l(p=>({...p,features:p.features.map((K,z)=>z===r?s:K)})),ce=r=>l(s=>({...s,features:s.features.filter((p,K)=>K!==r)})),le=async()=>{if(i.title.trim())try{const r={category:t,title:i.title,description:i.description||void 0,thumbnailUrl:i.thumbnailUrl||void 0,specs:i.specs.filter(s=>s.label||s.value),sections:i.sections.filter(s=>s.title||s.content),features:i.features.filter(s=>s.trim()),targetAudience:i.targetAudience||void 0,order:i.order};d&&g?await j.mutateAsync({id:g.id,...r}):await f.mutateAsync(r),u(),m()}catch(r){console.error(r)}},O=f.isPending||j.isPending;return e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:609",className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",onClick:r=>{r.target===r.currentTarget&&m()},children:e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:613",className:"bg-background rounded-xl shadow-2xl border border-border flex flex-col w-full max-w-2xl overflow-hidden",style:{maxHeight:"92vh"},children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:615",className:"flex items-center justify-between px-6 py-4 border-b border-border shrink-0",children:[e.jsx("h2",{"data-loc":"client/src/pages/KitsPage.tsx:616",className:"text-base font-bold text-foreground",children:d?a?"ì í ì ë³´ í¸ì§":"Edit Product":a?"ì ì í ì¶ê°":"New Product"}),e.jsx(v,{"data-loc":"client/src/pages/KitsPage.tsx:617",variant:"ghost",size:"icon-sm",onClick:m,className:"text-muted-foreground",children:e.jsx(Y,{"data-loc":"client/src/pages/KitsPage.tsx:618",size:18})})]}),e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:623",className:"flex-1 overflow-y-auto p-6 space-y-6",children:[e.jsxs("section",{"data-loc":"client/src/pages/KitsPage.tsx:625",className:"space-y-3",children:[e.jsx("h3",{"data-loc":"client/src/pages/KitsPage.tsx:626",className:"text-sm font-bold text-foreground",children:a?"기본 ì ë³´":"Basic Info"}),e.jsx("input",{"data-loc":"client/src/pages/KitsPage.tsx:627",type:"text",placeholder:a?"ì íëª
*":"Product name *",value:i.title,onChange:r=>l(s=>({...s,title:r.target.value})),className:"w-full px-4 py-2.5 border border-border rounded-lg bg-background text-foreground text-sm"}),e.jsx("textarea",{"data-loc":"client/src/pages/KitsPage.tsx:634",placeholder:a?"ì í ì¤ëª
(ì íì¬í)":"Product description (optional)",value:i.description,onChange:r=>l(s=>({...s,description:r.target.value})),className:"w-full px-4 py-2.5 border border-border rounded-lg bg-background text-foreground text-sm h-20 resize-none"}),e.jsx("input",{"data-loc":"client/src/pages/KitsPage.tsx:640",type:"text",placeholder:a?"ëì ì¬ì©ì (ì: ë¡ë´ ì°êµ¬ì, ìì§ëì´)":"Target users (e.g. robotics researchers, engineers)",value:i.targetAudience,onChange:r=>l(s=>({...s,targetAudience:r.target.value})),className:"w-full px-4 py-2.5 border border-border rounded-lg bg-background text-foreground text-sm"})]}),e.jsxs("section",{"data-loc":"client/src/pages/KitsPage.tsx:650",className:"space-y-3",children:[e.jsx("h3",{"data-loc":"client/src/pages/KitsPage.tsx:651",className:"text-sm font-bold text-foreground",children:a?"ì¸ë¤ì¼ ì´ë¯¸ì§":"Thumbn
172ail Image"}),e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:652",className:"flex gap-2 items-center flex-wrap",children:[e.jsx("input",{"data-loc":"client/src/pages/KitsPage.tsx:653",type:"url",placeholder:a?"ì´ë¯¸ì§ URL ì§ì ì
ë ¥":"Enter image URL",value:i.thumbnailUrl,onChange:r=>l(s=>({...s,thumbnailUrl:r.target.value})),className:"flex-1 min-w-0 px-4 py-2.5 border border-border rounded-lg bg-background text-foreground text-sm"}),e.jsx("input",{"data-loc":"client/src/pages/KitsPage.tsx:660",ref:c,type:"file",accept:"image/*",onChange:h,className:"hidden"}),e.jsxs(v,{"data-loc":"client/src/pages/KitsPage.tsx:661",type:"button",onClick:()=>c.current?.click(),disabled:b,variant:"outline",size:"sm",className:"flex items-center gap-1.5 shrink-0",children:[b?e.jsx(W,{"data-loc":"client/src/pages/KitsPage.tsx:662",size:14,className:"animate-spin"}):e.jsx(me,{"data-loc":"client/src/pages/KitsPage.tsx:662",size:14}),a?"ì
ë¡ë":"Upload"]})]}),i.thumbnailUrl&&e.jsx("img",{"data-loc":"client/src/pages/KitsPage.tsx:667",src:i.thumbnailUrl,alt:"preview",className:"w-40 h-24 object-cover rounded-lg border border-border"})]}),e.jsxs("section",{"data-loc":"client/src/pages/KitsPage.tsx:672",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:673",className:"flex items-center justify-between",children:[e.jsx("h3",{"data-loc":"client/src/pages/KitsPage.tsx:674",className:"text-sm font-bold text-foreground",children:a?"주ì í¹ì§":"Key Features"}),e.jsxs(v,{"data-loc":"client/src/pages/KitsPage.tsx:675",type:"button",onClick:ie,variant:"outline",size:"sm",className:"flex items-center gap-1.5 text-xs",children:[e.jsx(I,{"data-loc":"client/src/pages/KitsPage.tsx:676",size:13})," ",a?"ì¶ê°":"Add"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:679",className:"rounded-lg bg-primary/5 border border-primary/15 px-3 py-2.5 flex items-start gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:680",className:"text-primary shrink-0 mt-0.5",children:e.jsx(D,{"data-loc":"client/src/pages/KitsPage.tsx:680",size:13})}),e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:681",className:"text-xs text-muted-foreground leading-relaxed",children:a?e.jsxs(e.Fragment,{children:[e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:683",className:"font-semibold text-foreground",children:"ì
ë ¥ í:"})," ì 목과 ì¤ëª
ì 구ë¶íë ¤ë©´ ",e.jsx("code",{"data-loc":"client/src/pages/KitsPage.tsx:683",className:"bg-secondary px-1 py-0.5 rounded text-xs font-mono",children:"ì 목 â ì¤ëª
"})," íìì¼ë¡ ì
ë ¥íì¸ì.",e.jsx("br",{"data-loc":"client/src/pages/KitsPage.tsx:683"}),e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:684",className:"text-muted-foreground/70",children:"ì: ìì ë¡ì´ ì ì´ ìê³ ë¦¬ì¦ ê°ë° â C ì½ëë¡ ì§ì 구í í ì¤ì ë¡ë´ìì ì¦ì í
ì¤í¸"})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:686",className:"font-semibold text-foreground",children:"Input tip:"})," To separate a title from its description, use the ",e.jsx("code",{"data-loc":"client/src/pages/KitsPage.tsx:686",className:"bg-secondary px-1 py-0.5 rounded text-xs font-mono",children:"Title â Description"})," format.",e.jsx("br",{"data-loc":"client/src/pages/KitsPage.tsx:686"}),e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:687",className:"text-muted-foreground/70",children:"e.g. Free control-algorithm development â implement directly in C and test on a real robot instantly"})]})})]}),i.features.length===0&&e.jsx("p",{"data-loc":"client/src/pages/KitsPage.tsx:692",className:"text-xs text-muted-foreground",children:a?"í¹ì§ í목ì ì¶ê°íì¸ì.":"Add a feature."}),i.features.map((r,s)=>e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:695",className:"flex gap-2 items-center",children:[e.jsx("input",{"data-loc":"client/src/pages/KitsPage.tsx:696",type:"text",placeholder:s===0?a?"ì: ìì ë¡ì´ ì ì´ ìê³ ë¦¬ì¦ ê°ë° â C ì½ëë¡ ì§ì 구í í ì¤ì ë¡ë´ìì ì¦ì í
ì¤í¸":"e.g. Free control-algorithm development â implement in C and test on a real robot":a?`í¹ì§ ${s+1}`:`Feature ${s+1}`,value:r,onChange:p=>re(s,p.target.value),className:"flex-1 px-3 py-2 border border-border rounded-lg bg-background text-foreground text-sm"}),e.jsx(v,{"data-loc":"client/src/pages/KitsPage.tsx:703",type:"button",variant:"ghost",size:"icon-xs",onClick:()=>ce(s),className:"text-muted-foreground hover:text-destructive",children:e.jsx(E,{"data-loc":"client/src/pages/KitsPage.tsx:704",size:14})})]},s))]}),e.jsxs("section",{"data-loc":"client/src/pages/KitsPage.tsx:711",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:712",className:"flex items-center justify-between",children:[e.jsx("h3",{"data-loc":"client/src/pages/KitsPage.tsx:713",className:"text-sm font-bold text-foreground",children:a?"ì¬ì (Specifications)":"Specifications"}),e.jsxs(v,{"data-loc":"client/src/pages/KitsPage.tsx:714",type:"button",onClick:N,variant:"outline",size:"sm",className:"flex items-center gap-1.5 text-xs",children:[e.jsx(I,{"data-loc":"client/src/pages/KitsPage.tsx:715",size:13})," ",a?"í ì¶ê°":"Add Row"]})]}),i.specs.length===0&&e.jsx("p",{"data-loc":"client/src/pages/KitsPage.tsx:719",className:"text-xs text-muted-foreground",children:a?"ì¤í í목ì ì¶ê°íì¸ì. (ì: ë¬´ê² / 1.2 kg)":"Add a spec. (e.g. Weight / 1.2 kg)"}),i.specs.map((r,s)=>e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:722",className:"flex gap-2 items-center",children:[e.jsx("input",{"data-loc":"client/src/pages/KitsPage.tsx:723",type:"text",placeholder:a?"í목ëª
(ì: 무ê²
172)":"Field (e.g. Weight)",value:r.label,onChange:p=>n(s,"label",p.target.value),className:"w-2/5 px-3 py-2 border border-border rounded-lg bg-background text-foreground text-sm"}),e.jsx("input",{"data-loc":"client/src/pages/KitsPage.tsx:730",type:"text",placeholder:a?"ê° (ì: 1.2 kg)":"Value (e.g. 1.2 kg)",value:r.value,onChange:p=>n(s,"value",p.target.value),className:"flex-1 px-3 py-2 border border-border rounded-lg bg-background text-foreground text-sm"}),e.jsx(v,{"data-loc":"client/src/pages/KitsPage.tsx:737",type:"button",variant:"ghost",size:"icon-xs",onClick:()=>P(s),className:"text-muted-foreground hover:text-destructive",children:e.jsx(E,{"data-loc":"client/src/pages/KitsPage.tsx:738",size:14})})]},s))]}),e.jsxs("section",{"data-loc":"client/src/pages/KitsPage.tsx:745",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:746",className:"flex items-center justify-between",children:[e.jsx("h3",{"data-loc":"client/src/pages/KitsPage.tsx:747",className:"text-sm font-bold text-foreground",children:a?"ìì¸ ì¤ëª
ì¹ì
":"Detail Sections"}),e.jsxs(v,{"data-loc":"client/src/pages/KitsPage.tsx:748",type:"button",onClick:k,variant:"outline",size:"sm",className:"flex items-center gap-1.5 text-xs",children:[e.jsx(I,{"data-loc":"client/src/pages/KitsPage.tsx:749",size:13})," ",a?"ì¹ì
ì¶ê°":"Add Section"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:752",className:"rounded-lg bg-primary/5 border border-primary/15 px-3 py-2.5 flex items-start gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:753",className:"text-primary shrink-0 mt-0.5",children:e.jsx(Z,{"data-loc":"client/src/pages/KitsPage.tsx:753",size:13})}),e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:754",className:"text-xs text-muted-foreground leading-relaxed",children:a?e.jsxs(e.Fragment,{children:[e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:756",className:"font-semibold text-foreground",children:"í¨í¤ì§ 구ì±í ì¹ì
í:"}),' ì 목ì "í¨í¤ì§ 구ì±í"ì í¬í¨íë©´ ë´ì©ì´ 그룹 ì¹´ëë¡ ìë íìë©ëë¤.',e.jsx("br",{"data-loc":"client/src/pages/KitsPage.tsx:756"}),e.jsxs("span",{"data-loc":"client/src/pages/KitsPage.tsx:757",className:"text-muted-foreground/70",children:["ë´ì© íì: ",e.jsx("code",{"data-loc":"client/src/pages/KitsPage.tsx:757",className:"bg-secondary px-1 py-0.5 rounded font-mono",children:"그룹ëª
: ìì´í
1, ìì´í
2"})," ë¡ ì
ë ¥íë©´ ê·¸ë£¹ë³ ì¹´ëë¡ ë¶ë¦¬ë©ëë¤."]})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:759",className:"font-semibold text-foreground",children:"Package contents tip:"}),' Include "í¨í¤ì§ 구ì±í" (Package contents) in the title to auto-render the content as group cards.',e.jsx("br",{"data-loc":"client/src/pages/KitsPage.tsx:759"}),e.jsxs("span",{"data-loc":"client/src/pages/KitsPage.tsx:760",className:"text-muted-foreground/70",children:["Format: ",e.jsx("code",{"data-loc":"client/src/pages/KitsPage.tsx:760",className:"bg-secondary px-1 py-0.5 rounded font-mono",children:"Group: item1, item2"})," splits into per-group cards."]})]})})]}),i.sections.length===0&&e.jsx("p",{"data-loc":"client/src/pages/KitsPage.tsx:765",className:"text-xs text-muted-foreground",children:a?"ì¹ì
ì ì¶ê°íì¬ ì íì ìì¸ ë´ì©ì ì
ë ¥íì¸ì.":"Add sections to describe the product in detail."}),i.sections.map((r,s)=>e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:768",className:"border border-border rounded-xl p-4 space-y-3 bg-secondary/20",children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:769",className:"flex items-center justify-between",children:[e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:770",className:"text-xs font-semibold text-muted-foreground",children:a?`ì¹ì
${s+1}`:`Section ${s+1}`}),e.jsx(v,{"data-loc":"client/src/pages/KitsPage.tsx:771",type:"button",variant:"ghost",size:"icon-xs",onClick:()=>S(s),className:"text-muted-foreground hover:text-destructive",children:e.jsx(E,{"data-loc":"client/src/pages/KitsPage.tsx:772",size:13})})]}),e.jsx("input",{"data-loc":"client/src/pages/KitsPage.tsx:775",type:"text",placeholder:a?"ì¹ì
ì 목":"Section title",value:r.title,onChange:p=>C(s,"title",p.target.value),className:"w-full px-3 py-2 border border-border rounded-lg bg-background text-foreground text-sm"}),e.jsx("textarea",{"data-loc":"client/src/pages/KitsPage.tsx:782",placeholder:a?"ì¹ì
ë´ì©":"Section content",value:r.content,onChange:p=>C(s,"content",p.target.value),className:"w-full px-3 py-2 border border-border rounded-lg bg-background text-foreground text-sm h-24 resize-none"}),e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:788",className:"flex items-center gap-2",children:[e.jsx(ue,{"data-loc":"client/src/pages/KitsPage.tsx:789",size:14,className:"text-muted-foreground shrink-0"}),e.jsx("input",{"data-loc":"client/src/pages/KitsPage.tsx:790",type:"url",placeholder:a?"ì´ë¯¸ì§ URL (ì íì¬í)":"Image URL (optional)",value:r.
172imageUrl??"",onChange:p=>C(s,"imageUrl",p.target.value),className:"flex-1 px-3 py-2 border border-border rounded-lg bg-background text-foreground text-sm"})]})]},s))]}),e.jsxs("section",{"data-loc":"client/src/pages/KitsPage.tsx:803",className:"space-y-2",children:[e.jsx("h3",{"data-loc":"client/src/pages/KitsPage.tsx:804",className:"text-sm font-bold text-foreground",children:a?"íì ìì":"Display Order"}),e.jsx("input",{"data-loc":"client/src/pages/KitsPage.tsx:805",type:"number",value:i.order,onChange:r=>l(s=>({...s,order:parseInt(r.target.value)||0})),className:"w-24 px-3 py-2 border border-border rounded-lg bg-background text-foreground text-sm"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:815",className:"flex gap-2 px-6 py-4 border-t border-border shrink-0",children:[e.jsxs(v,{"data-loc":"client/src/pages/KitsPage.tsx:816",onClick:le,disabled:!i.title.trim()||O,className:"flex items-center gap-2",children:[O&&e.jsx(W,{"data-loc":"client/src/pages/KitsPage.tsx:821",size:14,className:"animate-spin"}),d?a?"ì ì¥":"Save":a?"ì¶ê°":"Add"]}),e.jsx(v,{"data-loc":"client/src/pages/KitsPage.tsx:824",onClick:m,variant:"outline",children:a?"ì·¨ì":"Cancel"})]})]})})}function ae({doc:t,isAdmin:g,onView:m,onEdit:u,onDelete:x,showCategoryBadge:a=!1}){const i=M[t.category],l=R(t.specs),b=B(t.features),{t:y,language:c}=U();return e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:854",className:"relative group bg-card rounded-xl border border-border overflow-hidden hover:shadow-lg hover:border-primary/30 transition-all duration-200 cursor-pointer",onClick:()=>m(t),children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:859",className:"relative aspect-video bg-muted overflow-hidden",children:[t.thumbnailUrl?e.jsx("img",{"data-loc":"client/src/pages/KitsPage.tsx:861",src:t.thumbnailUrl,alt:t.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",onError:o=>{o.target.style.display="none"}}):e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:868",className:`w-full h-full flex items-center justify-center bg-gradient-to-br ${i.color}`,children:e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:869",className:"text-primary/40",children:i.icon})}),a&&e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:874",className:"absolute top-3 left-3",children:e.jsxs("span",{"data-loc":"client/src/pages/KitsPage.tsx:875",className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-semibold bg-secondary/90 text-foreground border border-border",children:[T[t.category],i.label]})}),l.length>0&&e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:883",className:"absolute bottom-3 right-3",children:e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:884",className:"text-xs bg-black/60 text-white px-2 py-0.5 rounded-full",children:c==="ko"?`ì¤í ${l.length}ê°`:`${l.length} specs`})})]}),e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:892",className:"p-4 space-y-2",children:[e.jsx("h3",{"data-loc":"client/src/pages/KitsPage.tsx:893",className:"font-bold text-foreground text-sm leading-snug line-clamp-2",children:t.title}),t.description&&e.jsx("p",{"data-loc":"client/src/pages/KitsPage.tsx:895",className:"text-xs text-muted-foreground line-clamp-2 leading-relaxed",children:t.description}),b.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:898",className:"flex flex-wrap gap-1 pt-1",children:[b.slice(0,2).map((o,f)=>e.jsxs("span",{"data-loc":"client/src/pages/KitsPage.tsx:900",className:"inline-flex items-center gap-0.5 text-xs text-muted-foreground bg-secondary px-2 py-0.5 rounded-full",children:[e.jsx(D,{"data-loc":"client/src/pages/KitsPage.tsx:901",size:10,className:"text-primary"}),o.length>20?o.slice(0,20)+"â¦":o]},f)),b.length>2&&e.jsxs("span",{"data-loc":"client/src/pages/KitsPage.tsx:906",className:"text-xs text-muted-foreground bg-secondary px-2 py-0.5 rounded-full",children:["+",b.length-2]})]}),e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:910",className:"pt-1",children:e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:911",className:"text-xs text-primary font-medium",children:y("kits.viewDetail")})})]}),g&&e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:917",className:"absolute top-3 right-3 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",onClick:o=>o.stopPropagation(),children:[e.jsx(v,{"data-loc":"client/src/pages/KitsPage.tsx:921",variant:"outline",size:"icon-sm",onClick:()=>u(t),className:"bg-background/90 hover:bg-primary/10",children:e.jsx(pe,{"data-loc":"client/src/pages/KitsPage.tsx:927",size:13,className:"text-muted-foreground"})}),e.jsx(v,{"data-loc":"client/src/pages/KitsPage.tsx:929",variant:"outline",size:"icon-sm",onClick:()=>x(t.id),className:"bg-background/90 hover:bg-destructive/10",children:e.jsx(E,{"data-loc":"client/src/pages/KitsPage.tsx:935",size:13,className:"text-destructive"})})]})]})}function Pe({category:t,onView:g}){const{hasPermission:m}=J(),{t:u,language:x}=U(),a=x==="ko",i=m("system:manage"),l=M[t],[b,y]=w.useState(!1),[c,o]=w.useState(null),{data:f=[],refetch:j}=A.kits.list.useQuery({category:t}),d=A.kits.delete.useMutation(),h=async P=>{if(confirm(x==="ko"?"ì ë§ ìì íìê² ìµëê¹?":"Are you sure you want to delete?"))try{await d.mutateAsync({id:P}),j()}catch(k){console.error(k)}},N=P=>{o(P),y(!0)},n=()=>{o(null),y(!0)};return e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:980",className:"space-y-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:982",className:"flex items-start gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:983",className:`p-3 rounded-xl bg-gradient-to-br ${l.color} text-primary shrink-0`,children:l.icon}
172),e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:986",children:[e.jsx("h2",{"data-loc":"client/src/pages/KitsPage.tsx:987",className:"text-lg font-bold text-foreground mb-0.5",children:l.label}),e.jsx("p",{"data-loc":"client/src/pages/KitsPage.tsx:988",className:"text-sm text-muted-foreground",children:a?l.descriptionKo:l.description})]})]}),i&&e.jsxs(v,{"data-loc":"client/src/pages/KitsPage.tsx:993",onClick:n,className:"flex items-center gap-2",size:"sm",children:[e.jsx(I,{"data-loc":"client/src/pages/KitsPage.tsx:994",size:15}),a?"ì í ì¶ê°":"Add Product"]}),f.length>0?e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:1000",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5",children:f.map(P=>e.jsx(ae,{"data-loc":"client/src/pages/KitsPage.tsx:1002",doc:P,isAdmin:i,onView:g,onEdit:N,onDelete:h},P.id))}):e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:1013",className:"text-center py-16 text-muted-foreground",children:[e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:1014",className:"mb-4 flex justify-center text-muted-foreground/40",children:l.icon}),e.jsx("p",{"data-loc":"client/src/pages/KitsPage.tsx:1015",className:"text-base",children:u("kits.noProducts")}),i&&e.jsx("p",{"data-loc":"client/src/pages/KitsPage.tsx:1016",className:"text-sm mt-2",children:a?"ìì 'ì í ì¶ê°' ë²í¼ì¼ë¡ ì íì ë±ë¡í´ì£¼ì¸ì.":"Use the 'Add Product' button above to register a product."})]}),b&&e.jsx(se,{"data-loc":"client/src/pages/KitsPage.tsx:1021",category:t,editDoc:c,onClose:()=>{y(!1),o(null)},onSaved:()=>j()})]})}function je({onView:t}){const{hasPermission:g}=J(),{t:m,language:u}=U(),x=g("system:manage"),a=L.map(d=>A.kits.list.useQuery({category:d})),i=a.some(d=>(d.data?.length??0)>0),l=A.kits.delete.useMutation(),[b,y]=w.useState(null),[c,o]=w.useState(null),f=async d=>{if(confirm(u==="ko"?"ì ë§ ìì íìê² ìµëê¹?":"Are you sure you want to delete?"))try{await l.mutateAsync({id:d}),a.forEach(h=>h.refetch())}catch(h){console.error(h)}},j=d=>{y(d),o(d.category)};return e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:1060",className:"space-y-8",children:[L.map((d,h)=>{const N=M[d],n=a[h].data??[];return n.length===0?null:e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:1066",children:[e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:1067",className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:1068",className:`p-2 rounded-lg bg-gradient-to-br ${N.color} text-primary shrink-0`,children:T[d]}),e.jsx("h3",{"data-loc":"client/src/pages/KitsPage.tsx:1071",className:"text-base font-bold text-foreground",children:N.label}),e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:1072",className:"text-xs text-muted-foreground bg-secondary px-2 py-0.5 rounded-full",children:u==="ko"?`${n.length}ê°`:n.length})]}),e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:1074",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5",children:n.map(P=>e.jsx(ae,{"data-loc":"client/src/pages/KitsPage.tsx:1076",doc:P,isAdmin:x,onView:t,onEdit:j,onDelete:f,showCategoryBadge:!1},P.id))})]},d)}),!i&&e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:1091",className:"text-center py-16 text-muted-foreground",children:[e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:1092",className:"mb-4 flex justify-center",children:e.jsx(Q,{"data-loc":"client/src/pages/KitsPage.tsx:1092",size:40,className:"text-muted-foreground/30"})}),e.jsx("p",{"data-loc":"client/src/pages/KitsPage.tsx:1093",className:"text-base",children:m("kits.noProducts")})]}),b&&c&&e.jsx(se,{"data-loc":"client/src/pages/KitsPage.tsx:1097",category:c,editDoc:b,onClose:()=>{y(null),o(null)},onSaved:()=>a.forEach(d=>d.refetch())})]})}function ke(){const[t,g]=w.useState("all"),[m,u]=w.useState(null),{t:x}=U(),a=w.useCallback(i=>{u(i)},[]);return e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:1120",className:"space-y-6",children:[e.jsx(oe,{"data-loc":"client/src/pages/KitsPage.tsx:1122",className:"pb-6",eyebrow:e.jsx(de,{"data-loc":"client/src/pages/KitsPage.tsx:1124",tone
172:"primary",children:"KITS"}),title:"PhAI KIT Catalog",description:e.jsx("p",{"data-loc":"client/src/pages/KitsPage.tsx:1126",children:x("kits.subtitle")})}),e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:1130",className:"relative border-b border-border",children:[e.jsx("div",{"data-loc":"client/src/pages/KitsPage.tsx:1132",className:"pointer-events-none absolute right-0 top-0 bottom-0 w-12 bg-gradient-to-l from-background to-transparent z-10 sm:hidden"}),e.jsxs("div",{"data-loc":"client/src/pages/KitsPage.tsx:1133",className:"flex gap-0 overflow-x-auto scrollbar-none",children:[e.jsxs("button",{"data-loc":"client/src/pages/KitsPage.tsx:1134",onClick:()=>g("all"),className:["flex items-center gap-1.5 px-3 py-3 text-xs sm:text-sm sm:px-4 font-medium whitespace-nowrap border-b-2 transition-colors",t==="all"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-border"].join(" "),children:[e.jsx(Q,{"data-loc":"client/src/pages/KitsPage.tsx:1143",size:14}),"All"]}),L.map(i=>{const l=M[i],b=t===i;return e.jsxs("button",{"data-loc":"client/src/pages/KitsPage.tsx:1150",onClick:()=>g(i),className:["flex items-center gap-1.5 px-3 py-3 text-xs sm:text-sm sm:px-4 font-medium whitespace-nowrap border-b-2 transition-colors",b?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-border"].join(" "),children:[T[i],e.jsx("span",{"data-loc":"client/src/pages/KitsPage.tsx:1161",className:"hidden sm:inline",children:l.label})]},i)})]})]}),t==="all"?e.jsx(je,{"data-loc":"client/src/pages/KitsPage.tsx:1170",onView:a}):e.jsx(Pe,{"data-loc":"client/src/pages/KitsPage.tsx:1172",category:t,onView:a},t),m&&e.jsx(fe,{"data-loc":"client/src/pages/KitsPage.tsx:1177",doc:m,onClose:()=>u(null)})]})}export{ke 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.