PageSourceSearch

https://ssicevs.com/assets/LabReviewPage-B6AjFAFH.js

js ssicevs.com collected 2026-10-08 04:51:27 UTC 77,213 bytes, 3 lines download raw bytes

1import{r as s,j as e}from"./metal-fx-C6GZ_SKA.js";import{r as Le}from"./index-CQWrk29H.js";import{n as zt}from"./ArrowSquareOut.es-CmUtbvub.js";import{s as xt}from"./ArrowUp.es-D5uyxXSe.js";import{m as It}from"./ArrowsClockwise.es-Ccddcr1_.js";import{c as X}from"./BookOpen.es-BQh6QKWO.js";import{s as Ot}from"./CaretDown.es-D_rsxVrV.js";import{e$ as qe,fq as Bt,fo as Kt,eT as Ne,eV as de,eX as se,f5 as Ut,f6 as Yt,f7 as bt}from"./index-D1yBc__G.js";import{n as Ze}from"./Check.es-B2lwH8mS.js";import{n as lt}from"./Checks.es-BtDqq-RG.js";import{n as Wt}from"./Clock.es-BLKrrI6L.js";import{s as Xt}from"./Copy.es-DK3Mnlai.js";import{c as Qt}from"./Crosshair.es-JqAAcZs5.js";import{p as Jt}from"./LinkSimple.es-BNPBI6ml.js";import{f as Gt}from"./MagnifyingGlass.es-BEZJJaij.js";import{z as Te,m as ea}from"./index.es-B53hgGN3.js";import{n as Pe}from"./Trash.es-DH9Jsm05.js";import{s as me}from"./VideoCamera.es-DSZDNNsX.js";import{c as ft}from"./Warning.es-5mIn238w.js";import{GROUPS as ta}from"./LabPage-CxHmNAlT.js";import{MediaRail as aa}from"./MediaRail-CtFh7jHz.js";import{L as ra}from"./index-BzaIvhmh.js";import"./motion-BHwmuFpx.js";import"./RouteLoader-D8h9tIoh.js";import"./ArrowsOutSimple.es-BE5-_0rR.js";import"./library-CFM6UuWm.js";import"./ArrowLineUp.es-ul7yRnSc.js";import"./ArrowsDownUp.es-BljJRZv_.js";import"./ArrowsLeftRight.es-CHeeMxjw.js";import"./Binoculars.es-Doc1_w36.js";import"./Table.es-wVzZgjBy.js";import"./CalendarBlank.es-DgCoYKmp.js";import"./ChartLine.es-DDh1kP89.js";import"./ChartLineUp.es-B7PQlweK.js";import"./CheckCircle.es-BrwnSsJ6.js";import"./ClockCounterClockwise.es-CvQkW4ZZ.js";import"./Coins.es-O2p2Ug3t.js";import"./Command.es-Cv4_QMrS.js";import"./Compass.es-BPGGz_0f.js";import"./CreditCard.es-DmPudVZg.js";import"./DownloadSimple.es-81cH4wjp.js";import"./Faders.es-BEh6Z1gK.js";import"./GearSix.es-DilJl0mO.js";import"./Info.es-BzICPLLU.js";import"./ListChecks.es-CE0o0BwQ.js";import"./ListNumbers.es-CyxAvH2R.js";import"./Pulse.es-C6F1i2_i.js";import"./Receipt.es-D8Za6EZm.js";import"./Rows.es-BVfQBVNu.js";import"./Sidebar.es-DWfWbTRf.js";import"./Sparkle.es-ATwqGlwV.js";import"./Stack.es-CVlaeRW0.js";import"./Swap.es-By965rOM.js";import"./Wallet.es-BzwpuH9P.js";import"./library-loaders-BoDKt841.js";import"./Cube.es-BSTNQXmI.js";import"./Lightning.es-DOeALmaQ.js";import"./controls-lL6mtqqv.js";import"./FigmaShader-CV0yj5Yl.js";import"./use-in-view-D8AUUq7X.js";import"./ProBadge-DeHkw0Dw.js";import"./index-BYYQuCeG.js";import"./index-CWZHqrBj.js";import"./CaretLeft.es-C4E89nBF.js";import"./ContactForm-7E2MVUQw.js";import"./parts-BmxketN2.js";import"./CaretRight.es-BuzfOvte.js";import"./LockSimple.es-BAYFhj7r.js";import"./LiveStage-BytPPZ53.js";import"./PreviewLoader-bPoMLVZ_.js";const sa=new Map([["bold",s.createElement(s.Fragment,null,s.createElement("path",{d:"M248.23,112.31A20,20,0,0,0,232,104H220V88a20,20,0,0,0-20-20H132L105.34,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V208a12,12,0,0,0,12,12H211.1a12,12,0,0,0,11.33-8l28.49-81.47.06-.17A20,20,0,0,0,248.23,112.31ZM92,68l28.8,21.6A12,12,0,0,0,128,92h68v12H69.77a20,20,0,0,0-18.94,13.58L44,137.15V68ZM202.59,196H48.89l23.72-68H226.37Z"}))],["duotone",s.createElement(s.Fragment,null,s.createElement("path",{d:"M208,88v24H69.77a8,8,0,0,0-7.59,5.47L32,208V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h72A8,8,0,0,1,208,88Z",opacity:"0.2"}),s.createElement("path",{d:"M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z"}))],["fill",s.createElement(s.Fragment,null,s.createElement("path",{d:"M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Z"}))],["light",s.createElement(s.Fragment,null,s.createElement("path",{d:"M243.36,111.81A14,14,0,0,0,232,106H214V88a14,14,0,0,0-14-14H130L101.74,52.8a14.06,14.06,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V208a6,6,0,0,0,6,6H211.1a6,6,0,0,0,5.69-4.1l28.49-85.47A14,14,0,0,0,243.36,111.81ZM40,62H93.34a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h72a2,2,0,0,1,2,2v18H69.77a14,14,0,0,0-13.28,9.57L38,171V64A2,2,0,0,1,40,62Zm193.9,58.63L206.78,202H4
10.33l27.54-82.63a2,2,0,0,1,1.9-1.37H232a2,2,0,0,1,1.9,2.63Z"}))],["regular",s.createElement(s.Fragment,null,s.createElement("path",{d:"M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z"}))],["thin",s.createElement(s.Fragment,null,s.createElement("path",{d:"M241.72,113a11.88,11.88,0,0,0-9.73-5H212V88a12,12,0,0,0-12-12H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V208a4,4,0,0,0,4,4H211.09a4,4,0,0,0,3.79-2.74l28.49-85.47A11.86,11.86,0,0,0,241.72,113ZM40,60H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h72a4,4,0,0,1,4,4v20H69.76a12,12,0,0,0-11.38,8.21L36,183.35V64A4,4,0,0,1,40,60Zm195.78,61.26L208.2,204H37.55L66,118.74A4,4,0,0,1,69.76,116H232a4,4,0,0,1,3.79,5.26Z"}))]]),na=new Map([["bold",s.createElement(s.Fragment,null,s.createElement("path",{d:"M137,168l11.52-11.51a12,12,0,0,0-17-17L120,151l-15-15,11.52-11.51a12,12,0,0,0-17-17L88,119,72.49,103.51a12,12,0,0,0-17,17L59,124,38.54,144.49a36,36,0,0,0,0,50.91l2.55,2.54L15.51,223.51a12,12,0,0,0,17,17l25.57-25.58,2.54,2.55a36.06,36.06,0,0,0,50.91,0L132,197l3.51,3.52a12,12,0,0,0,17-17ZM94.54,200.49a12,12,0,0,1-17,0L55.51,178.43a12,12,0,0,1,0-17L76,141l39,39Zm146-185a12,12,0,0,0-17,0L197.94,41.09l-2.54-2.55a36.05,36.05,0,0,0-50.91,0L124,59l-3.51-3.52a12,12,0,0,0-17,17l80,80a12,12,0,0,0,17-17L197,132l20.49-20.49a36,36,0,0,0,0-50.91l-2.55-2.54,25.58-25.57A12,12,0,0,0,240.49,15.51Zm-40,79L180,115,141,76l20.49-20.49a12,12,0,0,1,17,0l22.06,22.06a12,12,0,0,1,0,17Z"}))],["duotone",s.createElement(s.Fragment,null,s.createElement("path",{d:"M76,124l56,56-29,29a24,24,0,0,1-33.94,0L47,186.91A24,24,0,0,1,47,153ZM209,69.09,186.91,47A24,24,0,0,0,153,47L124,76l56,56,29-29A24,24,0,0,0,209,69.09Z",opacity:"0.2"}),s.createElement("path",{d:"M149.66,138.34a8,8,0,0,0-11.32,0L120,156.69,99.31,136l18.35-18.34a8,8,0,0,0-11.32-11.32L88,124.69,69.66,106.34a8,8,0,0,0-11.32,11.32L64.69,124,41.37,147.31a32,32,0,0,0,0,45.26l5.38,5.37-28.41,28.4a8,8,0,0,0,11.32,11.32l28.4-28.41,5.37,5.38a32,32,0,0,0,45.26,0L132,191.31l6.34,6.35a8,8,0,0,0,11.32-11.32L131.31,168l18.35-18.34A8,8,0,0,0,149.66,138.34Zm-52.29,65a16,16,0,0,1-22.62,0L52.69,181.25a16,16,0,0,1,0-22.62L76,135.31,120.69,180Zm140.29-185a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Zm-34.35,79L180,120.69,135.31,76l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,203.31,97.37Z"}))],["fill",s.createElement(s.Fragment,null,s.createElement("path",{d:"M149.66,149.66,131.31,168l18.35,18.34a8,8,0,0,1-11.32,11.32L132,191.31l-23.31,23.32a32.06,32.06,0,0,1-45.26,0l-5.37-5.38-28.4,28.41a8,8,0,0,1-11.32-11.32l28.41-28.4-5.38-5.37a32,32,0,0,1,0-45.26L64.69,124l-6.35-6.34a8,8,0,0,1,11.32-11.32L88,124.69l18.34-18.35a8,8,0,0,1,11.32,11.32L99.31,136,120,156.69l18.34-18.35a8,8,0,0,1,11.32,11.32Zm88-131.32a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Z"}))],["light",s.createElement(s.Fragment,null,s.createElement("path",{d:"M148.24,139.76a6,6,0,0,0-8.48,0L120,159.51,96.49,136l19.75-19.76a6,6,0,0,0-8.48-8.48L88,127.51,68.24,107.76a6,6,0,0,0-8.48,8.48L67.51,124,42.79,148.73a30,30,0,0,0,0,42.42l6.78,6.79L19.76,227.76a6,6,0,1,0,8.48,8.48l29.82-29.81,6.79,6.78a30,30,0,0,0,42.42,0L132,188.49l7.76,7.75a6,6,0,0,0,8.48-8.48L128.49,168l19.75-19.76A6,6,0,0,0,148.24,139.76Zm-49.45,65a18,18,0,0,1-25.46,0L51.27,182.67a18,18,0,0,1,0-25.46L76,132.49,123.51,180Zm137.45-185a6,6,0,0,0-8.48,0L197.94,49.57l-6.79-6.78a30,30,0,0,0-42.42,0L124,67.51l-7.76-7.75a6,6,0,0,0-8.48,8.48l80,80a6,6,0,0,0,8.48-8.48L188.49,132l24.72-24.73a30,30,0,0,0,0-42.42l-6.78-6.79,29.81-29.82A6,6,0,0,0,236.24,19.76Zm-31.51,79L180,123.51,132.49,76l24.72-24.73a18,18,0,0,1,25.46,0l22.06,22.06a18,18,0,0,1,0,25.46Z"}))],["regular",s.createElement(s.Fragment,null,s.createElement("path",{d:"M149.66,138.34a8,8,0,0,0-11.32,0L120,156.69,99.31,136l18.35-18.34a8,8,0,0,0-11.32-11.32L88,124.69,69.66,106.34a8,8,0,0,0-11.32,11.32L64.69,124,41.37,147.31a32,32,0,0,0,0,45.26l5.38,5.37-28.41,28.4a8,8,0,0,0,11.32,11.32l28.4-28.41,5.37,5.38a32,32,0,0,0,45.26,0L132,191.31l6.34,6.35a8,8,0,0,0,11.32-11.32L131.31,168l18.35-18.34A8,8,0,0,0,149.66,138.34Zm-52.29,65a16,16,0,0,1-22.62,0L52.69,181.25a16,16,0,0,1,0-22.62L76,135.31,120.69,180Zm140.29-185a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Zm-34.35,79L180,120.69,135.31,76l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,203.31,97.37Z"}))],["thin",s.createElement(s.Fragment,null,s.createElement("path",{d:"M146.83,141.17a4,4,0,0,0-5.66,0L120,162.34,93.66,136l21.17-21.17a4,4,0,0,0-5.66-5.66L88,130.34,66.83,109.17a4,4,0,0,0-5.66,5.66L70.34,124,44.2,150.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L58.06,203.6l8.2,8.2a28,28,0,0,0,39.6,0L132,185.66l9.17,9.17a4,4,0,0,0,5.66-5.66L125.66,168l21.17-21.17A4,4,0,0,0,146.83,141.17Zm-46.63,65a20,20,0,0,1-28.28,0L49.86,184.08a20,20,0,0,1,0-28.28L76,129.66,126.34,180Zm134.63-185a4,4,0,0,0-5.66,0L197.94,52.4l-8.2-8.2a28,28,0,0,0-39.6,0L124,70.34l-9.17-9.17a4,4,0,0,0-5.66,5.66l80,80a4,4,0,0,0,5.66-5.66L185.66,132l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,31.23-31.23A4,4,0,0,0,234.83,21.17ZM212,86.06a19.86,19.86,0,0,1-5.86,14.14L180,126.34,129.66,76,155.8,49.86a20,20,0,0,1,28.28,0l22.06,22.06A19.85,19.85,0,0,1,212,86.06Z"}))]]),la=new Map([["bold",s.createElement(s.Fragment,null,s.createElement("path",{d:"M120,137,48,201A12,12,0,1,1,32,183l61.91-55L32,73A12,12,0,1,1,48,55l72,64A12,12,0,0,1,120,137Zm96,43H120a12,12,0,0,0,0,24h96a12,12,0,0,0,0-24Z"}))],["duotone",s.createElement(s.Fragment,null,s.createElement("path",{d:"M216,80V192H40V64H200A16,16,0,0,1,216,80Z",opacity:"0.2"}),s.createElement("path",{d:"M117.31,134l-72,64a8,8,0,1,1-10.63-12L100,128,34.69,70A8,8,0,1,1,45.32,58l72,64a8,8,0,0,1,0,12ZM216,184H120a8,8,0,0,0,0,16h96a8,8,0,0,0,0-16Z"}))],["fill",s.createElement(s.Fragment,null,s.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM77.66,173.66a8,8,0,0,1-11.32-11.32L100.69,128,66.34,93.66A8,8,0,0,1,77.66,82.34l40,40a8,8,0,0,1,0,11.32ZM192,176H128a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",s.createElement(s.Fragment,null,s.createElement("path",{d:"M116,132.48l-72,64a6,6,0,0,1-8-9L103,128,36,68.49a6,6,0,0,1,8-9l72,64a6,6,0,0,1,0,9ZM216,186H120a6,6,0,0,0,0,12h96a6,6,0,0,0,0-12Z"}))],["regular",s.createElement(s.Fragment,null,s.createElement("path",{d:"M117.31,134l-72,64a8,8,0,1,1-10.63-12L100,128,34.69,70A8,8,0,1,1,45.32,58l72,64a8,8,0,0,1,0,12ZM216,184H120a8,8,0,0,0,0,16h96a8,8,0,0,0,0-16Z"}))],["thin",s.createElement(s.Fragment,null,s.createElement("path",{d:"M116,128a4,4,0,0,1-1.34,3l-72,64a4,4,0,1,1-5.32-6L106,128,37.34,67a4,4,0,0,1,5.32-6l72,64A4,4,0,0,1,116,128Zm100,60H120a4,4,0,0,0,0,8h96a4,4,0,0,0,0-8Z"}))]]),gt=s.forwardRef((n,c)=>s.createElement(qe,{ref:c,...n,weights:sa}));gt.displayName="FolderOpenIcon";const oa=gt,vt=s.forwardRef((n,c)=>s.createElement(qe,{ref:c,...n,weights:na}));vt.displayName="PlugsIcon";const ia=vt,wt=s.forwardRef((n,c)=>s.createElement(qe,{ref:c,...n,weights:la}));wt.displayName="TerminalIcon";const ca=wt,yt=()=>typeof document<"u"&&document.querySelector('div[style*="contain: paint"]')||document.body,kt=n=>{const c=Date.now()-Date.parse(n);if(!Number.isFinite(c)||c<0)return"";const r=Math.floor(c/6e4);if(r<60)return`${r}m`;
1const d=Math.floor(r/60);return d<48?`${d}h`:`${Math.floor(d/24)}d`},da=n=>{const c=new Date(n);return`${c.toLocaleDateString("en-US",{month:"short",day:"numeric"})}, ${c.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1})}`},ot=[{id:"all",label:"All"},{id:"new",label:"New"},{id:"seen",label:"Seen"},{id:"reviewed",label:"Reviewed"},{id:"readiness",label:"Shipped"}],it=n=>n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"");function C({label:n,children:c}){const[r,d]=s.useState(null);return e.jsxs("span",{className:"inline-flex",onMouseEnter:u=>d(u.currentTarget.getBoundingClientRect()),onMouseLeave:()=>d(null),children:[c,r&&Le.createPortal((()=>{const u=r.top<48;return e.jsx("span",{className:`pointer-events-none fixed z-[90] -translate-x-1/2 whitespace-nowrap rounded-md px-2 py-1 text-[10.5px] font-normal shadow-[0_4px_14px_rgba(0,0,0,0.2)] backdrop-blur-md ${u?"":"-translate-y-full"}`,style:{left:Math.min(Math.max(r.left+r.width/2,90),window.innerWidth-90),top:u?r.bottom+8:r.top-8,background:"color-mix(in srgb, var(--lab-panel) 72%, transparent)",color:"var(--lab-muted)"},children:n})})(),document.body)]})}const ct=/^\[marks ([^\]]+)\]\s*/,ua=n=>{const c=n.match(ct);if(!c)return null;const r=c[1].split(" | ").map(d=>{const u=d.match(/^(\d+)@([\d.]+)%,([\d.]+)%(?:\+([\d.]+)%,([\d.]+)%)?(?: ·"([^"]*)")?(?: in "([^"]*)")?$/);return u?{n:parseInt(u[1],10),x:parseFloat(u[2]),y:parseFloat(u[3]),w:u[4]?parseFloat(u[4]):void 0,h:u[5]?parseFloat(u[5]):void 0,target:u[6]??"",container:u[7]??""}:null}).filter(Boolean);return r.length?{items:r,rest:n.replace(ct,"")}:null},dt="lab-no-ring faint-scroll max-h-[45vh] min-h-9 min-w-[120px] resize-none rounded-lg border-0 bg-transparent px-2.5 py-2 text-[12px] leading-[20px] shadow-none outline-none ring-0";function ma(n,c){var p;const r=[],d=/#(\d+)/g;let u=0,b;for(;b=d.exec(n);){const $=Number(b[1]);$<1||$>c.length||(b.index>u&&r.push({text:n.slice(u,b.index)}),r.push({text:b[0],n:$,label:((p=c[$-1])==null?void 0:p.target)??""}),u=b.index+b[0].length)}return u<n.length&&r.push({text:n.slice(u)}),r}function Q(n){const c=n.tagName.toLowerCase(),r=n.getAttribute("data-label")??n.getAttribute("aria-label");if(r)return`${c} "${r.slice(0,24)}"`;const d=Array.from(n.childNodes).filter(p=>p.nodeType===Node.TEXT_NODE).map(p=>(p.textContent??"").trim()).join(" ").trim();if(d&&d.length<=24)return`${c} "${d}"`;const u=(typeof n.className=="string"?n.className:"").split(/\s+/).find(p=>p.length>2&&!/^(flex|grid|absolute|relative|w-|h-|p[xytblr]?-|m[xytblr]?-|text-|bg-|border|rounded|gap-|items-|justify-|min-|max-|overflow|z-|shrink|grow|truncate|tabular)/.test(p));if(u)return`${c}.${u}`;const b=(n.innerText??"").trim().split(`
2`)[0];return b&&b.length<=24?`${c} "${b}"`:c}function $e(n,c){const r=n.getBoundingClientRect();return{x:(r.left-c.left)/c.width*100,y:(r.top-c.top)/c.height*100,w:r.width/c.width*100,h:r.height/c.height*100}}function ut(n,c,r){const d=document.elementsFromPoint(n,c);for(const u of d){if(!r.contains(u))continue;const b=u.getBoundingClientRect();if(b.width<2||b.height<2)continue;const p=u.closest("svg");return p&&p!==u&&r.contains(p)?p:u}return null}function mt(n,c){const r=n.getBoundingClientRect(),d=Q(n);let u=n.parentElement;for(;u&&c.contains(u)&&u!==c;){const p=u.getBoundingClientRect();if((p.width*p.height>r.width*r.height*1.35||u.children.length>1)&&Q(u)!==d)return u;u=u.parentElement}const b=c;return Q(b)===d?null:b}const pt=/^\[@ ([\d.]+)%,([\d.]+)%(?: · "([^"]*)")?\]\s*/,ht=n=>{const c=n.match(pt);return c?{x:parseFloat(c[1]),y:parseFloat(c[2]),target:c[3]??"",rest:n.replace(pt,"")}:null};function jt(n){const[c,r]=s.useState(()=>{try{return sessionStorage.getItem(n)??""}catch{return""}});return s.useEffect(()=>{try{c?sessionStorage.setItem(n,c):sessionStorage.removeItem(n)}catch{}},[n,c]),[c,r]}async function H(n){return(await fetch("/__lab-review",n?{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)}:void 0)).json()}function pa({t:n,workerIdle:c,onRetry:r,onCancel:d}){const u=n.status==="in-progress",b=n.status==="new",p=u||b,$=!!n.needsAction,[f,M]=s.useState(p||n.status==="blocked"),g=n.status==="blocked"?"#e05d5d":u?"var(--lab-accent)":"var(--lab-muted)",D=n.action==="add-to-library"?e.jsx(X,{className:"h-3.5 w-3.5"}):n.action==="publish-21st"?e.jsx(ue,{className:"h-3 w-3"}):n.action==="framer-port"?e.jsx(se,{className:"h-3.5 w-3.5"}):n.action==="create-preview"?e.jsx(me,{className:"h-3.5 w-3.5"}):n.action==="propose-delete"?e.jsx(Pe,{className:"h-3.5 w-3.5"}):n.action==="contra-project"?e.jsx(fa,{className:"h-3.5 w-3.5"}):e.jsx(bt,{className:"h-3.5 w-3.5"}),j=(n.claudeNote||n.comment||"").replace(/^\[[^\]]*\]\s*/,"");return e.jsxs("li",{className:"rounded-lg p-2.5",style:{background:"color-mix(in srgb, var(--lab-text) 6%, transparent)"},children:[e.jsxs("button",{type:"button",onClick:()=>M(S=>!S),className:"flex w-full items-center gap-2 text-left text-[10px] font-medium",children:[e.jsx("span",{className:`grid shrink-0 place-items-center ${u||$?"animate-pulse":""}`,style:{color:g},title:n.action,children:D}),e.jsx("span",{className:"shrink-0 text-[var(--lab-text)]",children:n.action}),!f&&j&&e.jsx("span",{className:"min-w-0 flex-1 truncate text-[var(--lab-muted)]",children:j}),e.jsx("span",{className:`${f?"ml-auto":""} shrink-0 tabular-nums text-[var(--lab-muted)]`,children:da(n.ts)}),e.jsx(Ot,{className:`h-3 w-3 shrink-0 text-[var(--lab-muted)] transition-transform ${f?"rotate-180":""}`})]}),b&&!$&&e.jsxs("p",{className:"mt-1 flex items-center gap-1.5 text-[10px] font-medium",style:{color:c?"#e8b34b":"var(--lab-muted)"},children:[e.jsx(Wt,{className:"h-3 w-3 shrink-0"}),e.jsxs("span",{children:["queued ",kt(n.ts)," · ",c?"no worker running":"waiting for a free worker"]})]}),$&&e.jsxs("p",{className:"mt-1.5 flex items-start gap-1.5 text-[11px] font-semibold leading-relaxed",style:{color:"#e05d5d"},children:[e.jsx(ft,{className:"mt-[1px] h-3.5 w-3.5 shrink-0 animate-pulse",weight:"fill"}),e.jsxs("span",{children:["Needs you: ",n.needsAction]})]}),f&&e.jsxs(e.Fragment,{children:[n.comment&&e.jsx("p",{className:"mt-1.5 text-[11.5px] leading-relaxed text-[var(--lab-text)]",children:n.comment}),n.claudeNote&&e.jsxs("p",{className:"mt-1 text-[10.5px] leading-relaxed text-[var(--lab-muted)]",children:["↳ ",n.claudeNote]}),(n.status!=="done"||p)&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-1.5",children:[n.status==="blocked"&&e.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-[10.5px] font-semibold transition-colors hover:bg-[rgba(224,93,93,0.12)]",style:{color:"#e05d5d",border:"1px solid rgba(224,93,93,0.35)"},children:[e.jsx(It,{className:"h-3 w-3"})," ",n.needsAction?"I fixed it — retry":"try again"]}),e.jsxs("button",{type:"button",onClick:d,className:"flex items-center gap-1.5 rounded-md border border-foreground
2/[0.10] px-2 py-1 text-[10.5px] font-semibold text-[var(--lab-muted)] transition-colors hover:border-foreground/20 hover:text-[var(--lab-text)]",children:[e.jsx(de,{className:"h-3 w-3"})," cancel"]})]})]})]})}function Ce({sev:n,title:c,detail:r,code:d,fix:u,forceQueued:b=!1}){const[p,$]=s.useState(!1),f=p||b;return e.jsxs("div",{className:"rounded-lg border p-2.5",style:{borderColor:"var(--lab-line)",background:"color-mix(in srgb, var(--lab-text) 3.5%, transparent)"},children:[e.jsx("div",{className:"text-[10px] font-semibold",style:{color:n==="FAIL"?"#e05d5d":"#e8b34b"},children:c}),e.jsx("p",{className:"mt-1 text-[11px] leading-relaxed text-[var(--lab-text)]",children:r}),d&&e.jsx("pre",{className:"faint-scroll mt-1.5 overflow-x-auto rounded bg-foreground/[0.04] px-2 py-1 text-[9.5px] text-[var(--lab-muted)]",children:d}),e.jsx("button",{type:"button",disabled:f,onClick:()=>{u(),$(!0)},className:"mt-2 rounded-md px-2.5 py-1 text-[10px] font-semibold transition-colors disabled:cursor-default",style:f?{background:"rgba(57,169,123,0.14)",color:"#39a97b"}:{background:"color-mix(in srgb, var(--lab-accent) 15%, transparent)",color:"var(--lab-accent)"},children:f?"queued for Claude ✓":"Fix it"})]})}const ha="color-mix(in srgb, var(--lab-text) 26%, transparent)",W="#e8b34b";function Ve({c:n,posting:c=!1,pending:r={}}){var u,b,p,$,f,M,g,D,j,S;const d=[];if(r.needsYou&&d.push({key:"needs-you",label:"blocked — needs YOUR action (open it to see what)",node:e.jsx(ft,{className:"h-4 w-4",weight:"fill"}),pulse:!0,color:"#e05d5d"}),r.delete&&d.push({key:"delete",label:r.delete==="queued"?"deletion queued — waiting for a worker":"deletion running — moving to lab-review/trash…",node:e.jsx(Pe,{className:"h-4 w-4"}),pulse:r.delete===!0,color:"#e05d5d"}),r.comment&&d.push({key:"comment",label:r.comment==="queued"?"comment queued — waiting for a worker":"comment — Claude is on it…",node:e.jsx(bt,{className:"h-4 w-4"}),pulse:r.comment===!0,color:r.comment===!0?"var(--lab-accent)":"var(--lab-muted)"}),n.hasDemoVideo){const k=n.publishState==="published",R=(u=n.stale)==null?void 0:u.video,L=k&&((b=n.stale)==null?void 0:b.libraryVideo),Z=R&&L?"demo AND library preview videos stale — re-record both":R?"new video recorded — not yet in the kit":L?`library preview video stale — re-record (npm run library:video ${n.slug})`:k?"demo + library preview videos up to date":"demo video recorded";d.push({key:"video",label:r.video==="queued"?"video re-record queued — waiting for a worker":r.video?"video re-recording…":Z,node:e.jsx(me,{className:"h-4 w-4"}),stale:!r.video&&(R||L),pulse:r.video===!0,color:r.video?W:void 0})}else r.video&&d.push({key:"video",label:"first video recording queued…",node:e.jsx(me,{className:"h-4 w-4"}),pulse:!0,color:"var(--lab-accent)"});if(n.published&&(c||r.t21)?d.push({key:"21st",label:"republishing to 21st.dev…",node:e.jsx(ue,{className:"h-3.5 w-3.5"}),pulse:!0,color:W}):n.published?d.push({key:"21st",label:(p=n.stale)!=null&&p.t21?"published on 21st.dev — source updated since, needs republish":"published on 21st.dev",node:e.jsx(ue,{className:"h-3.5 w-3.5"}),stale:($=n.stale)==null?void 0:$.t21}):(c||r.t21)&&d.push({key:"21st",label:r.t21==="queued"&&!c?"21st publish queued — waiting for a worker":"publishing to 21st.dev…",node:e.jsx(ue,{className:"h-3.5 w-3.5"}),pulse:c||r.t21===!0,color:c||r.t21===!0?"var(--lab-accent)":"var(--lab-muted)"}),r.library){const k=n.publishState==="published";d.push({key:"library",label:k?"library update queued…":"library publish queued…",node:e.jsx(X,{className:"h-4 w-4"}),pulse:!0,color:k?W:"var(--lab-accent)"})}else if(n.publishState){const k=n.publishState,R=((f=n.stale)==null?void 0:f.library)||((M=n.stale)==null?void 0:M.libraryVideo),L=k==="requested"?W:k==="staged"?ha:R?W:"var(--lab-accent)",Z=k==="requested"?"publish requested — queued; awaiting the build (video + registry) before it goes live":k==="staged"?"staged in /lab — not published. Use “Publish to library” to register it":(g=n.stale)!=null&&g.library?"in the library — source updated since, needs resync":(D=n.stale)!=null&&D.libraryVideo?"in the library — preview video is behind, needs re-record":"published in the component library";d.push({key:"library",label:Z,node:e.jsx(X,{className:"h-4 w-4"}),color:L})}return r.framer?d.push({key:"framer",label:n.framer?"framer update queued…":"framer port queued…",node:e.jsx(se,{className:"h-4 w-4"}),pulse:!0,color:n.framer?W:"var(--lab-accent)"}):n.framer&&d.push({key:"framer",label:(j=n.stale)!=null&&j.framer?`framer — ${n.framer.status} · source updated since, needs re-port`:`framer — ${n.framer.status}`,node:e.jsx(se,{className:"h-4 w-4"}),stale:(S=n.stale)==null?void 0:S.framer}),d.length===0?null:e.jsx("span",{className:"flex shrink-0 items-center gap-1.5",style:{color:"var(--lab-accent)"},children:d.map(k=>e.jsx("span",{title:k.label,className:`grid place-items-center ${k.pulse?"animate-pulse opacity-100":"opacity-80"}`,style:k.color?{color:k.color}:k.stale?{color:W}:void 0,children:k.node},k.key))})}function xa(){const n=s.useRef(null);return s.useEffect(()=>{let c=0,r=null,d=null,u=!0;return(async()=>{try{if(d=await navigator.mediaDevices.getUserMedia({audio:!0}
2),!u){d.getTracks().forEach(M=>M.stop());return}r=new AudioContext,r.state==="suspended"&&r.resume();const b=r.createAnalyser();b.fftSize=256,r.createMediaStreamSource(d).connect(b);const p=new Uint8Array(b.frequencyBinCount),$=n.current?[...n.current.children]:[],f=()=>{b.getByteFrequencyData(p),$.forEach((M,g)=>{const D=Math.floor(g/$.length*p.length*.6),j=Math.floor((g+1)/$.length*p.length*.6);let S=0;for(let R=D;R<j;R++)S+=p[R];const k=S/Math.max(1,j-D)/255;M.style.height=`${4+k*14}px`}),c=requestAnimationFrame(f)};f()}catch{}})(),()=>{u=!1,cancelAnimationFrame(c),d==null||d.getTracks().forEach(b=>b.stop()),r==null||r.close()}},[]),e.jsx("div",{ref:n,className:"-mr-1.5 flex h-9 items-center gap-[3px] pl-2","aria-hidden":!0,children:[0,1,2].map(c=>e.jsx("span",{className:"w-[3px] rounded-full transition-[height] duration-75",style:{height:4,background:"#e05d5d"}},c))})}function ba({slug:n,onComment:c}){const[r,d]=s.useState(!1),[u,b]=s.useState(!1),[p,$]=jt(`labrev:note:${n}`),[f,M]=s.useState(!1),[g,D]=s.useState(!1),[j,S]=s.useState(!1),k=s.useRef(null),R=`/__lab-review/video/${n}`;return s.useEffect(()=>{const L=k.current;L&&(g&&j&&!r?L.play().catch(()=>{}):L.pause())},[g,j,r]),e.jsxs("div",{className:"mb-3",children:[e.jsx("div",{className:"relative cursor-zoom-in overflow-hidden rounded-lg border bg-black",style:{borderColor:"color-mix(in srgb, var(--lab-line) 70%, transparent)"},onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),onClick:()=>d(!0),children:e.jsx("video",{ref:k,src:R,poster:`/__lab-review/poster/${n}`,muted:!0,loop:!0,playsInline:!0,preload:"auto",onCanPlayThrough:()=>S(!0),className:"aspect-video w-full object-contain"})}),r&&Le.createPortal(e.jsx("div",{className:"lab-vars fixed inset-0 z-[85] flex items-center justify-center bg-black/50 backdrop-blur-sm",onClick:L=>{L.target===L.currentTarget&&!u&&d(!1)},onMouseLeave:()=>{u||d(!1)},role:"dialog","aria-label":"Demo video preview",children:e.jsxs("div",{className:"flex w-[min(90vw,860px)] flex-col gap-3",children:[e.jsxs("div",{className:"overflow-hidden rounded-2xl border shadow-[0_30px_90px_rgba(0,0,0,0.6)]",style:{borderColor:"color-mix(in srgb, var(--lab-line) 4%, transparent)",background:"var(--lab-panel)"},children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5",children:[e.jsxs("span",{className:"text-[12px] font-semibold text-[var(--lab-text)]",children:["Demo video — ",n]}),e.jsx("span",{className:"ml-auto"}),e.jsx("button",{type:"button",onClick:()=>{fetch("/__lab-review",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({op:"reveal-video",slug:n})})},className:"grid h-6 w-6 place-items-center rounded-md text-[var(--lab-muted)] hover:text-[var(--lab-text)]","aria-label":"Show video file in folder",title:"open the folder with this video + cover image",children:e.jsx(oa,{className:"h-4 w-4"})}),e.jsx("button",{type:"button",onClick:()=>d(!1),className:"grid h-6 w-6 place-items-center rounded-md text-[var(--lab-muted)] hover:text-[var(--lab-text)]","aria-label":"Close preview",children:e.jsx(de,{className:"h-4 w-4"})})]}),e.jsx("video",{src:R,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,controls:!0,className:"max-h-[68vh] w-full bg-black object-contain"})]}),e.jsx(Te,{size:"md",colorVariant:"ocean",theme:"dark",strength:.75,duration:7,borderRadius:14,className:"w-full",children:e.jsxs("div",{className:"flex w-full items-center gap-1.5 rounded-[14px] p-2 shadow-[0_18px_50px_rgba(0,0,0,0.5)] backdrop-blur-xl",style:{background:"color-mix(in srgb, var(--lab-panel) 85%, transparent)"},children:[e.jsx("input",{value:p,onChange:L=>$(L.target.value),onFocus:()=>b(!0),onBlur:()=>b(!1),onKeyDown:L=>{L.key==="Enter"&&p.trim()&&(c(p.trim()),$(""),M(!0),setTimeout(()=>M(!1),2200))},placeholder:"Comment",className:"lab-no-ring h-9 min-w-[120px] flex-1 rounded-lg border-0 bg-transparent px-2.5 text-[12px] text-[var(--lab-text)] shadow-none outline-none ring-0 placeholder:text-[var(--lab-muted)] placeholder:opacity-50",style:{WebkitAppearance:"none"}}),f&&e.jsx("span",{className:"text-[11px] font-semibold text-[#39a97b]",children:"queued ✓"}),p.trim()&&e.jsx("button",{type:"button",onClick:()=>{c(p.trim()),$(""),M(!0),setTimeout(()=>M(!1),2200)},className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg text-white transition-opacity hover:opacity-90",style:{background:"var(--lab-accent)"},children:e.jsx(xt,{className:"h-4 w-4",weight:"bold"})})]})})]})}),yt())]})}function fa({className:n="h-3 w-3"}){return e.jsx("svg",{viewBox:"0 0 24 24",className:n,fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round","aria-hidden":!0,
2children:e.jsx("path",{d:"M17.5 7.2A7 7 0 1 0 17.5 16.8"})})}function ue({className:n}){return e.jsx("svg",{viewBox:"-20 -20 440 440",className:n,"aria-hidden":!0,children:e.jsx("path",{fill:"none",stroke:"currentColor",strokeWidth:30,strokeLinejoin:"round",d:"M358.333 0C381.345 0 400 18.6548 400 41.6667V295.833C400 298.135 398.134 300 395.833 300H270.833C268.532 300 266.667 301.865 266.667 304.167V395.833C266.667 398.134 264.801 400 262.5 400H41.6667C18.6548 400 0 381.345 0 358.333V304.72C0 301.793 1.54269 299.081 4.05273 297.575L153.76 207.747C157.159 205.708 156.02 200.679 152.376 200.065L151.628 200H4.16667C1.86548 200 6.71103e-08 198.135 0 195.833V104.167C1.07376e-06 101.865 1.86548 100 4.16667 100H162.5C164.801 100 166.667 98.1345 166.667 95.8333V4.16667C166.667 1.86548 168.532 1.00666e-07 170.833 0H358.333ZM170.833 100C168.532 100 166.667 101.865 166.667 104.167V295.833C166.667 298.135 168.532 300 170.833 300H262.5C264.801 300 266.667 298.135 266.667 295.833V104.167C266.667 101.865 264.801 100 262.5 100H170.833Z"})})}function Hr(){var tt,at,rt;const{theme:n,setTheme:c}=Bt(),[r,d]=s.useState(null),[u,b]=s.useState(""),[p,$]=Kt(),[f,M]=s.useState(()=>{const t=p.get("tab");return t&&ot.some(a=>a.id===t)?t:"all"}),[g,D]=s.useState(()=>p.get("c"));s.useEffect(()=>{const t=new URLSearchParams;g&&t.set("c",g),f!=="all"&&t.set("tab",f),$(t,{replace:!0})},[g,f]);const[j,S]=jt("labrev:draft"),[k]=s.useState("refine"),[R,L]=s.useState(!1),[Z,Se]=s.useState(!1),pe=s.useRef(null),Nt=(t,a)=>{let o=t.replace(/\s+/g," ").trim();return o=o.replace(/\b(comma)\b/gi,",").replace(/\b(full stop|period)\b/gi,".").replace(/\b(question mark)\b/gi,"?").replace(/\s+([,.?!])/g,"$1"),(a===""||/[.?!]\s*$/.test(a))&&o&&(o=o[0].toUpperCase()+o.slice(1)),o},Ae=s.useRef(null);s.useEffect(()=>{const t=Ae.current;t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)},[j]);const ne=s.useRef(""),$t=()=>{var o;if(Z){(o=pe.current)==null||o.stop();return}const t=window.webkitSpeechRecognition;if(!t)return;const a=new t;a.continuous=!0,a.interimResults=!0,a.lang="en-US",a.maxAlternatives=1,ne.current=j?j.replace(/\s+$/,"")+" ":"",a.onresult=i=>{let h="";for(let y=i.resultIndex;y<i.results.length;y++){const m=i.results[y];if(m.isFinal){const E=Nt(m[0].transcript,ne.current);ne.current=ne.current+E+" "}else h+=m[0].transcript}S((ne.current+h).replace(/\s+$/,h?"":" ").trimEnd())},a.onend=()=>{Se(!1),pe.current=null},a.onerror=()=>{Se(!1),pe.current=null},a.start(),pe.current=a,Se(!0)},[P,he]=s.useState(!1),[Ct,xe]=s.useState(!1),[Ee,ze]=s.useState(""),[w,B]=s.useState(()=>{try{const t=JSON.parse(sessionStorage.getItem("labrev:videoSteps")??"null");return t&&t.slug===new URLSearchParams(window.location.search).get("c")?t.steps:null}catch{return null}});s.useEffect(()=>{try{w!==null&&g?sessionStorage.setItem("labrev:videoSteps",JSON.stringify({slug:g,steps:w})):sessionStorage.removeItem("labrev:videoSteps")}catch{}},[w]);const[_,O]=s.useState(null),[J,Me]=s.useState(null),[le,K]=s.useState(null),Ie=s.useRef(null),Oe=s.useRef(null),[,Lt]=s.useState(0);s.useEffect(()=>{let t=0;const a=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>Lt(o=>o+1))};return window.addEventListener("scroll",a,{passive:!0,capture:!0}),window.addEventListener("resize",a),()=>{cancelAnimationFrame(t),window.removeEventListener("scroll",a,!0),window.removeEventListener("resize",a)}},[]);const[V,be]=s.useState(()=>{try{const t=JSON.parse(sessionStorage.getItem("labrev:marks")??"null");return t&&t.slug===new URLSearchParams(window.location.search).get("c")?t.marks:[]}catch{return[]}});s.useEffect(()=>{try{V.length&&g?sessionStorage.setItem("labrev:marks",JSON.stringify({slug:g,marks:V})):sessionStorage.removeItem("labrev:marks")}catch{}},[V,g]);const[A,fe]=s.useState(null),Re=s.useRef(null),[z,St]=s.useState("tasks");s.useEffect(()=>{H().then(d)},[]);const Fe=s.useMemo(()=>{const t=new Map;for(const a of ta)for(const o of a.items)t.set(it(o.name),o);return t},[]),ge=t=>{var a;return r?r.data.reviewed.includes(t)?"reviewed":(a=r.data.seen)!=null&&a.includes(t)?"seen":"new":"new"},oe=s.useMemo(()=>
2{if(!r)return[];const t=u.trim().toLowerCase();return r.components.filter(a=>!t||(a.name+a.group+a.note+a.slug).toLowerCase().includes(t)).sort((a,o)=>(o.addedAt??0)-(a.addedAt??0))},[r,u]),Be=t=>(r==null?void 0:r.data.tasks.some(a=>a.slug===t&&a.action==="publish-21st"&&(a.status==="new"||a.status==="in-progress")))??!1,ve=s.useMemo(()=>[{key:"new",label:"New — not seen yet",rows:oe.filter(t=>ge(t.slug)==="new")},{key:"seen",label:"Seen — awaiting review",rows:oe.filter(t=>ge(t.slug)==="seen")},{key:"reviewed",label:"Reviewed",rows:oe.filter(t=>ge(t.slug)==="reviewed"&&!t.published&&!Be(t.slug))},{key:"published",label:"Shipped",rows:oe.filter(t=>t.published||Be(t.slug))}].filter(t=>t.rows.length===0?!1:f==="all"?!0:f==="readiness"?t.key==="published":t.key===f),[oe,f,r]),l=(r==null?void 0:r.components.find(t=>t.slug===g))??null,F=(r==null?void 0:r.data.tasks.filter(t=>t.slug===g))??[],we=((tt=r==null?void 0:r.worker)==null?void 0:tt.lastSeen)??0,Ke=!we||Date.now()-we>2100*1e3,Ue=we?kt(new Date(we).toISOString())+" ago":"",U=l?r==null?void 0:r.data.reviewed.includes(l.slug):!1,ie=t=>F.some(a=>a.action===t&&(a.status==="new"||a.status==="in-progress")),At=t=>F.some(a=>a.action===t&&a.status==="done"),Ye=F.some(t=>t.status==="new"||t.status==="in-progress");s.useEffect(()=>{if(!Ye)return;const t=setInterval(()=>H().then(d),5e3);return()=>clearInterval(t)},[Ye,g]);const He=s.useRef(0),[We,Et]=s.useState(0);s.useEffect(()=>{const t=a=>{var m;if(a.key!=="ArrowDown"&&a.key!=="ArrowUp")return;const o=document.activeElement;if(o&&(o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.isContentEditable))return;const i=ve.flatMap(E=>E.rows.map(v=>v.slug));if(i.length===0)return;a.preventDefault();const h=g?i.indexOf(g):-1,y=a.key==="ArrowDown"?i[Math.min(i.length-1,h+1)]:i[Math.max(0,h-1)];y&&y!==g&&(He.current=a.key==="ArrowDown"?1:-1,ye(y),(m=document.querySelector(`[data-row="${y}"]`))==null||m.scrollIntoView({block:"nearest"}))};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[ve,g]);const ye=t=>{var o;t!==g&&Et(He.current),He.current=0,D(t),K(null),S(""),he(!1),B(null),O(null),xe(!1),r&&!((o=r.data.seen)!=null&&o.includes(t))&&H({op:"mark-seen",slug:t}).then(d);const a=(r==null?void 0:r.data.ackDone)??[];r!=null&&r.data.tasks.some(i=>i.slug===t&&i.status==="done"&&!a.includes(i.id))&&H({op:"ack-done",slug:t}).then(d)},Xe=()=>{if(!l||!j.trim()&&k!=="propose-delete")return;const t=V.length?`[marks ${V.map((a,o)=>{const i=a.w!=null&&a.h!=null?`+${a.w.toFixed(1)}%,${a.h.toFixed(1)}%`:"",h=a.container?` in "${a.container}"`:"";return`${o+1}@${a.x.toFixed(1)}%,${a.y.toFixed(1)}%${i}${a.target?` ·"${a.target}"`:""}${h}`}).join(" | ")}] `:"";H({op:"add-task",slug:l.slug,action:k,comment:t+j.trim()}).then(a=>{d(a),S(""),be([]),he(!1)})},Mt=()=>{if(!l||!w||w.length===0)return;const t=i=>`${i.x.toFixed(1)}%,${i.y.toFixed(1)}%${i.a?` ~${i.a}`:""}`,o=`[video-path] ${w.map((i,h)=>i.kind==="drag"&&i.to?`${h+1}. drag "${i.target}" @ ${t(i)} to drop "${i.to.target}" @ ${t(i.to)}`:`${h+1}. ${i.kind} "${i.target}" @ ${t(i)}`).join(" → ")}${j.trim()?` — ${j.trim()}`:""}`;H({op:"add-task",slug:l.slug,action:"create-preview",comment:o}).then(i=>{d(i),S(""),B(null),O(null)})},Rt=()=>{if(!l)return;const t=j.trim();H({op:"add-task",slug:l.slug,action:"framer-port",comment:t||"Port to a Framer code component (lab/framer pipeline)."}).then(a=>{d(a),S("")})},[ce,Qe]=s.useState(!1);s.useEffect(()=>Qe(!1),[g]);const[I,Je]=s.useState(null),De=(t,a)=>{navigator.clipboard.writeText(a),Je(t),window.setTimeout(()=>Je(o=>o===t?null:o),1400)},Ft=t=>{if(w!==null){if(_)return;let x=t.currentTarget.querySelector("[data-demo-root]")??t.currentTarget;for(;x.children.length===1&&x.firstElementChild;)x=x.firstElementChild;const N=x.getBoundingClientRect(),_t=Math.min(100,Math.max(0,(t.clientX-N.left)/N.width*100)),Zt=Math.min(100,Math.max(0,(t.clientY-N.top)/N.height*100)),ee=document.elementFromPoint(t.clientX,t.clientY);let st="";if(ee&&ee!==x&&x.contains(ee)){const ae=[];let q=ee;for(;q!==x&&q.parentElement;)ae.unshift(Array.prototype.indexOf.call(q.parentElement.children,q)),q=q.parentElement;const re=ee.getBoundingClientRect();if(q===x&&re.width&&re.height){const qt=Math.min(1,Math.max(0,(t.clientX-re.left)/re.width)),Pt=Math.min(1,Math.max(0,(t.clientY-re.top)/re.height));st=`${ae.join(".")}:${qt.toFixed(3)},${Pt.toFixed(3)}`}}let _e="",te=ee;for(;te&&!_e&&te!==t.currentTarget;){const ae=(te.textContent??"").trim().split(`
3`)[0],q=te.getBoundingClientRect();ae&&ae.length<=42&&q.width<=280&&q.height<=90&&(_e=ae),te=te.parentElement}const je=t.currentTarget.getBoundingClientRect(),Vt=(t.clientX-je.left)/je.width*100,Tt=(t.clientY-je.top)/je.height*100,nt={x:_t,y:Zt,dx:Vt,dy:Tt,a:st,target:_e};if(J){B([...w??[],{...J,kind:"drag",to:nt}]),Me(null);return}O(nt);return}if(!P)return;const a=t.currentTarget,o=a.querySelector("[data-demo-root]")??a,i=ut(t.clientX,t.clientY,o),h=a.getBoundingClientRect();if(!i){be(v=>[...v,{x:(t.clientX-h.left)/h.width*100,y:(t.clientY-h.top)/h.height*100,target:""}]);return}const y=$e(i,h),m=mt(i,o),E={...y,target:Q(i),container:m&&m!==i?Q(m):void 0,el:i};be(v=>
3[...v,E]),Dt(V.length+1)},Ht=t=>{if(!P){A&&fe(null);return}const a=t.currentTarget,o=a.querySelector("[data-demo-root]")??a,i=ut(t.clientX,t.clientY,o);if(!i){fe(null);return}const h=a.getBoundingClientRect(),y=mt(i,o);fe({box:$e(i,h),label:Q(i),container:$e(y??i,h),containerLabel:y&&y!==i?Q(y):""})},Dt=t=>{const a=Ae.current,o=(a==null?void 0:a.value)??j,i=a?a.selectionStart??o.length:o.length,h=o.slice(0,i),y=o.slice(i),m=h&&!/\s$/.test(h)?" ":"";S(`${h}${m}#${t} ${y}`);const E=h.length+m.length+String(t).length+2;requestAnimationFrame(()=>{a&&(a.focus(),a.setSelectionRange(E,E))})},Ge=t=>{be(a=>a.filter((o,i)=>i!==t)),S(a=>a.replace(new RegExp(`\\s?#${t+1}\\b`,"g"),"").replace(/#(\d+)/g,(o,i)=>Number(i)>t+1?`#${Number(i)-1}`:o))},Y=t=>t.kitReady??t.ready,G=t=>{const a=[],o=Y(t);return o.fails>0&&a.push(`${o.fails} publish blocker${o.fails>1?"s":""}`),o.warns>0&&a.push(`${o.warns} theme warning${o.warns>1?"s":""}`),t.uploadKit||a.push("needs upload kit"),t.uploadKit&&!t.hasCover&&a.push("needs cover"),t.hasDemoVideo||a.push("needs demo video"),a},T=(t,a,o)=>H({op:"add-task",slug:t,action:a,comment:o}).then(d),ke=t=>{const a=[];t.hasDemoVideo||a.push("demo video"),t.uploadKit||a.push("upload kit"),t.uploadKit&&!t.hasCover&&a.push("cover");const o=t.kitReady?t.kitReady.fails:t.ready.fails;return o>0&&a.push(`${o} formatting blocker${o>1?"s":""}`),a},et=l?(at=Fe.get(l.slug))==null?void 0:at.Demo:null;return e.jsxs("div",{className:"lab-page flex h-screen overflow-hidden",children:[e.jsxs("aside",{ref:Ie,className:"group/rail relative flex w-[380px] shrink-0 flex-col border-r px-5 pt-5",style:{borderColor:"var(--lab-line)"},children:[e.jsx("span",{className:"pointer-events-none absolute bottom-2 left-1/2 z-30 -translate-x-1/2 whitespace-nowrap rounded-full px-2 py-0.5 text-[9.5px] font-medium text-[var(--lab-muted)] opacity-0 backdrop-blur-md transition-opacity duration-300 group-hover/rail:opacity-100",style:{background:"color-mix(in srgb, var(--lab-panel) 80%, transparent)",border:"1px solid color-mix(in srgb, var(--lab-line) 60%, transparent)"},children:"↑ ↓ move between components"}),e.jsx("div",{className:"mb-3 flex gap-1",children:ot.map(t=>e.jsx("button",{type:"button",onClick:()=>M(t.id),className:`relative rounded-full px-3 py-1.5 text-[11px] font-semibold transition-colors ${f===t.id?"text-[var(--lab-text)]":"text-[var(--lab-muted)] hover:text-[var(--lab-text)]"}`,style:f===t.id?{background:"color-mix(in srgb, var(--lab-accent) 14%, transparent)"}:void 0,children:e.jsx("span",{className:"relative whitespace-nowrap",style:f===t.id?{color:"#5aaaff"}:void 0,children:t.label})},t.id))}),e.jsxs("div",{className:"relative mb-3",children:[e.jsx(Gt,{className:"pointer-events-none absolute left-3 top-1/2 z-10 h-4 w-4 -translate-y-1/2 text-foreground/40"}),e.jsx("input",{value:u,onChange:t=>b(t.target.value),placeholder:"Search components",className:"h-8 w-full rounded-lg border border-foreground
3/[0.04] bg-foreground/[0.035] pl-9 pr-3 text-[12px] font-medium text-[var(--lab-text)] placeholder:text-[var(--lab-muted)]"})]}),e.jsxs("div",{className:"faint-scroll -mx-5 flex-1 overflow-y-auto overflow-x-hidden px-5 pb-6",children:[e.jsx(ra,{children:ve.map(t=>e.jsxs("section",{className:"mb-4",children:[e.jsxs("h3",{className:"mb-1.5 flex items-center gap-2 px-1 text-[10.5px] font-semibold tracking-[0.02em] text-[var(--lab-muted)]",children:[t.key==="new"&&e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--lab-accent)] shadow-[0_0_8px_rgba(72,159,250,0.6)]"}),t.label," ",e.jsx("span",{className:"tabular-nums opacity-60",children:t.rows.length})]}),e.jsx("ul",{className:"space-y-1.5",children:t.rows.map(a=>{const i=ge(a.slug)==="new",h=(r==null?void 0:r.data.tasks.filter(m=>m.slug===a.slug&&m.status!=="done").length)??0,y=r==null?void 0:r.data.tasks.find(m=>m.slug===a.slug&&m.status==="blocked");return e.jsx(Ne.li,{"data-row":a.slug,layout:!0,layoutId:`row-${a.slug}`,transition:{layout:{duration:.5,ease:[.16,1,.3,1]}},className:g===a.slug?"relative before:absolute before:left-[-20px] before:top-1/2 before:z-10 before:h-4 before:w-[2.5px] before:-translate-y-1/2 before:rounded-l-none before:rounded-r-full before:bg-[#5aaaff] before:content-['']":void 0,children:y?e.jsx("div",{title:`blocked: ${y.needsAction||y.claudeNote||"Claude could not action this task yet — open it for details"}`,children:e.jsx("div",{className:`flex w-full items-center gap-2 rounded-r-lg pl-1.5 pr-2 py-2 transition-colors ${g===a.slug?"text-foreground":"hover:bg-foreground
3/[0.035]"}`,onMouseEnter:m=>K({slug:a.slug,top:m.currentTarget.getBoundingClientRect().top}),onMouseLeave:()=>K(null),children:e.jsxs("button",{type:"button",onClick:()=>ye(a.slug),className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[e.jsx("span",{className:"min-w-0 flex-1",children:e.jsx("span",{className:"block truncate text-[11px] font-medium text-[var(--lab-text)]",children:a.name})}),(r==null?void 0:r.data.tasks.some(m=>m.slug===a.slug&&m.status==="done"&&!((r==null?void 0:r.data.ackDone)??[]).includes(m.id)))&&e.jsx("span",{title:"Claude finished updates here — click to see them",className:"h-1.5 w-1.5 shrink-0 rounded-full bg-[#39a97b] shadow-[0_0_6px_rgba(57,169,123,0.7)]"}),e.jsx(Ve,{c:a,pending:(()=>{const m=v=>{const x=(r==null?void 0:r.data.tasks.filter(N=>N.slug===a.slug&&N.action===v&&N.status!=="done"&&N.status!=="blocked"))??[];return x.some(N=>N.status==="in-progress")?!0:x.length?"queued":!1},E=["publish-21st","add-to-library","framer-port","create-preview","propose-delete"];return{t21:m("publish-21st"),library:m("add-to-library"),framer:m("framer-port"),video:m("create-preview"),delete:m("propose-delete"),needsYou:(r==null?void 0:r.data.tasks.some(v=>v.slug===a.slug&&!!v.needsAction&&v.status==="blocked"))??!1,comment:(()=>{const v=(r==null?void 0:r.data.tasks.filter(x=>x.slug===a.slug&&x.status!=="done"&&x.status!=="blocked"&&!E.includes(x.action)))??[];return v.some(x=>x.status==="in-progress")?!0:v.length?"queued":!1})()}})()}),f==="all"&&i&&e.jsx("span",{className:"shrink-0 rounded-full bg-[var(--lab-accent)]/15 px-2 py-0.5 text-[9.5px] font-semibold text-[var(--lab-accent)]",children:"New"}),f!=="readiness"&&h>0&&e.jsxs("span",{className:"shrink-0 rounded-full bg-[#e8b34b]/15 px-2 py-0.5 text-[9.5px] font-semibold text-[#e8b34b]",children:[h," open"]})]})})}):h>0?e.jsx(Te,{size:"md",colorVariant:"ocean",theme:"dark",strength:.45,duration:6,borderRadius:10,className:"-mx-2",children:e.jsx("div",{style:{background:"color-mix(in srgb, var(--lab-accent) 7%, transparent)"},className:`flex w-full items-center gap-2 rounded-[10px] py-2 pl-3.5 pr-4 transition-colors ${g===a.slug?"text-foreground":"hover:bg-foreground
3/[0.035]"}`,onMouseEnter:m=>K({slug:a.slug,top:m.currentTarget.getBoundingClientRect().top}),onMouseLeave:()=>K(null),children:e.jsxs("button",{type:"button",onClick:()=>ye(a.slug),className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[e.jsx("span",{className:"min-w-0 flex-1",children:e.jsx("span",{className:"block truncate text-[11px] font-medium text-[var(--lab-text)]",children:a.name})}),(r==null?void 0:r.data.tasks.some(m=>m.slug===a.slug&&m.status==="done"&&!((r==null?void 0:r.data.ackDone)??[]).includes(m.id)))&&e.jsx("span",{title:"Claude finished updates here — click to see them",className:"h-1.5 w-1.5 shrink-0 rounded-full bg-[#39a97b] shadow-[0_0_6px_rgba(57,169,123,0.7)]"}),e.jsx(Ve,{c:a,pending:(()=>{const m=v=>{const x=(r==null?void 0:r.data.tasks.filter(N=>N.slug===a.slug&&N.action===v&&N.status!=="done"&&N.status!=="blocked"))??[];return x.some(N=>N.status==="in-progress")?!0:x.length?"queued":!1},E=["publish-21st","add-to-library","framer-port","create-preview","propose-delete"];return{t21:m("publish-21st"),library:m("add-to-library"),framer:m("framer-port"),video:m("create-preview"),delete:m("propose-delete"),needsYou:(r==null?void 0:r.data.tasks.some(v=>v.slug===a.slug&&!!v.needsAction&&v.status==="blocked"))??!1,comment:(()=>{const v=(r==null?void 0:r.data.tasks.filter(x=>x.slug===a.slug&&x.status!=="done"&&x.status!=="blocked"&&!E.includes(x.action)))??[];return v.some(x=>x.status==="in-progress")?!0:v.length?"queued":!1})()}})()}),f==="all"&&i&&e.jsx("span",{className:"shrink-0 rounded-full bg-[var(--lab-accent)]/15 px-2 py-0.5 text-[9.5px] font-semibold text-[var(--lab-accent)]",children:"New"}),f!=="readiness"&&h>0&&e.jsxs("span",{className:"shrink-0 rounded-full bg-[#e8b34b]/15 px-2 py-0.5 text-[9.5px] font-semibold text-[#e8b34b]",children:[h," open"]})]})})}):e.jsx("div",{className:`flex w-full items-center gap-2 rounded-r-lg pl-1.5 pr-2 py-2 transition-colors ${g===a.slug?"text-foreground":"hover:bg-foreground
3/[0.035]"}`,onMouseEnter:m=>K({slug:a.slug,top:m.currentTarget.getBoundingClientRect().top}),onMouseLeave:()=>K(null),children:e.jsxs("button",{type:"button",onClick:()=>ye(a.slug),className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[e.jsx("span",{className:"min-w-0 flex-1",children:e.jsx("span",{className:"block truncate text-[11px] font-medium text-[var(--lab-text)]",children:a.name})}),(r==null?void 0:r.data.tasks.some(m=>m.slug===a.slug&&m.status==="done"&&!((r==null?void 0:r.data.ackDone)??[]).includes(m.id)))&&e.jsx("span",{title:"Claude finished updates here — click to see them",className:"h-1.5 w-1.5 shrink-0 rounded-full bg-[#39a97b] shadow-[0_0_6px_rgba(57,169,123,0.7)]"}),e.jsx(Ve,{c:a,pending:(()=>{const m=v=>{const x=(r==null?void 0:r.data.tasks.filter(N=>N.slug===a.slug&&N.action===v&&N.status!=="done"&&N.status!=="blocked"))??[];return x.some(N=>N.status==="in-progress")?!0:x.length?"queued":!1},E=["publish-21st","add-to-library","framer-port","create-preview","propose-delete"];return{t21:m("publish-21st"),library:m("add-to-library"),framer:m("framer-port"),video:m("create-preview"),delete:m("propose-delete"),needsYou:(r==null?void 0:r.data.tasks.some(v=>v.slug===a.slug&&!!v.needsAction&&v.status==="blocked"))??!1,comment:(()=>{const v=(r==null?void 0:r.data.tasks.filter(x=>x.slug===a.slug&&x.status!=="done"&&x.status!=="blocked"&&!E.includes(x.action)))??[];return v.some(x=>x.status==="in-progress")?!0:v.length?"queued":!1})()}})()}),f==="all"&&i&&e.jsx("span",{className:"shrink-0 rounded-full bg-[var(--lab-accent)]/15 px-2 py-0.5 text-[9.5px] font-semibold text-[var(--lab-accent)]",children:"New"}),f!=="readiness"&&h>0&&e.jsxs("span",{className:"shrink-0 rounded-full bg-[#e8b34b]/15 px-2 py-0.5 text-[9.5px] font-semibold text-[#e8b34b]",children:[h," open"]})]})})},a.slug)})})]},t.key))}),r&&ve.length===0&&e.jsx("div",{className:"px-3 py-8 text-center text-[12px] text-[var(--lab-muted)]",children:"Nothing matches."})]})]}),le&&le.slug!==g&&((rt=Fe.get(le.slug))==null?void 0:rt.Demo)&&Le.createPortal((()=>{var a;const t=Fe.get(le.slug).Demo;return e.jsx("div",{className:"pointer-events-none fixed z-[80] overflow-hidden rounded-2xl shadow-[0_24px_70px_rgba(0,0,0,0.6)] backdrop-blur-xl",style:{left:(((a=Ie.current)==null?void 0:a.getBoundingClientRect().right)??392)+12,top:Math.max(12,Math.min(le.top-60,window.innerHeight-372)),width:448,height:360,background:"color-mix(in srgb, var(--lab-panel) 92%, transparent)"},children:e.jsx("div",{className:"h-full w-[746px] origin-top-left scale-[0.6] p-4",children:e.jsx(s.Suspense,{fallback:null,children:e.jsx(t,{})})})})})(),document.body),e.jsxs("main",{className:"relative flex min-w-0 flex-1",children:[l?e.jsxs(e.Fragment,{children:[e.jsxs(Ne.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},transition:{duration:.2,ease:"easeOut"},className:"absolute inset-x-0 top-0 z-20 flex flex-wrap items-baseline gap-3 border-b px-8 py-3 backdrop-blur-md",style:{borderColor:"color-mix(in srgb, var(--lab-line) 60%, transparent)",background:"color-mix(in srgb, var(--lab-panel) 70%, transparent)"},children:[Ct?e.jsxs("form",{className:"flex items-center gap-1.5",onSubmit:t=>{t.preventDefault();const a=Ee.trim();xe(!1),!(!a||a===l.name)&&H({op:"add-task",slug:l.slug,action:"rename",comment:`[rename] "${l.name}" → "${a}" — rename the display name in LabPage and carry it through the source file, exports, stories and kit folder.`}).then(d)},children:[e.jsx("input",{autoFocus:!0,value:Ee,onChange:t=>ze(t.target.value),onKeyDown:t=>{t.key==="Escape"&&xe(!1)}
3,className:"lab-no-ring rounded-md border-0 bg-foreground/[0.06] px-2 py-1 text-[15px] font-semibold text-[var(--lab-text)] outline-none",size:Math.max(Ee.length,8)}),e.jsx(C,{label:"accept — Claude renames it in the files too",children:e.jsx("button",{type:"submit",className:"grid h-8 w-8 place-items-center rounded-md text-[#39a97b] hover:bg-foreground/[0.06]",children:e.jsx(lt,{className:"h-4 w-4"})})})]}):e.jsx(C,{label:"click to rename — Claude renames the files too",children:e.jsx("button",{type:"button",onClick:()=>{ze(l.name),xe(!0)},className:"text-[15px] font-semibold text-[var(--lab-text)] transition-colors hover:text-[#8cc4ff]",children:l.name})}),e.jsx("span",{className:"text-[11px] text-[var(--lab-muted)]",children:l.group}),e.jsx("span",{className:"font-mono text-[10.5px] text-[var(--lab-muted)] opacity-70",children:l.file}),e.jsxs("span",{className:"ml-auto flex items-center gap-1",children:[e.jsx(C,{label:I==="link"?"copied ✓":"Copy link to this component",children:e.jsx("button",{type:"button",onClick:()=>De("link",`${window.location.origin}/lab/review?c=${l.slug}`),className:"grid h-8 w-8 place-items-center rounded-md transition-colors hover:text-[var(--lab-text)]",style:I==="link"?{color:"#39a97b"}:{color:"var(--lab-muted)"},children:I==="link"?e.jsx(Ze,{className:"h-3.5 w-3.5",weight:"bold"}):e.jsx(Jt,{className:"h-3.5 w-3.5"})})}),e.jsx(C,{label:I==="path"?"copied ✓":"Copy source path",children:e.jsx("button",{type:"button",onClick:()=>De("path",l.file),className:"grid h-8 w-8 place-items-center rounded-md transition-colors hover:text-[var(--lab-text)]",style:I==="path"?{color:"#39a97b"}:{color:"var(--lab-muted)"},children:I==="path"?e.jsx(Ze,{className:"h-3.5 w-3.5",weight:"bold"}):e.jsx(Xt,{className:"h-3.5 w-3.5"})})}),e.jsx(C,{label:I==="cmd"?"copied ✓":"Copy Claude command",children:e.jsx("button",{type:"button",onClick:()=>De("cmd",`process the lab review queue for ${l.slug}`),className:"grid h-8 w-8 place-items-center rounded-md transition-colors hover:text-[var(--lab-text)]",style:I==="cmd"?{color:"#39a97b"}:{color:"var(--lab-muted)"},children:I==="cmd"?e.jsx(Ze,{className:"h-3.5 w-3.5",weight:"bold"}):e.jsx(ca,{className:"h-3.5 w-3.5"})})}),e.jsx(C,{label:"Open in lab gallery",children:e.jsx("a",{href:`/lab#${it(l.group)}`,className:"grid h-8 w-8 place-items-center rounded-md text-[var(--lab-muted)] transition-colors hover:text-[var(--lab-text)]",children:e.jsx(zt,{className:"h-3.5 w-3.5"})})})]})]},`strip-${l.slug}`),e.jsx("div",{className:"faint-scroll flex flex-1 overflow-auto px-8 pb-44 pt-16",children:e.jsx(Ne.div,{initial:{opacity:0,y:We===0?8:We*44,scale:.985},animate:{opacity:1,y:0,scale:1},transition:{duration:.26,ease:[.16,1,.3,1]},className:"m-auto flex w-full max-w-[1100px] flex-col items-center",children:et?e.jsx(s.Suspense,{fallback:e.jsx("span",{className:"py-20 text-[11px] text-[var(--lab-muted)]",children:"Loading…"}),children:e.jsxs("div",{ref:Oe,className:"relative w-full",onClick:Ft,onPointerMove:Ht,onPointerLeave:()=>fe(null),style:P||w!==null&&!_?{cursor:"crosshair"}:void 0,children:[e.jsx("div",{"data-demo-root":!0,className:"w-full",children:e.jsx(et,{})}),P&&e.jsxs("div",{className:"pointer-events-none absolute inset-0 z-10 rounded-2xl border-2 border-dashed",style:{borderColor:"color-mix(in srgb, var(--lab-accent) 55%, transparent)"},children:[A&&A.containerLabel&&e.jsx("span",{className:"absolute rounded-[3px] border border-dashed",style:{left:`${A.container.x}%`,top:`${A.container.y}%`,width:`${A.container.w}%`,height:`${A.container.h}%`,borderColor:"color-mix(in srgb, var(--lab-accent) 40%, transparent)",background:"color-mix(in srgb, var(--lab-accent) 4%, transparent)"}}),A&&e.jsx("span",{className:"absolute rounded-[3px]",style:{left:`${A.box.x}%`,top:`${A.box.y}%`,width:`${A.box.w}%`,height:`${A.box.h}%`,outline:"1.5px solid var(--lab-accent)",background:"color-mix(in srgb, var(--lab-accent) 12%, transparent)"}}),e.jsx("span",{className:"absolute left-1/2 top-2 flex max-w-[90%] -translate-x-1/2 items-center gap-1.5 rounded-full px-2.5 py-1 text-[10px] font-semibold text-[var(--lab-text)]",style:{background:"var(--lab-panel)"},children:A?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"rounded px-1.5 py-0.5 font-mono text-[9.5px]",style:{background:"color-mix(in srgb, var(--lab-accent) 22%, transparent)",color:"var(--lab-accent)"},children:A.label}),A.containerLabel&&e.jsxs("span",{className:"truncate font-normal text-[var(--lab-muted)]",children:["in ",A.containerLabel]})]}):"hover an element — it outlines, click to number it"})]}),w!==null&&e.jsx("div",{className:"pointer-events-none absolute inset-0 rounded-2xl border-2 border-dashed",style:{borderColor:"rgba(139,92,246,0.55)"},children:e.jsx("span",{className:"absolute left-1/2 top-2 -translate-x-1/2 whitespace-nowrap rounded-full px-2.5 py-1 text-[10px] font-semibold text-[var(--lab-text)]",style:{background:"var(--lab-panel)"},children:J?`drag armed — now click where to DROP (step ${w.length+1})`:`video path — click the spots in order · step ${w.length+1}`})}),w&&w.some(t=>t.kind==="drag"&&t.to)&&e.jsx("svg",{className:"pointer-events-none absolute inset-0 z-10 h-full w-full",children:w.map((t,a)=>t.kind==="drag"&&t.to?e.jsx("line",{x1:`${t.dx??t.x}%`,y1:`${t.dy??t.y}%`,x2:`${t.to.dx??t.to.x}%`,y2:`${t.to.dy??t.to.y}%`,stroke:"#8b5cf6",strokeWidth:1.5,strokeDasharray:"4 4",opacity:.7},a):null)}),w==null?void 0:w.flatMap((t,a)=>{const o=e.jsx("span",{className:"pointer-events-none absolute z-10 grid h-5 w-5 -translate-x-1/2 -translate-y-1/2 place-items-center rounded-full text-[9px] font-bold text-white shadow-[0_2px_8px_rgba(0,0,0,0.5)]",style:{left:`${t.dx??t.x}%`,top:`${t.dy??t.y}%`,background:"#8b5cf6"},title:`${t.kind} ${t.target}`,children:a+1},`s${a}`);return t.kind!=="drag"||!t.to?[o]:[o,e.jsx("span",{className:"pointer-events-none absolute z-10 grid h-5 w-5 -translate-x-1/2 -translate-y-1/2 place-items-center rounded-full border-2 text-[9px] font-bold shadow-[0_2px_8px_rgba(0,0,0,0.5)]",style:{left:`${t.to.dx??t.to.x}%`,top:`${t.to.dy??t.to.y}%`,borderColor:"#8b5cf6",color:"#a78bfa",background:"color-mix(in srgb, var(--lab-panel) 85%, transparent)"},title:`drop of step ${a+1}`,children:a+1},`d${a}`)]}),J&&e.jsx("span",{className:"pointer-events-none absolute z-10 block h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 animate-pulse rounded-full",style:{left:`${J.dx}%`,top:`${J.dy}%`,background:"#8b5cf6",boxShadow:"0 0 0 4px rgba(139,92,246,0.25)"},title:"grab point — click the drop spot"}),_&&e.jsxs("div",{className:"absolute z-20",style:{left:`${_.dx??_.x}%`,top:`${_.dy??_.y}%`},onClick:t=>t.stopPropagation(),children:[e.jsx("span",{className:"absolute -translate-x-1/2 -translate-y-1/2",children:e.jsx("span",{className:"block h-3.5 w-3.5 animate-pulse rounded-full",style:{background:"#8b5cf6",boxShadow:"0 0 0 4px rgba(139,92,246,0.25)"}})}),e.jsxs("div",{className:"absolute left-3 top-3 flex items-center gap-1 rounded-xl p-1.5 shadow-[0_18px_50px_rgba(0,0,0,0.55)] backdrop-blur-xl",style:{background:"color-mix(in srgb, var(--lab-panel) 90%, transparent)"},children:[_.target&&e.jsxs("span",{className:"max-w-[120px] truncate px-1 text-[10px] text-[var(--lab-muted)]",children:["“",_.target,"”"]}),e.jsx("button",{type:"button",onClick:()=>{B([...w??[],{..._,kind:"hover"}]),O(null)},className:"rounded-lg px-2.5 py-1.5 text-[10.5px] font-semibold text-white",style:{background:"rgba(139,92,246,0.55)"},children:"Hover"}),e.jsx("button",{type:"button",onClick:()=>{B([...w??[],{..._,kind:"click"}]),O(null)},className:"rounded-lg px-2.5 py-1.5 text-[10.5px] font-semibold text-white",style:{background:"#8b5cf6"},children:"Click"}),e.jsx("button",{type:"button",onClick:()=>{Me(_),O(null)},className:"rounded-lg px-2.5 py-1.5 text-[10.5px] font-semibold text-white",style:{background:"rgba(139,92,246,0.8)"},children:"Drag…"}),e.jsx("button",{type:"button",onClick:()=>O(null),className:"grid h-6 w-6 place-items-center rounded-lg text-[var(--lab-muted)] hover:text-[var(--lab-text)]",children:e.jsx(de,{className:"h-3 w-3"})})]})]}),F.flatMap(t=>{if(t.status==="done")return[];const a=ua(t.comment);return a?a.items.map(o=>e.jsx(C,{label:`${o.n}${o.target?` — "${o.target}"`:""} · ${a.rest.slice(0,60)}`,children:e.jsx("span",{className:"absolute z-10 grid h-5 w-5 -translate-x-1/2 -translate-y-1/2 cursor-default place-items-center rounded-full text-[9px] font-bold text-white shadow-[0_2px_8px_rgba(0,0,0,0.5)]",style:{left:`${o.x}%`,top:`${o.y}%`,background:"var(--lab-accent)"},children:o.n})},`${t.id}-m${o.n}`)):[]}),F.map(t=>{const a=ht(t.comment);return a?e.jsx(C,{label:a.rest||t.action,children:e.jsx("span",{className:"absolute z-10 grid h-5 w-5 -translate-x-1/2 -translate-y-1/2 cursor-default place-items-center rounded-full text-[9px] font-bold text-white shadow-[0_2px_8px_rgba(0,0,0,0.5)]",style:{left:`${a.x}%`,top:`${a.y}%`,background:t.status==="done"?"#39a97b":"var(--lab-accent)"},children:F.filter(o=>ht(o.comment)).indexOf(t)+1})},t.id):null}),V.map((t,a)=>{var y,m;const o=(y=Oe.current)==null?void 0:y.getBoundingClientRect(),i=(m=t.el)!=null&&m.isConnected&&o&&o.width&&o.height?{...t,...$e(t.el,o)}:t,h=i.w!=null&&i.h!=null;return e.jsxs("span",{children:[h&&e.jsx("span",{className:"pointer-events-none absolute z-20 rounded-[3px]",style:{left:`${i.x}%`,top:`${i.y}%`,width:`${i.w}%`,height:`${i.h}%`,outline:"1.5px solid var(--lab-accent)",background:"color-mix(in srgb, var(--lab-accent) 9%, transparent)"}}),e.jsx("button",{type:"button",title:`#${a+1}${i.target?` — ${i.target}`:""}${i.container?` in ${i.container}`:""} · click to remove`,onClick:E=>{E.stopPropagation(),Ge(a)},className:"absolute z-20 grid h-5 w-5 place-items-center rounded-full text-[10px] font-bold text-white shadow-[0_2px_8px_rgba(0,0,0,0.5)]",style:{left:`${i.x}%`,top:`${i.y}%`,transform:h?"translate(-45%, -45%)":"translate(-50%, -50%)",background:"var(--lab-accent)",boxShadow:"0 0 0 3px color-mix(in srgb, var(--lab-accent) 25%, transparent)"},children:a+1})]},`${i.x}-${i.y}-${a}`)})]})}):e.jsx("span",{className:"py-20 text-[11px] text-[var(--lab-muted)]",children:"No live demo found for this slug."})},l.slug)}),e.jsxs(Ne.aside,{initial:{opacity:0,y:6}
3,animate:{opacity:1,y:0},transition:{duration:.22,ease:"easeOut"},className:"faint-scroll hidden w-[380px] shrink-0 overflow-y-auto pb-44 pr-6 pt-16 xl:block",children:[l.hasDemoVideo&&e.jsx(ba,{slug:l.slug,onComment:t=>T(l.slug,"create-preview",`[video feedback] ${t}`)}),e.jsx("div",{className:"mb-3 flex items-center gap-0.5 rounded-full border p-0.5",style:{borderColor:"var(--lab-line)",width:"fit-content"},children:["tasks","21st","dribbble","x","contra"].map(t=>{const a=z===t,o=t==="21st"?G(l).length>0:t==="tasks"?F.some(y=>y.status!=="done"):!1,i=t==="tasks"&&F.some(y=>!!y.needsAction&&y.status==="blocked"),h=o?"#e05d5d":"var(--lab-accent)";return e.jsx("button",{type:"button",onClick:()=>St(t),className:`whitespace-nowrap rounded-full px-2.5 py-1 text-[10px] font-semibold transition-colors ${i?"animate-pulse":""}`,style:{background:a?`color-mix(in srgb, ${h} 14%, transparent)`:"transparent",color:o?h:a?"var(--lab-text)":"var(--lab-muted)"},children:t==="tasks"?`Tasks (${F.length})`:t==="21st"?`21st (${G(l).length})`:t==="x"?"X":t==="contra"?"Contra":"Dribbble"},t)})}),(z==="dribbble"||z==="x"||z==="contra")&&e.jsx(aa,{slug:l.slug,channel:z}),z==="21st"&&e.jsxs("div",{className:"flex flex-col gap-3",children:[G(l).length>0&&!ce&&e.jsxs("button",{type:"button",onClick:()=>{(!l.hasDemoVideo||!l.uploadKit||l.uploadKit&&!l.hasCover)&&T(l.slug,"create-preview","Generate everything missing from the 21st kit (bundle, cover, demo video)."),(Y(l).fails>0||Y(l).warns>0)&&T(l.slug,"refine",`Fix ALL 21st readiness findings in ${l.file}: ${G(l).join(", ")}.`),Qe(!0)},className:"rounded-lg py-2 text-[11px] font-bold text-white transition-opacity hover:opacity-90",style:{background:"var(--lab-accent)"},children:["Fix all (",G(l).length,")"]}),G(l).length===0&&e.jsx("div",{className:"rounded-lg border p-3 text-[11px] font-semibold text-[#39a97b]",style:{borderColor:"var(--lab-line)"},children:"21st-ready ✓ — nothing blocking publish."}),!l.uploadKit&&e.jsx(Ce,{forceQueued:ce,sev:"WARN",title:"No upload kit",detail:"21st-upload/<slug>/ is missing — the publish bundle (component file, demo, cover, media) has not been generated.",fix:()=>T(l.slug,"create-preview","Generate the 21st upload kit (component bundle, cover, demo).")}),l.uploadKit&&!l.hasCover&&e.jsx(Ce,{forceQueued:ce,sev:"WARN",title:"No cover image",detail:"cover.png is missing from the upload kit — 21st listings need a cover.",fix:()=>T(l.slug,"create-preview","Capture cover.png for the 21st upload kit.")}),!l.hasDemoVideo&&e.jsx(Ce,{forceQueued:ce,sev:"WARN",title:"No demo video",detail:"demo.mp4 is missing — a loopable preview video is part of the 21st publish standard.",fix:()=>T(l.slug,"create-preview","Record the loopable demo video for the 21st kit.")}),Y(l).findings.map((t,a)=>e.jsx(Ce,{forceQueued:ce,sev:t.sev,title:`${t.sev==="FAIL"?"Blocker":"Theme warning"} · line ${t.line}`,detail:t.msg,code:t.code,fix:()=>T(l.slug,"refine",`Fix 21st readiness (${l.file}:${t.line}): ${t.msg}`)},a))]}),z==="tasks"&&F.length===0&&e.jsx("div",{className:"text-[11px] text-[var(--lab-muted)] opacity-70",children:"No tasks yet."}),z==="tasks"&&Ke&&F.some(t=>t.status==="new")&&e.jsxs("div",{className:"mb-2 flex items-start gap-1.5 rounded-lg px-2.5 py-2 text-[10.5px] font-medium leading-relaxed",style:{background:"rgba(232,179,75,0.10)",color:"#e8b34b"},children:[e.jsx(ia,{className:"mt-[1px] h-3.5 w-3.5 shrink-0"}),e.jsxs("span",{children:["No queue worker running",Ue?` (last seen ${Ue})`:"",". Queued tasks sit until one starts:",e.jsx("code",{className:"ms-1 rounded bg-black/30 px-1 py-[1px]",children:"npm run queue:worker"})]})]}),z==="tasks"&&e.jsx("ul",{className:"flex flex-col gap-2",children:F.map(t=>e.jsx(pa,{t,workerIdle:Ke,onRetry:()=>H({op:"retry-task",id:t.id}).then(d),onCancel:()=>H({op:"cancel-task",id:t.id}).then(d)},t.id))})]},`rail-${l.slug}`),e.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-6 flex justify-center px-8 xl:pr-[412px]",children:e.jsx("div",{className:"pointer-events-auto flex w-full max-w-[880px] items-end gap-2",children:e.jsx(Te,{size:"md",colorVariant:"ocean",theme:"dark",strength:.5,duration:7,borderRadius:14,className:"min-w-0 flex-1",children:e.jsxs("div",{className:"flex w-full flex-col gap-1.5 rounded-[14px] p-2 shadow-[0_18px_50px_rgba(0,0,0,0.5)] backdrop-blur-xl",style:{background:"color-mix(in srgb, var(--lab-panel) 85%, transparent)"},children:[V.length>0&&e.jsx("div",{className:"flex flex-wrap items-center gap-1 px-1 pb-0.5",children:V.map((t,a)=>e.jsxs("button",{type:"button",onClick:()=>Ge(a),title:"remove this reference",className:"flex max-w-[240px] items-center gap-1 rounded-md px-1.5 py-0.5 text-[10.5px] transition-opacity hover:opacity-70",style:{background:"color-mix(in srgb, var(--lab-accent) 14%, transparent)"},children:[e.jsxs("span",{className:"font-semibold",style:{color:"var(--lab-accent)"},children:["#",a+1]}),e.jsx("span",{className:"truncate text-[var(--lab-text)]",children:t.target||"point"}),t.container&&e.jsxs("span",{className:"truncate text-[var(--lab-muted)]",children:["in ",t.container]})]},a))}),e.jsxs("div",{className:"flex items-end gap-1.5",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsxs("div",{"aria-hidden":!0,ref:Re,className:`${dt} pointer-events-none absolute inset-0 overflow-hidden whitespace-pre-wrap break-words`,style:{color:"var(--lab-text)"},children:[ma(j,V).map((t,a)=>t.n?e.jsxs("span",{className:"rounded-[4px] font-semibold",style:{background:"color-mix(in srgb, var(--lab-accent) 28%, transparent)",color:"var(--lab-accent)",boxShadow:"0 0 0 2px color-mix(in srgb, var(--lab-accent) 28%, transparent)"},children:["#",t.n]},a):e.jsx("span",{children:t.text},a)),"​"]}
3),e.jsx("textarea",{ref:Ae,value:j,rows:1,onScroll:t=>{Re.current&&(Re.current.scrollTop=t.currentTarget.scrollTop)},onChange:t=>S(t.target.value),onKeyDown:t=>{if(t.key==="Enter"&&!t.shiftKey){t.preventDefault(),Xe();const a=t.currentTarget;requestAnimationFrame(()=>{a.style.height="auto"})}},placeholder:"Comment",className:`${dt} relative w-full bg-transparent`,style:{WebkitAppearance:"none",overflowY:"auto",color:"transparent",caretColor:"var(--lab-text)"}})]}),e.jsxs("span",{className:"flex shrink-0 items-center rounded-lg transition-colors",style:Z?{background:"rgba(224, 93, 93, 0.12)"}:void 0,children:[Z&&e.jsx(xa,{}),e.jsx(C,{label:Z?"stop dictation":"speak the comment",children:e.jsx("button",{type:"button",onClick:$t,className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg transition-colors",style:Z?{color:"#e05d5d"}:{color:"var(--lab-muted)"},"aria-pressed":Z,children:e.jsx(ea,{className:Z?"h-4 w-4 animate-pulse":"h-4 w-4"})})})]}),w!==null?e.jsx(C,{label:w.length?`Send video plan — ${w.length} step${w.length===1?"":"s"}`:"record at least one step first",children:e.jsx("button",{type:"button",onClick:Mt,disabled:w.length===0,className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg text-white transition-opacity hover:opacity-90 disabled:opacity-40",style:{background:"#8b5cf6"},children:e.jsx(me,{className:"h-[18px] w-[18px]"})})}):j.trim()&&e.jsx(C,{label:"Send comment (↵)",children:e.jsx("button",{type:"button",onClick:Xe,className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg text-white transition-opacity hover:opacity-90",style:{background:"var(--lab-accent)"},children:e.jsx(xt,{className:"h-4 w-4",weight:"bold"})})})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-t pt-2",style:{borderColor:"color-mix(in srgb, var(--lab-line) 60%, transparent)"},children:[e.jsx(C,{label:P?"exit point & comment (Esc)":"point & comment — click a spot on the component",children:e.jsx("button",{type:"button",onClick:()=>he(t=>!t),"aria-label":P?"Exit element picker":"Pick an element to comment on","aria-pressed":P,className:"grid h-8 w-8 place-items-center rounded-md transition-colors",style:P?{background:"color-mix(in srgb, var(--lab-accent) 16%, transparent)",color:"var(--lab-accent)"}:{color:"var(--lab-muted)"},children:P?e.jsx(de,{className:"h-3.5 w-3.5"}):e.jsx(Qt,{className:"h-[18px] w-[18px]"})})}),e.jsx("span",{className:"h-4 w-px",style:{background:"color-mix(in srgb, var(--lab-line) 60%, transparent)"}}),e.jsx(C,{label:"Delete component — asks to confirm first",children:e.jsx("button",{type:"button",onClick:()=>L(!0),className:"grid h-8 w-8 place-items-center rounded-md text-[var(--lab-muted)] transition-colors hover:text-[#e05d5d]",children:e.jsx(Pe,{className:"h-[18px] w-[18px]"})})}),e.jsx("span",{className:"mx-auto"}),e.jsx(C,{label:U?"uncheck — moves it back to Seen":"mark as reviewed",children:e.jsxs("button",{type:"button",onClick:()=>H({op:U?"unmark-reviewed":"mark-reviewed",slug:l.slug}).then(d),className:U?"grid h-8 w-8 place-items-center rounded-md transition-colors":"flex h-8 items-center gap-1.5 rounded-md px-2.5 text-[12px] font-semibold transition-colors hover:text-[var(--lab-text)]",style:U?{color:"#39a97b"}:{color:"var(--lab-muted)"},children:[e.jsx(lt,{className:"h-[18px] w-[18px]"})," ",U?null:"review"]})}),U&&e.jsxs(e.Fragment,{children:[l.framer?e.jsx(C,{label:`on the Framer board — ${l.framer.status} · open /lab/framer`,children:e.jsx("a",{href:"/lab/framer",className:"grid h-8 w-8 place-items-center rounded-md transition-opacity hover:opacity-80",style:{color:"var(--lab-accent)"},children:e.jsx(se,{className:"h-[18px] w-[18px]"})})}):F.some(t=>t.action==="framer-port"&&t.status!=="done")?e.jsx(C,{label:"Framer port in progress…",children:e.jsx("span",{className:"grid h-8 w-8 animate-pulse place-items-center rounded-md",style:{color:"var(--lab-accent)"},children:e.jsx(se,{className:"h-[18px] w-[18px]"})})}):e.jsx(C,{label:"Send to Framer — Claude rewrites it as a Framer code component (comment rides along)",children:e.jsx("button",{type:"button",onClick:Rt,className:"grid h-8 w-8 place-items-center rounded-md text-[var(--lab-muted)] transition-colors hover:text-[var(--lab-text)]",children:e.jsx(se,{className:"h-[18px] w-[18px]"})})}),ie("add-to-library")||l.publishState==="requested"?e.jsx(C,{label:l.publishState==="published"?"Library update queued — resync + rebuild in flight":"Publish requested — queued; awaiting the build (video + registry + checks) before it goes live",children:e.jsx("span",{className:"grid h-8 w-8 animate-pulse place-items-center rounded-md",style:{color:l.publishState==="published"?"#e8b34b":"var(--lab-accent)"},children:e.jsx(X,{className:"h-[18px] w-[18px]"})})}):l.publishState==="published"&&(l.stale.library||l.stale.libraryVideo)?e.jsx(C,{label:l.stale.library&&l.stale.libraryVideo?"Library outdated — source AND preview video changed since publish. Click to push the update":l.stale.library?"Library outdated — source changed since publish. Click to push the update":"Library preview video stale — click to re-record + republish",children:e.jsx("button",{type:"button",onClick:()=>T(l.slug,"add-to-library","Update the published library component: resync the ui copy with the latest lab changes, re-record the preview video if stale, rebuild the registry, verify it renders, then mark the library push (mark-pushed)."),className:"grid h-8 w-8 place-items-center rounded-md transition-opacity hover:opacity-80",style:{color:"#e8b34b"},children:e.jsx(X,{className:"h-[18px] w-[18px]"})})}):l.publishState==="published"?e.jsx(C,{label:"Published in the component library",children:e.jsx("span",{className:"grid h-8 w-8 place-items-center rounded-md",style:{color:"var(--lab-accent)"},children:e.jsx(X,{className:"h-[18px] w-[18px]"})})}):e.jsx(C,{label:ke(l).length===0?"Publish this component to the library (queues the build — video + registry + checks)":`Not library-ready yet — missing: ${ke(l).join(", ")}`,children:e.jsx("button",{type:"button",onClick:()=>{ke(l).length>0||T(l.slug,"add-to-library","Publish to the component library: record the preview video, rebuild the registry, run library:ready + changelog checks, verify it renders, then (if staged) remove it from src/data/unpublished-slugs.ts. Only mark done once it is actually live.")},className:"grid h-8 w-8 place-items-center rounded-md transition-colors",style:ke(l).length===0?{color:"var(--lab-muted)"}:{color:"var(--lab-muted)",opacity:.4,cursor:"not-allowed"},children:e.jsx(X,{className:"h-[18px] w-[18px]"})})}),e.jsx(C,{label:l.ready.fails===0||l.kitReady?"Add this component to 21st.dev — Claude preps + verifies the upload kit":`Not 21st-ready yet — ${l.ready.fails}
3 FAIL in the source and no clean kit`,children:e.jsx("button",{type:"button",onClick:()=>{Y(l).fails>0||T(l.slug,"publish-21st","Publish this component to 21st.dev: build/refresh the upload kit (lucide + shadcn tokens), verify 0 FAIL, cover + demo video, and stage the 21st.dev submission.")},className:`grid h-8 w-8 place-items-center rounded-md transition-colors ${Y(l).fails>0?"cursor-not-allowed":"hover:text-[var(--lab-text)]"} ${ie("publish-21st")?"animate-pulse":""}`,style:Y(l).fails>0?{color:"var(--lab-muted)",opacity:.4}:ie("publish-21st")?{color:l.published?"#e8b34b":"var(--lab-accent)"}:l.stale.t21?{color:"#e8b34b"}:l.published||At("publish-21st")?{color:"var(--lab-accent)"}:{color:"var(--lab-muted)"},children:e.jsx(ue,{className:"h-4 w-4"})})})]}),U&&e.jsx(C,{label:w!==null?"exit video-path recording":"record a video path — click the spots the demo video should follow, in order",children:e.jsx("button",{type:"button",onClick:()=>{w!==null?(B(null),O(null),Me(null)):(B([]),he(!1))},className:`grid h-8 w-8 place-items-center rounded-md transition-colors ${ie("create-preview")?"animate-pulse":""}`,style:w!==null?{background:"rgba(139,92,246,0.18)",color:"#a78bfa"}:ie("create-preview")?{color:"var(--lab-accent)"}:l.hasDemoVideo?{color:"var(--lab-accent)"}:{color:"var(--lab-muted)"},children:w!==null?e.jsx(de,{className:"h-3.5 w-3.5"}):e.jsx(me,{className:"h-[18px] w-[18px]"})})})]})]})})})})]}):e.jsx("div",{className:"flex flex-1 items-center justify-center text-[12px] text-[var(--lab-muted)]",children:"Select a component to review it."}),R&&l&&Le.createPortal(e.jsx("div",{className:"lab-vars fixed inset-0 z-[95] flex items-center justify-center bg-black/55 backdrop-blur-sm",onClick:t=>{t.target===t.currentTarget&&L(!1)},role:"alertdialog","aria-modal":"true","aria-label":`Delete ${l.name}?`,children:e.jsxs("div",{className:"w-[380px] rounded-2xl border p-5 shadow-[0_30px_90px_rgba(0,0,0,0.6)]",style:{borderColor:"var(--lab-line)",background:"var(--lab-panel)"},children:[e.jsxs("div",{className:"text-[14px] font-semibold text-[var(--lab-text)]",children:["Delete ",l.name,"?"]}),e.jsxs("p",{className:"mt-2 text-[12px] leading-relaxed text-[var(--lab-muted)]",children:["Claude removes the component from the gallery and cleans its references. The source file moves to",e.jsx("span",{className:"font-mono",children:" lab-review/trash/"})," — recoverable, never destroyed."]}),e.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>L(!1),className:"rounded-lg px-3 py-2 text-[11px] font-semibold text-[var(--lab-muted)] transition-colors hover:text-[var(--lab-text)]",children:"Cancel"}),e.jsx("button",{type:"button",onClick:()=>{H({op:"add-task",slug:l.slug,action:"propose-delete",comment:j.trim()}).then(t=>{d(t),S("")}),L(!1)},className:"rounded-lg px-3.5 py-2 text-[11px] font-bold text-white transition-opacity hover:opacity-90",style:{background:"#e05d5d"},children:"Delete component"})]})]})}),yt())]}),e.jsx(C,{label:n==="dark"?"Switch to light mode":"Switch to dark mode",children:e.jsx("button",{type:"button",onClick:()=>c(n==="dark"?"light":"dark"),className:"fixed bottom-6 right-5 z-[70] grid h-10 w-10 place-items-center rounded-full backdrop-blur-xl transition-colors",style:{background:"color-mix(in srgb, var(--lab-panel) 85%, transparent)",color:"var(--lab-muted)"},children:n==="dark"?e.jsx(Ut,{className:"h-4.5 w-4.5"}):e.jsx(Yt,{className:"h-4.5 w-4.5"})})})]})}export{Hr 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.