test-lah 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +26 -26
- package/.next/standalone/.next/app-path-routes-manifest.json +7 -7
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +21 -21
- package/.next/standalone/.next/server/app/(dashboard)/integrations/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[projectId]/page.js +5 -5
- package/.next/standalone/.next/server/app/(dashboard)/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[projectId]/summary/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/api/e2e/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/generate/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/llm/encrypt/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/llm/test/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/weather/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +2 -2
- package/.next/standalone/.next/server/app/integrations.html +1 -1
- package/.next/standalone/.next/server/app/integrations.rsc +2 -2
- package/.next/standalone/.next/server/app/login/page.js +1 -1
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login.html +1 -1
- package/.next/standalone/.next/server/app/login.rsc +2 -2
- package/.next/standalone/.next/server/app/page.js +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects.html +1 -1
- package/.next/standalone/.next/server/app/projects.rsc +2 -2
- package/.next/standalone/.next/server/app-paths-manifest.json +7 -7
- package/.next/standalone/.next/server/chunks/615.js +1 -1
- package/.next/standalone/.next/server/chunks/736.js +2 -2
- package/.next/standalone/.next/server/chunks/845.js +5 -5
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[projectId]/page-4f738ff151196fe8.js +1 -0
- package/.next/standalone/.next/static/css/ab7683c62149b050.css +3 -0
- package/.next/standalone/package.json +1 -1
- package/.next/static/chunks/app/(dashboard)/projects/[projectId]/page-4f738ff151196fe8.js +1 -0
- package/.next/static/css/ab7683c62149b050.css +3 -0
- package/package.json +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[projectId]/page-3bb51b4a324c09b6.js +0 -1
- package/.next/standalone/.next/static/css/aef2f5f25a3c4a6a.css +0 -3
- package/.next/static/chunks/app/(dashboard)/projects/[projectId]/page-3bb51b4a324c09b6.js +0 -1
- package/.next/static/css/aef2f5f25a3c4a6a.css +0 -3
- /package/.next/standalone/.next/static/{iIE9EA9ZHZT920YmMjduY → Dmhhi1aH71i6LYut_5YOv}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{iIE9EA9ZHZT920YmMjduY → Dmhhi1aH71i6LYut_5YOv}/_ssgManifest.js +0 -0
- /package/.next/static/{iIE9EA9ZHZT920YmMjduY → Dmhhi1aH71i6LYut_5YOv}/_buildManifest.js +0 -0
- /package/.next/static/{iIE9EA9ZHZT920YmMjduY → Dmhhi1aH71i6LYut_5YOv}/_ssgManifest.js +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/ba9851c3c22cd980-s.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c8a,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/21350d82a1f187e9-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/c5fe6dc8356a8c31-s.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/19cfc7226ec3afaa-s.woff2) format("woff2");unicode-range:u+0370-0377,u+037a-037f,u+0384-038a,u+038c,u+038e-03a1,u+03a3-03ff}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/df0a9ae256c0569c-s.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+0300-0301,u+0303-0304,u+0308-0309,u+0323,u+0329,u+1ea0-1ef9,u+20ab}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/8e9860b6e62d6359-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c0,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/e4af272ccee01ff0-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Inter Fallback;src:local("Arial");ascent-override:90.44%;descent-override:22.52%;line-gap-override:0.00%;size-adjust:107.12%}.__className_f367f3{font-family:Inter,Inter Fallback;font-style:normal}.__variable_f367f3{--font-inter:"Inter","Inter Fallback"}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*
|
|
2
|
-
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
|
|
3
|
-
*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background:40 20% 97%;--foreground:30 5% 12%;--card:0 0% 100%;--card-foreground:30 5% 12%;--popover:0 0% 100%;--popover-foreground:30 5% 12%;--primary:30 5% 12%;--primary-foreground:40 20% 97%;--secondary:40 15% 90%;--secondary-foreground:30 5% 12%;--muted:40 10% 93%;--muted-foreground:30 5% 48%;--accent:30 5% 12%;--accent-foreground:40 20% 97%;--destructive:0 72% 42%;--destructive-foreground:0 0% 98%;--border:30 10% 88%;--input:30 10% 88%;--ring:30 5% 12%;--radius:10px;--chart-1:12 76% 61%;--chart-2:173 58% 39%;--chart-3:197 37% 24%;--chart-4:43 74% 66%;--chart-5:27 87% 67%}.theme{--animate-marquee:marquee var(--duration) infinite linear;--animate-marquee-vertical:marquee-vertical var(--duration) linear infinite;--animate-shimmer-slide:shimmer-slide var(--speed) ease-in-out infinite alternate;--animate-spin-around:spin-around calc(var(--speed) * 2) infinite linear;--animate-gradient:gradient 8s linear infinite;--animate-rippling:rippling var(--duration) ease-out;--animate-ripple:ripple var(--duration,2s) ease calc(var(--i, 0)*.2s) infinite;--animate-shine:shine var(--duration) infinite linear}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.-inset-1{inset:-.25rem}.-inset-full{inset:-100%}.inset-0{inset:0}.inset-px{inset:1px}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-left-2{left:-.5rem}.-right-2{right:-.5rem}.-top-1{top:-.25rem}.-top-2{top:-.5rem}.bottom-0{bottom:0}.bottom-3{bottom:.75rem}.bottom-4{bottom:1rem}.bottom-8{bottom:2rem}.bottom-full{bottom:100%}.left-0{left:0}.left-0\.5{left:.125rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-3{left:.75rem}.left-3\.5{left:.875rem}.left-4{left:1rem}.right-0{right:0}.right-0\.5{right:.125rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-1\/2{top:50%}.top-11{top:2.75rem}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.top-full{top:100%}.isolate{isolation:isolate}.-z-20{z-index:-20}.-z-30{z-index:-30}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[300\]{z-index:300}.z-\[400\]{z-index:400}.z-\[410\]{z-index:410}.z-\[500\]{z-index:500}.z-\[600\]{z-index:600}.z-\[60\]{z-index:60}.m-auto{margin:auto}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-auto{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-\[1\]{aspect-ratio:1}.aspect-square{aspect-ratio:1/1}.size-2\.5{width:.625rem;height:.625rem}.size-full{width:100%;height:100%}.h-0{height:0}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-20{height:5rem}.h-24{height:6rem}.h-28{height:7rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[100cqh\]{height:100cqh}.h-\[58px\]{height:58px}.h-\[70\%\]{height:70%}.h-\[85\%\]{height:85%}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-0{max-height:0}.max-h-48{max-height:12rem}.max-h-\[150px\]{max-height:150px}.max-h-\[200px\]{max-height:200px}.max-h-\[240px\]{max-height:240px}.max-h-\[30vh\]{max-height:30vh}.max-h-\[35vh\]{max-height:35vh}.max-h-\[40vh\]{max-height:40vh}.max-h-\[45vh\]{max-height:45vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[95vh\]{max-height:95vh}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-\[100px\]{min-height:100px}.min-h-\[300px\]{min-height:300px}.w-0{width:0}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\[1px\]{width:1px}.w-\[280px\]{width:280px}.w-\[2px\]{width:2px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.w-screen{width:100vw}.min-w-0{min-width:0}.min-w-\[140px\]{min-width:140px}.min-w-\[320px\]{min-width:320px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-\[120px\]{max-width:120px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-\[280px\]{max-width:280px}.max-w-\[480px\]{max-width:480px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.translate-x-12{--tw-translate-x:3rem}.translate-x-12,.translate-y-\[calc\(-50\%-2px\)\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[calc\(-50\%-2px\)\]{--tw-translate-y:calc(-50% - 2px)}.rotate-0{--tw-rotate:0deg}.rotate-0,.rotate-45{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate:45deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.select-none{user-select:none}.resize-none{resize:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\[10px\]{border-radius:10px}.rounded-\[2px\]{border-radius:2px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-xl{border-radius:.75rem}.rounded-t-full{border-top-left-radius:9999px;border-top-right-radius:9999px}.rounded-t-md{border-top-left-radius:calc(var(--radius) - 2px);border-top-right-radius:calc(var(--radius) - 2px)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-gray-400\/30{border-color:rgb(156 163 175/.3)}.border-transparent{border-color:transparent}.border-white\/10{border-color:rgb(255 255 255/.1)}.bg-background{background-color:hsl(var(--background))}.bg-border{background-color:hsl(var(--border))}.bg-foreground{background-color:hsl(var(--foreground))}.bg-foreground\/25{background-color:hsl(var(--foreground)/.25)}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.bg-primary{background-color:hsl(var(--primary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/10{background-color:rgb(255 255 255/.1)}.bg-white\/20{background-color:rgb(255 255 255/.2)}.bg-white\/30{background-color:rgb(255 255 255/.3)}.bg-clip-text{background-clip:text}.fill-foreground{fill:hsl(var(--foreground))}.fill-gray-300\/30{fill:rgb(209 213 219/.3)}.fill-gray-400\/30{fill:rgb(156 163 175/.3)}.fill-neutral-200\/20{fill:rgb(229 229 229/.2)}.fill-transparent{fill:transparent}.stroke-gray-400\/30{stroke:rgb(156 163 175/.3)}.stroke-2{stroke-width:2}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[2px\]{padding:2px}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pb-1\.5{padding-bottom:.375rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pl-10{padding-left:2.5rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-7{padding-top:1.75rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-bottom{vertical-align:bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[40pt\]{font-size:40pt}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-\[100\%\]{line-height:100%}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-background{color:hsl(var(--background))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.text-inherit{color:inherit}.text-neutral-300\/60{color:rgb(212 212 212/.6)}.text-neutral-400\/20{color:rgb(163 163 163/.2)}.text-neutral-400\/80{color:rgb(163 163 163/.8)}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-transparent{color:transparent}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-white\/60{color:rgb(255 255 255/.6)}.text-white\/70{color:rgb(255 255 255/.7)}.underline{text-decoration-line:underline}.placeholder-white\/50::placeholder{color:rgb(255 255 255/.5)}.accent-\[var\(--accent\)\]{accent-color:var(--accent)}.accent-current{accent-color:currentColor}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-15{opacity:.15}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.shadow-\[inset_0_-8px_10px_\#ffffff1f\]{--tw-shadow:inset 0 -8px 10px #ffffff1f;--tw-shadow-colored:inset 0 -8px 10px var(--tw-shadow-color)}.shadow-\[inset_0_-8px_10px_\#ffffff1f\],.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0/0.1),0 4px 6px -4px rgb(0 0 0/0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgb(0 0 0/0.1),0 8px 10px -6px rgb(0 0 0/0.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.blur{--tw-blur:blur(8px)}.blur,.blur-\[2px\]{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[2px\]{--tw-blur:blur(2px)}.blur-xl{--tw-blur:blur(24px)}.blur-xl,.drop-shadow{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px rgb(0 0 0/0.1)) drop-shadow(0 1px 1px rgb(0 0 0/0.06))}.drop-shadow-sm{--tw-drop-shadow:drop-shadow(0 1px 1px rgb(0 0 0/0.05))}.drop-shadow-sm,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur:blur(12px)}.backdrop-blur-md,.backdrop-blur-sm{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.will-change-\[background-position\]{will-change:background-position}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.duration-100{animation-duration:.1s}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.\[--duration\:40s\]{--duration:40s}.\[--gap\:1rem\]{--gap:1rem}.\[animation-direction\:reverse\]{animation-direction:reverse}.\[background\:conic-gradient\(from_calc\(270deg-\(var\(--spread\)\*0\.5\)\)\2c transparent_0\2c var\(--shimmer-color\)_var\(--spread\)\2c transparent_var\(--spread\)\)\]{background:conic-gradient(from calc(270deg - (var(--spread) * .5)),transparent 0,var(--shimmer-color) var(--spread),transparent var(--spread))}.\[background\:var\(--bg\)\]{background:var(--bg)}.\[border-radius\:var\(--radius\)\]{border-radius:var(--radius)}.\[mask\:none\]{mask:none}.\[translate\:0_0\]{translate:0 0}:root{--bg-primary:#F7F5F1;--bg-secondary:#EDEAE3;--bg-highlight:#F0EDD8;--bg-card:#FFFFFF;--text-primary:#1A1A1A;--text-secondary:#7A7872;--text-tertiary:#A8A49E;--accent:#1A1A1A;--border:rgba(0,0,0,0.08);--border-hover:rgba(0,0,0,0.16);--radius-sm:6px;--radius-md:10px;--radius-lg:16px;--radius-pill:99px;--status-pass-bg:#E8F0E0;--status-pass-text:#3B6011;--status-fail-bg:#FCEAEA;--status-fail-text:#8B1A1A;--status-skip-bg:#FDF3DC;--status-skip-text:#7A5000;--status-untested-bg:#EFEFED;--status-untested-text:#5A5A56;--shadow-sm:0 1px 4px rgba(0,0,0,0.06);--shadow-md:0 4px 16px rgba(0,0,0,0.08);--shadow-lg:0 8px 30px rgba(0,0,0,0.12);--shadow-xl:0 12px 40px rgba(0,0,0,0.16)}*{box-sizing:border-box;margin:0;padding:0}body,html{height:100%}body{color:var(--text-primary);background:var(--bg-primary);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}h1,h2,h3,h4,h5,h6{font-weight:500}::selection{background:var(--bg-highlight);color:var(--text-primary)}button,input,select,textarea{font-family:inherit;font-size:inherit}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border-hover);border-radius:var(--radius-pill)}::-webkit-scrollbar-thumb:hover{background:var(--text-tertiary)}@keyframes fadeIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeInDown{0%{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%)}}@keyframes borderShine{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}@keyframes shimmer{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}@keyframes toastSlideIn{0%{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}@keyframes beamFlow{0%{opacity:.3}50%{opacity:.6}to{opacity:.3}}@keyframes shimmerText{0%{background-position:100% 50%}to{background-position:-100% 50%}}@theme inline{@keyframes marquee{0%{transform:translateX(0)}to{transform:translateX(calc(-100% - var(--gap)))}}@keyframes marquee-vertical{0%{transform:translateY(0)}to{transform:translateY(calc(-100% - var(--gap)))}}@keyframes shimmer-slide{to{transform:translate(calc(100cqw - 100%))}}@keyframes spin-around{0%{transform:translateZ(0) rotate(0)}15%,35%{transform:translateZ(0) rotate(90deg)}65%,85%{transform:translateZ(0) rotate(270deg)}to{transform:translateZ(0) rotate(1turn)}}@keyframes gradient{to{background-position:var(--bg-size,300%) 0}}@keyframes rippling{0%{opacity:1}to{transform:scale(2);opacity:0}}@keyframes ripple{0%,to{transform:translate(-50%,-50%) scale(1)}50%{transform:translate(-50%,-50%) scale(.9)}}@keyframes shine{0%{background-position:0 0}50%{background-position:100% 100%}to{background-position:0 0}}}.last\:border-b-0:last-child{border-bottom-width:0}.hover\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05}.hover\:scale-105:hover,.hover\:scale-110:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1}.hover\:border-\[var\(--border-hover\)\]:hover{border-color:var(--border-hover)}.hover\:border-\[var\(--status-fail-text\)\]:hover{border-color:var(--status-fail-text)}.hover\:bg-\[var\(--accent\)\]:hover{background-color:var(--accent)}.hover\:bg-\[var\(--bg-card\)\]:hover{background-color:var(--bg-card)}.hover\:bg-\[var\(--bg-secondary\)\]:hover{background-color:var(--bg-secondary)}.hover\:bg-\[var\(--status-fail-bg\)\]:hover{background-color:var(--status-fail-bg)}.hover\:bg-black\/5:hover{background-color:rgb(0 0 0/.05)}.hover\:bg-muted-foreground:hover{background-color:hsl(var(--muted-foreground))}.hover\:bg-white:hover{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.hover\:bg-white\/20:hover{background-color:rgb(255 255 255/.2)}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-70:hover{opacity:.7}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgb(0 0 0/0.1),0 4px 6px -4px rgb(0 0 0/0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.hover\:shadow-lg:hover,.hover\:shadow-md:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgb(0 0 0/0.1),0 2px 4px -2px rgb(0 0 0/0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.focus\:border-\[var\(--accent\)\]:focus{border-color:var(--accent)}.focus\:border-\[var\(--border-hover\)\]:focus{border-color:var(--border-hover)}.active\:translate-y-px:active{--tw-translate-y:1px}.active\:scale-\[0\.98\]:active,.active\:translate-y-px:active{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-\[0\.98\]:active{--tw-scale-x:0.98;--tw-scale-y:0.98}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-20:disabled{opacity:.2}.disabled\:opacity-25:disabled{opacity:.25}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:-translate-x-5{--tw-translate-x:-1.25rem}.group:hover .group-hover\:-translate-x-5,.group:hover .group-hover\:translate-x-12{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-x-12{--tw-translate-x:3rem}.group\/duck:hover .group-hover\/duck\:scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1}.group:hover .group-hover\:scale-\[100\.8\],.group\/duck:hover .group-hover\/duck\:scale-110{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:scale-\[100\.8\]{--tw-scale-x:100.8;--tw-scale-y:100.8}.group\/col:hover .group-hover\/col\:opacity-100{opacity:1}.group\/duck:hover .group-hover\/duck\:opacity-\[0\.15\]{opacity:.15}.group:hover .group-hover\:opacity-0{opacity:0}.group:hover .group-hover\:opacity-100{opacity:1}.group:hover .group-hover\:shadow-\[inset_0_-6px_10px_\#ffffff3f\]{--tw-shadow:inset 0 -6px 10px #ffffff3f;--tw-shadow-colored:inset 0 -6px 10px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.group:hover .group-hover\:\[animation-play-state\:paused\]{animation-play-state:paused}.group:active .group-active\:shadow-\[inset_0_-10px_10px_\#ffffff3f\]{--tw-shadow:inset 0 -10px 10px #ffffff3f;--tw-shadow-colored:inset 0 -10px 10px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\[side\=bottom\]\:top-1[data-side=bottom]{top:.25rem}.data-\[side\=inline-end\]\:-left-1[data-side=inline-end]{left:-.25rem}.data-\[side\=inline-start\]\:-right-1[data-side=inline-start],.data-\[side\=left\]\:-right-1[data-side=left]{right:-.25rem}.data-\[side\=right\]\:-left-1[data-side=right]{left:-.25rem}.data-\[side\=top\]\:-bottom-2\.5[data-side=top]{bottom:-.625rem}.data-\[side\=inline-end\]\:-translate-y-1\/2[data-side=inline-end],.data-\[side\=inline-start\]\:-translate-y-1\/2[data-side=inline-start],.data-\[side\=left\]\:-translate-y-1\/2[data-side=left],.data-\[side\=right\]\:-translate-y-1\/2[data-side=right]{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=delayed-open\]\:animate-in[data-state=delayed-open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\[state\=delayed-open\]\:fade-in-0[data-state=delayed-open]{--tw-enter-opacity:0}.data-\[state\=delayed-open\]\:zoom-in-95[data-state=delayed-open]{--tw-enter-scale:.95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\[side\=inline-end\]\:slide-in-from-left-2[data-side=inline-end]{--tw-enter-translate-x:-0.5rem}.data-\[side\=inline-start\]\:slide-in-from-right-2[data-side=inline-start],.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.dark\:text-neutral-600\/40:is(.dark *){color:rgb(82 82 82/.4)}.dark\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\:block{display:block}.sm\:inline{display:inline}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width:768px){.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-24{height:6rem}.md\:h-8{height:2rem}.md\:max-h-\[200px\]{max-height:200px}.md\:max-h-\[92vh\]{max-height:92vh}.md\:max-h-none{max-height:none}.md\:w-1\.5{width:.375rem}.md\:w-12{width:3rem}.md\:w-64{width:16rem}.md\:w-80{width:20rem}.md\:max-w-none{max-width:none}.md\:flex-\[0_0_28\%\]{flex:0 0 28%}.md\:flex-row{flex-direction:row}.md\:gap-4{gap:1rem}.md\:space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.md\:border-b-0{border-bottom-width:0}.md\:border-l{border-left-width:1px}.md\:border-r{border-right-width:1px}.md\:border-t-0{border-top-width:0}.md\:p-3{padding:.75rem}.md\:p-4{padding:1rem}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:text-4xl{font-size:2.25rem;line-height:2.5rem}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:1024px){.lg\:flex{display:flex}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:text-\[6rem\]{font-size:6rem}}@media (min-width:1280px){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[948],{158:(e,t,r)=>{"use strict";r.d(t,{Bf:()=>S,G$:()=>w,Rz:()=>b,Vj:()=>x,hX:()=>p,ii:()=>d,k5:()=>u,sy:()=>N,wy:()=>i});var s=r(8566),a=r(9280),o=r.n(a);let l={untested:"⬜ Untested",pass:"✅ Pass",fail:"❌ Fail",skip:"⏭ Skip"},n=e=>e.replace(/\n/g,"<br>").replace(/\|/g,"\\|");function i(e,t,r){let a=(r.length>0?r:s._X).filter(e=>e.visible),o=a.map(e=>e.label).join(" | "),i=a.map(()=>"---").join(" | "),c="# ".concat(e.code?e.code+" — ":"").concat(e.label,"\n\n");c+="| # | ".concat(o," |\n"),c+="|---|".concat(i,"|\n"),t.forEach((e,t)=>{let r=a.map(t=>"status"===t.key?l[e.status]:n(e[t.key]||""));c+="| ".concat(t+1," | ").concat(r.join(" | ")," |\n")});let d=t.length,x=t.filter(e=>"skip"===e.status).length,u=t.filter(e=>"pass"===e.status).length,p=d-x>0?Math.round(u/(d-x)*100):0;return c+="\n**Pass rate: ".concat(u,"/").concat(d-x," (").concat(p,"%)**\n")}function c(e,t,r){let s=new Blob([e],{type:r}),a=URL.createObjectURL(s),o=document.createElement("a");o.href=a,o.download=t,o.click(),URL.revokeObjectURL(a)}function d(e){c(function(e){let t="# ".concat(e.name,"\n\n");for(let x of e.flows){var r,a,o,i,c,d;let u=e.testCases[x.id];if(!u||0===u.length)continue;let p=((null!=(i=null!=(o=null==(r=e.columnConfigs)?void 0:r[x.id])?o:e.columnConfig)?i:[]).length>0?null!=(d=null!=(c=null==(a=e.columnConfigs)?void 0:a[x.id])?c:e.columnConfig)?d:[]:s._X).filter(e=>e.visible),m=p.map(e=>e.label).join(" | "),h=p.map(()=>"---").join(" | ");t+="## ".concat(x.code?x.code+" — ":"").concat(x.label,"\n\n"),t+="| # | ".concat(m," |\n"),t+="|---|".concat(h,"|\n"),u.forEach((e,r)=>{let s=p.map(t=>"status"===t.key?l[e.status]:n(e[t.key]||""));t+="| ".concat(r+1," | ").concat(s.join(" | ")," |\n")});let f=u.length,b=u.filter(e=>"skip"===e.status).length,y=u.filter(e=>"pass"===e.status).length,v=f-b>0?Math.round(y/(f-b)*100):0;t+="\n**Pass rate: ".concat(y,"/").concat(f-b," (").concat(v,"%)**\n\n---\n\n")}return t}(e),"".concat(e.name,".md"),"text/markdown")}function x(e){c(JSON.stringify(e,null,2),"".concat(e.name,".json"),"application/json")}function u(e,t,r){let s=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_");c(i(e,t,r),"".concat(s,".md"),"text/markdown")}function p(e,t){let r=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_");c(JSON.stringify({node:e,testCases:t},null,2),"".concat(r,".json"),"application/json")}function m(e,t){let r=e&&e.length>0?e:t;return r.length>0?r:s._X}function h(e,t){return t.map(t=>"status"===t.key?l[e.status]:e[t.key]||"")}function f(e){return e.includes(",")||e.includes('"')||e.includes("\n")?'"'.concat(e.replace(/"/g,'""'),'"'):e}function b(e,t,r){let a=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_");c(function(e,t,r){let a=m(r,s._X).filter(e=>e.visible);return[["#",...a.map(e=>f(e.label))].join(","),...t.map((e,t)=>[String(t+1),...h(e,a).map(f)].join(","))].join("\n")}(0,t,r),"".concat(a,".csv"),"text/csv")}function y(e,t){var r,a,o;let l=null!=(o=null!=(a=null==(r=e.columnConfigs)?void 0:r[t])?a:e.columnConfig)?o:[];return l.length>0?l:s._X}function v(e){e.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFdbd8d3"}},e.font={name:"Inter",bold:!0,size:11},e.border={top:{style:"thin"},bottom:{style:"thin"},left:{style:"thin"},right:{style:"thin"}},e.alignment={vertical:"middle",horizontal:"left",wrapText:!0}}function g(e){e.border={top:{style:"thin"},bottom:{style:"thin"},left:{style:"thin"},right:{style:"thin"}},e.font={name:"Inter",size:11},e.alignment={vertical:"middle",horizontal:"left",wrapText:!0}}function j(e,t,r,s,a){let o=e.addWorksheet(t);return o.columns=[{header:"#",key:"row",width:6},...a.map(e=>({header:e.label,key:e.key,width:Math.max(e.label.length+4,18)}))],o.getRow(1).eachCell(v),s.forEach((e,t)=>{let r={row:t+1};a.forEach(t=>{"status"===t.key?r[t.key]=l[e.status]:r[t.key]=e[t.key]||""}),o.addRow(r).eachCell(g)}),o}async function k(e,t,r){let a=m(r,s._X).filter(e=>e.visible),l=new(o()).Workbook;return l.creator="Ayu Management Tools",j(l,e.label,e.label,t,a),new Blob([await l.xlsx.writeBuffer()],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})}async function w(e,t,r){let s=(e.code||e.label).replace(/[^a-zA-Z0-9_-]/g,"_"),a=await k(e,t,r),o=URL.createObjectURL(a),l=document.createElement("a");l.href=o,l.download="".concat(s,".xlsx"),l.click(),URL.revokeObjectURL(o)}async function C(e){let t=new(o()).Workbook;for(let r of(t.creator="Ayu Management Tools",e.flows)){let s=e.testCases[r.id];if(!s||0===s.length)continue;let a=y(e,r.id).filter(e=>e.visible);j(t,(r.code||r.label).substring(0,31).replace(/[\\/*?[\]]/g,"_"),r.label,s,a)}return new Blob([await t.xlsx.writeBuffer()],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})}async function N(e){let t=await C(e),r=URL.createObjectURL(t),s=document.createElement("a");s.href=r,s.download="".concat(e.name,".xlsx"),s.click(),URL.revokeObjectURL(r)}function S(e){c(function(e){let t="";for(let r of e.flows){let s=e.testCases[r.id];if(!s||0===s.length)continue;let a=y(e,r.id).filter(e=>e.visible);t+="# ".concat(r.code?r.code+" — ":"").concat(r.label,"\n"),t+=["#",...a.map(e=>f(e.label))].join(",")+"\n",s.forEach((e,r)=>{let s=[String(r+1),...h(e,a).map(f)];t+=s.join(",")+"\n"}),t+="\n"}return t}(e),"".concat(e.name,".csv"),"text/csv")}},1868:(e,t,r)=>{Promise.resolve().then(r.bind(r,7057))},3362:(e,t,r)=>{"use strict";r.d(t,{Pj:()=>s});let s=Object.values({openai:{id:"openai",name:"OpenAI",type:"native",description:"GPT models powering ChatGPT. Industry-leading language understanding.",logoUrl:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/openai.svg",keyUrl:"https://platform.openai.com/api-keys",keyPlaceholder:"sk-...",color:"#10A37F",sdkProvider:"openai",defaultModel:"gpt-4o-mini",popularModels:["gpt-4o","gpt-4o-mini","gpt-4-turbo","gpt-3.5-turbo"]},google:{id:"google",name:"Google Gemini",type:"native",description:"Google's multimodal AI with strong reasoning capabilities.",logoUrl:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/googlegemini.svg",keyUrl:"https://aistudio.google.com/apikey",keyPlaceholder:"AIza...",color:"#4285F4",sdkProvider:"google",defaultModel:"gemini-2.5-flash",popularModels:["gemini-2.5-flash","gemini-2.5-pro","gemini-2.0-flash"]},anthropic:{id:"anthropic",name:"Anthropic",type:"native",description:"Claude models — safe, steerable, and highly capable.",logoUrl:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/anthropic.svg",keyUrl:"https://console.anthropic.com/settings/keys",keyPlaceholder:"sk-ant-...",color:"#D97706",sdkProvider:"anthropic",defaultModel:"claude-sonnet-4-20250514",popularModels:["claude-sonnet-4-20250514","claude-haiku-4-20250514","claude-3-5-sonnet-20241022"]},deepseek:{id:"deepseek",name:"DeepSeek",type:"openai-compatible",description:"High-performance open-source models with competitive reasoning.",logoUrl:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/deepseek.svg",keyUrl:"https://platform.deepseek.com/api_keys",keyPlaceholder:"sk-...",color:"#4D6BFE",sdkProvider:"openai",baseURL:"https://api.deepseek.com/v1",defaultModel:"deepseek-chat",popularModels:["deepseek-chat","deepseek-reasoner"]},xiaomi:{id:"xiaomi",name:"Xiaomi (MiMo)",type:"openai-compatible",description:"Xiaomi's MiMo models — OpenAI-compatible API.",logoUrl:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/xiaomi.svg",keyUrl:"https://platform.xiaomimimo.com/",keyPlaceholder:"tp-...",color:"#FF6900",sdkProvider:"openai",baseURL:"https://token-plan-sgp.xiaomimimo.com/v1",defaultModel:"mimo-v2.5",popularModels:["mimo-v2.5","mimo-v2.5-pro"]},openrouter:{id:"openrouter",name:"OpenRouter",type:"openai-compatible",description:"Unified gateway to 200+ models — Claude, Llama, Mistral, Gemini, and more.",logoUrl:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/openrouter.svg",keyUrl:"https://openrouter.ai/keys",keyPlaceholder:"sk-or-...",color:"#6366F1",sdkProvider:"openai",baseURL:"https://openrouter.ai/api/v1",defaultModel:"openrouter/free",popularModels:["openrouter/free","meta-llama/llama-4-maverick:free","google/gemini-2.5-flash:free","deepseek/deepseek-chat-v3-0324:free","mistralai/mistral-small-3.2-24b:free","qwen/qwen3-235b-a22b:free","microsoft/phi-4-reasoning-plus:free"]},groq:{id:"groq",name:"Groq",type:"native",description:"Ultra-fast inference with LPU hardware. Blazing speed for Llama, Mixtral, and Gemma models.",logoUrl:"https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/groq.svg",keyUrl:"https://console.groq.com/keys",keyPlaceholder:"gsk_...",color:"#F55036",sdkProvider:"groq",defaultModel:"llama-3.3-70b-versatile",popularModels:["llama-3.3-70b-versatile","llama-3.1-8b-instant","mixtral-8x7b-32768","gemma2-9b-it","meta-llama/llama-4-scout-17b-16e-instruct","qwen-qwq-32b"]},custom:{id:"custom",name:"Custom (OpenAI-compatible)",type:"openai-compatible",description:"Any OpenAI-compatible API — Ollama, LM Studio, vLLM, LiteLLM, etc.",logoUrl:"",keyUrl:"",keyPlaceholder:"sk-... or any key",color:"#6B7280",sdkProvider:"openai",defaultModel:"",popularModels:[],requiresBaseURL:!0}})},4269:(e,t,r)=>{"use strict";r.d(t,{cn:()=>o});var s=r(2821),a=r(5889);function o(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.QP)((0,s.$)(t))}},5815:(e,t,r)=>{"use strict";r.d(t,{p:()=>a});var s=r(5155);function a(e){let{message:t,action:r}=e;return(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-4 px-6 text-center",children:[(0,s.jsx)("img",{src:"https://static.vecteezy.com/system/resources/thumbnails/067/162/149/small/cute-duck-meme-sticker-transparent-cute-illustration-free-png.png",alt:"",className:"w-28 h-28 object-contain select-none opacity-15",draggable:!1}),(0,s.jsx)("p",{className:"text-sm max-w-[280px]",style:{color:"var(--text-tertiary)"},children:t}),r&&(0,s.jsx)("button",{onClick:r.onClick,className:"px-4 py-2 text-sm font-medium rounded-md transition-opacity hover:opacity-80",style:{backgroundColor:"var(--accent)",color:"var(--bg-primary)",borderRadius:"var(--radius-pill)"},children:r.label})]})}},7057:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>et});var s=r(5155),a=r(8661),o=r.n(a),l=r(2115),n=r(63),i=r(7246);let c=(0,l.memo)(function(e){let{node:t,position:r,isSelected:a,testCases:o,isDragged:n,edgeDragActive:i,isEdgeDropTarget:c,deleteMode:d,isDeleteChecked:x,onSelect:u,onAddChild:p,onDelete:m,onUnlinkNode:h,onRename:f,onUpdateNode:b,onDragStart:y,onEdgeStart:v,onToggleDeleteCheck:g,depth:j,svgRef:k}=e,[w,C]=(0,l.useState)(!1),[N,S]=(0,l.useState)(t.label),[D,L]=(0,l.useState)(!1),[E,M]=(0,l.useState)(!1),[R,A]=(0,l.useState)("horizontal"),[I,U]=(0,l.useState)(""),P=(0,l.useRef)(null),T=(0,l.useRef)(null),z=(0,l.useRef)(null),W=(0,l.useRef)({startX:0,startY:0,moved:!1}),{w:F,h:B}=0===j?{w:160,h:56}:1===j?{w:144,h:48}:{w:132,h:42},O=o.some(e=>"fail"===e.status),X=o.length>0&&o.every(e=>"pass"===e.status||"skip"===e.status);(0,l.useEffect)(()=>{let e=e=>{let r=e.detail;(null==r?void 0:r.parentId)===t.id&&(M(!0),U(""))};return window.addEventListener("mindmap:add-child",e),()=>window.removeEventListener("mindmap:add-child",e)},[t.id]),(0,l.useEffect)(()=>{if(!E)return;let e=e=>{z.current&&!z.current.contains(e.target)&&(I.trim()?_():(M(!1),U("")))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[E,I]),(0,l.useEffect)(()=>{E&&T.current&&T.current.focus()},[E]);let G=(0,l.useCallback)(()=>{S(t.label),C(!0),setTimeout(()=>{var e;return null==(e=P.current)?void 0:e.focus()},0)},[t.label]),H=(0,l.useCallback)(()=>{N.trim()&&f(t.id,N.trim()),C(!1)},[N,t.id,f]),_=(0,l.useCallback)(()=>{if(I.trim()){let e="vertical"===R?{x:r.x,y:r.y+B+60}:{x:r.x+F+120,y:r.y};p(t.id,I.trim(),e,R)}M(!1),U("")},[I,t.id,p,r.x,r.y,B,F,R]),K=(0,l.useCallback)(e=>t=>{t.stopPropagation(),A(e),M(!0),U("")},[]),Y=(0,l.useCallback)(e=>{if(2===e.button||d)return;if(e.stopPropagation(),!e.target.closest('[data-drag-handle="true"]'))return void u(t.id);e.preventDefault(),W.current={startX:e.clientX,startY:e.clientY,moved:!1};let s=e=>e.preventDefault();document.addEventListener("contextmenu",s);let a=e=>{let s=e.clientX-W.current.startX,a=e.clientY-W.current.startY;!W.current.moved&&(Math.abs(s)>6||Math.abs(a)>6)&&(W.current.moved=!0,y(t.id,W.current.startX,W.current.startY,r.x,r.y))},o=()=>{window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",o),setTimeout(()=>document.removeEventListener("contextmenu",s),100)};window.addEventListener("mousemove",a),window.addEventListener("mouseup",o)},[t.id,u,y,d,r]),q=t.id.replace(/[^a-zA-Z0-9]/g,"").slice(0,8),V=a&&!d;return(0,s.jsxs)("g",{transform:"translate(".concat(r.x,", ").concat(r.y,")"),onMouseDown:Y,onDoubleClick:e=>{e.stopPropagation(),d||G()},onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),style:{cursor:d?"pointer":"default",transition:n?"none":"transform 150ms ease-out"},onClick:()=>{d&&g(t.id)},children:[(0,s.jsxs)("defs",{children:[(0,s.jsxs)("linearGradient",{id:"fill-".concat(q),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:"#FFFFFF"}),(0,s.jsx)("stop",{offset:"100%",stopColor:"#FAF9F7"})]}),(0,s.jsxs)("filter",{id:"shadow-".concat(q),x:"-10%",y:"-10%",width:"120%",height:"130%",children:[(0,s.jsx)("feDropShadow",{dx:"0",dy:"1",stdDeviation:"2",floodOpacity:"0.08"}),(0,s.jsx)("feDropShadow",{dx:"0",dy:"3",stdDeviation:"6",floodOpacity:"0.05"})]}),(0,s.jsxs)("filter",{id:"shadow-hover-".concat(q),x:"-10%",y:"-10%",width:"120%",height:"140%",children:[(0,s.jsx)("feDropShadow",{dx:"0",dy:"2",stdDeviation:"4",floodOpacity:"0.12"}),(0,s.jsx)("feDropShadow",{dx:"0",dy:"6",stdDeviation:"12",floodOpacity:"0.08"})]}),(0,s.jsxs)("filter",{id:"shadow-drag-".concat(q),x:"-20%",y:"-20%",width:"140%",height:"160%",children:[(0,s.jsx)("feDropShadow",{dx:"0",dy:"4",stdDeviation:"8",floodOpacity:"0.2"}),(0,s.jsx)("feDropShadow",{dx:"0",dy:"8",stdDeviation:"16",floodOpacity:"0.1"})]}),(0,s.jsxs)("filter",{id:"glow-".concat(q),x:"-50%",y:"-50%",width:"200%",height:"200%",children:[(0,s.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"3",result:"blur"}),(0,s.jsx)("feColorMatrix",{in:"blur",type:"matrix",values:"0 0 0 0 0.4 0 0 0 0 0.8 0 0 0 0 0.4 0 0 0 0.6 0"})]})]}),!d&&(0,s.jsxs)("g",{"data-drag-handle":"true",transform:"translate(0, ".concat(-B/2-10,")"),style:{cursor:n?"grabbing":"grab"},children:[(0,s.jsx)("rect",{x:-20,y:-7,width:40,height:14,rx:4,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:1,opacity:D||a?.9:.5,style:{transition:"opacity 150ms ease-out"}}),(0,s.jsx)("circle",{cx:-8,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,s.jsx)("circle",{cx:-8,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,s.jsx)("circle",{cx:-4,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,s.jsx)("circle",{cx:-4,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,s.jsx)("circle",{cx:0,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,s.jsx)("circle",{cx:0,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,s.jsx)("circle",{cx:4,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,s.jsx)("circle",{cx:4,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,s.jsx)("circle",{cx:8,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,s.jsx)("circle",{cx:8,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6})]}),c&&(0,s.jsx)("rect",{x:-F/2-6,y:-B/2-6,width:F+12,height:B+12,rx:8,fill:"var(--status-pass-bg)",stroke:"var(--status-pass-text)",strokeWidth:2,opacity:.5}),(()=>{let e=O?"var(--status-fail-bg)":X?"var(--status-pass-bg)":null;return(0,s.jsxs)(s.Fragment,{children:[e&&(0,s.jsx)("rect",{x:-F/2,y:-B/2,width:F,height:B,rx:4,fill:e,opacity:.15}),(0,s.jsx)("rect",{x:-F/2,y:-B/2,width:F,height:B,rx:4,fill:"url(#fill-".concat(q,")"),stroke:d&&x?"var(--status-fail-text)":"var(--border)",strokeWidth:d&&x?2:.5,filter:n?"url(#shadow-drag-".concat(q,")"):D?"url(#shadow-hover-".concat(q,")"):"url(#shadow-".concat(q,")"),style:{transition:"filter 200ms ease-out, stroke 150ms ease-out"}}),(0,s.jsx)("path",{d:"M ".concat(F/2-10," ").concat(-B/2," L ").concat(F/2," ").concat(-B/2," L ").concat(F/2," ").concat(-B/2+10," Z"),fill:"var(--bg-secondary)",opacity:.5}),(0,s.jsx)("path",{d:"M ".concat(F/2-10," ").concat(-B/2," L ").concat(F/2-10," ").concat(-B/2+10," L ").concat(F/2," ").concat(-B/2+10),fill:"none",stroke:"var(--border)",strokeWidth:.5,opacity:.4})]})})(),d&&(0,s.jsxs)("g",{transform:"translate(".concat(-F/2+8,", 0)"),children:[(0,s.jsx)("rect",{x:-7,y:-7,width:14,height:14,rx:3,fill:x?"var(--status-fail-text)":"transparent",stroke:x?"var(--status-fail-text)":"var(--border)",strokeWidth:1.5}),x&&(0,s.jsx)("path",{d:"M -4 0 L -1 3 L 4 -2",fill:"none",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]}),t.code&&!d&&(0,s.jsxs)("g",{transform:"translate(".concat(-F/2+6,", ").concat(-B/2-11,")"),style:{opacity:D||a?1:0,transition:"opacity 150ms ease-out"},children:[(0,s.jsx)("rect",{x:0,y:0,width:Math.max(6.5*t.code.length+10,28),height:14,rx:7,fill:"var(--accent)",opacity:.08}),(0,s.jsx)("text",{x:5,y:10,style:{fill:"var(--text-tertiary)",fontSize:8,fontWeight:500,fontFamily:"monospace",letterSpacing:"0.05em"},children:t.code})]}),w?(0,s.jsx)("foreignObject",{x:-F/2+8,y:-B/2+4,width:F-16,height:B-8,children:(0,s.jsx)("input",{ref:P,value:N,onChange:e=>S(e.target.value),onBlur:H,onKeyDown:e=>{"Enter"===e.key&&H(),"Escape"===e.key&&C(!1)},className:"w-full h-full bg-transparent outline-none text-center text-xs",style:{color:"var(--text-primary)",fontFamily:"inherit"}})}):(0,s.jsx)("text",{textAnchor:"middle",dominantBaseline:"central",className:"select-none",onClick:e=>{e.stopPropagation(),d||G()},style:{fill:"var(--text-primary)",fontSize:0===j?13:11.5,fontWeight:0===j?600:450,fontFamily:"inherit",letterSpacing:"-0.01em",cursor:D&&!d?"text":"default",pointerEvents:"auto"},children:t.label.length>22?t.label.slice(0,22)+"…":t.label}),V&&!w&&!i&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("g",{transform:"translate(".concat(F/2+3,", ").concat(-11,")"),children:[(0,s.jsxs)("g",{onClick:K("horizontal"),onMouseDown:e=>e.stopPropagation(),style:{cursor:"pointer"},children:[(0,s.jsx)("rect",{x:0,y:0,width:22,height:22,rx:3,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:.75,opacity:.9}),(0,s.jsx)("line",{x1:11,y1:5,x2:11,y2:17,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"}),(0,s.jsx)("line",{x1:5,y1:11,x2:17,y2:11,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"})]}),(0,s.jsx)("g",{transform:"translate(".concat(24,", ").concat(7,")"),onMouseDown:e=>{e.stopPropagation(),e.preventDefault(),v(t.id,"pass",r.x+F/2+3+22+2+4,r.y-11+11,"horizontal")},onContextMenu:e=>{e.preventDefault(),e.stopPropagation(),v(t.id,"fail",r.x+F/2+3+22+2+4,r.y-11+11,"horizontal")},style:{cursor:"crosshair"},children:(0,s.jsx)("circle",{cx:4,cy:4,r:4,fill:"var(--status-pass-text)",opacity:.8,children:(0,s.jsx)("animate",{attributeName:"opacity",values:"0.6;1;0.6",dur:"2s",repeatCount:"indefinite"})})})]}),(0,s.jsxs)("g",{transform:"translate(".concat(-11,", ").concat(B/2+3,")"),children:[(0,s.jsxs)("g",{onClick:K("vertical"),onMouseDown:e=>e.stopPropagation(),style:{cursor:"pointer"},children:[(0,s.jsx)("rect",{x:0,y:0,width:22,height:22,rx:3,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:.75,opacity:.9}),(0,s.jsx)("line",{x1:11,y1:5,x2:11,y2:17,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"}),(0,s.jsx)("line",{x1:5,y1:11,x2:17,y2:11,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"})]}),(0,s.jsx)("g",{transform:"translate(".concat(24,", ").concat(7,")"),onMouseDown:e=>{e.stopPropagation(),e.preventDefault(),v(t.id,"pass",r.x-11+11,r.y+B/2+3+22+2+4,"vertical")},onContextMenu:e=>{e.preventDefault(),e.stopPropagation(),v(t.id,"fail",r.x-11+11,r.y+B/2+3+22+2+4,"vertical")},style:{cursor:"crosshair"},children:(0,s.jsx)("circle",{cx:4,cy:4,r:4,fill:"var(--accent)",opacity:.8,children:(0,s.jsx)("animate",{attributeName:"opacity",values:"0.6;1;0.6",dur:"2s",repeatCount:"indefinite"})})})]})]}),i&&!c&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("g",{transform:"translate(".concat(-F/2-10,", 0)"),children:(0,s.jsx)("circle",{r:6,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:1.5,opacity:.6,strokeDasharray:"3 2"})}),(0,s.jsx)("g",{transform:"translate(0, ".concat(-B/2-10,")"),children:(0,s.jsx)("circle",{r:6,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:1.5,opacity:.6,strokeDasharray:"3 2"})})]}),E&&(0,s.jsxs)("g",{children:["vertical"===R?(0,s.jsx)("line",{x1:0,y1:B/2,x2:0,y2:B/2+50,stroke:"var(--border-hover)",strokeWidth:1.5}):(0,s.jsx)("line",{x1:F/2,y1:0,x2:F/2+50,y2:0,stroke:"var(--border-hover)",strokeWidth:1.5}),(0,s.jsx)("rect",{x:"vertical"===R?-F/2:F/2+50,y:"vertical"===R?B/2+50:-B/2,width:F,height:B,rx:4,fill:"var(--bg-card)",stroke:"var(--accent)",strokeWidth:1,strokeDasharray:"4 3"}),(0,s.jsx)("foreignObject",{x:"vertical"===R?-F/2+4:F/2+50+4,y:"vertical"===R?B/2+50+4:-B/2+4,width:F-8,height:B-8,children:(0,s.jsx)("div",{ref:z,children:(0,s.jsx)("input",{ref:T,value:I,onChange:e=>U(e.target.value),onBlur:()=>{I.trim()?_():(M(!1),U(""))},onKeyDown:e=>{"Enter"===e.key&&_(),"Escape"===e.key&&(M(!1),U("")),e.stopPropagation()},onMouseDown:e=>e.stopPropagation(),placeholder:"Name node...",className:"w-full h-full bg-transparent outline-none text-center text-xs",style:{color:"var(--text-primary)",fontFamily:"inherit"}})})})]})]})});var d=r(7786),x=r(4269);function u(e){let{width:t=16,height:r=16,x:a=0,y:o=0,cx:n=1,cy:i=1,cr:c=1,className:u,glow:p=!1,...m}=e,h=(0,l.useId)(),f=(0,l.useRef)(null),[b,y]=(0,l.useState)({width:0,height:0});(0,l.useEffect)(()=>{let e=()=>{if(f.current){let{width:e,height:t}=f.current.getBoundingClientRect();y({width:e,height:t})}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let v=Array.from({length:Math.ceil(b.width/t)*Math.ceil(b.height/r)},(e,s)=>{let l=s%Math.ceil(b.width/t),c=Math.floor(s/Math.ceil(b.width/t));return{x:l*t+n+a,y:c*r+i+o,delay:5*Math.random(),duration:3*Math.random()+2}});return(0,s.jsxs)("svg",{ref:f,"aria-hidden":"true",className:(0,x.cn)("pointer-events-none absolute inset-0 h-full w-full text-neutral-400/80",u),...m,children:[(0,s.jsx)("defs",{children:(0,s.jsxs)("radialGradient",{id:"".concat(h,"-gradient"),children:[(0,s.jsx)("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"1"}),(0,s.jsx)("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"})]})}),v.map(e=>(0,s.jsx)(d.P.circle,{cx:e.x,cy:e.y,r:c,fill:p?"url(#".concat(h,"-gradient)"):"currentColor",initial:p?{opacity:.4,scale:1}:{},animate:p?{opacity:[.4,1,.4],scale:[1,1.5,1]}:{},transition:p?{duration:e.duration,repeat:1/0,repeatType:"reverse",delay:e.delay,ease:"easeInOut"}:{}},"".concat(e.x,"-").concat(e.y)))]})}let p=l.forwardRef((e,t)=>{let{className:r,children:a,rippleColor:o="#ffffff",duration:n="600ms",onClick:i,...c}=e,[d,u]=(0,l.useState)([]);return(0,l.useEffect)(()=>{let e=null;if(d.length>0){let t=d[d.length-1];e=setTimeout(()=>{u(e=>e.filter(e=>e.key!==t.key))},parseInt(n))}return()=>{null!==e&&clearTimeout(e)}},[d,n]),(0,s.jsxs)("button",{className:(0,x.cn)("bg-background text-primary relative flex cursor-pointer items-center justify-center overflow-hidden rounded-lg border-2 px-4 py-2 text-center",r),onClick:e=>{(e=>{let t=e.currentTarget.getBoundingClientRect(),r=Math.max(t.width,t.height),s={x:e.clientX-t.left-r/2,y:e.clientY-t.top-r/2,size:r,key:Date.now()};u(e=>[...e,s])})(e),null==i||i(e)},ref:t,...c,children:[(0,s.jsx)("div",{className:"relative z-10",children:a}),(0,s.jsx)("span",{className:"pointer-events-none absolute inset-0",children:d.map(e=>(0,s.jsx)("span",{className:"animate-rippling bg-background absolute rounded-full opacity-30",style:{width:"".concat(e.size,"px"),height:"".concat(e.size,"px"),top:"".concat(e.y,"px"),left:"".concat(e.x,"px"),backgroundColor:o,transform:"scale(0)","--duration":n}},e.key))})]})});function m(e){let{nodes:t,edges:r,testCases:a,selectedNodeId:o,onSelect:n,onAddNode:i,onDeleteNode:d,onDeleteNodes:x,onUnlinkNode:m,onRenameNode:b,onUpdateNode:y,onAddEdge:v,onDeleteEdge:g,onUpdateEdge:j,canUndo:k,canRedo:w,onUndo:C,onRedo:N}=e,S=(0,l.useMemo)(()=>(function(e){let t=new Map;if(0===e.length)return t;let r=new Map;for(let t of e)r.set(t.id,t);let s=new Set;for(let t of e)t.position&&s.add(t.id);let a=e.filter(e=>null===e.parentId);if(0===a.length)return t;let o=0;for(let e of a)o=function e(a,o,l,n,i){var c,d,x,u;let p=r.get(a);if(!p)return l;let m="vertical"===p.direction,h=m?null!=(d=null==(c=p.position)?void 0:c.x)?d:n:60+180*o,f=l;for(let t of p.children)f=m?e(t,o,f,n,i):e(t,o+1,f,n,i);let b=p.children.map(e=>t.get(e)).filter(Boolean),y=b.length>0?(Math.min(...b.map(e=>e.y))+Math.max(...b.map(e=>e.y)))/2:l;if(s.has(a)&&p.position){let r=b.length>0?y:l,s=p.position.x-(m?p.position.x:h),n=p.position.y-r;t.set(a,p.position);let i=l;for(let t of p.children)i=m?e(t,o,i,s,n):e(t,o+1,i,s,n);return i}return m?t.set(a,{x:(null!=(u=null==(x=p.position)?void 0:x.x)?u:0)+n,y:y+i}):t.set(a,{x:h+n,y:y+i}),f}(e.id,0,o,0,0);let l=Array.from(t.entries());if(l.length>0){let e=l.filter(e=>{let[t]=e;return!s.has(t)}).map(e=>{let[,t]=e;return t.y});if(e.length>0){let r=(Math.min(...e)+Math.max(...e))/2;for(let[e,a]of l)s.has(e)||t.set(e,{x:a.x,y:a.y-r+300})}}return t})(t),[t]),[D,L]=(0,l.useState)({x:0,y:0}),[E,M]=(0,l.useState)(1),[R,A]=(0,l.useState)(!1),[I,U]=(0,l.useState)({x:0,y:0}),[P,T]=(0,l.useState)(null),[z,W]=(0,l.useState)(!1),[F,B]=(0,l.useState)(null),[O,X]=(0,l.useState)(null),[G,H]=(0,l.useState)(null),[_,K]=(0,l.useState)(null),[Y,q]=(0,l.useState)(!1),[V,J]=(0,l.useState)(new Set),[Z,$]=(0,l.useState)(!1),[Q,ee]=(0,l.useState)(null),[et,er]=(0,l.useState)(!1),[es,ea]=(0,l.useState)(new Set),eo=(0,l.useRef)(null),el=(0,l.useRef)(null),en=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=eo.current;if(!e)return;let t=e=>{e.preventDefault();let t=e.deltaY>0?.9:1.1;M(e=>Math.max(.2,Math.min(3,e*t)))};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[]);let ei=(0,l.useCallback)(()=>{let e=Array.from(S.values());if(0===e.length){M(1),L({x:0,y:0});return}if(!eo.current)return;let t=eo.current.getBoundingClientRect(),r=Math.min(...e.map(e=>e.x))-80,s=Math.max(...e.map(e=>e.x))+80,a=Math.min(...e.map(e=>e.y))-80,o=Math.max(...e.map(e=>e.y))+80,l=Math.min(t.width/(s-r),t.height/(o-a),1.5);M(l),L({x:t.width/2/l-(r+s)/2,y:t.height/2/l-(a+o)/2})},[S]);(0,l.useEffect)(()=>{let e=e=>{var r;let s=null==(r=e.target)?void 0:r.tagName;if("INPUT"!==s&&"TEXTAREA"!==s){if((e.ctrlKey||e.metaKey)&&(("="===e.key||"+"===e.key)&&(e.preventDefault(),M(e=>Math.min(3,1.15*e))),"-"===e.key&&(e.preventDefault(),M(e=>Math.max(.2,.85*e))),"0"===e.key&&(e.preventDefault(),ei())),"Tab"===e.key&&o&&!e.ctrlKey&&!e.metaKey){e.preventDefault();let r=t.find(e=>e.id===o);if(r){let e=new CustomEvent("mindmap:add-child",{detail:{parentId:r.id}});window.dispatchEvent(e)}}if("Enter"===e.key&&o&&!e.ctrlKey&&!e.metaKey){e.preventDefault();let r=t.find(e=>e.id===o);if(r)if(r.parentId){let e=new CustomEvent("mindmap:add-child",{detail:{parentId:r.parentId}});window.dispatchEvent(e)}else{let e=S.get(r.id);e&&i(null,"",{x:e.x,y:e.y+70})}}"Delete"!==e.key&&"Backspace"!==e.key||!o||e.ctrlKey||e.metaKey||(e.preventDefault(),ee(o),$(!0))}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[o,t,S,i,d,ei]);let ec=(0,l.useCallback)((e,t)=>{if(!eo.current)return{x:0,y:0};let r=eo.current.getBoundingClientRect();return{x:(e-r.left)/E-D.x,y:(t-r.top)/E-D.y}},[E,D]),ed=(0,l.useCallback)(e=>{e.target===eo.current&&(A(!0),U({x:e.clientX-D.x*E,y:e.clientY-D.y*E}))},[D,E]),ex=(0,l.useCallback)(e=>{if(R&&L({x:(e.clientX-I.x)/E,y:(e.clientY-I.y)/E}),P){let t=ec(P.startClientX,P.startClientY),r=ec(e.clientX,e.clientY),s=r.x-t.x,a=r.y-t.y,o=P.startNodeX+s,l=P.startNodeY+a;en.current={id:P.id,x:o,y:l},el.current||(el.current=requestAnimationFrame(()=>{en.current&&(y(en.current.id,{position:{x:en.current.x,y:en.current.y}}),en.current=null),el.current=null}))}if(O){let r=ec(e.clientX,e.clientY);X(e=>e?{...e,curX:r.x,curY:r.y}:null);let s=null;for(let e of t){if(e.id===O.fromId)continue;let t=S.get(e.id);if(!t)continue;let a=r.x-t.x,o=r.y-t.y;if(80>Math.abs(a)&&40>Math.abs(o)){s=e.id;break}}K(s)}},[R,I,E,P,O,ec,y,t,S]),eu=(0,l.useCallback)(()=>{if(O){let e={x:O.curX,y:O.curY};for(let r of t){let t=S.get(r.id);if(!t)continue;let s=e.x-t.x,a=e.y-t.y;if(80>Math.abs(s)&&40>Math.abs(a)&&r.id!==O.fromId){v(O.fromId,r.id,O.type);break}}X(null),K(null)}A(!1),T(null),el.current&&(cancelAnimationFrame(el.current),el.current=null)},[O,t,S,v]),ep=(0,l.useCallback)(e=>{e.target===eo.current&&(n(null),W(!1))},[n]),em=(0,l.useCallback)(e=>{e.target===eo.current&&(B(ec(e.clientX,e.clientY)),W(!0))},[ec]),eh=(0,l.useCallback)(e=>{e.trim()&&i(null,e.trim(),null!=F?F:void 0),W(!1),B(null)},[i,F]),ef=(0,l.useCallback)((e,t,r,s,a)=>{T({id:e,startNodeX:s,startNodeY:a,startClientX:t,startClientY:r})},[]),eb=(0,l.useCallback)((e,t,r,s,a)=>{X({fromId:e,type:t,startX:r,startY:s,curX:r,curY:s,direction:a})},[]),ey=(0,l.useCallback)(()=>{q(e=>!e),J(new Set),er(!1),ea(new Set)},[]),ev=(0,l.useCallback)(()=>{er(e=>!e),ea(new Set),q(!1),J(new Set)},[]),eg=(0,l.useCallback)(e=>{ea(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[]),ej=(0,l.useCallback)(()=>{Array.from(es).forEach(e=>{e.startsWith("tree-")?m(e.replace("tree-","")):g(e)}),ea(new Set),er(!1)},[es,m,g]),ek=(0,l.useCallback)(e=>{J(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[]),ew=(0,l.useCallback)(()=>{Q?(d(Q),ee(null)):V.size>0&&(x(Array.from(V)),J(new Set),q(!1)),$(!1)},[Q,V,d,x]),eC=Array.from(S.values());return eC.length>0&&(eC.map(e=>e.x),eC.map(e=>e.x)),eC.length>0&&(eC.map(e=>e.y),eC.map(e=>e.y)),(0,s.jsxs)("div",{className:"relative w-full h-full overflow-hidden",style:{backgroundColor:"var(--bg-primary)"},children:[(0,s.jsx)(u,{width:24,height:24,cr:1,className:"text-neutral-300/60 dark:text-neutral-600/40"}),(0,s.jsxs)("div",{className:"absolute top-3 right-3 z-10 flex flex-col gap-1",children:[(0,s.jsx)("button",{onClick:()=>M(e=>Math.min(3,1.2*e)),className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},children:"+"}),(0,s.jsx)("button",{onClick:()=>M(e=>Math.max(.2,.8*e)),className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},children:"−"}),(0,s.jsx)("button",{onClick:ei,className:"w-7 h-7 flex items-center justify-center text-[10px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},children:"Fit"}),(0,s.jsxs)("div",{className:"text-[10px] text-center mt-0.5",style:{color:"var(--text-tertiary)"},children:[Math.round(100*E),"%"]}),(0,s.jsxs)("div",{className:"mt-1 border-t pt-1",style:{borderColor:"var(--border)"},children:[(0,s.jsx)("button",{onClick:ey,className:"w-7 h-7 flex items-center justify-center text-[10px] rounded border transition-colors",style:{borderColor:Y?"var(--status-fail-text)":"var(--border)",color:Y?"var(--status-fail-text)":"var(--text-secondary)",backgroundColor:Y?"var(--status-fail-bg)":"var(--bg-card)"},title:Y?"Exit delete mode":"Delete nodes",children:(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,s.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})}),(0,s.jsx)("button",{onClick:ev,className:"w-7 h-7 mt-1 flex items-center justify-center text-[10px] rounded border transition-colors",style:{borderColor:et?"var(--status-skip-text)":"var(--border)",color:et?"var(--status-skip-text)":"var(--text-secondary)",backgroundColor:et?"var(--status-skip-bg)":"var(--bg-card)"},title:et?"Exit unlink mode":"Unlink lines",children:(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("path",{d:"M15 7h3a5 5 0 0 1 0 10h-3m-6 0H6a5 5 0 0 1 0-10h3"}),(0,s.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12",strokeDasharray:"3 3"})]})})]})]}),(0,s.jsxs)("div",{className:"absolute top-3 left-3 z-10 flex flex-col gap-1",children:[(0,s.jsx)("button",{onClick:C,disabled:!k,className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)] disabled:opacity-25",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},title:"Undo (Ctrl+Z)",children:(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[(0,s.jsx)("path",{d:"M3 5h5a3 3 0 0 1 0 6H6",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),(0,s.jsx)("path",{d:"M5.5 2.5L3 5l2.5 2.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}),(0,s.jsx)("button",{onClick:N,disabled:!w,className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)] disabled:opacity-25",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},title:"Redo (Ctrl+Shift+Z)",children:(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[(0,s.jsx)("path",{d:"M11 5H6a3 3 0 0 0 0 6h2",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),(0,s.jsx)("path",{d:"M8.5 2.5L11 5 8.5 7.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})})]}),Y&&(0,s.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 z-20 flex items-center gap-3 px-4 py-2 rounded-lg border",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--status-fail-text)",boxShadow:"var(--shadow-lg)",animation:"fadeInDown 200ms ease-out"},children:[(0,s.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-primary)"},children:"Select nodes to delete"}),(0,s.jsxs)("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},children:[V.size," selected"]}),(0,s.jsx)("button",{onClick:()=>{V.size>0&&$(!0)},disabled:0===V.size,className:"px-3 py-1 text-[11px] font-medium rounded transition-colors disabled:opacity-40",style:{backgroundColor:"var(--status-fail-text)",color:"white"},children:"Delete"}),(0,s.jsx)("button",{onClick:ey,className:"px-3 py-1 text-[11px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"})]}),et&&(0,s.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 z-20 flex items-center gap-3 px-4 py-2 rounded-lg border",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--status-skip-text)",boxShadow:"var(--shadow-lg)",animation:"fadeInDown 200ms ease-out"},children:[(0,s.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-primary)"},children:"Select lines to unlink"}),(0,s.jsxs)("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--status-skip-bg)",color:"var(--status-skip-text)"},children:[es.size," selected"]}),(0,s.jsx)("button",{onClick:ej,disabled:0===es.size,className:"px-3 py-1 text-[11px] font-medium rounded transition-colors disabled:opacity-40",style:{backgroundColor:"var(--status-skip-text)",color:"white"},children:"Unlink"}),(0,s.jsx)("button",{onClick:ev,className:"px-3 py-1 text-[11px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"})]}),Z&&(0,s.jsx)("div",{className:"fixed inset-0 z-[400] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:()=>$(!1),children:(0,s.jsxs)("div",{className:"w-full max-w-sm mx-4 p-5 rounded-xl border",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)"},onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("h3",{className:"text-sm font-semibold mb-2",style:{color:"var(--text-primary)"},children:["Delete ",Q?"node":"".concat(V.size," node").concat(V.size>1?"s":""),"?"]}),(0,s.jsxs)("p",{className:"text-xs mb-4",style:{color:"var(--text-tertiary)"},children:["This will permanently remove the ",Q?"node":"selected node".concat(V.size>1?"s":"")," and all their test cases. This action cannot be undone."]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{onClick:()=>$(!1),className:"flex-1 px-3 py-2 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,s.jsx)("button",{onClick:ew,className:"flex-1 px-3 py-2 text-xs font-medium rounded-lg transition-colors",style:{backgroundColor:"var(--status-fail-text)",color:"white"},children:"Delete"})]})]})}),o&&(0,s.jsxs)("div",{className:"absolute bottom-3 left-3 z-10 flex gap-2 text-[10px]",style:{color:"var(--text-tertiary)"},children:[(0,s.jsx)("span",{className:"px-1.5 py-0.5 rounded border",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},children:"Tab = add child"}),(0,s.jsx)("span",{className:"px-1.5 py-0.5 rounded border",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},children:"Enter = add sibling"}),(0,s.jsx)("span",{className:"px-1.5 py-0.5 rounded border",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},children:"Del = delete"})]}),(0,s.jsxs)("svg",{ref:eo,width:"100%",height:"100%",onMouseDown:ed,onMouseMove:ex,onMouseUp:eu,onClick:ep,onDoubleClick:em,style:{cursor:R||P?"grabbing":O?"crosshair":"default"},children:[(0,s.jsxs)("defs",{children:[(0,s.jsx)("marker",{id:"arrow-pass",markerWidth:"8",markerHeight:"8",refX:"8",refY:"4",orient:"auto",children:(0,s.jsx)("path",{d:"M0,0 L8,4 L0,8",fill:"var(--status-pass-text)"})}),(0,s.jsx)("marker",{id:"arrow-fail",markerWidth:"8",markerHeight:"8",refX:"8",refY:"4",orient:"auto",children:(0,s.jsx)("path",{d:"M0,0 L8,4 L0,8",fill:"var(--status-fail-text)"})}),(0,s.jsx)("marker",{id:"arrow-default",markerWidth:"8",markerHeight:"8",refX:"8",refY:"4",orient:"auto",children:(0,s.jsx)("path",{d:"M0,0 L8,4 L0,8",fill:"var(--text-tertiary)"})})]}),(0,s.jsxs)("g",{transform:"scale(".concat(E,") translate(").concat(D.x,", ").concat(D.y,")"),children:[t.map(e=>{let a;if(!e.parentId)return null;let o=S.get(e.parentId),l=S.get(e.id);if(!o||!l||r.some(t=>t.fromId===e.parentId&&t.toId===e.id||t.fromId===e.id&&t.toId===e.parentId))return null;let n=t.find(t=>t.id===e.parentId),i=(null==n?void 0:n.direction)==="vertical",c="tree-".concat(e.id),d=es.has(c);if(i){let e=o.y+40,t=l.y-40;a="M ".concat(o.x," ").concat(o.y+28," C ").concat(o.x," ").concat(e,", ").concat(l.x," ").concat(t,", ").concat(l.x," ").concat(l.y-21)}else{let e=o.x+60,t=l.x-60;a="M ".concat(o.x+70," ").concat(o.y," C ").concat(e," ").concat(o.y,", ").concat(t," ").concat(l.y,", ").concat(l.x-60," ").concat(l.y)}let x=(o.x+l.x)/2,u=(o.y+l.y)/2;return(0,s.jsxs)("g",{children:[(0,s.jsx)("path",{d:a,fill:"none",stroke:"transparent",strokeWidth:12,style:{cursor:"pointer"},onClick:()=>{et?eg(c):v(e.parentId,e.id,"pass")},onDoubleClick:t=>{t.stopPropagation(),et||m(e.id)}}),(0,s.jsx)("path",{d:a,fill:"none",stroke:et&&d?"var(--status-skip-text)":"var(--border-hover)",strokeWidth:et&&d?2.5:1.5,strokeDasharray:et&&d?"6 4":"none",style:{pointerEvents:"none",transition:"stroke 150ms, stroke-width 150ms"}}),et&&(0,s.jsxs)("g",{transform:"translate(".concat(x,", ").concat(u,")"),style:{pointerEvents:"none"},children:[(0,s.jsx)("rect",{x:-7,y:-7,width:14,height:14,rx:3,fill:d?"var(--status-skip-text)":"var(--bg-card)",stroke:d?"var(--status-skip-text)":"var(--border)",strokeWidth:1.5}),d&&(0,s.jsx)("path",{d:"M -4 0 L -1 3 L 4 -2",fill:"none",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]})]},"tree-edge-".concat(e.id))}),r.map(e=>{let r,a=S.get(e.fromId),o=S.get(e.toId);if(!a||!o)return null;let l="pass"===e.type,n="fail"===e.type;e.type;let i=l?"var(--status-pass-text)":n?"var(--status-fail-text)":"var(--text-tertiary)",c=(a.x+o.x)/2,d=(a.y+o.y)/2-12,x=es.has(e.id),u=t.find(t=>t.id===e.fromId);return r=(null==u?void 0:u.direction)==="vertical"?"M ".concat(a.x," ").concat(a.y," C ").concat(a.x," ").concat(a.y+80,", ").concat(o.x," ").concat(o.y-80,", ").concat(o.x," ").concat(o.y):"M ".concat(a.x," ").concat(a.y," C ").concat(a.x+80," ").concat(a.y,", ").concat(o.x-80," ").concat(o.y,", ").concat(o.x," ").concat(o.y),(0,s.jsxs)("g",{children:[(0,s.jsx)("path",{d:r,fill:"none",stroke:"transparent",strokeWidth:16,style:{cursor:"pointer"},onClick:()=>{et?eg(e.id):l?j(e.id,{type:"fail"}):n?j(e.id,{type:"default"}):j(e.id,{type:"pass"})},onMouseEnter:()=>H(e.id),onMouseLeave:()=>H(null)}),(0,s.jsx)("path",{d:r,fill:"none",stroke:et&&x?"var(--status-skip-text)":i,strokeWidth:et&&x||G===e.id?2.5:1.8,strokeDasharray:et&&x?"6 4":l?"none":n?"6 4":"3 3",markerEnd:et?void 0:l?"url(#arrow-pass)":n?"url(#arrow-fail)":"url(#arrow-default)",style:{transition:"stroke-width 150ms ease-out, stroke 150ms ease-out",pointerEvents:"none"}}),et&&(0,s.jsxs)("g",{transform:"translate(".concat(c,", ").concat(d,")"),style:{pointerEvents:"none"},children:[(0,s.jsx)("rect",{x:-7,y:-7,width:14,height:14,rx:3,fill:x?"var(--status-skip-text)":"var(--bg-card)",stroke:x?"var(--status-skip-text)":"var(--border)",strokeWidth:1.5}),x&&(0,s.jsx)("path",{d:"M -4 0 L -1 3 L 4 -2",fill:"none",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]}),!et&&G===e.id&&(0,s.jsxs)("g",{transform:"translate(".concat(c,", ").concat(d-12,")"),style:{pointerEvents:"none"},children:[(0,s.jsx)("rect",{x:-22,y:-7,width:44,height:14,rx:7,fill:l?"var(--status-pass-bg)":n?"var(--status-fail-bg)":"var(--bg-secondary)",stroke:l?"var(--status-pass-text)":n?"var(--status-fail-text)":"var(--border)",strokeWidth:.5}),(0,s.jsx)("text",{textAnchor:"middle",dominantBaseline:"central",style:{fill:i,fontSize:9,fontWeight:500},children:l?"Pass":n?"Fail":"Default"})]})]},e.id)}),O&&(0,s.jsx)("line",{x1:O.startX,y1:O.startY,x2:O.curX,y2:O.curY,stroke:"pass"===O.type?"var(--status-pass-text)":"var(--status-fail-text)",strokeWidth:2,strokeDasharray:"6 4",opacity:.6}),t.map(e=>{var r;let l=S.get(e.id);if(!l)return null;let x=function(e,t){let r=0,s=e;for(;s.parentId;){r++;let e=t.find(e=>e.id===s.parentId);if(!e)break;s=e}return r}(e,t);return(0,s.jsx)(c,{node:e,position:l,isSelected:e.id===o,testCases:null!=(r=a[e.id])?r:[],isDragged:(null==P?void 0:P.id)===e.id,edgeDragActive:null!==O,isEdgeDropTarget:_===e.id&&null!==O&&e.id!==O.fromId,deleteMode:Y,isDeleteChecked:V.has(e.id),onSelect:n,onAddChild:(e,t,r,s)=>{i(e,t,r,s)},onDelete:d,onUnlinkNode:m,onRename:b,onUpdateNode:y,onDragStart:ef,onEdgeStart:eb,onToggleDeleteCheck:ek,depth:x,svgRef:eo},e.id)})]})]}),z&&F&&(0,s.jsx)(f,{position:F,scale:E,pan:D,svgRef:eo,onSubmit:eh,onCancel:()=>W(!1)}),0===t.length&&!z&&(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,s.jsx)(p,{onClick:()=>{if(!eo.current){B({x:0,y:0}),W(!0);return}let e=eo.current.getBoundingClientRect();B({x:e.width/2/E-D.x,y:e.height/2/E-D.y}),W(!0)},rippleColor:"rgba(0,0,0,0.08)",className:"text-sm px-6 py-2.5",style:{color:"var(--text-tertiary)",borderColor:"var(--border)",borderRadius:"var(--radius-pill)",backgroundColor:"transparent"},children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,s.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,s.jsx)("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),"Create your first flow node"]})})}),t.length>0&&(0,s.jsx)(h,{nodes:t,positions:S,pan:D,scale:E})]})}function h(e){let{nodes:t,positions:r,pan:a,scale:o}=e,l=Array.from(r.values());if(0===l.length)return null;let n=Math.min(...l.map(e=>e.x)),i=Math.max(...l.map(e=>e.x)),c=Math.min(...l.map(e=>e.y)),d=Math.max(...l.map(e=>e.y)),x=i-n+80,u=d-c+80,p=Math.max(60,u/x*120),m=120/x,h=p/u;return(0,s.jsx)("div",{className:"absolute bottom-3 right-3 border z-10",style:{width:120,height:p,backgroundColor:"var(--bg-card)",borderColor:"var(--border)",borderRadius:"var(--radius-sm)",opacity:.85},children:(0,s.jsx)("svg",{width:120,height:p,children:t.map(e=>{let t=r.get(e.id);if(!t)return null;let a=(t.x-n+40)*m,o=(t.y-c+40)*h;return(0,s.jsx)("circle",{cx:a,cy:o,r:2.5,fill:"var(--accent)",opacity:.6},e.id)})})})}function f(e){let{position:t,scale:r,pan:a,svgRef:o,onSubmit:n,onCancel:i}=e,[c,d]=(0,l.useState)(""),x=(0,l.useRef)(null),u=(0,l.useRef)(null),p=(0,l.useCallback)(()=>{if(!o.current)return{left:"50%",top:"50%"};let e=o.current.getBoundingClientRect();return{left:(t.x+a.x)*r+e.left,top:(t.y+a.y)*r+e.top}},[t,r,a,o])(),m=144*r,h=48*r;return(0,l.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&(c.trim()?n(c):i())};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[c,n,i]),(0,s.jsxs)("div",{ref:u,className:"fixed z-50",style:{left:"".concat(p.left,"px"),top:"".concat(p.top,"px"),transform:"translate(-50%, 0)"},children:[(0,s.jsx)("div",{style:{width:2,height:20*r,margin:"0 auto",backgroundColor:"var(--border-hover)"}}),(0,s.jsx)("div",{style:{width:"".concat(m,"px"),height:"".concat(h,"px"),border:"1.5px dashed var(--accent)",borderRadius:4*r,backgroundColor:"var(--bg-card)",display:"flex",alignItems:"center",justifyContent:"center",padding:"".concat(4*r,"px")},children:(0,s.jsx)("input",{ref:x,autoFocus:!0,value:c,onChange:e=>d(e.target.value),onKeyDown:e=>{"Enter"===e.key&&c.trim()&&n(c),"Escape"===e.key&&i(),e.stopPropagation()},onBlur:()=>{c.trim()?n(c):i()},placeholder:"Name node...",className:"w-full h-full bg-transparent outline-none text-center text-xs",style:{color:"var(--text-primary)",fontFamily:"inherit"}})})]})}function b(e){return(0,s.jsxs)("div",{className:"flex flex-col h-full",children:[(0,s.jsxs)("div",{className:"px-4 py-2 border-b flex items-center gap-2",style:{borderColor:"var(--border)"},children:[(0,s.jsx)("span",{className:"text-xs font-medium uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"Flow Map"}),(0,s.jsxs)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:[e.nodes.length," node",1!==e.nodes.length?"s":""]}),(0,s.jsx)("div",{className:"flex-1"}),(0,s.jsx)("button",{onClick:e.onResetLayout,className:"px-2 py-1 text-[10px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",borderRadius:"var(--radius-sm)"},children:"Reset layout"})]}),(0,s.jsx)("div",{className:"flex-1 min-h-0",children:(0,s.jsx)(m,{nodes:e.nodes,edges:e.edges,testCases:e.testCases,selectedNodeId:e.selectedNodeId,onSelect:e.onSelect,onAddNode:e.onAddNode,onDeleteNode:e.onDeleteNode,onDeleteNodes:e.onDeleteNodes,onUnlinkNode:e.onUnlinkNode,onRenameNode:e.onRenameNode,onUpdateNode:e.onUpdateNode,onAddEdge:e.onAddEdge,onDeleteEdge:e.onDeleteEdge,onUpdateEdge:e.onUpdateEdge,canUndo:e.canUndo,canRedo:e.canRedo,onUndo:e.onUndo,onRedo:e.onRedo})})]})}p.displayName="RippleButton";var y=r(8566),v=r(5815);function g(e){let{value:t,className:r=""}=e,a=Math.max(0,Math.min(100,t));return(0,s.jsx)("div",{className:"h-2 w-full overflow-hidden ".concat(r),style:{backgroundColor:"var(--bg-secondary)",borderRadius:"var(--radius-pill)"},children:(0,s.jsx)("div",{className:"h-full transition-all duration-150 ease-out",style:{width:"".concat(a,"%"),backgroundColor:a>=80?"var(--status-pass-text)":a>=50?"var(--status-skip-text)":"var(--status-fail-text)",borderRadius:"var(--radius-pill)"}})})}function j(e){let{onAdd:t,nodeLabel:r}=e,[a,o]=(0,l.useState)(""),n=(0,l.useRef)(null);(0,l.useEffect)(()=>{var e;null==(e=n.current)||e.focus()},[r]);let i=()=>{a.trim()&&(t(a.trim()),o(""))};return(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{ref:n,value:a,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&i()},placeholder:'Add test case for "'.concat(r,'"...'),className:"flex-1 px-3 py-2 text-sm bg-transparent outline-none border transition-colors focus:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)",color:"var(--text-primary)"}}),(0,s.jsx)("button",{onClick:i,disabled:!a.trim(),className:"px-4 py-2 text-sm font-medium rounded-md transition-opacity hover:opacity-80 disabled:opacity-30",style:{backgroundColor:"var(--accent)",color:"var(--bg-primary)",borderRadius:"var(--radius-sm)"},children:"+ Add"})]})}let k={untested:{bg:"var(--status-untested-bg)",text:"var(--status-untested-text)",label:"Untested"},pass:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)",label:"Pass"},fail:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)",label:"Fail"},skip:{bg:"var(--status-skip-bg)",text:"var(--status-skip-text)",label:"Skip"}};function w(e){let{status:t,onCycle:r}=e,a=k[t];return(0,s.jsx)("button",{onClick:r,className:"px-2.5 py-0.5 text-xs font-medium rounded-full transition-opacity hover:opacity-80 whitespace-nowrap",style:{backgroundColor:a.bg,color:a.text,borderRadius:"var(--radius-pill)"},children:a.label})}let C=["untested","pass","fail","skip"];function N(e){let{tc:t,visibleCols:r,expandAll:a,selected:o,onToggleSelect:n,onUpdate:i,onDelete:c,onDragStart:d,onDragOver:x,onDrop:u}=e,[p,m]=(0,l.useState)(null),[h,f]=(0,l.useState)(""),[b,y]=(0,l.useState)(!1),[v,g]=(0,l.useState)(null),j=(0,l.useRef)(null);(0,l.useEffect)(()=>{p&&j.current&&j.current.focus()},[p]);let k=e=>{var r;f(null!=(r=t[e])?r:""),m(e)},N=()=>{p&&(i({[p]:h}),m(null))},S=()=>{let e=C.indexOf(t.status);i({status:C[(e+1)%C.length]})},L=e=>{if("Enter"===e.key&&"steps"!==p&&N(),"Escape"===e.key&&(m(null),f("")),"Tab"===e.key){e.preventDefault(),N();let t=r.filter(e=>"status"!==e.key&&"code"!==e.key).map(e=>e.key),s=t.indexOf(p),a=e.shiftKey?t[s-1]:t[s+1];a&&k(a)}},E=e=>{let r=t[e];return r&&r.length>40};return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("tr",{className:"group transition-colors",style:{backgroundColor:b?"var(--bg-secondary)":"transparent"},onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),draggable:!0,onDragStart:d,onDragOver:x,onDrop:u,children:[(0,s.jsx)("td",{className:"px-2 py-1.5 border-b",style:{borderColor:"var(--border)",width:28},children:(0,s.jsx)("input",{type:"checkbox",checked:o,onChange:n,className:"cursor-pointer accent-[var(--accent)]",style:{width:14,height:14}})}),r.map(e=>(0,s.jsx)("td",{className:"px-2 py-1.5 text-xs border-b",style:{borderColor:"var(--border)",color:"var(--text-primary)",maxWidth:"steps"===e.key||"expected"===e.key?300:void 0},children:"status"===e.key?(0,s.jsx)(w,{status:t.status,onCycle:S}):"code"===e.key?(0,s.jsx)("span",{className:"font-mono text-[10px]",style:{color:"var(--text-tertiary)"},children:t.code||"—"}):"case_type"===e.key?(0,s.jsx)(D,{value:t.case_type||"General",onChange:e=>i({case_type:e})}):p===e.key?"steps"===e.key?(0,s.jsx)("textarea",{ref:j,value:h,onChange:e=>f(e.target.value),onBlur:N,onKeyDown:L,className:"w-full bg-transparent outline-none border rounded p-1 text-xs resize-none",style:{borderColor:"var(--accent)",color:"var(--text-primary)",minHeight:60},rows:3}):(0,s.jsx)("input",{ref:j,value:h,onChange:e=>f(e.target.value),onBlur:N,onKeyDown:L,className:"w-full bg-transparent outline-none border-b text-xs",style:{borderColor:"var(--accent)",color:"var(--text-primary)"}}):"links"===e.key?(0,s.jsx)("div",{className:"flex items-center gap-1",children:t.links?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("a",{href:t.links,target:"_blank",rel:"noopener noreferrer",className:"text-[11px] underline hover:opacity-80 transition-opacity",style:{color:"var(--accent)"},onClick:e=>e.stopPropagation(),children:"Open Link"}),(0,s.jsx)("button",{onClick:e=>{e.stopPropagation(),i({links:""})},className:"text-[10px] opacity-0 group-hover:opacity-100 hover:opacity-100 transition-opacity px-0.5",style:{color:"var(--status-fail-text)"},title:"Clear link",children:"\xd7"})]}):(0,s.jsx)("span",{className:"cursor-text block text-[11px]",onClick:()=>k(e.key),style:{color:"var(--text-tertiary)"},children:"Add link..."})}):(0,s.jsx)("span",{className:"cursor-text block",onClick:()=>{E(e.key)&&(v===e.key?g(null):g(e.key))},onDoubleClick:()=>k(e.key),title:E(e.key)?v===e.key||a?"Click to collapse \xb7 Double-click to edit":"Click to expand \xb7 Double-click to edit":"Double-click to edit",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:v===e.key||a&&E(e.key)?"pre-wrap":"nowrap",display:"block",maxHeight:v===e.key||a&&E(e.key)?"none":"1.2em",lineHeight:"1.2em"},children:t[e.key]||(0,s.jsx)("span",{style:{color:"var(--text-tertiary)"},children:"—"})})},e.key)),(0,s.jsx)("td",{className:"px-1 py-1.5 border-b",style:{borderColor:"var(--border)"},children:b&&(0,s.jsx)("button",{onClick:c,className:"text-[10px] opacity-50 hover:opacity-100 transition-opacity px-0.5",style:{color:"var(--status-fail-text)"},children:"\xd7"})})]})})}let S={Positive:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)"},Negative:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)"},General:{bg:"var(--bg-secondary)",text:"var(--text-tertiary)"}};function D(e){let{value:t,onChange:r}=e,a=S[t]||S.General;return(0,s.jsx)("select",{value:t,onChange:e=>r(e.target.value),className:"text-[10px] font-medium px-2 py-0.5 rounded-full border-0 outline-none cursor-pointer",style:{backgroundColor:a.bg,color:a.text},children:y.D_.map(e=>(0,s.jsx)("option",{value:e,children:e},e))})}function L(e){let{testCases:t,columns:r,expandAll:a,selectedIds:o,onToggleSelect:l,onToggleSelectAll:n,sortKey:i,sortDirection:c,onSortChange:d,onUpdate:x,onDelete:u,onReorder:p}=e,m=r.filter(e=>e.visible),h=t.length>0&&t.every(e=>o.has(e.id)),f=t.some(e=>o.has(e.id)),b=e=>{e.preventDefault(),e.dataTransfer.dropEffect="move"};return 0===t.length?null:(0,s.jsx)("div",{className:"overflow-x-auto",style:{minWidth:0},children:(0,s.jsxs)("table",{className:"text-xs",style:{minWidth:"900px",width:"100%"},children:[(0,s.jsx)("thead",{className:"sticky top-0 z-10",style:{backgroundColor:"var(--bg-primary)"},children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"px-2 py-1.5 border-b",style:{borderColor:"var(--border)",width:28},children:(0,s.jsx)("input",{type:"checkbox",checked:h,ref:e=>{e&&(e.indeterminate=f&&!h)},onChange:n,className:"cursor-pointer accent-[var(--accent)]",style:{width:14,height:14}})}),m.map(e=>(0,s.jsx)("th",{className:"px-2 py-1.5 text-left text-[10px] font-medium uppercase tracking-wider border-b cursor-pointer select-none hover:bg-[var(--bg-secondary)] transition-colors",style:{color:"var(--text-tertiary)",borderColor:"var(--border)",whiteSpace:"nowrap"},onClick:()=>d(e.key),children:(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{children:e.label}),i===e.key&&(0,s.jsx)("span",{className:"text-[8px]",children:"asc"===c?"↑":"↓"})]})},e.key)),(0,s.jsx)("th",{className:"w-6 border-b",style:{borderColor:"var(--border)"}})]})}),(0,s.jsx)("tbody",{children:t.map(e=>(0,s.jsx)(N,{tc:e,visibleCols:m,expandAll:a,selected:o.has(e.id),onToggleSelect:()=>l(e.id),onUpdate:t=>x(e.id,t),onDelete:()=>u(e.id),onDragStart:t=>{var r;return r=e.id,void(t.dataTransfer.setData("text/plain",r),t.dataTransfer.effectAllowed="move")},onDragOver:b,onDrop:r=>((e,r)=>{e.preventDefault();let s=e.dataTransfer.getData("text/plain");if(s===r)return;let a=t.map(e=>e.id),o=a.indexOf(s),l=a.indexOf(r);if(-1===o||-1===l)return;let n=[...a];n.splice(o,1),n.splice(l,0,s),p(n)})(r,e.id)},e.id))})]})})}function E(e){let{stats:t}=e;return(0,s.jsxs)("div",{className:"flex items-center gap-4 px-4 py-2 text-xs border-t flex-wrap",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:[(0,s.jsxs)("span",{children:["Total: ",(0,s.jsx)("strong",{style:{color:"var(--text-primary)"},children:t.total})]}),(0,s.jsxs)("span",{children:["Pass: ",(0,s.jsx)("strong",{style:{color:"var(--status-pass-text)"},children:t.pass}),t.total>0&&" (".concat(t.passRate,"%)")]}),(0,s.jsxs)("span",{children:["Fail: ",(0,s.jsx)("strong",{style:{color:"var(--status-fail-text)"},children:t.fail})]}),(0,s.jsxs)("span",{children:["Skip: ",(0,s.jsx)("strong",{style:{color:"var(--status-skip-text)"},children:t.skip})]}),(0,s.jsxs)("span",{children:["Untested: ",(0,s.jsx)("strong",{style:{color:"var(--status-untested-text)"},children:t.untested})]})]})}var M=r(158);function R(e){let{open:t,onClose:r,node:a,testCases:o,columns:l}=e,n=l&&l.length>0?l:y._X;return t?(0,s.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:r,children:(0,s.jsxs)("div",{className:"w-full max-w-sm mx-4 rounded-xl p-5",style:{backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)",borderRadius:"var(--radius-lg)"},onClick:e=>e.stopPropagation(),children:[(0,s.jsx)("h3",{className:"text-sm font-semibold mb-1",style:{color:"var(--text-primary)"},children:"Export Test Cases"}),(0,s.jsxs)("p",{className:"text-xs mb-4",style:{color:"var(--text-tertiary)"},children:["Export “",a.label,"” (",o.length," case",1!==o.length?"s":"",")"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("button",{onClick:()=>{(0,M.k5)(a,o,n),r()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,s.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"Markdown (.md)"}),(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Formatted table for documentation"})]}),(0,s.jsxs)("button",{onClick:()=>{(0,M.hX)(a,o),r()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,s.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"JSON (.json)"}),(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Structured data backup"})]}),(0,s.jsxs)("button",{onClick:()=>{(0,M.Rz)(a,o,n),r()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,s.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"CSV (.csv)"}),(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Spreadsheet-compatible format"})]}),(0,s.jsxs)("button",{onClick:async()=>{await (0,M.G$)(a,o,n),r()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,s.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"Excel (.xlsx)"}),(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Styled spreadsheet for reporting"})]})]}),(0,s.jsx)("button",{onClick:r,className:"w-full mt-3 px-3 py-2 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"})]})}):null}var A=r(5653);async function I(e,t,r){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"google",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"en",l=arguments.length>6?arguments[6]:void 0,n=arguments.length>7?arguments[7]:void 0,i=await fetch("/api/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:e,prompt:t,apiKey:r,provider:s,model:a,language:o,baseURL:l,images:n})});if(!i.ok)throw Error((await i.json().catch(()=>({error:"Request failed"}))).error||"HTTP ".concat(i.status));return(await i.json()).testCases}A.Ik({title:A.Yj().describe("Short descriptive title of the test case"),steps:A.Yj().describe("Numbered test steps separated by newlines"),expected:A.Yj().describe("Expected result of the test")});var U=r(7669);async function P(e){var t;let r=URL.createObjectURL(e),s=document.createElement("video");s.muted=!0,s.preload="auto",s.crossOrigin="anonymous",await new Promise((e,t)=>{s.onloadedmetadata=()=>e(),s.onerror=()=>t(Error("Failed to load video")),s.src=r}),await s.play().catch(()=>{}),s.pause();let a=s.duration;if(!isFinite(a)||a<=0)throw URL.revokeObjectURL(r),Error("Could not determine video duration");let o=Math.min(a<=10?4:8,Math.ceil(a)),l=[];for(let e=0;e<o;e++){let t=.1+e/o*(a-.2);l.push(Math.min(t,a-.05))}let n=document.createElement("canvas"),i=n.getContext("2d"),c=[];for(let e of l){await function(e,t){return new Promise(r=>{let s=()=>{e.removeEventListener("seeked",s),requestAnimationFrame(()=>r())};e.addEventListener("seeked",s),e.currentTime=t})}(s,e);let t=function(e,t,r){let{videoWidth:s,videoHeight:a}=e,o=s>1280?1280/s:1;return t.width=Math.round(s*o),t.height=Math.round(a*o),r.drawImage(e,0,0,t.width,t.height),t.toDataURL("image/jpeg",.82)}(s,n,i);c.push(t)}return URL.revokeObjectURL(r),{frames:c,duration:a,thumbnail:null!=(t=c[0])?t:""}}let T=["User can log in with valid credentials","Invalid input shows validation error","Form submits successfully and redirects","Edge case: empty required fields"],z=["While you wait... have this cute cat!","Hang tight! Here's a furry friend.","Generating... enjoy this kitty!","Almost there! Cat says hi.","Test cases incoming... meow!"];function W(e){let{open:t,onClose:r,node:a,onGenerate:o}=e,{isConnected:n,activeProvider:i,activeProviderId:c}=(0,U.P)(),[d,x]=(0,l.useState)(""),[u,p]=(0,l.useState)(""),[m,h]=(0,l.useState)("en"),[f,b]=(0,l.useState)(!1),[y,v]=(0,l.useState)(!1),[g,j]=(0,l.useState)(null),[k,w]=(0,l.useState)([]),[C,N]=(0,l.useState)(""),[S,D]=(0,l.useState)(z[0]),[L,E]=(0,l.useState)(0),M=(0,l.useRef)(null),R=(0,l.useRef)(null),A=(0,l.useRef)(null),[W,F]=(0,l.useState)(!1),[B,O]=(0,l.useState)(!1),[X,G]=(0,l.useState)(null),[H,_]=(0,l.useState)([]),[K,Y]=(0,l.useState)(new Set),[q,V]=(0,l.useState)(!1),[J,Z]=(0,l.useState)(null),$=(0,l.useCallback)(async()=>{try{var e;let t=await fetch("https://api.thecatapi.com/v1/images/search?size=med"),r=await t.json();(null==r||null==(e=r[0])?void 0:e.url)&&N(r[0].url)}catch(e){N("")}D(z[Math.floor(Math.random()*z.length)])},[]);(0,l.useEffect)(()=>{t&&(x(a.label),p(""),j(null),v(!1),w([]),_([]),Y(new Set),V(!1),N(""),E(0))},[t,a.label]),(0,l.useEffect)(()=>{if(!y)return;$();let e=setInterval(()=>{E(e=>e+1),$()},2e3);return()=>clearInterval(e)},[y,$]);let Q=e=>new Promise((t,r)=>{if(!e.type.startsWith("image/"))return void r(Error("Not an image file"));if(e.size>5242880)return void r(Error("Image too large (max ".concat(5,"MB)")));let s=new FileReader;s.onload=()=>t(s.result),s.onerror=()=>r(Error("Failed to read file")),s.readAsDataURL(e)}),ee=(0,l.useCallback)(async e=>{if(!e.type.startsWith("video/"))return void j("Not a video file");if(e.size>0x3200000)return void j("Video too large (max ".concat(50,"MB)"));O(!0),G("Loading video...");try{let t=await P(e);if(t.duration>120){j("Video too long (".concat(Math.round(t.duration),"s). Max ").concat(120,"s.")),O(!1),G(null);return}G("Extracted ".concat(t.frames.length," frames. Select which to include...")),_(t.frames),Y(new Set(t.frames.map((e,t)=>t))),V(!0),j(null)}catch(e){j(e instanceof Error?e.message:"Failed to process video")}finally{O(!1),G(null)}},[]),et=(0,l.useCallback)(()=>{let e=5-k.length,t=H.filter((e,t)=>K.has(t)).slice(0,e);t.length>0&&w(e=>[...e,...t]),_([]),Y(new Set),V(!1)},[H,K,k.length]),er=(0,l.useCallback)(()=>{_([]),Y(new Set),V(!1)},[]),es=(0,l.useCallback)(e=>{Y(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.size<5&&r.add(e),r})},[]),ea=(0,l.useCallback)(()=>{Y(new Set(Array.from({length:Math.min(H.length,5)},(e,t)=>t)))},[H]),eo=(0,l.useCallback)(()=>{Y(new Set)},[]),el=(0,l.useCallback)(async e=>{let t=5-k.length;if(t<=0)return void j("Maximum ".concat(5," images/frames allowed"));let r=Array.from(e),s=r.filter(e=>e.type.startsWith("image/")),a=r.filter(e=>e.type.startsWith("video/")),o=s.slice(0,t),l=[];for(let e of o)try{let t=await Q(e);l.push(t)}catch(e){j(e instanceof Error?e.message:"Failed to load image")}l.length>0&&(w(e=>[...e,...l]),j(null)),a.length>0&&await ee(a[0])},[k.length,ee]),en=(0,l.useCallback)(e=>{w(t=>t.filter((t,r)=>r!==e))},[]);(0,l.useEffect)(()=>{if(!t)return;let e=e=>{var t;let r=null==(t=e.clipboardData)?void 0:t.items;if(!r)return;let s=[];for(let e of Array.from(r))if(e.type.startsWith("image/")){let t=e.getAsFile();t&&s.push(t)}s.length>0&&(e.preventDefault(),el(s))};return document.addEventListener("paste",e),()=>document.removeEventListener("paste",e)},[t,el]);let ei=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),F(!0)},[]),ec=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),F(!1)},[]),ed=(0,l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),F(!1),e.dataTransfer.files.length>0&&el(e.dataTransfer.files)},[el]);(0,l.useCallback)(async e=>{await ee(e)},[ee]);let ex=(0,l.useCallback)(e=>{e.target.files&&e.target.files.length>0&&(el(e.target.files),e.target.value="")},[el]),eu=async()=>{if(!n)return void j("Please configure an AI provider in Integrations first.");if(!u.trim()&&0===k.length)return void j("Please describe the feature, paste a ticket, or attach an image.");v(!0),j(null);try{let e=await I(d,u,i.apiKey,null!=c?c:void 0,i.defaultModel,m,i.baseURL||void 0,k.length>0?k:void 0);o(e),r()}catch(e){j(e instanceof Error?e.message:"Generation failed")}finally{v(!1)}};return t?(0,s.jsxs)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:r,children:[(0,s.jsxs)("div",{className:"flex rounded-xl overflow-hidden",style:{maxWidth:y?"720px":"512px",width:"100%",margin:"0 16px",backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)",transition:"max-width 400ms cubic-bezier(0.4, 0, 0.2, 1)"},onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"flex-1 min-w-0",style:{maxWidth:"512px"},children:[(0,s.jsxs)("div",{className:"px-5 pt-5 pb-4 border-b",style:{borderColor:"var(--border)"},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,s.jsx)("div",{className:"w-6 h-6 rounded-md flex items-center justify-center",style:{background:"linear-gradient(135deg, #8D6E63, #A1887F)"},children:(0,s.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,s.jsx)("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}),(0,s.jsx)("h3",{className:"text-sm font-semibold",style:{color:"var(--text-primary)"},children:"Generate Test Cases"})]}),(0,s.jsxs)("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:["Describe the feature and let AI generate test cases for “",a.label,"”"]})]}),(0,s.jsxs)("div",{className:"px-5 py-4 space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs font-medium block mb-1.5",style:{color:"var(--text-secondary)"},children:"Test Case Title"}),(0,s.jsx)("input",{value:d,onChange:e=>x(e.target.value),className:"w-full px-3 py-2 text-sm rounded-lg outline-none border transition-colors focus:border-[var(--accent)]",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},placeholder:"Feature name..."})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs font-medium block mb-1.5",style:{color:"var(--text-secondary)"},children:"Description / DoD / Ticket"}),(0,s.jsx)("textarea",{value:u,onChange:e=>p(e.target.value),rows:4,className:"w-full px-3 py-2 text-sm rounded-lg outline-none border resize-none transition-colors focus:border-[var(--accent)]",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},placeholder:"id"===m?"Jelaskan fitur, kriteria penerimaan, atau tempel tiket...":"Describe the feature, acceptance criteria, or paste a ticket..."}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5 mt-2",children:T.map(e=>(0,s.jsxs)("button",{onClick:()=>p(t=>t?"".concat(t,"\n").concat(e):e),className:"px-2 py-0.5 text-[10px] rounded-full border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:["+ ",e]},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"text-xs font-medium block mb-1.5",style:{color:"var(--text-secondary)"},children:["Screenshots & Videos ",(0,s.jsx)("span",{className:"font-normal",style:{color:"var(--text-tertiary)"},children:"(optional)"})]}),k.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mb-2",children:k.map((e,t)=>(0,s.jsxs)("div",{className:"relative group rounded-lg overflow-hidden border",style:{borderColor:"var(--border)",width:72,height:72},children:[(0,s.jsx)("img",{src:e,alt:"Screenshot ".concat(t+1),className:"w-full h-full object-cover"}),(0,s.jsx)("button",{onClick:()=>en(t),className:"absolute top-0.5 right-0.5 w-5 h-5 rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",style:{backgroundColor:"rgba(0,0,0,0.7)",color:"#fff"},title:"Remove",children:(0,s.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,s.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},t))}),(0,s.jsx)("div",{ref:A,onDragOver:ei,onDragLeave:ec,onDrop:ed,onClick:()=>{var e;return null==(e=M.current)?void 0:e.click()},className:"rounded-lg border-2 border-dashed cursor-pointer transition-colors",style:{borderColor:W?"var(--accent)":"var(--border)",backgroundColor:W?"var(--accent)08":"transparent",padding:k.length>0?"8px":"16px"},children:(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),(0,s.jsx)("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),(0,s.jsx)("polyline",{points:"21 15 16 10 5 21"})]}),(0,s.jsx)("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:k.length>0?"Add more (".concat(k.length,"/").concat(5,") \xb7 paste, drop, or click"):"Paste from clipboard, drop, or click to upload"})]})}),!q&&k.length<5&&(0,s.jsx)("div",{className:"mt-2",children:B?(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg",style:{backgroundColor:"var(--bg-secondary)"},children:[(0,s.jsx)("svg",{className:"animate-spin",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",children:(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"30 70"})}),(0,s.jsx)("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:X})]}):(0,s.jsxs)("button",{type:"button",onClick:e=>{var t;e.stopPropagation(),null==(t=R.current)||t.click()},className:"flex items-center gap-2 px-3 py-1.5 text-[11px] rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:[(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("polygon",{points:"23 7 16 12 23 17 23 7"}),(0,s.jsx)("rect",{x:"1",y:"5",width:"15",height:"14",rx:"2",ry:"2"})]}),"Upload video (extract key frames)"]})}),q&&H.length>0&&(0,s.jsxs)("div",{className:"mt-2 p-3 rounded-lg border",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsxs)("span",{className:"text-[11px] font-medium",style:{color:"var(--text-secondary)"},children:["Select frames ",(0,s.jsxs)("span",{style:{color:"var(--text-tertiary)"},children:["(",K.size,"/",5," max)"]})]}),(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)("button",{type:"button",onClick:ea,className:"text-[10px] px-1.5 py-0.5 rounded hover:bg-[var(--bg-card)]",style:{color:"var(--text-tertiary)"},children:"All"}),(0,s.jsx)("button",{type:"button",onClick:eo,className:"text-[10px] px-1.5 py-0.5 rounded hover:bg-[var(--bg-card)]",style:{color:"var(--text-tertiary)"},children:"None"})]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mb-3",children:H.map((e,t)=>(0,s.jsxs)("div",{className:"relative group rounded-md overflow-hidden border-2 transition-all cursor-pointer",style:{width:80,height:80,borderColor:K.has(t)?"var(--accent)":"var(--border)",opacity:K.has(t)?1:.5},children:[(0,s.jsx)("button",{type:"button",onClick:()=>es(t),className:"w-full h-full",children:(0,s.jsx)("img",{src:e,alt:"Frame ".concat(t+1),className:"w-full h-full object-cover"})}),(0,s.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),Z(e)},className:"absolute top-0.5 left-0.5 w-6 h-6 rounded flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",style:{backgroundColor:"rgba(0,0,0,0.7)",color:"#fff"},title:"Zoom",children:(0,s.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,s.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),(0,s.jsx)("line",{x1:"11",y1:"8",x2:"11",y2:"14"}),(0,s.jsx)("line",{x1:"8",y1:"11",x2:"14",y2:"11"})]})}),K.has(t)&&(0,s.jsx)("div",{className:"absolute top-0.5 right-0.5 w-5 h-5 rounded-full flex items-center justify-center",style:{backgroundColor:"var(--accent)",color:"#fff"},children:(0,s.jsx)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,s.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),(0,s.jsx)("span",{className:"absolute bottom-0 left-0 right-0 text-center text-[9px] py-0.5",style:{backgroundColor:"rgba(0,0,0,0.6)",color:"#fff"},children:t+1})]},t))}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:er,className:"flex-1 px-3 py-1.5 text-[11px] rounded-md border transition-colors hover:bg-[var(--bg-card)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,s.jsxs)("button",{type:"button",onClick:et,disabled:0===K.size,className:"flex-1 px-3 py-1.5 text-[11px] rounded-md transition-colors hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed",style:{backgroundColor:"var(--accent)",color:"#fff"},children:["Add ",K.size," frame",1!==K.size?"s":""]})]})]}),(0,s.jsx)("input",{ref:M,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:ex}),(0,s.jsx)("input",{ref:R,type:"file",accept:"video/*",className:"hidden",onChange:async e=>{var t;let r=null==(t=e.target.files)?void 0:t[0];r&&(await ee(r),e.target.value="")}})]}),g&&(0,s.jsx)("div",{className:"text-xs px-3 py-2 rounded-lg",style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},children:g}),!n&&(0,s.jsx)("div",{className:"text-xs px-3 py-2 rounded-lg",style:{backgroundColor:"var(--status-skip-bg)",color:"var(--status-skip-text)"},children:"No AI provider configured. Go to Integrations to set up."}),(0,s.jsxs)("div",{className:"rounded-lg border overflow-hidden",style:{borderColor:"var(--border)"},children:[(0,s.jsxs)("button",{onClick:()=>b(e=>!e),className:"w-full flex items-center justify-between px-3 py-2 transition-colors hover:bg-[var(--bg-secondary)]",children:[(0,s.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-secondary)"},children:"Language"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-[10px] font-mono font-semibold px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--bg-secondary)",color:"var(--text-tertiary)"},children:"en"===m?"EN":"ID"}),(0,s.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:f?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease-out"},children:(0,s.jsx)("polyline",{points:"6 9 12 15 18 9"})})]})]}),(0,s.jsx)("div",{style:{maxHeight:f?"80px":"0px",overflow:"hidden",transition:"max-height 200ms ease-out"},children:(0,s.jsx)("div",{className:"px-3 pb-2 pt-1",children:(0,s.jsxs)("select",{value:m,onChange:e=>{h(e.target.value),b(!1)},className:"w-full px-2.5 py-1.5 text-xs rounded-md border outline-none transition-colors cursor-pointer",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},children:[(0,s.jsx)("option",{value:"en",children:"English"}),(0,s.jsx)("option",{value:"id",children:"Bahasa Indonesia"})]})})})]})]}),(0,s.jsxs)("div",{className:"px-5 py-4 border-t flex gap-2",style:{borderColor:"var(--border)"},children:[(0,s.jsx)("button",{onClick:r,className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,s.jsx)("button",{onClick:eu,disabled:y||!n,className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg transition-all hover:opacity-90 active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed",style:{background:"linear-gradient(135deg, #8D6E63, #A1887F)",color:"#fff",boxShadow:"0 2px 8px rgba(141,110,99,0.3)"},children:y?(0,s.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,s.jsx)("svg",{className:"animate-spin",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"30 70"})}),"Generating..."]}):"Generate Test Cases"})]})]}),(0,s.jsx)("div",{className:"flex-shrink-0 overflow-hidden",style:{width:y?"280px":"0px",transition:"width 400ms cubic-bezier(0.4, 0, 0.2, 1)"},children:(0,s.jsxs)("div",{className:"w-[280px] h-full flex flex-col items-center justify-center p-5 border-l",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)",opacity:+!!y,transition:"opacity 300ms ease-out 100ms"},children:[(0,s.jsx)("div",{className:"w-full rounded-xl overflow-hidden mb-4 border",style:{borderColor:"var(--border)",height:180,backgroundColor:"var(--bg-card)"},children:C&&(0,s.jsx)("img",{src:C,alt:"Cute cat",width:280,height:180,className:"w-full h-full object-cover",style:{animation:"fadeIn 800ms ease-out"},onError:e=>{e.target.style.display="none"}},L)}),(0,s.jsx)("p",{className:"text-xs text-center mb-3",style:{color:"var(--text-secondary)",animation:"fadeIn 800ms ease-out"},children:S}),(0,s.jsx)("button",{onClick:$,className:"px-3 py-1.5 text-[10px] rounded-full border transition-colors hover:bg-[var(--bg-card)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:"New cat"})]})})]}),J&&(0,s.jsx)("div",{className:"fixed inset-0 z-[400] flex items-center justify-center p-8",style:{backgroundColor:"rgba(0,0,0,0.85)",animation:"fadeIn 150ms ease-out"},onClick:e=>{e.stopPropagation(),Z(null)},children:(0,s.jsxs)("div",{className:"relative max-w-4xl max-h-full",onClick:e=>e.stopPropagation(),children:[(0,s.jsx)("img",{src:J,alt:"Frame preview",className:"max-w-full max-h-[80vh] object-contain rounded-lg",style:{boxShadow:"0 8px 32px rgba(0,0,0,0.5)"}}),(0,s.jsx)("button",{onClick:()=>Z(null),className:"absolute -top-2 -right-2 w-8 h-8 rounded-full flex items-center justify-center transition-colors hover:opacity-80",style:{backgroundColor:"var(--bg-card)",color:"var(--text-primary)",boxShadow:"var(--shadow-lg)"},children:(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,s.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})]}):null}let F={pass:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)"},fail:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)"},skip:{bg:"var(--status-skip-bg)",text:"var(--status-skip-text)"},untested:{bg:"var(--status-untested-bg)",text:"var(--status-untested-text)"}};function B(e){let{open:t,onClose:r,node:a,testCases:l,stats:n}=e;return t?(0,s.jsxs)("div",{style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:r,className:"jsx-540c0278eef48442 fixed inset-0 z-[300] flex items-center justify-center",children:[(0,s.jsxs)("div",{style:{backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)",borderRadius:"var(--radius-lg)",animation:"fadeInUp 200ms ease-out"},onClick:e=>e.stopPropagation(),className:"jsx-540c0278eef48442 w-full max-w-lg mx-4 rounded-xl overflow-hidden",children:[(0,s.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-540c0278eef48442 px-5 pt-5 pb-4 border-b",children:[(0,s.jsxs)("div",{className:"jsx-540c0278eef48442 flex items-center justify-between mb-2",children:[(0,s.jsxs)("div",{className:"jsx-540c0278eef48442 flex items-center gap-2",children:[a.code&&(0,s.jsx)("span",{style:{backgroundColor:"var(--bg-secondary)",color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[10px] font-mono px-1.5 py-0.5 rounded",children:a.code}),(0,s.jsx)("h3",{style:{color:"var(--text-primary)"},className:"jsx-540c0278eef48442 text-sm font-semibold",children:a.label})]}),(0,s.jsx)("button",{onClick:r,style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[10px] opacity-50 hover:opacity-100",children:"\xd7"})]}),a.notes&&(0,s.jsx)("p",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-xs",children:a.notes})]}),(0,s.jsxs)("div",{className:"jsx-540c0278eef48442 grid grid-cols-4 gap-3 p-5",children:[(0,s.jsx)(O,{label:"Total",value:n.total}),(0,s.jsx)(O,{label:"Pass",value:n.pass,color:"var(--status-pass-text)"}),(0,s.jsx)(O,{label:"Fail",value:n.fail,color:"var(--status-fail-text)"}),(0,s.jsx)(O,{label:"Untested",value:n.untested,color:"var(--status-untested-text)"})]}),(0,s.jsxs)("div",{className:"jsx-540c0278eef48442 px-5 pb-4",children:[(0,s.jsxs)("div",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 flex items-center justify-between text-[10px] mb-1.5",children:[(0,s.jsx)("span",{className:"jsx-540c0278eef48442",children:"Pass Rate"}),(0,s.jsxs)("span",{style:{color:n.passRate>=80?"var(--status-pass-text)":n.passRate>=50?"var(--status-skip-text)":"var(--status-fail-text)",fontWeight:600},className:"jsx-540c0278eef48442",children:[n.passRate,"%"]})]}),(0,s.jsx)("div",{style:{backgroundColor:"var(--bg-secondary)"},className:"jsx-540c0278eef48442 h-2 w-full rounded-full overflow-hidden",children:(0,s.jsx)("div",{style:{width:"".concat(n.passRate,"%"),backgroundColor:n.passRate>=80?"var(--status-pass-text)":n.passRate>=50?"var(--status-skip-text)":"var(--status-fail-text)"},className:"jsx-540c0278eef48442 h-full rounded-full transition-all duration-500"})})]}),l.length>0&&(0,s.jsxs)("div",{className:"jsx-540c0278eef48442 px-5 pb-4",children:[(0,s.jsx)("h4",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[10px] font-semibold uppercase tracking-wider mb-2",children:"Test Cases"}),(0,s.jsx)("div",{className:"jsx-540c0278eef48442 space-y-1.5 max-h-48 overflow-y-auto",children:l.map(e=>{let t=F[e.status]||F.untested;return(0,s.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-540c0278eef48442 flex items-center gap-2 px-3 py-2 rounded-lg border",children:[(0,s.jsx)("span",{style:{backgroundColor:t.bg,color:t.text},className:"jsx-540c0278eef48442 text-[9px] font-mono px-1.5 py-0.5 rounded-full flex-shrink-0",children:e.status}),(0,s.jsx)("span",{style:{color:"var(--text-primary)"},className:"jsx-540c0278eef48442 text-[11px] flex-1 truncate",children:e.title}),e.code&&(0,s.jsx)("span",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[9px] font-mono flex-shrink-0",children:e.code})]},e.id)})})]}),0===l.length&&(0,s.jsx)("div",{className:"jsx-540c0278eef48442 px-5 pb-5 text-center",children:(0,s.jsx)("p",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-xs",children:"No test cases for this node yet."})}),(0,s.jsx)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},className:"jsx-540c0278eef48442 px-5 py-3 border-t",children:(0,s.jsx)("button",{onClick:r,style:{borderColor:"var(--border)",color:"var(--text-secondary)"},className:"jsx-540c0278eef48442 w-full px-3 py-2 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-card)]",children:"Close"})})]}),(0,s.jsx)(o(),{id:"540c0278eef48442",children:"@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeInUp{from{opacity:0;transform:translatey(12px)}to{opacity:1;transform:translatey(0)}}"})]}):null}function O(e){let{label:t,value:r,color:a}=e;return(0,s.jsxs)("div",{className:"text-center p-2 rounded-lg border",style:{borderColor:"var(--border)"},children:[(0,s.jsx)("div",{className:"text-[10px] mb-0.5",style:{color:"var(--text-tertiary)"},children:t}),(0,s.jsx)("div",{className:"text-lg font-semibold",style:{color:null!=a?a:"var(--text-primary)"},children:r})]})}function X(e){let t=[],r="",s=!1;for(let a=0;a<e.length;a++){let o=e[a];s?'"'===o?a+1<e.length&&'"'===e[a+1]?(r+='"',a++):s=!1:r+=o:'"'===o?s=!0:","===o?(t.push(r),r=""):r+=o}return t.push(r),t}function G(e){let{open:t,onClose:r,onImport:a,nodeLabel:o}=e,[n,i]=(0,l.useState)("csv"),[c,d]=(0,l.useState)(null),[x,u]=(0,l.useState)(null),[p,m]=(0,l.useState)(!1),h=(0,l.useRef)(null),f=()=>{d(null),u(null),m(!1)},b=(0,l.useCallback)(e=>{d(null),u(null);let t=new FileReader;t.onload=()=>{try{let r=t.result,s=e.name.endsWith(".json")||"application/json"===e.type?function(e){let t=JSON.parse(e),r=Array.isArray(t)?t:t.testCases||t.test_cases||t.cases;if(!Array.isArray(r))throw Error('JSON must be an array of test cases, or an object with a "testCases" array');let s=[];for(let e of r){if("string"==typeof e){e.trim()&&s.push({title:e.trim(),steps:"",expected:""});continue}if("object"!=typeof e||!e)continue;let t=e.title||e.name||e.testCase||e["test case"]||"";t&&"string"==typeof t&&s.push({title:t.trim(),steps:String(e.steps||e.instructions||"").trim(),expected:String(e.expected||e["expected result"]||e.result||"").trim()})}if(0===s.length)throw Error("No valid test cases found in JSON");return s}(r):function(e){let t=e.split("\n").map(e=>e.trim()).filter(e=>e.length>0);if(t.length<2)throw Error("CSV must have a header row and at least one data row");let r=X(t[0]).map(e=>e.toLowerCase().trim()),s=r.findIndex(e=>"title"===e||"test case"===e||"testcase"===e||"name"===e||"test case title"===e),a=r.findIndex(e=>"steps"===e||"test steps"===e||"step"===e||"instructions"===e),o=r.findIndex(e=>"expected"===e||"expected result"===e||"expected results"===e||"result"===e);if(-1===s)throw Error('Could not find a "title" or "test case" column in the CSV header');let l=[];for(let e=1;e<t.length;e++){let r=X(t[e]),n=(r[s]||"").trim();n&&l.push({title:n,steps:a>=0?(r[a]||"").trim():"",expected:o>=0?(r[o]||"").trim():""})}if(0===l.length)throw Error("No valid test cases found in CSV");return l}(r);u(s)}catch(e){d(e instanceof Error?e.message:"Failed to parse file")}},t.onerror=()=>d("Failed to read file"),t.readAsText(e)},[]);return t?(0,s.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:()=>{f(),r()},children:(0,s.jsxs)("div",{className:"w-full max-w-lg mx-4 rounded-xl overflow-hidden",style:{backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)"},onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"px-5 pt-5 pb-4 border-b",style:{borderColor:"var(--border)"},children:[(0,s.jsx)("h3",{className:"text-sm font-semibold mb-1",style:{color:"var(--text-primary)"},children:"Import Test Cases"}),(0,s.jsxs)("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:["Import test cases into “",o,"” from CSV or JSON"]})]}),(0,s.jsxs)("div",{className:"px-5 py-4 space-y-4",children:[(0,s.jsxs)("div",{className:"text-[11px] rounded-lg px-3 py-2",style:{backgroundColor:"var(--bg-secondary)",color:"var(--text-tertiary)"},children:[(0,s.jsx)("p",{className:"font-medium mb-1",style:{color:"var(--text-secondary)"},children:"Supported formats:"}),(0,s.jsxs)("ul",{className:"space-y-0.5 ml-3",children:[(0,s.jsxs)("li",{children:[(0,s.jsx)("strong",{children:"CSV:"})," Header row with columns: title, steps, expected (or similar names)"]}),(0,s.jsxs)("li",{children:[(0,s.jsx)("strong",{children:"JSON:"}),' Array of objects with "title", "steps", "expected" fields']})]})]}),(0,s.jsx)("div",{onDragOver:e=>{e.preventDefault(),m(!0)},onDragLeave:()=>m(!1),onDrop:e=>{e.preventDefault(),m(!1);let t=e.dataTransfer.files[0];t&&b(t)},onClick:()=>{var e;return null==(e=h.current)?void 0:e.click()},className:"border-2 border-dashed rounded-lg cursor-pointer transition-colors py-8",style:{borderColor:p?"var(--accent)":"var(--border)",backgroundColor:p?"var(--accent)08":"transparent"},children:(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,s.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"}),(0,s.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,s.jsx)("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),(0,s.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Drop a .csv or .json file here, or click to browse"})]})}),(0,s.jsx)("input",{ref:h,type:"file",accept:".csv,.json",className:"hidden",onChange:e=>{var t;let r=null==(t=e.target.files)?void 0:t[0];r&&b(r),e.target.value=""}}),c&&(0,s.jsx)("div",{className:"text-xs px-3 py-2 rounded-lg",style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},children:c}),x&&x.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsxs)("span",{className:"text-xs font-medium",style:{color:"var(--text-secondary)"},children:["Preview (",x.length," test case",1!==x.length?"s":"",")"]}),(0,s.jsx)("button",{onClick:()=>u(null),className:"text-[10px] px-1.5 py-0.5 rounded border hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:"Clear"})]}),(0,s.jsxs)("div",{className:"max-h-[200px] overflow-auto rounded-lg border",style:{borderColor:"var(--border)"},children:[(0,s.jsxs)("table",{className:"text-[11px] w-full",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{style:{backgroundColor:"var(--bg-secondary)"},children:[(0,s.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"#"}),(0,s.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"Title"}),(0,s.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"Steps"}),(0,s.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"Expected"})]})}),(0,s.jsx)("tbody",{children:x.slice(0,20).map((e,t)=>(0,s.jsxs)("tr",{className:"border-t",style:{borderColor:"var(--border)"},children:[(0,s.jsx)("td",{className:"px-2 py-1",style:{color:"var(--text-tertiary)"},children:t+1}),(0,s.jsx)("td",{className:"px-2 py-1",style:{color:"var(--text-primary)"},children:e.title}),(0,s.jsx)("td",{className:"px-2 py-1 max-w-[120px] truncate",style:{color:"var(--text-secondary)"},children:e.steps||"—"}),(0,s.jsx)("td",{className:"px-2 py-1 max-w-[120px] truncate",style:{color:"var(--text-secondary)"},children:e.expected||"—"})]},t))})]}),x.length>20&&(0,s.jsxs)("div",{className:"px-2 py-1 text-[10px] border-t",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:["...and ",x.length-20," more"]})]})]})]}),(0,s.jsxs)("div",{className:"px-5 py-4 border-t flex gap-2",style:{borderColor:"var(--border)"},children:[(0,s.jsx)("button",{onClick:()=>{f(),r()},className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,s.jsxs)("button",{onClick:()=>{x&&0!==x.length&&(a(x),f(),r())},disabled:!x||0===x.length,className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg transition-all hover:opacity-90 active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed",style:{background:"linear-gradient(135deg, #8D6E63, #A1887F)",color:"#fff"},children:["Import ",x?"(".concat(x.length,")"):""]})]})]})}):null}function H(e){var t;let{testCases:r,projectId:a,onClose:o}=e,{e2e:n,testCases:c}=(0,i.M)(),[d,x]=(0,l.useState)(n.config.baseUrl),[u,p]=(0,l.useState)(n.config.browser),[m,h]=(0,l.useState)(n.config.headless),[f,b]=(0,l.useState)(n.config.timeout),[y,v]=(0,l.useState)("runner"),[g,j]=(0,l.useState)(!1),[k,w]=(0,l.useState)(!1),[C,N]=(0,l.useState)([]),[S,D]=(0,l.useState)(null),[L,E]=(0,l.useState)([]),[M,R]=(0,l.useState)([]),[A,I]=(0,l.useState)(null),[U,P]=(0,l.useState)(!0),[T,z]=(0,l.useState)(22),[W,F]=(0,l.useState)(!0),B=(0,l.useRef)(!1),O=(0,l.useRef)(null),[X,G]=(0,l.useState)(""),[H,_]=(0,l.useState)(!1),[K,Y]=(0,l.useState)({}),[q,V]=(0,l.useState)(null),[J,Z]=(0,l.useState)(""),[$,Q]=(0,l.useState)(null),[ee,et]=(0,l.useState)(null),er=(0,l.useRef)(null),es=(0,l.useRef)(null),[ea,eo]=(0,l.useState)(new Set(r.map(e=>e.id)));(0,l.useEffect)(()=>{let e=()=>{window.innerWidth<768?(F(!1),P(!1)):(F(!0),P(!0))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let el=(0,l.useCallback)(e=>{e.preventDefault(),B.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none";let t=e=>{if(!B.current||!O.current)return;let t=O.current.getBoundingClientRect(),r=e.clientX;z(Math.min(Math.max((t.right-r)/t.width*100,15),50))},r=()=>{B.current=!1,document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",t),document.addEventListener("mouseup",r)},[]);(0,l.useEffect)(()=>{let e={};for(let t of r){let r=n.getScript(t.id);r&&(e[t.id]=r.script)}Y(e)},[r,n]),(0,l.useEffect)(()=>{let e=window.setTimeout(()=>{n.saveConfig({baseUrl:d,browser:u,headless:m,timeout:f})},500);return()=>window.clearTimeout(e)},[d,u,m,f,n]);let en=(0,l.useCallback)((e,t)=>{E(r=>[...r,{time:new Date,type:e,message:t}]),window.setTimeout(()=>{var e;null==(e=es.current)||e.scrollIntoView({behavior:"smooth"})},50)},[]),ei=(0,l.useCallback)(e=>{eo(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[]),ec=(0,l.useCallback)(()=>{ea.size===r.length?eo(new Set):eo(new Set(r.map(e=>e.id)))},[r,ea]),ed=(0,l.useCallback)(()=>{var e;let t=localStorage.getItem("qa-llm-config");if(!t)return null;let r=JSON.parse(t),s=r.activeProvider;if(!s||!(null==(e=r.providers)?void 0:e[s]))return null;let a=r.providers[s];return a.apiKey&&a.connected?{provider:s,model:a.defaultModel,apiKey:a.apiKey,baseURL:a.baseURL}:null},[]),ex=(0,l.useCallback)(async()=>{let e=ed();if(!e)return void en("error","Please configure LLM in Integrations page first");w(!0),en("info","Generating test scripts...");try{let t=await fetch("/api/e2e",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCases:r.filter(e=>ea.has(e.id)),baseUrl:d,llmConfig:e,generateOnly:!0})});if(!t.ok)return void en("error","Failed to generate scripts");let s=await t.json();for(let[e,t]of(Y(e=>({...e,...s.scripts})),Object.entries(s.scripts))){let s=r.find(t=>t.id===e);s&&n.saveScript(e,s.title,s.code,t)}en("success","Generated ".concat(Object.keys(s.scripts).length," test script(s)")),v("scripts")}catch(e){en("error","Error: ".concat(e instanceof Error?e.message:String(e)))}finally{w(!1)}},[r,ea,d,ed,en,n]),eu=(0,l.useCallback)(async()=>{let e=r.filter(e=>ea.has(e.id));if(0===e.length)return;let t=ed();if(!t)return void en("error","Please configure LLM in Integrations page first");j(!0),N([]),E([]),R([]),I(null),G(""),_(!1);let s=new AbortController;er.current=s,en("info","Starting E2E test run with ".concat(e.length," test(s)...")),en("info","Target: ".concat(d)),en("info","Browser: ".concat(u," | Headless: ").concat(m));try{var o,l;let r=await fetch("/api/e2e",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCases:e,baseUrl:d,browser:u,headless:m,timeout:f,llmConfig:t}),signal:s.signal});if(!r.ok){let e=await r.json();en("error",e.error||"Failed to run tests"),j(!1);return}let i=null==(o=r.body)?void 0:o.getReader(),c=new TextDecoder,x="",p=[];if(i)for(;;){let{done:e,value:t}=await i.read();if(e)break;let r=(x+=c.decode(t,{stream:!0})).split("\n");for(let e of(x=r.pop()||"",r))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));switch(t.type){case"status":en("info",t.message);break;case"testStart":D({index:t.index,title:t.title}),en("info","\n━━━ Test ".concat(t.index,"/").concat(t.total,": ").concat(t.code," - ").concat(t.title," ━━━")),t.script&&Y(e=>({...e,[t.testCaseId]:t.script}));break;case"step":en("info"," → ".concat(t.message));break;case"aiThinking":en("ai"," \uD83E\uDD16 ".concat(t.message));break;case"aiAction":en("ai"," \uD83C\uDFAF ".concat(t.message));break;case"screenshot":I(t.image),R(e=>[...e,{image:t.image,label:t.label,timestamp:new Date}]);break;case"stepResult":en("pass"===t.status?"success":"error"," ".concat("pass"===t.status?"✓":"✗"," ").concat(t.message));break;case"healing":en("healing"," \uD83D\uDD27 ".concat(t.message));break;case"healingAction":en("healing"," \uD83D\uDC8A ".concat(t.message));break;case"healed":en("success"," ✨ ".concat(t.message));break;case"aiAnalysis":en("ai"," \uD83D\uDCCA AI Analysis:\n".concat(t.message));break;case"error":en("error"," ⚠ ".concat(t.message));break;case"healingReport":G(t.report),t.report&&!t.report.includes("All tests passed")&&_(!0);break;case"testComplete":en("pass"===t.status?"success":"error","\n ".concat("pass"===t.status?"✓":"✗"," Test ").concat(t.index," completed: ").concat(t.status.toUpperCase()," (").concat(t.duration,"ms)")),t.script&&(Y(e=>({...e,[t.testCaseId]:t.script})),n.saveScript(t.testCaseId,(null==(l=t.result)?void 0:l.testCaseTitle)||"","",t.script)),p.push(t.result),N([...p]);break;case"complete":en("success","\n═══════════════════════════════════════");let r=t.results.filter(e=>"pass"===e.status).length,s=t.results.filter(e=>"fail"===e.status||"error"===e.status).length;en("success","Test run complete: ".concat(r," passed, ").concat(s," failed")),n.saveRun({projectId:a,config:{baseUrl:d,browser:u,headless:m,timeout:f},results:t.results,totalPassed:r,totalFailed:s,totalDuration:t.results.reduce((e,t)=>e+t.duration,0),healingReport:X||void 0});break;case"aborted":en("warning","\n━━━ Test run stopped by user ━━━")}}catch(e){}}}catch(e){e instanceof Error&&"AbortError"===e.name?en("warning","\n━━━ Test run stopped by user ━━━"):en("error","Error: ".concat(e instanceof Error?e.message:String(e)))}j(!1),D(null),er.current=null},[r,ea,d,u,m,f,en,ed,a,n,X]),ep=(0,l.useCallback)(()=>{er.current&&(en("warning","Stopping test run..."),er.current.abort())},[en]),em=(0,l.useCallback)(()=>{if(!q||!J)return;let e=r.find(e=>e.id===q);e&&(n.saveScript(e.id,e.title,e.code,J),Y(t=>({...t,[e.id]:J})),en("success","Script saved for ".concat(e.code))),V(null),Z("")},[q,J,r,n,en]);return(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-2 md:p-4",style:{backgroundColor:"rgba(0,0,0,0.5)"},children:[(0,s.jsxs)("div",{className:"w-full max-w-6xl max-h-[95vh] md:max-h-[92vh] rounded-lg shadow-xl flex flex-col",style:{backgroundColor:"var(--bg-primary)",border:"1px solid var(--border)"},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-3 md:p-4 border-b shrink-0",style:{borderColor:"var(--border)"},children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("h2",{className:"text-base md:text-lg font-semibold truncate",style:{color:"var(--text-primary)"},children:"E2E Agentic Test Runner"}),(0,s.jsx)("p",{className:"text-xs mt-0.5 hidden sm:block",style:{color:"var(--text-tertiary)"},children:"AI-powered testing with script generation & live preview"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 ml-2",children:["runner"===y&&(0,s.jsx)("button",{onClick:()=>F(!W),className:"md:hidden p-1.5 rounded",style:{backgroundColor:W?"var(--accent)":"var(--bg-secondary)",color:W?"white":"var(--text-secondary)"},title:"Toggle config panel",children:"☰"}),(0,s.jsx)("button",{onClick:o,className:"p-1 rounded hover:opacity-80",style:{color:"var(--text-tertiary)"},children:"✕"})]})]}),(0,s.jsx)("div",{className:"flex border-b overflow-x-auto shrink-0",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:[{id:"runner",label:"Runner",icon:"▶"},{id:"scripts",label:"Scripts",icon:"{ }"},{id:"history",label:"History",icon:"\uD83D\uDCCB"}].map(e=>(0,s.jsxs)("button",{onClick:()=>v(e.id),className:"px-3 md:px-4 py-2 text-xs flex items-center gap-1.5 transition-colors whitespace-nowrap",style:{backgroundColor:y===e.id?"var(--bg-secondary)":"transparent",color:y===e.id?"var(--accent)":"var(--text-tertiary)",borderBottom:y===e.id?"2px solid var(--accent)":"2px solid transparent"},children:[(0,s.jsx)("span",{children:e.icon}),e.label]},e.id))}),"runner"===y&&(0,s.jsxs)("div",{className:"flex-1 overflow-hidden flex flex-col md:flex-row",children:[(0,s.jsx)("div",{className:"".concat(W?"max-h-[35vh] md:max-h-none":"max-h-0 md:max-h-none"," md:flex-[0_0_28%] border-b md:border-b-0 md:border-r overflow-auto transition-all duration-200 shrink-0"),style:{borderColor:"var(--border)"},children:(0,s.jsxs)("div",{className:"p-3 md:p-4 space-y-3 md:space-y-4",children:[(0,s.jsxs)("div",{className:"p-3 rounded-lg space-y-3",style:{backgroundColor:"var(--bg-secondary)",border:"1px solid var(--border)"},children:[(0,s.jsx)("h3",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:"Configuration"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs block mb-1",style:{color:"var(--text-tertiary)"},children:"Target URL"}),(0,s.jsx)("input",{type:"url",value:d,onChange:e=>x(e.target.value),disabled:g,className:"w-full text-sm px-2 py-1.5 rounded disabled:opacity-50",style:{backgroundColor:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-primary)"},placeholder:"http://localhost:3000"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs block mb-1",style:{color:"var(--text-tertiary)"},children:"Browser"}),(0,s.jsxs)("select",{value:u,onChange:e=>p(e.target.value),disabled:g,className:"w-full text-sm px-2 py-1.5 rounded disabled:opacity-50",style:{backgroundColor:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-primary)"},children:[(0,s.jsx)("option",{value:"chromium",children:"Chromium"}),(0,s.jsx)("option",{value:"firefox",children:"Firefox"}),(0,s.jsx)("option",{value:"webkit",children:"WebKit"}),(0,s.jsx)("option",{value:"edge",children:"Edge"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs block mb-1",style:{color:"var(--text-tertiary)"},children:"Timeout (ms)"}),(0,s.jsx)("input",{type:"number",value:f,onChange:e=>b(Number(e.target.value)),disabled:g,className:"w-full text-sm px-2 py-1.5 rounded disabled:opacity-50",style:{backgroundColor:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-primary)"}})]})]}),(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",checked:m,onChange:e=>h(e.target.checked),disabled:g,className:"accent-[var(--accent)]"}),(0,s.jsx)("span",{style:{color:"var(--text-secondary)"},children:"Run headless"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsxs)("h3",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:["Test Cases (",ea.size,"/",r.length,")"]}),(0,s.jsx)("button",{onClick:ec,disabled:g,className:"text-xs underline disabled:opacity-50",style:{color:"var(--accent)"},children:ea.size===r.length?"Deselect All":"Select All"})]}),(0,s.jsx)("div",{className:"max-h-[150px] md:max-h-[200px] overflow-auto rounded-lg",style:{border:"1px solid var(--border)"},children:r.map(e=>{let t=C.find(t=>t.testCaseId===e.id);return(0,s.jsxs)("label",{className:"flex items-center gap-2 px-3 py-2 text-xs border-b last:border-b-0 hover:opacity-80 cursor-pointer",style:{borderColor:"var(--border)",backgroundColor:ea.has(e.id)?"var(--bg-secondary)":"transparent"},children:[(0,s.jsx)("input",{type:"checkbox",checked:ea.has(e.id),onChange:()=>ei(e.id),disabled:g,className:"accent-[var(--accent)]"}),(0,s.jsx)("span",{className:"flex-1 truncate",style:{color:"var(--text-primary)"},children:e.code}),t&&(0,s.jsx)("span",{style:{color:"pass"===t.status?"var(--status-pass-text)":"var(--status-fail-text)"},children:"pass"===t.status?"✓":"✗"})]},e.id)})})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("button",{onClick:ex,disabled:g||k||0===ea.size,className:"w-full px-3 py-2 text-xs rounded flex items-center justify-center gap-2 disabled:opacity-50",style:{border:"1px solid var(--border)",color:"var(--text-secondary)"},children:k?"⏳ Generating...":"{ } Generate Scripts"}),X&&(0,s.jsx)("button",{onClick:()=>_(!0),className:"w-full px-3 py-2 text-xs rounded flex items-center justify-center gap-2",style:{backgroundColor:"var(--status-skip-bg)",border:"1px solid var(--status-skip-border)",color:"var(--status-skip-text)"},children:"\uD83D\uDD27 View Healing Report"})]})]})}),(0,s.jsxs)("div",{ref:O,className:"flex-1 flex flex-col overflow-hidden min-h-0",children:[(0,s.jsxs)("div",{className:"flex-1 flex flex-col md:flex-row overflow-hidden min-h-0",children:[(0,s.jsxs)("div",{className:"flex-1 flex flex-col min-h-0 max-h-[45vh] md:max-h-none",children:[(0,s.jsx)("div",{className:"p-3 border-b",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("h3",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:"Execution Log"}),g&&(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),(0,s.jsx)("span",{className:"text-xs truncate max-w-[150px]",style:{color:"var(--text-tertiary)"},children:S?S.title:"Processing..."})]})]})}),(0,s.jsxs)("div",{className:"flex-1 overflow-auto p-3 font-mono text-xs",style:{backgroundColor:"var(--bg-primary)"},children:[0===L.length?(0,s.jsx)("div",{className:"text-center py-8",style:{color:"var(--text-tertiary)"},children:'Click "Run Tests" to start'}):L.map((e,t)=>(0,s.jsx)("div",{className:"py-0.5",style:{color:(e=>{switch(e){case"error":return"var(--status-fail-text)";case"success":return"var(--status-pass-text)";case"ai":return"#8b5cf6";case"healing":return"#f59e0b";case"warning":return"var(--status-skip-text)";default:return"var(--text-secondary)"}})(e.type)},children:e.message.split("\n").map((e,t)=>(0,s.jsx)("div",{children:e||"\xa0"},t))},t)),(0,s.jsx)("div",{ref:es})]})]}),(0,s.jsx)("div",{className:"w-1 md:w-1.5 cursor-col-resize hover:bg-[var(--accent)] transition-colors shrink-0",style:{backgroundColor:"var(--border)"},onMouseDown:el}),(0,s.jsxs)("div",{className:"border-t md:border-t-0 md:border-l flex flex-col transition-all duration-200",style:{borderColor:"var(--border)",maxHeight:U?"300px":"36px",minHeight:U?"200px":"36px",width:"auto",flex:U?"0 0 ".concat(T,"%"):"0 0 36px",...window.innerWidth>=768?{maxHeight:"none",minHeight:"auto",flex:U?"0 0 ".concat(T,"%"):"0 0 36px"}:{}},children:[(0,s.jsxs)("div",{className:"p-2 md:p-3 border-b cursor-pointer flex items-center gap-2 shrink-0",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},onClick:()=>P(!U),children:[(0,s.jsx)("span",{className:"text-sm",children:"\uD83D\uDDA5️"}),U&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h3",{className:"text-sm font-medium flex-1",style:{color:"var(--text-primary)"},children:"Browser Preview"}),(0,s.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:M.length>0?"".concat(M.length," screenshots"):""})]})]}),U&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex-1 overflow-auto p-2",style:{backgroundColor:"var(--bg-secondary)"},children:A?(0,s.jsx)("img",{src:"data:image/jpeg;base64,".concat(A),alt:"Browser preview",className:"w-full rounded"}):(0,s.jsx)("div",{className:"flex items-center justify-center h-full min-h-[100px] text-xs",style:{color:"#666"},children:g?"Waiting...":"Preview during execution"})}),M.length>0&&(0,s.jsx)("div",{className:"p-2 border-t overflow-x-auto flex gap-1 shrink-0",style:{borderColor:"var(--border)"},children:M.slice(-6).map((e,t)=>(0,s.jsx)("button",{onClick:()=>I(e.image),className:"flex-shrink-0 w-10 h-7 md:w-12 md:h-8 rounded overflow-hidden border",style:{border:A===e.image?"2px solid var(--accent)":"1px solid var(--border)"},title:e.label,children:(0,s.jsx)("img",{src:"data:image/jpeg;base64,".concat(e.image),alt:e.label,className:"w-full h-full object-cover"})},t))})]})]})]}),C.length>0&&(0,s.jsx)("div",{className:"p-2 md:p-3 border-t shrink-0",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:(0,s.jsxs)("div",{className:"flex flex-wrap gap-3 md:gap-4 text-xs md:text-sm",children:[(0,s.jsxs)("span",{style:{color:"var(--status-pass-text)"},children:["✓ ",C.filter(e=>"pass"===e.status).length]}),(0,s.jsxs)("span",{style:{color:"var(--status-fail-text)"},children:["✗ ",C.filter(e=>"fail"===e.status).length]}),(0,s.jsxs)("span",{style:{color:"var(--status-fail-text)"},children:["⚠ ",C.filter(e=>"error"===e.status).length]}),(0,s.jsxs)("span",{className:"ml-auto",style:{color:"var(--text-tertiary)"},children:[Math.round(C.reduce((e,t)=>e+t.duration,0)/1e3),"s"]})]})})]})]}),"scripts"===y&&(0,s.jsxs)("div",{className:"flex-1 overflow-hidden flex flex-col md:flex-row",children:[(0,s.jsx)("div",{className:"w-full md:w-64 border-b md:border-b-0 md:border-r overflow-auto max-h-[30vh] md:max-h-none",style:{borderColor:"var(--border)"},children:(0,s.jsxs)("div",{className:"p-3",children:[(0,s.jsx)("h3",{className:"text-sm font-medium mb-3",style:{color:"var(--text-primary)"},children:"Test Scripts"}),(0,s.jsx)("div",{className:"space-y-1",children:r.map(e=>{let t=!!K[e.id],r=$===e.id;return(0,s.jsxs)("button",{onClick:()=>{Q(e.id),V(null)},className:"w-full text-left px-3 py-2 text-xs rounded flex items-center gap-2",style:{backgroundColor:r?"var(--bg-secondary)":"transparent",color:"var(--text-primary)",border:r?"1px solid var(--border)":"1px solid transparent"},children:[(0,s.jsx)("span",{className:t?"text-green-500":"text-gray-400",children:t?"✓":"○"}),(0,s.jsxs)("span",{className:"truncate",children:[e.code," - ",e.title]})]},e.id)})})]})}),(0,s.jsx)("div",{className:"flex-1 flex flex-col min-h-0 max-h-[45vh] md:max-h-none",children:$?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"p-3 border-b flex items-center justify-between shrink-0",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("h3",{className:"text-sm font-medium truncate",style:{color:"var(--text-primary)"},children:[null==(t=r.find(e=>e.id===$))?void 0:t.code," - Script"]}),(0,s.jsx)("p",{className:"text-xs mt-0.5",style:{color:"var(--text-tertiary)"},children:q?"Editing":"Click Edit to modify"})]}),(0,s.jsx)("div",{className:"flex gap-2 ml-2",children:q?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onClick:()=>{V(null),Z("")},className:"px-3 py-1.5 text-xs rounded",style:{border:"1px solid var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,s.jsx)("button",{onClick:em,className:"px-3 py-1.5 text-xs rounded",style:{backgroundColor:"var(--accent)",color:"white"},children:"Save"})]}):(0,s.jsx)("button",{onClick:()=>{V($),Z(K[$]||"")},className:"px-3 py-1.5 text-xs rounded",style:{border:"1px solid var(--border)",color:"var(--text-secondary)"},children:"✏️ Edit"})})]}),(0,s.jsx)("div",{className:"flex-1 overflow-auto p-4",style:{backgroundColor:"#1e1e2e"},children:q?(0,s.jsx)("textarea",{value:J,onChange:e=>Z(e.target.value),className:"w-full h-full min-h-[300px] font-mono text-sm p-4 rounded resize-none",style:{backgroundColor:"#1e1e2e",color:"#cdd6f4",border:"none",outline:"none"},spellCheck:!1}):K[$]?(0,s.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap",style:{color:"#cdd6f4"},children:K[$]}):(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-4",children:[(0,s.jsx)("p",{className:"text-sm",style:{color:"#666"},children:"No script generated yet"}),(0,s.jsx)("button",{onClick:ex,disabled:k,className:"px-4 py-2 text-sm rounded disabled:opacity-50",style:{backgroundColor:"var(--accent)",color:"white"},children:k?"Generating...":"Generate Script"})]})})]}):(0,s.jsx)("div",{className:"flex-1 flex items-center justify-center p-4",children:(0,s.jsxs)("div",{className:"text-center",style:{color:"var(--text-tertiary)"},children:[(0,s.jsx)("p",{className:"text-3xl md:text-4xl mb-3"}),(0,s.jsx)("p",{className:"text-sm",children:"Select a test case to view its script"})]})})})]}),"history"===y&&(0,s.jsxs)("div",{className:"flex-1 overflow-hidden flex flex-col md:flex-row",children:[(0,s.jsx)("div",{className:"w-full md:w-80 border-b md:border-b-0 md:border-r overflow-auto max-h-[40vh] md:max-h-none",style:{borderColor:"var(--border)"},children:(0,s.jsxs)("div",{className:"p-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsxs)("h3",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:["Run History (",n.runs.length,")"]}),n.runs.length>0&&(0,s.jsx)("button",{onClick:n.clearRuns,className:"text-xs underline",style:{color:"var(--status-fail-text)"},children:"Clear All"})]}),0===n.runs.length?(0,s.jsx)("div",{className:"text-center py-8 text-xs",style:{color:"var(--text-tertiary)"},children:"No test runs yet"}):(0,s.jsx)("div",{className:"space-y-2",children:n.runs.map(e=>(0,s.jsxs)("div",{className:"p-3 rounded-lg group relative",style:{backgroundColor:(null==ee?void 0:ee.id)===e.id?"var(--bg-secondary)":"transparent",border:(null==ee?void 0:ee.id)===e.id?"1px solid var(--border)":"1px solid transparent"},children:[(0,s.jsxs)("button",{onClick:()=>et(e),className:"w-full text-left",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-primary)"},children:new Date(e.timestamp).toLocaleString()}),(0,s.jsxs)("span",{className:"text-xs",style:{color:e.totalFailed>0?"var(--status-fail-text)":"var(--status-pass-text)"},children:[e.totalPassed,"✓ ",e.totalFailed,"✗"]})]}),(0,s.jsxs)("div",{className:"text-xs mt-1 truncate",style:{color:"var(--text-tertiary)"},children:[e.config.baseUrl," • ",e.config.browser]})]}),(0,s.jsx)("button",{onClick:()=>{n.deleteRun(e.id),(null==ee?void 0:ee.id)===e.id&&et(null)},className:"absolute top-2 right-2 p-1 rounded opacity-0 group-hover:opacity-100 transition-opacity",style:{color:"var(--status-fail-text)"},title:"Delete run",children:"✕"})]},e.id))})]})}),(0,s.jsx)("div",{className:"flex-1 overflow-auto",children:ee?(0,s.jsxs)("div",{className:"p-4 space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:"Run Details"}),(0,s.jsx)("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:new Date(ee.timestamp).toLocaleString()})]}),(0,s.jsxs)("div",{className:"flex gap-3 text-sm",children:[(0,s.jsxs)("span",{style:{color:"var(--status-pass-text)"},children:["✓ ",ee.totalPassed]}),(0,s.jsxs)("span",{style:{color:"var(--status-fail-text)"},children:["✗ ",ee.totalFailed]})]})]}),(0,s.jsx)("div",{className:"space-y-2",children:ee.results.map((e,t)=>(0,s.jsxs)("div",{className:"p-3 rounded-lg",style:{backgroundColor:"var(--bg-secondary)",border:"1px solid ".concat("pass"===e.status?"var(--status-pass-border)":"var(--status-fail-border)")},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[(0,s.jsxs)("span",{className:"text-sm font-medium truncate",style:{color:"var(--text-primary)"},children:[e.testCaseCode||"Test ".concat(t+1)," - ",e.testCaseTitle]}),(0,s.jsx)("span",{className:"text-xs px-2 py-0.5 rounded shrink-0",style:{backgroundColor:"pass"===e.status?"var(--status-pass-bg)":"var(--status-fail-bg)",color:"pass"===e.status?"var(--status-pass-text)":"var(--status-fail-text)"},children:e.status.toUpperCase()})]}),e.error&&(0,s.jsx)("p",{className:"text-xs mt-2 p-2 rounded break-words",style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},children:e.error}),(0,s.jsx)("div",{className:"mt-2 space-y-1",children:e.steps.map((e,t)=>(0,s.jsxs)("div",{className:"flex items-start gap-2 text-xs",children:[(0,s.jsx)("span",{className:"shrink-0",style:{color:"pass"===e.status?"var(--status-pass-text)":"var(--status-fail-text)"},children:"pass"===e.status?"✓":"✗"}),(0,s.jsx)("span",{style:{color:"var(--text-secondary)"},children:e.step})]},t))}),e.aiAnalysis&&(0,s.jsxs)("div",{className:"mt-2 p-2 rounded text-xs break-words",style:{backgroundColor:"var(--bg-primary)",color:"var(--text-secondary)"},children:[(0,s.jsx)("strong",{children:"AI:"})," ",e.aiAnalysis]})]},e.testCaseId))})]}):(0,s.jsx)("div",{className:"flex items-center justify-center h-full p-4",children:(0,s.jsxs)("div",{className:"text-center",style:{color:"var(--text-tertiary)"},children:[(0,s.jsx)("p",{className:"text-3xl md:text-4xl mb-3",children:"\uD83D\uDCCB"}),(0,s.jsx)("p",{className:"text-sm",children:"Select a run to view details"})]})})})]}),(0,s.jsxs)("div",{className:"p-3 md:p-4 border-t flex items-center justify-between shrink-0",style:{borderColor:"var(--border)"},children:[(0,s.jsxs)("div",{className:"text-xs truncate max-w-[200px] md:max-w-none",style:{color:"var(--text-tertiary)"},children:[g&&S&&(0,s.jsxs)("span",{children:["Running: ",S.title]}),!g&&C.length>0&&(0,s.jsxs)("span",{children:[C.length," tests completed"]}),!g&&0===C.length&&"runner"===y&&(0,s.jsx)("span",{className:"hidden sm:inline",children:"Config saved per project"})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{onClick:o,disabled:g,className:"px-3 md:px-4 py-2 text-sm rounded disabled:opacity-50",style:{border:"1px solid var(--border)",color:"var(--text-secondary)"},children:"Close"}),"runner"===y&&(g?(0,s.jsx)("button",{onClick:ep,className:"px-3 md:px-4 py-2 text-sm rounded flex items-center gap-2",style:{backgroundColor:"#ef4444",color:"white"},children:"■ Stop"}):(0,s.jsx)("button",{onClick:eu,disabled:0===ea.size,className:"px-3 md:px-4 py-2 text-sm rounded disabled:opacity-50",style:{backgroundColor:"var(--accent)",color:"white"},children:"▶ Run"}))]})]})]}),H&&(0,s.jsx)("div",{className:"fixed inset-0 z-60 flex items-center justify-center p-4",style:{backgroundColor:"rgba(0,0,0,0.6)"},children:(0,s.jsxs)("div",{className:"w-full max-w-2xl max-h-[80vh] rounded-lg shadow-xl flex flex-col",style:{backgroundColor:"var(--bg-primary)",border:"1px solid var(--border)"},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",style:{borderColor:"var(--border)"},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",style:{color:"var(--text-primary)"},children:"\uD83D\uDD27 Healing Report"}),(0,s.jsx)("p",{className:"text-xs mt-1",style:{color:"var(--text-tertiary)"},children:"AI recommendations"})]}),(0,s.jsx)("button",{onClick:()=>_(!1),className:"p-1 rounded hover:opacity-80",style:{color:"var(--text-tertiary)"},children:"✕"})]}),(0,s.jsx)("div",{className:"flex-1 overflow-auto p-4",children:(0,s.jsx)("pre",{className:"whitespace-pre-wrap text-xs font-mono break-words",style:{color:"var(--text-secondary)"},children:X})}),(0,s.jsx)("div",{className:"p-4 border-t flex justify-end",style:{borderColor:"var(--border)"},children:(0,s.jsx)("button",{onClick:()=>_(!1),className:"px-4 py-2 text-sm rounded",style:{backgroundColor:"var(--accent)",color:"white"},children:"Close"})})]})})]})}var _=r(3101),K=r(3350),Y=r(9770),q=r(7952);let V=(0,_.F)("supports-backdrop-blur:bg-white/10 supports-backdrop-blur:dark:bg-black/10 mx-auto mt-8 flex h-[58px] w-max items-center justify-center gap-2 rounded-2xl border p-2 backdrop-blur-md"),J=l.forwardRef((e,t)=>{let{className:r,children:a,iconSize:o=40,iconMagnification:n=60,disableMagnification:i=!1,iconDistance:c=140,direction:u="middle",...p}=e,m=(0,K.d)(1/0);return(0,s.jsx)(d.P.div,{ref:t,onMouseMove:e=>m.set(e.pageX),onMouseLeave:()=>m.set(1/0),...p,className:(0,x.cn)(V({className:r}),{"items-start":"top"===u,"items-center":"middle"===u,"items-end":"bottom"===u}),children:l.Children.map(a,e=>l.isValidElement(e)&&e.type===Z?l.cloneElement(e,{...e.props,mouseX:m,size:o,magnification:n,disableMagnification:i,distance:c}):e)})});J.displayName="Dock";let Z=e=>{let{size:t=40,magnification:r=60,disableMagnification:a,distance:o=140,mouseX:n,className:i,children:c,...u}=e,p=(0,l.useRef)(null),m=Math.max(6,.2*t),h=(0,K.d)(1/0),f=(0,Y.G)(null!=n?n:h,e=>{var t,r;let s=null!=(r=null==(t=p.current)?void 0:t.getBoundingClientRect())?r:{x:0,width:0};return e-s.x-s.width/2}),b=a?t:r,y=(0,Y.G)(f,[-o,0,o],[t,b,t]),v=(0,q.z)(y,{mass:.15,stiffness:120,damping:25});return(0,s.jsx)(d.P.div,{ref:p,style:{width:v,height:v,padding:m},className:(0,x.cn)("flex aspect-square cursor-pointer items-center justify-center rounded-full",a&&"hover:bg-muted-foreground transition-colors",i),...u,children:(0,s.jsx)("div",{children:c})})};Z.displayName="DockIcon";var $=r(1045);function Q(e){let{className:t,orientation:r="horizontal",...a}=e;return(0,s.jsx)($.w,{"data-slot":"separator",orientation:r,className:(0,x.cn)("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",t),...a})}function ee(e){var t;let{selectedNode:r,testCases:a,stats:i,columns:c,projectId:d,fullscreen:x,onAddTestCase:u,onUpdateTestCase:p,onDeleteTestCase:m,onBulkDelete:h,onBulkUpdate:f,onReorderTestCases:b,onReorderColumn:k,onToggleColumn:w,onRenameColumn:C,onUpdateNode:N,onAddColumn:S,onDeleteColumn:D,confirmDialog:A}=e;(0,n.useRouter)();let[I,U]=(0,l.useState)(!1),[P,T]=(0,l.useState)(!1),[z,F]=(0,l.useState)(!1),[O,X]=(0,l.useState)(!1),[_,K]=(0,l.useState)(!1),[Y,q]=(0,l.useState)(!1),[V,$]=(0,l.useState)(!1),[ee,et]=(0,l.useState)(!1),[er,es]=(0,l.useState)(!1),[ea,eo]=(0,l.useState)(new Set),[el,en]=(0,l.useState)(null),[ei,ec]=(0,l.useState)("asc"),[ed,ex]=(0,l.useState)(!1),[eu,ep]=(0,l.useState)(""),em=(0,l.useRef)(null),eh=(0,l.useRef)(null),ef=x?c:c.filter(e=>"code"!==e.key),eb=y._X.map(e=>e.key);(0,l.useEffect)(()=>{eo(new Set)},[null==r?void 0:r.id]);let ey=(0,l.useCallback)(e=>{eo(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[]),ev=(0,l.useCallback)(()=>{ea.size===a.length?eo(new Set):eo(new Set(a.map(e=>e.id)))},[ea.size,a]),eg=(0,l.useCallback)(()=>eo(new Set),[]),ej=(0,l.useCallback)(async()=>{r&&0!==ea.size&&(!A||await A("Delete Test Cases","Delete ".concat(ea.size," selected test case(s)?")))&&(h(r.id,Array.from(ea)),eo(new Set))},[r,ea,h,A]),ek=(0,l.useCallback)(e=>{r&&0!==ea.size&&(f(r.id,Array.from(ea),{status:e}),eo(new Set))},[r,ea,f]),ew=el?[...a].sort((e,t)=>{let r=e[el]||"",s=t[el]||"",a=r.localeCompare(s);return"asc"===ei?a:-a}):a;(0,l.useEffect)(()=>{ed&&em.current&&em.current.focus()},[ed]),(0,l.useEffect)(()=>{if(!V)return;let e=e=>{eh.current&&!eh.current.contains(e.target)&&$(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[V]);let eC=(0,l.useCallback)(e=>{if(r)for(let t of e)u(r.id,t.title,t.steps,t.expected)},[r,u]),eN=(0,l.useCallback)(e=>{if(r)for(let t of e)u(r.id,t.title,t.steps,t.expected)},[r,u]);return r?(0,s.jsxs)("div",{className:"jsx-bc071752c54fb059 flex flex-col h-full relative",children:[(0,s.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-bc071752c54fb059 px-4 py-3 border-b",children:[(0,s.jsx)("h2",{style:{color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 text-base font-medium mb-2",children:r.label}),(0,s.jsx)(g,{value:i.passRate})]}),I&&(0,s.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},className:"jsx-bc071752c54fb059 px-4 py-3 border-b",children:[(0,s.jsx)("label",{style:{color:"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 text-xs font-medium mb-1 block",children:"Node Notes"}),(0,s.jsx)("textarea",{value:null!=(t=r.notes)?t:"",onChange:e=>N(r.id,{notes:e.target.value}),placeholder:"Add notes for this node...",rows:3,style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)",color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 w-full px-3 py-2 text-sm bg-transparent outline-none border resize-none"})]}),(0,s.jsx)("div",{className:"jsx-bc071752c54fb059 px-4 py-3",children:(0,s.jsx)(j,{onAdd:e=>u(r.id,e),nodeLabel:r.label})}),ea.size>0&&(0,s.jsxs)("div",{style:{borderColor:"var(--accent)",backgroundColor:"var(--accent)",animation:"fadeInUp 150ms ease-out"},className:"jsx-bc071752c54fb059 mx-4 mb-2 px-3 py-2 rounded-lg border flex items-center gap-3",children:[(0,s.jsxs)("span",{className:"jsx-bc071752c54fb059 text-xs font-medium text-white",children:[ea.size," selected"]}),(0,s.jsx)("div",{className:"jsx-bc071752c54fb059 flex-1"}),["pass","fail","skip","untested"].map(e=>(0,s.jsxs)("button",{onClick:()=>ek(e),style:{color:"#fff"},className:"jsx-bc071752c54fb059 px-2 py-1 text-[10px] font-medium rounded-md transition-colors hover:bg-white/20",children:["Mark ",e.charAt(0).toUpperCase()+e.slice(1)]},e)),(0,s.jsx)("div",{className:"jsx-bc071752c54fb059 w-px h-4 bg-white/30"}),(0,s.jsx)("button",{onClick:ej,style:{color:"#fff"},className:"jsx-bc071752c54fb059 px-2 py-1 text-[10px] font-medium rounded-md transition-colors hover:bg-white/20",children:"Delete"}),(0,s.jsx)("button",{onClick:eg,style:{color:"#fff"},title:"Clear selection",className:"jsx-bc071752c54fb059 px-1.5 py-1 text-[10px] font-medium rounded-md transition-colors hover:bg-white/20",children:"\xd7"})]}),(0,s.jsx)("div",{className:"jsx-bc071752c54fb059 flex-1 min-h-0 overflow-auto px-2",children:0===a.length?(0,s.jsx)(v.p,{message:"No test cases yet. Use the quick-add bar or Generate button to add test cases."}):(0,s.jsx)(L,{testCases:ew,columns:ef,expandAll:ee,selectedIds:ea,onToggleSelect:ey,onToggleSelectAll:ev,sortKey:el,sortDirection:ei,onSortChange:e=>{null===e?en(null):el===e?ec(e=>"asc"===e?"desc":"asc"):(en(e),ec("asc"))},onUpdate:(e,t)=>p(r.id,e,t),onDelete:e=>m(r.id,e),onReorder:e=>b(r.id,e)})}),(0,s.jsx)(E,{stats:i}),(0,s.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 flex-shrink-0 border-t py-2 flex justify-center relative",children:[V&&(0,s.jsxs)("div",{ref:eh,style:{bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:2,backgroundColor:"var(--bg-card)",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)",animation:"fadeInUp 200ms ease-out",width:180},className:"jsx-bc071752c54fb059 absolute z-30 rounded-xl border",children:[(0,s.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-bc071752c54fb059 flex items-center justify-between px-3 py-2 border-b",children:[(0,s.jsx)("h4",{style:{color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 text-[11px] font-semibold",children:"Columns"}),(0,s.jsx)("button",{onClick:()=>$(!1),style:{color:"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 text-[10px] opacity-50 hover:opacity-100",children:"\xd7"})]}),(0,s.jsxs)("div",{className:"jsx-bc071752c54fb059 py-1 max-h-[240px] overflow-y-auto",children:[ef.map((e,t)=>{let o=!eb.includes(e.key);return(0,s.jsxs)("div",{className:"jsx-bc071752c54fb059 flex items-center justify-between px-3 py-1.5 text-[11px] hover:bg-[var(--bg-secondary)] transition-colors group/col",children:[(0,s.jsxs)("button",{onClick:()=>r&&w(r.id,e.key),style:{color:e.visible?"var(--text-primary)":"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 flex items-center gap-2 flex-1 text-left",children:[(0,s.jsx)("span",{className:"jsx-bc071752c54fb059 w-3 text-center",children:e.visible?"✓":""}),(0,s.jsx)("span",{className:"jsx-bc071752c54fb059",children:e.label})]}),(0,s.jsxs)("div",{className:"jsx-bc071752c54fb059 flex items-center gap-0.5 opacity-0 group-hover/col:opacity-100 transition-opacity",children:[(0,s.jsx)("button",{onClick:()=>r&&(null==k?void 0:k(r.id,e.key,"up")),disabled:0===t,style:{color:"var(--text-tertiary)"},title:"Move up",className:"jsx-bc071752c54fb059 w-4 h-4 flex items-center justify-center rounded text-[10px] disabled:opacity-20 hover:bg-[var(--bg-secondary)]",children:"↑"}),(0,s.jsx)("button",{onClick:()=>r&&(null==k?void 0:k(r.id,e.key,"down")),disabled:t===ef.length-1,style:{color:"var(--text-tertiary)"},title:"Move down",className:"jsx-bc071752c54fb059 w-4 h-4 flex items-center justify-center rounded text-[10px] disabled:opacity-20 hover:bg-[var(--bg-secondary)]",children:"↓"}),o&&(0,s.jsx)("button",{onClick:async()=>{if(r&&D)(!a.some(t=>{let r=t[e.key];return r&&"string"==typeof r&&""!==r.trim()})||!A||await A("Delete Column",'This column has data in some test cases. Delete "'.concat(e.label,'" anyway?')))&&D(r.id,e.key)},style:{color:"var(--status-fail-text)"},title:"Delete ".concat(e.label),className:"jsx-bc071752c54fb059 w-4 h-4 flex items-center justify-center rounded hover:opacity-100 transition-opacity text-[10px]",children:"\xd7"})]})]},e.key)}),ed?(0,s.jsx)("div",{className:"jsx-bc071752c54fb059 px-3 py-1.5",children:(0,s.jsx)("input",{ref:em,value:eu,onChange:e=>ep(e.target.value),onKeyDown:e=>{"Enter"===e.key&&eu.trim()&&(null==S||S(r.id,eu.trim()),ep(""),ex(!1)),"Escape"===e.key&&(ex(!1),ep(""))},onBlur:()=>{eu.trim()&&(null==S||S(r.id,eu.trim())),ep(""),ex(!1)},placeholder:"Column name...",style:{borderColor:"var(--accent)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 w-full px-2 py-1 text-[11px] rounded border outline-none"})}):(0,s.jsxs)("button",{onClick:()=>ex(!0),style:{color:"var(--accent)"},className:"jsx-bc071752c54fb059 w-full px-3 py-1.5 text-[11px] text-left flex items-center gap-2 hover:bg-[var(--bg-secondary)] transition-colors",children:[(0,s.jsx)("span",{className:"jsx-bc071752c54fb059 w-3 text-center",children:"+"}),(0,s.jsx)("span",{className:"jsx-bc071752c54fb059",children:"Add New Column"})]})]})]}),(0,s.jsxs)(J,{direction:"middle",iconSize:32,iconMagnification:44,iconDistance:100,children:[(0,s.jsx)(Z,{children:(0,s.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,s.jsx)("button",{onClick:()=>X(!0),className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full hover:bg-[var(--bg-secondary)] transition-colors",children:(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,s.jsx)("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("polyline",{points:"14 2 14 8 20 8",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("line",{x1:"16",y1:"13",x2:"8",y2:"13",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("line",{x1:"16",y1:"17",x2:"8",y2:"17",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("polyline",{points:"10 9 9 9 8 9",className:"jsx-bc071752c54fb059"})]})}),(0,s.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Node Summary"})]})}),(0,s.jsx)(Q,{orientation:"vertical",className:"h-full"}),(0,s.jsx)(Z,{children:(0,s.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,s.jsx)("button",{onClick:()=>U(!I),style:{backgroundColor:I?"var(--bg-secondary)":"transparent"},className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full transition-colors",children:(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:I?"var(--accent)":"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,s.jsx)("path",{d:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("path",{d:"M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",className:"jsx-bc071752c54fb059"})]})}),(0,s.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Notes"})]})}),(0,s.jsx)(Z,{children:(0,s.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,s.jsx)("button",{onClick:()=>T(!0),className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full hover:bg-[var(--bg-secondary)] transition-colors",children:(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,s.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("polyline",{points:"7 10 12 15 17 10",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("line",{x1:"12",y1:"15",x2:"12",y2:"3",className:"jsx-bc071752c54fb059"})]})}),(0,s.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Export"})]})}),(0,s.jsx)(Z,{children:(0,s.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,s.jsx)("button",{onClick:()=>{let e=(0,M.wy)(r,a,c);navigator.clipboard.writeText(e).then(()=>{es(!0),setTimeout(()=>es(!1),2e3)})},style:{backgroundColor:er?"var(--bg-secondary)":"transparent"},className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full transition-colors",children:er?(0,s.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:(0,s.jsx)("polyline",{points:"20 6 9 17 4 12",className:"jsx-bc071752c54fb059"})}):(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,s.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1",className:"jsx-bc071752c54fb059"})]})}),(0,s.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:er?"Copied!":"Copy as Markdown"})]})}),(0,s.jsx)(Z,{children:(0,s.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,s.jsx)("button",{onClick:()=>$(!V),style:{backgroundColor:V?"var(--bg-secondary)":"transparent"},className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full transition-colors",children:(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:V?"var(--accent)":"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,s.jsx)("rect",{x:"3",y:"3",width:"7",height:"7",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("rect",{x:"14",y:"3",width:"7",height:"7",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("rect",{x:"14",y:"14",width:"7",height:"7",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("rect",{x:"3",y:"14",width:"7",height:"7",className:"jsx-bc071752c54fb059"})]})}),(0,s.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Columns"})]})}),(0,s.jsx)(Z,{children:(0,s.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,s.jsx)("button",{onClick:()=>et(e=>!e),style:{backgroundColor:ee?"var(--bg-secondary)":"transparent"},className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full transition-colors",children:(0,s.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:ee?"var(--accent)":"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:ee?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("line",{x1:"3",y1:"18",x2:"21",y2:"18",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("polyline",{points:"7 3 3 6 7 9",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("polyline",{points:"17 15 21 18 17 21",className:"jsx-bc071752c54fb059"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("line",{x1:"3",y1:"18",x2:"21",y2:"18",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("polyline",{points:"17 3 21 6 17 9",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("polyline",{points:"7 15 3 18 7 21",className:"jsx-bc071752c54fb059"})]})})}),(0,s.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:ee?"Collapse All":"Expand All"})]})}),(0,s.jsx)(Q,{orientation:"vertical",className:"h-full"}),(0,s.jsx)(Z,{children:(0,s.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,s.jsx)("button",{onClick:()=>K(!0),className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full hover:bg-[var(--bg-secondary)] transition-colors",children:(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,s.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("polyline",{points:"17 8 12 3 7 8",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("line",{x1:"12",y1:"3",x2:"12",y2:"15",className:"jsx-bc071752c54fb059"})]})}),(0,s.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Import Cases"})]})}),(0,s.jsx)(Z,{children:(0,s.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,s.jsx)("button",{onClick:()=>q(!0),className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full hover:bg-[var(--bg-secondary)] transition-colors",children:(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10",className:"jsx-bc071752c54fb059"}),(0,s.jsx)("polyline",{points:"12 6 12 12 16 14",className:"jsx-bc071752c54fb059"})]})}),(0,s.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"E2E Test"})]})}),(0,s.jsx)(Z,{children:(0,s.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,s.jsx)("button",{onClick:()=>F(!0),className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full hover:bg-[var(--bg-secondary)] transition-colors",children:(0,s.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:(0,s.jsx)("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",className:"jsx-bc071752c54fb059"})})}),(0,s.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Generate"})]})})]})]}),(0,s.jsx)(R,{open:P,onClose:()=>T(!1),node:r,testCases:a,columns:c}),(0,s.jsx)(W,{open:z,onClose:()=>F(!1),node:r,onGenerate:eC}),(0,s.jsx)(B,{open:O,onClose:()=>X(!1),node:r,testCases:a,stats:i}),(0,s.jsx)(G,{open:_,onClose:()=>K(!1),onImport:eN,nodeLabel:r.label}),Y&&r&&(0,s.jsx)(H,{testCases:a,projectId:d,onClose:()=>q(!1)}),(0,s.jsx)(o(),{id:"bc071752c54fb059",children:"@keyframes fadeInUp{from{opacity:0;transform:translatey(8px)}to{opacity:1;transform:translatey(0)}}"})]}):(0,s.jsx)("div",{className:"h-full",children:(0,s.jsx)(v.p,{message:"Select a node from the mindmap to view its test cases."})})}function et(){var e,t,r,a,c,d;let x=(0,n.useParams)(),u=(0,n.useRouter)(),p=x.projectId,{projects:m,activeProject:h,activeProjectId:f,selectedNodeId:y,setSelectedNodeId:g,switchProject:j,mindmap:k,testCases:w,pushState:C,lastSaved:N,canUndo:S,canRedo:D,undo:L,redo:E,confirmDialog:M}=(0,i.M)(),R=null!=(t=m[p])?t:null,A=(0,l.useRef)(null),I=f===p?h:R;(0,l.useEffect)(()=>{m[p]&&A.current!==p&&(A.current=p,j(p))},[p,m,j]),(0,l.useEffect)(()=>{g(null)},[p,g]);let U=(0,l.useMemo)(()=>{var e;return null!=(e=null==I?void 0:I.flows.find(e=>e.id===y))?e:null},[I,y]),[P,T]=(0,l.useState)("mindmap"),[z,W]=(0,l.useState)(.5),[F,B]=(0,l.useState)(!1),[O,X]=(0,l.useState)(!1),[G,H]=(0,l.useState)(!1),[_,K]=(0,l.useState)(!1),Y=(0,l.useRef)(null),q=(0,l.useRef)(null),V=(0,l.useRef)(null),J=(0,l.useRef)(null),Z=(0,l.useRef)({mouseX:0,startRatio:.5}),$=(0,l.useCallback)(e=>{e.preventDefault(),Z.current={mouseX:e.clientX,startRatio:z},B(!0)},[z]);return((0,l.useEffect)(()=>{if(!F)return;let e=e=>{if(!Y.current)return;let t=Y.current.getBoundingClientRect(),r=(e.clientX-Z.current.mouseX)/t.width;W(Math.max(.1,Math.min(.9,Z.current.startRatio+r)))},t=()=>B(!1);return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[F]),R)?I?(0,s.jsxs)("div",{className:"jsx-a894832df36b68ca h-full flex flex-col",children:[(0,s.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},className:"jsx-a894832df36b68ca flex md:hidden border-b flex-shrink-0",children:[(0,s.jsx)("button",{onClick:()=>T("mindmap"),style:{color:"mindmap"===P?"var(--accent)":"var(--text-tertiary)",borderBottom:"mindmap"===P?"2px solid var(--accent)":"2px solid transparent"},className:"jsx-a894832df36b68ca flex-1 px-4 py-2 text-xs font-medium transition-colors",children:"Mindmap"}),(0,s.jsx)("button",{onClick:()=>T("testcases"),style:{color:"testcases"===P?"var(--accent)":"var(--text-tertiary)",borderBottom:"testcases"===P?"2px solid var(--accent)":"2px solid transparent"},className:"jsx-a894832df36b68ca flex-1 px-4 py-2 text-xs font-medium transition-colors",children:"Test Cases"})]}),(0,s.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-a894832df36b68ca flex items-center justify-between px-4 py-1.5 border-b flex-shrink-0",children:[(0,s.jsx)("div",{style:{color:"var(--text-tertiary)"},className:"jsx-a894832df36b68ca text-[10px]",children:N?(0,s.jsxs)("span",{className:"jsx-a894832df36b68ca",children:["Last saved ",function(e){let t=new Date(e),r=Math.floor((new Date().getTime()-t.getTime())/1e3),s=Math.floor(r/60),a=Math.floor(s/60);return r<10?"just now":r<60?"".concat(r,"s ago"):s<60?"".concat(s,"m ago"):a<24?"".concat(a,"h ago"):t.toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}(N)]}):(0,s.jsx)("span",{className:"jsx-a894832df36b68ca",children:"Not saved yet"})}),(0,s.jsxs)("div",{className:"jsx-a894832df36b68ca flex items-center gap-2",children:[(0,s.jsx)("button",{onClick:()=>H(e=>!e),style:{color:"var(--text-tertiary)"},title:G?"Exit fullscreen":"Expand test cases",className:"jsx-a894832df36b68ca p-1 rounded transition-colors hover:bg-[var(--bg-secondary)]",children:G?(0,s.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-a894832df36b68ca",children:(0,s.jsx)("path",{d:"M8 3v3a2 2 0 01-2 2H3m18 0h-3a2 2 0 01-2-2V3m0 18v-3a2 2 0 012-2h3M3 16h3a2 2 0 012 2v3",className:"jsx-a894832df36b68ca"})}):(0,s.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-a894832df36b68ca",children:(0,s.jsx)("path",{d:"M8 3H5a2 2 0 00-2 2v3m18 0V5a2 2 0 00-2-2h-3m0 18h3a2 2 0 002-2v-3M3 16v3a2 2 0 002 2h3",className:"jsx-a894832df36b68ca"})})}),(0,s.jsx)("button",{onClick:()=>u.push("/projects/".concat(p,"/summary")),style:{borderColor:"var(--border)",color:"var(--text-secondary)"},className:"jsx-a894832df36b68ca hidden md:block px-3 py-1 text-xs font-medium rounded-md border transition-colors hover:bg-[var(--bg-secondary)]",children:"Project Report"}),(0,s.jsx)("button",{onClick:()=>{K(!0),setTimeout(()=>K(!1),1500);let e=new Event("save-project");window.dispatchEvent(e)},style:{borderColor:_?"var(--status-pass-text)":"var(--border)",color:_?"var(--status-pass-text)":"var(--text-secondary)",backgroundColor:_?"var(--status-pass-bg)":"transparent"},className:"jsx-a894832df36b68ca px-3 py-1 text-xs font-medium rounded-md border transition-all",children:_?"Saved!":"Save"})]})]}),(0,s.jsxs)("div",{ref:Y,style:{cursor:F?"col-resize":void 0},className:"jsx-a894832df36b68ca flex-1 flex min-h-0 relative",children:[!G&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{ref:q,style:{width:"".concat(100*z,"%")},className:"jsx-a894832df36b68ca "+"\n ".concat("mindmap"===P?"flex":"hidden","\n md:flex flex-col min-w-0 mobile-full-width\n "),children:(0,s.jsx)(b,{nodes:k.nodes,edges:k.edges,testCases:null!=(r=I.testCases)?r:{},selectedNodeId:y,onSelect:k.selectNode,onAddNode:(e,t,r,s)=>{C("Add node"),k.addNode(e,t,r,s)},onDeleteNode:e=>{C("Delete node"),k.deleteNode(e)},onDeleteNodes:e=>{C("Delete nodes"),k.deleteNodes(e)},onUnlinkNode:e=>{C("Unlink node"),k.unlinkNode(e)},onRenameNode:(e,t)=>{C("Rename node"),k.renameNode(e,t)},onUpdateNode:(e,t)=>{C("Update node"),k.updateNode(e,t)},onAddEdge:(e,t,r)=>{C("Add edge"),k.addEdge(e,t,r)},onDeleteEdge:e=>{C("Delete edge"),k.deleteEdge(e)},onUpdateEdge:(e,t)=>{C("Update edge"),k.updateEdge(e,t)},onResetLayout:()=>{C("Reset layout"),k.resetLayout()},canUndo:S,canRedo:D,onUndo:L,onRedo:E})}),(0,s.jsxs)("div",{ref:J,style:{width:20,cursor:"col-resize"},onMouseDown:$,onMouseEnter:()=>X(!0),onMouseLeave:()=>X(!1),className:"jsx-a894832df36b68ca hidden md:flex items-center justify-center flex-shrink-0 select-none relative group",children:[(0,s.jsx)("div",{style:{backgroundColor:O||F?"var(--bg-secondary)":"transparent"},className:"jsx-a894832df36b68ca absolute inset-y-0 -left-2 -right-2 transition-colors duration-150"}),(0,s.jsx)("div",{style:{backgroundColor:"var(--border)",opacity:O||F?0:1},className:"jsx-a894832df36b68ca absolute inset-y-0 left-1/2 -translate-x-1/2 w-[1px] transition-opacity duration-150"}),(0,s.jsx)("div",{style:{background:"linear-gradient(180deg, #9E7AFF 0%, #FE8BBB 50%, #9E7AFF 100%)",opacity:O||F?.8:.4,animation:"beamFlow 3s ease-in-out infinite",backgroundSize:"100% 200%"},className:"jsx-a894832df36b68ca absolute inset-y-0 left-1/2 -translate-x-1/2 w-[2px] transition-opacity duration-150"}),(0,s.jsxs)("div",{className:"jsx-a894832df36b68ca relative z-10 flex flex-col gap-1.5",children:[(0,s.jsx)("div",{style:{backgroundColor:O||F?"var(--text-secondary)":"var(--text-tertiary)"},className:"jsx-a894832df36b68ca w-1.5 h-1.5 rounded-full transition-colors duration-150"}),(0,s.jsx)("div",{style:{backgroundColor:O||F?"var(--text-secondary)":"var(--text-tertiary)"},className:"jsx-a894832df36b68ca w-1.5 h-1.5 rounded-full transition-colors duration-150"}),(0,s.jsx)("div",{style:{backgroundColor:O||F?"var(--text-secondary)":"var(--text-tertiary)"},className:"jsx-a894832df36b68ca w-1.5 h-1.5 rounded-full transition-colors duration-150"})]})]})]}),(0,s.jsx)("div",{ref:V,style:{width:G?"100%":"".concat((1-z)*100,"%")},className:"jsx-a894832df36b68ca "+"\n ".concat("testcases"===P?"flex":"hidden","\n md:flex flex-col min-w-0 mobile-full-width\n "),children:(0,s.jsx)(ee,{selectedNode:U,testCases:w.testCases,stats:w.stats,columns:y?null!=(c=null!=(a=null==(e=I.columnConfigs)?void 0:e[y])?a:I.columnConfig)?c:[]:null!=(d=I.columnConfig)?d:[],projectId:p,fullscreen:G,onAddTestCase:w.addTestCase,onUpdateTestCase:w.updateTestCase,onDeleteTestCase:w.deleteTestCase,onBulkDelete:w.bulkDeleteTestCases,onBulkUpdate:w.bulkUpdateTestCases,onReorderTestCases:w.reorderTestCases,onToggleColumn:w.toggleColumnVisibility,onRenameColumn:w.updateColumnConfig,onUpdateNode:k.updateNode,onAddColumn:w.addColumn,onDeleteColumn:w.deleteColumn,onReorderColumn:w.reorderColumn,confirmDialog:M})})]}),(0,s.jsx)(o(),{id:"a894832df36b68ca",children:"@media(max-width:767px){.mobile-full-width.jsx-a894832df36b68ca{width:100%!important}}"})]}):(0,s.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,s.jsx)("div",{className:"text-sm",style:{color:"var(--text-tertiary)"},children:"Loading project..."})}):(0,s.jsx)(v.p,{message:"Project not found.",action:{label:"Back to Projects",onClick:()=>u.push("/projects")}})}},7669:(e,t,r)=>{"use strict";r.d(t,{P:()=>d});var s=r(2115),a=r(3362);let o="qa-llm-config",l={apiKey:"",baseURL:"",defaultModel:"",secondaryModel:"",models:[],connected:!1};function n(){let e={};for(let t of a.Pj)e[t.id]={...l,baseURL:t.baseURL||""};return{activeProvider:null,providers:e}}function i(){try{let t=localStorage.getItem(o);if(!t)return n();let r=JSON.parse(t);if(r.provider&&r.apiKey&&!r.providers){let e=n();return{...e,activeProvider:null,providers:{...e.providers,google:{...l,apiKey:r.apiKey,connected:!0}}}}let s=n(),i={...s,...r,providers:{...s.providers}};for(let t of a.Pj){var e;let s=null==(e=r.providers)?void 0:e[t.id];i.providers[t.id]={...l,baseURL:t.baseURL||"",...s}}return i}catch(e){return n()}}function c(e){try{localStorage.setItem(o,JSON.stringify(e))}catch(e){}}function d(){let[e,t]=(0,s.useState)(n),[r,a]=(0,s.useState)(!1);(0,s.useEffect)(()=>{t(i()),a(!0)},[]);let o=(0,s.useCallback)((e,r)=>{let s=i(),a={...s,providers:{...s.providers,[e]:{...s.providers[e],...r}}};c(a),t(a)},[]),l=(0,s.useCallback)(e=>{let r={...i(),activeProvider:e};c(r),t(r)},[]),d=e.activeProvider?e.providers[e.activeProvider]:null,x=r&&!!d&&d.apiKey.length>0&&d.connected;return{config:e,loaded:r,isConnected:x,activeProvider:d,activeProviderId:e.activeProvider,updateProvider:o,setActiveProvider:l}}}},e=>{e.O(0,[343,909,485,637,532,246,441,255,358],()=>e(e.s=1868)),_N_E=e.O()}]);
|